diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 77f80363a..000000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,18 +0,0 @@ -checks: - similar_code: - exclude_paths: - - "contracts/tests/" - complexity: - exclude_paths: - - "contracts/tests/" -engines: - tslint: - enabled: true - checks: - quotemark: - enabled: false -exclude_paths: - - "web/src/graphql/generated.ts" - - "contracts/deployments/" - - "contracts/config/" - - "kleros-sdk/config/" diff --git a/.depcheckrc b/.depcheckrc deleted file mode 100644 index e8aa3c8e2..000000000 --- a/.depcheckrc +++ /dev/null @@ -1,2 +0,0 @@ -ignores: ["lint-*", "prettier-*", "eslint-*", "babel-*", "solhint-*", "@commitlint/*", "conventional-changelog-cli"] -skip-missing: true \ No newline at end of file diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index fb3c7130c..000000000 --- a/.dockerignore +++ /dev/null @@ -1,18 +0,0 @@ -.yarn/cache -.yarn/install-state.gz - -contracts/.env -contracts/.env.* -contracts/test -contracts/lib -contracts/cache -contracts/cache_hardhat -contracts/tenderly.yaml - -*/.DS_Store -*/*.log - -.env* -.flaskenv* -!.env.project -!.env.vault \ No newline at end of file diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 332275afb..000000000 --- a/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -root = true - -[*] -end_of_line = lf -trim_trailing_whitespace = true -insert_final_newline = true -charset = utf-8 - -[*.{html,js,.json,mjs,rjson,ts}] -indent_style = space -indent_size = 2 - -[*.sol] -indent_style = space -indent_size = 4 diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index bd4b8427a..000000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules/ -**/node_modules/ -!**/*.js -!*.js diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index ca386905b..000000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "contracts/lib/forge-std"] - path = contracts/lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "contracts/lib/solmate"] - path = contracts/lib/solmate - url = https://github.com/rari-capital/solmate diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100755 index d71a03b9f..000000000 --- a/.husky/commit-msg +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -yarn commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index d2ae35e84..000000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -yarn lint-staged diff --git a/.lintstagedrc.json b/.lintstagedrc.json deleted file mode 100644 index 68dabb4db..000000000 --- a/.lintstagedrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "*.{js,jsx,ts,tsx}": "prettier --write --config prettier-config/.prettierrc.js", - "*.{md,html,json}": "prettier --write --config prettier-config/.prettierrc.js", - "*.sol": "prettier --write --config prettier-config/.prettierrc.js" -} diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 209e3ef4b..000000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/.renovaterc.json b/.renovaterc.json deleted file mode 100644 index a361c08e0..000000000 --- a/.renovaterc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "baseBranches": [ - "dev" - ], - "labels": [ - "dependencies" - ], - "assignees": [ - "jaybuidl" - ], - "extends": [ - "config:base", - "group:allNonMajor", - ":preserveSemverRanges", - "schedule:daily", - "npm:unpublishSafe", - ":maintainLockFilesDisabled" - ] -} diff --git a/.vscode/contract-decorators.code-snippets b/.vscode/contract-decorators.code-snippets deleted file mode 100644 index 954608ff9..000000000 --- a/.vscode/contract-decorators.code-snippets +++ /dev/null @@ -1,118 +0,0 @@ -{ - // Place your kleros-v2 workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and - // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope - // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is - // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: - // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. - // Placeholders with the same ids are connected. - // Example: - // "Print to console": { - // "scope": "javascript,typescript", - // "prefix": "log", - // "body": [ - // "console.log('$1');", - // "$2" - // ], - // "description": "Log output to console" - // } - "Decorator for the Enums / Structs section": { - "scope": "solidity", - "prefix": "/struct", - "body": [ - "// ************************************* //", - "// * Enums / Structs * //", - "// ************************************* //", - "$0" - ] - }, - "Decorator for the Storage section": { - "scope": "solidity", - "prefix": "/stor", - "body": [ - "// ************************************* //", - "// * Storage * //", - "// ************************************* //", - "$0" - ] - }, - "Decorator for the Events section": { - "scope": "solidity", - "prefix": "/event", - "body": [ - "// ************************************* //", - "// * Events * //", - "// ************************************* //", - "$0" - ] - }, - "Decorator for the Function Modifiers section": { - "scope": "solidity", - "prefix": "/modif", - "body": [ - "// ************************************* //", - "// * Function Modifiers * //", - "// ************************************* //", - "$0" - ] - }, - "Decorator for the Constructor section": { - "scope": "solidity", - "prefix": "/constr", - "body": [ - "// ************************************* //", - "// * Constructor * //", - "// ************************************* //", - "$0" - ] - }, - "Decorator for the Initializer section": { - "scope": "solidity", - "prefix": "/init", - "body": [ - "// ************************************* //", - "// * Initializer * //", - "// ************************************* //", - "$0" - ] - }, - "Decorator for the Governance section": { - "scope": "solidity", - "prefix": "/gov", - "body": [ - "// ************************************* //", - "// * Governance * //", - "// ************************************* //", - "$0" - ] - }, - "Decorator for the State Modifiers section": { - "scope": "solidity", - "prefix": "/state", - "body": [ - "// ************************************* //", - "// * State Modifiers * //", - "// ************************************* //", - "$0" - ] - }, - "Decorator for the Public Views section": { - "scope": "solidity", - "prefix": "/view", - "body": [ - "// ************************************* //", - "// * Public Views * //", - "// ************************************* //", - "$0" - ] - }, - "Decorator for the Internal section": { - "scope": "solidity", - "prefix": "/intern", - "body": [ - "// ************************************* //", - "// * Internal * //", - "// ************************************* //", - "$0" - ] - }, -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 95ab72c41..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "solidity.formatter": "prettier", - "[solidity]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "solidity-va.test.defaultUnittestTemplate": "hardhat", - "solidity-language-server.trace.server.verbosity": "message", - "typescript.tsdk": "node_modules/typescript/lib", - "eslint.packageManager": "yarn", - "prettier.useEditorConfig": true, - "prettier.configPath": "prettier-config/.prettierrc.js", - "sonarlint.connectedMode.project": { - "connectionId": "kleros", - "projectKey": "kleros_kleros-v2" - }, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit" - } -} diff --git a/.whitesource b/.whitesource deleted file mode 100644 index 8b5c1c77d..000000000 --- a/.whitesource +++ /dev/null @@ -1,23 +0,0 @@ -{ - "scanSettings": { - "baseBranches": ["dev", "master"] - }, - "checkRunSettings": { - "vulnerableCheckRunConclusionLevel": "failure", - "displayMode": "diff", - "useMendCheckNames": true - }, - "issueSettings": { - "minSeverityLevel": "MEDIUM", - "issueType": "DEPENDENCY", - "customLabels": ["Type: Security🛡️", "dependencies"], - "assignees": ["jaybuidl"] - }, - "remediateSettings": { - "workflowRules": { - "enabled": true, - "minVulnerabilityScore": 3, - "maxVulnerabilityScore": 10 - } - } -} \ No newline at end of file diff --git a/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs b/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs deleted file mode 100644 index 11f949d97..000000000 --- a/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +++ /dev/null @@ -1,541 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-interactive-tools", -factory: function (require) { -var plugin=(()=>{var jF=Object.create,Ay=Object.defineProperty,zF=Object.defineProperties,HF=Object.getOwnPropertyDescriptor,qF=Object.getOwnPropertyDescriptors,WF=Object.getOwnPropertyNames,__=Object.getOwnPropertySymbols,VF=Object.getPrototypeOf,IE=Object.prototype.hasOwnProperty,O8=Object.prototype.propertyIsEnumerable;var M8=(i,o,a)=>o in i?Ay(i,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[o]=a,Ht=(i,o)=>{for(var a in o||(o={}))IE.call(o,a)&&M8(i,a,o[a]);if(__)for(var a of __(o))O8.call(o,a)&&M8(i,a,o[a]);return i},Zr=(i,o)=>zF(i,qF(o)),GF=i=>Ay(i,"__esModule",{value:!0});var Dl=(i,o)=>{var a={};for(var p in i)IE.call(i,p)&&o.indexOf(p)<0&&(a[p]=i[p]);if(i!=null&&__)for(var p of __(i))o.indexOf(p)<0&&O8.call(i,p)&&(a[p]=i[p]);return a};var tt=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),YF=(i,o)=>{for(var a in o)Ay(i,a,{get:o[a],enumerable:!0})},KF=(i,o,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of WF(o))!IE.call(i,p)&&p!=="default"&&Ay(i,p,{get:()=>o[p],enumerable:!(a=HF(o,p))||a.enumerable});return i},vu=i=>KF(GF(Ay(i!=null?jF(VF(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var Oy=tt((tH,k8)=>{"use strict";var N8=Object.getOwnPropertySymbols,XF=Object.prototype.hasOwnProperty,QF=Object.prototype.propertyIsEnumerable;function JF(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function ZF(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var p=Object.getOwnPropertyNames(o).map(function(t){return o[t]});if(p.join("")!=="0123456789")return!1;var _={};return"abcdefghijklmnopqrst".split("").forEach(function(t){_[t]=t}),Object.keys(Object.assign({},_)).join("")==="abcdefghijklmnopqrst"}catch(t){return!1}}k8.exports=ZF()?Object.assign:function(i,o){for(var a,p=JF(i),_,t=1;t{"use strict";var bE=Oy(),Zf=typeof Symbol=="function"&&Symbol.for,My=Zf?Symbol.for("react.element"):60103,$F=Zf?Symbol.for("react.portal"):60106,eP=Zf?Symbol.for("react.fragment"):60107,tP=Zf?Symbol.for("react.strict_mode"):60108,nP=Zf?Symbol.for("react.profiler"):60114,rP=Zf?Symbol.for("react.provider"):60109,iP=Zf?Symbol.for("react.context"):60110,uP=Zf?Symbol.for("react.forward_ref"):60112,oP=Zf?Symbol.for("react.suspense"):60113,lP=Zf?Symbol.for("react.memo"):60115,sP=Zf?Symbol.for("react.lazy"):60116,L8=typeof Symbol=="function"&&Symbol.iterator;function ky(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,a=1;aE_.length&&E_.push(i)}function HE(i,o,a,p){var _=typeof i;(_==="undefined"||_==="boolean")&&(i=null);var t=!1;if(i===null)t=!0;else switch(_){case"string":case"number":t=!0;break;case"object":switch(i.$$typeof){case My:case $F:t=!0}}if(t)return a(p,i,o===""?"."+qE(i,0):o),1;if(t=0,o=o===""?".":o+":",Array.isArray(i))for(var k=0;k{"use strict";var hP="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";V8.exports=hP});var YE=tt((iH,Y8)=>{"use strict";var GE=function(){};process.env.NODE_ENV!=="production"&&(K8=G8(),D_={},X8=Function.call.bind(Object.prototype.hasOwnProperty),GE=function(i){var o="Warning: "+i;typeof console!="undefined"&&console.error(o);try{throw new Error(o)}catch(a){}});var K8,D_,X8;function Q8(i,o,a,p,_){if(process.env.NODE_ENV!=="production"){for(var t in i)if(X8(i,t)){var k;try{if(typeof i[t]!="function"){var L=Error((p||"React class")+": "+a+" type `"+t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[t]+"`.");throw L.name="Invariant Violation",L}k=i[t](o,t,p,a,null,K8)}catch(C){k=C}if(k&&!(k instanceof Error)&&GE((p||"React class")+": type specification of "+a+" `"+t+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof k+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),k instanceof Error&&!(k.message in D_)){D_[k.message]=!0;var O=_?_():"";GE("Failed "+a+" type: "+k.message+(O!=null?O:""))}}}}Q8.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(D_={})};Y8.exports=Q8});var J8=tt(Eu=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var i=Oy(),o=YE(),a="16.13.1",p=typeof Symbol=="function"&&Symbol.for,_=p?Symbol.for("react.element"):60103,t=p?Symbol.for("react.portal"):60106,k=p?Symbol.for("react.fragment"):60107,L=p?Symbol.for("react.strict_mode"):60108,O=p?Symbol.for("react.profiler"):60114,C=p?Symbol.for("react.provider"):60109,U=p?Symbol.for("react.context"):60110,H=p?Symbol.for("react.concurrent_mode"):60111,W=p?Symbol.for("react.forward_ref"):60112,ne=p?Symbol.for("react.suspense"):60113,m=p?Symbol.for("react.suspense_list"):60120,he=p?Symbol.for("react.memo"):60115,Ee=p?Symbol.for("react.lazy"):60116,ve=p?Symbol.for("react.block"):60121,se=p?Symbol.for("react.fundamental"):60117,De=p?Symbol.for("react.responder"):60118,pe=p?Symbol.for("react.scope"):60119,me=typeof Symbol=="function"&&Symbol.iterator,ie="@@iterator";function Oe(X){if(X===null||typeof X!="object")return null;var we=me&&X[me]||X[ie];return typeof we=="function"?we:null}var je={current:null},qe={suspense:null},yt={current:null},gt=/^(.*)[\\\/]/;function Xe(X,we,Le){var Ne="";if(we){var dt=we.fileName,Yn=dt.replace(gt,"");if(/^index\./.test(Yn)){var Cn=dt.match(gt);if(Cn){var cr=Cn[1];if(cr){var Si=cr.replace(gt,"");Yn=Si+"/"+Yn}}}Ne=" (at "+Yn+":"+we.lineNumber+")"}else Le&&(Ne=" (created by "+Le+")");return` - in `+(X||"Unknown")+Ne}var ut=1;function We(X){return X._status===ut?X._result:null}function Ft(X,we,Le){var Ne=we.displayName||we.name||"";return X.displayName||(Ne!==""?Le+"("+Ne+")":Le)}function Jt(X){if(X==null)return null;if(typeof X.tag=="number"&&ct("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof X=="function")return X.displayName||X.name||null;if(typeof X=="string")return X;switch(X){case k:return"Fragment";case t:return"Portal";case O:return"Profiler";case L:return"StrictMode";case ne:return"Suspense";case m:return"SuspenseList"}if(typeof X=="object")switch(X.$$typeof){case U:return"Context.Consumer";case C:return"Context.Provider";case W:return Ft(X,X.render,"ForwardRef");case he:return Jt(X.type);case ve:return Jt(X.render);case Ee:{var we=X,Le=We(we);if(Le)return Jt(Le);break}}return null}var rt={},Q=null;function fe(X){Q=X}rt.getCurrentStack=null,rt.getStackAddendum=function(){var X="";if(Q){var we=Jt(Q.type),Le=Q._owner;X+=Xe(we,Q._source,Le&&Jt(Le.type))}var Ne=rt.getCurrentStack;return Ne&&(X+=Ne()||""),X};var xe={current:!1},oe={ReactCurrentDispatcher:je,ReactCurrentBatchConfig:qe,ReactCurrentOwner:yt,IsSomeRendererActing:xe,assign:i};i(oe,{ReactDebugCurrentFrame:rt,ReactComponentTreeHook:{}});function ze(X){{for(var we=arguments.length,Le=new Array(we>1?we-1:0),Ne=1;Ne1?we-1:0),Ne=1;Ne0&&typeof Le[Le.length-1]=="string"&&Le[Le.length-1].indexOf(` - in`)===0;if(!Ne){var dt=oe.ReactDebugCurrentFrame,Yn=dt.getStackAddendum();Yn!==""&&(we+="%s",Le=Le.concat([Yn]))}var Cn=Le.map(function(Mu){return""+Mu});Cn.unshift("Warning: "+we),Function.prototype.apply.call(console[X],console,Cn);try{var cr=0,Si="Warning: "+we.replace(/%s/g,function(){return Le[cr++]});throw new Error(Si)}catch(Mu){}}}var nn={};function an(X,we){{var Le=X.constructor,Ne=Le&&(Le.displayName||Le.name)||"ReactClass",dt=Ne+"."+we;if(nn[dt])return;ct("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",we,Ne),nn[dt]=!0}}var Mn={isMounted:function(X){return!1},enqueueForceUpdate:function(X,we,Le){an(X,"forceUpdate")},enqueueReplaceState:function(X,we,Le,Ne){an(X,"replaceState")},enqueueSetState:function(X,we,Le,Ne){an(X,"setState")}},lr={};Object.freeze(lr);function ln(X,we,Le){this.props=X,this.context=we,this.refs=lr,this.updater=Le||Mn}ln.prototype.isReactComponent={},ln.prototype.setState=function(X,we){if(!(typeof X=="object"||typeof X=="function"||X==null))throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,X,we,"setState")},ln.prototype.forceUpdate=function(X){this.updater.enqueueForceUpdate(this,X,"forceUpdate")};{var Vt={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Er=function(X,we){Object.defineProperty(ln.prototype,X,{get:function(){ze("%s(...) is deprecated in plain JavaScript React classes. %s",we[0],we[1])}})};for(var w in Vt)Vt.hasOwnProperty(w)&&Er(w,Vt[w])}function jt(){}jt.prototype=ln.prototype;function Xn(X,we,Le){this.props=X,this.context=we,this.refs=lr,this.updater=Le||Mn}var vr=Xn.prototype=new jt;vr.constructor=Xn,i(vr,ln.prototype),vr.isPureReactComponent=!0;function jr(){var X={current:null};return Object.seal(X),X}var fr=Object.prototype.hasOwnProperty,zr={key:!0,ref:!0,__self:!0,__source:!0},Xt,wu,d0;d0={};function Ro(X){if(fr.call(X,"ref")){var we=Object.getOwnPropertyDescriptor(X,"ref").get;if(we&&we.isReactWarning)return!1}return X.ref!==void 0}function Qo(X){if(fr.call(X,"key")){var we=Object.getOwnPropertyDescriptor(X,"key").get;if(we&&we.isReactWarning)return!1}return X.key!==void 0}function Fs(X,we){var Le=function(){Xt||(Xt=!0,ct("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",we))};Le.isReactWarning=!0,Object.defineProperty(X,"key",{get:Le,configurable:!0})}function Jo(X,we){var Le=function(){wu||(wu=!0,ct("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",we))};Le.isReactWarning=!0,Object.defineProperty(X,"ref",{get:Le,configurable:!0})}function Zo(X){if(typeof X.ref=="string"&&yt.current&&X.__self&&yt.current.stateNode!==X.__self){var we=Jt(yt.current.type);d0[we]||(ct('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',Jt(yt.current.type),X.ref),d0[we]=!0)}}var qt=function(X,we,Le,Ne,dt,Yn,Cn){var cr={$$typeof:_,type:X,key:we,ref:Le,props:Cn,_owner:Yn};return cr._store={},Object.defineProperty(cr._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(cr,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ne}),Object.defineProperty(cr,"_source",{configurable:!1,enumerable:!1,writable:!1,value:dt}),Object.freeze&&(Object.freeze(cr.props),Object.freeze(cr)),cr};function xi(X,we,Le){var Ne,dt={},Yn=null,Cn=null,cr=null,Si=null;if(we!=null){Ro(we)&&(Cn=we.ref,Zo(we)),Qo(we)&&(Yn=""+we.key),cr=we.__self===void 0?null:we.__self,Si=we.__source===void 0?null:we.__source;for(Ne in we)fr.call(we,Ne)&&!zr.hasOwnProperty(Ne)&&(dt[Ne]=we[Ne])}var Mu=arguments.length-2;if(Mu===1)dt.children=Le;else if(Mu>1){for(var zu=Array(Mu),Hu=0;Hu1){for(var Su=Array(Hu),Ti=0;Ti is not supported and will be removed in a future major release. Did you mean to render instead?")),Le.Provider},set:function(Cn){Le.Provider=Cn}},_currentValue:{get:function(){return Le._currentValue},set:function(Cn){Le._currentValue=Cn}},_currentValue2:{get:function(){return Le._currentValue2},set:function(Cn){Le._currentValue2=Cn}},_threadCount:{get:function(){return Le._threadCount},set:function(Cn){Le._threadCount=Cn}},Consumer:{get:function(){return Ne||(Ne=!0,ct("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),Le.Consumer}}}),Le.Consumer=Yn}return Le._currentRenderer=null,Le._currentRenderer2=null,Le}function Wt(X){var we={$$typeof:Ee,_ctor:X,_status:-1,_result:null};{var Le,Ne;Object.defineProperties(we,{defaultProps:{configurable:!0,get:function(){return Le},set:function(dt){ct("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Le=dt,Object.defineProperty(we,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Ne},set:function(dt){ct("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ne=dt,Object.defineProperty(we,"propTypes",{enumerable:!0})}}})}return we}function Au(X){return X!=null&&X.$$typeof===he?ct("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof X!="function"?ct("forwardRef requires a render function but was given %s.",X===null?"null":typeof X):X.length!==0&&X.length!==2&&ct("forwardRef render functions accept exactly two parameters: props and ref. %s",X.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),X!=null&&(X.defaultProps!=null||X.propTypes!=null)&&ct("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:W,render:X}}function eu(X){return typeof X=="string"||typeof X=="function"||X===k||X===H||X===O||X===L||X===ne||X===m||typeof X=="object"&&X!==null&&(X.$$typeof===Ee||X.$$typeof===he||X.$$typeof===C||X.$$typeof===U||X.$$typeof===W||X.$$typeof===se||X.$$typeof===De||X.$$typeof===pe||X.$$typeof===ve)}function X0(X,we){return eu(X)||ct("memo: The first argument must be a component. Instead received: %s",X===null?"null":typeof X),{$$typeof:he,type:X,compare:we===void 0?null:we}}function Yi(){var X=je.current;if(X===null)throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: -1. You might have mismatching versions of React and the renderer (such as React DOM) -2. You might be breaking the Rules of Hooks -3. You might have more than one copy of React in the same app -See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.`);return X}function Xl(X,we){var Le=Yi();if(we!==void 0&&ct("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",we,typeof we=="number"&&Array.isArray(arguments[2])?` - -Did you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks`:""),X._context!==void 0){var Ne=X._context;Ne.Consumer===X?ct("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):Ne.Provider===X&&ct("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return Le.useContext(X,we)}function Mo(X){var we=Yi();return we.useState(X)}function ai(X,we,Le){var Ne=Yi();return Ne.useReducer(X,we,Le)}function so(X){var we=Yi();return we.useRef(X)}function Ql(X,we){var Le=Yi();return Le.useEffect(X,we)}function ko(X,we){var Le=Yi();return Le.useLayoutEffect(X,we)}function Is(X,we){var Le=Yi();return Le.useCallback(X,we)}function $n(X,we){var Le=Yi();return Le.useMemo(X,we)}function el(X,we,Le){var Ne=Yi();return Ne.useImperativeHandle(X,we,Le)}function ao(X,we){{var Le=Yi();return Le.useDebugValue(X,we)}}var I0;I0=!1;function wl(){if(yt.current){var X=Jt(yt.current.type);if(X)return` - -Check the render method of \``+X+"`."}return""}function No(X){if(X!==void 0){var we=X.fileName.replace(/^.*[\\\/]/,""),Le=X.lineNumber;return` - -Check your code at `+we+":"+Le+"."}return""}function wt(X){return X!=null?No(X.__source):""}var bt={};function Hn(X){var we=wl();if(!we){var Le=typeof X=="string"?X:X.displayName||X.name;Le&&(we=` - -Check the top-level render call using <`+Le+">.")}return we}function qr(X,we){if(!(!X._store||X._store.validated||X.key!=null)){X._store.validated=!0;var Le=Hn(we);if(!bt[Le]){bt[Le]=!0;var Ne="";X&&X._owner&&X._owner!==yt.current&&(Ne=" It was passed a child from "+Jt(X._owner.type)+"."),fe(X),ct('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',Le,Ne),fe(null)}}}function Ki(X,we){if(typeof X=="object"){if(Array.isArray(X))for(var Le=0;Le",dt=" Did you accidentally export a JSX literal instead of a component?"):Cn=typeof X,ct("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Cn,dt)}var cr=xi.apply(this,arguments);if(cr==null)return cr;if(Ne)for(var Si=2;Si{"use strict";process.env.NODE_ENV==="production"?KE.exports=W8():KE.exports=J8()});var Z8=tt((zv,Ny)=>{(function(){var i,o="4.17.21",a=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",_="Expected a function",t="Invalid `variable` option passed into `_.template`",k="__lodash_hash_undefined__",L=500,O="__lodash_placeholder__",C=1,U=2,H=4,W=1,ne=2,m=1,he=2,Ee=4,ve=8,se=16,De=32,pe=64,me=128,ie=256,Oe=512,je=30,qe="...",yt=800,gt=16,Xe=1,ut=2,We=3,Ft=1/0,Jt=9007199254740991,rt=17976931348623157e292,Q=0/0,fe=4294967295,xe=fe-1,oe=fe>>>1,ze=[["ary",me],["bind",m],["bindKey",he],["curry",ve],["curryRight",se],["flip",Oe],["partial",De],["partialRight",pe],["rearg",ie]],ct="[object Arguments]",Rt="[object Array]",nn="[object AsyncFunction]",an="[object Boolean]",Mn="[object Date]",lr="[object DOMException]",ln="[object Error]",Vt="[object Function]",Er="[object GeneratorFunction]",w="[object Map]",jt="[object Number]",Xn="[object Null]",vr="[object Object]",jr="[object Promise]",fr="[object Proxy]",zr="[object RegExp]",Xt="[object Set]",wu="[object String]",d0="[object Symbol]",Ro="[object Undefined]",Qo="[object WeakMap]",Fs="[object WeakSet]",Jo="[object ArrayBuffer]",Zo="[object DataView]",qt="[object Float32Array]",xi="[object Float64Array]",lu="[object Int8Array]",mi="[object Int16Array]",Dr="[object Int32Array]",$o="[object Uint8Array]",G0="[object Uint8ClampedArray]",Uu="[object Uint16Array]",Y0="[object Uint32Array]",Xr=/\b__p \+= '';/g,Ao=/\b(__p \+=) '' \+/g,Oo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F0=/&(?:amp|lt|gt|quot|#39);/g,su=/[&<>"']/g,ki=RegExp(F0.source),Ps=RegExp(su.source),Kl=/<%-([\s\S]+?)%>/g,P0=/<%([\s\S]+?)%>/g,p0=/<%=([\s\S]+?)%>/g,Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ri=/^\w*$/,K0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yi=/[\\^$.*+?()[\]{}|]/g,en=RegExp(yi.source),bn=/^\s+/,Ai=/\s/,gi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Wt=/\{\n\/\* \[wrapped with (.+)\] \*/,Au=/,? & /,eu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,X0=/[()=,{}\[\]\/\s]/,Yi=/\\(\\)?/g,Xl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Mo=/\w*$/,ai=/^[-+]0x[0-9a-f]+$/i,so=/^0b[01]+$/i,Ql=/^\[object .+?Constructor\]$/,ko=/^0o[0-7]+$/i,Is=/^(?:0|[1-9]\d*)$/,$n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,el=/($^)/,ao=/['\n\r\u2028\u2029\\]/g,I0="\\ud800-\\udfff",wl="\\u0300-\\u036f",No="\\ufe20-\\ufe2f",wt="\\u20d0-\\u20ff",bt=wl+No+wt,Hn="\\u2700-\\u27bf",qr="a-z\\xdf-\\xf6\\xf8-\\xff",Ki="\\xac\\xb1\\xd7\\xf7",Qr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ou="\\u2000-\\u206f",h0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ni="A-Z\\xc0-\\xd6\\xd8-\\xde",v0="\\ufe0e\\ufe0f",hs=Ki+Qr+Ou+h0,Tt="['\u2019]",fo="["+I0+"]",tl="["+hs+"]",Jl="["+bt+"]",ju="\\d+",vs="["+Hn+"]",b0="["+qr+"]",X="[^"+I0+hs+ju+Hn+qr+Ni+"]",we="\\ud83c[\\udffb-\\udfff]",Le="(?:"+Jl+"|"+we+")",Ne="[^"+I0+"]",dt="(?:\\ud83c[\\udde6-\\uddff]){2}",Yn="[\\ud800-\\udbff][\\udc00-\\udfff]",Cn="["+Ni+"]",cr="\\u200d",Si="(?:"+b0+"|"+X+")",Mu="(?:"+Cn+"|"+X+")",zu="(?:"+Tt+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+Tt+"(?:D|LL|M|RE|S|T|VE))?",Su=Le+"?",Ti="["+v0+"]?",Lo="(?:"+cr+"(?:"+[Ne,dt,Yn].join("|")+")"+Ti+Su+")*",ku="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",co="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qu=Ti+Su+Lo,Pa="(?:"+[vs,dt,Yn].join("|")+")"+qu,m0="(?:"+[Ne+Jl+"?",Jl,dt,Yn,fo].join("|")+")",ia=RegExp(Tt,"g"),Q0=RegExp(Jl,"g"),ua=RegExp(we+"(?="+we+")|"+m0+qu,"g"),Ia=RegExp([Cn+"?"+b0+"+"+zu+"(?="+[tl,Cn,"$"].join("|")+")",Mu+"+"+Hu+"(?="+[tl,Cn+Si,"$"].join("|")+")",Cn+"?"+Si+"+"+zu,Cn+"+"+Hu,co,ku,ju,Pa].join("|"),"g"),ms=RegExp("["+cr+I0+bt+v0+"]"),S0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ac=-1,fi={};fi[qt]=fi[xi]=fi[lu]=fi[mi]=fi[Dr]=fi[$o]=fi[G0]=fi[Uu]=fi[Y0]=!0,fi[ct]=fi[Rt]=fi[Jo]=fi[an]=fi[Zo]=fi[Mn]=fi[ln]=fi[Vt]=fi[w]=fi[jt]=fi[vr]=fi[zr]=fi[Xt]=fi[wu]=fi[Qo]=!1;var $r={};$r[ct]=$r[Rt]=$r[Jo]=$r[Zo]=$r[an]=$r[Mn]=$r[qt]=$r[xi]=$r[lu]=$r[mi]=$r[Dr]=$r[w]=$r[jt]=$r[vr]=$r[zr]=$r[Xt]=$r[wu]=$r[d0]=$r[$o]=$r[G0]=$r[Uu]=$r[Y0]=!0,$r[ln]=$r[Vt]=$r[Qo]=!1;var Zl={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},oa={"&":"&","<":"<",">":">",'"':""","'":"'"},pf={"&":"&","<":"<",">":">",""":'"',"'":"'"},bs={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ba=parseFloat,Bs=parseInt,y0=typeof global=="object"&&global&&global.Object===Object&&global,Us=typeof self=="object"&&self&&self.Object===Object&&self,ji=y0||Us||Function("return this")(),B=typeof zv=="object"&&zv&&!zv.nodeType&&zv,z=B&&typeof Ny=="object"&&Ny&&!Ny.nodeType&&Ny,G=z&&z.exports===B,$=G&&y0.process,Te=function(){try{var Ce=z&&z.require&&z.require("util").types;return Ce||$&&$.binding&&$.binding("util")}catch(et){}}(),ge=Te&&Te.isArrayBuffer,Re=Te&&Te.isDate,Z=Te&&Te.isMap,ke=Te&&Te.isRegExp,Qe=Te&&Te.isSet,ht=Te&&Te.isTypedArray;function ue(Ce,et,Ye){switch(Ye.length){case 0:return Ce.call(et);case 1:return Ce.call(et,Ye[0]);case 2:return Ce.call(et,Ye[0],Ye[1]);case 3:return Ce.call(et,Ye[0],Ye[1],Ye[2])}return Ce.apply(et,Ye)}function He(Ce,et,Ye,Yt){for(var Kt=-1,pr=Ce==null?0:Ce.length;++Kt-1}function rn(Ce,et,Ye){for(var Yt=-1,Kt=Ce==null?0:Ce.length;++Yt-1;);return Ye}function Sl(Ce,et){for(var Ye=Ce.length;Ye--&&Dt(et,Ce[Ye],0)>-1;);return Ye}function vf(Ce,et){for(var Ye=Ce.length,Yt=0;Ye--;)Ce[Ye]===et&&++Yt;return Yt}var Po=Jn(Zl),ys=Jn(oa);function js(Ce){return"\\"+bs[Ce]}function Io(Ce,et){return Ce==null?i:Ce[et]}function bo(Ce){return ms.test(Ce)}function gs(Ce){return S0.test(Ce)}function Qu(Ce){for(var et,Ye=[];!(et=Ce.next()).done;)Ye.push(et.value);return Ye}function Tu(Ce){var et=-1,Ye=Array(Ce.size);return Ce.forEach(function(Yt,Kt){Ye[++et]=[Kt,Yt]}),Ye}function Ei(Ce,et){return function(Ye){return Ce(et(Ye))}}function C0(Ce,et){for(var Ye=-1,Yt=Ce.length,Kt=0,pr=[];++Ye-1}function fa(d,v){var x=this.__data__,P=ts(x,d);return P<0?(++this.size,x.push([d,v])):x[P][1]=v,this}ro.prototype.clear=Ba,ro.prototype.delete=_f,ro.prototype.get=fc,ro.prototype.has=Ds,ro.prototype.set=fa;function U0(d){var v=-1,x=d==null?0:d.length;for(this.clear();++v=v?d:v)),d}function j0(d,v,x,P,q,ee){var de,_e=v&C,Ie=v&U,Et=v&H;if(x&&(de=q?x(d,P,q,ee):x(d)),de!==i)return de;if(!bu(d))return d;var St=tr(d);if(St){if(de=Cs(d),!_e)return iu(d,de)}else{var At=Iu(d),on=At==Vt||At==Er;if(Js(d))return vc(d,_e);if(At==vr||At==ct||on&&!q){if(de=Ie||on?{}:Ec(d),!_e)return Ie?ns(d,ul(de,d)):o0(d,Ef(de,d))}else{if(!$r[At])return q?d:{};de=Dh(d,At,_e)}}ee||(ee=new il);var kn=ee.get(d);if(kn)return kn;ee.set(d,de),Id(d)?d.forEach(function(ar){de.add(j0(ar,v,x,ar,d,ee))}):Ep(d)&&d.forEach(function(ar,ui){de.set(ui,j0(ar,v,x,ui,d,ee))});var rr=Et?Ie?sr:n1:Ie?dn:N0,br=St?i:rr(d);return nt(br||d,function(ar,ui){br&&(ui=ar,ar=d[ui]),Ss(de,ui,j0(ar,v,x,ui,d,ee))}),de}function Df(d){var v=N0(d);return function(x){return qc(x,d,v)}}function qc(d,v,x){var P=x.length;if(d==null)return!P;for(d=xn(d);P--;){var q=x[P],ee=v[q],de=d[q];if(de===i&&!(q in d)||!ee(de))return!1}return!0}function dc(d,v,x){if(typeof d!="function")throw new ti(_);return Qa(function(){d.apply(i,x)},v)}function Al(d,v,x,P){var q=-1,ee=sn,de=!0,_e=d.length,Ie=[],Et=v.length;if(!_e)return Ie;x&&(v=Lt(v,_i(x))),P?(ee=rn,de=!1):v.length>=a&&(ee=nl,de=!1,v=new mo(v));e:for(;++q<_e;){var St=d[q],At=x==null?St:x(St);if(St=P||St!==0?St:0,de&&At===At){for(var on=Et;on--;)if(v[on]===At)continue e;Ie.push(St)}else ee(v,At,P)||Ie.push(St)}return Ie}var Ts=al(R),da=al(F,!0);function ud(d,v){var x=!0;return Ts(d,function(P,q,ee){return x=!!v(P,q,ee),x}),x}function pa(d,v,x){for(var P=-1,q=d.length;++Pq?0:q+x),P=P===i||P>q?q:Mr(P),P<0&&(P+=q),P=x>P?0:wp(P);x0&&x(_e)?v>1?qi(_e,v-1,x,P,q):Dn(q,_e):P||(q[q.length]=_e)}return q}var g=yc(),y=yc(!0);function R(d,v){return d&&g(d,v,N0)}function F(d,v){return d&&y(d,v,N0)}function b(d,v){return It(v,function(x){return xa(d[x])})}function J(d,v){v=Ws(v,d);for(var x=0,P=v.length;d!=null&&xv}function kt(d,v){return d!=null&&li.call(d,v)}function xr(d,v){return d!=null&&v in xn(d)}function i0(d,v,x){return d>=Kn(v,x)&&d=120&&St.length>=120)?new mo(de&&St):i}St=d[0];var At=-1,on=_e[0];e:for(;++At-1;)_e!==d&&O0.call(_e,Ie,1),O0.call(d,Ie,1);return d}function sd(d,v){for(var x=d?v.length:0,P=x-1;x--;){var q=v[x];if(x==P||q!==ee){var ee=q;Eo(q)?O0.call(d,q,1):R2(d,q)}}return d}function ad(d,v){return d+Es(E0()*(v-d+1))}function T2(d,v,x,P){for(var q=-1,ee=ni($u((v-d)/(x||1)),0),de=Ye(ee);ee--;)de[P?ee:++q]=d,d+=x;return de}function Gc(d,v){var x="";if(!d||v<1||v>Jt)return x;do v%2&&(x+=d),v=Es(v/2),v&&(d+=d);while(v);return x}function Ir(d,v){return o1(F2(d,v,s0),d+"")}function fd(d){return za(Nc(d))}function cd(d,v){var x=Nc(d);return wc(x,r0(v,0,x.length))}function Ga(d,v,x,P){if(!bu(d))return d;v=Ws(v,d);for(var q=-1,ee=v.length,de=ee-1,_e=d;_e!=null&&++qq?0:q+v),x=x>q?q:x,x<0&&(x+=q),q=v>x?0:x-v>>>0,v>>>=0;for(var ee=Ye(q);++P>>1,de=d[ee];de!==null&&!bl(de)&&(x?de<=v:de=a){var Et=v?null:rm(d);if(Et)return Z0(Et);de=!1,q=nl,Ie=new mo}else Ie=v?[]:_e;e:for(;++P=P?d:ll(d,v,x)}var Jc=_s||function(d){return ji.clearTimeout(d)};function vc(d,v){if(v)return d.slice();var x=d.length,P=Hi?Hi(x):new d.constructor(x);return d.copy(P),P}function mc(d){var v=new d.constructor(d.byteLength);return new A0(v).set(new A0(d)),v}function pd(d,v){var x=v?mc(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.byteLength)}function yh(d){var v=new d.constructor(d.source,Mo.exec(d));return v.lastIndex=d.lastIndex,v}function Tf(d){return Ar?xn(Ar.call(d)):{}}function Zc(d,v){var x=v?mc(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.length)}function gh(d,v){if(d!==v){var x=d!==i,P=d===null,q=d===d,ee=bl(d),de=v!==i,_e=v===null,Ie=v===v,Et=bl(v);if(!_e&&!Et&&!ee&&d>v||ee&&de&&Ie&&!_e&&!Et||P&&de&&Ie||!x&&Ie||!q)return 1;if(!P&&!ee&&!Et&&d=_e)return Ie;var Et=x[P];return Ie*(Et=="desc"?-1:1)}}return d.index-v.index}function Vs(d,v,x,P){for(var q=-1,ee=d.length,de=x.length,_e=-1,Ie=v.length,Et=ni(ee-de,0),St=Ye(Ie+Et),At=!P;++_e1?x[q-1]:i,de=q>2?x[2]:i;for(ee=d.length>3&&typeof ee=="function"?(q--,ee):i,de&&oo(x[0],x[1],de)&&(ee=q<3?i:ee,q=1),v=xn(v);++P-1?q[ee?v[de]:de]:i}}function e1(d){return fl(function(v){var x=v.length,P=x,q=Vr.prototype.thru;for(d&&v.reverse();P--;){var ee=v[P];if(typeof ee!="function")throw new ti(_);if(q&&!de&&Ho(ee)=="wrapper")var de=new Vr([],!0)}for(P=de?P:x;++P1&&di.reverse(),St&&Ie_e))return!1;var Et=ee.get(d),St=ee.get(v);if(Et&&St)return Et==v&&St==d;var At=-1,on=!0,kn=x&ne?new mo:i;for(ee.set(d,v),ee.set(v,d);++At<_e;){var rr=d[At],br=v[At];if(P)var ar=de?P(br,rr,At,v,d,ee):P(rr,br,At,d,v,ee);if(ar!==i){if(ar)continue;on=!1;break}if(kn){if(!Cr(v,function(ui,di){if(!nl(kn,di)&&(rr===ui||q(rr,ui,x,P,ee)))return kn.push(di)})){on=!1;break}}else if(!(rr===br||q(rr,br,x,P,ee))){on=!1;break}}return ee.delete(d),ee.delete(v),on}function Eh(d,v,x,P,q,ee,de){switch(x){case Zo:if(d.byteLength!=v.byteLength||d.byteOffset!=v.byteOffset)return!1;d=d.buffer,v=v.buffer;case Jo:return!(d.byteLength!=v.byteLength||!ee(new A0(d),new A0(v)));case an:case Mn:case jt:return wo(+d,+v);case ln:return d.name==v.name&&d.message==v.message;case zr:case wu:return d==v+"";case w:var _e=Tu;case Xt:var Ie=P&W;if(_e||(_e=Z0),d.size!=v.size&&!Ie)return!1;var Et=de.get(d);if(Et)return Et==v;P|=ne,de.set(d,v);var St=Of(_e(d),_e(v),P,q,ee,de);return de.delete(d),St;case d0:if(Ar)return Ar.call(d)==Ar.call(v)}return!1}function um(d,v,x,P,q,ee){var de=x&W,_e=n1(d),Ie=_e.length,Et=n1(v),St=Et.length;if(Ie!=St&&!de)return!1;for(var At=Ie;At--;){var on=_e[At];if(!(de?on in v:li.call(v,on)))return!1}var kn=ee.get(d),rr=ee.get(v);if(kn&&rr)return kn==v&&rr==d;var br=!0;ee.set(d,v),ee.set(v,d);for(var ar=de;++At1?"& ":"")+v[P],v=v.join(x>2?", ":" "),d.replace(gi,`{ -/* [wrapped with `+v+`] */ -`)}function is(d){return tr(d)||dl(d)||!!(ho&&d&&d[ho])}function Eo(d,v){var x=typeof d;return v=v==null?Jt:v,!!v&&(x=="number"||x!="symbol"&&Is.test(d))&&d>-1&&d%1==0&&d0){if(++v>=yt)return arguments[0]}else v=0;return d.apply(i,arguments)}}function wc(d,v){var x=-1,P=d.length,q=P-1;for(v=v===i?P:v;++x1?d[v-1]:i;return x=typeof x=="function"?(d.pop(),x):i,Sd(d,x)});function Bh(d){var v=Y(d);return v.__chain__=!0,v}function Uh(d,v){return v(d),d}function y1(d,v){return v(d)}var Z2=fl(function(d){var v=d.length,x=v?d[0]:0,P=this.__wrapped__,q=function(ee){return qa(ee,d)};return v>1||this.__actions__.length||!(P instanceof at)||!Eo(x)?this.thru(q):(P=P.slice(x,+x+(v?1:0)),P.__actions__.push({func:y1,args:[q],thisArg:i}),new Vr(P,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(i),ee}))});function jh(){return Bh(this)}function $2(){return new Vr(this.value(),this.__chain__)}function zh(){this.__values__===i&&(this.__values__=lv(this.value()));var d=this.__index__>=this.__values__.length,v=d?i:this.__values__[this.__index__++];return{done:d,value:v}}function dm(){return this}function pm(d){for(var v,x=this;x instanceof ii;){var P=I2(x);P.__index__=0,P.__values__=i,v?q.__wrapped__=P:v=P;var q=P;x=x.__wrapped__}return q.__wrapped__=d,v}function Pf(){var d=this.__wrapped__;if(d instanceof at){var v=d;return this.__actions__.length&&(v=new at(this)),v=v.reverse(),v.__actions__.push({func:y1,args:[V2],thisArg:i}),new Vr(v,this.__chain__)}return this.thru(V2)}function If(){return mh(this.__wrapped__,this.__actions__)}var Td=Ya(function(d,v,x){li.call(d,x)?++d[x]:Gu(d,x,1)});function hm(d,v,x){var P=tr(d)?Mt:ud;return x&&oo(d,v,x)&&(v=i),P(d,Vn(v,3))}function ep(d,v){var x=tr(d)?It:Wc;return x(d,Vn(v,3))}var Cd=kl(j2),tp=kl(s1);function Hh(d,v){return qi(g1(d,v),1)}function np(d,v){return qi(g1(d,v),Ft)}function qh(d,v,x){return x=x===i?1:Mr(x),qi(g1(d,v),x)}function Wh(d,v){var x=tr(d)?nt:Ts;return x(d,Vn(v,3))}function rp(d,v){var x=tr(d)?Ct:da;return x(d,Vn(v,3))}var vm=Ya(function(d,v,x){li.call(d,x)?d[x].push(v):Gu(d,x,[v])});function mm(d,v,x,P){d=pl(d)?d:Nc(d),x=x&&!P?Mr(x):0;var q=d.length;return x<0&&(x=ni(q+x,0)),w1(d)?x<=q&&d.indexOf(v,x)>-1:!!q&&Dt(d,v,x)>-1}var ym=Ir(function(d,v,x){var P=-1,q=typeof v=="function",ee=pl(d)?Ye(d.length):[];return Ts(d,function(de){ee[++P]=q?ue(v,de,x):Ol(de,v,x)}),ee}),Vh=Ya(function(d,v,x){Gu(d,x,v)});function g1(d,v){var x=tr(d)?Lt:w2;return x(d,Vn(v,3))}function gm(d,v,x,P){return d==null?[]:(tr(v)||(v=v==null?[]:[v]),x=P?i:x,tr(x)||(x=x==null?[]:[x]),yo(d,v,x))}var ip=Ya(function(d,v,x){d[x?0:1].push(v)},function(){return[[],[]]});function up(d,v,x){var P=tr(d)?dr:wr,q=arguments.length<3;return P(d,Vn(v,4),x,q,Ts)}function _m(d,v,x){var P=tr(d)?er:wr,q=arguments.length<3;return P(d,Vn(v,4),x,q,da)}function Em(d,v){var x=tr(d)?It:Wc;return x(d,Ad(Vn(v,3)))}function Gh(d){var v=tr(d)?za:fd;return v(d)}function Dm(d,v,x){(x?oo(d,v,x):v===i)?v=1:v=Mr(v);var P=tr(d)?Ha:cd;return P(d,v)}function wm(d){var v=tr(d)?ca:ol;return v(d)}function op(d){if(d==null)return 0;if(pl(d))return w1(d)?tu(d):d.length;var v=Iu(d);return v==w||v==Xt?d.size:Wa(d).length}function lp(d,v,x){var P=tr(d)?Cr:hh;return x&&oo(d,v,x)&&(v=i),P(d,Vn(v,3))}var Ta=Ir(function(d,v){if(d==null)return[];var x=v.length;return x>1&&oo(d,v[0],v[1])?v=[]:x>2&&oo(v[0],v[1],v[2])&&(v=[v[0]]),yo(d,qi(v,1),[])}),_1=aa||function(){return ji.Date.now()};function sp(d,v){if(typeof v!="function")throw new ti(_);return d=Mr(d),function(){if(--d<1)return v.apply(this,arguments)}}function Yh(d,v,x){return v=x?i:v,v=d&&v==null?d.length:v,hn(d,me,i,i,i,i,v)}function xd(d,v){var x;if(typeof v!="function")throw new ti(_);return d=Mr(d),function(){return--d>0&&(x=v.apply(this,arguments)),d<=1&&(v=i),x}}var E1=Ir(function(d,v,x){var P=m;if(x.length){var q=C0(x,yr(E1));P|=De}return hn(d,P,v,x,q)}),Kh=Ir(function(d,v,x){var P=m|he;if(x.length){var q=C0(x,yr(Kh));P|=De}return hn(v,P,d,x,q)});function ap(d,v,x){v=x?i:v;var P=hn(d,ve,i,i,i,i,i,v);return P.placeholder=ap.placeholder,P}function Xh(d,v,x){v=x?i:v;var P=hn(d,se,i,i,i,i,i,v);return P.placeholder=Xh.placeholder,P}function fp(d,v,x){var P,q,ee,de,_e,Ie,Et=0,St=!1,At=!1,on=!0;if(typeof d!="function")throw new ti(_);v=hl(v)||0,bu(x)&&(St=!!x.leading,At="maxWait"in x,ee=At?ni(hl(x.maxWait)||0,v):ee,on="trailing"in x?!!x.trailing:on);function kn(a0){var Os=P,To=q;return P=q=i,Et=a0,de=d.apply(To,Os),de}function rr(a0){return Et=a0,_e=Qa(ui,v),St?kn(a0):de}function br(a0){var Os=a0-Ie,To=a0-Et,Av=v-Os;return At?Kn(Av,ee-To):Av}function ar(a0){var Os=a0-Ie,To=a0-Et;return Ie===i||Os>=v||Os<0||At&&To>=ee}function ui(){var a0=_1();if(ar(a0))return di(a0);_e=Qa(ui,br(a0))}function di(a0){return _e=i,on&&P?kn(a0):(P=q=i,de)}function jl(){_e!==i&&Jc(_e),Et=0,P=Ie=q=_e=i}function Zi(){return _e===i?de:di(_1())}function lo(){var a0=_1(),Os=ar(a0);if(P=arguments,q=this,Ie=a0,Os){if(_e===i)return rr(Ie);if(At)return Jc(_e),_e=Qa(ui,v),kn(Ie)}return _e===i&&(_e=Qa(ui,v)),de}return lo.cancel=jl,lo.flush=Zi,lo}var Qh=Ir(function(d,v){return dc(d,1,v)}),Jh=Ir(function(d,v,x){return dc(d,hl(v)||0,x)});function cp(d){return hn(d,Oe)}function Rd(d,v){if(typeof d!="function"||v!=null&&typeof v!="function")throw new ti(_);var x=function(){var P=arguments,q=v?v.apply(this,P):P[0],ee=x.cache;if(ee.has(q))return ee.get(q);var de=d.apply(this,P);return x.cache=ee.set(q,de)||ee,de};return x.cache=new(Rd.Cache||U0),x}Rd.Cache=U0;function Ad(d){if(typeof d!="function")throw new ti(_);return function(){var v=arguments;switch(v.length){case 0:return!d.call(this);case 1:return!d.call(this,v[0]);case 2:return!d.call(this,v[0],v[1]);case 3:return!d.call(this,v[0],v[1],v[2])}return!d.apply(this,v)}}function H0(d){return xd(2,d)}var Od=M2(function(d,v){v=v.length==1&&tr(v[0])?Lt(v[0],_i(Vn())):Lt(qi(v,1),_i(Vn()));var x=v.length;return Ir(function(P){for(var q=-1,ee=Kn(P.length,x);++q=v}),dl=u0(function(){return arguments}())?u0:function(d){return Yu(d)&&li.call(d,"callee")&&!B0.call(d,"callee")},tr=Ye.isArray,Qs=ge?_i(ge):Ve;function pl(d){return d!=null&&Fd(d.length)&&!xa(d)}function l0(d){return Yu(d)&&pl(d)}function ev(d){return d===!0||d===!1||Yu(d)&&mt(d)==an}var Js=to||Up,mp=Re?_i(Re):Ue;function Rm(d){return Yu(d)&&d.nodeType===1&&!Cc(d)}function tv(d){if(d==null)return!0;if(pl(d)&&(tr(d)||typeof d=="string"||typeof d.splice=="function"||Js(d)||Ra(d)||dl(d)))return!d.length;var v=Iu(d);if(v==w||v==Xt)return!d.size;if(Nf(d))return!Wa(d).length;for(var x in d)if(li.call(d,x))return!1;return!0}function yp(d,v){return lt(d,v)}function Am(d,v,x){x=typeof x=="function"?x:i;var P=x?x(d,v):i;return P===i?lt(d,v,i,x):!!P}function gp(d){if(!Yu(d))return!1;var v=mt(d);return v==ln||v==lr||typeof d.message=="string"&&typeof d.name=="string"&&!Cc(d)}function Tc(d){return typeof d=="number"&&nu(d)}function xa(d){if(!bu(d))return!1;var v=mt(d);return v==Vt||v==Er||v==nn||v==fr}function _p(d){return typeof d=="number"&&d==Mr(d)}function Fd(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=Jt}function bu(d){var v=typeof d;return d!=null&&(v=="object"||v=="function")}function Yu(d){return d!=null&&typeof d=="object"}var Ep=Z?_i(Z):Wn;function Dp(d,v){return d===v||si(d,v,jn(v))}function nv(d,v,x){return x=typeof x=="function"?x:i,si(d,v,jn(v),x)}function Om(d){return rv(d)&&d!=+d}function Mm(d){if(Nl(d))throw new Kt(p);return ur(d)}function km(d){return d===null}function Pd(d){return d==null}function rv(d){return typeof d=="number"||Yu(d)&&mt(d)==jt}function Cc(d){if(!Yu(d)||mt(d)!=vr)return!1;var v=rl(d);if(v===null)return!0;var x=li.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&Fu.call(x)==sa}var D1=ke?_i(ke):ci;function Nm(d){return _p(d)&&d>=-Jt&&d<=Jt}var Id=Qe?_i(Qe):Qi;function w1(d){return typeof d=="string"||!tr(d)&&Yu(d)&&mt(d)==wu}function bl(d){return typeof d=="symbol"||Yu(d)&&mt(d)==d0}var Ra=ht?_i(ht):Gr;function iv(d){return d===i}function Lm(d){return Yu(d)&&Iu(d)==Qo}function uv(d){return Yu(d)&&mt(d)==Fs}var ov=md(od),Fm=md(function(d,v){return d<=v});function lv(d){if(!d)return[];if(pl(d))return w1(d)?ei(d):iu(d);if(Pu&&d[Pu])return Qu(d[Pu]());var v=Iu(d),x=v==w?Tu:v==Xt?Z0:Nc;return x(d)}function Aa(d){if(!d)return d===0?d:0;if(d=hl(d),d===Ft||d===-Ft){var v=d<0?-1:1;return v*rt}return d===d?d:0}function Mr(d){var v=Aa(d),x=v%1;return v===v?x?v-x:v:0}function wp(d){return d?r0(Mr(d),0,fe):0}function hl(d){if(typeof d=="number")return d;if(bl(d))return Q;if(bu(d)){var v=typeof d.valueOf=="function"?d.valueOf():d;d=bu(v)?v+"":v}if(typeof d!="string")return d===0?d:+d;d=Lu(d);var x=so.test(d);return x||ko.test(d)?Bs(d.slice(2),x?2:8):ai.test(d)?Q:+d}function gu(d){return M0(d,dn(d))}function S1(d){return d?r0(Mr(d),-Jt,Jt):d===0?d:0}function Ui(d){return d==null?"":sl(d)}var Sp=io(function(d,v){if(Nf(v)||pl(v)){M0(v,N0(v),d);return}for(var x in v)li.call(v,x)&&Ss(d,x,v[x])}),bd=io(function(d,v){M0(v,dn(v),d)}),So=io(function(d,v,x,P){M0(v,dn(v),d,P)}),As=io(function(d,v,x,P){M0(v,N0(v),d,P)}),bf=fl(qa);function Bd(d,v){var x=ri(d);return v==null?x:Ef(x,v)}var Tp=Ir(function(d,v){d=xn(d);var x=-1,P=v.length,q=P>2?v[2]:i;for(q&&oo(v[0],v[1],q)&&(P=1);++x1),ee}),M0(d,sr(d),x),P&&(x=j0(x,C|U|H,im));for(var q=v.length;q--;)R2(x,v[q]);return x});function R1(d,v){return ef(d,Ad(Vn(v)))}var Rp=fl(function(d,v){return d==null?{}:dh(d,v)});function ef(d,v){if(d==null)return{};var x=Lt(sr(d),function(P){return[P]});return v=Vn(v),ph(d,x,function(P,q){return v(P,q[0])})}function Pm(d,v,x){v=Ws(v,d);var P=-1,q=v.length;for(q||(q=1,d=i);++Pv){var P=d;d=v,v=P}if(x||d%1||v%1){var q=E0();return Kn(d+q*(v-d+ba("1e-"+((q+"").length-1))),v)}return ad(d,v)}var Vd=Cf(function(d,v,x){return v=v.toLowerCase(),d+(x?qo(v):v)});function qo(d){return Mp(Ui(d).toLowerCase())}function Gd(d){return d=Ui(d),d&&d.replace($n,Po).replace(Q0,"")}function bm(d,v,x){d=Ui(d),v=sl(v);var P=d.length;x=x===i?P:r0(Mr(x),0,P);var q=x;return x-=v.length,x>=0&&d.slice(x,q)==v}function M1(d){return d=Ui(d),d&&Ps.test(d)?d.replace(su,ys):d}function Bm(d){return d=Ui(d),d&&en.test(d)?d.replace(yi,"\\$&"):d}var Um=Cf(function(d,v,x){return d+(x?"-":"")+v.toLowerCase()}),av=Cf(function(d,v,x){return d+(x?" ":"")+v.toLowerCase()}),jm=_h("toLowerCase");function fv(d,v,x){d=Ui(d),v=Mr(v);var P=v?tu(d):0;if(!v||P>=v)return d;var q=(v-P)/2;return ga(Es(q),x)+d+ga($u(q),x)}function zm(d,v,x){d=Ui(d),v=Mr(v);var P=v?tu(d):0;return v&&P>>0,x?(d=Ui(d),d&&(typeof v=="string"||v!=null&&!D1(v))&&(v=sl(v),!v&&bo(d))?va(ei(d),0,x):d.split(v,x)):[]}var zf=Cf(function(d,v,x){return d+(x?" ":"")+Mp(v)});function dv(d,v,x){return d=Ui(d),x=x==null?0:r0(Mr(x),0,d.length),v=sl(v),d.slice(x,x+v.length)==v}function pv(d,v,x){var P=Y.templateSettings;x&&oo(d,v,x)&&(v=i),d=Ui(d),v=So({},v,P,Rf);var q=So({},v.imports,P.imports,Rf),ee=N0(q),de=Fo(q,ee),_e,Ie,Et=0,St=v.interpolate||el,At="__p += '",on=yu((v.escape||el).source+"|"+St.source+"|"+(St===p0?Xl:el).source+"|"+(v.evaluate||el).source+"|$","g"),kn="//# sourceURL="+(li.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ac+"]")+` -`;d.replace(on,function(ar,ui,di,jl,Zi,lo){return di||(di=jl),At+=d.slice(Et,lo).replace(ao,js),ui&&(_e=!0,At+=`' + -__e(`+ui+`) + -'`),Zi&&(Ie=!0,At+=`'; -`+Zi+`; -__p += '`),di&&(At+=`' + -((__t = (`+di+`)) == null ? '' : __t) + -'`),Et=lo+ar.length,ar}),At+=`'; -`;var rr=li.call(v,"variable")&&v.variable;if(!rr)At=`with (obj) { -`+At+` -} -`;else if(X0.test(rr))throw new Kt(t);At=(Ie?At.replace(Xr,""):At).replace(Ao,"$1").replace(Oo,"$1;"),At="function("+(rr||"obj")+`) { -`+(rr?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(_e?", __e = _.escape":"")+(Ie?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+At+`return __p -}`;var br=_v(function(){return pr(ee,kn+"return "+At).apply(i,de)});if(br.source=At,gp(br))throw br;return br}function hv(d){return Ui(d).toLowerCase()}function Yd(d){return Ui(d).toUpperCase()}function Kd(d,v,x){if(d=Ui(d),d&&(x||v===i))return Lu(d);if(!d||!(v=sl(v)))return d;var P=ei(d),q=ei(v),ee=hf(P,q),de=Sl(P,q)+1;return va(P,ee,de).join("")}function Op(d,v,x){if(d=Ui(d),d&&(x||v===i))return d.slice(0,po(d)+1);if(!d||!(v=sl(v)))return d;var P=ei(d),q=Sl(P,ei(v))+1;return va(P,0,q).join("")}function vv(d,v,x){if(d=Ui(d),d&&(x||v===i))return d.replace(bn,"");if(!d||!(v=sl(v)))return d;var P=ei(d),q=hf(P,ei(v));return va(P,q).join("")}function Xd(d,v){var x=je,P=qe;if(bu(v)){var q="separator"in v?v.separator:q;x="length"in v?Mr(v.length):x,P="omission"in v?sl(v.omission):P}d=Ui(d);var ee=d.length;if(bo(d)){var de=ei(d);ee=de.length}if(x>=ee)return d;var _e=x-tu(P);if(_e<1)return P;var Ie=de?va(de,0,_e).join(""):d.slice(0,_e);if(q===i)return Ie+P;if(de&&(_e+=Ie.length-_e),D1(q)){if(d.slice(_e).search(q)){var Et,St=Ie;for(q.global||(q=yu(q.source,Ui(Mo.exec(q))+"g")),q.lastIndex=0;Et=q.exec(St);)var At=Et.index;Ie=Ie.slice(0,At===i?_e:At)}}else if(d.indexOf(sl(q),_e)!=_e){var on=Ie.lastIndexOf(q);on>-1&&(Ie=Ie.slice(0,on))}return Ie+P}function mv(d){return d=Ui(d),d&&ki.test(d)?d.replace(F0,Bi):d}var yv=Cf(function(d,v,x){return d+(x?" ":"")+v.toUpperCase()}),Mp=_h("toUpperCase");function gv(d,v,x){return d=Ui(d),v=x?i:v,v===i?gs(d)?yf(d):g0(d):d.match(v)||[]}var _v=Ir(function(d,v){try{return ue(d,i,v)}catch(x){return gp(x)?x:new Kt(x)}}),Gm=fl(function(d,v){return nt(v,function(x){x=Ll(x),Gu(d,x,E1(d[x],d))}),d});function Ev(d){var v=d==null?0:d.length,x=Vn();return d=v?Lt(d,function(P){if(typeof P[1]!="function")throw new ti(_);return[x(P[0]),P[1]]}):[],Ir(function(P){for(var q=-1;++qJt)return[];var x=fe,P=Kn(d,fe);v=Vn(v),d-=fe;for(var q=T0(P,v);++x0||v<0)?new at(x):(d<0?x=x.takeRight(-d):d&&(x=x.drop(d)),v!==i&&(v=Mr(v),x=v<0?x.dropRight(-v):x.take(v-d)),x)},at.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},at.prototype.toArray=function(){return this.take(fe)},R(at.prototype,function(d,v){var x=/^(?:filter|find|map|reject)|While$/.test(v),P=/^(?:head|last)$/.test(v),q=Y[P?"take"+(v=="last"?"Right":""):v],ee=P||/^find/.test(v);!q||(Y.prototype[v]=function(){var de=this.__wrapped__,_e=P?[1]:arguments,Ie=de instanceof at,Et=_e[0],St=Ie||tr(de),At=function(ui){var di=q.apply(Y,Dn([ui],_e));return P&&on?di[0]:di};St&&x&&typeof Et=="function"&&Et.length!=1&&(Ie=St=!1);var on=this.__chain__,kn=!!this.__actions__.length,rr=ee&&!on,br=Ie&&!kn;if(!ee&&St){de=br?de:new at(this);var ar=d.apply(de,_e);return ar.__actions__.push({func:y1,args:[At],thisArg:i}),new Vr(ar,on)}return rr&&br?d.apply(this,_e):(ar=this.thru(At),rr?P?ar.value()[0]:ar.value():ar)})}),nt(["pop","push","shift","sort","splice","unshift"],function(d){var v=Jr[d],x=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",P=/^(?:pop|shift)$/.test(d);Y.prototype[d]=function(){var q=arguments;if(P&&!this.__chain__){var ee=this.value();return v.apply(tr(ee)?ee:[],q)}return this[x](function(de){return v.apply(tr(de)?de:[],q)})}}),R(at.prototype,function(d,v){var x=Y[v];if(x){var P=x.name+"";li.call(On,P)||(On[P]=[]),On[P].push({name:v,func:x})}}),On[ya(i,he).name]=[{name:"wrapper",func:i}],at.prototype.clone=Di,at.prototype.reverse=ru,at.prototype.value=D0,Y.prototype.at=Z2,Y.prototype.chain=jh,Y.prototype.commit=$2,Y.prototype.next=zh,Y.prototype.plant=pm,Y.prototype.reverse=Pf,Y.prototype.toJSON=Y.prototype.valueOf=Y.prototype.value=If,Y.prototype.first=Y.prototype.head,Pu&&(Y.prototype[Pu]=dm),Y},eo=$0();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ji._=eo,define(function(){return eo})):z?((z.exports=eo)._=eo,B._=eo):ji._=eo}).call(zv)});var QE=tt((lH,XE)=>{"use strict";var Pi=XE.exports;XE.exports.default=Pi;var Du="[",Ly="]",Hv="\x07",w_=";",$8=process.env.TERM_PROGRAM==="Apple_Terminal";Pi.cursorTo=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");return typeof o!="number"?Du+(i+1)+"G":Du+(o+1)+";"+(i+1)+"H"};Pi.cursorMove=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");let a="";return i<0?a+=Du+-i+"D":i>0&&(a+=Du+i+"C"),o<0?a+=Du+-o+"A":o>0&&(a+=Du+o+"B"),a};Pi.cursorUp=(i=1)=>Du+i+"A";Pi.cursorDown=(i=1)=>Du+i+"B";Pi.cursorForward=(i=1)=>Du+i+"C";Pi.cursorBackward=(i=1)=>Du+i+"D";Pi.cursorLeft=Du+"G";Pi.cursorSavePosition=$8?"7":Du+"s";Pi.cursorRestorePosition=$8?"8":Du+"u";Pi.cursorGetPosition=Du+"6n";Pi.cursorNextLine=Du+"E";Pi.cursorPrevLine=Du+"F";Pi.cursorHide=Du+"?25l";Pi.cursorShow=Du+"?25h";Pi.eraseLines=i=>{let o="";for(let a=0;a[Ly,"8",w_,w_,o,Hv,i,Ly,"8",w_,w_,Hv].join("");Pi.image=(i,o={})=>{let a=`${Ly}1337;File=inline=1`;return o.width&&(a+=`;width=${o.width}`),o.height&&(a+=`;height=${o.height}`),o.preserveAspectRatio===!1&&(a+=";preserveAspectRatio=0"),a+":"+i.toString("base64")+Hv};Pi.iTerm={setCwd:(i=process.cwd())=>`${Ly}50;CurrentDir=${i}${Hv}`,annotation:(i,o={})=>{let a=`${Ly}1337;`,p=typeof o.x!="undefined",_=typeof o.y!="undefined";if((p||_)&&!(p&&_&&typeof o.length!="undefined"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return i=i.replace(/\|/g,""),a+=o.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",o.length>0?a+=(p?[i,o.length,o.x,o.y]:[o.length,i]).join("|"):a+=i,a+Hv}}});var tS=tt((sH,JE)=>{"use strict";var eS=(i,o)=>{for(let a of Reflect.ownKeys(o))Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(o,a));return i};JE.exports=eS;JE.exports.default=eS});var rS=tt((aH,S_)=>{"use strict";var vP=tS(),T_=new WeakMap,nS=(i,o={})=>{if(typeof i!="function")throw new TypeError("Expected a function");let a,p=0,_=i.displayName||i.name||"",t=function(...k){if(T_.set(t,++p),p===1)a=i.apply(this,k),i=null;else if(o.throw===!0)throw new Error(`Function \`${_}\` can only be called once`);return a};return vP(t,i),T_.set(t,p),t};S_.exports=nS;S_.exports.default=nS;S_.exports.callCount=i=>{if(!T_.has(i))throw new Error(`The given function \`${i.name}\` is not wrapped by the \`onetime\` package`);return T_.get(i)}});var iS=tt((fH,C_)=>{C_.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&C_.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&C_.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var tD=tt((cH,Fy)=>{var mP=require("assert"),Py=iS(),yP=/^win/i.test(process.platform),x_=require("events");typeof x_!="function"&&(x_=x_.EventEmitter);var Gl;process.__signal_exit_emitter__?Gl=process.__signal_exit_emitter__:(Gl=process.__signal_exit_emitter__=new x_,Gl.count=0,Gl.emitted={});Gl.infinite||(Gl.setMaxListeners(Infinity),Gl.infinite=!0);Fy.exports=function(i,o){mP.equal(typeof i,"function","a callback must be provided for exit handler"),Iy===!1&&uS();var a="exit";o&&o.alwaysLast&&(a="afterexit");var p=function(){Gl.removeListener(a,i),Gl.listeners("exit").length===0&&Gl.listeners("afterexit").length===0&&ZE()};return Gl.on(a,i),p};Fy.exports.unload=ZE;function ZE(){!Iy||(Iy=!1,Py.forEach(function(i){try{process.removeListener(i,$E[i])}catch(o){}}),process.emit=eD,process.reallyExit=oS,Gl.count-=1)}function qv(i,o,a){Gl.emitted[i]||(Gl.emitted[i]=!0,Gl.emit(i,o,a))}var $E={};Py.forEach(function(i){$E[i]=function(){var a=process.listeners(i);a.length===Gl.count&&(ZE(),qv("exit",null,i),qv("afterexit",null,i),yP&&i==="SIGHUP"&&(i="SIGINT"),process.kill(process.pid,i))}});Fy.exports.signals=function(){return Py};Fy.exports.load=uS;var Iy=!1;function uS(){Iy||(Iy=!0,Gl.count+=1,Py=Py.filter(function(i){try{return process.on(i,$E[i]),!0}catch(o){return!1}}),process.emit=_P,process.reallyExit=gP)}var oS=process.reallyExit;function gP(i){process.exitCode=i||0,qv("exit",process.exitCode,null),qv("afterexit",process.exitCode,null),oS.call(process,process.exitCode)}var eD=process.emit;function _P(i,o){if(i==="exit"){o!==void 0&&(process.exitCode=o);var a=eD.apply(this,arguments);return qv("exit",process.exitCode,null),qv("afterexit",process.exitCode,null),a}else return eD.apply(this,arguments)}});var sS=tt((dH,lS)=>{"use strict";var EP=rS(),DP=tD();lS.exports=EP(()=>{DP(()=>{process.stderr.write("[?25h")},{alwaysLast:!0})})});var nD=tt(Wv=>{"use strict";var wP=sS(),R_=!1;Wv.show=(i=process.stderr)=>{!i.isTTY||(R_=!1,i.write("[?25h"))};Wv.hide=(i=process.stderr)=>{!i.isTTY||(wP(),R_=!0,i.write("[?25l"))};Wv.toggle=(i,o)=>{i!==void 0&&(R_=i),R_?Wv.show(o):Wv.hide(o)}});var dS=tt(by=>{"use strict";var aS=by&&by.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(by,"__esModule",{value:!0});var fS=aS(QE()),cS=aS(nD()),SP=(i,{showCursor:o=!1}={})=>{let a=0,p="",_=!1,t=k=>{!o&&!_&&(cS.default.hide(),_=!0);let L=k+` -`;L!==p&&(p=L,i.write(fS.default.eraseLines(a)+L),a=L.split(` -`).length)};return t.clear=()=>{i.write(fS.default.eraseLines(a)),p="",a=0},t.done=()=>{p="",a=0,o||(cS.default.show(),_=!1)},t};by.default={create:SP}});var hS=tt((vH,pS)=>{pS.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var yS=tt(Fa=>{"use strict";var vS=hS(),Uc=process.env;Object.defineProperty(Fa,"_vendors",{value:vS.map(function(i){return i.constant})});Fa.name=null;Fa.isPR=null;vS.forEach(function(i){var o=Array.isArray(i.env)?i.env:[i.env],a=o.every(function(p){return mS(p)});if(Fa[i.constant]=a,a)switch(Fa.name=i.name,typeof i.pr){case"string":Fa.isPR=!!Uc[i.pr];break;case"object":"env"in i.pr?Fa.isPR=i.pr.env in Uc&&Uc[i.pr.env]!==i.pr.ne:"any"in i.pr?Fa.isPR=i.pr.any.some(function(p){return!!Uc[p]}):Fa.isPR=mS(i.pr);break;default:Fa.isPR=null}});Fa.isCI=!!(Uc.CI||Uc.CONTINUOUS_INTEGRATION||Uc.BUILD_NUMBER||Uc.RUN_ID||Fa.name);function mS(i){return typeof i=="string"?!!Uc[i]:Object.keys(i).every(function(o){return Uc[o]===i[o]})}});var _S=tt((yH,gS)=>{"use strict";gS.exports=yS().isCI});var DS=tt((gH,ES)=>{"use strict";var TP=i=>{let o=new Set;do for(let a of Reflect.ownKeys(i))o.add([i,a]);while((i=Reflect.getPrototypeOf(i))&&i!==Object.prototype);return o};ES.exports=(i,{include:o,exclude:a}={})=>{let p=_=>{let t=k=>typeof k=="string"?_===k:k.test(_);return o?o.some(t):a?!a.some(t):!0};for(let[_,t]of TP(i.constructor.prototype)){if(t==="constructor"||!p(t))continue;let k=Reflect.getOwnPropertyDescriptor(_,t);k&&typeof k.value=="function"&&(i[t]=i[t].bind(i))}return i}});var AS=tt(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var Vv,By,A_,O_,rD;typeof window=="undefined"||typeof MessageChannel!="function"?(Gv=null,iD=null,uD=function(){if(Gv!==null)try{var i=ou.unstable_now();Gv(!0,i),Gv=null}catch(o){throw setTimeout(uD,0),o}},wS=Date.now(),ou.unstable_now=function(){return Date.now()-wS},Vv=function(i){Gv!==null?setTimeout(Vv,0,i):(Gv=i,setTimeout(uD,0))},By=function(i,o){iD=setTimeout(i,o)},A_=function(){clearTimeout(iD)},O_=function(){return!1},rD=ou.unstable_forceFrameRate=function(){}):(M_=window.performance,oD=window.Date,SS=window.setTimeout,TS=window.clearTimeout,typeof console!="undefined"&&(CS=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof CS!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof M_=="object"&&typeof M_.now=="function"?ou.unstable_now=function(){return M_.now()}:(xS=oD.now(),ou.unstable_now=function(){return oD.now()-xS}),Uy=!1,jy=null,k_=-1,lD=5,sD=0,O_=function(){return ou.unstable_now()>=sD},rD=function(){},ou.unstable_forceFrameRate=function(i){0>i||125L_(k,a))O!==void 0&&0>L_(O,k)?(i[p]=O,i[L]=a,p=L):(i[p]=k,i[t]=a,p=t);else if(O!==void 0&&0>L_(O,a))i[p]=O,i[L]=a,p=L;else break e}}return o}return null}function L_(i,o){var a=i.sortIndex-o.sortIndex;return a!==0?a:i.id-o.id}var $f=[],c2=[],CP=1,Ls=null,ds=3,P_=!1,Zp=!1,zy=!1;function I_(i){for(var o=cf(c2);o!==null;){if(o.callback===null)F_(c2);else if(o.startTime<=i)F_(c2),o.sortIndex=o.expirationTime,fD($f,o);else break;o=cf(c2)}}function cD(i){if(zy=!1,I_(i),!Zp)if(cf($f)!==null)Zp=!0,Vv(dD);else{var o=cf(c2);o!==null&&By(cD,o.startTime-i)}}function dD(i,o){Zp=!1,zy&&(zy=!1,A_()),P_=!0;var a=ds;try{for(I_(o),Ls=cf($f);Ls!==null&&(!(Ls.expirationTime>o)||i&&!O_());){var p=Ls.callback;if(p!==null){Ls.callback=null,ds=Ls.priorityLevel;var _=p(Ls.expirationTime<=o);o=ou.unstable_now(),typeof _=="function"?Ls.callback=_:Ls===cf($f)&&F_($f),I_(o)}else F_($f);Ls=cf($f)}if(Ls!==null)var t=!0;else{var k=cf(c2);k!==null&&By(cD,k.startTime-o),t=!1}return t}finally{Ls=null,ds=a,P_=!1}}function RS(i){switch(i){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var xP=rD;ou.unstable_ImmediatePriority=1;ou.unstable_UserBlockingPriority=2;ou.unstable_NormalPriority=3;ou.unstable_IdlePriority=5;ou.unstable_LowPriority=4;ou.unstable_runWithPriority=function(i,o){switch(i){case 1:case 2:case 3:case 4:case 5:break;default:i=3}var a=ds;ds=i;try{return o()}finally{ds=a}};ou.unstable_next=function(i){switch(ds){case 1:case 2:case 3:var o=3;break;default:o=ds}var a=ds;ds=o;try{return i()}finally{ds=a}};ou.unstable_scheduleCallback=function(i,o,a){var p=ou.unstable_now();if(typeof a=="object"&&a!==null){var _=a.delay;_=typeof _=="number"&&0<_?p+_:p,a=typeof a.timeout=="number"?a.timeout:RS(i)}else a=RS(i),_=p;return a=_+a,i={id:CP++,callback:o,priorityLevel:i,startTime:_,expirationTime:a,sortIndex:-1},_>p?(i.sortIndex=_,fD(c2,i),cf($f)===null&&i===cf(c2)&&(zy?A_():zy=!0,By(cD,_-p))):(i.sortIndex=a,fD($f,i),Zp||P_||(Zp=!0,Vv(dD))),i};ou.unstable_cancelCallback=function(i){i.callback=null};ou.unstable_wrapCallback=function(i){var o=ds;return function(){var a=ds;ds=o;try{return i.apply(this,arguments)}finally{ds=a}}};ou.unstable_getCurrentPriorityLevel=function(){return ds};ou.unstable_shouldYield=function(){var i=ou.unstable_now();I_(i);var o=cf($f);return o!==Ls&&Ls!==null&&o!==null&&o.callback!==null&&o.startTime<=i&&o.expirationTime{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});var i=!1,o=!1,a=!0,p,_,t,k,L;if(typeof window=="undefined"||typeof MessageChannel!="function"){var O=null,C=null,U=function(){if(O!==null)try{var wt=Ii.unstable_now(),bt=!0;O(bt,wt),O=null}catch(Hn){throw setTimeout(U,0),Hn}},H=Date.now();Ii.unstable_now=function(){return Date.now()-H},p=function(wt){O!==null?setTimeout(p,0,wt):(O=wt,setTimeout(U,0))},_=function(wt,bt){C=setTimeout(wt,bt)},t=function(){clearTimeout(C)},k=function(){return!1},L=Ii.unstable_forceFrameRate=function(){}}else{var W=window.performance,ne=window.Date,m=window.setTimeout,he=window.clearTimeout;if(typeof console!="undefined"){var Ee=window.requestAnimationFrame,ve=window.cancelAnimationFrame;typeof Ee!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof ve!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof W=="object"&&typeof W.now=="function")Ii.unstable_now=function(){return W.now()};else{var se=ne.now();Ii.unstable_now=function(){return ne.now()-se}}var De=!1,pe=null,me=-1,ie=5,Oe=0,je=300,qe=!1;if(o&&navigator!==void 0&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0){var yt=navigator.scheduling;k=function(){var wt=Ii.unstable_now();return wt>=Oe?qe||yt.isInputPending()?!0:wt>=je:!1},L=function(){qe=!0}}else k=function(){return Ii.unstable_now()>=Oe},L=function(){};Ii.unstable_forceFrameRate=function(wt){if(wt<0||wt>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported");return}wt>0?ie=Math.floor(1e3/wt):ie=5};var gt=function(){if(pe!==null){var wt=Ii.unstable_now();Oe=wt+ie;var bt=!0;try{var Hn=pe(bt,wt);Hn?ut.postMessage(null):(De=!1,pe=null)}catch(qr){throw ut.postMessage(null),qr}}else De=!1;qe=!1},Xe=new MessageChannel,ut=Xe.port2;Xe.port1.onmessage=gt,p=function(wt){pe=wt,De||(De=!0,ut.postMessage(null))},_=function(wt,bt){me=m(function(){wt(Ii.unstable_now())},bt)},t=function(){he(me),me=-1}}function We(wt,bt){var Hn=wt.length;wt.push(bt),rt(wt,bt,Hn)}function Ft(wt){var bt=wt[0];return bt===void 0?null:bt}function Jt(wt){var bt=wt[0];if(bt!==void 0){var Hn=wt.pop();return Hn!==bt&&(wt[0]=Hn,Q(wt,Hn,0)),bt}else return null}function rt(wt,bt,Hn){for(var qr=Hn;;){var Ki=Math.floor((qr-1)/2),Qr=wt[Ki];if(Qr!==void 0&&fe(Qr,bt)>0)wt[Ki]=bt,wt[qr]=Qr,qr=Ki;else return}}function Q(wt,bt,Hn){for(var qr=Hn,Ki=wt.length;qrfr){if(fr*=2,fr>jr){console.error("Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."),Dr();return}var Hn=new Int32Array(fr*4);Hn.set(Xt),zr=Hn.buffer,Xt=Hn}Xt.set(wt,bt)}}function mi(){fr=vr,zr=new ArrayBuffer(fr*4),Xt=new Int32Array(zr),wu=0}function Dr(){var wt=zr;return fr=0,zr=null,Xt=null,wu=0,wt}function $o(wt,bt){a&&(Vt[Xn]++,Xt!==null&&lu([d0,bt*1e3,wt.id,wt.priorityLevel]))}function G0(wt,bt){a&&(Vt[Er]=xe,Vt[w]=0,Vt[Xn]--,Xt!==null&&lu([Ro,bt*1e3,wt.id]))}function Uu(wt,bt){a&&(Vt[Xn]--,Xt!==null&&lu([Fs,bt*1e3,wt.id]))}function Y0(wt,bt){a&&(Vt[Er]=xe,Vt[w]=0,Vt[Xn]--,Xt!==null&&lu([Qo,bt*1e3,wt.id]))}function Xr(wt,bt){a&&(an++,Vt[Er]=wt.priorityLevel,Vt[w]=wt.id,Vt[jt]=an,Xt!==null&&lu([Jo,bt*1e3,wt.id,an]))}function Ao(wt,bt){a&&(Vt[Er]=xe,Vt[w]=0,Vt[jt]=0,Xt!==null&&lu([Zo,bt*1e3,wt.id,an]))}function Oo(wt){a&&(Mn++,Xt!==null&&lu([qt,wt*1e3,Mn]))}function F0(wt){a&&Xt!==null&&lu([xi,wt*1e3,Mn])}var su=1073741823,ki=-1,Ps=250,Kl=5e3,P0=1e4,p0=su,Hr=[],Ri=[],K0=1,yi=!1,en=null,bn=ct,Ai=!1,gi=!1,Wt=!1;function Au(wt){for(var bt=Ft(Ri);bt!==null;){if(bt.callback===null)Jt(Ri);else if(bt.startTime<=wt)Jt(Ri),bt.sortIndex=bt.expirationTime,We(Hr,bt),a&&($o(bt,wt),bt.isQueued=!0);else return;bt=Ft(Ri)}}function eu(wt){if(Wt=!1,Au(wt),!gi)if(Ft(Hr)!==null)gi=!0,p(X0);else{var bt=Ft(Ri);bt!==null&&_(eu,bt.startTime-wt)}}function X0(wt,bt){a&&F0(bt),gi=!1,Wt&&(Wt=!1,t()),Ai=!0;var Hn=bn;try{if(a)try{return Yi(wt,bt)}catch(Qr){if(en!==null){var qr=Ii.unstable_now();Y0(en,qr),en.isQueued=!1}throw Qr}else return Yi(wt,bt)}finally{if(en=null,bn=Hn,Ai=!1,a){var Ki=Ii.unstable_now();Oo(Ki)}}}function Yi(wt,bt){var Hn=bt;for(Au(Hn),en=Ft(Hr);en!==null&&!(i&&yi)&&!(en.expirationTime>Hn&&(!wt||k()));){var qr=en.callback;if(qr!==null){en.callback=null,bn=en.priorityLevel;var Ki=en.expirationTime<=Hn;Xr(en,Hn);var Qr=qr(Ki);Hn=Ii.unstable_now(),typeof Qr=="function"?(en.callback=Qr,Ao(en,Hn)):(a&&(G0(en,Hn),en.isQueued=!1),en===Ft(Hr)&&Jt(Hr)),Au(Hn)}else Jt(Hr);en=Ft(Hr)}if(en!==null)return!0;var Ou=Ft(Ri);return Ou!==null&&_(eu,Ou.startTime-Hn),!1}function Xl(wt,bt){switch(wt){case oe:case ze:case ct:case Rt:case nn:break;default:wt=ct}var Hn=bn;bn=wt;try{return bt()}finally{bn=Hn}}function Mo(wt){var bt;switch(bn){case oe:case ze:case ct:bt=ct;break;default:bt=bn;break}var Hn=bn;bn=bt;try{return wt()}finally{bn=Hn}}function ai(wt){var bt=bn;return function(){var Hn=bn;bn=bt;try{return wt.apply(this,arguments)}finally{bn=Hn}}}function so(wt){switch(wt){case oe:return ki;case ze:return Ps;case nn:return p0;case Rt:return P0;case ct:default:return Kl}}function Ql(wt,bt,Hn){var qr=Ii.unstable_now(),Ki,Qr;if(typeof Hn=="object"&&Hn!==null){var Ou=Hn.delay;typeof Ou=="number"&&Ou>0?Ki=qr+Ou:Ki=qr,Qr=typeof Hn.timeout=="number"?Hn.timeout:so(wt)}else Qr=so(wt),Ki=qr;var h0=Ki+Qr,Ni={id:K0++,callback:bt,priorityLevel:wt,startTime:Ki,expirationTime:h0,sortIndex:-1};return a&&(Ni.isQueued=!1),Ki>qr?(Ni.sortIndex=Ki,We(Ri,Ni),Ft(Hr)===null&&Ni===Ft(Ri)&&(Wt?t():Wt=!0,_(eu,Ki-qr))):(Ni.sortIndex=h0,We(Hr,Ni),a&&($o(Ni,qr),Ni.isQueued=!0),!gi&&!Ai&&(gi=!0,p(X0))),Ni}function ko(){yi=!0}function Is(){yi=!1,!gi&&!Ai&&(gi=!0,p(X0))}function $n(){return Ft(Hr)}function el(wt){if(a&&wt.isQueued){var bt=Ii.unstable_now();Uu(wt,bt),wt.isQueued=!1}wt.callback=null}function ao(){return bn}function I0(){var wt=Ii.unstable_now();Au(wt);var bt=Ft(Hr);return bt!==en&&en!==null&&bt!==null&&bt.callback!==null&&bt.startTime<=wt&&bt.expirationTime{"use strict";process.env.NODE_ENV==="production"?pD.exports=AS():pD.exports=OS()});var MS=tt((wH,Hy)=>{Hy.exports=function i(o){"use strict";var a=Oy(),p=Mi(),_=b_();function t(g){for(var y="https://reactjs.org/docs/error-decoder.html?invariant="+g,R=1;RK0||(g.current=Ri[K0],Ri[K0]=null,K0--)}function en(g,y){K0++,Ri[K0]=g.current,g.current=y}var bn={},Ai={current:bn},gi={current:!1},Wt=bn;function Au(g,y){var R=g.type.contextTypes;if(!R)return bn;var F=g.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===y)return F.__reactInternalMemoizedMaskedChildContext;var b={},J;for(J in R)b[J]=y[J];return F&&(g=g.stateNode,g.__reactInternalMemoizedUnmaskedChildContext=y,g.__reactInternalMemoizedMaskedChildContext=b),b}function eu(g){return g=g.childContextTypes,g!=null}function X0(g){yi(gi,g),yi(Ai,g)}function Yi(g){yi(gi,g),yi(Ai,g)}function Xl(g,y,R){if(Ai.current!==bn)throw Error(t(168));en(Ai,y,g),en(gi,R,g)}function Mo(g,y,R){var F=g.stateNode;if(g=y.childContextTypes,typeof F.getChildContext!="function")return R;F=F.getChildContext();for(var b in F)if(!(b in g))throw Error(t(108,je(y)||"Unknown",b));return a({},R,{},F)}function ai(g){var y=g.stateNode;return y=y&&y.__reactInternalMemoizedMergedChildContext||bn,Wt=Ai.current,en(Ai,y,g),en(gi,gi.current,g),!0}function so(g,y,R){var F=g.stateNode;if(!F)throw Error(t(169));R?(y=Mo(g,y,Wt),F.__reactInternalMemoizedMergedChildContext=y,yi(gi,g),yi(Ai,g),en(Ai,y,g)):yi(gi,g),en(gi,R,g)}var Ql=_.unstable_runWithPriority,ko=_.unstable_scheduleCallback,Is=_.unstable_cancelCallback,$n=_.unstable_shouldYield,el=_.unstable_requestPaint,ao=_.unstable_now,I0=_.unstable_getCurrentPriorityLevel,wl=_.unstable_ImmediatePriority,No=_.unstable_UserBlockingPriority,wt=_.unstable_NormalPriority,bt=_.unstable_LowPriority,Hn=_.unstable_IdlePriority,qr={},Ki=el!==void 0?el:function(){},Qr=null,Ou=null,h0=!1,Ni=ao(),v0=1e4>Ni?ao:function(){return ao()-Ni};function hs(){switch(I0()){case wl:return 99;case No:return 98;case wt:return 97;case bt:return 96;case Hn:return 95;default:throw Error(t(332))}}function Tt(g){switch(g){case 99:return wl;case 98:return No;case 97:return wt;case 96:return bt;case 95:return Hn;default:throw Error(t(332))}}function fo(g,y){return g=Tt(g),Ql(g,y)}function tl(g,y,R){return g=Tt(g),ko(g,y,R)}function Jl(g){return Qr===null?(Qr=[g],Ou=ko(wl,vs)):Qr.push(g),qr}function ju(){if(Ou!==null){var g=Ou;Ou=null,Is(g)}vs()}function vs(){if(!h0&&Qr!==null){h0=!0;var g=0;try{var y=Qr;fo(99,function(){for(;g=y&&(po=!0),g.firstContext=null)}function ku(g,y){if(Mu!==g&&y!==!1&&y!==0)if((typeof y!="number"||y===1073741823)&&(Mu=g,y=1073741823),y={context:g,observedBits:y,next:null},Si===null){if(cr===null)throw Error(t(308));Si=y,cr.dependencies={expirationTime:0,firstContext:y,responders:null}}else Si=Si.next=y;return ln?g._currentValue:g._currentValue2}var co=!1;function qu(g){return{baseState:g,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Pa(g){return{baseState:g.baseState,firstUpdate:g.firstUpdate,lastUpdate:g.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function m0(g,y){return{expirationTime:g,suspenseConfig:y,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function ia(g,y){g.lastUpdate===null?g.firstUpdate=g.lastUpdate=y:(g.lastUpdate.next=y,g.lastUpdate=y)}function Q0(g,y){var R=g.alternate;if(R===null){var F=g.updateQueue,b=null;F===null&&(F=g.updateQueue=qu(g.memoizedState))}else F=g.updateQueue,b=R.updateQueue,F===null?b===null?(F=g.updateQueue=qu(g.memoizedState),b=R.updateQueue=qu(R.memoizedState)):F=g.updateQueue=Pa(b):b===null&&(b=R.updateQueue=Pa(F));b===null||F===b?ia(F,y):F.lastUpdate===null||b.lastUpdate===null?(ia(F,y),ia(b,y)):(ia(F,y),b.lastUpdate=y)}function ua(g,y){var R=g.updateQueue;R=R===null?g.updateQueue=qu(g.memoizedState):Ia(g,R),R.lastCapturedUpdate===null?R.firstCapturedUpdate=R.lastCapturedUpdate=y:(R.lastCapturedUpdate.next=y,R.lastCapturedUpdate=y)}function Ia(g,y){var R=g.alternate;return R!==null&&y===R.updateQueue&&(y=g.updateQueue=Pa(y)),y}function ms(g,y,R,F,b,J){switch(R.tag){case 1:return g=R.payload,typeof g=="function"?g.call(J,F,b):g;case 3:g.effectTag=g.effectTag&-4097|64;case 0:if(g=R.payload,b=typeof g=="function"?g.call(J,F,b):g,b==null)break;return a({},F,b);case 2:co=!0}return F}function S0(g,y,R,F,b){co=!1,y=Ia(g,y);for(var J=y.baseState,ce=null,mt=0,xt=y.firstUpdate,kt=J;xt!==null;){var xr=xt.expirationTime;xrci?(Qi=ur,ur=null):Qi=ur.sibling;var Gr=cu(Ve,ur,lt[ci],$t);if(Gr===null){ur===null&&(ur=Qi);break}g&&ur&&Gr.alternate===null&&y(Ve,ur),Ue=J(Gr,Ue,ci),si===null?Wn=Gr:si.sibling=Gr,si=Gr,ur=Qi}if(ci===lt.length)return R(Ve,ur),Wn;if(ur===null){for(;cici?(Qi=ur,ur=null):Qi=ur.sibling;var Cu=cu(Ve,ur,Gr.value,$t);if(Cu===null){ur===null&&(ur=Qi);break}g&&ur&&Cu.alternate===null&&y(Ve,ur),Ue=J(Cu,Ue,ci),si===null?Wn=Cu:si.sibling=Cu,si=Cu,ur=Qi}if(Gr.done)return R(Ve,ur),Wn;if(ur===null){for(;!Gr.done;ci++,Gr=lt.next())Gr=i0(Ve,Gr.value,$t),Gr!==null&&(Ue=J(Gr,Ue,ci),si===null?Wn=Gr:si.sibling=Gr,si=Gr);return Wn}for(ur=F(Ve,ur);!Gr.done;ci++,Gr=lt.next())Gr=z0(ur,Ve,ci,Gr.value,$t),Gr!==null&&(g&&Gr.alternate!==null&&ur.delete(Gr.key===null?ci:Gr.key),Ue=J(Gr,Ue,ci),si===null?Wn=Gr:si.sibling=Gr,si=Gr);return g&&ur.forEach(function(Wa){return y(Ve,Wa)}),Wn}return function(Ve,Ue,lt,$t){var Wn=typeof lt=="object"&<!==null&<.type===U&<.key===null;Wn&&(lt=lt.props.children);var si=typeof lt=="object"&<!==null;if(si)switch(lt.$$typeof){case O:e:{for(si=lt.key,Wn=Ue;Wn!==null;){if(Wn.key===si)if(Wn.tag===7?lt.type===U:Wn.elementType===lt.type){R(Ve,Wn.sibling),Ue=b(Wn,lt.type===U?lt.props.children:lt.props,$t),Ue.ref=Us(Ve,Wn,lt),Ue.return=Ve,Ve=Ue;break e}else{R(Ve,Wn);break}else y(Ve,Wn);Wn=Wn.sibling}lt.type===U?(Ue=r0(lt.props.children,Ve.mode,$t,lt.key),Ue.return=Ve,Ve=Ue):($t=qa(lt.type,lt.key,lt.props,null,Ve.mode,$t),$t.ref=Us(Ve,Ue,lt),$t.return=Ve,Ve=$t)}return ce(Ve);case C:e:{for(Wn=lt.key;Ue!==null;){if(Ue.key===Wn)if(Ue.tag===4&&Ue.stateNode.containerInfo===lt.containerInfo&&Ue.stateNode.implementation===lt.implementation){R(Ve,Ue.sibling),Ue=b(Ue,lt.children||[],$t),Ue.return=Ve,Ve=Ue;break e}else{R(Ve,Ue);break}else y(Ve,Ue);Ue=Ue.sibling}Ue=Df(lt,Ve.mode,$t),Ue.return=Ve,Ve=Ue}return ce(Ve)}if(typeof lt=="string"||typeof lt=="number")return lt=""+lt,Ue!==null&&Ue.tag===6?(R(Ve,Ue.sibling),Ue=b(Ue,lt,$t),Ue.return=Ve,Ve=Ue):(R(Ve,Ue),Ue=j0(lt,Ve.mode,$t),Ue.return=Ve,Ve=Ue),ce(Ve);if(y0(lt))return Ol(Ve,Ue,lt,$t);if(ie(lt))return u0(Ve,Ue,lt,$t);if(si&&ji(Ve,lt),typeof lt=="undefined"&&!Wn)switch(Ve.tag){case 1:case 0:throw Ve=Ve.type,Error(t(152,Ve.displayName||Ve.name||"Component"))}return R(Ve,Ue)}}var z=B(!0),G=B(!1),$={},Te={current:$},ge={current:$},Re={current:$};function Z(g){if(g===$)throw Error(t(174));return g}function ke(g,y){en(Re,y,g),en(ge,g,g),en(Te,$,g),y=Ft(y),yi(Te,g),en(Te,y,g)}function Qe(g){yi(Te,g),yi(ge,g),yi(Re,g)}function ht(g){var y=Z(Re.current),R=Z(Te.current);y=Jt(R,g.type,y),R!==y&&(en(ge,g,g),en(Te,y,g))}function ue(g){ge.current===g&&(yi(Te,g),yi(ge,g))}var He={current:0};function nt(g){for(var y=g;y!==null;){if(y.tag===13){var R=y.memoizedState;if(R!==null&&(R=R.dehydrated,R===null||Xr(R)||Ao(R)))return y}else if(y.tag===19&&y.memoizedProps.revealOrder!==void 0){if((y.effectTag&64)!=0)return y}else if(y.child!==null){y.child.return=y,y=y.child;continue}if(y===g)break;for(;y.sibling===null;){if(y.return===null||y.return===g)return null;y=y.return}y.sibling.return=y.return,y=y.sibling}return null}function Ct(g,y){return{responder:g,props:y}}var Mt=k.ReactCurrentDispatcher,It=k.ReactCurrentBatchConfig,sn=0,rn=null,Lt=null,Dn=null,dr=null,er=null,Cr=null,An=0,Nr=null,g0=0,Lr=!1,it=null,Dt=0;function $e(){throw Error(t(321))}function Pt(g,y){if(y===null)return!1;for(var R=0;RAn&&(An=xr,Ua(An))):(cc(xr,xt.suspenseConfig),J=xt.eagerReducer===g?xt.eagerState:g(J,xt.action)),ce=xt,xt=xt.next}while(xt!==null&&xt!==F);kt||(mt=ce,b=J),Le(J,y.memoizedState)||(po=!0),y.memoizedState=J,y.baseUpdate=mt,y.baseState=b,R.lastRenderedState=J}return[y.memoizedState,R.dispatch]}function T0(g){var y=Jn();return typeof g=="function"&&(g=g()),y.memoizedState=y.baseState=g,g=y.queue={last:null,dispatch:null,lastRenderedReducer:au,lastRenderedState:g},g=g.dispatch=js.bind(null,rn,g),[y.memoizedState,g]}function J0(g){return Nu(au,g)}function Lu(g,y,R,F){return g={tag:g,create:y,destroy:R,deps:F,next:null},Nr===null?(Nr={lastEffect:null},Nr.lastEffect=g.next=g):(y=Nr.lastEffect,y===null?Nr.lastEffect=g.next=g:(R=y.next,y.next=g,g.next=R,Nr.lastEffect=g)),g}function _i(g,y,R,F){var b=Jn();g0|=g,b.memoizedState=Lu(y,R,void 0,F===void 0?null:F)}function Fo(g,y,R,F){var b=wr();F=F===void 0?null:F;var J=void 0;if(Lt!==null){var ce=Lt.memoizedState;if(J=ce.destroy,F!==null&&Pt(F,ce.deps)){Lu(0,R,J,F);return}}g0|=g,b.memoizedState=Lu(y,R,J,F)}function nl(g,y){return _i(516,192,g,y)}function hf(g,y){return Fo(516,192,g,y)}function Sl(g,y){if(typeof y=="function")return g=g(),y(g),function(){y(null)};if(y!=null)return g=g(),y.current=g,function(){y.current=null}}function vf(){}function Po(g,y){return Jn().memoizedState=[g,y===void 0?null:y],g}function ys(g,y){var R=wr();y=y===void 0?null:y;var F=R.memoizedState;return F!==null&&y!==null&&Pt(y,F[1])?F[0]:(R.memoizedState=[g,y],g)}function js(g,y,R){if(!(25>Dt))throw Error(t(301));var F=g.alternate;if(g===rn||F!==null&&F===rn)if(Lr=!0,g={expirationTime:sn,suspenseConfig:null,action:R,eagerReducer:null,eagerState:null,next:null},it===null&&(it=new Map),R=it.get(y),R===void 0)it.set(y,g);else{for(y=R;y.next!==null;)y=y.next;y.next=g}else{var b=D0(),J=fi.suspense;b=Un(b,g,J),J={expirationTime:b,suspenseConfig:J,action:R,eagerReducer:null,eagerState:null,next:null};var ce=y.last;if(ce===null)J.next=J;else{var mt=ce.next;mt!==null&&(J.next=mt),ce.next=J}if(y.last=J,g.expirationTime===0&&(F===null||F.expirationTime===0)&&(F=y.lastRenderedReducer,F!==null))try{var xt=y.lastRenderedState,kt=F(xt,R);if(J.eagerReducer=F,J.eagerState=kt,Le(kt,xt))return}catch(xr){}finally{}t0(g,b)}}var Io={readContext:ku,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useResponder:$e,useDeferredValue:$e,useTransition:$e},bo={readContext:ku,useCallback:Po,useContext:ku,useEffect:nl,useImperativeHandle:function(g,y,R){return R=R!=null?R.concat([g]):null,_i(4,36,Sl.bind(null,y,g),R)},useLayoutEffect:function(g,y){return _i(4,36,g,y)},useMemo:function(g,y){var R=Jn();return y=y===void 0?null:y,g=g(),R.memoizedState=[g,y],g},useReducer:function(g,y,R){var F=Jn();return y=R!==void 0?R(y):y,F.memoizedState=F.baseState=y,g=F.queue={last:null,dispatch:null,lastRenderedReducer:g,lastRenderedState:y},g=g.dispatch=js.bind(null,rn,g),[F.memoizedState,g]},useRef:function(g){var y=Jn();return g={current:g},y.memoizedState=g},useState:T0,useDebugValue:vf,useResponder:Ct,useDeferredValue:function(g,y){var R=T0(g),F=R[0],b=R[1];return nl(function(){_.unstable_next(function(){var J=It.suspense;It.suspense=y===void 0?null:y;try{b(g)}finally{It.suspense=J}})},[g,y]),F},useTransition:function(g){var y=T0(!1),R=y[0],F=y[1];return[Po(function(b){F(!0),_.unstable_next(function(){var J=It.suspense;It.suspense=g===void 0?null:g;try{F(!1),b()}finally{It.suspense=J}})},[g,R]),R]}},gs={readContext:ku,useCallback:ys,useContext:ku,useEffect:hf,useImperativeHandle:function(g,y,R){return R=R!=null?R.concat([g]):null,Fo(4,36,Sl.bind(null,y,g),R)},useLayoutEffect:function(g,y){return Fo(4,36,g,y)},useMemo:function(g,y){var R=wr();y=y===void 0?null:y;var F=R.memoizedState;return F!==null&&y!==null&&Pt(y,F[1])?F[0]:(g=g(),R.memoizedState=[g,y],g)},useReducer:Nu,useRef:function(){return wr().memoizedState},useState:J0,useDebugValue:vf,useResponder:Ct,useDeferredValue:function(g,y){var R=J0(g),F=R[0],b=R[1];return hf(function(){_.unstable_next(function(){var J=It.suspense;It.suspense=y===void 0?null:y;try{b(g)}finally{It.suspense=J}})},[g,y]),F},useTransition:function(g){var y=J0(!1),R=y[0],F=y[1];return[ys(function(b){F(!0),_.unstable_next(function(){var J=It.suspense;It.suspense=g===void 0?null:g;try{F(!1),b()}finally{It.suspense=J}})},[g,R]),R]}},Qu=null,Tu=null,Ei=!1;function C0(g,y){var R=zo(5,null,null,0);R.elementType="DELETED",R.type="DELETED",R.stateNode=y,R.return=g,R.effectTag=8,g.lastEffect!==null?(g.lastEffect.nextEffect=R,g.lastEffect=R):g.firstEffect=g.lastEffect=R}function Z0(g,y){switch(g.tag){case 5:return y=Uu(y,g.type,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 6:return y=Y0(y,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 13:return!1;default:return!1}}function Bo(g){if(Ei){var y=Tu;if(y){var R=y;if(!Z0(g,y)){if(y=Oo(R),!y||!Z0(g,y)){g.effectTag=g.effectTag&-1025|2,Ei=!1,Qu=g;return}C0(Qu,R)}Qu=g,Tu=F0(y)}else g.effectTag=g.effectTag&-1025|2,Ei=!1,Qu=g}}function la(g){for(g=g.return;g!==null&&g.tag!==5&&g.tag!==3&&g.tag!==13;)g=g.return;Qu=g}function $l(g){if(!w||g!==Qu)return!1;if(!Ei)return la(g),Ei=!0,!1;var y=g.type;if(g.tag!==5||y!=="head"&&y!=="body"&&!ct(y,g.memoizedProps))for(y=Tu;y;)C0(g,y),y=Oo(y);if(la(g),g.tag===13){if(!w)throw Error(t(316));if(g=g.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(t(317));Tu=Ps(g)}else Tu=Qu?Oo(g.stateNode):null;return!0}function tu(){w&&(Tu=Qu=null,Ei=!1)}var ei=k.ReactCurrentOwner,po=!1;function Bi(g,y,R,F){y.child=g===null?G(y,null,R,F):z(y,g.child,R,F)}function Ci(g,y,R,F,b){R=R.render;var J=y.ref;return Lo(y,b),F=un(g,y,R,F,J,b),g!==null&&!po?(y.updateQueue=g.updateQueue,y.effectTag&=-517,g.expirationTime<=b&&(g.expirationTime=0),yu(g,y,b)):(y.effectTag|=1,Bi(g,y,F,b),y.child)}function mf(g,y,R,F,b,J){if(g===null){var ce=R.type;return typeof ce=="function"&&!Ef(ce)&&ce.defaultProps===void 0&&R.compare===null&&R.defaultProps===void 0?(y.tag=15,y.type=ce,yf(g,y,ce,F,b,J)):(g=qa(R.type,null,F,null,y.mode,J),g.ref=y.ref,g.return=y,y.child=g)}return ce=g.child,by)&&Vr.set(g,y)))}}function no(g,y){g.expirationTimeg?y:g)}function n0(g){if(g.lastExpiredTime!==0)g.callbackExpirationTime=1073741823,g.callbackPriority=99,g.callbackNode=Jl(ro.bind(null,g));else{var y=vo(g),R=g.callbackNode;if(y===0)R!==null&&(g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90);else{var F=D0();if(y===1073741823?F=99:y===1||y===2?F=95:(F=10*(1073741821-y)-10*(1073741821-F),F=0>=F?99:250>=F?98:5250>=F?97:95),R!==null){var b=g.callbackPriority;if(g.callbackExpirationTime===y&&b>=F)return;R!==qr&&Is(R)}g.callbackExpirationTime=y,g.callbackPriority=F,y=y===1073741823?Jl(ro.bind(null,g)):tl(F,Uo.bind(null,g),{timeout:10*(1073741821-y)-v0()}),g.callbackNode=y}}}function Uo(g,y){if(ru=0,y)return y=D0(),da(g,y),n0(g),null;var R=vo(g);if(R!==0){if(y=g.callbackNode,(Fn&(nu|fu))!==Rr)throw Error(t(327));if(qs(),g===ae&&R===Fe||Ds(g,R),re!==null){var F=Fn;Fn|=nu;var b=U0(g);do try{nd();break}catch(mt){fa(g,mt)}while(1);if(zu(),Fn=F,$u.current=b,Ae===ni)throw y=st,Ds(g,R),Al(g,R),n0(g),y;if(re===null)switch(b=g.finishedWork=g.current.alternate,g.finishedExpirationTime=R,F=Ae,ae=null,F){case Li:case ni:throw Error(t(345));case Kn:da(g,2=R){g.lastPingedTime=R,Ds(g,R);break}}if(J=vo(g),J!==0&&J!==R)break;if(F!==0&&F!==R){g.lastPingedTime=F;break}g.timeoutHandle=an(xl.bind(null,g),b);break}xl(g);break;case _0:if(Al(g,R),F=g.lastSuspendedTime,R===F&&(g.nextKnownPendingLevel=Hc(b)),_n&&(b=g.lastPingedTime,b===0||b>=R)){g.lastPingedTime=R,Ds(g,R);break}if(b=vo(g),b!==0&&b!==R)break;if(F!==0&&F!==R){g.lastPingedTime=F;break}if(Qt!==1073741823?F=10*(1073741821-Qt)-v0():vt===1073741823?F=0:(F=10*(1073741821-vt)-5e3,b=v0(),R=10*(1073741821-R)-b,F=b-F,0>F&&(F=0),F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3e3>F?3e3:4320>F?4320:1960*gf(F/1960))-F,R=F?F=0:(b=ce.busyDelayMs|0,J=v0()-(10*(1073741821-J)-(ce.timeoutMs|0||5e3)),F=J<=b?0:b+F-J),10 component higher in the tree to provide a loading indicator or placeholder to display.`+Hr(b))}Ae!==E0&&(Ae=Kn),J=Tl(J,b),xt=F;do{switch(xt.tag){case 3:ce=J,xt.effectTag|=4096,xt.expirationTime=y;var Ue=_s(xt,ce,y);ua(xt,Ue);break e;case 1:ce=J;var lt=xt.type,$t=xt.stateNode;if((xt.effectTag&64)==0&&(typeof lt.getDerivedStateFromError=="function"||$t!==null&&typeof $t.componentDidCatch=="function"&&(mr===null||!mr.has($t)))){xt.effectTag|=4096,xt.expirationTime=y;var Wn=aa(xt,ce,y);ua(xt,Wn);break e}}xt=xt.return}while(xt!==null)}re=mo(re)}catch(si){y=si;continue}break}while(1)}function U0(){var g=$u.current;return $u.current=Io,g===null?Io:g}function cc(g,y){gSn&&(Sn=g)}function E2(){for(;re!==null;)re=rd(re)}function nd(){for(;re!==null&&!$n();)re=rd(re)}function rd(g){var y=Ha(g.alternate,g,Fe);return g.memoizedProps=g.pendingProps,y===null&&(y=mo(g)),Es.current=null,y}function mo(g){re=g;do{var y=re.alternate;if(g=re.return,(re.effectTag&2048)==0){e:{var R=y;y=re;var F=Fe,b=y.pendingProps;switch(y.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:eu(y.type)&&X0(y);break;case 3:Qe(y),Yi(y),b=y.stateNode,b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(R===null||R.child===null)&&$l(y)&&Ju(y),Jr(y);break;case 5:ue(y);var J=Z(Re.current);if(F=y.type,R!==null&&y.stateNode!=null)Wu(R,y,F,b,J),R.ref!==y.ref&&(y.effectTag|=128);else if(b){if(R=Z(Te.current),$l(y)){if(b=y,!w)throw Error(t(175));R=su(b.stateNode,b.type,b.memoizedProps,J,R,b),b.updateQueue=R,R=R!==null,R&&Ju(y)}else{var ce=fe(F,b,J,R,y);ti(ce,y,!1,!1),y.stateNode=ce,oe(ce,F,b,J,R)&&Ju(y)}y.ref!==null&&(y.effectTag|=128)}else if(y.stateNode===null)throw Error(t(166));break;case 6:if(R&&y.stateNode!=null)Rn(R,y,R.memoizedProps,b);else{if(typeof b!="string"&&y.stateNode===null)throw Error(t(166));if(R=Z(Re.current),J=Z(Te.current),$l(y)){if(R=y,!w)throw Error(t(176));(R=ki(R.stateNode,R.memoizedProps,R))&&Ju(y)}else y.stateNode=nn(b,R,J,y)}break;case 11:break;case 13:if(yi(He,y),b=y.memoizedState,(y.effectTag&64)!=0){y.expirationTime=F;break e}b=b!==null,J=!1,R===null?y.memoizedProps.fallback!==void 0&&$l(y):(F=R.memoizedState,J=F!==null,b||F===null||(F=R.child.sibling,F!==null&&(ce=y.firstEffect,ce!==null?(y.firstEffect=F,F.nextEffect=ce):(y.firstEffect=y.lastEffect=F,F.nextEffect=null),F.effectTag=8))),b&&!J&&(y.mode&2)!=0&&(R===null&&y.memoizedProps.unstable_avoidThisFallback!==!0||(He.current&1)!=0?Ae===Li&&(Ae=e0):((Ae===Li||Ae===e0)&&(Ae=_0),Sn!==0&&ae!==null&&(Al(ae,Fe),Ts(ae,Sn)))),Er&&b&&(y.effectTag|=4),Vt&&(b||J)&&(y.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Qe(y),Jr(y);break;case 10:Su(y);break;case 9:break;case 14:break;case 17:eu(y.type)&&X0(y);break;case 19:if(yi(He,y),b=y.memoizedState,b===null)break;if(J=(y.effectTag&64)!=0,ce=b.rendering,ce===null){if(J)Fu(b,!1);else if(Ae!==Li||R!==null&&(R.effectTag&64)!=0)for(R=y.child;R!==null;){if(ce=nt(R),ce!==null){for(y.effectTag|=64,Fu(b,!1),R=ce.updateQueue,R!==null&&(y.updateQueue=R,y.effectTag|=4),b.lastEffect===null&&(y.firstEffect=null),y.lastEffect=b.lastEffect,R=F,b=y.child;b!==null;)J=b,F=R,J.effectTag&=2,J.nextEffect=null,J.firstEffect=null,J.lastEffect=null,ce=J.alternate,ce===null?(J.childExpirationTime=0,J.expirationTime=F,J.child=null,J.memoizedProps=null,J.memoizedState=null,J.updateQueue=null,J.dependencies=null):(J.childExpirationTime=ce.childExpirationTime,J.expirationTime=ce.expirationTime,J.child=ce.child,J.memoizedProps=ce.memoizedProps,J.memoizedState=ce.memoizedState,J.updateQueue=ce.updateQueue,F=ce.dependencies,J.dependencies=F===null?null:{expirationTime:F.expirationTime,firstContext:F.firstContext,responders:F.responders}),b=b.sibling;en(He,He.current&1|2,y),y=y.child;break e}R=R.sibling}}else{if(!J)if(R=nt(ce),R!==null){if(y.effectTag|=64,J=!0,R=R.updateQueue,R!==null&&(y.updateQueue=R,y.effectTag|=4),Fu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!ce.alternate){y=y.lastEffect=b.lastEffect,y!==null&&(y.nextEffect=null);break}}else v0()>b.tailExpiration&&1b&&(b=F),ce>b&&(b=ce),J=J.sibling;R.childExpirationTime=b}if(y!==null)return y;g!==null&&(g.effectTag&2048)==0&&(g.firstEffect===null&&(g.firstEffect=re.firstEffect),re.lastEffect!==null&&(g.lastEffect!==null&&(g.lastEffect.nextEffect=re.firstEffect),g.lastEffect=re.lastEffect),1g?y:g}function xl(g){var y=hs();return fo(99,il.bind(null,g,y)),null}function il(g,y){do qs();while(ri!==null);if((Fn&(nu|fu))!==Rr)throw Error(t(327));var R=g.finishedWork,F=g.finishedExpirationTime;if(R===null)return null;if(g.finishedWork=null,g.finishedExpirationTime=0,R===g.current)throw Error(t(177));g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90,g.nextKnownPendingLevel=0;var b=Hc(R);if(g.firstPendingTime=b,F<=g.lastSuspendedTime?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:F<=g.firstSuspendedTime&&(g.firstSuspendedTime=F-1),F<=g.lastPingedTime&&(g.lastPingedTime=0),F<=g.lastExpiredTime&&(g.lastExpiredTime=0),g===ae&&(re=ae=null,Fe=0),1=R?Kt(g,y,R):(en(He,He.current&1,y),y=yu(g,y,R),y!==null?y.sibling:null);en(He,He.current&1,y);break;case 19:if(F=y.childExpirationTime>=R,(g.effectTag&64)!=0){if(F)return xn(g,y,R);y.effectTag|=64}if(b=y.memoizedState,b!==null&&(b.rendering=null,b.tail=null),en(He,He.current,y),!F)return null}return yu(g,y,R)}po=!1}}else po=!1;switch(y.expirationTime=0,y.tag){case 2:if(F=y.type,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,b=Au(y,Ai.current),Lo(y,R),b=un(null,y,F,g,b,R),y.effectTag|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0){if(y.tag=1,fn(),eu(F)){var J=!0;ai(y)}else J=!1;y.memoizedState=b.state!==null&&b.state!==void 0?b.state:null;var ce=F.getDerivedStateFromProps;typeof ce=="function"&&Zl(y,F,ce,g),b.updater=oa,y.stateNode=b,b._reactInternalFiber=y,Bs(y,F,g,R),y=et(null,y,F,!0,J,R)}else y.tag=0,Bi(null,y,b,R),y=y.child;return y;case 16:if(b=y.elementType,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,Oe(b),b._status!==1)throw b._result;switch(b=b._result,y.type=b,J=y.tag=ul(b),g=Yn(b,g),J){case 0:y=eo(null,y,b,g,R);break;case 1:y=Ce(null,y,b,g,R);break;case 11:y=Ci(null,y,b,g,R);break;case 14:y=mf(null,y,b,Yn(b.type,g),F,R);break;default:throw Error(t(306,b,""))}return y;case 0:return F=y.type,b=y.pendingProps,b=y.elementType===F?b:Yn(F,b),eo(g,y,F,b,R);case 1:return F=y.type,b=y.pendingProps,b=y.elementType===F?b:Yn(F,b),Ce(g,y,F,b,R);case 3:if(Ye(y),F=y.updateQueue,F===null)throw Error(t(282));if(b=y.memoizedState,b=b!==null?b.element:null,S0(y,F,y.pendingProps,null,R),F=y.memoizedState.element,F===b)tu(),y=yu(g,y,R);else{if((b=y.stateNode.hydrate)&&(w?(Tu=F0(y.stateNode.containerInfo),Qu=y,b=Ei=!0):b=!1),b)for(R=G(y,null,F,R),y.child=R;R;)R.effectTag=R.effectTag&-3|1024,R=R.sibling;else Bi(g,y,F,R),tu();y=y.child}return y;case 5:return ht(y),g===null&&Bo(y),F=y.type,b=y.pendingProps,J=g!==null?g.memoizedProps:null,ce=b.children,ct(F,b)?ce=null:J!==null&&ct(F,J)&&(y.effectTag|=16),$0(g,y),y.mode&4&&R!==1&&Rt(F,b)?(y.expirationTime=y.childExpirationTime=1,y=null):(Bi(g,y,ce,R),y=y.child),y;case 6:return g===null&&Bo(y),null;case 13:return Kt(g,y,R);case 4:return ke(y,y.stateNode.containerInfo),F=y.pendingProps,g===null?y.child=z(y,null,F,R):Bi(g,y,F,R),y.child;case 11:return F=y.type,b=y.pendingProps,b=y.elementType===F?b:Yn(F,b),Ci(g,y,F,b,R);case 7:return Bi(g,y,y.pendingProps,R),y.child;case 8:return Bi(g,y,y.pendingProps.children,R),y.child;case 12:return Bi(g,y,y.pendingProps.children,R),y.child;case 10:e:{if(F=y.type._context,b=y.pendingProps,ce=y.memoizedProps,J=b.value,Hu(y,J),ce!==null){var mt=ce.value;if(J=Le(mt,J)?0:(typeof F._calculateChangedBits=="function"?F._calculateChangedBits(mt,J):1073741823)|0,J===0){if(ce.children===b.children&&!gi.current){y=yu(g,y,R);break e}}else for(mt=y.child,mt!==null&&(mt.return=y);mt!==null;){var xt=mt.dependencies;if(xt!==null){ce=mt.child;for(var kt=xt.firstContext;kt!==null;){if(kt.context===F&&(kt.observedBits&J)!=0){mt.tag===1&&(kt=m0(R,null),kt.tag=2,Q0(mt,kt)),mt.expirationTime=y&&g<=y}function Al(g,y){var R=g.firstSuspendedTime,F=g.lastSuspendedTime;Ry||R===0)&&(g.lastSuspendedTime=y),y<=g.lastPingedTime&&(g.lastPingedTime=0),y<=g.lastExpiredTime&&(g.lastExpiredTime=0)}function Ts(g,y){y>g.firstPendingTime&&(g.firstPendingTime=y);var R=g.firstSuspendedTime;R!==0&&(y>=R?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:y>=g.lastSuspendedTime&&(g.lastSuspendedTime=y+1),y>g.nextKnownPendingLevel&&(g.nextKnownPendingLevel=y))}function da(g,y){var R=g.lastExpiredTime;(R===0||R>y)&&(g.lastExpiredTime=y)}function ud(g){var y=g._reactInternalFiber;if(y===void 0)throw typeof g.render=="function"?Error(t(188)):Error(t(268,Object.keys(g)));return g=Xe(y),g===null?null:g.stateNode}function pa(g,y){g=g.memoizedState,g!==null&&g.dehydrated!==null&&g.retryTime{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var RP=0;ec.__interactionsRef=null;ec.__subscriberRef=null;ec.unstable_clear=function(i){return i()};ec.unstable_getCurrent=function(){return null};ec.unstable_getThreadID=function(){return++RP};ec.unstable_trace=function(i,o,a){return a()};ec.unstable_wrap=function(i){return i};ec.unstable_subscribe=function(){};ec.unstable_unsubscribe=function(){}});var NS=tt(mu=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var i=!0,o=0,a=0,p=0;mu.__interactionsRef=null,mu.__subscriberRef=null,i&&(mu.__interactionsRef={current:new Set},mu.__subscriberRef={current:null});function _(se){if(!i)return se();var De=mu.__interactionsRef.current;mu.__interactionsRef.current=new Set;try{return se()}finally{mu.__interactionsRef.current=De}}function t(){return i?mu.__interactionsRef.current:null}function k(){return++p}function L(se,De,pe){var me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(!i)return pe();var ie={__count:1,id:a++,name:se,timestamp:De},Oe=mu.__interactionsRef.current,je=new Set(Oe);je.add(ie),mu.__interactionsRef.current=je;var qe=mu.__subscriberRef.current,yt;try{qe!==null&&qe.onInteractionTraced(ie)}finally{try{qe!==null&&qe.onWorkStarted(je,me)}finally{try{yt=pe()}finally{mu.__interactionsRef.current=Oe;try{qe!==null&&qe.onWorkStopped(je,me)}finally{ie.__count--,qe!==null&&ie.__count===0&&qe.onInteractionScheduledWorkCompleted(ie)}}}}return yt}function O(se){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o;if(!i)return se;var pe=mu.__interactionsRef.current,me=mu.__subscriberRef.current;me!==null&&me.onWorkScheduled(pe,De),pe.forEach(function(je){je.__count++});var ie=!1;function Oe(){var je=mu.__interactionsRef.current;mu.__interactionsRef.current=pe,me=mu.__subscriberRef.current;try{var qe;try{me!==null&&me.onWorkStarted(pe,De)}finally{try{qe=se.apply(void 0,arguments)}finally{mu.__interactionsRef.current=je,me!==null&&me.onWorkStopped(pe,De)}}return qe}finally{ie||(ie=!0,pe.forEach(function(yt){yt.__count--,me!==null&&yt.__count===0&&me.onInteractionScheduledWorkCompleted(yt)}))}}return Oe.cancel=function(){me=mu.__subscriberRef.current;try{me!==null&&me.onWorkCanceled(pe,De)}finally{pe.forEach(function(qe){qe.__count--,me&&qe.__count===0&&me.onInteractionScheduledWorkCompleted(qe)})}},Oe}var C=null;i&&(C=new Set);function U(se){i&&(C.add(se),C.size===1&&(mu.__subscriberRef.current={onInteractionScheduledWorkCompleted:ne,onInteractionTraced:W,onWorkCanceled:ve,onWorkScheduled:m,onWorkStarted:he,onWorkStopped:Ee}))}function H(se){i&&(C.delete(se),C.size===0&&(mu.__subscriberRef.current=null))}function W(se){var De=!1,pe=null;if(C.forEach(function(me){try{me.onInteractionTraced(se)}catch(ie){De||(De=!0,pe=ie)}}),De)throw pe}function ne(se){var De=!1,pe=null;if(C.forEach(function(me){try{me.onInteractionScheduledWorkCompleted(se)}catch(ie){De||(De=!0,pe=ie)}}),De)throw pe}function m(se,De){var pe=!1,me=null;if(C.forEach(function(ie){try{ie.onWorkScheduled(se,De)}catch(Oe){pe||(pe=!0,me=Oe)}}),pe)throw me}function he(se,De){var pe=!1,me=null;if(C.forEach(function(ie){try{ie.onWorkStarted(se,De)}catch(Oe){pe||(pe=!0,me=Oe)}}),pe)throw me}function Ee(se,De){var pe=!1,me=null;if(C.forEach(function(ie){try{ie.onWorkStopped(se,De)}catch(Oe){pe||(pe=!0,me=Oe)}}),pe)throw me}function ve(se,De){var pe=!1,me=null;if(C.forEach(function(ie){try{ie.onWorkCanceled(se,De)}catch(Oe){pe||(pe=!0,me=Oe)}}),pe)throw me}mu.unstable_clear=_,mu.unstable_getCurrent=t,mu.unstable_getThreadID=k,mu.unstable_trace=L,mu.unstable_wrap=O,mu.unstable_subscribe=U,mu.unstable_unsubscribe=H}()});var LS=tt((CH,hD)=>{"use strict";process.env.NODE_ENV==="production"?hD.exports=kS():hD.exports=NS()});var PS=tt((xH,qy)=>{"use strict";process.env.NODE_ENV!=="production"&&(qy.exports=function i(o){"use strict";var a=Oy(),p=Mi(),_=YE(),t=b_(),k=LS(),L=0,O=1,C=2,U=3,H=4,W=5,ne=6,m=7,he=8,Ee=9,ve=10,se=11,De=12,pe=13,me=14,ie=15,Oe=16,je=17,qe=18,yt=19,gt=20,Xe=21,ut=function(){};ut=function(f,c){for(var E=arguments.length,T=new Array(E>2?E-2:0),A=2;A8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!f){if(typeof console!="undefined"){var j=T.map(function(le){return""+le});j.unshift("Warning: "+c),Function.prototype.apply.call(console.error,console,j)}try{var V=0,te="Warning: "+c.replace(/%s/g,function(){return T[V++]});throw new Error(te)}catch(le){}}};var We=ut;function Ft(f){return f._reactInternalFiber}function Jt(f,c){f._reactInternalFiber=c}var rt=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;rt.hasOwnProperty("ReactCurrentDispatcher")||(rt.ReactCurrentDispatcher={current:null}),rt.hasOwnProperty("ReactCurrentBatchConfig")||(rt.ReactCurrentBatchConfig={suspense:null});var Q=typeof Symbol=="function"&&Symbol.for,fe=Q?Symbol.for("react.element"):60103,xe=Q?Symbol.for("react.portal"):60106,oe=Q?Symbol.for("react.fragment"):60107,ze=Q?Symbol.for("react.strict_mode"):60108,ct=Q?Symbol.for("react.profiler"):60114,Rt=Q?Symbol.for("react.provider"):60109,nn=Q?Symbol.for("react.context"):60110,an=Q?Symbol.for("react.concurrent_mode"):60111,Mn=Q?Symbol.for("react.forward_ref"):60112,lr=Q?Symbol.for("react.suspense"):60113,ln=Q?Symbol.for("react.suspense_list"):60120,Vt=Q?Symbol.for("react.memo"):60115,Er=Q?Symbol.for("react.lazy"):60116,w=Q?Symbol.for("react.fundamental"):60117,jt=Q?Symbol.for("react.responder"):60118,Xn=Q?Symbol.for("react.scope"):60119,vr=typeof Symbol=="function"&&Symbol.iterator,jr="@@iterator";function fr(f){if(f===null||typeof f!="object")return null;var c=vr&&f[vr]||f[jr];return typeof c=="function"?c:null}var zr=We;zr=function(f,c){if(!f){for(var E=rt.ReactDebugCurrentFrame,T=E.getStackAddendum(),A=arguments.length,j=new Array(A>2?A-2:0),V=2;V import('./MyComponent'))`,T),f._status=Ro,f._result=A}},function(T){f._status===d0&&(f._status=Qo,f._result=T)})}}function Zo(f,c,E){var T=c.displayName||c.name||"";return f.displayName||(T!==""?E+"("+T+")":E)}function qt(f){if(f==null)return null;if(typeof f.tag=="number"&&We(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case oe:return"Fragment";case xe:return"Portal";case ct:return"Profiler";case ze:return"StrictMode";case lr:return"Suspense";case ln:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case nn:return"Context.Consumer";case Rt:return"Context.Provider";case Mn:return Zo(f,f.render,"ForwardRef");case Vt:return qt(f.type);case Er:{var c=f,E=Fs(c);if(E)return qt(E);break}}return null}var xi=0,lu=1,mi=2,Dr=4,$o=6,G0=8,Uu=16,Y0=32,Xr=64,Ao=128,Oo=256,F0=512,su=1024,ki=1028,Ps=932,Kl=2047,P0=2048,p0=4096,Hr=!0,Ri=!0,K0=!0,yi=!0,en=!0,bn=!0,Ai=!1,gi=!1,Wt=!1,Au=!1,eu=!1,X0=!0,Yi=!1,Xl=!1,Mo=!1,ai=!1,so=!1,Ql=rt.ReactCurrentOwner;function ko(f){var c=f,E=f;if(f.alternate)for(;c.return;)c=c.return;else{var T=c;do c=T,(c.effectTag&(mi|su))!==xi&&(E=c.return),T=c.return;while(T)}return c.tag===U?E:null}function Is(f){return ko(f)===f}function $n(f){{var c=Ql.current;if(c!==null&&c.tag===O){var E=c,T=E.stateNode;T._warnedAboutRefsInRender||We(!1,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",qt(E.type)||"A component"),T._warnedAboutRefsInRender=!0}}var A=Ft(f);return A?ko(A)===A:!1}function el(f){if(ko(f)!==f)throw Error("Unable to find node on an unmounted component.")}function ao(f){var c=f.alternate;if(!c){var E=ko(f);if(E===null)throw Error("Unable to find node on an unmounted component.");return E!==f?null:f}for(var T=f,A=c;;){var j=T.return;if(j===null)break;var V=j.alternate;if(V===null){var te=j.return;if(te!==null){T=A=te;continue}break}if(j.child===V.child){for(var le=j.child;le;){if(le===T)return el(j),f;if(le===A)return el(j),c;le=le.sibling}throw Error("Unable to find node on an unmounted component.")}if(T.return!==A.return)T=j,A=V;else{for(var Be=!1,Ke=j.child;Ke;){if(Ke===T){Be=!0,T=j,A=V;break}if(Ke===A){Be=!0,A=j,T=V;break}Ke=Ke.sibling}if(!Be){for(Ke=V.child;Ke;){if(Ke===T){Be=!0,T=V,A=j;break}if(Ke===A){Be=!0,A=V,T=j;break}Ke=Ke.sibling}if(!Be)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(T.alternate!==A)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(T.tag!==U)throw Error("Unable to find node on an unmounted component.");return T.stateNode.current===T?f:c}function I0(f){var c=ao(f);if(!c)return null;for(var E=c;;){if(E.tag===W||E.tag===ne)return E;if(E.child){E.child.return=E,E=E.child;continue}if(E===c)return null;for(;!E.sibling;){if(!E.return||E.return===c)return null;E=E.return}E.sibling.return=E.return,E=E.sibling}return null}function wl(f){var c=ao(f);if(!c)return null;for(var E=c;;){if(E.tag===W||E.tag===ne||Wt&&E.tag===gt)return E;if(E.child&&E.tag!==H){E.child.return=E,E=E.child;continue}if(E===c)return null;for(;!E.sibling;){if(!E.return||E.return===c)return null;E=E.return}E.sibling.return=E.return,E=E.sibling}return null}var No=o.getPublicInstance,wt=o.getRootHostContext,bt=o.getChildHostContext,Hn=o.prepareForCommit,qr=o.resetAfterCommit,Ki=o.createInstance,Qr=o.appendInitialChild,Ou=o.finalizeInitialChildren,h0=o.prepareUpdate,Ni=o.shouldSetTextContent,v0=o.shouldDeprioritizeSubtree,hs=o.createTextInstance,Tt=o.setTimeout,fo=o.clearTimeout,tl=o.noTimeout,Jl=o.now,ju=o.isPrimaryRenderer,vs=o.warnsIfNotActing,b0=o.supportsMutation,X=o.supportsPersistence,we=o.supportsHydration,Le=o.mountResponderInstance,Ne=o.unmountResponderInstance,dt=o.getFundamentalComponentInstance,Yn=o.mountFundamentalComponent,Cn=o.shouldUpdateFundamentalComponent,cr=o.getInstanceFromNode,Si=o.appendChild,Mu=o.appendChildToContainer,zu=o.commitTextUpdate,Hu=o.commitMount,Su=o.commitUpdate,Ti=o.insertBefore,Lo=o.insertInContainerBefore,ku=o.removeChild,co=o.removeChildFromContainer,qu=o.resetTextContent,Pa=o.hideInstance,m0=o.hideTextInstance,ia=o.unhideInstance,Q0=o.unhideTextInstance,ua=o.updateFundamentalComponent,Ia=o.unmountFundamentalComponent,ms=o.cloneInstance,S0=o.createContainerChildSet,Qn=o.appendChildToContainerChildSet,ac=o.finalizeContainerChildren,fi=o.replaceContainerChildren,$r=o.cloneHiddenInstance,Zl=o.cloneHiddenTextInstance,oa=o.cloneInstance,pf=o.canHydrateInstance,bs=o.canHydrateTextInstance,ba=o.canHydrateSuspenseInstance,Bs=o.isSuspenseInstancePending,y0=o.isSuspenseInstanceFallback,Us=o.registerSuspenseInstanceRetry,ji=o.getNextHydratableSibling,B=o.getFirstHydratableChild,z=o.hydrateInstance,G=o.hydrateTextInstance,$=o.hydrateSuspenseInstance,Te=o.getNextHydratableInstanceAfterSuspenseInstance,ge=o.commitHydratedContainer,Re=o.commitHydratedSuspenseInstance,Z=o.clearSuspenseBoundary,ke=o.clearSuspenseBoundaryFromContainer,Qe=o.didNotMatchHydratedContainerTextInstance,ht=o.didNotMatchHydratedTextInstance,ue=o.didNotHydrateContainerInstance,He=o.didNotHydrateInstance,nt=o.didNotFindHydratableContainerInstance,Ct=o.didNotFindHydratableContainerTextInstance,Mt=o.didNotFindHydratableContainerSuspenseInstance,It=o.didNotFindHydratableInstance,sn=o.didNotFindHydratableTextInstance,rn=o.didNotFindHydratableSuspenseInstance,Lt=/^(.*)[\\\/]/,Dn=function(f,c,E){var T="";if(c){var A=c.fileName,j=A.replace(Lt,"");if(/^index\./.test(j)){var V=A.match(Lt);if(V){var te=V[1];if(te){var le=te.replace(Lt,"");j=le+"/"+j}}}T=" (at "+j+":"+c.lineNumber+")"}else E&&(T=" (created by "+E+")");return` - in `+(f||"Unknown")+T},dr=rt.ReactDebugCurrentFrame;function er(f){switch(f.tag){case U:case H:case ne:case m:case ve:case Ee:return"";default:var c=f._debugOwner,E=f._debugSource,T=qt(f.type),A=null;return c&&(A=qt(c.type)),Dn(T,E,A)}}function Cr(f){var c="",E=f;do c+=er(E),E=E.return;while(E);return c}var An=null,Nr=null;function g0(){{if(An===null)return null;var f=An._debugOwner;if(f!==null&&typeof f!="undefined")return qt(f.type)}return null}function Lr(){return An===null?"":Cr(An)}function it(){dr.getCurrentStack=null,An=null,Nr=null}function Dt(f){dr.getCurrentStack=Lr,An=f,Nr=null}function $e(f){Nr=f}var Pt="\u269B",un="\u26D4",fn=typeof performance!="undefined"&&typeof performance.mark=="function"&&typeof performance.clearMarks=="function"&&typeof performance.measure=="function"&&typeof performance.clearMeasures=="function",Jn=null,wr=null,au=null,Nu=!1,T0=!1,J0=!1,Lu=0,_i=0,Fo=new Set,nl=function(f){return Pt+" "+f},hf=function(f,c){var E=c?un+" ":Pt+" ",T=c?" Warning: "+c:"";return""+E+f+T},Sl=function(f){performance.mark(nl(f))},vf=function(f){performance.clearMarks(nl(f))},Po=function(f,c,E){var T=nl(c),A=hf(f,E);try{performance.measure(A,T)}catch(j){}performance.clearMarks(T),performance.clearMeasures(A)},ys=function(f,c){return f+" (#"+c+")"},js=function(f,c,E){return E===null?f+" ["+(c?"update":"mount")+"]":f+"."+E},Io=function(f,c){var E=qt(f.type)||"Unknown",T=f._debugID,A=f.alternate!==null,j=js(E,A,c);if(Nu&&Fo.has(j))return!1;Fo.add(j);var V=ys(j,T);return Sl(V),!0},bo=function(f,c){var E=qt(f.type)||"Unknown",T=f._debugID,A=f.alternate!==null,j=js(E,A,c),V=ys(j,T);vf(V)},gs=function(f,c,E){var T=qt(f.type)||"Unknown",A=f._debugID,j=f.alternate!==null,V=js(T,j,c),te=ys(V,A);Po(V,te,E)},Qu=function(f){switch(f.tag){case U:case W:case ne:case H:case m:case ve:case Ee:case he:return!0;default:return!1}},Tu=function(){wr!==null&&au!==null&&bo(au,wr),au=null,wr=null,J0=!1},Ei=function(){for(var f=Jn;f;)f._debugIsCurrentlyTiming&&gs(f,null,null),f=f.return},C0=function(f){f.return!==null&&C0(f.return),f._debugIsCurrentlyTiming&&Io(f,null)},Z0=function(){Jn!==null&&C0(Jn)};function Bo(){Hr&&_i++}function la(){Hr&&(Nu&&(T0=!0),wr!==null&&wr!=="componentWillMount"&&wr!=="componentWillReceiveProps"&&(J0=!0))}function $l(f){if(Hr){if(!fn||Qu(f)||(Jn=f,!Io(f,null)))return;f._debugIsCurrentlyTiming=!0}}function tu(f){if(Hr){if(!fn||Qu(f))return;f._debugIsCurrentlyTiming=!1,bo(f,null)}}function ei(f){if(Hr){if(!fn||Qu(f)||(Jn=f.return,!f._debugIsCurrentlyTiming))return;f._debugIsCurrentlyTiming=!1,gs(f,null,null)}}function po(f){if(Hr){if(!fn||Qu(f)||(Jn=f.return,!f._debugIsCurrentlyTiming))return;f._debugIsCurrentlyTiming=!1;var c=f.tag===pe?"Rendering was suspended":"An error was thrown inside this error boundary";gs(f,null,c)}}function Bi(f,c){if(Hr){if(!fn||(Tu(),!Io(f,c)))return;au=f,wr=c}}function Ci(){if(Hr){if(!fn)return;if(wr!==null&&au!==null){var f=J0?"Scheduled a cascading update":null;gs(au,wr,f)}wr=null,au=null}}function mf(f){if(Hr){if(Jn=f,!fn)return;Lu=0,Sl("(React Tree Reconciliation)"),Z0()}}function yf(f,c){if(Hr){if(!fn)return;var E=null;if(f!==null)if(f.tag===U)E="A top-level update interrupted the previous render";else{var T=qt(f.type)||"Unknown";E="An update to "+T+" interrupted the previous render"}else Lu>1&&(E="There were cascading updates");Lu=0;var A=c?"(React Tree Reconciliation: Completed Root)":"(React Tree Reconciliation: Yielded)";Ei(),Po(A,"(React Tree Reconciliation)",E)}}function $0(){if(Hr){if(!fn)return;Nu=!0,T0=!1,Fo.clear(),Sl("(Committing Changes)")}}function eo(){if(Hr){if(!fn)return;var f=null;T0?f="Lifecycle hook scheduled a cascading update":Lu>0&&(f="Caused by a cascading update in earlier commit"),T0=!1,Lu++,Nu=!1,Fo.clear(),Po("(Committing Changes)","(Committing Changes)",f)}}function Ce(){if(Hr){if(!fn)return;_i=0,Sl("(Committing Snapshot Effects)")}}function et(){if(Hr){if(!fn)return;var f=_i;_i=0,Po("(Committing Snapshot Effects: "+f+" Total)","(Committing Snapshot Effects)",null)}}function Ye(){if(Hr){if(!fn)return;_i=0,Sl("(Committing Host Effects)")}}function Yt(){if(Hr){if(!fn)return;var f=_i;_i=0,Po("(Committing Host Effects: "+f+" Total)","(Committing Host Effects)",null)}}function Kt(){if(Hr){if(!fn)return;_i=0,Sl("(Calling Lifecycle Methods)")}}function pr(){if(Hr){if(!fn)return;var f=_i;_i=0,Po("(Calling Lifecycle Methods: "+f+" Total)","(Calling Lifecycle Methods)",null)}}var Wr=[],xn;xn=[];var yu=-1;function Ju(f){return{current:f}}function ti(f,c){if(yu<0){We(!1,"Unexpected pop.");return}c!==xn[yu]&&We(!1,"Unexpected Fiber popped."),f.current=Wr[yu],Wr[yu]=null,xn[yu]=null,yu--}function Jr(f,c,E){yu++,Wr[yu]=f.current,xn[yu]=E,f.current=c}var Wu;Wu={};var Rn={};Object.freeze(Rn);var x0=Ju(Rn),Fu=Ju(!1),li=Rn;function Tl(f,c,E){return ai?Rn:E&&Xi(c)?li:x0.current}function zs(f,c,E){if(!ai){var T=f.stateNode;T.__reactInternalMemoizedUnmaskedChildContext=c,T.__reactInternalMemoizedMaskedChildContext=E}}function Vu(f,c){if(ai)return Rn;var E=f.type,T=E.contextTypes;if(!T)return Rn;var A=f.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===c)return A.__reactInternalMemoizedMaskedChildContext;var j={};for(var V in T)j[V]=c[V];{var te=qt(E)||"Unknown";_(T,j,"context",te,Lr)}return A&&zs(f,c,j),j}function sa(){return ai?!1:Fu.current}function Xi(f){if(ai)return!1;var c=f.childContextTypes;return c!=null}function Hs(f){ai||(ti(Fu,f),ti(x0,f))}function R0(f){ai||(ti(Fu,f),ti(x0,f))}function zi(f,c,E){if(!ai){if(x0.current!==Rn)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Jr(x0,c,f),Jr(Fu,E,f)}}function A0(f,c,E){if(ai)return E;var T=f.stateNode,A=c.childContextTypes;if(typeof T.getChildContext!="function"){{var j=qt(c)||"Unknown";Wu[j]||(Wu[j]=!0,We(!1,"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",j,j))}return E}var V;$e("getChildContext"),Bi(f,"getChildContext"),V=T.getChildContext(),Ci(),$e(null);for(var te in V)if(!(te in A))throw Error((qt(c)||"Unknown")+'.getChildContext(): key "'+te+'" is not defined in childContextTypes.');{var le=qt(c)||"Unknown";_(A,V,"child context",le,Lr)}return a({},E,{},V)}function Hi(f){if(ai)return!1;var c=f.stateNode,E=c&&c.__reactInternalMemoizedMergedChildContext||Rn;return li=x0.current,Jr(x0,E,f),Jr(Fu,Fu.current,f),!0}function rl(f,c,E){if(!ai){var T=f.stateNode;if(!T)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(E){var A=A0(f,c,li);T.__reactInternalMemoizedMergedChildContext=A,ti(Fu,f),ti(x0,f),Jr(x0,A,f),Jr(Fu,E,f)}else ti(Fu,f),Jr(Fu,E,f)}}function Cl(f){if(ai)return Rn;if(!(Is(f)&&f.tag===O))throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var c=f;do{switch(c.tag){case U:return c.stateNode.context;case O:{var E=c.type;if(Xi(E))return c.stateNode.__reactInternalMemoizedMergedChildContext;break}}c=c.return}while(c!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}var B0=1,O0=2,ho=t.unstable_runWithPriority,Pu=t.unstable_scheduleCallback,Zu=t.unstable_cancelCallback,es=t.unstable_shouldYield,_s=t.unstable_requestPaint,aa=t.unstable_now,gf=t.unstable_getCurrentPriorityLevel,$u=t.unstable_ImmediatePriority,Es=t.unstable_UserBlockingPriority,Rr=t.unstable_NormalPriority,to=t.unstable_LowPriority,nu=t.unstable_IdlePriority;if(bn&&!(k.__interactionsRef!=null&&k.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling");var fu={},Li=99,ni=98,Kn=97,e0=96,_0=95,E0=90,Fn=es,ae=_s!==void 0?_s:function(){},re=null,Fe=null,Ae=!1,st=aa(),vt=st<1e4?aa:function(){return aa()-st};function Qt(){switch(gf()){case $u:return Li;case Es:return ni;case Rr:return Kn;case to:return e0;case nu:return _0;default:throw Error("Unknown priority level.")}}function On(f){switch(f){case Li:return $u;case ni:return Es;case Kn:return Rr;case e0:return to;case _0:return nu;default:throw Error("Unknown priority level.")}}function Sn(f,c){var E=On(f);return ho(E,c)}function _n(f,c,E){var T=On(f);return Pu(T,c,E)}function Tn(f){return re===null?(re=[f],Fe=Pu($u,Fi)):re.push(f),fu}function ir(f){f!==fu&&Zu(f)}function Bt(){if(Fe!==null){var f=Fe;Fe=null,Zu(f)}Fi()}function Fi(){if(!Ae&&re!==null){Ae=!0;var f=0;try{var c=!0,E=re;Sn(Li,function(){for(;f1?c-1:0),T=1;T2?E-2:0),A=2;A0&&(ja.forEach(function(Nt){f.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),ja=[]);var c=new Set;za.length>0&&(za.forEach(function(Nt){c.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),za=[]);var E=new Set;Ha.length>0&&(Ha.forEach(function(Nt){E.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),Ha=[]);var T=new Set;ca.length>0&&(ca.forEach(function(Nt){T.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),ca=[]);var A=new Set;ws.length>0&&(ws.forEach(function(Nt){A.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),ws=[]);var j=new Set;if(Ss.length>0&&(Ss.forEach(function(Nt){j.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),Ss=[]),c.size>0){var V=jo(c);We(!1,`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move code with side effects to componentDidMount, and set initial state in the constructor. - -Please update the following components: %s`,V)}if(T.size>0){var te=jo(T);We(!1,`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state - -Please update the following components: %s`,te)}if(j.size>0){var le=jo(j);We(!1,`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. - -Please update the following components: %s`,le)}if(f.size>0){var Be=jo(f);qs(!1,`componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move code with side effects to componentDidMount, and set initial state in the constructor. -* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,Be)}if(E.size>0){var Ke=jo(E);qs(!1,`componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state -* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,Ke)}if(A.size>0){var pt=jo(A);qs(!1,`componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,pt)}};var zo=new Map,Ef=new Set;Rl.recordLegacyContextWarning=function(f,c){var E=id(f);if(E===null){We(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!Ef.has(f.type)){var T=zo.get(E);(f.type.contextTypes!=null||f.type.childContextTypes!=null||c!==null&&typeof c.getChildContext=="function")&&(T===void 0&&(T=[],zo.set(E,T)),T.push(f))}},Rl.flushLegacyContextWarning=function(){zo.forEach(function(f,c){var E=new Set;f.forEach(function(j){E.add(qt(j.type)||"Component"),Ef.add(j.type)});var T=jo(E),A=Cr(c);We(!1,`Legacy context API has been detected within a strict-mode tree. - -The old API will be supported in all 16.x releases, but applications using it should migrate to the new version. - -Please update the following components: %s - -Learn more about this warning here: https://fb.me/react-legacy-context%s`,T,A)})},Rl.discardPendingWarnings=function(){ja=[],za=[],Ha=[],ca=[],ws=[],Ss=[],zo=new Map}}var ul=null,Gu=null,qa=function(f){ul=f};function r0(f){{if(ul===null)return f;var c=ul(f);return c===void 0?f:c.current}}function j0(f){return r0(f)}function Df(f){{if(ul===null)return f;var c=ul(f);if(c===void 0){if(f!=null&&typeof f.render=="function"){var E=r0(f.render);if(f.render!==E){var T={$$typeof:Mn,render:E};return f.displayName!==void 0&&(T.displayName=f.displayName),T}}return f}return c.current}}function qc(f,c){{if(ul===null)return!1;var E=f.elementType,T=c.type,A=!1,j=typeof T=="object"&&T!==null?T.$$typeof:null;switch(f.tag){case O:{typeof T=="function"&&(A=!0);break}case L:{(typeof T=="function"||j===Er)&&(A=!0);break}case se:{(j===Mn||j===Er)&&(A=!0);break}case me:case ie:{(j===Vt||j===Er)&&(A=!0);break}default:return!1}if(A){var V=ul(E);if(V!==void 0&&V===ul(T))return!0}return!1}}function dc(f){{if(ul===null||typeof WeakSet!="function")return;Gu===null&&(Gu=new WeakSet),Gu.add(f)}}var Al=function(f,c){{if(ul===null)return;var E=c.staleFamilies,T=c.updatedFamilies;tf(),Ap(function(){da(f.current,T,E)})}},Ts=function(f,c){{if(f.context!==Rn)return;tf(),fv(function(){Yg(c,f,null,null)})}};function da(f,c,E){{var T=f.alternate,A=f.child,j=f.sibling,V=f.tag,te=f.type,le=null;switch(V){case L:case ie:case O:le=te;break;case se:le=te.render;break;default:break}if(ul===null)throw new Error("Expected resolveFamily to be set during hot reload.");var Be=!1,Ke=!1;if(le!==null){var pt=ul(le);pt!==void 0&&(E.has(pt)?Ke=!0:c.has(pt)&&(V===O?Ke=!0:Be=!0))}Gu!==null&&(Gu.has(f)||T!==null&&Gu.has(T))&&(Ke=!0),Ke&&(f._debugNeedsRemount=!0),(Ke||Be)&&ml(f,Un),A!==null&&!Ke&&da(A,c,E),j!==null&&da(j,c,E)}}var ud=function(f,c){{var E=new Set,T=new Set(c.map(function(A){return A.current}));return pa(f.current,T,E),E}};function pa(f,c,E){{var T=f.child,A=f.sibling,j=f.tag,V=f.type,te=null;switch(j){case L:case ie:case O:te=V;break;case se:te=V.render;break;default:break}var le=!1;te!==null&&c.has(te)&&(le=!0),le?pc(f,E):T!==null&&pa(T,c,E),A!==null&&pa(A,c,E)}}function pc(f,c){{var E=Wc(f,c);if(E)return;for(var T=f;;){switch(T.tag){case W:c.add(T.stateNode);return;case H:c.add(T.stateNode.containerInfo);return;case U:c.add(T.stateNode.containerInfo);return}if(T.return===null)throw new Error("Expected to reach root first.");T=T.return}}}function Wc(f,c){for(var E=f,T=!1;;){if(E.tag===W)T=!0,c.add(E.stateNode);else if(E.child!==null){E.child.return=E,E=E.child;continue}if(E===f)return T;for(;E.sibling===null;){if(E.return===null||E.return===f)return T;E=E.return}E.sibling.return=E.return,E=E.sibling}return!1}function qi(f,c){if(f&&f.defaultProps){var E=a({},c),T=f.defaultProps;for(var A in T)E[A]===void 0&&(E[A]=T[A]);return E}return c}function g(f){if(Jo(f),f._status!==Ro)throw f._result;return f._result}var y=Ju(null),R;R={};var F=null,b=null,J=null,ce=!1;function mt(){F=null,b=null,J=null,ce=!1}function xt(){ce=!0}function kt(){ce=!1}function xr(f,c){var E=f.type._context;ju?(Jr(y,E._currentValue,f),E._currentValue=c,E._currentRenderer===void 0||E._currentRenderer===null||E._currentRenderer===R||We(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),E._currentRenderer=R):(Jr(y,E._currentValue2,f),E._currentValue2=c,E._currentRenderer2===void 0||E._currentRenderer2===null||E._currentRenderer2===R||We(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),E._currentRenderer2=R)}function i0(f){var c=y.current;ti(y,f);var E=f.type._context;ju?E._currentValue=c:E._currentValue2=c}function cu(f,c,E){if(mo(E,c))return 0;var T=typeof f._calculateChangedBits=="function"?f._calculateChangedBits(E,c):Vr;return(T&Vr)!==T&&Xt(!1,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",T),T|0}function z0(f,c){for(var E=f;E!==null;){var T=E.alternate;if(E.childExpirationTime=c&&lp(),E.firstContext=null)}}function Ve(f,c){if(ce&&Xt(!1,"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),J!==f){if(!(c===!1||c===0)){var E;typeof c!="number"||c===Vr?(J=f,E=Vr):E=c;var T={context:f,observedBits:E,next:null};if(b===null){if(F===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");b=T,F.dependencies={expirationTime:at,firstContext:T,responders:null}}else b=b.next=T}}return ju?f._currentValue:f._currentValue2}var Ue=0,lt=1,$t=2,Wn=3,si=!1,ur,ci;ur=!1,ci=null;function Qi(f){var c={baseState:f,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return c}function Gr(f){var c={baseState:f.baseState,firstUpdate:f.firstUpdate,lastUpdate:f.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return c}function Cu(f,c){var E={expirationTime:f,suspenseConfig:c,tag:Ue,payload:null,callback:null,next:null,nextEffect:null};return E.priority=Qt(),E}function Wa(f,c){f.lastUpdate===null?f.firstUpdate=f.lastUpdate=c:(f.lastUpdate.next=c,f.lastUpdate=c)}function Va(f,c){var E=f.alternate,T,A;E===null?(T=f.updateQueue,A=null,T===null&&(T=f.updateQueue=Qi(f.memoizedState))):(T=f.updateQueue,A=E.updateQueue,T===null?A===null?(T=f.updateQueue=Qi(f.memoizedState),A=E.updateQueue=Qi(E.memoizedState)):T=f.updateQueue=Gr(A):A===null&&(A=E.updateQueue=Gr(T))),A===null||T===A?Wa(T,c):T.lastUpdate===null||A.lastUpdate===null?(Wa(T,c),Wa(A,c)):(Wa(T,c),A.lastUpdate=c),f.tag===O&&(ci===T||A!==null&&ci===A)&&!ur&&(We(!1,"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),ur=!0)}function od(f,c){var E=f.updateQueue;E===null?E=f.updateQueue=Qi(f.memoizedState):E=w2(f,E),E.lastCapturedUpdate===null?E.firstCapturedUpdate=E.lastCapturedUpdate=c:(E.lastCapturedUpdate.next=c,E.lastCapturedUpdate=c)}function w2(f,c){var E=f.alternate;return E!==null&&c===E.updateQueue&&(c=f.updateQueue=Gr(c)),c}function S2(f,c,E,T,A,j){switch(E.tag){case lt:{var V=E.payload;if(typeof V=="function"){xt(),Ri&&f.mode&mr&&V.call(j,T,A);var te=V.call(j,T,A);return kt(),te}return V}case Wn:f.effectTag=f.effectTag&~p0|Xr;case Ue:{var le=E.payload,Be;return typeof le=="function"?(xt(),Ri&&f.mode&mr&&le.call(j,T,A),Be=le.call(j,T,A),kt()):Be=le,Be==null?T:a({},T,Be)}case $t:return si=!0,T}return T}function wf(f,c,E,T,A){si=!1,c=w2(f,c),ci=c;for(var j=c.baseState,V=null,te=at,le=c.firstUpdate,Be=j;le!==null;){var Ke=le.expirationTime;if(Ke from render. Or maybe you meant to call this function rather than return it."))}function yh(f){function c(ot,Ot){if(!!f){var Ze=ot.lastEffect;Ze!==null?(Ze.nextEffect=Ot,ot.lastEffect=Ot):ot.firstEffect=ot.lastEffect=Ot,Ot.nextEffect=null,Ot.effectTag=G0}}function E(ot,Ot){if(!f)return null;for(var Ze=Ot;Ze!==null;)c(ot,Ze),Ze=Ze.sibling;return null}function T(ot,Ot){for(var Ze=new Map,Ut=Ot;Ut!==null;)Ut.key!==null?Ze.set(Ut.key,Ut):Ze.set(Ut.index,Ut),Ut=Ut.sibling;return Ze}function A(ot,Ot,Ze){var Ut=To(ot,Ot,Ze);return Ut.index=0,Ut.sibling=null,Ut}function j(ot,Ot,Ze){if(ot.index=Ze,!f)return Ot;var Ut=ot.alternate;if(Ut!==null){var Pn=Ut.index;return PnKr?(xu=hr,hr=null):xu=hr.sibling;var w0=Nt(ot,hr,Ze[Kr],Ut);if(w0===null){hr===null&&(hr=xu);break}f&&hr&&w0.alternate===null&&c(ot,hr),pu=j(w0,pu,Kr),Ku===null?pi=w0:Ku.sibling=w0,Ku=w0,hr=xu}if(Kr===Ze.length)return E(ot,hr),pi;if(hr===null){for(;KrW0?(Ms=xu,xu=null):Ms=xu.sibling;var yl=Nt(ot,xu,Xu.value,Ut);if(yl===null){xu===null&&(xu=Ms);break}f&&xu&&yl.alternate===null&&c(ot,xu),w0=j(yl,w0,W0),Kr===null?pu=yl:Kr.sibling=yl,Kr=yl,xu=Ms}if(Xu.done)return E(ot,xu),pu;if(xu===null){for(;!Xu.done;W0++,Xu=hr.next()){var rf=pt(ot,Xu.value,Ut);rf!==null&&(w0=j(rf,w0,W0),Kr===null?pu=rf:Kr.sibling=rf,Kr=rf)}return pu}for(var Wo=T(ot,xu);!Xu.done;W0++,Xu=hr.next()){var ks=Gt(Wo,ot,W0,Xu.value,Ut);ks!==null&&(f&&ks.alternate!==null&&Wo.delete(ks.key===null?W0:ks.key),w0=j(ks,w0,W0),Kr===null?pu=ks:Kr.sibling=ks,Kr=ks)}return f&&Wo.forEach(function(Zd){return c(ot,Zd)}),pu}function oi(ot,Ot,Ze,Ut){if(Ot!==null&&Ot.tag===ne){E(ot,Ot.sibling);var Pn=A(Ot,Ze,Ut);return Pn.return=ot,Pn}E(ot,Ot);var vn=dy(Ze,ot.mode,Ut);return vn.return=ot,vn}function Oi(ot,Ot,Ze,Ut){for(var Pn=Ze.key,vn=Ot;vn!==null;){if(vn.key===Pn)if(vn.tag===m?Ze.type===oe:vn.elementType===Ze.type||qc(vn,Ze)){E(ot,vn.sibling);var Wi=A(vn,Ze.type===oe?Ze.props.children:Ze.props,Ut);return Wi.ref=vc(ot,vn,Ze),Wi.return=ot,Wi._debugSource=Ze._source,Wi._debugOwner=Ze._owner,Wi}else{E(ot,vn);break}else c(ot,vn);vn=vn.sibling}if(Ze.type===oe){var pi=nf(Ze.props.children,ot.mode,Ut,Ze.key);return pi.return=ot,pi}else{var Ku=cy(Ze,ot.mode,Ut);return Ku.ref=vc(ot,Ot,Ze),Ku.return=ot,Ku}}function L0(ot,Ot,Ze,Ut){for(var Pn=Ze.key,vn=Ot;vn!==null;){if(vn.key===Pn)if(vn.tag===H&&vn.stateNode.containerInfo===Ze.containerInfo&&vn.stateNode.implementation===Ze.implementation){E(ot,vn.sibling);var Wi=A(vn,Ze.children||[],Ut);return Wi.return=ot,Wi}else{E(ot,vn);break}else c(ot,vn);vn=vn.sibling}var pi=py(Ze,ot.mode,Ut);return pi.return=ot,pi}function $i(ot,Ot,Ze,Ut){var Pn=typeof Ze=="object"&&Ze!==null&&Ze.type===oe&&Ze.key===null;Pn&&(Ze=Ze.props.children);var vn=typeof Ze=="object"&&Ze!==null;if(vn)switch(Ze.$$typeof){case fe:return V(Oi(ot,Ot,Ze,Ut));case xe:return V(L0(ot,Ot,Ze,Ut))}if(typeof Ze=="string"||typeof Ze=="number")return V(oi(ot,Ot,""+Ze,Ut));if(Jc(Ze))return yn(ot,Ot,Ze,Ut);if(fr(Ze))return kr(ot,Ot,Ze,Ut);if(vn&&mc(ot,Ze),typeof Ze=="function"&&pd(),typeof Ze=="undefined"&&!Pn)switch(ot.tag){case O:{var Wi=ot.stateNode;if(Wi.render._isMockFunction)break}case L:{var pi=ot.type;throw Error((pi.displayName||pi.name||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}}return E(ot,Ot)}return $i}var Tf=yh(!0),Zc=yh(!1);function gh(f,c){if(!(f===null||c.child===f.child))throw Error("Resuming work not yet implemented.");if(c.child!==null){var E=c.child,T=To(E,E.pendingProps,E.expirationTime);for(c.child=T,T.return=c;E.sibling!==null;)E=E.sibling,T=T.sibling=To(E,E.pendingProps,E.expirationTime),T.return=c;T.sibling=null}}function nm(f,c){for(var E=f.child;E!==null;)Av(E,c),E=E.sibling}var Vs={},ma=Ju(Vs),iu=Ju(Vs),M0=Ju(Vs);function o0(f){if(f===Vs)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return f}function ns(){var f=o0(M0.current);return f}function Ya(f,c){Jr(M0,c,f),Jr(iu,f,f),Jr(ma,Vs,f);var E=wt(c);ti(ma,f),Jr(ma,E,f)}function io(f){ti(ma,f),ti(iu,f),ti(M0,f)}function al(){var f=o0(ma.current);return f}function yc(f){var c=o0(M0.current),E=o0(ma.current),T=bt(E,f.type,c);E!==T&&(Jr(iu,f,f),Jr(ma,T,f))}function k2(f){iu.current===f&&(ti(ma,f),ti(iu,f))}var _h=0,Cf=1,xf=1,$c=2,kl=Ju(_h);function e1(f,c){return(f&c)!=0}function ya(f){return f&Cf}function hd(f,c){return f&Cf|c}function vd(f,c){return f|c}function Fr(f,c){Jr(kl,c,f)}function ga(f){ti(kl,f)}function N2(f,c){var E=f.memoizedState;if(E!==null)return E.dehydrated!==null;var T=f.memoizedProps;return T.fallback===void 0?!1:T.unstable_avoidThisFallback!==!0?!0:!c}function t1(f){for(var c=f;c!==null;){if(c.tag===pe){var E=c.memoizedState;if(E!==null){var T=E.dehydrated;if(T===null||Bs(T)||y0(T))return c}}else if(c.tag===yt&&c.memoizedProps.revealOrder!==void 0){var A=(c.effectTag&Xr)!==xi;if(A)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===f)return null;for(;c.sibling===null;){if(c.return===null||c.return===f)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var md={},wi=Array.isArray;function L2(f,c,E,T){return{fiber:T,props:c,responder:f,rootEventTypes:null,state:E}}function rm(f,c,E,T,A){var j=md,V=f.getInitialState;V!==null&&(j=V(c));var te=L2(f,c,j,E);if(!A)for(var le=E;le!==null;){var Be=le.tag;if(Be===W){A=le.stateNode;break}else if(Be===U){A=le.stateNode.containerInfo;break}le=le.return}Le(f,te,c,j,A),T.set(f,te)}function yd(f,c,E,T,A){var j,V;if(f&&(j=f.responder,V=f.props),!(j&&j.$$typeof===jt))throw Error("An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder().");var te=V;if(E.has(j)){Xt(!1,'Duplicate event responder "%s" found in event listeners. Event listeners passed to elements cannot use the same event responder more than once.',j.displayName);return}E.add(j);var le=T.get(j);le===void 0?rm(j,te,c,T,A):(le.props=te,le.fiber=c)}function hn(f,c,E){var T=new Set,A=c.dependencies;if(f!=null){A===null&&(A=c.dependencies={expirationTime:at,firstContext:null,responders:new Map});var j=A.responders;if(j===null&&(j=new Map),wi(f))for(var V=0,te=f.length;V0){var j=A.dispatch;if(Cs!==null){var V=Cs.get(A);if(V!==void 0){Cs.delete(A);var te=T.memoizedState,le=V;do{var Be=le.action;te=f(te,Be),le=le.next}while(le!==null);return mo(te,T.memoizedState)||lp(),T.memoizedState=te,T.baseUpdate===A.last&&(T.baseState=te),A.lastRenderedState=te,[te,j]}}return[T.memoizedState,j]}var Ke=A.last,pt=T.baseUpdate,Nt=T.baseState,Gt;if(pt!==null?(Ke!==null&&(Ke.next=null),Gt=pt.next):Gt=Ke!==null?Ke.next:null,Gt!==null){var zt=Nt,yn=null,kr=null,oi=pt,Oi=Gt,L0=!1;do{var $i=Oi.expirationTime;if($iIu&&(Iu=$i,Xd(Iu));else if(vv($i,Oi.suspenseConfig),Oi.eagerReducer===f)zt=Oi.eagerState;else{var ot=Oi.action;zt=f(zt,ot)}oi=Oi,Oi=Oi.next}while(Oi!==null&&Oi!==Gt);L0||(kr=oi,yn=zt),mo(zt,T.memoizedState)||lp(),T.memoizedState=zt,T.baseUpdate=kr,T.baseState=yn,A.lastRenderedState=zt}var Ot=A.dispatch;return[T.memoizedState,Ot]}function Ff(f){var c=Dc();typeof f=="function"&&(f=f()),c.memoizedState=c.baseState=f;var E=c.queue={last:null,dispatch:null,lastRenderedReducer:F2,lastRenderedState:f},T=E.dispatch=s1.bind(null,cl,E);return[c.memoizedState,T]}function u1(f){return i1(F2,f)}function Qa(f,c,E,T){var A={tag:f,create:c,destroy:E,deps:T,next:null};if(rs===null)rs=Xa(),rs.lastEffect=A.next=A;else{var j=rs.lastEffect;if(j===null)rs.lastEffect=A.next=A;else{var V=j.next;j.next=A,A.next=V,rs.lastEffect=A}}return A}function o1(f){var c=Dc(),E={current:f};return Object.seal(E),c.memoizedState=E,E}function P2(f){var c=r1();return c.memoizedState}function Dd(f,c,E,T){var A=Dc(),j=T===void 0?null:T;Mf|=f,A.memoizedState=Qa(c,E,void 0,j)}function wc(f,c,E,T){var A=r1(),j=T===void 0?null:T,V=void 0;if(jn!==null){var te=jn.memoizedState;if(V=te.destroy,j!==null){var le=te.deps;if(Nf(j,le)){Qa(Af,E,V,j);return}}}Mf|=f,A.memoizedState=Qa(c,E,V,j)}function l1(f,c){return typeof jest!="undefined"&&Rv(cl),Dd(Dr|F0,sr|n1,f,c)}function Ll(f,c){return typeof jest!="undefined"&&Rv(cl),wc(Dr|F0,sr|n1,f,c)}function Ea(f,c){return Dd(Dr,Of|fl,f,c)}function wh(f,c){return wc(Dr,Of|fl,f,c)}function I2(f,c){if(typeof c=="function"){var E=c,T=f();return E(T),function(){E(null)}}else if(c!=null){var A=c;A.hasOwnProperty("current")||Xt(!1,"Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(A).join(", ")+"}");var j=f();return A.current=j,function(){A.current=null}}}function b2(f,c,E){typeof c!="function"&&Xt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",c!==null?typeof c:"null");var T=E!=null?E.concat([f]):null;return Dd(Dr,Of|fl,I2.bind(null,c,f),T)}function Sh(f,c,E){typeof c!="function"&&Xt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",c!==null?typeof c:"null");var T=E!=null?E.concat([f]):null;return wc(Dr,Of|fl,I2.bind(null,c,f),T)}function wd(f,c){}var Th=wd;function Fl(f,c){var E=Dc(),T=c===void 0?null:c;return E.memoizedState=[f,T],f}function us(f,c){var E=r1(),T=c===void 0?null:c,A=E.memoizedState;if(A!==null&&T!==null){var j=A[1];if(Nf(T,j))return A[0]}return E.memoizedState=[f,T],f}function xs(f,c){var E=Dc(),T=c===void 0?null:c,A=f();return E.memoizedState=[A,T],A}function Gs(f,c){var E=r1(),T=c===void 0?null:c,A=E.memoizedState;if(A!==null&&T!==null){var j=A[1];if(Nf(T,j))return A[0]}var V=f();return E.memoizedState=[V,T],V}function B2(f,c){var E=Ff(f),T=E[0],A=E[1];return l1(function(){t.unstable_next(function(){var j=Ho.suspense;Ho.suspense=c===void 0?null:c;try{A(f)}finally{Ho.suspense=j}})},[f,c]),T}function Ch(f,c){var E=u1(f),T=E[0],A=E[1];return Ll(function(){t.unstable_next(function(){var j=Ho.suspense;Ho.suspense=c===void 0?null:c;try{A(f)}finally{Ho.suspense=j}})},[f,c]),T}function U2(f){var c=Ff(!1),E=c[0],T=c[1],A=Fl(function(j){T(!0),t.unstable_next(function(){var V=Ho.suspense;Ho.suspense=f===void 0?null:f;try{T(!1),j()}finally{Ho.suspense=V}})},[f,E]);return[A,E]}function j2(f){var c=u1(!1),E=c[0],T=c[1],A=us(function(j){T(!0),t.unstable_next(function(){var V=Ho.suspense;Ho.suspense=f===void 0?null:f;try{T(!1),j()}finally{Ho.suspense=V}})},[f,E]);return[A,E]}function s1(f,c,E){if(!(Ec=0){var E=f1()-c1;f.actualDuration+=E,c&&(f.selfBaseDuration=E),c1=-1}}var Il=null,Za=null,Da=!1;function W2(){Da&&Xt(!1,"We should not be hydrating here. This is a bug in React. Please file a bug.")}function V2(f){if(!we)return!1;var c=f.stateNode.containerInfo;return Za=B(c),Il=f,Da=!0,!0}function lm(f,c){return we?(Za=ji(c),K2(f),Da=!0,!0):!1}function G2(f,c){switch(f.tag){case U:ue(f.stateNode.containerInfo,c);break;case W:He(f.type,f.memoizedProps,f.stateNode,c);break}var E=I4();E.stateNode=c,E.return=f,E.effectTag=G0,f.lastEffect!==null?(f.lastEffect.nextEffect=E,f.lastEffect=E):f.firstEffect=f.lastEffect=E}function kh(f,c){switch(c.effectTag=c.effectTag&~su|mi,f.tag){case U:{var E=f.stateNode.containerInfo;switch(c.tag){case W:var T=c.type,A=c.pendingProps;nt(E,T,A);break;case ne:var j=c.pendingProps;Ct(E,j);break;case pe:Mt(E);break}break}case W:{var V=f.type,te=f.memoizedProps,le=f.stateNode;switch(c.tag){case W:var Be=c.type,Ke=c.pendingProps;It(V,te,le,Be,Ke);break;case ne:var pt=c.pendingProps;sn(V,te,le,pt);break;case pe:rn(V,te,le);break}break}default:return}}function Nh(f,c){switch(f.tag){case W:{var E=f.type,T=f.pendingProps,A=pf(c,E,T);return A!==null?(f.stateNode=A,!0):!1}case ne:{var j=f.pendingProps,V=bs(c,j);return V!==null?(f.stateNode=V,!0):!1}case pe:{if(Ai){var te=ba(c);if(te!==null){var le={dehydrated:te,retryTime:Di};f.memoizedState=le;var Be=b4(te);return Be.return=f,f.child=Be,!0}}return!1}default:return!1}}function Y2(f){if(!!Da){var c=Za;if(!c){kh(Il,f),Da=!1,Il=f;return}var E=c;if(!Nh(f,c)){if(c=ji(E),!c||!Nh(f,c)){kh(Il,f),Da=!1,Il=f;return}G2(Il,E)}Il=f,Za=B(c)}}function sm(f,c,E){if(!we)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var T=f.stateNode,A=z(T,f.type,f.memoizedProps,c,E,f);return f.updateQueue=A,A!==null}function am(f){if(!we)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=f.stateNode,E=f.memoizedProps,T=G(c,E,f);if(T){var A=Il;if(A!==null)switch(A.tag){case U:{var j=A.stateNode.containerInfo;Qe(j,c,E);break}case W:{var V=A.type,te=A.memoizedProps,le=A.stateNode;ht(V,te,le,c,E);break}}}return T}function Lh(f){if(!we)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=f.memoizedState,E=c!==null?c.dehydrated:null;if(!E)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");$(E,f)}function fm(f){if(!we)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=f.memoizedState,E=c!==null?c.dehydrated:null;if(!E)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return Te(E)}function K2(f){for(var c=f.return;c!==null&&c.tag!==W&&c.tag!==U&&c.tag!==pe;)c=c.return;Il=c}function p1(f){if(!we||f!==Il)return!1;if(!Da)return K2(f),Da=!0,!1;var c=f.type;if(f.tag!==W||c!=="head"&&c!=="body"&&!Ni(c,f.memoizedProps))for(var E=Za;E;)G2(f,E),E=ji(E);return K2(f),f.tag===pe?Za=fm(f):Za=Il?ji(f.stateNode):null,!0}function h1(){!we||(Il=null,Za=null,Da=!1)}var v1=rt.ReactCurrentOwner,wa=!1,X2,Ys,Ks,Xs,Q2,Sa,m1,Sd,Sc,J2;X2={},Ys={},Ks={},Xs={},Q2={},Sa=!1,m1=!1,Sd={},Sc={},J2={};function Do(f,c,E,T){f===null?c.child=Zc(c,null,E,T):c.child=Tf(c,f.child,E,T)}function Fh(f,c,E,T){c.child=Tf(c,f.child,null,T),c.child=Tf(c,null,E,T)}function Ph(f,c,E,T,A){if(c.type!==c.elementType){var j=E.propTypes;j&&_(j,T,"prop",qt(E),Lr)}var V=E.render,te=c.ref,le;return u0(c,A),v1.current=c,$e("render"),le=Lf(f,c,V,T,te,A),Ri&&c.mode&mr&&c.memoizedState!==null&&(le=Lf(f,c,V,T,te,A)),$e(null),f!==null&&!wa?(gd(f,c,A),Ta(f,c,A)):(c.effectTag|=lu,Do(f,c,le,A),c.child)}function Ih(f,c,E,T,A,j){if(f===null){var V=E.type;if(a0(V)&&E.compare===null&&E.defaultProps===void 0){var te=V;return te=r0(V),c.tag=ie,c.type=te,ep(c,V),bh(f,c,te,T,A,j)}{var le=V.propTypes;le&&_(le,T,"prop",qt(V),Lr)}var Be=fy(E.type,null,T,null,c.mode,j);return Be.ref=c.ref,Be.return=c,c.child=Be,Be}{var Ke=E.type,pt=Ke.propTypes;pt&&_(pt,T,"prop",qt(Ke),Lr)}var Nt=f.child;if(A component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",le,le),X2[le]=!0)}c.mode&mr&&Rl.recordLegacyContextWarning(c,null),v1.current=c,te=Lf(null,c,E,A,j,T)}if(c.effectTag|=lu,typeof te=="object"&&te!==null&&typeof te.render=="function"&&te.$$typeof===void 0){{var Be=qt(E)||"Unknown";Ys[Be]||(We(!1,"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",Be,Be,Be),Ys[Be]=!0)}c.tag=O,_d();var Ke=!1;Xi(E)?(Ke=!0,Hi(c)):Ke=!1,c.memoizedState=te.state!==null&&te.state!==void 0?te.state:null;var pt=E.getDerivedStateFromProps;return typeof pt=="function"&&Sf(c,E,pt,A),sl(c,te),hc(c,E,A,T),$2(null,c,E,!0,Ke,T)}else return c.tag=L,ai&&E.contextTypes&&We(!1,"%s uses the legacy contextTypes API which is no longer supported. Use React.createContext() with React.useContext() instead.",qt(E)||"Unknown"),Ri&&c.mode&mr&&c.memoizedState!==null&&(te=Lf(null,c,E,A,j,T)),Do(null,c,te,T),ep(c,E),c.child}function ep(f,c){if(c&&c.childContextTypes&&We(!1,"%s(...): childContextTypes cannot be defined on a function component.",c.displayName||c.name||"Component"),f.ref!==null){var E="",T=g0();T&&(E+=` - -Check the render method of \``+T+"`.");var A=T||f._debugID||"",j=f._debugSource;j&&(A=j.fileName+":"+j.lineNumber),Q2[A]||(Q2[A]=!0,Xt(!1,"Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",E))}if(Xl&&c.defaultProps!==void 0){var V=qt(c)||"Unknown";J2[V]||(We(!1,"%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",V),J2[V]=!0)}if(typeof c.getDerivedStateFromProps=="function"){var te=qt(c)||"Unknown";Xs[te]||(We(!1,"%s: Function components do not support getDerivedStateFromProps.",te),Xs[te]=!0)}if(typeof c.contextType=="object"&&c.contextType!==null){var le=qt(c)||"Unknown";Ks[le]||(We(!1,"%s: Function components do not support contextType.",le),Ks[le]=!0)}}var Cd={dehydrated:null,retryTime:at};function tp(f,c,E){return e1(f,$c)&&(c===null||c.memoizedState!==null)}function Hh(f,c,E){var T=c.mode,A=c.pendingProps;Xg(c)&&(c.effectTag|=Xr);var j=kl.current,V=!1,te=(c.effectTag&Xr)!==xi;if(te||tp(j,f,c)?(V=!0,c.effectTag&=~Xr):(f===null||f.memoizedState!==null)&&A.fallback!==void 0&&A.unstable_avoidThisFallback!==!0&&(j=vd(j,xf)),j=ya(j),Fr(c,j),"maxDuration"in A&&(m1||(m1=!0,Xt(!1,"maxDuration has been removed from React. Remove the maxDuration prop."))),f===null){if(A.fallback!==void 0&&(Y2(c),Ai)){var le=c.memoizedState;if(le!==null){var Be=le.dehydrated;if(Be!==null)return qh(c,Be,E)}}if(V){var Ke=A.fallback,pt=nf(null,T,at,null);if(pt.return=c,(c.mode&Y)===Ar){var Nt=c.memoizedState,Gt=Nt!==null?c.child.child:c.child;pt.child=Gt;for(var zt=Gt;zt!==null;)zt.return=pt,zt=zt.sibling}var yn=nf(Ke,T,E,null);return yn.return=c,pt.sibling=yn,c.memoizedState=Cd,c.child=pt,yn}else{var kr=A.children;return c.memoizedState=null,c.child=Zc(c,null,kr,E)}}else{var oi=f.memoizedState;if(oi!==null){if(Ai){var Oi=oi.dehydrated;if(Oi!==null)if(te){if(c.memoizedState!==null)return c.child=f.child,c.effectTag|=Xr,null;var L0=A.fallback,$i=nf(null,T,at,null);if($i.return=c,$i.child=null,(c.mode&Y)===Ar)for(var ot=$i.child=c.child;ot!==null;)ot.return=$i,ot=ot.sibling;else Tf(c,f.child,null,E);if(en&&c.mode&ii){for(var Ot=0,Ze=$i.child;Ze!==null;)Ot+=Ze.treeBaseDuration,Ze=Ze.sibling;$i.treeBaseDuration=Ot}var Ut=nf(L0,T,E,null);return Ut.return=c,$i.sibling=Ut,Ut.effectTag|=mi,$i.childExpirationTime=at,c.memoizedState=Cd,c.child=$i,Ut}else return Wh(f,c,Oi,oi,E)}var Pn=f.child,vn=Pn.sibling;if(V){var Wi=A.fallback,pi=To(Pn,Pn.pendingProps,at);if(pi.return=c,(c.mode&Y)===Ar){var Ku=c.memoizedState,hr=Ku!==null?c.child.child:c.child;if(hr!==Pn.child){pi.child=hr;for(var pu=hr;pu!==null;)pu.return=pi,pu=pu.sibling}}if(en&&c.mode&ii){for(var Kr=0,xu=pi.child;xu!==null;)Kr+=xu.treeBaseDuration,xu=xu.sibling;pi.treeBaseDuration=Kr}var w0=To(vn,Wi,vn.expirationTime);return w0.return=c,pi.sibling=w0,pi.childExpirationTime=at,c.memoizedState=Cd,c.child=pi,w0}else{var W0=A.children,Ms=Pn.child,Xu=Tf(c,Ms,W0,E);return c.memoizedState=null,c.child=Xu}}else{var yl=f.child;if(V){var rf=A.fallback,Wo=nf(null,T,at,null);if(Wo.return=c,Wo.child=yl,yl!==null&&(yl.return=Wo),(c.mode&Y)===Ar){var ks=c.memoizedState,Zd=ks!==null?c.child.child:c.child;Wo.child=Zd;for(var Vf=Zd;Vf!==null;)Vf.return=Wo,Vf=Vf.sibling}if(en&&c.mode&ii){for(var Lc=0,zl=Wo.child;zl!==null;)Lc+=zl.treeBaseDuration,zl=zl.sibling;Wo.treeBaseDuration=Lc}var Vo=nf(rf,T,E,null);return Vo.return=c,Wo.sibling=Vo,Vo.effectTag|=mi,Wo.childExpirationTime=at,c.memoizedState=Cd,c.child=Wo,Vo}else{c.memoizedState=null;var N1=A.children;return c.child=Tf(c,yl,N1,E)}}}}function np(f,c,E){c.memoizedState=null;var T=c.pendingProps,A=T.children;return Do(f,c,A,E),c.child}function qh(f,c,E){if((f.mode&Y)===Ar)Xt(!1,"Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOM.createBlockingRoot(container, { hydrate: true }).render(element) or remove the Suspense components from the server rendered components."),f.expirationTime=Un;else if(y0(c)){var T=Ul(),A=Ds(T);bn&&x(A),f.expirationTime=A}else f.expirationTime=Di,bn&&x(Di);return null}function Wh(f,c,E,T,A){if(W2(),(c.mode&Y)===Ar||y0(E))return np(f,c,A);var j=f.childExpirationTime>=A;if(wa||j){if(A. Use lowercase "%s" instead.',f,f.toLowerCase());break}case"forward":case"backward":{Xt(!1,'"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.',f,f.toLowerCase());break}default:Xt(!1,'"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?',f);break}else Xt(!1,'%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?',f)}function Vh(f,c){f!==void 0&&!Sc[f]&&(f!=="collapsed"&&f!=="hidden"?(Sc[f]=!0,Xt(!1,'"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?',f)):c!=="forwards"&&c!=="backwards"&&(Sc[f]=!0,Xt(!1,' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',f)))}function g1(f,c){{var E=Array.isArray(f),T=!E&&typeof fr(f)=="function";if(E||T){var A=E?"array":"iterable";return Xt(!1,"A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ",A,c,A),!1}}return!0}function gm(f,c){if((c==="forwards"||c==="backwards")&&f!==void 0&&f!==null&&f!==!1)if(Array.isArray(f)){for(var E=0;E. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',c)}}function ip(f,c,E,T,A,j){var V=f.memoizedState;V===null?f.memoizedState={isBackwards:c,rendering:null,last:T,tail:E,tailExpiration:0,tailMode:A,lastEffect:j}:(V.isBackwards=c,V.rendering=null,V.last=T,V.tail=E,V.tailExpiration=0,V.tailMode=A,V.lastEffect=j)}function up(f,c,E){var T=c.pendingProps,A=T.revealOrder,j=T.tail,V=T.children;ym(A),Vh(j,A),gm(V,A),Do(f,c,V,E);var te=kl.current,le=e1(te,$c);if(le)te=hd(te,$c),c.effectTag|=Xr;else{var Be=f!==null&&(f.effectTag&Xr)!==xi;Be&&vm(c,c.child,E),te=ya(te)}if(Fr(c,te),(c.mode&Y)===Ar)c.memoizedState=null;else switch(A){case"forwards":{var Ke=mm(c.child),pt;Ke===null?(pt=c.child,c.child=null):(pt=Ke.sibling,Ke.sibling=null),ip(c,!1,pt,Ke,j,c.lastEffect);break}case"backwards":{var Nt=null,Gt=c.child;for(c.child=null;Gt!==null;){var zt=Gt.alternate;if(zt!==null&&t1(zt)===null){c.child=Gt;break}var yn=Gt.sibling;Gt.sibling=Nt,Nt=Gt,Gt=yn}ip(c,!0,Nt,null,j,c.lastEffect);break}case"together":{ip(c,!1,null,null,void 0,c.lastEffect);break}default:c.memoizedState=null}return c.child}function _m(f,c,E){Ya(c,c.stateNode.containerInfo);var T=c.pendingProps;return f===null?c.child=Tf(c,null,T,E):Do(f,c,T,E),c.child}function Em(f,c,E){var T=c.type,A=T._context,j=c.pendingProps,V=c.memoizedProps,te=j.value;{var le=c.type.propTypes;le&&_(le,j,"prop","Context.Provider",Lr)}if(xr(c,te),V!==null){var Be=V.value,Ke=cu(A,te,Be);if(Ke===0){if(V.children===j.children&&!sa())return Ta(f,c,E)}else Ol(c,A,Ke,E)}var pt=j.children;return Do(f,c,pt,E),c.child}var Gh=!1;function Dm(f,c,E){var T=c.type;T._context===void 0?T!==T.Consumer&&(Gh||(Gh=!0,Xt(!1,"Rendering directly is not supported and will be removed in a future major release. Did you mean to render instead?"))):T=T._context;var A=c.pendingProps,j=A.children;typeof j!="function"&&We(!1,"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),u0(c,E);var V=Ve(T,A.unstable_observedBits),te;return v1.current=c,$e("render"),te=j(V),$e(null),c.effectTag|=lu,Do(f,c,te,E),c.child}function wm(f,c,E){var T=c.type.impl;if(T.reconcileChildren===!1)return null;var A=c.pendingProps,j=A.children;return Do(f,c,j,E),c.child}function op(f,c,E){var T=c.pendingProps,A=T.children;return Do(f,c,A,E),c.child}function lp(){wa=!0}function Ta(f,c,E){tu(c),f!==null&&(c.dependencies=f.dependencies),en&&Mh(c);var T=c.expirationTime;T!==at&&Xd(T);var A=c.childExpirationTime;return A=E;le&&(c.effectTag|=Dr)}break;case pe:{var Be=c.memoizedState;if(Be!==null){if(Ai&&Be.dehydrated!==null){Fr(c,ya(kl.current)),c.effectTag|=Xr;break}var Ke=c.child,pt=Ke.childExpirationTime;if(pt!==at&&pt>=E)return Hh(f,c,E);Fr(c,ya(kl.current));var Nt=Ta(f,c,E);return Nt!==null?Nt.sibling:null}else Fr(c,ya(kl.current));break}case yt:{var Gt=(f.effectTag&Xr)!==xi,zt=c.childExpirationTime>=E;if(Gt){if(zt)return up(f,c,E);c.effectTag|=Xr}var yn=c.memoizedState;if(yn!==null&&(yn.rendering=null,yn.tail=null),Fr(c,kl.current),zt)break;return null}}return Ta(f,c,E)}else wa=!1}else wa=!1;switch(c.expirationTime=at,c.tag){case C:return hm(f,c,c.type,E);case Oe:{var kr=c.elementType;return If(f,c,kr,T,E)}case L:{var oi=c.type,Oi=c.pendingProps,L0=c.elementType===oi?Oi:qi(oi,Oi);return Z2(f,c,oi,L0,E)}case O:{var $i=c.type,ot=c.pendingProps,Ot=c.elementType===$i?ot:qi($i,ot);return jh(f,c,$i,Ot,E)}case U:return dm(f,c,E);case W:return pm(f,c,E);case ne:return Pf(f,c);case pe:return Hh(f,c,E);case H:return _m(f,c,E);case se:{var Ze=c.type,Ut=c.pendingProps,Pn=c.elementType===Ze?Ut:qi(Ze,Ut);return Ph(f,c,Ze,Pn,E)}case m:return cm(f,c,E);case he:return Bh(f,c,E);case De:return Uh(f,c,E);case ve:return Em(f,c,E);case Ee:return Dm(f,c,E);case me:{var vn=c.type,Wi=c.pendingProps,pi=qi(vn,Wi);if(c.type!==c.elementType){var Ku=vn.propTypes;Ku&&_(Ku,pi,"prop",qt(vn),Lr)}return pi=qi(vn.type,pi),Ih(f,c,vn,pi,T,E)}case ie:return bh(f,c,c.type,c.pendingProps,T,E);case je:{var hr=c.type,pu=c.pendingProps,Kr=c.elementType===hr?pu:qi(hr,pu);return Td(f,c,hr,Kr,E)}case yt:return up(f,c,E);case gt:{if(Wt)return wm(f,c,E);break}case Xe:{if(Au)return op(f,c,E);break}}throw Error("Unknown unit of work tag ("+c.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Yh(f,c,E,T){return{currentFiber:f,impl:E,instance:null,prevProps:null,props:c,state:T}}function xd(f){return f.tag===pe&&f.memoizedState!==null}function E1(f){return f.child.sibling.child}var Kh={};function ap(f,c,E){if(Au){if(f.tag===W){var T=f.type,A=f.memoizedProps,j=f.stateNode,V=No(j);V!==null&&c(T,A||Kh,V)===!0&&E.push(V)}var te=f.child;xd(f)&&(te=E1(f)),te!==null&&fp(te,c,E)}}function Xh(f,c){if(Au){if(f.tag===W){var E=f.type,T=f.memoizedProps,A=f.stateNode,j=No(A);if(j!==null&&c(E,T,j)===!0)return j}var V=f.child;if(xd(f)&&(V=E1(f)),V!==null)return Qh(V,c)}return null}function fp(f,c,E){for(var T=f;T!==null;)ap(T,c,E),T=T.sibling}function Qh(f,c){for(var E=f;E!==null;){var T=Xh(E,c);if(T!==null)return T;E=E.sibling}return null}function Jh(f,c,E){if(Rd(f,c))E.push(f.stateNode.methods);else{var T=f.child;xd(f)&&(T=E1(f)),T!==null&&cp(T,c,E)}}function cp(f,c,E){for(var T=f;T!==null;)Jh(T,c,E),T=T.sibling}function Rd(f,c){return f.tag===Xe&&f.type===c&&f.stateNode!==null}function Ad(f,c){return{getChildren:function(){var E=c.fiber,T=E.child,A=[];return T!==null&&cp(T,f,A),A.length===0?null:A},getChildrenFromRoot:function(){for(var E=c.fiber,T=E;T!==null;){var A=T.return;if(A===null||(T=A,T.tag===Xe&&T.type===f))break}var j=[];return cp(T.child,f,j),j.length===0?null:j},getParent:function(){for(var E=c.fiber.return;E!==null;){if(E.tag===Xe&&E.type===f)return E.stateNode.methods;E=E.return}return null},getProps:function(){var E=c.fiber;return E.memoizedProps},queryAllNodes:function(E){var T=c.fiber,A=T.child,j=[];return A!==null&&fp(A,E,j),j.length===0?null:j},queryFirstNode:function(E){var T=c.fiber,A=T.child;return A!==null?Qh(A,E):null},containsNode:function(E){for(var T=cr(E);T!==null;){if(T.tag===Xe&&T.type===f&&T.stateNode===c)return!0;T=T.return}return!1}}}function H0(f){f.effectTag|=Dr}function Od(f){f.effectTag|=Ao}var Ca,$a,Md,kd;if(b0)Ca=function(f,c,E,T){for(var A=c.child;A!==null;){if(A.tag===W||A.tag===ne)Qr(f,A.stateNode);else if(Wt&&A.tag===gt)Qr(f,A.stateNode.instance);else if(A.tag!==H){if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A===c)return;for(;A.sibling===null;){if(A.return===null||A.return===c)return;A=A.return}A.sibling.return=A.return,A=A.sibling}},$a=function(f){},Md=function(f,c,E,T,A){var j=f.memoizedProps;if(j!==T){var V=c.stateNode,te=al(),le=h0(V,E,j,T,A,te);c.updateQueue=le,le&&H0(c)}},kd=function(f,c,E,T){E!==T&&H0(c)};else if(X){Ca=function(f,c,E,T){for(var A=c.child;A!==null;){e:if(A.tag===W){var j=A.stateNode;if(E&&T){var V=A.memoizedProps,te=A.type;j=$r(j,te,V,A)}Qr(f,j)}else if(A.tag===ne){var le=A.stateNode;if(E&&T){var Be=A.memoizedProps;le=Zl(le,Be,A)}Qr(f,le)}else if(Wt&&A.tag===gt){var Ke=A.stateNode.instance;if(E&&T){var pt=A.memoizedProps,Nt=A.type;Ke=$r(Ke,Nt,pt,A)}Qr(f,Ke)}else if(A.tag!==H){if(A.tag===pe){if((A.effectTag&Dr)!==xi){var Gt=A.memoizedState!==null;if(Gt){var zt=A.child;if(zt!==null){zt.child!==null&&(zt.child.return=zt,Ca(f,zt,!0,Gt));var yn=zt.sibling;if(yn!==null){yn.return=A,A=yn;continue}}}}if(A.child!==null){A.child.return=A,A=A.child;continue}}else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A=A,A===c)return;for(;A.sibling===null;){if(A.return===null||A.return===c)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};var dp=function(f,c,E,T){for(var A=c.child;A!==null;){e:if(A.tag===W){var j=A.stateNode;if(E&&T){var V=A.memoizedProps,te=A.type;j=$r(j,te,V,A)}Qn(f,j)}else if(A.tag===ne){var le=A.stateNode;if(E&&T){var Be=A.memoizedProps;le=Zl(le,Be,A)}Qn(f,le)}else if(Wt&&A.tag===gt){var Ke=A.stateNode.instance;if(E&&T){var pt=A.memoizedProps,Nt=A.type;Ke=$r(Ke,Nt,pt,A)}Qn(f,Ke)}else if(A.tag!==H){if(A.tag===pe){if((A.effectTag&Dr)!==xi){var Gt=A.memoizedState!==null;if(Gt){var zt=A.child;if(zt!==null){zt.child!==null&&(zt.child.return=zt,dp(f,zt,!0,Gt));var yn=zt.sibling;if(yn!==null){yn.return=A,A=yn;continue}}}}if(A.child!==null){A.child.return=A,A=A.child;continue}}else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A=A,A===c)return;for(;A.sibling===null;){if(A.return===null||A.return===c)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};$a=function(f){var c=f.stateNode,E=f.firstEffect===null;if(!E){var T=c.containerInfo,A=S0(T);dp(A,f,!1,!1),c.pendingChildren=A,H0(f),ac(T,A)}},Md=function(f,c,E,T,A){var j=f.stateNode,V=f.memoizedProps,te=c.firstEffect===null;if(te&&V===T){c.stateNode=j;return}var le=c.stateNode,Be=al(),Ke=null;if(V!==T&&(Ke=h0(le,E,V,T,A,Be)),te&&Ke===null){c.stateNode=j;return}var pt=ms(j,Ke,E,V,T,c,te,le);Ou(pt,E,T,A,Be)&&H0(c),c.stateNode=pt,te?H0(c):Ca(pt,c,!1,!1)},kd=function(f,c,E,T){if(E!==T){var A=ns(),j=al();c.stateNode=hs(T,A,j,c),H0(c)}}}else $a=function(f){},Md=function(f,c,E,T,A){},kd=function(f,c,E,T){};function Nd(f,c){switch(f.tailMode){case"hidden":{for(var E=f.tail,T=null;E!==null;)E.alternate!==null&&(T=E),E=E.sibling;T===null?f.tail=null:T.sibling=null;break}case"collapsed":{for(var A=f.tail,j=null;A!==null;)A.alternate!==null&&(j=A),A=A.sibling;j===null?!c&&f.tail!==null?f.tail.sibling=null:f.tail=null:j.sibling=null;break}}}function Zh(f,c,E){var T=c.pendingProps;switch(c.tag){case C:break;case Oe:break;case ie:case L:break;case O:{var A=c.type;Xi(A)&&Hs(c);break}case U:{io(c),R0(c);var j=c.stateNode;if(j.pendingContext&&(j.context=j.pendingContext,j.pendingContext=null),f===null||f.child===null){var V=p1(c);V&&H0(c)}$a(c);break}case W:{k2(c);var te=ns(),le=c.type;if(f!==null&&c.stateNode!=null){if(Md(f,c,le,T,te),gi){var Be=f.memoizedProps.listeners,Ke=T.listeners;Be!==Ke&&H0(c)}f.ref!==c.ref&&Od(c)}else{if(!T){if(c.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");break}var pt=al(),Nt=p1(c);if(Nt){if(sm(c,te,pt)&&H0(c),gi){var Gt=T.listeners;Gt!=null&&hn(Gt,c,te)}}else{var zt=Ki(le,T,te,pt,c);if(Ca(zt,c,!1,!1),c.stateNode=zt,gi){var yn=T.listeners;yn!=null&&hn(yn,c,te)}Ou(zt,le,T,te,pt)&&H0(c)}c.ref!==null&&Od(c)}break}case ne:{var kr=T;if(f&&c.stateNode!=null){var oi=f.memoizedProps;kd(f,c,oi,kr)}else{if(typeof kr!="string"&&c.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var Oi=ns(),L0=al(),$i=p1(c);$i?am(c)&&H0(c):c.stateNode=hs(kr,Oi,L0,c)}break}case se:break;case pe:{ga(c);var ot=c.memoizedState;if(Ai&&ot!==null&&ot.dehydrated!==null)if(f===null){var Ot=p1(c);if(!Ot)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");return Lh(c),bn&&x(Di),null}else return h1(),(c.effectTag&Xr)===xi&&(c.memoizedState=null),c.effectTag|=Dr,null;if((c.effectTag&Xr)!==xi)return c.expirationTime=E,c;var Ze=ot!==null,Ut=!1;if(f===null)c.memoizedProps.fallback!==void 0&&p1(c);else{var Pn=f.memoizedState;if(Ut=Pn!==null,!Ze&&Pn!==null){var vn=f.child.sibling;if(vn!==null){var Wi=c.firstEffect;Wi!==null?(c.firstEffect=vn,vn.nextEffect=Wi):(c.firstEffect=c.lastEffect=vn,vn.nextEffect=null),vn.effectTag=G0}}}if(Ze&&!Ut&&(c.mode&Y)!==Ar){var pi=f===null&&c.memoizedProps.unstable_avoidThisFallback!==!0;pi||e1(kl.current,xf)?mv():yv()}X&&Ze&&(c.effectTag|=Dr),b0&&(Ze||Ut)&&(c.effectTag|=Dr),Yi&&c.updateQueue!==null&&c.memoizedProps.suspenseCallback!=null&&(c.effectTag|=Dr);break}case m:break;case he:break;case De:break;case H:io(c),$a(c);break;case ve:i0(c);break;case Ee:break;case me:break;case je:{var Ku=c.type;Xi(Ku)&&Hs(c);break}case yt:{ga(c);var hr=c.memoizedState;if(hr===null)break;var pu=(c.effectTag&Xr)!==xi,Kr=hr.rendering;if(Kr===null)if(pu)Nd(hr,!1);else{var xu=gv()&&(f===null||(f.effectTag&Xr)===xi);if(!xu)for(var w0=c.child;w0!==null;){var W0=t1(w0);if(W0!==null){pu=!0,c.effectTag|=Xr,Nd(hr,!1);var Ms=W0.updateQueue;return Ms!==null&&(c.updateQueue=Ms,c.effectTag|=Dr),hr.lastEffect===null&&(c.firstEffect=null),c.lastEffect=hr.lastEffect,nm(c,E),Fr(c,hd(kl.current,$c)),c.child}w0=w0.sibling}}else{if(!pu){var Xu=t1(Kr);if(Xu!==null){c.effectTag|=Xr,pu=!0;var yl=Xu.updateQueue;if(yl!==null&&(c.updateQueue=yl,c.effectTag|=Dr),Nd(hr,!0),hr.tail===null&&hr.tailMode==="hidden"&&!Kr.alternate){var rf=c.lastEffect=hr.lastEffect;return rf!==null&&(rf.nextEffect=null),null}}else if(vt()>hr.tailExpiration&&E>Di){c.effectTag|=Xr,pu=!0,Nd(hr,!1);var Wo=E-1;c.expirationTime=c.childExpirationTime=Wo,bn&&x(Wo)}}if(hr.isBackwards)Kr.sibling=c.child,c.child=Kr;else{var ks=hr.last;ks!==null?ks.sibling=Kr:c.child=Kr,hr.last=Kr}}if(hr.tail!==null){if(hr.tailExpiration===0){var Zd=500;hr.tailExpiration=vt()+Zd}var Vf=hr.tail;hr.rendering=Vf,hr.tail=Vf.sibling,hr.lastEffect=c.lastEffect,Vf.sibling=null;var Lc=kl.current;return pu?Lc=hd(Lc,$c):Lc=ya(Lc),Fr(c,Lc),Vf}break}case gt:{if(Wt){var zl=c.type.impl,Vo=c.stateNode;if(Vo===null){var N1=zl.getInitialState,n_;N1!==void 0&&(n_=N1(T)),Vo=c.stateNode=Yh(c,T,zl,n_||{});var r_=dt(Vo);if(Vo.instance=r_,zl.reconcileChildren===!1)return null;Ca(r_,c,!1,!1),Yn(Vo)}else{var $4=Vo.props;if(Vo.prevProps=$4,Vo.props=T,Vo.currentFiber=c,X){var i_=oa(Vo);Vo.instance=i_,Ca(i_,c,!1,!1)}var eE=Cn(Vo);eE&&H0(c)}}break}case Xe:{if(Au)if(f===null){var tE=c.type,Ey={fiber:c,methods:null};if(c.stateNode=Ey,Ey.methods=Ad(tE,Ey),gi){var u_=T.listeners;if(u_!=null){var nE=ns();hn(u_,c,nE)}}c.ref!==null&&(Od(c),H0(c))}else{if(gi){var rE=f.memoizedProps.listeners,iE=T.listeners;(rE!==iE||c.ref!==null)&&H0(c)}else c.ref!==null&&H0(c);f.ref!==c.ref&&Od(c)}break}default:throw Error("Unknown unit of work tag ("+c.tag+"). This error is likely caused by a bug in React. Please file an issue.")}return null}function Sm(f,c){switch(f.tag){case O:{var E=f.type;Xi(E)&&Hs(f);var T=f.effectTag;return T&p0?(f.effectTag=T&~p0|Xr,f):null}case U:{io(f),R0(f);var A=f.effectTag;if((A&Xr)!==xi)throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return f.effectTag=A&~p0|Xr,f}case W:return k2(f),null;case pe:{if(ga(f),Ai){var j=f.memoizedState;if(j!==null&&j.dehydrated!==null){if(f.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");h1()}}var V=f.effectTag;return V&p0?(f.effectTag=V&~p0|Xr,f):null}case yt:return ga(f),null;case H:return io(f),null;case ve:return i0(f),null;default:return null}}function $h(f){switch(f.tag){case O:{var c=f.type.childContextTypes;c!=null&&Hs(f);break}case U:{io(f),R0(f);break}case W:{k2(f);break}case H:io(f);break;case pe:ga(f);break;case yt:ga(f);break;case ve:i0(f);break;default:break}}function pp(f,c){return{value:f,source:c,stack:Cr(c)}}var hp=function(f,c,E,T,A,j,V,te,le){var Be=Array.prototype.slice.call(arguments,3);try{c.apply(E,Be)}catch(Ke){this.onError(Ke)}};if(typeof window!="undefined"&&typeof window.dispatchEvent=="function"&&typeof document!="undefined"&&typeof document.createEvent=="function"){var vp=document.createElement("react"),Tm=function(f,c,E,T,A,j,V,te,le){if(typeof document=="undefined")throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var Be=document.createEvent("Event"),Ke=!0,pt=window.event,Nt=Object.getOwnPropertyDescriptor(window,"event"),Gt=Array.prototype.slice.call(arguments,3);function zt(){vp.removeEventListener(L0,zt,!1),typeof window.event!="undefined"&&window.hasOwnProperty("event")&&(window.event=pt),c.apply(E,Gt),Ke=!1}var yn,kr=!1,oi=!1;function Oi($i){if(yn=$i.error,kr=!0,yn===null&&$i.colno===0&&$i.lineno===0&&(oi=!0),$i.defaultPrevented&&yn!=null&&typeof yn=="object")try{yn._suppressLogging=!0}catch(ot){}}var L0="react-"+(f||"invokeguardedcallback");window.addEventListener("error",Oi),vp.addEventListener(L0,zt,!1),Be.initEvent(L0,!1,!1),vp.dispatchEvent(Be),Nt&&Object.defineProperty(window,"event",Nt),Ke&&(kr?oi&&(yn=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")):yn=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(yn)),window.removeEventListener("error",Oi)};hp=Tm}var Cm=hp,wo=!1,Ld=null,xm={onError:function(f){wo=!0,Ld=f}};function dl(f,c,E,T,A,j,V,te,le){wo=!1,Ld=null,Cm.apply(xm,arguments)}function tr(){return wo}function Qs(){if(wo){var f=Ld;return wo=!1,Ld=null,f}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function pl(f){return!0}function l0(f){var c=pl(f);if(c!==!1){var E=f.error;{var T=f.componentName,A=f.componentStack,j=f.errorBoundaryName,V=f.errorBoundaryFound,te=f.willRetry;if(E!=null&&E._suppressLogging){if(V&&te)return;console.error(E)}var le=T?"The above error occurred in the <"+T+"> component:":"The above error occurred in one of your React components:",Be;V&&j?te?Be="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+j+"."):Be="This error was initially handled by the error boundary "+j+`. -Recreating the tree from scratch failed so React will unmount the tree.`:Be=`Consider adding an error boundary to your tree to customize error handling behavior. -Visit https://fb.me/react-error-boundaries to learn more about error boundaries.`;var Ke=""+le+A+` - -`+(""+Be);console.error(Ke)}}}var ev=null;ev=new Set;var Js=typeof WeakSet=="function"?WeakSet:Set;function mp(f,c){var E=c.source,T=c.stack;T===null&&E!==null&&(T=Cr(E));var A={componentName:E!==null?qt(E.type):null,componentStack:T!==null?T:"",error:c.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:!1,willRetry:!1};f!==null&&f.tag===O&&(A.errorBoundary=f.stateNode,A.errorBoundaryName=qt(f.type),A.errorBoundaryFound=!0,A.willRetry=!0);try{l0(A)}catch(j){setTimeout(function(){throw j})}}var Rm=function(f,c){Bi(f,"componentWillUnmount"),c.props=f.memoizedProps,c.state=f.memoizedState,c.componentWillUnmount(),Ci()};function tv(f,c){if(dl(null,Rm,null,f,c),tr()){var E=Qs();Hf(f,E)}}function yp(f){var c=f.ref;if(c!==null)if(typeof c=="function"){if(dl(null,c,null,null),tr()){var E=Qs();Hf(f,E)}}else c.current=null}function Am(f,c){if(dl(null,c,null),tr()){var E=Qs();Hf(f,E)}}function gp(f,c){switch(c.tag){case L:case se:case ie:{Tc(im,Af,c);return}case O:{if(c.effectTag&Oo&&f!==null){var E=f.memoizedProps,T=f.memoizedState;Bi(c,"getSnapshotBeforeUpdate");var A=c.stateNode;c.type===c.elementType&&!Sa&&(A.props!==c.memoizedProps&&Xt(!1,"Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(c.type)||"instance"),A.state!==c.memoizedState&&Xt(!1,"Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(c.type)||"instance"));var j=A.getSnapshotBeforeUpdate(c.elementType===c.type?E:qi(c.type,E),T);{var V=ev;j===void 0&&!V.has(c.type)&&(V.add(c.type),We(!1,"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",qt(c.type)))}A.__reactInternalSnapshotBeforeUpdate=j,Ci()}return}case U:case W:case ne:case H:case je:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Tc(f,c,E){var T=E.updateQueue,A=T!==null?T.lastEffect:null;if(A!==null){var j=A.next,V=j;do{if((V.tag&f)!==Af){var te=V.destroy;V.destroy=void 0,te!==void 0&&te()}if((V.tag&c)!==Af){var le=V.create;V.destroy=le();{var Be=V.destroy;if(Be!==void 0&&typeof Be!="function"){var Ke=void 0;Be===null?Ke=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof Be.then=="function"?Ke=` - -It looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately: - -useEffect(() => { - async function fetchData() { - // You can await here - const response = await MyAPI.getData(someId); - // ... - } - fetchData(); -}, [someId]); // Or [] if effect doesn't need props or state - -Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching`:Ke=" You returned: "+Be,We(!1,"An effect function must not return anything besides a function, which is used for clean-up.%s%s",Ke,Cr(E))}}}V=V.next}while(V!==j)}}function xa(f){if((f.effectTag&F0)!==xi)switch(f.tag){case L:case se:case ie:{Tc(sr,Af,f),Tc(Af,n1,f);break}default:break}}function _p(f,c,E,T){switch(E.tag){case L:case se:case ie:{Tc(um,fl,E);break}case O:{var A=E.stateNode;if(E.effectTag&Dr)if(c===null)Bi(E,"componentDidMount"),E.type===E.elementType&&!Sa&&(A.props!==E.memoizedProps&&Xt(!1,"Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance"),A.state!==E.memoizedState&&Xt(!1,"Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance")),A.componentDidMount(),Ci();else{var j=E.elementType===E.type?c.memoizedProps:qi(E.type,c.memoizedProps),V=c.memoizedState;Bi(E,"componentDidUpdate"),E.type===E.elementType&&!Sa&&(A.props!==E.memoizedProps&&Xt(!1,"Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance"),A.state!==E.memoizedState&&Xt(!1,"Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance")),A.componentDidUpdate(j,V,A.__reactInternalSnapshotBeforeUpdate),Ci()}var te=E.updateQueue;te!==null&&(E.type===E.elementType&&!Sa&&(A.props!==E.memoizedProps&&Xt(!1,"Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance"),A.state!==E.memoizedState&&Xt(!1,"Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance")),yo(E,te,A,T));return}case U:{var le=E.updateQueue;if(le!==null){var Be=null;if(E.child!==null)switch(E.child.tag){case W:Be=No(E.child.stateNode);break;case O:Be=E.child.stateNode;break}yo(E,le,Be,T)}return}case W:{var Ke=E.stateNode;if(c===null&&E.effectTag&Dr){var pt=E.type,Nt=E.memoizedProps;Hu(Ke,pt,Nt,E)}return}case ne:return;case H:return;case De:{if(en){var Gt=E.memoizedProps.onRender;typeof Gt=="function"&&(bn?Gt(E.memoizedProps.id,c===null?"mount":"update",E.actualDuration,E.treeBaseDuration,E.actualStartTime,Pl(),f.memoizedInteractions):Gt(E.memoizedProps.id,c===null?"mount":"update",E.actualDuration,E.treeBaseDuration,E.actualStartTime,Pl()))}return}case pe:{bl(f,E);return}case yt:case je:case gt:case Xe:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Fd(f,c){if(b0)for(var E=f;;){if(E.tag===W){var T=E.stateNode;c?Pa(T):ia(E.stateNode,E.memoizedProps)}else if(E.tag===ne){var A=E.stateNode;c?m0(A):Q0(A,E.memoizedProps)}else if(E.tag===pe&&E.memoizedState!==null&&E.memoizedState.dehydrated===null){var j=E.child.sibling;j.return=E,E=j;continue}else if(E.child!==null){E.child.return=E,E=E.child;continue}if(E===f)return;for(;E.sibling===null;){if(E.return===null||E.return===f)return;E=E.return}E.sibling.return=E.return,E=E.sibling}}function bu(f){var c=f.ref;if(c!==null){var E=f.stateNode,T;switch(f.tag){case W:T=No(E);break;default:T=E}Au&&f.tag===Xe&&(T=E.methods),typeof c=="function"?c(T):(c.hasOwnProperty("current")||We(!1,"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().%s",qt(f.type),Cr(f)),c.current=T)}}function Yu(f){var c=f.ref;c!==null&&(typeof c=="function"?c(null):c.current=null)}function Ep(f,c,E){switch(kn(c),c.tag){case L:case se:case me:case ie:{var T=c.updateQueue;if(T!==null){var A=T.lastEffect;if(A!==null){var j=A.next,V=E>Kn?Kn:E;Sn(V,function(){var oi=j;do{var Oi=oi.destroy;Oi!==void 0&&Am(c,Oi),oi=oi.next}while(oi!==j)})}}break}case O:{yp(c);var te=c.stateNode;typeof te.componentWillUnmount=="function"&&tv(c,te);return}case W:{if(gi){var le=c.dependencies;if(le!==null){var Be=le.responders;if(Be!==null){for(var Ke=Array.from(Be.values()),pt=0,Nt=Ke.length;pt component higher in the tree to provide a loading indicator or placeholder to display.`+Cr(E))}Mp(),T=pp(T,E);var Nt=c;do{switch(Nt.tag){case U:{var Gt=T;Nt.effectTag|=p0,Nt.expirationTime=A;var zt=uv(Nt,Gt,A);od(Nt,zt);return}case O:var yn=T,kr=Nt.type,oi=Nt.stateNode;if((Nt.effectTag&Xr)===xi&&(typeof kr.getDerivedStateFromError=="function"||oi!==null&&typeof oi.componentDidCatch=="function"&&!Pp(oi))){Nt.effectTag|=p0,Nt.expirationTime=A;var Oi=ov(Nt,yn,A);od(Nt,Oi);return}break;default:break}Nt=Nt.return}while(Nt!==null)}var Aa=Math.ceil,Mr=rt.ReactCurrentDispatcher,wp=rt.ReactCurrentOwner,hl=rt.IsSomeRendererActing,gu=0,S1=1,Ui=2,Sp=4,bd=8,So=16,As=32,bf=0,Bd=1,Tp=2,T1=3,C1=4,Cp=5,nr=gu,vl=null,Gn=null,q0=at,k0=bf,Ud=null,Bl=Un,x1=Un,xc=null,Rc=at,jd=!1,xp=0,N0=500,dn=null,zd=!1,Hd=null,Ac=null,Oc=!1,Mc=null,R1=E0,Rp=at,ef=null,Pm=50,kc=0,qd=null,sv=50,A1=0,Bf=null,Uf=null,O1=at;function Ul(){return(nr&(So|As))!==gu?n0(vt()):(O1!==at||(O1=n0(vt())),O1)}function Nc(){return n0(vt())}function jf(f,c,E){var T=c.mode;if((T&Y)===Ar)return Un;var A=Qt();if((T&ri)===Ar)return A===Li?Un:t0;if((nr&So)!==gu)return q0;var j;if(E!==null)j=fa(f,E.timeoutMs|0||_f);else switch(A){case Li:j=Un;break;case ni:j=Ua(f);break;case Kn:case e0:j=Ds(f);break;case _0:j=ru;break;default:throw Error("Expected a valid priority level")}return vl!==null&&j===q0&&(j-=1),j}function Im(f,c){ty(),uy(f);var E=Wd(f,c);if(E===null){ry(f);return}zp(f,c),la();var T=Qt();if(c===Un?(nr&bd)!==gu&&(nr&(So|As))===gu?(q(E,c),M1(E)):(qo(E),q(E,c),nr===gu&&Bt()):(qo(E),q(E,c)),(nr&Sp)!==gu&&(T===ni||T===Li))if(ef===null)ef=new Map([[E,c]]);else{var A=ef.get(E);(A===void 0||A>c)&&ef.set(E,c)}}var ml=Im;function Wd(f,c){f.expirationTimeA?T:A}function qo(f){var c=f.lastExpiredTime;if(c!==at){f.callbackExpirationTime=Un,f.callbackPriority=Li,f.callbackNode=Tn(M1.bind(null,f));return}var E=Vd(f),T=f.callbackNode;if(E===at){T!==null&&(f.callbackNode=null,f.callbackExpirationTime=at,f.callbackPriority=E0);return}var A=Ul(),j=nd(A,E);if(T!==null){var V=f.callbackPriority,te=f.callbackExpirationTime;if(te===E&&V>=j)return;ir(T)}f.callbackExpirationTime=E,f.callbackPriority=j;var le;E===Un?le=Tn(M1.bind(null,f)):so?le=_n(j,Gd.bind(null,f)):le=_n(j,Gd.bind(null,f),{timeout:Uo(E)-vt()}),f.callbackNode=le}function Gd(f,c){if(O1=at,c){var E=Ul();return Wp(f,E),qo(f),null}var T=Vd(f);if(T!==at){var A=f.callbackNode;if((nr&(So|As))!==gu)throw Error("Should not already be working.");if(tf(),(f!==vl||T!==q0)&&(zf(f,T),ee(f,T)),Gn!==null){var j=nr;nr|=So;var V=pv(f),te=Yd(f);mf(Gn);do try{Ym();break}catch(Ke){dv(f,Ke)}while(!0);if(mt(),nr=j,hv(V),bn&&Kd(te),k0===Bd){var le=Ud;throw jp(),zf(f,T),Wf(f,T),qo(f),le}if(Gn!==null)jp();else{Tv();var Be=f.finishedWork=f.current.alternate;f.finishedExpirationTime=T,bm(f,Be,k0,T)}if(qo(f),f.callbackNode===A)return Gd.bind(null,f)}}return null}function bm(f,c,E,T){switch(vl=null,E){case bf:case Bd:throw Error("Root did not complete. This is a bug in React.");case Tp:{Wp(f,T>ru?ru:T);break}case T1:{Wf(f,T);var A=f.lastSuspendedTime;T===A&&(f.nextKnownPendingLevel=kp(c)),d();var j=Bl===Un;if(j&&!(X0&&qf.current)){var V=xp+N0-vt();if(V>10){if(jd){var te=f.lastPingedTime;if(te===at||te>=T){f.lastPingedTime=T,zf(f,T);break}}var le=Vd(f);if(le!==at&&le!==T)break;if(A!==at&&A!==T){f.lastPingedTime=A;break}f.timeoutHandle=Tt(s0.bind(null,f),V);break}}s0(f);break}case C1:{Wf(f,T);var Be=f.lastSuspendedTime;if(T===Be&&(f.nextKnownPendingLevel=kp(c)),d(),!(X0&&qf.current)){if(jd){var Ke=f.lastPingedTime;if(Ke===at||Ke>=T){f.lastPingedTime=T,zf(f,T);break}}var pt=Vd(f);if(pt!==at&&pt!==T)break;if(Be!==at&&Be!==T){f.lastPingedTime=Be;break}var Nt;if(x1!==Un)Nt=Uo(x1)-vt();else if(Bl===Un)Nt=0;else{var Gt=_v(Bl),zt=vt(),yn=Uo(T)-zt,kr=zt-Gt;kr<0&&(kr=0),Nt=Bp(kr)-kr,yn10){f.timeoutHandle=Tt(s0.bind(null,f),Nt);break}}s0(f);break}case Cp:{if(!(X0&&qf.current)&&Bl!==Un&&xc!==null){var oi=Up(Bl,T,xc);if(oi>10){Wf(f,T),f.timeoutHandle=Tt(s0.bind(null,f),oi);break}}s0(f);break}default:throw Error("Unknown root exit status.")}}function M1(f){var c=f.lastExpiredTime,E=c!==at?c:Un;if(f.finishedExpirationTime===E)s0(f);else{if((nr&(So|As))!==gu)throw Error("Should not already be working.");if(tf(),(f!==vl||E!==q0)&&(zf(f,E),ee(f,E)),Gn!==null){var T=nr;nr|=So;var A=pv(f),j=Yd(f);mf(Gn);do try{Ev();break}catch(te){dv(f,te)}while(!0);if(mt(),nr=T,hv(A),bn&&Kd(j),k0===Bd){var V=Ud;throw jp(),zf(f,E),Wf(f,E),qo(f),V}if(Gn!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");Tv(),f.finishedWork=f.current.alternate,f.finishedExpirationTime=E,Bm(f,k0,E),qo(f)}}return null}function Bm(f,c,E){vl=null,(c===T1||c===C1)&&d(),s0(f)}function Um(f,c){Wp(f,c),qo(f),(nr&(So|As))===gu&&Bt()}function av(){if((nr&(S1|So|As))!==gu){(nr&So)!==gu&&Xt(!1,"unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.");return}zm(),tf()}function jm(f){return Sn(Kn,f)}function fv(f,c,E,T){return Sn(Li,f.bind(null,c,E,T))}function zm(){if(ef!==null){var f=ef;ef=null,f.forEach(function(c,E){Wp(E,c),qo(E)}),Bt()}}function Hm(f,c){var E=nr;nr|=S1;try{return f(c)}finally{nr=E,nr===gu&&Bt()}}function qm(f,c){var E=nr;nr|=Ui;try{return f(c)}finally{nr=E,nr===gu&&Bt()}}function cv(f,c,E,T){var A=nr;nr|=Sp;try{return Sn(ni,f.bind(null,c,E,T))}finally{nr=A,nr===gu&&Bt()}}function Wm(f,c){var E=nr;nr&=~S1,nr|=bd;try{return f(c)}finally{nr=E,nr===gu&&Bt()}}function Ap(f,c){if((nr&(So|As))!==gu)throw Error("flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.");var E=nr;nr|=S1;try{return Sn(Li,f.bind(null,c))}finally{nr=E,Bt()}}function Vm(f){var c=nr;nr|=S1;try{Sn(Li,f)}finally{nr=c,nr===gu&&Bt()}}function zf(f,c){f.finishedWork=null,f.finishedExpirationTime=at;var E=f.timeoutHandle;if(E!==tl&&(f.timeoutHandle=tl,fo(E)),Gn!==null)for(var T=Gn.return;T!==null;)$h(T),T=T.return;vl=f,Gn=To(f.current,null,c),q0=c,k0=bf,Ud=null,Bl=Un,x1=Un,xc=null,Rc=at,jd=!1,bn&&(Uf=null),Rl.discardPendingWarnings(),Zs=null}function dv(f,c){do{try{if(mt(),_d(),it(),Gn===null||Gn.return===null)return k0=Bd,Ud=c,null;en&&Gn.mode&ii&&d1(Gn,!0),lv(f,Gn.return,Gn,c,q0),Gn=Dv(Gn)}catch(E){c=E;continue}return}while(!0)}function pv(f){var c=Mr.current;return Mr.current=a1,c===null?a1:c}function hv(f){Mr.current=f}function Yd(f){if(bn){var c=k.__interactionsRef.current;return k.__interactionsRef.current=f.memoizedInteractions,c}return null}function Kd(f){bn&&(k.__interactionsRef.current=f)}function Op(){xp=vt()}function vv(f,c){fru&&(Bl=f),c!==null&&fru&&(x1=f,xc=c)}function Xd(f){f>Rc&&(Rc=f)}function mv(){k0===bf&&(k0=T1)}function yv(){(k0===bf||k0===T1)&&(k0=C1),Rc!==at&&vl!==null&&(Wf(vl,q0),Gg(vl,Rc))}function Mp(){k0!==Cp&&(k0=Tp)}function gv(){return k0===bf}function _v(f){var c=Uo(f);return c-_f}function Gm(f,c){var E=Uo(f);return E-(c.timeoutMs|0||_f)}function Ev(){for(;Gn!==null;)Gn=Qd(Gn)}function Ym(){for(;Gn!==null&&!Fn();)Gn=Qd(Gn)}function Qd(f){var c=f.alternate;$l(f),Dt(f);var E;return en&&(f.mode&ii)!==Ar?(q2(f),E=k1(c,f,q0),d1(f,!0)):E=k1(c,f,q0),it(),f.memoizedProps=f.pendingProps,E===null&&(E=Dv(f)),wp.current=null,E}function Dv(f){Gn=f;do{var c=Gn.alternate,E=Gn.return;if((Gn.effectTag&P0)===xi){Dt(Gn);var T=void 0;if(!en||(Gn.mode&ii)===Ar?T=Zh(c,Gn,q0):(q2(Gn),T=Zh(c,Gn,q0),d1(Gn,!1)),ei(Gn),it(),Km(Gn),T!==null)return T;if(E!==null&&(E.effectTag&P0)===xi){E.firstEffect===null&&(E.firstEffect=Gn.firstEffect),Gn.lastEffect!==null&&(E.lastEffect!==null&&(E.lastEffect.nextEffect=Gn.firstEffect),E.lastEffect=Gn.lastEffect);var A=Gn.effectTag;A>lu&&(E.lastEffect!==null?E.lastEffect.nextEffect=Gn:E.firstEffect=Gn,E.lastEffect=Gn)}}else{var j=Sm(Gn,q0);if(en&&(Gn.mode&ii)!==Ar){d1(Gn,!1);for(var V=Gn.actualDuration,te=Gn.child;te!==null;)V+=te.actualDuration,te=te.sibling;Gn.actualDuration=V}if(j!==null)return po(Gn),j.effectTag&=Kl,j;ei(Gn),E!==null&&(E.firstEffect=E.lastEffect=null,E.effectTag|=P0)}var le=Gn.sibling;if(le!==null)return le;Gn=E}while(Gn!==null);return k0===bf&&(k0=Cp),null}function kp(f){var c=f.expirationTime,E=f.childExpirationTime;return c>E?c:E}function Km(f){if(!(q0!==Di&&f.childExpirationTime===Di)){var c=at;if(en&&(f.mode&ii)!==Ar){for(var E=f.actualDuration,T=f.selfBaseDuration,A=f.alternate===null||f.child!==f.alternate.child,j=f.child;j!==null;){var V=j.expirationTime,te=j.childExpirationTime;V>c&&(c=V),te>c&&(c=te),A&&(E+=j.actualDuration),T+=j.treeBaseDuration,j=j.sibling}f.actualDuration=E,f.treeBaseDuration=T}else for(var le=f.child;le!==null;){var Be=le.expirationTime,Ke=le.childExpirationTime;Be>c&&(c=Be),Ke>c&&(c=Ke),le=le.sibling}f.childExpirationTime=c}}function s0(f){var c=Qt();return Sn(Li,Np.bind(null,f,c)),null}function Np(f,c){do tf();while(Mc!==null);if(ny(),(nr&(So|As))!==gu)throw Error("Should not already be working.");var E=f.finishedWork,T=f.finishedExpirationTime;if(E===null)return null;if(f.finishedWork=null,f.finishedExpirationTime=at,E===f.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");f.callbackNode=null,f.callbackExpirationTime=at,f.callbackPriority=E0,f.nextKnownPendingLevel=at,$0();var A=kp(E);j4(f,T,A),f===vl&&(vl=null,Gn=null,q0=at);var j;if(E.effectTag>lu?E.lastEffect!==null?(E.lastEffect.nextEffect=E,j=E.firstEffect):j=E:j=E.firstEffect,j!==null){var V=nr;nr|=As;var te=Yd(f);wp.current=null,Ce(),Hn(f.containerInfo),dn=j;do if(dl(null,Xm,null),tr()){if(dn===null)throw Error("Should be working on an effect.");var le=Qs();Hf(dn,le),dn=dn.nextEffect}while(dn!==null);et(),en&&Oh(),Ye(),dn=j;do if(dl(null,Qm,null,f,c),tr()){if(dn===null)throw Error("Should be working on an effect.");var Be=Qs();Hf(dn,Be),dn=dn.nextEffect}while(dn!==null);Yt(),qr(f.containerInfo),f.current=E,Kt(),dn=j;do if(dl(null,Lp,null,f,T),tr()){if(dn===null)throw Error("Should be working on an effect.");var Ke=Qs();Hf(dn,Ke),dn=dn.nextEffect}while(dn!==null);pr(),dn=null,ae(),bn&&Kd(te),nr=V}else f.current=E,Ce(),et(),en&&Oh(),Ye(),Yt(),Kt(),pr();eo();var pt=Oc;if(Oc)Oc=!1,Mc=f,Rp=T,R1=c;else for(dn=j;dn!==null;){var Nt=dn.nextEffect;dn.nextEffect=null,dn=Nt}var Gt=f.firstPendingTime;if(Gt!==at){if(bn){if(Uf!==null){var zt=Uf;Uf=null;for(var yn=0;ynKn?Kn:R1;return R1=E0,Sn(f,Fp)}}function Fp(){if(Mc===null)return!1;var f=Mc,c=Rp;if(Mc=null,Rp=at,(nr&(So|As))!==gu)throw Error("Cannot flush passive effects while already rendering.");var E=nr;nr|=As;for(var T=Yd(f),A=f.current.firstEffect;A!==null;){{if(Dt(A),dl(null,xa,null,A),tr()){if(A===null)throw Error("Should be working on an effect.");var j=Qs();Hf(A,j)}it()}var V=A.nextEffect;A.nextEffect=null,A=V}return bn&&(Kd(T),de(f,c)),nr=E,Bt(),A1=Mc===null?0:A1+1,!0}function Pp(f){return Ac!==null&&Ac.has(f)}function Ip(f){Ac===null?Ac=new Set([f]):Ac.add(f)}function Jm(f){zd||(zd=!0,Hd=f)}var Zm=Jm;function wv(f,c,E){var T=pp(E,c),A=uv(f,T,Un);Va(f,A);var j=Wd(f,Un);j!==null&&(qo(j),q(j,Un))}function Hf(f,c){if(f.tag===U){wv(f,f,c);return}for(var E=f.return;E!==null;){if(E.tag===U){wv(E,f,c);return}else if(E.tag===O){var T=E.type,A=E.stateNode;if(typeof T.getDerivedStateFromError=="function"||typeof A.componentDidCatch=="function"&&!Pp(A)){var j=pp(c,f),V=ov(E,j,Un);Va(E,V);var te=Wd(E,Un);te!==null&&(qo(te),q(te,Un));return}}E=E.return}}function bp(f,c,E){var T=f.pingCache;if(T!==null&&T.delete(c),vl===f&&q0===E){k0===C1||k0===T1&&Bl===Un&&vt()-xpPm)throw kc=0,qd=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");A1>sv&&(A1=0,Xt(!1,"Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function ny(){Rl.flushLegacyContextWarning(),yi&&Rl.flushPendingUnsafeLifecycleWarnings()}function Tv(){var f=!0;yf(Bf,f),Bf=null}function jp(){var f=!1;yf(Bf,f),Bf=null}function zp(f,c){Hr&&vl!==null&&c>q0&&(Bf=f)}var Jd=null;function ry(f){{var c=f.tag;if(c!==U&&c!==O&&c!==L&&c!==se&&c!==me&&c!==ie)return;var E=qt(f.type)||"ReactComponent";if(Jd!==null){if(Jd.has(E))return;Jd.add(E)}else Jd=new Set([E]);We(!1,"Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.%s",c===O?"the componentWillUnmount method":"a useEffect cleanup function",Cr(f))}}var k1;if(K0){var iy=null;k1=function(f,c,E){var T=Wg(iy,c);try{return sp(f,c,E)}catch(j){if(j!==null&&typeof j=="object"&&typeof j.then=="function")throw j;if(mt(),_d(),$h(c),Wg(c,T),en&&c.mode&ii&&q2(c),dl(null,sp,null,f,c,E),tr()){var A=Qs();throw A}else throw j}}}else k1=sp;var Cv=!1,xv=!1;function uy(f){if(f.tag===O)switch(Nr){case"getChildContext":if(xv)return;We(!1,"setState(...): Cannot call setState() inside getChildContext()"),xv=!0;break;case"render":if(Cv)return;We(!1,"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Cv=!0;break}}var qf={current:!1};function Hp(f){vs===!0&&hl.current===!0&&qf.current!==!0&&We(!1,`It looks like you're using the wrong act() around your test interactions. -Be sure to use the matching version of act() corresponding to your renderer: - -// for react-dom: -import {act} from 'react-dom/test-utils'; -// ... -act(() => ...); - -// for react-test-renderer: -import TestRenderer from 'react-test-renderer'; -const {act} = TestRenderer; -// ... -act(() => ...);%s`,Cr(f))}function Rv(f){vs===!0&&(f.mode&mr)!==Ar&&hl.current===!1&&qf.current===!1&&We(!1,`An update to %s ran an effect, but was not wrapped in act(...). - -When testing, code that causes React state updates should be wrapped into act(...): - -act(() => { - /* fire events that update state */ -}); -/* assert on the output */ - -This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(f.type),Cr(f))}function oy(f){vs===!0&&nr===gu&&hl.current===!1&&qf.current===!1&&We(!1,`An update to %s inside a test was not wrapped in act(...). - -When testing, code that causes React state updates should be wrapped into act(...): - -act(() => { - /* fire events that update state */ -}); -/* assert on the output */ - -This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(f.type),Cr(f))}var ly=oy,qp=!1;function sy(f){qp===!1&&t.unstable_flushAllWithoutAsserting===void 0&&(f.mode&Y||f.mode&ri?(qp=!0,We(!1,`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: -jest.mock('scheduler', () => require('scheduler/unstable_mock')); - -For more info, visit https://fb.me/react-mock-scheduler`)):eu===!0&&(qp=!0,We(!1,`Starting from React v17, the "scheduler" module will need to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: -jest.mock('scheduler', () => require('scheduler/unstable_mock')); - -For more info, visit https://fb.me/react-mock-scheduler`)))}var Zs=null;function ay(f){{var c=Qt();if((f.mode&ri)!==xi&&(c===ni||c===Li))for(var E=f;E!==null;){var T=E.alternate;if(T!==null)switch(E.tag){case O:var A=T.updateQueue;if(A!==null)for(var j=A.firstUpdate;j!==null;){var V=j.priority;if(V===ni||V===Li){Zs===null?Zs=new Set([qt(E.type)]):Zs.add(qt(E.type));break}j=j.next}break;case L:case se:case ie:if(E.memoizedState!==null&&E.memoizedState.baseUpdate!==null)for(var te=E.memoizedState.baseUpdate;te!==null;){var le=te.priority;if(le===ni||le===Li){Zs===null?Zs=new Set([qt(E.type)]):Zs.add(qt(E.type));break}if(te.next===E.memoizedState.baseUpdate)break;te=te.next}break;default:break}E=E.return}}}function d(){if(Zs!==null){var f=[];Zs.forEach(function(c){return f.push(c)}),Zs=null,f.length>0&&We(!1,`%s triggered a user-blocking update that suspended. - -The fix is to split the update into multiple parts: a user-blocking update to provide immediate feedback, and another update that triggers the bulk of the changes. - -Refer to the documentation for useTransition to learn how to implement this pattern.`,f.sort().join(", "))}}function v(f,c){return c*1e3+f.interactionThreadID}function x(f){!bn||(Uf===null?Uf=[f]:Uf.push(f))}function P(f,c,E){if(!!bn&&E.size>0){var T=f.pendingInteractionMap,A=T.get(c);A!=null?E.forEach(function(te){A.has(te)||te.__count++,A.add(te)}):(T.set(c,new Set(E)),E.forEach(function(te){te.__count++}));var j=k.__subscriberRef.current;if(j!==null){var V=v(f,c);j.onWorkScheduled(E,V)}}}function q(f,c){!bn||P(f,c,k.__interactionsRef.current)}function ee(f,c){if(!!bn){var E=new Set;if(f.pendingInteractionMap.forEach(function(j,V){V>=c&&j.forEach(function(te){return E.add(te)})}),f.memoizedInteractions=E,E.size>0){var T=k.__subscriberRef.current;if(T!==null){var A=v(f,c);try{T.onWorkStarted(E,A)}catch(j){_n(Li,function(){throw j})}}}}}function de(f,c){if(!!bn){var E=f.firstPendingTime,T;try{if(T=k.__subscriberRef.current,T!==null&&f.memoizedInteractions.size>0){var A=v(f,c);T.onWorkStopped(f.memoizedInteractions,A)}}catch(V){_n(Li,function(){throw V})}finally{var j=f.pendingInteractionMap;j.forEach(function(V,te){te>E&&(j.delete(te),V.forEach(function(le){if(le.__count--,T!==null&&le.__count===0)try{T.onInteractionScheduledWorkCompleted(le)}catch(Be){_n(Li,function(){throw Be})}}))})}}}var _e=null,Ie=null,Et=!1,St=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined";function At(f){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined")return!1;var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled)return!0;if(!c.supportsFiber)return We(!1,"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"),!0;try{var E=c.inject(f);_e=function(T,A){try{var j=(T.current.effectTag&Xr)===Xr;if(en){var V=Nc(),te=nd(V,A);c.onCommitFiberRoot(E,T,te,j)}else c.onCommitFiberRoot(E,T,void 0,j)}catch(le){Et||(Et=!0,We(!1,"React DevTools encountered an error: %s",le))}},Ie=function(T){try{c.onCommitFiberUnmount(E,T)}catch(A){Et||(Et=!0,We(!1,"React DevTools encountered an error: %s",A))}}}catch(T){We(!1,"React DevTools encountered an error: %s.",T)}return!0}function on(f,c){typeof _e=="function"&&_e(f,c)}function kn(f){typeof Ie=="function"&&Ie(f)}var rr;{rr=!1;try{var br=Object.preventExtensions({}),ar=new Map([[br,null]]),ui=new Set([br]);ar.set(0,0),ui.add(0)}catch(f){rr=!0}}var di=1;function jl(f,c,E,T){this.tag=f,this.key=E,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=c,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=T,this.effectTag=xi,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.expirationTime=at,this.childExpirationTime=at,this.alternate=null,en&&(this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0),Hr&&(this._debugID=di++,this._debugIsCurrentlyTiming=!1),this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!rr&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Zi=function(f,c,E,T){return new jl(f,c,E,T)};function lo(f){var c=f.prototype;return!!(c&&c.isReactComponent)}function a0(f){return typeof f=="function"&&!lo(f)&&f.defaultProps===void 0}function Os(f){if(typeof f=="function")return lo(f)?O:L;if(f!=null){var c=f.$$typeof;if(c===Mn)return se;if(c===Vt)return me}return C}function To(f,c,E){var T=f.alternate;T===null?(T=Zi(f.tag,c,f.key,f.mode),T.elementType=f.elementType,T.type=f.type,T.stateNode=f.stateNode,T._debugID=f._debugID,T._debugSource=f._debugSource,T._debugOwner=f._debugOwner,T._debugHookTypes=f._debugHookTypes,T.alternate=f,f.alternate=T):(T.pendingProps=c,T.effectTag=xi,T.nextEffect=null,T.firstEffect=null,T.lastEffect=null,en&&(T.actualDuration=0,T.actualStartTime=-1)),T.childExpirationTime=f.childExpirationTime,T.expirationTime=f.expirationTime,T.child=f.child,T.memoizedProps=f.memoizedProps,T.memoizedState=f.memoizedState,T.updateQueue=f.updateQueue;var A=f.dependencies;switch(T.dependencies=A===null?null:{expirationTime:A.expirationTime,firstContext:A.firstContext,responders:A.responders},T.sibling=f.sibling,T.index=f.index,T.ref=f.ref,en&&(T.selfBaseDuration=f.selfBaseDuration,T.treeBaseDuration=f.treeBaseDuration),T._debugNeedsRemount=f._debugNeedsRemount,T.tag){case C:case L:case ie:T.type=r0(f.type);break;case O:T.type=j0(f.type);break;case se:T.type=Df(f.type);break;default:break}return T}function Av(f,c){f.effectTag&=mi,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null;var E=f.alternate;if(E===null)f.childExpirationTime=at,f.expirationTime=c,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,en&&(f.selfBaseDuration=0,f.treeBaseDuration=0);else{f.childExpirationTime=E.childExpirationTime,f.expirationTime=E.expirationTime,f.child=E.child,f.memoizedProps=E.memoizedProps,f.memoizedState=E.memoizedState,f.updateQueue=E.updateQueue;var T=E.dependencies;f.dependencies=T===null?null:{expirationTime:T.expirationTime,firstContext:T.firstContext,responders:T.responders},en&&(f.selfBaseDuration=E.selfBaseDuration,f.treeBaseDuration=E.treeBaseDuration)}return f}function k4(f){var c;return f===O0?c=ri|Y|mr:f===B0?c=Y|mr:c=Ar,en&&St&&(c|=ii),Zi(U,null,null,c)}function fy(f,c,E,T,A,j){var V,te=C,le=f;if(typeof f=="function")lo(f)?(te=O,le=j0(le)):le=r0(le);else if(typeof f=="string")te=W;else{e:switch(f){case oe:return nf(E.children,A,j,c);case an:te=he,A|=ri|Y|mr;break;case ze:te=he,A|=mr;break;case ct:return L4(E,A,j,c);case lr:return F4(E,A,j,c);case ln:return P4(E,A,j,c);default:{if(typeof f=="object"&&f!==null)switch(f.$$typeof){case Rt:te=ve;break e;case nn:te=Ee;break e;case Mn:te=se,le=Df(le);break e;case Vt:te=me;break e;case Er:te=Oe,le=null;break e;case w:if(Wt)return qg(f,E,A,j,c);break;case Xn:if(Au)return N4(f,E,A,j,c)}var Be="";{(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(Be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ke=T?qt(T.type):null;Ke&&(Be+=` - -Check the render method of \``+Ke+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(f==null?f:typeof f)+"."+Be)}}}return V=Zi(te,E,c,A),V.elementType=f,V.type=le,V.expirationTime=j,V}function cy(f,c,E){var T=null;T=f._owner;var A=f.type,j=f.key,V=f.props,te=fy(A,j,V,T,c,E);return te._debugSource=f._source,te._debugOwner=f._owner,te}function nf(f,c,E,T){var A=Zi(m,f,T,c);return A.expirationTime=E,A}function qg(f,c,E,T,A){var j=Zi(gt,c,A,E);return j.elementType=f,j.type=f,j.expirationTime=T,j}function N4(f,c,E,T,A){var j=Zi(Xe,c,A,E);return j.type=f,j.elementType=f,j.expirationTime=T,j}function L4(f,c,E,T){(typeof f.id!="string"||typeof f.onRender!="function")&&We(!1,'Profiler must specify an "id" string and "onRender" function as props');var A=Zi(De,f,T,c|ii);return A.elementType=ct,A.type=ct,A.expirationTime=E,A}function F4(f,c,E,T){var A=Zi(pe,f,T,c);return A.type=lr,A.elementType=lr,A.expirationTime=E,A}function P4(f,c,E,T){var A=Zi(yt,f,T,c);return A.type=ln,A.elementType=ln,A.expirationTime=E,A}function dy(f,c,E){var T=Zi(ne,f,null,c);return T.expirationTime=E,T}function I4(){var f=Zi(W,null,null,Ar);return f.elementType="DELETED",f.type="DELETED",f}function b4(f){var c=Zi(qe,null,null,Ar);return c.stateNode=f,c}function py(f,c,E){var T=f.children!==null?f.children:[],A=Zi(H,T,f.key,c);return A.expirationTime=E,A.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},A}function Wg(f,c){return f===null&&(f=Zi(C,null,null,Ar)),f.tag=c.tag,f.key=c.key,f.elementType=c.elementType,f.type=c.type,f.stateNode=c.stateNode,f.return=c.return,f.child=c.child,f.sibling=c.sibling,f.index=c.index,f.ref=c.ref,f.pendingProps=c.pendingProps,f.memoizedProps=c.memoizedProps,f.updateQueue=c.updateQueue,f.memoizedState=c.memoizedState,f.dependencies=c.dependencies,f.mode=c.mode,f.effectTag=c.effectTag,f.nextEffect=c.nextEffect,f.firstEffect=c.firstEffect,f.lastEffect=c.lastEffect,f.expirationTime=c.expirationTime,f.childExpirationTime=c.childExpirationTime,f.alternate=c.alternate,en&&(f.actualDuration=c.actualDuration,f.actualStartTime=c.actualStartTime,f.selfBaseDuration=c.selfBaseDuration,f.treeBaseDuration=c.treeBaseDuration),f._debugID=c._debugID,f._debugSource=c._debugSource,f._debugOwner=c._debugOwner,f._debugIsCurrentlyTiming=c._debugIsCurrentlyTiming,f._debugNeedsRemount=c._debugNeedsRemount,f._debugHookTypes=c._debugHookTypes,f}function B4(f,c,E){this.tag=c,this.current=null,this.containerInfo=f,this.pendingChildren=null,this.pingCache=null,this.finishedExpirationTime=at,this.finishedWork=null,this.timeoutHandle=tl,this.context=null,this.pendingContext=null,this.hydrate=E,this.callbackNode=null,this.callbackPriority=E0,this.firstPendingTime=at,this.firstSuspendedTime=at,this.lastSuspendedTime=at,this.nextKnownPendingLevel=at,this.lastPingedTime=at,this.lastExpiredTime=at,bn&&(this.interactionThreadID=k.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map),Yi&&(this.hydrationCallbacks=null)}function U4(f,c,E,T){var A=new B4(f,c,E);Yi&&(A.hydrationCallbacks=T);var j=k4(c);return A.current=j,j.stateNode=A,A}function Vg(f,c){var E=f.firstSuspendedTime,T=f.lastSuspendedTime;return E!==at&&E>=c&&T<=c}function Wf(f,c){var E=f.firstSuspendedTime,T=f.lastSuspendedTime;Ec||E===at)&&(f.lastSuspendedTime=c),c<=f.lastPingedTime&&(f.lastPingedTime=at),c<=f.lastExpiredTime&&(f.lastExpiredTime=at)}function Gg(f,c){var E=f.firstPendingTime;c>E&&(f.firstPendingTime=c);var T=f.firstSuspendedTime;T!==at&&(c>=T?f.firstSuspendedTime=f.lastSuspendedTime=f.nextKnownPendingLevel=at:c>=f.lastSuspendedTime&&(f.lastSuspendedTime=c+1),c>f.nextKnownPendingLevel&&(f.nextKnownPendingLevel=c))}function j4(f,c,E){f.firstPendingTime=E,c<=f.lastSuspendedTime?f.firstSuspendedTime=f.lastSuspendedTime=f.nextKnownPendingLevel=at:c<=f.firstSuspendedTime&&(f.firstSuspendedTime=c-1),c<=f.lastPingedTime&&(f.lastPingedTime=at),c<=f.lastExpiredTime&&(f.lastExpiredTime=at)}function Wp(f,c){var E=f.lastExpiredTime;(E===at||E>c)&&(f.lastExpiredTime=c)}var z4={debugTool:null},Ov=z4,hy,vy;hy=!1,vy={};function H4(f){if(!f)return Rn;var c=Ft(f),E=Cl(c);if(c.tag===O){var T=c.type;if(Xi(T))return A0(c,T,E)}return E}function my(f){var c=Ft(f);if(c===void 0)throw typeof f.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(f));var E=I0(c);return E===null?null:E.stateNode}function q4(f,c){{var E=Ft(f);if(E===void 0)throw typeof f.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(f));var T=I0(E);if(T===null)return null;if(T.mode&mr){var A=qt(E.type)||"Component";vy[A]||(vy[A]=!0,E.mode&mr?We(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",c,c,A,Cr(T)):We(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",c,c,A,Cr(T)))}return T.stateNode}return my(f)}function W4(f,c,E,T){return U4(f,c,E,T)}function Yg(f,c,E,T){var A=c.current,j=Ul();typeof jest!="undefined"&&(sy(A),Hp(A));var V=go(),te=jf(j,A,V);Ov.debugTool&&(A.alternate===null?Ov.debugTool.onMountContainer(c):f===null?Ov.debugTool.onUnmountContainer(c):Ov.debugTool.onUpdateContainer(c));var le=H4(E);c.context===null?c.context=le:c.pendingContext=le,Nr==="render"&&An!==null&&!hy&&(hy=!0,We(!1,`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. - -Check the render method of %s.`,qt(An.type)||"Unknown"));var Be=Cu(te,V);return Be.payload={element:f},T=T===void 0?null:T,T!==null&&(typeof T!="function"&&We(!1,"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",T),Be.callback=T),Va(A,Be),ml(A,te),te}function V4(f){var c=f.current;if(!c.child)return null;switch(c.child.tag){case W:return No(c.child.stateNode);default:return c.child.stateNode}}function G4(f){switch(f.tag){case U:var c=f.stateNode;c.hydrate&&Um(c,c.firstPendingTime);break;case pe:Ap(function(){return ml(f,Un)});var E=Ua(Ul());Mv(f,E);break}}function Kg(f,c){var E=f.memoizedState;E!==null&&E.dehydrated!==null&&E.retryTime=c.length)return T;var A=c[E],j=Array.isArray(f)?f.slice():a({},f);return j[A]=_y(f[A],c,E+1,T),j},e_=function(f,c,E){return _y(f,c,0,E)};Qg=function(f,c,E,T){for(var A=f.memoizedState;A!==null&&c>0;)A=A.next,c--;if(A!==null){var j=e_(A.memoizedState,E,T);A.memoizedState=j,A.baseState=j,f.memoizedProps=a({},f.memoizedProps),ml(f,Un)}},Jg=function(f,c,E){f.pendingProps=e_(f.memoizedProps,c,E),f.alternate&&(f.alternate.pendingProps=f.pendingProps),ml(f,Un)},Zg=function(f){ml(f,Un)},$g=function(f){gy=f}}function Q4(f){var c=f.findFiberByHostInstance,E=rt.ReactCurrentDispatcher;return At(a({},f,{overrideHookState:Qg,overrideProps:Jg,setSuspenseHandler:$g,scheduleUpdate:Zg,currentDispatcherRef:E,findHostInstanceByFiber:function(T){var A=I0(T);return A===null?null:A.stateNode},findFiberByHostInstance:function(T){return c?c(T):null},findHostInstancesForRefresh:ud,scheduleRefresh:Al,scheduleRoot:Ts,setRefreshHandler:qa,getCurrentFiber:function(){return An}}))}var t_=Object.freeze({createContainer:W4,updateContainer:Yg,batchedEventUpdates:qm,batchedUpdates:Hm,unbatchedUpdates:Wm,deferredUpdates:jm,syncUpdates:fv,discreteUpdates:cv,flushDiscreteUpdates:av,flushControlled:Vm,flushSync:Ap,flushPassiveEffects:tf,IsThisRendererActing:qf,getPublicRootInstance:V4,attemptSynchronousHydration:G4,attemptUserBlockingHydration:Y4,attemptContinuousHydration:yy,attemptHydrationAtCurrentPriority:K4,findHostInstance:my,findHostInstanceWithWarning:q4,findHostInstanceWithNoPortals:X4,shouldSuspend:Xg,injectIntoDevTools:Q4}),J4=t_.default||t_;qy.exports=J4;var Z4=qy.exports;return qy.exports=i,Z4})});var IS=tt((RH,vD)=>{"use strict";process.env.NODE_ENV==="production"?vD.exports=MS():vD.exports=PS()});var BS=tt((AH,bS)=>{"use strict";var AP={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};bS.exports=AP});var HS=tt((OH,US)=>{"use strict";var OP=Object.assign||function(i){for(var o=1;o"}}]),i}(),jS=function(){B_(i,null,[{key:"fromJS",value:function(a){var p=a.width,_=a.height;return new i(p,_)}}]);function i(o,a){yD(this,i),this.width=o,this.height=a}return B_(i,[{key:"fromJS",value:function(a){a(this.width,this.height)}},{key:"toString",value:function(){return""}}]),i}(),zS=function(){function i(o,a){yD(this,i),this.unit=o,this.value=a}return B_(i,[{key:"fromJS",value:function(a){a(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case tc.UNIT_POINT:return String(this.value);case tc.UNIT_PERCENT:return this.value+"%";case tc.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),i}();US.exports=function(i,o){function a(k,L,O){var C=k[L];k[L]=function(){for(var U=arguments.length,H=Array(U),W=0;W1?H-1:0),ne=1;ne1&&arguments[1]!==void 0?arguments[1]:NaN,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:tc.DIRECTION_LTR;return k.call(this,L,O,C)}),OP({Config:o.Config,Node:o.Node,Layout:i("Layout",MP),Size:i("Size",jS),Value:i("Value",zS),getInstanceCount:function(){return o.getInstanceCount.apply(o,arguments)}},tc)}});var qS=tt((exports,module)=>{(function(i,o){typeof define=="function"&&define.amd?define([],function(){return o}):typeof module=="object"&&module.exports?module.exports=o:(i.nbind=i.nbind||{}).init=o})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(i,o){return function(){i&&i.apply(this,arguments);try{Module.ccall("nbind_init")}catch(a){o(a);return}o(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module!="undefined"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(o,a){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),o=nodePath.normalize(o);var p=nodeFS.readFileSync(o);return a?p:p.toString()},Module.readBinary=function(o){var a=Module.read(o,!0);return a.buffer||(a=new Uint8Array(a)),assert(a.buffer),a},Module.load=function(o){globalEval(read(o))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module!="undefined"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr!="undefined"&&(Module.printErr=printErr),typeof read!="undefined"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(o){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(o));var a=read(o,"binary");return assert(typeof a=="object"),a},typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(i,o){quit(i)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),Module.readAsync=function(o,a,p){var _=new XMLHttpRequest;_.open("GET",o,!0),_.responseType="arraybuffer",_.onload=function(){_.status==200||_.status==0&&_.response?a(_.response):p()},_.onerror=p,_.send(null)},typeof arguments!="undefined"&&(Module.arguments=arguments),typeof console!="undefined")Module.print||(Module.print=function(o){console.log(o)}),Module.printErr||(Module.printErr=function(o){console.warn(o)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(i){dump(i)}:function(i){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle=="undefined"&&(Module.setWindowTitle=function(i){document.title=i})}else throw"Unknown runtime environment. Where are we?";function globalEval(i){eval.call(null,i)}!Module.load&&Module.read&&(Module.load=function(o){globalEval(Module.read(o))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(i,o){throw o}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(i){return tempRet0=i,i},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(i){STACKTOP=i},getNativeTypeSize:function(i){switch(i){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(i[i.length-1]==="*")return Runtime.QUANTUM_SIZE;if(i[0]==="i"){var o=parseInt(i.substr(1));return assert(o%8==0),o/8}else return 0}}},getNativeFieldSize:function(i){return Math.max(Runtime.getNativeTypeSize(i),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(i,o){return o==="double"||o==="i64"?i&7&&(assert((i&7)==4),i+=4):assert((i&3)==0),i},getAlignSize:function(i,o,a){return!a&&(i=="i64"||i=="double")?8:i?Math.min(o||(i?Runtime.getNativeFieldSize(i):0),Runtime.QUANTUM_SIZE):Math.min(o,8)},dynCall:function(i,o,a){return a&&a.length?Module["dynCall_"+i].apply(null,[o].concat(a)):Module["dynCall_"+i].call(null,o)},functionPointers:[],addFunction:function(i){for(var o=0;o>2],a=(o+i+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=a,a>=TOTAL_MEMORY){var p=enlargeMemory();if(!p)return HEAP32[DYNAMICTOP_PTR>>2]=o,0}return o},alignMemory:function(i,o){var a=i=Math.ceil(i/(o||16))*(o||16);return a},makeBigInt:function(i,o,a){var p=a?+(i>>>0)+ +(o>>>0)*4294967296:+(i>>>0)+ +(o|0)*4294967296;return p},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(i,o){i||abort("Assertion failed: "+o)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(i){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(i){var o=Runtime.stackAlloc(i.length);return writeArrayToMemory(i,o),o},stringToC:function(i){var o=0;if(i!=null&&i!==0){var a=(i.length<<2)+1;o=Runtime.stackAlloc(a),stringToUTF8(i,o,a)}return o}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(o,a,p,_,t){var k=getCFunc(o),L=[],O=0;if(_)for(var C=0;C<_.length;C++){var U=toC[p[C]];U?(O===0&&(O=Runtime.stackSave()),L[C]=U(_[C])):L[C]=_[C]}var H=k.apply(null,L);if(a==="string"&&(H=Pointer_stringify(H)),O!==0){if(t&&t.async){EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(O)});return}Runtime.stackRestore(O)}return H};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(i){var o=i.toString().match(sourceRegex).slice(1);return{arguments:o[0],body:o[1],returnValue:o[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource){JSsource={};for(var i in JSfuncs)JSfuncs.hasOwnProperty(i)&&(JSsource[i]=parseJSFunc(JSfuncs[i]))}}cwrap=function(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(i){return i==="number"}),numericRet=returnType!=="string";if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(i,o){return"$"+o}),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i>0]=o;break;case"i8":HEAP8[i>>0]=o;break;case"i16":HEAP16[i>>1]=o;break;case"i32":HEAP32[i>>2]=o;break;case"i64":tempI64=[o>>>0,(tempDouble=o,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i>>2]=tempI64[0],HEAP32[i+4>>2]=tempI64[1];break;case"float":HEAPF32[i>>2]=o;break;case"double":HEAPF64[i>>3]=o;break;default:abort("invalid type for setValue: "+a)}}Module.setValue=setValue;function getValue(i,o,a){switch(o=o||"i8",o.charAt(o.length-1)==="*"&&(o="i32"),o){case"i1":return HEAP8[i>>0];case"i8":return HEAP8[i>>0];case"i16":return HEAP16[i>>1];case"i32":return HEAP32[i>>2];case"i64":return HEAP32[i>>2];case"float":return HEAPF32[i>>2];case"double":return HEAPF64[i>>3];default:abort("invalid type for setValue: "+o)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(i,o,a,p){var _,t;typeof i=="number"?(_=!0,t=i):(_=!1,t=i.length);var k=typeof o=="string"?o:null,L;if(a==ALLOC_NONE?L=p:L=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][a===void 0?ALLOC_STATIC:a](Math.max(t,k?1:o.length)),_){var p=L,O;for(assert((L&3)==0),O=L+(t&~3);p>2]=0;for(O=L+t;p>0]=0;return L}if(k==="i8")return i.subarray||i.slice?HEAPU8.set(i,L):HEAPU8.set(new Uint8Array(i),L),L;for(var C=0,U,H,W;C>0],a|=p,!(p==0&&!o||(_++,o&&_==o)););o||(o=_);var t="";if(a<128){for(var k=1024,L;o>0;)L=String.fromCharCode.apply(String,HEAPU8.subarray(i,i+Math.min(o,k))),t=t?t+L:L,i+=k,o-=k;return t}return Module.UTF8ToString(i)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(i){for(var o="";;){var a=HEAP8[i++>>0];if(!a)return o;o+=String.fromCharCode(a)}}Module.AsciiToString=AsciiToString;function stringToAscii(i,o){return writeAsciiToMemory(i,o,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(i,o){for(var a=o;i[a];)++a;if(a-o>16&&i.subarray&&UTF8Decoder)return UTF8Decoder.decode(i.subarray(o,a));for(var p,_,t,k,L,O,C="";;){if(p=i[o++],!p)return C;if(!(p&128)){C+=String.fromCharCode(p);continue}if(_=i[o++]&63,(p&224)==192){C+=String.fromCharCode((p&31)<<6|_);continue}if(t=i[o++]&63,(p&240)==224?p=(p&15)<<12|_<<6|t:(k=i[o++]&63,(p&248)==240?p=(p&7)<<18|_<<12|t<<6|k:(L=i[o++]&63,(p&252)==248?p=(p&3)<<24|_<<18|t<<12|k<<6|L:(O=i[o++]&63,p=(p&1)<<30|_<<24|t<<18|k<<12|L<<6|O))),p<65536)C+=String.fromCharCode(p);else{var U=p-65536;C+=String.fromCharCode(55296|U>>10,56320|U&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(i){return UTF8ArrayToString(HEAPU8,i)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(i,o,a,p){if(!(p>0))return 0;for(var _=a,t=a+p-1,k=0;k=55296&&L<=57343&&(L=65536+((L&1023)<<10)|i.charCodeAt(++k)&1023),L<=127){if(a>=t)break;o[a++]=L}else if(L<=2047){if(a+1>=t)break;o[a++]=192|L>>6,o[a++]=128|L&63}else if(L<=65535){if(a+2>=t)break;o[a++]=224|L>>12,o[a++]=128|L>>6&63,o[a++]=128|L&63}else if(L<=2097151){if(a+3>=t)break;o[a++]=240|L>>18,o[a++]=128|L>>12&63,o[a++]=128|L>>6&63,o[a++]=128|L&63}else if(L<=67108863){if(a+4>=t)break;o[a++]=248|L>>24,o[a++]=128|L>>18&63,o[a++]=128|L>>12&63,o[a++]=128|L>>6&63,o[a++]=128|L&63}else{if(a+5>=t)break;o[a++]=252|L>>30,o[a++]=128|L>>24&63,o[a++]=128|L>>18&63,o[a++]=128|L>>12&63,o[a++]=128|L>>6&63,o[a++]=128|L&63}}return o[a]=0,a-_}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(i,o,a){return stringToUTF8Array(i,HEAPU8,o,a)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(i){for(var o=0,a=0;a=55296&&p<=57343&&(p=65536+((p&1023)<<10)|i.charCodeAt(++a)&1023),p<=127?++o:p<=2047?o+=2:p<=65535?o+=3:p<=2097151?o+=4:p<=67108863?o+=5:o+=6}return o}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function demangle(i){var o=Module.___cxa_demangle||Module.__cxa_demangle;if(o){try{var a=i.substr(1),p=lengthBytesUTF8(a)+1,_=_malloc(p);stringToUTF8(a,_,p);var t=_malloc(4),k=o(_,0,0,t);if(getValue(t,"i32")===0&&k)return Pointer_stringify(k)}catch(L){}finally{_&&_free(_),t&&_free(t),k&&_free(k)}return i}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),i}function demangleAll(i){var o=/__Z[\w\d_]+/g;return i.replace(o,function(a){var p=demangle(a);return a===p?a:a+" ["+p+"]"})}function jsStackTrace(){var i=new Error;if(!i.stack){try{throw new Error(0)}catch(o){i=o}if(!i.stack)return"(no stack trace available)"}return i.stack.toString()}function stackTrace(){var i=jsStackTrace();return Module.extraStackTrace&&(i+=` -`+Module.extraStackTrace()),demangleAll(i)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY0;){var o=i.shift();if(typeof o=="function"){o();continue}var a=o.func;typeof a=="number"?o.arg===void 0?Module.dynCall_v(a):Module.dynCall_vi(a,o.arg):a(o.arg===void 0?null:o.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(i){__ATPRERUN__.unshift(i)}Module.addOnPreRun=addOnPreRun;function addOnInit(i){__ATINIT__.unshift(i)}Module.addOnInit=addOnInit;function addOnPreMain(i){__ATMAIN__.unshift(i)}Module.addOnPreMain=addOnPreMain;function addOnExit(i){__ATEXIT__.unshift(i)}Module.addOnExit=addOnExit;function addOnPostRun(i){__ATPOSTRUN__.unshift(i)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(i,o,a){var p=a>0?a:lengthBytesUTF8(i)+1,_=new Array(p),t=stringToUTF8Array(i,_,0,_.length);return o&&(_.length=t),_}Module.intArrayFromString=intArrayFromString;function intArrayToString(i){for(var o=[],a=0;a255&&(p&=255),o.push(String.fromCharCode(p))}return o.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(i,o,a){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var p,_;a&&(_=o+lengthBytesUTF8(i),p=HEAP8[_]),stringToUTF8(i,o,Infinity),a&&(HEAP8[_]=p)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(i,o){HEAP8.set(i,o)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(i,o,a){for(var p=0;p>0]=i.charCodeAt(p);a||(HEAP8[o>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function(o,a){var p=o>>>16,_=o&65535,t=a>>>16,k=a&65535;return _*k+(p*k+_*t<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(i){return froundBuffer[0]=i,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(i){i=i>>>0;for(var o=0;o<32;o++)if(i&1<<31-o)return o;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(i){return i<0?Math.ceil(i):Math.floor(i)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(i){return i}function addRunDependency(i){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(i){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var o=dependenciesFulfilled;dependenciesFulfilled=null,o()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(i,o,a,p,_,t,k,L){return _nbind.callbackSignatureList[i].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(i,o,a,p,_,t,k,L){return ASM_CONSTS[i](o,a,p,_,t,k,L)}function _emscripten_asm_const_iiiii(i,o,a,p,_){return ASM_CONSTS[i](o,a,p,_)}function _emscripten_asm_const_iiidddddd(i,o,a,p,_,t,k,L,O){return ASM_CONSTS[i](o,a,p,_,t,k,L,O)}function _emscripten_asm_const_iiididi(i,o,a,p,_,t,k){return ASM_CONSTS[i](o,a,p,_,t,k)}function _emscripten_asm_const_iiii(i,o,a,p){return ASM_CONSTS[i](o,a,p)}function _emscripten_asm_const_iiiid(i,o,a,p,_){return ASM_CONSTS[i](o,a,p,_)}function _emscripten_asm_const_iiiiii(i,o,a,p,_,t){return ASM_CONSTS[i](o,a,p,_,t)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(i,o){__ATEXIT__.unshift({func:i,arg:o})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(i,o,a,p){var _=arguments.length,t=_<3?o:p===null?p=Object.getOwnPropertyDescriptor(o,a):p,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,o,a,p);else for(var L=i.length-1;L>=0;L--)(k=i[L])&&(t=(_<3?k(t):_>3?k(o,a,t):k(o,a))||t);return _>3&&t&&Object.defineProperty(o,a,t),t}function _defineHidden(i){return function(o,a){Object.defineProperty(o,a,{configurable:!1,enumerable:!1,value:i,writable:!0})}}var _nbind={};function __nbind_free_external(i){_nbind.externalList[i].dereference(i)}function __nbind_reference_external(i){_nbind.externalList[i].reference()}function _llvm_stackrestore(i){var o=_llvm_stacksave,a=o.LLVM_SAVEDSTACKS[i];o.LLVM_SAVEDSTACKS.splice(i,1),Runtime.stackRestore(a)}function __nbind_register_pool(i,o,a,p){_nbind.Pool.pageSize=i,_nbind.Pool.usedPtr=o/4,_nbind.Pool.rootPtr=a,_nbind.Pool.pagePtr=p/4,HEAP32[o/4]=16909060,HEAP8[o]==1&&(_nbind.bigEndian=!0),HEAP32[o/4]=0,_nbind.makeTypeKindTbl=(t={},t[1024]=_nbind.PrimitiveType,t[64]=_nbind.Int64Type,t[2048]=_nbind.BindClass,t[3072]=_nbind.BindClassPtr,t[4096]=_nbind.SharedClassPtr,t[5120]=_nbind.ArrayType,t[6144]=_nbind.ArrayType,t[7168]=_nbind.CStringType,t[9216]=_nbind.CallbackType,t[10240]=_nbind.BindType,t),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var _=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});_.proto=Module,_nbind.BindClass.list.push(_);var t}function _emscripten_set_main_loop_timing(i,o){if(Browser.mainLoop.timingMode=i,Browser.mainLoop.timingValue=o,!Browser.mainLoop.func)return 1;if(i==0)Browser.mainLoop.scheduler=function(){var k=Math.max(0,Browser.mainLoop.tickStartTime+o-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,k)},Browser.mainLoop.method="timeout";else if(i==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(i==2){if(!window.setImmediate){let t=function(k){k.source===window&&k.data===p&&(k.stopPropagation(),a.shift()())};var _=t,a=[],p="setimmediate";window.addEventListener("message",t,!0),window.setImmediate=function(L){a.push(L),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(L),window.postMessage({target:p})):window.postMessage(p,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(i,o,a,p,_){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=i,Browser.mainLoop.arg=p;var t;typeof p!="undefined"?t=function(){Module.dynCall_vi(i,p)}:t=function(){Module.dynCall_v(i)};var k=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var O=Date.now(),C=Browser.mainLoop.queue.shift();if(C.func(C.arg),Browser.mainLoop.remainingBlockers){var U=Browser.mainLoop.remainingBlockers,H=U%1==0?U-1:Math.floor(U);C.counted?Browser.mainLoop.remainingBlockers=H:(H=H+.5,Browser.mainLoop.remainingBlockers=(8*U+H)/9)}if(console.log('main loop blocker "'+C.name+'" took '+(Date.now()-O)+" ms"),Browser.mainLoop.updateStatus(),k1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(t),!(k0?_emscripten_set_main_loop_timing(0,1e3/o):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),a)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var i=Browser.mainLoop.timingMode,o=Browser.mainLoop.timingValue,a=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(a,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(i,o),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var i=Module.statusMessage||"Please wait...",o=Browser.mainLoop.remainingBlockers,a=Browser.mainLoop.expectedBlockers;o?o=6;){var qe=ie>>Oe-6&63;Oe-=6,me+=De[qe]}return Oe==2?(me+=De[(ie&3)<<4],me+=pe+pe):Oe==4&&(me+=De[(ie&15)<<2],me+=pe),me}m.src="data:audio/x-"+k.substr(-3)+";base64,"+ve(t),U(m)},m.src=ne,Browser.safeSetTimeout(function(){U(m)},1e4)}else return H()},Module.preloadPlugins.push(o);function a(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var p=Module.canvas;p&&(p.requestPointerLock=p.requestPointerLock||p.mozRequestPointerLock||p.webkitRequestPointerLock||p.msRequestPointerLock||function(){},p.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},p.exitPointerLock=p.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",a,!1),document.addEventListener("mozpointerlockchange",a,!1),document.addEventListener("webkitpointerlockchange",a,!1),document.addEventListener("mspointerlockchange",a,!1),Module.elementPointerLock&&p.addEventListener("click",function(_){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),_.preventDefault())},!1))},createContext:function(i,o,a,p){if(o&&Module.ctx&&i==Module.canvas)return Module.ctx;var _,t;if(o){var k={antialias:!1,alpha:!1};if(p)for(var L in p)k[L]=p[L];t=GL.createContext(i,k),t&&(_=GL.getContext(t).GLctx)}else _=i.getContext("2d");return _?(a&&(o||assert(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=_,o&&GL.makeContextCurrent(t),Module.useWebGL=o,Browser.moduleContextCreatedCallbacks.forEach(function(O){O()}),Browser.init()),_):null},destroyContext:function(i,o,a){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(i,o,a){Browser.lockPointer=i,Browser.resizeCanvas=o,Browser.vrDevice=a,typeof Browser.lockPointer=="undefined"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas=="undefined"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice=="undefined"&&(Browser.vrDevice=null);var p=Module.canvas;function _(){Browser.isFullscreen=!1;var k=p.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===k?(p.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},p.exitFullscreen=p.exitFullscreen.bind(document),Browser.lockPointer&&p.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(k.parentNode.insertBefore(p,k),k.parentNode.removeChild(k),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(p)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",_,!1),document.addEventListener("mozfullscreenchange",_,!1),document.addEventListener("webkitfullscreenchange",_,!1),document.addEventListener("MSFullscreenChange",_,!1));var t=document.createElement("div");p.parentNode.insertBefore(t,p),t.appendChild(p),t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||(t.webkitRequestFullscreen?function(){t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(t.webkitRequestFullScreen?function(){t.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),a?t.requestFullscreen({vrDisplay:a}):t.requestFullscreen()},requestFullScreen:function(i,o,a){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(p,_,t){return Browser.requestFullscreen(p,_,t)},Browser.requestFullscreen(i,o,a)},nextRAF:0,fakeRequestAnimationFrame:function(i){var o=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=o+1e3/60;else for(;o+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var a=Math.max(Browser.nextRAF-o,0);setTimeout(i,a)},requestAnimationFrame:function(o){typeof window=="undefined"?Browser.fakeRequestAnimationFrame(o):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(o))},safeCallback:function(i){return function(){if(!ABORT)return i.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var i=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],i.forEach(function(o){o()})}},safeRequestAnimationFrame:function(i){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))})},safeSetTimeout:function(i,o){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))},o)},safeSetInterval:function(i,o){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&i()},o)},getMimetype:function(i){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[i.substr(i.lastIndexOf(".")+1)]},getUserMedia:function(i){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(i)},getMovementX:function(i){return i.movementX||i.mozMovementX||i.webkitMovementX||0},getMovementY:function(i){return i.movementY||i.mozMovementY||i.webkitMovementY||0},getMouseWheelDelta:function(i){var o=0;switch(i.type){case"DOMMouseScroll":o=i.detail;break;case"mousewheel":o=i.wheelDelta;break;case"wheel":o=i.deltaY;break;default:throw"unrecognized mouse wheel event: "+i.type}return o},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(i){if(Browser.pointerLock)i.type!="mousemove"&&"mozMovementX"in i?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(i),Browser.mouseMovementY=Browser.getMovementY(i)),typeof SDL!="undefined"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var o=Module.canvas.getBoundingClientRect(),a=Module.canvas.width,p=Module.canvas.height,_=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset,t=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(i.type==="touchstart"||i.type==="touchend"||i.type==="touchmove"){var k=i.touch;if(k===void 0)return;var L=k.pageX-(_+o.left),O=k.pageY-(t+o.top);L=L*(a/o.width),O=O*(p/o.height);var C={x:L,y:O};if(i.type==="touchstart")Browser.lastTouches[k.identifier]=C,Browser.touches[k.identifier]=C;else if(i.type==="touchend"||i.type==="touchmove"){var U=Browser.touches[k.identifier];U||(U=C),Browser.lastTouches[k.identifier]=U,Browser.touches[k.identifier]=C}return}var H=i.pageX-(_+o.left),W=i.pageY-(t+o.top);H=H*(a/o.width),W=W*(p/o.height),Browser.mouseMovementX=H-Browser.mouseX,Browser.mouseMovementY=W-Browser.mouseY,Browser.mouseX=H,Browser.mouseY=W}},asyncLoad:function(i,o,a,p){var _=p?"":getUniqueRunDependency("al "+i);Module.readAsync(i,function(t){assert(t,'Loading data file "'+i+'" failed (no arrayBuffer).'),o(new Uint8Array(t)),_&&removeRunDependency(_)},function(t){if(a)a();else throw'Loading data file "'+i+'" failed.'}),_&&addRunDependency(_)},resizeListeners:[],updateResizeListeners:function(){var i=Module.canvas;Browser.resizeListeners.forEach(function(o){o(i.width,i.height)})},setCanvasSize:function(i,o,a){var p=Module.canvas;Browser.updateCanvasDimensions(p,i,o),a||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i&~8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},updateCanvasDimensions:function(i,o,a){o&&a?(i.widthNative=o,i.heightNative=a):(o=i.widthNative,a=i.heightNative);var p=o,_=a;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(p/_>2];return o},getStr:function(){var i=Pointer_stringify(SYSCALLS.get());return i},get64:function(){var i=SYSCALLS.get(),o=SYSCALLS.get();return i>=0?assert(o===0):assert(o===-1),i},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(i,o){SYSCALLS.varargs=o;try{var a=SYSCALLS.getStreamFromFD();return FS.close(a),0}catch(p){return(typeof FS=="undefined"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall54(i,o){SYSCALLS.varargs=o;try{return 0}catch(a){return(typeof FS=="undefined"||!(a instanceof FS.ErrnoError))&&abort(a),-a.errno}}function _typeModule(i){var o=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr"],[640,1,"std::unique_ptr"],[5120,1,"std::vector"],[6144,2,"std::array"],[9216,-1,"std::function"]];function a(O,C,U,H,W,ne){if(C==1){var m=H&896;(m==128||m==256||m==384)&&(O="X const")}var he;return ne?he=U.replace("X",O).replace("Y",W):he=O.replace("X",U).replace("Y",W),he.replace(/([*&]) (?=[*&])/g,"$1")}function p(O,C,U,H,W){throw new Error(O+" type "+U.replace("X",C+"?")+(H?" with flag "+H:"")+" in "+W)}function _(O,C,U,H,W,ne,m,he){ne===void 0&&(ne="X"),he===void 0&&(he=1);var Ee=U(O);if(Ee)return Ee;var ve=H(O),se=ve.placeholderFlag,De=o[se];m&&De&&(ne=a(m[2],m[0],ne,De[0],"?",!0));var pe;se==0&&(pe="Unbound"),se>=10&&(pe="Corrupt"),he>20&&(pe="Deeply nested"),pe&&p(pe,O,ne,se,W||"?");var me=ve.paramList[0],ie=_(me,C,U,H,W,ne,De,he+1),Oe,je={flags:De[0],id:O,name:"",paramList:[ie]},qe=[],yt="?";switch(ve.placeholderFlag){case 1:Oe=ie.spec;break;case 2:if((ie.flags&15360)==1024&&ie.spec.ptrSize==1){je.flags=7168;break}case 3:case 6:case 5:Oe=ie.spec,(ie.flags&15360)!=2048;break;case 8:yt=""+ve.paramList[1],je.paramList.push(ve.paramList[1]);break;case 9:for(var gt=0,Xe=ve.paramList[1];gt>2]=i),i}function _llvm_stacksave(){var i=_llvm_stacksave;return i.LLVM_SAVEDSTACKS||(i.LLVM_SAVEDSTACKS=[]),i.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),i.LLVM_SAVEDSTACKS.length-1}function ___syscall140(i,o){SYSCALLS.varargs=o;try{var a=SYSCALLS.getStreamFromFD(),p=SYSCALLS.get(),_=SYSCALLS.get(),t=SYSCALLS.get(),k=SYSCALLS.get(),L=_;return FS.llseek(a,L,k),HEAP32[t>>2]=a.position,a.getdents&&L===0&&k===0&&(a.getdents=null),0}catch(O){return(typeof FS=="undefined"||!(O instanceof FS.ErrnoError))&&abort(O),-O.errno}}function ___syscall146(i,o){SYSCALLS.varargs=o;try{var a=SYSCALLS.get(),p=SYSCALLS.get(),_=SYSCALLS.get(),t=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(U,H){var W=___syscall146.buffers[U];assert(W),H===0||H===10?((U===1?Module.print:Module.printErr)(UTF8ArrayToString(W,0)),W.length=0):W.push(H)});for(var k=0;k<_;k++){for(var L=HEAP32[p+k*8>>2],O=HEAP32[p+(k*8+4)>>2],C=0;Ci.pageSize/2||o>i.pageSize-a){var p=_nbind.typeNameTbl.NBind.proto;return p.lalloc(o)}else return HEAPU32[i.usedPtr]=a+o,i.rootPtr+a},i.lreset=function(o,a){var p=HEAPU32[i.pagePtr];if(p){var _=_nbind.typeNameTbl.NBind.proto;_.lreset(o,a)}else HEAPU32[i.usedPtr]=o},i}();_nbind.Pool=Pool;function constructType(i,o){var a=i==10240?_nbind.makeTypeNameTbl[o.name]||_nbind.BindType:_nbind.makeTypeKindTbl[i],p=new a(o);return typeIdTbl[o.id]=p,_nbind.typeNameTbl[o.name]=p,p}_nbind.constructType=constructType;function getType(i){return typeIdTbl[i]}_nbind.getType=getType;function queryType(i){var o=HEAPU8[i],a=_nbind.structureList[o][1];i/=4,a<0&&(++i,a=HEAPU32[i]+1);var p=Array.prototype.slice.call(HEAPU32.subarray(i+1,i+1+a));return o==9&&(p=[p[0],p.slice(1)]),{paramList:p,placeholderFlag:o}}_nbind.queryType=queryType;function getTypes(i,o){return i.map(function(a){return typeof a=="number"?_nbind.getComplexType(a,constructType,getType,queryType,o):_nbind.typeNameTbl[a]})}_nbind.getTypes=getTypes;function readTypeIdList(i,o){return Array.prototype.slice.call(HEAPU32,i/4,i/4+o)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(i){for(var o=i;HEAPU8[o++];);return String.fromCharCode.apply("",HEAPU8.subarray(i,o-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(i){var o={};if(i)for(;;){var a=HEAPU32[i/4];if(!a)break;o[readAsciiString(a)]=!0,i+=4}return o}_nbind.readPolicyList=readPolicyList;function getDynCall(i,o){var a={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},p=i.map(function(t){return a[t.name]||"i"}).join(""),_=Module["dynCall_"+p];if(!_)throw new Error("dynCall_"+p+" not found for "+o+"("+i.map(function(t){return t.name}).join(", ")+")");return _}_nbind.getDynCall=getDynCall;function addMethod(i,o,a,p){var _=i[o];i.hasOwnProperty(o)&&_?((_.arity||_.arity===0)&&(_=_nbind.makeOverloader(_,_.arity),i[o]=_),_.addMethod(a,p)):(a.arity=p,i[o]=a)}_nbind.addMethod=addMethod;function throwError(i){throw new Error(i)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(i){__extends(o,i);function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.heap=HEAPU32,a.ptrSize=4,a}return o.prototype.needsWireRead=function(a){return!!this.wireRead||!!this.makeWireRead},o.prototype.needsWireWrite=function(a){return!!this.wireWrite||!!this.makeWireWrite},o}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(i){__extends(o,i);function o(a){var p=i.call(this,a)||this,_=a.flags&32?{32:HEAPF32,64:HEAPF64}:a.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return p.heap=_[a.ptrSize*8],p.ptrSize=a.ptrSize,p}return o.prototype.needsWireWrite=function(a){return!!a&&!!a.Strict},o.prototype.makeWireWrite=function(a,p){return p&&p.Strict&&function(_){if(typeof _=="number")return _;throw new Error("Type mismatch")}},o}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(i,o){if(i==null){if(o&&o.Nullable)return 0;throw new Error("Type mismatch")}if(o&&o.Strict){if(typeof i!="string")throw new Error("Type mismatch")}else i=i.toString();var a=Module.lengthBytesUTF8(i)+1,p=_nbind.Pool.lalloc(a);return Module.stringToUTF8Array(i,HEAPU8,p,a),p}_nbind.pushCString=pushCString;function popCString(i){return i===0?null:Module.Pointer_stringify(i)}_nbind.popCString=popCString;var CStringType=function(i){__extends(o,i);function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.wireRead=popCString,a.wireWrite=pushCString,a.readResources=[_nbind.resources.pool],a.writeResources=[_nbind.resources.pool],a}return o.prototype.makeWireWrite=function(a,p){return function(_){return pushCString(_,p)}},o}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(i){__extends(o,i);function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.wireRead=function(p){return!!p},a}return o.prototype.needsWireWrite=function(a){return!!a&&!!a.Strict},o.prototype.makeWireRead=function(a){return"!!("+a+")"},o.prototype.makeWireWrite=function(a,p){return p&&p.Strict&&function(_){if(typeof _=="boolean")return _;throw new Error("Type mismatch")}||a},o}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function i(){}return i.prototype.persist=function(){this.__nbindState|=1},i}();_nbind.Wrapper=Wrapper;function makeBound(i,o){var a=function(p){__extends(_,p);function _(t,k,L,O){var C=p.call(this)||this;if(!(C instanceof _))return new(Function.prototype.bind.apply(_,Array.prototype.concat.apply([null],arguments)));var U=k,H=L,W=O;if(t!==_nbind.ptrMarker){var ne=C.__nbindConstructor.apply(C,arguments);U=4096|512,W=HEAPU32[ne/4],H=HEAPU32[ne/4+1]}var m={configurable:!0,enumerable:!1,value:null,writable:!1},he={__nbindFlags:U,__nbindPtr:H};W&&(he.__nbindShared=W,_nbind.mark(C));for(var Ee=0,ve=Object.keys(he);Ee>=1;var a=_nbind.valueList[i];return _nbind.valueList[i]=firstFreeValue,firstFreeValue=i,a}else{if(o)return _nbind.popShared(i,o);throw new Error("Invalid value slot "+i)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(i){return typeof i=="number"?i:pushValue(i)*4096+valueBase}function pop64(i){return i=3?k=Buffer.from(t):k=new Buffer(t),k.copy(p)}else getBuffer(p).set(t)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var i=0,o=dirtyList;i>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(i,o,a,p,_,t){try{Module.dynCall_viiiii(i,o,a,p,_,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_vif(i,o,a){try{Module.dynCall_vif(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_vid(i,o,a){try{Module.dynCall_vid(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_fiff(i,o,a,p){try{return Module.dynCall_fiff(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_vi(i,o){try{Module.dynCall_vi(i,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_vii(i,o,a){try{Module.dynCall_vii(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_ii(i,o){try{return Module.dynCall_ii(i,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_viddi(i,o,a,p,_){try{Module.dynCall_viddi(i,o,a,p,_)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_vidd(i,o,a,p){try{Module.dynCall_vidd(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_iiii(i,o,a,p){try{return Module.dynCall_iiii(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_diii(i,o,a,p){try{return Module.dynCall_diii(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_di(i,o){try{return Module.dynCall_di(i,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_iid(i,o,a){try{return Module.dynCall_iid(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_iii(i,o,a){try{return Module.dynCall_iii(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_viiddi(i,o,a,p,_,t){try{Module.dynCall_viiddi(i,o,a,p,_,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_viiiiii(i,o,a,p,_,t,k){try{Module.dynCall_viiiiii(i,o,a,p,_,t,k)}catch(L){if(typeof L!="number"&&L!=="longjmp")throw L;Module.setThrew(1,0)}}function invoke_dii(i,o,a){try{return Module.dynCall_dii(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_i(i){try{return Module.dynCall_i(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_iiiiii(i,o,a,p,_,t){try{return Module.dynCall_iiiiii(i,o,a,p,_,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_viiid(i,o,a,p,_){try{Module.dynCall_viiid(i,o,a,p,_)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_viififi(i,o,a,p,_,t,k){try{Module.dynCall_viififi(i,o,a,p,_,t,k)}catch(L){if(typeof L!="number"&&L!=="longjmp")throw L;Module.setThrew(1,0)}}function invoke_viii(i,o,a,p){try{Module.dynCall_viii(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_v(i){try{Module.dynCall_v(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viid(i,o,a,p){try{Module.dynCall_viid(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_idd(i,o,a){try{return Module.dynCall_idd(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_viiii(i,o,a,p,_){try{Module.dynCall_viiii(i,o,a,p,_)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:Infinity},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(i,o,a){var p=new i.Int8Array(a),_=new i.Int16Array(a),t=new i.Int32Array(a),k=new i.Uint8Array(a),L=new i.Uint16Array(a),O=new i.Uint32Array(a),C=new i.Float32Array(a),U=new i.Float64Array(a),H=o.DYNAMICTOP_PTR|0,W=o.tempDoublePtr|0,ne=o.ABORT|0,m=o.STACKTOP|0,he=o.STACK_MAX|0,Ee=o.cttz_i8|0,ve=o.___dso_handle|0,se=0,De=0,pe=0,me=0,ie=i.NaN,Oe=i.Infinity,je=0,qe=0,yt=0,gt=0,Xe=0,ut=0,We=i.Math.floor,Ft=i.Math.abs,Jt=i.Math.sqrt,rt=i.Math.pow,Q=i.Math.cos,fe=i.Math.sin,xe=i.Math.tan,oe=i.Math.acos,ze=i.Math.asin,ct=i.Math.atan,Rt=i.Math.atan2,nn=i.Math.exp,an=i.Math.log,Mn=i.Math.ceil,lr=i.Math.imul,ln=i.Math.min,Vt=i.Math.max,Er=i.Math.clz32,w=i.Math.fround,jt=o.abort,Xn=o.assert,vr=o.enlargeMemory,jr=o.getTotalMemory,fr=o.abortOnCannotGrowMemory,zr=o.invoke_viiiii,Xt=o.invoke_vif,wu=o.invoke_vid,d0=o.invoke_fiff,Ro=o.invoke_vi,Qo=o.invoke_vii,Fs=o.invoke_ii,Jo=o.invoke_viddi,Zo=o.invoke_vidd,qt=o.invoke_iiii,xi=o.invoke_diii,lu=o.invoke_di,mi=o.invoke_iid,Dr=o.invoke_iii,$o=o.invoke_viiddi,G0=o.invoke_viiiiii,Uu=o.invoke_dii,Y0=o.invoke_i,Xr=o.invoke_iiiiii,Ao=o.invoke_viiid,Oo=o.invoke_viififi,F0=o.invoke_viii,su=o.invoke_v,ki=o.invoke_viid,Ps=o.invoke_idd,Kl=o.invoke_viiii,P0=o._emscripten_asm_const_iiiii,p0=o._emscripten_asm_const_iiidddddd,Hr=o._emscripten_asm_const_iiiid,Ri=o.__nbind_reference_external,K0=o._emscripten_asm_const_iiiiiiii,yi=o._removeAccessorPrefix,en=o._typeModule,bn=o.__nbind_register_pool,Ai=o.__decorate,gi=o._llvm_stackrestore,Wt=o.___cxa_atexit,Au=o.__extends,eu=o.__nbind_get_value_object,X0=o.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Yi=o._emscripten_set_main_loop_timing,Xl=o.__nbind_register_primitive,Mo=o.__nbind_register_type,ai=o._emscripten_memcpy_big,so=o.__nbind_register_function,Ql=o.___setErrNo,ko=o.__nbind_register_class,Is=o.__nbind_finish,$n=o._abort,el=o._nbind_value,ao=o._llvm_stacksave,I0=o.___syscall54,wl=o._defineHidden,No=o._emscripten_set_main_loop,wt=o._emscripten_get_now,bt=o.__nbind_register_callback_signature,Hn=o._emscripten_asm_const_iiiiii,qr=o.__nbind_free_external,Ki=o._emscripten_asm_const_iiii,Qr=o._emscripten_asm_const_iiididi,Ou=o.___syscall6,h0=o._atexit,Ni=o.___syscall140,v0=o.___syscall146,hs=w(0);let Tt=w(0);function fo(e){e=e|0;var n=0;return n=m,m=m+e|0,m=m+15&-16,n|0}function tl(){return m|0}function Jl(e){e=e|0,m=e}function ju(e,n){e=e|0,n=n|0,m=e,he=n}function vs(e,n){e=e|0,n=n|0,se||(se=e,De=n)}function b0(e){e=e|0,ut=e}function X(){return ut|0}function we(){var e=0,n=0;gr(8104,8,400)|0,gr(8504,408,540)|0,e=9044,n=e+44|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));p[9088]=0,p[9089]=1,t[2273]=0,t[2274]=948,t[2275]=948,Wt(17,8104,ve|0)|0}function Le(e){e=e|0,ac(e+948|0)}function Ne(e){return e=w(e),((mr(e)|0)&2147483647)>>>0>2139095040|0}function dt(e,n,r){e=e|0,n=n|0,r=r|0;e:do if(t[e+(n<<3)+4>>2]|0)e=e+(n<<3)|0;else{if((n|2|0)==3?t[e+60>>2]|0:0){e=e+56|0;break}switch(n|0){case 0:case 2:case 4:case 5:{if(t[e+52>>2]|0){e=e+48|0;break e}break}default:}if(t[e+68>>2]|0){e=e+64|0;break}else{e=(n|1|0)==5?948:r;break}}while(0);return e|0}function Yn(e){e=e|0;var n=0;return n=c_(1e3)|0,Cn(e,(n|0)!=0,2456),t[2276]=(t[2276]|0)+1,gr(n|0,8104,1e3)|0,p[e+2>>0]|0&&(t[n+4>>2]=2,t[n+12>>2]=4),t[n+976>>2]=e,n|0}function Cn(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,Tl(e,5,3197,u)),m=l}function cr(){return Yn(956)|0}function Si(e){e=e|0;var n=0;return n=pn(1e3)|0,Mu(n,e),Cn(t[e+976>>2]|0,1,2456),t[2276]=(t[2276]|0)+1,t[n+944>>2]=0,n|0}function Mu(e,n){e=e|0,n=n|0;var r=0;gr(e|0,n|0,948)|0,sa(e+948|0,n+948|0),r=e+960|0,e=n+960|0,n=r+40|0;do t[r>>2]=t[e>>2],r=r+4|0,e=e+4|0;while((r|0)<(n|0))}function zu(e){e=e|0;var n=0,r=0,u=0,l=0;if(n=e+944|0,r=t[n>>2]|0,r|0&&(Hu(r+948|0,e)|0,t[n>>2]=0),r=Su(e)|0,r|0){n=0;do t[(Ti(e,n)|0)+944>>2]=0,n=n+1|0;while((n|0)!=(r|0))}r=e+948|0,u=t[r>>2]|0,l=e+952|0,n=t[l>>2]|0,(n|0)!=(u|0)&&(t[l>>2]=n+(~((n+-4-u|0)>>>2)<<2)),Lo(r),d_(e),t[2276]=(t[2276]|0)+-1}function Hu(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0;u=t[e>>2]|0,D=e+4|0,r=t[D>>2]|0,s=r;e:do if((u|0)==(r|0))l=u,h=4;else for(e=u;;){if((t[e>>2]|0)==(n|0)){l=e,h=4;break e}if(e=e+4|0,(e|0)==(r|0)){e=0;break}}while(0);return(h|0)==4&&((l|0)!=(r|0)?(u=l+4|0,e=s-u|0,n=e>>2,n&&(Ty(l|0,u|0,e|0)|0,r=t[D>>2]|0),e=l+(n<<2)|0,(r|0)==(e|0)||(t[D>>2]=r+(~((r+-4-e|0)>>>2)<<2)),e=1):e=0),e|0}function Su(e){return e=e|0,(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2|0}function Ti(e,n){e=e|0,n=n|0;var r=0;return r=t[e+948>>2]|0,(t[e+952>>2]|0)-r>>2>>>0>n>>>0?e=t[r+(n<<2)>>2]|0:e=0,e|0}function Lo(e){e=e|0;var n=0,r=0,u=0,l=0;u=m,m=m+32|0,n=u,l=t[e>>2]|0,r=(t[e+4>>2]|0)-l|0,((t[e+8>>2]|0)-l|0)>>>0>r>>>0&&(l=r>>2,Y(n,l,l,e+8|0),ri(e,n),ii(n)),m=u}function ku(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0;N=Su(e)|0;do if(N|0){if((t[(Ti(e,0)|0)+944>>2]|0)==(e|0)){if(!(Hu(e+948|0,n)|0))break;gr(n+400|0,8504,540)|0,t[n+944>>2]=0,Qn(e);break}h=t[(t[e+976>>2]|0)+12>>2]|0,D=e+948|0,S=(h|0)==0,r=0,s=0;do u=t[(t[D>>2]|0)+(s<<2)>>2]|0,(u|0)==(n|0)?Qn(e):(l=Si(u)|0,t[(t[D>>2]|0)+(r<<2)>>2]=l,t[l+944>>2]=e,S||PE[h&15](u,l,e,r),r=r+1|0),s=s+1|0;while((s|0)!=(N|0));if(r>>>0>>0){S=e+948|0,D=e+952|0,h=r,r=t[D>>2]|0;do s=(t[S>>2]|0)+(h<<2)|0,u=s+4|0,l=r-u|0,n=l>>2,n&&(Ty(s|0,u|0,l|0)|0,r=t[D>>2]|0),l=r,u=s+(n<<2)|0,(l|0)!=(u|0)&&(r=l+(~((l+-4-u|0)>>>2)<<2)|0,t[D>>2]=r),h=h+1|0;while((h|0)!=(N|0))}}while(0)}function co(e){e=e|0;var n=0,r=0,u=0,l=0;qu(e,(Su(e)|0)==0,2491),qu(e,(t[e+944>>2]|0)==0,2545),n=e+948|0,r=t[n>>2]|0,u=e+952|0,l=t[u>>2]|0,(l|0)!=(r|0)&&(t[u>>2]=l+(~((l+-4-r|0)>>>2)<<2)),Lo(n),n=e+976|0,r=t[n>>2]|0,gr(e|0,8104,1e3)|0,p[r+2>>0]|0&&(t[e+4>>2]=2,t[e+12>>2]=4),t[n>>2]=r}function qu(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,pr(e,5,3197,u)),m=l}function Pa(){return t[2276]|0}function m0(){var e=0;return e=c_(20)|0,ia((e|0)!=0,2592),t[2277]=(t[2277]|0)+1,t[e>>2]=t[239],t[e+4>>2]=t[240],t[e+8>>2]=t[241],t[e+12>>2]=t[242],t[e+16>>2]=t[243],e|0}function ia(e,n){e=e|0,n=n|0;var r=0,u=0;u=m,m=m+16|0,r=u,e||(t[r>>2]=n,pr(0,5,3197,r)),m=u}function Q0(e){e=e|0,d_(e),t[2277]=(t[2277]|0)+-1}function ua(e,n){e=e|0,n=n|0;var r=0;n?(qu(e,(Su(e)|0)==0,2629),r=1):(r=0,n=0),t[e+964>>2]=n,t[e+988>>2]=r}function Ia(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,s=u+8|0,l=u+4|0,h=u,t[l>>2]=n,qu(e,(t[n+944>>2]|0)==0,2709),qu(e,(t[e+964>>2]|0)==0,2763),ms(e),n=e+948|0,t[h>>2]=(t[n>>2]|0)+(r<<2),t[s>>2]=t[h>>2],S0(n,s,l)|0,t[(t[l>>2]|0)+944>>2]=e,Qn(e),m=u}function ms(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;if(r=Su(e)|0,r|0?(t[(Ti(e,0)|0)+944>>2]|0)!=(e|0):0){u=t[(t[e+976>>2]|0)+12>>2]|0,l=e+948|0,s=(u|0)==0,n=0;do h=t[(t[l>>2]|0)+(n<<2)>>2]|0,D=Si(h)|0,t[(t[l>>2]|0)+(n<<2)>>2]=D,t[D+944>>2]=e,s||PE[u&15](h,D,e,n),n=n+1|0;while((n|0)!=(r|0))}}function S0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0;Je=m,m=m+64|0,I=Je+52|0,D=Je+48|0,K=Je+28|0,be=Je+24|0,Se=Je+20|0,ye=Je,u=t[e>>2]|0,s=u,n=u+((t[n>>2]|0)-s>>2<<2)|0,u=e+4|0,l=t[u>>2]|0,h=e+8|0;do if(l>>>0<(t[h>>2]|0)>>>0){if((n|0)==(l|0)){t[n>>2]=t[r>>2],t[u>>2]=(t[u>>2]|0)+4;break}Vr(e,n,l,n+4|0),n>>>0<=r>>>0&&(r=(t[u>>2]|0)>>>0>r>>>0?r+4|0:r),t[n>>2]=t[r>>2]}else{u=(l-s>>2)+1|0,l=R0(e)|0,l>>>0>>0&&hi(e),M=t[e>>2]|0,N=(t[h>>2]|0)-M|0,s=N>>1,Y(ye,N>>2>>>0>>1>>>0?s>>>0>>0?u:s:l,n-M>>2,e+8|0),M=ye+8|0,u=t[M>>2]|0,s=ye+12|0,N=t[s>>2]|0,h=N,S=u;do if((u|0)==(N|0)){if(N=ye+4|0,u=t[N>>2]|0,Ge=t[ye>>2]|0,l=Ge,u>>>0<=Ge>>>0){u=h-l>>1,u=(u|0)==0?1:u,Y(K,u,u>>>2,t[ye+16>>2]|0),t[be>>2]=t[N>>2],t[Se>>2]=t[M>>2],t[D>>2]=t[be>>2],t[I>>2]=t[Se>>2],Di(K,D,I),u=t[ye>>2]|0,t[ye>>2]=t[K>>2],t[K>>2]=u,u=K+4|0,Ge=t[N>>2]|0,t[N>>2]=t[u>>2],t[u>>2]=Ge,u=K+8|0,Ge=t[M>>2]|0,t[M>>2]=t[u>>2],t[u>>2]=Ge,u=K+12|0,Ge=t[s>>2]|0,t[s>>2]=t[u>>2],t[u>>2]=Ge,ii(K),u=t[M>>2]|0;break}s=u,h=((s-l>>2)+1|0)/-2|0,D=u+(h<<2)|0,l=S-s|0,s=l>>2,s&&(Ty(D|0,u|0,l|0)|0,u=t[N>>2]|0),Ge=D+(s<<2)|0,t[M>>2]=Ge,t[N>>2]=u+(h<<2),u=Ge}while(0);t[u>>2]=t[r>>2],t[M>>2]=(t[M>>2]|0)+4,n=at(e,ye,n)|0,ii(ye)}while(0);return m=Je,n|0}function Qn(e){e=e|0;var n=0;do{if(n=e+984|0,p[n>>0]|0)break;p[n>>0]=1,C[e+504>>2]=w(ie),e=t[e+944>>2]|0}while((e|0)!=0)}function ac(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),_t(r))}function fi(e){return e=e|0,t[e+944>>2]|0}function $r(e){e=e|0,qu(e,(t[e+964>>2]|0)!=0,2832),Qn(e)}function Zl(e){return e=e|0,(p[e+984>>0]|0)!=0|0}function oa(e,n){e=e|0,n=n|0,gL(e,n,400)|0&&(gr(e|0,n|0,400)|0,Qn(e))}function pf(e){e=e|0;var n=Tt;return n=w(C[e+44>>2]),e=Ne(n)|0,w(e?w(0):n)}function bs(e){e=e|0;var n=Tt;return n=w(C[e+48>>2]),Ne(n)|0&&(n=p[(t[e+976>>2]|0)+2>>0]|0?w(1):w(0)),w(n)}function ba(e,n){e=e|0,n=n|0,t[e+980>>2]=n}function Bs(e){return e=e|0,t[e+980>>2]|0}function y0(e,n){e=e|0,n=n|0;var r=0;r=e+4|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Us(e){return e=e|0,t[e+4>>2]|0}function ji(e,n){e=e|0,n=n|0;var r=0;r=e+8|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function B(e){return e=e|0,t[e+8>>2]|0}function z(e,n){e=e|0,n=n|0;var r=0;r=e+12|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function G(e){return e=e|0,t[e+12>>2]|0}function $(e,n){e=e|0,n=n|0;var r=0;r=e+16|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Te(e){return e=e|0,t[e+16>>2]|0}function ge(e,n){e=e|0,n=n|0;var r=0;r=e+20|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Re(e){return e=e|0,t[e+20>>2]|0}function Z(e,n){e=e|0,n=n|0;var r=0;r=e+24|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function ke(e){return e=e|0,t[e+24>>2]|0}function Qe(e,n){e=e|0,n=n|0;var r=0;r=e+28|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function ht(e){return e=e|0,t[e+28>>2]|0}function ue(e,n){e=e|0,n=n|0;var r=0;r=e+32|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function He(e){return e=e|0,t[e+32>>2]|0}function nt(e,n){e=e|0,n=n|0;var r=0;r=e+36|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Ct(e){return e=e|0,t[e+36>>2]|0}function Mt(e,n){e=e|0,n=w(n);var r=0;r=e+40|0,w(C[r>>2])!=n&&(C[r>>2]=n,Qn(e))}function It(e,n){e=e|0,n=w(n);var r=0;r=e+44|0,w(C[r>>2])!=n&&(C[r>>2]=n,Qn(e))}function sn(e,n){e=e|0,n=w(n);var r=0;r=e+48|0,w(C[r>>2])!=n&&(C[r>>2]=n,Qn(e))}function rn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+52|0,l=e+56|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function Lt(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+52|0,r=e+56|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Ne(n)|0,t[r>>2]=u?3:2,Qn(e))}function Dn(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+52|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function dr(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=(s^1)&1,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function er(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=s?0:2,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function Cr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+132+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function An(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=(s^1)&1,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function Nr(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=s?0:2,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function g0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+60+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Lr(e,n){e=e|0,n=n|0;var r=0;r=e+60+(n<<3)+4|0,(t[r>>2]|0)!=3&&(C[e+60+(n<<3)>>2]=w(ie),t[r>>2]=3,Qn(e))}function it(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=(s^1)&1,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function Dt(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=s?0:2,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function $e(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+204+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Pt(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=(s^1)&1,l=e+276+(n<<3)|0,n=e+276+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function un(e,n){return e=e|0,n=n|0,w(C[e+276+(n<<3)>>2])}function fn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+348|0,l=e+352|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function Jn(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+348|0,r=e+352|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Ne(n)|0,t[r>>2]=u?3:2,Qn(e))}function wr(e){e=e|0;var n=0;n=e+352|0,(t[n>>2]|0)!=3&&(C[e+348>>2]=w(ie),t[n>>2]=3,Qn(e))}function au(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+348|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Nu(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+356|0,l=e+360|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function T0(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+356|0,r=e+360|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Ne(n)|0,t[r>>2]=u?3:2,Qn(e))}function J0(e){e=e|0;var n=0;n=e+360|0,(t[n>>2]|0)!=3&&(C[e+356>>2]=w(ie),t[n>>2]=3,Qn(e))}function Lu(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+356|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function _i(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+364|0,l=e+368|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function Fo(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=s?0:2,u=e+364|0,l=e+368|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function nl(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+364|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function hf(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+372|0,l=e+376|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function Sl(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=s?0:2,u=e+372|0,l=e+376|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function vf(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+372|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Po(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+380|0,l=e+384|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function ys(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=s?0:2,u=e+380|0,l=e+384|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function js(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+380|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Io(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+388|0,l=e+392|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function bo(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=s?0:2,u=e+388|0,l=e+392|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function gs(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+388|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Qu(e,n){e=e|0,n=w(n);var r=0;r=e+396|0,w(C[r>>2])!=n&&(C[r>>2]=n,Qn(e))}function Tu(e){return e=e|0,w(C[e+396>>2])}function Ei(e){return e=e|0,w(C[e+400>>2])}function C0(e){return e=e|0,w(C[e+404>>2])}function Z0(e){return e=e|0,w(C[e+408>>2])}function Bo(e){return e=e|0,w(C[e+412>>2])}function la(e){return e=e|0,w(C[e+416>>2])}function $l(e){return e=e|0,w(C[e+420>>2])}function tu(e,n){switch(e=e|0,n=n|0,qu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+424+(n<<2)>>2])}function ei(e,n){switch(e=e|0,n=n|0,qu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+448+(n<<2)>>2])}function po(e,n){switch(e=e|0,n=n|0,qu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+472+(n<<2)>>2])}function Bi(e,n){e=e|0,n=n|0;var r=0,u=Tt;return r=t[e+4>>2]|0,(r|0)==(t[n+4>>2]|0)?r?(u=w(C[e>>2]),e=w(Ft(w(u-w(C[n>>2]))))>2]=0,t[u+4>>2]=0,t[u+8>>2]=0,X0(u|0,e|0,n|0,0),pr(e,3,(p[u+11>>0]|0)<0?t[u>>2]|0:u,r),zL(u),m=r}function $0(e,n,r,u){e=w(e),n=w(n),r=r|0,u=u|0;var l=Tt;e=w(e*n),l=w(OE(e,w(1)));do if(Ci(l,w(0))|0)e=w(e-l);else{if(e=w(e-l),Ci(l,w(1))|0){e=w(e+w(1));break}if(r){e=w(e+w(1));break}u||(l>w(.5)?l=w(1):(u=Ci(l,w(.5))|0,l=w(u?1:0)),e=w(e+l))}while(0);return w(e/n)}function eo(e,n,r,u,l,s,h,D,S,N,M,I,K){e=e|0,n=w(n),r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,D=w(D),S=w(S),N=w(N),M=w(M),I=w(I),K=K|0;var be=0,Se=Tt,ye=Tt,Je=Tt,Ge=Tt,ft=Tt,Me=Tt;return S>2]),Se!=w(0)):0)?(Je=w($0(n,Se,0,0)),Ge=w($0(u,Se,0,0)),ye=w($0(s,Se,0,0)),Se=w($0(D,Se,0,0))):(ye=s,Je=n,Se=D,Ge=u),(l|0)==(e|0)?be=Ci(ye,Je)|0:be=0,(h|0)==(r|0)?K=Ci(Se,Ge)|0:K=0,((be?0:(ft=w(n-M),!(Ce(e,ft,S)|0)))?!(et(e,ft,l,S)|0):0)?be=Ye(e,ft,l,s,S)|0:be=1,((K?0:(Me=w(u-I),!(Ce(r,Me,N)|0)))?!(et(r,Me,h,N)|0):0)?K=Ye(r,Me,h,D,N)|0:K=1,K=be&K),K|0}function Ce(e,n,r){return e=e|0,n=w(n),r=w(r),(e|0)==1?e=Ci(n,r)|0:e=0,e|0}function et(e,n,r,u){return e=e|0,n=w(n),r=r|0,u=w(u),(e|0)==2&(r|0)==0?n>=u?e=1:e=Ci(n,u)|0:e=0,e|0}function Ye(e,n,r,u,l){return e=e|0,n=w(n),r=r|0,u=w(u),l=w(l),(e|0)==2&(r|0)==2&u>n?l<=n?e=1:e=Ci(n,l)|0:e=0,e|0}function Yt(e,n,r,u,l,s,h,D,S,N,M){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,N=N|0,M=M|0;var I=0,K=0,be=0,Se=0,ye=Tt,Je=Tt,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0,uu=Tt,os=Tt,ls=Tt,ss=0,ea=0;Nn=m,m=m+160|0,gn=Nn+152|0,In=Nn+120|0,Br=Nn+104|0,Me=Nn+72|0,Se=Nn+56|0,Zt=Nn+8|0,ft=Nn,Pe=(t[2279]|0)+1|0,t[2279]=Pe,_r=e+984|0,((p[_r>>0]|0)!=0?(t[e+512>>2]|0)!=(t[2278]|0):0)?Ge=4:(t[e+516>>2]|0)==(u|0)?Pr=0:Ge=4,(Ge|0)==4&&(t[e+520>>2]=0,t[e+924>>2]=-1,t[e+928>>2]=-1,C[e+932>>2]=w(-1),C[e+936>>2]=w(-1),Pr=1);e:do if(t[e+964>>2]|0)if(ye=w(Kt(e,2,h)),Je=w(Kt(e,0,h)),I=e+916|0,ls=w(C[I>>2]),os=w(C[e+920>>2]),uu=w(C[e+932>>2]),eo(l,n,s,r,t[e+924>>2]|0,ls,t[e+928>>2]|0,os,uu,w(C[e+936>>2]),ye,Je,M)|0)Ge=22;else if(be=t[e+520>>2]|0,!be)Ge=21;else for(K=0;;){if(I=e+524+(K*24|0)|0,uu=w(C[I>>2]),os=w(C[e+524+(K*24|0)+4>>2]),ls=w(C[e+524+(K*24|0)+16>>2]),eo(l,n,s,r,t[e+524+(K*24|0)+8>>2]|0,uu,t[e+524+(K*24|0)+12>>2]|0,os,ls,w(C[e+524+(K*24|0)+20>>2]),ye,Je,M)|0){Ge=22;break e}if(K=K+1|0,K>>>0>=be>>>0){Ge=21;break}}else{if(S){if(I=e+916|0,!(Ci(w(C[I>>2]),n)|0)){Ge=21;break}if(!(Ci(w(C[e+920>>2]),r)|0)){Ge=21;break}if((t[e+924>>2]|0)!=(l|0)){Ge=21;break}I=(t[e+928>>2]|0)==(s|0)?I:0,Ge=22;break}if(be=t[e+520>>2]|0,!be)Ge=21;else for(K=0;;){if(I=e+524+(K*24|0)|0,((Ci(w(C[I>>2]),n)|0?Ci(w(C[e+524+(K*24|0)+4>>2]),r)|0:0)?(t[e+524+(K*24|0)+8>>2]|0)==(l|0):0)?(t[e+524+(K*24|0)+12>>2]|0)==(s|0):0){Ge=22;break e}if(K=K+1|0,K>>>0>=be>>>0){Ge=21;break}}}while(0);do if((Ge|0)==21)p[11697]|0?(I=0,Ge=28):(I=0,Ge=31);else if((Ge|0)==22){if(K=(p[11697]|0)!=0,!((I|0)!=0&(Pr^1)))if(K){Ge=28;break}else{Ge=31;break}Se=I+16|0,t[e+908>>2]=t[Se>>2],be=I+20|0,t[e+912>>2]=t[be>>2],(p[11698]|0)==0|K^1||(t[ft>>2]=Wr(Pe)|0,t[ft+4>>2]=Pe,pr(e,4,2972,ft),K=t[e+972>>2]|0,K|0&&F1[K&127](e),l=xn(l,S)|0,s=xn(s,S)|0,ea=+w(C[Se>>2]),ss=+w(C[be>>2]),t[Zt>>2]=l,t[Zt+4>>2]=s,U[Zt+8>>3]=+n,U[Zt+16>>3]=+r,U[Zt+24>>3]=ea,U[Zt+32>>3]=ss,t[Zt+40>>2]=N,pr(e,4,2989,Zt))}while(0);return(Ge|0)==28&&(K=Wr(Pe)|0,t[Se>>2]=K,t[Se+4>>2]=Pe,t[Se+8>>2]=Pr?3047:11699,pr(e,4,3038,Se),K=t[e+972>>2]|0,K|0&&F1[K&127](e),Zt=xn(l,S)|0,Ge=xn(s,S)|0,t[Me>>2]=Zt,t[Me+4>>2]=Ge,U[Me+8>>3]=+n,U[Me+16>>3]=+r,t[Me+24>>2]=N,pr(e,4,3049,Me),Ge=31),(Ge|0)==31&&(yu(e,n,r,u,l,s,h,D,S,M),p[11697]|0&&(K=t[2279]|0,Zt=Wr(K)|0,t[Br>>2]=Zt,t[Br+4>>2]=K,t[Br+8>>2]=Pr?3047:11699,pr(e,4,3083,Br),K=t[e+972>>2]|0,K|0&&F1[K&127](e),Zt=xn(l,S)|0,Br=xn(s,S)|0,ss=+w(C[e+908>>2]),ea=+w(C[e+912>>2]),t[In>>2]=Zt,t[In+4>>2]=Br,U[In+8>>3]=ss,U[In+16>>3]=ea,t[In+24>>2]=N,pr(e,4,3092,In)),t[e+516>>2]=u,I||(K=e+520|0,I=t[K>>2]|0,(I|0)==16&&(p[11697]|0&&pr(e,4,3124,gn),t[K>>2]=0,I=0),S?I=e+916|0:(t[K>>2]=I+1,I=e+524+(I*24|0)|0),C[I>>2]=n,C[I+4>>2]=r,t[I+8>>2]=l,t[I+12>>2]=s,t[I+16>>2]=t[e+908>>2],t[I+20>>2]=t[e+912>>2],I=0)),S&&(t[e+416>>2]=t[e+908>>2],t[e+420>>2]=t[e+912>>2],p[e+985>>0]=1,p[_r>>0]=0),t[2279]=(t[2279]|0)+-1,t[e+512>>2]=t[2278],m=Nn,Pr|(I|0)==0|0}function Kt(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return u=w(zi(e,n,r)),w(u+w(A0(e,n,r)))}function pr(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=m,m=m+16|0,l=s,t[l>>2]=u,e?u=t[e+976>>2]|0:u=0,zs(u,e,n,r,l),m=s}function Wr(e){return e=e|0,(e>>>0>60?3201:3201+(60-e)|0)|0}function xn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+32|0,r=l+12|0,u=l,t[r>>2]=t[254],t[r+4>>2]=t[255],t[r+8>>2]=t[256],t[u>>2]=t[257],t[u+4>>2]=t[258],t[u+8>>2]=t[259],(e|0)>2?e=11699:e=t[(n?u:r)+(e<<2)>>2]|0,m=l,e|0}function yu(e,n,r,u,l,s,h,D,S,N){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,N=N|0;var M=0,I=0,K=0,be=0,Se=Tt,ye=Tt,Je=Tt,Ge=Tt,ft=Tt,Me=Tt,Pe=Tt,Zt=0,Br=0,In=0,gn=Tt,_r=Tt,Pr=0,Nn=Tt,uu=0,os=0,ls=0,ss=0,ea=0,n2=0,r2=0,uf=0,i2=0,Fc=0,Pc=0,u2=0,o2=0,l2=0,vi=0,of=0,s2=0,Yf=0,a2=Tt,f2=Tt,Ic=Tt,bc=Tt,Kf=Tt,Hl=0,La=0,Ns=0,lf=0,I1=0,b1=Tt,Bc=Tt,B1=Tt,U1=Tt,ql=Tt,_l=Tt,sf=0,hu=Tt,j1=Tt,as=Tt,Xf=Tt,fs=Tt,Qf=Tt,z1=0,H1=0,Jf=Tt,Wl=Tt,af=0,q1=0,W1=0,V1=0,Sr=Tt,Bu=0,El=0,cs=0,Vl=0,Or=0,Bn=0,ff=0,mn=Tt,G1=0,f0=0;ff=m,m=m+16|0,Hl=ff+12|0,La=ff+8|0,Ns=ff+4|0,lf=ff,qu(e,(l|0)==0|(Ne(n)|0)^1,3326),qu(e,(s|0)==0|(Ne(r)|0)^1,3406),El=Cl(e,u)|0,t[e+496>>2]=El,Or=B0(2,El)|0,Bn=B0(0,El)|0,C[e+440>>2]=w(zi(e,Or,h)),C[e+444>>2]=w(A0(e,Or,h)),C[e+428>>2]=w(zi(e,Bn,h)),C[e+436>>2]=w(A0(e,Bn,h)),C[e+464>>2]=w(O0(e,Or)),C[e+468>>2]=w(ho(e,Or)),C[e+452>>2]=w(O0(e,Bn)),C[e+460>>2]=w(ho(e,Bn)),C[e+488>>2]=w(Pu(e,Or,h)),C[e+492>>2]=w(Zu(e,Or,h)),C[e+476>>2]=w(Pu(e,Bn,h)),C[e+484>>2]=w(Zu(e,Bn,h));do if(t[e+964>>2]|0)es(e,n,r,l,s,h,D);else{if(cs=e+948|0,Vl=(t[e+952>>2]|0)-(t[cs>>2]|0)>>2,!Vl){_s(e,n,r,l,s,h,D);break}if(S?0:aa(e,n,r,l,s,h,D)|0)break;ms(e),of=e+508|0,p[of>>0]=0,Or=B0(t[e+4>>2]|0,El)|0,Bn=gf(Or,El)|0,Bu=Hi(Or)|0,s2=t[e+8>>2]|0,q1=e+28|0,Yf=(t[q1>>2]|0)!=0,fs=Bu?h:D,Jf=Bu?D:h,a2=w($u(e,Or,h)),f2=w(Es(e,Or,h)),Se=w($u(e,Bn,h)),Qf=w(Rr(e,Or,h)),Wl=w(Rr(e,Bn,h)),In=Bu?l:s,af=Bu?s:l,Sr=Bu?Qf:Wl,ft=Bu?Wl:Qf,Xf=w(Kt(e,2,h)),Ge=w(Kt(e,0,h)),ye=w(w(Rn(e+364|0,h))-Sr),Je=w(w(Rn(e+380|0,h))-Sr),Me=w(w(Rn(e+372|0,D))-ft),Pe=w(w(Rn(e+388|0,D))-ft),Ic=Bu?ye:Me,bc=Bu?Je:Pe,Xf=w(n-Xf),n=w(Xf-Sr),Ne(n)|0?Sr=n:Sr=w(Ru(w(Xp(n,Je)),ye)),j1=w(r-Ge),n=w(j1-ft),Ne(n)|0?as=n:as=w(Ru(w(Xp(n,Pe)),Me)),ye=Bu?Sr:as,hu=Bu?as:Sr;e:do if((In|0)==1)for(u=0,I=0;;){if(M=Ti(e,I)|0,!u)(w(nu(M))>w(0)?w(fu(M))>w(0):0)?u=M:u=0;else if(to(M)|0){be=0;break e}if(I=I+1|0,I>>>0>=Vl>>>0){be=u;break}}else be=0;while(0);Zt=be+500|0,Br=be+504|0,u=0,M=0,n=w(0),K=0;do{if(I=t[(t[cs>>2]|0)+(K<<2)>>2]|0,(t[I+36>>2]|0)==1)Li(I),p[I+985>>0]=1,p[I+984>>0]=0;else{Jr(I),S&&x0(I,Cl(I,El)|0,ye,hu,Sr);do if((t[I+24>>2]|0)!=1)if((I|0)==(be|0)){t[Zt>>2]=t[2278],C[Br>>2]=w(0);break}else{ni(e,I,Sr,l,as,Sr,as,s,El,N);break}else M|0&&(t[M+960>>2]=I),t[I+960>>2]=0,M=I,u=(u|0)==0?I:u;while(0);_l=w(C[I+504>>2]),n=w(n+w(_l+w(Kt(I,Or,Sr))))}K=K+1|0}while((K|0)!=(Vl|0));for(ls=n>ye,sf=Yf&((In|0)==2&ls)?1:In,uu=(af|0)==1,ea=uu&(S^1),n2=(sf|0)==1,r2=(sf|0)==2,uf=976+(Or<<2)|0,i2=(af|2|0)==2,l2=uu&(Yf^1),Fc=1040+(Bn<<2)|0,Pc=1040+(Or<<2)|0,u2=976+(Bn<<2)|0,o2=(af|0)!=1,ls=Yf&((In|0)!=0&ls),os=e+976|0,uu=uu^1,n=ye,Pr=0,ss=0,_l=w(0),Kf=w(0);;){e:do if(Pr>>>0>>0)for(Br=t[cs>>2]|0,K=0,Pe=w(0),Me=w(0),Je=w(0),ye=w(0),I=0,M=0,be=Pr;;){if(Zt=t[Br+(be<<2)>>2]|0,(t[Zt+36>>2]|0)!=1?(t[Zt+940>>2]=ss,(t[Zt+24>>2]|0)!=1):0){if(Ge=w(Kt(Zt,Or,Sr)),vi=t[uf>>2]|0,r=w(Rn(Zt+380+(vi<<3)|0,fs)),ft=w(C[Zt+504>>2]),r=w(Xp(r,ft)),r=w(Ru(w(Rn(Zt+364+(vi<<3)|0,fs)),r)),Yf&(K|0)!=0&w(Ge+w(Me+r))>n){s=K,Ge=Pe,In=be;break e}Ge=w(Ge+r),r=w(Me+Ge),Ge=w(Pe+Ge),to(Zt)|0&&(Je=w(Je+w(nu(Zt))),ye=w(ye-w(ft*w(fu(Zt))))),M|0&&(t[M+960>>2]=Zt),t[Zt+960>>2]=0,K=K+1|0,M=Zt,I=(I|0)==0?Zt:I}else Ge=Pe,r=Me;if(be=be+1|0,be>>>0>>0)Pe=Ge,Me=r;else{s=K,In=be;break}}else s=0,Ge=w(0),Je=w(0),ye=w(0),I=0,In=Pr;while(0);vi=Je>w(0)&Jew(0)&yebc&((Ne(bc)|0)^1))n=bc,vi=51;else if(p[(t[os>>2]|0)+3>>0]|0)vi=51;else{if(gn!=w(0)?w(nu(e))!=w(0):0){vi=53;break}n=Ge,vi=53}while(0);if((vi|0)==51&&(vi=0,Ne(n)|0?vi=53:(_r=w(n-Ge),Nn=n)),(vi|0)==53&&(vi=0,Ge>2]|0,be=_rw(0),Me=w(_r/gn),Je=w(0),Ge=w(0),n=w(0),M=I;do r=w(Rn(M+380+(K<<3)|0,fs)),ye=w(Rn(M+364+(K<<3)|0,fs)),ye=w(Xp(r,w(Ru(ye,w(C[M+504>>2]))))),be?(r=w(ye*w(fu(M))),(r!=w(-0)?(mn=w(ye-w(ft*r)),b1=w(Kn(M,Or,mn,Nn,Sr)),mn!=b1):0)&&(Je=w(Je-w(b1-ye)),n=w(n+r))):((Zt?(Bc=w(nu(M)),Bc!=w(0)):0)?(mn=w(ye+w(Me*Bc)),B1=w(Kn(M,Or,mn,Nn,Sr)),mn!=B1):0)&&(Je=w(Je-w(B1-ye)),Ge=w(Ge-Bc)),M=t[M+960>>2]|0;while((M|0)!=0);if(n=w(Pe+n),ye=w(_r+Je),I1)n=w(0);else{ft=w(gn+Ge),be=t[uf>>2]|0,Zt=yew(0),ft=w(ye/ft),n=w(0);do{mn=w(Rn(I+380+(be<<3)|0,fs)),Je=w(Rn(I+364+(be<<3)|0,fs)),Je=w(Xp(mn,w(Ru(Je,w(C[I+504>>2]))))),Zt?(mn=w(Je*w(fu(I))),ye=w(-mn),mn!=w(-0)?(mn=w(Me*ye),ye=w(Kn(I,Or,w(Je+(Br?ye:mn)),Nn,Sr))):ye=Je):(K?(U1=w(nu(I)),U1!=w(0)):0)?ye=w(Kn(I,Or,w(Je+w(ft*U1)),Nn,Sr)):ye=Je,n=w(n-w(ye-Je)),Ge=w(Kt(I,Or,Sr)),r=w(Kt(I,Bn,Sr)),ye=w(ye+Ge),C[La>>2]=ye,t[lf>>2]=1,Je=w(C[I+396>>2]);e:do if(Ne(Je)|0){M=Ne(hu)|0;do if(!M){if(ls|(Wu(I,Bn,hu)|0|uu)||(e0(e,I)|0)!=4||(t[(_0(I,Bn)|0)+4>>2]|0)==3||(t[(E0(I,Bn)|0)+4>>2]|0)==3)break;C[Hl>>2]=hu,t[Ns>>2]=1;break e}while(0);if(Wu(I,Bn,hu)|0){M=t[I+992+(t[u2>>2]<<2)>>2]|0,mn=w(r+w(Rn(M,hu))),C[Hl>>2]=mn,M=o2&(t[M+4>>2]|0)==2,t[Ns>>2]=((Ne(mn)|0|M)^1)&1;break}else{C[Hl>>2]=hu,t[Ns>>2]=M?0:2;break}}else mn=w(ye-Ge),gn=w(mn/Je),mn=w(Je*mn),t[Ns>>2]=1,C[Hl>>2]=w(r+(Bu?gn:mn));while(0);Fn(I,Or,Nn,Sr,lf,La),Fn(I,Bn,hu,Sr,Ns,Hl);do if(Wu(I,Bn,hu)|0?0:(e0(e,I)|0)==4){if((t[(_0(I,Bn)|0)+4>>2]|0)==3){M=0;break}M=(t[(E0(I,Bn)|0)+4>>2]|0)!=3}else M=0;while(0);mn=w(C[La>>2]),gn=w(C[Hl>>2]),G1=t[lf>>2]|0,f0=t[Ns>>2]|0,Yt(I,Bu?mn:gn,Bu?gn:mn,El,Bu?G1:f0,Bu?f0:G1,Sr,as,S&(M^1),3488,N)|0,p[of>>0]=p[of>>0]|p[I+508>>0],I=t[I+960>>2]|0}while((I|0)!=0)}}else n=w(0);if(n=w(_r+n),f0=n>0]=f0|k[of>>0],r2&n>w(0)?(M=t[uf>>2]|0,((t[e+364+(M<<3)+4>>2]|0)!=0?(ql=w(Rn(e+364+(M<<3)|0,fs)),ql>=w(0)):0)?ye=w(Ru(w(0),w(ql-w(Nn-n)))):ye=w(0)):ye=n,Zt=Pr>>>0>>0,Zt){be=t[cs>>2]|0,K=Pr,M=0;do I=t[be+(K<<2)>>2]|0,t[I+24>>2]|0||(M=((t[(_0(I,Or)|0)+4>>2]|0)==3&1)+M|0,M=M+((t[(E0(I,Or)|0)+4>>2]|0)==3&1)|0),K=K+1|0;while((K|0)!=(In|0));M?(Ge=w(0),r=w(0)):vi=101}else vi=101;e:do if((vi|0)==101)switch(vi=0,s2|0){case 1:{M=0,Ge=w(ye*w(.5)),r=w(0);break e}case 2:{M=0,Ge=ye,r=w(0);break e}case 3:{if(s>>>0<=1){M=0,Ge=w(0),r=w(0);break e}r=w((s+-1|0)>>>0),M=0,Ge=w(0),r=w(w(Ru(ye,w(0)))/r);break e}case 5:{r=w(ye/w((s+1|0)>>>0)),M=0,Ge=r;break e}case 4:{r=w(ye/w(s>>>0)),M=0,Ge=w(r*w(.5));break e}default:{M=0,Ge=w(0),r=w(0);break e}}while(0);if(n=w(a2+Ge),Zt){Je=w(ye/w(M|0)),K=t[cs>>2]|0,I=Pr,ye=w(0);do{M=t[K+(I<<2)>>2]|0;e:do if((t[M+36>>2]|0)!=1){switch(t[M+24>>2]|0){case 1:{if(ae(M,Or)|0){if(!S)break e;mn=w(re(M,Or,Nn)),mn=w(mn+w(O0(e,Or))),mn=w(mn+w(zi(M,Or,Sr))),C[M+400+(t[Pc>>2]<<2)>>2]=mn;break e}break}case 0:if(f0=(t[(_0(M,Or)|0)+4>>2]|0)==3,mn=w(Je+n),n=f0?mn:n,S&&(f0=M+400+(t[Pc>>2]<<2)|0,C[f0>>2]=w(n+w(C[f0>>2]))),f0=(t[(E0(M,Or)|0)+4>>2]|0)==3,mn=w(Je+n),n=f0?mn:n,ea){mn=w(r+w(Kt(M,Or,Sr))),ye=hu,n=w(n+w(mn+w(C[M+504>>2])));break e}else{n=w(n+w(r+w(Fe(M,Or,Sr)))),ye=w(Ru(ye,w(Fe(M,Bn,Sr))));break e}default:}S&&(mn=w(Ge+w(O0(e,Or))),f0=M+400+(t[Pc>>2]<<2)|0,C[f0>>2]=w(mn+w(C[f0>>2])))}while(0);I=I+1|0}while((I|0)!=(In|0))}else ye=w(0);if(r=w(f2+n),i2?Ge=w(w(Kn(e,Bn,w(Wl+ye),Jf,h))-Wl):Ge=hu,Je=w(w(Kn(e,Bn,w(Wl+(l2?hu:ye)),Jf,h))-Wl),Zt&S){I=Pr;do{K=t[(t[cs>>2]|0)+(I<<2)>>2]|0;do if((t[K+36>>2]|0)!=1){if((t[K+24>>2]|0)==1){if(ae(K,Bn)|0){if(mn=w(re(K,Bn,hu)),mn=w(mn+w(O0(e,Bn))),mn=w(mn+w(zi(K,Bn,Sr))),M=t[Fc>>2]|0,C[K+400+(M<<2)>>2]=mn,!(Ne(mn)|0))break}else M=t[Fc>>2]|0;mn=w(O0(e,Bn)),C[K+400+(M<<2)>>2]=w(mn+w(zi(K,Bn,Sr)));break}M=e0(e,K)|0;do if((M|0)==4){if((t[(_0(K,Bn)|0)+4>>2]|0)==3){vi=139;break}if((t[(E0(K,Bn)|0)+4>>2]|0)==3){vi=139;break}if(Wu(K,Bn,hu)|0){n=Se;break}G1=t[K+908+(t[uf>>2]<<2)>>2]|0,t[Hl>>2]=G1,n=w(C[K+396>>2]),f0=Ne(n)|0,ye=(t[W>>2]=G1,w(C[W>>2])),f0?n=Je:(_r=w(Kt(K,Bn,Sr)),mn=w(ye/n),n=w(n*ye),n=w(_r+(Bu?mn:n))),C[La>>2]=n,C[Hl>>2]=w(w(Kt(K,Or,Sr))+ye),t[Ns>>2]=1,t[lf>>2]=1,Fn(K,Or,Nn,Sr,Ns,Hl),Fn(K,Bn,hu,Sr,lf,La),n=w(C[Hl>>2]),_r=w(C[La>>2]),mn=Bu?n:_r,n=Bu?_r:n,f0=((Ne(mn)|0)^1)&1,Yt(K,mn,n,El,f0,((Ne(n)|0)^1)&1,Sr,as,1,3493,N)|0,n=Se}else vi=139;while(0);e:do if((vi|0)==139){vi=0,n=w(Ge-w(Fe(K,Bn,Sr)));do if((t[(_0(K,Bn)|0)+4>>2]|0)==3){if((t[(E0(K,Bn)|0)+4>>2]|0)!=3)break;n=w(Se+w(Ru(w(0),w(n*w(.5)))));break e}while(0);if((t[(E0(K,Bn)|0)+4>>2]|0)==3){n=Se;break}if((t[(_0(K,Bn)|0)+4>>2]|0)==3){n=w(Se+w(Ru(w(0),n)));break}switch(M|0){case 1:{n=Se;break e}case 2:{n=w(Se+w(n*w(.5)));break e}default:{n=w(Se+n);break e}}}while(0);mn=w(_l+n),f0=K+400+(t[Fc>>2]<<2)|0,C[f0>>2]=w(mn+w(C[f0>>2]))}while(0);I=I+1|0}while((I|0)!=(In|0))}if(_l=w(_l+Je),Kf=w(Ru(Kf,r)),s=ss+1|0,In>>>0>=Vl>>>0)break;n=Nn,Pr=In,ss=s}do if(S){if(M=s>>>0>1,M?0:!(Ae(e)|0))break;if(!(Ne(hu)|0)){n=w(hu-_l);e:do switch(t[e+12>>2]|0){case 3:{Se=w(Se+n),Me=w(0);break}case 2:{Se=w(Se+w(n*w(.5))),Me=w(0);break}case 4:{hu>_l?Me=w(n/w(s>>>0)):Me=w(0);break}case 7:if(hu>_l){Se=w(Se+w(n/w(s<<1>>>0))),Me=w(n/w(s>>>0)),Me=M?Me:w(0);break e}else{Se=w(Se+w(n*w(.5))),Me=w(0);break e}case 6:{Me=w(n/w(ss>>>0)),Me=hu>_l&M?Me:w(0);break}default:Me=w(0)}while(0);if(s|0)for(Zt=1040+(Bn<<2)|0,Br=976+(Bn<<2)|0,be=0,I=0;;){e:do if(I>>>0>>0)for(ye=w(0),Je=w(0),n=w(0),K=I;;){M=t[(t[cs>>2]|0)+(K<<2)>>2]|0;do if((t[M+36>>2]|0)!=1?(t[M+24>>2]|0)==0:0){if((t[M+940>>2]|0)!=(be|0))break e;if(st(M,Bn)|0&&(mn=w(C[M+908+(t[Br>>2]<<2)>>2]),n=w(Ru(n,w(mn+w(Kt(M,Bn,Sr)))))),(e0(e,M)|0)!=5)break;ql=w(vt(M)),ql=w(ql+w(zi(M,0,Sr))),mn=w(C[M+912>>2]),mn=w(w(mn+w(Kt(M,0,Sr)))-ql),ql=w(Ru(Je,ql)),mn=w(Ru(ye,mn)),ye=mn,Je=ql,n=w(Ru(n,w(ql+mn)))}while(0);if(M=K+1|0,M>>>0>>0)K=M;else{K=M;break}}else Je=w(0),n=w(0),K=I;while(0);if(ft=w(Me+n),r=Se,Se=w(Se+ft),I>>>0>>0){Ge=w(r+Je),M=I;do{I=t[(t[cs>>2]|0)+(M<<2)>>2]|0;e:do if((t[I+36>>2]|0)!=1?(t[I+24>>2]|0)==0:0)switch(e0(e,I)|0){case 1:{mn=w(r+w(zi(I,Bn,Sr))),C[I+400+(t[Zt>>2]<<2)>>2]=mn;break e}case 3:{mn=w(w(Se-w(A0(I,Bn,Sr)))-w(C[I+908+(t[Br>>2]<<2)>>2])),C[I+400+(t[Zt>>2]<<2)>>2]=mn;break e}case 2:{mn=w(r+w(w(ft-w(C[I+908+(t[Br>>2]<<2)>>2]))*w(.5))),C[I+400+(t[Zt>>2]<<2)>>2]=mn;break e}case 4:{if(mn=w(r+w(zi(I,Bn,Sr))),C[I+400+(t[Zt>>2]<<2)>>2]=mn,Wu(I,Bn,hu)|0||(Bu?(ye=w(C[I+908>>2]),n=w(ye+w(Kt(I,Or,Sr))),Je=ft):(Je=w(C[I+912>>2]),Je=w(Je+w(Kt(I,Bn,Sr))),n=ft,ye=w(C[I+908>>2])),Ci(n,ye)|0?Ci(Je,w(C[I+912>>2]))|0:0))break e;Yt(I,n,Je,El,1,1,Sr,as,1,3501,N)|0;break e}case 5:{C[I+404>>2]=w(w(Ge-w(vt(I)))+w(re(I,0,hu)));break e}default:break e}while(0);M=M+1|0}while((M|0)!=(K|0))}if(be=be+1|0,(be|0)==(s|0))break;I=K}}}while(0);if(C[e+908>>2]=w(Kn(e,2,Xf,h,h)),C[e+912>>2]=w(Kn(e,0,j1,D,h)),((sf|0)!=0?(z1=t[e+32>>2]|0,H1=(sf|0)==2,!(H1&(z1|0)!=2)):0)?H1&(z1|0)==2&&(n=w(Qf+Nn),n=w(Ru(w(Xp(n,w(Qt(e,Or,Kf,fs)))),Qf)),vi=198):(n=w(Kn(e,Or,Kf,fs,h)),vi=198),(vi|0)==198&&(C[e+908+(t[976+(Or<<2)>>2]<<2)>>2]=n),((af|0)!=0?(W1=t[e+32>>2]|0,V1=(af|0)==2,!(V1&(W1|0)!=2)):0)?V1&(W1|0)==2&&(n=w(Wl+hu),n=w(Ru(w(Xp(n,w(Qt(e,Bn,w(Wl+_l),Jf)))),Wl)),vi=204):(n=w(Kn(e,Bn,w(Wl+_l),Jf,h)),vi=204),(vi|0)==204&&(C[e+908+(t[976+(Bn<<2)>>2]<<2)>>2]=n),S){if((t[q1>>2]|0)==2){I=976+(Bn<<2)|0,K=1040+(Bn<<2)|0,M=0;do be=Ti(e,M)|0,t[be+24>>2]|0||(G1=t[I>>2]|0,mn=w(C[e+908+(G1<<2)>>2]),f0=be+400+(t[K>>2]<<2)|0,mn=w(mn-w(C[f0>>2])),C[f0>>2]=w(mn-w(C[be+908+(G1<<2)>>2]))),M=M+1|0;while((M|0)!=(Vl|0))}if(u|0){M=Bu?sf:l;do On(e,u,Sr,M,as,El,N),u=t[u+960>>2]|0;while((u|0)!=0)}if(M=(Or|2|0)==3,I=(Bn|2|0)==3,M|I){u=0;do K=t[(t[cs>>2]|0)+(u<<2)>>2]|0,(t[K+36>>2]|0)!=1&&(M&&Sn(e,K,Or),I&&Sn(e,K,Bn)),u=u+1|0;while((u|0)!=(Vl|0))}}}while(0);m=ff}function Ju(e,n){e=e|0,n=w(n);var r=0;Cn(e,n>=w(0),3147),r=n==w(0),C[e+4>>2]=r?w(0):n}function ti(e,n,r,u){e=e|0,n=w(n),r=w(r),u=u|0;var l=Tt,s=Tt,h=0,D=0,S=0;t[2278]=(t[2278]|0)+1,Jr(e),Wu(e,2,n)|0?(l=w(Rn(t[e+992>>2]|0,n)),S=1,l=w(l+w(Kt(e,2,n)))):(l=w(Rn(e+380|0,n)),l>=w(0)?S=2:(S=((Ne(n)|0)^1)&1,l=n)),Wu(e,0,r)|0?(s=w(Rn(t[e+996>>2]|0,r)),D=1,s=w(s+w(Kt(e,0,n)))):(s=w(Rn(e+388|0,r)),s>=w(0)?D=2:(D=((Ne(r)|0)^1)&1,s=r)),h=e+976|0,(Yt(e,l,s,u,S,D,n,r,1,3189,t[h>>2]|0)|0?(x0(e,t[e+496>>2]|0,n,r,n),Fu(e,w(C[(t[h>>2]|0)+4>>2]),w(0),w(0)),p[11696]|0):0)&&mf(e,7)}function Jr(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;D=m,m=m+32|0,h=D+24|0,s=D+16|0,u=D+8|0,l=D,r=0;do n=e+380+(r<<3)|0,((t[e+380+(r<<3)+4>>2]|0)!=0?(S=n,N=t[S+4>>2]|0,M=u,t[M>>2]=t[S>>2],t[M+4>>2]=N,M=e+364+(r<<3)|0,N=t[M+4>>2]|0,S=l,t[S>>2]=t[M>>2],t[S+4>>2]=N,t[s>>2]=t[u>>2],t[s+4>>2]=t[u+4>>2],t[h>>2]=t[l>>2],t[h+4>>2]=t[l+4>>2],Bi(s,h)|0):0)||(n=e+348+(r<<3)|0),t[e+992+(r<<2)>>2]=n,r=r+1|0;while((r|0)!=2);m=D}function Wu(e,n,r){e=e|0,n=n|0,r=w(r);var u=0;switch(e=t[e+992+(t[976+(n<<2)>>2]<<2)>>2]|0,t[e+4>>2]|0){case 0:case 3:{e=0;break}case 1:{w(C[e>>2])>2])>2]|0){case 2:{n=w(w(w(C[e>>2])*n)/w(100));break}case 1:{n=w(C[e>>2]);break}default:n=w(ie)}return w(n)}function x0(e,n,r,u,l){e=e|0,n=n|0,r=w(r),u=w(u),l=w(l);var s=0,h=Tt;n=t[e+944>>2]|0?n:1,s=B0(t[e+4>>2]|0,n)|0,n=gf(s,n)|0,r=w(Ar(e,s,r)),u=w(Ar(e,n,u)),h=w(r+w(zi(e,s,l))),C[e+400+(t[1040+(s<<2)>>2]<<2)>>2]=h,r=w(r+w(A0(e,s,l))),C[e+400+(t[1e3+(s<<2)>>2]<<2)>>2]=r,r=w(u+w(zi(e,n,l))),C[e+400+(t[1040+(n<<2)>>2]<<2)>>2]=r,l=w(u+w(A0(e,n,l))),C[e+400+(t[1e3+(n<<2)>>2]<<2)>>2]=l}function Fu(e,n,r,u){e=e|0,n=w(n),r=w(r),u=w(u);var l=0,s=0,h=Tt,D=Tt,S=0,N=0,M=Tt,I=0,K=Tt,be=Tt,Se=Tt,ye=Tt;if(n!=w(0)&&(l=e+400|0,ye=w(C[l>>2]),s=e+404|0,Se=w(C[s>>2]),I=e+416|0,be=w(C[I>>2]),N=e+420|0,h=w(C[N>>2]),K=w(ye+r),M=w(Se+u),u=w(K+be),D=w(M+h),S=(t[e+988>>2]|0)==1,C[l>>2]=w($0(ye,n,0,S)),C[s>>2]=w($0(Se,n,0,S)),r=w(OE(w(be*n),w(1))),Ci(r,w(0))|0?s=0:s=(Ci(r,w(1))|0)^1,r=w(OE(w(h*n),w(1))),Ci(r,w(0))|0?l=0:l=(Ci(r,w(1))|0)^1,ye=w($0(u,n,S&s,S&(s^1))),C[I>>2]=w(ye-w($0(K,n,0,S))),ye=w($0(D,n,S&l,S&(l^1))),C[N>>2]=w(ye-w($0(M,n,0,S))),s=(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2,s|0)){l=0;do Fu(Ti(e,l)|0,n,K,M),l=l+1|0;while((l|0)!=(s|0))}}function li(e,n,r,u,l){switch(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,r|0){case 5:case 0:{e=i8(t[489]|0,u,l)|0;break}default:e=bL(u,l)|0}return e|0}function Tl(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;l=m,m=m+16|0,s=l,t[s>>2]=u,zs(e,0,n,r,s),m=l}function zs(e,n,r,u,l){if(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,e=e|0?e:956,C8[t[e+8>>2]&1](e,n,r,u,l)|0,(r|0)==5)$n();else return}function Vu(e,n,r){e=e|0,n=n|0,r=r|0,p[e+n>>0]=r&1}function sa(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(Xi(e,u),Hs(e,t[n>>2]|0,t[r>>2]|0,u))}function Xi(e,n){e=e|0,n=n|0;var r=0;if((R0(e)|0)>>>0>>0&&hi(e),n>>>0>1073741823)$n();else{r=pn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function Hs(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(gr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function R0(e){return e=e|0,1073741823}function zi(e,n,r){return e=e|0,n=n|0,r=w(r),(Hi(n)|0?(t[e+96>>2]|0)!=0:0)?e=e+92|0:e=dt(e+60|0,t[1040+(n<<2)>>2]|0,992)|0,w(rl(e,r))}function A0(e,n,r){return e=e|0,n=n|0,r=w(r),(Hi(n)|0?(t[e+104>>2]|0)!=0:0)?e=e+100|0:e=dt(e+60|0,t[1e3+(n<<2)>>2]|0,992)|0,w(rl(e,r))}function Hi(e){return e=e|0,(e|1|0)==3|0}function rl(e,n){return e=e|0,n=w(n),(t[e+4>>2]|0)==3?n=w(0):n=w(Rn(e,n)),w(n)}function Cl(e,n){return e=e|0,n=n|0,e=t[e>>2]|0,((e|0)==0?(n|0)>1?n:1:e)|0}function B0(e,n){e=e|0,n=n|0;var r=0;e:do if((n|0)==2){switch(e|0){case 2:{e=3;break e}case 3:break;default:{r=4;break e}}e=2}else r=4;while(0);return e|0}function O0(e,n){e=e|0,n=n|0;var r=Tt;return((Hi(n)|0?(t[e+312>>2]|0)!=0:0)?(r=w(C[e+308>>2]),r>=w(0)):0)||(r=w(Ru(w(C[(dt(e+276|0,t[1040+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function ho(e,n){e=e|0,n=n|0;var r=Tt;return((Hi(n)|0?(t[e+320>>2]|0)!=0:0)?(r=w(C[e+316>>2]),r>=w(0)):0)||(r=w(Ru(w(C[(dt(e+276|0,t[1e3+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function Pu(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return((Hi(n)|0?(t[e+240>>2]|0)!=0:0)?(u=w(Rn(e+236|0,r)),u>=w(0)):0)||(u=w(Ru(w(Rn(dt(e+204|0,t[1040+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function Zu(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return((Hi(n)|0?(t[e+248>>2]|0)!=0:0)?(u=w(Rn(e+244|0,r)),u>=w(0)):0)||(u=w(Ru(w(Rn(dt(e+204|0,t[1e3+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function es(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=Tt,S=Tt,N=Tt,M=Tt,I=Tt,K=Tt,be=0,Se=0,ye=0;ye=m,m=m+16|0,be=ye,Se=e+964|0,qu(e,(t[Se>>2]|0)!=0,3519),D=w(Rr(e,2,n)),S=w(Rr(e,0,n)),N=w(Kt(e,2,n)),M=w(Kt(e,0,n)),Ne(n)|0?I=n:I=w(Ru(w(0),w(w(n-N)-D))),Ne(r)|0?K=r:K=w(Ru(w(0),w(w(r-M)-S))),(u|0)==1&(l|0)==1?(C[e+908>>2]=w(Kn(e,2,w(n-N),s,s)),n=w(Kn(e,0,w(r-M),h,s))):(x8[t[Se>>2]&1](be,e,I,u,K,l),I=w(D+w(C[be>>2])),K=w(n-N),C[e+908>>2]=w(Kn(e,2,(u|2|0)==2?I:K,s,s)),K=w(S+w(C[be+4>>2])),n=w(r-M),n=w(Kn(e,0,(l|2|0)==2?K:n,h,s))),C[e+912>>2]=n,m=ye}function _s(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=Tt,S=Tt,N=Tt,M=Tt;N=w(Rr(e,2,s)),D=w(Rr(e,0,s)),M=w(Kt(e,2,s)),S=w(Kt(e,0,s)),n=w(n-M),C[e+908>>2]=w(Kn(e,2,(u|2|0)==2?N:n,s,s)),r=w(r-S),C[e+912>>2]=w(Kn(e,0,(l|2|0)==2?D:r,h,s))}function aa(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=0,S=Tt,N=Tt;return D=(u|0)==2,((n<=w(0)&D?0:!(r<=w(0)&(l|0)==2))?!((u|0)==1&(l|0)==1):0)?e=0:(S=w(Kt(e,0,s)),N=w(Kt(e,2,s)),D=n>2]=w(Kn(e,2,D?w(0):n,s,s)),n=w(r-S),D=r>2]=w(Kn(e,0,D?w(0):n,h,s)),e=1),e|0}function gf(e,n){return e=e|0,n=n|0,_n(e)|0?e=B0(2,n)|0:e=0,e|0}function $u(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Pu(e,n,r)),w(r+w(O0(e,n)))}function Es(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Zu(e,n,r)),w(r+w(ho(e,n)))}function Rr(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return u=w($u(e,n,r)),w(u+w(Es(e,n,r)))}function to(e){return e=e|0,t[e+24>>2]|0?e=0:w(nu(e))!=w(0)?e=1:e=w(fu(e))!=w(0),e|0}function nu(e){e=e|0;var n=Tt;if(t[e+944>>2]|0){if(n=w(C[e+44>>2]),Ne(n)|0)return n=w(C[e+40>>2]),e=n>w(0)&((Ne(n)|0)^1),w(e?n:w(0))}else n=w(0);return w(n)}function fu(e){e=e|0;var n=Tt,r=0,u=Tt;do if(t[e+944>>2]|0){if(n=w(C[e+48>>2]),Ne(n)|0){if(r=p[(t[e+976>>2]|0)+2>>0]|0,r<<24>>24==0?(u=w(C[e+40>>2]),u>24?w(1):w(0)}}else n=w(0);while(0);return w(n)}function Li(e){e=e|0;var n=0,r=0;if(bv(e+400|0,0,540)|0,p[e+985>>0]=1,ms(e),r=Su(e)|0,r|0){n=e+948|0,e=0;do Li(t[(t[n>>2]|0)+(e<<2)>>2]|0),e=e+1|0;while((e|0)!=(r|0))}}function ni(e,n,r,u,l,s,h,D,S,N){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=w(s),h=w(h),D=D|0,S=S|0,N=N|0;var M=0,I=Tt,K=0,be=0,Se=Tt,ye=Tt,Je=0,Ge=Tt,ft=0,Me=Tt,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0,uu=0,os=0;uu=m,m=m+16|0,Br=uu+12|0,In=uu+8|0,gn=uu+4|0,_r=uu,Nn=B0(t[e+4>>2]|0,S)|0,Pe=Hi(Nn)|0,I=w(Rn(Tn(n)|0,Pe?s:h)),Zt=Wu(n,2,s)|0,Pr=Wu(n,0,h)|0;do if(Ne(I)|0?0:!(Ne(Pe?r:l)|0)){if(M=n+504|0,!(Ne(w(C[M>>2]))|0)&&(!(ir(t[n+976>>2]|0,0)|0)||(t[n+500>>2]|0)==(t[2278]|0)))break;C[M>>2]=w(Ru(I,w(Rr(n,Nn,s))))}else K=7;while(0);do if((K|0)==7){if(ft=Pe^1,!(ft|Zt^1)){h=w(Rn(t[n+992>>2]|0,s)),C[n+504>>2]=w(Ru(h,w(Rr(n,2,s))));break}if(!(Pe|Pr^1)){h=w(Rn(t[n+996>>2]|0,h)),C[n+504>>2]=w(Ru(h,w(Rr(n,0,s))));break}C[Br>>2]=w(ie),C[In>>2]=w(ie),t[gn>>2]=0,t[_r>>2]=0,Ge=w(Kt(n,2,s)),Me=w(Kt(n,0,s)),Zt?(Se=w(Ge+w(Rn(t[n+992>>2]|0,s))),C[Br>>2]=Se,t[gn>>2]=1,be=1):(be=0,Se=w(ie)),Pr?(I=w(Me+w(Rn(t[n+996>>2]|0,h))),C[In>>2]=I,t[_r>>2]=1,M=1):(M=0,I=w(ie)),K=t[e+32>>2]|0,Pe&(K|0)==2?K=2:(Ne(Se)|0?!(Ne(r)|0):0)&&(C[Br>>2]=r,t[gn>>2]=2,be=2,Se=r),(((K|0)==2&ft?0:Ne(I)|0)?!(Ne(l)|0):0)&&(C[In>>2]=l,t[_r>>2]=2,M=2,I=l),ye=w(C[n+396>>2]),Je=Ne(ye)|0;do if(Je)K=be;else{if((be|0)==1&ft){C[In>>2]=w(w(Se-Ge)/ye),t[_r>>2]=1,M=1,K=1;break}Pe&(M|0)==1?(C[Br>>2]=w(ye*w(I-Me)),t[gn>>2]=1,M=1,K=1):K=be}while(0);os=Ne(r)|0,be=(e0(e,n)|0)!=4,(Pe|Zt|((u|0)!=1|os)|(be|(K|0)==1)?0:(C[Br>>2]=r,t[gn>>2]=1,!Je))&&(C[In>>2]=w(w(r-Ge)/ye),t[_r>>2]=1,M=1),(Pr|ft|((D|0)!=1|(Ne(l)|0))|(be|(M|0)==1)?0:(C[In>>2]=l,t[_r>>2]=1,!Je))&&(C[Br>>2]=w(ye*w(l-Me)),t[gn>>2]=1),Fn(n,2,s,s,gn,Br),Fn(n,0,h,s,_r,In),r=w(C[Br>>2]),l=w(C[In>>2]),Yt(n,r,l,S,t[gn>>2]|0,t[_r>>2]|0,s,h,0,3565,N)|0,h=w(C[n+908+(t[976+(Nn<<2)>>2]<<2)>>2]),C[n+504>>2]=w(Ru(h,w(Rr(n,Nn,s))))}while(0);t[n+500>>2]=t[2278],m=uu}function Kn(e,n,r,u,l){return e=e|0,n=n|0,r=w(r),u=w(u),l=w(l),u=w(Qt(e,n,r,u)),w(Ru(u,w(Rr(e,n,l))))}function e0(e,n){return e=e|0,n=n|0,n=n+20|0,n=t[((t[n>>2]|0)==0?e+16|0:n)>>2]|0,((n|0)==5?_n(t[e+4>>2]|0)|0:0)&&(n=1),n|0}function _0(e,n){return e=e|0,n=n|0,(Hi(n)|0?(t[e+96>>2]|0)!=0:0)?n=4:n=t[1040+(n<<2)>>2]|0,e+60+(n<<3)|0}function E0(e,n){return e=e|0,n=n|0,(Hi(n)|0?(t[e+104>>2]|0)!=0:0)?n=5:n=t[1e3+(n<<2)>>2]|0,e+60+(n<<3)|0}function Fn(e,n,r,u,l,s){switch(e=e|0,n=n|0,r=w(r),u=w(u),l=l|0,s=s|0,r=w(Rn(e+380+(t[976+(n<<2)>>2]<<3)|0,r)),r=w(r+w(Kt(e,n,u))),t[l>>2]|0){case 2:case 1:{l=Ne(r)|0,u=w(C[s>>2]),C[s>>2]=l|u>2]=2,C[s>>2]=r);break}default:}}function ae(e,n){return e=e|0,n=n|0,e=e+132|0,(Hi(n)|0?(t[(dt(e,4,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(dt(e,t[1040+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function re(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Hi(n)|0?(u=dt(e,4,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=dt(e,t[1040+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Rn(u,r))),w(r)}function Fe(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return u=w(C[e+908+(t[976+(n<<2)>>2]<<2)>>2]),u=w(u+w(zi(e,n,r))),w(u+w(A0(e,n,r)))}function Ae(e){e=e|0;var n=0,r=0,u=0;e:do if(_n(t[e+4>>2]|0)|0)n=0;else if((t[e+16>>2]|0)!=5)if(r=Su(e)|0,!r)n=0;else for(n=0;;){if(u=Ti(e,n)|0,(t[u+24>>2]|0)==0?(t[u+20>>2]|0)==5:0){n=1;break e}if(n=n+1|0,n>>>0>=r>>>0){n=0;break}}else n=1;while(0);return n|0}function st(e,n){e=e|0,n=n|0;var r=Tt;return r=w(C[e+908+(t[976+(n<<2)>>2]<<2)>>2]),r>=w(0)&((Ne(r)|0)^1)|0}function vt(e){e=e|0;var n=Tt,r=0,u=0,l=0,s=0,h=0,D=0,S=Tt;if(r=t[e+968>>2]|0,r)S=w(C[e+908>>2]),n=w(C[e+912>>2]),n=w(D8[r&0](e,S,n)),qu(e,(Ne(n)|0)^1,3573);else{s=Su(e)|0;do if(s|0){for(r=0,l=0;;){if(u=Ti(e,l)|0,t[u+940>>2]|0){h=8;break}if((t[u+24>>2]|0)!=1)if(D=(e0(e,u)|0)==5,D){r=u;break}else r=(r|0)==0?u:r;if(l=l+1|0,l>>>0>=s>>>0){h=8;break}}if((h|0)==8&&!r)break;return n=w(vt(r)),w(n+w(C[r+404>>2]))}while(0);n=w(C[e+912>>2])}return w(n)}function Qt(e,n,r,u){e=e|0,n=n|0,r=w(r),u=w(u);var l=Tt,s=0;return _n(n)|0?(n=1,s=3):Hi(n)|0?(n=0,s=3):(u=w(ie),l=w(ie)),(s|0)==3&&(l=w(Rn(e+364+(n<<3)|0,u)),u=w(Rn(e+380+(n<<3)|0,u))),s=u=w(0)&((Ne(u)|0)^1)),r=s?u:r,s=l>=w(0)&((Ne(l)|0)^1)&r>2]|0,s)|0,Se=gf(Je,s)|0,ye=Hi(Je)|0,I=w(Kt(n,2,r)),K=w(Kt(n,0,r)),Wu(n,2,r)|0?D=w(I+w(Rn(t[n+992>>2]|0,r))):(ae(n,2)|0?Bt(n,2)|0:0)?(D=w(C[e+908>>2]),S=w(O0(e,2)),S=w(D-w(S+w(ho(e,2)))),D=w(re(n,2,r)),D=w(Kn(n,2,w(S-w(D+w(Fi(n,2,r)))),r,r))):D=w(ie),Wu(n,0,l)|0?S=w(K+w(Rn(t[n+996>>2]|0,l))):(ae(n,0)|0?Bt(n,0)|0:0)?(S=w(C[e+912>>2]),ft=w(O0(e,0)),ft=w(S-w(ft+w(ho(e,0)))),S=w(re(n,0,l)),S=w(Kn(n,0,w(ft-w(S+w(Fi(n,0,l)))),l,r))):S=w(ie),N=Ne(D)|0,M=Ne(S)|0;do if(N^M?(be=w(C[n+396>>2]),!(Ne(be)|0)):0)if(N){D=w(I+w(w(S-K)*be));break}else{ft=w(K+w(w(D-I)/be)),S=M?ft:S;break}while(0);M=Ne(D)|0,N=Ne(S)|0,M|N&&(Me=(M^1)&1,u=r>w(0)&((u|0)!=0&M),D=ye?D:u?r:D,Yt(n,D,S,s,ye?Me:u?2:Me,M&(N^1)&1,D,S,0,3623,h)|0,D=w(C[n+908>>2]),D=w(D+w(Kt(n,2,r))),S=w(C[n+912>>2]),S=w(S+w(Kt(n,0,r)))),Yt(n,D,S,s,1,1,D,S,1,3635,h)|0,(Bt(n,Je)|0?!(ae(n,Je)|0):0)?(Me=t[976+(Je<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(ft-w(C[n+908+(Me<<2)>>2])),ft=w(ft-w(ho(e,Je))),ft=w(ft-w(A0(n,Je,r))),ft=w(ft-w(Fi(n,Je,ye?r:l))),C[n+400+(t[1040+(Je<<2)>>2]<<2)>>2]=ft):Ge=21;do if((Ge|0)==21){if(ae(n,Je)|0?0:(t[e+8>>2]|0)==1){Me=t[976+(Je<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(w(ft-w(C[n+908+(Me<<2)>>2]))*w(.5)),C[n+400+(t[1040+(Je<<2)>>2]<<2)>>2]=ft;break}(ae(n,Je)|0?0:(t[e+8>>2]|0)==2)&&(Me=t[976+(Je<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(ft-w(C[n+908+(Me<<2)>>2])),C[n+400+(t[1040+(Je<<2)>>2]<<2)>>2]=ft)}while(0);(Bt(n,Se)|0?!(ae(n,Se)|0):0)?(Me=t[976+(Se<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(ft-w(C[n+908+(Me<<2)>>2])),ft=w(ft-w(ho(e,Se))),ft=w(ft-w(A0(n,Se,r))),ft=w(ft-w(Fi(n,Se,ye?l:r))),C[n+400+(t[1040+(Se<<2)>>2]<<2)>>2]=ft):Ge=30;do if((Ge|0)==30?!(ae(n,Se)|0):0){if((e0(e,n)|0)==2){Me=t[976+(Se<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(w(ft-w(C[n+908+(Me<<2)>>2]))*w(.5)),C[n+400+(t[1040+(Se<<2)>>2]<<2)>>2]=ft;break}Me=(e0(e,n)|0)==3,Me^(t[e+28>>2]|0)==2&&(Me=t[976+(Se<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(ft-w(C[n+908+(Me<<2)>>2])),C[n+400+(t[1040+(Se<<2)>>2]<<2)>>2]=ft)}while(0)}function Sn(e,n,r){e=e|0,n=n|0,r=r|0;var u=Tt,l=0;l=t[976+(r<<2)>>2]|0,u=w(C[n+908+(l<<2)>>2]),u=w(w(C[e+908+(l<<2)>>2])-u),u=w(u-w(C[n+400+(t[1040+(r<<2)>>2]<<2)>>2])),C[n+400+(t[1e3+(r<<2)>>2]<<2)>>2]=u}function _n(e){return e=e|0,(e|1|0)==1|0}function Tn(e){e=e|0;var n=Tt;switch(t[e+56>>2]|0){case 0:case 3:{n=w(C[e+40>>2]),n>w(0)&((Ne(n)|0)^1)?e=p[(t[e+976>>2]|0)+2>>0]|0?1056:992:e=1056;break}default:e=e+52|0}return e|0}function ir(e,n){return e=e|0,n=n|0,(p[e+n>>0]|0)!=0|0}function Bt(e,n){return e=e|0,n=n|0,e=e+132|0,(Hi(n)|0?(t[(dt(e,5,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(dt(e,t[1e3+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function Fi(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Hi(n)|0?(u=dt(e,5,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=dt(e,t[1e3+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Rn(u,r))),w(r)}function Ar(e,n,r){return e=e|0,n=n|0,r=w(r),ae(e,n)|0?r=w(re(e,n,r)):r=w(-w(Fi(e,n,r))),w(r)}function mr(e){return e=w(e),C[W>>2]=e,t[W>>2]|0|0}function Y(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)$n();else{l=pn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function ri(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function ii(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&_t(e)}function Vr(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;if(h=e+4|0,D=t[h>>2]|0,l=D-u|0,s=l>>2,e=n+(s<<2)|0,e>>>0>>0){u=D;do t[u>>2]=t[e>>2],e=e+4|0,u=(t[h>>2]|0)+4|0,t[h>>2]=u;while(e>>>0>>0)}s|0&&Ty(D+(0-s<<2)|0,n|0,l|0)|0}function at(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return D=n+4|0,S=t[D>>2]|0,l=t[e>>2]|0,h=r,s=h-l|0,u=S+(0-(s>>2)<<2)|0,t[D>>2]=u,(s|0)>0&&gr(u|0,l|0,s|0)|0,l=e+4|0,s=n+8|0,u=(t[l>>2]|0)-h|0,(u|0)>0&&(gr(t[s>>2]|0,r|0,u|0)|0,t[s>>2]=(t[s>>2]|0)+(u>>>2<<2)),h=t[e>>2]|0,t[e>>2]=t[D>>2],t[D>>2]=h,h=t[l>>2]|0,t[l>>2]=t[s>>2],t[s>>2]=h,h=e+8|0,r=n+12|0,e=t[h>>2]|0,t[h>>2]=t[r>>2],t[r>>2]=e,t[n>>2]=t[D>>2],S|0}function Di(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(h=t[n>>2]|0,s=t[r>>2]|0,(h|0)!=(s|0)){l=e+8|0,r=((s+-4-h|0)>>>2)+1|0,e=h,u=t[l>>2]|0;do t[u>>2]=t[e>>2],u=(t[l>>2]|0)+4|0,t[l>>2]=u,e=e+4|0;while((e|0)!=(s|0));t[n>>2]=h+(r<<2)}}function ru(){we()}function D0(){var e=0;return e=pn(4)|0,Un(e),e|0}function Un(e){e=e|0,t[e>>2]=m0()|0}function t0(e){e=e|0,e|0&&(no(e),_t(e))}function no(e){e=e|0,Q0(t[e>>2]|0)}function vo(e,n,r){e=e|0,n=n|0,r=r|0,Vu(t[e>>2]|0,n,r)}function n0(e,n){e=e|0,n=w(n),Ju(t[e>>2]|0,n)}function Uo(e,n){return e=e|0,n=n|0,ir(t[e>>2]|0,n)|0}function ro(){var e=0;return e=pn(8)|0,Ba(e,0),e|0}function Ba(e,n){e=e|0,n=n|0,n?n=Yn(t[n>>2]|0)|0:n=cr()|0,t[e>>2]=n,t[e+4>>2]=0,ba(n,e)}function _f(e){e=e|0;var n=0;return n=pn(8)|0,Ba(n,e),n|0}function fc(e){e=e|0,e|0&&(Ds(e),_t(e))}function Ds(e){e=e|0;var n=0;zu(t[e>>2]|0),n=e+4|0,e=t[n>>2]|0,t[n>>2]=0,e|0&&(fa(e),_t(e))}function fa(e){e=e|0,U0(e)}function U0(e){e=e|0,e=t[e>>2]|0,e|0&&qr(e|0)}function cc(e){return e=e|0,Bs(e)|0}function Ua(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(fa(n),_t(n)),co(t[e>>2]|0)}function E2(e,n){e=e|0,n=n|0,oa(t[e>>2]|0,t[n>>2]|0)}function nd(e,n){e=e|0,n=n|0,Z(t[e>>2]|0,n)}function rd(e,n,r){e=e|0,n=n|0,r=+r,dr(t[e>>2]|0,n,w(r))}function mo(e,n,r){e=e|0,n=n|0,r=+r,er(t[e>>2]|0,n,w(r))}function Hc(e,n){e=e|0,n=n|0,z(t[e>>2]|0,n)}function xl(e,n){e=e|0,n=n|0,$(t[e>>2]|0,n)}function il(e,n){e=e|0,n=n|0,ge(t[e>>2]|0,n)}function D2(e,n){e=e|0,n=n|0,y0(t[e>>2]|0,n)}function qs(e,n){e=e|0,n=n|0,Qe(t[e>>2]|0,n)}function Rl(e,n){e=e|0,n=n|0,ji(t[e>>2]|0,n)}function id(e,n,r){e=e|0,n=n|0,r=+r,An(t[e>>2]|0,n,w(r))}function jo(e,n,r){e=e|0,n=n|0,r=+r,Nr(t[e>>2]|0,n,w(r))}function ja(e,n){e=e|0,n=n|0,Lr(t[e>>2]|0,n)}function za(e,n){e=e|0,n=n|0,ue(t[e>>2]|0,n)}function Ha(e,n){e=e|0,n=n|0,nt(t[e>>2]|0,n)}function ca(e,n){e=e|0,n=+n,Mt(t[e>>2]|0,w(n))}function ws(e,n){e=e|0,n=+n,rn(t[e>>2]|0,w(n))}function Ss(e,n){e=e|0,n=+n,Lt(t[e>>2]|0,w(n))}function ts(e,n){e=e|0,n=+n,It(t[e>>2]|0,w(n))}function zo(e,n){e=e|0,n=+n,sn(t[e>>2]|0,w(n))}function Ef(e,n){e=e|0,n=+n,fn(t[e>>2]|0,w(n))}function ul(e,n){e=e|0,n=+n,Jn(t[e>>2]|0,w(n))}function Gu(e){e=e|0,wr(t[e>>2]|0)}function qa(e,n){e=e|0,n=+n,Nu(t[e>>2]|0,w(n))}function r0(e,n){e=e|0,n=+n,T0(t[e>>2]|0,w(n))}function j0(e){e=e|0,J0(t[e>>2]|0)}function Df(e,n){e=e|0,n=+n,_i(t[e>>2]|0,w(n))}function qc(e,n){e=e|0,n=+n,Fo(t[e>>2]|0,w(n))}function dc(e,n){e=e|0,n=+n,hf(t[e>>2]|0,w(n))}function Al(e,n){e=e|0,n=+n,Sl(t[e>>2]|0,w(n))}function Ts(e,n){e=e|0,n=+n,Po(t[e>>2]|0,w(n))}function da(e,n){e=e|0,n=+n,ys(t[e>>2]|0,w(n))}function ud(e,n){e=e|0,n=+n,Io(t[e>>2]|0,w(n))}function pa(e,n){e=e|0,n=+n,bo(t[e>>2]|0,w(n))}function pc(e,n){e=e|0,n=+n,Qu(t[e>>2]|0,w(n))}function Wc(e,n,r){e=e|0,n=n|0,r=+r,Pt(t[e>>2]|0,n,w(r))}function qi(e,n,r){e=e|0,n=n|0,r=+r,it(t[e>>2]|0,n,w(r))}function g(e,n,r){e=e|0,n=n|0,r=+r,Dt(t[e>>2]|0,n,w(r))}function y(e){return e=e|0,ke(t[e>>2]|0)|0}function R(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,Cr(l,t[n>>2]|0,r),F(e,l),m=u}function F(e,n){e=e|0,n=n|0,b(e,t[n+4>>2]|0,+w(C[n>>2]))}function b(e,n,r){e=e|0,n=n|0,r=+r,t[e>>2]=n,U[e+8>>3]=r}function J(e){return e=e|0,G(t[e>>2]|0)|0}function ce(e){return e=e|0,Te(t[e>>2]|0)|0}function mt(e){return e=e|0,Re(t[e>>2]|0)|0}function xt(e){return e=e|0,Us(t[e>>2]|0)|0}function kt(e){return e=e|0,ht(t[e>>2]|0)|0}function xr(e){return e=e|0,B(t[e>>2]|0)|0}function i0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,g0(l,t[n>>2]|0,r),F(e,l),m=u}function cu(e){return e=e|0,He(t[e>>2]|0)|0}function z0(e){return e=e|0,Ct(t[e>>2]|0)|0}function Ol(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Dn(u,t[n>>2]|0),F(e,u),m=r}function u0(e){return e=e|0,+ +w(pf(t[e>>2]|0))}function Ve(e){return e=e|0,+ +w(bs(t[e>>2]|0))}function Ue(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,au(u,t[n>>2]|0),F(e,u),m=r}function lt(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Lu(u,t[n>>2]|0),F(e,u),m=r}function $t(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,nl(u,t[n>>2]|0),F(e,u),m=r}function Wn(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,vf(u,t[n>>2]|0),F(e,u),m=r}function si(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,js(u,t[n>>2]|0),F(e,u),m=r}function ur(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,gs(u,t[n>>2]|0),F(e,u),m=r}function ci(e){return e=e|0,+ +w(Tu(t[e>>2]|0))}function Qi(e,n){return e=e|0,n=n|0,+ +w(un(t[e>>2]|0,n))}function Gr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,$e(l,t[n>>2]|0,r),F(e,l),m=u}function Cu(e,n,r){e=e|0,n=n|0,r=r|0,Ia(t[e>>2]|0,t[n>>2]|0,r)}function Wa(e,n){e=e|0,n=n|0,ku(t[e>>2]|0,t[n>>2]|0)}function Va(e){return e=e|0,Su(t[e>>2]|0)|0}function od(e){return e=e|0,e=fi(t[e>>2]|0)|0,e?e=cc(e)|0:e=0,e|0}function w2(e,n){return e=e|0,n=n|0,e=Ti(t[e>>2]|0,n)|0,e?e=cc(e)|0:e=0,e|0}function S2(e,n){e=e|0,n=n|0;var r=0,u=0;u=pn(4)|0,wf(u,n),r=e+4|0,n=t[r>>2]|0,t[r>>2]=u,n|0&&(fa(n),_t(n)),ua(t[e>>2]|0,1)}function wf(e,n){e=e|0,n=n|0,ll(e,n)}function ld(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,ch(D,Bs(n)|0,+r,u,+l,s),C[e>>2]=w(+U[D>>3]),C[e+4>>2]=w(+U[D+8>>3]),m=h}function ch(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0,D=0,S=0,N=0,M=0;h=m,m=m+32|0,M=h+8|0,N=h+20|0,S=h,D=h+16|0,U[M>>3]=r,t[N>>2]=u,U[S>>3]=l,t[D>>2]=s,Vc(e,t[n+4>>2]|0,M,N,S,D),m=h}function Vc(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,Ma(D),n=yo(n)|0,dh(e,n,+U[r>>3],t[u>>2]|0,+U[l>>3],t[s>>2]|0),ka(D),m=h}function yo(e){return e=e|0,t[e>>2]|0}function dh(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0;h=go(ph()|0)|0,r=+Ml(r),u=sd(u)|0,l=+Ml(l),ad(e,Qr(0,h|0,n|0,+r,u|0,+l,sd(s)|0)|0)}function ph(){var e=0;return p[7608]|0||(Yc(9120),e=7608,t[e>>2]=1,t[e+4>>2]=0),9120}function go(e){return e=e|0,t[e+8>>2]|0}function Ml(e){return e=+e,+ +Ga(e)}function sd(e){return e=e|0,cd(e)|0}function ad(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=n,u&1?(T2(r,0),eu(u|0,r|0)|0,Gc(e,r),Ir(r)):(t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]),m=l}function T2(e,n){e=e|0,n=n|0,fd(e,n),t[e+8>>2]=0,p[e+24>>0]=0}function Gc(e,n){e=e|0,n=n|0,n=n+8|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]}function Ir(e){e=e|0,p[e+24>>0]=0}function fd(e,n){e=e|0,n=n|0,t[e>>2]=n}function cd(e){return e=e|0,e|0}function Ga(e){return e=+e,+e}function Yc(e){e=e|0,ol(e,C2()|0,4)}function C2(){return 1064}function ol(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=bt(n|0,r+1|0)|0}function ll(e,n){e=e|0,n=n|0,n=t[n>>2]|0,t[e>>2]=n,Ri(n|0)}function hh(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(fa(n),_t(n)),ua(t[e>>2]|0,0)}function Sf(e){e=e|0,$r(t[e>>2]|0)}function Kc(e){return e=e|0,Zl(t[e>>2]|0)|0}function x2(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,ti(t[e>>2]|0,w(n),w(r),u)}function vh(e){return e=e|0,+ +w(Ei(t[e>>2]|0))}function sl(e){return e=e|0,+ +w(Z0(t[e>>2]|0))}function ha(e){return e=e|0,+ +w(C0(t[e>>2]|0))}function R2(e){return e=e|0,+ +w(Bo(t[e>>2]|0))}function A2(e){return e=e|0,+ +w(la(t[e>>2]|0))}function hc(e){return e=e|0,+ +w($l(t[e>>2]|0))}function mh(e,n){e=e|0,n=n|0,U[e>>3]=+w(Ei(t[n>>2]|0)),U[e+8>>3]=+w(Z0(t[n>>2]|0)),U[e+16>>3]=+w(C0(t[n>>2]|0)),U[e+24>>3]=+w(Bo(t[n>>2]|0)),U[e+32>>3]=+w(la(t[n>>2]|0)),U[e+40>>3]=+w($l(t[n>>2]|0))}function O2(e,n){return e=e|0,n=n|0,+ +w(tu(t[e>>2]|0,n))}function dd(e,n){return e=e|0,n=n|0,+ +w(ei(t[e>>2]|0,n))}function Xc(e,n){return e=e|0,n=n|0,+ +w(po(t[e>>2]|0,n))}function Qc(){return Pa()|0}function Ws(){M2(),va(),Jc(),vc(),mc(),pd()}function M2(){S7(11713,4938,1)}function va(){HA(10448)}function Jc(){SA(10408)}function vc(){GR(10324)}function mc(){$4(10096)}function pd(){yh(9132)}function yh(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0,uu=0,os=0,ls=0,ss=0,ea=0,n2=0,r2=0,uf=0,i2=0,Fc=0,Pc=0,u2=0,o2=0,l2=0,vi=0,of=0,s2=0,Yf=0,a2=0,f2=0,Ic=0,bc=0,Kf=0,Hl=0,La=0,Ns=0,lf=0,I1=0,b1=0,Bc=0,B1=0,U1=0,ql=0,_l=0,sf=0,hu=0,j1=0,as=0,Xf=0,fs=0,Qf=0,z1=0,H1=0,Jf=0,Wl=0,af=0,q1=0,W1=0,V1=0,Sr=0,Bu=0,El=0,cs=0,Vl=0,Or=0,Bn=0,ff=0;n=m,m=m+672|0,r=n+656|0,ff=n+648|0,Bn=n+640|0,Or=n+632|0,Vl=n+624|0,cs=n+616|0,El=n+608|0,Bu=n+600|0,Sr=n+592|0,V1=n+584|0,W1=n+576|0,q1=n+568|0,af=n+560|0,Wl=n+552|0,Jf=n+544|0,H1=n+536|0,z1=n+528|0,Qf=n+520|0,fs=n+512|0,Xf=n+504|0,as=n+496|0,j1=n+488|0,hu=n+480|0,sf=n+472|0,_l=n+464|0,ql=n+456|0,U1=n+448|0,B1=n+440|0,Bc=n+432|0,b1=n+424|0,I1=n+416|0,lf=n+408|0,Ns=n+400|0,La=n+392|0,Hl=n+384|0,Kf=n+376|0,bc=n+368|0,Ic=n+360|0,f2=n+352|0,a2=n+344|0,Yf=n+336|0,s2=n+328|0,of=n+320|0,vi=n+312|0,l2=n+304|0,o2=n+296|0,u2=n+288|0,Pc=n+280|0,Fc=n+272|0,i2=n+264|0,uf=n+256|0,r2=n+248|0,n2=n+240|0,ea=n+232|0,ss=n+224|0,ls=n+216|0,os=n+208|0,uu=n+200|0,Nn=n+192|0,Pr=n+184|0,_r=n+176|0,gn=n+168|0,In=n+160|0,Br=n+152|0,Zt=n+144|0,Pe=n+136|0,Me=n+128|0,ft=n+120|0,Ge=n+112|0,Je=n+104|0,ye=n+96|0,Se=n+88|0,be=n+80|0,K=n+72|0,I=n+64|0,M=n+56|0,N=n+48|0,S=n+40|0,D=n+32|0,h=n+24|0,s=n+16|0,l=n+8|0,u=n,Tf(e,3646),Zc(e,3651,2)|0,gh(e,3665,2)|0,nm(e,3682,18)|0,t[ff>>2]=19,t[ff+4>>2]=0,t[r>>2]=t[ff>>2],t[r+4>>2]=t[ff+4>>2],Vs(e,3690,r)|0,t[Bn>>2]=1,t[Bn+4>>2]=0,t[r>>2]=t[Bn>>2],t[r+4>>2]=t[Bn+4>>2],ma(e,3696,r)|0,t[Or>>2]=2,t[Or+4>>2]=0,t[r>>2]=t[Or>>2],t[r+4>>2]=t[Or+4>>2],iu(e,3706,r)|0,t[Vl>>2]=1,t[Vl+4>>2]=0,t[r>>2]=t[Vl>>2],t[r+4>>2]=t[Vl+4>>2],M0(e,3722,r)|0,t[cs>>2]=2,t[cs+4>>2]=0,t[r>>2]=t[cs>>2],t[r+4>>2]=t[cs+4>>2],M0(e,3734,r)|0,t[El>>2]=3,t[El+4>>2]=0,t[r>>2]=t[El>>2],t[r+4>>2]=t[El+4>>2],iu(e,3753,r)|0,t[Bu>>2]=4,t[Bu+4>>2]=0,t[r>>2]=t[Bu>>2],t[r+4>>2]=t[Bu+4>>2],iu(e,3769,r)|0,t[Sr>>2]=5,t[Sr+4>>2]=0,t[r>>2]=t[Sr>>2],t[r+4>>2]=t[Sr+4>>2],iu(e,3783,r)|0,t[V1>>2]=6,t[V1+4>>2]=0,t[r>>2]=t[V1>>2],t[r+4>>2]=t[V1+4>>2],iu(e,3796,r)|0,t[W1>>2]=7,t[W1+4>>2]=0,t[r>>2]=t[W1>>2],t[r+4>>2]=t[W1+4>>2],iu(e,3813,r)|0,t[q1>>2]=8,t[q1+4>>2]=0,t[r>>2]=t[q1>>2],t[r+4>>2]=t[q1+4>>2],iu(e,3825,r)|0,t[af>>2]=3,t[af+4>>2]=0,t[r>>2]=t[af>>2],t[r+4>>2]=t[af+4>>2],M0(e,3843,r)|0,t[Wl>>2]=4,t[Wl+4>>2]=0,t[r>>2]=t[Wl>>2],t[r+4>>2]=t[Wl+4>>2],M0(e,3853,r)|0,t[Jf>>2]=9,t[Jf+4>>2]=0,t[r>>2]=t[Jf>>2],t[r+4>>2]=t[Jf+4>>2],iu(e,3870,r)|0,t[H1>>2]=10,t[H1+4>>2]=0,t[r>>2]=t[H1>>2],t[r+4>>2]=t[H1+4>>2],iu(e,3884,r)|0,t[z1>>2]=11,t[z1+4>>2]=0,t[r>>2]=t[z1>>2],t[r+4>>2]=t[z1+4>>2],iu(e,3896,r)|0,t[Qf>>2]=1,t[Qf+4>>2]=0,t[r>>2]=t[Qf>>2],t[r+4>>2]=t[Qf+4>>2],o0(e,3907,r)|0,t[fs>>2]=2,t[fs+4>>2]=0,t[r>>2]=t[fs>>2],t[r+4>>2]=t[fs+4>>2],o0(e,3915,r)|0,t[Xf>>2]=3,t[Xf+4>>2]=0,t[r>>2]=t[Xf>>2],t[r+4>>2]=t[Xf+4>>2],o0(e,3928,r)|0,t[as>>2]=4,t[as+4>>2]=0,t[r>>2]=t[as>>2],t[r+4>>2]=t[as+4>>2],o0(e,3948,r)|0,t[j1>>2]=5,t[j1+4>>2]=0,t[r>>2]=t[j1>>2],t[r+4>>2]=t[j1+4>>2],o0(e,3960,r)|0,t[hu>>2]=6,t[hu+4>>2]=0,t[r>>2]=t[hu>>2],t[r+4>>2]=t[hu+4>>2],o0(e,3974,r)|0,t[sf>>2]=7,t[sf+4>>2]=0,t[r>>2]=t[sf>>2],t[r+4>>2]=t[sf+4>>2],o0(e,3983,r)|0,t[_l>>2]=20,t[_l+4>>2]=0,t[r>>2]=t[_l>>2],t[r+4>>2]=t[_l+4>>2],Vs(e,3999,r)|0,t[ql>>2]=8,t[ql+4>>2]=0,t[r>>2]=t[ql>>2],t[r+4>>2]=t[ql+4>>2],o0(e,4012,r)|0,t[U1>>2]=9,t[U1+4>>2]=0,t[r>>2]=t[U1>>2],t[r+4>>2]=t[U1+4>>2],o0(e,4022,r)|0,t[B1>>2]=21,t[B1+4>>2]=0,t[r>>2]=t[B1>>2],t[r+4>>2]=t[B1+4>>2],Vs(e,4039,r)|0,t[Bc>>2]=10,t[Bc+4>>2]=0,t[r>>2]=t[Bc>>2],t[r+4>>2]=t[Bc+4>>2],o0(e,4053,r)|0,t[b1>>2]=11,t[b1+4>>2]=0,t[r>>2]=t[b1>>2],t[r+4>>2]=t[b1+4>>2],o0(e,4065,r)|0,t[I1>>2]=12,t[I1+4>>2]=0,t[r>>2]=t[I1>>2],t[r+4>>2]=t[I1+4>>2],o0(e,4084,r)|0,t[lf>>2]=13,t[lf+4>>2]=0,t[r>>2]=t[lf>>2],t[r+4>>2]=t[lf+4>>2],o0(e,4097,r)|0,t[Ns>>2]=14,t[Ns+4>>2]=0,t[r>>2]=t[Ns>>2],t[r+4>>2]=t[Ns+4>>2],o0(e,4117,r)|0,t[La>>2]=15,t[La+4>>2]=0,t[r>>2]=t[La>>2],t[r+4>>2]=t[La+4>>2],o0(e,4129,r)|0,t[Hl>>2]=16,t[Hl+4>>2]=0,t[r>>2]=t[Hl>>2],t[r+4>>2]=t[Hl+4>>2],o0(e,4148,r)|0,t[Kf>>2]=17,t[Kf+4>>2]=0,t[r>>2]=t[Kf>>2],t[r+4>>2]=t[Kf+4>>2],o0(e,4161,r)|0,t[bc>>2]=18,t[bc+4>>2]=0,t[r>>2]=t[bc>>2],t[r+4>>2]=t[bc+4>>2],o0(e,4181,r)|0,t[Ic>>2]=5,t[Ic+4>>2]=0,t[r>>2]=t[Ic>>2],t[r+4>>2]=t[Ic+4>>2],M0(e,4196,r)|0,t[f2>>2]=6,t[f2+4>>2]=0,t[r>>2]=t[f2>>2],t[r+4>>2]=t[f2+4>>2],M0(e,4206,r)|0,t[a2>>2]=7,t[a2+4>>2]=0,t[r>>2]=t[a2>>2],t[r+4>>2]=t[a2+4>>2],M0(e,4217,r)|0,t[Yf>>2]=3,t[Yf+4>>2]=0,t[r>>2]=t[Yf>>2],t[r+4>>2]=t[Yf+4>>2],ns(e,4235,r)|0,t[s2>>2]=1,t[s2+4>>2]=0,t[r>>2]=t[s2>>2],t[r+4>>2]=t[s2+4>>2],Ya(e,4251,r)|0,t[of>>2]=4,t[of+4>>2]=0,t[r>>2]=t[of>>2],t[r+4>>2]=t[of+4>>2],ns(e,4263,r)|0,t[vi>>2]=5,t[vi+4>>2]=0,t[r>>2]=t[vi>>2],t[r+4>>2]=t[vi+4>>2],ns(e,4279,r)|0,t[l2>>2]=6,t[l2+4>>2]=0,t[r>>2]=t[l2>>2],t[r+4>>2]=t[l2+4>>2],ns(e,4293,r)|0,t[o2>>2]=7,t[o2+4>>2]=0,t[r>>2]=t[o2>>2],t[r+4>>2]=t[o2+4>>2],ns(e,4306,r)|0,t[u2>>2]=8,t[u2+4>>2]=0,t[r>>2]=t[u2>>2],t[r+4>>2]=t[u2+4>>2],ns(e,4323,r)|0,t[Pc>>2]=9,t[Pc+4>>2]=0,t[r>>2]=t[Pc>>2],t[r+4>>2]=t[Pc+4>>2],ns(e,4335,r)|0,t[Fc>>2]=2,t[Fc+4>>2]=0,t[r>>2]=t[Fc>>2],t[r+4>>2]=t[Fc+4>>2],Ya(e,4353,r)|0,t[i2>>2]=12,t[i2+4>>2]=0,t[r>>2]=t[i2>>2],t[r+4>>2]=t[i2+4>>2],io(e,4363,r)|0,t[uf>>2]=1,t[uf+4>>2]=0,t[r>>2]=t[uf>>2],t[r+4>>2]=t[uf+4>>2],al(e,4376,r)|0,t[r2>>2]=2,t[r2+4>>2]=0,t[r>>2]=t[r2>>2],t[r+4>>2]=t[r2+4>>2],al(e,4388,r)|0,t[n2>>2]=13,t[n2+4>>2]=0,t[r>>2]=t[n2>>2],t[r+4>>2]=t[n2+4>>2],io(e,4402,r)|0,t[ea>>2]=14,t[ea+4>>2]=0,t[r>>2]=t[ea>>2],t[r+4>>2]=t[ea+4>>2],io(e,4411,r)|0,t[ss>>2]=15,t[ss+4>>2]=0,t[r>>2]=t[ss>>2],t[r+4>>2]=t[ss+4>>2],io(e,4421,r)|0,t[ls>>2]=16,t[ls+4>>2]=0,t[r>>2]=t[ls>>2],t[r+4>>2]=t[ls+4>>2],io(e,4433,r)|0,t[os>>2]=17,t[os+4>>2]=0,t[r>>2]=t[os>>2],t[r+4>>2]=t[os+4>>2],io(e,4446,r)|0,t[uu>>2]=18,t[uu+4>>2]=0,t[r>>2]=t[uu>>2],t[r+4>>2]=t[uu+4>>2],io(e,4458,r)|0,t[Nn>>2]=3,t[Nn+4>>2]=0,t[r>>2]=t[Nn>>2],t[r+4>>2]=t[Nn+4>>2],al(e,4471,r)|0,t[Pr>>2]=1,t[Pr+4>>2]=0,t[r>>2]=t[Pr>>2],t[r+4>>2]=t[Pr+4>>2],yc(e,4486,r)|0,t[_r>>2]=10,t[_r+4>>2]=0,t[r>>2]=t[_r>>2],t[r+4>>2]=t[_r+4>>2],ns(e,4496,r)|0,t[gn>>2]=11,t[gn+4>>2]=0,t[r>>2]=t[gn>>2],t[r+4>>2]=t[gn+4>>2],ns(e,4508,r)|0,t[In>>2]=3,t[In+4>>2]=0,t[r>>2]=t[In>>2],t[r+4>>2]=t[In+4>>2],Ya(e,4519,r)|0,t[Br>>2]=4,t[Br+4>>2]=0,t[r>>2]=t[Br>>2],t[r+4>>2]=t[Br+4>>2],k2(e,4530,r)|0,t[Zt>>2]=19,t[Zt+4>>2]=0,t[r>>2]=t[Zt>>2],t[r+4>>2]=t[Zt+4>>2],_h(e,4542,r)|0,t[Pe>>2]=12,t[Pe+4>>2]=0,t[r>>2]=t[Pe>>2],t[r+4>>2]=t[Pe+4>>2],Cf(e,4554,r)|0,t[Me>>2]=13,t[Me+4>>2]=0,t[r>>2]=t[Me>>2],t[r+4>>2]=t[Me+4>>2],xf(e,4568,r)|0,t[ft>>2]=2,t[ft+4>>2]=0,t[r>>2]=t[ft>>2],t[r+4>>2]=t[ft+4>>2],$c(e,4578,r)|0,t[Ge>>2]=20,t[Ge+4>>2]=0,t[r>>2]=t[Ge>>2],t[r+4>>2]=t[Ge+4>>2],kl(e,4587,r)|0,t[Je>>2]=22,t[Je+4>>2]=0,t[r>>2]=t[Je>>2],t[r+4>>2]=t[Je+4>>2],Vs(e,4602,r)|0,t[ye>>2]=23,t[ye+4>>2]=0,t[r>>2]=t[ye>>2],t[r+4>>2]=t[ye+4>>2],Vs(e,4619,r)|0,t[Se>>2]=14,t[Se+4>>2]=0,t[r>>2]=t[Se>>2],t[r+4>>2]=t[Se+4>>2],e1(e,4629,r)|0,t[be>>2]=1,t[be+4>>2]=0,t[r>>2]=t[be>>2],t[r+4>>2]=t[be+4>>2],ya(e,4637,r)|0,t[K>>2]=4,t[K+4>>2]=0,t[r>>2]=t[K>>2],t[r+4>>2]=t[K+4>>2],al(e,4653,r)|0,t[I>>2]=5,t[I+4>>2]=0,t[r>>2]=t[I>>2],t[r+4>>2]=t[I+4>>2],al(e,4669,r)|0,t[M>>2]=6,t[M+4>>2]=0,t[r>>2]=t[M>>2],t[r+4>>2]=t[M+4>>2],al(e,4686,r)|0,t[N>>2]=7,t[N+4>>2]=0,t[r>>2]=t[N>>2],t[r+4>>2]=t[N+4>>2],al(e,4701,r)|0,t[S>>2]=8,t[S+4>>2]=0,t[r>>2]=t[S>>2],t[r+4>>2]=t[S+4>>2],al(e,4719,r)|0,t[D>>2]=9,t[D+4>>2]=0,t[r>>2]=t[D>>2],t[r+4>>2]=t[D+4>>2],al(e,4736,r)|0,t[h>>2]=21,t[h+4>>2]=0,t[r>>2]=t[h>>2],t[r+4>>2]=t[h+4>>2],hd(e,4754,r)|0,t[s>>2]=2,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],yc(e,4772,r)|0,t[l>>2]=3,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],yc(e,4790,r)|0,t[u>>2]=4,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],yc(e,4808,r)|0,m=n}function Tf(e,n){e=e|0,n=n|0;var r=0;r=rf()|0,t[e>>2]=r,Wo(r,n),$d(t[e>>2]|0)}function Zc(e,n,r){return e=e|0,n=n|0,r=r|0,Ot(e,Fr(n)|0,r,0),e|0}function gh(e,n,r){return e=e|0,n=n|0,r=r|0,c(e,Fr(n)|0,r,0),e|0}function nm(e,n,r){return e=e|0,n=n|0,r=r|0,Y4(e,Fr(n)|0,r,0),e|0}function Vs(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],U4(e,n,l),m=u,e|0}function ma(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],jl(e,n,l),m=u,e|0}function iu(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],d(e,n,l),m=u,e|0}function M0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Tv(e,n,l),m=u,e|0}function o0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Xm(e,n,l),m=u,e|0}function ns(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Yd(e,n,l),m=u,e|0}function Ya(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Gd(e,n,l),m=u,e|0}function io(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],k0(e,n,l),m=u,e|0}function al(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],wp(e,n,l),m=u,e|0}function yc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Mm(e,n,l),m=u,e|0}function k2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],l0(e,n,l),m=u,e|0}function _h(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Od(e,n,l),m=u,e|0}function Cf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Dm(e,n,l),m=u,e|0}function xf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ep(e,n,l),m=u,e|0}function $c(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],m1(e,n,l),m=u,e|0}function kl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Za(e,n,l),m=u,e|0}function e1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],U2(e,n,l),m=u,e|0}function ya(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],F2(e,n,l),m=u,e|0}function hd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],vd(e,n,l),m=u,e|0}function vd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ga(e,r,l,1),m=u}function Fr(e){return e=e|0,e|0}function ga(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=N2()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=t1(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,md(s,u)|0,u),m=l}function N2(){var e=0,n=0;if(p[7616]|0||(fl(9136),Wt(24,9136,ve|0)|0,n=7616,t[n>>2]=1,t[n+4>>2]=0),!(sr(9136)|0)){e=9136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));fl(9136)}return 9136}function t1(e){return e=e|0,0}function md(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=N2()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Rf(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Af(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function wi(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0;h=m,m=m+32|0,K=h+24|0,I=h+20|0,S=h+16|0,M=h+12|0,N=h+8|0,D=h+4|0,be=h,t[I>>2]=n,t[S>>2]=r,t[M>>2]=u,t[N>>2]=l,t[D>>2]=s,s=e+28|0,t[be>>2]=t[s>>2],t[K>>2]=t[be>>2],L2(e+24|0,K,I,M,N,S,D)|0,t[s>>2]=t[t[s>>2]>>2],m=h}function L2(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,e=rm(n)|0,n=pn(24)|0,yd(n+4|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0,t[h>>2]|0),t[n>>2]=t[e>>2],t[e>>2]=n,n|0}function rm(e){return e=e|0,t[e>>2]|0}function yd(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function hn(e,n){return e=e|0,n=n|0,n|e|0}function Rf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Af(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=im(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Of(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Rf(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Eh(e,D),um(D),m=N;return}}function im(e){return e=e|0,357913941}function Of(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Eh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function um(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function fl(e){e=e|0,Ho(e)}function n1(e){e=e|0,qn(e+24|0)}function sr(e){return e=e|0,t[e>>2]|0}function qn(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Ho(e){e=e|0;var n=0;n=yr()|0,jn(e,2,3,n,Vn()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function yr(){return 9228}function Vn(){return 1140}function cl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=_o(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=gc(n,u)|0,m=r,n|0}function jn(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function _o(e){return e=e|0,(t[(N2()|0)+24>>2]|0)+(e*12|0)|0}function gc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+48|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),P1[r&31](u,e),u=uo(u)|0,m=l,u|0}function uo(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Iu(Ka()|0)|0,u?(rs(n,u),Mf(r,n),_c(e,r),e=Cs(n)|0):e=Ec(e)|0,m=l,e|0}function Ka(){var e=0;return p[7632]|0||(Nf(9184),Wt(25,9184,ve|0)|0,e=7632,t[e>>2]=1,t[e+4>>2]=0),9184}function Iu(e){return e=e|0,t[e+36>>2]|0}function rs(e,n){e=e|0,n=n|0,t[e>>2]=n,t[e+4>>2]=e,t[e+8>>2]=0}function Mf(e,n){e=e|0,n=n|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=0}function _c(e,n){e=e|0,n=n|0,oo(n,e,e+8|0,e+16|0,e+24|0,e+32|0,e+40|0)|0}function Cs(e){return e=e|0,t[(t[e+4>>2]|0)+8>>2]|0}function Ec(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;S=m,m=m+16|0,r=S+4|0,u=S,l=Oa(8)|0,s=l,h=pn(48)|0,D=h,n=D+48|0;do t[D>>2]=t[e>>2],D=D+4|0,e=e+4|0;while((D|0)<(n|0));return n=s+4|0,t[n>>2]=h,D=pn(8)|0,h=t[n>>2]|0,t[u>>2]=0,t[r>>2]=t[u>>2],Dh(D,h,r),t[l>>2]=D,m=S,s|0}function Dh(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1092,t[r+12>>2]=n,t[e+4>>2]=r}function cn(e){e=e|0,Iv(e),_t(e)}function is(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function Eo(e){e=e|0,_t(e)}function oo(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,s=Ji(t[e>>2]|0,n,r,u,l,s,h)|0,h=e+4|0,t[(t[h>>2]|0)+8>>2]=s,t[(t[h>>2]|0)+8>>2]|0}function Ji(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0;var D=0,S=0;return D=m,m=m+16|0,S=D,Ma(S),e=yo(e)|0,h=Yr(e,+U[n>>3],+U[r>>3],+U[u>>3],+U[l>>3],+U[s>>3],+U[h>>3])|0,ka(S),m=D,h|0}function Yr(e,n,r,u,l,s,h){e=e|0,n=+n,r=+r,u=+u,l=+l,s=+s,h=+h;var D=0;return D=go(kf()|0)|0,n=+Ml(n),r=+Ml(r),u=+Ml(u),l=+Ml(l),s=+Ml(s),p0(0,D|0,e|0,+n,+r,+u,+l,+s,+ +Ml(h))|0}function kf(){var e=0;return p[7624]|0||(om(9172),e=7624,t[e>>2]=1,t[e+4>>2]=0),9172}function om(e){e=e|0,ol(e,Nl()|0,6)}function Nl(){return 1112}function Nf(e){e=e|0,Xa(e)}function Lf(e){e=e|0,gd(e+24|0),_d(e+16|0)}function gd(e){e=e|0,r1(e)}function _d(e){e=e|0,Dc(e)}function Dc(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,_t(r);while((n|0)!=0);t[e>>2]=0}function r1(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,_t(r);while((n|0)!=0);t[e>>2]=0}function Xa(e){e=e|0;var n=0;t[e+16>>2]=0,t[e+20>>2]=0,n=e+24|0,t[n>>2]=0,t[e+28>>2]=n,t[e+36>>2]=0,p[e+40>>0]=0,p[e+41>>0]=0}function F2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ed(e,r,l,0),m=u}function Ed(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=i1()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Ff(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,u1(s,u)|0,u),m=l}function i1(){var e=0,n=0;if(p[7640]|0||(Ll(9232),Wt(26,9232,ve|0)|0,n=7640,t[n>>2]=1,t[n+4>>2]=0),!(sr(9232)|0)){e=9232,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ll(9232)}return 9232}function Ff(e){return e=e|0,0}function u1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=i1()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Qa(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(o1(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Qa(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function o1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=P2(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Dd(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Qa(s,u,r),t[S>>2]=(t[S>>2]|0)+12,wc(e,D),l1(D),m=N;return}}function P2(e){return e=e|0,357913941}function Dd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function wc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function l1(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Ll(e){e=e|0,I2(e)}function Ea(e){e=e|0,wh(e+24|0)}function wh(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function I2(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,b2()|0,3),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function b2(){return 1144}function Sh(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,h=s+8|0,D=s,S=wd(e)|0,e=t[S+4>>2]|0,t[D>>2]=t[S>>2],t[D+4>>2]=e,t[h>>2]=t[D>>2],t[h+4>>2]=t[D+4>>2],Th(n,h,r,u,l),m=s}function wd(e){return e=e|0,(t[(i1()|0)+24>>2]|0)+(e*12|0)|0}function Th(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0,N=0;N=m,m=m+16|0,h=N+2|0,D=N+1|0,S=N,s=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(s=t[(t[e>>2]|0)+s>>2]|0),Fl(h,r),r=+us(h,r),Fl(D,u),u=+us(D,u),xs(S,l),S=Gs(S,l)|0,w8[s&1](e,r,u,S),m=N}function Fl(e,n){e=e|0,n=+n}function us(e,n){return e=e|0,n=+n,+ +Ch(n)}function xs(e,n){e=e|0,n=n|0}function Gs(e,n){return e=e|0,n=n|0,B2(n)|0}function B2(e){return e=e|0,e|0}function Ch(e){return e=+e,+e}function U2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],j2(e,r,l,1),m=u}function j2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=s1()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=a1(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,xh(s,u)|0,u),m=l}function s1(){var e=0,n=0;if(p[7648]|0||(f1(9268),Wt(27,9268,ve|0)|0,n=7648,t[n>>2]=1,t[n+4>>2]=0),!(sr(9268)|0)){e=9268,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));f1(9268)}return 9268}function a1(e){return e=e|0,0}function xh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=s1()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],z2(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(H2(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function z2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function H2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Rs(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Ja(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],z2(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Rh(e,D),du(D),m=N;return}}function Rs(e){return e=e|0,357913941}function Ja(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Rh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function du(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function f1(e){e=e|0,Pl(e)}function Ah(e){e=e|0,c1(e+24|0)}function c1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Pl(e){e=e|0;var n=0;n=yr()|0,jn(e,2,4,n,Oh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Oh(){return 1160}function q2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Mh(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=d1(n,u)|0,m=r,n|0}function Mh(e){return e=e|0,(t[(s1()|0)+24>>2]|0)+(e*12|0)|0}function d1(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Il(Jp[r&31](e)|0)|0}function Il(e){return e=e|0,e&1|0}function Za(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Da(e,r,l,0),m=u}function Da(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=W2()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=V2(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,lm(s,u)|0,u),m=l}function W2(){var e=0,n=0;if(p[7656]|0||(Lh(9304),Wt(28,9304,ve|0)|0,n=7656,t[n>>2]=1,t[n+4>>2]=0),!(sr(9304)|0)){e=9304,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Lh(9304)}return 9304}function V2(e){return e=e|0,0}function lm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=W2()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],G2(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(kh(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function G2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function kh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Nh(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Y2(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],G2(s,u,r),t[S>>2]=(t[S>>2]|0)+12,sm(e,D),am(D),m=N;return}}function Nh(e){return e=e|0,357913941}function Y2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function sm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function am(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Lh(e){e=e|0,p1(e)}function fm(e){e=e|0,K2(e+24|0)}function K2(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function p1(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,h1()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function h1(){return 1164}function v1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=wa(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],X2(n,l,r),m=u}function wa(e){return e=e|0,(t[(W2()|0)+24>>2]|0)+(e*12|0)|0}function X2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ys(l,r),r=Ks(l,r)|0,P1[u&31](e,r),Xs(l),m=s}function Ys(e,n){e=e|0,n=n|0,Q2(e,n)}function Ks(e,n){return e=e|0,n=n|0,e|0}function Xs(e){e=e|0,fa(e)}function Q2(e,n){e=e|0,n=n|0,Sa(e,n)}function Sa(e,n){e=e|0,n=n|0,t[e>>2]=n}function m1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Sd(e,r,l,0),m=u}function Sd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Sc()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=J2(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Do(s,u)|0,u),m=l}function Sc(){var e=0,n=0;if(p[7664]|0||(Uh(9340),Wt(29,9340,ve|0)|0,n=7664,t[n>>2]=1,t[n+4>>2]=0),!(sr(9340)|0)){e=9340,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Uh(9340)}return 9340}function J2(e){return e=e|0,0}function Do(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Sc()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Fh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Ph(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Fh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Ph(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ih(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,bh(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Fh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,cm(e,D),Bh(D),m=N;return}}function Ih(e){return e=e|0,357913941}function bh(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function cm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Bh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Uh(e){e=e|0,jh(e)}function y1(e){e=e|0,Z2(e+24|0)}function Z2(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function jh(e){e=e|0;var n=0;n=yr()|0,jn(e,2,4,n,$2()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function $2(){return 1180}function zh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=dm(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=pm(n,l,r)|0,m=u,r|0}function dm(e){return e=e|0,(t[(Sc()|0)+24>>2]|0)+(e*12|0)|0}function pm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Pf(l,r),l=If(l,r)|0,l=Td(FE[u&15](e,l)|0)|0,m=s,l|0}function Pf(e,n){e=e|0,n=n|0}function If(e,n){return e=e|0,n=n|0,hm(n)|0}function Td(e){return e=e|0,e|0}function hm(e){return e=e|0,e|0}function ep(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Cd(e,r,l,0),m=u}function Cd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=tp()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Hh(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,np(s,u)|0,u),m=l}function tp(){var e=0,n=0;if(p[7672]|0||(Vh(9376),Wt(30,9376,ve|0)|0,n=7672,t[n>>2]=1,t[n+4>>2]=0),!(sr(9376)|0)){e=9376,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Vh(9376)}return 9376}function Hh(e){return e=e|0,0}function np(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=tp()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],qh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Wh(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function qh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Wh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=rp(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,vm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],qh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,mm(e,D),ym(D),m=N;return}}function rp(e){return e=e|0,357913941}function vm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function mm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function ym(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Vh(e){e=e|0,ip(e)}function g1(e){e=e|0,gm(e+24|0)}function gm(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function ip(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,up()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function up(){return 1196}function _m(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Em(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Gh(n,u)|0,m=r,n|0}function Em(e){return e=e|0,(t[(tp()|0)+24>>2]|0)+(e*12|0)|0}function Gh(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Td(Jp[r&31](e)|0)|0}function Dm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],wm(e,r,l,1),m=u}function wm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=op()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=lp(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Ta(s,u)|0,u),m=l}function op(){var e=0,n=0;if(p[7680]|0||(ap(9412),Wt(31,9412,ve|0)|0,n=7680,t[n>>2]=1,t[n+4>>2]=0),!(sr(9412)|0)){e=9412,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));ap(9412)}return 9412}function lp(e){return e=e|0,0}function Ta(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=op()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],_1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(sp(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function _1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function sp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Yh(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,xd(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],_1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,E1(e,D),Kh(D),m=N;return}}function Yh(e){return e=e|0,357913941}function xd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function E1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Kh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function ap(e){e=e|0,Qh(e)}function Xh(e){e=e|0,fp(e+24|0)}function fp(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Qh(e){e=e|0;var n=0;n=yr()|0,jn(e,2,6,n,Jh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Jh(){return 1200}function cp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Rd(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Ad(n,u)|0,m=r,n|0}function Rd(e){return e=e|0,(t[(op()|0)+24>>2]|0)+(e*12|0)|0}function Ad(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),H0(Jp[r&31](e)|0)|0}function H0(e){return e=e|0,e|0}function Od(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ca(e,r,l,0),m=u}function Ca(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=$a()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Md(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,kd(s,u)|0,u),m=l}function $a(){var e=0,n=0;if(p[7688]|0||(hp(9448),Wt(32,9448,ve|0)|0,n=7688,t[n>>2]=1,t[n+4>>2]=0),!(sr(9448)|0)){e=9448,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));hp(9448)}return 9448}function Md(e){return e=e|0,0}function kd(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=$a()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],dp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Nd(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function dp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Nd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Zh(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Sm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],dp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,$h(e,D),pp(D),m=N;return}}function Zh(e){return e=e|0,357913941}function Sm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function $h(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function pp(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function hp(e){e=e|0,Cm(e)}function vp(e){e=e|0,Tm(e+24|0)}function Tm(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Cm(e){e=e|0;var n=0;n=yr()|0,jn(e,2,6,n,wo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function wo(){return 1204}function Ld(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=xm(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],dl(n,l,r),m=u}function xm(e){return e=e|0,(t[($a()|0)+24>>2]|0)+(e*12|0)|0}function dl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),tr(l,r),l=Qs(l,r)|0,P1[u&31](e,l),m=s}function tr(e,n){e=e|0,n=n|0}function Qs(e,n){return e=e|0,n=n|0,pl(n)|0}function pl(e){return e=e|0,e|0}function l0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ev(e,r,l,0),m=u}function ev(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Js()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=mp(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Rm(s,u)|0,u),m=l}function Js(){var e=0,n=0;if(p[7696]|0||(_p(9484),Wt(33,9484,ve|0)|0,n=7696,t[n>>2]=1,t[n+4>>2]=0),!(sr(9484)|0)){e=9484,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));_p(9484)}return 9484}function mp(e){return e=e|0,0}function Rm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Js()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],tv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(yp(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function tv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function yp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Am(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,gp(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],tv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Tc(e,D),xa(D),m=N;return}}function Am(e){return e=e|0,357913941}function gp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Tc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function xa(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function _p(e){e=e|0,Yu(e)}function Fd(e){e=e|0,bu(e+24|0)}function bu(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Yu(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,Ep()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Ep(){return 1212}function Dp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=nv(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],Om(n,s,r,u),m=l}function nv(e){return e=e|0,(t[(Js()|0)+24>>2]|0)+(e*12|0)|0}function Om(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),tr(s,r),s=Qs(s,r)|0,Pf(h,u),h=If(h,u)|0,Ry[l&15](e,s,h),m=D}function Mm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],km(e,r,l,1),m=u}function km(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Pd()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=rv(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Cc(s,u)|0,u),m=l}function Pd(){var e=0,n=0;if(p[7704]|0||(iv(9520),Wt(34,9520,ve|0)|0,n=7704,t[n>>2]=1,t[n+4>>2]=0),!(sr(9520)|0)){e=9520,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));iv(9520)}return 9520}function rv(e){return e=e|0,0}function Cc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Pd()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],D1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Nm(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function D1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Nm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Id(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,w1(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],D1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,bl(e,D),Ra(D),m=N;return}}function Id(e){return e=e|0,357913941}function w1(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function bl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ra(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function iv(e){e=e|0,ov(e)}function Lm(e){e=e|0,uv(e+24|0)}function uv(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function ov(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,Fm()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Fm(){return 1224}function lv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;return l=m,m=m+16|0,s=l+8|0,h=l,D=Aa(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],u=+Mr(n,s,r),m=l,+u}function Aa(e){return e=e|0,(t[(Pd()|0)+24>>2]|0)+(e*12|0)|0}function Mr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xs(l,r),l=Gs(l,r)|0,h=+Ga(+T8[u&7](e,l)),m=s,+h}function wp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],hl(e,r,l,1),m=u}function hl(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=gu()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=S1(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Ui(s,u)|0,u),m=l}function gu(){var e=0,n=0;if(p[7712]|0||(Tp(9556),Wt(35,9556,ve|0)|0,n=7712,t[n>>2]=1,t[n+4>>2]=0),!(sr(9556)|0)){e=9556,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Tp(9556)}return 9556}function S1(e){return e=e|0,0}function Ui(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=gu()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Sp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(bd(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Sp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function bd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=So(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,As(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Sp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,bf(e,D),Bd(D),m=N;return}}function So(e){return e=e|0,357913941}function As(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function bf(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Bd(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Tp(e){e=e|0,Cp(e)}function T1(e){e=e|0,C1(e+24|0)}function C1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Cp(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,nr()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function nr(){return 1232}function vl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=Gn(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=+q0(n,l),m=u,+r}function Gn(e){return e=e|0,(t[(gu()|0)+24>>2]|0)+(e*12|0)|0}function q0(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),+ +Ga(+S8[r&15](e))}function k0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ud(e,r,l,1),m=u}function Ud(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Bl()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=x1(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,xc(s,u)|0,u),m=l}function Bl(){var e=0,n=0;if(p[7720]|0||(Hd(9592),Wt(36,9592,ve|0)|0,n=7720,t[n>>2]=1,t[n+4>>2]=0),!(sr(9592)|0)){e=9592,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Hd(9592)}return 9592}function x1(e){return e=e|0,0}function xc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Bl()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Rc(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jd(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Rc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function jd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=xp(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,N0(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Rc(s,u,r),t[S>>2]=(t[S>>2]|0)+12,dn(e,D),zd(D),m=N;return}}function xp(e){return e=e|0,357913941}function N0(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function dn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function zd(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Hd(e){e=e|0,Mc(e)}function Ac(e){e=e|0,Oc(e+24|0)}function Oc(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Mc(e){e=e|0;var n=0;n=yr()|0,jn(e,2,7,n,R1()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function R1(){return 1276}function Rp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=ef(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Pm(n,u)|0,m=r,n|0}function ef(e){return e=e|0,(t[(Bl()|0)+24>>2]|0)+(e*12|0)|0}function Pm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+16|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),P1[r&31](u,e),u=kc(u)|0,m=l,u|0}function kc(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Iu(qd()|0)|0,u?(rs(n,u),Mf(r,n),sv(e,r),e=Cs(n)|0):e=A1(e)|0,m=l,e|0}function qd(){var e=0;return p[7736]|0||(qo(9640),Wt(25,9640,ve|0)|0,e=7736,t[e>>2]=1,t[e+4>>2]=0),9640}function sv(e,n){e=e|0,n=n|0,Nc(n,e,e+8|0)|0}function A1(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Oa(8)|0,n=u,D=pn(16)|0,t[D>>2]=t[e>>2],t[D+4>>2]=t[e+4>>2],t[D+8>>2]=t[e+8>>2],t[D+12>>2]=t[e+12>>2],s=n+4|0,t[s>>2]=D,e=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Bf(e,s,l),t[u>>2]=e,m=r,n|0}function Bf(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1244,t[r+12>>2]=n,t[e+4>>2]=r}function Uf(e){e=e|0,Iv(e),_t(e)}function O1(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function Ul(e){e=e|0,_t(e)}function Nc(e,n,r){return e=e|0,n=n|0,r=r|0,n=jf(t[e>>2]|0,n,r)|0,r=e+4|0,t[(t[r>>2]|0)+8>>2]=n,t[(t[r>>2]|0)+8>>2]|0}function jf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return u=m,m=m+16|0,l=u,Ma(l),e=yo(e)|0,r=Im(e,t[n>>2]|0,+U[r>>3])|0,ka(l),m=u,r|0}function Im(e,n,r){e=e|0,n=n|0,r=+r;var u=0;return u=go(ml()|0)|0,n=sd(n)|0,Hr(0,u|0,e|0,n|0,+ +Ml(r))|0}function ml(){var e=0;return p[7728]|0||(Wd(9628),e=7728,t[e>>2]=1,t[e+4>>2]=0),9628}function Wd(e){e=e|0,ol(e,Vd()|0,2)}function Vd(){return 1264}function qo(e){e=e|0,Xa(e)}function Gd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bm(e,r,l,1),m=u}function bm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=M1()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Bm(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Um(s,u)|0,u),m=l}function M1(){var e=0,n=0;if(p[7744]|0||(cv(9684),Wt(37,9684,ve|0)|0,n=7744,t[n>>2]=1,t[n+4>>2]=0),!(sr(9684)|0)){e=9684,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));cv(9684)}return 9684}function Bm(e){return e=e|0,0}function Um(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=M1()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],av(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jm(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function av(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function jm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=fv(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,zm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],av(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Hm(e,D),qm(D),m=N;return}}function fv(e){return e=e|0,357913941}function zm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Hm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function qm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function cv(e){e=e|0,Vm(e)}function Wm(e){e=e|0,Ap(e+24|0)}function Ap(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Vm(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,zf()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zf(){return 1280}function dv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=pv(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=hv(n,l,r)|0,m=u,r|0}function pv(e){return e=e|0,(t[(M1()|0)+24>>2]|0)+(e*12|0)|0}function hv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return h=m,m=m+32|0,l=h,s=h+16|0,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xs(s,r),s=Gs(s,r)|0,Ry[u&15](l,e,s),s=kc(l)|0,m=h,s|0}function Yd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Kd(e,r,l,1),m=u}function Kd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Op()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=vv(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Xd(s,u)|0,u),m=l}function Op(){var e=0,n=0;if(p[7752]|0||(Ev(9720),Wt(38,9720,ve|0)|0,n=7752,t[n>>2]=1,t[n+4>>2]=0),!(sr(9720)|0)){e=9720,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ev(9720)}return 9720}function vv(e){return e=e|0,0}function Xd(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Op()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],mv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(yv(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function mv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function yv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Mp(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,gv(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],mv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,_v(e,D),Gm(D),m=N;return}}function Mp(e){return e=e|0,357913941}function gv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function _v(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Gm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Ev(e){e=e|0,Dv(e)}function Ym(e){e=e|0,Qd(e+24|0)}function Qd(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Dv(e){e=e|0;var n=0;n=yr()|0,jn(e,2,8,n,kp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function kp(){return 1288}function Km(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=s0(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Np(n,u)|0,m=r,n|0}function s0(e){return e=e|0,(t[(Op()|0)+24>>2]|0)+(e*12|0)|0}function Np(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),cd(Jp[r&31](e)|0)|0}function Xm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Qm(e,r,l,0),m=u}function Qm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Lp()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=tf(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Fp(s,u)|0,u),m=l}function Lp(){var e=0,n=0;if(p[7760]|0||(bp(9756),Wt(39,9756,ve|0)|0,n=7760,t[n>>2]=1,t[n+4>>2]=0),!(sr(9756)|0)){e=9756,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));bp(9756)}return 9756}function tf(e){return e=e|0,0}function Fp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Lp()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Pp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Ip(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Pp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Ip(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Jm(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Zm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Pp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,wv(e,D),Hf(D),m=N;return}}function Jm(e){return e=e|0,357913941}function Zm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function wv(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Hf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function bp(e){e=e|0,ey(e)}function Sv(e){e=e|0,$m(e+24|0)}function $m(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function ey(e){e=e|0;var n=0;n=yr()|0,jn(e,2,8,n,Bp()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Bp(){return 1292}function Up(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=ty(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ny(n,l,r),m=u}function ty(e){return e=e|0,(t[(Lp()|0)+24>>2]|0)+(e*12|0)|0}function ny(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Fl(l,r),r=+us(l,r),E8[u&31](e,r),m=s}function Tv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],jp(e,r,l,0),m=u}function jp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=zp()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Jd(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,ry(s,u)|0,u),m=l}function zp(){var e=0,n=0;if(p[7768]|0||(Hp(9792),Wt(40,9792,ve|0)|0,n=7768,t[n>>2]=1,t[n+4>>2]=0),!(sr(9792)|0)){e=9792,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Hp(9792)}return 9792}function Jd(e){return e=e|0,0}function ry(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=zp()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],k1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(iy(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function k1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function iy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Cv(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,xv(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],k1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,uy(e,D),qf(D),m=N;return}}function Cv(e){return e=e|0,357913941}function xv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function uy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function qf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Hp(e){e=e|0,ly(e)}function Rv(e){e=e|0,oy(e+24|0)}function oy(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function ly(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,qp()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function qp(){return 1300}function sy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=Zs(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],ay(n,s,r,u),m=l}function Zs(e){return e=e|0,(t[(zp()|0)+24>>2]|0)+(e*12|0)|0}function ay(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),xs(s,r),s=Gs(s,r)|0,Fl(h,u),u=+us(h,u),A8[l&15](e,s,u),m=D}function d(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],v(e,r,l,0),m=u}function v(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=x()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=P(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,q(s,u)|0,u),m=l}function x(){var e=0,n=0;if(p[7776]|0||(At(9828),Wt(41,9828,ve|0)|0,n=7776,t[n>>2]=1,t[n+4>>2]=0),!(sr(9828)|0)){e=9828,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));At(9828)}return 9828}function P(e){return e=e|0,0}function q(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=x()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],ee(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(de(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function ee(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function de(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=_e(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Ie(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],ee(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Et(e,D),St(D),m=N;return}}function _e(e){return e=e|0,357913941}function Ie(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Et(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function St(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function At(e){e=e|0,rr(e)}function on(e){e=e|0,kn(e+24|0)}function kn(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function rr(e){e=e|0;var n=0;n=yr()|0,jn(e,2,7,n,br()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function br(){return 1312}function ar(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=ui(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],di(n,l,r),m=u}function ui(e){return e=e|0,(t[(x()|0)+24>>2]|0)+(e*12|0)|0}function di(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xs(l,r),l=Gs(l,r)|0,P1[u&31](e,l),m=s}function jl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Zi(e,r,l,0),m=u}function Zi(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=lo()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=a0(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Os(s,u)|0,u),m=l}function lo(){var e=0,n=0;if(p[7784]|0||(qg(9864),Wt(42,9864,ve|0)|0,n=7784,t[n>>2]=1,t[n+4>>2]=0),!(sr(9864)|0)){e=9864,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));qg(9864)}return 9864}function a0(e){return e=e|0,0}function Os(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=lo()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],To(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Av(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function To(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Av(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=k4(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,fy(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],To(s,u,r),t[S>>2]=(t[S>>2]|0)+12,cy(e,D),nf(D),m=N;return}}function k4(e){return e=e|0,357913941}function fy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function cy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function nf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function qg(e){e=e|0,F4(e)}function N4(e){e=e|0,L4(e+24|0)}function L4(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function F4(e){e=e|0;var n=0;n=yr()|0,jn(e,2,8,n,P4()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function P4(){return 1320}function dy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=I4(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],b4(n,l,r),m=u}function I4(e){return e=e|0,(t[(lo()|0)+24>>2]|0)+(e*12|0)|0}function b4(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),py(l,r),l=Wg(l,r)|0,P1[u&31](e,l),m=s}function py(e,n){e=e|0,n=n|0}function Wg(e,n){return e=e|0,n=n|0,B4(n)|0}function B4(e){return e=e|0,e|0}function U4(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Vg(e,r,l,0),m=u}function Vg(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Wf()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Gg(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,j4(s,u)|0,u),m=l}function Wf(){var e=0,n=0;if(p[7792]|0||(my(9900),Wt(43,9900,ve|0)|0,n=7792,t[n>>2]=1,t[n+4>>2]=0),!(sr(9900)|0)){e=9900,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));my(9900)}return 9900}function Gg(e){return e=e|0,0}function j4(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Wf()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Wp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(z4(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Wp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function z4(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ov(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,hy(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Wp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,vy(e,D),H4(D),m=N;return}}function Ov(e){return e=e|0,357913941}function hy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function vy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function H4(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function my(e){e=e|0,Yg(e)}function q4(e){e=e|0,W4(e+24|0)}function W4(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Yg(e){e=e|0;var n=0;n=yr()|0,jn(e,2,22,n,V4()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function V4(){return 1344}function G4(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;r=m,m=m+16|0,u=r+8|0,l=r,s=Kg(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],Mv(n,u),m=r}function Kg(e){return e=e|0,(t[(Wf()|0)+24>>2]|0)+(e*12|0)|0}function Mv(e,n){e=e|0,n=n|0;var r=0;r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),F1[r&127](e)}function Y4(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=yy()|0,e=K4(r)|0,wi(s,n,l,e,X4(r,u)|0,u)}function yy(){var e=0,n=0;if(p[7800]|0||(_y(9936),Wt(44,9936,ve|0)|0,n=7800,t[n>>2]=1,t[n+4>>2]=0),!(sr(9936)|0)){e=9936,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));_y(9936)}return 9936}function K4(e){return e=e|0,e|0}function X4(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=yy()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(gy(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Xg(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function gy(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Xg(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Qg(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,Jg(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,gy(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Zg(e,l),$g(l),m=D;return}}function Qg(e){return e=e|0,536870911}function Jg(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Zg(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function $g(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function _y(e){e=e|0,t_(e)}function e_(e){e=e|0,Q4(e+24|0)}function Q4(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function t_(e){e=e|0;var n=0;n=yr()|0,jn(e,1,23,n,wo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function J4(e,n){e=e|0,n=n|0,f(t[(Z4(e)|0)>>2]|0,n)}function Z4(e){return e=e|0,(t[(yy()|0)+24>>2]|0)+(e<<3)|0}function f(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,tr(u,n),n=Qs(u,n)|0,F1[e&127](n),m=r}function c(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=E()|0,e=T(r)|0,wi(s,n,l,e,A(r,u)|0,u)}function E(){var e=0,n=0;if(p[7808]|0||(pt(9972),Wt(45,9972,ve|0)|0,n=7808,t[n>>2]=1,t[n+4>>2]=0),!(sr(9972)|0)){e=9972,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));pt(9972)}return 9972}function T(e){return e=e|0,e|0}function A(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=E()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(j(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(V(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function j(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function V(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=te(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,le(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,j(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Be(e,l),Ke(l),m=D;return}}function te(e){return e=e|0,536870911}function le(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Be(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ke(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function pt(e){e=e|0,zt(e)}function Nt(e){e=e|0,Gt(e+24|0)}function Gt(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function zt(e){e=e|0;var n=0;n=yr()|0,jn(e,1,9,n,yn()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function yn(){return 1348}function kr(e,n){return e=e|0,n=n|0,Oi(t[(oi(e)|0)>>2]|0,n)|0}function oi(e){return e=e|0,(t[(E()|0)+24>>2]|0)+(e<<3)|0}function Oi(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,L0(u,n),n=$i(u,n)|0,n=Td(Jp[e&31](n)|0)|0,m=r,n|0}function L0(e,n){e=e|0,n=n|0}function $i(e,n){return e=e|0,n=n|0,ot(n)|0}function ot(e){return e=e|0,e|0}function Ot(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=Ze()|0,e=Ut(r)|0,wi(s,n,l,e,Pn(r,u)|0,u)}function Ze(){var e=0,n=0;if(p[7816]|0||(Kr(10008),Wt(46,10008,ve|0)|0,n=7816,t[n>>2]=1,t[n+4>>2]=0),!(sr(10008)|0)){e=10008,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Kr(10008)}return 10008}function Ut(e){return e=e|0,e|0}function Pn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=Ze()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(vn(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Wi(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function vn(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Wi(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=pi(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,Ku(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,vn(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,hr(e,l),pu(l),m=D;return}}function pi(e){return e=e|0,536870911}function Ku(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function hr(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function pu(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Kr(e){e=e|0,W0(e)}function xu(e){e=e|0,w0(e+24|0)}function w0(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function W0(e){e=e|0;var n=0;n=yr()|0,jn(e,1,15,n,up()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Ms(e){return e=e|0,yl(t[(Xu(e)|0)>>2]|0)|0}function Xu(e){return e=e|0,(t[(Ze()|0)+24>>2]|0)+(e<<3)|0}function yl(e){return e=e|0,Td(g_[e&7]()|0)|0}function rf(){var e=0;return p[7832]|0||(r_(10052),Wt(25,10052,ve|0)|0,e=7832,t[e>>2]=1,t[e+4>>2]=0),10052}function Wo(e,n){e=e|0,n=n|0,t[e>>2]=ks()|0,t[e+4>>2]=Zd()|0,t[e+12>>2]=n,t[e+8>>2]=Vf()|0,t[e+32>>2]=2}function ks(){return 11709}function Zd(){return 1188}function Vf(){return N1()|0}function Lc(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(Vo(r),_t(r)):n|0&&(Ds(n),_t(n))}function zl(e,n){return e=e|0,n=n|0,n&e|0}function Vo(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function N1(){var e=0;return p[7824]|0||(t[2511]=n_()|0,t[2512]=0,e=7824,t[e>>2]=1,t[e+4>>2]=0),10044}function n_(){return 0}function r_(e){e=e|0,Xa(e)}function $4(e){e=e|0;var n=0,r=0,u=0,l=0,s=0;n=m,m=m+32|0,r=n+24|0,s=n+16|0,l=n+8|0,u=n,i_(e,4827),eE(e,4834,3)|0,tE(e,3682,47)|0,t[s>>2]=9,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],Ey(e,4841,r)|0,t[l>>2]=1,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],u_(e,4871,r)|0,t[u>>2]=10,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],nE(e,4891,r)|0,m=n}function i_(e,n){e=e|0,n=n|0;var r=0;r=BR()|0,t[e>>2]=r,UR(r,n),$d(t[e>>2]|0)}function eE(e,n,r){return e=e|0,n=n|0,r=r|0,wR(e,Fr(n)|0,r,0),e|0}function tE(e,n,r){return e=e|0,n=n|0,r=r|0,lR(e,Fr(n)|0,r,0),e|0}function Ey(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],H9(e,n,l),m=u,e|0}function u_(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],S9(e,n,l),m=u,e|0}function nE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],rE(e,n,l),m=u,e|0}function rE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],iE(e,r,l,1),m=u}function iE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=uE()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=a9(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,f9(s,u)|0,u),m=l}function uE(){var e=0,n=0;if(p[7840]|0||(rw(10100),Wt(48,10100,ve|0)|0,n=7840,t[n>>2]=1,t[n+4>>2]=0),!(sr(10100)|0)){e=10100,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));rw(10100)}return 10100}function a9(e){return e=e|0,0}function f9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=uE()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],nw(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(c9(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function nw(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function c9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=d9(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,p9(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],nw(s,u,r),t[S>>2]=(t[S>>2]|0)+12,h9(e,D),v9(D),m=N;return}}function d9(e){return e=e|0,357913941}function p9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function h9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function v9(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function rw(e){e=e|0,g9(e)}function m9(e){e=e|0,y9(e+24|0)}function y9(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function g9(e){e=e|0;var n=0;n=yr()|0,jn(e,2,6,n,_9()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function _9(){return 1364}function E9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=D9(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=w9(n,l,r)|0,m=u,r|0}function D9(e){return e=e|0,(t[(uE()|0)+24>>2]|0)+(e*12|0)|0}function w9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xs(l,r),l=Gs(l,r)|0,l=Il(FE[u&15](e,l)|0)|0,m=s,l|0}function S9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],T9(e,r,l,0),m=u}function T9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=oE()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=C9(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,x9(s,u)|0,u),m=l}function oE(){var e=0,n=0;if(p[7848]|0||(uw(10136),Wt(49,10136,ve|0)|0,n=7848,t[n>>2]=1,t[n+4>>2]=0),!(sr(10136)|0)){e=10136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));uw(10136)}return 10136}function C9(e){return e=e|0,0}function x9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=oE()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],iw(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(R9(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function iw(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function R9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=A9(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,O9(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],iw(s,u,r),t[S>>2]=(t[S>>2]|0)+12,M9(e,D),k9(D),m=N;return}}function A9(e){return e=e|0,357913941}function O9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function M9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function k9(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function uw(e){e=e|0,F9(e)}function N9(e){e=e|0,L9(e+24|0)}function L9(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function F9(e){e=e|0;var n=0;n=yr()|0,jn(e,2,9,n,P9()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function P9(){return 1372}function I9(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=b9(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],B9(n,l,r),m=u}function b9(e){return e=e|0,(t[(oE()|0)+24>>2]|0)+(e*12|0)|0}function B9(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=Tt;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),U9(l,r),h=w(j9(l,r)),_8[u&1](e,h),m=s}function U9(e,n){e=e|0,n=+n}function j9(e,n){return e=e|0,n=+n,w(z9(n))}function z9(e){return e=+e,w(e)}function H9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],q9(e,r,l,0),m=u}function q9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=lE()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=W9(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,V9(s,u)|0,u),m=l}function lE(){var e=0,n=0;if(p[7856]|0||(lw(10172),Wt(50,10172,ve|0)|0,n=7856,t[n>>2]=1,t[n+4>>2]=0),!(sr(10172)|0)){e=10172,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));lw(10172)}return 10172}function W9(e){return e=e|0,0}function V9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=lE()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],ow(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(G9(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function ow(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function G9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Y9(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,K9(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],ow(s,u,r),t[S>>2]=(t[S>>2]|0)+12,X9(e,D),Q9(D),m=N;return}}function Y9(e){return e=e|0,357913941}function K9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function X9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Q9(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function lw(e){e=e|0,$9(e)}function J9(e){e=e|0,Z9(e+24|0)}function Z9(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function $9(e){e=e|0;var n=0;n=yr()|0,jn(e,2,3,n,eR()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function eR(){return 1380}function tR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=nR(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],rR(n,s,r,u),m=l}function nR(e){return e=e|0,(t[(lE()|0)+24>>2]|0)+(e*12|0)|0}function rR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),xs(s,r),s=Gs(s,r)|0,iR(h,u),h=uR(h,u)|0,Ry[l&15](e,s,h),m=D}function iR(e,n){e=e|0,n=n|0}function uR(e,n){return e=e|0,n=n|0,oR(n)|0}function oR(e){return e=e|0,(e|0)!=0|0}function lR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=sE()|0,e=sR(r)|0,wi(s,n,l,e,aR(r,u)|0,u)}function sE(){var e=0,n=0;if(p[7864]|0||(aw(10208),Wt(51,10208,ve|0)|0,n=7864,t[n>>2]=1,t[n+4>>2]=0),!(sr(10208)|0)){e=10208,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));aw(10208)}return 10208}function sR(e){return e=e|0,e|0}function aR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=sE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(sw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(fR(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function sw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function fR(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=cR(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,dR(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,sw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,pR(e,l),hR(l),m=D;return}}function cR(e){return e=e|0,536870911}function dR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function pR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function hR(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function aw(e){e=e|0,yR(e)}function vR(e){e=e|0,mR(e+24|0)}function mR(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function yR(e){e=e|0;var n=0;n=yr()|0,jn(e,1,24,n,gR()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gR(){return 1392}function _R(e,n){e=e|0,n=n|0,DR(t[(ER(e)|0)>>2]|0,n)}function ER(e){return e=e|0,(t[(sE()|0)+24>>2]|0)+(e<<3)|0}function DR(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,L0(u,n),n=$i(u,n)|0,F1[e&127](n),m=r}function wR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=aE()|0,e=SR(r)|0,wi(s,n,l,e,TR(r,u)|0,u)}function aE(){var e=0,n=0;if(p[7872]|0||(cw(10244),Wt(52,10244,ve|0)|0,n=7872,t[n>>2]=1,t[n+4>>2]=0),!(sr(10244)|0)){e=10244,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));cw(10244)}return 10244}function SR(e){return e=e|0,e|0}function TR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=aE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(fw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(CR(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function fw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function CR(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=xR(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,RR(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,fw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,AR(e,l),OR(l),m=D;return}}function xR(e){return e=e|0,536870911}function RR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function AR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function OR(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function cw(e){e=e|0,NR(e)}function MR(e){e=e|0,kR(e+24|0)}function kR(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function NR(e){e=e|0;var n=0;n=yr()|0,jn(e,1,16,n,LR()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function LR(){return 1400}function FR(e){return e=e|0,IR(t[(PR(e)|0)>>2]|0)|0}function PR(e){return e=e|0,(t[(aE()|0)+24>>2]|0)+(e<<3)|0}function IR(e){return e=e|0,bR(g_[e&7]()|0)|0}function bR(e){return e=e|0,e|0}function BR(){var e=0;return p[7880]|0||(VR(10280),Wt(25,10280,ve|0)|0,e=7880,t[e>>2]=1,t[e+4>>2]=0),10280}function UR(e,n){e=e|0,n=n|0,t[e>>2]=jR()|0,t[e+4>>2]=zR()|0,t[e+12>>2]=n,t[e+8>>2]=HR()|0,t[e+32>>2]=4}function jR(){return 11711}function zR(){return 1356}function HR(){return N1()|0}function qR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(WR(r),_t(r)):n|0&&(no(n),_t(n))}function WR(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function VR(e){e=e|0,Xa(e)}function GR(e){e=e|0,YR(e,4920),KR(e)|0,XR(e)|0}function YR(e,n){e=e|0,n=n|0;var r=0;r=qd()|0,t[e>>2]=r,mA(r,n),$d(t[e>>2]|0)}function KR(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,oA()|0),e|0}function XR(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,QR()|0),e|0}function QR(){var e=0;return p[7888]|0||(dw(10328),Wt(53,10328,ve|0)|0,e=7888,t[e>>2]=1,t[e+4>>2]=0),sr(10328)|0||dw(10328),10328}function Vp(e,n){e=e|0,n=n|0,wi(e,0,n,0,0,0)}function dw(e){e=e|0,$R(e),Gp(e,10)}function JR(e){e=e|0,ZR(e+24|0)}function ZR(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function $R(e){e=e|0;var n=0;n=yr()|0,jn(e,5,1,n,rA()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function eA(e,n,r){e=e|0,n=n|0,r=+r,tA(e,n,r)}function Gp(e,n){e=e|0,n=n|0,t[e+20>>2]=n}function tA(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,s=u+8|0,D=u+13|0,l=u,h=u+12|0,xs(D,n),t[s>>2]=Gs(D,n)|0,Fl(h,r),U[l>>3]=+us(h,r),nA(e,s,l),m=u}function nA(e,n,r){e=e|0,n=n|0,r=r|0,b(e+8|0,t[n>>2]|0,+U[r>>3]),p[e+24>>0]=1}function rA(){return 1404}function iA(e,n){return e=e|0,n=+n,uA(e,n)|0}function uA(e,n){e=e|0,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,s=u+4|0,h=u+8|0,D=u,l=Oa(8)|0,r=l,S=pn(16)|0,xs(s,e),e=Gs(s,e)|0,Fl(h,n),b(S,e,+us(h,n)),h=r+4|0,t[h>>2]=S,e=pn(8)|0,h=t[h>>2]|0,t[D>>2]=0,t[s>>2]=t[D>>2],Bf(e,h,s),t[l>>2]=e,m=u,r|0}function oA(){var e=0;return p[7896]|0||(pw(10364),Wt(54,10364,ve|0)|0,e=7896,t[e>>2]=1,t[e+4>>2]=0),sr(10364)|0||pw(10364),10364}function pw(e){e=e|0,aA(e),Gp(e,55)}function lA(e){e=e|0,sA(e+24|0)}function sA(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function aA(e){e=e|0;var n=0;n=yr()|0,jn(e,5,4,n,pA()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function fA(e){e=e|0,cA(e)}function cA(e){e=e|0,dA(e)}function dA(e){e=e|0,hw(e+8|0),p[e+24>>0]=1}function hw(e){e=e|0,t[e>>2]=0,U[e+8>>3]=0}function pA(){return 1424}function hA(){return vA()|0}function vA(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Oa(8)|0,e=r,u=pn(16)|0,hw(u),s=e+4|0,t[s>>2]=u,u=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Bf(u,s,l),t[r>>2]=u,m=n,e|0}function mA(e,n){e=e|0,n=n|0,t[e>>2]=yA()|0,t[e+4>>2]=gA()|0,t[e+12>>2]=n,t[e+8>>2]=_A()|0,t[e+32>>2]=5}function yA(){return 11710}function gA(){return 1416}function _A(){return o_()|0}function EA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(DA(r),_t(r)):n|0&&_t(n)}function DA(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function o_(){var e=0;return p[7904]|0||(t[2600]=wA()|0,t[2601]=0,e=7904,t[e>>2]=1,t[e+4>>2]=0),10400}function wA(){return t[357]|0}function SA(e){e=e|0,TA(e,4926),CA(e)|0}function TA(e,n){e=e|0,n=n|0;var r=0;r=Ka()|0,t[e>>2]=r,IA(r,n),$d(t[e>>2]|0)}function CA(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,xA()|0),e|0}function xA(){var e=0;return p[7912]|0||(vw(10412),Wt(56,10412,ve|0)|0,e=7912,t[e>>2]=1,t[e+4>>2]=0),sr(10412)|0||vw(10412),10412}function vw(e){e=e|0,OA(e),Gp(e,57)}function RA(e){e=e|0,AA(e+24|0)}function AA(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function OA(e){e=e|0;var n=0;n=yr()|0,jn(e,5,5,n,LA()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function MA(e){e=e|0,kA(e)}function kA(e){e=e|0,NA(e)}function NA(e){e=e|0;var n=0,r=0;n=e+8|0,r=n+48|0;do t[n>>2]=0,n=n+4|0;while((n|0)<(r|0));p[e+56>>0]=1}function LA(){return 1432}function FA(){return PA()|0}function PA(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0;h=m,m=m+16|0,e=h+4|0,n=h,r=Oa(8)|0,u=r,l=pn(48)|0,s=l,D=s+48|0;do t[s>>2]=0,s=s+4|0;while((s|0)<(D|0));return s=u+4|0,t[s>>2]=l,D=pn(8)|0,s=t[s>>2]|0,t[n>>2]=0,t[e>>2]=t[n>>2],Dh(D,s,e),t[r>>2]=D,m=h,u|0}function IA(e,n){e=e|0,n=n|0,t[e>>2]=bA()|0,t[e+4>>2]=BA()|0,t[e+12>>2]=n,t[e+8>>2]=UA()|0,t[e+32>>2]=6}function bA(){return 11704}function BA(){return 1436}function UA(){return o_()|0}function jA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(zA(r),_t(r)):n|0&&_t(n)}function zA(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function HA(e){e=e|0,qA(e,4933),WA(e)|0,VA(e)|0}function qA(e,n){e=e|0,n=n|0;var r=0;r=v7()|0,t[e>>2]=r,m7(r,n),$d(t[e>>2]|0)}function WA(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,u7()|0),e|0}function VA(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,GA()|0),e|0}function GA(){var e=0;return p[7920]|0||(mw(10452),Wt(58,10452,ve|0)|0,e=7920,t[e>>2]=1,t[e+4>>2]=0),sr(10452)|0||mw(10452),10452}function mw(e){e=e|0,XA(e),Gp(e,1)}function YA(e){e=e|0,KA(e+24|0)}function KA(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function XA(e){e=e|0;var n=0;n=yr()|0,jn(e,5,1,n,$A()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function QA(e,n,r){e=e|0,n=+n,r=+r,JA(e,n,r)}function JA(e,n,r){e=e|0,n=+n,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,s=u+8|0,D=u+17|0,l=u,h=u+16|0,Fl(D,n),U[s>>3]=+us(D,n),Fl(h,r),U[l>>3]=+us(h,r),ZA(e,s,l),m=u}function ZA(e,n,r){e=e|0,n=n|0,r=r|0,yw(e+8|0,+U[n>>3],+U[r>>3]),p[e+24>>0]=1}function yw(e,n,r){e=e|0,n=+n,r=+r,U[e>>3]=n,U[e+8>>3]=r}function $A(){return 1472}function e7(e,n){return e=+e,n=+n,t7(e,n)|0}function t7(e,n){e=+e,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,h=u+4|0,D=u+8|0,S=u,l=Oa(8)|0,r=l,s=pn(16)|0,Fl(h,e),e=+us(h,e),Fl(D,n),yw(s,e,+us(D,n)),D=r+4|0,t[D>>2]=s,s=pn(8)|0,D=t[D>>2]|0,t[S>>2]=0,t[h>>2]=t[S>>2],gw(s,D,h),t[l>>2]=s,m=u,r|0}function gw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1452,t[r+12>>2]=n,t[e+4>>2]=r}function n7(e){e=e|0,Iv(e),_t(e)}function r7(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function i7(e){e=e|0,_t(e)}function u7(){var e=0;return p[7928]|0||(_w(10488),Wt(59,10488,ve|0)|0,e=7928,t[e>>2]=1,t[e+4>>2]=0),sr(10488)|0||_w(10488),10488}function _w(e){e=e|0,s7(e),Gp(e,60)}function o7(e){e=e|0,l7(e+24|0)}function l7(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function s7(e){e=e|0;var n=0;n=yr()|0,jn(e,5,6,n,d7()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function a7(e){e=e|0,f7(e)}function f7(e){e=e|0,c7(e)}function c7(e){e=e|0,Ew(e+8|0),p[e+24>>0]=1}function Ew(e){e=e|0,t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,t[e+12>>2]=0}function d7(){return 1492}function p7(){return h7()|0}function h7(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Oa(8)|0,e=r,u=pn(16)|0,Ew(u),s=e+4|0,t[s>>2]=u,u=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],gw(u,s,l),t[r>>2]=u,m=n,e|0}function v7(){var e=0;return p[7936]|0||(w7(10524),Wt(25,10524,ve|0)|0,e=7936,t[e>>2]=1,t[e+4>>2]=0),10524}function m7(e,n){e=e|0,n=n|0,t[e>>2]=y7()|0,t[e+4>>2]=g7()|0,t[e+12>>2]=n,t[e+8>>2]=_7()|0,t[e+32>>2]=7}function y7(){return 11700}function g7(){return 1484}function _7(){return o_()|0}function E7(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(D7(r),_t(r)):n|0&&_t(n)}function D7(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function w7(e){e=e|0,Xa(e)}function S7(e,n,r){e=e|0,n=n|0,r=r|0,e=Fr(n)|0,n=T7(r)|0,r=C7(r,0)|0,tO(e,n,r,fE()|0,0)}function T7(e){return e=e|0,e|0}function C7(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=fE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(ww(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(N7(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function fE(){var e=0,n=0;if(p[7944]|0||(Dw(10568),Wt(61,10568,ve|0)|0,n=7944,t[n>>2]=1,t[n+4>>2]=0),!(sr(10568)|0)){e=10568,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Dw(10568)}return 10568}function Dw(e){e=e|0,A7(e)}function x7(e){e=e|0,R7(e+24|0)}function R7(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function A7(e){e=e|0;var n=0;n=yr()|0,jn(e,1,17,n,Jh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function O7(e){return e=e|0,k7(t[(M7(e)|0)>>2]|0)|0}function M7(e){return e=e|0,(t[(fE()|0)+24>>2]|0)+(e<<3)|0}function k7(e){return e=e|0,H0(g_[e&7]()|0)|0}function ww(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function N7(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=L7(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,F7(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,ww(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,P7(e,l),I7(l),m=D;return}}function L7(e){return e=e|0,536870911}function F7(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function P7(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function I7(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function b7(){B7()}function B7(){U7(10604)}function U7(e){e=e|0,j7(e,4955)}function j7(e,n){e=e|0,n=n|0;var r=0;r=z7()|0,t[e>>2]=r,H7(r,n),$d(t[e>>2]|0)}function z7(){var e=0;return p[7952]|0||(J7(10612),Wt(25,10612,ve|0)|0,e=7952,t[e>>2]=1,t[e+4>>2]=0),10612}function H7(e,n){e=e|0,n=n|0,t[e>>2]=G7()|0,t[e+4>>2]=Y7()|0,t[e+12>>2]=n,t[e+8>>2]=K7()|0,t[e+32>>2]=8}function $d(e){e=e|0;var n=0,r=0;n=m,m=m+16|0,r=n,kv()|0,t[r>>2]=e,q7(10608,r),m=n}function kv(){return p[11714]|0||(t[2652]=0,Wt(62,10608,ve|0)|0,p[11714]=1),10608}function q7(e,n){e=e|0,n=n|0;var r=0;r=pn(8)|0,t[r+4>>2]=t[n>>2],t[r>>2]=t[e>>2],t[e>>2]=r}function W7(e){e=e|0,V7(e)}function V7(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,_t(r);while((n|0)!=0);t[e>>2]=0}function G7(){return 11715}function Y7(){return 1496}function K7(){return N1()|0}function X7(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(Q7(r),_t(r)):n|0&&_t(n)}function Q7(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function J7(e){e=e|0,Xa(e)}function Z7(e,n){e=e|0,n=n|0;var r=0,u=0;kv()|0,r=t[2652]|0;e:do if(r|0){for(;u=t[r+4>>2]|0,!(u|0?(r8(cE(u)|0,e)|0)==0:0);)if(r=t[r>>2]|0,!r)break e;$7(u,n)}while(0)}function cE(e){return e=e|0,t[e+12>>2]|0}function $7(e,n){e=e|0,n=n|0;var r=0;e=e+36|0,r=t[e>>2]|0,r|0&&(fa(r),_t(r)),r=pn(4)|0,wf(r,n),t[e>>2]=r}function dE(){return p[11716]|0||(t[2664]=0,Wt(63,10656,ve|0)|0,p[11716]=1),10656}function Sw(){var e=0;return p[11717]|0?e=t[2665]|0:(eO(),t[2665]=1504,p[11717]=1,e=1504),e|0}function eO(){p[11740]|0||(p[11718]=hn(hn(8,0)|0,0)|0,p[11719]=hn(hn(0,0)|0,0)|0,p[11720]=hn(hn(0,16)|0,0)|0,p[11721]=hn(hn(8,0)|0,0)|0,p[11722]=hn(hn(0,0)|0,0)|0,p[11723]=hn(hn(8,0)|0,0)|0,p[11724]=hn(hn(0,0)|0,0)|0,p[11725]=hn(hn(8,0)|0,0)|0,p[11726]=hn(hn(0,0)|0,0)|0,p[11727]=hn(hn(8,0)|0,0)|0,p[11728]=hn(hn(0,0)|0,0)|0,p[11729]=hn(hn(0,0)|0,32)|0,p[11730]=hn(hn(0,0)|0,32)|0,p[11740]=1)}function Tw(){return 1572}function tO(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0,M=0;s=m,m=m+32|0,M=s+16|0,N=s+12|0,S=s+8|0,D=s+4|0,h=s,t[M>>2]=e,t[N>>2]=n,t[S>>2]=r,t[D>>2]=u,t[h>>2]=l,dE()|0,nO(10656,M,N,S,D,h),m=s}function nO(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0;h=pn(24)|0,yd(h+4|0,t[n>>2]|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0),t[h>>2]=t[e>>2],t[e>>2]=h}function Cw(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0;if(ft=m,m=m+32|0,Se=ft+20|0,ye=ft+8|0,Je=ft+4|0,Ge=ft,n=t[n>>2]|0,n|0){be=Se+4|0,S=Se+8|0,N=ye+4|0,M=ye+8|0,I=ye+8|0,K=Se+8|0;do{if(h=n+4|0,D=pE(h)|0,D|0){if(l=Dy(D)|0,t[Se>>2]=0,t[be>>2]=0,t[S>>2]=0,u=(wy(D)|0)+1|0,rO(Se,u),u|0)for(;u=u+-1|0,Gf(ye,t[l>>2]|0),s=t[be>>2]|0,s>>>0<(t[K>>2]|0)>>>0?(t[s>>2]=t[ye>>2],t[be>>2]=(t[be>>2]|0)+4):hE(Se,ye),u;)l=l+4|0;u=Sy(D)|0,t[ye>>2]=0,t[N>>2]=0,t[M>>2]=0;e:do if(t[u>>2]|0)for(l=0,s=0;;){if((l|0)==(s|0)?iO(ye,u):(t[l>>2]=t[u>>2],t[N>>2]=(t[N>>2]|0)+4),u=u+4|0,!(t[u>>2]|0))break e;l=t[N>>2]|0,s=t[I>>2]|0}while(0);t[Je>>2]=l_(h)|0,t[Ge>>2]=sr(D)|0,uO(r,e,Je,Ge,Se,ye),vE(ye),L1(Se)}n=t[n>>2]|0}while((n|0)!=0)}m=ft}function pE(e){return e=e|0,t[e+12>>2]|0}function Dy(e){return e=e|0,t[e+12>>2]|0}function wy(e){return e=e|0,t[e+16>>2]|0}function rO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=t[e>>2]|0,(t[e+8>>2]|0)-u>>2>>>0>>0&&(Lw(r,n,(t[e+4>>2]|0)-u>>2,e+8|0),Fw(e,r),Pw(r)),m=l}function hE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=Nw(e)|0,s>>>0>>0)hi(e);else{D=t[e>>2]|0,N=(t[e+8>>2]|0)-D|0,S=N>>1,Lw(r,N>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,Fw(e,r),Pw(r),m=h;return}}function Sy(e){return e=e|0,t[e+8>>2]|0}function iO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=kw(e)|0,s>>>0>>0)hi(e);else{D=t[e>>2]|0,N=(t[e+8>>2]|0)-D|0,S=N>>1,TO(r,N>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,CO(e,r),xO(r),m=h;return}}function l_(e){return e=e|0,t[e>>2]|0}function uO(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,oO(e,n,r,u,l,s)}function vE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),_t(r))}function L1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),_t(r))}function oO(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0;h=m,m=m+48|0,M=h+40|0,D=h+32|0,I=h+24|0,S=h+12|0,N=h,Ma(D),e=yo(e)|0,t[I>>2]=t[n>>2],r=t[r>>2]|0,u=t[u>>2]|0,mE(S,l),lO(N,s),t[M>>2]=t[I>>2],sO(e,M,r,u,S,N),vE(N),L1(S),ka(D),m=h}function mE(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(wO(e,u),SO(e,t[n>>2]|0,t[r>>2]|0,u))}function lO(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(EO(e,u),DO(e,t[n>>2]|0,t[r>>2]|0,u))}function sO(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0;h=m,m=m+32|0,M=h+28|0,I=h+24|0,D=h+12|0,S=h,N=go(aO()|0)|0,t[I>>2]=t[n>>2],t[M>>2]=t[I>>2],n=Yp(M)|0,r=xw(r)|0,u=yE(u)|0,t[D>>2]=t[l>>2],M=l+4|0,t[D+4>>2]=t[M>>2],I=l+8|0,t[D+8>>2]=t[I>>2],t[I>>2]=0,t[M>>2]=0,t[l>>2]=0,l=gE(D)|0,t[S>>2]=t[s>>2],M=s+4|0,t[S+4>>2]=t[M>>2],I=s+8|0,t[S+8>>2]=t[I>>2],t[I>>2]=0,t[M>>2]=0,t[s>>2]=0,K0(0,N|0,e|0,n|0,r|0,u|0,l|0,fO(S)|0)|0,vE(S),L1(D),m=h}function aO(){var e=0;return p[7968]|0||(gO(10708),e=7968,t[e>>2]=1,t[e+4>>2]=0),10708}function Yp(e){return e=e|0,Aw(e)|0}function xw(e){return e=e|0,Rw(e)|0}function yE(e){return e=e|0,H0(e)|0}function gE(e){return e=e|0,dO(e)|0}function fO(e){return e=e|0,cO(e)|0}function cO(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Oa(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=Rw(t[(t[e>>2]|0)+(n<<2)>>2]|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function Rw(e){return e=e|0,e|0}function dO(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Oa(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=Aw((t[e>>2]|0)+(n<<2)|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function Aw(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Iu(Ow()|0)|0,u?(rs(n,u),Mf(r,n),KN(e,r),e=Cs(n)|0):e=pO(e)|0,m=l,e|0}function Ow(){var e=0;return p[7960]|0||(yO(10664),Wt(25,10664,ve|0)|0,e=7960,t[e>>2]=1,t[e+4>>2]=0),10664}function pO(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Oa(8)|0,n=u,D=pn(4)|0,t[D>>2]=t[e>>2],s=n+4|0,t[s>>2]=D,e=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Mw(e,s,l),t[u>>2]=e,m=r,n|0}function Mw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1656,t[r+12>>2]=n,t[e+4>>2]=r}function hO(e){e=e|0,Iv(e),_t(e)}function vO(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function mO(e){e=e|0,_t(e)}function yO(e){e=e|0,Xa(e)}function gO(e){e=e|0,ol(e,_O()|0,5)}function _O(){return 1676}function EO(e,n){e=e|0,n=n|0;var r=0;if((kw(e)|0)>>>0>>0&&hi(e),n>>>0>1073741823)$n();else{r=pn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function DO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(gr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function kw(e){return e=e|0,1073741823}function wO(e,n){e=e|0,n=n|0;var r=0;if((Nw(e)|0)>>>0>>0&&hi(e),n>>>0>1073741823)$n();else{r=pn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function SO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(gr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function Nw(e){return e=e|0,1073741823}function TO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)$n();else{l=pn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function CO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function xO(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&_t(e)}function Lw(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)$n();else{l=pn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function Fw(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Pw(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&_t(e)}function RO(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0;if(ye=m,m=m+32|0,M=ye+20|0,I=ye+12|0,N=ye+16|0,K=ye+4|0,be=ye,Se=ye+8|0,D=Sw()|0,s=t[D>>2]|0,h=t[s>>2]|0,h|0)for(S=t[D+8>>2]|0,D=t[D+4>>2]|0;Gf(M,h),AO(e,M,D,S),s=s+4|0,h=t[s>>2]|0,h;)S=S+1|0,D=D+1|0;if(s=Tw()|0,h=t[s>>2]|0,h|0)do Gf(M,h),t[I>>2]=t[s+4>>2],OO(n,M,I),s=s+8|0,h=t[s>>2]|0;while((h|0)!=0);if(s=t[(kv()|0)>>2]|0,s|0)do n=t[s+4>>2]|0,Gf(M,t[(Nv(n)|0)>>2]|0),t[I>>2]=cE(n)|0,MO(r,M,I),s=t[s>>2]|0;while((s|0)!=0);if(Gf(N,0),s=dE()|0,t[M>>2]=t[N>>2],Cw(M,s,l),s=t[(kv()|0)>>2]|0,s|0){e=M+4|0,n=M+8|0,r=M+8|0;do{if(S=t[s+4>>2]|0,Gf(I,t[(Nv(S)|0)>>2]|0),kO(K,Iw(S)|0),h=t[K>>2]|0,h|0){t[M>>2]=0,t[e>>2]=0,t[n>>2]=0;do Gf(be,t[(Nv(t[h+4>>2]|0)|0)>>2]|0),D=t[e>>2]|0,D>>>0<(t[r>>2]|0)>>>0?(t[D>>2]=t[be>>2],t[e>>2]=(t[e>>2]|0)+4):hE(M,be),h=t[h>>2]|0;while((h|0)!=0);NO(u,I,M),L1(M)}t[Se>>2]=t[I>>2],N=bw(S)|0,t[M>>2]=t[Se>>2],Cw(M,N,l),_d(K),s=t[s>>2]|0}while((s|0)!=0)}m=ye}function AO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,WO(e,n,r,u)}function OO(e,n,r){e=e|0,n=n|0,r=r|0,qO(e,n,r)}function Nv(e){return e=e|0,e|0}function MO(e,n,r){e=e|0,n=n|0,r=r|0,UO(e,n,r)}function Iw(e){return e=e|0,e+16|0}function kO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(s=m,m=m+16|0,l=s+8|0,r=s,t[e>>2]=0,u=t[n>>2]|0,t[l>>2]=u,t[r>>2]=e,r=BO(r)|0,u|0){if(u=pn(12)|0,h=(Bw(l)|0)+4|0,e=t[h+4>>2]|0,n=u+4|0,t[n>>2]=t[h>>2],t[n+4>>2]=e,n=t[t[l>>2]>>2]|0,t[l>>2]=n,!n)e=u;else for(n=u;e=pn(12)|0,S=(Bw(l)|0)+4|0,D=t[S+4>>2]|0,h=e+4|0,t[h>>2]=t[S>>2],t[h+4>>2]=D,t[n>>2]=e,h=t[t[l>>2]>>2]|0,t[l>>2]=h,h;)n=e;t[e>>2]=t[r>>2],t[r>>2]=u}m=s}function NO(e,n,r){e=e|0,n=n|0,r=r|0,LO(e,n,r)}function bw(e){return e=e|0,e+24|0}function LO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+24|0,l=u+16|0,D=u+12|0,s=u,Ma(l),e=yo(e)|0,t[D>>2]=t[n>>2],mE(s,r),t[h>>2]=t[D>>2],FO(e,h,s),L1(s),ka(l),m=u}function FO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+16|0,D=u+12|0,l=u,s=go(PO()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Yp(h)|0,t[l>>2]=t[r>>2],h=r+4|0,t[l+4>>2]=t[h>>2],D=r+8|0,t[l+8>>2]=t[D>>2],t[D>>2]=0,t[h>>2]=0,t[r>>2]=0,P0(0,s|0,e|0,n|0,gE(l)|0)|0,L1(l),m=u}function PO(){var e=0;return p[7976]|0||(IO(10720),e=7976,t[e>>2]=1,t[e+4>>2]=0),10720}function IO(e){e=e|0,ol(e,bO()|0,2)}function bO(){return 1732}function BO(e){return e=e|0,t[e>>2]|0}function Bw(e){return e=e|0,t[e>>2]|0}function UO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,Ma(l),e=yo(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],Uw(e,s,r),ka(l),m=u}function Uw(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,s=u+4|0,h=u,l=go(jO()|0)|0,t[h>>2]=t[n>>2],t[s>>2]=t[h>>2],n=Yp(s)|0,P0(0,l|0,e|0,n|0,xw(r)|0)|0,m=u}function jO(){var e=0;return p[7984]|0||(zO(10732),e=7984,t[e>>2]=1,t[e+4>>2]=0),10732}function zO(e){e=e|0,ol(e,HO()|0,2)}function HO(){return 1744}function qO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,Ma(l),e=yo(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],Uw(e,s,r),ka(l),m=u}function WO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,Ma(s),e=yo(e)|0,t[D>>2]=t[n>>2],r=p[r>>0]|0,u=p[u>>0]|0,t[h>>2]=t[D>>2],VO(e,h,r,u),ka(s),m=l}function VO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,h=l+4|0,D=l,s=go(GO()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Yp(h)|0,r=Lv(r)|0,Hn(0,s|0,e|0,n|0,r|0,Lv(u)|0)|0,m=l}function GO(){var e=0;return p[7992]|0||(KO(10744),e=7992,t[e>>2]=1,t[e+4>>2]=0),10744}function Lv(e){return e=e|0,YO(e)|0}function YO(e){return e=e|0,e&255|0}function KO(e){e=e|0,ol(e,XO()|0,3)}function XO(){return 1756}function QO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;switch(K=m,m=m+32|0,D=K+8|0,S=K+4|0,N=K+20|0,M=K,Sa(e,0),u=YN(n)|0,t[D>>2]=0,I=D+4|0,t[I>>2]=0,t[D+8>>2]=0,u<<24>>24){case 0:{p[N>>0]=0,JO(S,r,N),s_(e,S)|0,U0(S);break}case 8:{I=TE(n)|0,p[N>>0]=8,Gf(M,t[I+4>>2]|0),ZO(S,r,N,M,I+8|0),s_(e,S)|0,U0(S);break}case 9:{if(s=TE(n)|0,n=t[s+4>>2]|0,n|0)for(h=D+8|0,l=s+12|0;n=n+-1|0,Gf(S,t[l>>2]|0),u=t[I>>2]|0,u>>>0<(t[h>>2]|0)>>>0?(t[u>>2]=t[S>>2],t[I>>2]=(t[I>>2]|0)+4):hE(D,S),n;)l=l+4|0;p[N>>0]=9,Gf(M,t[s+8>>2]|0),$O(S,r,N,M,D),s_(e,S)|0,U0(S);break}default:I=TE(n)|0,p[N>>0]=u,Gf(M,t[I+4>>2]|0),eM(S,r,N,M),s_(e,S)|0,U0(S)}L1(D),m=K}function JO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,Ma(l),n=yo(n)|0,pM(e,n,p[r>>0]|0),ka(l),m=u}function s_(e,n){e=e|0,n=n|0;var r=0;return r=t[e>>2]|0,r|0&&qr(r|0),t[e>>2]=t[n>>2],t[n>>2]=0,e|0}function ZO(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+32|0,D=s+16|0,h=s+8|0,S=s,Ma(h),n=yo(n)|0,r=p[r>>0]|0,t[S>>2]=t[u>>2],l=t[l>>2]|0,t[D>>2]=t[S>>2],aM(e,n,r,D,l),ka(h),m=s}function $O(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0;s=m,m=m+32|0,S=s+24|0,h=s+16|0,N=s+12|0,D=s,Ma(h),n=yo(n)|0,r=p[r>>0]|0,t[N>>2]=t[u>>2],mE(D,l),t[S>>2]=t[N>>2],uM(e,n,r,S,D),L1(D),ka(h),m=s}function eM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,Ma(s),n=yo(n)|0,r=p[r>>0]|0,t[D>>2]=t[u>>2],t[h>>2]=t[D>>2],tM(e,n,r,h),ka(s),m=l}function tM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+4|0,D=l,h=go(nM()|0)|0,r=Lv(r)|0,t[D>>2]=t[u>>2],t[s>>2]=t[D>>2],a_(e,P0(0,h|0,n|0,r|0,Yp(s)|0)|0),m=l}function nM(){var e=0;return p[8e3]|0||(rM(10756),e=8e3,t[e>>2]=1,t[e+4>>2]=0),10756}function a_(e,n){e=e|0,n=n|0,Sa(e,n)}function rM(e){e=e|0,ol(e,iM()|0,2)}function iM(){return 1772}function uM(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0;s=m,m=m+32|0,S=s+16|0,N=s+12|0,h=s,D=go(oM()|0)|0,r=Lv(r)|0,t[N>>2]=t[u>>2],t[S>>2]=t[N>>2],u=Yp(S)|0,t[h>>2]=t[l>>2],S=l+4|0,t[h+4>>2]=t[S>>2],N=l+8|0,t[h+8>>2]=t[N>>2],t[N>>2]=0,t[S>>2]=0,t[l>>2]=0,a_(e,Hn(0,D|0,n|0,r|0,u|0,gE(h)|0)|0),L1(h),m=s}function oM(){var e=0;return p[8008]|0||(lM(10768),e=8008,t[e>>2]=1,t[e+4>>2]=0),10768}function lM(e){e=e|0,ol(e,sM()|0,3)}function sM(){return 1784}function aM(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,D=s+4|0,S=s,h=go(fM()|0)|0,r=Lv(r)|0,t[S>>2]=t[u>>2],t[D>>2]=t[S>>2],u=Yp(D)|0,a_(e,Hn(0,h|0,n|0,r|0,u|0,yE(l)|0)|0),m=s}function fM(){var e=0;return p[8016]|0||(cM(10780),e=8016,t[e>>2]=1,t[e+4>>2]=0),10780}function cM(e){e=e|0,ol(e,dM()|0,3)}function dM(){return 1800}function pM(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=go(hM()|0)|0,a_(e,Ki(0,u|0,n|0,Lv(r)|0)|0)}function hM(){var e=0;return p[8024]|0||(vM(10792),e=8024,t[e>>2]=1,t[e+4>>2]=0),10792}function vM(e){e=e|0,ol(e,mM()|0,1)}function mM(){return 1816}function yM(){gM(),_M(),EM()}function gM(){t[2702]=p8(65536)|0}function _M(){jM(10856)}function EM(){DM(10816)}function DM(e){e=e|0,wM(e,5044),SM(e)|0}function wM(e,n){e=e|0,n=n|0;var r=0;r=Ow()|0,t[e>>2]=r,FM(r,n),$d(t[e>>2]|0)}function SM(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,TM()|0),e|0}function TM(){var e=0;return p[8032]|0||(jw(10820),Wt(64,10820,ve|0)|0,e=8032,t[e>>2]=1,t[e+4>>2]=0),sr(10820)|0||jw(10820),10820}function jw(e){e=e|0,RM(e),Gp(e,25)}function CM(e){e=e|0,xM(e+24|0)}function xM(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function RM(e){e=e|0;var n=0;n=yr()|0,jn(e,5,18,n,kM()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function AM(e,n){e=e|0,n=n|0,OM(e,n)}function OM(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;r=m,m=m+16|0,u=r,l=r+4|0,Pf(l,n),t[u>>2]=If(l,n)|0,MM(e,u),m=r}function MM(e,n){e=e|0,n=n|0,zw(e+4|0,t[n>>2]|0),p[e+8>>0]=1}function zw(e,n){e=e|0,n=n|0,t[e>>2]=n}function kM(){return 1824}function NM(e){return e=e|0,LM(e)|0}function LM(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Oa(8)|0,n=u,D=pn(4)|0,Pf(l,e),zw(D,If(l,e)|0),s=n+4|0,t[s>>2]=D,e=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Mw(e,s,l),t[u>>2]=e,m=r,n|0}function Oa(e){e=e|0;var n=0,r=0;return e=e+7&-8,(e>>>0<=32768?(n=t[2701]|0,e>>>0<=(65536-n|0)>>>0):0)?(r=(t[2702]|0)+n|0,t[2701]=n+e,e=r):(e=p8(e+8|0)|0,t[e>>2]=t[2703],t[2703]=e,e=e+8|0),e|0}function FM(e,n){e=e|0,n=n|0,t[e>>2]=PM()|0,t[e+4>>2]=IM()|0,t[e+12>>2]=n,t[e+8>>2]=bM()|0,t[e+32>>2]=9}function PM(){return 11744}function IM(){return 1832}function bM(){return o_()|0}function BM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(UM(r),_t(r)):n|0&&_t(n)}function UM(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function jM(e){e=e|0,zM(e,5052),HM(e)|0,qM(e,5058,26)|0,WM(e,5069,1)|0,VM(e,5077,10)|0,GM(e,5087,19)|0,YM(e,5094,27)|0}function zM(e,n){e=e|0,n=n|0;var r=0;r=UN()|0,t[e>>2]=r,jN(r,n),$d(t[e>>2]|0)}function HM(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,CN()|0),e|0}function qM(e,n,r){return e=e|0,n=n|0,r=r|0,lN(e,Fr(n)|0,r,0),e|0}function WM(e,n,r){return e=e|0,n=n|0,r=r|0,Gk(e,Fr(n)|0,r,0),e|0}function VM(e,n,r){return e=e|0,n=n|0,r=r|0,Tk(e,Fr(n)|0,r,0),e|0}function GM(e,n,r){return e=e|0,n=n|0,r=r|0,ak(e,Fr(n)|0,r,0),e|0}function Hw(e,n){e=e|0,n=n|0;var r=0,u=0;e:for(;;){for(r=t[2703]|0;;){if((r|0)==(n|0))break e;if(u=t[r>>2]|0,t[2703]=u,!r)r=u;else break}_t(r)}t[2701]=e}function YM(e,n,r){return e=e|0,n=n|0,r=r|0,KM(e,Fr(n)|0,r,0),e|0}function KM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=_E()|0,e=XM(r)|0,wi(s,n,l,e,QM(r,u)|0,u)}function _E(){var e=0,n=0;if(p[8040]|0||(Ww(10860),Wt(65,10860,ve|0)|0,n=8040,t[n>>2]=1,t[n+4>>2]=0),!(sr(10860)|0)){e=10860,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ww(10860)}return 10860}function XM(e){return e=e|0,e|0}function QM(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=_E()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(qw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(JM(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function qw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function JM(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=ZM(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,$M(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,qw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,ek(e,l),tk(l),m=D;return}}function ZM(e){return e=e|0,536870911}function $M(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function ek(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function tk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Ww(e){e=e|0,ik(e)}function nk(e){e=e|0,rk(e+24|0)}function rk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function ik(e){e=e|0;var n=0;n=yr()|0,jn(e,1,11,n,uk()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function uk(){return 1840}function ok(e,n,r){e=e|0,n=n|0,r=r|0,sk(t[(lk(e)|0)>>2]|0,n,r)}function lk(e){return e=e|0,(t[(_E()|0)+24>>2]|0)+(e<<3)|0}function sk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+1|0,l=u,Pf(s,n),n=If(s,n)|0,Pf(l,r),r=If(l,r)|0,P1[e&31](n,r),m=u}function ak(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=EE()|0,e=fk(r)|0,wi(s,n,l,e,ck(r,u)|0,u)}function EE(){var e=0,n=0;if(p[8048]|0||(Gw(10896),Wt(66,10896,ve|0)|0,n=8048,t[n>>2]=1,t[n+4>>2]=0),!(sr(10896)|0)){e=10896,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Gw(10896)}return 10896}function fk(e){return e=e|0,e|0}function ck(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=EE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Vw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(dk(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function Vw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function dk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=pk(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,hk(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Vw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,vk(e,l),mk(l),m=D;return}}function pk(e){return e=e|0,536870911}function hk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function vk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function mk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Gw(e){e=e|0,_k(e)}function yk(e){e=e|0,gk(e+24|0)}function gk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function _k(e){e=e|0;var n=0;n=yr()|0,jn(e,1,11,n,Ek()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Ek(){return 1852}function Dk(e,n){return e=e|0,n=n|0,Sk(t[(wk(e)|0)>>2]|0,n)|0}function wk(e){return e=e|0,(t[(EE()|0)+24>>2]|0)+(e<<3)|0}function Sk(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,Pf(u,n),n=If(u,n)|0,n=H0(Jp[e&31](n)|0)|0,m=r,n|0}function Tk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=DE()|0,e=Ck(r)|0,wi(s,n,l,e,xk(r,u)|0,u)}function DE(){var e=0,n=0;if(p[8056]|0||(Kw(10932),Wt(67,10932,ve|0)|0,n=8056,t[n>>2]=1,t[n+4>>2]=0),!(sr(10932)|0)){e=10932,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Kw(10932)}return 10932}function Ck(e){return e=e|0,e|0}function xk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=DE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Yw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Rk(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function Yw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Rk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Ak(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,Ok(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Yw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Mk(e,l),kk(l),m=D;return}}function Ak(e){return e=e|0,536870911}function Ok(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Mk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function kk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Kw(e){e=e|0,Fk(e)}function Nk(e){e=e|0,Lk(e+24|0)}function Lk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function Fk(e){e=e|0;var n=0;n=yr()|0,jn(e,1,7,n,Pk()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Pk(){return 1860}function Ik(e,n,r){return e=e|0,n=n|0,r=r|0,Bk(t[(bk(e)|0)>>2]|0,n,r)|0}function bk(e){return e=e|0,(t[(DE()|0)+24>>2]|0)+(e<<3)|0}function Bk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+32|0,h=u+12|0,s=u+8|0,D=u,S=u+16|0,l=u+4|0,Uk(S,n),jk(D,S,n),Ys(l,r),r=Ks(l,r)|0,t[h>>2]=t[D>>2],Ry[e&15](s,h,r),r=zk(s)|0,U0(s),Xs(l),m=u,r|0}function Uk(e,n){e=e|0,n=n|0}function jk(e,n,r){e=e|0,n=n|0,r=r|0,Hk(e,r)}function zk(e){return e=e|0,yo(e)|0}function Hk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+16|0,r=l,u=n,u&1?(qk(r,0),eu(u|0,r|0)|0,Wk(e,r),Vk(r)):t[e>>2]=t[n>>2],m=l}function qk(e,n){e=e|0,n=n|0,fd(e,n),t[e+4>>2]=0,p[e+8>>0]=0}function Wk(e,n){e=e|0,n=n|0,t[e>>2]=t[n+4>>2]}function Vk(e){e=e|0,p[e+8>>0]=0}function Gk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=wE()|0,e=Yk(r)|0,wi(s,n,l,e,Kk(r,u)|0,u)}function wE(){var e=0,n=0;if(p[8064]|0||(Qw(10968),Wt(68,10968,ve|0)|0,n=8064,t[n>>2]=1,t[n+4>>2]=0),!(sr(10968)|0)){e=10968,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Qw(10968)}return 10968}function Yk(e){return e=e|0,e|0}function Kk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=wE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Xw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Xk(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function Xw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Xk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Qk(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,Jk(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Xw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Zk(e,l),$k(l),m=D;return}}function Qk(e){return e=e|0,536870911}function Jk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Zk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function $k(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Qw(e){e=e|0,nN(e)}function eN(e){e=e|0,tN(e+24|0)}function tN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function nN(e){e=e|0;var n=0;n=yr()|0,jn(e,1,1,n,rN()|0,5),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function rN(){return 1872}function iN(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,oN(t[(uN(e)|0)>>2]|0,n,r,u,l,s)}function uN(e){return e=e|0,(t[(wE()|0)+24>>2]|0)+(e<<3)|0}function oN(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0;h=m,m=m+32|0,D=h+16|0,S=h+12|0,N=h+8|0,M=h+4|0,I=h,Ys(D,n),n=Ks(D,n)|0,Ys(S,r),r=Ks(S,r)|0,Ys(N,u),u=Ks(N,u)|0,Ys(M,l),l=Ks(M,l)|0,Ys(I,s),s=Ks(I,s)|0,g8[e&1](n,r,u,l,s),Xs(I),Xs(M),Xs(N),Xs(S),Xs(D),m=h}function lN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=SE()|0,e=sN(r)|0,wi(s,n,l,e,aN(r,u)|0,u)}function SE(){var e=0,n=0;if(p[8072]|0||(Zw(11004),Wt(69,11004,ve|0)|0,n=8072,t[n>>2]=1,t[n+4>>2]=0),!(sr(11004)|0)){e=11004,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Zw(11004)}return 11004}function sN(e){return e=e|0,e|0}function aN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=SE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Jw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(fN(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function Jw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function fN(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=cN(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,dN(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Jw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,pN(e,l),hN(l),m=D;return}}function cN(e){return e=e|0,536870911}function dN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function pN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function hN(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Zw(e){e=e|0,yN(e)}function vN(e){e=e|0,mN(e+24|0)}function mN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function yN(e){e=e|0;var n=0;n=yr()|0,jn(e,1,12,n,gN()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gN(){return 1896}function _N(e,n,r){e=e|0,n=n|0,r=r|0,DN(t[(EN(e)|0)>>2]|0,n,r)}function EN(e){return e=e|0,(t[(SE()|0)+24>>2]|0)+(e<<3)|0}function DN(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+4|0,l=u,wN(s,n),n=SN(s,n)|0,Ys(l,r),r=Ks(l,r)|0,P1[e&31](n,r),Xs(l),m=u}function wN(e,n){e=e|0,n=n|0}function SN(e,n){return e=e|0,n=n|0,TN(n)|0}function TN(e){return e=e|0,e|0}function CN(){var e=0;return p[8080]|0||($w(11040),Wt(70,11040,ve|0)|0,e=8080,t[e>>2]=1,t[e+4>>2]=0),sr(11040)|0||$w(11040),11040}function $w(e){e=e|0,AN(e),Gp(e,71)}function xN(e){e=e|0,RN(e+24|0)}function RN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function AN(e){e=e|0;var n=0;n=yr()|0,jn(e,5,7,n,NN()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function ON(e){e=e|0,MN(e)}function MN(e){e=e|0,kN(e)}function kN(e){e=e|0,p[e+8>>0]=1}function NN(){return 1936}function LN(){return FN()|0}function FN(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Oa(8)|0,e=r,s=e+4|0,t[s>>2]=pn(1)|0,u=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],PN(u,s,l),t[r>>2]=u,m=n,e|0}function PN(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1916,t[r+12>>2]=n,t[e+4>>2]=r}function IN(e){e=e|0,Iv(e),_t(e)}function bN(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function BN(e){e=e|0,_t(e)}function UN(){var e=0;return p[8088]|0||(GN(11076),Wt(25,11076,ve|0)|0,e=8088,t[e>>2]=1,t[e+4>>2]=0),11076}function jN(e,n){e=e|0,n=n|0,t[e>>2]=zN()|0,t[e+4>>2]=HN()|0,t[e+12>>2]=n,t[e+8>>2]=qN()|0,t[e+32>>2]=10}function zN(){return 11745}function HN(){return 1940}function qN(){return N1()|0}function WN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(VN(r),_t(r)):n|0&&_t(n)}function VN(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function GN(e){e=e|0,Xa(e)}function Gf(e,n){e=e|0,n=n|0,t[e>>2]=n}function TE(e){return e=e|0,t[e>>2]|0}function YN(e){return e=e|0,p[t[e>>2]>>0]|0}function KN(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,t[u>>2]=t[e>>2],XN(n,u)|0,m=r}function XN(e,n){e=e|0,n=n|0;var r=0;return r=QN(t[e>>2]|0,n)|0,n=e+4|0,t[(t[n>>2]|0)+8>>2]=r,t[(t[n>>2]|0)+8>>2]|0}function QN(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,Ma(u),e=yo(e)|0,n=JN(e,t[n>>2]|0)|0,ka(u),m=r,n|0}function Ma(e){e=e|0,t[e>>2]=t[2701],t[e+4>>2]=t[2703]}function JN(e,n){e=e|0,n=n|0;var r=0;return r=go(ZN()|0)|0,Ki(0,r|0,e|0,yE(n)|0)|0}function ka(e){e=e|0,Hw(t[e>>2]|0,t[e+4>>2]|0)}function ZN(){var e=0;return p[8096]|0||($N(11120),e=8096,t[e>>2]=1,t[e+4>>2]=0),11120}function $N(e){e=e|0,ol(e,eL()|0,1)}function eL(){return 1948}function tL(){nL()}function nL(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0;if(Se=m,m=m+16|0,M=Se+4|0,I=Se,bn(65536,10804,t[2702]|0,10812),r=Sw()|0,n=t[r>>2]|0,e=t[n>>2]|0,e|0)for(u=t[r+8>>2]|0,r=t[r+4>>2]|0;Xl(e|0,k[r>>0]|0|0,p[u>>0]|0),n=n+4|0,e=t[n>>2]|0,e;)u=u+1|0,r=r+1|0;if(e=Tw()|0,n=t[e>>2]|0,n|0)do Mo(n|0,t[e+4>>2]|0),e=e+8|0,n=t[e>>2]|0;while((n|0)!=0);Mo(rL()|0,5167),N=kv()|0,e=t[N>>2]|0;e:do if(e|0){do iL(t[e+4>>2]|0),e=t[e>>2]|0;while((e|0)!=0);if(e=t[N>>2]|0,e|0){S=N;do{for(;l=e,e=t[e>>2]|0,l=t[l+4>>2]|0,!!(uL(l)|0);)if(t[I>>2]=S,t[M>>2]=t[I>>2],oL(N,M)|0,!e)break e;if(lL(l),S=t[S>>2]|0,n=e8(l)|0,s=ao()|0,h=m,m=m+((1*(n<<2)|0)+15&-16)|0,D=m,m=m+((1*(n<<2)|0)+15&-16)|0,n=t[(Iw(l)|0)>>2]|0,n|0)for(r=h,u=D;t[r>>2]=t[(Nv(t[n+4>>2]|0)|0)>>2],t[u>>2]=t[n+8>>2],n=t[n>>2]|0,n;)r=r+4|0,u=u+4|0;ye=Nv(l)|0,n=sL(l)|0,r=e8(l)|0,u=aL(l)|0,ko(ye|0,n|0,h|0,D|0,r|0,u|0,cE(l)|0),gi(s|0)}while((e|0)!=0)}}while(0);if(e=t[(dE()|0)>>2]|0,e|0)do ye=e+4|0,N=pE(ye)|0,l=Sy(N)|0,s=Dy(N)|0,h=(wy(N)|0)+1|0,D=f_(N)|0,S=t8(ye)|0,N=sr(N)|0,M=l_(ye)|0,I=CE(ye)|0,so(0,l|0,s|0,h|0,D|0,S|0,N|0,M|0,I|0,xE(ye)|0),e=t[e>>2]|0;while((e|0)!=0);e=t[(kv()|0)>>2]|0;e:do if(e|0){t:for(;;){if(n=t[e+4>>2]|0,n|0?(K=t[(Nv(n)|0)>>2]|0,be=t[(bw(n)|0)>>2]|0,be|0):0){r=be;do{n=r+4|0,u=pE(n)|0;n:do if(u|0)switch(sr(u)|0){case 0:break t;case 4:case 3:case 2:{D=Sy(u)|0,S=Dy(u)|0,N=(wy(u)|0)+1|0,M=f_(u)|0,I=sr(u)|0,ye=l_(n)|0,so(K|0,D|0,S|0,N|0,M|0,0,I|0,ye|0,CE(n)|0,xE(n)|0);break n}case 1:{h=Sy(u)|0,D=Dy(u)|0,S=(wy(u)|0)+1|0,N=f_(u)|0,M=t8(n)|0,I=sr(u)|0,ye=l_(n)|0,so(K|0,h|0,D|0,S|0,N|0,M|0,I|0,ye|0,CE(n)|0,xE(n)|0);break n}case 5:{N=Sy(u)|0,M=Dy(u)|0,I=(wy(u)|0)+1|0,ye=f_(u)|0,so(K|0,N|0,M|0,I|0,ye|0,fL(u)|0,sr(u)|0,0,0,0);break n}default:break n}while(0);r=t[r>>2]|0}while((r|0)!=0)}if(e=t[e>>2]|0,!e)break e}$n()}while(0);Is(),m=Se}function rL(){return 11703}function iL(e){e=e|0,p[e+40>>0]=0}function uL(e){return e=e|0,(p[e+40>>0]|0)!=0|0}function oL(e,n){return e=e|0,n=n|0,n=cL(n)|0,e=t[n>>2]|0,t[n>>2]=t[e>>2],_t(e),t[n>>2]|0}function lL(e){e=e|0,p[e+40>>0]=1}function e8(e){return e=e|0,t[e+20>>2]|0}function sL(e){return e=e|0,t[e+8>>2]|0}function aL(e){return e=e|0,t[e+32>>2]|0}function f_(e){return e=e|0,t[e+4>>2]|0}function t8(e){return e=e|0,t[e+4>>2]|0}function CE(e){return e=e|0,t[e+8>>2]|0}function xE(e){return e=e|0,t[e+16>>2]|0}function fL(e){return e=e|0,t[e+20>>2]|0}function cL(e){return e=e|0,t[e>>2]|0}function c_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0;Zt=m,m=m+16|0,K=Zt;do if(e>>>0<245){if(N=e>>>0<11?16:e+11&-8,e=N>>>3,I=t[2783]|0,r=I>>>e,r&3|0)return n=(r&1^1)+e|0,e=11172+(n<<1<<2)|0,r=e+8|0,u=t[r>>2]|0,l=u+8|0,s=t[l>>2]|0,(e|0)==(s|0)?t[2783]=I&~(1<>2]=e,t[r>>2]=s),Pe=n<<3,t[u+4>>2]=Pe|3,Pe=u+Pe+4|0,t[Pe>>2]=t[Pe>>2]|1,Pe=l,m=Zt,Pe|0;if(M=t[2785]|0,N>>>0>M>>>0){if(r|0)return n=2<>>12&16,n=n>>>h,r=n>>>5&8,n=n>>>r,l=n>>>2&4,n=n>>>l,e=n>>>1&2,n=n>>>e,u=n>>>1&1,u=(r|h|l|e|u)+(n>>>u)|0,n=11172+(u<<1<<2)|0,e=n+8|0,l=t[e>>2]|0,h=l+8|0,r=t[h>>2]|0,(n|0)==(r|0)?(e=I&~(1<>2]=n,t[e>>2]=r,e=I),s=(u<<3)-N|0,t[l+4>>2]=N|3,u=l+N|0,t[u+4>>2]=s|1,t[u+s>>2]=s,M|0&&(l=t[2788]|0,n=M>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=l,t[n+12>>2]=l,t[l+8>>2]=n,t[l+12>>2]=r),t[2785]=s,t[2788]=u,Pe=h,m=Zt,Pe|0;if(D=t[2784]|0,D){if(r=(D&0-D)+-1|0,h=r>>>12&16,r=r>>>h,s=r>>>5&8,r=r>>>s,S=r>>>2&4,r=r>>>S,u=r>>>1&2,r=r>>>u,e=r>>>1&1,e=t[11436+((s|h|S|u|e)+(r>>>e)<<2)>>2]|0,r=(t[e+4>>2]&-8)-N|0,u=t[e+16+(((t[e+16>>2]|0)==0&1)<<2)>>2]|0,!u)S=e,s=r;else{do h=(t[u+4>>2]&-8)-N|0,S=h>>>0>>0,r=S?h:r,e=S?u:e,u=t[u+16+(((t[u+16>>2]|0)==0&1)<<2)>>2]|0;while((u|0)!=0);S=e,s=r}if(h=S+N|0,S>>>0>>0){l=t[S+24>>2]|0,n=t[S+12>>2]|0;do if((n|0)==(S|0)){if(e=S+20|0,n=t[e>>2]|0,!n&&(e=S+16|0,n=t[e>>2]|0,!n)){r=0;break}for(;;){if(r=n+20|0,u=t[r>>2]|0,u|0){n=u,e=r;continue}if(r=n+16|0,u=t[r>>2]|0,u)n=u,e=r;else break}t[e>>2]=0,r=n}else r=t[S+8>>2]|0,t[r+12>>2]=n,t[n+8>>2]=r,r=n;while(0);do if(l|0){if(n=t[S+28>>2]|0,e=11436+(n<<2)|0,(S|0)==(t[e>>2]|0)){if(t[e>>2]=r,!r){t[2784]=D&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=l,n=t[S+16>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),n=t[S+20>>2]|0,n|0&&(t[r+20>>2]=n,t[n+24>>2]=r)}while(0);return s>>>0<16?(Pe=s+N|0,t[S+4>>2]=Pe|3,Pe=S+Pe+4|0,t[Pe>>2]=t[Pe>>2]|1):(t[S+4>>2]=N|3,t[h+4>>2]=s|1,t[h+s>>2]=s,M|0&&(u=t[2788]|0,n=M>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=I|n,n=r,e=r+8|0),t[e>>2]=u,t[n+12>>2]=u,t[u+8>>2]=n,t[u+12>>2]=r),t[2785]=s,t[2788]=h),Pe=S+8|0,m=Zt,Pe|0}else I=N}else I=N}else I=N}else if(e>>>0<=4294967231)if(e=e+11|0,N=e&-8,S=t[2784]|0,S){u=0-N|0,e=e>>>8,e?N>>>0>16777215?D=31:(I=(e+1048320|0)>>>16&8,Me=e<>>16&4,Me=Me<>>16&2,D=14-(M|I|D)+(Me<>>15)|0,D=N>>>(D+7|0)&1|D<<1):D=0,r=t[11436+(D<<2)>>2]|0;e:do if(!r)r=0,e=0,Me=57;else for(e=0,h=N<<((D|0)==31?0:25-(D>>>1)|0),s=0;;){if(l=(t[r+4>>2]&-8)-N|0,l>>>0>>0)if(l)e=r,u=l;else{e=r,u=0,l=r,Me=61;break e}if(l=t[r+20>>2]|0,r=t[r+16+(h>>>31<<2)>>2]|0,s=(l|0)==0|(l|0)==(r|0)?s:l,l=(r|0)==0,l){r=s,Me=57;break}else h=h<<((l^1)&1)}while(0);if((Me|0)==57){if((r|0)==0&(e|0)==0){if(e=2<>>12&16,I=I>>>h,s=I>>>5&8,I=I>>>s,D=I>>>2&4,I=I>>>D,M=I>>>1&2,I=I>>>M,r=I>>>1&1,e=0,r=t[11436+((s|h|D|M|r)+(I>>>r)<<2)>>2]|0}r?(l=r,Me=61):(D=e,h=u)}if((Me|0)==61)for(;;)if(Me=0,r=(t[l+4>>2]&-8)-N|0,I=r>>>0>>0,r=I?r:u,e=I?l:e,l=t[l+16+(((t[l+16>>2]|0)==0&1)<<2)>>2]|0,l)u=r,Me=61;else{D=e,h=r;break}if((D|0)!=0?h>>>0<((t[2785]|0)-N|0)>>>0:0){if(s=D+N|0,D>>>0>=s>>>0)return Pe=0,m=Zt,Pe|0;l=t[D+24>>2]|0,n=t[D+12>>2]|0;do if((n|0)==(D|0)){if(e=D+20|0,n=t[e>>2]|0,!n&&(e=D+16|0,n=t[e>>2]|0,!n)){n=0;break}for(;;){if(r=n+20|0,u=t[r>>2]|0,u|0){n=u,e=r;continue}if(r=n+16|0,u=t[r>>2]|0,u)n=u,e=r;else break}t[e>>2]=0}else Pe=t[D+8>>2]|0,t[Pe+12>>2]=n,t[n+8>>2]=Pe;while(0);do if(l){if(e=t[D+28>>2]|0,r=11436+(e<<2)|0,(D|0)==(t[r>>2]|0)){if(t[r>>2]=n,!n){u=S&~(1<>2]|0)!=(D|0)&1)<<2)>>2]=n,!n){u=S;break}t[n+24>>2]=l,e=t[D+16>>2]|0,e|0&&(t[n+16>>2]=e,t[e+24>>2]=n),e=t[D+20>>2]|0,e&&(t[n+20>>2]=e,t[e+24>>2]=n),u=S}else u=S;while(0);do if(h>>>0>=16){if(t[D+4>>2]=N|3,t[s+4>>2]=h|1,t[s+h>>2]=h,n=h>>>3,h>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=s,t[n+12>>2]=s,t[s+8>>2]=n,t[s+12>>2]=r;break}if(n=h>>>8,n?h>>>0>16777215?n=31:(Me=(n+1048320|0)>>>16&8,Pe=n<>>16&4,Pe=Pe<>>16&2,n=14-(ft|Me|n)+(Pe<>>15)|0,n=h>>>(n+7|0)&1|n<<1):n=0,r=11436+(n<<2)|0,t[s+28>>2]=n,e=s+16|0,t[e+4>>2]=0,t[e>>2]=0,e=1<>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}for(e=h<<((n|0)==31?0:25-(n>>>1)|0),r=t[r>>2]|0;;){if((t[r+4>>2]&-8|0)==(h|0)){Me=97;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Me=96;break}}if((Me|0)==96){t[u>>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}else if((Me|0)==97){Me=r+8|0,Pe=t[Me>>2]|0,t[Pe+12>>2]=s,t[Me>>2]=s,t[s+8>>2]=Pe,t[s+12>>2]=r,t[s+24>>2]=0;break}}else Pe=h+N|0,t[D+4>>2]=Pe|3,Pe=D+Pe+4|0,t[Pe>>2]=t[Pe>>2]|1;while(0);return Pe=D+8|0,m=Zt,Pe|0}else I=N}else I=N;else I=-1;while(0);if(r=t[2785]|0,r>>>0>=I>>>0)return n=r-I|0,e=t[2788]|0,n>>>0>15?(Pe=e+I|0,t[2788]=Pe,t[2785]=n,t[Pe+4>>2]=n|1,t[Pe+n>>2]=n,t[e+4>>2]=I|3):(t[2785]=0,t[2788]=0,t[e+4>>2]=r|3,Pe=e+r+4|0,t[Pe>>2]=t[Pe>>2]|1),Pe=e+8|0,m=Zt,Pe|0;if(h=t[2786]|0,h>>>0>I>>>0)return ft=h-I|0,t[2786]=ft,Pe=t[2789]|0,Me=Pe+I|0,t[2789]=Me,t[Me+4>>2]=ft|1,t[Pe+4>>2]=I|3,Pe=Pe+8|0,m=Zt,Pe|0;if(t[2901]|0?e=t[2903]|0:(t[2903]=4096,t[2902]=4096,t[2904]=-1,t[2905]=-1,t[2906]=0,t[2894]=0,e=K&-16^1431655768,t[K>>2]=e,t[2901]=e,e=4096),D=I+48|0,S=I+47|0,s=e+S|0,l=0-e|0,N=s&l,N>>>0<=I>>>0||(e=t[2893]|0,e|0?(M=t[2891]|0,K=M+N|0,K>>>0<=M>>>0|K>>>0>e>>>0):0))return Pe=0,m=Zt,Pe|0;e:do if(t[2894]&4)n=0,Me=133;else{r=t[2789]|0;t:do if(r){for(u=11580;e=t[u>>2]|0,!(e>>>0<=r>>>0?(ye=u+4|0,(e+(t[ye>>2]|0)|0)>>>0>r>>>0):0);)if(e=t[u+8>>2]|0,e)u=e;else{Me=118;break t}if(n=s-h&l,n>>>0<2147483647)if(e=t2(n|0)|0,(e|0)==((t[u>>2]|0)+(t[ye>>2]|0)|0)){if((e|0)!=(-1|0)){h=n,s=e,Me=135;break e}}else u=e,Me=126;else n=0}else Me=118;while(0);do if((Me|0)==118)if(r=t2(0)|0,(r|0)!=(-1|0)?(n=r,be=t[2902]|0,Se=be+-1|0,n=((Se&n|0)==0?0:(Se+n&0-be)-n|0)+N|0,be=t[2891]|0,Se=n+be|0,n>>>0>I>>>0&n>>>0<2147483647):0){if(ye=t[2893]|0,ye|0?Se>>>0<=be>>>0|Se>>>0>ye>>>0:0){n=0;break}if(e=t2(n|0)|0,(e|0)==(r|0)){h=n,s=r,Me=135;break e}else u=e,Me=126}else n=0;while(0);do if((Me|0)==126){if(r=0-n|0,!(D>>>0>n>>>0&(n>>>0<2147483647&(u|0)!=(-1|0))))if((u|0)==(-1|0)){n=0;break}else{h=n,s=u,Me=135;break e}if(e=t[2903]|0,e=S-n+e&0-e,e>>>0>=2147483647){h=n,s=u,Me=135;break e}if((t2(e|0)|0)==(-1|0)){t2(r|0)|0,n=0;break}else{h=e+n|0,s=u,Me=135;break e}}while(0);t[2894]=t[2894]|4,Me=133}while(0);if((((Me|0)==133?N>>>0<2147483647:0)?(ft=t2(N|0)|0,ye=t2(0)|0,Je=ye-ft|0,Ge=Je>>>0>(I+40|0)>>>0,!((ft|0)==(-1|0)|Ge^1|ft>>>0>>0&((ft|0)!=(-1|0)&(ye|0)!=(-1|0))^1)):0)&&(h=Ge?Je:n,s=ft,Me=135),(Me|0)==135){n=(t[2891]|0)+h|0,t[2891]=n,n>>>0>(t[2892]|0)>>>0&&(t[2892]=n),S=t[2789]|0;do if(S){for(n=11580;;){if(e=t[n>>2]|0,r=n+4|0,u=t[r>>2]|0,(s|0)==(e+u|0)){Me=145;break}if(l=t[n+8>>2]|0,l)n=l;else break}if(((Me|0)==145?(t[n+12>>2]&8|0)==0:0)?S>>>0>>0&S>>>0>=e>>>0:0){t[r>>2]=u+h,Pe=S+8|0,Pe=(Pe&7|0)==0?0:0-Pe&7,Me=S+Pe|0,Pe=(t[2786]|0)+(h-Pe)|0,t[2789]=Me,t[2786]=Pe,t[Me+4>>2]=Pe|1,t[Me+Pe+4>>2]=40,t[2790]=t[2905];break}for(s>>>0<(t[2787]|0)>>>0&&(t[2787]=s),r=s+h|0,n=11580;;){if((t[n>>2]|0)==(r|0)){Me=153;break}if(e=t[n+8>>2]|0,e)n=e;else break}if((Me|0)==153?(t[n+12>>2]&8|0)==0:0){t[n>>2]=s,M=n+4|0,t[M>>2]=(t[M>>2]|0)+h,M=s+8|0,M=s+((M&7|0)==0?0:0-M&7)|0,n=r+8|0,n=r+((n&7|0)==0?0:0-n&7)|0,N=M+I|0,D=n-M-I|0,t[M+4>>2]=I|3;do if((n|0)!=(S|0)){if((n|0)==(t[2788]|0)){Pe=(t[2785]|0)+D|0,t[2785]=Pe,t[2788]=N,t[N+4>>2]=Pe|1,t[N+Pe>>2]=Pe;break}if(e=t[n+4>>2]|0,(e&3|0)==1){h=e&-8,u=e>>>3;e:do if(e>>>0<256)if(e=t[n+8>>2]|0,r=t[n+12>>2]|0,(r|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=r,t[r+8>>2]=e;break}else{s=t[n+24>>2]|0,e=t[n+12>>2]|0;do if((e|0)==(n|0)){if(u=n+16|0,r=u+4|0,e=t[r>>2]|0,!e)if(e=t[u>>2]|0,e)r=u;else{e=0;break}for(;;){if(u=e+20|0,l=t[u>>2]|0,l|0){e=l,r=u;continue}if(u=e+16|0,l=t[u>>2]|0,l)e=l,r=u;else break}t[r>>2]=0}else Pe=t[n+8>>2]|0,t[Pe+12>>2]=e,t[e+8>>2]=Pe;while(0);if(!s)break;r=t[n+28>>2]|0,u=11436+(r<<2)|0;do if((n|0)!=(t[u>>2]|0)){if(t[s+16+(((t[s+16>>2]|0)!=(n|0)&1)<<2)>>2]=e,!e)break e}else{if(t[u>>2]=e,e|0)break;t[2784]=t[2784]&~(1<>2]=s,r=n+16|0,u=t[r>>2]|0,u|0&&(t[e+16>>2]=u,t[u+24>>2]=e),r=t[r+4>>2]|0,!r)break;t[e+20>>2]=r,t[r+24>>2]=e}while(0);n=n+h|0,l=h+D|0}else l=D;if(n=n+4|0,t[n>>2]=t[n>>2]&-2,t[N+4>>2]=l|1,t[N+l>>2]=l,n=l>>>3,l>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=N,t[n+12>>2]=N,t[N+8>>2]=n,t[N+12>>2]=r;break}n=l>>>8;do if(!n)n=0;else{if(l>>>0>16777215){n=31;break}Me=(n+1048320|0)>>>16&8,Pe=n<>>16&4,Pe=Pe<>>16&2,n=14-(ft|Me|n)+(Pe<>>15)|0,n=l>>>(n+7|0)&1|n<<1}while(0);if(u=11436+(n<<2)|0,t[N+28>>2]=n,e=N+16|0,t[e+4>>2]=0,t[e>>2]=0,e=t[2784]|0,r=1<>2]=N,t[N+24>>2]=u,t[N+12>>2]=N,t[N+8>>2]=N;break}for(e=l<<((n|0)==31?0:25-(n>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){Me=194;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Me=193;break}}if((Me|0)==193){t[u>>2]=N,t[N+24>>2]=r,t[N+12>>2]=N,t[N+8>>2]=N;break}else if((Me|0)==194){Me=r+8|0,Pe=t[Me>>2]|0,t[Pe+12>>2]=N,t[Me>>2]=N,t[N+8>>2]=Pe,t[N+12>>2]=r,t[N+24>>2]=0;break}}else Pe=(t[2786]|0)+D|0,t[2786]=Pe,t[2789]=N,t[N+4>>2]=Pe|1;while(0);return Pe=M+8|0,m=Zt,Pe|0}for(n=11580;e=t[n>>2]|0,!(e>>>0<=S>>>0?(Pe=e+(t[n+4>>2]|0)|0,Pe>>>0>S>>>0):0);)n=t[n+8>>2]|0;l=Pe+-47|0,e=l+8|0,e=l+((e&7|0)==0?0:0-e&7)|0,l=S+16|0,e=e>>>0>>0?S:e,n=e+8|0,r=s+8|0,r=(r&7|0)==0?0:0-r&7,Me=s+r|0,r=h+-40-r|0,t[2789]=Me,t[2786]=r,t[Me+4>>2]=r|1,t[Me+r+4>>2]=40,t[2790]=t[2905],r=e+4|0,t[r>>2]=27,t[n>>2]=t[2895],t[n+4>>2]=t[2896],t[n+8>>2]=t[2897],t[n+12>>2]=t[2898],t[2895]=s,t[2896]=h,t[2898]=0,t[2897]=n,n=e+24|0;do Me=n,n=n+4|0,t[n>>2]=7;while((Me+8|0)>>>0>>0);if((e|0)!=(S|0)){if(s=e-S|0,t[r>>2]=t[r>>2]&-2,t[S+4>>2]=s|1,t[e>>2]=s,n=s>>>3,s>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=S,t[n+12>>2]=S,t[S+8>>2]=n,t[S+12>>2]=r;break}if(n=s>>>8,n?s>>>0>16777215?r=31:(Me=(n+1048320|0)>>>16&8,Pe=n<>>16&4,Pe=Pe<>>16&2,r=14-(ft|Me|r)+(Pe<>>15)|0,r=s>>>(r+7|0)&1|r<<1):r=0,u=11436+(r<<2)|0,t[S+28>>2]=r,t[S+20>>2]=0,t[l>>2]=0,n=t[2784]|0,e=1<>2]=S,t[S+24>>2]=u,t[S+12>>2]=S,t[S+8>>2]=S;break}for(e=s<<((r|0)==31?0:25-(r>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(s|0)){Me=216;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Me=215;break}}if((Me|0)==215){t[u>>2]=S,t[S+24>>2]=r,t[S+12>>2]=S,t[S+8>>2]=S;break}else if((Me|0)==216){Me=r+8|0,Pe=t[Me>>2]|0,t[Pe+12>>2]=S,t[Me>>2]=S,t[S+8>>2]=Pe,t[S+12>>2]=r,t[S+24>>2]=0;break}}}else{Pe=t[2787]|0,(Pe|0)==0|s>>>0>>0&&(t[2787]=s),t[2895]=s,t[2896]=h,t[2898]=0,t[2792]=t[2901],t[2791]=-1,n=0;do Pe=11172+(n<<1<<2)|0,t[Pe+12>>2]=Pe,t[Pe+8>>2]=Pe,n=n+1|0;while((n|0)!=32);Pe=s+8|0,Pe=(Pe&7|0)==0?0:0-Pe&7,Me=s+Pe|0,Pe=h+-40-Pe|0,t[2789]=Me,t[2786]=Pe,t[Me+4>>2]=Pe|1,t[Me+Pe+4>>2]=40,t[2790]=t[2905]}while(0);if(n=t[2786]|0,n>>>0>I>>>0)return ft=n-I|0,t[2786]=ft,Pe=t[2789]|0,Me=Pe+I|0,t[2789]=Me,t[Me+4>>2]=ft|1,t[Pe+4>>2]=I|3,Pe=Pe+8|0,m=Zt,Pe|0}return t[(Fv()|0)>>2]=12,Pe=0,m=Zt,Pe|0}function d_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(!!e){r=e+-8|0,l=t[2787]|0,e=t[e+-4>>2]|0,n=e&-8,S=r+n|0;do if(e&1)D=r,h=r;else{if(u=t[r>>2]|0,!(e&3)||(h=r+(0-u)|0,s=u+n|0,h>>>0>>0))return;if((h|0)==(t[2788]|0)){if(e=S+4|0,n=t[e>>2]|0,(n&3|0)!=3){D=h,n=s;break}t[2785]=s,t[e>>2]=n&-2,t[h+4>>2]=s|1,t[h+s>>2]=s;return}if(r=u>>>3,u>>>0<256)if(e=t[h+8>>2]|0,n=t[h+12>>2]|0,(n|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=n,t[n+8>>2]=e,D=h,n=s;break}l=t[h+24>>2]|0,e=t[h+12>>2]|0;do if((e|0)==(h|0)){if(r=h+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{e=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0}else D=t[h+8>>2]|0,t[D+12>>2]=e,t[e+8>>2]=D;while(0);if(l){if(n=t[h+28>>2]|0,r=11436+(n<<2)|0,(h|0)==(t[r>>2]|0)){if(t[r>>2]=e,!e){t[2784]=t[2784]&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=e,!e){D=h,n=s;break}t[e+24>>2]=l,n=h+16|0,r=t[n>>2]|0,r|0&&(t[e+16>>2]=r,t[r+24>>2]=e),n=t[n+4>>2]|0,n?(t[e+20>>2]=n,t[n+24>>2]=e,D=h,n=s):(D=h,n=s)}else D=h,n=s}while(0);if(!(h>>>0>=S>>>0)&&(e=S+4|0,u=t[e>>2]|0,!!(u&1))){if(u&2)t[e>>2]=u&-2,t[D+4>>2]=n|1,t[h+n>>2]=n,l=n;else{if(e=t[2788]|0,(S|0)==(t[2789]|0)){if(S=(t[2786]|0)+n|0,t[2786]=S,t[2789]=D,t[D+4>>2]=S|1,(D|0)!=(e|0))return;t[2788]=0,t[2785]=0;return}if((S|0)==(e|0)){S=(t[2785]|0)+n|0,t[2785]=S,t[2788]=h,t[D+4>>2]=S|1,t[h+S>>2]=S;return}l=(u&-8)+n|0,r=u>>>3;do if(u>>>0<256)if(n=t[S+8>>2]|0,e=t[S+12>>2]|0,(e|0)==(n|0)){t[2783]=t[2783]&~(1<>2]=e,t[e+8>>2]=n;break}else{s=t[S+24>>2]|0,e=t[S+12>>2]|0;do if((e|0)==(S|0)){if(r=S+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{r=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0,r=e}else r=t[S+8>>2]|0,t[r+12>>2]=e,t[e+8>>2]=r,r=e;while(0);if(s|0){if(e=t[S+28>>2]|0,n=11436+(e<<2)|0,(S|0)==(t[n>>2]|0)){if(t[n>>2]=r,!r){t[2784]=t[2784]&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=s,e=S+16|0,n=t[e>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),e=t[e+4>>2]|0,e|0&&(t[r+20>>2]=e,t[e+24>>2]=r)}}while(0);if(t[D+4>>2]=l|1,t[h+l>>2]=l,(D|0)==(t[2788]|0)){t[2785]=l;return}}if(e=l>>>3,l>>>0<256){r=11172+(e<<1<<2)|0,n=t[2783]|0,e=1<>2]|0):(t[2783]=n|e,e=r,n=r+8|0),t[n>>2]=D,t[e+12>>2]=D,t[D+8>>2]=e,t[D+12>>2]=r;return}e=l>>>8,e?l>>>0>16777215?e=31:(h=(e+1048320|0)>>>16&8,S=e<>>16&4,S=S<>>16&2,e=14-(s|h|e)+(S<>>15)|0,e=l>>>(e+7|0)&1|e<<1):e=0,u=11436+(e<<2)|0,t[D+28>>2]=e,t[D+20>>2]=0,t[D+16>>2]=0,n=t[2784]|0,r=1<>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){e=73;break}if(u=r+16+(n>>>31<<2)|0,e=t[u>>2]|0,e)n=n<<1,r=e;else{e=72;break}}if((e|0)==72){t[u>>2]=D,t[D+24>>2]=r,t[D+12>>2]=D,t[D+8>>2]=D;break}else if((e|0)==73){h=r+8|0,S=t[h>>2]|0,t[S+12>>2]=D,t[h>>2]=D,t[D+8>>2]=S,t[D+12>>2]=r,t[D+24>>2]=0;break}}else t[2784]=n|r,t[u>>2]=D,t[D+24>>2]=u,t[D+12>>2]=D,t[D+8>>2]=D;while(0);if(S=(t[2791]|0)+-1|0,t[2791]=S,!S)e=11588;else return;for(;e=t[e>>2]|0,e;)e=e+8|0;t[2791]=-1}}}function dL(){return 11628}function pL(e){e=e|0;var n=0,r=0;return n=m,m=m+16|0,r=n,t[r>>2]=mL(t[e+60>>2]|0)|0,e=p_(Ou(6,r|0)|0)|0,m=n,e|0}function n8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0;I=m,m=m+48|0,N=I+16|0,s=I,l=I+32|0,D=e+28|0,u=t[D>>2]|0,t[l>>2]=u,S=e+20|0,u=(t[S>>2]|0)-u|0,t[l+4>>2]=u,t[l+8>>2]=n,t[l+12>>2]=r,u=u+r|0,h=e+60|0,t[s>>2]=t[h>>2],t[s+4>>2]=l,t[s+8>>2]=2,s=p_(v0(146,s|0)|0)|0;e:do if((u|0)!=(s|0)){for(n=2;!((s|0)<0);)if(u=u-s|0,be=t[l+4>>2]|0,K=s>>>0>be>>>0,l=K?l+8|0:l,n=(K<<31>>31)+n|0,be=s-(K?be:0)|0,t[l>>2]=(t[l>>2]|0)+be,K=l+4|0,t[K>>2]=(t[K>>2]|0)-be,t[N>>2]=t[h>>2],t[N+4>>2]=l,t[N+8>>2]=n,s=p_(v0(146,N|0)|0)|0,(u|0)==(s|0)){M=3;break e}t[e+16>>2]=0,t[D>>2]=0,t[S>>2]=0,t[e>>2]=t[e>>2]|32,(n|0)==2?r=0:r=r-(t[l+4>>2]|0)|0}else M=3;while(0);return(M|0)==3&&(be=t[e+44>>2]|0,t[e+16>>2]=be+(t[e+48>>2]|0),t[D>>2]=be,t[S>>2]=be),m=I,r|0}function hL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return l=m,m=m+32|0,s=l,u=l+20|0,t[s>>2]=t[e+60>>2],t[s+4>>2]=0,t[s+8>>2]=n,t[s+12>>2]=u,t[s+16>>2]=r,(p_(Ni(140,s|0)|0)|0)<0?(t[u>>2]=-1,e=-1):e=t[u>>2]|0,m=l,e|0}function p_(e){return e=e|0,e>>>0>4294963200&&(t[(Fv()|0)>>2]=0-e,e=-1),e|0}function Fv(){return(vL()|0)+64|0}function vL(){return RE()|0}function RE(){return 2084}function mL(e){return e=e|0,e|0}function yL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return l=m,m=m+32|0,u=l,t[e+36>>2]=1,((t[e>>2]&64|0)==0?(t[u>>2]=t[e+60>>2],t[u+4>>2]=21523,t[u+8>>2]=l+16,I0(54,u|0)|0):0)&&(p[e+75>>0]=-1),u=n8(e,n,r)|0,m=l,u|0}function r8(e,n){e=e|0,n=n|0;var r=0,u=0;if(r=p[e>>0]|0,u=p[n>>0]|0,r<<24>>24==0?1:r<<24>>24!=u<<24>>24)e=u;else{do e=e+1|0,n=n+1|0,r=p[e>>0]|0,u=p[n>>0]|0;while(!(r<<24>>24==0?1:r<<24>>24!=u<<24>>24));e=u}return(r&255)-(e&255)|0}function gL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;e:do if(!r)e=0;else{for(;u=p[e>>0]|0,l=p[n>>0]|0,u<<24>>24==l<<24>>24;)if(r=r+-1|0,r)e=e+1|0,n=n+1|0;else{e=0;break e}e=(u&255)-(l&255)|0}while(0);return e|0}function i8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0;ye=m,m=m+224|0,M=ye+120|0,I=ye+80|0,be=ye,Se=ye+136|0,u=I,l=u+40|0;do t[u>>2]=0,u=u+4|0;while((u|0)<(l|0));return t[M>>2]=t[r>>2],(AE(0,n,M,be,I)|0)<0?r=-1:((t[e+76>>2]|0)>-1?K=_L(e)|0:K=0,r=t[e>>2]|0,N=r&32,(p[e+74>>0]|0)<1&&(t[e>>2]=r&-33),u=e+48|0,t[u>>2]|0?r=AE(e,n,M,be,I)|0:(l=e+44|0,s=t[l>>2]|0,t[l>>2]=Se,h=e+28|0,t[h>>2]=Se,D=e+20|0,t[D>>2]=Se,t[u>>2]=80,S=e+16|0,t[S>>2]=Se+80,r=AE(e,n,M,be,I)|0,s&&(y_[t[e+36>>2]&7](e,0,0)|0,r=(t[D>>2]|0)==0?-1:r,t[l>>2]=s,t[u>>2]=0,t[S>>2]=0,t[h>>2]=0,t[D>>2]=0)),u=t[e>>2]|0,t[e>>2]=u|N,K|0&&EL(e),r=(u&32|0)==0?r:-1),m=ye,r|0}function AE(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0;Nn=m,m=m+64|0,In=Nn+16|0,gn=Nn,Zt=Nn+24|0,_r=Nn+8|0,Pr=Nn+20|0,t[In>>2]=n,ft=(e|0)!=0,Me=Zt+40|0,Pe=Me,Zt=Zt+39|0,Br=_r+4|0,h=0,s=0,M=0;e:for(;;){do if((s|0)>-1)if((h|0)>(2147483647-s|0)){t[(Fv()|0)>>2]=75,s=-1;break}else{s=h+s|0;break}while(0);if(h=p[n>>0]|0,h<<24>>24)D=n;else{Ge=87;break}t:for(;;){switch(h<<24>>24){case 37:{h=D,Ge=9;break t}case 0:{h=D;break t}default:}Je=D+1|0,t[In>>2]=Je,h=p[Je>>0]|0,D=Je}t:do if((Ge|0)==9)for(;;){if(Ge=0,(p[D+1>>0]|0)!=37)break t;if(h=h+1|0,D=D+2|0,t[In>>2]=D,(p[D>>0]|0)==37)Ge=9;else break}while(0);if(h=h-n|0,ft&&Go(e,n,h),h|0){n=D;continue}S=D+1|0,h=(p[S>>0]|0)+-48|0,h>>>0<10?(Je=(p[D+2>>0]|0)==36,ye=Je?h:-1,M=Je?1:M,S=Je?D+3|0:S):ye=-1,t[In>>2]=S,h=p[S>>0]|0,D=(h<<24>>24)+-32|0;t:do if(D>>>0<32)for(N=0,I=h;;){if(h=1<>2]=S,h=p[S>>0]|0,D=(h<<24>>24)+-32|0,D>>>0>=32)break;I=h}else N=0;while(0);if(h<<24>>24==42){if(D=S+1|0,h=(p[D>>0]|0)+-48|0,h>>>0<10?(p[S+2>>0]|0)==36:0)t[l+(h<<2)>>2]=10,h=t[u+((p[D>>0]|0)+-48<<3)>>2]|0,M=1,S=S+3|0;else{if(M|0){s=-1;break}ft?(M=(t[r>>2]|0)+(4-1)&~(4-1),h=t[M>>2]|0,t[r>>2]=M+4,M=0,S=D):(h=0,M=0,S=D)}t[In>>2]=S,Je=(h|0)<0,h=Je?0-h|0:h,N=Je?N|8192:N}else{if(h=u8(In)|0,(h|0)<0){s=-1;break}S=t[In>>2]|0}do if((p[S>>0]|0)==46){if((p[S+1>>0]|0)!=42){t[In>>2]=S+1,D=u8(In)|0,S=t[In>>2]|0;break}if(I=S+2|0,D=(p[I>>0]|0)+-48|0,D>>>0<10?(p[S+3>>0]|0)==36:0){t[l+(D<<2)>>2]=10,D=t[u+((p[I>>0]|0)+-48<<3)>>2]|0,S=S+4|0,t[In>>2]=S;break}if(M|0){s=-1;break e}ft?(Je=(t[r>>2]|0)+(4-1)&~(4-1),D=t[Je>>2]|0,t[r>>2]=Je+4):D=0,t[In>>2]=I,S=I}else D=-1;while(0);for(Se=0;;){if(((p[S>>0]|0)+-65|0)>>>0>57){s=-1;break e}if(Je=S+1|0,t[In>>2]=Je,I=p[(p[S>>0]|0)+-65+(5178+(Se*58|0))>>0]|0,K=I&255,(K+-1|0)>>>0<8)Se=K,S=Je;else break}if(!(I<<24>>24)){s=-1;break}be=(ye|0)>-1;do if(I<<24>>24==19)if(be){s=-1;break e}else Ge=49;else{if(be){t[l+(ye<<2)>>2]=K,be=u+(ye<<3)|0,ye=t[be+4>>2]|0,Ge=gn,t[Ge>>2]=t[be>>2],t[Ge+4>>2]=ye,Ge=49;break}if(!ft){s=0;break e}o8(gn,K,r)}while(0);if((Ge|0)==49?(Ge=0,!ft):0){h=0,n=Je;continue}S=p[S>>0]|0,S=(Se|0)!=0&(S&15|0)==3?S&-33:S,be=N&-65537,ye=(N&8192|0)==0?N:be;t:do switch(S|0){case 110:switch((Se&255)<<24>>24){case 0:{t[t[gn>>2]>>2]=s,h=0,n=Je;continue e}case 1:{t[t[gn>>2]>>2]=s,h=0,n=Je;continue e}case 2:{h=t[gn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Je;continue e}case 3:{_[t[gn>>2]>>1]=s,h=0,n=Je;continue e}case 4:{p[t[gn>>2]>>0]=s,h=0,n=Je;continue e}case 6:{t[t[gn>>2]>>2]=s,h=0,n=Je;continue e}case 7:{h=t[gn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Je;continue e}default:{h=0,n=Je;continue e}}case 112:{S=120,D=D>>>0>8?D:8,n=ye|8,Ge=61;break}case 88:case 120:{n=ye,Ge=61;break}case 111:{S=gn,n=t[S>>2]|0,S=t[S+4>>2]|0,K=wL(n,S,Me)|0,be=Pe-K|0,N=0,I=5642,D=(ye&8|0)==0|(D|0)>(be|0)?D:be+1|0,be=ye,Ge=67;break}case 105:case 100:if(S=gn,n=t[S>>2]|0,S=t[S+4>>2]|0,(S|0)<0){n=h_(0,0,n|0,S|0)|0,S=ut,N=gn,t[N>>2]=n,t[N+4>>2]=S,N=1,I=5642,Ge=66;break t}else{N=(ye&2049|0)!=0&1,I=(ye&2048|0)==0?(ye&1|0)==0?5642:5644:5643,Ge=66;break t}case 117:{S=gn,N=0,I=5642,n=t[S>>2]|0,S=t[S+4>>2]|0,Ge=66;break}case 99:{p[Zt>>0]=t[gn>>2],n=Zt,N=0,I=5642,K=Me,S=1,D=be;break}case 109:{S=SL(t[(Fv()|0)>>2]|0)|0,Ge=71;break}case 115:{S=t[gn>>2]|0,S=S|0?S:5652,Ge=71;break}case 67:{t[_r>>2]=t[gn>>2],t[Br>>2]=0,t[gn>>2]=_r,K=-1,S=_r,Ge=75;break}case 83:{n=t[gn>>2]|0,D?(K=D,S=n,Ge=75):(gl(e,32,h,0,ye),n=0,Ge=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{h=CL(e,+U[gn>>3],h,D,ye,S)|0,n=Je;continue e}default:N=0,I=5642,K=Me,S=D,D=ye}while(0);t:do if((Ge|0)==61)ye=gn,Se=t[ye>>2]|0,ye=t[ye+4>>2]|0,K=DL(Se,ye,Me,S&32)|0,I=(n&8|0)==0|(Se|0)==0&(ye|0)==0,N=I?0:2,I=I?5642:5642+(S>>4)|0,be=n,n=Se,S=ye,Ge=67;else if((Ge|0)==66)K=Pv(n,S,Me)|0,be=ye,Ge=67;else if((Ge|0)==71)Ge=0,ye=TL(S,0,D)|0,Se=(ye|0)==0,n=S,N=0,I=5642,K=Se?S+D|0:ye,S=Se?D:ye-S|0,D=be;else if((Ge|0)==75){for(Ge=0,I=S,n=0,D=0;N=t[I>>2]|0,!(!N||(D=l8(Pr,N)|0,(D|0)<0|D>>>0>(K-n|0)>>>0));)if(n=D+n|0,K>>>0>n>>>0)I=I+4|0;else break;if((D|0)<0){s=-1;break e}if(gl(e,32,h,n,ye),!n)n=0,Ge=84;else for(N=0;;){if(D=t[S>>2]|0,!D){Ge=84;break t}if(D=l8(Pr,D)|0,N=D+N|0,(N|0)>(n|0)){Ge=84;break t}if(Go(e,Pr,D),N>>>0>=n>>>0){Ge=84;break}else S=S+4|0}}while(0);if((Ge|0)==67)Ge=0,S=(n|0)!=0|(S|0)!=0,ye=(D|0)!=0|S,S=((S^1)&1)+(Pe-K)|0,n=ye?K:Me,K=Me,S=ye?(D|0)>(S|0)?D:S:D,D=(D|0)>-1?be&-65537:be;else if((Ge|0)==84){Ge=0,gl(e,32,h,n,ye^8192),h=(h|0)>(n|0)?h:n,n=Je;continue}Se=K-n|0,be=(S|0)<(Se|0)?Se:S,ye=be+N|0,h=(h|0)<(ye|0)?ye:h,gl(e,32,h,ye,D),Go(e,I,N),gl(e,48,h,ye,D^65536),gl(e,48,be,Se,0),Go(e,n,Se),gl(e,32,h,ye,D^8192),n=Je}e:do if((Ge|0)==87&&!e)if(!M)s=0;else{for(s=1;n=t[l+(s<<2)>>2]|0,!!n;)if(o8(u+(s<<3)|0,n,r),s=s+1|0,(s|0)>=10){s=1;break e}for(;;){if(t[l+(s<<2)>>2]|0){s=-1;break e}if(s=s+1|0,(s|0)>=10){s=1;break}}}while(0);return m=Nn,s|0}function _L(e){return e=e|0,0}function EL(e){e=e|0}function Go(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]&32||FL(n,r,e)|0}function u8(e){e=e|0;var n=0,r=0,u=0;if(r=t[e>>2]|0,u=(p[r>>0]|0)+-48|0,u>>>0<10){n=0;do n=u+(n*10|0)|0,r=r+1|0,t[e>>2]=r,u=(p[r>>0]|0)+-48|0;while(u>>>0<10)}else n=0;return n|0}function o8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;e:do if(n>>>0<=20)do switch(n|0){case 9:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,t[e>>2]=n;break e}case 10:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=((n|0)<0)<<31>>31;break e}case 11:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=0;break e}case 12:{u=(t[r>>2]|0)+(8-1)&~(8-1),n=u,l=t[n>>2]|0,n=t[n+4>>2]|0,t[r>>2]=u+8,u=e,t[u>>2]=l,t[u+4>>2]=n;break e}case 13:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&65535)<<16>>16,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 14:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&65535,t[l+4>>2]=0;break e}case 15:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&255)<<24>>24,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 16:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&255,t[l+4>>2]=0;break e}case 17:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+U[l>>3],t[r>>2]=l+8,U[e>>3]=s;break e}case 18:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+U[l>>3],t[r>>2]=l+8,U[e>>3]=s;break e}default:break e}while(0);while(0)}function DL(e,n,r,u){if(e=e|0,n=n|0,r=r|0,u=u|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,p[r>>0]=k[5694+(e&15)>>0]|0|u,e=v_(e|0,n|0,4)|0,n=ut;while(!((e|0)==0&(n|0)==0));return r|0}function wL(e,n,r){if(e=e|0,n=n|0,r=r|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,p[r>>0]=e&7|48,e=v_(e|0,n|0,3)|0,n=ut;while(!((e|0)==0&(n|0)==0));return r|0}function Pv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if(n>>>0>0|(n|0)==0&e>>>0>4294967295){for(;u=NE(e|0,n|0,10,0)|0,r=r+-1|0,p[r>>0]=u&255|48,u=e,e=kE(e|0,n|0,10,0)|0,n>>>0>9|(n|0)==9&u>>>0>4294967295;)n=ut;n=e}else n=e;if(n)for(;r=r+-1|0,p[r>>0]=(n>>>0)%10|0|48,!(n>>>0<10);)n=(n>>>0)/10|0;return r|0}function SL(e){return e=e|0,ML(e,t[(OL()|0)+188>>2]|0)|0}function TL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;s=n&255,u=(r|0)!=0;e:do if(u&(e&3|0)!=0)for(l=n&255;;){if((p[e>>0]|0)==l<<24>>24){h=6;break e}if(e=e+1|0,r=r+-1|0,u=(r|0)!=0,!(u&(e&3|0)!=0)){h=5;break}}else h=5;while(0);(h|0)==5&&(u?h=6:r=0);e:do if((h|0)==6&&(l=n&255,(p[e>>0]|0)!=l<<24>>24)){u=lr(s,16843009)|0;t:do if(r>>>0>3){for(;s=t[e>>2]^u,!((s&-2139062144^-2139062144)&s+-16843009|0);)if(e=e+4|0,r=r+-4|0,r>>>0<=3){h=11;break t}}else h=11;while(0);if((h|0)==11&&!r){r=0;break}for(;;){if((p[e>>0]|0)==l<<24>>24)break e;if(e=e+1|0,r=r+-1|0,!r){r=0;break}}}while(0);return(r|0?e:0)|0}function gl(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0;if(h=m,m=m+256|0,s=h,(r|0)>(u|0)&(l&73728|0)==0){if(l=r-u|0,bv(s|0,n|0,(l>>>0<256?l:256)|0)|0,l>>>0>255){n=r-u|0;do Go(e,s,256),l=l+-256|0;while(l>>>0>255);l=n&255}Go(e,s,l)}m=h}function l8(e,n){return e=e|0,n=n|0,e?e=RL(e,n,0)|0:e=0,e|0}function CL(e,n,r,u,l,s){e=e|0,n=+n,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0,uu=0;uu=m,m=m+560|0,S=uu+8|0,Je=uu,Nn=uu+524|0,Pr=Nn,N=uu+512|0,t[Je>>2]=0,_r=N+12|0,s8(n)|0,(ut|0)<0?(n=-n,In=1,Br=5659):(In=(l&2049|0)!=0&1,Br=(l&2048|0)==0?(l&1|0)==0?5660:5665:5662),s8(n)|0,gn=ut&2146435072;do if(gn>>>0<2146435072|(gn|0)==2146435072&0<0){if(be=+xL(n,Je)*2,h=be!=0,h&&(t[Je>>2]=(t[Je>>2]|0)+-1),ft=s|32,(ft|0)==97){Se=s&32,K=(Se|0)==0?Br:Br+9|0,I=In|2,h=12-u|0;do if(u>>>0>11|(h|0)==0)n=be;else{n=8;do h=h+-1|0,n=n*16;while((h|0)!=0);if((p[K>>0]|0)==45){n=-(n+(-be-n));break}else{n=be+n-n;break}}while(0);D=t[Je>>2]|0,h=(D|0)<0?0-D|0:D,h=Pv(h,((h|0)<0)<<31>>31,_r)|0,(h|0)==(_r|0)&&(h=N+11|0,p[h>>0]=48),p[h+-1>>0]=(D>>31&2)+43,M=h+-2|0,p[M>>0]=s+15,N=(u|0)<1,S=(l&8|0)==0,h=Nn;do gn=~~n,D=h+1|0,p[h>>0]=k[5694+gn>>0]|Se,n=(n-+(gn|0))*16,((D-Pr|0)==1?!(S&(N&n==0)):0)?(p[D>>0]=46,h=h+2|0):h=D;while(n!=0);gn=h-Pr|0,Pr=_r-M|0,_r=(u|0)!=0&(gn+-2|0)<(u|0)?u+2|0:gn,h=Pr+I+_r|0,gl(e,32,r,h,l),Go(e,K,I),gl(e,48,r,h,l^65536),Go(e,Nn,gn),gl(e,48,_r-gn|0,0,0),Go(e,M,Pr),gl(e,32,r,h,l^8192);break}D=(u|0)<0?6:u,h?(h=(t[Je>>2]|0)+-28|0,t[Je>>2]=h,n=be*268435456):(n=be,h=t[Je>>2]|0),gn=(h|0)<0?S:S+288|0,S=gn;do Pe=~~n>>>0,t[S>>2]=Pe,S=S+4|0,n=(n-+(Pe>>>0))*1e9;while(n!=0);if((h|0)>0)for(N=gn,I=S;;){if(M=(h|0)<29?h:29,h=I+-4|0,h>>>0>=N>>>0){S=0;do Me=h8(t[h>>2]|0,0,M|0)|0,Me=ME(Me|0,ut|0,S|0,0)|0,Pe=ut,Ge=NE(Me|0,Pe|0,1e9,0)|0,t[h>>2]=Ge,S=kE(Me|0,Pe|0,1e9,0)|0,h=h+-4|0;while(h>>>0>=N>>>0);S&&(N=N+-4|0,t[N>>2]=S)}for(S=I;!(S>>>0<=N>>>0);)if(h=S+-4|0,!(t[h>>2]|0))S=h;else break;if(h=(t[Je>>2]|0)-M|0,t[Je>>2]=h,(h|0)>0)I=S;else break}else N=gn;if((h|0)<0){u=((D+25|0)/9|0)+1|0,ye=(ft|0)==102;do{if(Se=0-h|0,Se=(Se|0)<9?Se:9,N>>>0>>0){M=(1<>>Se,K=0,h=N;do Pe=t[h>>2]|0,t[h>>2]=(Pe>>>Se)+K,K=lr(Pe&M,I)|0,h=h+4|0;while(h>>>0>>0);h=(t[N>>2]|0)==0?N+4|0:N,K?(t[S>>2]=K,N=h,h=S+4|0):(N=h,h=S)}else N=(t[N>>2]|0)==0?N+4|0:N,h=S;S=ye?gn:N,S=(h-S>>2|0)>(u|0)?S+(u<<2)|0:h,h=(t[Je>>2]|0)+Se|0,t[Je>>2]=h}while((h|0)<0);h=N,u=S}else h=N,u=S;if(Pe=gn,h>>>0>>0){if(S=(Pe-h>>2)*9|0,M=t[h>>2]|0,M>>>0>=10){N=10;do N=N*10|0,S=S+1|0;while(M>>>0>=N>>>0)}}else S=0;if(ye=(ft|0)==103,Ge=(D|0)!=0,N=D-((ft|0)!=102?S:0)+((Ge&ye)<<31>>31)|0,(N|0)<(((u-Pe>>2)*9|0)+-9|0)){if(N=N+9216|0,Se=gn+4+(((N|0)/9|0)+-1024<<2)|0,N=((N|0)%9|0)+1|0,(N|0)<9){M=10;do M=M*10|0,N=N+1|0;while((N|0)!=9)}else M=10;if(I=t[Se>>2]|0,K=(I>>>0)%(M>>>0)|0,N=(Se+4|0)==(u|0),N&(K|0)==0)N=Se;else if(be=(((I>>>0)/(M>>>0)|0)&1|0)==0?9007199254740992:9007199254740994,Me=(M|0)/2|0,n=K>>>0>>0?.5:N&(K|0)==(Me|0)?1:1.5,In&&(Me=(p[Br>>0]|0)==45,n=Me?-n:n,be=Me?-be:be),N=I-K|0,t[Se>>2]=N,be+n!=be){if(Me=N+M|0,t[Se>>2]=Me,Me>>>0>999999999)for(S=Se;N=S+-4|0,t[S>>2]=0,N>>>0>>0&&(h=h+-4|0,t[h>>2]=0),Me=(t[N>>2]|0)+1|0,t[N>>2]=Me,Me>>>0>999999999;)S=N;else N=Se;if(S=(Pe-h>>2)*9|0,I=t[h>>2]|0,I>>>0>=10){M=10;do M=M*10|0,S=S+1|0;while(I>>>0>=M>>>0)}}else N=Se;N=N+4|0,N=u>>>0>N>>>0?N:u,Me=h}else N=u,Me=h;for(ft=N;;){if(ft>>>0<=Me>>>0){Je=0;break}if(h=ft+-4|0,!(t[h>>2]|0))ft=h;else{Je=1;break}}u=0-S|0;do if(ye)if(h=((Ge^1)&1)+D|0,(h|0)>(S|0)&(S|0)>-5?(M=s+-1|0,D=h+-1-S|0):(M=s+-2|0,D=h+-1|0),h=l&8,h)Se=h;else{if(Je?(Zt=t[ft+-4>>2]|0,(Zt|0)!=0):0)if((Zt>>>0)%10|0)N=0;else{N=0,h=10;do h=h*10|0,N=N+1|0;while(!((Zt>>>0)%(h>>>0)|0|0))}else N=9;if(h=((ft-Pe>>2)*9|0)+-9|0,(M|32|0)==102){Se=h-N|0,Se=(Se|0)>0?Se:0,D=(D|0)<(Se|0)?D:Se,Se=0;break}else{Se=h+S-N|0,Se=(Se|0)>0?Se:0,D=(D|0)<(Se|0)?D:Se,Se=0;break}}else M=s,Se=l&8;while(0);if(ye=D|Se,I=(ye|0)!=0&1,K=(M|32|0)==102,K)Ge=0,h=(S|0)>0?S:0;else{if(h=(S|0)<0?u:S,h=Pv(h,((h|0)<0)<<31>>31,_r)|0,N=_r,(N-h|0)<2)do h=h+-1|0,p[h>>0]=48;while((N-h|0)<2);p[h+-1>>0]=(S>>31&2)+43,h=h+-2|0,p[h>>0]=M,Ge=h,h=N-h|0}if(h=In+1+D+I+h|0,gl(e,32,r,h,l),Go(e,Br,In),gl(e,48,r,h,l^65536),K){M=Me>>>0>gn>>>0?gn:Me,Se=Nn+9|0,I=Se,K=Nn+8|0,N=M;do{if(S=Pv(t[N>>2]|0,0,Se)|0,(N|0)==(M|0))(S|0)==(Se|0)&&(p[K>>0]=48,S=K);else if(S>>>0>Nn>>>0){bv(Nn|0,48,S-Pr|0)|0;do S=S+-1|0;while(S>>>0>Nn>>>0)}Go(e,S,I-S|0),N=N+4|0}while(N>>>0<=gn>>>0);if(ye|0&&Go(e,5710,1),N>>>0>>0&(D|0)>0)for(;;){if(S=Pv(t[N>>2]|0,0,Se)|0,S>>>0>Nn>>>0){bv(Nn|0,48,S-Pr|0)|0;do S=S+-1|0;while(S>>>0>Nn>>>0)}if(Go(e,S,(D|0)<9?D:9),N=N+4|0,S=D+-9|0,N>>>0>>0&(D|0)>9)D=S;else{D=S;break}}gl(e,48,D+9|0,9,0)}else{if(ye=Je?ft:Me+4|0,(D|0)>-1){Je=Nn+9|0,Se=(Se|0)==0,u=Je,I=0-Pr|0,K=Nn+8|0,M=Me;do{S=Pv(t[M>>2]|0,0,Je)|0,(S|0)==(Je|0)&&(p[K>>0]=48,S=K);do if((M|0)==(Me|0)){if(N=S+1|0,Go(e,S,1),Se&(D|0)<1){S=N;break}Go(e,5710,1),S=N}else{if(S>>>0<=Nn>>>0)break;bv(Nn|0,48,S+I|0)|0;do S=S+-1|0;while(S>>>0>Nn>>>0)}while(0);Pr=u-S|0,Go(e,S,(D|0)>(Pr|0)?Pr:D),D=D-Pr|0,M=M+4|0}while(M>>>0>>0&(D|0)>-1)}gl(e,48,D+18|0,18,0),Go(e,Ge,_r-Ge|0)}gl(e,32,r,h,l^8192)}else Nn=(s&32|0)!=0,h=In+3|0,gl(e,32,r,h,l&-65537),Go(e,Br,In),Go(e,n!=n|!1?Nn?5686:5690:Nn?5678:5682,3),gl(e,32,r,h,l^8192);while(0);return m=uu,((h|0)<(r|0)?r:h)|0}function s8(e){e=+e;var n=0;return U[W>>3]=e,n=t[W>>2]|0,ut=t[W+4>>2]|0,n|0}function xL(e,n){return e=+e,n=n|0,+ +a8(e,n)}function a8(e,n){e=+e,n=n|0;var r=0,u=0,l=0;switch(U[W>>3]=e,r=t[W>>2]|0,u=t[W+4>>2]|0,l=v_(r|0,u|0,52)|0,l&2047){case 0:{e!=0?(e=+a8(e*18446744073709552e3,n),r=(t[n>>2]|0)+-64|0):r=0,t[n>>2]=r;break}case 2047:break;default:t[n>>2]=(l&2047)+-1022,t[W>>2]=r,t[W+4>>2]=u&-2146435073|1071644672,e=+U[W>>3]}return+e}function RL(e,n,r){e=e|0,n=n|0,r=r|0;do if(e){if(n>>>0<128){p[e>>0]=n,e=1;break}if(!(t[t[(AL()|0)+188>>2]>>2]|0))if((n&-128|0)==57216){p[e>>0]=n,e=1;break}else{t[(Fv()|0)>>2]=84,e=-1;break}if(n>>>0<2048){p[e>>0]=n>>>6|192,p[e+1>>0]=n&63|128,e=2;break}if(n>>>0<55296|(n&-8192|0)==57344){p[e>>0]=n>>>12|224,p[e+1>>0]=n>>>6&63|128,p[e+2>>0]=n&63|128,e=3;break}if((n+-65536|0)>>>0<1048576){p[e>>0]=n>>>18|240,p[e+1>>0]=n>>>12&63|128,p[e+2>>0]=n>>>6&63|128,p[e+3>>0]=n&63|128,e=4;break}else{t[(Fv()|0)>>2]=84,e=-1;break}}else e=1;while(0);return e|0}function AL(){return RE()|0}function OL(){return RE()|0}function ML(e,n){e=e|0,n=n|0;var r=0,u=0;for(u=0;;){if((k[5712+u>>0]|0)==(e|0)){e=2;break}if(r=u+1|0,(r|0)==87){r=5800,u=87,e=5;break}else u=r}if((e|0)==2&&(u?(r=5800,e=5):r=5800),(e|0)==5)for(;;){do e=r,r=r+1|0;while((p[e>>0]|0)!=0);if(u=u+-1|0,u)e=5;else break}return kL(r,t[n+20>>2]|0)|0}function kL(e,n){return e=e|0,n=n|0,NL(e,n)|0}function NL(e,n){return e=e|0,n=n|0,n?n=LL(t[n>>2]|0,t[n+4>>2]|0,e)|0:n=0,(n|0?n:e)|0}function LL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;K=(t[e>>2]|0)+1794895138|0,s=Kp(t[e+8>>2]|0,K)|0,u=Kp(t[e+12>>2]|0,K)|0,l=Kp(t[e+16>>2]|0,K)|0;e:do if((s>>>0>>2>>>0?(I=n-(s<<2)|0,u>>>0>>0&l>>>0>>0):0)?((l|u)&3|0)==0:0){for(I=u>>>2,M=l>>>2,N=0;;){if(D=s>>>1,S=N+D|0,h=S<<1,l=h+I|0,u=Kp(t[e+(l<<2)>>2]|0,K)|0,l=Kp(t[e+(l+1<<2)>>2]|0,K)|0,!(l>>>0>>0&u>>>0<(n-l|0)>>>0)){u=0;break e}if(p[e+(l+u)>>0]|0){u=0;break e}if(u=r8(r,e+l|0)|0,!u)break;if(u=(u|0)<0,(s|0)==1){u=0;break e}else N=u?N:S,s=u?D:s-D|0}u=h+M|0,l=Kp(t[e+(u<<2)>>2]|0,K)|0,u=Kp(t[e+(u+1<<2)>>2]|0,K)|0,u>>>0>>0&l>>>0<(n-u|0)>>>0?u=(p[e+(u+l)>>0]|0)==0?e+u|0:0:u=0}else u=0;while(0);return u|0}function Kp(e,n){e=e|0,n=n|0;var r=0;return r=y8(e|0)|0,((n|0)==0?e:r)|0}function FL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=r+16|0,l=t[u>>2]|0,l?s=5:PL(r)|0?u=0:(l=t[u>>2]|0,s=5);e:do if((s|0)==5){if(D=r+20|0,h=t[D>>2]|0,u=h,(l-h|0)>>>0>>0){u=y_[t[r+36>>2]&7](r,e,n)|0;break}t:do if((p[r+75>>0]|0)>-1){for(h=n;;){if(!h){s=0,l=e;break t}if(l=h+-1|0,(p[e+l>>0]|0)==10)break;h=l}if(u=y_[t[r+36>>2]&7](r,e,h)|0,u>>>0>>0)break e;s=h,l=e+h|0,n=n-h|0,u=t[D>>2]|0}else s=0,l=e;while(0);gr(u|0,l|0,n|0)|0,t[D>>2]=(t[D>>2]|0)+n,u=s+n|0}while(0);return u|0}function PL(e){e=e|0;var n=0,r=0;return n=e+74|0,r=p[n>>0]|0,p[n>>0]=r+255|r,n=t[e>>2]|0,n&8?(t[e>>2]=n|32,e=-1):(t[e+8>>2]=0,t[e+4>>2]=0,r=t[e+44>>2]|0,t[e+28>>2]=r,t[e+20>>2]=r,t[e+16>>2]=r+(t[e+48>>2]|0),e=0),e|0}function Ru(e,n){e=w(e),n=w(n);var r=0,u=0;r=f8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=f8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?n:e;break}else{e=e>2]=e,t[W>>2]|0|0}function Xp(e,n){e=w(e),n=w(n);var r=0,u=0;r=c8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=c8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?e:n;break}else{e=e>2]=e,t[W>>2]|0|0}function OE(e,n){e=w(e),n=w(n);var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0;s=(C[W>>2]=e,t[W>>2]|0),D=(C[W>>2]=n,t[W>>2]|0),r=s>>>23&255,h=D>>>23&255,S=s&-2147483648,l=D<<1;e:do if((l|0)!=0?!((r|0)==255|((IL(n)|0)&2147483647)>>>0>2139095040):0){if(u=s<<1,u>>>0<=l>>>0)return n=w(e*w(0)),w((u|0)==(l|0)?n:e);if(r)u=s&8388607|8388608;else{if(r=s<<9,(r|0)>-1){u=r,r=0;do r=r+-1|0,u=u<<1;while((u|0)>-1)}else r=0;u=s<<1-r}if(h)D=D&8388607|8388608;else{if(s=D<<9,(s|0)>-1){l=0;do l=l+-1|0,s=s<<1;while((s|0)>-1)}else l=0;h=l,D=D<<1-l}l=u-D|0,s=(l|0)>-1;t:do if((r|0)>(h|0)){for(;;){if(s)if(l)u=l;else break;if(u=u<<1,r=r+-1|0,l=u-D|0,s=(l|0)>-1,(r|0)<=(h|0))break t}n=w(e*w(0));break e}while(0);if(s)if(l)u=l;else{n=w(e*w(0));break}if(u>>>0<8388608)do u=u<<1,r=r+-1|0;while(u>>>0<8388608);(r|0)>0?r=u+-8388608|r<<23:r=u>>>(1-r|0),n=(t[W>>2]=r|S,w(C[W>>2]))}else N=3;while(0);return(N|0)==3&&(n=w(e*n),n=w(n/n)),w(n)}function IL(e){return e=w(e),C[W>>2]=e,t[W>>2]|0|0}function bL(e,n){return e=e|0,n=n|0,i8(t[582]|0,e,n)|0}function hi(e){e=e|0,$n()}function Iv(e){e=e|0}function BL(e,n){return e=e|0,n=n|0,0}function UL(e){return e=e|0,(d8(e+4|0)|0)==-1?(F1[t[(t[e>>2]|0)+8>>2]&127](e),e=1):e=0,e|0}function d8(e){e=e|0;var n=0;return n=t[e>>2]|0,t[e>>2]=n+-1,n+-1|0}function e2(e){e=e|0,UL(e)|0&&jL(e)}function jL(e){e=e|0;var n=0;n=e+8|0,((t[n>>2]|0)!=0?(d8(n)|0)!=-1:0)||F1[t[(t[e>>2]|0)+16>>2]&127](e)}function pn(e){e=e|0;var n=0;for(n=(e|0)==0?1:e;e=c_(n)|0,!(e|0);){if(e=HL()|0,!e){e=0;break}R8[e&0]()}return e|0}function p8(e){return e=e|0,pn(e)|0}function _t(e){e=e|0,d_(e)}function zL(e){e=e|0,(p[e+11>>0]|0)<0&&_t(t[e>>2]|0)}function HL(){var e=0;return e=t[2923]|0,t[2923]=e+0,e|0}function qL(){}function h_(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,u=n-u-(r>>>0>e>>>0|0)>>>0,ut=u,e-r>>>0|0|0}function ME(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,r=e+r>>>0,ut=n+u+(r>>>0>>0|0)>>>0,r|0|0}function bv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(s=e+r|0,n=n&255,(r|0)>=67){for(;e&3;)p[e>>0]=n,e=e+1|0;for(u=s&-4|0,l=u-64|0,h=n|n<<8|n<<16|n<<24;(e|0)<=(l|0);)t[e>>2]=h,t[e+4>>2]=h,t[e+8>>2]=h,t[e+12>>2]=h,t[e+16>>2]=h,t[e+20>>2]=h,t[e+24>>2]=h,t[e+28>>2]=h,t[e+32>>2]=h,t[e+36>>2]=h,t[e+40>>2]=h,t[e+44>>2]=h,t[e+48>>2]=h,t[e+52>>2]=h,t[e+56>>2]=h,t[e+60>>2]=h,e=e+64|0;for(;(e|0)<(u|0);)t[e>>2]=h,e=e+4|0}for(;(e|0)<(s|0);)p[e>>0]=n,e=e+1|0;return s-r|0}function h8(e,n,r){return e=e|0,n=n|0,r=r|0,(r|0)<32?(ut=n<>>32-r,e<>>r,e>>>r|(n&(1<>>r-32|0)}function gr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;if((r|0)>=8192)return ai(e|0,n|0,r|0)|0;if(s=e|0,l=e+r|0,(e&3)==(n&3)){for(;e&3;){if(!r)return s|0;p[e>>0]=p[n>>0]|0,e=e+1|0,n=n+1|0,r=r-1|0}for(r=l&-4|0,u=r-64|0;(e|0)<=(u|0);)t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2],t[e+16>>2]=t[n+16>>2],t[e+20>>2]=t[n+20>>2],t[e+24>>2]=t[n+24>>2],t[e+28>>2]=t[n+28>>2],t[e+32>>2]=t[n+32>>2],t[e+36>>2]=t[n+36>>2],t[e+40>>2]=t[n+40>>2],t[e+44>>2]=t[n+44>>2],t[e+48>>2]=t[n+48>>2],t[e+52>>2]=t[n+52>>2],t[e+56>>2]=t[n+56>>2],t[e+60>>2]=t[n+60>>2],e=e+64|0,n=n+64|0;for(;(e|0)<(r|0);)t[e>>2]=t[n>>2],e=e+4|0,n=n+4|0}else for(r=l-4|0;(e|0)<(r|0);)p[e>>0]=p[n>>0]|0,p[e+1>>0]=p[n+1>>0]|0,p[e+2>>0]=p[n+2>>0]|0,p[e+3>>0]=p[n+3>>0]|0,e=e+4|0,n=n+4|0;for(;(e|0)<(l|0);)p[e>>0]=p[n>>0]|0,e=e+1|0,n=n+1|0;return s|0}function v8(e){e=e|0;var n=0;return n=p[Ee+(e&255)>>0]|0,(n|0)<8?n|0:(n=p[Ee+(e>>8&255)>>0]|0,(n|0)<8?n+8|0:(n=p[Ee+(e>>16&255)>>0]|0,(n|0)<8?n+16|0:(p[Ee+(e>>>24)>>0]|0)+24|0))}function m8(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0;if(M=e,S=n,N=S,h=r,K=u,D=K,!N)return s=(l|0)!=0,D?s?(t[l>>2]=e|0,t[l+4>>2]=n&0,K=0,l=0,ut=K,l|0):(K=0,l=0,ut=K,l|0):(s&&(t[l>>2]=(M>>>0)%(h>>>0),t[l+4>>2]=0),K=0,l=(M>>>0)/(h>>>0)>>>0,ut=K,l|0);s=(D|0)==0;do if(h){if(!s){if(s=(Er(D|0)|0)-(Er(N|0)|0)|0,s>>>0<=31){I=s+1|0,D=31-s|0,n=s-31>>31,h=I,e=M>>>(I>>>0)&n|N<>>(I>>>0)&n,s=0,D=M<>2]=e|0,t[l+4>>2]=S|n&0,K=0,l=0,ut=K,l|0):(K=0,l=0,ut=K,l|0)}if(s=h-1|0,s&h|0){D=(Er(h|0)|0)+33-(Er(N|0)|0)|0,Se=64-D|0,I=32-D|0,S=I>>31,be=D-32|0,n=be>>31,h=D,e=I-1>>31&N>>>(be>>>0)|(N<>>(D>>>0))&n,n=n&N>>>(D>>>0),s=M<>>(be>>>0))&S|M<>31;break}return l|0&&(t[l>>2]=s&M,t[l+4>>2]=0),(h|0)==1?(be=S|n&0,Se=e|0|0,ut=be,Se|0):(Se=v8(h|0)|0,be=N>>>(Se>>>0)|0,Se=N<<32-Se|M>>>(Se>>>0)|0,ut=be,Se|0)}else{if(s)return l|0&&(t[l>>2]=(N>>>0)%(h>>>0),t[l+4>>2]=0),be=0,Se=(N>>>0)/(h>>>0)>>>0,ut=be,Se|0;if(!M)return l|0&&(t[l>>2]=0,t[l+4>>2]=(N>>>0)%(D>>>0)),be=0,Se=(N>>>0)/(D>>>0)>>>0,ut=be,Se|0;if(s=D-1|0,!(s&D))return l|0&&(t[l>>2]=e|0,t[l+4>>2]=s&N|n&0),be=0,Se=N>>>((v8(D|0)|0)>>>0),ut=be,Se|0;if(s=(Er(D|0)|0)-(Er(N|0)|0)|0,s>>>0<=30){n=s+1|0,D=31-s|0,h=n,e=N<>>(n>>>0),n=N>>>(n>>>0),s=0,D=M<>2]=e|0,t[l+4>>2]=S|n&0,be=0,Se=0,ut=be,Se|0):(be=0,Se=0,ut=be,Se|0)}while(0);if(!h)N=D,S=0,D=0;else{I=r|0|0,M=K|u&0,N=ME(I|0,M|0,-1,-1)|0,r=ut,S=D,D=0;do u=S,S=s>>>31|S<<1,s=D|s<<1,u=e<<1|u>>>31|0,K=e>>>31|n<<1|0,h_(N|0,r|0,u|0,K|0)|0,Se=ut,be=Se>>31|((Se|0)<0?-1:0)<<1,D=be&1,e=h_(u|0,K|0,be&I|0,(((Se|0)<0?-1:0)>>31|((Se|0)<0?-1:0)<<1)&M|0)|0,n=ut,h=h-1|0;while((h|0)!=0);N=S,S=0}return h=0,l|0&&(t[l>>2]=e,t[l+4>>2]=n),be=(s|0)>>>31|(N|h)<<1|(h<<1|s>>>31)&0|S,Se=(s<<1|0>>>31)&-2|D,ut=be,Se|0}function kE(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,m8(e,n,r,u,0)|0}function t2(e){e=e|0;var n=0,r=0;return r=e+15&-16|0,n=t[H>>2]|0,e=n+r|0,(r|0)>0&(e|0)<(n|0)|(e|0)<0?(fr()|0,Ql(12),-1):(t[H>>2]=e,((e|0)>(jr()|0)?(vr()|0)==0:0)?(t[H>>2]=n,Ql(12),-1):n|0)}function Ty(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if((n|0)<(e|0)&(e|0)<(n+r|0)){for(u=e,n=n+r|0,e=e+r|0;(r|0)>0;)e=e-1|0,n=n-1|0,r=r-1|0,p[e>>0]=p[n>>0]|0;e=u}else gr(e,n,r)|0;return e|0}function NE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;return s=m,m=m+16|0,l=s|0,m8(e,n,r,u,l)|0,m=s,ut=t[l+4>>2]|0,t[l>>2]|0|0}function y8(e){return e=e|0,(e&255)<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function WL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,g8[e&1](n|0,r|0,u|0,l|0,s|0)}function VL(e,n,r){e=e|0,n=n|0,r=w(r),_8[e&1](n|0,w(r))}function YL(e,n,r){e=e|0,n=n|0,r=+r,E8[e&31](n|0,+r)}function KL(e,n,r,u){return e=e|0,n=n|0,r=w(r),u=w(u),w(D8[e&0](n|0,w(r),w(u)))}function XL(e,n){e=e|0,n=n|0,F1[e&127](n|0)}function QL(e,n,r){e=e|0,n=n|0,r=r|0,P1[e&31](n|0,r|0)}function JL(e,n){return e=e|0,n=n|0,Jp[e&31](n|0)|0}function ZL(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,w8[e&1](n|0,+r,+u,l|0)}function $L(e,n,r,u){e=e|0,n=n|0,r=+r,u=+u,LF[e&1](n|0,+r,+u)}function eF(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,y_[e&7](n|0,r|0,u|0)|0}function tF(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,+FF[e&1](n|0,r|0,u|0)}function nF(e,n){return e=e|0,n=n|0,+S8[e&15](n|0)}function rF(e,n,r){return e=e|0,n=n|0,r=+r,PF[e&1](n|0,+r)|0}function iF(e,n,r){return e=e|0,n=n|0,r=r|0,FE[e&15](n|0,r|0)|0}function uF(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=+u,l=+l,s=s|0,IF[e&1](n|0,r|0,+u,+l,s|0)}function oF(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,bF[e&1](n|0,r|0,u|0,l|0,s|0,h|0)}function lF(e,n,r){return e=e|0,n=n|0,r=r|0,+T8[e&7](n|0,r|0)}function sF(e){return e=e|0,g_[e&7]()|0}function aF(e,n,r,u,l,s){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,C8[e&1](n|0,r|0,u|0,l|0,s|0)|0}function fF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=+l,BF[e&1](n|0,r|0,u|0,+l)}function cF(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,x8[e&1](n|0,r|0,w(u),l|0,w(s),h|0)}function dF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,Ry[e&15](n|0,r|0,u|0)}function pF(e){e=e|0,R8[e&0]()}function hF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,A8[e&15](n|0,r|0,+u)}function vF(e,n,r){return e=e|0,n=+n,r=+r,UF[e&1](+n,+r)|0}function mF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,PE[e&15](n|0,r|0,u|0,l|0)}function yF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,jt(0)}function gF(e,n){e=e|0,n=w(n),jt(1)}function $s(e,n){e=e|0,n=+n,jt(2)}function _F(e,n,r){return e=e|0,n=w(n),r=w(r),jt(3),Tt}function Zn(e){e=e|0,jt(4)}function Cy(e,n){e=e|0,n=n|0,jt(5)}function Na(e){return e=e|0,jt(6),0}function EF(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,jt(7)}function DF(e,n,r){e=e|0,n=+n,r=+r,jt(8)}function wF(e,n,r){return e=e|0,n=n|0,r=r|0,jt(9),0}function SF(e,n,r){return e=e|0,n=n|0,r=r|0,jt(10),0}function Qp(e){return e=e|0,jt(11),0}function TF(e,n){return e=e|0,n=+n,jt(12),0}function xy(e,n){return e=e|0,n=n|0,jt(13),0}function CF(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,jt(14)}function xF(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,jt(15)}function LE(e,n){return e=e|0,n=n|0,jt(16),0}function RF(){return jt(17),0}function AF(e,n,r,u,l){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,jt(18),0}function OF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,jt(19)}function MF(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0,jt(20)}function m_(e,n,r){e=e|0,n=n|0,r=r|0,jt(21)}function kF(){jt(22)}function Bv(e,n,r){e=e|0,n=n|0,r=+r,jt(23)}function NF(e,n){return e=+e,n=+n,jt(24),0}function Uv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,jt(25)}var g8=[yF,RO],_8=[gF,n0],E8=[$s,ca,ws,Ss,ts,zo,Ef,ul,qa,r0,Df,qc,dc,Al,Ts,da,ud,pa,pc,$s,$s,$s,$s,$s,$s,$s,$s,$s,$s,$s,$s,$s],D8=[_F],F1=[Zn,Iv,cn,is,Eo,Uf,O1,Ul,n7,r7,i7,hO,vO,mO,IN,bN,BN,Le,fc,Ua,Gu,j0,hh,Sf,n1,Lf,Ea,Ah,fm,y1,g1,Xh,vp,Fd,Lm,T1,Ac,Wm,Ym,Sv,Rv,on,N4,q4,e_,Nt,xu,t0,m9,N9,J9,vR,MR,JR,lA,fA,RA,MA,YA,o7,a7,x7,W7,gd,CM,nk,yk,Nk,eN,vN,xN,ON,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn],P1=[Cy,E2,nd,Hc,xl,il,D2,qs,Rl,ja,za,Ha,Ol,Ue,lt,$t,Wn,si,ur,Wa,S2,mh,G4,J4,_R,AM,Z7,Hw,Cy,Cy,Cy,Cy],Jp=[Na,pL,_f,y,J,ce,mt,xt,kt,xr,cu,z0,Va,od,Kc,Ms,FR,O7,NM,Oa,Na,Na,Na,Na,Na,Na,Na,Na,Na,Na,Na,Na],w8=[EF,x2],LF=[DF,QA],y_=[wF,n8,hL,yL,zh,dv,E9,Ik],FF=[SF,lv],S8=[Qp,u0,Ve,ci,vh,sl,ha,R2,A2,hc,Qp,Qp,Qp,Qp,Qp,Qp],PF=[TF,iA],FE=[xy,BL,w2,cl,q2,_m,cp,Rp,Km,kr,Uo,Dk,xy,xy,xy,xy],IF=[CF,Sh],bF=[xF,iN],T8=[LE,Qi,O2,dd,Xc,vl,LE,LE],g_=[RF,Qc,ro,D0,hA,FA,p7,LN],C8=[AF,li],BF=[OF,sy],x8=[MF,ld],Ry=[m_,R,i0,Gr,Cu,v1,Ld,ar,dy,vo,QO,ok,_N,m_,m_,m_],R8=[kF],A8=[Bv,rd,mo,id,jo,Wc,qi,g,Up,I9,eA,Bv,Bv,Bv,Bv,Bv],UF=[NF,e7],PE=[Uv,Dp,Lc,tR,qR,EA,jA,E7,X7,BM,WN,Uv,Uv,Uv,Uv,Uv];return{_llvm_bswap_i32:y8,dynCall_idd:vF,dynCall_i:sF,_i64Subtract:h_,___udivdi3:kE,dynCall_vif:VL,setThrew:vs,dynCall_viii:dF,_bitshift64Lshr:v_,_bitshift64Shl:h8,dynCall_vi:XL,dynCall_viiddi:uF,dynCall_diii:tF,dynCall_iii:iF,_memset:bv,_sbrk:t2,_memcpy:gr,__GLOBAL__sub_I_Yoga_cpp:ru,dynCall_vii:QL,___uremdi3:NE,dynCall_vid:YL,stackAlloc:fo,_nbind_init:tL,getTempRet0:X,dynCall_di:nF,dynCall_iid:rF,setTempRet0:b0,_i64Add:ME,dynCall_fiff:KL,dynCall_iiii:eF,_emscripten_get_global_libc:dL,dynCall_viid:hF,dynCall_viiid:fF,dynCall_viififi:cF,dynCall_ii:JL,__GLOBAL__sub_I_Binding_cc:yM,dynCall_viiii:mF,dynCall_iiiiii:aF,stackSave:tl,dynCall_viiiii:WL,__GLOBAL__sub_I_nbind_cc:Ws,dynCall_vidd:$L,_free:d_,runPostSets:qL,dynCall_viiiiii:oF,establishStackSpace:ju,_memmove:Ty,stackRestore:Jl,_malloc:c_,__GLOBAL__sub_I_common_cc:b7,dynCall_viddi:ZL,dynCall_dii:lF,dynCall_v:pF}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(i){this.name="ExitStatus",this.message="Program terminated with exit("+i+")",this.status=i}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function i(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=i)},Module.callMain=Module.callMain=function(o){o=o||[],ensureInitRuntime();var a=o.length+1;function p(){for(var O=0;O<4-1;O++)_.push(0)}var _=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];p();for(var t=0;t0||(preRun(),runDependencies>0)||Module.calledRun)return;function o(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(i),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),o()},1)):o()}Module.run=Module.run=run;function exit(i,o){o&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=i,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(i)),ENVIRONMENT_IS_NODE&&process.exit(i),Module.quit(i,new ExitStatus(i)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(i){Module.onAbort&&Module.onAbort(i),i!==void 0?(Module.print(i),Module.printErr(i),i=JSON.stringify(i)):i="",ABORT=!0,EXITSTATUS=1;var o=` -If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,a="abort("+i+") at "+stackTrace()+o;throw abortDecorators&&abortDecorators.forEach(function(p){a=p(a,i)}),a}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var $p=tt((MH,WS)=>{"use strict";var kP=HS(),NP=qS(),gD=!1,_D=null;NP({},function(i,o){if(!gD){if(gD=!0,i)throw i;_D=o}});if(!gD)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");WS.exports=kP(_D.bind,_D.lib)});var GS=tt((kH,VS)=>{"use strict";VS.exports=({onlyFirst:i=!1}={})=>{let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i?void 0:"g")}});var ED=tt((NH,YS)=>{"use strict";var LP=GS();YS.exports=i=>typeof i=="string"?i.replace(LP(),""):i});var wD=tt((LH,DD)=>{"use strict";var KS=i=>Number.isNaN(i)?!1:i>=4352&&(i<=4447||i===9001||i===9002||11904<=i&&i<=12871&&i!==12351||12880<=i&&i<=19903||19968<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65131||65281<=i&&i<=65376||65504<=i&&i<=65510||110592<=i&&i<=110593||127488<=i&&i<=127569||131072<=i&&i<=262141);DD.exports=KS;DD.exports.default=KS});var QS=tt((FH,XS)=>{"use strict";XS.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var U_=tt((PH,SD)=>{"use strict";var FP=ED(),PP=wD(),IP=QS(),JS=i=>{if(i=i.replace(IP()," "),typeof i!="string"||i.length===0)return 0;i=FP(i);let o=0;for(let a=0;a=127&&p<=159||p>=768&&p<=879||(p>65535&&a++,o+=PP(p)?2:1)}return o};SD.exports=JS;SD.exports.default=JS});var CD=tt((IH,TD)=>{"use strict";var bP=U_(),ZS=i=>{let o=0;for(let a of i.split(` -`))o=Math.max(o,bP(a));return o};TD.exports=ZS;TD.exports.default=ZS});var $S=tt(Wy=>{"use strict";var BP=Wy&&Wy.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wy,"__esModule",{value:!0});var UP=BP(CD()),xD={};Wy.default=i=>{if(i.length===0)return{width:0,height:0};if(xD[i])return xD[i];let o=UP.default(i),a=i.split(` -`).length;return xD[i]={width:o,height:a},{width:o,height:a}}});var eT=tt(Vy=>{"use strict";var jP=Vy&&Vy.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vy,"__esModule",{value:!0});var Vi=jP($p()),zP=(i,o)=>{"position"in o&&i.setPositionType(o.position==="absolute"?Vi.default.POSITION_TYPE_ABSOLUTE:Vi.default.POSITION_TYPE_RELATIVE)},HP=(i,o)=>{"marginLeft"in o&&i.setMargin(Vi.default.EDGE_START,o.marginLeft||0),"marginRight"in o&&i.setMargin(Vi.default.EDGE_END,o.marginRight||0),"marginTop"in o&&i.setMargin(Vi.default.EDGE_TOP,o.marginTop||0),"marginBottom"in o&&i.setMargin(Vi.default.EDGE_BOTTOM,o.marginBottom||0)},qP=(i,o)=>{"paddingLeft"in o&&i.setPadding(Vi.default.EDGE_LEFT,o.paddingLeft||0),"paddingRight"in o&&i.setPadding(Vi.default.EDGE_RIGHT,o.paddingRight||0),"paddingTop"in o&&i.setPadding(Vi.default.EDGE_TOP,o.paddingTop||0),"paddingBottom"in o&&i.setPadding(Vi.default.EDGE_BOTTOM,o.paddingBottom||0)},WP=(i,o)=>{var a;"flexGrow"in o&&i.setFlexGrow((a=o.flexGrow)!==null&&a!==void 0?a:0),"flexShrink"in o&&i.setFlexShrink(typeof o.flexShrink=="number"?o.flexShrink:1),"flexDirection"in o&&(o.flexDirection==="row"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_ROW),o.flexDirection==="row-reverse"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_ROW_REVERSE),o.flexDirection==="column"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_COLUMN),o.flexDirection==="column-reverse"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in o&&(typeof o.flexBasis=="number"?i.setFlexBasis(o.flexBasis):typeof o.flexBasis=="string"?i.setFlexBasisPercent(Number.parseInt(o.flexBasis,10)):i.setFlexBasis(NaN)),"alignItems"in o&&((o.alignItems==="stretch"||!o.alignItems)&&i.setAlignItems(Vi.default.ALIGN_STRETCH),o.alignItems==="flex-start"&&i.setAlignItems(Vi.default.ALIGN_FLEX_START),o.alignItems==="center"&&i.setAlignItems(Vi.default.ALIGN_CENTER),o.alignItems==="flex-end"&&i.setAlignItems(Vi.default.ALIGN_FLEX_END)),"alignSelf"in o&&((o.alignSelf==="auto"||!o.alignSelf)&&i.setAlignSelf(Vi.default.ALIGN_AUTO),o.alignSelf==="flex-start"&&i.setAlignSelf(Vi.default.ALIGN_FLEX_START),o.alignSelf==="center"&&i.setAlignSelf(Vi.default.ALIGN_CENTER),o.alignSelf==="flex-end"&&i.setAlignSelf(Vi.default.ALIGN_FLEX_END)),"justifyContent"in o&&((o.justifyContent==="flex-start"||!o.justifyContent)&&i.setJustifyContent(Vi.default.JUSTIFY_FLEX_START),o.justifyContent==="center"&&i.setJustifyContent(Vi.default.JUSTIFY_CENTER),o.justifyContent==="flex-end"&&i.setJustifyContent(Vi.default.JUSTIFY_FLEX_END),o.justifyContent==="space-between"&&i.setJustifyContent(Vi.default.JUSTIFY_SPACE_BETWEEN),o.justifyContent==="space-around"&&i.setJustifyContent(Vi.default.JUSTIFY_SPACE_AROUND))},VP=(i,o)=>{var a,p;"width"in o&&(typeof o.width=="number"?i.setWidth(o.width):typeof o.width=="string"?i.setWidthPercent(Number.parseInt(o.width,10)):i.setWidthAuto()),"height"in o&&(typeof o.height=="number"?i.setHeight(o.height):typeof o.height=="string"?i.setHeightPercent(Number.parseInt(o.height,10)):i.setHeightAuto()),"minWidth"in o&&(typeof o.minWidth=="string"?i.setMinWidthPercent(Number.parseInt(o.minWidth,10)):i.setMinWidth((a=o.minWidth)!==null&&a!==void 0?a:0)),"minHeight"in o&&(typeof o.minHeight=="string"?i.setMinHeightPercent(Number.parseInt(o.minHeight,10)):i.setMinHeight((p=o.minHeight)!==null&&p!==void 0?p:0))},GP=(i,o)=>{"display"in o&&i.setDisplay(o.display==="flex"?Vi.default.DISPLAY_FLEX:Vi.default.DISPLAY_NONE)},YP=(i,o)=>{if("borderStyle"in o){let a=typeof o.borderStyle=="string"?1:0;i.setBorder(Vi.default.EDGE_TOP,a),i.setBorder(Vi.default.EDGE_BOTTOM,a),i.setBorder(Vi.default.EDGE_LEFT,a),i.setBorder(Vi.default.EDGE_RIGHT,a)}};Vy.default=(i,o={})=>{zP(i,o),HP(i,o),qP(i,o),WP(i,o),VP(i,o),GP(i,o),YP(i,o)}});var nT=tt((UH,tT)=>{"use strict";tT.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var RD=tt((jH,rT)=>{var Gy=nT(),iT={};for(let i of Object.keys(Gy))iT[Gy[i]]=i;var zn={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};rT.exports=zn;for(let i of Object.keys(zn)){if(!("channels"in zn[i]))throw new Error("missing channels property: "+i);if(!("labels"in zn[i]))throw new Error("missing channel labels property: "+i);if(zn[i].labels.length!==zn[i].channels)throw new Error("channel and label counts mismatch: "+i);let{channels:o,labels:a}=zn[i];delete zn[i].channels,delete zn[i].labels,Object.defineProperty(zn[i],"channels",{value:o}),Object.defineProperty(zn[i],"labels",{value:a})}zn.rgb.hsl=function(i){let o=i[0]/255,a=i[1]/255,p=i[2]/255,_=Math.min(o,a,p),t=Math.max(o,a,p),k=t-_,L,O;t===_?L=0:o===t?L=(a-p)/k:a===t?L=2+(p-o)/k:p===t&&(L=4+(o-a)/k),L=Math.min(L*60,360),L<0&&(L+=360);let C=(_+t)/2;return t===_?O=0:C<=.5?O=k/(t+_):O=k/(2-t-_),[L,O*100,C*100]};zn.rgb.hsv=function(i){let o,a,p,_,t,k=i[0]/255,L=i[1]/255,O=i[2]/255,C=Math.max(k,L,O),U=C-Math.min(k,L,O),H=function(W){return(C-W)/6/U+1/2};return U===0?(_=0,t=0):(t=U/C,o=H(k),a=H(L),p=H(O),k===C?_=p-a:L===C?_=1/3+o-p:O===C&&(_=2/3+a-o),_<0?_+=1:_>1&&(_-=1)),[_*360,t*100,C*100]};zn.rgb.hwb=function(i){let o=i[0],a=i[1],p=i[2],_=zn.rgb.hsl(i)[0],t=1/255*Math.min(o,Math.min(a,p));return p=1-1/255*Math.max(o,Math.max(a,p)),[_,t*100,p*100]};zn.rgb.cmyk=function(i){let o=i[0]/255,a=i[1]/255,p=i[2]/255,_=Math.min(1-o,1-a,1-p),t=(1-o-_)/(1-_)||0,k=(1-a-_)/(1-_)||0,L=(1-p-_)/(1-_)||0;return[t*100,k*100,L*100,_*100]};function KP(i,o){return(i[0]-o[0])**2+(i[1]-o[1])**2+(i[2]-o[2])**2}zn.rgb.keyword=function(i){let o=iT[i];if(o)return o;let a=Infinity,p;for(let _ of Object.keys(Gy)){let t=Gy[_],k=KP(i,t);k.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,p=p>.04045?((p+.055)/1.055)**2.4:p/12.92;let _=o*.4124+a*.3576+p*.1805,t=o*.2126+a*.7152+p*.0722,k=o*.0193+a*.1192+p*.9505;return[_*100,t*100,k*100]};zn.rgb.lab=function(i){let o=zn.rgb.xyz(i),a=o[0],p=o[1],_=o[2];a/=95.047,p/=100,_/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,p=p>.008856?p**(1/3):7.787*p+16/116,_=_>.008856?_**(1/3):7.787*_+16/116;let t=116*p-16,k=500*(a-p),L=200*(p-_);return[t,k,L]};zn.hsl.rgb=function(i){let o=i[0]/360,a=i[1]/100,p=i[2]/100,_,t,k;if(a===0)return k=p*255,[k,k,k];p<.5?_=p*(1+a):_=p+a-p*a;let L=2*p-_,O=[0,0,0];for(let C=0;C<3;C++)t=o+1/3*-(C-1),t<0&&t++,t>1&&t--,6*t<1?k=L+(_-L)*6*t:2*t<1?k=_:3*t<2?k=L+(_-L)*(2/3-t)*6:k=L,O[C]=k*255;return O};zn.hsl.hsv=function(i){let o=i[0],a=i[1]/100,p=i[2]/100,_=a,t=Math.max(p,.01);p*=2,a*=p<=1?p:2-p,_*=t<=1?t:2-t;let k=(p+a)/2,L=p===0?2*_/(t+_):2*a/(p+a);return[o,L*100,k*100]};zn.hsv.rgb=function(i){let o=i[0]/60,a=i[1]/100,p=i[2]/100,_=Math.floor(o)%6,t=o-Math.floor(o),k=255*p*(1-a),L=255*p*(1-a*t),O=255*p*(1-a*(1-t));switch(p*=255,_){case 0:return[p,O,k];case 1:return[L,p,k];case 2:return[k,p,O];case 3:return[k,L,p];case 4:return[O,k,p];case 5:return[p,k,L]}};zn.hsv.hsl=function(i){let o=i[0],a=i[1]/100,p=i[2]/100,_=Math.max(p,.01),t,k;k=(2-a)*p;let L=(2-a)*_;return t=a*_,t/=L<=1?L:2-L,t=t||0,k/=2,[o,t*100,k*100]};zn.hwb.rgb=function(i){let o=i[0]/360,a=i[1]/100,p=i[2]/100,_=a+p,t;_>1&&(a/=_,p/=_);let k=Math.floor(6*o),L=1-p;t=6*o-k,(k&1)!=0&&(t=1-t);let O=a+t*(L-a),C,U,H;switch(k){default:case 6:case 0:C=L,U=O,H=a;break;case 1:C=O,U=L,H=a;break;case 2:C=a,U=L,H=O;break;case 3:C=a,U=O,H=L;break;case 4:C=O,U=a,H=L;break;case 5:C=L,U=a,H=O;break}return[C*255,U*255,H*255]};zn.cmyk.rgb=function(i){let o=i[0]/100,a=i[1]/100,p=i[2]/100,_=i[3]/100,t=1-Math.min(1,o*(1-_)+_),k=1-Math.min(1,a*(1-_)+_),L=1-Math.min(1,p*(1-_)+_);return[t*255,k*255,L*255]};zn.xyz.rgb=function(i){let o=i[0]/100,a=i[1]/100,p=i[2]/100,_,t,k;return _=o*3.2406+a*-1.5372+p*-.4986,t=o*-.9689+a*1.8758+p*.0415,k=o*.0557+a*-.204+p*1.057,_=_>.0031308?1.055*_**(1/2.4)-.055:_*12.92,t=t>.0031308?1.055*t**(1/2.4)-.055:t*12.92,k=k>.0031308?1.055*k**(1/2.4)-.055:k*12.92,_=Math.min(Math.max(0,_),1),t=Math.min(Math.max(0,t),1),k=Math.min(Math.max(0,k),1),[_*255,t*255,k*255]};zn.xyz.lab=function(i){let o=i[0],a=i[1],p=i[2];o/=95.047,a/=100,p/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,p=p>.008856?p**(1/3):7.787*p+16/116;let _=116*a-16,t=500*(o-a),k=200*(a-p);return[_,t,k]};zn.lab.xyz=function(i){let o=i[0],a=i[1],p=i[2],_,t,k;t=(o+16)/116,_=a/500+t,k=t-p/200;let L=t**3,O=_**3,C=k**3;return t=L>.008856?L:(t-16/116)/7.787,_=O>.008856?O:(_-16/116)/7.787,k=C>.008856?C:(k-16/116)/7.787,_*=95.047,t*=100,k*=108.883,[_,t,k]};zn.lab.lch=function(i){let o=i[0],a=i[1],p=i[2],_;_=Math.atan2(p,a)*360/2/Math.PI,_<0&&(_+=360);let k=Math.sqrt(a*a+p*p);return[o,k,_]};zn.lch.lab=function(i){let o=i[0],a=i[1],_=i[2]/360*2*Math.PI,t=a*Math.cos(_),k=a*Math.sin(_);return[o,t,k]};zn.rgb.ansi16=function(i,o=null){let[a,p,_]=i,t=o===null?zn.rgb.hsv(i)[2]:o;if(t=Math.round(t/50),t===0)return 30;let k=30+(Math.round(_/255)<<2|Math.round(p/255)<<1|Math.round(a/255));return t===2&&(k+=60),k};zn.hsv.ansi16=function(i){return zn.rgb.ansi16(zn.hsv.rgb(i),i[2])};zn.rgb.ansi256=function(i){let o=i[0],a=i[1],p=i[2];return o===a&&a===p?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(a/255*5)+Math.round(p/255*5)};zn.ansi16.rgb=function(i){let o=i%10;if(o===0||o===7)return i>50&&(o+=3.5),o=o/10.5*255,[o,o,o];let a=(~~(i>50)+1)*.5,p=(o&1)*a*255,_=(o>>1&1)*a*255,t=(o>>2&1)*a*255;return[p,_,t]};zn.ansi256.rgb=function(i){if(i>=232){let t=(i-232)*10+8;return[t,t,t]}i-=16;let o,a=Math.floor(i/36)/5*255,p=Math.floor((o=i%36)/6)/5*255,_=o%6/5*255;return[a,p,_]};zn.rgb.hex=function(i){let a=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a};zn.hex.rgb=function(i){let o=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let a=o[0];o[0].length===3&&(a=a.split("").map(L=>L+L).join(""));let p=parseInt(a,16),_=p>>16&255,t=p>>8&255,k=p&255;return[_,t,k]};zn.rgb.hcg=function(i){let o=i[0]/255,a=i[1]/255,p=i[2]/255,_=Math.max(Math.max(o,a),p),t=Math.min(Math.min(o,a),p),k=_-t,L,O;return k<1?L=t/(1-k):L=0,k<=0?O=0:_===o?O=(a-p)/k%6:_===a?O=2+(p-o)/k:O=4+(o-a)/k,O/=6,O%=1,[O*360,k*100,L*100]};zn.hsl.hcg=function(i){let o=i[1]/100,a=i[2]/100,p=a<.5?2*o*a:2*o*(1-a),_=0;return p<1&&(_=(a-.5*p)/(1-p)),[i[0],p*100,_*100]};zn.hsv.hcg=function(i){let o=i[1]/100,a=i[2]/100,p=o*a,_=0;return p<1&&(_=(a-p)/(1-p)),[i[0],p*100,_*100]};zn.hcg.rgb=function(i){let o=i[0]/360,a=i[1]/100,p=i[2]/100;if(a===0)return[p*255,p*255,p*255];let _=[0,0,0],t=o%1*6,k=t%1,L=1-k,O=0;switch(Math.floor(t)){case 0:_[0]=1,_[1]=k,_[2]=0;break;case 1:_[0]=L,_[1]=1,_[2]=0;break;case 2:_[0]=0,_[1]=1,_[2]=k;break;case 3:_[0]=0,_[1]=L,_[2]=1;break;case 4:_[0]=k,_[1]=0,_[2]=1;break;default:_[0]=1,_[1]=0,_[2]=L}return O=(1-a)*p,[(a*_[0]+O)*255,(a*_[1]+O)*255,(a*_[2]+O)*255]};zn.hcg.hsv=function(i){let o=i[1]/100,a=i[2]/100,p=o+a*(1-o),_=0;return p>0&&(_=o/p),[i[0],_*100,p*100]};zn.hcg.hsl=function(i){let o=i[1]/100,p=i[2]/100*(1-o)+.5*o,_=0;return p>0&&p<.5?_=o/(2*p):p>=.5&&p<1&&(_=o/(2*(1-p))),[i[0],_*100,p*100]};zn.hcg.hwb=function(i){let o=i[1]/100,a=i[2]/100,p=o+a*(1-o);return[i[0],(p-o)*100,(1-p)*100]};zn.hwb.hcg=function(i){let o=i[1]/100,a=i[2]/100,p=1-a,_=p-o,t=0;return _<1&&(t=(p-_)/(1-_)),[i[0],_*100,t*100]};zn.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};zn.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};zn.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};zn.gray.hsl=function(i){return[0,0,i[0]]};zn.gray.hsv=zn.gray.hsl;zn.gray.hwb=function(i){return[0,100,i[0]]};zn.gray.cmyk=function(i){return[0,0,0,i[0]]};zn.gray.lab=function(i){return[i[0],0,0]};zn.gray.hex=function(i){let o=Math.round(i[0]/100*255)&255,p=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(p.length)+p};zn.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]}});var oT=tt((zH,uT)=>{var j_=RD();function XP(){let i={},o=Object.keys(j_);for(let a=o.length,p=0;p{var AD=RD(),$P=oT(),Yv={},eI=Object.keys(AD);function tI(i){let o=function(...a){let p=a[0];return p==null?p:(p.length>1&&(a=p),i(a))};return"conversion"in i&&(o.conversion=i.conversion),o}function nI(i){let o=function(...a){let p=a[0];if(p==null)return p;p.length>1&&(a=p);let _=i(a);if(typeof _=="object")for(let t=_.length,k=0;k{Yv[i]={},Object.defineProperty(Yv[i],"channels",{value:AD[i].channels}),Object.defineProperty(Yv[i],"labels",{value:AD[i].labels});let o=$P(i);Object.keys(o).forEach(p=>{let _=o[p];Yv[i][p]=nI(_),Yv[i][p].raw=tI(_)})});lT.exports=Yv});var H_=tt((qH,aT)=>{"use strict";var fT=(i,o)=>(...a)=>`[${i(...a)+o}m`,cT=(i,o)=>(...a)=>{let p=i(...a);return`[${38+o};5;${p}m`},dT=(i,o)=>(...a)=>{let p=i(...a);return`[${38+o};2;${p[0]};${p[1]};${p[2]}m`},z_=i=>i,pT=(i,o,a)=>[i,o,a],Kv=(i,o,a)=>{Object.defineProperty(i,o,{get:()=>{let p=a();return Object.defineProperty(i,o,{value:p,enumerable:!0,configurable:!0}),p},enumerable:!0,configurable:!0})},OD,Xv=(i,o,a,p)=>{OD===void 0&&(OD=sT());let _=p?10:0,t={};for(let[k,L]of Object.entries(OD)){let O=k==="ansi16"?"ansi":k;k===o?t[O]=i(a,_):typeof L=="object"&&(t[O]=i(L[o],_))}return t};function rI(){let i=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};o.color.gray=o.color.blackBright,o.bgColor.bgGray=o.bgColor.bgBlackBright,o.color.grey=o.color.blackBright,o.bgColor.bgGrey=o.bgColor.bgBlackBright;for(let[a,p]of Object.entries(o)){for(let[_,t]of Object.entries(p))o[_]={open:`[${t[0]}m`,close:`[${t[1]}m`},p[_]=o[_],i.set(t[0],t[1]);Object.defineProperty(o,a,{value:p,enumerable:!1})}return Object.defineProperty(o,"codes",{value:i,enumerable:!1}),o.color.close="",o.bgColor.close="",Kv(o.color,"ansi",()=>Xv(fT,"ansi16",z_,!1)),Kv(o.color,"ansi256",()=>Xv(cT,"ansi256",z_,!1)),Kv(o.color,"ansi16m",()=>Xv(dT,"rgb",pT,!1)),Kv(o.bgColor,"ansi",()=>Xv(fT,"ansi16",z_,!0)),Kv(o.bgColor,"ansi256",()=>Xv(cT,"ansi256",z_,!0)),Kv(o.bgColor,"ansi16m",()=>Xv(dT,"rgb",pT,!0)),o}Object.defineProperty(aT,"exports",{enumerable:!0,get:rI})});var mT=tt((WH,hT)=>{"use strict";var Yy=U_(),iI=ED(),uI=H_(),MD=new Set(["","\x9B"]),oI=39,vT=i=>`${MD.values().next().value}[${i}m`,lI=i=>i.split(" ").map(o=>Yy(o)),kD=(i,o,a)=>{let p=[...o],_=!1,t=Yy(iI(i[i.length-1]));for(let[k,L]of p.entries()){let O=Yy(L);if(t+O<=a?i[i.length-1]+=L:(i.push(L),t=0),MD.has(L))_=!0;else if(_&&L==="m"){_=!1;continue}_||(t+=O,t===a&&k0&&i.length>1&&(i[i.length-2]+=i.pop())},sI=i=>{let o=i.split(" "),a=o.length;for(;a>0&&!(Yy(o[a-1])>0);)a--;return a===o.length?i:o.slice(0,a).join(" ")+o.slice(a).join("")},aI=(i,o,a={})=>{if(a.trim!==!1&&i.trim()==="")return"";let p="",_="",t,k=lI(i),L=[""];for(let[O,C]of i.split(" ").entries()){a.trim!==!1&&(L[L.length-1]=L[L.length-1].trimLeft());let U=Yy(L[L.length-1]);if(O!==0&&(U>=o&&(a.wordWrap===!1||a.trim===!1)&&(L.push(""),U=0),(U>0||a.trim===!1)&&(L[L.length-1]+=" ",U++)),a.hard&&k[O]>o){let H=o-U,W=1+Math.floor((k[O]-H-1)/o);Math.floor((k[O]-1)/o)o&&U>0&&k[O]>0){if(a.wordWrap===!1&&Uo&&a.wordWrap===!1){kD(L,C,o);continue}L[L.length-1]+=C}a.trim!==!1&&(L=L.map(sI)),p=L.join(` -`);for(let[O,C]of[...p].entries()){if(_+=C,MD.has(C)){let H=parseFloat(/\d[^m]*/.exec(p.slice(O,O+4)));t=H===oI?null:H}let U=uI.codes.get(Number(t));t&&U&&(p[O+1]===` -`?_+=vT(U):C===` -`&&(_+=vT(t)))}return _};hT.exports=(i,o,a)=>String(i).normalize().replace(/\r\n/g,` -`).split(` -`).map(p=>aI(p,o,a)).join(` -`)});var _T=tt((VH,yT)=>{"use strict";var gT="[\uD800-\uDBFF][\uDC00-\uDFFF]",fI=i=>i&&i.exact?new RegExp(`^${gT}$`):new RegExp(gT,"g");yT.exports=fI});var ND=tt((GH,ET)=>{"use strict";var cI=wD(),dI=_T(),DT=H_(),wT=["","\x9B"],q_=i=>`${wT[0]}[${i}m`,ST=(i,o,a)=>{let p=[];i=[...i];for(let _ of i){let t=_;_.match(";")&&(_=_.split(";")[0][0]+"0");let k=DT.codes.get(parseInt(_,10));if(k){let L=i.indexOf(k.toString());L>=0?i.splice(L,1):p.push(q_(o?k:t))}else if(o){p.push(q_(0));break}else p.push(q_(t))}if(o&&(p=p.filter((_,t)=>p.indexOf(_)===t),a!==void 0)){let _=q_(DT.codes.get(parseInt(a,10)));p=p.reduce((t,k)=>k===_?[k,...t]:[...t,k],[])}return p.join("")};ET.exports=(i,o,a)=>{let p=[...i.normalize()],_=[];a=typeof a=="number"?a:p.length;let t=!1,k,L=0,O="";for(let[C,U]of p.entries()){let H=!1;if(wT.includes(U)){let W=/\d[^m]*/.exec(i.slice(C,C+18));k=W&&W.length>0?W[0]:void 0,Lo&&L<=a)O+=U;else if(L===o&&!t&&k!==void 0)O=ST(_);else if(L>=a){O+=ST(_,!0,k);break}}return O}});var CT=tt((YH,TT)=>{"use strict";var d2=ND(),pI=U_();function W_(i,o,a){if(i.charAt(o)===" ")return o;for(let p=1;p<=3;p++)if(a){if(i.charAt(o+p)===" ")return o+p}else if(i.charAt(o-p)===" ")return o-p;return o}TT.exports=(i,o,a)=>{a=Ht({position:"end",preferTruncationOnSpace:!1},a);let{position:p,space:_,preferTruncationOnSpace:t}=a,k="\u2026",L=1;if(typeof i!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof i}`);if(typeof o!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof o}`);if(o<1)return"";if(o===1)return k;let O=pI(i);if(O<=o)return i;if(p==="start"){if(t){let C=W_(i,O-o+1,!0);return k+d2(i,C,O).trim()}return _===!0&&(k+=" ",L=2),k+d2(i,O-o+L,O)}if(p==="middle"){_===!0&&(k=" "+k+" ",L=3);let C=Math.floor(o/2);if(t){let U=W_(i,C),H=W_(i,O-(o-C)+1,!0);return d2(i,0,U)+k+d2(i,H,O).trim()}return d2(i,0,C)+k+d2(i,O-(o-C)+L,O)}if(p==="end"){if(t){let C=W_(i,o-1);return d2(i,0,C)+k}return _===!0&&(k=" "+k,L=2),d2(i,0,o-L)+k}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${p}`)}});var FD=tt(Ky=>{"use strict";var xT=Ky&&Ky.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ky,"__esModule",{value:!0});var hI=xT(mT()),vI=xT(CT()),LD={};Ky.default=(i,o,a)=>{let p=i+String(o)+String(a);if(LD[p])return LD[p];let _=i;if(a==="wrap"&&(_=hI.default(i,o,{trim:!1,hard:!0})),a.startsWith("truncate")){let t="end";a==="truncate-middle"&&(t="middle"),a==="truncate-start"&&(t="start"),_=vI.default(i,o,{position:t})}return LD[p]=_,_}});var ID=tt(PD=>{"use strict";Object.defineProperty(PD,"__esModule",{value:!0});var RT=i=>{let o="";if(i.childNodes.length>0)for(let a of i.childNodes){let p="";a.nodeName==="#text"?p=a.nodeValue:((a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&(p=RT(a)),p.length>0&&typeof a.internal_transform=="function"&&(p=a.internal_transform(p))),o+=p}return o};PD.default=RT});var bD=tt(c0=>{"use strict";var Xy=c0&&c0.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(c0,"__esModule",{value:!0});c0.setTextNodeValue=c0.createTextNode=c0.setStyle=c0.setAttribute=c0.removeChildNode=c0.insertBeforeNode=c0.appendChildNode=c0.createNode=c0.TEXT_NAME=void 0;var mI=Xy($p()),AT=Xy($S()),yI=Xy(eT()),gI=Xy(FD()),_I=Xy(ID());c0.TEXT_NAME="#text";c0.createNode=i=>{var o;let a={nodeName:i,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:i==="ink-virtual-text"?void 0:mI.default.Node.create()};return i==="ink-text"&&((o=a.yogaNode)===null||o===void 0||o.setMeasureFunc(EI.bind(null,a))),a};c0.appendChildNode=(i,o)=>{var a;o.parentNode&&c0.removeChildNode(o.parentNode,o),o.parentNode=i,i.childNodes.push(o),o.yogaNode&&((a=i.yogaNode)===null||a===void 0||a.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&V_(i)};c0.insertBeforeNode=(i,o,a)=>{var p,_;o.parentNode&&c0.removeChildNode(o.parentNode,o),o.parentNode=i;let t=i.childNodes.indexOf(a);if(t>=0){i.childNodes.splice(t,0,o),o.yogaNode&&((p=i.yogaNode)===null||p===void 0||p.insertChild(o.yogaNode,t));return}i.childNodes.push(o),o.yogaNode&&((_=i.yogaNode)===null||_===void 0||_.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&V_(i)};c0.removeChildNode=(i,o)=>{var a,p;o.yogaNode&&((p=(a=o.parentNode)===null||a===void 0?void 0:a.yogaNode)===null||p===void 0||p.removeChild(o.yogaNode)),o.parentNode=null;let _=i.childNodes.indexOf(o);_>=0&&i.childNodes.splice(_,1),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&V_(i)};c0.setAttribute=(i,o,a)=>{i.attributes[o]=a};c0.setStyle=(i,o)=>{i.style=o,i.yogaNode&&yI.default(i.yogaNode,o)};c0.createTextNode=i=>{let o={nodeName:"#text",nodeValue:i,yogaNode:void 0,parentNode:null,style:{}};return c0.setTextNodeValue(o,i),o};var EI=function(i,o){var a,p;let _=i.nodeName==="#text"?i.nodeValue:_I.default(i),t=AT.default(_);if(t.width<=o||t.width>=1&&o>0&&o<1)return t;let k=(p=(a=i.style)===null||a===void 0?void 0:a.textWrap)!==null&&p!==void 0?p:"wrap",L=gI.default(_,o,k);return AT.default(L)},OT=i=>{var o;if(!(!i||!i.parentNode))return(o=i.yogaNode)!==null&&o!==void 0?o:OT(i.parentNode)},V_=i=>{let o=OT(i);o==null||o.markDirty()};c0.setTextNodeValue=(i,o)=>{typeof o!="string"&&(o=String(o)),i.nodeValue=o,V_(i)}});var eh=tt((JH,MT)=>{"use strict";MT.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}});var Qy=tt((ZH,BD)=>{"use strict";var{EMPTY_BUFFER:DI}=eh();function kT(i,o){if(i.length===0)return DI;if(i.length===1)return i[0];let a=Buffer.allocUnsafe(o),p=0;for(let _=0;_{"use strict";var IT=Symbol("kDone"),UD=Symbol("kRun"),bT=class{constructor(o){this[IT]=()=>{this.pending--,this[UD]()},this.concurrency=o||Infinity,this.jobs=[],this.pending=0}add(o){this.jobs.push(o),this[UD]()}[UD](){if(this.pending!==this.concurrency&&this.jobs.length){let o=this.jobs.shift();this.pending++,o(this[IT])}}};PT.exports=bT});var $y=tt((eq,UT)=>{"use strict";var Jy=require("zlib"),jT=Qy(),wI=BT(),{kStatusCode:zT,NOOP:SI}=eh(),TI=Buffer.from([0,0,255,255]),Y_=Symbol("permessage-deflate"),K1=Symbol("total-length"),Zy=Symbol("callback"),p2=Symbol("buffers"),jD=Symbol("error"),K_,HT=class{constructor(o,a,p){if(this._maxPayload=p|0,this._options=o||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!a,this._deflate=null,this._inflate=null,this.params=null,!K_){let _=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;K_=new wI(_)}}static get extensionName(){return"permessage-deflate"}offer(){let o={};return this._options.serverNoContextTakeover&&(o.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(o.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(o.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?o.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(o.client_max_window_bits=!0),o}accept(o){return o=this.normalizeParams(o),this.params=this._isServer?this.acceptAsServer(o):this.acceptAsClient(o),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let o=this._deflate[Zy];this._deflate.close(),this._deflate=null,o&&o(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(o){let a=this._options,p=o.find(_=>!(a.serverNoContextTakeover===!1&&_.server_no_context_takeover||_.server_max_window_bits&&(a.serverMaxWindowBits===!1||typeof a.serverMaxWindowBits=="number"&&a.serverMaxWindowBits>_.server_max_window_bits)||typeof a.clientMaxWindowBits=="number"&&!_.client_max_window_bits));if(!p)throw new Error("None of the extension offers can be accepted");return a.serverNoContextTakeover&&(p.server_no_context_takeover=!0),a.clientNoContextTakeover&&(p.client_no_context_takeover=!0),typeof a.serverMaxWindowBits=="number"&&(p.server_max_window_bits=a.serverMaxWindowBits),typeof a.clientMaxWindowBits=="number"?p.client_max_window_bits=a.clientMaxWindowBits:(p.client_max_window_bits===!0||a.clientMaxWindowBits===!1)&&delete p.client_max_window_bits,p}acceptAsClient(o){let a=o[0];if(this._options.clientNoContextTakeover===!1&&a.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!a.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(a.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&a.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return a}normalizeParams(o){return o.forEach(a=>{Object.keys(a).forEach(p=>{let _=a[p];if(_.length>1)throw new Error(`Parameter "${p}" must have only a single value`);if(_=_[0],p==="client_max_window_bits"){if(_!==!0){let t=+_;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${p}": ${_}`);_=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${p}": ${_}`)}else if(p==="server_max_window_bits"){let t=+_;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${p}": ${_}`);_=t}else if(p==="client_no_context_takeover"||p==="server_no_context_takeover"){if(_!==!0)throw new TypeError(`Invalid value for parameter "${p}": ${_}`)}else throw new Error(`Unknown parameter "${p}"`);a[p]=_})}),o}decompress(o,a,p){K_.add(_=>{this._decompress(o,a,(t,k)=>{_(),p(t,k)})})}compress(o,a,p){K_.add(_=>{this._compress(o,a,(t,k)=>{_(),p(t,k)})})}_decompress(o,a,p){let _=this._isServer?"client":"server";if(!this._inflate){let t=`${_}_max_window_bits`,k=typeof this.params[t]!="number"?Jy.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=Jy.createInflateRaw(Zr(Ht({},this._options.zlibInflateOptions),{windowBits:k})),this._inflate[Y_]=this,this._inflate[K1]=0,this._inflate[p2]=[],this._inflate.on("error",xI),this._inflate.on("data",qT)}this._inflate[Zy]=p,this._inflate.write(o),a&&this._inflate.write(TI),this._inflate.flush(()=>{let t=this._inflate[jD];if(t){this._inflate.close(),this._inflate=null,p(t);return}let k=jT.concat(this._inflate[p2],this._inflate[K1]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[K1]=0,this._inflate[p2]=[],a&&this.params[`${_}_no_context_takeover`]&&this._inflate.reset()),p(null,k)})}_compress(o,a,p){let _=this._isServer?"server":"client";if(!this._deflate){let t=`${_}_max_window_bits`,k=typeof this.params[t]!="number"?Jy.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=Jy.createDeflateRaw(Zr(Ht({},this._options.zlibDeflateOptions),{windowBits:k})),this._deflate[K1]=0,this._deflate[p2]=[],this._deflate.on("error",SI),this._deflate.on("data",CI)}this._deflate[Zy]=p,this._deflate.write(o),this._deflate.flush(Jy.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let t=jT.concat(this._deflate[p2],this._deflate[K1]);a&&(t=t.slice(0,t.length-4)),this._deflate[Zy]=null,this._deflate[K1]=0,this._deflate[p2]=[],a&&this.params[`${_}_no_context_takeover`]&&this._deflate.reset(),p(null,t)})}};UT.exports=HT;function CI(i){this[p2].push(i),this[K1]+=i.length}function qT(i){if(this[K1]+=i.length,this[Y_]._maxPayload<1||this[K1]<=this[Y_]._maxPayload){this[p2].push(i);return}this[jD]=new RangeError("Max payload size exceeded"),this[jD][zT]=1009,this.removeListener("data",qT),this.reset()}function xI(i){this[Y_]._inflate=null,i[zT]=1007,this[Zy](i)}});var HD=tt((tq,zD)=>{"use strict";function WT(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function VT(i){let o=i.length,a=0;for(;a=o||(i[a+1]&192)!=128||(i[a+2]&192)!=128||i[a]===224&&(i[a+1]&224)==128||i[a]===237&&(i[a+1]&224)==160)return!1;a+=3}else if((i[a]&248)==240){if(a+3>=o||(i[a+1]&192)!=128||(i[a+2]&192)!=128||(i[a+3]&192)!=128||i[a]===240&&(i[a+1]&240)==128||i[a]===244&&i[a+1]>143||i[a]>244)return!1;a+=4}else return!1;return!0}try{let i=require("utf-8-validate");typeof i=="object"&&(i=i.Validation.isValidUTF8),zD.exports={isValidStatusCode:WT,isValidUTF8(o){return o.length<150?VT(o):i(o)}}}catch(i){zD.exports={isValidStatusCode:WT,isValidUTF8:VT}}});var VD=tt((nq,GT)=>{"use strict";var{Writable:RI}=require("stream"),YT=$y(),{BINARY_TYPES:AI,EMPTY_BUFFER:OI,kStatusCode:MI,kWebSocket:kI}=eh(),{concat:qD,toArrayBuffer:NI,unmask:LI}=Qy(),{isValidStatusCode:FI,isValidUTF8:KT}=HD(),eg=0,XT=1,QT=2,JT=3,WD=4,PI=5,ZT=class extends RI{constructor(o,a,p,_){super();this._binaryType=o||AI[0],this[kI]=void 0,this._extensions=a||{},this._isServer=!!p,this._maxPayload=_|0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=eg,this._loop=!1}_write(o,a,p){if(this._opcode===8&&this._state==eg)return p();this._bufferedBytes+=o.length,this._buffers.push(o),this.startLoop(p)}consume(o){if(this._bufferedBytes-=o,o===this._buffers[0].length)return this._buffers.shift();if(o=p.length?a.set(this._buffers.shift(),_):(a.set(new Uint8Array(p.buffer,p.byteOffset,o),_),this._buffers[0]=p.slice(o)),o-=p.length}while(o>0);return a}startLoop(o){let a;this._loop=!0;do switch(this._state){case eg:a=this.getInfo();break;case XT:a=this.getPayloadLength16();break;case QT:a=this.getPayloadLength64();break;case JT:this.getMask();break;case WD:a=this.getData(o);break;default:this._loop=!1;return}while(this._loop);o(a)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!=0)return this._loop=!1,Yo(RangeError,"RSV2 and RSV3 must be clear",!0,1002);let a=(o[0]&64)==64;if(a&&!this._extensions[YT.extensionName])return this._loop=!1,Yo(RangeError,"RSV1 must be clear",!0,1002);if(this._fin=(o[0]&128)==128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(a)return this._loop=!1,Yo(RangeError,"RSV1 must be clear",!0,1002);if(!this._fragmented)return this._loop=!1,Yo(RangeError,"invalid opcode 0",!0,1002);this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,Yo(RangeError,`invalid opcode ${this._opcode}`,!0,1002);this._compressed=a}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,Yo(RangeError,"FIN must be set",!0,1002);if(a)return this._loop=!1,Yo(RangeError,"RSV1 must be clear",!0,1002);if(this._payloadLength>125)return this._loop=!1,Yo(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002)}else return this._loop=!1,Yo(RangeError,`invalid opcode ${this._opcode}`,!0,1002);if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)==128,this._isServer){if(!this._masked)return this._loop=!1,Yo(RangeError,"MASK must be set",!0,1002)}else if(this._masked)return this._loop=!1,Yo(RangeError,"MASK must be clear",!0,1002);if(this._payloadLength===126)this._state=XT;else if(this._payloadLength===127)this._state=QT;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),a=o.readUInt32BE(0);return a>Math.pow(2,53-32)-1?(this._loop=!1,Yo(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009)):(this._payloadLength=a*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Yo(RangeError,"Max payload size exceeded",!1,1009);this._masked?this._state=JT:this._state=WD}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=WD}getData(o){let a=OI;if(this._payloadLength){if(this._bufferedBytes7)return this.controlMessage(a);if(this._compressed){this._state=PI,this.decompress(a,o);return}return a.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(a)),this.dataMessage()}decompress(o,a){this._extensions[YT.extensionName].decompress(o,this._fin,(_,t)=>{if(_)return a(_);if(t.length){if(this._messageLength+=t.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return a(Yo(RangeError,"Max payload size exceeded",!1,1009));this._fragments.push(t)}let k=this.dataMessage();if(k)return a(k);this.startLoop(a)})}dataMessage(){if(this._fin){let o=this._messageLength,a=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let p;this._binaryType==="nodebuffer"?p=qD(a,o):this._binaryType==="arraybuffer"?p=NI(qD(a,o)):p=a,this.emit("message",p)}else{let p=qD(a,o);if(!KT(p))return this._loop=!1,Yo(Error,"invalid UTF-8 sequence",!0,1007);this.emit("message",p.toString())}}this._state=eg}controlMessage(o){if(this._opcode===8)if(this._loop=!1,o.length===0)this.emit("conclude",1005,""),this.end();else{if(o.length===1)return Yo(RangeError,"invalid payload length 1",!0,1002);{let a=o.readUInt16BE(0);if(!FI(a))return Yo(RangeError,`invalid status code ${a}`,!0,1002);let p=o.slice(2);if(!KT(p))return Yo(Error,"invalid UTF-8 sequence",!0,1007);this.emit("conclude",a,p.toString()),this.end()}}else this._opcode===9?this.emit("ping",o):this.emit("pong",o);this._state=eg}};GT.exports=ZT;function Yo(i,o,a,p){let _=new i(a?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(_,Yo),_[MI]=p,_}});var GD=tt((rq,$T)=>{"use strict";var{randomFillSync:II}=require("crypto"),eC=$y(),{EMPTY_BUFFER:bI}=eh(),{isValidStatusCode:BI}=HD(),{mask:tC,toBuffer:X1}=Qy(),th=Buffer.alloc(4),Q1=class{constructor(o,a){this._extensions=a||{},this._socket=o,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(o,a){let p=a.mask&&a.readOnly,_=a.mask?6:2,t=o.length;o.length>=65536?(_+=8,t=127):o.length>125&&(_+=2,t=126);let k=Buffer.allocUnsafe(p?o.length+_:_);return k[0]=a.fin?a.opcode|128:a.opcode,a.rsv1&&(k[0]|=64),k[1]=t,t===126?k.writeUInt16BE(o.length,2):t===127&&(k.writeUInt32BE(0,2),k.writeUInt32BE(o.length,6)),a.mask?(II(th,0,4),k[1]|=128,k[_-4]=th[0],k[_-3]=th[1],k[_-2]=th[2],k[_-1]=th[3],p?(tC(o,th,k,_,o.length),[k]):(tC(o,th,o,0,o.length),[k,o])):[k,o]}close(o,a,p,_){let t;if(o===void 0)t=bI;else{if(typeof o!="number"||!BI(o))throw new TypeError("First argument must be a valid error code number");if(a===void 0||a==="")t=Buffer.allocUnsafe(2),t.writeUInt16BE(o,0);else{let k=Buffer.byteLength(a);if(k>123)throw new RangeError("The message must not be greater than 123 bytes");t=Buffer.allocUnsafe(2+k),t.writeUInt16BE(o,0),t.write(a,2)}}this._deflating?this.enqueue([this.doClose,t,p,_]):this.doClose(t,p,_)}doClose(o,a,p){this.sendFrame(Q1.frame(o,{fin:!0,rsv1:!1,opcode:8,mask:a,readOnly:!1}),p)}ping(o,a,p){let _=X1(o);if(_.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,_,a,X1.readOnly,p]):this.doPing(_,a,X1.readOnly,p)}doPing(o,a,p,_){this.sendFrame(Q1.frame(o,{fin:!0,rsv1:!1,opcode:9,mask:a,readOnly:p}),_)}pong(o,a,p){let _=X1(o);if(_.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,_,a,X1.readOnly,p]):this.doPong(_,a,X1.readOnly,p)}doPong(o,a,p,_){this.sendFrame(Q1.frame(o,{fin:!0,rsv1:!1,opcode:10,mask:a,readOnly:p}),_)}send(o,a,p){let _=X1(o),t=this._extensions[eC.extensionName],k=a.binary?2:1,L=a.compress;if(this._firstFragment?(this._firstFragment=!1,L&&t&&(L=_.length>=t._threshold),this._compress=L):(L=!1,k=0),a.fin&&(this._firstFragment=!0),t){let O={fin:a.fin,rsv1:L,opcode:k,mask:a.mask,readOnly:X1.readOnly};this._deflating?this.enqueue([this.dispatch,_,this._compress,O,p]):this.dispatch(_,this._compress,O,p)}else this.sendFrame(Q1.frame(_,{fin:a.fin,rsv1:!1,opcode:k,mask:a.mask,readOnly:X1.readOnly}),p)}dispatch(o,a,p,_){if(!a){this.sendFrame(Q1.frame(o,p),_);return}let t=this._extensions[eC.extensionName];this._bufferedBytes+=o.length,this._deflating=!0,t.compress(o,p.fin,(k,L)=>{if(this._socket.destroyed){let O=new Error("The socket was closed while data was being compressed");typeof _=="function"&&_(O);for(let C=0;C{"use strict";var tg=class{constructor(o,a){this.target=a,this.type=o}},rC=class extends tg{constructor(o,a){super("message",a);this.data=o}},iC=class extends tg{constructor(o,a,p){super("close",p);this.wasClean=p._closeFrameReceived&&p._closeFrameSent,this.reason=a,this.code=o}},uC=class extends tg{constructor(o){super("open",o)}},oC=class extends tg{constructor(o,a){super("error",a);this.message=o.message,this.error=o}},UI={addEventListener(i,o,a){if(typeof o!="function")return;function p(O){o.call(this,new rC(O,this))}function _(O,C){o.call(this,new iC(O,C,this))}function t(O){o.call(this,new oC(O,this))}function k(){o.call(this,new uC(this))}let L=a&&a.once?"once":"on";i==="message"?(p._listener=o,this[L](i,p)):i==="close"?(_._listener=o,this[L](i,_)):i==="error"?(t._listener=o,this[L](i,t)):i==="open"?(k._listener=o,this[L](i,k)):this[L](i,o)},removeEventListener(i,o){let a=this.listeners(i);for(let p=0;p{"use strict";var ng=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function jc(i,o,a){i[o]===void 0?i[o]=[a]:i[o].push(a)}function jI(i){let o=Object.create(null);if(i===void 0||i==="")return o;let a=Object.create(null),p=!1,_=!1,t=!1,k,L,O=-1,C=-1,U=0;for(;U{let a=i[o];return Array.isArray(a)||(a=[a]),a.map(p=>[o].concat(Object.keys(p).map(_=>{let t=p[_];return Array.isArray(t)||(t=[t]),t.map(k=>k===!0?_:`${_}=${k}`).join("; ")})).join("; ")).join(", ")}).join(", ")}sC.exports={format:zI,parse:jI}});var ZD=tt((oq,aC)=>{"use strict";var HI=require("events"),qI=require("https"),WI=require("http"),fC=require("net"),VI=require("tls"),{randomBytes:GI,createHash:YI}=require("crypto"),{URL:KD}=require("url"),h2=$y(),KI=VD(),XI=GD(),{BINARY_TYPES:cC,EMPTY_BUFFER:XD,GUID:QI,kStatusCode:JI,kWebSocket:ta,NOOP:dC}=eh(),{addEventListener:ZI,removeEventListener:$I}=lC(),{format:eb,parse:tb}=YD(),{toBuffer:nb}=Qy(),pC=["CONNECTING","OPEN","CLOSING","CLOSED"],QD=[8,13],rb=30*1e3,Gi=class extends HI{constructor(o,a,p){super();this._binaryType=cC[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=Gi.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,o!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(a)?a=a.join(", "):typeof a=="object"&&a!==null&&(p=a,a=void 0),hC(this,o,a,p)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(o){!cC.includes(o)||(this._binaryType=o,this._receiver&&(this._receiver._binaryType=o))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(o,a,p){let _=new KI(this.binaryType,this._extensions,this._isServer,p);this._sender=new XI(o,this._extensions),this._receiver=_,this._socket=o,_[ta]=this,o[ta]=this,_.on("conclude",ib),_.on("drain",ub),_.on("error",ob),_.on("message",lb),_.on("ping",sb),_.on("pong",ab),o.setTimeout(0),o.setNoDelay(),a.length>0&&o.unshift(a),o.on("close",vC),o.on("data",X_),o.on("end",mC),o.on("error",yC),this._readyState=Gi.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=Gi.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[h2.extensionName]&&this._extensions[h2.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Gi.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(o,a){if(this.readyState!==Gi.CLOSED){if(this.readyState===Gi.CONNECTING){let p="WebSocket was closed before the connection was established";return J1(this,this._req,p)}if(this.readyState===Gi.CLOSING){this._closeFrameSent&&this._closeFrameReceived&&this._socket.end();return}this._readyState=Gi.CLOSING,this._sender.close(o,a,!this._isServer,p=>{p||(this._closeFrameSent=!0,this._closeFrameReceived&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),rb)}}ping(o,a,p){if(this.readyState===Gi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(p=o,o=a=void 0):typeof a=="function"&&(p=a,a=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Gi.OPEN){JD(this,o,p);return}a===void 0&&(a=!this._isServer),this._sender.ping(o||XD,a,p)}pong(o,a,p){if(this.readyState===Gi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(p=o,o=a=void 0):typeof a=="function"&&(p=a,a=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Gi.OPEN){JD(this,o,p);return}a===void 0&&(a=!this._isServer),this._sender.pong(o||XD,a,p)}send(o,a,p){if(this.readyState===Gi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof a=="function"&&(p=a,a={}),typeof o=="number"&&(o=o.toString()),this.readyState!==Gi.OPEN){JD(this,o,p);return}let _=Ht({binary:typeof o!="string",mask:!this._isServer,compress:!0,fin:!0},a);this._extensions[h2.extensionName]||(_.compress=!1),this._sender.send(o||XD,_,p)}terminate(){if(this.readyState!==Gi.CLOSED){if(this.readyState===Gi.CONNECTING){let o="WebSocket was closed before the connection was established";return J1(this,this._req,o)}this._socket&&(this._readyState=Gi.CLOSING,this._socket.destroy())}}};pC.forEach((i,o)=>{let a={enumerable:!0,value:o};Object.defineProperty(Gi.prototype,i,a),Object.defineProperty(Gi,i,a)});["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach(i=>{Object.defineProperty(Gi.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(Gi.prototype,`on${i}`,{configurable:!0,enumerable:!0,get(){let o=this.listeners(i);for(let a=0;a{J1(i,W,"Opening handshake has timed out")}),W.on("error",ne=>{W===null||W.aborted||(W=i._req=null,i._readyState=Gi.CLOSING,i.emit("error",ne),i.emitClose())}),W.on("response",ne=>{let m=ne.headers.location,he=ne.statusCode;if(m&&_.followRedirects&&he>=300&&he<400){if(++i._redirects>_.maxRedirects){J1(i,W,"Maximum redirects exceeded");return}W.abort();let Ee=new KD(m,o);hC(i,Ee,a,p)}else i.emit("unexpected-response",W,ne)||J1(i,W,`Unexpected server response: ${ne.statusCode}`)}),W.on("upgrade",(ne,m,he)=>{if(i.emit("upgrade",ne),i.readyState!==Gi.CONNECTING)return;W=i._req=null;let Ee=YI("sha1").update(C+QI).digest("base64");if(ne.headers["sec-websocket-accept"]!==Ee){J1(i,m,"Invalid Sec-WebSocket-Accept header");return}let ve=ne.headers["sec-websocket-protocol"],se=(a||"").split(/, */),De;if(!a&&ve?De="Server sent a subprotocol but none was requested":a&&!ve?De="Server sent no subprotocol":ve&&!se.includes(ve)&&(De="Server sent an invalid subprotocol"),De){J1(i,m,De);return}if(ve&&(i._protocol=ve),H)try{let pe=tb(ne.headers["sec-websocket-extensions"]);pe[h2.extensionName]&&(H.accept(pe[h2.extensionName]),i._extensions[h2.extensionName]=H)}catch(pe){J1(i,m,"Invalid Sec-WebSocket-Extensions header");return}i.setSocket(m,he,_.maxPayload)})}function fb(i){return i.path=i.socketPath,fC.connect(i)}function cb(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=fC.isIP(i.host)?"":i.host),VI.connect(i)}function J1(i,o,a){i._readyState=Gi.CLOSING;let p=new Error(a);Error.captureStackTrace(p,J1),o.setHeader?(o.abort(),o.socket&&!o.socket.destroyed&&o.socket.destroy(),o.once("abort",i.emitClose.bind(i)),i.emit("error",p)):(o.destroy(p),o.once("error",i.emit.bind(i,"error")),o.once("close",i.emitClose.bind(i)))}function JD(i,o,a){if(o){let p=nb(o).length;i._socket?i._sender._bufferedBytes+=p:i._bufferedAmount+=p}if(a){let p=new Error(`WebSocket is not open: readyState ${i.readyState} (${pC[i.readyState]})`);a(p)}}function ib(i,o){let a=this[ta];a._socket.removeListener("data",X_),a._socket.resume(),a._closeFrameReceived=!0,a._closeMessage=o,a._closeCode=i,i===1005?a.close():a.close(i,o)}function ub(){this[ta]._socket.resume()}function ob(i){let o=this[ta];o._socket.removeListener("data",X_),o._readyState=Gi.CLOSING,o._closeCode=i[JI],o.emit("error",i),o._socket.destroy()}function gC(){this[ta].emitClose()}function lb(i){this[ta].emit("message",i)}function sb(i){let o=this[ta];o.pong(i,!o._isServer,dC),o.emit("ping",i)}function ab(i){this[ta].emit("pong",i)}function vC(){let i=this[ta];this.removeListener("close",vC),this.removeListener("end",mC),i._readyState=Gi.CLOSING,i._socket.read(),i._receiver.end(),this.removeListener("data",X_),this[ta]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",gC),i._receiver.on("finish",gC))}function X_(i){this[ta]._receiver.write(i)||this.pause()}function mC(){let i=this[ta];i._readyState=Gi.CLOSING,i._receiver.end(),this.end()}function yC(){let i=this[ta];this.removeListener("error",yC),this.on("error",dC),i&&(i._readyState=Gi.CLOSING,this.destroy())}});var wC=tt((lq,_C)=>{"use strict";var{Duplex:db}=require("stream");function EC(i){i.emit("close")}function pb(){!this.destroyed&&this._writableState.finished&&this.destroy()}function DC(i){this.removeListener("error",DC),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function hb(i,o){let a=!0;function p(){a&&i._socket.resume()}i.readyState===i.CONNECTING?i.once("open",function(){i._receiver.removeAllListeners("drain"),i._receiver.on("drain",p)}):(i._receiver.removeAllListeners("drain"),i._receiver.on("drain",p));let _=new db(Zr(Ht({},o),{autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1}));return i.on("message",function(k){_.push(k)||(a=!1,i._socket.pause())}),i.once("error",function(k){_.destroyed||_.destroy(k)}),i.once("close",function(){_.destroyed||_.push(null)}),_._destroy=function(t,k){if(i.readyState===i.CLOSED){k(t),process.nextTick(EC,_);return}let L=!1;i.once("error",function(C){L=!0,k(C)}),i.once("close",function(){L||k(t),process.nextTick(EC,_)}),i.terminate()},_._final=function(t){if(i.readyState===i.CONNECTING){i.once("open",function(){_._final(t)});return}i._socket!==null&&(i._socket._writableState.finished?(t(),_._readableState.endEmitted&&_.destroy()):(i._socket.once("finish",function(){t()}),i.close()))},_._read=function(){i.readyState===i.OPEN&&!a&&(a=!0,i._receiver._writableState.needDrain||i._socket.resume())},_._write=function(t,k,L){if(i.readyState===i.CONNECTING){i.once("open",function(){_._write(t,k,L)});return}i.send(t,L)},_.on("end",pb),_.on("error",DC),_}_C.exports=hb});var CC=tt((sq,SC)=>{"use strict";var vb=require("events"),{createHash:mb}=require("crypto"),{createServer:yb,STATUS_CODES:$D}=require("http"),nh=$y(),gb=ZD(),{format:_b,parse:Eb}=YD(),{GUID:Db,kWebSocket:wb}=eh(),Sb=/^[+/0-9A-Za-z]{22}==$/,TC=class extends vb{constructor(o,a){super();if(o=Ht({maxPayload:100*1024*1024,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null},o),o.port==null&&!o.server&&!o.noServer)throw new TypeError('One of the "port", "server", or "noServer" options must be specified');if(o.port!=null?(this._server=yb((p,_)=>{let t=$D[426];_.writeHead(426,{"Content-Length":t.length,"Content-Type":"text/plain"}),_.end(t)}),this._server.listen(o.port,o.host,o.backlog,a)):o.server&&(this._server=o.server),this._server){let p=this.emit.bind(this,"connection");this._removeListeners=Tb(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(_,t,k)=>{this.handleUpgrade(_,t,k,p)}})}o.perMessageDeflate===!0&&(o.perMessageDeflate={}),o.clientTracking&&(this.clients=new Set),this.options=o}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(o){if(o&&this.once("close",o),this.clients)for(let p of this.clients)p.terminate();let a=this._server;if(a&&(this._removeListeners(),this._removeListeners=this._server=null,this.options.port!=null)){a.close(()=>this.emit("close"));return}process.nextTick(Cb,this)}shouldHandle(o){if(this.options.path){let a=o.url.indexOf("?");if((a!==-1?o.url.slice(0,a):o.url)!==this.options.path)return!1}return!0}handleUpgrade(o,a,p,_){a.on("error",e3);let t=o.headers["sec-websocket-key"]!==void 0?o.headers["sec-websocket-key"].trim():!1,k=+o.headers["sec-websocket-version"],L={};if(o.method!=="GET"||o.headers.upgrade.toLowerCase()!=="websocket"||!t||!Sb.test(t)||k!==8&&k!==13||!this.shouldHandle(o))return Q_(a,400);if(this.options.perMessageDeflate){let O=new nh(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let C=Eb(o.headers["sec-websocket-extensions"]);C[nh.extensionName]&&(O.accept(C[nh.extensionName]),L[nh.extensionName]=O)}catch(C){return Q_(a,400)}}if(this.options.verifyClient){let O={origin:o.headers[`${k===8?"sec-websocket-origin":"origin"}`],secure:!!(o.socket.authorized||o.socket.encrypted),req:o};if(this.options.verifyClient.length===2){this.options.verifyClient(O,(C,U,H,W)=>{if(!C)return Q_(a,U||401,H,W);this.completeUpgrade(t,L,o,a,p,_)});return}if(!this.options.verifyClient(O))return Q_(a,401)}this.completeUpgrade(t,L,o,a,p,_)}completeUpgrade(o,a,p,_,t,k){if(!_.readable||!_.writable)return _.destroy();if(_[wb])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");let L=mb("sha1").update(o+Db).digest("base64"),O=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${L}`],C=new gb(null),U=p.headers["sec-websocket-protocol"];if(U&&(U=U.split(",").map(xb),this.options.handleProtocols?U=this.options.handleProtocols(U,p):U=U[0],U&&(O.push(`Sec-WebSocket-Protocol: ${U}`),C._protocol=U)),a[nh.extensionName]){let H=a[nh.extensionName].params,W=_b({[nh.extensionName]:[H]});O.push(`Sec-WebSocket-Extensions: ${W}`),C._extensions=a}this.emit("headers",O,p),_.write(O.concat(`\r -`).join(`\r -`)),_.removeListener("error",e3),C.setSocket(_,t,this.options.maxPayload),this.clients&&(this.clients.add(C),C.on("close",()=>this.clients.delete(C))),k(C,p)}};SC.exports=TC;function Tb(i,o){for(let a of Object.keys(o))i.on(a,o[a]);return function(){for(let p of Object.keys(o))i.removeListener(p,o[p])}}function Cb(i){i.emit("close")}function e3(){this.destroy()}function Q_(i,o,a,p){i.writable&&(a=a||$D[o],p=Ht({Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(a)},p),i.write(`HTTP/1.1 ${o} ${$D[o]}\r -`+Object.keys(p).map(_=>`${_}: ${p[_]}`).join(`\r -`)+`\r -\r -`+a)),i.removeListener("error",e3),i.destroy()}function xb(i){return i.trim()}});var RC=tt((aq,xC)=>{"use strict";var rg=ZD();rg.createWebSocketStream=wC();rg.Server=CC();rg.Receiver=VD();rg.Sender=GD();xC.exports=rg});var AC=tt(J_=>{"use strict";var Rb=J_&&J_.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(J_,"__esModule",{value:!0});var Ab=Rb(RC()),ig=global;ig.WebSocket||(ig.WebSocket=Ab.default);ig.window||(ig.window=global);ig.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}]});var OC=tt((Z_,t3)=>{(function(i,o){typeof Z_=="object"&&typeof t3=="object"?t3.exports=o():typeof define=="function"&&define.amd?define([],o):typeof Z_=="object"?Z_.ReactDevToolsBackend=o():i.ReactDevToolsBackend=o()})(window,function(){return function(i){var o={};function a(p){if(o[p])return o[p].exports;var _=o[p]={i:p,l:!1,exports:{}};return i[p].call(_.exports,_,_.exports,a),_.l=!0,_.exports}return a.m=i,a.c=o,a.d=function(p,_,t){a.o(p,_)||Object.defineProperty(p,_,{enumerable:!0,get:t})},a.r=function(p){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},a.t=function(p,_){if(1&_&&(p=a(p)),8&_||4&_&&typeof p=="object"&&p&&p.__esModule)return p;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:p}),2&_&&typeof p!="string")for(var k in p)a.d(t,k,function(L){return p[L]}.bind(null,k));return t},a.n=function(p){var _=p&&p.__esModule?function(){return p.default}:function(){return p};return a.d(_,"a",_),_},a.o=function(p,_){return Object.prototype.hasOwnProperty.call(p,_)},a.p="",a(a.s=20)}([function(i,o,a){"use strict";i.exports=a(12)},function(i,o,a){"use strict";var p=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function k(L){if(L==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(L)}i.exports=function(){try{if(!Object.assign)return!1;var L=new String("abc");if(L[5]="de",Object.getOwnPropertyNames(L)[0]==="5")return!1;for(var O={},C=0;C<10;C++)O["_"+String.fromCharCode(C)]=C;if(Object.getOwnPropertyNames(O).map(function(H){return O[H]}).join("")!=="0123456789")return!1;var U={};return"abcdefghijklmnopqrst".split("").forEach(function(H){U[H]=H}),Object.keys(Object.assign({},U)).join("")==="abcdefghijklmnopqrst"}catch(H){return!1}}()?Object.assign:function(L,O){for(var C,U,H=k(L),W=1;W=ie||nn<0||Jt&&Rt-We>=yt}function oe(){var Rt=Ee();if(xe(Rt))return ze(Rt);Xe=setTimeout(oe,function(nn){var an=ie-(nn-ut);return Jt?he(an,yt-(nn-We)):an}(Rt))}function ze(Rt){return Xe=void 0,rt&&je?Q(Rt):(je=qe=void 0,gt)}function ct(){var Rt=Ee(),nn=xe(Rt);if(je=arguments,qe=this,ut=Rt,nn){if(Xe===void 0)return fe(ut);if(Jt)return Xe=setTimeout(oe,ie),Q(ut)}return Xe===void 0&&(Xe=setTimeout(oe,ie)),gt}return ie=pe(ie)||0,se(Oe)&&(Ft=!!Oe.leading,yt=(Jt="maxWait"in Oe)?m(pe(Oe.maxWait)||0,ie):yt,rt="trailing"in Oe?!!Oe.trailing:rt),ct.cancel=function(){Xe!==void 0&&clearTimeout(Xe),We=0,je=ut=qe=Xe=void 0},ct.flush=function(){return Xe===void 0?gt:ze(Ee())},ct}function se(me){var ie=_(me);return!!me&&(ie=="object"||ie=="function")}function De(me){return _(me)=="symbol"||function(ie){return!!ie&&_(ie)=="object"}(me)&&ne.call(me)=="[object Symbol]"}function pe(me){if(typeof me=="number")return me;if(De(me))return NaN;if(se(me)){var ie=typeof me.valueOf=="function"?me.valueOf():me;me=se(ie)?ie+"":ie}if(typeof me!="string")return me===0?me:+me;me=me.replace(t,"");var Oe=L.test(me);return Oe||O.test(me)?C(me.slice(2),Oe?2:8):k.test(me)?NaN:+me}i.exports=function(me,ie,Oe){var je=!0,qe=!0;if(typeof me!="function")throw new TypeError("Expected a function");return se(Oe)&&(je="leading"in Oe?!!Oe.leading:je,qe="trailing"in Oe?!!Oe.trailing:qe),ve(me,ie,{leading:je,maxWait:ie,trailing:qe})}}).call(this,a(4))},function(i,o,a){(function(p){function _(Q){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(fe){return typeof fe}:function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe})(Q)}var t;o=i.exports=m,t=(p===void 0?"undefined":_(p))==="object"&&p.env&&p.env.NODE_DEBUG&&/\bsemver\b/i.test(p.env.NODE_DEBUG)?function(){var Q=Array.prototype.slice.call(arguments,0);Q.unshift("SEMVER"),console.log.apply(console,Q)}:function(){},o.SEMVER_SPEC_VERSION="2.0.0";var k=Number.MAX_SAFE_INTEGER||9007199254740991,L=o.re=[],O=o.src=[],C=o.tokens={},U=0;function H(Q){C[Q]=U++}H("NUMERICIDENTIFIER"),O[C.NUMERICIDENTIFIER]="0|[1-9]\\d*",H("NUMERICIDENTIFIERLOOSE"),O[C.NUMERICIDENTIFIERLOOSE]="[0-9]+",H("NONNUMERICIDENTIFIER"),O[C.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",H("MAINVERSION"),O[C.MAINVERSION]="("+O[C.NUMERICIDENTIFIER]+")\\.("+O[C.NUMERICIDENTIFIER]+")\\.("+O[C.NUMERICIDENTIFIER]+")",H("MAINVERSIONLOOSE"),O[C.MAINVERSIONLOOSE]="("+O[C.NUMERICIDENTIFIERLOOSE]+")\\.("+O[C.NUMERICIDENTIFIERLOOSE]+")\\.("+O[C.NUMERICIDENTIFIERLOOSE]+")",H("PRERELEASEIDENTIFIER"),O[C.PRERELEASEIDENTIFIER]="(?:"+O[C.NUMERICIDENTIFIER]+"|"+O[C.NONNUMERICIDENTIFIER]+")",H("PRERELEASEIDENTIFIERLOOSE"),O[C.PRERELEASEIDENTIFIERLOOSE]="(?:"+O[C.NUMERICIDENTIFIERLOOSE]+"|"+O[C.NONNUMERICIDENTIFIER]+")",H("PRERELEASE"),O[C.PRERELEASE]="(?:-("+O[C.PRERELEASEIDENTIFIER]+"(?:\\."+O[C.PRERELEASEIDENTIFIER]+")*))",H("PRERELEASELOOSE"),O[C.PRERELEASELOOSE]="(?:-?("+O[C.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+O[C.PRERELEASEIDENTIFIERLOOSE]+")*))",H("BUILDIDENTIFIER"),O[C.BUILDIDENTIFIER]="[0-9A-Za-z-]+",H("BUILD"),O[C.BUILD]="(?:\\+("+O[C.BUILDIDENTIFIER]+"(?:\\."+O[C.BUILDIDENTIFIER]+")*))",H("FULL"),H("FULLPLAIN"),O[C.FULLPLAIN]="v?"+O[C.MAINVERSION]+O[C.PRERELEASE]+"?"+O[C.BUILD]+"?",O[C.FULL]="^"+O[C.FULLPLAIN]+"$",H("LOOSEPLAIN"),O[C.LOOSEPLAIN]="[v=\\s]*"+O[C.MAINVERSIONLOOSE]+O[C.PRERELEASELOOSE]+"?"+O[C.BUILD]+"?",H("LOOSE"),O[C.LOOSE]="^"+O[C.LOOSEPLAIN]+"$",H("GTLT"),O[C.GTLT]="((?:<|>)?=?)",H("XRANGEIDENTIFIERLOOSE"),O[C.XRANGEIDENTIFIERLOOSE]=O[C.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",H("XRANGEIDENTIFIER"),O[C.XRANGEIDENTIFIER]=O[C.NUMERICIDENTIFIER]+"|x|X|\\*",H("XRANGEPLAIN"),O[C.XRANGEPLAIN]="[v=\\s]*("+O[C.XRANGEIDENTIFIER]+")(?:\\.("+O[C.XRANGEIDENTIFIER]+")(?:\\.("+O[C.XRANGEIDENTIFIER]+")(?:"+O[C.PRERELEASE]+")?"+O[C.BUILD]+"?)?)?",H("XRANGEPLAINLOOSE"),O[C.XRANGEPLAINLOOSE]="[v=\\s]*("+O[C.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+O[C.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+O[C.XRANGEIDENTIFIERLOOSE]+")(?:"+O[C.PRERELEASELOOSE]+")?"+O[C.BUILD]+"?)?)?",H("XRANGE"),O[C.XRANGE]="^"+O[C.GTLT]+"\\s*"+O[C.XRANGEPLAIN]+"$",H("XRANGELOOSE"),O[C.XRANGELOOSE]="^"+O[C.GTLT]+"\\s*"+O[C.XRANGEPLAINLOOSE]+"$",H("COERCE"),O[C.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",H("COERCERTL"),L[C.COERCERTL]=new RegExp(O[C.COERCE],"g"),H("LONETILDE"),O[C.LONETILDE]="(?:~>?)",H("TILDETRIM"),O[C.TILDETRIM]="(\\s*)"+O[C.LONETILDE]+"\\s+",L[C.TILDETRIM]=new RegExp(O[C.TILDETRIM],"g"),H("TILDE"),O[C.TILDE]="^"+O[C.LONETILDE]+O[C.XRANGEPLAIN]+"$",H("TILDELOOSE"),O[C.TILDELOOSE]="^"+O[C.LONETILDE]+O[C.XRANGEPLAINLOOSE]+"$",H("LONECARET"),O[C.LONECARET]="(?:\\^)",H("CARETTRIM"),O[C.CARETTRIM]="(\\s*)"+O[C.LONECARET]+"\\s+",L[C.CARETTRIM]=new RegExp(O[C.CARETTRIM],"g"),H("CARET"),O[C.CARET]="^"+O[C.LONECARET]+O[C.XRANGEPLAIN]+"$",H("CARETLOOSE"),O[C.CARETLOOSE]="^"+O[C.LONECARET]+O[C.XRANGEPLAINLOOSE]+"$",H("COMPARATORLOOSE"),O[C.COMPARATORLOOSE]="^"+O[C.GTLT]+"\\s*("+O[C.LOOSEPLAIN]+")$|^$",H("COMPARATOR"),O[C.COMPARATOR]="^"+O[C.GTLT]+"\\s*("+O[C.FULLPLAIN]+")$|^$",H("COMPARATORTRIM"),O[C.COMPARATORTRIM]="(\\s*)"+O[C.GTLT]+"\\s*("+O[C.LOOSEPLAIN]+"|"+O[C.XRANGEPLAIN]+")",L[C.COMPARATORTRIM]=new RegExp(O[C.COMPARATORTRIM],"g"),H("HYPHENRANGE"),O[C.HYPHENRANGE]="^\\s*("+O[C.XRANGEPLAIN]+")\\s+-\\s+("+O[C.XRANGEPLAIN]+")\\s*$",H("HYPHENRANGELOOSE"),O[C.HYPHENRANGELOOSE]="^\\s*("+O[C.XRANGEPLAINLOOSE]+")\\s+-\\s+("+O[C.XRANGEPLAINLOOSE]+")\\s*$",H("STAR"),O[C.STAR]="(<|>)?=?\\s*\\*";for(var W=0;W256||!(fe.loose?L[C.LOOSE]:L[C.FULL]).test(Q))return null;try{return new m(Q,fe)}catch(xe){return null}}function m(Q,fe){if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),Q instanceof m){if(Q.loose===fe.loose)return Q;Q=Q.version}else if(typeof Q!="string")throw new TypeError("Invalid Version: "+Q);if(Q.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof m))return new m(Q,fe);t("SemVer",Q,fe),this.options=fe,this.loose=!!fe.loose;var xe=Q.trim().match(fe.loose?L[C.LOOSE]:L[C.FULL]);if(!xe)throw new TypeError("Invalid Version: "+Q);if(this.raw=Q,this.major=+xe[1],this.minor=+xe[2],this.patch=+xe[3],this.major>k||this.major<0)throw new TypeError("Invalid major version");if(this.minor>k||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>k||this.patch<0)throw new TypeError("Invalid patch version");xe[4]?this.prerelease=xe[4].split(".").map(function(oe){if(/^[0-9]+$/.test(oe)){var ze=+oe;if(ze>=0&&ze=0;)typeof this.prerelease[xe]=="number"&&(this.prerelease[xe]++,xe=-2);xe===-1&&this.prerelease.push(0)}fe&&(this.prerelease[0]===fe?isNaN(this.prerelease[1])&&(this.prerelease=[fe,0]):this.prerelease=[fe,0]);break;default:throw new Error("invalid increment argument: "+Q)}return this.format(),this.raw=this.version,this},o.inc=function(Q,fe,xe,oe){typeof xe=="string"&&(oe=xe,xe=void 0);try{return new m(Q,xe).inc(fe,oe).version}catch(ze){return null}},o.diff=function(Q,fe){if(pe(Q,fe))return null;var xe=ne(Q),oe=ne(fe),ze="";if(xe.prerelease.length||oe.prerelease.length){ze="pre";var ct="prerelease"}for(var Rt in xe)if((Rt==="major"||Rt==="minor"||Rt==="patch")&&xe[Rt]!==oe[Rt])return ze+Rt;return ct},o.compareIdentifiers=Ee;var he=/^[0-9]+$/;function Ee(Q,fe){var xe=he.test(Q),oe=he.test(fe);return xe&&oe&&(Q=+Q,fe=+fe),Q===fe?0:xe&&!oe?-1:oe&&!xe?1:Q0}function De(Q,fe,xe){return ve(Q,fe,xe)<0}function pe(Q,fe,xe){return ve(Q,fe,xe)===0}function me(Q,fe,xe){return ve(Q,fe,xe)!==0}function ie(Q,fe,xe){return ve(Q,fe,xe)>=0}function Oe(Q,fe,xe){return ve(Q,fe,xe)<=0}function je(Q,fe,xe,oe){switch(fe){case"===":return _(Q)==="object"&&(Q=Q.version),_(xe)==="object"&&(xe=xe.version),Q===xe;case"!==":return _(Q)==="object"&&(Q=Q.version),_(xe)==="object"&&(xe=xe.version),Q!==xe;case"":case"=":case"==":return pe(Q,xe,oe);case"!=":return me(Q,xe,oe);case">":return se(Q,xe,oe);case">=":return ie(Q,xe,oe);case"<":return De(Q,xe,oe);case"<=":return Oe(Q,xe,oe);default:throw new TypeError("Invalid operator: "+fe)}}function qe(Q,fe){if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),Q instanceof qe){if(Q.loose===!!fe.loose)return Q;Q=Q.value}if(!(this instanceof qe))return new qe(Q,fe);t("comparator",Q,fe),this.options=fe,this.loose=!!fe.loose,this.parse(Q),this.semver===yt?this.value="":this.value=this.operator+this.semver.version,t("comp",this)}o.rcompareIdentifiers=function(Q,fe){return Ee(fe,Q)},o.major=function(Q,fe){return new m(Q,fe).major},o.minor=function(Q,fe){return new m(Q,fe).minor},o.patch=function(Q,fe){return new m(Q,fe).patch},o.compare=ve,o.compareLoose=function(Q,fe){return ve(Q,fe,!0)},o.compareBuild=function(Q,fe,xe){var oe=new m(Q,xe),ze=new m(fe,xe);return oe.compare(ze)||oe.compareBuild(ze)},o.rcompare=function(Q,fe,xe){return ve(fe,Q,xe)},o.sort=function(Q,fe){return Q.sort(function(xe,oe){return o.compareBuild(xe,oe,fe)})},o.rsort=function(Q,fe){return Q.sort(function(xe,oe){return o.compareBuild(oe,xe,fe)})},o.gt=se,o.lt=De,o.eq=pe,o.neq=me,o.gte=ie,o.lte=Oe,o.cmp=je,o.Comparator=qe;var yt={};function gt(Q,fe){if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),Q instanceof gt)return Q.loose===!!fe.loose&&Q.includePrerelease===!!fe.includePrerelease?Q:new gt(Q.raw,fe);if(Q instanceof qe)return new gt(Q.value,fe);if(!(this instanceof gt))return new gt(Q,fe);if(this.options=fe,this.loose=!!fe.loose,this.includePrerelease=!!fe.includePrerelease,this.raw=Q,this.set=Q.split(/\s*\|\|\s*/).map(function(xe){return this.parseRange(xe.trim())},this).filter(function(xe){return xe.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+Q);this.format()}function Xe(Q,fe){for(var xe=!0,oe=Q.slice(),ze=oe.pop();xe&&oe.length;)xe=oe.every(function(ct){return ze.intersects(ct,fe)}),ze=oe.pop();return xe}function ut(Q){return!Q||Q.toLowerCase()==="x"||Q==="*"}function We(Q,fe,xe,oe,ze,ct,Rt,nn,an,Mn,lr,ln,Vt){return((fe=ut(xe)?"":ut(oe)?">="+xe+".0.0":ut(ze)?">="+xe+"."+oe+".0":">="+fe)+" "+(nn=ut(an)?"":ut(Mn)?"<"+(+an+1)+".0.0":ut(lr)?"<"+an+"."+(+Mn+1)+".0":ln?"<="+an+"."+Mn+"."+lr+"-"+ln:"<="+nn)).trim()}function Ft(Q,fe,xe){for(var oe=0;oe0){var ze=Q[oe].semver;if(ze.major===fe.major&&ze.minor===fe.minor&&ze.patch===fe.patch)return!0}return!1}return!0}function Jt(Q,fe,xe){try{fe=new gt(fe,xe)}catch(oe){return!1}return fe.test(Q)}function rt(Q,fe,xe,oe){var ze,ct,Rt,nn,an;switch(Q=new m(Q,oe),fe=new gt(fe,oe),xe){case">":ze=se,ct=Oe,Rt=De,nn=">",an=">=";break;case"<":ze=De,ct=ie,Rt=se,nn="<",an="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Jt(Q,fe,oe))return!1;for(var Mn=0;Mn=0.0.0")),ln=ln||Er,Vt=Vt||Er,ze(Er.semver,ln.semver,oe)?ln=Er:Rt(Er.semver,Vt.semver,oe)&&(Vt=Er)}),ln.operator===nn||ln.operator===an||(!Vt.operator||Vt.operator===nn)&&ct(Q,Vt.semver)||Vt.operator===an&&Rt(Q,Vt.semver))return!1}return!0}qe.prototype.parse=function(Q){var fe=this.options.loose?L[C.COMPARATORLOOSE]:L[C.COMPARATOR],xe=Q.match(fe);if(!xe)throw new TypeError("Invalid comparator: "+Q);this.operator=xe[1]!==void 0?xe[1]:"",this.operator==="="&&(this.operator=""),xe[2]?this.semver=new m(xe[2],this.options.loose):this.semver=yt},qe.prototype.toString=function(){return this.value},qe.prototype.test=function(Q){if(t("Comparator.test",Q,this.options.loose),this.semver===yt||Q===yt)return!0;if(typeof Q=="string")try{Q=new m(Q,this.options)}catch(fe){return!1}return je(Q,this.operator,this.semver,this.options)},qe.prototype.intersects=function(Q,fe){if(!(Q instanceof qe))throw new TypeError("a Comparator is required");var xe;if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),this.operator==="")return this.value===""||(xe=new gt(Q.value,fe),Jt(this.value,xe,fe));if(Q.operator==="")return Q.value===""||(xe=new gt(this.value,fe),Jt(Q.semver,xe,fe));var oe=!(this.operator!==">="&&this.operator!==">"||Q.operator!==">="&&Q.operator!==">"),ze=!(this.operator!=="<="&&this.operator!=="<"||Q.operator!=="<="&&Q.operator!=="<"),ct=this.semver.version===Q.semver.version,Rt=!(this.operator!==">="&&this.operator!=="<="||Q.operator!==">="&&Q.operator!=="<="),nn=je(this.semver,"<",Q.semver,fe)&&(this.operator===">="||this.operator===">")&&(Q.operator==="<="||Q.operator==="<"),an=je(this.semver,">",Q.semver,fe)&&(this.operator==="<="||this.operator==="<")&&(Q.operator===">="||Q.operator===">");return oe||ze||ct&&Rt||nn||an},o.Range=gt,gt.prototype.format=function(){return this.range=this.set.map(function(Q){return Q.join(" ").trim()}).join("||").trim(),this.range},gt.prototype.toString=function(){return this.range},gt.prototype.parseRange=function(Q){var fe=this.options.loose;Q=Q.trim();var xe=fe?L[C.HYPHENRANGELOOSE]:L[C.HYPHENRANGE];Q=Q.replace(xe,We),t("hyphen replace",Q),Q=Q.replace(L[C.COMPARATORTRIM],"$1$2$3"),t("comparator trim",Q,L[C.COMPARATORTRIM]),Q=(Q=(Q=Q.replace(L[C.TILDETRIM],"$1~")).replace(L[C.CARETTRIM],"$1^")).split(/\s+/).join(" ");var oe=fe?L[C.COMPARATORLOOSE]:L[C.COMPARATOR],ze=Q.split(" ").map(function(ct){return function(Rt,nn){return t("comp",Rt,nn),Rt=function(an,Mn){return an.trim().split(/\s+/).map(function(lr){return function(ln,Vt){t("caret",ln,Vt);var Er=Vt.loose?L[C.CARETLOOSE]:L[C.CARET];return ln.replace(Er,function(w,jt,Xn,vr,jr){var fr;return t("caret",ln,w,jt,Xn,vr,jr),ut(jt)?fr="":ut(Xn)?fr=">="+jt+".0.0 <"+(+jt+1)+".0.0":ut(vr)?fr=jt==="0"?">="+jt+"."+Xn+".0 <"+jt+"."+(+Xn+1)+".0":">="+jt+"."+Xn+".0 <"+(+jt+1)+".0.0":jr?(t("replaceCaret pr",jr),fr=jt==="0"?Xn==="0"?">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+jt+"."+Xn+"."+(+vr+1):">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+jt+"."+(+Xn+1)+".0":">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+(+jt+1)+".0.0"):(t("no pr"),fr=jt==="0"?Xn==="0"?">="+jt+"."+Xn+"."+vr+" <"+jt+"."+Xn+"."+(+vr+1):">="+jt+"."+Xn+"."+vr+" <"+jt+"."+(+Xn+1)+".0":">="+jt+"."+Xn+"."+vr+" <"+(+jt+1)+".0.0"),t("caret return",fr),fr})}(lr,Mn)}).join(" ")}(Rt,nn),t("caret",Rt),Rt=function(an,Mn){return an.trim().split(/\s+/).map(function(lr){return function(ln,Vt){var Er=Vt.loose?L[C.TILDELOOSE]:L[C.TILDE];return ln.replace(Er,function(w,jt,Xn,vr,jr){var fr;return t("tilde",ln,w,jt,Xn,vr,jr),ut(jt)?fr="":ut(Xn)?fr=">="+jt+".0.0 <"+(+jt+1)+".0.0":ut(vr)?fr=">="+jt+"."+Xn+".0 <"+jt+"."+(+Xn+1)+".0":jr?(t("replaceTilde pr",jr),fr=">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+jt+"."+(+Xn+1)+".0"):fr=">="+jt+"."+Xn+"."+vr+" <"+jt+"."+(+Xn+1)+".0",t("tilde return",fr),fr})}(lr,Mn)}).join(" ")}(Rt,nn),t("tildes",Rt),Rt=function(an,Mn){return t("replaceXRanges",an,Mn),an.split(/\s+/).map(function(lr){return function(ln,Vt){ln=ln.trim();var Er=Vt.loose?L[C.XRANGELOOSE]:L[C.XRANGE];return ln.replace(Er,function(w,jt,Xn,vr,jr,fr){t("xRange",ln,w,jt,Xn,vr,jr,fr);var zr=ut(Xn),Xt=zr||ut(vr),wu=Xt||ut(jr),d0=wu;return jt==="="&&d0&&(jt=""),fr=Vt.includePrerelease?"-0":"",zr?w=jt===">"||jt==="<"?"<0.0.0-0":"*":jt&&d0?(Xt&&(vr=0),jr=0,jt===">"?(jt=">=",Xt?(Xn=+Xn+1,vr=0,jr=0):(vr=+vr+1,jr=0)):jt==="<="&&(jt="<",Xt?Xn=+Xn+1:vr=+vr+1),w=jt+Xn+"."+vr+"."+jr+fr):Xt?w=">="+Xn+".0.0"+fr+" <"+(+Xn+1)+".0.0"+fr:wu&&(w=">="+Xn+"."+vr+".0"+fr+" <"+Xn+"."+(+vr+1)+".0"+fr),t("xRange return",w),w})}(lr,Mn)}).join(" ")}(Rt,nn),t("xrange",Rt),Rt=function(an,Mn){return t("replaceStars",an,Mn),an.trim().replace(L[C.STAR],"")}(Rt,nn),t("stars",Rt),Rt}(ct,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(ze=ze.filter(function(ct){return!!ct.match(oe)})),ze=ze.map(function(ct){return new qe(ct,this.options)},this)},gt.prototype.intersects=function(Q,fe){if(!(Q instanceof gt))throw new TypeError("a Range is required");return this.set.some(function(xe){return Xe(xe,fe)&&Q.set.some(function(oe){return Xe(oe,fe)&&xe.every(function(ze){return oe.every(function(ct){return ze.intersects(ct,fe)})})})})},o.toComparators=function(Q,fe){return new gt(Q,fe).set.map(function(xe){return xe.map(function(oe){return oe.value}).join(" ").trim().split(" ")})},gt.prototype.test=function(Q){if(!Q)return!1;if(typeof Q=="string")try{Q=new m(Q,this.options)}catch(xe){return!1}for(var fe=0;fe":ct.prerelease.length===0?ct.patch++:ct.prerelease.push(0),ct.raw=ct.format();case"":case">=":xe&&!se(xe,ct)||(xe=ct);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+ze.operator)}});return xe&&Q.test(xe)?xe:null},o.validRange=function(Q,fe){try{return new gt(Q,fe).range||"*"}catch(xe){return null}},o.ltr=function(Q,fe,xe){return rt(Q,fe,"<",xe)},o.gtr=function(Q,fe,xe){return rt(Q,fe,">",xe)},o.outside=rt,o.prerelease=function(Q,fe){var xe=ne(Q,fe);return xe&&xe.prerelease.length?xe.prerelease:null},o.intersects=function(Q,fe,xe){return Q=new gt(Q,xe),fe=new gt(fe,xe),Q.intersects(fe)},o.coerce=function(Q,fe){if(Q instanceof m)return Q;if(typeof Q=="number"&&(Q=String(Q)),typeof Q!="string")return null;var xe=null;if((fe=fe||{}).rtl){for(var oe;(oe=L[C.COERCERTL].exec(Q))&&(!xe||xe.index+xe[0].length!==Q.length);)xe&&oe.index+oe[0].length===xe.index+xe[0].length||(xe=oe),L[C.COERCERTL].lastIndex=oe.index+oe[1].length+oe[2].length;L[C.COERCERTL].lastIndex=-1}else xe=Q.match(L[C.COERCE]);return xe===null?null:ne(xe[2]+"."+(xe[3]||"0")+"."+(xe[4]||"0"),fe)}}).call(this,a(5))},function(i,o){function a(_){return(a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(_)}var p;p=function(){return this}();try{p=p||new Function("return this")()}catch(_){(typeof window=="undefined"?"undefined":a(window))==="object"&&(p=window)}i.exports=p},function(i,o){var a,p,_=i.exports={};function t(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}function L(Ee){if(a===setTimeout)return setTimeout(Ee,0);if((a===t||!a)&&setTimeout)return a=setTimeout,setTimeout(Ee,0);try{return a(Ee,0)}catch(ve){try{return a.call(null,Ee,0)}catch(se){return a.call(this,Ee,0)}}}(function(){try{a=typeof setTimeout=="function"?setTimeout:t}catch(Ee){a=t}try{p=typeof clearTimeout=="function"?clearTimeout:k}catch(Ee){p=k}})();var O,C=[],U=!1,H=-1;function W(){U&&O&&(U=!1,O.length?C=O.concat(C):H=-1,C.length&&ne())}function ne(){if(!U){var Ee=L(W);U=!0;for(var ve=C.length;ve;){for(O=C,C=[];++H1)for(var se=1;sethis[k])return me(this,this[m].get(Xe)),!1;var rt=this[m].get(Xe).value;return this[H]&&(this[W]||this[H](Xe,rt.value)),rt.now=Ft,rt.maxAge=We,rt.value=ut,this[L]+=Jt-rt.length,rt.length=Jt,this.get(Xe),pe(this),!0}var Q=new ie(Xe,ut,Jt,Ft,We);return Q.length>this[k]?(this[H]&&this[H](Xe,ut),!1):(this[L]+=Q.length,this[ne].unshift(Q),this[m].set(Xe,this[ne].head),pe(this),!0)}},{key:"has",value:function(Xe){if(!this[m].has(Xe))return!1;var ut=this[m].get(Xe).value;return!De(this,ut)}},{key:"get",value:function(Xe){return se(this,Xe,!0)}},{key:"peek",value:function(Xe){return se(this,Xe,!1)}},{key:"pop",value:function(){var Xe=this[ne].tail;return Xe?(me(this,Xe),Xe.value):null}},{key:"del",value:function(Xe){me(this,this[m].get(Xe))}},{key:"load",value:function(Xe){this.reset();for(var ut=Date.now(),We=Xe.length-1;We>=0;We--){var Ft=Xe[We],Jt=Ft.e||0;if(Jt===0)this.set(Ft.k,Ft.v);else{var rt=Jt-ut;rt>0&&this.set(Ft.k,Ft.v,rt)}}}},{key:"prune",value:function(){var Xe=this;this[m].forEach(function(ut,We){return se(Xe,We,!1)})}},{key:"max",set:function(Xe){if(typeof Xe!="number"||Xe<0)throw new TypeError("max must be a non-negative number");this[k]=Xe||1/0,pe(this)},get:function(){return this[k]}},{key:"allowStale",set:function(Xe){this[C]=!!Xe},get:function(){return this[C]}},{key:"maxAge",set:function(Xe){if(typeof Xe!="number")throw new TypeError("maxAge must be a non-negative number");this[U]=Xe,pe(this)},get:function(){return this[U]}},{key:"lengthCalculator",set:function(Xe){var ut=this;typeof Xe!="function"&&(Xe=Ee),Xe!==this[O]&&(this[O]=Xe,this[L]=0,this[ne].forEach(function(We){We.length=ut[O](We.value,We.key),ut[L]+=We.length})),pe(this)},get:function(){return this[O]}},{key:"length",get:function(){return this[L]}},{key:"itemCount",get:function(){return this[ne].length}}])&&_(qe.prototype,yt),gt&&_(qe,gt),je}(),se=function(je,qe,yt){var gt=je[m].get(qe);if(gt){var Xe=gt.value;if(De(je,Xe)){if(me(je,gt),!je[C])return}else yt&&(je[he]&&(gt.value.now=Date.now()),je[ne].unshiftNode(gt));return Xe.value}},De=function(je,qe){if(!qe||!qe.maxAge&&!je[U])return!1;var yt=Date.now()-qe.now;return qe.maxAge?yt>qe.maxAge:je[U]&&yt>je[U]},pe=function(je){if(je[L]>je[k])for(var qe=je[ne].tail;je[L]>je[k]&&qe!==null;){var yt=qe.prev;me(je,qe),qe=yt}},me=function(je,qe){if(qe){var yt=qe.value;je[H]&&je[H](yt.key,yt.value),je[L]-=yt.length,je[m].delete(yt.key),je[ne].removeNode(qe)}},ie=function je(qe,yt,gt,Xe,ut){p(this,je),this.key=qe,this.value=yt,this.length=gt,this.now=Xe,this.maxAge=ut||0},Oe=function(je,qe,yt,gt){var Xe=yt.value;De(je,Xe)&&(me(je,yt),je[C]||(Xe=void 0)),Xe&&qe.call(gt,Xe.value,Xe.key,je)};i.exports=ve},function(i,o,a){(function(p){function _(t){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(t)}i.exports=function(){if(typeof document=="undefined"||!document.addEventListener)return null;var t,k,L,O={};return O.copy=function(){var C=!1,U=null,H=!1;function W(){C=!1,U=null,H&&window.getSelection().removeAllRanges(),H=!1}return document.addEventListener("copy",function(ne){if(C){for(var m in U)ne.clipboardData.setData(m,U[m]);ne.preventDefault()}}),function(ne){return new Promise(function(m,he){C=!0,typeof ne=="string"?U={"text/plain":ne}:ne instanceof Node?U={"text/html":new XMLSerializer().serializeToString(ne)}:ne instanceof Object?U=ne:he("Invalid data type. Must be string, DOM node, or an object mapping MIME types to strings."),function Ee(ve){try{if(document.execCommand("copy"))W(),m();else{if(ve)throw W(),new Error("Unable to copy. Perhaps it's not available in your browser?");(function(){var se=document.getSelection();if(!document.queryCommandEnabled("copy")&&se.isCollapsed){var De=document.createRange();De.selectNodeContents(document.body),se.removeAllRanges(),se.addRange(De),H=!0}})(),Ee(!0)}}catch(se){W(),he(se)}}(!1)})}}(),O.paste=(L=!1,document.addEventListener("paste",function(C){if(L){L=!1,C.preventDefault();var U=t;t=null,U(C.clipboardData.getData(k))}}),function(C){return new Promise(function(U,H){L=!0,t=U,k=C||"text/plain";try{document.execCommand("paste")||(L=!1,H(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")))}catch(W){L=!1,H(new Error(W))}})}),typeof ClipboardEvent=="undefined"&&window.clipboardData!==void 0&&window.clipboardData.setData!==void 0&&(function(C){function U(pe,me){return function(){pe.apply(me,arguments)}}function H(pe){if(_(this)!="object")throw new TypeError("Promises must be constructed via new");if(typeof pe!="function")throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],ve(pe,U(ne,this),U(m,this))}function W(pe){var me=this;return this._state===null?void this._deferreds.push(pe):void se(function(){var ie=me._state?pe.onFulfilled:pe.onRejected;if(ie!==null){var Oe;try{Oe=ie(me._value)}catch(je){return void pe.reject(je)}pe.resolve(Oe)}else(me._state?pe.resolve:pe.reject)(me._value)})}function ne(pe){try{if(pe===this)throw new TypeError("A promise cannot be resolved with itself.");if(pe&&(_(pe)=="object"||typeof pe=="function")){var me=pe.then;if(typeof me=="function")return void ve(U(me,pe),U(ne,this),U(m,this))}this._state=!0,this._value=pe,he.call(this)}catch(ie){m.call(this,ie)}}function m(pe){this._state=!1,this._value=pe,he.call(this)}function he(){for(var pe=0,me=this._deferreds.length;me>pe;pe++)W.call(this,this._deferreds[pe]);this._deferreds=null}function Ee(pe,me,ie,Oe){this.onFulfilled=typeof pe=="function"?pe:null,this.onRejected=typeof me=="function"?me:null,this.resolve=ie,this.reject=Oe}function ve(pe,me,ie){var Oe=!1;try{pe(function(je){Oe||(Oe=!0,me(je))},function(je){Oe||(Oe=!0,ie(je))})}catch(je){if(Oe)return;Oe=!0,ie(je)}}var se=H.immediateFn||typeof p=="function"&&p||function(pe){setTimeout(pe,1)},De=Array.isArray||function(pe){return Object.prototype.toString.call(pe)==="[object Array]"};H.prototype.catch=function(pe){return this.then(null,pe)},H.prototype.then=function(pe,me){var ie=this;return new H(function(Oe,je){W.call(ie,new Ee(pe,me,Oe,je))})},H.all=function(){var pe=Array.prototype.slice.call(arguments.length===1&&De(arguments[0])?arguments[0]:arguments);return new H(function(me,ie){function Oe(yt,gt){try{if(gt&&(_(gt)=="object"||typeof gt=="function")){var Xe=gt.then;if(typeof Xe=="function")return void Xe.call(gt,function(ut){Oe(yt,ut)},ie)}pe[yt]=gt,--je==0&&me(pe)}catch(ut){ie(ut)}}if(pe.length===0)return me([]);for(var je=pe.length,qe=0;qeOe;Oe++)pe[Oe].then(me,ie)})},i.exports?i.exports=H:C.Promise||(C.Promise=H)}(this),O.copy=function(C){return new Promise(function(U,H){if(typeof C!="string"&&!("text/plain"in C))throw new Error("You must provide a text/plain type.");var W=typeof C=="string"?C:C["text/plain"];window.clipboardData.setData("Text",W)?U():H(new Error("Copying was rejected."))})},O.paste=function(){return new Promise(function(C,U){var H=window.clipboardData.getData("Text");H?C(H):U(new Error("Pasting was rejected."))})}),O}()}).call(this,a(13).setImmediate)},function(i,o,a){"use strict";i.exports=a(15)},function(i,o,a){"use strict";a.r(o),o.default=`:root { - /** - * IMPORTANT: When new theme variables are added below\u2013 also add them to SettingsContext updateThemeVariables() - */ - - /* Light theme */ - --light-color-attribute-name: #ef6632; - --light-color-attribute-name-not-editable: #23272f; - --light-color-attribute-name-inverted: rgba(255, 255, 255, 0.7); - --light-color-attribute-value: #1a1aa6; - --light-color-attribute-value-inverted: #ffffff; - --light-color-attribute-editable-value: #1a1aa6; - --light-color-background: #ffffff; - --light-color-background-hover: rgba(0, 136, 250, 0.1); - --light-color-background-inactive: #e5e5e5; - --light-color-background-invalid: #fff0f0; - --light-color-background-selected: #0088fa; - --light-color-button-background: #ffffff; - --light-color-button-background-focus: #ededed; - --light-color-button: #5f6673; - --light-color-button-disabled: #cfd1d5; - --light-color-button-active: #0088fa; - --light-color-button-focus: #23272f; - --light-color-button-hover: #23272f; - --light-color-border: #eeeeee; - --light-color-commit-did-not-render-fill: #cfd1d5; - --light-color-commit-did-not-render-fill-text: #000000; - --light-color-commit-did-not-render-pattern: #cfd1d5; - --light-color-commit-did-not-render-pattern-text: #333333; - --light-color-commit-gradient-0: #37afa9; - --light-color-commit-gradient-1: #63b19e; - --light-color-commit-gradient-2: #80b393; - --light-color-commit-gradient-3: #97b488; - --light-color-commit-gradient-4: #abb67d; - --light-color-commit-gradient-5: #beb771; - --light-color-commit-gradient-6: #cfb965; - --light-color-commit-gradient-7: #dfba57; - --light-color-commit-gradient-8: #efbb49; - --light-color-commit-gradient-9: #febc38; - --light-color-commit-gradient-text: #000000; - --light-color-component-name: #6a51b2; - --light-color-component-name-inverted: #ffffff; - --light-color-component-badge-background: rgba(0, 0, 0, 0.1); - --light-color-component-badge-background-inverted: rgba(255, 255, 255, 0.25); - --light-color-component-badge-count: #777d88; - --light-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --light-color-context-background: rgba(0,0,0,.9); - --light-color-context-background-hover: rgba(255, 255, 255, 0.1); - --light-color-context-background-selected: #178fb9; - --light-color-context-border: #3d424a; - --light-color-context-text: #ffffff; - --light-color-context-text-selected: #ffffff; - --light-color-dim: #777d88; - --light-color-dimmer: #cfd1d5; - --light-color-dimmest: #eff0f1; - --light-color-error-background: hsl(0, 100%, 97%); - --light-color-error-border: hsl(0, 100%, 92%); - --light-color-error-text: #ff0000; - --light-color-expand-collapse-toggle: #777d88; - --light-color-link: #0000ff; - --light-color-modal-background: rgba(255, 255, 255, 0.75); - --light-color-record-active: #fc3a4b; - --light-color-record-hover: #3578e5; - --light-color-record-inactive: #0088fa; - --light-color-scroll-thumb: #c2c2c2; - --light-color-scroll-track: #fafafa; - --light-color-search-match: yellow; - --light-color-search-match-current: #f7923b; - --light-color-selected-tree-highlight-active: rgba(0, 136, 250, 0.1); - --light-color-selected-tree-highlight-inactive: rgba(0, 0, 0, 0.05); - --light-color-shadow: rgba(0, 0, 0, 0.25); - --light-color-tab-selected-border: #0088fa; - --light-color-text: #000000; - --light-color-text-invalid: #ff0000; - --light-color-text-selected: #ffffff; - --light-color-toggle-background-invalid: #fc3a4b; - --light-color-toggle-background-on: #0088fa; - --light-color-toggle-background-off: #cfd1d5; - --light-color-toggle-text: #ffffff; - --light-color-tooltip-background: rgba(0, 0, 0, 0.9); - --light-color-tooltip-text: #ffffff; - - /* Dark theme */ - --dark-color-attribute-name: #9d87d2; - --dark-color-attribute-name-not-editable: #ededed; - --dark-color-attribute-name-inverted: #282828; - --dark-color-attribute-value: #cedae0; - --dark-color-attribute-value-inverted: #ffffff; - --dark-color-attribute-editable-value: yellow; - --dark-color-background: #282c34; - --dark-color-background-hover: rgba(255, 255, 255, 0.1); - --dark-color-background-inactive: #3d424a; - --dark-color-background-invalid: #5c0000; - --dark-color-background-selected: #178fb9; - --dark-color-button-background: #282c34; - --dark-color-button-background-focus: #3d424a; - --dark-color-button: #afb3b9; - --dark-color-button-active: #61dafb; - --dark-color-button-disabled: #4f5766; - --dark-color-button-focus: #a2e9fc; - --dark-color-button-hover: #ededed; - --dark-color-border: #3d424a; - --dark-color-commit-did-not-render-fill: #777d88; - --dark-color-commit-did-not-render-fill-text: #000000; - --dark-color-commit-did-not-render-pattern: #666c77; - --dark-color-commit-did-not-render-pattern-text: #ffffff; - --dark-color-commit-gradient-0: #37afa9; - --dark-color-commit-gradient-1: #63b19e; - --dark-color-commit-gradient-2: #80b393; - --dark-color-commit-gradient-3: #97b488; - --dark-color-commit-gradient-4: #abb67d; - --dark-color-commit-gradient-5: #beb771; - --dark-color-commit-gradient-6: #cfb965; - --dark-color-commit-gradient-7: #dfba57; - --dark-color-commit-gradient-8: #efbb49; - --dark-color-commit-gradient-9: #febc38; - --dark-color-commit-gradient-text: #000000; - --dark-color-component-name: #61dafb; - --dark-color-component-name-inverted: #282828; - --dark-color-component-badge-background: rgba(255, 255, 255, 0.25); - --dark-color-component-badge-background-inverted: rgba(0, 0, 0, 0.25); - --dark-color-component-badge-count: #8f949d; - --dark-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --dark-color-context-background: rgba(255,255,255,.9); - --dark-color-context-background-hover: rgba(0, 136, 250, 0.1); - --dark-color-context-background-selected: #0088fa; - --dark-color-context-border: #eeeeee; - --dark-color-context-text: #000000; - --dark-color-context-text-selected: #ffffff; - --dark-color-dim: #8f949d; - --dark-color-dimmer: #777d88; - --dark-color-dimmest: #4f5766; - --dark-color-error-background: #200; - --dark-color-error-border: #900; - --dark-color-error-text: #f55; - --dark-color-expand-collapse-toggle: #8f949d; - --dark-color-link: #61dafb; - --dark-color-modal-background: rgba(0, 0, 0, 0.75); - --dark-color-record-active: #fc3a4b; - --dark-color-record-hover: #a2e9fc; - --dark-color-record-inactive: #61dafb; - --dark-color-scroll-thumb: #afb3b9; - --dark-color-scroll-track: #313640; - --dark-color-search-match: yellow; - --dark-color-search-match-current: #f7923b; - --dark-color-selected-tree-highlight-active: rgba(23, 143, 185, 0.15); - --dark-color-selected-tree-highlight-inactive: rgba(255, 255, 255, 0.05); - --dark-color-shadow: rgba(0, 0, 0, 0.5); - --dark-color-tab-selected-border: #178fb9; - --dark-color-text: #ffffff; - --dark-color-text-invalid: #ff8080; - --dark-color-text-selected: #ffffff; - --dark-color-toggle-background-invalid: #fc3a4b; - --dark-color-toggle-background-on: #178fb9; - --dark-color-toggle-background-off: #777d88; - --dark-color-toggle-text: #ffffff; - --dark-color-tooltip-background: rgba(255, 255, 255, 0.9); - --dark-color-tooltip-text: #000000; - - /* Font smoothing */ - --light-font-smoothing: auto; - --dark-font-smoothing: antialiased; - --font-smoothing: auto; - - /* Compact density */ - --compact-font-size-monospace-small: 9px; - --compact-font-size-monospace-normal: 11px; - --compact-font-size-monospace-large: 15px; - --compact-font-size-sans-small: 10px; - --compact-font-size-sans-normal: 12px; - --compact-font-size-sans-large: 14px; - --compact-line-height-data: 18px; - --compact-root-font-size: 16px; - - /* Comfortable density */ - --comfortable-font-size-monospace-small: 10px; - --comfortable-font-size-monospace-normal: 13px; - --comfortable-font-size-monospace-large: 17px; - --comfortable-font-size-sans-small: 12px; - --comfortable-font-size-sans-normal: 14px; - --comfortable-font-size-sans-large: 16px; - --comfortable-line-height-data: 22px; - --comfortable-root-font-size: 20px; - - /* GitHub.com system fonts */ - --font-family-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, - Courier, monospace; - --font-family-sans: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, - Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; - - /* Constant values shared between JS and CSS */ - --interaction-commit-size: 10px; - --interaction-label-width: 200px; -} -`},function(i,o,a){"use strict";function p(O){var C=this;if(C instanceof p||(C=new p),C.tail=null,C.head=null,C.length=0,O&&typeof O.forEach=="function")O.forEach(function(W){C.push(W)});else if(arguments.length>0)for(var U=0,H=arguments.length;U1)U=C;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");H=this.head.next,U=this.head.value}for(var W=0;H!==null;W++)U=O(U,H.value,W),H=H.next;return U},p.prototype.reduceReverse=function(O,C){var U,H=this.tail;if(arguments.length>1)U=C;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");H=this.tail.prev,U=this.tail.value}for(var W=this.length-1;H!==null;W--)U=O(U,H.value,W),H=H.prev;return U},p.prototype.toArray=function(){for(var O=new Array(this.length),C=0,U=this.head;U!==null;C++)O[C]=U.value,U=U.next;return O},p.prototype.toArrayReverse=function(){for(var O=new Array(this.length),C=0,U=this.tail;U!==null;C++)O[C]=U.value,U=U.prev;return O},p.prototype.slice=function(O,C){(C=C||this.length)<0&&(C+=this.length),(O=O||0)<0&&(O+=this.length);var U=new p;if(Cthis.length&&(C=this.length);for(var H=0,W=this.head;W!==null&&Hthis.length&&(C=this.length);for(var H=this.length,W=this.tail;W!==null&&H>C;H--)W=W.prev;for(;W!==null&&H>O;H--,W=W.prev)U.push(W.value);return U},p.prototype.splice=function(O,C){O>this.length&&(O=this.length-1),O<0&&(O=this.length+O);for(var U=0,H=this.head;H!==null&&U=0&&(L._idleTimeoutId=setTimeout(function(){L._onTimeout&&L._onTimeout()},O))},a(14),o.setImmediate=typeof self!="undefined"&&self.setImmediate||p!==void 0&&p.setImmediate||this&&this.setImmediate,o.clearImmediate=typeof self!="undefined"&&self.clearImmediate||p!==void 0&&p.clearImmediate||this&&this.clearImmediate}).call(this,a(4))},function(i,o,a){(function(p,_){(function(t,k){"use strict";if(!t.setImmediate){var L,O,C,U,H,W=1,ne={},m=!1,he=t.document,Ee=Object.getPrototypeOf&&Object.getPrototypeOf(t);Ee=Ee&&Ee.setTimeout?Ee:t,{}.toString.call(t.process)==="[object process]"?L=function(De){_.nextTick(function(){se(De)})}:function(){if(t.postMessage&&!t.importScripts){var De=!0,pe=t.onmessage;return t.onmessage=function(){De=!1},t.postMessage("","*"),t.onmessage=pe,De}}()?(U="setImmediate$"+Math.random()+"$",H=function(De){De.source===t&&typeof De.data=="string"&&De.data.indexOf(U)===0&&se(+De.data.slice(U.length))},t.addEventListener?t.addEventListener("message",H,!1):t.attachEvent("onmessage",H),L=function(De){t.postMessage(U+De,"*")}):t.MessageChannel?((C=new MessageChannel).port1.onmessage=function(De){se(De.data)},L=function(De){C.port2.postMessage(De)}):he&&"onreadystatechange"in he.createElement("script")?(O=he.documentElement,L=function(De){var pe=he.createElement("script");pe.onreadystatechange=function(){se(De),pe.onreadystatechange=null,O.removeChild(pe),pe=null},O.appendChild(pe)}):L=function(De){setTimeout(se,0,De)},Ee.setImmediate=function(De){typeof De!="function"&&(De=new Function(""+De));for(var pe=new Array(arguments.length-1),me=0;mefe;fe++)if((Q=ve(rt,Ft,fe))!==-1){Ee=fe,Ft=Q;break e}Ft=-1}}e:{if(rt=Jt,(Q=W().get(We.primitive))!==void 0){for(fe=0;feFt-rt?null:Jt.slice(rt,Ft-1))!==null){if(Ft=0,qe!==null){for(;FtFt;qe--)yt=Xe.pop()}for(qe=Jt.length-Ft-1;1<=qe;qe--)Ft=[],yt.push({id:null,isStateEditable:!1,name:De(Jt[qe-1].functionName),value:void 0,subHooks:Ft}),Xe.push(yt),yt=Ft;qe=Jt}Ft=(Jt=We.primitive)==="Context"||Jt==="DebugValue"?null:gt++,yt.push({id:Ft,isStateEditable:Jt==="Reducer"||Jt==="State",name:Jt,value:We.value,subHooks:[]})}return function xe(oe,ze){for(var ct=[],Rt=0;Rt-1&&(ne=ne.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var m=ne.replace(/^\s+/,"").replace(/\(eval code/g,"("),he=m.match(/ (\((.+):(\d+):(\d+)\)$)/),Ee=(m=he?m.replace(he[0],""):m).split(/\s+/).slice(1),ve=this.extractLocation(he?he[1]:Ee.pop()),se=Ee.join(" ")||void 0,De=["eval",""].indexOf(ve[0])>-1?void 0:ve[0];return new O({functionName:se,fileName:De,lineNumber:ve[1],columnNumber:ve[2],source:ne})},this)},parseFFOrSafari:function(W){return W.stack.split(` -`).filter(function(ne){return!ne.match(H)},this).map(function(ne){if(ne.indexOf(" > eval")>-1&&(ne=ne.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),ne.indexOf("@")===-1&&ne.indexOf(":")===-1)return new O({functionName:ne});var m=/((.*".+"[^@]*)?[^@]*)(?:@)/,he=ne.match(m),Ee=he&&he[1]?he[1]:void 0,ve=this.extractLocation(ne.replace(m,""));return new O({functionName:Ee,fileName:ve[0],lineNumber:ve[1],columnNumber:ve[2],source:ne})},this)},parseOpera:function(W){return!W.stacktrace||W.message.indexOf(` -`)>-1&&W.message.split(` -`).length>W.stacktrace.split(` -`).length?this.parseOpera9(W):W.stack?this.parseOpera11(W):this.parseOpera10(W)},parseOpera9:function(W){for(var ne=/Line (\d+).*script (?:in )?(\S+)/i,m=W.message.split(` -`),he=[],Ee=2,ve=m.length;Ee/,"$2").replace(/\([^)]*\)/g,"")||void 0;ve.match(/\(([^)]*)\)/)&&(m=ve.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var De=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new O({functionName:se,args:De,fileName:Ee[0],lineNumber:Ee[1],columnNumber:Ee[2],source:ne})},this)}}})=="function"?p.apply(o,_):p)===void 0||(i.exports=t)})()},function(i,o,a){var p,_,t;(function(k,L){"use strict";_=[],(t=typeof(p=function(){function O(se){return se.charAt(0).toUpperCase()+se.substring(1)}function C(se){return function(){return this[se]}}var U=["isConstructor","isEval","isNative","isToplevel"],H=["columnNumber","lineNumber"],W=["fileName","functionName","source"],ne=U.concat(H,W,["args"]);function m(se){if(se)for(var De=0;De1?Re-1:0),ke=1;ke=0&&Re.splice(Z,1)}}}])&&p(z.prototype,G),$&&p(z,$),B}(),t=a(2),k=a.n(t);try{var L=a(9).default,O=function(B){var z=new RegExp("".concat(B,": ([0-9]+)")),G=L.match(z);return parseInt(G[1],10)};O("comfortable-line-height-data"),O("compact-line-height-data")}catch(B){}function C(B){try{return sessionStorage.getItem(B)}catch(z){return null}}function U(B){try{sessionStorage.removeItem(B)}catch(z){}}function H(B,z){try{return sessionStorage.setItem(B,z)}catch(G){}}var W=function(B,z){return B===z},ne=a(1),m=a.n(ne);function he(B){return B.ownerDocument?B.ownerDocument.defaultView:null}function Ee(B){var z=he(B);return z?z.frameElement:null}function ve(B){var z=pe(B);return se([B.getBoundingClientRect(),{top:z.borderTop,left:z.borderLeft,bottom:z.borderBottom,right:z.borderRight,width:0,height:0}])}function se(B){return B.reduce(function(z,G){return z==null?G:{top:z.top+G.top,left:z.left+G.left,width:z.width,height:z.height,bottom:z.bottom+G.bottom,right:z.right+G.right}})}function De(B,z){var G=Ee(B);if(G&&G!==z){for(var $=[B.getBoundingClientRect()],Te=G,ge=!1;Te;){var Re=ve(Te);if($.push(Re),Te=Ee(Te),ge)break;Te&&he(Te)===z&&(ge=!0)}return se($)}return B.getBoundingClientRect()}function pe(B){var z=window.getComputedStyle(B);return{borderLeft:parseInt(z.borderLeftWidth,10),borderRight:parseInt(z.borderRightWidth,10),borderTop:parseInt(z.borderTopWidth,10),borderBottom:parseInt(z.borderBottomWidth,10),marginLeft:parseInt(z.marginLeft,10),marginRight:parseInt(z.marginRight,10),marginTop:parseInt(z.marginTop,10),marginBottom:parseInt(z.marginBottom,10),paddingLeft:parseInt(z.paddingLeft,10),paddingRight:parseInt(z.paddingRight,10),paddingTop:parseInt(z.paddingTop,10),paddingBottom:parseInt(z.paddingBottom,10)}}function me(B,z){var G;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(G=function(ke,Qe){if(!!ke){if(typeof ke=="string")return ie(ke,Qe);var ht=Object.prototype.toString.call(ke).slice(8,-1);if(ht==="Object"&&ke.constructor&&(ht=ke.constructor.name),ht==="Map"||ht==="Set")return Array.from(ke);if(ht==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ht))return ie(ke,Qe)}}(B))||z&&B&&typeof B.length=="number"){G&&(B=G);var $=0,Te=function(){};return{s:Te,n:function(){return $>=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:Te}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge,Re=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return Re=ke.done,ke},e:function(ke){Z=!0,ge=ke},f:function(){try{Re||G.return==null||G.return()}finally{if(Z)throw ge}}}}function ie(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);GRe.left+Re.width&&(ue=Re.left+Re.width-ht-5),{style:{top:ke+="px",left:ue+="px"}}}(z,G,{width:$.width,height:$.height});m()(this.tip.style,Te.style)}}]),B}(),Xe=function(){function B(){Oe(this,B);var z=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.window=z;var G=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.tipBoundsWindow=G;var $=z.document;this.container=$.createElement("div"),this.container.style.zIndex="10000000",this.tip=new gt($,this.container),this.rects=[],$.body.appendChild(this.container)}return qe(B,[{key:"remove",value:function(){this.tip.remove(),this.rects.forEach(function(z){z.remove()}),this.rects.length=0,this.container.parentNode&&this.container.parentNode.removeChild(this.container)}},{key:"inspect",value:function(z,G){for(var $=this,Te=z.filter(function(Ct){return Ct.nodeType===Node.ELEMENT_NODE});this.rects.length>Te.length;)this.rects.pop().remove();if(Te.length!==0){for(;this.rects.length1&&arguments[1]!==void 0?arguments[1]:W,nt=void 0,Ct=[],Mt=void 0,It=!1,sn=function(Lt,Dn){return He(Lt,Ct[Dn])},rn=function(){for(var Lt=arguments.length,Dn=Array(Lt),dr=0;dr5&&arguments[5]!==void 0?arguments[5]:0,Z=Oo(B);switch(Z){case"html_element":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B.tagName,type:Z};case"function":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:typeof B.name!="function"&&B.name?B.name:"function",type:Z};case"string":return B.length<=500?B:B.slice(0,500)+"...";case"bigint":case"symbol":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B.toString(),type:Z};case"react_element":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:F0(B)||"Unknown",type:Z};case"array_buffer":case"data_view":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:Z==="data_view"?"DataView":"ArrayBuffer",size:B.byteLength,type:Z};case"array":return ge=Te($),Re>=2&&!ge?d0(Z,!0,B,z,$):B.map(function(ht,ue){return Ro(ht,z,G,$.concat([ue]),Te,ge?1:Re+1)});case"html_all_collection":case"typed_array":case"iterator":if(ge=Te($),Re>=2&&!ge)return d0(Z,!0,B,z,$);var ke={unserializable:!0,type:Z,readonly:!0,size:Z==="typed_array"?B.length:void 0,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B.constructor&&B.constructor.name!=="Object"?B.constructor.name:""};return Xt(B[Symbol.iterator])&&Array.from(B).forEach(function(ht,ue){return ke[ue]=Ro(ht,z,G,$.concat([ue]),Te,ge?1:Re+1)}),G.push($),ke;case"opaque_iterator":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B[Symbol.toStringTag],type:Z};case"date":case"regexp":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B.toString(),type:Z};case"object":if(ge=Te($),Re>=2&&!ge)return d0(Z,!0,B,z,$);var Qe={};return lu(B).forEach(function(ht){var ue=ht.toString();Qe[ue]=Ro(B[ht],z,G,$.concat([ue]),Te,ge?1:Re+1)}),Qe;case"infinity":case"nan":case"undefined":return z.push($),{type:Z};default:return B}}function Qo(B){return(Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function Fs(B){return function(z){if(Array.isArray(z))return Jo(z)}(B)||function(z){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(z))return Array.from(z)}(B)||function(z,G){if(!!z){if(typeof z=="string")return Jo(z,G);var $=Object.prototype.toString.call(z).slice(8,-1);if($==="Object"&&z.constructor&&($=z.constructor.name),$==="Map"||$==="Set")return Array.from(z);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return Jo(z,G)}}(B)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Jo(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);Gz.toString()?1:z.toString()>B.toString()?-1:0}function lu(B){for(var z=[],G=B,$=function(){var Te=[].concat(Fs(Object.keys(G)),Fs(Object.getOwnPropertySymbols(G))),ge=Object.getOwnPropertyDescriptors(G);Te.forEach(function(Re){ge[Re].enumerable&&z.push(Re)}),G=Object.getPrototypeOf(G)};G!=null;)$();return z}function mi(B){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Anonymous",G=Zo.get(B);if(G!=null)return G;var $=z;return typeof B.displayName=="string"?$=B.displayName:typeof B.name=="string"&&B.name!==""&&($=B.name),Zo.set(B,$),$}var Dr=0;function $o(){return++Dr}function G0(B){var z=qt.get(B);if(z!==void 0)return z;for(var G=new Array(B.length),$=0;$1&&arguments[1]!==void 0?arguments[1]:50;return B.length>z?B.substr(0,z)+"\u2026":B}function ki(B,z){if(B!=null&&hasOwnProperty.call(B,wu.type))return z?B[wu.preview_long]:B[wu.preview_short];switch(Oo(B)){case"html_element":return"<".concat(su(B.tagName.toLowerCase())," />");case"function":return su("\u0192 ".concat(typeof B.name=="function"?"":B.name,"() {}"));case"string":return'"'.concat(B,'"');case"bigint":return su(B.toString()+"n");case"regexp":case"symbol":return su(B.toString());case"react_element":return"<".concat(su(F0(B)||"Unknown")," />");case"array_buffer":return"ArrayBuffer(".concat(B.byteLength,")");case"data_view":return"DataView(".concat(B.buffer.byteLength,")");case"array":if(z){for(var G="",$=0;$0&&(G+=", "),!((G+=ki(B[$],!1)).length>50));$++);return"[".concat(su(G),"]")}var Te=hasOwnProperty.call(B,wu.size)?B[wu.size]:B.length;return"Array(".concat(Te,")");case"typed_array":var ge="".concat(B.constructor.name,"(").concat(B.length,")");if(z){for(var Re="",Z=0;Z0&&(Re+=", "),!((Re+=B[Z]).length>50));Z++);return"".concat(ge," [").concat(su(Re),"]")}return ge;case"iterator":var ke=B.constructor.name;if(z){for(var Qe=Array.from(B),ht="",ue=0;ue0&&(ht+=", "),Array.isArray(He)){var nt=ki(He[0],!0),Ct=ki(He[1],!1);ht+="".concat(nt," => ").concat(Ct)}else ht+=ki(He,!1);if(ht.length>50)break}return"".concat(ke,"(").concat(B.size,") {").concat(su(ht),"}")}return"".concat(ke,"(").concat(B.size,")");case"opaque_iterator":return B[Symbol.toStringTag];case"date":return B.toString();case"object":if(z){for(var Mt=lu(B).sort(xi),It="",sn=0;sn0&&(It+=", "),(It+="".concat(rn.toString(),": ").concat(ki(B[rn],!1))).length>50)break}return"{".concat(su(It),"}")}return"{\u2026}";case"boolean":case"number":case"infinity":case"nan":case"null":case"undefined":return B;default:try{return su(""+B)}catch(Lt){return"unserializable"}}}var Ps=a(7);function Kl(B){return(Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function P0(B,z){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);z&&($=$.filter(function(Te){return Object.getOwnPropertyDescriptor(B,Te).enumerable})),G.push.apply(G,$)}return G}function p0(B){for(var z=1;z2&&arguments[2]!==void 0?arguments[2]:[];if(B!==null){var $=[],Te=[],ge=Ro(B,$,Te,G,z);return{data:ge,cleaned:$,unserializable:Te}}return null}function K0(B){var z,G,$=(z=B,G=new Set,JSON.stringify(z,function(Re,Z){if(Kl(Z)==="object"&&Z!==null){if(G.has(Z))return;G.add(Z)}return typeof Z=="bigint"?Z.toString()+"n":Z})),Te=$===void 0?"undefined":$,ge=window.__REACT_DEVTOOLS_GLOBAL_HOOK__.clipboardCopyText;typeof ge=="function"?ge(Te).catch(function(Re){}):Object(Ps.copy)(Te)}function yi(B,z){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,$=z[G],Te=Array.isArray(B)?B.slice():p0({},B);return G+1===z.length?Array.isArray(Te)?Te.splice($,1):delete Te[$]:Te[$]=yi(B[$],z,G+1),Te}function en(B,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,Te=z[$],ge=Array.isArray(B)?B.slice():p0({},B);if($+1===z.length){var Re=G[$];ge[Re]=ge[Te],Array.isArray(ge)?ge.splice(Te,1):delete ge[Te]}else ge[Te]=en(B[Te],z,G,$+1);return ge}function bn(B,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if($>=z.length)return G;var Te=z[$],ge=Array.isArray(B)?B.slice():p0({},B);return ge[Te]=bn(B[Te],z,G,$+1),ge}var Ai=a(8);function gi(B,z){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);z&&($=$.filter(function(Te){return Object.getOwnPropertyDescriptor(B,Te).enumerable})),G.push.apply(G,$)}return G}function Wt(B){for(var z=1;z=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:Te}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge,Re=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return Re=ke.done,ke},e:function(ke){Z=!0,ge=ke},f:function(){try{Re||G.return==null||G.return()}finally{if(Z)throw ge}}}}function Xl(B,z){if(B){if(typeof B=="string")return Mo(B,z);var G=Object.prototype.toString.call(B).slice(8,-1);return G==="Object"&&B.constructor&&(G=B.constructor.name),G==="Map"||G==="Set"?Array.from(B):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?Mo(B,z):void 0}}function Mo(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);G0){var vt=ge(ae);if(vt!=null){var Qt,On=Yi(Po);try{for(On.s();!(Qt=On.n()).done;)if(Qt.value.test(vt))return!0}catch(ir){On.e(ir)}finally{On.f()}}}if(re!=null&&ys.size>0){var Sn,_n=re.fileName,Tn=Yi(ys);try{for(Tn.s();!(Sn=Tn.n()).done;)if(Sn.value.test(_n))return!0}catch(ir){Tn.e(ir)}finally{Tn.f()}}return!1}function Tu(ae){var re=ae.type;switch(ae.tag){case Ct:case Cr:return 1;case nt:case An:return 5;case rn:return 6;case Lt:return 11;case dr:return 7;case Dn:case er:case sn:return 9;case Nr:case Lr:return 8;case it:return 12;case Dt:return 13;default:switch(Re(re)){case 60111:case"Symbol(react.concurrent_mode)":case"Symbol(react.async_mode)":return 9;case 60109:case"Symbol(react.provider)":return 2;case 60110:case"Symbol(react.context)":return 2;case 60108:case"Symbol(react.strict_mode)":return 9;case 60114:case"Symbol(react.profiler)":return 10;default:return 9}}}function Ei(ae){if(Bo.has(ae))return ae;var re=ae.alternate;return re!=null&&Bo.has(re)?re:(Bo.add(ae),ae)}window.__REACT_DEVTOOLS_COMPONENT_FILTERS__!=null?gs(window.__REACT_DEVTOOLS_COMPONENT_FILTERS__):gs([{type:1,value:7,isEnabled:!0}]);var C0=new Map,Z0=new Map,Bo=new Set,la=new Map,$l=new Map,tu=-1;function ei(ae){if(!C0.has(ae)){var re=$o();C0.set(ae,re),Z0.set(re,ae)}return C0.get(ae)}function po(ae){switch(Tu(ae)){case 1:if(B0!==null){var re=ei(Ei(ae)),Fe=Ci(ae);Fe!==null&&B0.set(re,Fe)}}}var Bi={};function Ci(ae){switch(Tu(ae)){case 1:var re=ae.stateNode,Fe=Bi,Ae=Bi;return re!=null&&(re.constructor&&re.constructor.contextType!=null?Ae=re.context:(Fe=re.context)&&Object.keys(Fe).length===0&&(Fe=Bi)),[Fe,Ae];default:return null}}function mf(ae){switch(Tu(ae)){case 1:if(B0!==null){var re=ei(Ei(ae)),Fe=B0.has(re)?B0.get(re):null,Ae=Ci(ae);if(Fe==null||Ae==null)return null;var st=X0(Fe,2),vt=st[0],Qt=st[1],On=X0(Ae,2),Sn=On[0],_n=On[1];if(Sn!==Bi)return $0(vt,Sn);if(_n!==Bi)return Qt!==_n}}return null}function yf(ae,re){if(ae==null||re==null)return!1;if(re.hasOwnProperty("baseState")&&re.hasOwnProperty("memoizedState")&&re.hasOwnProperty("next")&&re.hasOwnProperty("queue"))for(;re!==null;){if(re.memoizedState!==ae.memoizedState)return!0;re=re.next,ae=ae.next}return!1}function $0(ae,re){if(ae==null||re==null||re.hasOwnProperty("baseState")&&re.hasOwnProperty("memoizedState")&&re.hasOwnProperty("next")&&re.hasOwnProperty("queue"))return null;var Fe,Ae=[],st=Yi(new Set([].concat(eu(Object.keys(ae)),eu(Object.keys(re)))));try{for(st.s();!(Fe=st.n()).done;){var vt=Fe.value;ae[vt]!==re[vt]&&Ae.push(vt)}}catch(Qt){st.e(Qt)}finally{st.f()}return Ae}function eo(ae,re){switch(re.tag){case Ct:case nt:case Mt:case Nr:case Lr:return(so(re)&ue)===ue;default:return ae.memoizedProps!==re.memoizedProps||ae.memoizedState!==re.memoizedState||ae.ref!==re.ref}}var Ce=[],et=[],Ye=[],Yt=[],Kt=new Map,pr=0,Wr=null;function xn(ae){Ce.push(ae)}function yu(ae){if(Ce.length!==0||et.length!==0||Ye.length!==0||Wr!==null||Pu){var re=et.length+Ye.length+(Wr===null?0:1),Fe=new Array(3+pr+(re>0?2+re:0)+Ce.length),Ae=0;if(Fe[Ae++]=z,Fe[Ae++]=tu,Fe[Ae++]=pr,Kt.forEach(function(On,Sn){Fe[Ae++]=Sn.length;for(var _n=G0(Sn),Tn=0;Tn<_n.length;Tn++)Fe[Ae+Tn]=_n[Tn];Ae+=Sn.length}),re>0){Fe[Ae++]=2,Fe[Ae++]=re;for(var st=et.length-1;st>=0;st--)Fe[Ae++]=et[st];for(var vt=0;vt0?ae.forEach(function(re){B.emit("operations",re)}):(Rr!==null&&(fu=!0),B.getFiberRoots(z).forEach(function(re){e0(tu=ei(Ei(re.current)),re.current),Pu&&re.memoizedInteractions!=null&&(rl={changeDescriptions:es?new Map:null,durations:[],commitTime:Ql()-Zu,interactions:Array.from(re.memoizedInteractions).map(function(Fe){return Wt(Wt({},Fe),{},{timestamp:Fe.timestamp-Zu})}),maxActualDuration:0,priorityLevel:null}),Jr(re.current,null,!1,!1),yu(),tu=-1}))},getBestMatchForTrackedPath:function(){if(Rr===null||to===null)return null;for(var ae=to;ae!==null&&Qu(ae);)ae=ae.return;return ae===null?null:{id:ei(Ei(ae)),isFullMatch:nu===Rr.length-1}},getDisplayNameForFiberID:function(ae){var re=Z0.get(ae);return re!=null?ge(re):null},getFiberIDForNative:function(ae){var re=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Fe=G.findFiberByHostInstance(ae);if(Fe!=null){if(re)for(;Fe!==null&&Qu(Fe);)Fe=Fe.return;return ei(Ei(Fe))}return null},getInstanceAndStyle:function(ae){var re=null,Fe=null,Ae=Vu(ae);return Ae!==null&&(re=Ae.stateNode,Ae.memoizedProps!==null&&(Fe=Ae.memoizedProps.style)),{instance:re,style:Fe}},getOwnersList:function(ae){var re=Vu(ae);if(re==null)return null;var Fe=re._debugOwner,Ae=[{displayName:ge(re)||"Anonymous",id:ae,type:Tu(re)}];if(Fe)for(var st=Fe;st!==null;)Ae.unshift({displayName:ge(st)||"Anonymous",id:ei(Ei(st)),type:Tu(st)}),st=st._debugOwner||null;return Ae},getPathForElement:function(ae){var re=Z0.get(ae);if(re==null)return null;for(var Fe=[];re!==null;)Fe.push(E0(re)),re=re.return;return Fe.reverse(),Fe},getProfilingData:function(){var ae=[];if(_s===null)throw Error("getProfilingData() called before any profiling data was recorded");return _s.forEach(function(re,Fe){var Ae=[],st=[],vt=new Map,Qt=new Map,On=Cl!==null&&Cl.get(Fe)||"Unknown";O0!=null&&O0.forEach(function(Sn,_n){ho!=null&&ho.get(_n)===Fe&&st.push([_n,Sn])}),re.forEach(function(Sn,_n){var Tn=Sn.changeDescriptions,ir=Sn.durations,Bt=Sn.interactions,Fi=Sn.maxActualDuration,Ar=Sn.priorityLevel,mr=Sn.commitTime,Y=[];Bt.forEach(function(Di){vt.has(Di.id)||vt.set(Di.id,Di),Y.push(Di.id);var ru=Qt.get(Di.id);ru!=null?ru.push(_n):Qt.set(Di.id,[_n])});for(var ri=[],ii=[],Vr=0;Vr1?Kn.set(Tn,ir-1):Kn.delete(Tn),ni.delete(Sn)}(tu),ti(Fe,!1))}else e0(tu,Fe),Jr(Fe,null,!1,!1);if(Pu&&st){var On=_s.get(tu);On!=null?On.push(rl):_s.set(tu,[rl])}yu(),Io&&B.emit("traceUpdates",bo),tu=-1},handleCommitFiberUnmount:function(ae){ti(ae,!1)},inspectElement:function(ae,re){if(zi(ae)){if(re!=null){A0(re);var Fe=null;return re[0]==="hooks"&&(Fe="hooks"),{id:ae,type:"hydrated-path",path:re,value:Ri(Uu(Xi,re),Hi(null,Fe),re)}}return{id:ae,type:"no-change"}}if(Hs=!1,Xi!==null&&Xi.id===ae||(R0={}),(Xi=sa(ae))===null)return{id:ae,type:"not-found"};re!=null&&A0(re),function(st){var vt=st.hooks,Qt=st.id,On=st.props,Sn=Z0.get(Qt);if(Sn!=null){var _n=Sn.elementType,Tn=Sn.stateNode,ir=Sn.tag,Bt=Sn.type;switch(ir){case Ct:case Cr:case An:$.$r=Tn;break;case nt:$.$r={hooks:vt,props:On,type:Bt};break;case rn:$.$r={props:On,type:Bt.render};break;case Nr:case Lr:$.$r={props:On,type:_n!=null&&_n.type!=null?_n.type:Bt};break;default:$.$r=null}}else console.warn('Could not find Fiber with id "'.concat(Qt,'"'))}(Xi);var Ae=Wt({},Xi);return Ae.context=Ri(Ae.context,Hi("context",null)),Ae.hooks=Ri(Ae.hooks,Hi("hooks","hooks")),Ae.props=Ri(Ae.props,Hi("props",null)),Ae.state=Ri(Ae.state,Hi("state",null)),{id:ae,type:"full-data",value:Ae}},logElementToConsole:function(ae){var re=zi(ae)?Xi:sa(ae);if(re!==null){var Fe=typeof console.groupCollapsed=="function";Fe&&console.groupCollapsed("[Click to expand] %c<".concat(re.displayName||"Component"," />"),"color: var(--dom-tag-name-color); font-weight: normal;"),re.props!==null&&console.log("Props:",re.props),re.state!==null&&console.log("State:",re.state),re.hooks!==null&&console.log("Hooks:",re.hooks);var Ae=Tl(ae);Ae!==null&&console.log("Nodes:",Ae),re.source!==null&&console.log("Location:",re.source),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),Fe&&console.groupEnd()}else console.warn('Could not find Fiber with id "'.concat(ae,'"'))},prepareViewAttributeSource:function(ae,re){zi(ae)&&(window.$attribute=Uu(Xi,re))},prepareViewElementSource:function(ae){var re=Z0.get(ae);if(re!=null){var Fe=re.elementType,Ae=re.tag,st=re.type;switch(Ae){case Ct:case Cr:case An:case nt:$.$type=st;break;case rn:$.$type=st.render;break;case Nr:case Lr:$.$type=Fe!=null&&Fe.type!=null?Fe.type:st;break;default:$.$type=null}}else console.warn('Could not find Fiber with id "'.concat(ae,'"'))},overrideSuspense:function(ae,re){if(typeof Fo!="function"||typeof nl!="function")throw new Error("Expected overrideSuspense() to not get called for earlier React versions.");re?($u.add(ae),$u.size===1&&Fo(Es)):($u.delete(ae),$u.size===0&&Fo(gf));var Fe=Z0.get(ae);Fe!=null&&nl(Fe)},overrideValueAtPath:function(ae,re,Fe,Ae,st){var vt=Vu(re);if(vt!==null){var Qt=vt.stateNode;switch(ae){case"context":switch(Ae=Ae.slice(1),vt.tag){case Ct:Ae.length===0?Qt.context=st:Ao(Qt.context,Ae,st),Qt.forceUpdate()}break;case"hooks":typeof au=="function"&&au(vt,Fe,Ae,st);break;case"props":switch(vt.tag){case Ct:vt.pendingProps=bn(Qt.props,Ae,st),Qt.forceUpdate();break;default:typeof J0=="function"&&J0(vt,Ae,st)}break;case"state":switch(vt.tag){case Ct:Ao(Qt.state,Ae,st),Qt.forceUpdate()}}}},renamePath:function(ae,re,Fe,Ae,st){var vt=Vu(re);if(vt!==null){var Qt=vt.stateNode;switch(ae){case"context":switch(Ae=Ae.slice(1),st=st.slice(1),vt.tag){case Ct:Ae.length===0||Xr(Qt.context,Ae,st),Qt.forceUpdate()}break;case"hooks":typeof T0=="function"&&T0(vt,Fe,Ae,st);break;case"props":Qt===null?typeof _i=="function"&&_i(vt,Ae,st):(vt.pendingProps=en(Qt.props,Ae,st),Qt.forceUpdate());break;case"state":Xr(Qt.state,Ae,st),Qt.forceUpdate()}}},renderer:G,setTraceUpdatesEnabled:function(ae){Io=ae},setTrackedPath:Li,startProfiling:aa,stopProfiling:function(){Pu=!1,es=!1},storeAsGlobal:function(ae,re,Fe){if(zi(ae)){var Ae=Uu(Xi,re),st="$reactTemp".concat(Fe);window[st]=Ae,console.log(st),console.log(Ae)}},updateComponentFilters:function(ae){if(Pu)throw Error("Cannot modify filter preferences while profiling");B.getFiberRoots(z).forEach(function(re){tu=ei(Ei(re.current)),Wu(re.current),ti(re.current,!1),tu=-1}),gs(ae),Kn.clear(),B.getFiberRoots(z).forEach(function(re){e0(tu=ei(Ei(re.current)),re.current),Jr(re.current,null,!1,!1),yu(re),tu=-1})}}}var $n;function el(B){return(el=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function ao(B,z,G){if($n===void 0)try{throw Error()}catch(Te){var $=Te.stack.trim().match(/\n( *(at )?)/);$n=$&&$[1]||""}return` -`+$n+B}var I0=!1;function wl(B,z,G){if(!B||I0)return"";var $,Te=Error.prepareStackTrace;Error.prepareStackTrace=void 0,I0=!0;var ge=G.current;G.current=null;try{if(z){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),(typeof Reflect=="undefined"?"undefined":el(Reflect))==="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(He){$=He}Reflect.construct(B,[],Re)}else{try{Re.call()}catch(He){$=He}B.call(Re.prototype)}}else{try{throw Error()}catch(He){$=He}B()}}catch(He){if(He&&$&&typeof He.stack=="string"){for(var Z=He.stack.split(` -`),ke=$.stack.split(` -`),Qe=Z.length-1,ht=ke.length-1;Qe>=1&&ht>=0&&Z[Qe]!==ke[ht];)ht--;for(;Qe>=1&&ht>=0;Qe--,ht--)if(Z[Qe]!==ke[ht]){if(Qe!==1||ht!==1)do if(Qe--,--ht<0||Z[Qe]!==ke[ht])return` -`+Z[Qe].replace(" at new "," at ");while(Qe>=1&&ht>=0);break}}}finally{I0=!1,Error.prepareStackTrace=Te,G.current=ge}var ue=B?B.displayName||B.name:"";return ue?ao(ue):""}function No(B,z,G,$){return wl(B,!1,$)}function wt(B,z,G){var $=B.HostComponent,Te=B.LazyComponent,ge=B.SuspenseComponent,Re=B.SuspenseListComponent,Z=B.FunctionComponent,ke=B.IndeterminateComponent,Qe=B.SimpleMemoComponent,ht=B.ForwardRef,ue=B.Block,He=B.ClassComponent;switch(z.tag){case $:return ao(z.type);case Te:return ao("Lazy");case ge:return ao("Suspense");case Re:return ao("SuspenseList");case Z:case ke:case Qe:return No(z.type,0,0,G);case ht:return No(z.type.render,0,0,G);case ue:return No(z.type._render,0,0,G);case He:return function(nt,Ct,Mt,It){return wl(nt,!0,It)}(z.type,0,0,G);default:return""}}function bt(B,z,G){try{var $="",Te=z;do $+=wt(B,Te,G),Te=Te.return;while(Te);return $}catch(ge){return` -Error generating stack: `+ge.message+` -`+ge.stack}}function Hn(B,z){var G;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(G=function(ke,Qe){if(!!ke){if(typeof ke=="string")return qr(ke,Qe);var ht=Object.prototype.toString.call(ke).slice(8,-1);if(ht==="Object"&&ke.constructor&&(ht=ke.constructor.name),ht==="Map"||ht==="Set")return Array.from(ke);if(ht==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ht))return qr(ke,Qe)}}(B))||z&&B&&typeof B.length=="number"){G&&(B=G);var $=0,Te=function(){};return{s:Te,n:function(){return $>=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:Te}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge,Re=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return Re=ke.done,ke},e:function(ke){Z=!0,ge=ke},f:function(){try{Re||G.return==null||G.return()}finally{if(Z)throw ge}}}}function qr(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);G0?Qe[Qe.length-1]:null,He=ue!==null&&(Qr.test(ue)||Ou.test(ue));if(!He){var nt,Ct=Hn(h0.values());try{for(Ct.s();!(nt=Ct.n()).done;){var Mt=nt.value,It=Mt.currentDispatcherRef,sn=Mt.getCurrentFiber,rn=Mt.workTagMap,Lt=sn();if(Lt!=null){var Dn=bt(rn,Lt,It);Dn!==""&&Qe.push(Dn);break}}}catch(dr){Ct.e(dr)}finally{Ct.f()}}}catch(dr){}ge.apply(void 0,Qe)};Re.__REACT_DEVTOOLS_ORIGINAL_METHOD__=ge,Ni[Te]=Re}catch(Z){}})}}function ju(B){return(ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function vs(B,z){for(var G=0;GB.length)&&(z=B.length);for(var G=0,$=new Array(z);G1?Z-1:0),Qe=1;Qe0?ue[ue.length-1]:0),ue.push(un),Z.set($e,Qe(Pt._topLevelWrapper));try{var fn=it.apply(this,Dt);return ue.pop(),fn}catch(wr){throw ue=[],wr}finally{if(ue.length===0){var Jn=Z.get($e);if(Jn===void 0)throw new Error("Expected to find root ID.");dr(Jn)}}},performUpdateIfNecessary:function(it,Dt){var $e=Dt[0];if(S0($e)===9)return it.apply(this,Dt);var Pt=Qe($e);ue.push(Pt);var un=Qn($e);try{var fn=it.apply(this,Dt),Jn=Qn($e);return ht(un,Jn)||Ct($e,Pt,Jn),ue.pop(),fn}catch(au){throw ue=[],au}finally{if(ue.length===0){var wr=Z.get($e);if(wr===void 0)throw new Error("Expected to find root ID.");dr(wr)}}},receiveComponent:function(it,Dt){var $e=Dt[0];if(S0($e)===9)return it.apply(this,Dt);var Pt=Qe($e);ue.push(Pt);var un=Qn($e);try{var fn=it.apply(this,Dt),Jn=Qn($e);return ht(un,Jn)||Ct($e,Pt,Jn),ue.pop(),fn}catch(au){throw ue=[],au}finally{if(ue.length===0){var wr=Z.get($e);if(wr===void 0)throw new Error("Expected to find root ID.");dr(wr)}}},unmountComponent:function(it,Dt){var $e=Dt[0];if(S0($e)===9)return it.apply(this,Dt);var Pt=Qe($e);ue.push(Pt);try{var un=it.apply(this,Dt);return ue.pop(),function(Jn,wr){rn.push(wr),ge.delete(wr)}(0,Pt),un}catch(Jn){throw ue=[],Jn}finally{if(ue.length===0){var fn=Z.get($e);if(fn===void 0)throw new Error("Expected to find root ID.");dr(fn)}}}}));var It=[],sn=new Map,rn=[],Lt=0,Dn=null;function dr(it){if(It.length!==0||rn.length!==0||Dn!==null){var Dt=rn.length+(Dn===null?0:1),$e=new Array(3+Lt+(Dt>0?2+Dt:0)+It.length),Pt=0;if($e[Pt++]=z,$e[Pt++]=it,$e[Pt++]=Lt,sn.forEach(function(Jn,wr){$e[Pt++]=wr.length;for(var au=G0(wr),Nu=0;Nu0){$e[Pt++]=2,$e[Pt++]=Dt;for(var un=0;un"),"color: var(--dom-tag-name-color); font-weight: normal;"),Dt.props!==null&&console.log("Props:",Dt.props),Dt.state!==null&&console.log("State:",Dt.state),Dt.context!==null&&console.log("Context:",Dt.context);var Pt=Te(it);Pt!==null&&console.log("Node:",Pt),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),$e&&console.groupEnd()}else console.warn('Could not find element with id "'.concat(it,'"'))},overrideSuspense:function(){throw new Error("overrideSuspense not supported by this renderer")},overrideValueAtPath:function(it,Dt,$e,Pt,un){var fn=ge.get(Dt);if(fn!=null){var Jn=fn._instance;if(Jn!=null)switch(it){case"context":Ao(Jn.context,Pt,un),m0(Jn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var wr=fn._currentElement;fn._currentElement=Q0(Q0({},wr),{},{props:bn(wr.props,Pt,un)}),m0(Jn);break;case"state":Ao(Jn.state,Pt,un),m0(Jn)}}},renamePath:function(it,Dt,$e,Pt,un){var fn=ge.get(Dt);if(fn!=null){var Jn=fn._instance;if(Jn!=null)switch(it){case"context":Xr(Jn.context,Pt,un),m0(Jn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var wr=fn._currentElement;fn._currentElement=Q0(Q0({},wr),{},{props:en(wr.props,Pt,un)}),m0(Jn);break;case"state":Xr(Jn.state,Pt,un),m0(Jn)}}},prepareViewAttributeSource:function(it,Dt){var $e=Lr(it);$e!==null&&(window.$attribute=Uu($e,Dt))},prepareViewElementSource:function(it){var Dt=ge.get(it);if(Dt!=null){var $e=Dt._currentElement;$e!=null?$.$type=$e.type:console.warn('Could not find element with id "'.concat(it,'"'))}else console.warn('Could not find instance with id "'.concat(it,'"'))},renderer:G,setTraceUpdatesEnabled:function(it){},setTrackedPath:function(it){},startProfiling:function(){},stopProfiling:function(){},storeAsGlobal:function(it,Dt,$e){var Pt=Lr(it);if(Pt!==null){var un=Uu(Pt,Dt),fn="$reactTemp".concat($e);window[fn]=un,console.log(fn),console.log(un)}},updateComponentFilters:function(it){}}}function fi(B,z){var G=!1,$={bottom:0,left:0,right:0,top:0},Te=z[B];if(Te!=null){for(var ge=0,Re=Object.keys($);ge0?"development":"production";var It=Function.prototype.toString;if(Mt.Mount&&Mt.Mount._renderNewRootComponent){var sn=It.call(Mt.Mount._renderNewRootComponent);return sn.indexOf("function")!==0?"production":sn.indexOf("storedMeasure")!==-1?"development":sn.indexOf("should be a pure function")!==-1?sn.indexOf("NODE_ENV")!==-1||sn.indexOf("development")!==-1||sn.indexOf("true")!==-1?"development":sn.indexOf("nextElement")!==-1||sn.indexOf("nextComponent")!==-1?"unminified":"development":sn.indexOf("nextElement")!==-1||sn.indexOf("nextComponent")!==-1?"unminified":"outdated"}}catch(rn){}return"production"}(ke);try{var ue=window.__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__!==!1,He=window.__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__===!0;(ue||He)&&(fo(ke),Jl({appendComponentStack:ue,breakOnConsoleErrors:He}))}catch(Mt){}var nt=B.__REACT_DEVTOOLS_ATTACH__;if(typeof nt=="function"){var Ct=nt(Z,Qe,ke,B);Z.rendererInterfaces.set(Qe,Ct)}return Z.emit("renderer",{id:Qe,renderer:ke,reactBuildType:ht}),Qe},on:function(ke,Qe){ge[ke]||(ge[ke]=[]),ge[ke].push(Qe)},off:function(ke,Qe){if(ge[ke]){var ht=ge[ke].indexOf(Qe);ht!==-1&&ge[ke].splice(ht,1),ge[ke].length||delete ge[ke]}},sub:function(ke,Qe){return Z.on(ke,Qe),function(){return Z.off(ke,Qe)}},supportsFiber:!0,checkDCE:function(ke){try{Function.prototype.toString.call(ke).indexOf("^_^")>-1&&(G=!0,setTimeout(function(){throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch(Qe){}},onCommitFiberUnmount:function(ke,Qe){var ht=Te.get(ke);ht!=null&&ht.handleCommitFiberUnmount(Qe)},onCommitFiberRoot:function(ke,Qe,ht){var ue=Z.getFiberRoots(ke),He=Qe.current,nt=ue.has(Qe),Ct=He.memoizedState==null||He.memoizedState.element==null;nt||Ct?nt&&Ct&&ue.delete(Qe):ue.add(Qe);var Mt=Te.get(ke);Mt!=null&&Mt.handleCommitFiberRoot(Qe,ht)}};Object.defineProperty(B,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!1,enumerable:!1,get:function(){return Z}})})(window);var y0=window.__REACT_DEVTOOLS_GLOBAL_HOOK__,Us=[{type:1,value:7,isEnabled:!0}];function ji(B){if(y0!=null){var z=B||{},G=z.host,$=G===void 0?"localhost":G,Te=z.nativeStyleEditorValidAttributes,ge=z.useHttps,Re=ge!==void 0&&ge,Z=z.port,ke=Z===void 0?8097:Z,Qe=z.websocket,ht=z.resolveRNStyle,ue=ht===void 0?null:ht,He=z.isAppActive,nt=Re?"wss":"ws",Ct=null;if((He===void 0?function(){return!0}:He)()){var Mt=null,It=[],sn=nt+"://"+$+":"+ke,rn=Qe||new window.WebSocket(sn);rn.onclose=function(){Mt!==null&&Mt.emit("shutdown"),Lt()},rn.onerror=function(){Lt()},rn.onmessage=function(Dn){var dr;try{if(typeof Dn.data!="string")throw Error();dr=JSON.parse(Dn.data)}catch(er){return void console.error("[React DevTools] Failed to parse JSON: "+Dn.data)}It.forEach(function(er){try{er(dr)}catch(Cr){throw console.log("[React DevTools] Error calling listener",dr),console.log("error:",Cr),Cr}})},rn.onopen=function(){(Mt=new co({listen:function(An){return It.push(An),function(){var Nr=It.indexOf(An);Nr>=0&&It.splice(Nr,1)}},send:function(An,Nr,g0){rn.readyState===rn.OPEN?rn.send(JSON.stringify({event:An,payload:Nr})):(Mt!==null&&Mt.shutdown(),Lt())}})).addListener("inspectElement",function(An){var Nr=An.id,g0=An.rendererID,Lr=Dn.rendererInterfaces[g0];if(Lr!=null){var it=Lr.findNativeNodesForFiberID(Nr);it!=null&&it[0]!=null&&Dn.emit("showNativeHighlight",it[0])}}),Mt.addListener("updateComponentFilters",function(An){Us=An}),window.__REACT_DEVTOOLS_COMPONENT_FILTERS__==null&&Mt.send("overrideComponentFilters",Us);var Dn=new Yn(Mt);if(Dn.addListener("shutdown",function(){y0.emit("shutdown")}),function(An,Nr,g0){if(An==null)return function(){};var Lr=[An.sub("renderer-attached",function($e){var Pt=$e.id,un=($e.renderer,$e.rendererInterface);Nr.setRendererInterface(Pt,un),un.flushInitialOperations()}),An.sub("unsupported-renderer-version",function($e){Nr.onUnsupportedRenderer($e)}),An.sub("operations",Nr.onHookOperations),An.sub("traceUpdates",Nr.onTraceUpdates)],it=function($e,Pt){var un=An.rendererInterfaces.get($e);un==null&&(typeof Pt.findFiberByHostInstance=="function"?un=Is(An,$e,Pt,g0):Pt.ComponentTree&&(un=ac(An,$e,Pt,g0)),un!=null&&An.rendererInterfaces.set($e,un)),un!=null?An.emit("renderer-attached",{id:$e,renderer:Pt,rendererInterface:un}):An.emit("unsupported-renderer-version",$e)};An.renderers.forEach(function($e,Pt){it(Pt,$e)}),Lr.push(An.sub("renderer",function($e){var Pt=$e.id,un=$e.renderer;it(Pt,un)})),An.emit("react-devtools",Nr),An.reactDevtoolsAgent=Nr;var Dt=function(){Lr.forEach(function($e){return $e()}),An.rendererInterfaces.forEach(function($e){$e.cleanup()}),An.reactDevtoolsAgent=null};Nr.addListener("shutdown",Dt),Lr.push(function(){Nr.removeListener("shutdown",Dt)})}(y0,Dn,window),ue!=null||y0.resolveRNStyle!=null)oa(Mt,Dn,ue||y0.resolveRNStyle,Te||y0.nativeStyleEditorValidAttributes||null);else{var dr,er,Cr=function(){Mt!==null&&oa(Mt,Dn,dr,er)};y0.hasOwnProperty("resolveRNStyle")||Object.defineProperty(y0,"resolveRNStyle",{enumerable:!1,get:function(){return dr},set:function(An){dr=An,Cr()}}),y0.hasOwnProperty("nativeStyleEditorValidAttributes")||Object.defineProperty(y0,"nativeStyleEditorValidAttributes",{enumerable:!1,get:function(){return er},set:function(An){er=An,Cr()}})}}}else Lt()}function Lt(){Ct===null&&(Ct=setTimeout(function(){return ji(B)},2e3))}}}])})});var kC=tt(MC=>{"use strict";Object.defineProperty(MC,"__esModule",{value:!0});AC();var Ob=OC();Ob.connectToDevTools()});var IC=tt(ug=>{"use strict";var NC=ug&&ug.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ug,"__esModule",{value:!0});var LC=b_(),Mb=NC(IS()),FC=NC($p()),ps=bD();process.env.DEV==="true"&&kC();var PC=i=>{i==null||i.unsetMeasureFunc(),i==null||i.freeRecursive()};ug.default=Mb.default({schedulePassiveEffects:LC.unstable_scheduleCallback,cancelPassiveEffects:LC.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>{},resetAfterCommit:i=>{if(i.isStaticDirty){i.isStaticDirty=!1,typeof i.onImmediateRender=="function"&&i.onImmediateRender();return}typeof i.onRender=="function"&&i.onRender()},getChildHostContext:(i,o)=>{let a=i.isInsideText,p=o==="ink-text"||o==="ink-virtual-text";return a===p?i:{isInsideText:p}},shouldSetTextContent:()=>!1,createInstance:(i,o,a,p)=>{if(p.isInsideText&&i==="ink-box")throw new Error(" can\u2019t be nested inside component");let _=i==="ink-text"&&p.isInsideText?"ink-virtual-text":i,t=ps.createNode(_);for(let[k,L]of Object.entries(o))k!=="children"&&(k==="style"?ps.setStyle(t,L):k==="internal_transform"?t.internal_transform=L:k==="internal_static"?t.internal_static=!0:ps.setAttribute(t,k,L));return t},createTextInstance:(i,o,a)=>{if(!a.isInsideText)throw new Error(`Text string "${i}" must be rendered inside component`);return ps.createTextNode(i)},resetTextContent:()=>{},hideTextInstance:i=>{ps.setTextNodeValue(i,"")},unhideTextInstance:(i,o)=>{ps.setTextNodeValue(i,o)},getPublicInstance:i=>i,hideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(FC.default.DISPLAY_NONE)},unhideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(FC.default.DISPLAY_FLEX)},appendInitialChild:ps.appendChildNode,appendChild:ps.appendChildNode,insertBefore:ps.insertBeforeNode,finalizeInitialChildren:(i,o,a,p)=>(i.internal_static&&(p.isStaticDirty=!0,p.staticNode=i),!1),supportsMutation:!0,appendChildToContainer:ps.appendChildNode,insertInContainerBefore:ps.insertBeforeNode,removeChildFromContainer:(i,o)=>{ps.removeChildNode(i,o),PC(o.yogaNode)},prepareUpdate:(i,o,a,p,_)=>{i.internal_static&&(_.isStaticDirty=!0);let t={},k=Object.keys(p);for(let L of k)if(p[L]!==a[L]){if(L==="style"&&typeof p.style=="object"&&typeof a.style=="object"){let C=p.style,U=a.style,H=Object.keys(C);for(let W of H){if(W==="borderStyle"||W==="borderColor"){if(typeof t.style!="object"){let ne={};t.style=ne}t.style.borderStyle=C.borderStyle,t.style.borderColor=C.borderColor}if(C[W]!==U[W]){if(typeof t.style!="object"){let ne={};t.style=ne}t.style[W]=C[W]}}continue}t[L]=p[L]}return t},commitUpdate:(i,o)=>{for(let[a,p]of Object.entries(o))a!=="children"&&(a==="style"?ps.setStyle(i,p):a==="internal_transform"?i.internal_transform=p:a==="internal_static"?i.internal_static=!0:ps.setAttribute(i,a,p))},commitTextUpdate:(i,o,a)=>{ps.setTextNodeValue(i,a)},removeChild:(i,o)=>{ps.removeChildNode(i,o),PC(o.yogaNode)}})});var BC=tt((pq,bC)=>{"use strict";bC.exports=(i,o=1,a)=>{if(a=Ht({indent:" ",includeEmptyLines:!1},a),typeof i!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof i}\``);if(typeof o!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof o}\``);if(typeof a.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof a.indent}\``);if(o===0)return i;let p=a.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return i.replace(p,a.indent.repeat(o))}});var UC=tt(og=>{"use strict";var kb=og&&og.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(og,"__esModule",{value:!0});var $_=kb($p());og.default=i=>i.getComputedWidth()-i.getComputedPadding($_.default.EDGE_LEFT)-i.getComputedPadding($_.default.EDGE_RIGHT)-i.getComputedBorder($_.default.EDGE_LEFT)-i.getComputedBorder($_.default.EDGE_RIGHT)});var zC=tt((vq,jC)=>{jC.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var qC=tt((mq,n3)=>{"use strict";var HC=zC();n3.exports=HC;n3.exports.default=HC});var VC=tt((yq,WC)=>{"use strict";WC.exports=(i,o=process.argv)=>{let a=i.startsWith("-")?"":i.length===1?"-":"--",p=o.indexOf(a+i),_=o.indexOf("--");return p!==-1&&(_===-1||p<_)}});var KC=tt((gq,GC)=>{"use strict";var Nb=require("os"),YC=require("tty"),df=VC(),{env:Ko}=process,v2;df("no-color")||df("no-colors")||df("color=false")||df("color=never")?v2=0:(df("color")||df("colors")||df("color=true")||df("color=always"))&&(v2=1);"FORCE_COLOR"in Ko&&(Ko.FORCE_COLOR==="true"?v2=1:Ko.FORCE_COLOR==="false"?v2=0:v2=Ko.FORCE_COLOR.length===0?1:Math.min(parseInt(Ko.FORCE_COLOR,10),3));function r3(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function i3(i,o){if(v2===0)return 0;if(df("color=16m")||df("color=full")||df("color=truecolor"))return 3;if(df("color=256"))return 2;if(i&&!o&&v2===void 0)return 0;let a=v2||0;if(Ko.TERM==="dumb")return a;if(process.platform==="win32"){let p=Nb.release().split(".");return Number(p[0])>=10&&Number(p[2])>=10586?Number(p[2])>=14931?3:2:1}if("CI"in Ko)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(p=>p in Ko)||Ko.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in Ko)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ko.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in Ko)return 1;if(Ko.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ko){let p=parseInt((Ko.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ko.TERM_PROGRAM){case"iTerm.app":return p>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ko.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ko.TERM)||"COLORTERM"in Ko?1:a}function Lb(i){let o=i3(i,i&&i.isTTY);return r3(o)}GC.exports={supportsColor:Lb,stdout:r3(i3(!0,YC.isatty(1))),stderr:r3(i3(!0,YC.isatty(2)))}});var QC=tt((_q,XC)=>{"use strict";var Fb=(i,o,a)=>{let p=i.indexOf(o);if(p===-1)return i;let _=o.length,t=0,k="";do k+=i.substr(t,p-t)+o+a,t=p+_,p=i.indexOf(o,t);while(p!==-1);return k+=i.substr(t),k},Pb=(i,o,a,p)=>{let _=0,t="";do{let k=i[p-1]==="\r";t+=i.substr(_,(k?p-1:p)-_)+o+(k?`\r -`:` -`)+a,_=p+1,p=i.indexOf(` -`,_)}while(p!==-1);return t+=i.substr(_),t};XC.exports={stringReplaceAll:Fb,stringEncaseCRLFWithFirstIndex:Pb}});var t6=tt((Eq,JC)=>{"use strict";var Ib=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ZC=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,bb=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Bb=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Ub=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function $C(i){let o=i[0]==="u",a=i[1]==="{";return o&&!a&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):o&&a?String.fromCodePoint(parseInt(i.slice(2,-1),16)):Ub.get(i)||i}function jb(i,o){let a=[],p=o.trim().split(/\s*,\s*/g),_;for(let t of p){let k=Number(t);if(!Number.isNaN(k))a.push(k);else if(_=t.match(bb))a.push(_[2].replace(Bb,(L,O,C)=>O?$C(O):C));else throw new Error(`Invalid Chalk template style argument: ${t} (in style '${i}')`)}return a}function zb(i){ZC.lastIndex=0;let o=[],a;for(;(a=ZC.exec(i))!==null;){let p=a[1];if(a[2]){let _=jb(p,a[2]);o.push([p].concat(_))}else o.push([p])}return o}function e6(i,o){let a={};for(let _ of o)for(let t of _.styles)a[t[0]]=_.inverse?null:t.slice(1);let p=i;for(let[_,t]of Object.entries(a))if(!!Array.isArray(t)){if(!(_ in p))throw new Error(`Unknown Chalk style: ${_}`);p=t.length>0?p[_](...t):p[_]}return p}JC.exports=(i,o)=>{let a=[],p=[],_=[];if(o.replace(Ib,(t,k,L,O,C,U)=>{if(k)_.push($C(k));else if(O){let H=_.join("");_=[],p.push(a.length===0?H:e6(i,a)(H)),a.push({inverse:L,styles:zb(O)})}else if(C){if(a.length===0)throw new Error("Found extraneous } in Chalk template literal");p.push(e6(i,a)(_.join(""))),_=[],a.pop()}else _.push(U)}),p.push(_.join("")),a.length>0){let t=`Chalk template literal is missing ${a.length} closing bracket${a.length===1?"":"s"} (\`}\`)`;throw new Error(t)}return p.join("")}});var i4=tt((Dq,n6)=>{"use strict";var lg=H_(),{stdout:u3,stderr:o3}=KC(),{stringReplaceAll:Hb,stringEncaseCRLFWithFirstIndex:qb}=QC(),{isArray:e4}=Array,r6=["ansi","ansi","ansi256","ansi16m"],Qv=Object.create(null),Wb=(i,o={})=>{if(o.level&&!(Number.isInteger(o.level)&&o.level>=0&&o.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let a=u3?u3.level:0;i.level=o.level===void 0?a:o.level},i6=class{constructor(o){return u6(o)}},u6=i=>{let o={};return Wb(o,i),o.template=(...a)=>o6(o.template,...a),Object.setPrototypeOf(o,t4.prototype),Object.setPrototypeOf(o.template,o),o.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},o.template.Instance=i6,o.template};function t4(i){return u6(i)}for(let[i,o]of Object.entries(lg))Qv[i]={get(){let a=n4(this,l3(o.open,o.close,this._styler),this._isEmpty);return Object.defineProperty(this,i,{value:a}),a}};Qv.visible={get(){let i=n4(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:i}),i}};var l6=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let i of l6)Qv[i]={get(){let{level:o}=this;return function(...a){let p=l3(lg.color[r6[o]][i](...a),lg.color.close,this._styler);return n4(this,p,this._isEmpty)}}};for(let i of l6){let o="bg"+i[0].toUpperCase()+i.slice(1);Qv[o]={get(){let{level:a}=this;return function(...p){let _=l3(lg.bgColor[r6[a]][i](...p),lg.bgColor.close,this._styler);return n4(this,_,this._isEmpty)}}}}var Vb=Object.defineProperties(()=>{},Zr(Ht({},Qv),{level:{enumerable:!0,get(){return this._generator.level},set(i){this._generator.level=i}}})),l3=(i,o,a)=>{let p,_;return a===void 0?(p=i,_=o):(p=a.openAll+i,_=o+a.closeAll),{open:i,close:o,openAll:p,closeAll:_,parent:a}},n4=(i,o,a)=>{let p=(..._)=>e4(_[0])&&e4(_[0].raw)?s6(p,o6(p,..._)):s6(p,_.length===1?""+_[0]:_.join(" "));return Object.setPrototypeOf(p,Vb),p._generator=i,p._styler=o,p._isEmpty=a,p},s6=(i,o)=>{if(i.level<=0||!o)return i._isEmpty?"":o;let a=i._styler;if(a===void 0)return o;let{openAll:p,closeAll:_}=a;if(o.indexOf("")!==-1)for(;a!==void 0;)o=Hb(o,a.close,a.open),a=a.parent;let t=o.indexOf(` -`);return t!==-1&&(o=qb(o,_,p,t)),p+o+_},s3,o6=(i,...o)=>{let[a]=o;if(!e4(a)||!e4(a.raw))return o.join(" ");let p=o.slice(1),_=[a.raw[0]];for(let t=1;t{"use strict";var Gb=sg&&sg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(sg,"__esModule",{value:!0});var ag=Gb(i4()),Yb=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,Kb=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,u4=(i,o)=>o==="foreground"?i:"bg"+i[0].toUpperCase()+i.slice(1);sg.default=(i,o,a)=>{if(!o)return i;if(o in ag.default){let _=u4(o,a);return ag.default[_](i)}if(o.startsWith("#")){let _=u4("hex",a);return ag.default[_](o)(i)}if(o.startsWith("ansi")){let _=Kb.exec(o);if(!_)return i;let t=u4(_[1],a),k=Number(_[2]);return ag.default[t](k)(i)}if(o.startsWith("rgb")||o.startsWith("hsl")||o.startsWith("hsv")||o.startsWith("hwb")){let _=Yb.exec(o);if(!_)return i;let t=u4(_[1],a),k=Number(_[2]),L=Number(_[3]),O=Number(_[4]);return ag.default[t](k,L,O)(i)}return i}});var f6=tt(fg=>{"use strict";var a6=fg&&fg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(fg,"__esModule",{value:!0});var Xb=a6(qC()),f3=a6(a3());fg.default=(i,o,a,p)=>{if(typeof a.style.borderStyle=="string"){let _=a.yogaNode.getComputedWidth(),t=a.yogaNode.getComputedHeight(),k=a.style.borderColor,L=Xb.default[a.style.borderStyle],O=f3.default(L.topLeft+L.horizontal.repeat(_-2)+L.topRight,k,"foreground"),C=(f3.default(L.vertical,k,"foreground")+` -`).repeat(t-2),U=f3.default(L.bottomLeft+L.horizontal.repeat(_-2)+L.bottomRight,k,"foreground");p.write(i,o,O,{transformers:[]}),p.write(i,o+1,C,{transformers:[]}),p.write(i+_-1,o+1,C,{transformers:[]}),p.write(i,o+t-1,U,{transformers:[]})}}});var d6=tt(cg=>{"use strict";var rh=cg&&cg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(cg,"__esModule",{value:!0});var Qb=rh($p()),Jb=rh(CD()),Zb=rh(BC()),$b=rh(FD()),eB=rh(UC()),tB=rh(ID()),nB=rh(f6()),rB=(i,o)=>{var a;let p=(a=i.childNodes[0])===null||a===void 0?void 0:a.yogaNode;if(p){let _=p.getComputedLeft(),t=p.getComputedTop();o=` -`.repeat(t)+Zb.default(o,_)}return o},c6=(i,o,a)=>{var p;let{offsetX:_=0,offsetY:t=0,transformers:k=[],skipStaticElements:L}=a;if(L&&i.internal_static)return;let{yogaNode:O}=i;if(O){if(O.getDisplay()===Qb.default.DISPLAY_NONE)return;let C=_+O.getComputedLeft(),U=t+O.getComputedTop(),H=k;if(typeof i.internal_transform=="function"&&(H=[i.internal_transform,...k]),i.nodeName==="ink-text"){let W=tB.default(i);if(W.length>0){let ne=Jb.default(W),m=eB.default(O);if(ne>m){let he=(p=i.style.textWrap)!==null&&p!==void 0?p:"wrap";W=$b.default(W,m,he)}W=rB(i,W),o.write(C,U,W,{transformers:H})}return}if(i.nodeName==="ink-box"&&nB.default(C,U,i,o),i.nodeName==="ink-root"||i.nodeName==="ink-box")for(let W of i.childNodes)c6(W,o,{offsetX:C,offsetY:U,transformers:H,skipStaticElements:L})}};cg.default=c6});var h6=tt((Cq,p6)=>{"use strict";p6.exports=i=>{i=Object.assign({onlyFirst:!1},i);let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i.onlyFirst?void 0:"g")}});var m6=tt((xq,c3)=>{"use strict";var iB=h6(),v6=i=>typeof i=="string"?i.replace(iB(),""):i;c3.exports=v6;c3.exports.default=v6});var _6=tt((Rq,y6)=>{"use strict";var g6="[\uD800-\uDBFF][\uDC00-\uDFFF]";y6.exports=i=>i&&i.exact?new RegExp(`^${g6}$`):new RegExp(g6,"g")});var D6=tt((Aq,d3)=>{"use strict";var uB=m6(),oB=_6(),E6=i=>uB(i).replace(oB()," ").length;d3.exports=E6;d3.exports.default=E6});var C6=tt(dg=>{"use strict";var w6=dg&&dg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(dg,"__esModule",{value:!0});var S6=w6(ND()),lB=w6(D6()),T6=class{constructor(o){this.writes=[];let{width:a,height:p}=o;this.width=a,this.height=p}write(o,a,p,_){let{transformers:t}=_;!p||this.writes.push({x:o,y:a,text:p,transformers:t})}get(){let o=[];for(let p=0;pp.trimRight()).join(` -`),height:o.length}}};dg.default=T6});var A6=tt(pg=>{"use strict";var p3=pg&&pg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(pg,"__esModule",{value:!0});var sB=p3($p()),x6=p3(d6()),R6=p3(C6());pg.default=(i,o)=>{var a;if(i.yogaNode.setWidth(o),i.yogaNode){i.yogaNode.calculateLayout(void 0,void 0,sB.default.DIRECTION_LTR);let p=new R6.default({width:i.yogaNode.getComputedWidth(),height:i.yogaNode.getComputedHeight()});x6.default(i,p,{skipStaticElements:!0});let _;((a=i.staticNode)===null||a===void 0?void 0:a.yogaNode)&&(_=new R6.default({width:i.staticNode.yogaNode.getComputedWidth(),height:i.staticNode.yogaNode.getComputedHeight()}),x6.default(i.staticNode,_,{skipStaticElements:!1}));let{output:t,height:k}=p.get();return{output:t,outputHeight:k,staticOutput:_?`${_.get().output} -`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var N6=tt((kq,O6)=>{"use strict";var M6=require("stream"),k6=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],h3={},aB=i=>{let o=new M6.PassThrough,a=new M6.PassThrough;o.write=_=>i("stdout",_),a.write=_=>i("stderr",_);let p=new console.Console(o,a);for(let _ of k6)h3[_]=console[_],console[_]=p[_];return()=>{for(let _ of k6)console[_]=h3[_];h3={}}};O6.exports=aB});var m3=tt(v3=>{"use strict";Object.defineProperty(v3,"__esModule",{value:!0});v3.default=new WeakMap});var g3=tt(y3=>{"use strict";Object.defineProperty(y3,"__esModule",{value:!0});var fB=Mi(),L6=fB.createContext({exit:()=>{}});L6.displayName="InternalAppContext";y3.default=L6});var E3=tt(_3=>{"use strict";Object.defineProperty(_3,"__esModule",{value:!0});var cB=Mi(),F6=cB.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});F6.displayName="InternalStdinContext";_3.default=F6});var w3=tt(D3=>{"use strict";Object.defineProperty(D3,"__esModule",{value:!0});var dB=Mi(),P6=dB.createContext({stdout:void 0,write:()=>{}});P6.displayName="InternalStdoutContext";D3.default=P6});var T3=tt(S3=>{"use strict";Object.defineProperty(S3,"__esModule",{value:!0});var pB=Mi(),I6=pB.createContext({stderr:void 0,write:()=>{}});I6.displayName="InternalStderrContext";S3.default=I6});var o4=tt(C3=>{"use strict";Object.defineProperty(C3,"__esModule",{value:!0});var hB=Mi(),b6=hB.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});b6.displayName="InternalFocusContext";C3.default=b6});var U6=tt((Bq,B6)=>{"use strict";var vB=/[|\\{}()[\]^$+*?.-]/g;B6.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(vB,"\\$&")}});var q6=tt((Uq,j6)=>{"use strict";var mB=U6(),z6=[].concat(require("module").builtinModules,"bootstrap_node","node").map(i=>new RegExp(`(?:\\(${i}\\.js:\\d+:\\d+\\)$|^\\s*at ${i}\\.js:\\d+:\\d+$)`));z6.push(/\(internal\/[^:]+:\d+:\d+\)$/,/\s*at internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var l4=class{constructor(o){o=Ht({ignoredPackages:[]},o),"internals"in o||(o.internals=l4.nodeInternals()),"cwd"in o||(o.cwd=process.cwd()),this._cwd=o.cwd.replace(/\\/g,"/"),this._internals=[].concat(o.internals,yB(o.ignoredPackages)),this._wrapCallSite=o.wrapCallSite||!1}static nodeInternals(){return[...z6]}clean(o,a=0){a=" ".repeat(a),Array.isArray(o)||(o=o.split(` -`)),!/^\s*at /.test(o[0])&&/^\s*at /.test(o[1])&&(o=o.slice(1));let p=!1,_=null,t=[];return o.forEach(k=>{if(k=k.replace(/\\/g,"/"),this._internals.some(O=>O.test(k)))return;let L=/^\s*at /.test(k);p?k=k.trimEnd().replace(/^(\s+)at /,"$1"):(k=k.trim(),L&&(k=k.slice(3))),k=k.replace(`${this._cwd}/`,""),k&&(L?(_&&(t.push(_),_=null),t.push(k)):(p=!0,_=k))}),t.map(k=>`${a}${k} -`).join("")}captureString(o,a=this.captureString){typeof o=="function"&&(a=o,o=Infinity);let{stackTraceLimit:p}=Error;o&&(Error.stackTraceLimit=o);let _={};Error.captureStackTrace(_,a);let{stack:t}=_;return Error.stackTraceLimit=p,this.clean(t)}capture(o,a=this.capture){typeof o=="function"&&(a=o,o=Infinity);let{prepareStackTrace:p,stackTraceLimit:_}=Error;Error.prepareStackTrace=(L,O)=>this._wrapCallSite?O.map(this._wrapCallSite):O,o&&(Error.stackTraceLimit=o);let t={};Error.captureStackTrace(t,a);let{stack:k}=t;return Object.assign(Error,{prepareStackTrace:p,stackTraceLimit:_}),k}at(o=this.at){let[a]=this.capture(1,o);if(!a)return{};let p={line:a.getLineNumber(),column:a.getColumnNumber()};H6(p,a.getFileName(),this._cwd),a.isConstructor()&&(p.constructor=!0),a.isEval()&&(p.evalOrigin=a.getEvalOrigin()),a.isNative()&&(p.native=!0);let _;try{_=a.getTypeName()}catch(L){}_&&_!=="Object"&&_!=="[object Object]"&&(p.type=_);let t=a.getFunctionName();t&&(p.function=t);let k=a.getMethodName();return k&&t!==k&&(p.method=k),p}parseLine(o){let a=o&&o.match(gB);if(!a)return null;let p=a[1]==="new",_=a[2],t=a[3],k=a[4],L=Number(a[5]),O=Number(a[6]),C=a[7],U=a[8],H=a[9],W=a[10]==="native",ne=a[11]===")",m,he={};if(U&&(he.line=Number(U)),H&&(he.column=Number(H)),ne&&C){let Ee=0;for(let ve=C.length-1;ve>0;ve--)if(C.charAt(ve)===")")Ee++;else if(C.charAt(ve)==="("&&C.charAt(ve-1)===" "&&(Ee--,Ee===-1&&C.charAt(ve-1)===" ")){let se=C.slice(0,ve-1);C=C.slice(ve+1),_+=` (${se}`;break}}if(_){let Ee=_.match(_B);Ee&&(_=Ee[1],m=Ee[2])}return H6(he,C,this._cwd),p&&(he.constructor=!0),t&&(he.evalOrigin=t,he.evalLine=L,he.evalColumn=O,he.evalFile=k&&k.replace(/\\/g,"/")),W&&(he.native=!0),_&&(he.function=_),m&&_!==m&&(he.method=m),he}};function H6(i,o,a){o&&(o=o.replace(/\\/g,"/"),o.startsWith(`${a}/`)&&(o=o.slice(a.length+1)),i.file=o)}function yB(i){if(i.length===0)return[];let o=i.map(a=>mB(a));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${o.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var gB=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),_B=/^(.*?) \[as (.*?)\]$/;j6.exports=l4});var V6=tt((jq,W6)=>{"use strict";W6.exports=(i,o)=>i.replace(/^\t+/gm,a=>" ".repeat(a.length*(o||2)))});var Y6=tt((zq,G6)=>{"use strict";var EB=V6(),DB=(i,o)=>{let a=[],p=i-o,_=i+o;for(let t=p;t<=_;t++)a.push(t);return a};G6.exports=(i,o,a)=>{if(typeof i!="string")throw new TypeError("Source code is missing.");if(!o||o<1)throw new TypeError("Line number must start from `1`.");if(i=EB(i).split(/\r?\n/),!(o>i.length))return a=Ht({around:3},a),DB(o,a.around).filter(p=>i[p-1]!==void 0).map(p=>({line:p,value:i[p-1]}))}});var s4=tt(nc=>{"use strict";var wB=nc&&nc.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),SB=nc&&nc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),TB=nc&&nc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&wB(o,i,a);return SB(o,i),o},CB=nc&&nc.__rest||function(i,o){var a={};for(var p in i)Object.prototype.hasOwnProperty.call(i,p)&&o.indexOf(p)<0&&(a[p]=i[p]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,p=Object.getOwnPropertySymbols(i);_{var{children:a}=i,p=CB(i,["children"]);let _=Object.assign(Object.assign({},p),{marginLeft:p.marginLeft||p.marginX||p.margin||0,marginRight:p.marginRight||p.marginX||p.margin||0,marginTop:p.marginTop||p.marginY||p.margin||0,marginBottom:p.marginBottom||p.marginY||p.margin||0,paddingLeft:p.paddingLeft||p.paddingX||p.padding||0,paddingRight:p.paddingRight||p.paddingX||p.padding||0,paddingTop:p.paddingTop||p.paddingY||p.padding||0,paddingBottom:p.paddingBottom||p.paddingY||p.padding||0});return K6.default.createElement("ink-box",{ref:o,style:_},a)});x3.displayName="Box";x3.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};nc.default=x3});var O3=tt(hg=>{"use strict";var R3=hg&&hg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(hg,"__esModule",{value:!0});var xB=R3(Mi()),Jv=R3(i4()),X6=R3(a3()),A3=({color:i,backgroundColor:o,dimColor:a,bold:p,italic:_,underline:t,strikethrough:k,inverse:L,wrap:O,children:C})=>{if(C==null)return null;let U=H=>(a&&(H=Jv.default.dim(H)),i&&(H=X6.default(H,i,"foreground")),o&&(H=X6.default(H,o,"background")),p&&(H=Jv.default.bold(H)),_&&(H=Jv.default.italic(H)),t&&(H=Jv.default.underline(H)),k&&(H=Jv.default.strikethrough(H)),L&&(H=Jv.default.inverse(H)),H);return xB.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:O},internal_transform:U},C)};A3.displayName="Text";A3.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};hg.default=A3});var $6=tt(rc=>{"use strict";var RB=rc&&rc.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),AB=rc&&rc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),OB=rc&&rc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&RB(o,i,a);return AB(o,i),o},vg=rc&&rc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(rc,"__esModule",{value:!0});var Q6=OB(require("fs")),Xo=vg(Mi()),J6=vg(q6()),MB=vg(Y6()),Z1=vg(s4()),zc=vg(O3()),Z6=new J6.default({cwd:process.cwd(),internals:J6.default.nodeInternals()}),kB=({error:i})=>{let o=i.stack?i.stack.split(` -`).slice(1):void 0,a=o?Z6.parseLine(o[0]):void 0,p,_=0;if((a==null?void 0:a.file)&&(a==null?void 0:a.line)&&Q6.existsSync(a.file)){let t=Q6.readFileSync(a.file,"utf8");if(p=MB.default(t,a.line),p)for(let{line:k}of p)_=Math.max(_,String(k).length)}return Xo.default.createElement(Z1.default,{flexDirection:"column",padding:1},Xo.default.createElement(Z1.default,null,Xo.default.createElement(zc.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Xo.default.createElement(zc.default,null," ",i.message)),a&&Xo.default.createElement(Z1.default,{marginTop:1},Xo.default.createElement(zc.default,{dimColor:!0},a.file,":",a.line,":",a.column)),a&&p&&Xo.default.createElement(Z1.default,{marginTop:1,flexDirection:"column"},p.map(({line:t,value:k})=>Xo.default.createElement(Z1.default,{key:t},Xo.default.createElement(Z1.default,{width:_+1},Xo.default.createElement(zc.default,{dimColor:t!==a.line,backgroundColor:t===a.line?"red":void 0,color:t===a.line?"white":void 0},String(t).padStart(_," "),":")),Xo.default.createElement(zc.default,{key:t,backgroundColor:t===a.line?"red":void 0,color:t===a.line?"white":void 0}," "+k)))),i.stack&&Xo.default.createElement(Z1.default,{marginTop:1,flexDirection:"column"},i.stack.split(` -`).slice(1).map(t=>{let k=Z6.parseLine(t);return k?Xo.default.createElement(Z1.default,{key:t},Xo.default.createElement(zc.default,{dimColor:!0},"- "),Xo.default.createElement(zc.default,{dimColor:!0,bold:!0},k.function),Xo.default.createElement(zc.default,{dimColor:!0,color:"gray"}," ","(",k.file,":",k.line,":",k.column,")")):Xo.default.createElement(Z1.default,{key:t},Xo.default.createElement(zc.default,{dimColor:!0},"- "),Xo.default.createElement(zc.default,{dimColor:!0,bold:!0},t))})))};rc.default=kB});var tx=tt(ic=>{"use strict";var NB=ic&&ic.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),LB=ic&&ic.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),FB=ic&&ic.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&NB(o,i,a);return LB(o,i),o},ih=ic&&ic.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ic,"__esModule",{value:!0});var uh=FB(Mi()),ex=ih(nD()),PB=ih(g3()),IB=ih(E3()),bB=ih(w3()),BB=ih(T3()),UB=ih(o4()),jB=ih($6()),zB=" ",HB="",qB="",M3=class extends uh.PureComponent{constructor(){super(...arguments);this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=o=>{let{stdin:a}=this.props;if(!this.isRawModeSupported())throw a===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(a.setEncoding("utf8"),o){this.rawModeEnabledCount===0&&(a.addListener("data",this.handleInput),a.resume(),a.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount==0&&(a.setRawMode(!1),a.removeListener("data",this.handleInput),a.pause())},this.handleInput=o=>{o===""&&this.props.exitOnCtrlC&&this.handleExit(),o===qB&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(o===zB&&this.focusNext(),o===HB&&this.focusPrevious())},this.handleExit=o=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(o)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(o=>{let a=o.focusables[0].id;return{activeFocusId:this.findNextFocusable(o)||a}})},this.focusPrevious=()=>{this.setState(o=>{let a=o.focusables[o.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(o)||a}})},this.addFocusable=(o,{autoFocus:a})=>{this.setState(p=>{let _=p.activeFocusId;return!_&&a&&(_=o),{activeFocusId:_,focusables:[...p.focusables,{id:o,isActive:!0}]}})},this.removeFocusable=o=>{this.setState(a=>({activeFocusId:a.activeFocusId===o?void 0:a.activeFocusId,focusables:a.focusables.filter(p=>p.id!==o)}))},this.activateFocusable=o=>{this.setState(a=>({focusables:a.focusables.map(p=>p.id!==o?p:{id:o,isActive:!0})}))},this.deactivateFocusable=o=>{this.setState(a=>({activeFocusId:a.activeFocusId===o?void 0:a.activeFocusId,focusables:a.focusables.map(p=>p.id!==o?p:{id:o,isActive:!1})}))},this.findNextFocusable=o=>{let a=o.focusables.findIndex(p=>p.id===o.activeFocusId);for(let p=a+1;p{let a=o.focusables.findIndex(p=>p.id===o.activeFocusId);for(let p=a-1;p>=0;p--)if(o.focusables[p].isActive)return o.focusables[p].id}}static getDerivedStateFromError(o){return{error:o}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return uh.default.createElement(PB.default.Provider,{value:{exit:this.handleExit}},uh.default.createElement(IB.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},uh.default.createElement(bB.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},uh.default.createElement(BB.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},uh.default.createElement(UB.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?uh.default.createElement(jB.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){ex.default.hide(this.props.stdout)}componentWillUnmount(){ex.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(o){this.handleExit(o)}};ic.default=M3;M3.displayName="InternalApp"});var ux=tt(uc=>{"use strict";var WB=uc&&uc.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),VB=uc&&uc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),GB=uc&&uc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&WB(o,i,a);return VB(o,i),o},oc=uc&&uc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(uc,"__esModule",{value:!0});var YB=oc(Mi()),nx=Z8(),KB=oc(dS()),XB=oc(QE()),QB=oc(_S()),JB=oc(DS()),a4=oc(IC()),ZB=oc(A6()),$B=oc(tD()),eU=oc(N6()),tU=GB(bD()),nU=oc(m3()),rU=oc(tx()),Zv=process.env.CI==="false"?!1:QB.default,rx=()=>{},ix=class{constructor(o){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:a,outputHeight:p,staticOutput:_}=ZB.default(this.rootNode,this.options.stdout.columns||80),t=_&&_!==` -`;if(this.options.debug){t&&(this.fullStaticOutput+=_),this.options.stdout.write(this.fullStaticOutput+a);return}if(Zv){t&&this.options.stdout.write(_),this.lastOutput=a;return}if(t&&(this.fullStaticOutput+=_),p>=this.options.stdout.rows){this.options.stdout.write(XB.default.clearTerminal+this.fullStaticOutput+a),this.lastOutput=a;return}t&&(this.log.clear(),this.options.stdout.write(_),this.log(a)),!t&&a!==this.lastOutput&&this.throttledLog(a),this.lastOutput=a},JB.default(this),this.options=o,this.rootNode=tU.createNode("ink-root"),this.rootNode.onRender=o.debug?this.onRender:nx.throttle(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=KB.default.create(o.stdout),this.throttledLog=o.debug?this.log:nx.throttle(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=a4.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=$B.default(this.unmount,{alwaysLast:!1}),process.env.DEV==="true"&&a4.default.injectIntoDevTools({bundleType:0,version:"16.13.1",rendererPackageName:"ink"}),o.patchConsole&&this.patchConsole(),Zv||(o.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{o.stdout.off("resize",this.onRender)})}render(o){let a=YB.default.createElement(rU.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},o);a4.default.updateContainer(a,this.container,null,rx)}writeToStdout(o){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(o+this.fullStaticOutput+this.lastOutput);return}if(Zv){this.options.stdout.write(o);return}this.log.clear(),this.options.stdout.write(o),this.log(this.lastOutput)}}writeToStderr(o){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(o),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(Zv){this.options.stderr.write(o);return}this.log.clear(),this.options.stderr.write(o),this.log(this.lastOutput)}}unmount(o){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),Zv?this.options.stdout.write(this.lastOutput+` -`):this.options.debug||this.log.done(),this.isUnmounted=!0,a4.default.updateContainer(null,this.container,null,rx),nU.default.delete(this.options.stdout),o instanceof Error?this.rejectExitPromise(o):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((o,a)=>{this.resolveExitPromise=o,this.rejectExitPromise=a})),this.exitPromise}clear(){!Zv&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=eU.default((o,a)=>{o==="stdout"&&this.writeToStdout(a),o==="stderr"&&(a.startsWith("The above error occurred")||this.writeToStderr(a))}))}};uc.default=ix});var lx=tt(mg=>{"use strict";var ox=mg&&mg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(mg,"__esModule",{value:!0});var iU=ox(ux()),f4=ox(m3()),uU=require("stream"),sU=(i,o)=>{let a=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},oU(o)),p=lU(a.stdout,()=>new iU.default(a));return p.render(i),{rerender:p.render,unmount:()=>p.unmount(),waitUntilExit:p.waitUntilExit,cleanup:()=>f4.default.delete(a.stdout),clear:p.clear}};mg.default=sU;var oU=(i={})=>i instanceof uU.Stream?{stdout:i,stdin:process.stdin}:i,lU=(i,o)=>{let a;return f4.default.has(i)?a=f4.default.get(i):(a=o(),f4.default.set(i,a)),a}});var ax=tt($1=>{"use strict";var aU=$1&&$1.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),fU=$1&&$1.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),cU=$1&&$1.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&aU(o,i,a);return fU(o,i),o};Object.defineProperty($1,"__esModule",{value:!0});var yg=cU(Mi()),sx=i=>{let{items:o,children:a,style:p}=i,[_,t]=yg.useState(0),k=yg.useMemo(()=>o.slice(_),[o,_]);yg.useLayoutEffect(()=>{t(o.length)},[o.length]);let L=k.map((C,U)=>a(C,_+U)),O=yg.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},p),[p]);return yg.default.createElement("ink-box",{internal_static:!0,style:O},L)};sx.displayName="Static";$1.default=sx});var cx=tt(gg=>{"use strict";var dU=gg&&gg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(gg,"__esModule",{value:!0});var pU=dU(Mi()),fx=({children:i,transform:o})=>i==null?null:pU.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:o},i);fx.displayName="Transform";gg.default=fx});var px=tt(_g=>{"use strict";var hU=_g&&_g.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_g,"__esModule",{value:!0});var vU=hU(Mi()),dx=({count:i=1})=>vU.default.createElement("ink-text",null,` -`.repeat(i));dx.displayName="Newline";_g.default=dx});var mx=tt(Eg=>{"use strict";var hx=Eg&&Eg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Eg,"__esModule",{value:!0});var mU=hx(Mi()),yU=hx(s4()),vx=()=>mU.default.createElement(yU.default,{flexGrow:1});vx.displayName="Spacer";Eg.default=vx});var c4=tt(Dg=>{"use strict";var gU=Dg&&Dg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Dg,"__esModule",{value:!0});var _U=Mi(),EU=gU(E3()),DU=()=>_U.useContext(EU.default);Dg.default=DU});var gx=tt(wg=>{"use strict";var wU=wg&&wg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(wg,"__esModule",{value:!0});var yx=Mi(),SU=wU(c4()),TU=(i,o={})=>{let{stdin:a,setRawMode:p,internal_exitOnCtrlC:_}=SU.default();yx.useEffect(()=>{if(o.isActive!==!1)return p(!0),()=>{p(!1)}},[o.isActive,p]),yx.useEffect(()=>{if(o.isActive===!1)return;let t=k=>{let L=String(k),O={upArrow:L==="",downArrow:L==="",leftArrow:L==="",rightArrow:L==="",pageDown:L==="[6~",pageUp:L==="[5~",return:L==="\r",escape:L==="",ctrl:!1,shift:!1,tab:L===" "||L==="",backspace:L==="\b",delete:L==="\x7F"||L==="[3~",meta:!1};L<=""&&!O.return&&(L=String.fromCharCode(L.charCodeAt(0)+"a".charCodeAt(0)-1),O.ctrl=!0),L.startsWith("")&&(L=L.slice(1),O.meta=!0);let C=L>="A"&&L<="Z",U=L>="\u0410"&&L<="\u042F";L.length===1&&(C||U)&&(O.shift=!0),O.tab&&L==="[Z"&&(O.shift=!0),(O.tab||O.backspace||O.delete)&&(L=""),(!(L==="c"&&O.ctrl)||!_)&&i(L,O)};return a==null||a.on("data",t),()=>{a==null||a.off("data",t)}},[o.isActive,a,_,i])};wg.default=TU});var _x=tt(Sg=>{"use strict";var CU=Sg&&Sg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Sg,"__esModule",{value:!0});var xU=Mi(),RU=CU(g3()),AU=()=>xU.useContext(RU.default);Sg.default=AU});var Ex=tt(Tg=>{"use strict";var OU=Tg&&Tg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Tg,"__esModule",{value:!0});var MU=Mi(),kU=OU(w3()),NU=()=>MU.useContext(kU.default);Tg.default=NU});var Dx=tt(Cg=>{"use strict";var LU=Cg&&Cg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Cg,"__esModule",{value:!0});var FU=Mi(),PU=LU(T3()),IU=()=>FU.useContext(PU.default);Cg.default=IU});var Sx=tt(xg=>{"use strict";var wx=xg&&xg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(xg,"__esModule",{value:!0});var Rg=Mi(),bU=wx(o4()),BU=wx(c4()),UU=({isActive:i=!0,autoFocus:o=!1}={})=>{let{isRawModeSupported:a,setRawMode:p}=BU.default(),{activeId:_,add:t,remove:k,activate:L,deactivate:O}=Rg.useContext(bU.default),C=Rg.useMemo(()=>Math.random().toString().slice(2,7),[]);return Rg.useEffect(()=>(t(C,{autoFocus:o}),()=>{k(C)}),[C,o]),Rg.useEffect(()=>{i?L(C):O(C)},[i,C]),Rg.useEffect(()=>{if(!(!a||!i))return p(!0),()=>{p(!1)}},[i]),{isFocused:Boolean(C)&&_===C}};xg.default=UU});var Tx=tt(Ag=>{"use strict";var jU=Ag&&Ag.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ag,"__esModule",{value:!0});var zU=Mi(),HU=jU(o4()),qU=()=>{let i=zU.useContext(HU.default);return{enableFocus:i.enableFocus,disableFocus:i.disableFocus,focusNext:i.focusNext,focusPrevious:i.focusPrevious}};Ag.default=qU});var Cx=tt(k3=>{"use strict";Object.defineProperty(k3,"__esModule",{value:!0});k3.default=i=>{var o,a,p,_;return{width:(a=(o=i.yogaNode)===null||o===void 0?void 0:o.getComputedWidth())!==null&&a!==void 0?a:0,height:(_=(p=i.yogaNode)===null||p===void 0?void 0:p.getComputedHeight())!==null&&_!==void 0?_:0}}});var lc=tt(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var WU=lx();Object.defineProperty(Yl,"render",{enumerable:!0,get:function(){return WU.default}});var VU=s4();Object.defineProperty(Yl,"Box",{enumerable:!0,get:function(){return VU.default}});var GU=O3();Object.defineProperty(Yl,"Text",{enumerable:!0,get:function(){return GU.default}});var YU=ax();Object.defineProperty(Yl,"Static",{enumerable:!0,get:function(){return YU.default}});var KU=cx();Object.defineProperty(Yl,"Transform",{enumerable:!0,get:function(){return KU.default}});var XU=px();Object.defineProperty(Yl,"Newline",{enumerable:!0,get:function(){return XU.default}});var QU=mx();Object.defineProperty(Yl,"Spacer",{enumerable:!0,get:function(){return QU.default}});var JU=gx();Object.defineProperty(Yl,"useInput",{enumerable:!0,get:function(){return JU.default}});var ZU=_x();Object.defineProperty(Yl,"useApp",{enumerable:!0,get:function(){return ZU.default}});var $U=c4();Object.defineProperty(Yl,"useStdin",{enumerable:!0,get:function(){return $U.default}});var ej=Ex();Object.defineProperty(Yl,"useStdout",{enumerable:!0,get:function(){return ej.default}});var tj=Dx();Object.defineProperty(Yl,"useStderr",{enumerable:!0,get:function(){return tj.default}});var nj=Sx();Object.defineProperty(Yl,"useFocus",{enumerable:!0,get:function(){return nj.default}});var rj=Tx();Object.defineProperty(Yl,"useFocusManager",{enumerable:!0,get:function(){return rj.default}});var ij=Cx();Object.defineProperty(Yl,"measureElement",{enumerable:!0,get:function(){return ij.default}})});var Px=tt(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});Og.UncontrolledTextInput=void 0;var Nx=Mi(),F3=Mi(),Lx=lc(),sh=i4(),Fx=({value:i,placeholder:o="",focus:a=!0,mask:p,highlightPastedText:_=!1,showCursor:t=!0,onChange:k,onSubmit:L})=>{let[{cursorOffset:O,cursorWidth:C},U]=F3.useState({cursorOffset:(i||"").length,cursorWidth:0});F3.useEffect(()=>{U(he=>{if(!a||!t)return he;let Ee=i||"";return he.cursorOffset>Ee.length-1?{cursorOffset:Ee.length,cursorWidth:0}:he})},[i,a,t]);let H=_?C:0,W=p?p.repeat(i.length):i,ne=W,m=o?sh.grey(o):void 0;if(t&&a){m=o.length>0?sh.inverse(o[0])+sh.grey(o.slice(1)):sh.inverse(" "),ne=W.length>0?"":sh.inverse(" ");let he=0;for(let Ee of W)he>=O-H&&he<=O?ne+=sh.inverse(Ee):ne+=Ee,he++;W.length>0&&O===W.length&&(ne+=sh.inverse(" "))}return Lx.useInput((he,Ee)=>{if(Ee.upArrow||Ee.downArrow||Ee.ctrl&&he==="c"||Ee.tab||Ee.shift&&Ee.tab)return;if(Ee.return){L&&L(i);return}let ve=O,se=i,De=0;Ee.leftArrow?t&&ve--:Ee.rightArrow?t&&ve++:Ee.backspace||Ee.delete?O>0&&(se=i.slice(0,O-1)+i.slice(O,i.length),ve--):(se=i.slice(0,O)+he+i.slice(O,i.length),ve+=he.length,he.length>1&&(De=he.length)),O<0&&(ve=0),O>i.length&&(ve=i.length),U({cursorOffset:ve,cursorWidth:De}),se!==i&&k(se)},{isActive:a}),Nx.createElement(Lx.Text,null,o?W.length>0?ne:m:ne)};Og.default=Fx;Og.UncontrolledTextInput=i=>{let[o,a]=F3.useState("");return Nx.createElement(Fx,Object.assign({},i,{value:o,onChange:a}))}});var bx=tt(E4=>{"use strict";Object.defineProperty(E4,"__esModule",{value:!0});function Mg(i){let o=[...i.caches],a=o.shift();return a===void 0?Ix():{get(p,_,t={miss:()=>Promise.resolve()}){return a.get(p,_,t).catch(()=>Mg({caches:o}).get(p,_,t))},set(p,_){return a.set(p,_).catch(()=>Mg({caches:o}).set(p,_))},delete(p){return a.delete(p).catch(()=>Mg({caches:o}).delete(p))},clear(){return a.clear().catch(()=>Mg({caches:o}).clear())}}}function Ix(){return{get(i,o,a={miss:()=>Promise.resolve()}){return o().then(_=>Promise.all([_,a.miss(_)])).then(([_])=>_)},set(i,o){return Promise.resolve(o)},delete(i){return Promise.resolve()},clear(){return Promise.resolve()}}}E4.createFallbackableCache=Mg;E4.createNullCache=Ix});var Ux=tt((CW,Bx)=>{Bx.exports=bx()});var jx=tt(P3=>{"use strict";Object.defineProperty(P3,"__esModule",{value:!0});function uj(i={serializable:!0}){let o={};return{get(a,p,_={miss:()=>Promise.resolve()}){let t=JSON.stringify(a);if(t in o)return Promise.resolve(i.serializable?JSON.parse(o[t]):o[t]);let k=p(),L=_&&_.miss||(()=>Promise.resolve());return k.then(O=>L(O)).then(()=>k)},set(a,p){return o[JSON.stringify(a)]=i.serializable?JSON.stringify(p):p,Promise.resolve(p)},delete(a){return delete o[JSON.stringify(a)],Promise.resolve()},clear(){return o={},Promise.resolve()}}}P3.createInMemoryCache=uj});var Hx=tt((RW,zx)=>{zx.exports=jx()});var Wx=tt(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});function oj(i,o,a){let p={"x-algolia-api-key":a,"x-algolia-application-id":o};return{headers(){return i===I3.WithinHeaders?p:{}},queryParameters(){return i===I3.WithinQueryParameters?p:{}}}}function lj(i){let o=0,a=()=>(o++,new Promise(p=>{setTimeout(()=>{p(i(a))},Math.min(100*o,1e3))}));return i(a)}function qx(i,o=(a,p)=>Promise.resolve()){return Object.assign(i,{wait(a){return qx(i.then(p=>Promise.all([o(p,a),p])).then(p=>p[1]))}})}function sj(i){let o=i.length-1;for(o;o>0;o--){let a=Math.floor(Math.random()*(o+1)),p=i[o];i[o]=i[a],i[a]=p}return i}function aj(i,o){return Object.keys(o!==void 0?o:{}).forEach(a=>{i[a]=o[a](i)}),i}function fj(i,...o){let a=0;return i.replace(/%s/g,()=>encodeURIComponent(o[a++]))}var cj="4.2.0",dj=i=>()=>i.transporter.requester.destroy(),I3={WithinQueryParameters:0,WithinHeaders:1};sc.AuthMode=I3;sc.addMethods=aj;sc.createAuth=oj;sc.createRetryablePromise=lj;sc.createWaitablePromise=qx;sc.destroy=dj;sc.encode=fj;sc.shuffle=sj;sc.version=cj});var kg=tt((OW,Vx)=>{Vx.exports=Wx()});var Gx=tt(b3=>{"use strict";Object.defineProperty(b3,"__esModule",{value:!0});var pj={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};b3.MethodEnum=pj});var Ng=tt((kW,Yx)=>{Yx.exports=Gx()});var s5=tt(V0=>{"use strict";Object.defineProperty(V0,"__esModule",{value:!0});var Kx=Ng();function B3(i,o){let a=i||{},p=a.data||{};return Object.keys(a).forEach(_=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(_)===-1&&(p[_]=a[_])}),{data:Object.entries(p).length>0?p:void 0,timeout:a.timeout||o,headers:a.headers||{},queryParameters:a.queryParameters||{},cacheable:a.cacheable}}var D4={Read:1,Write:2,Any:3},$v={Up:1,Down:2,Timeouted:3},Xx=2*60*1e3;function U3(i,o=$v.Up){return Zr(Ht({},i),{status:o,lastUpdate:Date.now()})}function Qx(i){return i.status===$v.Up||Date.now()-i.lastUpdate>Xx}function Jx(i){return i.status===$v.Timeouted&&Date.now()-i.lastUpdate<=Xx}function j3(i){return{protocol:i.protocol||"https",url:i.url,accept:i.accept||D4.Any}}function hj(i,o){return Promise.all(o.map(a=>i.get(a,()=>Promise.resolve(U3(a))))).then(a=>{let p=a.filter(L=>Qx(L)),_=a.filter(L=>Jx(L)),t=[...p,..._],k=t.length>0?t.map(L=>j3(L)):o;return{getTimeout(L,O){return(_.length===0&&L===0?1:_.length+3+L)*O},statelessHosts:k}})}var vj=({isTimedOut:i,status:o})=>!i&&~~o==0,mj=i=>{let o=i.status;return i.isTimedOut||vj(i)||~~(o/100)!=2&&~~(o/100)!=4},yj=({status:i})=>~~(i/100)==2,gj=(i,o)=>mj(i)?o.onRetry(i):yj(i)?o.onSucess(i):o.onFail(i);function i5(i,o,a,p){let _=[],t=t5(a,p),k=n5(i,p),L=a.method,O=a.method!==Kx.MethodEnum.Get?{}:Ht(Ht({},a.data),p.data),C=Ht(Ht(Ht({"x-algolia-agent":i.userAgent.value},i.queryParameters),O),p.queryParameters),U=0,H=(W,ne)=>{let m=W.pop();if(m===void 0)throw r5(z3(_));let he={data:t,headers:k,method:L,url:e5(m,a.path,C),connectTimeout:ne(U,i.timeouts.connect),responseTimeout:ne(U,p.timeout)},Ee=se=>{let De={request:he,response:se,host:m,triesLeft:W.length};return _.push(De),De},ve={onSucess:se=>Zx(se),onRetry(se){let De=Ee(se);return se.isTimedOut&&U++,Promise.all([i.logger.info("Retryable failure",H3(De)),i.hostsCache.set(m,U3(m,se.isTimedOut?$v.Timeouted:$v.Down))]).then(()=>H(W,ne))},onFail(se){throw Ee(se),$x(se,z3(_))}};return i.requester.send(he).then(se=>gj(se,ve))};return hj(i.hostsCache,o).then(W=>H([...W.statelessHosts].reverse(),W.getTimeout))}function _j(i){let{hostsCache:o,logger:a,requester:p,requestsCache:_,responsesCache:t,timeouts:k,userAgent:L,hosts:O,queryParameters:C,headers:U}=i,H={hostsCache:o,logger:a,requester:p,requestsCache:_,responsesCache:t,timeouts:k,userAgent:L,headers:U,queryParameters:C,hosts:O.map(W=>j3(W)),read(W,ne){let m=B3(ne,H.timeouts.read),he=()=>i5(H,H.hosts.filter(se=>(se.accept&D4.Read)!=0),W,m);if((m.cacheable!==void 0?m.cacheable:W.cacheable)!==!0)return he();let ve={request:W,mappedRequestOptions:m,transporter:{queryParameters:H.queryParameters,headers:H.headers}};return H.responsesCache.get(ve,()=>H.requestsCache.get(ve,()=>H.requestsCache.set(ve,he()).then(se=>Promise.all([H.requestsCache.delete(ve),se]),se=>Promise.all([H.requestsCache.delete(ve),Promise.reject(se)])).then(([se,De])=>De)),{miss:se=>H.responsesCache.set(ve,se)})},write(W,ne){return i5(H,H.hosts.filter(m=>(m.accept&D4.Write)!=0),W,B3(ne,H.timeouts.write))}};return H}function Ej(i){let o={value:`Algolia for JavaScript (${i})`,add(a){let p=`; ${a.segment}${a.version!==void 0?` (${a.version})`:""}`;return o.value.indexOf(p)===-1&&(o.value=`${o.value}${p}`),o}};return o}function Zx(i){try{return JSON.parse(i.content)}catch(o){throw u5(o.message,i)}}function $x({content:i,status:o},a){let p=i;try{p=JSON.parse(i).message}catch(_){}return o5(p,o,a)}function Dj(i,...o){let a=0;return i.replace(/%s/g,()=>encodeURIComponent(o[a++]))}function e5(i,o,a){let p=l5(a),_=`${i.protocol}://${i.url}/${o.charAt(0)==="/"?o.substr(1):o}`;return p.length&&(_+=`?${p}`),_}function l5(i){let o=a=>Object.prototype.toString.call(a)==="[object Object]"||Object.prototype.toString.call(a)==="[object Array]";return Object.keys(i).map(a=>Dj("%s=%s",a,o(i[a])?JSON.stringify(i[a]):i[a])).join("&")}function t5(i,o){if(i.method===Kx.MethodEnum.Get||i.data===void 0&&o.data===void 0)return;let a=Array.isArray(i.data)?i.data:Ht(Ht({},i.data),o.data);return JSON.stringify(a)}function n5(i,o){let a=Ht(Ht({},i.headers),o.headers),p={};return Object.keys(a).forEach(_=>{let t=a[_];p[_.toLowerCase()]=t}),p}function z3(i){return i.map(o=>H3(o))}function H3(i){let o=i.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return Zr(Ht({},i),{request:Zr(Ht({},i.request),{headers:Ht(Ht({},i.request.headers),o)})})}function o5(i,o,a){return{name:"ApiError",message:i,status:o,transporterStackTrace:a}}function u5(i,o){return{name:"DeserializationError",message:i,response:o}}function r5(i){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:i}}V0.CallEnum=D4;V0.HostStatusEnum=$v;V0.createApiError=o5;V0.createDeserializationError=u5;V0.createMappedRequestOptions=B3;V0.createRetryError=r5;V0.createStatefulHost=U3;V0.createStatelessHost=j3;V0.createTransporter=_j;V0.createUserAgent=Ej;V0.deserializeFailure=$x;V0.deserializeSuccess=Zx;V0.isStatefulHostTimeouted=Jx;V0.isStatefulHostUp=Qx;V0.serializeData=t5;V0.serializeHeaders=n5;V0.serializeQueryParameters=l5;V0.serializeUrl=e5;V0.stackFrameWithoutCredentials=H3;V0.stackTraceWithoutCredentials=z3});var Lg=tt((LW,a5)=>{a5.exports=s5()});var f5=tt(g2=>{"use strict";Object.defineProperty(g2,"__esModule",{value:!0});var em=kg(),wj=Lg(),Fg=Ng(),Sj=i=>{let o=i.region||"us",a=em.createAuth(em.AuthMode.WithinHeaders,i.appId,i.apiKey),p=wj.createTransporter(Zr(Ht({hosts:[{url:`analytics.${o}.algolia.com`}]},i),{headers:Ht(Zr(Ht({},a.headers()),{"content-type":"application/json"}),i.headers),queryParameters:Ht(Ht({},a.queryParameters()),i.queryParameters)})),_=i.appId;return em.addMethods({appId:_,transporter:p},i.methods)},Tj=i=>(o,a)=>i.transporter.write({method:Fg.MethodEnum.Post,path:"2/abtests",data:o},a),Cj=i=>(o,a)=>i.transporter.write({method:Fg.MethodEnum.Delete,path:em.encode("2/abtests/%s",o)},a),xj=i=>(o,a)=>i.transporter.read({method:Fg.MethodEnum.Get,path:em.encode("2/abtests/%s",o)},a),Rj=i=>o=>i.transporter.read({method:Fg.MethodEnum.Get,path:"2/abtests"},o),Aj=i=>(o,a)=>i.transporter.write({method:Fg.MethodEnum.Post,path:em.encode("2/abtests/%s/stop",o)},a);g2.addABTest=Tj;g2.createAnalyticsClient=Sj;g2.deleteABTest=Cj;g2.getABTest=xj;g2.getABTests=Rj;g2.stopABTest=Aj});var d5=tt((PW,c5)=>{c5.exports=f5()});var h5=tt(Pg=>{"use strict";Object.defineProperty(Pg,"__esModule",{value:!0});var q3=kg(),Oj=Lg(),p5=Ng(),Mj=i=>{let o=i.region||"us",a=q3.createAuth(q3.AuthMode.WithinHeaders,i.appId,i.apiKey),p=Oj.createTransporter(Zr(Ht({hosts:[{url:`recommendation.${o}.algolia.com`}]},i),{headers:Ht(Zr(Ht({},a.headers()),{"content-type":"application/json"}),i.headers),queryParameters:Ht(Ht({},a.queryParameters()),i.queryParameters)}));return q3.addMethods({appId:i.appId,transporter:p},i.methods)},kj=i=>o=>i.transporter.read({method:p5.MethodEnum.Get,path:"1/strategies/personalization"},o),Nj=i=>(o,a)=>i.transporter.write({method:p5.MethodEnum.Post,path:"1/strategies/personalization",data:o},a);Pg.createRecommendationClient=Mj;Pg.getPersonalizationStrategy=kj;Pg.setPersonalizationStrategy=Nj});var m5=tt((bW,v5)=>{v5.exports=h5()});var O5=tt(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});var Ln=kg(),ra=Lg(),Ur=Ng(),Lj=require("crypto");function w4(i){let o=a=>i.request(a).then(p=>{if(i.batch!==void 0&&i.batch(p.hits),!i.shouldStop(p))return p.cursor?o({cursor:p.cursor}):o({page:(a.page||0)+1})});return o({})}var Fj=i=>{let o=i.appId,a=Ln.createAuth(i.authMode!==void 0?i.authMode:Ln.AuthMode.WithinHeaders,o,i.apiKey),p=ra.createTransporter(Zr(Ht({hosts:[{url:`${o}-dsn.algolia.net`,accept:ra.CallEnum.Read},{url:`${o}.algolia.net`,accept:ra.CallEnum.Write}].concat(Ln.shuffle([{url:`${o}-1.algolianet.com`},{url:`${o}-2.algolianet.com`},{url:`${o}-3.algolianet.com`}]))},i),{headers:Ht(Zr(Ht({},a.headers()),{"content-type":"application/x-www-form-urlencoded"}),i.headers),queryParameters:Ht(Ht({},a.queryParameters()),i.queryParameters)})),_={transporter:p,appId:o,addAlgoliaAgent(t,k){p.userAgent.add({segment:t,version:k})},clearCache(){return Promise.all([p.requestsCache.clear(),p.responsesCache.clear()]).then(()=>{})}};return Ln.addMethods(_,i.methods)};function y5(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function g5(){return{name:"ObjectNotFoundError",message:"Object not found."}}function _5(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var Pj=i=>(o,a)=>{let L=a||{},{queryParameters:p}=L,_=Dl(L,["queryParameters"]),t=Ht({acl:o},p!==void 0?{queryParameters:p}:{}),k=(O,C)=>Ln.createRetryablePromise(U=>Ig(i)(O.key,C).catch(H=>{if(H.status!==404)throw H;return U()}));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:"1/keys",data:t},_),k)},Ij=i=>(o,a,p)=>{let _=ra.createMappedRequestOptions(p);return _.queryParameters["X-Algolia-User-ID"]=o,i.transporter.write({method:Ur.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:a}},_)},bj=i=>(o,a,p)=>i.transporter.write({method:Ur.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:o,cluster:a}},p),S4=i=>(o,a,p)=>{let _=(t,k)=>bg(i)(o,{methods:{waitTask:Co}}).waitTask(t.taskID,k);return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/operation",o),data:{operation:"copy",destination:a}},p),_)},Bj=i=>(o,a,p)=>S4(i)(o,a,Zr(Ht({},p),{scope:[T4.Rules]})),Uj=i=>(o,a,p)=>S4(i)(o,a,Zr(Ht({},p),{scope:[T4.Settings]})),jj=i=>(o,a,p)=>S4(i)(o,a,Zr(Ht({},p),{scope:[T4.Synonyms]})),zj=i=>(o,a)=>{let p=(_,t)=>Ln.createRetryablePromise(k=>Ig(i)(o,t).then(k).catch(L=>{if(L.status!==404)throw L}));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Ln.encode("1/keys/%s",o)},a),p)},Hj=()=>(i,o)=>{let a=ra.serializeQueryParameters(o),p=Lj.createHmac("sha256",i).update(a).digest("hex");return Buffer.from(p+a).toString("base64")},Ig=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/keys/%s",o)},a),qj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/logs"},o),Wj=()=>i=>{let o=Buffer.from(i,"base64").toString("ascii"),a=/validUntil=(\d+)/,p=o.match(a);if(p===null)throw _5();return parseInt(p[1],10)-Math.round(new Date().getTime()/1e3)},Vj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters/mapping/top"},o),Gj=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/clusters/mapping/%s",o)},a),Yj=i=>o=>{let _=o||{},{retrieveMappings:a}=_,p=Dl(_,["retrieveMappings"]);return a===!0&&(p.getClusters=!0),i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters/mapping/pending"},p)},bg=i=>(o,a={})=>{let p={transporter:i.transporter,appId:i.appId,indexName:o};return Ln.addMethods(p,a.methods)},Kj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/keys"},o),Xj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters"},o),Qj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/indexes"},o),Jj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters/mapping"},o),Zj=i=>(o,a,p)=>{let _=(t,k)=>bg(i)(o,{methods:{waitTask:Co}}).waitTask(t.taskID,k);return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/operation",o),data:{operation:"move",destination:a}},p),_)},$j=i=>(o,a)=>{let p=(_,t)=>Promise.all(Object.keys(_.taskID).map(k=>bg(i)(k,{methods:{waitTask:Co}}).waitTask(_.taskID[k],t)));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:o}},a),p)},ez=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:o}},a),tz=i=>(o,a)=>{let p=o.map(_=>Zr(Ht({},_),{params:ra.serializeQueryParameters(_.params||{})}));return i.transporter.read({method:Ur.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:p},cacheable:!0},a)},nz=i=>(o,a)=>Promise.all(o.map(p=>{let L=p.params,{facetName:_,facetQuery:t}=L,k=Dl(L,["facetName","facetQuery"]);return bg(i)(p.indexName,{methods:{searchForFacetValues:E5}}).searchForFacetValues(_,t,Ht(Ht({},a),k))})),rz=i=>(o,a)=>{let p=ra.createMappedRequestOptions(a);return p.queryParameters["X-Algolia-User-ID"]=o,i.transporter.write({method:Ur.MethodEnum.Delete,path:"1/clusters/mapping"},p)},iz=i=>(o,a)=>{let p=(_,t)=>Ln.createRetryablePromise(k=>Ig(i)(o,t).catch(L=>{if(L.status!==404)throw L;return k()}));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/keys/%s/restore",o)},a),p)},uz=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:o}},a),oz=i=>(o,a)=>{let p=Object.assign({},a),U=a||{},{queryParameters:_}=U,t=Dl(U,["queryParameters"]),k=_?{queryParameters:_}:{},L=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],O=H=>Object.keys(p).filter(W=>L.indexOf(W)!==-1).every(W=>H[W]===p[W]),C=(H,W)=>Ln.createRetryablePromise(ne=>Ig(i)(o,W).then(m=>O(m)?Promise.resolve():ne()));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Put,path:Ln.encode("1/keys/%s",o),data:k},t),C)},D5=i=>(o,a)=>{let p=(_,t)=>Co(i)(_.taskID,t);return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/batch",i.indexName),data:{requests:o}},a),p)},lz=i=>o=>w4(Zr(Ht({},o),{shouldStop:a=>a.cursor===void 0,request:a=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/browse",i.indexName),data:a},o)})),sz=i=>o=>{let a=Ht({hitsPerPage:1e3},o);return w4(Zr(Ht({},a),{shouldStop:p=>p.hits.lengthZr(Ht({},_),{hits:_.hits.map(t=>(delete t._highlightResult,t))}))}}))},az=i=>o=>{let a=Ht({hitsPerPage:1e3},o);return w4(Zr(Ht({},a),{shouldStop:p=>p.hits.lengthZr(Ht({},_),{hits:_.hits.map(t=>(delete t._highlightResult,t))}))}}))},C4=i=>(o,a,p)=>{let O=p||{},{batchSize:_}=O,t=Dl(O,["batchSize"]),k={taskIDs:[],objectIDs:[]},L=(C=0)=>{let U=[],H;for(H=C;H({action:a,body:W})),t).then(W=>(k.objectIDs=k.objectIDs.concat(W.objectIDs),k.taskIDs.push(W.taskID),H++,L(H)))};return Ln.createWaitablePromise(L(),(C,U)=>Promise.all(C.taskIDs.map(H=>Co(i)(H,U))))},fz=i=>o=>Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/clear",i.indexName)},o),(a,p)=>Co(i)(a.taskID,p)),cz=i=>o=>{let t=o||{},{forwardToReplicas:a}=t,p=Dl(t,["forwardToReplicas"]),_=ra.createMappedRequestOptions(p);return a&&(_.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/rules/clear",i.indexName)},_),(k,L)=>Co(i)(k.taskID,L))},dz=i=>o=>{let t=o||{},{forwardToReplicas:a}=t,p=Dl(t,["forwardToReplicas"]),_=ra.createMappedRequestOptions(p);return a&&(_.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/synonyms/clear",i.indexName)},_),(k,L)=>Co(i)(k.taskID,L))},pz=i=>(o,a)=>Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/deleteByQuery",i.indexName),data:o},a),(p,_)=>Co(i)(p.taskID,_)),hz=i=>o=>Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Ln.encode("1/indexes/%s",i.indexName)},o),(a,p)=>Co(i)(a.taskID,p)),vz=i=>(o,a)=>Ln.createWaitablePromise(T5(i)([o],a).then(p=>({taskID:p.taskIDs[0]})),(p,_)=>Co(i)(p.taskID,_)),T5=i=>(o,a)=>{let p=o.map(_=>({objectID:_}));return C4(i)(p,ah.DeleteObject,a)},mz=i=>(o,a)=>{let k=a||{},{forwardToReplicas:p}=k,_=Dl(k,["forwardToReplicas"]),t=ra.createMappedRequestOptions(_);return p&&(t.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Ln.encode("1/indexes/%s/rules/%s",i.indexName,o)},t),(L,O)=>Co(i)(L.taskID,O))},yz=i=>(o,a)=>{let k=a||{},{forwardToReplicas:p}=k,_=Dl(k,["forwardToReplicas"]),t=ra.createMappedRequestOptions(_);return p&&(t.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Ln.encode("1/indexes/%s/synonyms/%s",i.indexName,o)},t),(L,O)=>Co(i)(L.taskID,O))},gz=i=>o=>C5(i)(o).then(()=>!0).catch(a=>{if(a.status!==404)throw a;return!1}),_z=i=>(o,a)=>{let O=a||{},{query:p,paginate:_}=O,t=Dl(O,["query","paginate"]),k=0,L=()=>x5(i)(p||"",Zr(Ht({},t),{page:k})).then(C=>{for(let[U,H]of Object.entries(C.hits))if(o(H))return{object:H,position:parseInt(U,10),page:k};if(k++,_===!1||k>=C.nbPages)throw g5();return L()});return L()},Ez=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/%s",i.indexName,o)},a),Dz=()=>(i,o)=>{for(let[a,p]of Object.entries(i.hits))if(p.objectID===o)return parseInt(a,10);return-1},wz=i=>(o,a)=>{let k=a||{},{attributesToRetrieve:p}=k,_=Dl(k,["attributesToRetrieve"]),t=o.map(L=>Ht({indexName:i.indexName,objectID:L},p?{attributesToRetrieve:p}:{}));return i.transporter.read({method:Ur.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:t}},_)},Sz=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/rules/%s",i.indexName,o)},a),C5=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/settings",i.indexName),data:{getVersion:2}},o),Tz=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/synonyms/%s",i.indexName,o)},a),R5=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/task/%s",i.indexName,o.toString())},a),Cz=i=>(o,a)=>Ln.createWaitablePromise(A5(i)([o],a).then(p=>({objectID:p.objectIDs[0],taskID:p.taskIDs[0]})),(p,_)=>Co(i)(p.taskID,_)),A5=i=>(o,a)=>{let k=a||{},{createIfNotExists:p}=k,_=Dl(k,["createIfNotExists"]),t=p?ah.PartialUpdateObject:ah.PartialUpdateObjectNoCreate;return C4(i)(o,t,_)},xz=i=>(o,a)=>{let m=a||{},{safe:p,autoGenerateObjectIDIfNotExist:_,batchSize:t}=m,k=Dl(m,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),L=(he,Ee,ve,se)=>Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/operation",he),data:{operation:ve,destination:Ee}},se),(De,pe)=>Co(i)(De.taskID,pe)),O=Math.random().toString(36).substring(7),C=`${i.indexName}_tmp_${O}`,U=W3({appId:i.appId,transporter:i.transporter,indexName:C}),H=[],W=L(i.indexName,C,"copy",Zr(Ht({},k),{scope:["settings","synonyms","rules"]}));H.push(W);let ne=(p?W.wait(k):W).then(()=>{let he=U(o,Zr(Ht({},k),{autoGenerateObjectIDIfNotExist:_,batchSize:t}));return H.push(he),p?he.wait(k):he}).then(()=>{let he=L(C,i.indexName,"move",k);return H.push(he),p?he.wait(k):he}).then(()=>Promise.all(H)).then(([he,Ee,ve])=>({objectIDs:Ee.objectIDs,taskIDs:[he.taskID,...Ee.taskIDs,ve.taskID]}));return Ln.createWaitablePromise(ne,(he,Ee)=>Promise.all(H.map(ve=>ve.wait(Ee))))},Rz=i=>(o,a)=>V3(i)(o,Zr(Ht({},a),{clearExistingRules:!0})),Az=i=>(o,a)=>G3(i)(o,Zr(Ht({},a),{replaceExistingSynonyms:!0})),Oz=i=>(o,a)=>Ln.createWaitablePromise(W3(i)([o],a).then(p=>({objectID:p.objectIDs[0],taskID:p.taskIDs[0]})),(p,_)=>Co(i)(p.taskID,_)),W3=i=>(o,a)=>{let k=a||{},{autoGenerateObjectIDIfNotExist:p}=k,_=Dl(k,["autoGenerateObjectIDIfNotExist"]),t=p?ah.AddObject:ah.UpdateObject;if(t===ah.UpdateObject){for(let L of o)if(L.objectID===void 0)return Ln.createWaitablePromise(Promise.reject(y5()))}return C4(i)(o,t,_)},Mz=i=>(o,a)=>V3(i)([o],a),V3=i=>(o,a)=>{let L=a||{},{forwardToReplicas:p,clearExistingRules:_}=L,t=Dl(L,["forwardToReplicas","clearExistingRules"]),k=ra.createMappedRequestOptions(t);return p&&(k.queryParameters.forwardToReplicas=1),_&&(k.queryParameters.clearExistingRules=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/rules/batch",i.indexName),data:o},k),(O,C)=>Co(i)(O.taskID,C))},kz=i=>(o,a)=>G3(i)([o],a),G3=i=>(o,a)=>{let L=a||{},{forwardToReplicas:p,replaceExistingSynonyms:_}=L,t=Dl(L,["forwardToReplicas","replaceExistingSynonyms"]),k=ra.createMappedRequestOptions(t);return p&&(k.queryParameters.forwardToReplicas=1),_&&(k.queryParameters.replaceExistingSynonyms=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/synonyms/batch",i.indexName),data:o},k),(O,C)=>Co(i)(O.taskID,C))},x5=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/query",i.indexName),data:{query:o},cacheable:!0},a),E5=i=>(o,a,p)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/facets/%s/query",i.indexName,o),data:{facetQuery:a},cacheable:!0},p),w5=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/rules/search",i.indexName),data:{query:o}},a),S5=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/synonyms/search",i.indexName),data:{query:o}},a),Nz=i=>(o,a)=>{let k=a||{},{forwardToReplicas:p}=k,_=Dl(k,["forwardToReplicas"]),t=ra.createMappedRequestOptions(_);return p&&(t.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Put,path:Ln.encode("1/indexes/%s/settings",i.indexName),data:o},t),(L,O)=>Co(i)(L.taskID,O))},Co=i=>(o,a)=>Ln.createRetryablePromise(p=>R5(i)(o,a).then(_=>_.status!=="published"?p():void 0)),Lz={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",ListIndexes:"listIndexes",Logs:"logs",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},ah={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject"},T4={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},Fz={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},Pz={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};tn.ApiKeyACLEnum=Lz;tn.BatchActionEnum=ah;tn.ScopeEnum=T4;tn.StrategyEnum=Fz;tn.SynonymEnum=Pz;tn.addApiKey=Pj;tn.assignUserID=Ij;tn.assignUserIDs=bj;tn.batch=D5;tn.browseObjects=lz;tn.browseRules=sz;tn.browseSynonyms=az;tn.chunkedBatch=C4;tn.clearObjects=fz;tn.clearRules=cz;tn.clearSynonyms=dz;tn.copyIndex=S4;tn.copyRules=Bj;tn.copySettings=Uj;tn.copySynonyms=jj;tn.createBrowsablePromise=w4;tn.createMissingObjectIDError=y5;tn.createObjectNotFoundError=g5;tn.createSearchClient=Fj;tn.createValidUntilNotFoundError=_5;tn.deleteApiKey=zj;tn.deleteBy=pz;tn.deleteIndex=hz;tn.deleteObject=vz;tn.deleteObjects=T5;tn.deleteRule=mz;tn.deleteSynonym=yz;tn.exists=gz;tn.findObject=_z;tn.generateSecuredApiKey=Hj;tn.getApiKey=Ig;tn.getLogs=qj;tn.getObject=Ez;tn.getObjectPosition=Dz;tn.getObjects=wz;tn.getRule=Sz;tn.getSecuredApiKeyRemainingValidity=Wj;tn.getSettings=C5;tn.getSynonym=Tz;tn.getTask=R5;tn.getTopUserIDs=Vj;tn.getUserID=Gj;tn.hasPendingMappings=Yj;tn.initIndex=bg;tn.listApiKeys=Kj;tn.listClusters=Xj;tn.listIndices=Qj;tn.listUserIDs=Jj;tn.moveIndex=Zj;tn.multipleBatch=$j;tn.multipleGetObjects=ez;tn.multipleQueries=tz;tn.multipleSearchForFacetValues=nz;tn.partialUpdateObject=Cz;tn.partialUpdateObjects=A5;tn.removeUserID=rz;tn.replaceAllObjects=xz;tn.replaceAllRules=Rz;tn.replaceAllSynonyms=Az;tn.restoreApiKey=iz;tn.saveObject=Oz;tn.saveObjects=W3;tn.saveRule=Mz;tn.saveRules=V3;tn.saveSynonym=kz;tn.saveSynonyms=G3;tn.search=x5;tn.searchForFacetValues=E5;tn.searchRules=w5;tn.searchSynonyms=S5;tn.searchUserIDs=uz;tn.setSettings=Nz;tn.updateApiKey=oz;tn.waitTask=Co});var k5=tt((UW,M5)=>{M5.exports=O5()});var N5=tt(x4=>{"use strict";Object.defineProperty(x4,"__esModule",{value:!0});function Iz(){return{debug(i,o){return Promise.resolve()},info(i,o){return Promise.resolve()},error(i,o){return Promise.resolve()}}}var bz={Debug:1,Info:2,Error:3};x4.LogLevelEnum=bz;x4.createNullLogger=Iz});var F5=tt((zW,L5)=>{L5.exports=N5()});var b5=tt(Y3=>{"use strict";Object.defineProperty(Y3,"__esModule",{value:!0});var P5=require("http"),I5=require("https"),Bz=require("url");function Uz(){let i={keepAlive:!0},o=new P5.Agent(i),a=new I5.Agent(i);return{send(p){return new Promise(_=>{let t=Bz.parse(p.url),k=t.query===null?t.pathname:`${t.pathname}?${t.query}`,L=Ht({agent:t.protocol==="https:"?a:o,hostname:t.hostname,path:k,method:p.method,headers:p.headers},t.port!==void 0?{port:t.port||""}:{}),O=(t.protocol==="https:"?I5:P5).request(L,W=>{let ne="";W.on("data",m=>ne+=m),W.on("end",()=>{clearTimeout(U),clearTimeout(H),_({status:W.statusCode||0,content:ne,isTimedOut:!1})})}),C=(W,ne)=>setTimeout(()=>{O.abort(),_({status:0,content:ne,isTimedOut:!0})},W*1e3),U=C(p.connectTimeout,"Connection timeout"),H;O.on("error",W=>{clearTimeout(U),clearTimeout(H),_({status:0,content:W.message,isTimedOut:!1})}),O.once("response",()=>{clearTimeout(U),H=C(p.responseTimeout,"Socket timeout")}),p.data!==void 0&&O.write(p.data),O.end()})},destroy(){return o.destroy(),a.destroy(),Promise.resolve()}}}Y3.createNodeHttpRequester=Uz});var U5=tt((qW,B5)=>{B5.exports=b5()});var q5=tt((WW,j5)=>{"use strict";var z5=Ux(),jz=Hx(),tm=d5(),K3=kg(),X3=m5(),wn=k5(),zz=F5(),Hz=U5(),qz=Lg();function H5(i,o,a){let p={appId:i,apiKey:o,timeouts:{connect:2,read:5,write:30},requester:Hz.createNodeHttpRequester(),logger:zz.createNullLogger(),responsesCache:z5.createNullCache(),requestsCache:z5.createNullCache(),hostsCache:jz.createInMemoryCache(),userAgent:qz.createUserAgent(K3.version).add({segment:"Node.js",version:process.versions.node})};return wn.createSearchClient(Zr(Ht(Ht({},p),a),{methods:{search:wn.multipleQueries,searchForFacetValues:wn.multipleSearchForFacetValues,multipleBatch:wn.multipleBatch,multipleGetObjects:wn.multipleGetObjects,multipleQueries:wn.multipleQueries,copyIndex:wn.copyIndex,copySettings:wn.copySettings,copyRules:wn.copyRules,copySynonyms:wn.copySynonyms,moveIndex:wn.moveIndex,listIndices:wn.listIndices,getLogs:wn.getLogs,listClusters:wn.listClusters,multipleSearchForFacetValues:wn.multipleSearchForFacetValues,getApiKey:wn.getApiKey,addApiKey:wn.addApiKey,listApiKeys:wn.listApiKeys,updateApiKey:wn.updateApiKey,deleteApiKey:wn.deleteApiKey,restoreApiKey:wn.restoreApiKey,assignUserID:wn.assignUserID,assignUserIDs:wn.assignUserIDs,getUserID:wn.getUserID,searchUserIDs:wn.searchUserIDs,listUserIDs:wn.listUserIDs,getTopUserIDs:wn.getTopUserIDs,removeUserID:wn.removeUserID,hasPendingMappings:wn.hasPendingMappings,generateSecuredApiKey:wn.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:wn.getSecuredApiKeyRemainingValidity,destroy:K3.destroy,initIndex:_=>t=>wn.initIndex(_)(t,{methods:{batch:wn.batch,delete:wn.deleteIndex,getObject:wn.getObject,getObjects:wn.getObjects,saveObject:wn.saveObject,saveObjects:wn.saveObjects,search:wn.search,searchForFacetValues:wn.searchForFacetValues,waitTask:wn.waitTask,setSettings:wn.setSettings,getSettings:wn.getSettings,partialUpdateObject:wn.partialUpdateObject,partialUpdateObjects:wn.partialUpdateObjects,deleteObject:wn.deleteObject,deleteObjects:wn.deleteObjects,deleteBy:wn.deleteBy,clearObjects:wn.clearObjects,browseObjects:wn.browseObjects,getObjectPosition:wn.getObjectPosition,findObject:wn.findObject,exists:wn.exists,saveSynonym:wn.saveSynonym,saveSynonyms:wn.saveSynonyms,getSynonym:wn.getSynonym,searchSynonyms:wn.searchSynonyms,browseSynonyms:wn.browseSynonyms,deleteSynonym:wn.deleteSynonym,clearSynonyms:wn.clearSynonyms,replaceAllObjects:wn.replaceAllObjects,replaceAllSynonyms:wn.replaceAllSynonyms,searchRules:wn.searchRules,getRule:wn.getRule,deleteRule:wn.deleteRule,saveRule:wn.saveRule,saveRules:wn.saveRules,replaceAllRules:wn.replaceAllRules,browseRules:wn.browseRules,clearRules:wn.clearRules}}),initAnalytics:()=>_=>tm.createAnalyticsClient(Zr(Ht(Ht({},p),_),{methods:{addABTest:tm.addABTest,getABTest:tm.getABTest,getABTests:tm.getABTests,stopABTest:tm.stopABTest,deleteABTest:tm.deleteABTest}})),initRecommendation:()=>_=>X3.createRecommendationClient(Zr(Ht(Ht({},p),_),{methods:{getPersonalizationStrategy:X3.getPersonalizationStrategy,setPersonalizationStrategy:X3.setPersonalizationStrategy}}))}}))}H5.version=K3.version;j5.exports=H5});var V5=tt((VW,Q3)=>{var W5=q5();Q3.exports=W5;Q3.exports.default=W5});var Jz={};YF(Jz,{default:()=>$z});var Y5=vu(require("@yarnpkg/cli")),fh=vu(require("@yarnpkg/core"));var xx=vu(lc()),oh=vu(Mi()),d4=(0,oh.memo)(({active:i})=>{let o=(0,oh.useMemo)(()=>i?"\u25C9":"\u25EF",[i]),a=(0,oh.useMemo)(()=>i?"green":"yellow",[i]);return oh.default.createElement(xx.Text,{color:a},o)});var y2=vu(lc()),na=vu(Mi());var Rx=vu(lc()),p4=vu(Mi());function m2({active:i},o,a){let{stdin:p}=(0,Rx.useStdin)(),_=(0,p4.useCallback)((t,k)=>o(t,k),a);(0,p4.useEffect)(()=>{if(!(!i||!p))return p.on("keypress",_),()=>{p.off("keypress",_)}},[i,_,p])}var h4;(function(a){a.BEFORE="before",a.AFTER="after"})(h4||(h4={}));var Ax=function({active:i},o,a){m2({active:i},(p,_)=>{_.name==="tab"&&(_.shift?o(h4.BEFORE):o(h4.AFTER))},a)};var v4=function(i,o,{active:a,minus:p,plus:_,set:t,loop:k=!0}){m2({active:a},(L,O)=>{let C=o.indexOf(i);switch(O.name){case p:{let U=C-1;if(k){t(o[(o.length+U)%o.length]);return}if(U<0)return;t(o[U])}break;case _:{let U=C+1;if(k){t(o[U%o.length]);return}if(U>=o.length)return;t(o[U])}break}},[o,i,_,t,k])};var m4=({active:i=!0,children:o=[],radius:a=10,size:p=1,loop:_=!0,onFocusRequest:t,willReachEnd:k})=>{let L=Ee=>{if(Ee.key===null)throw new Error("Expected all children to have a key");return Ee.key},O=na.default.Children.map(o,Ee=>L(Ee)),C=O[0],[U,H]=(0,na.useState)(C),W=O.indexOf(U);(0,na.useEffect)(()=>{O.includes(U)||H(C)},[o]),(0,na.useEffect)(()=>{k&&W>=O.length-2&&k()},[W]),Ax({active:i&&!!t},Ee=>{t==null||t(Ee)},[t]),v4(U,O,{active:i,minus:"up",plus:"down",set:H,loop:_});let ne=W-a,m=W+a;m>O.length&&(ne-=m-O.length,m=O.length),ne<0&&(m+=-ne,ne=0),m>=O.length&&(m=O.length-1);let he=[];for(let Ee=ne;Ee<=m;++Ee){let ve=O[Ee],se=i&&ve===U;he.push(na.default.createElement(y2.Box,{key:ve,height:p},na.default.createElement(y2.Box,{marginLeft:1,marginRight:1},na.default.createElement(y2.Text,null,se?na.default.createElement(y2.Text,{color:"cyan",bold:!0},">"):" ")),na.default.createElement(y2.Box,null,na.default.cloneElement(o[Ee],{active:se}))))}return na.default.createElement(y2.Box,{flexDirection:"column",width:"100%"},he)};var y4=vu(Mi());var Ox=vu(lc()),ed=vu(Mi()),Mx=vu(require("readline")),N3=ed.default.createContext(null),kx=({children:i})=>{let{stdin:o,setRawMode:a}=(0,Ox.useStdin)();(0,ed.useEffect)(()=>{a&&a(!0),o&&(0,Mx.emitKeypressEvents)(o)},[o,a]);let[p,_]=(0,ed.useState)(new Map),t=(0,ed.useMemo)(()=>({getAll:()=>p,get:k=>p.get(k),set:(k,L)=>_(new Map([...p,[k,L]]))}),[p,_]);return ed.default.createElement(N3.Provider,{value:t,children:i})};function lh(i,o){let a=(0,y4.useContext)(N3);if(a===null)throw new Error("Expected this hook to run with a ministore context attached");if(typeof i=="undefined")return a.getAll();let p=(0,y4.useCallback)(t=>{a.set(i,t)},[i,a.set]),_=a.get(i);return typeof _=="undefined"&&(_=o),[_,p]}var g4=vu(lc()),L3=vu(Mi());async function _4(i,o,{stdin:a,stdout:p,stderr:_}={}){let t,k=O=>{let{exit:C}=(0,g4.useApp)();m2({active:!0},(U,H)=>{H.name==="return"&&(t=O,C())},[C,O])},{waitUntilExit:L}=(0,g4.render)(L3.default.createElement(kx,null,L3.default.createElement(i,Zr(Ht({},o),{useSubmit:k}))),{stdin:a,stdout:p,stderr:_});return await L(),t}var K5=vu(require("clipanion")),X5=vu(Px()),or=vu(lc()),En=vu(Mi());var G5=vu(V5()),J3={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Wz=(0,G5.default)(J3.appId,J3.apiKey).initIndex(J3.indexName),Z3=async(i,o=0)=>await Wz.search(i,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:o,hitsPerPage:10});var Bg=["regular","dev","peer"],Ug=class extends Y5.BaseCommand{async execute(){let o=await fh.Configuration.find(this.context.cwd,this.context.plugins),a=()=>En.default.createElement(or.Box,{flexDirection:"row"},En.default.createElement(or.Box,{flexDirection:"column",width:48},En.default.createElement(or.Box,null,En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},""),"/",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to move between packages.")),En.default.createElement(or.Box,null,En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to select a package.")),En.default.createElement(or.Box,null,En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," again to change the target."))),En.default.createElement(or.Box,{flexDirection:"column"},En.default.createElement(or.Box,{marginLeft:1},En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to install the selected packages.")),En.default.createElement(or.Box,{marginLeft:1},En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),p=()=>En.default.createElement(En.default.Fragment,null,En.default.createElement(or.Box,{width:15},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Owner")),En.default.createElement(or.Box,{width:11},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Version")),En.default.createElement(or.Box,{width:10},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Downloads"))),_=()=>En.default.createElement(or.Box,{width:17},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Target")),t=({hit:ne,active:m})=>{let[he,Ee]=lh(ne.name,null);m2({active:m},(De,pe)=>{if(pe.name!=="space")return;if(!he){Ee(Bg[0]);return}let me=Bg.indexOf(he)+1;me===Bg.length?Ee(null):Ee(Bg[me])},[he,Ee]);let ve=fh.structUtils.parseIdent(ne.name),se=fh.structUtils.prettyIdent(o,ve);return En.default.createElement(or.Box,null,En.default.createElement(or.Box,{width:45},En.default.createElement(or.Text,{bold:!0,wrap:"wrap"},se)),En.default.createElement(or.Box,{width:14,marginLeft:1},En.default.createElement(or.Text,{bold:!0,wrap:"truncate"},ne.owner.name)),En.default.createElement(or.Box,{width:10,marginLeft:1},En.default.createElement(or.Text,{italic:!0,wrap:"truncate"},ne.version)),En.default.createElement(or.Box,{width:16,marginLeft:1},En.default.createElement(or.Text,null,ne.humanDownloadsLast30Days)))},k=({name:ne,active:m})=>{let[he]=lh(ne,null),Ee=fh.structUtils.parseIdent(ne);return En.default.createElement(or.Box,null,En.default.createElement(or.Box,{width:47},En.default.createElement(or.Text,{bold:!0}," - ",fh.structUtils.prettyIdent(o,Ee))),Bg.map(ve=>En.default.createElement(or.Box,{key:ve,width:14,marginLeft:1},En.default.createElement(or.Text,null," ",En.default.createElement(d4,{active:he===ve})," ",En.default.createElement(or.Text,{bold:!0},ve)))))},L=()=>En.default.createElement(or.Box,{marginTop:1},En.default.createElement(or.Text,null,"Powered by Algolia.")),C=await _4(({useSubmit:ne})=>{let m=lh();ne(m);let he=Array.from(m.keys()).filter(qe=>m.get(qe)!==null),[Ee,ve]=(0,En.useState)(""),[se,De]=(0,En.useState)(0),[pe,me]=(0,En.useState)([]),ie=qe=>{qe.match(/\t| /)||ve(qe)},Oe=async()=>{De(0);let qe=await Z3(Ee);qe.query===Ee&&me(qe.hits)},je=async()=>{let qe=await Z3(Ee,se+1);qe.query===Ee&&qe.page-1===se&&(De(qe.page),me([...pe,...qe.hits]))};return(0,En.useEffect)(()=>{Ee?Oe():me([])},[Ee]),En.default.createElement(or.Box,{flexDirection:"column"},En.default.createElement(a,null),En.default.createElement(or.Box,{flexDirection:"row",marginTop:1},En.default.createElement(or.Text,{bold:!0},"Search: "),En.default.createElement(or.Box,{width:41},En.default.createElement(X5.default,{value:Ee,onChange:ie,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),En.default.createElement(p,null)),pe.length?En.default.createElement(m4,{radius:2,loop:!1,children:pe.map(qe=>En.default.createElement(t,{key:qe.name,hit:qe,active:!1})),willReachEnd:je}):En.default.createElement(or.Text,{color:"gray"},"Start typing..."),En.default.createElement(or.Box,{flexDirection:"row",marginTop:1},En.default.createElement(or.Box,{width:49},En.default.createElement(or.Text,{bold:!0},"Selected:")),En.default.createElement(_,null)),he.length?he.map(qe=>En.default.createElement(k,{key:qe,name:qe,active:!1})):En.default.createElement(or.Text,{color:"gray"},"No selected packages..."),En.default.createElement(L,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof C=="undefined")return 1;let U=Array.from(C.keys()).filter(ne=>C.get(ne)==="regular"),H=Array.from(C.keys()).filter(ne=>C.get(ne)==="dev"),W=Array.from(C.keys()).filter(ne=>C.get(ne)==="peer");return U.length&&await this.cli.run(["add",...U]),H.length&&await this.cli.run(["add","--dev",...H]),W&&await this.cli.run(["add","--peer",...W]),0}};Ug.paths=[["search"]],Ug.usage=K5.Command.Usage({category:"Interactive commands",description:"open the search interface",details:` - This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry. - `,examples:[["Open the search window","yarn search"]]});var Q5=Ug;var O4=vu(require("@yarnpkg/cli")),xo=vu(require("@yarnpkg/core"));var jg=vu(lc()),_2=vu(Mi());var J5=vu(lc()),Z5=vu(Mi()),R4=({length:i,active:o})=>{if(i===0)return null;let a=i>1?` ${"-".repeat(i-1)}`:" ";return Z5.default.createElement(J5.Text,{dimColor:!o},a)};var $5=function({active:i,skewer:o,options:a,value:p,onChange:_,sizes:t=[]}){let k=a.filter(({label:O})=>!!O).map(({value:O})=>O),L=a.findIndex(O=>O.value===p&&O.label!="");return v4(p,k,{active:i,minus:"left",plus:"right",set:_}),_2.default.createElement(_2.default.Fragment,null,a.map(({label:O},C)=>{let U=C===L,H=t[C]-1||0,W=O.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),ne=Math.max(0,H-W.length-2);return O?_2.default.createElement(jg.Box,{key:O,width:H,marginLeft:1},_2.default.createElement(jg.Text,{wrap:"truncate"},_2.default.createElement(d4,{active:U})," ",O),o?_2.default.createElement(R4,{active:i,length:ne}):null):_2.default.createElement(jg.Box,{key:`spacer-${C}`,width:H,marginLeft:1})}))};var i9=vu(require("@yarnpkg/plugin-essentials")),M4=vu(require("clipanion"));function td(){}td.prototype={diff:function(o,a){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_=p.callback;typeof p=="function"&&(_=p,p={}),this.options=p;var t=this;function k(he){return _?(setTimeout(function(){_(void 0,he)},0),!0):he}o=this.castInput(o),a=this.castInput(a),o=this.removeEmpty(this.tokenize(o)),a=this.removeEmpty(this.tokenize(a));var L=a.length,O=o.length,C=1,U=L+O;p.maxEditLength&&(U=Math.min(U,p.maxEditLength));var H=[{newPos:-1,components:[]}],W=this.extractCommon(H[0],a,o,0);if(H[0].newPos+1>=L&&W+1>=O)return k([{value:this.join(a),count:a.length}]);function ne(){for(var he=-1*C;he<=C;he+=2){var Ee=void 0,ve=H[he-1],se=H[he+1],De=(se?se.newPos:0)-he;ve&&(H[he-1]=void 0);var pe=ve&&ve.newPos+1=L&&De+1>=O)return k(Vz(t,Ee.components,a,o,t.useLongestToken));H[he]=Ee}C++}if(_)(function he(){setTimeout(function(){if(C>U)return _();ne()||he()},0)})();else for(;C<=U;){var m=ne();if(m)return m}},pushComponent:function(o,a,p){var _=o[o.length-1];_&&_.added===a&&_.removed===p?o[o.length-1]={count:_.count+1,added:a,removed:p}:o.push({count:1,added:a,removed:p})},extractCommon:function(o,a,p,_){for(var t=a.length,k=p.length,L=o.newPos,O=L-_,C=0;L+1ne.length?he:ne}),C.value=i.join(U)}else C.value=i.join(a.slice(L,L+C.count));L+=C.count,C.added||(O+=C.count)}}var W=o[k-1];return k>1&&typeof W.value=="string"&&(W.added||W.removed)&&i.equals("",W.value)&&(o[k-2].value+=W.value,o.pop()),o}function Gz(i){return{newPos:i.newPos,components:i.components.slice(0)}}var aV=new td;function Yz(i,o){if(typeof i=="function")o.callback=i;else if(i)for(var a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);return o}var e9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,t9=/\S/,$3=new td;$3.equals=function(i,o){return this.options.ignoreCase&&(i=i.toLowerCase(),o=o.toLowerCase()),i===o||this.options.ignoreWhitespace&&!t9.test(i)&&!t9.test(o)};$3.tokenize=function(i){for(var o=i.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),a=0;a=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,l9=(i,o)=>i.length>0?[i.slice(0,o)].concat(l9(i.slice(o),o)):[],Hg=class extends O4.BaseCommand{async execute(){if(!this.context.stdout.isTTY)throw new M4.UsageError("This command can only be run in a TTY environment");let o=await xo.Configuration.find(this.context.cwd,this.context.plugins),{project:a,workspace:p}=await xo.Project.find(o,this.context.cwd),_=await xo.Cache.find(o);if(!p)throw new O4.WorkspaceRequiredError(a.cwd,this.context.cwd);await a.restoreInstallState({restoreResolutions:!1});let t=this.context.stdout.rows-7,k=(se,De)=>{let pe=n9(se,De),me="";for(let ie of pe)ie.added?me+=xo.formatUtils.pretty(o,ie.value,"green"):ie.removed||(me+=ie.value);return me},L=(se,De)=>{if(se===De)return De;let pe=xo.structUtils.parseRange(se),me=xo.structUtils.parseRange(De),ie=pe.selector.match(o9),Oe=me.selector.match(o9);if(!ie||!Oe)return k(se,De);let je=["gray","red","yellow","green","magenta"],qe=null,yt="";for(let gt=1;gt{let me=await i9.suggestUtils.fetchDescriptorFrom(se,pe,{project:a,cache:_,preserveModifier:De,workspace:p});return me!==null?me.range:se.range},C=async se=>{let De=u9.default.valid(se.range)?`^${se.range}`:se.range,[pe,me]=await Promise.all([O(se,se.range,De).catch(()=>null),O(se,se.range,"latest").catch(()=>null)]),ie=[{value:null,label:se.range}];return pe&&pe!==se.range?ie.push({value:pe,label:L(se.range,pe)}):ie.push({value:null,label:""}),me&&me!==pe&&me!==se.range?ie.push({value:me,label:L(se.range,me)}):ie.push({value:null,label:""}),ie},U=()=>Tr.default.createElement(bi.Box,{flexDirection:"row"},Tr.default.createElement(bi.Box,{flexDirection:"column",width:49},Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},""),"/",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to select packages.")),Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},""),"/",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to select versions."))),Tr.default.createElement(bi.Box,{flexDirection:"column"},Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to install.")),Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),H=()=>Tr.default.createElement(bi.Box,{flexDirection:"row",paddingTop:1,paddingBottom:1},Tr.default.createElement(bi.Box,{width:50},Tr.default.createElement(bi.Text,{bold:!0},Tr.default.createElement(bi.Text,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),Tr.default.createElement(bi.Box,{width:17},Tr.default.createElement(bi.Text,{bold:!0,underline:!0,color:"gray"},"Current")),Tr.default.createElement(bi.Box,{width:17},Tr.default.createElement(bi.Text,{bold:!0,underline:!0,color:"gray"},"Range")),Tr.default.createElement(bi.Box,{width:17},Tr.default.createElement(bi.Text,{bold:!0,underline:!0,color:"gray"},"Latest"))),W=({active:se,descriptor:De,suggestions:pe})=>{let[me,ie]=lh(De.descriptorHash,null),Oe=xo.structUtils.stringifyIdent(De),je=Math.max(0,45-Oe.length);return Tr.default.createElement(Tr.default.Fragment,null,Tr.default.createElement(bi.Box,null,Tr.default.createElement(bi.Box,{width:45},Tr.default.createElement(bi.Text,{bold:!0},xo.structUtils.prettyIdent(o,De)),Tr.default.createElement(R4,{active:se,length:je})),Tr.default.createElement($5,{active:se,options:pe,value:me,skewer:!0,onChange:ie,sizes:[17,17,17]})))},ne=({dependencies:se})=>{let[De,pe]=(0,Tr.useState)(se.map(()=>null)),me=(0,Tr.useRef)(!0),ie=async Oe=>{let je=await C(Oe);return je.filter(qe=>qe.label!=="").length<=1?null:{descriptor:Oe,suggestions:je}};return(0,Tr.useEffect)(()=>()=>{me.current=!1},[]),(0,Tr.useEffect)(()=>{let Oe=Math.trunc(t*1.75),je=se.slice(0,Oe),qe=se.slice(Oe),yt=l9(qe,t),gt=je.map(ie).reduce(async(Xe,ut)=>{await Xe;let We=await ut;We!==null&&(!me.current||pe(Ft=>{let Jt=Ft.findIndex(Q=>Q===null),rt=[...Ft];return rt[Jt]=We,rt}))},Promise.resolve());yt.reduce((Xe,ut)=>Promise.all(ut.map(We=>Promise.resolve().then(()=>ie(We)))).then(async We=>{We=We.filter(Ft=>Ft!==null),await Xe,me.current&&pe(Ft=>{let Jt=Ft.findIndex(rt=>rt===null);return Ft.slice(0,Jt).concat(We).concat(Ft.slice(Jt+We.length))})}),gt).then(()=>{me.current&&pe(Xe=>Xe.filter(ut=>ut!==null))})},[]),De.length?Tr.default.createElement(m4,{radius:t>>1,children:De.map((Oe,je)=>Oe!==null?Tr.default.createElement(W,{key:je,active:!1,descriptor:Oe.descriptor,suggestions:Oe.suggestions}):Tr.default.createElement(bi.Text,{key:je},"Loading..."))}):Tr.default.createElement(bi.Text,null,"No upgrades found")},he=await _4(({useSubmit:se})=>{se(lh());let De=new Map;for(let me of a.workspaces)for(let ie of["dependencies","devDependencies"])for(let Oe of me.manifest[ie].values())a.tryWorkspaceByDescriptor(Oe)===null&&De.set(Oe.descriptorHash,Oe);let pe=xo.miscUtils.sortMap(De.values(),me=>xo.structUtils.stringifyDescriptor(me));return Tr.default.createElement(bi.Box,{flexDirection:"column"},Tr.default.createElement(U,null),Tr.default.createElement(H,null),Tr.default.createElement(ne,{dependencies:pe}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof he=="undefined")return 1;let Ee=!1;for(let se of a.workspaces)for(let De of["dependencies","devDependencies"]){let pe=se.manifest[De];for(let me of pe.values()){let ie=he.get(me.descriptorHash);typeof ie!="undefined"&&ie!==null&&(pe.set(me.identHash,xo.structUtils.makeDescriptor(me,ie)),Ee=!0)}}return Ee?(await xo.StreamReport.start({configuration:o,stdout:this.context.stdout,includeLogs:!this.context.quiet},async se=>{await a.install({cache:_,report:se})})).exitCode():0}};Hg.paths=[["upgrade-interactive"]],Hg.usage=M4.Command.Usage({category:"Interactive commands",description:"open the upgrade interface",details:` - This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade. - `,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var s9=Hg;var Zz={commands:[Q5,s9]},$z=Zz;return Jz;})(); -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-debug-tools.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler-tracing.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler-tracing.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.24.0 - * react-reconciler.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.24.0 - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v16.13.1 - * react.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v16.13.1 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -return plugin; -} -}; diff --git a/.yarn/plugins/@yarnpkg/plugin-stage.cjs b/.yarn/plugins/@yarnpkg/plugin-stage.cjs deleted file mode 100644 index 8e80618e5..000000000 --- a/.yarn/plugins/@yarnpkg/plugin-stage.cjs +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-stage", -factory: function (require) { -var plugin=(()=>{var N=Object.create,x=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var K=t=>x(t,"__esModule",{value:!0});var Z=(t,e)=>{for(var s in e)x(t,s,{get:e[s],enumerable:!0})},q=(t,e,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of _(e))!J.call(t,a)&&a!=="default"&&x(t,a,{get:()=>e[a],enumerable:!(s=G(e,a))||s.enumerable});return t},w=t=>q(K(x(t!=null?N(W(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var ot={};Z(ot,{default:()=>ct});var V=w(require("@yarnpkg/cli")),D=w(require("@yarnpkg/core")),y=w(require("@yarnpkg/fslib")),p=w(require("clipanion"));var l=w(require("@yarnpkg/core")),d=w(require("@yarnpkg/fslib"));var f=w(require("@yarnpkg/fslib")),i;(function(r){r[r.CREATE=0]="CREATE",r[r.DELETE=1]="DELETE",r[r.ADD=2]="ADD",r[r.REMOVE=3]="REMOVE",r[r.MODIFY=4]="MODIFY"})(i||(i={}));async function v(t,{marker:e}){do if(!f.xfs.existsSync(f.ppath.join(t,e)))t=f.ppath.dirname(t);else return t;while(t!=="/");return null}function L(t,{roots:e,names:s}){if(s.has(f.ppath.basename(t)))return!0;do if(!e.has(t))t=f.ppath.dirname(t);else return!0;while(t!=="/");return!1}function $(t){let e=[],s=[t];for(;s.length>0;){let a=s.pop(),n=f.xfs.readdirSync(a);for(let r of n){let m=f.ppath.resolve(a,r);f.xfs.lstatSync(m).isDirectory()?s.push(m):e.push(m)}}return e}function T(t,e){let s=0,a=0;for(let n of t)n!=="wip"&&(e.test(n)?s+=1:a+=1);return s>=a}function I(t){let e=T(t,/^(\w\(\w+\):\s*)?\w+s/),s=T(t,/^(\w\(\w+\):\s*)?[A-Z]/),a=T(t,/^\w\(\w+\):/);return{useThirdPerson:e,useUpperCase:s,useComponent:a}}function z(t){return t.useComponent?"chore(yarn): ":""}var Q=new Map([[0,"create"],[1,"delete"],[2,"add"],[3,"remove"],[4,"update"]]);function H(t,e){let s=z(t),a=[],n=e.slice().sort((r,m)=>r[0]-m[0]);for(;n.length>0;){let[r,m]=n.shift(),h=Q.get(r);t.useUpperCase&&a.length===0&&(h=`${h[0].toUpperCase()}${h.slice(1)}`),t.useThirdPerson&&(h+="s");let o=[m];for(;n.length>0&&n[0][0]===r;){let[,c]=n.shift();o.push(c)}o.sort();let g=o.shift();o.length===1?g+=" (and one other)":o.length>1&&(g+=` (and ${o.length} others)`),a.push(`${h} ${g}`)}return`${s}${a.join(", ")}`}var X="Commit generated via `yarn stage`",tt=11;async function j(t){let{code:e,stdout:s}=await l.execUtils.execvp("git",["log","-1","--pretty=format:%H"],{cwd:t});return e===0?s.trim():null}async function et(t,e){let s=[],a=e.filter(g=>d.ppath.basename(g.path)==="package.json");for(let{action:g,path:c}of a){let P=d.ppath.relative(t,c);if(g===i.MODIFY){let u=await j(t),{stdout:b}=await l.execUtils.execvp("git",["show",`${u}:${P}`],{cwd:t,strict:!0}),A=await l.Manifest.fromText(b),M=await l.Manifest.fromFile(c),F=new Map([...M.dependencies,...M.devDependencies]),R=new Map([...A.dependencies,...A.devDependencies]);for(let[C,U]of R){let S=l.structUtils.stringifyIdent(U),k=F.get(C);k?k.range!==U.range&&s.push([i.MODIFY,`${S} to ${k.range}`]):s.push([i.REMOVE,S])}for(let[C,U]of F)R.has(C)||s.push([i.ADD,l.structUtils.stringifyIdent(U)])}else if(g===i.CREATE){let u=await l.Manifest.fromFile(c);u.name?s.push([i.CREATE,l.structUtils.stringifyIdent(u.name)]):s.push([i.CREATE,"a package"])}else if(g===i.DELETE){let u=await j(t),{stdout:b}=await l.execUtils.execvp("git",["show",`${u}:${P}`],{cwd:t,strict:!0}),A=await l.Manifest.fromText(b);A.name?s.push([i.DELETE,l.structUtils.stringifyIdent(A.name)]):s.push([i.DELETE,"a package"])}else throw new Error("Assertion failed: Unsupported action type")}let{code:n,stdout:r}=await l.execUtils.execvp("git",["log",`-${tt}`,"--pretty=format:%s"],{cwd:t}),m=n===0?r.split(/\n/g).filter(g=>g!==""):[],h=I(m);return H(h,s)}var st={[i.CREATE]:[" A ","?? "],[i.MODIFY]:[" M "],[i.DELETE]:[" D "]},at={[i.CREATE]:["A "],[i.MODIFY]:["M "],[i.DELETE]:["D "]},Y={async findRoot(t){return await v(t,{marker:".git"})},async filterChanges(t,e,s,a){let{stdout:n}=await l.execUtils.execvp("git",["status","-s"],{cwd:t,strict:!0}),r=n.toString().split(/\n/g),m=(a==null?void 0:a.staged)?at:st;return[].concat(...r.map(o=>{if(o==="")return[];let g=o.slice(0,3),c=d.ppath.resolve(t,o.slice(3));if(!(a==null?void 0:a.staged)&&g==="?? "&&o.endsWith("/"))return $(c).map(P=>({action:i.CREATE,path:P}));{let u=[i.CREATE,i.MODIFY,i.DELETE].find(b=>m[b].includes(g));return u!==void 0?[{action:u,path:c}]:[]}})).filter(o=>L(o.path,{roots:e,names:s}))},async genCommitMessage(t,e){return await et(t,e)},async makeStage(t,e){let s=e.map(a=>d.npath.fromPortablePath(a.path));await l.execUtils.execvp("git",["add","--",...s],{cwd:t,strict:!0})},async makeCommit(t,e,s){let a=e.map(n=>d.npath.fromPortablePath(n.path));await l.execUtils.execvp("git",["add","-N","--",...a],{cwd:t,strict:!0}),await l.execUtils.execvp("git",["commit","-m",`${s} - -${X} -`,"--",...a],{cwd:t,strict:!0})},async makeReset(t,e){let s=e.map(a=>d.npath.fromPortablePath(a.path));await l.execUtils.execvp("git",["reset","HEAD","--",...s],{cwd:t,strict:!0})}};var O={async findRoot(t){return await v(t,{marker:".hg"})},async filterChanges(t,e,s){return[]},async genCommitMessage(t,e){return""},async makeStage(t,e){},async makeCommit(t,e,s){},async makeReset(t,e){},async makeUpdate(t,e){}};var it=[Y,O],E=class extends V.BaseCommand{constructor(){super(...arguments);this.commit=p.Option.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=p.Option.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=p.Option.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=p.Option.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let e=await D.Configuration.find(this.context.cwd,this.context.plugins),{project:s}=await D.Project.find(e,this.context.cwd),{driver:a,root:n}=await nt(s.cwd),r=[e.get("cacheFolder"),e.get("globalFolder"),e.get("virtualFolder"),e.get("yarnPath")];await e.triggerHook(c=>c.populateYarnPaths,s,c=>{r.push(c)});let m=new Set;for(let c of r)for(let P of rt(n,c))m.add(P);let h=new Set([e.get("rcFilename"),e.get("lockfileFilename"),"package.json"]),o=await a.filterChanges(n,m,h),g=await a.genCommitMessage(n,o);if(this.dryRun)if(this.commit)this.context.stdout.write(`${g} -`);else for(let c of o)this.context.stdout.write(`${y.npath.fromPortablePath(c.path)} -`);else if(this.reset){let c=await a.filterChanges(n,m,h,{staged:!0});c.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,c)}else o.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,o,g):(await a.makeStage(n,o),this.context.stdout.write(g))}};E.paths=[["stage"]],E.usage=p.Command.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]});var B=E;async function nt(t){let e=null,s=null;for(let a of it)if((s=await a.findRoot(t))!==null){e=a;break}if(e===null||s===null)throw new p.UsageError("No stage driver has been found for your current project");return{driver:e,root:s}}function rt(t,e){let s=[];if(e===null)return s;for(;;){(e===t||e.startsWith(`${t}/`))&&s.push(e);let a;try{a=y.xfs.statSync(e)}catch(n){break}if(a.isSymbolicLink())e=y.ppath.resolve(y.ppath.dirname(e),y.xfs.readlinkSync(e));else break}return s}var lt={commands:[B]},ct=lt;return ot;})(); -return plugin; -} -}; diff --git a/.yarn/plugins/@yarnpkg/plugin-typescript.cjs b/.yarn/plugins/@yarnpkg/plugin-typescript.cjs deleted file mode 100644 index 5c1859e0b..000000000 --- a/.yarn/plugins/@yarnpkg/plugin-typescript.cjs +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-typescript", -factory: function (require) { -var plugin=(()=>{var Ft=Object.create,H=Object.defineProperty,Bt=Object.defineProperties,Kt=Object.getOwnPropertyDescriptor,zt=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,$t=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;var Re=(e,t,r)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))ne.call(t,r)&&Re(e,r,t[r]);if(Q)for(var r of Q(t))De.call(t,r)&&Re(e,r,t[r]);return e},g=(e,t)=>Bt(e,zt(t)),Lt=e=>H(e,"__esModule",{value:!0});var R=(e,t)=>{var r={};for(var s in e)ne.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&Q)for(var s of Q(e))t.indexOf(s)<0&&De.call(e,s)&&(r[s]=e[s]);return r};var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vt=(e,t)=>{for(var r in t)H(e,r,{get:t[r],enumerable:!0})},Qt=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Gt(t))!ne.call(e,s)&&s!=="default"&&H(e,s,{get:()=>t[s],enumerable:!(r=Kt(t,s))||r.enumerable});return e},C=e=>Qt(Lt(H(e!=null?Ft($t(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var xe=I(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});function _(e){let t=[...e.caches],r=t.shift();return r===void 0?ve():{get(s,n,a={miss:()=>Promise.resolve()}){return r.get(s,n,a).catch(()=>_({caches:t}).get(s,n,a))},set(s,n){return r.set(s,n).catch(()=>_({caches:t}).set(s,n))},delete(s){return r.delete(s).catch(()=>_({caches:t}).delete(s))},clear(){return r.clear().catch(()=>_({caches:t}).clear())}}}function ve(){return{get(e,t,r={miss:()=>Promise.resolve()}){return t().then(n=>Promise.all([n,r.miss(n)])).then(([n])=>n)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}J.createFallbackableCache=_;J.createNullCache=ve});var Ee=I(($s,qe)=>{qe.exports=xe()});var Te=I(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});function Jt(e={serializable:!0}){let t={};return{get(r,s,n={miss:()=>Promise.resolve()}){let a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);let o=s(),d=n&&n.miss||(()=>Promise.resolve());return o.then(y=>d(y)).then(()=>o)},set(r,s){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}ae.createInMemoryCache=Jt});var we=I((Vs,Me)=>{Me.exports=Te()});var Ce=I(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});function Xt(e,t,r){let s={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===oe.WithinHeaders?s:{}},queryParameters(){return e===oe.WithinQueryParameters?s:{}}}}function Yt(e){let t=0,r=()=>(t++,new Promise(s=>{setTimeout(()=>{s(e(r))},Math.min(100*t,1e3))}));return e(r)}function ke(e,t=(r,s)=>Promise.resolve()){return Object.assign(e,{wait(r){return ke(e.then(s=>Promise.all([t(s,r),s])).then(s=>s[1]))}})}function Zt(e){let t=e.length-1;for(t;t>0;t--){let r=Math.floor(Math.random()*(t+1)),s=e[t];e[t]=e[r],e[r]=s}return e}function er(e,t){return Object.keys(t!==void 0?t:{}).forEach(r=>{e[r]=t[r](e)}),e}function tr(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}var rr="4.2.0",sr=e=>()=>e.transporter.requester.destroy(),oe={WithinQueryParameters:0,WithinHeaders:1};M.AuthMode=oe;M.addMethods=er;M.createAuth=Xt;M.createRetryablePromise=Yt;M.createWaitablePromise=ke;M.destroy=sr;M.encode=tr;M.shuffle=Zt;M.version=rr});var F=I((Js,Ue)=>{Ue.exports=Ce()});var Ne=I(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});var nr={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};ie.MethodEnum=nr});var B=I((Ys,We)=>{We.exports=Ne()});var Ze=I(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var He=B();function ce(e,t){let r=e||{},s=r.data||{};return Object.keys(r).forEach(n=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(n)===-1&&(s[n]=r[n])}),{data:Object.entries(s).length>0?s:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var X={Read:1,Write:2,Any:3},U={Up:1,Down:2,Timeouted:3},_e=2*60*1e3;function ue(e,t=U.Up){return g(u({},e),{status:t,lastUpdate:Date.now()})}function Fe(e){return e.status===U.Up||Date.now()-e.lastUpdate>_e}function Be(e){return e.status===U.Timeouted&&Date.now()-e.lastUpdate<=_e}function le(e){return{protocol:e.protocol||"https",url:e.url,accept:e.accept||X.Any}}function ar(e,t){return Promise.all(t.map(r=>e.get(r,()=>Promise.resolve(ue(r))))).then(r=>{let s=r.filter(d=>Fe(d)),n=r.filter(d=>Be(d)),a=[...s,...n],o=a.length>0?a.map(d=>le(d)):t;return{getTimeout(d,y){return(n.length===0&&d===0?1:n.length+3+d)*y},statelessHosts:o}})}var or=({isTimedOut:e,status:t})=>!e&&~~t==0,ir=e=>{let t=e.status;return e.isTimedOut||or(e)||~~(t/100)!=2&&~~(t/100)!=4},cr=({status:e})=>~~(e/100)==2,ur=(e,t)=>ir(e)?t.onRetry(e):cr(e)?t.onSucess(e):t.onFail(e);function Qe(e,t,r,s){let n=[],a=$e(r,s),o=Le(e,s),d=r.method,y=r.method!==He.MethodEnum.Get?{}:u(u({},r.data),s.data),b=u(u(u({"x-algolia-agent":e.userAgent.value},e.queryParameters),y),s.queryParameters),f=0,p=(h,S)=>{let O=h.pop();if(O===void 0)throw Ve(de(n));let P={data:a,headers:o,method:d,url:Ge(O,r.path,b),connectTimeout:S(f,e.timeouts.connect),responseTimeout:S(f,s.timeout)},x=j=>{let T={request:P,response:j,host:O,triesLeft:h.length};return n.push(T),T},v={onSucess:j=>Ke(j),onRetry(j){let T=x(j);return j.isTimedOut&&f++,Promise.all([e.logger.info("Retryable failure",pe(T)),e.hostsCache.set(O,ue(O,j.isTimedOut?U.Timeouted:U.Down))]).then(()=>p(h,S))},onFail(j){throw x(j),ze(j,de(n))}};return e.requester.send(P).then(j=>ur(j,v))};return ar(e.hostsCache,t).then(h=>p([...h.statelessHosts].reverse(),h.getTimeout))}function lr(e){let{hostsCache:t,logger:r,requester:s,requestsCache:n,responsesCache:a,timeouts:o,userAgent:d,hosts:y,queryParameters:b,headers:f}=e,p={hostsCache:t,logger:r,requester:s,requestsCache:n,responsesCache:a,timeouts:o,userAgent:d,headers:f,queryParameters:b,hosts:y.map(h=>le(h)),read(h,S){let O=ce(S,p.timeouts.read),P=()=>Qe(p,p.hosts.filter(j=>(j.accept&X.Read)!=0),h,O);if((O.cacheable!==void 0?O.cacheable:h.cacheable)!==!0)return P();let v={request:h,mappedRequestOptions:O,transporter:{queryParameters:p.queryParameters,headers:p.headers}};return p.responsesCache.get(v,()=>p.requestsCache.get(v,()=>p.requestsCache.set(v,P()).then(j=>Promise.all([p.requestsCache.delete(v),j]),j=>Promise.all([p.requestsCache.delete(v),Promise.reject(j)])).then(([j,T])=>T)),{miss:j=>p.responsesCache.set(v,j)})},write(h,S){return Qe(p,p.hosts.filter(O=>(O.accept&X.Write)!=0),h,ce(S,p.timeouts.write))}};return p}function dr(e){let t={value:`Algolia for JavaScript (${e})`,add(r){let s=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return t.value.indexOf(s)===-1&&(t.value=`${t.value}${s}`),t}};return t}function Ke(e){try{return JSON.parse(e.content)}catch(t){throw Je(t.message,e)}}function ze({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(n){}return Xe(s,t,r)}function pr(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}function Ge(e,t,r){let s=Ye(r),n=`${e.protocol}://${e.url}/${t.charAt(0)==="/"?t.substr(1):t}`;return s.length&&(n+=`?${s}`),n}function Ye(e){let t=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(e).map(r=>pr("%s=%s",r,t(e[r])?JSON.stringify(e[r]):e[r])).join("&")}function $e(e,t){if(e.method===He.MethodEnum.Get||e.data===void 0&&t.data===void 0)return;let r=Array.isArray(e.data)?e.data:u(u({},e.data),t.data);return JSON.stringify(r)}function Le(e,t){let r=u(u({},e.headers),t.headers),s={};return Object.keys(r).forEach(n=>{let a=r[n];s[n.toLowerCase()]=a}),s}function de(e){return e.map(t=>pe(t))}function pe(e){let t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return g(u({},e),{request:g(u({},e.request),{headers:u(u({},e.request.headers),t)})})}function Xe(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}function Je(e,t){return{name:"DeserializationError",message:e,response:t}}function Ve(e){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:e}}A.CallEnum=X;A.HostStatusEnum=U;A.createApiError=Xe;A.createDeserializationError=Je;A.createMappedRequestOptions=ce;A.createRetryError=Ve;A.createStatefulHost=ue;A.createStatelessHost=le;A.createTransporter=lr;A.createUserAgent=dr;A.deserializeFailure=ze;A.deserializeSuccess=Ke;A.isStatefulHostTimeouted=Be;A.isStatefulHostUp=Fe;A.serializeData=$e;A.serializeHeaders=Le;A.serializeQueryParameters=Ye;A.serializeUrl=Ge;A.stackFrameWithoutCredentials=pe;A.stackTraceWithoutCredentials=de});var K=I((en,et)=>{et.exports=Ze()});var tt=I(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});var N=F(),mr=K(),z=B(),hr=e=>{let t=e.region||"us",r=N.createAuth(N.AuthMode.WithinHeaders,e.appId,e.apiKey),s=mr.createTransporter(g(u({hosts:[{url:`analytics.${t}.algolia.com`}]},e),{headers:u(g(u({},r.headers()),{"content-type":"application/json"}),e.headers),queryParameters:u(u({},r.queryParameters()),e.queryParameters)})),n=e.appId;return N.addMethods({appId:n,transporter:s},e.methods)},yr=e=>(t,r)=>e.transporter.write({method:z.MethodEnum.Post,path:"2/abtests",data:t},r),gr=e=>(t,r)=>e.transporter.write({method:z.MethodEnum.Delete,path:N.encode("2/abtests/%s",t)},r),fr=e=>(t,r)=>e.transporter.read({method:z.MethodEnum.Get,path:N.encode("2/abtests/%s",t)},r),br=e=>t=>e.transporter.read({method:z.MethodEnum.Get,path:"2/abtests"},t),Pr=e=>(t,r)=>e.transporter.write({method:z.MethodEnum.Post,path:N.encode("2/abtests/%s/stop",t)},r);w.addABTest=yr;w.createAnalyticsClient=hr;w.deleteABTest=gr;w.getABTest=fr;w.getABTests=br;w.stopABTest=Pr});var st=I((rn,rt)=>{rt.exports=tt()});var at=I(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});var me=F(),jr=K(),nt=B(),Or=e=>{let t=e.region||"us",r=me.createAuth(me.AuthMode.WithinHeaders,e.appId,e.apiKey),s=jr.createTransporter(g(u({hosts:[{url:`recommendation.${t}.algolia.com`}]},e),{headers:u(g(u({},r.headers()),{"content-type":"application/json"}),e.headers),queryParameters:u(u({},r.queryParameters()),e.queryParameters)}));return me.addMethods({appId:e.appId,transporter:s},e.methods)},Ir=e=>t=>e.transporter.read({method:nt.MethodEnum.Get,path:"1/strategies/personalization"},t),Ar=e=>(t,r)=>e.transporter.write({method:nt.MethodEnum.Post,path:"1/strategies/personalization",data:t},r);G.createRecommendationClient=Or;G.getPersonalizationStrategy=Ir;G.setPersonalizationStrategy=Ar});var it=I((nn,ot)=>{ot.exports=at()});var jt=I(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var l=F(),q=K(),m=B(),Sr=require("crypto");function Y(e){let t=r=>e.request(r).then(s=>{if(e.batch!==void 0&&e.batch(s.hits),!e.shouldStop(s))return s.cursor?t({cursor:s.cursor}):t({page:(r.page||0)+1})});return t({})}var Dr=e=>{let t=e.appId,r=l.createAuth(e.authMode!==void 0?e.authMode:l.AuthMode.WithinHeaders,t,e.apiKey),s=q.createTransporter(g(u({hosts:[{url:`${t}-dsn.algolia.net`,accept:q.CallEnum.Read},{url:`${t}.algolia.net`,accept:q.CallEnum.Write}].concat(l.shuffle([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}]))},e),{headers:u(g(u({},r.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:u(u({},r.queryParameters()),e.queryParameters)})),n={transporter:s,appId:t,addAlgoliaAgent(a,o){s.userAgent.add({segment:a,version:o})},clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})}};return l.addMethods(n,e.methods)};function ct(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function ut(){return{name:"ObjectNotFoundError",message:"Object not found."}}function lt(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var Rr=e=>(t,r)=>{let d=r||{},{queryParameters:s}=d,n=R(d,["queryParameters"]),a=u({acl:t},s!==void 0?{queryParameters:s}:{}),o=(y,b)=>l.createRetryablePromise(f=>$(e)(y.key,b).catch(p=>{if(p.status!==404)throw p;return f()}));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:"1/keys",data:a},n),o)},vr=e=>(t,r,s)=>{let n=q.createMappedRequestOptions(s);return n.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:m.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:r}},n)},xr=e=>(t,r,s)=>e.transporter.write({method:m.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:t,cluster:r}},s),Z=e=>(t,r,s)=>{let n=(a,o)=>L(e)(t,{methods:{waitTask:D}}).waitTask(a.taskID,o);return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/operation",t),data:{operation:"copy",destination:r}},s),n)},qr=e=>(t,r,s)=>Z(e)(t,r,g(u({},s),{scope:[ee.Rules]})),Er=e=>(t,r,s)=>Z(e)(t,r,g(u({},s),{scope:[ee.Settings]})),Tr=e=>(t,r,s)=>Z(e)(t,r,g(u({},s),{scope:[ee.Synonyms]})),Mr=e=>(t,r)=>{let s=(n,a)=>l.createRetryablePromise(o=>$(e)(t,a).then(o).catch(d=>{if(d.status!==404)throw d}));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Delete,path:l.encode("1/keys/%s",t)},r),s)},wr=()=>(e,t)=>{let r=q.serializeQueryParameters(t),s=Sr.createHmac("sha256",e).update(r).digest("hex");return Buffer.from(s+r).toString("base64")},$=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/keys/%s",t)},r),kr=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/logs"},t),Cr=()=>e=>{let t=Buffer.from(e,"base64").toString("ascii"),r=/validUntil=(\d+)/,s=t.match(r);if(s===null)throw lt();return parseInt(s[1],10)-Math.round(new Date().getTime()/1e3)},Ur=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/clusters/mapping/top"},t),Nr=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/clusters/mapping/%s",t)},r),Wr=e=>t=>{let n=t||{},{retrieveMappings:r}=n,s=R(n,["retrieveMappings"]);return r===!0&&(s.getClusters=!0),e.transporter.read({method:m.MethodEnum.Get,path:"1/clusters/mapping/pending"},s)},L=e=>(t,r={})=>{let s={transporter:e.transporter,appId:e.appId,indexName:t};return l.addMethods(s,r.methods)},Hr=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/keys"},t),_r=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/clusters"},t),Fr=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/indexes"},t),Br=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:"1/clusters/mapping"},t),Kr=e=>(t,r,s)=>{let n=(a,o)=>L(e)(t,{methods:{waitTask:D}}).waitTask(a.taskID,o);return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/operation",t),data:{operation:"move",destination:r}},s),n)},zr=e=>(t,r)=>{let s=(n,a)=>Promise.all(Object.keys(n.taskID).map(o=>L(e)(o,{methods:{waitTask:D}}).waitTask(n.taskID[o],a)));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:t}},r),s)},Gr=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:t}},r),$r=e=>(t,r)=>{let s=t.map(n=>g(u({},n),{params:q.serializeQueryParameters(n.params||{})}));return e.transporter.read({method:m.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:s},cacheable:!0},r)},Lr=e=>(t,r)=>Promise.all(t.map(s=>{let d=s.params,{facetName:n,facetQuery:a}=d,o=R(d,["facetName","facetQuery"]);return L(e)(s.indexName,{methods:{searchForFacetValues:dt}}).searchForFacetValues(n,a,u(u({},r),o))})),Vr=e=>(t,r)=>{let s=q.createMappedRequestOptions(r);return s.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:m.MethodEnum.Delete,path:"1/clusters/mapping"},s)},Qr=e=>(t,r)=>{let s=(n,a)=>l.createRetryablePromise(o=>$(e)(t,a).catch(d=>{if(d.status!==404)throw d;return o()}));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/keys/%s/restore",t)},r),s)},Jr=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:t}},r),Xr=e=>(t,r)=>{let s=Object.assign({},r),f=r||{},{queryParameters:n}=f,a=R(f,["queryParameters"]),o=n?{queryParameters:n}:{},d=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],y=p=>Object.keys(s).filter(h=>d.indexOf(h)!==-1).every(h=>p[h]===s[h]),b=(p,h)=>l.createRetryablePromise(S=>$(e)(t,h).then(O=>y(O)?Promise.resolve():S()));return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Put,path:l.encode("1/keys/%s",t),data:o},a),b)},pt=e=>(t,r)=>{let s=(n,a)=>D(e)(n.taskID,a);return l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/batch",e.indexName),data:{requests:t}},r),s)},Yr=e=>t=>Y(g(u({},t),{shouldStop:r=>r.cursor===void 0,request:r=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/browse",e.indexName),data:r},t)})),Zr=e=>t=>{let r=u({hitsPerPage:1e3},t);return Y(g(u({},r),{shouldStop:s=>s.hits.lengthg(u({},n),{hits:n.hits.map(a=>(delete a._highlightResult,a))}))}}))},es=e=>t=>{let r=u({hitsPerPage:1e3},t);return Y(g(u({},r),{shouldStop:s=>s.hits.lengthg(u({},n),{hits:n.hits.map(a=>(delete a._highlightResult,a))}))}}))},te=e=>(t,r,s)=>{let y=s||{},{batchSize:n}=y,a=R(y,["batchSize"]),o={taskIDs:[],objectIDs:[]},d=(b=0)=>{let f=[],p;for(p=b;p({action:r,body:h})),a).then(h=>(o.objectIDs=o.objectIDs.concat(h.objectIDs),o.taskIDs.push(h.taskID),p++,d(p)))};return l.createWaitablePromise(d(),(b,f)=>Promise.all(b.taskIDs.map(p=>D(e)(p,f))))},ts=e=>t=>l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/clear",e.indexName)},t),(r,s)=>D(e)(r.taskID,s)),rs=e=>t=>{let a=t||{},{forwardToReplicas:r}=a,s=R(a,["forwardToReplicas"]),n=q.createMappedRequestOptions(s);return r&&(n.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/rules/clear",e.indexName)},n),(o,d)=>D(e)(o.taskID,d))},ss=e=>t=>{let a=t||{},{forwardToReplicas:r}=a,s=R(a,["forwardToReplicas"]),n=q.createMappedRequestOptions(s);return r&&(n.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/synonyms/clear",e.indexName)},n),(o,d)=>D(e)(o.taskID,d))},ns=e=>(t,r)=>l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/deleteByQuery",e.indexName),data:t},r),(s,n)=>D(e)(s.taskID,n)),as=e=>t=>l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Delete,path:l.encode("1/indexes/%s",e.indexName)},t),(r,s)=>D(e)(r.taskID,s)),os=e=>(t,r)=>l.createWaitablePromise(yt(e)([t],r).then(s=>({taskID:s.taskIDs[0]})),(s,n)=>D(e)(s.taskID,n)),yt=e=>(t,r)=>{let s=t.map(n=>({objectID:n}));return te(e)(s,k.DeleteObject,r)},is=e=>(t,r)=>{let o=r||{},{forwardToReplicas:s}=o,n=R(o,["forwardToReplicas"]),a=q.createMappedRequestOptions(n);return s&&(a.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Delete,path:l.encode("1/indexes/%s/rules/%s",e.indexName,t)},a),(d,y)=>D(e)(d.taskID,y))},cs=e=>(t,r)=>{let o=r||{},{forwardToReplicas:s}=o,n=R(o,["forwardToReplicas"]),a=q.createMappedRequestOptions(n);return s&&(a.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Delete,path:l.encode("1/indexes/%s/synonyms/%s",e.indexName,t)},a),(d,y)=>D(e)(d.taskID,y))},us=e=>t=>gt(e)(t).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),ls=e=>(t,r)=>{let y=r||{},{query:s,paginate:n}=y,a=R(y,["query","paginate"]),o=0,d=()=>ft(e)(s||"",g(u({},a),{page:o})).then(b=>{for(let[f,p]of Object.entries(b.hits))if(t(p))return{object:p,position:parseInt(f,10),page:o};if(o++,n===!1||o>=b.nbPages)throw ut();return d()});return d()},ds=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/%s",e.indexName,t)},r),ps=()=>(e,t)=>{for(let[r,s]of Object.entries(e.hits))if(s.objectID===t)return parseInt(r,10);return-1},ms=e=>(t,r)=>{let o=r||{},{attributesToRetrieve:s}=o,n=R(o,["attributesToRetrieve"]),a=t.map(d=>u({indexName:e.indexName,objectID:d},s?{attributesToRetrieve:s}:{}));return e.transporter.read({method:m.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:a}},n)},hs=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/rules/%s",e.indexName,t)},r),gt=e=>t=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/settings",e.indexName),data:{getVersion:2}},t),ys=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/synonyms/%s",e.indexName,t)},r),bt=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Get,path:l.encode("1/indexes/%s/task/%s",e.indexName,t.toString())},r),gs=e=>(t,r)=>l.createWaitablePromise(Pt(e)([t],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,n)=>D(e)(s.taskID,n)),Pt=e=>(t,r)=>{let o=r||{},{createIfNotExists:s}=o,n=R(o,["createIfNotExists"]),a=s?k.PartialUpdateObject:k.PartialUpdateObjectNoCreate;return te(e)(t,a,n)},fs=e=>(t,r)=>{let O=r||{},{safe:s,autoGenerateObjectIDIfNotExist:n,batchSize:a}=O,o=R(O,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),d=(P,x,v,j)=>l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/operation",P),data:{operation:v,destination:x}},j),(T,V)=>D(e)(T.taskID,V)),y=Math.random().toString(36).substring(7),b=`${e.indexName}_tmp_${y}`,f=he({appId:e.appId,transporter:e.transporter,indexName:b}),p=[],h=d(e.indexName,b,"copy",g(u({},o),{scope:["settings","synonyms","rules"]}));p.push(h);let S=(s?h.wait(o):h).then(()=>{let P=f(t,g(u({},o),{autoGenerateObjectIDIfNotExist:n,batchSize:a}));return p.push(P),s?P.wait(o):P}).then(()=>{let P=d(b,e.indexName,"move",o);return p.push(P),s?P.wait(o):P}).then(()=>Promise.all(p)).then(([P,x,v])=>({objectIDs:x.objectIDs,taskIDs:[P.taskID,...x.taskIDs,v.taskID]}));return l.createWaitablePromise(S,(P,x)=>Promise.all(p.map(v=>v.wait(x))))},bs=e=>(t,r)=>ye(e)(t,g(u({},r),{clearExistingRules:!0})),Ps=e=>(t,r)=>ge(e)(t,g(u({},r),{replaceExistingSynonyms:!0})),js=e=>(t,r)=>l.createWaitablePromise(he(e)([t],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,n)=>D(e)(s.taskID,n)),he=e=>(t,r)=>{let o=r||{},{autoGenerateObjectIDIfNotExist:s}=o,n=R(o,["autoGenerateObjectIDIfNotExist"]),a=s?k.AddObject:k.UpdateObject;if(a===k.UpdateObject){for(let d of t)if(d.objectID===void 0)return l.createWaitablePromise(Promise.reject(ct()))}return te(e)(t,a,n)},Os=e=>(t,r)=>ye(e)([t],r),ye=e=>(t,r)=>{let d=r||{},{forwardToReplicas:s,clearExistingRules:n}=d,a=R(d,["forwardToReplicas","clearExistingRules"]),o=q.createMappedRequestOptions(a);return s&&(o.queryParameters.forwardToReplicas=1),n&&(o.queryParameters.clearExistingRules=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/rules/batch",e.indexName),data:t},o),(y,b)=>D(e)(y.taskID,b))},Is=e=>(t,r)=>ge(e)([t],r),ge=e=>(t,r)=>{let d=r||{},{forwardToReplicas:s,replaceExistingSynonyms:n}=d,a=R(d,["forwardToReplicas","replaceExistingSynonyms"]),o=q.createMappedRequestOptions(a);return s&&(o.queryParameters.forwardToReplicas=1),n&&(o.queryParameters.replaceExistingSynonyms=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/synonyms/batch",e.indexName),data:t},o),(y,b)=>D(e)(y.taskID,b))},ft=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),dt=e=>(t,r,s)=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},s),mt=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/rules/search",e.indexName),data:{query:t}},r),ht=e=>(t,r)=>e.transporter.read({method:m.MethodEnum.Post,path:l.encode("1/indexes/%s/synonyms/search",e.indexName),data:{query:t}},r),As=e=>(t,r)=>{let o=r||{},{forwardToReplicas:s}=o,n=R(o,["forwardToReplicas"]),a=q.createMappedRequestOptions(n);return s&&(a.queryParameters.forwardToReplicas=1),l.createWaitablePromise(e.transporter.write({method:m.MethodEnum.Put,path:l.encode("1/indexes/%s/settings",e.indexName),data:t},a),(d,y)=>D(e)(d.taskID,y))},D=e=>(t,r)=>l.createRetryablePromise(s=>bt(e)(t,r).then(n=>n.status!=="published"?s():void 0)),Ss={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",ListIndexes:"listIndexes",Logs:"logs",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},k={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject"},ee={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},Ds={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},Rs={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};i.ApiKeyACLEnum=Ss;i.BatchActionEnum=k;i.ScopeEnum=ee;i.StrategyEnum=Ds;i.SynonymEnum=Rs;i.addApiKey=Rr;i.assignUserID=vr;i.assignUserIDs=xr;i.batch=pt;i.browseObjects=Yr;i.browseRules=Zr;i.browseSynonyms=es;i.chunkedBatch=te;i.clearObjects=ts;i.clearRules=rs;i.clearSynonyms=ss;i.copyIndex=Z;i.copyRules=qr;i.copySettings=Er;i.copySynonyms=Tr;i.createBrowsablePromise=Y;i.createMissingObjectIDError=ct;i.createObjectNotFoundError=ut;i.createSearchClient=Dr;i.createValidUntilNotFoundError=lt;i.deleteApiKey=Mr;i.deleteBy=ns;i.deleteIndex=as;i.deleteObject=os;i.deleteObjects=yt;i.deleteRule=is;i.deleteSynonym=cs;i.exists=us;i.findObject=ls;i.generateSecuredApiKey=wr;i.getApiKey=$;i.getLogs=kr;i.getObject=ds;i.getObjectPosition=ps;i.getObjects=ms;i.getRule=hs;i.getSecuredApiKeyRemainingValidity=Cr;i.getSettings=gt;i.getSynonym=ys;i.getTask=bt;i.getTopUserIDs=Ur;i.getUserID=Nr;i.hasPendingMappings=Wr;i.initIndex=L;i.listApiKeys=Hr;i.listClusters=_r;i.listIndices=Fr;i.listUserIDs=Br;i.moveIndex=Kr;i.multipleBatch=zr;i.multipleGetObjects=Gr;i.multipleQueries=$r;i.multipleSearchForFacetValues=Lr;i.partialUpdateObject=gs;i.partialUpdateObjects=Pt;i.removeUserID=Vr;i.replaceAllObjects=fs;i.replaceAllRules=bs;i.replaceAllSynonyms=Ps;i.restoreApiKey=Qr;i.saveObject=js;i.saveObjects=he;i.saveRule=Os;i.saveRules=ye;i.saveSynonym=Is;i.saveSynonyms=ge;i.search=ft;i.searchForFacetValues=dt;i.searchRules=mt;i.searchSynonyms=ht;i.searchUserIDs=Jr;i.setSettings=As;i.updateApiKey=Xr;i.waitTask=D});var It=I((on,Ot)=>{Ot.exports=jt()});var At=I(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});function vs(){return{debug(e,t){return Promise.resolve()},info(e,t){return Promise.resolve()},error(e,t){return Promise.resolve()}}}var xs={Debug:1,Info:2,Error:3};re.LogLevelEnum=xs;re.createNullLogger=vs});var Dt=I((un,St)=>{St.exports=At()});var xt=I(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});var Rt=require("http"),vt=require("https"),qs=require("url");function Es(){let e={keepAlive:!0},t=new Rt.Agent(e),r=new vt.Agent(e);return{send(s){return new Promise(n=>{let a=qs.parse(s.url),o=a.query===null?a.pathname:`${a.pathname}?${a.query}`,d=u({agent:a.protocol==="https:"?r:t,hostname:a.hostname,path:o,method:s.method,headers:s.headers},a.port!==void 0?{port:a.port||""}:{}),y=(a.protocol==="https:"?vt:Rt).request(d,h=>{let S="";h.on("data",O=>S+=O),h.on("end",()=>{clearTimeout(f),clearTimeout(p),n({status:h.statusCode||0,content:S,isTimedOut:!1})})}),b=(h,S)=>setTimeout(()=>{y.abort(),n({status:0,content:S,isTimedOut:!0})},h*1e3),f=b(s.connectTimeout,"Connection timeout"),p;y.on("error",h=>{clearTimeout(f),clearTimeout(p),n({status:0,content:h.message,isTimedOut:!1})}),y.once("response",()=>{clearTimeout(f),p=b(s.responseTimeout,"Socket timeout")}),s.data!==void 0&&y.write(s.data),y.end()})},destroy(){return t.destroy(),r.destroy(),Promise.resolve()}}}fe.createNodeHttpRequester=Es});var Et=I((dn,qt)=>{qt.exports=xt()});var kt=I((pn,Tt)=>{"use strict";var Mt=Ee(),Ts=we(),W=st(),be=F(),Pe=it(),c=It(),Ms=Dt(),ws=Et(),ks=K();function wt(e,t,r){let s={appId:e,apiKey:t,timeouts:{connect:2,read:5,write:30},requester:ws.createNodeHttpRequester(),logger:Ms.createNullLogger(),responsesCache:Mt.createNullCache(),requestsCache:Mt.createNullCache(),hostsCache:Ts.createInMemoryCache(),userAgent:ks.createUserAgent(be.version).add({segment:"Node.js",version:process.versions.node})};return c.createSearchClient(g(u(u({},s),r),{methods:{search:c.multipleQueries,searchForFacetValues:c.multipleSearchForFacetValues,multipleBatch:c.multipleBatch,multipleGetObjects:c.multipleGetObjects,multipleQueries:c.multipleQueries,copyIndex:c.copyIndex,copySettings:c.copySettings,copyRules:c.copyRules,copySynonyms:c.copySynonyms,moveIndex:c.moveIndex,listIndices:c.listIndices,getLogs:c.getLogs,listClusters:c.listClusters,multipleSearchForFacetValues:c.multipleSearchForFacetValues,getApiKey:c.getApiKey,addApiKey:c.addApiKey,listApiKeys:c.listApiKeys,updateApiKey:c.updateApiKey,deleteApiKey:c.deleteApiKey,restoreApiKey:c.restoreApiKey,assignUserID:c.assignUserID,assignUserIDs:c.assignUserIDs,getUserID:c.getUserID,searchUserIDs:c.searchUserIDs,listUserIDs:c.listUserIDs,getTopUserIDs:c.getTopUserIDs,removeUserID:c.removeUserID,hasPendingMappings:c.hasPendingMappings,generateSecuredApiKey:c.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:c.getSecuredApiKeyRemainingValidity,destroy:be.destroy,initIndex:n=>a=>c.initIndex(n)(a,{methods:{batch:c.batch,delete:c.deleteIndex,getObject:c.getObject,getObjects:c.getObjects,saveObject:c.saveObject,saveObjects:c.saveObjects,search:c.search,searchForFacetValues:c.searchForFacetValues,waitTask:c.waitTask,setSettings:c.setSettings,getSettings:c.getSettings,partialUpdateObject:c.partialUpdateObject,partialUpdateObjects:c.partialUpdateObjects,deleteObject:c.deleteObject,deleteObjects:c.deleteObjects,deleteBy:c.deleteBy,clearObjects:c.clearObjects,browseObjects:c.browseObjects,getObjectPosition:c.getObjectPosition,findObject:c.findObject,exists:c.exists,saveSynonym:c.saveSynonym,saveSynonyms:c.saveSynonyms,getSynonym:c.getSynonym,searchSynonyms:c.searchSynonyms,browseSynonyms:c.browseSynonyms,deleteSynonym:c.deleteSynonym,clearSynonyms:c.clearSynonyms,replaceAllObjects:c.replaceAllObjects,replaceAllSynonyms:c.replaceAllSynonyms,searchRules:c.searchRules,getRule:c.getRule,deleteRule:c.deleteRule,saveRule:c.saveRule,saveRules:c.saveRules,replaceAllRules:c.replaceAllRules,browseRules:c.browseRules,clearRules:c.clearRules}}),initAnalytics:()=>n=>W.createAnalyticsClient(g(u(u({},s),n),{methods:{addABTest:W.addABTest,getABTest:W.getABTest,getABTests:W.getABTests,stopABTest:W.stopABTest,deleteABTest:W.deleteABTest}})),initRecommendation:()=>n=>Pe.createRecommendationClient(g(u(u({},s),n),{methods:{getPersonalizationStrategy:Pe.getPersonalizationStrategy,setPersonalizationStrategy:Pe.setPersonalizationStrategy}}))}}))}wt.version=be.version;Tt.exports=wt});var Ut=I((mn,je)=>{var Ct=kt();je.exports=Ct;je.exports.default=Ct});var Ws={};Vt(Ws,{default:()=>Ks});var Oe=C(require("@yarnpkg/core")),E=C(require("@yarnpkg/core")),Ie=C(require("@yarnpkg/plugin-essentials")),Ht=C(require("semver"));var se=C(require("@yarnpkg/core")),Nt=C(Ut()),Cs="e8e1bd300d860104bb8c58453ffa1eb4",Us="OFCNCOG2CU",Wt=async(e,t)=>{var a;let r=se.structUtils.stringifyIdent(e),n=Ns(t).initIndex("npm-search");try{return((a=(await n.getObject(r,{attributesToRetrieve:["types"]})).types)==null?void 0:a.ts)==="definitely-typed"}catch(o){return!1}},Ns=e=>(0,Nt.default)(Us,Cs,{requester:{async send(r){try{let s=await se.httpUtils.request(r.url,r.data||null,{configuration:e,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var _t=e=>e.scope?`${e.scope}__${e.name}`:`${e.name}`,Hs=async(e,t,r,s)=>{if(r.scope==="types")return;let{project:n}=e,{configuration:a}=n,o=a.makeResolver(),d={project:n,resolver:o,report:new E.ThrowReport};if(!await Wt(r,a))return;let b=_t(r),f=E.structUtils.parseRange(r.range).selector;if(!E.semverUtils.validRange(f)){let P=await o.getCandidates(r,new Map,d);f=E.structUtils.parseRange(P[0].reference).selector}let p=Ht.default.coerce(f);if(p===null)return;let h=`${Ie.suggestUtils.Modifier.CARET}${p.major}`,S=E.structUtils.makeDescriptor(E.structUtils.makeIdent("types",b),h),O=E.miscUtils.mapAndFind(n.workspaces,P=>{var T,V;let x=(T=P.manifest.dependencies.get(r.identHash))==null?void 0:T.descriptorHash,v=(V=P.manifest.devDependencies.get(r.identHash))==null?void 0:V.descriptorHash;if(x!==r.descriptorHash&&v!==r.descriptorHash)return E.miscUtils.mapAndFind.skip;let j=[];for(let Ae of Oe.Manifest.allDependencies){let Se=P.manifest[Ae].get(S.identHash);typeof Se!="undefined"&&j.push([Ae,Se])}return j.length===0?E.miscUtils.mapAndFind.skip:j});if(typeof O!="undefined")for(let[P,x]of O)e.manifest[P].set(x.identHash,x);else{try{if((await o.getCandidates(S,new Map,d)).length===0)return}catch{return}e.manifest[Ie.suggestUtils.Target.DEVELOPMENT].set(S.identHash,S)}},_s=async(e,t,r)=>{if(r.scope==="types")return;let s=_t(r),n=E.structUtils.makeIdent("types",s);for(let a of Oe.Manifest.allDependencies)typeof e.manifest[a].get(n.identHash)!="undefined"&&e.manifest[a].delete(n.identHash)},Fs=(e,t)=>{t.publishConfig&&t.publishConfig.typings&&(t.typings=t.publishConfig.typings),t.publishConfig&&t.publishConfig.types&&(t.types=t.publishConfig.types)},Bs={hooks:{afterWorkspaceDependencyAddition:Hs,afterWorkspaceDependencyRemoval:_s,beforeWorkspacePacking:Fs}},Ks=Bs;return Ws;})(); -return plugin; -} -}; diff --git a/.yarn/plugins/@yarnpkg/plugin-version.cjs b/.yarn/plugins/@yarnpkg/plugin-version.cjs deleted file mode 100644 index 87de4f440..000000000 --- a/.yarn/plugins/@yarnpkg/plugin-version.cjs +++ /dev/null @@ -1,550 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-version", -factory: function (require) { -var plugin=(()=>{var ZB=Object.create,zy=Object.defineProperty,$B=Object.defineProperties,eU=Object.getOwnPropertyDescriptor,tU=Object.getOwnPropertyDescriptors,nU=Object.getOwnPropertyNames,uS=Object.getOwnPropertySymbols,rU=Object.getPrototypeOf,oS=Object.prototype.hasOwnProperty,iU=Object.prototype.propertyIsEnumerable;var lS=(i,o,f)=>o in i?zy(i,o,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[o]=f,E0=(i,o)=>{for(var f in o||(o={}))oS.call(o,f)&&lS(i,f,o[f]);if(uS)for(var f of uS(o))iU.call(o,f)&&lS(i,f,o[f]);return i},Gf=(i,o)=>$B(i,tU(o)),uU=i=>zy(i,"__esModule",{value:!0});var ce=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),sS=(i,o)=>{for(var f in o)zy(i,f,{get:o[f],enumerable:!0})},oU=(i,o,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of nU(o))!oS.call(i,p)&&p!=="default"&&zy(i,p,{get:()=>o[p],enumerable:!(f=eU(o,p))||f.enumerable});return i},Mi=i=>oU(uU(zy(i!=null?ZB(rU(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var eD=ce((F$,aS)=>{function lU(i,o){for(var f=-1,p=i==null?0:i.length,E=Array(p);++f{function sU(){this.__data__=[],this.size=0}fS.exports=sU});var tD=ce((P$,dS)=>{function aU(i,o){return i===o||i!==i&&o!==o}dS.exports=aU});var qy=ce((I$,pS)=>{var fU=tD();function cU(i,o){for(var f=i.length;f--;)if(fU(i[f][0],o))return f;return-1}pS.exports=cU});var vS=ce((B$,hS)=>{var dU=qy(),pU=Array.prototype,hU=pU.splice;function vU(i){var o=this.__data__,f=dU(o,i);if(f<0)return!1;var p=o.length-1;return f==p?o.pop():hU.call(o,f,1),--this.size,!0}hS.exports=vU});var yS=ce((U$,mS)=>{var mU=qy();function yU(i){var o=this.__data__,f=mU(o,i);return f<0?void 0:o[f][1]}mS.exports=yU});var _S=ce((j$,gS)=>{var gU=qy();function _U(i){return gU(this.__data__,i)>-1}gS.exports=_U});var DS=ce((z$,ES)=>{var EU=qy();function DU(i,o){var f=this.__data__,p=EU(f,i);return p<0?(++this.size,f.push([i,o])):f[p][1]=o,this}ES.exports=DU});var Hy=ce((q$,wS)=>{var wU=cS(),SU=vS(),TU=yS(),CU=_S(),xU=DS();function jv(i){var o=-1,f=i==null?0:i.length;for(this.clear();++o{var AU=Hy();function RU(){this.__data__=new AU,this.size=0}SS.exports=RU});var xS=ce((W$,CS)=>{function OU(i){var o=this.__data__,f=o.delete(i);return this.size=o.size,f}CS.exports=OU});var RS=ce((V$,AS)=>{function kU(i){return this.__data__.get(i)}AS.exports=kU});var kS=ce((G$,OS)=>{function MU(i){return this.__data__.has(i)}OS.exports=MU});var nD=ce((Y$,MS)=>{var NU=typeof global=="object"&&global&&global.Object===Object&&global;MS.exports=NU});var Yf=ce((K$,NS)=>{var LU=nD(),FU=typeof self=="object"&&self&&self.Object===Object&&self,bU=LU||FU||Function("return this")();NS.exports=bU});var zv=ce((X$,LS)=>{var PU=Yf(),IU=PU.Symbol;LS.exports=IU});var BS=ce((Q$,bS)=>{var PS=zv(),IS=Object.prototype,BU=IS.hasOwnProperty,UU=IS.toString,Wy=PS?PS.toStringTag:void 0;function jU(i){var o=BU.call(i,Wy),f=i[Wy];try{i[Wy]=void 0;var p=!0}catch(t){}var E=UU.call(i);return p&&(o?i[Wy]=f:delete i[Wy]),E}bS.exports=jU});var jS=ce((J$,US)=>{var zU=Object.prototype,qU=zU.toString;function HU(i){return qU.call(i)}US.exports=HU});var Qp=ce((Z$,zS)=>{var qS=zv(),WU=BS(),VU=jS(),GU="[object Null]",YU="[object Undefined]",HS=qS?qS.toStringTag:void 0;function KU(i){return i==null?i===void 0?YU:GU:HS&&HS in Object(i)?WU(i):VU(i)}zS.exports=KU});var qv=ce(($$,WS)=>{function XU(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}WS.exports=XU});var rD=ce((eee,VS)=>{var QU=Qp(),JU=qv(),ZU="[object AsyncFunction]",$U="[object Function]",ej="[object GeneratorFunction]",tj="[object Proxy]";function nj(i){if(!JU(i))return!1;var o=QU(i);return o==$U||o==ej||o==ZU||o==tj}VS.exports=nj});var YS=ce((tee,GS)=>{var rj=Yf(),ij=rj["__core-js_shared__"];GS.exports=ij});var QS=ce((nee,KS)=>{var iD=YS(),XS=function(){var i=/[^.]+$/.exec(iD&&iD.keys&&iD.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function uj(i){return!!XS&&XS in i}KS.exports=uj});var uD=ce((ree,JS)=>{var oj=Function.prototype,lj=oj.toString;function sj(i){if(i!=null){try{return lj.call(i)}catch(o){}try{return i+""}catch(o){}}return""}JS.exports=sj});var $S=ce((iee,ZS)=>{var aj=rD(),fj=QS(),cj=qv(),dj=uD(),pj=/[\\^$.*+?()[\]{}|]/g,hj=/^\[object .+?Constructor\]$/,vj=Function.prototype,mj=Object.prototype,yj=vj.toString,gj=mj.hasOwnProperty,_j=RegExp("^"+yj.call(gj).replace(pj,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ej(i){if(!cj(i)||fj(i))return!1;var o=aj(i)?_j:hj;return o.test(dj(i))}ZS.exports=Ej});var tT=ce((uee,eT)=>{function Dj(i,o){return i==null?void 0:i[o]}eT.exports=Dj});var sd=ce((oee,nT)=>{var wj=$S(),Sj=tT();function Tj(i,o){var f=Sj(i,o);return wj(f)?f:void 0}nT.exports=Tj});var L_=ce((lee,rT)=>{var Cj=sd(),xj=Yf(),Aj=Cj(xj,"Map");rT.exports=Aj});var Vy=ce((see,iT)=>{var Rj=sd(),Oj=Rj(Object,"create");iT.exports=Oj});var lT=ce((aee,uT)=>{var oT=Vy();function kj(){this.__data__=oT?oT(null):{},this.size=0}uT.exports=kj});var aT=ce((fee,sT)=>{function Mj(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}sT.exports=Mj});var cT=ce((cee,fT)=>{var Nj=Vy(),Lj="__lodash_hash_undefined__",Fj=Object.prototype,bj=Fj.hasOwnProperty;function Pj(i){var o=this.__data__;if(Nj){var f=o[i];return f===Lj?void 0:f}return bj.call(o,i)?o[i]:void 0}fT.exports=Pj});var pT=ce((dee,dT)=>{var Ij=Vy(),Bj=Object.prototype,Uj=Bj.hasOwnProperty;function jj(i){var o=this.__data__;return Ij?o[i]!==void 0:Uj.call(o,i)}dT.exports=jj});var vT=ce((pee,hT)=>{var zj=Vy(),qj="__lodash_hash_undefined__";function Hj(i,o){var f=this.__data__;return this.size+=this.has(i)?0:1,f[i]=zj&&o===void 0?qj:o,this}hT.exports=Hj});var yT=ce((hee,mT)=>{var Wj=lT(),Vj=aT(),Gj=cT(),Yj=pT(),Kj=vT();function Hv(i){var o=-1,f=i==null?0:i.length;for(this.clear();++o{var _T=yT(),Xj=Hy(),Qj=L_();function Jj(){this.size=0,this.__data__={hash:new _T,map:new(Qj||Xj),string:new _T}}gT.exports=Jj});var wT=ce((mee,DT)=>{function Zj(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}DT.exports=Zj});var Gy=ce((yee,ST)=>{var $j=wT();function ez(i,o){var f=i.__data__;return $j(o)?f[typeof o=="string"?"string":"hash"]:f.map}ST.exports=ez});var CT=ce((gee,TT)=>{var tz=Gy();function nz(i){var o=tz(this,i).delete(i);return this.size-=o?1:0,o}TT.exports=nz});var AT=ce((_ee,xT)=>{var rz=Gy();function iz(i){return rz(this,i).get(i)}xT.exports=iz});var OT=ce((Eee,RT)=>{var uz=Gy();function oz(i){return uz(this,i).has(i)}RT.exports=oz});var MT=ce((Dee,kT)=>{var lz=Gy();function sz(i,o){var f=lz(this,i),p=f.size;return f.set(i,o),this.size+=f.size==p?0:1,this}kT.exports=sz});var oD=ce((wee,NT)=>{var az=ET(),fz=CT(),cz=AT(),dz=OT(),pz=MT();function Wv(i){var o=-1,f=i==null?0:i.length;for(this.clear();++o{var hz=Hy(),vz=L_(),mz=oD(),yz=200;function gz(i,o){var f=this.__data__;if(f instanceof hz){var p=f.__data__;if(!vz||p.length{var _z=Hy(),Ez=TS(),Dz=xS(),wz=RS(),Sz=kS(),Tz=FT();function Vv(i){var o=this.__data__=new _z(i);this.size=o.size}Vv.prototype.clear=Ez;Vv.prototype.delete=Dz;Vv.prototype.get=wz;Vv.prototype.has=Sz;Vv.prototype.set=Tz;bT.exports=Vv});var BT=ce((Cee,IT)=>{function Cz(i,o){for(var f=-1,p=i==null?0:i.length;++f{var xz=sd(),Az=function(){try{var i=xz(Object,"defineProperty");return i({},"",{}),i}catch(o){}}();UT.exports=Az});var sD=ce((Aee,jT)=>{var zT=lD();function Rz(i,o,f){o=="__proto__"&&zT?zT(i,o,{configurable:!0,enumerable:!0,value:f,writable:!0}):i[o]=f}jT.exports=Rz});var aD=ce((Ree,qT)=>{var Oz=sD(),kz=tD(),Mz=Object.prototype,Nz=Mz.hasOwnProperty;function Lz(i,o,f){var p=i[o];(!(Nz.call(i,o)&&kz(p,f))||f===void 0&&!(o in i))&&Oz(i,o,f)}qT.exports=Lz});var Gv=ce((Oee,HT)=>{var Fz=aD(),bz=sD();function Pz(i,o,f,p){var E=!f;f||(f={});for(var t=-1,k=o.length;++t{function Iz(i,o){for(var f=-1,p=Array(i);++f{function Bz(i){return i!=null&&typeof i=="object"}GT.exports=Bz});var KT=ce((Nee,YT)=>{var Uz=Qp(),jz=ad(),zz="[object Arguments]";function qz(i){return jz(i)&&Uz(i)==zz}YT.exports=qz});var fD=ce((Lee,XT)=>{var QT=KT(),Hz=ad(),JT=Object.prototype,Wz=JT.hasOwnProperty,Vz=JT.propertyIsEnumerable,Gz=QT(function(){return arguments}())?QT:function(i){return Hz(i)&&Wz.call(i,"callee")&&!Vz.call(i,"callee")};XT.exports=Gz});var fd=ce((Fee,ZT)=>{var Yz=Array.isArray;ZT.exports=Yz});var eC=ce((bee,$T)=>{function Kz(){return!1}$T.exports=Kz});var cD=ce((Yy,Yv)=>{var Xz=Yf(),Qz=eC(),tC=typeof Yy=="object"&&Yy&&!Yy.nodeType&&Yy,nC=tC&&typeof Yv=="object"&&Yv&&!Yv.nodeType&&Yv,Jz=nC&&nC.exports===tC,rC=Jz?Xz.Buffer:void 0,Zz=rC?rC.isBuffer:void 0,$z=Zz||Qz;Yv.exports=$z});var uC=ce((Pee,iC)=>{var eq=9007199254740991,tq=/^(?:0|[1-9]\d*)$/;function nq(i,o){var f=typeof i;return o=o==null?eq:o,!!o&&(f=="number"||f!="symbol"&&tq.test(i))&&i>-1&&i%1==0&&i{var rq=9007199254740991;function iq(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=rq}oC.exports=iq});var sC=ce((Bee,lC)=>{var uq=Qp(),oq=dD(),lq=ad(),sq="[object Arguments]",aq="[object Array]",fq="[object Boolean]",cq="[object Date]",dq="[object Error]",pq="[object Function]",hq="[object Map]",vq="[object Number]",mq="[object Object]",yq="[object RegExp]",gq="[object Set]",_q="[object String]",Eq="[object WeakMap]",Dq="[object ArrayBuffer]",wq="[object DataView]",Sq="[object Float32Array]",Tq="[object Float64Array]",Cq="[object Int8Array]",xq="[object Int16Array]",Aq="[object Int32Array]",Rq="[object Uint8Array]",Oq="[object Uint8ClampedArray]",kq="[object Uint16Array]",Mq="[object Uint32Array]",o0={};o0[Sq]=o0[Tq]=o0[Cq]=o0[xq]=o0[Aq]=o0[Rq]=o0[Oq]=o0[kq]=o0[Mq]=!0;o0[sq]=o0[aq]=o0[Dq]=o0[fq]=o0[wq]=o0[cq]=o0[dq]=o0[pq]=o0[hq]=o0[vq]=o0[mq]=o0[yq]=o0[gq]=o0[_q]=o0[Eq]=!1;function Nq(i){return lq(i)&&oq(i.length)&&!!o0[uq(i)]}lC.exports=Nq});var F_=ce((Uee,aC)=>{function Lq(i){return function(o){return i(o)}}aC.exports=Lq});var b_=ce((Ky,Kv)=>{var Fq=nD(),fC=typeof Ky=="object"&&Ky&&!Ky.nodeType&&Ky,Xy=fC&&typeof Kv=="object"&&Kv&&!Kv.nodeType&&Kv,bq=Xy&&Xy.exports===fC,pD=bq&&Fq.process,Pq=function(){try{var i=Xy&&Xy.require&&Xy.require("util").types;return i||pD&&pD.binding&&pD.binding("util")}catch(o){}}();Kv.exports=Pq});var hC=ce((jee,cC)=>{var Iq=sC(),Bq=F_(),dC=b_(),pC=dC&&dC.isTypedArray,Uq=pC?Bq(pC):Iq;cC.exports=Uq});var hD=ce((zee,vC)=>{var jq=VT(),zq=fD(),qq=fd(),Hq=cD(),Wq=uC(),Vq=hC(),Gq=Object.prototype,Yq=Gq.hasOwnProperty;function Kq(i,o){var f=qq(i),p=!f&&zq(i),E=!f&&!p&&Hq(i),t=!f&&!p&&!E&&Vq(i),k=f||p||E||t,L=k?jq(i.length,String):[],N=L.length;for(var C in i)(o||Yq.call(i,C))&&!(k&&(C=="length"||E&&(C=="offset"||C=="parent")||t&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||Wq(C,N)))&&L.push(C);return L}vC.exports=Kq});var P_=ce((qee,mC)=>{var Xq=Object.prototype;function Qq(i){var o=i&&i.constructor,f=typeof o=="function"&&o.prototype||Xq;return i===f}mC.exports=Qq});var vD=ce((Hee,yC)=>{function Jq(i,o){return function(f){return i(o(f))}}yC.exports=Jq});var _C=ce((Wee,gC)=>{var Zq=vD(),$q=Zq(Object.keys,Object);gC.exports=$q});var DC=ce((Vee,EC)=>{var eH=P_(),tH=_C(),nH=Object.prototype,rH=nH.hasOwnProperty;function iH(i){if(!eH(i))return tH(i);var o=[];for(var f in Object(i))rH.call(i,f)&&f!="constructor"&&o.push(f);return o}EC.exports=iH});var mD=ce((Gee,wC)=>{var uH=rD(),oH=dD();function lH(i){return i!=null&&oH(i.length)&&!uH(i)}wC.exports=lH});var I_=ce((Yee,SC)=>{var sH=hD(),aH=DC(),fH=mD();function cH(i){return fH(i)?sH(i):aH(i)}SC.exports=cH});var CC=ce((Kee,TC)=>{var dH=Gv(),pH=I_();function hH(i,o){return i&&dH(o,pH(o),i)}TC.exports=hH});var AC=ce((Xee,xC)=>{function vH(i){var o=[];if(i!=null)for(var f in Object(i))o.push(f);return o}xC.exports=vH});var OC=ce((Qee,RC)=>{var mH=qv(),yH=P_(),gH=AC(),_H=Object.prototype,EH=_H.hasOwnProperty;function DH(i){if(!mH(i))return gH(i);var o=yH(i),f=[];for(var p in i)p=="constructor"&&(o||!EH.call(i,p))||f.push(p);return f}RC.exports=DH});var B_=ce((Jee,kC)=>{var wH=hD(),SH=OC(),TH=mD();function CH(i){return TH(i)?wH(i,!0):SH(i)}kC.exports=CH});var NC=ce((Zee,MC)=>{var xH=Gv(),AH=B_();function RH(i,o){return i&&xH(o,AH(o),i)}MC.exports=RH});var IC=ce((Qy,Xv)=>{var OH=Yf(),LC=typeof Qy=="object"&&Qy&&!Qy.nodeType&&Qy,FC=LC&&typeof Xv=="object"&&Xv&&!Xv.nodeType&&Xv,kH=FC&&FC.exports===LC,bC=kH?OH.Buffer:void 0,PC=bC?bC.allocUnsafe:void 0;function MH(i,o){if(o)return i.slice();var f=i.length,p=PC?PC(f):new i.constructor(f);return i.copy(p),p}Xv.exports=MH});var UC=ce(($ee,BC)=>{function NH(i,o){var f=-1,p=i.length;for(o||(o=Array(p));++f{function LH(i,o){for(var f=-1,p=i==null?0:i.length,E=0,t=[];++f{function FH(){return[]}qC.exports=FH});var U_=ce((nte,HC)=>{var bH=zC(),PH=yD(),IH=Object.prototype,BH=IH.propertyIsEnumerable,WC=Object.getOwnPropertySymbols,UH=WC?function(i){return i==null?[]:(i=Object(i),bH(WC(i),function(o){return BH.call(i,o)}))}:PH;HC.exports=UH});var GC=ce((rte,VC)=>{var jH=Gv(),zH=U_();function qH(i,o){return jH(i,zH(i),o)}VC.exports=qH});var j_=ce((ite,YC)=>{function HH(i,o){for(var f=-1,p=o.length,E=i.length;++f{var WH=vD(),VH=WH(Object.getPrototypeOf,Object);KC.exports=VH});var gD=ce((ote,XC)=>{var GH=j_(),YH=z_(),KH=U_(),XH=yD(),QH=Object.getOwnPropertySymbols,JH=QH?function(i){for(var o=[];i;)GH(o,KH(i)),i=YH(i);return o}:XH;XC.exports=JH});var JC=ce((lte,QC)=>{var ZH=Gv(),$H=gD();function eW(i,o){return ZH(i,$H(i),o)}QC.exports=eW});var _D=ce((ste,ZC)=>{var tW=j_(),nW=fd();function rW(i,o,f){var p=o(i);return nW(i)?p:tW(p,f(i))}ZC.exports=rW});var e6=ce((ate,$C)=>{var iW=_D(),uW=U_(),oW=I_();function lW(i){return iW(i,oW,uW)}$C.exports=lW});var ED=ce((fte,t6)=>{var sW=_D(),aW=gD(),fW=B_();function cW(i){return sW(i,fW,aW)}t6.exports=cW});var r6=ce((cte,n6)=>{var dW=sd(),pW=Yf(),hW=dW(pW,"DataView");n6.exports=hW});var u6=ce((dte,i6)=>{var vW=sd(),mW=Yf(),yW=vW(mW,"Promise");i6.exports=yW});var l6=ce((pte,o6)=>{var gW=sd(),_W=Yf(),EW=gW(_W,"Set");o6.exports=EW});var a6=ce((hte,s6)=>{var DW=sd(),wW=Yf(),SW=DW(wW,"WeakMap");s6.exports=SW});var q_=ce((vte,f6)=>{var DD=r6(),wD=L_(),SD=u6(),TD=l6(),CD=a6(),c6=Qp(),Qv=uD(),d6="[object Map]",TW="[object Object]",p6="[object Promise]",h6="[object Set]",v6="[object WeakMap]",m6="[object DataView]",CW=Qv(DD),xW=Qv(wD),AW=Qv(SD),RW=Qv(TD),OW=Qv(CD),Jp=c6;(DD&&Jp(new DD(new ArrayBuffer(1)))!=m6||wD&&Jp(new wD)!=d6||SD&&Jp(SD.resolve())!=p6||TD&&Jp(new TD)!=h6||CD&&Jp(new CD)!=v6)&&(Jp=function(i){var o=c6(i),f=o==TW?i.constructor:void 0,p=f?Qv(f):"";if(p)switch(p){case CW:return m6;case xW:return d6;case AW:return p6;case RW:return h6;case OW:return v6}return o});f6.exports=Jp});var g6=ce((mte,y6)=>{var kW=Object.prototype,MW=kW.hasOwnProperty;function NW(i){var o=i.length,f=new i.constructor(o);return o&&typeof i[0]=="string"&&MW.call(i,"index")&&(f.index=i.index,f.input=i.input),f}y6.exports=NW});var E6=ce((yte,_6)=>{var LW=Yf(),FW=LW.Uint8Array;_6.exports=FW});var H_=ce((gte,D6)=>{var w6=E6();function bW(i){var o=new i.constructor(i.byteLength);return new w6(o).set(new w6(i)),o}D6.exports=bW});var T6=ce((_te,S6)=>{var PW=H_();function IW(i,o){var f=o?PW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}S6.exports=IW});var x6=ce((Ete,C6)=>{var BW=/\w*$/;function UW(i){var o=new i.constructor(i.source,BW.exec(i));return o.lastIndex=i.lastIndex,o}C6.exports=UW});var M6=ce((Dte,A6)=>{var R6=zv(),O6=R6?R6.prototype:void 0,k6=O6?O6.valueOf:void 0;function jW(i){return k6?Object(k6.call(i)):{}}A6.exports=jW});var L6=ce((wte,N6)=>{var zW=H_();function qW(i,o){var f=o?zW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}N6.exports=qW});var b6=ce((Ste,F6)=>{var HW=H_(),WW=T6(),VW=x6(),GW=M6(),YW=L6(),KW="[object Boolean]",XW="[object Date]",QW="[object Map]",JW="[object Number]",ZW="[object RegExp]",$W="[object Set]",eV="[object String]",tV="[object Symbol]",nV="[object ArrayBuffer]",rV="[object DataView]",iV="[object Float32Array]",uV="[object Float64Array]",oV="[object Int8Array]",lV="[object Int16Array]",sV="[object Int32Array]",aV="[object Uint8Array]",fV="[object Uint8ClampedArray]",cV="[object Uint16Array]",dV="[object Uint32Array]";function pV(i,o,f){var p=i.constructor;switch(o){case nV:return HW(i);case KW:case XW:return new p(+i);case rV:return WW(i,f);case iV:case uV:case oV:case lV:case sV:case aV:case fV:case cV:case dV:return YW(i,f);case QW:return new p;case JW:case eV:return new p(i);case ZW:return VW(i);case $W:return new p;case tV:return GW(i)}}F6.exports=pV});var B6=ce((Tte,P6)=>{var hV=qv(),I6=Object.create,vV=function(){function i(){}return function(o){if(!hV(o))return{};if(I6)return I6(o);i.prototype=o;var f=new i;return i.prototype=void 0,f}}();P6.exports=vV});var j6=ce((Cte,U6)=>{var mV=B6(),yV=z_(),gV=P_();function _V(i){return typeof i.constructor=="function"&&!gV(i)?mV(yV(i)):{}}U6.exports=_V});var q6=ce((xte,z6)=>{var EV=q_(),DV=ad(),wV="[object Map]";function SV(i){return DV(i)&&EV(i)==wV}z6.exports=SV});var G6=ce((Ate,H6)=>{var TV=q6(),CV=F_(),W6=b_(),V6=W6&&W6.isMap,xV=V6?CV(V6):TV;H6.exports=xV});var K6=ce((Rte,Y6)=>{var AV=q_(),RV=ad(),OV="[object Set]";function kV(i){return RV(i)&&AV(i)==OV}Y6.exports=kV});var Z6=ce((Ote,X6)=>{var MV=K6(),NV=F_(),Q6=b_(),J6=Q6&&Q6.isSet,LV=J6?NV(J6):MV;X6.exports=LV});var rx=ce((kte,$6)=>{var FV=PT(),bV=BT(),PV=aD(),IV=CC(),BV=NC(),UV=IC(),jV=UC(),zV=GC(),qV=JC(),HV=e6(),WV=ED(),VV=q_(),GV=g6(),YV=b6(),KV=j6(),XV=fd(),QV=cD(),JV=G6(),ZV=qv(),$V=Z6(),eG=I_(),tG=B_(),nG=1,rG=2,iG=4,ex="[object Arguments]",uG="[object Array]",oG="[object Boolean]",lG="[object Date]",sG="[object Error]",tx="[object Function]",aG="[object GeneratorFunction]",fG="[object Map]",cG="[object Number]",nx="[object Object]",dG="[object RegExp]",pG="[object Set]",hG="[object String]",vG="[object Symbol]",mG="[object WeakMap]",yG="[object ArrayBuffer]",gG="[object DataView]",_G="[object Float32Array]",EG="[object Float64Array]",DG="[object Int8Array]",wG="[object Int16Array]",SG="[object Int32Array]",TG="[object Uint8Array]",CG="[object Uint8ClampedArray]",xG="[object Uint16Array]",AG="[object Uint32Array]",Wu={};Wu[ex]=Wu[uG]=Wu[yG]=Wu[gG]=Wu[oG]=Wu[lG]=Wu[_G]=Wu[EG]=Wu[DG]=Wu[wG]=Wu[SG]=Wu[fG]=Wu[cG]=Wu[nx]=Wu[dG]=Wu[pG]=Wu[hG]=Wu[vG]=Wu[TG]=Wu[CG]=Wu[xG]=Wu[AG]=!0;Wu[sG]=Wu[tx]=Wu[mG]=!1;function W_(i,o,f,p,E,t){var k,L=o&nG,N=o&rG,C=o&iG;if(f&&(k=E?f(i,p,E,t):f(i)),k!==void 0)return k;if(!ZV(i))return i;var U=XV(i);if(U){if(k=GV(i),!L)return jV(i,k)}else{var q=VV(i),W=q==tx||q==aG;if(QV(i))return UV(i,L);if(q==nx||q==ex||W&&!E){if(k=N||W?{}:KV(i),!L)return N?qV(i,BV(k,i)):zV(i,IV(k,i))}else{if(!Wu[q])return E?i:{};k=YV(i,q,L)}}t||(t=new FV);var ne=t.get(i);if(ne)return ne;t.set(i,k),$V(i)?i.forEach(function(Se){k.add(W_(Se,o,f,Se,i,t))}):JV(i)&&i.forEach(function(Se,he){k.set(he,W_(Se,o,f,he,i,t))});var m=C?N?WV:HV:N?tG:eG,we=U?void 0:m(i);return bV(we||i,function(Se,he){we&&(he=Se,Se=i[he]),PV(k,he,W_(Se,o,f,he,i,t))}),k}$6.exports=W_});var V_=ce((Mte,ix)=>{var RG=Qp(),OG=ad(),kG="[object Symbol]";function MG(i){return typeof i=="symbol"||OG(i)&&RG(i)==kG}ix.exports=MG});var ox=ce((Nte,ux)=>{var NG=fd(),LG=V_(),FG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bG=/^\w*$/;function PG(i,o){if(NG(i))return!1;var f=typeof i;return f=="number"||f=="symbol"||f=="boolean"||i==null||LG(i)?!0:bG.test(i)||!FG.test(i)||o!=null&&i in Object(o)}ux.exports=PG});var ax=ce((Lte,lx)=>{var sx=oD(),IG="Expected a function";function xD(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(IG);var f=function(){var p=arguments,E=o?o.apply(this,p):p[0],t=f.cache;if(t.has(E))return t.get(E);var k=i.apply(this,p);return f.cache=t.set(E,k)||t,k};return f.cache=new(xD.Cache||sx),f}xD.Cache=sx;lx.exports=xD});var cx=ce((Fte,fx)=>{var BG=ax(),UG=500;function jG(i){var o=BG(i,function(p){return f.size===UG&&f.clear(),p}),f=o.cache;return o}fx.exports=jG});var px=ce((bte,dx)=>{var zG=cx(),qG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HG=/\\(\\)?/g,WG=zG(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(qG,function(f,p,E,t){o.push(E?t.replace(HG,"$1"):p||f)}),o});dx.exports=WG});var _x=ce((Pte,hx)=>{var vx=zv(),VG=eD(),GG=fd(),YG=V_(),KG=1/0,mx=vx?vx.prototype:void 0,yx=mx?mx.toString:void 0;function gx(i){if(typeof i=="string")return i;if(GG(i))return VG(i,gx)+"";if(YG(i))return yx?yx.call(i):"";var o=i+"";return o=="0"&&1/i==-KG?"-0":o}hx.exports=gx});var Dx=ce((Ite,Ex)=>{var XG=_x();function QG(i){return i==null?"":XG(i)}Ex.exports=QG});var G_=ce((Bte,wx)=>{var JG=fd(),ZG=ox(),$G=px(),eY=Dx();function tY(i,o){return JG(i)?i:ZG(i,o)?[i]:$G(eY(i))}wx.exports=tY});var Tx=ce((Ute,Sx)=>{function nY(i){var o=i==null?0:i.length;return o?i[o-1]:void 0}Sx.exports=nY});var AD=ce((jte,Cx)=>{var rY=V_(),iY=1/0;function uY(i){if(typeof i=="string"||rY(i))return i;var o=i+"";return o=="0"&&1/i==-iY?"-0":o}Cx.exports=uY});var Ax=ce((zte,xx)=>{var oY=G_(),lY=AD();function sY(i,o){o=oY(o,i);for(var f=0,p=o.length;i!=null&&f{function aY(i,o,f){var p=-1,E=i.length;o<0&&(o=-o>E?0:E+o),f=f>E?E:f,f<0&&(f+=E),E=o>f?0:f-o>>>0,o>>>=0;for(var t=Array(E);++p{var fY=Ax(),cY=Ox();function dY(i,o){return o.length<2?i:fY(i,cY(o,0,-1))}kx.exports=dY});var Lx=ce((Wte,Nx)=>{var pY=G_(),hY=Tx(),vY=Mx(),mY=AD();function yY(i,o){return o=pY(o,i),i=vY(i,o),i==null||delete i[mY(hY(o))]}Nx.exports=yY});var Px=ce((Vte,Fx)=>{var gY=Qp(),_Y=z_(),EY=ad(),DY="[object Object]",wY=Function.prototype,SY=Object.prototype,bx=wY.toString,TY=SY.hasOwnProperty,CY=bx.call(Object);function xY(i){if(!EY(i)||gY(i)!=DY)return!1;var o=_Y(i);if(o===null)return!0;var f=TY.call(o,"constructor")&&o.constructor;return typeof f=="function"&&f instanceof f&&bx.call(f)==CY}Fx.exports=xY});var Bx=ce((Gte,Ix)=>{var AY=Px();function RY(i){return AY(i)?void 0:i}Ix.exports=RY});var qx=ce((Yte,Ux)=>{var jx=zv(),OY=fD(),kY=fd(),zx=jx?jx.isConcatSpreadable:void 0;function MY(i){return kY(i)||OY(i)||!!(zx&&i&&i[zx])}Ux.exports=MY});var Vx=ce((Kte,Hx)=>{var NY=j_(),LY=qx();function Wx(i,o,f,p,E){var t=-1,k=i.length;for(f||(f=LY),E||(E=[]);++t0&&f(L)?o>1?Wx(L,o-1,f,p,E):NY(E,L):p||(E[E.length]=L)}return E}Hx.exports=Wx});var Yx=ce((Xte,Gx)=>{var FY=Vx();function bY(i){var o=i==null?0:i.length;return o?FY(i,1):[]}Gx.exports=bY});var Xx=ce((Qte,Kx)=>{function PY(i,o,f){switch(f.length){case 0:return i.call(o);case 1:return i.call(o,f[0]);case 2:return i.call(o,f[0],f[1]);case 3:return i.call(o,f[0],f[1],f[2])}return i.apply(o,f)}Kx.exports=PY});var Zx=ce((Jte,Qx)=>{var IY=Xx(),Jx=Math.max;function BY(i,o,f){return o=Jx(o===void 0?i.length-1:o,0),function(){for(var p=arguments,E=-1,t=Jx(p.length-o,0),k=Array(t);++E{function UY(i){return function(){return i}}$x.exports=UY});var n5=ce(($te,t5)=>{function jY(i){return i}t5.exports=jY});var u5=ce((ene,r5)=>{var zY=e5(),i5=lD(),qY=n5(),HY=i5?function(i,o){return i5(i,"toString",{configurable:!0,enumerable:!1,value:zY(o),writable:!0})}:qY;r5.exports=HY});var l5=ce((tne,o5)=>{var WY=800,VY=16,GY=Date.now;function YY(i){var o=0,f=0;return function(){var p=GY(),E=VY-(p-f);if(f=p,E>0){if(++o>=WY)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}o5.exports=YY});var a5=ce((nne,s5)=>{var KY=u5(),XY=l5(),QY=XY(KY);s5.exports=QY});var c5=ce((rne,f5)=>{var JY=Yx(),ZY=Zx(),$Y=a5();function eK(i){return $Y(ZY(i,void 0,JY),i+"")}f5.exports=eK});var p5=ce((ine,d5)=>{var tK=eD(),nK=rx(),rK=Lx(),iK=G_(),uK=Gv(),oK=Bx(),lK=c5(),sK=ED(),aK=1,fK=2,cK=4,dK=lK(function(i,o){var f={};if(i==null)return f;var p=!1;o=tK(o,function(t){return t=iK(t,i),p||(p=t.length>1),t}),uK(i,sK(i),f),p&&(f=nK(f,aK|fK|cK,oK));for(var E=o.length;E--;)rK(f,o[E]);return f});d5.exports=dK});var eg=ce((vne,y5)=>{"use strict";var g5=Object.getOwnPropertySymbols,_K=Object.prototype.hasOwnProperty,EK=Object.prototype.propertyIsEnumerable;function DK(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function wK(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},f=0;f<10;f++)o["_"+String.fromCharCode(f)]=f;var p=Object.getOwnPropertyNames(o).map(function(t){return o[t]});if(p.join("")!=="0123456789")return!1;var E={};return"abcdefghijklmnopqrst".split("").forEach(function(t){E[t]=t}),Object.keys(Object.assign({},E)).join("")==="abcdefghijklmnopqrst"}catch(t){return!1}}y5.exports=wK()?Object.assign:function(i,o){for(var f,p=DK(i),E,t=1;t{"use strict";var LD=eg(),Kf=typeof Symbol=="function"&&Symbol.for,tg=Kf?Symbol.for("react.element"):60103,SK=Kf?Symbol.for("react.portal"):60106,TK=Kf?Symbol.for("react.fragment"):60107,CK=Kf?Symbol.for("react.strict_mode"):60108,xK=Kf?Symbol.for("react.profiler"):60114,AK=Kf?Symbol.for("react.provider"):60109,RK=Kf?Symbol.for("react.context"):60110,OK=Kf?Symbol.for("react.forward_ref"):60112,kK=Kf?Symbol.for("react.suspense"):60113,MK=Kf?Symbol.for("react.memo"):60115,NK=Kf?Symbol.for("react.lazy"):60116,_5=typeof Symbol=="function"&&Symbol.iterator;function ng(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,f=1;fJ_.length&&J_.push(i)}function BD(i,o,f,p){var E=typeof i;(E==="undefined"||E==="boolean")&&(i=null);var t=!1;if(i===null)t=!0;else switch(E){case"string":case"number":t=!0;break;case"object":switch(i.$$typeof){case tg:case SK:t=!0}}if(t)return f(p,i,o===""?"."+UD(i,0):o),1;if(t=0,o=o===""?".":o+":",Array.isArray(i))for(var k=0;k{"use strict";var BK="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";M5.exports=BK});var HD=ce((gne,L5)=>{"use strict";var qD=function(){};process.env.NODE_ENV!=="production"&&(F5=N5(),Z_={},b5=Function.call.bind(Object.prototype.hasOwnProperty),qD=function(i){var o="Warning: "+i;typeof console!="undefined"&&console.error(o);try{throw new Error(o)}catch(f){}});var F5,Z_,b5;function P5(i,o,f,p,E){if(process.env.NODE_ENV!=="production"){for(var t in i)if(b5(i,t)){var k;try{if(typeof i[t]!="function"){var L=Error((p||"React class")+": "+f+" type `"+t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[t]+"`.");throw L.name="Invariant Violation",L}k=i[t](o,t,p,f,null,F5)}catch(C){k=C}if(k&&!(k instanceof Error)&&qD((p||"React class")+": type specification of "+f+" `"+t+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof k+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),k instanceof Error&&!(k.message in Z_)){Z_[k.message]=!0;var N=E?E():"";qD("Failed "+f+" type: "+k.message+(N!=null?N:""))}}}}P5.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(Z_={})};L5.exports=P5});var I5=ce(pu=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var i=eg(),o=HD(),f="16.13.1",p=typeof Symbol=="function"&&Symbol.for,E=p?Symbol.for("react.element"):60103,t=p?Symbol.for("react.portal"):60106,k=p?Symbol.for("react.fragment"):60107,L=p?Symbol.for("react.strict_mode"):60108,N=p?Symbol.for("react.profiler"):60114,C=p?Symbol.for("react.provider"):60109,U=p?Symbol.for("react.context"):60110,q=p?Symbol.for("react.concurrent_mode"):60111,W=p?Symbol.for("react.forward_ref"):60112,ne=p?Symbol.for("react.suspense"):60113,m=p?Symbol.for("react.suspense_list"):60120,we=p?Symbol.for("react.memo"):60115,Se=p?Symbol.for("react.lazy"):60116,he=p?Symbol.for("react.block"):60121,ge=p?Symbol.for("react.fundamental"):60117,ze=p?Symbol.for("react.responder"):60118,pe=p?Symbol.for("react.scope"):60119,Oe=typeof Symbol=="function"&&Symbol.iterator,le="@@iterator";function Ue(X){if(X===null||typeof X!="object")return null;var _e=Oe&&X[Oe]||X[le];return typeof _e=="function"?_e:null}var Ge={current:null},rt={suspense:null},wt={current:null},xt=/^(.*)[\\\/]/;function $e(X,_e,Ne){var Me="";if(_e){var dt=_e.fileName,Hn=dt.replace(xt,"");if(/^index\./.test(Hn)){var Dn=dt.match(xt);if(Dn){var or=Dn[1];if(or){var mi=or.replace(xt,"");Hn=mi+"/"+Hn}}}Me=" (at "+Hn+":"+_e.lineNumber+")"}else Ne&&(Me=" (created by "+Ne+")");return` - in `+(X||"Unknown")+Me}var ft=1;function Ke(X){return X._status===ft?X._result:null}function jt(X,_e,Ne){var Me=_e.displayName||_e.name||"";return X.displayName||(Me!==""?Ne+"("+Me+")":Ne)}function $t(X){if(X==null)return null;if(typeof X.tag=="number"&&ct("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof X=="function")return X.displayName||X.name||null;if(typeof X=="string")return X;switch(X){case k:return"Fragment";case t:return"Portal";case N:return"Profiler";case L:return"StrictMode";case ne:return"Suspense";case m:return"SuspenseList"}if(typeof X=="object")switch(X.$$typeof){case U:return"Context.Consumer";case C:return"Context.Provider";case W:return jt(X,X.render,"ForwardRef");case we:return $t(X.type);case he:return $t(X.render);case Se:{var _e=X,Ne=Ke(_e);if(Ne)return $t(Ne);break}}return null}var at={},Q=null;function ae(X){Q=X}at.getCurrentStack=null,at.getStackAddendum=function(){var X="";if(Q){var _e=$t(Q.type),Ne=Q._owner;X+=$e(_e,Q._source,Ne&&$t(Ne.type))}var Me=at.getCurrentStack;return Me&&(X+=Me()||""),X};var Ce={current:!1},ue={ReactCurrentDispatcher:Ge,ReactCurrentBatchConfig:rt,ReactCurrentOwner:wt,IsSomeRendererActing:Ce,assign:i};i(ue,{ReactDebugCurrentFrame:at,ReactComponentTreeHook:{}});function je(X){{for(var _e=arguments.length,Ne=new Array(_e>1?_e-1:0),Me=1;Me<_e;Me++)Ne[Me-1]=arguments[Me];At("warn",X,Ne)}}function ct(X){{for(var _e=arguments.length,Ne=new Array(_e>1?_e-1:0),Me=1;Me<_e;Me++)Ne[Me-1]=arguments[Me];At("error",X,Ne)}}function At(X,_e,Ne){{var Me=Ne.length>0&&typeof Ne[Ne.length-1]=="string"&&Ne[Ne.length-1].indexOf(` - in`)===0;if(!Me){var dt=ue.ReactDebugCurrentFrame,Hn=dt.getStackAddendum();Hn!==""&&(_e+="%s",Ne=Ne.concat([Hn]))}var Dn=Ne.map(function(Su){return""+Su});Dn.unshift("Warning: "+_e),Function.prototype.apply.call(console[X],console,Dn);try{var or=0,mi="Warning: "+_e.replace(/%s/g,function(){return Ne[or++]});throw new Error(mi)}catch(Su){}}}var en={};function ln(X,_e){{var Ne=X.constructor,Me=Ne&&(Ne.displayName||Ne.name)||"ReactClass",dt=Me+"."+_e;if(en[dt])return;ct("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",_e,Me),en[dt]=!0}}var An={isMounted:function(X){return!1},enqueueForceUpdate:function(X,_e,Ne){ln(X,"forceUpdate")},enqueueReplaceState:function(X,_e,Ne,Me){ln(X,"replaceState")},enqueueSetState:function(X,_e,Ne,Me){ln(X,"setState")}},nr={};Object.freeze(nr);function un(X,_e,Ne){this.props=X,this.context=_e,this.refs=nr,this.updater=Ne||An}un.prototype.isReactComponent={},un.prototype.setState=function(X,_e){if(!(typeof X=="object"||typeof X=="function"||X==null))throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,X,_e,"setState")},un.prototype.forceUpdate=function(X){this.updater.enqueueForceUpdate(this,X,"forceUpdate")};{var Wt={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},vr=function(X,_e){Object.defineProperty(un.prototype,X,{get:function(){je("%s(...) is deprecated in plain JavaScript React classes. %s",_e[0],_e[1])}})};for(var w in Wt)Wt.hasOwnProperty(w)&&vr(w,Wt[w])}function Ut(){}Ut.prototype=un.prototype;function Vn(X,_e,Ne){this.props=X,this.context=_e,this.refs=nr,this.updater=Ne||An}var fr=Vn.prototype=new Ut;fr.constructor=Vn,i(fr,un.prototype),fr.isPureReactComponent=!0;function Fr(){var X={current:null};return Object.seal(X),X}var ur=Object.prototype.hasOwnProperty,br={key:!0,ref:!0,__self:!0,__source:!0},Kt,vu,a0;a0={};function So(X){if(ur.call(X,"ref")){var _e=Object.getOwnPropertyDescriptor(X,"ref").get;if(_e&&_e.isReactWarning)return!1}return X.ref!==void 0}function Go(X){if(ur.call(X,"key")){var _e=Object.getOwnPropertyDescriptor(X,"key").get;if(_e&&_e.isReactWarning)return!1}return X.key!==void 0}function Os(X,_e){var Ne=function(){Kt||(Kt=!0,ct("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",_e))};Ne.isReactWarning=!0,Object.defineProperty(X,"key",{get:Ne,configurable:!0})}function Yo(X,_e){var Ne=function(){vu||(vu=!0,ct("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",_e))};Ne.isReactWarning=!0,Object.defineProperty(X,"ref",{get:Ne,configurable:!0})}function Ko(X){if(typeof X.ref=="string"&&wt.current&&X.__self&&wt.current.stateNode!==X.__self){var _e=$t(wt.current.type);a0[_e]||(ct('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',$t(wt.current.type),X.ref),a0[_e]=!0)}}var qt=function(X,_e,Ne,Me,dt,Hn,Dn){var or={$$typeof:E,type:X,key:_e,ref:Ne,props:Dn,_owner:Hn};return or._store={},Object.defineProperty(or._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(or,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.defineProperty(or,"_source",{configurable:!1,enumerable:!1,writable:!1,value:dt}),Object.freeze&&(Object.freeze(or.props),Object.freeze(or)),or};function _i(X,_e,Ne){var Me,dt={},Hn=null,Dn=null,or=null,mi=null;if(_e!=null){So(_e)&&(Dn=_e.ref,Ko(_e)),Go(_e)&&(Hn=""+_e.key),or=_e.__self===void 0?null:_e.__self,mi=_e.__source===void 0?null:_e.__source;for(Me in _e)ur.call(_e,Me)&&!br.hasOwnProperty(Me)&&(dt[Me]=_e[Me])}var Su=arguments.length-2;if(Su===1)dt.children=Ne;else if(Su>1){for(var bu=Array(Su),Pu=0;Pu1){for(var mu=Array(Pu),yi=0;yi is not supported and will be removed in a future major release. Did you mean to render instead?")),Ne.Provider},set:function(Dn){Ne.Provider=Dn}},_currentValue:{get:function(){return Ne._currentValue},set:function(Dn){Ne._currentValue=Dn}},_currentValue2:{get:function(){return Ne._currentValue2},set:function(Dn){Ne._currentValue2=Dn}},_threadCount:{get:function(){return Ne._threadCount},set:function(Dn){Ne._threadCount=Dn}},Consumer:{get:function(){return Me||(Me=!0,ct("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),Ne.Consumer}}}),Ne.Consumer=Hn}return Ne._currentRenderer=null,Ne._currentRenderer2=null,Ne}function Ht(X){var _e={$$typeof:Se,_ctor:X,_status:-1,_result:null};{var Ne,Me;Object.defineProperties(_e,{defaultProps:{configurable:!0,get:function(){return Ne},set:function(dt){ct("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ne=dt,Object.defineProperty(_e,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Me},set:function(dt){ct("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Me=dt,Object.defineProperty(_e,"propTypes",{enumerable:!0})}}})}return _e}function Du(X){return X!=null&&X.$$typeof===we?ct("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof X!="function"?ct("forwardRef requires a render function but was given %s.",X===null?"null":typeof X):X.length!==0&&X.length!==2&&ct("forwardRef render functions accept exactly two parameters: props and ref. %s",X.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),X!=null&&(X.defaultProps!=null||X.propTypes!=null)&&ct("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:W,render:X}}function Yi(X){return typeof X=="string"||typeof X=="function"||X===k||X===q||X===N||X===L||X===ne||X===m||typeof X=="object"&&X!==null&&(X.$$typeof===Se||X.$$typeof===we||X.$$typeof===C||X.$$typeof===U||X.$$typeof===W||X.$$typeof===ge||X.$$typeof===ze||X.$$typeof===pe||X.$$typeof===he)}function Y0(X,_e){return Yi(X)||ct("memo: The first argument must be a component. Instead received: %s",X===null?"null":typeof X),{$$typeof:we,type:X,compare:_e===void 0?null:_e}}function Ui(){var X=Ge.current;if(X===null)throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: -1. You might have mismatching versions of React and the renderer (such as React DOM) -2. You might be breaking the Rules of Hooks -3. You might have more than one copy of React in the same app -See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.`);return X}function Wl(X,_e){var Ne=Ui();if(_e!==void 0&&ct("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",_e,typeof _e=="number"&&Array.isArray(arguments[2])?` - -Did you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks`:""),X._context!==void 0){var Me=X._context;Me.Consumer===X?ct("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):Me.Provider===X&&ct("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return Ne.useContext(X,_e)}function xo(X){var _e=Ui();return _e.useState(X)}function ni(X,_e,Ne){var Me=Ui();return Me.useReducer(X,_e,Ne)}function oo(X){var _e=Ui();return _e.useRef(X)}function Vl(X,_e){var Ne=Ui();return Ne.useEffect(X,_e)}function Ao(X,_e){var Ne=Ui();return Ne.useLayoutEffect(X,_e)}function Ms(X,_e){var Ne=Ui();return Ne.useCallback(X,_e)}function Xn(X,_e){var Ne=Ui();return Ne.useMemo(X,_e)}function Qo(X,_e,Ne){var Me=Ui();return Me.useImperativeHandle(X,_e,Ne)}function lo(X,_e){{var Ne=Ui();return Ne.useDebugValue(X,_e)}}var b0;b0=!1;function yl(){if(wt.current){var X=$t(wt.current.type);if(X)return` - -Check the render method of \``+X+"`."}return""}function Ro(X){if(X!==void 0){var _e=X.fileName.replace(/^.*[\\\/]/,""),Ne=X.lineNumber;return` - -Check your code at `+_e+":"+Ne+"."}return""}function Et(X){return X!=null?Ro(X.__source):""}var Pt={};function Bn(X){var _e=yl();if(!_e){var Ne=typeof X=="string"?X:X.displayName||X.name;Ne&&(_e=` - -Check the top-level render call using <`+Ne+">.")}return _e}function Ir(X,_e){if(!(!X._store||X._store.validated||X.key!=null)){X._store.validated=!0;var Ne=Bn(_e);if(!Pt[Ne]){Pt[Ne]=!0;var Me="";X&&X._owner&&X._owner!==wt.current&&(Me=" It was passed a child from "+$t(X._owner.type)+"."),ae(X),ct('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',Ne,Me),ae(null)}}}function ji(X,_e){if(typeof X=="object"){if(Array.isArray(X))for(var Ne=0;Ne",dt=" Did you accidentally export a JSX literal instead of a component?"):Dn=typeof X,ct("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Dn,dt)}var or=_i.apply(this,arguments);if(or==null)return or;if(Me)for(var mi=2;mi{"use strict";process.env.NODE_ENV==="production"?WD.exports=k5():WD.exports=I5()});var B5=ce((nm,rg)=>{(function(){var i,o="4.17.21",f=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",E="Expected a function",t="Invalid `variable` option passed into `_.template`",k="__lodash_hash_undefined__",L=500,N="__lodash_placeholder__",C=1,U=2,q=4,W=1,ne=2,m=1,we=2,Se=4,he=8,ge=16,ze=32,pe=64,Oe=128,le=256,Ue=512,Ge=30,rt="...",wt=800,xt=16,$e=1,ft=2,Ke=3,jt=1/0,$t=9007199254740991,at=17976931348623157e292,Q=0/0,ae=4294967295,Ce=ae-1,ue=ae>>>1,je=[["ary",Oe],["bind",m],["bindKey",we],["curry",he],["curryRight",ge],["flip",Ue],["partial",ze],["partialRight",pe],["rearg",le]],ct="[object Arguments]",At="[object Array]",en="[object AsyncFunction]",ln="[object Boolean]",An="[object Date]",nr="[object DOMException]",un="[object Error]",Wt="[object Function]",vr="[object GeneratorFunction]",w="[object Map]",Ut="[object Number]",Vn="[object Null]",fr="[object Object]",Fr="[object Promise]",ur="[object Proxy]",br="[object RegExp]",Kt="[object Set]",vu="[object String]",a0="[object Symbol]",So="[object Undefined]",Go="[object WeakMap]",Os="[object WeakSet]",Yo="[object ArrayBuffer]",Ko="[object DataView]",qt="[object Float32Array]",_i="[object Float64Array]",eu="[object Int8Array]",ai="[object Int16Array]",mr="[object Int32Array]",Xo="[object Uint8Array]",W0="[object Uint8ClampedArray]",Lu="[object Uint16Array]",V0="[object Uint32Array]",Hr=/\b__p \+= '';/g,To=/\b(__p \+=) '' \+/g,Co=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L0=/&(?:amp|lt|gt|quot|#39);/g,tu=/[&<>"']/g,Si=RegExp(L0.source),ks=RegExp(tu.source),Hl=/<%-([\s\S]+?)%>/g,F0=/<%([\s\S]+?)%>/g,f0=/<%=([\s\S]+?)%>/g,Pr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ei=/^\w*$/,G0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fi=/[\\^$.*+?()[\]{}|]/g,Zt=RegExp(fi.source),Ln=/^\s+/,Di=/\s/,ci=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ht=/\{\n\/\* \[wrapped with (.+)\] \*/,Du=/,? & /,Yi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Y0=/[()=,{}\[\]\/\s]/,Ui=/\\(\\)?/g,Wl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,xo=/\w*$/,ni=/^[-+]0x[0-9a-f]+$/i,oo=/^0b[01]+$/i,Vl=/^\[object .+?Constructor\]$/,Ao=/^0o[0-7]+$/i,Ms=/^(?:0|[1-9]\d*)$/,Xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qo=/($^)/,lo=/['\n\r\u2028\u2029\\]/g,b0="\\ud800-\\udfff",yl="\\u0300-\\u036f",Ro="\\ufe20-\\ufe2f",Et="\\u20d0-\\u20ff",Pt=yl+Ro+Et,Bn="\\u2700-\\u27bf",Ir="a-z\\xdf-\\xf6\\xf8-\\xff",ji="\\xac\\xb1\\xd7\\xf7",Wr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wu="\\u2000-\\u206f",c0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ti="A-Z\\xc0-\\xd6\\xd8-\\xde",d0="\\ufe0e\\ufe0f",as=ji+Wr+wu+c0,St="['\u2019]",so="["+b0+"]",Jo="["+as+"]",Gl="["+Pt+"]",Fu="\\d+",fs="["+Bn+"]",P0="["+Ir+"]",X="[^"+b0+as+Fu+Bn+Ir+Ti+"]",_e="\\ud83c[\\udffb-\\udfff]",Ne="(?:"+Gl+"|"+_e+")",Me="[^"+b0+"]",dt="(?:\\ud83c[\\udde6-\\uddff]){2}",Hn="[\\ud800-\\udbff][\\udc00-\\udfff]",Dn="["+Ti+"]",or="\\u200d",mi="(?:"+P0+"|"+X+")",Su="(?:"+Dn+"|"+X+")",bu="(?:"+St+"(?:d|ll|m|re|s|t|ve))?",Pu="(?:"+St+"(?:D|LL|M|RE|S|T|VE))?",mu=Ne+"?",yi="["+d0+"]?",Oo="(?:"+or+"(?:"+[Me,dt,Hn].join("|")+")"+yi+mu+")*",Tu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ao="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Iu=yi+mu+Oo,Oa="(?:"+[fs,dt,Hn].join("|")+")"+Iu,p0="(?:"+[Me+Gl+"?",Gl,dt,Hn,so].join("|")+")",Zs=RegExp(St,"g"),K0=RegExp(Gl,"g"),$s=RegExp(_e+"(?="+_e+")|"+p0+Iu,"g"),ka=RegExp([Dn+"?"+P0+"+"+bu+"(?="+[Jo,Dn,"$"].join("|")+")",Su+"+"+Pu+"(?="+[Jo,Dn+mi,"$"].join("|")+")",Dn+"?"+mi+"+"+bu,Dn+"+"+Pu,ao,Tu,Fu,Oa].join("|"),"g"),cs=RegExp("["+or+b0+Pt+d0+"]"),w0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ic=-1,ri={};ri[qt]=ri[_i]=ri[eu]=ri[ai]=ri[mr]=ri[Xo]=ri[W0]=ri[Lu]=ri[V0]=!0,ri[ct]=ri[At]=ri[Yo]=ri[ln]=ri[Ko]=ri[An]=ri[un]=ri[Wt]=ri[w]=ri[Ut]=ri[fr]=ri[br]=ri[Kt]=ri[vu]=ri[Go]=!1;var Gr={};Gr[ct]=Gr[At]=Gr[Yo]=Gr[Ko]=Gr[ln]=Gr[An]=Gr[qt]=Gr[_i]=Gr[eu]=Gr[ai]=Gr[mr]=Gr[w]=Gr[Ut]=Gr[fr]=Gr[br]=Gr[Kt]=Gr[vu]=Gr[a0]=Gr[Xo]=Gr[W0]=Gr[Lu]=Gr[V0]=!0,Gr[un]=Gr[Wt]=Gr[Go]=!1;var Yl={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ea={"&":"&","<":"<",">":">",'"':""","'":"'"},lf={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ns={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ma=parseFloat,Ls=parseInt,h0=typeof global=="object"&&global&&global.Object===Object&&global,Fs=typeof self=="object"&&self&&self.Object===Object&&self,Ni=h0||Fs||Function("return this")(),B=typeof nm=="object"&&nm&&!nm.nodeType&&nm,z=B&&typeof rg=="object"&&rg&&!rg.nodeType&&rg,G=z&&z.exports===B,$=G&&h0.process,De=function(){try{var Te=z&&z.require&&z.require("util").types;return Te||$&&$.binding&&$.binding("util")}catch(et){}}(),me=De&&De.isArrayBuffer,xe=De&&De.isDate,Z=De&&De.isMap,ke=De&&De.isRegExp,Xe=De&&De.isSet,ht=De&&De.isTypedArray;function ie(Te,et,Ve){switch(Ve.length){case 0:return Te.call(et);case 1:return Te.call(et,Ve[0]);case 2:return Te.call(et,Ve[0],Ve[1]);case 3:return Te.call(et,Ve[0],Ve[1],Ve[2])}return Te.apply(et,Ve)}function qe(Te,et,Ve,Gt){for(var Yt=-1,sr=Te==null?0:Te.length;++Yt-1}function tn(Te,et,Ve){for(var Gt=-1,Yt=Te==null?0:Te.length;++Gt-1;);return Ve}function gl(Te,et){for(var Ve=Te.length;Ve--&&_t(et,Te[Ve],0)>-1;);return Ve}function af(Te,et){for(var Ve=Te.length,Gt=0;Ve--;)Te[Ve]===et&&++Gt;return Gt}var Mo=Yn(Yl),ds=Yn(ea);function bs(Te){return"\\"+Ns[Te]}function No(Te,et){return Te==null?i:Te[et]}function Lo(Te){return cs.test(Te)}function ps(Te){return w0.test(Te)}function Vu(Te){for(var et,Ve=[];!(et=Te.next()).done;)Ve.push(et.value);return Ve}function yu(Te){var et=-1,Ve=Array(Te.size);return Te.forEach(function(Gt,Yt){Ve[++et]=[Yt,Gt]}),Ve}function pi(Te,et){return function(Ve){return Te(et(Ve))}}function T0(Te,et){for(var Ve=-1,Gt=Te.length,Yt=0,sr=[];++Ve-1}function ia(d,v){var x=this.__data__,b=Ql(x,d);return b<0?(++this.size,x.push([d,v])):x[b][1]=v,this}to.prototype.clear=Na,to.prototype.delete=pf,to.prototype.get=uc,to.prototype.has=ms,to.prototype.set=ia;function B0(d){var v=-1,x=d==null?0:d.length;for(this.clear();++v=v?d:v)),d}function U0(d,v,x,b,H,ee){var de,ye=v&C,be=v&U,gt=v&q;if(x&&(de=H?x(d,b,H,ee):x(d)),de!==i)return de;if(!ku(d))return d;var Dt=Jn(d);if(Dt){if(de=Es(d),!ye)return Ji(d,de)}else{var Rt=Ou(d),rn=Rt==Wt||Rt==vr;if(Gs(d))return fc(d,ye);if(Rt==fr||Rt==ct||rn&&!H){if(de=be||rn?{}:vc(d),!ye)return be?Jl(d,tl(de,d)):t0(d,hf(de,d))}else{if(!Gr[Rt])return H?d:{};de=Dh(d,Rt,ye)}}ee||(ee=new el);var Rn=ee.get(d);if(Rn)return Rn;ee.set(d,de),L2(d)?d.forEach(function(ir){de.add(U0(ir,v,x,ir,d,ee))}):gp(d)&&d.forEach(function(ir,Zr){de.set(Zr,U0(ir,v,x,Zr,d,ee))});var $n=gt?be?rr:$c:be?fn:M0,Nr=Dt?i:$n(d);return tt(Nr||d,function(ir,Zr){Nr&&(Zr=ir,ir=d[Zr]),gs(de,Zr,U0(ir,v,x,Zr,d,ee))}),de}function vf(d){var v=M0(d);return function(x){return jc(x,d,v)}}function jc(d,v,x){var b=x.length;if(d==null)return!b;for(d=wn(d);b--;){var H=x[b],ee=v[H],de=d[H];if(de===i&&!(H in d)||!ee(de))return!1}return!0}function lc(d,v,x){if(typeof d!="function")throw new Kr(E);return Wa(function(){d.apply(i,x)},v)}function Sl(d,v,x,b){var H=-1,ee=on,de=!0,ye=d.length,be=[],gt=v.length;if(!ye)return be;x&&(v=Lt(v,di(x))),b?(ee=tn,de=!1):v.length>=f&&(ee=Zo,de=!1,v=new ho(v));e:for(;++HH?0:H+x),b=b===i||b>H?H:Cr(b),b<0&&(b+=H),b=x>b?0:Ep(b);x0&&x(ye)?v>1?bi(ye,v-1,x,b,H):gn(H,ye):b||(H[H.length]=ye)}return H}var g=dc(),y=dc(!0);function A(d,v){return d&&g(d,v,M0)}function F(d,v){return d&&y(d,v,M0)}function I(d,v){return bt(v,function(x){return Ea(d[x])})}function J(d,v){v=Us(v,d);for(var x=0,b=v.length;d!=null&&xv}function Mt(d,v){return d!=null&&ei.call(d,v)}function Er(d,v){return d!=null&&v in wn(d)}function $u(d,v,x){return d>=Wn(v,x)&&d=120&&Dt.length>=120)?new ho(de&&Dt):i}Dt=d[0];var Rt=-1,rn=ye[0];e:for(;++Rt-1;)ye!==d&&R0.call(ye,be,1),R0.call(d,be,1);return d}function u2(d,v){for(var x=d?v.length:0,b=x-1;x--;){var H=v[x];if(x==b||H!==ee){var ee=H;go(H)?R0.call(d,H,1):Cd(d,H)}}return d}function o2(d,v){return d+vs(y0()*(v-d+1))}function wd(d,v,x,b){for(var H=-1,ee=Xr(Ku((v-d)/(x||1)),0),de=Ve(ee);ee--;)de[b?ee:++H]=d,d+=x;return de}function Hc(d,v){var x="";if(!d||v<1||v>$t)return x;do v%2&&(x+=d),v=vs(v/2),v&&(d+=d);while(v);return x}function Mr(d,v){return r1(Nd(d,v,r0),d+"")}function l2(d){return ba(Ac(d))}function s2(d,v){var x=Ac(d);return yc(x,Zu(v,0,x.length))}function ja(d,v,x,b){if(!ku(d))return d;v=Us(v,d);for(var H=-1,ee=v.length,de=ee-1,ye=d;ye!=null&&++HH?0:H+v),x=x>H?H:x,x<0&&(x+=H),H=v>x?0:x-v>>>0,v>>>=0;for(var ee=Ve(H);++b>>1,de=d[ee];de!==null&&!Nl(de)&&(x?de<=v:de=f){var gt=v?null:mm(d);if(gt)return Q0(gt);de=!1,H=Zo,be=new ho}else be=v?[]:ye;e:for(;++b=b?d:rl(d,v,x)}var Kc=hs||function(d){return Ni.clearTimeout(d)};function fc(d,v){if(v)return d.slice();var x=d.length,b=Fi?Fi(x):new d.constructor(x);return d.copy(b),b}function cc(d){var v=new d.constructor(d.byteLength);return new A0(v).set(new A0(d)),v}function f2(d,v){var x=v?cc(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.byteLength)}function yh(d){var v=new d.constructor(d.source,xo.exec(d));return v.lastIndex=d.lastIndex,v}function gf(d){return Sr?wn(Sr.call(d)):{}}function Xc(d,v){var x=v?cc(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.length)}function gh(d,v){if(d!==v){var x=d!==i,b=d===null,H=d===d,ee=Nl(d),de=v!==i,ye=v===null,be=v===v,gt=Nl(v);if(!ye&&!gt&&!ee&&d>v||ee&&de&&be&&!ye&&!gt||b&&de&&be||!x&&be||!H)return 1;if(!b&&!ee&&!gt&&d=ye)return be;var gt=x[b];return be*(gt=="desc"?-1:1)}}return d.index-v.index}function js(d,v,x,b){for(var H=-1,ee=d.length,de=x.length,ye=-1,be=v.length,gt=Xr(ee-de,0),Dt=Ve(be+gt),Rt=!b;++ye1?x[H-1]:i,de=H>2?x[2]:i;for(ee=d.length>3&&typeof ee=="function"?(H--,ee):i,de&&io(x[0],x[1],de)&&(ee=H<3?i:ee,H=1),v=wn(v);++b-1?H[ee?v[de]:de]:i}}function Jc(d){return ol(function(v){var x=v.length,b=x,H=Ur.prototype.thru;for(d&&v.reverse();b--;){var ee=v[b];if(typeof ee!="function")throw new Kr(E);if(H&&!de&&Bo(ee)=="wrapper")var de=new Ur([],!0)}for(b=de?b:x;++b1&&ui.reverse(),Dt&&beye))return!1;var gt=ee.get(d),Dt=ee.get(v);if(gt&&Dt)return gt==v&&Dt==d;var Rt=-1,rn=!0,Rn=x&ne?new ho:i;for(ee.set(d,v),ee.set(v,d);++Rt1?"& ":"")+v[b],v=v.join(x>2?", ":" "),d.replace(ci,`{ -/* [wrapped with `+v+`] */ -`)}function $l(d){return Jn(d)||sl(d)||!!(co&&d&&d[co])}function go(d,v){var x=typeof d;return v=v==null?$t:v,!!v&&(x=="number"||x!="symbol"&&Ms.test(d))&&d>-1&&d%1==0&&d0){if(++v>=wt)return arguments[0]}else v=0;return d.apply(i,arguments)}}function yc(d,v){var x=-1,b=d.length,H=b-1;for(v=v===i?b:v;++x1?d[v-1]:i;return x=typeof x=="function"?(d.pop(),x):i,E2(d,x)});function Bh(d){var v=Y(d);return v.__chain__=!0,v}function Uh(d,v){return v(d),d}function h1(d,v){return v(d)}var Qd=ol(function(d){var v=d.length,x=v?d[0]:0,b=this.__wrapped__,H=function(ee){return Ia(ee,d)};return v>1||this.__actions__.length||!(b instanceof lt)||!go(x)?this.thru(H):(b=b.slice(x,+x+(v?1:0)),b.__actions__.push({func:h1,args:[H],thisArg:i}),new Ur(b,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(i),ee}))});function jh(){return Bh(this)}function Jd(){return new Ur(this.value(),this.__chain__)}function zh(){this.__values__===i&&(this.__values__=lv(this.value()));var d=this.__index__>=this.__values__.length,v=d?i:this.__values__[this.__index__++];return{done:d,value:v}}function Cm(){return this}function xm(d){for(var v,x=this;x instanceof Jr;){var b=Fd(x);b.__index__=0,b.__values__=i,v?H.__wrapped__=b:v=b;var H=b;x=x.__wrapped__}return H.__wrapped__=d,v}function Of(){var d=this.__wrapped__;if(d instanceof lt){var v=d;return this.__actions__.length&&(v=new lt(this)),v=v.reverse(),v.__actions__.push({func:h1,args:[Hd],thisArg:i}),new Ur(v,this.__chain__)}return this.thru(Hd)}function kf(){return mh(this.__wrapped__,this.__actions__)}var D2=za(function(d,v,x){ei.call(d,x)?++d[x]:ju(d,x,1)});function Am(d,v,x){var b=Jn(d)?kt:n2;return x&&io(d,v,x)&&(v=i),b(d,zn(v,3))}function Zd(d,v){var x=Jn(d)?bt:zc;return x(d,zn(v,3))}var w2=xl(Bd),$d=xl(u1);function qh(d,v){return bi(v1(d,v),1)}function ep(d,v){return bi(v1(d,v),jt)}function Hh(d,v,x){return x=x===i?1:Cr(x),bi(v1(d,v),x)}function Wh(d,v){var x=Jn(d)?tt:_s;return x(d,zn(v,3))}function tp(d,v){var x=Jn(d)?Tt:oa;return x(d,zn(v,3))}var Rm=za(function(d,v,x){ei.call(d,x)?d[x].push(v):ju(d,x,[v])});function Om(d,v,x,b){d=al(d)?d:Ac(d),x=x&&!b?Cr(x):0;var H=d.length;return x<0&&(x=Xr(H+x,0)),_1(d)?x<=H&&d.indexOf(v,x)>-1:!!H&&_t(d,v,x)>-1}var km=Mr(function(d,v,x){var b=-1,H=typeof v=="function",ee=al(d)?Ve(d.length):[];return _s(d,function(de){ee[++b]=H?ie(v,de,x):Tl(de,v,x)}),ee}),Vh=za(function(d,v,x){ju(d,x,v)});function v1(d,v){var x=Jn(d)?Lt:Ed;return x(d,zn(v,3))}function Mm(d,v,x,b){return d==null?[]:(Jn(v)||(v=v==null?[]:[v]),x=b?i:x,Jn(x)||(x=x==null?[]:[x]),vo(d,v,x))}var np=za(function(d,v,x){d[x?0:1].push(v)},function(){return[[],[]]});function rp(d,v,x){var b=Jn(d)?lr:yr,H=arguments.length<3;return b(d,zn(v,4),x,H,_s)}function Nm(d,v,x){var b=Jn(d)?Qn:yr,H=arguments.length<3;return b(d,zn(v,4),x,H,oa)}function Lm(d,v){var x=Jn(d)?bt:zc;return x(d,C2(zn(v,3)))}function Gh(d){var v=Jn(d)?ba:l2;return v(d)}function Fm(d,v,x){(x?io(d,v,x):v===i)?v=1:v=Cr(v);var b=Jn(d)?Pa:s2;return b(d,v)}function bm(d){var v=Jn(d)?ua:nl;return v(d)}function ip(d){if(d==null)return 0;if(al(d))return _1(d)?Ki(d):d.length;var v=Ou(d);return v==w||v==Kt?d.size:Ba(d).length}function up(d,v,x){var b=Jn(d)?_r:hh;return x&&io(d,v,x)&&(v=i),b(d,zn(v,3))}var ya=Mr(function(d,v){if(d==null)return[];var x=v.length;return x>1&&io(d,v[0],v[1])?v=[]:x>2&&io(v[0],v[1],v[2])&&(v=[v[0]]),vo(d,bi(v,1),[])}),m1=ra||function(){return Ni.Date.now()};function op(d,v){if(typeof v!="function")throw new Kr(E);return d=Cr(d),function(){if(--d<1)return v.apply(this,arguments)}}function Yh(d,v,x){return v=x?i:v,v=d&&v==null?d.length:v,dn(d,Oe,i,i,i,i,v)}function S2(d,v){var x;if(typeof v!="function")throw new Kr(E);return d=Cr(d),function(){return--d>0&&(x=v.apply(this,arguments)),d<=1&&(v=i),x}}var y1=Mr(function(d,v,x){var b=m;if(x.length){var H=T0(x,dr(y1));b|=ze}return dn(d,b,v,x,H)}),Kh=Mr(function(d,v,x){var b=m|we;if(x.length){var H=T0(x,dr(Kh));b|=ze}return dn(v,b,d,x,H)});function lp(d,v,x){v=x?i:v;var b=dn(d,he,i,i,i,i,i,v);return b.placeholder=lp.placeholder,b}function Xh(d,v,x){v=x?i:v;var b=dn(d,ge,i,i,i,i,i,v);return b.placeholder=Xh.placeholder,b}function sp(d,v,x){var b,H,ee,de,ye,be,gt=0,Dt=!1,Rt=!1,rn=!0;if(typeof d!="function")throw new Kr(E);v=fl(v)||0,ku(x)&&(Dt=!!x.leading,Rt="maxWait"in x,ee=Rt?Xr(fl(x.maxWait)||0,v):ee,rn="trailing"in x?!!x.trailing:rn);function Rn(i0){var Ts=b,wo=H;return b=H=i,gt=i0,de=d.apply(wo,Ts),de}function $n(i0){return gt=i0,ye=Wa(Zr,v),Dt?Rn(i0):de}function Nr(i0){var Ts=i0-be,wo=i0-gt,Rv=v-Ts;return Rt?Wn(Rv,ee-wo):Rv}function ir(i0){var Ts=i0-be,wo=i0-gt;return be===i||Ts>=v||Ts<0||Rt&&wo>=ee}function Zr(){var i0=m1();if(ir(i0))return ui(i0);ye=Wa(Zr,Nr(i0))}function ui(i0){return ye=i,rn&&b?Rn(i0):(b=H=i,de)}function bl(){ye!==i&&Kc(ye),gt=0,b=be=H=ye=i}function Wi(){return ye===i?de:ui(m1())}function uo(){var i0=m1(),Ts=ir(i0);if(b=arguments,H=this,be=i0,Ts){if(ye===i)return $n(be);if(Rt)return Kc(ye),ye=Wa(Zr,v),Rn(be)}return ye===i&&(ye=Wa(Zr,v)),de}return uo.cancel=bl,uo.flush=Wi,uo}var Qh=Mr(function(d,v){return lc(d,1,v)}),Jh=Mr(function(d,v,x){return lc(d,fl(v)||0,x)});function ap(d){return dn(d,Ue)}function T2(d,v){if(typeof d!="function"||v!=null&&typeof v!="function")throw new Kr(E);var x=function(){var b=arguments,H=v?v.apply(this,b):b[0],ee=x.cache;if(ee.has(H))return ee.get(H);var de=d.apply(this,b);return x.cache=ee.set(H,de)||ee,de};return x.cache=new(T2.Cache||B0),x}T2.Cache=B0;function C2(d){if(typeof d!="function")throw new Kr(E);return function(){var v=arguments;switch(v.length){case 0:return!d.call(this);case 1:return!d.call(this,v[0]);case 2:return!d.call(this,v[0],v[1]);case 3:return!d.call(this,v[0],v[1],v[2])}return!d.apply(this,v)}}function z0(d){return S2(2,d)}var x2=Rd(function(d,v){v=v.length==1&&Jn(v[0])?Lt(v[0],di(zn())):Lt(bi(v,1),di(zn()));var x=v.length;return Mr(function(b){for(var H=-1,ee=Wn(b.length,x);++H=v}),sl=e0(function(){return arguments}())?e0:function(d){return zu(d)&&ei.call(d,"callee")&&!I0.call(d,"callee")},Jn=Ve.isArray,Vs=me?di(me):He;function al(d){return d!=null&&M2(d.length)&&!Ea(d)}function n0(d){return zu(d)&&al(d)}function ev(d){return d===!0||d===!1||zu(d)&&mt(d)==ln}var Gs=$0||Ip,hp=xe?di(xe):Be;function jm(d){return zu(d)&&d.nodeType===1&&!Ec(d)}function tv(d){if(d==null)return!0;if(al(d)&&(Jn(d)||typeof d=="string"||typeof d.splice=="function"||Gs(d)||Da(d)||sl(d)))return!d.length;var v=Ou(d);if(v==w||v==Kt)return!d.size;if(xf(d))return!Ba(d).length;for(var x in d)if(ei.call(d,x))return!1;return!0}function vp(d,v){return ut(d,v)}function zm(d,v,x){x=typeof x=="function"?x:i;var b=x?x(d,v):i;return b===i?ut(d,v,i,x):!!b}function mp(d){if(!zu(d))return!1;var v=mt(d);return v==un||v==nr||typeof d.message=="string"&&typeof d.name=="string"&&!Ec(d)}function _c(d){return typeof d=="number"&&Xi(d)}function Ea(d){if(!ku(d))return!1;var v=mt(d);return v==Wt||v==vr||v==en||v==ur}function yp(d){return typeof d=="number"&&d==Cr(d)}function M2(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=$t}function ku(d){var v=typeof d;return d!=null&&(v=="object"||v=="function")}function zu(d){return d!=null&&typeof d=="object"}var gp=Z?di(Z):jn;function _p(d,v){return d===v||ti(d,v,Pn(v))}function nv(d,v,x){return x=typeof x=="function"?x:i,ti(d,v,Pn(v),x)}function qm(d){return rv(d)&&d!=+d}function Hm(d){if(Al(d))throw new Yt(p);return tr(d)}function Wm(d){return d===null}function N2(d){return d==null}function rv(d){return typeof d=="number"||zu(d)&&mt(d)==Ut}function Ec(d){if(!zu(d)||mt(d)!=fr)return!1;var v=$o(d);if(v===null)return!0;var x=ei.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&Au.call(x)==na}var g1=ke?di(ke):ii;function Vm(d){return yp(d)&&d>=-$t&&d<=$t}var L2=Xe?di(Xe):qi;function _1(d){return typeof d=="string"||!Jn(d)&&zu(d)&&mt(d)==vu}function Nl(d){return typeof d=="symbol"||zu(d)&&mt(d)==a0}var Da=ht?di(ht):jr;function iv(d){return d===i}function Gm(d){return zu(d)&&Ou(d)==Go}function uv(d){return zu(d)&&mt(d)==Os}var ov=p2(r2),Ym=p2(function(d,v){return d<=v});function lv(d){if(!d)return[];if(al(d))return _1(d)?Yr(d):Ji(d);if(Ru&&d[Ru])return Vu(d[Ru]());var v=Ou(d),x=v==w?yu:v==Kt?Q0:Ac;return x(d)}function wa(d){if(!d)return d===0?d:0;if(d=fl(d),d===jt||d===-jt){var v=d<0?-1:1;return v*at}return d===d?d:0}function Cr(d){var v=wa(d),x=v%1;return v===v?x?v-x:v:0}function Ep(d){return d?Zu(Cr(d),0,ae):0}function fl(d){if(typeof d=="number")return d;if(Nl(d))return Q;if(ku(d)){var v=typeof d.valueOf=="function"?d.valueOf():d;d=ku(v)?v+"":v}if(typeof d!="string")return d===0?d:+d;d=xu(d);var x=oo.test(d);return x||Ao.test(d)?Ls(d.slice(2),x?2:8):ni.test(d)?Q:+d}function cu(d){return O0(d,fn(d))}function E1(d){return d?Zu(Cr(d),-$t,$t):d===0?d:0}function ki(d){return d==null?"":il(d)}var Dp=no(function(d,v){if(xf(v)||al(v)){O0(v,M0(v),d);return}for(var x in v)ei.call(v,x)&&gs(d,x,v[x])}),F2=no(function(d,v){O0(v,fn(v),d)}),Do=no(function(d,v,x,b){O0(v,fn(v),d,b)}),Ss=no(function(d,v,x,b){O0(v,M0(v),d,b)}),Mf=ol(Ia);function b2(d,v){var x=Qr(d);return v==null?x:hf(x,v)}var wp=Mr(function(d,v){d=wn(d);var x=-1,b=v.length,H=b>2?v[2]:i;for(H&&io(v[0],v[1],H)&&(b=1);++x1),ee}),O0(d,rr(d),x),b&&(x=U0(x,C|U|q,ym));for(var H=v.length;H--;)Cd(x,v[H]);return x});function T1(d,v){return Ka(d,C2(zn(v)))}var Cp=ol(function(d,v){return d==null?{}:dh(d,v)});function Ka(d,v){if(d==null)return{};var x=Lt(rr(d),function(b){return[b]});return v=zn(v),ph(d,x,function(b,H){return v(b,H[0])})}function Km(d,v,x){v=Us(v,d);var b=-1,H=v.length;for(H||(H=1,d=i);++bv){var b=d;d=v,v=b}if(x||d%1||v%1){var H=y0();return Wn(d+H*(v-d+Ma("1e-"+((H+"").length-1))),v)}return o2(d,v)}var q2=_f(function(d,v,x){return v=v.toLowerCase(),d+(x?Uo(v):v)});function Uo(d){return Rp(ki(d).toLowerCase())}function H2(d){return d=ki(d),d&&d.replace(Xn,Mo).replace(K0,"")}function Qm(d,v,x){d=ki(d),v=il(v);var b=d.length;x=x===i?b:Zu(Cr(x),0,b);var H=x;return x-=v.length,x>=0&&d.slice(x,H)==v}function A1(d){return d=ki(d),d&&ks.test(d)?d.replace(tu,ds):d}function Jm(d){return d=ki(d),d&&Zt.test(d)?d.replace(fi,"\\$&"):d}var Zm=_f(function(d,v,x){return d+(x?"-":"")+v.toLowerCase()}),av=_f(function(d,v,x){return d+(x?" ":"")+v.toLowerCase()}),$m=_h("toLowerCase");function fv(d,v,x){d=ki(d),v=Cr(v);var b=v?Ki(d):0;if(!v||b>=v)return d;var H=(v-b)/2;return da(vs(H),x)+d+da(Ku(H),x)}function ey(d,v,x){d=ki(d),v=Cr(v);var b=v?Ki(d):0;return v&&b>>0,x?(d=ki(d),d&&(typeof v=="string"||v!=null&&!g1(v))&&(v=il(v),!v&&Lo(d))?aa(Yr(d),0,x):d.split(v,x)):[]}var bf=_f(function(d,v,x){return d+(x?" ":"")+Rp(v)});function dv(d,v,x){return d=ki(d),x=x==null?0:Zu(Cr(x),0,d.length),v=il(v),d.slice(x,x+v.length)==v}function pv(d,v,x){var b=Y.templateSettings;x&&io(d,v,x)&&(v=i),d=ki(d),v=Do({},v,b,Df);var H=Do({},v.imports,b.imports,Df),ee=M0(H),de=ko(H,ee),ye,be,gt=0,Dt=v.interpolate||Qo,Rt="__p += '",rn=fu((v.escape||Qo).source+"|"+Dt.source+"|"+(Dt===f0?Wl:Qo).source+"|"+(v.evaluate||Qo).source+"|$","g"),Rn="//# sourceURL="+(ei.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ic+"]")+` -`;d.replace(rn,function(ir,Zr,ui,bl,Wi,uo){return ui||(ui=bl),Rt+=d.slice(gt,uo).replace(lo,bs),Zr&&(ye=!0,Rt+=`' + -__e(`+Zr+`) + -'`),Wi&&(be=!0,Rt+=`'; -`+Wi+`; -__p += '`),ui&&(Rt+=`' + -((__t = (`+ui+`)) == null ? '' : __t) + -'`),gt=uo+ir.length,ir}),Rt+=`'; -`;var $n=ei.call(v,"variable")&&v.variable;if(!$n)Rt=`with (obj) { -`+Rt+` -} -`;else if(Y0.test($n))throw new Yt(t);Rt=(be?Rt.replace(Hr,""):Rt).replace(To,"$1").replace(Co,"$1;"),Rt="function("+($n||"obj")+`) { -`+($n?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ye?", __e = _.escape":"")+(be?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Rt+`return __p -}`;var Nr=_v(function(){return sr(ee,Rn+"return "+Rt).apply(i,de)});if(Nr.source=Rt,mp(Nr))throw Nr;return Nr}function hv(d){return ki(d).toLowerCase()}function W2(d){return ki(d).toUpperCase()}function V2(d,v,x){if(d=ki(d),d&&(x||v===i))return xu(d);if(!d||!(v=il(v)))return d;var b=Yr(d),H=Yr(v),ee=sf(b,H),de=gl(b,H)+1;return aa(b,ee,de).join("")}function Ap(d,v,x){if(d=ki(d),d&&(x||v===i))return d.slice(0,fo(d)+1);if(!d||!(v=il(v)))return d;var b=Yr(d),H=gl(b,Yr(v))+1;return aa(b,0,H).join("")}function vv(d,v,x){if(d=ki(d),d&&(x||v===i))return d.replace(Ln,"");if(!d||!(v=il(v)))return d;var b=Yr(d),H=sf(b,Yr(v));return aa(b,H).join("")}function G2(d,v){var x=Ge,b=rt;if(ku(v)){var H="separator"in v?v.separator:H;x="length"in v?Cr(v.length):x,b="omission"in v?il(v.omission):b}d=ki(d);var ee=d.length;if(Lo(d)){var de=Yr(d);ee=de.length}if(x>=ee)return d;var ye=x-Ki(b);if(ye<1)return b;var be=de?aa(de,0,ye).join(""):d.slice(0,ye);if(H===i)return be+b;if(de&&(ye+=be.length-ye),g1(H)){if(d.slice(ye).search(H)){var gt,Dt=be;for(H.global||(H=fu(H.source,ki(xo.exec(H))+"g")),H.lastIndex=0;gt=H.exec(Dt);)var Rt=gt.index;be=be.slice(0,Rt===i?ye:Rt)}}else if(d.indexOf(il(H),ye)!=ye){var rn=be.lastIndexOf(H);rn>-1&&(be=be.slice(0,rn))}return be+b}function mv(d){return d=ki(d),d&&Si.test(d)?d.replace(L0,Oi):d}var yv=_f(function(d,v,x){return d+(x?" ":"")+v.toUpperCase()}),Rp=_h("toUpperCase");function gv(d,v,x){return d=ki(d),v=x?i:v,v===i?ps(d)?cf(d):v0(d):d.match(v)||[]}var _v=Mr(function(d,v){try{return ie(d,i,v)}catch(x){return mp(x)?x:new Yt(x)}}),uy=ol(function(d,v){return tt(v,function(x){x=Rl(x),ju(d,x,y1(d[x],d))}),d});function Ev(d){var v=d==null?0:d.length,x=zn();return d=v?Lt(d,function(b){if(typeof b[1]!="function")throw new Kr(E);return[x(b[0]),b[1]]}):[],Mr(function(b){for(var H=-1;++H$t)return[];var x=ae,b=Wn(d,ae);v=zn(v),d-=ae;for(var H=S0(b,v);++x0||v<0)?new lt(x):(d<0?x=x.takeRight(-d):d&&(x=x.drop(d)),v!==i&&(v=Cr(v),x=v<0?x.dropRight(-v):x.take(v-d)),x)},lt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},lt.prototype.toArray=function(){return this.take(ae)},A(lt.prototype,function(d,v){var x=/^(?:filter|find|map|reject)|While$/.test(v),b=/^(?:head|last)$/.test(v),H=Y[b?"take"+(v=="last"?"Right":""):v],ee=b||/^find/.test(v);!H||(Y.prototype[v]=function(){var de=this.__wrapped__,ye=b?[1]:arguments,be=de instanceof lt,gt=ye[0],Dt=be||Jn(de),Rt=function(Zr){var ui=H.apply(Y,gn([Zr],ye));return b&&rn?ui[0]:ui};Dt&&x&&typeof gt=="function"&>.length!=1&&(be=Dt=!1);var rn=this.__chain__,Rn=!!this.__actions__.length,$n=ee&&!rn,Nr=be&&!Rn;if(!ee&&Dt){de=Nr?de:new lt(this);var ir=d.apply(de,ye);return ir.__actions__.push({func:h1,args:[Rt],thisArg:i}),new Ur(ir,rn)}return $n&&Nr?d.apply(this,ye):(ir=this.thru(Rt),$n?b?ir.value()[0]:ir.value():ir)})}),tt(["pop","push","shift","sort","splice","unshift"],function(d){var v=Vr[d],x=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",b=/^(?:pop|shift)$/.test(d);Y.prototype[d]=function(){var H=arguments;if(b&&!this.__chain__){var ee=this.value();return v.apply(Jn(ee)?ee:[],H)}return this[x](function(de){return v.apply(Jn(de)?de:[],H)})}}),A(lt.prototype,function(d,v){var x=Y[v];if(x){var b=x.name+"";ei.call(xn,b)||(xn[b]=[]),xn[b].push({name:v,func:x})}}),xn[ca(i,we).name]=[{name:"wrapper",func:i}],lt.prototype.clone=hi,lt.prototype.reverse=Qi,lt.prototype.value=g0,Y.prototype.at=Qd,Y.prototype.chain=jh,Y.prototype.commit=Jd,Y.prototype.next=zh,Y.prototype.plant=xm,Y.prototype.reverse=Of,Y.prototype.toJSON=Y.prototype.valueOf=Y.prototype.value=kf,Y.prototype.first=Y.prototype.head,Ru&&(Y.prototype[Ru]=Cm),Y},Z0=J0();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ni._=Z0,define(function(){return Z0})):z?((z.exports=Z0)._=Z0,B._=Z0):Ni._=Z0}).call(nm)});var GD=ce((Dne,VD)=>{"use strict";var Ai=VD.exports;VD.exports.default=Ai;var hu="[",ig="]",rm="\x07",$_=";",U5=process.env.TERM_PROGRAM==="Apple_Terminal";Ai.cursorTo=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");return typeof o!="number"?hu+(i+1)+"G":hu+(o+1)+";"+(i+1)+"H"};Ai.cursorMove=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");let f="";return i<0?f+=hu+-i+"D":i>0&&(f+=hu+i+"C"),o<0?f+=hu+-o+"A":o>0&&(f+=hu+o+"B"),f};Ai.cursorUp=(i=1)=>hu+i+"A";Ai.cursorDown=(i=1)=>hu+i+"B";Ai.cursorForward=(i=1)=>hu+i+"C";Ai.cursorBackward=(i=1)=>hu+i+"D";Ai.cursorLeft=hu+"G";Ai.cursorSavePosition=U5?"7":hu+"s";Ai.cursorRestorePosition=U5?"8":hu+"u";Ai.cursorGetPosition=hu+"6n";Ai.cursorNextLine=hu+"E";Ai.cursorPrevLine=hu+"F";Ai.cursorHide=hu+"?25l";Ai.cursorShow=hu+"?25h";Ai.eraseLines=i=>{let o="";for(let f=0;f[ig,"8",$_,$_,o,rm,i,ig,"8",$_,$_,rm].join("");Ai.image=(i,o={})=>{let f=`${ig}1337;File=inline=1`;return o.width&&(f+=`;width=${o.width}`),o.height&&(f+=`;height=${o.height}`),o.preserveAspectRatio===!1&&(f+=";preserveAspectRatio=0"),f+":"+i.toString("base64")+rm};Ai.iTerm={setCwd:(i=process.cwd())=>`${ig}50;CurrentDir=${i}${rm}`,annotation:(i,o={})=>{let f=`${ig}1337;`,p=typeof o.x!="undefined",E=typeof o.y!="undefined";if((p||E)&&!(p&&E&&typeof o.length!="undefined"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return i=i.replace(/\|/g,""),f+=o.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",o.length>0?f+=(p?[i,o.length,o.x,o.y]:[o.length,i]).join("|"):f+=i,f+rm}}});var z5=ce((wne,YD)=>{"use strict";var j5=(i,o)=>{for(let f of Reflect.ownKeys(o))Object.defineProperty(i,f,Object.getOwnPropertyDescriptor(o,f));return i};YD.exports=j5;YD.exports.default=j5});var H5=ce((Sne,e4)=>{"use strict";var UK=z5(),t4=new WeakMap,q5=(i,o={})=>{if(typeof i!="function")throw new TypeError("Expected a function");let f,p=0,E=i.displayName||i.name||"",t=function(...k){if(t4.set(t,++p),p===1)f=i.apply(this,k),i=null;else if(o.throw===!0)throw new Error(`Function \`${E}\` can only be called once`);return f};return UK(t,i),t4.set(t,p),t};e4.exports=q5;e4.exports.default=q5;e4.exports.callCount=i=>{if(!t4.has(i))throw new Error(`The given function \`${i.name}\` is not wrapped by the \`onetime\` package`);return t4.get(i)}});var W5=ce((Tne,n4)=>{n4.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&n4.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&n4.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var JD=ce((Cne,ug)=>{var jK=require("assert"),og=W5(),zK=/^win/i.test(process.platform),r4=require("events");typeof r4!="function"&&(r4=r4.EventEmitter);var zl;process.__signal_exit_emitter__?zl=process.__signal_exit_emitter__:(zl=process.__signal_exit_emitter__=new r4,zl.count=0,zl.emitted={});zl.infinite||(zl.setMaxListeners(Infinity),zl.infinite=!0);ug.exports=function(i,o){jK.equal(typeof i,"function","a callback must be provided for exit handler"),lg===!1&&V5();var f="exit";o&&o.alwaysLast&&(f="afterexit");var p=function(){zl.removeListener(f,i),zl.listeners("exit").length===0&&zl.listeners("afterexit").length===0&&KD()};return zl.on(f,i),p};ug.exports.unload=KD;function KD(){!lg||(lg=!1,og.forEach(function(i){try{process.removeListener(i,XD[i])}catch(o){}}),process.emit=QD,process.reallyExit=G5,zl.count-=1)}function im(i,o,f){zl.emitted[i]||(zl.emitted[i]=!0,zl.emit(i,o,f))}var XD={};og.forEach(function(i){XD[i]=function(){var f=process.listeners(i);f.length===zl.count&&(KD(),im("exit",null,i),im("afterexit",null,i),zK&&i==="SIGHUP"&&(i="SIGINT"),process.kill(process.pid,i))}});ug.exports.signals=function(){return og};ug.exports.load=V5;var lg=!1;function V5(){lg||(lg=!0,zl.count+=1,og=og.filter(function(i){try{return process.on(i,XD[i]),!0}catch(o){return!1}}),process.emit=HK,process.reallyExit=qK)}var G5=process.reallyExit;function qK(i){process.exitCode=i||0,im("exit",process.exitCode,null),im("afterexit",process.exitCode,null),G5.call(process,process.exitCode)}var QD=process.emit;function HK(i,o){if(i==="exit"){o!==void 0&&(process.exitCode=o);var f=QD.apply(this,arguments);return im("exit",process.exitCode,null),im("afterexit",process.exitCode,null),f}else return QD.apply(this,arguments)}});var K5=ce((xne,Y5)=>{"use strict";var WK=H5(),VK=JD();Y5.exports=WK(()=>{VK(()=>{process.stderr.write("[?25h")},{alwaysLast:!0})})});var ZD=ce(um=>{"use strict";var GK=K5(),i4=!1;um.show=(i=process.stderr)=>{!i.isTTY||(i4=!1,i.write("[?25h"))};um.hide=(i=process.stderr)=>{!i.isTTY||(GK(),i4=!0,i.write("[?25l"))};um.toggle=(i,o)=>{i!==void 0&&(i4=i),i4?um.show(o):um.hide(o)}});var Z5=ce(sg=>{"use strict";var X5=sg&&sg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(sg,"__esModule",{value:!0});var Q5=X5(GD()),J5=X5(ZD()),YK=(i,{showCursor:o=!1}={})=>{let f=0,p="",E=!1,t=k=>{!o&&!E&&(J5.default.hide(),E=!0);let L=k+` -`;L!==p&&(p=L,i.write(Q5.default.eraseLines(f)+L),f=L.split(` -`).length)};return t.clear=()=>{i.write(Q5.default.eraseLines(f)),p="",f=0},t.done=()=>{p="",f=0,o||(J5.default.show(),E=!1)},t};sg.default={create:YK}});var e9=ce((One,$5)=>{$5.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var r9=ce(Ra=>{"use strict";var t9=e9(),bc=process.env;Object.defineProperty(Ra,"_vendors",{value:t9.map(function(i){return i.constant})});Ra.name=null;Ra.isPR=null;t9.forEach(function(i){var o=Array.isArray(i.env)?i.env:[i.env],f=o.every(function(p){return n9(p)});if(Ra[i.constant]=f,f)switch(Ra.name=i.name,typeof i.pr){case"string":Ra.isPR=!!bc[i.pr];break;case"object":"env"in i.pr?Ra.isPR=i.pr.env in bc&&bc[i.pr.env]!==i.pr.ne:"any"in i.pr?Ra.isPR=i.pr.any.some(function(p){return!!bc[p]}):Ra.isPR=n9(i.pr);break;default:Ra.isPR=null}});Ra.isCI=!!(bc.CI||bc.CONTINUOUS_INTEGRATION||bc.BUILD_NUMBER||bc.RUN_ID||Ra.name);function n9(i){return typeof i=="string"?!!bc[i]:Object.keys(i).every(function(o){return bc[o]===i[o]})}});var u9=ce((Mne,i9)=>{"use strict";i9.exports=r9().isCI});var l9=ce((Nne,o9)=>{"use strict";var KK=i=>{let o=new Set;do for(let f of Reflect.ownKeys(i))o.add([i,f]);while((i=Reflect.getPrototypeOf(i))&&i!==Object.prototype);return o};o9.exports=(i,{include:o,exclude:f}={})=>{let p=E=>{let t=k=>typeof k=="string"?E===k:k.test(E);return o?o.some(t):f?!f.some(t):!0};for(let[E,t]of KK(i.constructor.prototype)){if(t==="constructor"||!p(t))continue;let k=Reflect.getOwnPropertyDescriptor(E,t);k&&typeof k.value=="function"&&(i[t]=i[t].bind(i))}return i}});var h9=ce($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});var om,ag,u4,o4,$D;typeof window=="undefined"||typeof MessageChannel!="function"?(lm=null,ew=null,tw=function(){if(lm!==null)try{var i=$i.unstable_now();lm(!0,i),lm=null}catch(o){throw setTimeout(tw,0),o}},s9=Date.now(),$i.unstable_now=function(){return Date.now()-s9},om=function(i){lm!==null?setTimeout(om,0,i):(lm=i,setTimeout(tw,0))},ag=function(i,o){ew=setTimeout(i,o)},u4=function(){clearTimeout(ew)},o4=function(){return!1},$D=$i.unstable_forceFrameRate=function(){}):(l4=window.performance,nw=window.Date,a9=window.setTimeout,f9=window.clearTimeout,typeof console!="undefined"&&(c9=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof c9!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof l4=="object"&&typeof l4.now=="function"?$i.unstable_now=function(){return l4.now()}:(d9=nw.now(),$i.unstable_now=function(){return nw.now()-d9}),fg=!1,cg=null,s4=-1,rw=5,iw=0,o4=function(){return $i.unstable_now()>=iw},$D=function(){},$i.unstable_forceFrameRate=function(i){0>i||125f4(k,f))N!==void 0&&0>f4(N,k)?(i[p]=N,i[L]=f,p=L):(i[p]=k,i[t]=f,p=t);else if(N!==void 0&&0>f4(N,f))i[p]=N,i[L]=f,p=L;else break e}}return o}return null}function f4(i,o){var f=i.sortIndex-o.sortIndex;return f!==0?f:i.id-o.id}var Xf=[],dd=[],XK=1,Rs=null,ls=3,d4=!1,$p=!1,dg=!1;function p4(i){for(var o=uf(dd);o!==null;){if(o.callback===null)c4(dd);else if(o.startTime<=i)c4(dd),o.sortIndex=o.expirationTime,ow(Xf,o);else break;o=uf(dd)}}function lw(i){if(dg=!1,p4(i),!$p)if(uf(Xf)!==null)$p=!0,om(sw);else{var o=uf(dd);o!==null&&ag(lw,o.startTime-i)}}function sw(i,o){$p=!1,dg&&(dg=!1,u4()),d4=!0;var f=ls;try{for(p4(o),Rs=uf(Xf);Rs!==null&&(!(Rs.expirationTime>o)||i&&!o4());){var p=Rs.callback;if(p!==null){Rs.callback=null,ls=Rs.priorityLevel;var E=p(Rs.expirationTime<=o);o=$i.unstable_now(),typeof E=="function"?Rs.callback=E:Rs===uf(Xf)&&c4(Xf),p4(o)}else c4(Xf);Rs=uf(Xf)}if(Rs!==null)var t=!0;else{var k=uf(dd);k!==null&&ag(lw,k.startTime-o),t=!1}return t}finally{Rs=null,ls=f,d4=!1}}function p9(i){switch(i){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var QK=$D;$i.unstable_ImmediatePriority=1;$i.unstable_UserBlockingPriority=2;$i.unstable_NormalPriority=3;$i.unstable_IdlePriority=5;$i.unstable_LowPriority=4;$i.unstable_runWithPriority=function(i,o){switch(i){case 1:case 2:case 3:case 4:case 5:break;default:i=3}var f=ls;ls=i;try{return o()}finally{ls=f}};$i.unstable_next=function(i){switch(ls){case 1:case 2:case 3:var o=3;break;default:o=ls}var f=ls;ls=o;try{return i()}finally{ls=f}};$i.unstable_scheduleCallback=function(i,o,f){var p=$i.unstable_now();if(typeof f=="object"&&f!==null){var E=f.delay;E=typeof E=="number"&&0p?(i.sortIndex=E,ow(dd,i),uf(Xf)===null&&i===uf(dd)&&(dg?u4():dg=!0,ag(lw,E-p))):(i.sortIndex=f,ow(Xf,i),$p||d4||($p=!0,om(sw))),i};$i.unstable_cancelCallback=function(i){i.callback=null};$i.unstable_wrapCallback=function(i){var o=ls;return function(){var f=ls;ls=o;try{return i.apply(this,arguments)}finally{ls=f}}};$i.unstable_getCurrentPriorityLevel=function(){return ls};$i.unstable_shouldYield=function(){var i=$i.unstable_now();p4(i);var o=uf(Xf);return o!==Rs&&Rs!==null&&o!==null&&o.callback!==null&&o.startTime<=i&&o.expirationTime{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});var i=!1,o=!1,f=!0,p,E,t,k,L;if(typeof window=="undefined"||typeof MessageChannel!="function"){var N=null,C=null,U=function(){if(N!==null)try{var Et=Ri.unstable_now(),Pt=!0;N(Pt,Et),N=null}catch(Bn){throw setTimeout(U,0),Bn}},q=Date.now();Ri.unstable_now=function(){return Date.now()-q},p=function(Et){N!==null?setTimeout(p,0,Et):(N=Et,setTimeout(U,0))},E=function(Et,Pt){C=setTimeout(Et,Pt)},t=function(){clearTimeout(C)},k=function(){return!1},L=Ri.unstable_forceFrameRate=function(){}}else{var W=window.performance,ne=window.Date,m=window.setTimeout,we=window.clearTimeout;if(typeof console!="undefined"){var Se=window.requestAnimationFrame,he=window.cancelAnimationFrame;typeof Se!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof he!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof W=="object"&&typeof W.now=="function")Ri.unstable_now=function(){return W.now()};else{var ge=ne.now();Ri.unstable_now=function(){return ne.now()-ge}}var ze=!1,pe=null,Oe=-1,le=5,Ue=0,Ge=300,rt=!1;if(o&&navigator!==void 0&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0){var wt=navigator.scheduling;k=function(){var Et=Ri.unstable_now();return Et>=Ue?rt||wt.isInputPending()?!0:Et>=Ge:!1},L=function(){rt=!0}}else k=function(){return Ri.unstable_now()>=Ue},L=function(){};Ri.unstable_forceFrameRate=function(Et){if(Et<0||Et>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported");return}Et>0?le=Math.floor(1e3/Et):le=5};var xt=function(){if(pe!==null){var Et=Ri.unstable_now();Ue=Et+le;var Pt=!0;try{var Bn=pe(Pt,Et);Bn?ft.postMessage(null):(ze=!1,pe=null)}catch(Ir){throw ft.postMessage(null),Ir}}else ze=!1;rt=!1},$e=new MessageChannel,ft=$e.port2;$e.port1.onmessage=xt,p=function(Et){pe=Et,ze||(ze=!0,ft.postMessage(null))},E=function(Et,Pt){Oe=m(function(){Et(Ri.unstable_now())},Pt)},t=function(){we(Oe),Oe=-1}}function Ke(Et,Pt){var Bn=Et.length;Et.push(Pt),at(Et,Pt,Bn)}function jt(Et){var Pt=Et[0];return Pt===void 0?null:Pt}function $t(Et){var Pt=Et[0];if(Pt!==void 0){var Bn=Et.pop();return Bn!==Pt&&(Et[0]=Bn,Q(Et,Bn,0)),Pt}else return null}function at(Et,Pt,Bn){for(var Ir=Bn;;){var ji=Math.floor((Ir-1)/2),Wr=Et[ji];if(Wr!==void 0&&ae(Wr,Pt)>0)Et[ji]=Pt,Et[Ir]=Wr,Ir=ji;else return}}function Q(Et,Pt,Bn){for(var Ir=Bn,ji=Et.length;Irur){if(ur*=2,ur>Fr){console.error("Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."),mr();return}var Bn=new Int32Array(ur*4);Bn.set(Kt),br=Bn.buffer,Kt=Bn}Kt.set(Et,Pt)}}function ai(){ur=fr,br=new ArrayBuffer(ur*4),Kt=new Int32Array(br),vu=0}function mr(){var Et=br;return ur=0,br=null,Kt=null,vu=0,Et}function Xo(Et,Pt){f&&(Wt[Vn]++,Kt!==null&&eu([a0,Pt*1e3,Et.id,Et.priorityLevel]))}function W0(Et,Pt){f&&(Wt[vr]=Ce,Wt[w]=0,Wt[Vn]--,Kt!==null&&eu([So,Pt*1e3,Et.id]))}function Lu(Et,Pt){f&&(Wt[Vn]--,Kt!==null&&eu([Os,Pt*1e3,Et.id]))}function V0(Et,Pt){f&&(Wt[vr]=Ce,Wt[w]=0,Wt[Vn]--,Kt!==null&&eu([Go,Pt*1e3,Et.id]))}function Hr(Et,Pt){f&&(ln++,Wt[vr]=Et.priorityLevel,Wt[w]=Et.id,Wt[Ut]=ln,Kt!==null&&eu([Yo,Pt*1e3,Et.id,ln]))}function To(Et,Pt){f&&(Wt[vr]=Ce,Wt[w]=0,Wt[Ut]=0,Kt!==null&&eu([Ko,Pt*1e3,Et.id,ln]))}function Co(Et){f&&(An++,Kt!==null&&eu([qt,Et*1e3,An]))}function L0(Et){f&&Kt!==null&&eu([_i,Et*1e3,An])}var tu=1073741823,Si=-1,ks=250,Hl=5e3,F0=1e4,f0=tu,Pr=[],Ei=[],G0=1,fi=!1,Zt=null,Ln=ct,Di=!1,ci=!1,Ht=!1;function Du(Et){for(var Pt=jt(Ei);Pt!==null;){if(Pt.callback===null)$t(Ei);else if(Pt.startTime<=Et)$t(Ei),Pt.sortIndex=Pt.expirationTime,Ke(Pr,Pt),f&&(Xo(Pt,Et),Pt.isQueued=!0);else return;Pt=jt(Ei)}}function Yi(Et){if(Ht=!1,Du(Et),!ci)if(jt(Pr)!==null)ci=!0,p(Y0);else{var Pt=jt(Ei);Pt!==null&&E(Yi,Pt.startTime-Et)}}function Y0(Et,Pt){f&&L0(Pt),ci=!1,Ht&&(Ht=!1,t()),Di=!0;var Bn=Ln;try{if(f)try{return Ui(Et,Pt)}catch(Wr){if(Zt!==null){var Ir=Ri.unstable_now();V0(Zt,Ir),Zt.isQueued=!1}throw Wr}else return Ui(Et,Pt)}finally{if(Zt=null,Ln=Bn,Di=!1,f){var ji=Ri.unstable_now();Co(ji)}}}function Ui(Et,Pt){var Bn=Pt;for(Du(Bn),Zt=jt(Pr);Zt!==null&&!(i&&fi)&&!(Zt.expirationTime>Bn&&(!Et||k()));){var Ir=Zt.callback;if(Ir!==null){Zt.callback=null,Ln=Zt.priorityLevel;var ji=Zt.expirationTime<=Bn;Hr(Zt,Bn);var Wr=Ir(ji);Bn=Ri.unstable_now(),typeof Wr=="function"?(Zt.callback=Wr,To(Zt,Bn)):(f&&(W0(Zt,Bn),Zt.isQueued=!1),Zt===jt(Pr)&&$t(Pr)),Du(Bn)}else $t(Pr);Zt=jt(Pr)}if(Zt!==null)return!0;var wu=jt(Ei);return wu!==null&&E(Yi,wu.startTime-Bn),!1}function Wl(Et,Pt){switch(Et){case ue:case je:case ct:case At:case en:break;default:Et=ct}var Bn=Ln;Ln=Et;try{return Pt()}finally{Ln=Bn}}function xo(Et){var Pt;switch(Ln){case ue:case je:case ct:Pt=ct;break;default:Pt=Ln;break}var Bn=Ln;Ln=Pt;try{return Et()}finally{Ln=Bn}}function ni(Et){var Pt=Ln;return function(){var Bn=Ln;Ln=Pt;try{return Et.apply(this,arguments)}finally{Ln=Bn}}}function oo(Et){switch(Et){case ue:return Si;case je:return ks;case en:return f0;case At:return F0;case ct:default:return Hl}}function Vl(Et,Pt,Bn){var Ir=Ri.unstable_now(),ji,Wr;if(typeof Bn=="object"&&Bn!==null){var wu=Bn.delay;typeof wu=="number"&&wu>0?ji=Ir+wu:ji=Ir,Wr=typeof Bn.timeout=="number"?Bn.timeout:oo(Et)}else Wr=oo(Et),ji=Ir;var c0=ji+Wr,Ti={id:G0++,callback:Pt,priorityLevel:Et,startTime:ji,expirationTime:c0,sortIndex:-1};return f&&(Ti.isQueued=!1),ji>Ir?(Ti.sortIndex=ji,Ke(Ei,Ti),jt(Pr)===null&&Ti===jt(Ei)&&(Ht?t():Ht=!0,E(Yi,ji-Ir))):(Ti.sortIndex=c0,Ke(Pr,Ti),f&&(Xo(Ti,Ir),Ti.isQueued=!0),!ci&&!Di&&(ci=!0,p(Y0))),Ti}function Ao(){fi=!0}function Ms(){fi=!1,!ci&&!Di&&(ci=!0,p(Y0))}function Xn(){return jt(Pr)}function Qo(Et){if(f&&Et.isQueued){var Pt=Ri.unstable_now();Lu(Et,Pt),Et.isQueued=!1}Et.callback=null}function lo(){return Ln}function b0(){var Et=Ri.unstable_now();Du(Et);var Pt=jt(Pr);return Pt!==Zt&&Zt!==null&&Pt!==null&&Pt.callback!==null&&Pt.startTime<=Et&&Pt.expirationTime{"use strict";process.env.NODE_ENV==="production"?aw.exports=h9():aw.exports=v9()});var m9=ce((Pne,pg)=>{pg.exports=function i(o){"use strict";var f=eg(),p=su(),E=h4();function t(g){for(var y="https://reactjs.org/docs/error-decoder.html?invariant="+g,A=1;AG0||(g.current=Ei[G0],Ei[G0]=null,G0--)}function Zt(g,y){G0++,Ei[G0]=g.current,g.current=y}var Ln={},Di={current:Ln},ci={current:!1},Ht=Ln;function Du(g,y){var A=g.type.contextTypes;if(!A)return Ln;var F=g.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===y)return F.__reactInternalMemoizedMaskedChildContext;var I={},J;for(J in A)I[J]=y[J];return F&&(g=g.stateNode,g.__reactInternalMemoizedUnmaskedChildContext=y,g.__reactInternalMemoizedMaskedChildContext=I),I}function Yi(g){return g=g.childContextTypes,g!=null}function Y0(g){fi(ci,g),fi(Di,g)}function Ui(g){fi(ci,g),fi(Di,g)}function Wl(g,y,A){if(Di.current!==Ln)throw Error(t(168));Zt(Di,y,g),Zt(ci,A,g)}function xo(g,y,A){var F=g.stateNode;if(g=y.childContextTypes,typeof F.getChildContext!="function")return A;F=F.getChildContext();for(var I in F)if(!(I in g))throw Error(t(108,Ge(y)||"Unknown",I));return f({},A,{},F)}function ni(g){var y=g.stateNode;return y=y&&y.__reactInternalMemoizedMergedChildContext||Ln,Ht=Di.current,Zt(Di,y,g),Zt(ci,ci.current,g),!0}function oo(g,y,A){var F=g.stateNode;if(!F)throw Error(t(169));A?(y=xo(g,y,Ht),F.__reactInternalMemoizedMergedChildContext=y,fi(ci,g),fi(Di,g),Zt(Di,y,g)):fi(ci,g),Zt(ci,A,g)}var Vl=E.unstable_runWithPriority,Ao=E.unstable_scheduleCallback,Ms=E.unstable_cancelCallback,Xn=E.unstable_shouldYield,Qo=E.unstable_requestPaint,lo=E.unstable_now,b0=E.unstable_getCurrentPriorityLevel,yl=E.unstable_ImmediatePriority,Ro=E.unstable_UserBlockingPriority,Et=E.unstable_NormalPriority,Pt=E.unstable_LowPriority,Bn=E.unstable_IdlePriority,Ir={},ji=Qo!==void 0?Qo:function(){},Wr=null,wu=null,c0=!1,Ti=lo(),d0=1e4>Ti?lo:function(){return lo()-Ti};function as(){switch(b0()){case yl:return 99;case Ro:return 98;case Et:return 97;case Pt:return 96;case Bn:return 95;default:throw Error(t(332))}}function St(g){switch(g){case 99:return yl;case 98:return Ro;case 97:return Et;case 96:return Pt;case 95:return Bn;default:throw Error(t(332))}}function so(g,y){return g=St(g),Vl(g,y)}function Jo(g,y,A){return g=St(g),Ao(g,y,A)}function Gl(g){return Wr===null?(Wr=[g],wu=Ao(yl,fs)):Wr.push(g),Ir}function Fu(){if(wu!==null){var g=wu;wu=null,Ms(g)}fs()}function fs(){if(!c0&&Wr!==null){c0=!0;var g=0;try{var y=Wr;so(99,function(){for(;g=y&&(fo=!0),g.firstContext=null)}function Tu(g,y){if(Su!==g&&y!==!1&&y!==0)if((typeof y!="number"||y===1073741823)&&(Su=g,y=1073741823),y={context:g,observedBits:y,next:null},mi===null){if(or===null)throw Error(t(308));mi=y,or.dependencies={expirationTime:0,firstContext:y,responders:null}}else mi=mi.next=y;return un?g._currentValue:g._currentValue2}var ao=!1;function Iu(g){return{baseState:g,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Oa(g){return{baseState:g.baseState,firstUpdate:g.firstUpdate,lastUpdate:g.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function p0(g,y){return{expirationTime:g,suspenseConfig:y,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Zs(g,y){g.lastUpdate===null?g.firstUpdate=g.lastUpdate=y:(g.lastUpdate.next=y,g.lastUpdate=y)}function K0(g,y){var A=g.alternate;if(A===null){var F=g.updateQueue,I=null;F===null&&(F=g.updateQueue=Iu(g.memoizedState))}else F=g.updateQueue,I=A.updateQueue,F===null?I===null?(F=g.updateQueue=Iu(g.memoizedState),I=A.updateQueue=Iu(A.memoizedState)):F=g.updateQueue=Oa(I):I===null&&(I=A.updateQueue=Oa(F));I===null||F===I?Zs(F,y):F.lastUpdate===null||I.lastUpdate===null?(Zs(F,y),Zs(I,y)):(Zs(F,y),I.lastUpdate=y)}function $s(g,y){var A=g.updateQueue;A=A===null?g.updateQueue=Iu(g.memoizedState):ka(g,A),A.lastCapturedUpdate===null?A.firstCapturedUpdate=A.lastCapturedUpdate=y:(A.lastCapturedUpdate.next=y,A.lastCapturedUpdate=y)}function ka(g,y){var A=g.alternate;return A!==null&&y===A.updateQueue&&(y=g.updateQueue=Oa(y)),y}function cs(g,y,A,F,I,J){switch(A.tag){case 1:return g=A.payload,typeof g=="function"?g.call(J,F,I):g;case 3:g.effectTag=g.effectTag&-4097|64;case 0:if(g=A.payload,I=typeof g=="function"?g.call(J,F,I):g,I==null)break;return f({},F,I);case 2:ao=!0}return F}function w0(g,y,A,F,I){ao=!1,y=ka(g,y);for(var J=y.baseState,fe=null,mt=0,Ct=y.firstUpdate,Mt=J;Ct!==null;){var Er=Ct.expirationTime;Erii?(qi=tr,tr=null):qi=tr.sibling;var jr=iu(He,tr,ut[ii],Jt);if(jr===null){tr===null&&(tr=qi);break}g&&tr&&jr.alternate===null&&y(He,tr),Be=J(jr,Be,ii),ti===null?jn=jr:ti.sibling=jr,ti=jr,tr=qi}if(ii===ut.length)return A(He,tr),jn;if(tr===null){for(;iiii?(qi=tr,tr=null):qi=tr.sibling;var gu=iu(He,tr,jr.value,Jt);if(gu===null){tr===null&&(tr=qi);break}g&&tr&&gu.alternate===null&&y(He,tr),Be=J(gu,Be,ii),ti===null?jn=gu:ti.sibling=gu,ti=gu,tr=qi}if(jr.done)return A(He,tr),jn;if(tr===null){for(;!jr.done;ii++,jr=ut.next())jr=$u(He,jr.value,Jt),jr!==null&&(Be=J(jr,Be,ii),ti===null?jn=jr:ti.sibling=jr,ti=jr);return jn}for(tr=F(He,tr);!jr.done;ii++,jr=ut.next())jr=j0(tr,He,ii,jr.value,Jt),jr!==null&&(g&&jr.alternate!==null&&tr.delete(jr.key===null?ii:jr.key),Be=J(jr,Be,ii),ti===null?jn=jr:ti.sibling=jr,ti=jr);return g&&tr.forEach(function(Ba){return y(He,Ba)}),jn}return function(He,Be,ut,Jt){var jn=typeof ut=="object"&&ut!==null&&ut.type===U&&ut.key===null;jn&&(ut=ut.props.children);var ti=typeof ut=="object"&&ut!==null;if(ti)switch(ut.$$typeof){case N:e:{for(ti=ut.key,jn=Be;jn!==null;){if(jn.key===ti)if(jn.tag===7?ut.type===U:jn.elementType===ut.type){A(He,jn.sibling),Be=I(jn,ut.type===U?ut.props.children:ut.props,Jt),Be.ref=Fs(He,jn,ut),Be.return=He,He=Be;break e}else{A(He,jn);break}else y(He,jn);jn=jn.sibling}ut.type===U?(Be=Zu(ut.props.children,He.mode,Jt,ut.key),Be.return=He,He=Be):(Jt=Ia(ut.type,ut.key,ut.props,null,He.mode,Jt),Jt.ref=Fs(He,Be,ut),Jt.return=He,He=Jt)}return fe(He);case C:e:{for(jn=ut.key;Be!==null;){if(Be.key===jn)if(Be.tag===4&&Be.stateNode.containerInfo===ut.containerInfo&&Be.stateNode.implementation===ut.implementation){A(He,Be.sibling),Be=I(Be,ut.children||[],Jt),Be.return=He,He=Be;break e}else{A(He,Be);break}else y(He,Be);Be=Be.sibling}Be=vf(ut,He.mode,Jt),Be.return=He,He=Be}return fe(He)}if(typeof ut=="string"||typeof ut=="number")return ut=""+ut,Be!==null&&Be.tag===6?(A(He,Be.sibling),Be=I(Be,ut,Jt),Be.return=He,He=Be):(A(He,Be),Be=U0(ut,He.mode,Jt),Be.return=He,He=Be),fe(He);if(h0(ut))return Tl(He,Be,ut,Jt);if(le(ut))return e0(He,Be,ut,Jt);if(ti&&Ni(He,ut),typeof ut=="undefined"&&!jn)switch(He.tag){case 1:case 0:throw He=He.type,Error(t(152,He.displayName||He.name||"Component"))}return A(He,Be)}}var z=B(!0),G=B(!1),$={},De={current:$},me={current:$},xe={current:$};function Z(g){if(g===$)throw Error(t(174));return g}function ke(g,y){Zt(xe,y,g),Zt(me,g,g),Zt(De,$,g),y=jt(y),fi(De,g),Zt(De,y,g)}function Xe(g){fi(De,g),fi(me,g),fi(xe,g)}function ht(g){var y=Z(xe.current),A=Z(De.current);y=$t(A,g.type,y),A!==y&&(Zt(me,g,g),Zt(De,y,g))}function ie(g){me.current===g&&(fi(De,g),fi(me,g))}var qe={current:0};function tt(g){for(var y=g;y!==null;){if(y.tag===13){var A=y.memoizedState;if(A!==null&&(A=A.dehydrated,A===null||Hr(A)||To(A)))return y}else if(y.tag===19&&y.memoizedProps.revealOrder!==void 0){if((y.effectTag&64)!=0)return y}else if(y.child!==null){y.child.return=y,y=y.child;continue}if(y===g)break;for(;y.sibling===null;){if(y.return===null||y.return===g)return null;y=y.return}y.sibling.return=y.return,y=y.sibling}return null}function Tt(g,y){return{responder:g,props:y}}var kt=k.ReactCurrentDispatcher,bt=k.ReactCurrentBatchConfig,on=0,tn=null,Lt=null,gn=null,lr=null,Qn=null,_r=null,Cn=0,Ar=null,v0=0,Rr=!1,nt=null,_t=0;function Ze(){throw Error(t(321))}function Ft(g,y){if(y===null)return!1;for(var A=0;ACn&&(Cn=Er,La(Cn))):(oc(Er,Ct.suspenseConfig),J=Ct.eagerReducer===g?Ct.eagerState:g(J,Ct.action)),fe=Ct,Ct=Ct.next}while(Ct!==null&&Ct!==F);Mt||(mt=fe,I=J),Ne(J,y.memoizedState)||(fo=!0),y.memoizedState=J,y.baseUpdate=mt,y.baseState=I,A.lastRenderedState=J}return[y.memoizedState,A.dispatch]}function S0(g){var y=Yn();return typeof g=="function"&&(g=g()),y.memoizedState=y.baseState=g,g=y.queue={last:null,dispatch:null,lastRenderedReducer:nu,lastRenderedState:g},g=g.dispatch=bs.bind(null,tn,g),[y.memoizedState,g]}function X0(g){return Cu(nu,g)}function xu(g,y,A,F){return g={tag:g,create:y,destroy:A,deps:F,next:null},Ar===null?(Ar={lastEffect:null},Ar.lastEffect=g.next=g):(y=Ar.lastEffect,y===null?Ar.lastEffect=g.next=g:(A=y.next,y.next=g,g.next=A,Ar.lastEffect=g)),g}function di(g,y,A,F){var I=Yn();v0|=g,I.memoizedState=xu(y,A,void 0,F===void 0?null:F)}function ko(g,y,A,F){var I=yr();F=F===void 0?null:F;var J=void 0;if(Lt!==null){var fe=Lt.memoizedState;if(J=fe.destroy,F!==null&&Ft(F,fe.deps)){xu(0,A,J,F);return}}v0|=g,I.memoizedState=xu(y,A,J,F)}function Zo(g,y){return di(516,192,g,y)}function sf(g,y){return ko(516,192,g,y)}function gl(g,y){if(typeof y=="function")return g=g(),y(g),function(){y(null)};if(y!=null)return g=g(),y.current=g,function(){y.current=null}}function af(){}function Mo(g,y){return Yn().memoizedState=[g,y===void 0?null:y],g}function ds(g,y){var A=yr();y=y===void 0?null:y;var F=A.memoizedState;return F!==null&&y!==null&&Ft(y,F[1])?F[0]:(A.memoizedState=[g,y],g)}function bs(g,y,A){if(!(25>_t))throw Error(t(301));var F=g.alternate;if(g===tn||F!==null&&F===tn)if(Rr=!0,g={expirationTime:on,suspenseConfig:null,action:A,eagerReducer:null,eagerState:null,next:null},nt===null&&(nt=new Map),A=nt.get(y),A===void 0)nt.set(y,g);else{for(y=A;y.next!==null;)y=y.next;y.next=g}else{var I=g0(),J=ri.suspense;I=bn(I,g,J),J={expirationTime:I,suspenseConfig:J,action:A,eagerReducer:null,eagerState:null,next:null};var fe=y.last;if(fe===null)J.next=J;else{var mt=fe.next;mt!==null&&(J.next=mt),fe.next=J}if(y.last=J,g.expirationTime===0&&(F===null||F.expirationTime===0)&&(F=y.lastRenderedReducer,F!==null))try{var Ct=y.lastRenderedState,Mt=F(Ct,A);if(J.eagerReducer=F,J.eagerState=Mt,Ne(Mt,Ct))return}catch(Er){}finally{}Qu(g,I)}}var No={readContext:Tu,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useResponder:Ze,useDeferredValue:Ze,useTransition:Ze},Lo={readContext:Tu,useCallback:Mo,useContext:Tu,useEffect:Zo,useImperativeHandle:function(g,y,A){return A=A!=null?A.concat([g]):null,di(4,36,gl.bind(null,y,g),A)},useLayoutEffect:function(g,y){return di(4,36,g,y)},useMemo:function(g,y){var A=Yn();return y=y===void 0?null:y,g=g(),A.memoizedState=[g,y],g},useReducer:function(g,y,A){var F=Yn();return y=A!==void 0?A(y):y,F.memoizedState=F.baseState=y,g=F.queue={last:null,dispatch:null,lastRenderedReducer:g,lastRenderedState:y},g=g.dispatch=bs.bind(null,tn,g),[F.memoizedState,g]},useRef:function(g){var y=Yn();return g={current:g},y.memoizedState=g},useState:S0,useDebugValue:af,useResponder:Tt,useDeferredValue:function(g,y){var A=S0(g),F=A[0],I=A[1];return Zo(function(){E.unstable_next(function(){var J=bt.suspense;bt.suspense=y===void 0?null:y;try{I(g)}finally{bt.suspense=J}})},[g,y]),F},useTransition:function(g){var y=S0(!1),A=y[0],F=y[1];return[Mo(function(I){F(!0),E.unstable_next(function(){var J=bt.suspense;bt.suspense=g===void 0?null:g;try{F(!1),I()}finally{bt.suspense=J}})},[g,A]),A]}},ps={readContext:Tu,useCallback:ds,useContext:Tu,useEffect:sf,useImperativeHandle:function(g,y,A){return A=A!=null?A.concat([g]):null,ko(4,36,gl.bind(null,y,g),A)},useLayoutEffect:function(g,y){return ko(4,36,g,y)},useMemo:function(g,y){var A=yr();y=y===void 0?null:y;var F=A.memoizedState;return F!==null&&y!==null&&Ft(y,F[1])?F[0]:(g=g(),A.memoizedState=[g,y],g)},useReducer:Cu,useRef:function(){return yr().memoizedState},useState:X0,useDebugValue:af,useResponder:Tt,useDeferredValue:function(g,y){var A=X0(g),F=A[0],I=A[1];return sf(function(){E.unstable_next(function(){var J=bt.suspense;bt.suspense=y===void 0?null:y;try{I(g)}finally{bt.suspense=J}})},[g,y]),F},useTransition:function(g){var y=X0(!1),A=y[0],F=y[1];return[ds(function(I){F(!0),E.unstable_next(function(){var J=bt.suspense;bt.suspense=g===void 0?null:g;try{F(!1),I()}finally{bt.suspense=J}})},[g,A]),A]}},Vu=null,yu=null,pi=!1;function T0(g,y){var A=Io(5,null,null,0);A.elementType="DELETED",A.type="DELETED",A.stateNode=y,A.return=g,A.effectTag=8,g.lastEffect!==null?(g.lastEffect.nextEffect=A,g.lastEffect=A):g.firstEffect=g.lastEffect=A}function Q0(g,y){switch(g.tag){case 5:return y=Lu(y,g.type,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 6:return y=V0(y,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 13:return!1;default:return!1}}function Fo(g){if(pi){var y=yu;if(y){var A=y;if(!Q0(g,y)){if(y=Co(A),!y||!Q0(g,y)){g.effectTag=g.effectTag&-1025|2,pi=!1,Vu=g;return}T0(Vu,A)}Vu=g,yu=L0(y)}else g.effectTag=g.effectTag&-1025|2,pi=!1,Vu=g}}function ta(g){for(g=g.return;g!==null&&g.tag!==5&&g.tag!==3&&g.tag!==13;)g=g.return;Vu=g}function Kl(g){if(!w||g!==Vu)return!1;if(!pi)return ta(g),pi=!0,!1;var y=g.type;if(g.tag!==5||y!=="head"&&y!=="body"&&!ct(y,g.memoizedProps))for(y=yu;y;)T0(g,y),y=Co(y);if(ta(g),g.tag===13){if(!w)throw Error(t(316));if(g=g.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(t(317));yu=ks(g)}else yu=Vu?Co(g.stateNode):null;return!0}function Ki(){w&&(yu=Vu=null,pi=!1)}var Yr=k.ReactCurrentOwner,fo=!1;function Oi(g,y,A,F){y.child=g===null?G(y,null,A,F):z(y,g.child,A,F)}function gi(g,y,A,F,I){A=A.render;var J=y.ref;return Oo(y,I),F=nn(g,y,A,F,J,I),g!==null&&!fo?(y.updateQueue=g.updateQueue,y.effectTag&=-517,g.expirationTime<=I&&(g.expirationTime=0),fu(g,y,I)):(y.effectTag|=1,Oi(g,y,F,I),y.child)}function ff(g,y,A,F,I,J){if(g===null){var fe=A.type;return typeof fe=="function"&&!hf(fe)&&fe.defaultProps===void 0&&A.compare===null&&A.defaultProps===void 0?(y.tag=15,y.type=fe,cf(g,y,fe,F,I,J)):(g=Ia(A.type,null,F,null,y.mode,J),g.ref=y.ref,g.return=y,y.child=g)}return fe=g.child,Iy)&&Ur.set(g,y)))}}function eo(g,y){g.expirationTimeg?y:g)}function Ju(g){if(g.lastExpiredTime!==0)g.callbackExpirationTime=1073741823,g.callbackPriority=99,g.callbackNode=Gl(to.bind(null,g));else{var y=po(g),A=g.callbackNode;if(y===0)A!==null&&(g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90);else{var F=g0();if(y===1073741823?F=99:y===1||y===2?F=95:(F=10*(1073741821-y)-10*(1073741821-F),F=0>=F?99:250>=F?98:5250>=F?97:95),A!==null){var I=g.callbackPriority;if(g.callbackExpirationTime===y&&I>=F)return;A!==Ir&&Ms(A)}g.callbackExpirationTime=y,g.callbackPriority=F,y=y===1073741823?Gl(to.bind(null,g)):Jo(F,bo.bind(null,g),{timeout:10*(1073741821-y)-d0()}),g.callbackNode=y}}}function bo(g,y){if(Qi=0,y)return y=g0(),oa(g,y),Ju(g),null;var A=po(g);if(A!==0){if(y=g.callbackNode,(kn&(Xi|ru))!==wr)throw Error(t(327));if(Bs(),g===se&&A===Le||ms(g,A),re!==null){var F=kn;kn|=Xi;var I=B0(g);do try{$1();break}catch(mt){ia(g,mt)}while(1);if(bu(),kn=F,Ku.current=I,Ae===Xr)throw y=ot,ms(g,A),Sl(g,A),Ju(g),y;if(re===null)switch(I=g.finishedWork=g.current.alternate,g.finishedExpirationTime=A,F=Ae,se=null,F){case Ci:case Xr:throw Error(t(345));case Wn:oa(g,2=A){g.lastPingedTime=A,ms(g,A);break}}if(J=po(g),J!==0&&J!==A)break;if(F!==0&&F!==A){g.lastPingedTime=F;break}g.timeoutHandle=ln(Dl.bind(null,g),I);break}Dl(g);break;case m0:if(Sl(g,A),F=g.lastSuspendedTime,A===F&&(g.nextKnownPendingLevel=Uc(I)),yn&&(I=g.lastPingedTime,I===0||I>=A)){g.lastPingedTime=A,ms(g,A);break}if(I=po(g),I!==0&&I!==A)break;if(F!==0&&F!==A){g.lastPingedTime=F;break}if(Xt!==1073741823?F=10*(1073741821-Xt)-d0():vt===1073741823?F=0:(F=10*(1073741821-vt)-5e3,I=d0(),A=10*(1073741821-A)-I,F=I-F,0>F&&(F=0),F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3e3>F?3e3:4320>F?4320:1960*df(F/1960))-F,A=F?F=0:(I=fe.busyDelayMs|0,J=d0()-(10*(1073741821-J)-(fe.timeoutMs|0||5e3)),F=J<=I?0:I+F-J),10 component higher in the tree to provide a loading indicator or placeholder to display.`+Pr(I))}Ae!==y0&&(Ae=Wn),J=_l(J,I),Ct=F;do{switch(Ct.tag){case 3:fe=J,Ct.effectTag|=4096,Ct.expirationTime=y;var Be=hs(Ct,fe,y);$s(Ct,Be);break e;case 1:fe=J;var ut=Ct.type,Jt=Ct.stateNode;if((Ct.effectTag&64)==0&&(typeof ut.getDerivedStateFromError=="function"||Jt!==null&&typeof Jt.componentDidCatch=="function"&&(cr===null||!cr.has(Jt)))){Ct.effectTag|=4096,Ct.expirationTime=y;var jn=ra(Ct,fe,y);$s(Ct,jn);break e}}Ct=Ct.return}while(Ct!==null)}re=ho(re)}catch(ti){y=ti;continue}break}while(1)}function B0(){var g=Ku.current;return Ku.current=No,g===null?No:g}function oc(g,y){g_n&&(_n=g)}function gd(){for(;re!==null;)re=e2(re)}function $1(){for(;re!==null&&!Xn();)re=e2(re)}function e2(g){var y=Pa(g.alternate,g,Le);return g.memoizedProps=g.pendingProps,y===null&&(y=ho(g)),vs.current=null,y}function ho(g){re=g;do{var y=re.alternate;if(g=re.return,(re.effectTag&2048)==0){e:{var A=y;y=re;var F=Le,I=y.pendingProps;switch(y.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:Yi(y.type)&&Y0(y);break;case 3:Xe(y),Ui(y),I=y.stateNode,I.pendingContext&&(I.context=I.pendingContext,I.pendingContext=null),(A===null||A.child===null)&&Kl(y)&&Gu(y),Vr(y);break;case 5:ie(y);var J=Z(xe.current);if(F=y.type,A!==null&&y.stateNode!=null)Bu(A,y,F,I,J),A.ref!==y.ref&&(y.effectTag|=128);else if(I){if(A=Z(De.current),Kl(y)){if(I=y,!w)throw Error(t(175));A=tu(I.stateNode,I.type,I.memoizedProps,J,A,I),I.updateQueue=A,A=A!==null,A&&Gu(y)}else{var fe=ae(F,I,J,A,y);Kr(fe,y,!1,!1),y.stateNode=fe,ue(fe,F,I,J,A)&&Gu(y)}y.ref!==null&&(y.effectTag|=128)}else if(y.stateNode===null)throw Error(t(166));break;case 6:if(A&&y.stateNode!=null)Sn(A,y,A.memoizedProps,I);else{if(typeof I!="string"&&y.stateNode===null)throw Error(t(166));if(A=Z(xe.current),J=Z(De.current),Kl(y)){if(A=y,!w)throw Error(t(176));(A=Si(A.stateNode,A.memoizedProps,A))&&Gu(y)}else y.stateNode=en(I,A,J,y)}break;case 11:break;case 13:if(fi(qe,y),I=y.memoizedState,(y.effectTag&64)!=0){y.expirationTime=F;break e}I=I!==null,J=!1,A===null?y.memoizedProps.fallback!==void 0&&Kl(y):(F=A.memoizedState,J=F!==null,I||F===null||(F=A.child.sibling,F!==null&&(fe=y.firstEffect,fe!==null?(y.firstEffect=F,F.nextEffect=fe):(y.firstEffect=y.lastEffect=F,F.nextEffect=null),F.effectTag=8))),I&&!J&&(y.mode&2)!=0&&(A===null&&y.memoizedProps.unstable_avoidThisFallback!==!0||(qe.current&1)!=0?Ae===Ci&&(Ae=Xu):((Ae===Ci||Ae===Xu)&&(Ae=m0),_n!==0&&se!==null&&(Sl(se,Le),_s(se,_n)))),vr&&I&&(y.effectTag|=4),Wt&&(I||J)&&(y.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Xe(y),Vr(y);break;case 10:mu(y);break;case 9:break;case 14:break;case 17:Yi(y.type)&&Y0(y);break;case 19:if(fi(qe,y),I=y.memoizedState,I===null)break;if(J=(y.effectTag&64)!=0,fe=I.rendering,fe===null){if(J)Au(I,!1);else if(Ae!==Ci||A!==null&&(A.effectTag&64)!=0)for(A=y.child;A!==null;){if(fe=tt(A),fe!==null){for(y.effectTag|=64,Au(I,!1),A=fe.updateQueue,A!==null&&(y.updateQueue=A,y.effectTag|=4),I.lastEffect===null&&(y.firstEffect=null),y.lastEffect=I.lastEffect,A=F,I=y.child;I!==null;)J=I,F=A,J.effectTag&=2,J.nextEffect=null,J.firstEffect=null,J.lastEffect=null,fe=J.alternate,fe===null?(J.childExpirationTime=0,J.expirationTime=F,J.child=null,J.memoizedProps=null,J.memoizedState=null,J.updateQueue=null,J.dependencies=null):(J.childExpirationTime=fe.childExpirationTime,J.expirationTime=fe.expirationTime,J.child=fe.child,J.memoizedProps=fe.memoizedProps,J.memoizedState=fe.memoizedState,J.updateQueue=fe.updateQueue,F=fe.dependencies,J.dependencies=F===null?null:{expirationTime:F.expirationTime,firstContext:F.firstContext,responders:F.responders}),I=I.sibling;Zt(qe,qe.current&1|2,y),y=y.child;break e}A=A.sibling}}else{if(!J)if(A=tt(fe),A!==null){if(y.effectTag|=64,J=!0,A=A.updateQueue,A!==null&&(y.updateQueue=A,y.effectTag|=4),Au(I,!0),I.tail===null&&I.tailMode==="hidden"&&!fe.alternate){y=y.lastEffect=I.lastEffect,y!==null&&(y.nextEffect=null);break}}else d0()>I.tailExpiration&&1I&&(I=F),fe>I&&(I=fe),J=J.sibling;A.childExpirationTime=I}if(y!==null)return y;g!==null&&(g.effectTag&2048)==0&&(g.firstEffect===null&&(g.firstEffect=re.firstEffect),re.lastEffect!==null&&(g.lastEffect!==null&&(g.lastEffect.nextEffect=re.firstEffect),g.lastEffect=re.lastEffect),1g?y:g}function Dl(g){var y=as();return so(99,el.bind(null,g,y)),null}function el(g,y){do Bs();while(Qr!==null);if((kn&(Xi|ru))!==wr)throw Error(t(327));var A=g.finishedWork,F=g.finishedExpirationTime;if(A===null)return null;if(g.finishedWork=null,g.finishedExpirationTime=0,A===g.current)throw Error(t(177));g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90,g.nextKnownPendingLevel=0;var I=Uc(A);if(g.firstPendingTime=I,F<=g.lastSuspendedTime?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:F<=g.firstSuspendedTime&&(g.firstSuspendedTime=F-1),F<=g.lastPingedTime&&(g.lastPingedTime=0),F<=g.lastExpiredTime&&(g.lastExpiredTime=0),g===se&&(re=se=null,Le=0),1=A?Yt(g,y,A):(Zt(qe,qe.current&1,y),y=fu(g,y,A),y!==null?y.sibling:null);Zt(qe,qe.current&1,y);break;case 19:if(F=y.childExpirationTime>=A,(g.effectTag&64)!=0){if(F)return wn(g,y,A);y.effectTag|=64}if(I=y.memoizedState,I!==null&&(I.rendering=null,I.tail=null),Zt(qe,qe.current,y),!F)return null}return fu(g,y,A)}fo=!1}}else fo=!1;switch(y.expirationTime=0,y.tag){case 2:if(F=y.type,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,I=Du(y,Di.current),Oo(y,A),I=nn(null,y,F,g,I,A),y.effectTag|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0){if(y.tag=1,sn(),Yi(F)){var J=!0;ni(y)}else J=!1;y.memoizedState=I.state!==null&&I.state!==void 0?I.state:null;var fe=F.getDerivedStateFromProps;typeof fe=="function"&&Yl(y,F,fe,g),I.updater=ea,y.stateNode=I,I._reactInternalFiber=y,Ls(y,F,g,A),y=et(null,y,F,!0,J,A)}else y.tag=0,Oi(null,y,I,A),y=y.child;return y;case 16:if(I=y.elementType,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,Ue(I),I._status!==1)throw I._result;switch(I=I._result,y.type=I,J=y.tag=tl(I),g=Hn(I,g),J){case 0:y=Z0(null,y,I,g,A);break;case 1:y=Te(null,y,I,g,A);break;case 11:y=gi(null,y,I,g,A);break;case 14:y=ff(null,y,I,Hn(I.type,g),F,A);break;default:throw Error(t(306,I,""))}return y;case 0:return F=y.type,I=y.pendingProps,I=y.elementType===F?I:Hn(F,I),Z0(g,y,F,I,A);case 1:return F=y.type,I=y.pendingProps,I=y.elementType===F?I:Hn(F,I),Te(g,y,F,I,A);case 3:if(Ve(y),F=y.updateQueue,F===null)throw Error(t(282));if(I=y.memoizedState,I=I!==null?I.element:null,w0(y,F,y.pendingProps,null,A),F=y.memoizedState.element,F===I)Ki(),y=fu(g,y,A);else{if((I=y.stateNode.hydrate)&&(w?(yu=L0(y.stateNode.containerInfo),Vu=y,I=pi=!0):I=!1),I)for(A=G(y,null,F,A),y.child=A;A;)A.effectTag=A.effectTag&-3|1024,A=A.sibling;else Oi(g,y,F,A),Ki();y=y.child}return y;case 5:return ht(y),g===null&&Fo(y),F=y.type,I=y.pendingProps,J=g!==null?g.memoizedProps:null,fe=I.children,ct(F,I)?fe=null:J!==null&&ct(F,J)&&(y.effectTag|=16),J0(g,y),y.mode&4&&A!==1&&At(F,I)?(y.expirationTime=y.childExpirationTime=1,y=null):(Oi(g,y,fe,A),y=y.child),y;case 6:return g===null&&Fo(y),null;case 13:return Yt(g,y,A);case 4:return ke(y,y.stateNode.containerInfo),F=y.pendingProps,g===null?y.child=z(y,null,F,A):Oi(g,y,F,A),y.child;case 11:return F=y.type,I=y.pendingProps,I=y.elementType===F?I:Hn(F,I),gi(g,y,F,I,A);case 7:return Oi(g,y,y.pendingProps,A),y.child;case 8:return Oi(g,y,y.pendingProps.children,A),y.child;case 12:return Oi(g,y,y.pendingProps.children,A),y.child;case 10:e:{if(F=y.type._context,I=y.pendingProps,fe=y.memoizedProps,J=I.value,Pu(y,J),fe!==null){var mt=fe.value;if(J=Ne(mt,J)?0:(typeof F._calculateChangedBits=="function"?F._calculateChangedBits(mt,J):1073741823)|0,J===0){if(fe.children===I.children&&!ci.current){y=fu(g,y,A);break e}}else for(mt=y.child,mt!==null&&(mt.return=y);mt!==null;){var Ct=mt.dependencies;if(Ct!==null){fe=mt.child;for(var Mt=Ct.firstContext;Mt!==null;){if(Mt.context===F&&(Mt.observedBits&J)!=0){mt.tag===1&&(Mt=p0(A,null),Mt.tag=2,K0(mt,Mt)),mt.expirationTime=y&&g<=y}function Sl(g,y){var A=g.firstSuspendedTime,F=g.lastSuspendedTime;Ay||A===0)&&(g.lastSuspendedTime=y),y<=g.lastPingedTime&&(g.lastPingedTime=0),y<=g.lastExpiredTime&&(g.lastExpiredTime=0)}function _s(g,y){y>g.firstPendingTime&&(g.firstPendingTime=y);var A=g.firstSuspendedTime;A!==0&&(y>=A?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:y>=g.lastSuspendedTime&&(g.lastSuspendedTime=y+1),y>g.nextKnownPendingLevel&&(g.nextKnownPendingLevel=y))}function oa(g,y){var A=g.lastExpiredTime;(A===0||A>y)&&(g.lastExpiredTime=y)}function n2(g){var y=g._reactInternalFiber;if(y===void 0)throw typeof g.render=="function"?Error(t(188)):Error(t(268,Object.keys(g)));return g=$e(y),g===null?null:g.stateNode}function la(g,y){g=g.memoizedState,g!==null&&g.dehydrated!==null&&g.retryTime{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var JK=0;Qf.__interactionsRef=null;Qf.__subscriberRef=null;Qf.unstable_clear=function(i){return i()};Qf.unstable_getCurrent=function(){return null};Qf.unstable_getThreadID=function(){return++JK};Qf.unstable_trace=function(i,o,f){return f()};Qf.unstable_wrap=function(i){return i};Qf.unstable_subscribe=function(){};Qf.unstable_unsubscribe=function(){}});var g9=ce(au=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(au,"__esModule",{value:!0});var i=!0,o=0,f=0,p=0;au.__interactionsRef=null,au.__subscriberRef=null,i&&(au.__interactionsRef={current:new Set},au.__subscriberRef={current:null});function E(ge){if(!i)return ge();var ze=au.__interactionsRef.current;au.__interactionsRef.current=new Set;try{return ge()}finally{au.__interactionsRef.current=ze}}function t(){return i?au.__interactionsRef.current:null}function k(){return++p}function L(ge,ze,pe){var Oe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(!i)return pe();var le={__count:1,id:f++,name:ge,timestamp:ze},Ue=au.__interactionsRef.current,Ge=new Set(Ue);Ge.add(le),au.__interactionsRef.current=Ge;var rt=au.__subscriberRef.current,wt;try{rt!==null&&rt.onInteractionTraced(le)}finally{try{rt!==null&&rt.onWorkStarted(Ge,Oe)}finally{try{wt=pe()}finally{au.__interactionsRef.current=Ue;try{rt!==null&&rt.onWorkStopped(Ge,Oe)}finally{le.__count--,rt!==null&&le.__count===0&&rt.onInteractionScheduledWorkCompleted(le)}}}}return wt}function N(ge){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o;if(!i)return ge;var pe=au.__interactionsRef.current,Oe=au.__subscriberRef.current;Oe!==null&&Oe.onWorkScheduled(pe,ze),pe.forEach(function(Ge){Ge.__count++});var le=!1;function Ue(){var Ge=au.__interactionsRef.current;au.__interactionsRef.current=pe,Oe=au.__subscriberRef.current;try{var rt;try{Oe!==null&&Oe.onWorkStarted(pe,ze)}finally{try{rt=ge.apply(void 0,arguments)}finally{au.__interactionsRef.current=Ge,Oe!==null&&Oe.onWorkStopped(pe,ze)}}return rt}finally{le||(le=!0,pe.forEach(function(wt){wt.__count--,Oe!==null&&wt.__count===0&&Oe.onInteractionScheduledWorkCompleted(wt)}))}}return Ue.cancel=function(){Oe=au.__subscriberRef.current;try{Oe!==null&&Oe.onWorkCanceled(pe,ze)}finally{pe.forEach(function(rt){rt.__count--,Oe&&rt.__count===0&&Oe.onInteractionScheduledWorkCompleted(rt)})}},Ue}var C=null;i&&(C=new Set);function U(ge){i&&(C.add(ge),C.size===1&&(au.__subscriberRef.current={onInteractionScheduledWorkCompleted:ne,onInteractionTraced:W,onWorkCanceled:he,onWorkScheduled:m,onWorkStarted:we,onWorkStopped:Se}))}function q(ge){i&&(C.delete(ge),C.size===0&&(au.__subscriberRef.current=null))}function W(ge){var ze=!1,pe=null;if(C.forEach(function(Oe){try{Oe.onInteractionTraced(ge)}catch(le){ze||(ze=!0,pe=le)}}),ze)throw pe}function ne(ge){var ze=!1,pe=null;if(C.forEach(function(Oe){try{Oe.onInteractionScheduledWorkCompleted(ge)}catch(le){ze||(ze=!0,pe=le)}}),ze)throw pe}function m(ge,ze){var pe=!1,Oe=null;if(C.forEach(function(le){try{le.onWorkScheduled(ge,ze)}catch(Ue){pe||(pe=!0,Oe=Ue)}}),pe)throw Oe}function we(ge,ze){var pe=!1,Oe=null;if(C.forEach(function(le){try{le.onWorkStarted(ge,ze)}catch(Ue){pe||(pe=!0,Oe=Ue)}}),pe)throw Oe}function Se(ge,ze){var pe=!1,Oe=null;if(C.forEach(function(le){try{le.onWorkStopped(ge,ze)}catch(Ue){pe||(pe=!0,Oe=Ue)}}),pe)throw Oe}function he(ge,ze){var pe=!1,Oe=null;if(C.forEach(function(le){try{le.onWorkCanceled(ge,ze)}catch(Ue){pe||(pe=!0,Oe=Ue)}}),pe)throw Oe}au.unstable_clear=E,au.unstable_getCurrent=t,au.unstable_getThreadID=k,au.unstable_trace=L,au.unstable_wrap=N,au.unstable_subscribe=U,au.unstable_unsubscribe=q}()});var _9=ce((Une,fw)=>{"use strict";process.env.NODE_ENV==="production"?fw.exports=y9():fw.exports=g9()});var E9=ce((jne,hg)=>{"use strict";process.env.NODE_ENV!=="production"&&(hg.exports=function i(o){"use strict";var f=eg(),p=su(),E=HD(),t=h4(),k=_9(),L=0,N=1,C=2,U=3,q=4,W=5,ne=6,m=7,we=8,Se=9,he=10,ge=11,ze=12,pe=13,Oe=14,le=15,Ue=16,Ge=17,rt=18,wt=19,xt=20,$e=21,ft=function(){};ft=function(a,c){for(var _=arguments.length,T=new Array(_>2?_-2:0),R=2;R<_;R++)T[R-2]=arguments[R];if(c===void 0)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(T.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!a){if(typeof console!="undefined"){var j=T.map(function(oe){return""+oe});j.unshift("Warning: "+c),Function.prototype.apply.call(console.error,console,j)}try{var V=0,te="Warning: "+c.replace(/%s/g,function(){return T[V++]});throw new Error(te)}catch(oe){}}};var Ke=ft;function jt(a){return a._reactInternalFiber}function $t(a,c){a._reactInternalFiber=c}var at=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;at.hasOwnProperty("ReactCurrentDispatcher")||(at.ReactCurrentDispatcher={current:null}),at.hasOwnProperty("ReactCurrentBatchConfig")||(at.ReactCurrentBatchConfig={suspense:null});var Q=typeof Symbol=="function"&&Symbol.for,ae=Q?Symbol.for("react.element"):60103,Ce=Q?Symbol.for("react.portal"):60106,ue=Q?Symbol.for("react.fragment"):60107,je=Q?Symbol.for("react.strict_mode"):60108,ct=Q?Symbol.for("react.profiler"):60114,At=Q?Symbol.for("react.provider"):60109,en=Q?Symbol.for("react.context"):60110,ln=Q?Symbol.for("react.concurrent_mode"):60111,An=Q?Symbol.for("react.forward_ref"):60112,nr=Q?Symbol.for("react.suspense"):60113,un=Q?Symbol.for("react.suspense_list"):60120,Wt=Q?Symbol.for("react.memo"):60115,vr=Q?Symbol.for("react.lazy"):60116,w=Q?Symbol.for("react.fundamental"):60117,Ut=Q?Symbol.for("react.responder"):60118,Vn=Q?Symbol.for("react.scope"):60119,fr=typeof Symbol=="function"&&Symbol.iterator,Fr="@@iterator";function ur(a){if(a===null||typeof a!="object")return null;var c=fr&&a[fr]||a[Fr];return typeof c=="function"?c:null}var br=Ke;br=function(a,c){if(!a){for(var _=at.ReactDebugCurrentFrame,T=_.getStackAddendum(),R=arguments.length,j=new Array(R>2?R-2:0),V=2;V import('./MyComponent'))`,T),a._status=So,a._result=R}},function(T){a._status===a0&&(a._status=Go,a._result=T)})}}function Ko(a,c,_){var T=c.displayName||c.name||"";return a.displayName||(T!==""?_+"("+T+")":_)}function qt(a){if(a==null)return null;if(typeof a.tag=="number"&&Ke(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case ue:return"Fragment";case Ce:return"Portal";case ct:return"Profiler";case je:return"StrictMode";case nr:return"Suspense";case un:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case en:return"Context.Consumer";case At:return"Context.Provider";case An:return Ko(a,a.render,"ForwardRef");case Wt:return qt(a.type);case vr:{var c=a,_=Os(c);if(_)return qt(_);break}}return null}var _i=0,eu=1,ai=2,mr=4,Xo=6,W0=8,Lu=16,V0=32,Hr=64,To=128,Co=256,L0=512,tu=1024,Si=1028,ks=932,Hl=2047,F0=2048,f0=4096,Pr=!0,Ei=!0,G0=!0,fi=!0,Zt=!0,Ln=!0,Di=!1,ci=!1,Ht=!1,Du=!1,Yi=!1,Y0=!0,Ui=!1,Wl=!1,xo=!1,ni=!1,oo=!1,Vl=at.ReactCurrentOwner;function Ao(a){var c=a,_=a;if(a.alternate)for(;c.return;)c=c.return;else{var T=c;do c=T,(c.effectTag&(ai|tu))!==_i&&(_=c.return),T=c.return;while(T)}return c.tag===U?_:null}function Ms(a){return Ao(a)===a}function Xn(a){{var c=Vl.current;if(c!==null&&c.tag===N){var _=c,T=_.stateNode;T._warnedAboutRefsInRender||Ke(!1,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",qt(_.type)||"A component"),T._warnedAboutRefsInRender=!0}}var R=jt(a);return R?Ao(R)===R:!1}function Qo(a){if(Ao(a)!==a)throw Error("Unable to find node on an unmounted component.")}function lo(a){var c=a.alternate;if(!c){var _=Ao(a);if(_===null)throw Error("Unable to find node on an unmounted component.");return _!==a?null:a}for(var T=a,R=c;;){var j=T.return;if(j===null)break;var V=j.alternate;if(V===null){var te=j.return;if(te!==null){T=R=te;continue}break}if(j.child===V.child){for(var oe=j.child;oe;){if(oe===T)return Qo(j),a;if(oe===R)return Qo(j),c;oe=oe.sibling}throw Error("Unable to find node on an unmounted component.")}if(T.return!==R.return)T=j,R=V;else{for(var Ie=!1,Ye=j.child;Ye;){if(Ye===T){Ie=!0,T=j,R=V;break}if(Ye===R){Ie=!0,R=j,T=V;break}Ye=Ye.sibling}if(!Ie){for(Ye=V.child;Ye;){if(Ye===T){Ie=!0,T=V,R=j;break}if(Ye===R){Ie=!0,R=V,T=j;break}Ye=Ye.sibling}if(!Ie)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(T.alternate!==R)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(T.tag!==U)throw Error("Unable to find node on an unmounted component.");return T.stateNode.current===T?a:c}function b0(a){var c=lo(a);if(!c)return null;for(var _=c;;){if(_.tag===W||_.tag===ne)return _;if(_.child){_.child.return=_,_=_.child;continue}if(_===c)return null;for(;!_.sibling;){if(!_.return||_.return===c)return null;_=_.return}_.sibling.return=_.return,_=_.sibling}return null}function yl(a){var c=lo(a);if(!c)return null;for(var _=c;;){if(_.tag===W||_.tag===ne||Ht&&_.tag===xt)return _;if(_.child&&_.tag!==q){_.child.return=_,_=_.child;continue}if(_===c)return null;for(;!_.sibling;){if(!_.return||_.return===c)return null;_=_.return}_.sibling.return=_.return,_=_.sibling}return null}var Ro=o.getPublicInstance,Et=o.getRootHostContext,Pt=o.getChildHostContext,Bn=o.prepareForCommit,Ir=o.resetAfterCommit,ji=o.createInstance,Wr=o.appendInitialChild,wu=o.finalizeInitialChildren,c0=o.prepareUpdate,Ti=o.shouldSetTextContent,d0=o.shouldDeprioritizeSubtree,as=o.createTextInstance,St=o.setTimeout,so=o.clearTimeout,Jo=o.noTimeout,Gl=o.now,Fu=o.isPrimaryRenderer,fs=o.warnsIfNotActing,P0=o.supportsMutation,X=o.supportsPersistence,_e=o.supportsHydration,Ne=o.mountResponderInstance,Me=o.unmountResponderInstance,dt=o.getFundamentalComponentInstance,Hn=o.mountFundamentalComponent,Dn=o.shouldUpdateFundamentalComponent,or=o.getInstanceFromNode,mi=o.appendChild,Su=o.appendChildToContainer,bu=o.commitTextUpdate,Pu=o.commitMount,mu=o.commitUpdate,yi=o.insertBefore,Oo=o.insertInContainerBefore,Tu=o.removeChild,ao=o.removeChildFromContainer,Iu=o.resetTextContent,Oa=o.hideInstance,p0=o.hideTextInstance,Zs=o.unhideInstance,K0=o.unhideTextInstance,$s=o.updateFundamentalComponent,ka=o.unmountFundamentalComponent,cs=o.cloneInstance,w0=o.createContainerChildSet,Gn=o.appendChildToContainerChildSet,ic=o.finalizeContainerChildren,ri=o.replaceContainerChildren,Gr=o.cloneHiddenInstance,Yl=o.cloneHiddenTextInstance,ea=o.cloneInstance,lf=o.canHydrateInstance,Ns=o.canHydrateTextInstance,Ma=o.canHydrateSuspenseInstance,Ls=o.isSuspenseInstancePending,h0=o.isSuspenseInstanceFallback,Fs=o.registerSuspenseInstanceRetry,Ni=o.getNextHydratableSibling,B=o.getFirstHydratableChild,z=o.hydrateInstance,G=o.hydrateTextInstance,$=o.hydrateSuspenseInstance,De=o.getNextHydratableInstanceAfterSuspenseInstance,me=o.commitHydratedContainer,xe=o.commitHydratedSuspenseInstance,Z=o.clearSuspenseBoundary,ke=o.clearSuspenseBoundaryFromContainer,Xe=o.didNotMatchHydratedContainerTextInstance,ht=o.didNotMatchHydratedTextInstance,ie=o.didNotHydrateContainerInstance,qe=o.didNotHydrateInstance,tt=o.didNotFindHydratableContainerInstance,Tt=o.didNotFindHydratableContainerTextInstance,kt=o.didNotFindHydratableContainerSuspenseInstance,bt=o.didNotFindHydratableInstance,on=o.didNotFindHydratableTextInstance,tn=o.didNotFindHydratableSuspenseInstance,Lt=/^(.*)[\\\/]/,gn=function(a,c,_){var T="";if(c){var R=c.fileName,j=R.replace(Lt,"");if(/^index\./.test(j)){var V=R.match(Lt);if(V){var te=V[1];if(te){var oe=te.replace(Lt,"");j=oe+"/"+j}}}T=" (at "+j+":"+c.lineNumber+")"}else _&&(T=" (created by "+_+")");return` - in `+(a||"Unknown")+T},lr=at.ReactDebugCurrentFrame;function Qn(a){switch(a.tag){case U:case q:case ne:case m:case he:case Se:return"";default:var c=a._debugOwner,_=a._debugSource,T=qt(a.type),R=null;return c&&(R=qt(c.type)),gn(T,_,R)}}function _r(a){var c="",_=a;do c+=Qn(_),_=_.return;while(_);return c}var Cn=null,Ar=null;function v0(){{if(Cn===null)return null;var a=Cn._debugOwner;if(a!==null&&typeof a!="undefined")return qt(a.type)}return null}function Rr(){return Cn===null?"":_r(Cn)}function nt(){lr.getCurrentStack=null,Cn=null,Ar=null}function _t(a){lr.getCurrentStack=Rr,Cn=a,Ar=null}function Ze(a){Ar=a}var Ft="\u269B",nn="\u26D4",sn=typeof performance!="undefined"&&typeof performance.mark=="function"&&typeof performance.clearMarks=="function"&&typeof performance.measure=="function"&&typeof performance.clearMeasures=="function",Yn=null,yr=null,nu=null,Cu=!1,S0=!1,X0=!1,xu=0,di=0,ko=new Set,Zo=function(a){return Ft+" "+a},sf=function(a,c){var _=c?nn+" ":Ft+" ",T=c?" Warning: "+c:"";return""+_+a+T},gl=function(a){performance.mark(Zo(a))},af=function(a){performance.clearMarks(Zo(a))},Mo=function(a,c,_){var T=Zo(c),R=sf(a,_);try{performance.measure(R,T)}catch(j){}performance.clearMarks(T),performance.clearMeasures(R)},ds=function(a,c){return a+" (#"+c+")"},bs=function(a,c,_){return _===null?a+" ["+(c?"update":"mount")+"]":a+"."+_},No=function(a,c){var _=qt(a.type)||"Unknown",T=a._debugID,R=a.alternate!==null,j=bs(_,R,c);if(Cu&&ko.has(j))return!1;ko.add(j);var V=ds(j,T);return gl(V),!0},Lo=function(a,c){var _=qt(a.type)||"Unknown",T=a._debugID,R=a.alternate!==null,j=bs(_,R,c),V=ds(j,T);af(V)},ps=function(a,c,_){var T=qt(a.type)||"Unknown",R=a._debugID,j=a.alternate!==null,V=bs(T,j,c),te=ds(V,R);Mo(V,te,_)},Vu=function(a){switch(a.tag){case U:case W:case ne:case q:case m:case he:case Se:case we:return!0;default:return!1}},yu=function(){yr!==null&&nu!==null&&Lo(nu,yr),nu=null,yr=null,X0=!1},pi=function(){for(var a=Yn;a;)a._debugIsCurrentlyTiming&&ps(a,null,null),a=a.return},T0=function(a){a.return!==null&&T0(a.return),a._debugIsCurrentlyTiming&&No(a,null)},Q0=function(){Yn!==null&&T0(Yn)};function Fo(){Pr&&di++}function ta(){Pr&&(Cu&&(S0=!0),yr!==null&&yr!=="componentWillMount"&&yr!=="componentWillReceiveProps"&&(X0=!0))}function Kl(a){if(Pr){if(!sn||Vu(a)||(Yn=a,!No(a,null)))return;a._debugIsCurrentlyTiming=!0}}function Ki(a){if(Pr){if(!sn||Vu(a))return;a._debugIsCurrentlyTiming=!1,Lo(a,null)}}function Yr(a){if(Pr){if(!sn||Vu(a)||(Yn=a.return,!a._debugIsCurrentlyTiming))return;a._debugIsCurrentlyTiming=!1,ps(a,null,null)}}function fo(a){if(Pr){if(!sn||Vu(a)||(Yn=a.return,!a._debugIsCurrentlyTiming))return;a._debugIsCurrentlyTiming=!1;var c=a.tag===pe?"Rendering was suspended":"An error was thrown inside this error boundary";ps(a,null,c)}}function Oi(a,c){if(Pr){if(!sn||(yu(),!No(a,c)))return;nu=a,yr=c}}function gi(){if(Pr){if(!sn)return;if(yr!==null&&nu!==null){var a=X0?"Scheduled a cascading update":null;ps(nu,yr,a)}yr=null,nu=null}}function ff(a){if(Pr){if(Yn=a,!sn)return;xu=0,gl("(React Tree Reconciliation)"),Q0()}}function cf(a,c){if(Pr){if(!sn)return;var _=null;if(a!==null)if(a.tag===U)_="A top-level update interrupted the previous render";else{var T=qt(a.type)||"Unknown";_="An update to "+T+" interrupted the previous render"}else xu>1&&(_="There were cascading updates");xu=0;var R=c?"(React Tree Reconciliation: Completed Root)":"(React Tree Reconciliation: Yielded)";pi(),Mo(R,"(React Tree Reconciliation)",_)}}function J0(){if(Pr){if(!sn)return;Cu=!0,S0=!1,ko.clear(),gl("(Committing Changes)")}}function Z0(){if(Pr){if(!sn)return;var a=null;S0?a="Lifecycle hook scheduled a cascading update":xu>0&&(a="Caused by a cascading update in earlier commit"),S0=!1,xu++,Cu=!1,ko.clear(),Mo("(Committing Changes)","(Committing Changes)",a)}}function Te(){if(Pr){if(!sn)return;di=0,gl("(Committing Snapshot Effects)")}}function et(){if(Pr){if(!sn)return;var a=di;di=0,Mo("(Committing Snapshot Effects: "+a+" Total)","(Committing Snapshot Effects)",null)}}function Ve(){if(Pr){if(!sn)return;di=0,gl("(Committing Host Effects)")}}function Gt(){if(Pr){if(!sn)return;var a=di;di=0,Mo("(Committing Host Effects: "+a+" Total)","(Committing Host Effects)",null)}}function Yt(){if(Pr){if(!sn)return;di=0,gl("(Calling Lifecycle Methods)")}}function sr(){if(Pr){if(!sn)return;var a=di;di=0,Mo("(Calling Lifecycle Methods: "+a+" Total)","(Calling Lifecycle Methods)",null)}}var Br=[],wn;wn=[];var fu=-1;function Gu(a){return{current:a}}function Kr(a,c){if(fu<0){Ke(!1,"Unexpected pop.");return}c!==wn[fu]&&Ke(!1,"Unexpected Fiber popped."),a.current=Br[fu],Br[fu]=null,wn[fu]=null,fu--}function Vr(a,c,_){fu++,Br[fu]=a.current,wn[fu]=_,a.current=c}var Bu;Bu={};var Sn={};Object.freeze(Sn);var C0=Gu(Sn),Au=Gu(!1),ei=Sn;function _l(a,c,_){return ni?Sn:_&&zi(c)?ei:C0.current}function Ps(a,c,_){if(!ni){var T=a.stateNode;T.__reactInternalMemoizedUnmaskedChildContext=c,T.__reactInternalMemoizedMaskedChildContext=_}}function Uu(a,c){if(ni)return Sn;var _=a.type,T=_.contextTypes;if(!T)return Sn;var R=a.stateNode;if(R&&R.__reactInternalMemoizedUnmaskedChildContext===c)return R.__reactInternalMemoizedMaskedChildContext;var j={};for(var V in T)j[V]=c[V];{var te=qt(_)||"Unknown";E(T,j,"context",te,Rr)}return R&&Ps(a,c,j),j}function na(){return ni?!1:Au.current}function zi(a){if(ni)return!1;var c=a.childContextTypes;return c!=null}function Is(a){ni||(Kr(Au,a),Kr(C0,a))}function x0(a){ni||(Kr(Au,a),Kr(C0,a))}function Li(a,c,_){if(!ni){if(C0.current!==Sn)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Vr(C0,c,a),Vr(Au,_,a)}}function A0(a,c,_){if(ni)return _;var T=a.stateNode,R=c.childContextTypes;if(typeof T.getChildContext!="function"){{var j=qt(c)||"Unknown";Bu[j]||(Bu[j]=!0,Ke(!1,"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",j,j))}return _}var V;Ze("getChildContext"),Oi(a,"getChildContext"),V=T.getChildContext(),gi(),Ze(null);for(var te in V)if(!(te in R))throw Error((qt(c)||"Unknown")+'.getChildContext(): key "'+te+'" is not defined in childContextTypes.');{var oe=qt(c)||"Unknown";E(R,V,"child context",oe,Rr)}return f({},_,{},V)}function Fi(a){if(ni)return!1;var c=a.stateNode,_=c&&c.__reactInternalMemoizedMergedChildContext||Sn;return ei=C0.current,Vr(C0,_,a),Vr(Au,Au.current,a),!0}function $o(a,c,_){if(!ni){var T=a.stateNode;if(!T)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(_){var R=A0(a,c,ei);T.__reactInternalMemoizedMergedChildContext=R,Kr(Au,a),Kr(C0,a),Vr(C0,R,a),Vr(Au,_,a)}else Kr(Au,a),Vr(Au,_,a)}}function El(a){if(ni)return Sn;if(!(Ms(a)&&a.tag===N))throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var c=a;do{switch(c.tag){case U:return c.stateNode.context;case N:{var _=c.type;if(zi(_))return c.stateNode.__reactInternalMemoizedMergedChildContext;break}}c=c.return}while(c!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}var I0=1,R0=2,co=t.unstable_runWithPriority,Ru=t.unstable_scheduleCallback,Yu=t.unstable_cancelCallback,Xl=t.unstable_shouldYield,hs=t.unstable_requestPaint,ra=t.unstable_now,df=t.unstable_getCurrentPriorityLevel,Ku=t.unstable_ImmediatePriority,vs=t.unstable_UserBlockingPriority,wr=t.unstable_NormalPriority,$0=t.unstable_LowPriority,Xi=t.unstable_IdlePriority;if(Ln&&!(k.__interactionsRef!=null&&k.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling");var ru={},Ci=99,Xr=98,Wn=97,Xu=96,m0=95,y0=90,kn=Xl,se=hs!==void 0?hs:function(){},re=null,Le=null,Ae=!1,ot=ra(),vt=ot<1e4?ra:function(){return ra()-ot};function Xt(){switch(df()){case Ku:return Ci;case vs:return Xr;case wr:return Wn;case $0:return Xu;case Xi:return m0;default:throw Error("Unknown priority level.")}}function xn(a){switch(a){case Ci:return Ku;case Xr:return vs;case Wn:return wr;case Xu:return $0;case m0:return Xi;default:throw Error("Unknown priority level.")}}function _n(a,c){var _=xn(a);return co(_,c)}function yn(a,c,_){var T=xn(a);return Ru(T,c,_)}function En(a){return re===null?(re=[a],Le=Ru(Ku,xi)):re.push(a),ru}function er(a){a!==ru&&Yu(a)}function It(){if(Le!==null){var a=Le;Le=null,Yu(a)}xi()}function xi(){if(!Ae&&re!==null){Ae=!0;var a=0;try{var c=!0,_=re;_n(Ci,function(){for(;a<_.length;a++){var T=_[a];do T=T(c);while(T!==null)}}),re=null}catch(T){throw re!==null&&(re=re.slice(a+1)),Ru(Ku,It),T}finally{Ae=!1}}}var Sr=0,cr=1,Y=2,Qr=4,Jr=8,Ur=1073741823,lt=0,hi=1,Qi=2,g0=3,bn=Ur,Qu=bn-1,eo=10,po=Qu-1;function Ju(a){return po-(a/eo|0)}function bo(a){return(po-a)*eo}function to(a,c){return((a/c|0)+1)*c}function Na(a,c,_){return po-to(po-a+c/eo,_/eo)}var pf=5e3,uc=250;function ms(a){return Na(a,pf,uc)}function ia(a,c){return Na(a,c,uc)}var B0=500,oc=100;function La(a){return Na(a,B0,oc)}function gd(a){return g0++}function $1(a,c){if(c===bn)return Ci;if(c===hi||c===Qi)return m0;var _=bo(c)-bo(a);return _<=0?Ci:_<=B0+oc?Xr:_<=pf+uc?Wn:m0}function e2(a,c){return a===c&&(a!==0||1/a==1/c)||a!==a&&c!==c}var ho=typeof Object.is=="function"?Object.is:e2,Uc=Object.prototype.hasOwnProperty;function Dl(a,c){if(ho(a,c))return!0;if(typeof a!="object"||a===null||typeof c!="object"||c===null)return!1;var _=Object.keys(a),T=Object.keys(c);if(_.length!==T.length)return!1;for(var R=0;R<_.length;R++)if(!Uc.call(c,_[R])||!ho(a[_[R]],c[_[R]]))return!1;return!0}var el=function(){};{var _d=function(a){for(var c=arguments.length,_=new Array(c>1?c-1:0),T=1;T2?_-2:0),R=2;R<_;R++)T[R-2]=arguments[R];_d.apply(void 0,[c].concat(T))}}}var Bs=el,wl={recordUnsafeLifecycleWarnings:function(a,c){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(a,c){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var t2=function(a){for(var c=null,_=a;_!==null;)_.mode&cr&&(c=_),_=_.return;return c},Po=function(a){var c=[];return a.forEach(function(_){c.push(_)}),c.sort().join(", ")},Fa=[],ba=[],Pa=[],ua=[],ys=[],gs=[],Ql=new Set;wl.recordUnsafeLifecycleWarnings=function(a,c){Ql.has(a.type)||(typeof c.componentWillMount=="function"&&c.componentWillMount.__suppressDeprecationWarning!==!0&&Fa.push(a),a.mode&cr&&typeof c.UNSAFE_componentWillMount=="function"&&ba.push(a),typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Pa.push(a),a.mode&cr&&typeof c.UNSAFE_componentWillReceiveProps=="function"&&ua.push(a),typeof c.componentWillUpdate=="function"&&c.componentWillUpdate.__suppressDeprecationWarning!==!0&&ys.push(a),a.mode&cr&&typeof c.UNSAFE_componentWillUpdate=="function"&&gs.push(a))},wl.flushPendingUnsafeLifecycleWarnings=function(){var a=new Set;Fa.length>0&&(Fa.forEach(function(Nt){a.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),Fa=[]);var c=new Set;ba.length>0&&(ba.forEach(function(Nt){c.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),ba=[]);var _=new Set;Pa.length>0&&(Pa.forEach(function(Nt){_.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),Pa=[]);var T=new Set;ua.length>0&&(ua.forEach(function(Nt){T.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),ua=[]);var R=new Set;ys.length>0&&(ys.forEach(function(Nt){R.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),ys=[]);var j=new Set;if(gs.length>0&&(gs.forEach(function(Nt){j.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),gs=[]),c.size>0){var V=Po(c);Ke(!1,`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move code with side effects to componentDidMount, and set initial state in the constructor. - -Please update the following components: %s`,V)}if(T.size>0){var te=Po(T);Ke(!1,`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state - -Please update the following components: %s`,te)}if(j.size>0){var oe=Po(j);Ke(!1,`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. - -Please update the following components: %s`,oe)}if(a.size>0){var Ie=Po(a);Bs(!1,`componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move code with side effects to componentDidMount, and set initial state in the constructor. -* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,Ie)}if(_.size>0){var Ye=Po(_);Bs(!1,`componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state -* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,Ye)}if(R.size>0){var pt=Po(R);Bs(!1,`componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,pt)}};var Io=new Map,hf=new Set;wl.recordLegacyContextWarning=function(a,c){var _=t2(a);if(_===null){Ke(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!hf.has(a.type)){var T=Io.get(_);(a.type.contextTypes!=null||a.type.childContextTypes!=null||c!==null&&typeof c.getChildContext=="function")&&(T===void 0&&(T=[],Io.set(_,T)),T.push(a))}},wl.flushLegacyContextWarning=function(){Io.forEach(function(a,c){var _=new Set;a.forEach(function(j){_.add(qt(j.type)||"Component"),hf.add(j.type)});var T=Po(_),R=_r(c);Ke(!1,`Legacy context API has been detected within a strict-mode tree. - -The old API will be supported in all 16.x releases, but applications using it should migrate to the new version. - -Please update the following components: %s - -Learn more about this warning here: https://fb.me/react-legacy-context%s`,T,R)})},wl.discardPendingWarnings=function(){Fa=[],ba=[],Pa=[],ua=[],ys=[],gs=[],Io=new Map}}var tl=null,ju=null,Ia=function(a){tl=a};function Zu(a){{if(tl===null)return a;var c=tl(a);return c===void 0?a:c.current}}function U0(a){return Zu(a)}function vf(a){{if(tl===null)return a;var c=tl(a);if(c===void 0){if(a!=null&&typeof a.render=="function"){var _=Zu(a.render);if(a.render!==_){var T={$$typeof:An,render:_};return a.displayName!==void 0&&(T.displayName=a.displayName),T}}return a}return c.current}}function jc(a,c){{if(tl===null)return!1;var _=a.elementType,T=c.type,R=!1,j=typeof T=="object"&&T!==null?T.$$typeof:null;switch(a.tag){case N:{typeof T=="function"&&(R=!0);break}case L:{(typeof T=="function"||j===vr)&&(R=!0);break}case ge:{(j===An||j===vr)&&(R=!0);break}case Oe:case le:{(j===Wt||j===vr)&&(R=!0);break}default:return!1}if(R){var V=tl(_);if(V!==void 0&&V===tl(T))return!0}return!1}}function lc(a){{if(tl===null||typeof WeakSet!="function")return;ju===null&&(ju=new WeakSet),ju.add(a)}}var Sl=function(a,c){{if(tl===null)return;var _=c.staleFamilies,T=c.updatedFamilies;Xa(),xp(function(){oa(a.current,T,_)})}},_s=function(a,c){{if(a.context!==Sn)return;Xa(),fv(function(){l_(c,a,null,null)})}};function oa(a,c,_){{var T=a.alternate,R=a.child,j=a.sibling,V=a.tag,te=a.type,oe=null;switch(V){case L:case le:case N:oe=te;break;case ge:oe=te.render;break;default:break}if(tl===null)throw new Error("Expected resolveFamily to be set during hot reload.");var Ie=!1,Ye=!1;if(oe!==null){var pt=tl(oe);pt!==void 0&&(_.has(pt)?Ye=!0:c.has(pt)&&(V===N?Ye=!0:Ie=!0))}ju!==null&&(ju.has(a)||T!==null&&ju.has(T))&&(Ye=!0),Ye&&(a._debugNeedsRemount=!0),(Ye||Ie)&&dl(a,bn),R!==null&&!Ye&&oa(R,c,_),j!==null&&oa(j,c,_)}}var n2=function(a,c){{var _=new Set,T=new Set(c.map(function(R){return R.current}));return la(a.current,T,_),_}};function la(a,c,_){{var T=a.child,R=a.sibling,j=a.tag,V=a.type,te=null;switch(j){case L:case le:case N:te=V;break;case ge:te=V.render;break;default:break}var oe=!1;te!==null&&c.has(te)&&(oe=!0),oe?sc(a,_):T!==null&&la(T,c,_),R!==null&&la(R,c,_)}}function sc(a,c){{var _=zc(a,c);if(_)return;for(var T=a;;){switch(T.tag){case W:c.add(T.stateNode);return;case q:c.add(T.stateNode.containerInfo);return;case U:c.add(T.stateNode.containerInfo);return}if(T.return===null)throw new Error("Expected to reach root first.");T=T.return}}}function zc(a,c){for(var _=a,T=!1;;){if(_.tag===W)T=!0,c.add(_.stateNode);else if(_.child!==null){_.child.return=_,_=_.child;continue}if(_===a)return T;for(;_.sibling===null;){if(_.return===null||_.return===a)return T;_=_.return}_.sibling.return=_.return,_=_.sibling}return!1}function bi(a,c){if(a&&a.defaultProps){var _=f({},c),T=a.defaultProps;for(var R in T)_[R]===void 0&&(_[R]=T[R]);return _}return c}function g(a){if(Yo(a),a._status!==So)throw a._result;return a._result}var y=Gu(null),A;A={};var F=null,I=null,J=null,fe=!1;function mt(){F=null,I=null,J=null,fe=!1}function Ct(){fe=!0}function Mt(){fe=!1}function Er(a,c){var _=a.type._context;Fu?(Vr(y,_._currentValue,a),_._currentValue=c,_._currentRenderer===void 0||_._currentRenderer===null||_._currentRenderer===A||Ke(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),_._currentRenderer=A):(Vr(y,_._currentValue2,a),_._currentValue2=c,_._currentRenderer2===void 0||_._currentRenderer2===null||_._currentRenderer2===A||Ke(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),_._currentRenderer2=A)}function $u(a){var c=y.current;Kr(y,a);var _=a.type._context;Fu?_._currentValue=c:_._currentValue2=c}function iu(a,c,_){if(ho(_,c))return 0;var T=typeof a._calculateChangedBits=="function"?a._calculateChangedBits(_,c):Ur;return(T&Ur)!==T&&Kt(!1,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",T),T|0}function j0(a,c){for(var _=a;_!==null;){var T=_.alternate;if(_.childExpirationTime=c&&up(),_.firstContext=null)}}function He(a,c){if(fe&&Kt(!1,"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),J!==a){if(!(c===!1||c===0)){var _;typeof c!="number"||c===Ur?(J=a,_=Ur):_=c;var T={context:a,observedBits:_,next:null};if(I===null){if(F===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");I=T,F.dependencies={expirationTime:lt,firstContext:T,responders:null}}else I=I.next=T}}return Fu?a._currentValue:a._currentValue2}var Be=0,ut=1,Jt=2,jn=3,ti=!1,tr,ii;tr=!1,ii=null;function qi(a){var c={baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return c}function jr(a){var c={baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return c}function gu(a,c){var _={expirationTime:a,suspenseConfig:c,tag:Be,payload:null,callback:null,next:null,nextEffect:null};return _.priority=Xt(),_}function Ba(a,c){a.lastUpdate===null?a.firstUpdate=a.lastUpdate=c:(a.lastUpdate.next=c,a.lastUpdate=c)}function Ua(a,c){var _=a.alternate,T,R;_===null?(T=a.updateQueue,R=null,T===null&&(T=a.updateQueue=qi(a.memoizedState))):(T=a.updateQueue,R=_.updateQueue,T===null?R===null?(T=a.updateQueue=qi(a.memoizedState),R=_.updateQueue=qi(_.memoizedState)):T=a.updateQueue=jr(R):R===null&&(R=_.updateQueue=jr(T))),R===null||T===R?Ba(T,c):T.lastUpdate===null||R.lastUpdate===null?(Ba(T,c),Ba(R,c)):(Ba(T,c),R.lastUpdate=c),a.tag===N&&(ii===T||R!==null&&ii===R)&&!tr&&(Ke(!1,"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),tr=!0)}function r2(a,c){var _=a.updateQueue;_===null?_=a.updateQueue=qi(a.memoizedState):_=Ed(a,_),_.lastCapturedUpdate===null?_.firstCapturedUpdate=_.lastCapturedUpdate=c:(_.lastCapturedUpdate.next=c,_.lastCapturedUpdate=c)}function Ed(a,c){var _=a.alternate;return _!==null&&c===_.updateQueue&&(c=a.updateQueue=jr(c)),c}function Dd(a,c,_,T,R,j){switch(_.tag){case ut:{var V=_.payload;if(typeof V=="function"){Ct(),Ei&&a.mode&cr&&V.call(j,T,R);var te=V.call(j,T,R);return Mt(),te}return V}case jn:a.effectTag=a.effectTag&~f0|Hr;case Be:{var oe=_.payload,Ie;return typeof oe=="function"?(Ct(),Ei&&a.mode&cr&&oe.call(j,T,R),Ie=oe.call(j,T,R),Mt()):Ie=oe,Ie==null?T:f({},T,Ie)}case Jt:return ti=!0,T}return T}function mf(a,c,_,T,R){ti=!1,c=Ed(a,c),ii=c;for(var j=c.baseState,V=null,te=lt,oe=c.firstUpdate,Ie=j;oe!==null;){var Ye=oe.expirationTime;if(Ye from render. Or maybe you meant to call this function rather than return it."))}function yh(a){function c(it,Ot){if(!!a){var Je=it.lastEffect;Je!==null?(Je.nextEffect=Ot,it.lastEffect=Ot):it.firstEffect=it.lastEffect=Ot,Ot.nextEffect=null,Ot.effectTag=W0}}function _(it,Ot){if(!a)return null;for(var Je=Ot;Je!==null;)c(it,Je),Je=Je.sibling;return null}function T(it,Ot){for(var Je=new Map,Bt=Ot;Bt!==null;)Bt.key!==null?Je.set(Bt.key,Bt):Je.set(Bt.index,Bt),Bt=Bt.sibling;return Je}function R(it,Ot,Je){var Bt=wo(it,Ot,Je);return Bt.index=0,Bt.sibling=null,Bt}function j(it,Ot,Je){if(it.index=Je,!a)return Ot;var Bt=it.alternate;if(Bt!==null){var Mn=Bt.index;return Mnqr?(_u=ar,ar=null):_u=ar.sibling;var _0=Nt(it,ar,Je[qr],Bt);if(_0===null){ar===null&&(ar=_u);break}a&&ar&&_0.alternate===null&&c(it,ar),ou=j(_0,ou,qr),qu===null?oi=_0:qu.sibling=_0,qu=_0,ar=_u}if(qr===Je.length)return _(it,ar),oi;if(ar===null){for(;qrH0?(Cs=_u,_u=null):Cs=_u.sibling;var pl=Nt(it,_u,Hu.value,Bt);if(pl===null){_u===null&&(_u=Cs);break}a&&_u&&pl.alternate===null&&c(it,_u),_0=j(pl,_0,H0),qr===null?ou=pl:qr.sibling=pl,qr=pl,_u=Cs}if(Hu.done)return _(it,_u),ou;if(_u===null){for(;!Hu.done;H0++,Hu=ar.next()){var Ja=pt(it,Hu.value,Bt);Ja!==null&&(_0=j(Ja,_0,H0),qr===null?ou=Ja:qr.sibling=Ja,qr=Ja)}return ou}for(var jo=T(it,_u);!Hu.done;H0++,Hu=ar.next()){var xs=Vt(jo,it,H0,Hu.value,Bt);xs!==null&&(a&&xs.alternate!==null&&jo.delete(xs.key===null?H0:xs.key),_0=j(xs,_0,H0),qr===null?ou=xs:qr.sibling=xs,qr=xs)}return a&&jo.forEach(function(X2){return c(it,X2)}),ou}function $r(it,Ot,Je,Bt){if(Ot!==null&&Ot.tag===ne){_(it,Ot.sibling);var Mn=R(Ot,Je,Bt);return Mn.return=it,Mn}_(it,Ot);var pn=Cy(Je,it.mode,Bt);return pn.return=it,pn}function wi(it,Ot,Je,Bt){for(var Mn=Je.key,pn=Ot;pn!==null;){if(pn.key===Mn)if(pn.tag===m?Je.type===ue:pn.elementType===Je.type||jc(pn,Je)){_(it,pn.sibling);var Pi=R(pn,Je.type===ue?Je.props.children:Je.props,Bt);return Pi.ref=fc(it,pn,Je),Pi.return=it,Pi._debugSource=Je._source,Pi._debugOwner=Je._owner,Pi}else{_(it,pn);break}else c(it,pn);pn=pn.sibling}if(Je.type===ue){var oi=Qa(Je.props.children,it.mode,Bt,Je.key);return oi.return=it,oi}else{var qu=Ty(Je,it.mode,Bt);return qu.ref=fc(it,Ot,Je),qu.return=it,qu}}function N0(it,Ot,Je,Bt){for(var Mn=Je.key,pn=Ot;pn!==null;){if(pn.key===Mn)if(pn.tag===q&&pn.stateNode.containerInfo===Je.containerInfo&&pn.stateNode.implementation===Je.implementation){_(it,pn.sibling);var Pi=R(pn,Je.children||[],Bt);return Pi.return=it,Pi}else{_(it,pn);break}else c(it,pn);pn=pn.sibling}var oi=xy(Je,it.mode,Bt);return oi.return=it,oi}function Vi(it,Ot,Je,Bt){var Mn=typeof Je=="object"&&Je!==null&&Je.type===ue&&Je.key===null;Mn&&(Je=Je.props.children);var pn=typeof Je=="object"&&Je!==null;if(pn)switch(Je.$$typeof){case ae:return V(wi(it,Ot,Je,Bt));case Ce:return V(N0(it,Ot,Je,Bt))}if(typeof Je=="string"||typeof Je=="number")return V($r(it,Ot,""+Je,Bt));if(Kc(Je))return vn(it,Ot,Je,Bt);if(ur(Je))return xr(it,Ot,Je,Bt);if(pn&&cc(it,Je),typeof Je=="function"&&f2(),typeof Je=="undefined"&&!Mn)switch(it.tag){case N:{var Pi=it.stateNode;if(Pi.render._isMockFunction)break}case L:{var oi=it.type;throw Error((oi.displayName||oi.name||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}}return _(it,Ot)}return Vi}var gf=yh(!0),Xc=yh(!1);function gh(a,c){if(!(a===null||c.child===a.child))throw Error("Resuming work not yet implemented.");if(c.child!==null){var _=c.child,T=wo(_,_.pendingProps,_.expirationTime);for(c.child=T,T.return=c;_.sibling!==null;)_=_.sibling,T=T.sibling=wo(_,_.pendingProps,_.expirationTime),T.return=c;T.sibling=null}}function vm(a,c){for(var _=a.child;_!==null;)Rv(_,c),_=_.sibling}var js={},fa=Gu(js),Ji=Gu(js),O0=Gu(js);function t0(a){if(a===js)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return a}function Jl(){var a=t0(O0.current);return a}function za(a,c){Vr(O0,c,a),Vr(Ji,a,a),Vr(fa,js,a);var _=Et(c);Kr(fa,a),Vr(fa,_,a)}function no(a){Kr(fa,a),Kr(Ji,a),Kr(O0,a)}function ul(){var a=t0(fa.current);return a}function dc(a){var c=t0(O0.current),_=t0(fa.current),T=Pt(_,a.type,c);_!==T&&(Vr(Ji,a,a),Vr(fa,T,a))}function Od(a){Ji.current===a&&(Kr(fa,a),Kr(Ji,a))}var _h=0,_f=1,Ef=1,Qc=2,xl=Gu(_h);function Jc(a,c){return(a&c)!=0}function ca(a){return a&_f}function c2(a,c){return a&_f|c}function d2(a,c){return a|c}function Or(a,c){Vr(xl,c,a)}function da(a){Kr(xl,a)}function kd(a,c){var _=a.memoizedState;if(_!==null)return _.dehydrated!==null;var T=a.memoizedProps;return T.fallback===void 0?!1:T.unstable_avoidThisFallback!==!0?!0:!c}function Zc(a){for(var c=a;c!==null;){if(c.tag===pe){var _=c.memoizedState;if(_!==null){var T=_.dehydrated;if(T===null||Ls(T)||h0(T))return c}}else if(c.tag===wt&&c.memoizedProps.revealOrder!==void 0){var R=(c.effectTag&Hr)!==_i;if(R)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)return null;for(;c.sibling===null;){if(c.return===null||c.return===a)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var p2={},vi=Array.isArray;function Md(a,c,_,T){return{fiber:T,props:c,responder:a,rootEventTypes:null,state:_}}function mm(a,c,_,T,R){var j=p2,V=a.getInitialState;V!==null&&(j=V(c));var te=Md(a,c,j,_);if(!R)for(var oe=_;oe!==null;){var Ie=oe.tag;if(Ie===W){R=oe.stateNode;break}else if(Ie===U){R=oe.stateNode.containerInfo;break}oe=oe.return}Ne(a,te,c,j,R),T.set(a,te)}function h2(a,c,_,T,R){var j,V;if(a&&(j=a.responder,V=a.props),!(j&&j.$$typeof===Ut))throw Error("An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder().");var te=V;if(_.has(j)){Kt(!1,'Duplicate event responder "%s" found in event listeners. Event listeners passed to elements cannot use the same event responder more than once.',j.displayName);return}_.add(j);var oe=T.get(j);oe===void 0?mm(j,te,c,T,R):(oe.props=te,oe.fiber=c)}function dn(a,c,_){var T=new Set,R=c.dependencies;if(a!=null){R===null&&(R=c.dependencies={expirationTime:lt,firstContext:null,responders:new Map});var j=R.responders;if(j===null&&(j=new Map),vi(a))for(var V=0,te=a.length;V0){var j=R.dispatch;if(Es!==null){var V=Es.get(R);if(V!==void 0){Es.delete(R);var te=T.memoizedState,oe=V;do{var Ie=oe.action;te=a(te,Ie),oe=oe.next}while(oe!==null);return ho(te,T.memoizedState)||up(),T.memoizedState=te,T.baseUpdate===R.last&&(T.baseState=te),R.lastRenderedState=te,[te,j]}}return[T.memoizedState,j]}var Ye=R.last,pt=T.baseUpdate,Nt=T.baseState,Vt;if(pt!==null?(Ye!==null&&(Ye.next=null),Vt=pt.next):Vt=Ye!==null?Ye.next:null,Vt!==null){var zt=Nt,vn=null,xr=null,$r=pt,wi=Vt,N0=!1;do{var Vi=wi.expirationTime;if(ViOu&&(Ou=Vi,G2(Ou));else if(vv(Vi,wi.suspenseConfig),wi.eagerReducer===a)zt=wi.eagerState;else{var it=wi.action;zt=a(zt,it)}$r=wi,wi=wi.next}while(wi!==null&&wi!==Vt);N0||(xr=$r,vn=zt),ho(zt,T.memoizedState)||up(),T.memoizedState=zt,T.baseUpdate=xr,T.baseState=vn,R.lastRenderedState=zt}var Ot=R.dispatch;return[T.memoizedState,Ot]}function Rf(a){var c=mc();typeof a=="function"&&(a=a()),c.memoizedState=c.baseState=a;var _=c.queue={last:null,dispatch:null,lastRenderedReducer:Nd,lastRenderedState:a},T=_.dispatch=u1.bind(null,ll,_);return[c.memoizedState,T]}function n1(a){return t1(Nd,a)}function Wa(a,c,_,T){var R={tag:a,create:c,destroy:_,deps:T,next:null};if(Zl===null)Zl=Ha(),Zl.lastEffect=R.next=R;else{var j=Zl.lastEffect;if(j===null)Zl.lastEffect=R.next=R;else{var V=j.next;j.next=R,R.next=V,Zl.lastEffect=R}}return R}function r1(a){var c=mc(),_={current:a};return Object.seal(_),c.memoizedState=_,_}function Ld(a){var c=e1();return c.memoizedState}function g2(a,c,_,T){var R=mc(),j=T===void 0?null:T;Tf|=a,R.memoizedState=Wa(c,_,void 0,j)}function yc(a,c,_,T){var R=e1(),j=T===void 0?null:T,V=void 0;if(Pn!==null){var te=Pn.memoizedState;if(V=te.destroy,j!==null){var oe=te.deps;if(xf(j,oe)){Wa(wf,_,V,j);return}}}Tf|=a,R.memoizedState=Wa(c,_,V,j)}function i1(a,c){return typeof jest!="undefined"&&Av(ll),g2(mr|L0,rr|$c,a,c)}function Rl(a,c){return typeof jest!="undefined"&&Av(ll),yc(mr|L0,rr|$c,a,c)}function pa(a,c){return g2(mr,Sf|ol,a,c)}function wh(a,c){return yc(mr,Sf|ol,a,c)}function Fd(a,c){if(typeof c=="function"){var _=c,T=a();return _(T),function(){_(null)}}else if(c!=null){var R=c;R.hasOwnProperty("current")||Kt(!1,"Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(R).join(", ")+"}");var j=a();return R.current=j,function(){R.current=null}}}function bd(a,c,_){typeof c!="function"&&Kt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",c!==null?typeof c:"null");var T=_!=null?_.concat([a]):null;return g2(mr,Sf|ol,Fd.bind(null,c,a),T)}function Sh(a,c,_){typeof c!="function"&&Kt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",c!==null?typeof c:"null");var T=_!=null?_.concat([a]):null;return yc(mr,Sf|ol,Fd.bind(null,c,a),T)}function _2(a,c){}var Th=_2;function Ol(a,c){var _=mc(),T=c===void 0?null:c;return _.memoizedState=[a,T],a}function es(a,c){var _=e1(),T=c===void 0?null:c,R=_.memoizedState;if(R!==null&&T!==null){var j=R[1];if(xf(T,j))return R[0]}return _.memoizedState=[a,T],a}function Ds(a,c){var _=mc(),T=c===void 0?null:c,R=a();return _.memoizedState=[R,T],R}function zs(a,c){var _=e1(),T=c===void 0?null:c,R=_.memoizedState;if(R!==null&&T!==null){var j=R[1];if(xf(T,j))return R[0]}var V=a();return _.memoizedState=[V,T],V}function Pd(a,c){var _=Rf(a),T=_[0],R=_[1];return i1(function(){t.unstable_next(function(){var j=Bo.suspense;Bo.suspense=c===void 0?null:c;try{R(a)}finally{Bo.suspense=j}})},[a,c]),T}function Ch(a,c){var _=n1(a),T=_[0],R=_[1];return Rl(function(){t.unstable_next(function(){var j=Bo.suspense;Bo.suspense=c===void 0?null:c;try{R(a)}finally{Bo.suspense=j}})},[a,c]),T}function Id(a){var c=Rf(!1),_=c[0],T=c[1],R=Ol(function(j){T(!0),t.unstable_next(function(){var V=Bo.suspense;Bo.suspense=a===void 0?null:a;try{T(!1),j()}finally{Bo.suspense=V}})},[a,_]);return[R,_]}function Bd(a){var c=n1(!1),_=c[0],T=c[1],R=es(function(j){T(!0),t.unstable_next(function(){var V=Bo.suspense;Bo.suspense=a===void 0?null:a;try{T(!1),j()}finally{Bo.suspense=V}})},[a,_]);return[R,_]}function u1(a,c,_){if(!(vc=0){var _=l1()-s1;a.actualDuration+=_,c&&(a.selfBaseDuration=_),s1=-1}}var Ml=null,Ga=null,ha=!1;function qd(){ha&&Kt(!1,"We should not be hydrating here. This is a bug in React. Please file a bug.")}function Hd(a){if(!_e)return!1;var c=a.stateNode.containerInfo;return Ga=B(c),Ml=a,ha=!0,!0}function Em(a,c){return _e?(Ga=Ni(c),Gd(a),ha=!0,!0):!1}function Wd(a,c){switch(a.tag){case U:ie(a.stateNode.containerInfo,c);break;case W:qe(a.type,a.memoizedProps,a.stateNode,c);break}var _=eE();_.stateNode=c,_.return=a,_.effectTag=W0,a.lastEffect!==null?(a.lastEffect.nextEffect=_,a.lastEffect=_):a.firstEffect=a.lastEffect=_}function Mh(a,c){switch(c.effectTag=c.effectTag&~tu|ai,a.tag){case U:{var _=a.stateNode.containerInfo;switch(c.tag){case W:var T=c.type,R=c.pendingProps;tt(_,T,R);break;case ne:var j=c.pendingProps;Tt(_,j);break;case pe:kt(_);break}break}case W:{var V=a.type,te=a.memoizedProps,oe=a.stateNode;switch(c.tag){case W:var Ie=c.type,Ye=c.pendingProps;bt(V,te,oe,Ie,Ye);break;case ne:var pt=c.pendingProps;on(V,te,oe,pt);break;case pe:tn(V,te,oe);break}break}default:return}}function Nh(a,c){switch(a.tag){case W:{var _=a.type,T=a.pendingProps,R=lf(c,_,T);return R!==null?(a.stateNode=R,!0):!1}case ne:{var j=a.pendingProps,V=Ns(c,j);return V!==null?(a.stateNode=V,!0):!1}case pe:{if(Di){var te=Ma(c);if(te!==null){var oe={dehydrated:te,retryTime:hi};a.memoizedState=oe;var Ie=tE(te);return Ie.return=a,a.child=Ie,!0}}return!1}default:return!1}}function Vd(a){if(!!ha){var c=Ga;if(!c){Mh(Ml,a),ha=!1,Ml=a;return}var _=c;if(!Nh(a,c)){if(c=Ni(_),!c||!Nh(a,c)){Mh(Ml,a),ha=!1,Ml=a;return}Wd(Ml,_)}Ml=a,Ga=B(c)}}function Dm(a,c,_){if(!_e)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var T=a.stateNode,R=z(T,a.type,a.memoizedProps,c,_,a);return a.updateQueue=R,R!==null}function wm(a){if(!_e)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=a.stateNode,_=a.memoizedProps,T=G(c,_,a);if(T){var R=Ml;if(R!==null)switch(R.tag){case U:{var j=R.stateNode.containerInfo;Xe(j,c,_);break}case W:{var V=R.type,te=R.memoizedProps,oe=R.stateNode;ht(V,te,oe,c,_);break}}}return T}function Lh(a){if(!_e)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=a.memoizedState,_=c!==null?c.dehydrated:null;if(!_)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");$(_,a)}function Sm(a){if(!_e)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=a.memoizedState,_=c!==null?c.dehydrated:null;if(!_)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return De(_)}function Gd(a){for(var c=a.return;c!==null&&c.tag!==W&&c.tag!==U&&c.tag!==pe;)c=c.return;Ml=c}function f1(a){if(!_e||a!==Ml)return!1;if(!ha)return Gd(a),ha=!0,!1;var c=a.type;if(a.tag!==W||c!=="head"&&c!=="body"&&!Ti(c,a.memoizedProps))for(var _=Ga;_;)Wd(a,_),_=Ni(_);return Gd(a),a.tag===pe?Ga=Sm(a):Ga=Ml?Ni(a.stateNode):null,!0}function c1(){!_e||(Ml=null,Ga=null,ha=!1)}var d1=at.ReactCurrentOwner,va=!1,Yd,qs,Hs,Ws,Kd,ma,p1,E2,gc,Xd;Yd={},qs={},Hs={},Ws={},Kd={},ma=!1,p1=!1,E2={},gc={},Xd={};function _o(a,c,_,T){a===null?c.child=Xc(c,null,_,T):c.child=gf(c,a.child,_,T)}function Fh(a,c,_,T){c.child=gf(c,a.child,null,T),c.child=gf(c,null,_,T)}function bh(a,c,_,T,R){if(c.type!==c.elementType){var j=_.propTypes;j&&E(j,T,"prop",qt(_),Rr)}var V=_.render,te=c.ref,oe;return e0(c,R),d1.current=c,Ze("render"),oe=Af(a,c,V,T,te,R),Ei&&c.mode&cr&&c.memoizedState!==null&&(oe=Af(a,c,V,T,te,R)),Ze(null),a!==null&&!va?(v2(a,c,R),ya(a,c,R)):(c.effectTag|=eu,_o(a,c,oe,R),c.child)}function Ph(a,c,_,T,R,j){if(a===null){var V=_.type;if(i0(V)&&_.compare===null&&_.defaultProps===void 0){var te=V;return te=Zu(V),c.tag=le,c.type=te,Zd(c,V),Ih(a,c,te,T,R,j)}{var oe=V.propTypes;oe&&E(oe,T,"prop",qt(V),Rr)}var Ie=Sy(_.type,null,T,null,c.mode,j);return Ie.ref=c.ref,Ie.return=c,c.child=Ie,Ie}{var Ye=_.type,pt=Ye.propTypes;pt&&E(pt,T,"prop",qt(Ye),Rr)}var Nt=a.child;if(R component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",oe,oe),Yd[oe]=!0)}c.mode&cr&&wl.recordLegacyContextWarning(c,null),d1.current=c,te=Af(null,c,_,R,j,T)}if(c.effectTag|=eu,typeof te=="object"&&te!==null&&typeof te.render=="function"&&te.$$typeof===void 0){{var Ie=qt(_)||"Unknown";qs[Ie]||(Ke(!1,"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",Ie,Ie,Ie),qs[Ie]=!0)}c.tag=N,m2();var Ye=!1;zi(_)?(Ye=!0,Fi(c)):Ye=!1,c.memoizedState=te.state!==null&&te.state!==void 0?te.state:null;var pt=_.getDerivedStateFromProps;return typeof pt=="function"&&yf(c,_,pt,R),il(c,te),ac(c,_,R,T),Jd(null,c,_,!0,Ye,T)}else return c.tag=L,ni&&_.contextTypes&&Ke(!1,"%s uses the legacy contextTypes API which is no longer supported. Use React.createContext() with React.useContext() instead.",qt(_)||"Unknown"),Ei&&c.mode&cr&&c.memoizedState!==null&&(te=Af(null,c,_,R,j,T)),_o(null,c,te,T),Zd(c,_),c.child}function Zd(a,c){if(c&&c.childContextTypes&&Ke(!1,"%s(...): childContextTypes cannot be defined on a function component.",c.displayName||c.name||"Component"),a.ref!==null){var _="",T=v0();T&&(_+=` - -Check the render method of \``+T+"`.");var R=T||a._debugID||"",j=a._debugSource;j&&(R=j.fileName+":"+j.lineNumber),Kd[R]||(Kd[R]=!0,Kt(!1,"Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",_))}if(Wl&&c.defaultProps!==void 0){var V=qt(c)||"Unknown";Xd[V]||(Ke(!1,"%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",V),Xd[V]=!0)}if(typeof c.getDerivedStateFromProps=="function"){var te=qt(c)||"Unknown";Ws[te]||(Ke(!1,"%s: Function components do not support getDerivedStateFromProps.",te),Ws[te]=!0)}if(typeof c.contextType=="object"&&c.contextType!==null){var oe=qt(c)||"Unknown";Hs[oe]||(Ke(!1,"%s: Function components do not support contextType.",oe),Hs[oe]=!0)}}var w2={dehydrated:null,retryTime:lt};function $d(a,c,_){return Jc(a,Qc)&&(c===null||c.memoizedState!==null)}function qh(a,c,_){var T=c.mode,R=c.pendingProps;a_(c)&&(c.effectTag|=Hr);var j=xl.current,V=!1,te=(c.effectTag&Hr)!==_i;if(te||$d(j,a,c)?(V=!0,c.effectTag&=~Hr):(a===null||a.memoizedState!==null)&&R.fallback!==void 0&&R.unstable_avoidThisFallback!==!0&&(j=d2(j,Ef)),j=ca(j),Or(c,j),"maxDuration"in R&&(p1||(p1=!0,Kt(!1,"maxDuration has been removed from React. Remove the maxDuration prop."))),a===null){if(R.fallback!==void 0&&(Vd(c),Di)){var oe=c.memoizedState;if(oe!==null){var Ie=oe.dehydrated;if(Ie!==null)return Hh(c,Ie,_)}}if(V){var Ye=R.fallback,pt=Qa(null,T,lt,null);if(pt.return=c,(c.mode&Y)===Sr){var Nt=c.memoizedState,Vt=Nt!==null?c.child.child:c.child;pt.child=Vt;for(var zt=Vt;zt!==null;)zt.return=pt,zt=zt.sibling}var vn=Qa(Ye,T,_,null);return vn.return=c,pt.sibling=vn,c.memoizedState=w2,c.child=pt,vn}else{var xr=R.children;return c.memoizedState=null,c.child=Xc(c,null,xr,_)}}else{var $r=a.memoizedState;if($r!==null){if(Di){var wi=$r.dehydrated;if(wi!==null)if(te){if(c.memoizedState!==null)return c.child=a.child,c.effectTag|=Hr,null;var N0=R.fallback,Vi=Qa(null,T,lt,null);if(Vi.return=c,Vi.child=null,(c.mode&Y)===Sr)for(var it=Vi.child=c.child;it!==null;)it.return=Vi,it=it.sibling;else gf(c,a.child,null,_);if(Zt&&c.mode&Jr){for(var Ot=0,Je=Vi.child;Je!==null;)Ot+=Je.treeBaseDuration,Je=Je.sibling;Vi.treeBaseDuration=Ot}var Bt=Qa(N0,T,_,null);return Bt.return=c,Vi.sibling=Bt,Bt.effectTag|=ai,Vi.childExpirationTime=lt,c.memoizedState=w2,c.child=Vi,Bt}else return Wh(a,c,wi,$r,_)}var Mn=a.child,pn=Mn.sibling;if(V){var Pi=R.fallback,oi=wo(Mn,Mn.pendingProps,lt);if(oi.return=c,(c.mode&Y)===Sr){var qu=c.memoizedState,ar=qu!==null?c.child.child:c.child;if(ar!==Mn.child){oi.child=ar;for(var ou=ar;ou!==null;)ou.return=oi,ou=ou.sibling}}if(Zt&&c.mode&Jr){for(var qr=0,_u=oi.child;_u!==null;)qr+=_u.treeBaseDuration,_u=_u.sibling;oi.treeBaseDuration=qr}var _0=wo(pn,Pi,pn.expirationTime);return _0.return=c,oi.sibling=_0,oi.childExpirationTime=lt,c.memoizedState=w2,c.child=oi,_0}else{var H0=R.children,Cs=Mn.child,Hu=gf(c,Cs,H0,_);return c.memoizedState=null,c.child=Hu}}else{var pl=a.child;if(V){var Ja=R.fallback,jo=Qa(null,T,lt,null);if(jo.return=c,jo.child=pl,pl!==null&&(pl.return=jo),(c.mode&Y)===Sr){var xs=c.memoizedState,X2=xs!==null?c.child.child:c.child;jo.child=X2;for(var Uf=X2;Uf!==null;)Uf.return=jo,Uf=Uf.sibling}if(Zt&&c.mode&Jr){for(var Rc=0,Pl=jo.child;Pl!==null;)Rc+=Pl.treeBaseDuration,Pl=Pl.sibling;jo.treeBaseDuration=Rc}var zo=Qa(Ja,T,_,null);return zo.return=c,jo.sibling=zo,zo.effectTag|=ai,jo.childExpirationTime=lt,c.memoizedState=w2,c.child=jo,zo}else{c.memoizedState=null;var O1=R.children;return c.child=gf(c,pl,O1,_)}}}}function ep(a,c,_){c.memoizedState=null;var T=c.pendingProps,R=T.children;return _o(a,c,R,_),c.child}function Hh(a,c,_){if((a.mode&Y)===Sr)Kt(!1,"Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOM.createBlockingRoot(container, { hydrate: true }).render(element) or remove the Suspense components from the server rendered components."),a.expirationTime=bn;else if(h0(c)){var T=Fl(),R=ms(T);Ln&&x(R),a.expirationTime=R}else a.expirationTime=hi,Ln&&x(hi);return null}function Wh(a,c,_,T,R){if(qd(),(c.mode&Y)===Sr||h0(_))return ep(a,c,R);var j=a.childExpirationTime>=R;if(va||j){if(R. Use lowercase "%s" instead.',a,a.toLowerCase());break}case"forward":case"backward":{Kt(!1,'"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.',a,a.toLowerCase());break}default:Kt(!1,'"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?',a);break}else Kt(!1,'%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?',a)}function Vh(a,c){a!==void 0&&!gc[a]&&(a!=="collapsed"&&a!=="hidden"?(gc[a]=!0,Kt(!1,'"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?',a)):c!=="forwards"&&c!=="backwards"&&(gc[a]=!0,Kt(!1,' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',a)))}function v1(a,c){{var _=Array.isArray(a),T=!_&&typeof ur(a)=="function";if(_||T){var R=_?"array":"iterable";return Kt(!1,"A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ",R,c,R),!1}}return!0}function Mm(a,c){if((c==="forwards"||c==="backwards")&&a!==void 0&&a!==null&&a!==!1)if(Array.isArray(a)){for(var _=0;_. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',c)}}function np(a,c,_,T,R,j){var V=a.memoizedState;V===null?a.memoizedState={isBackwards:c,rendering:null,last:T,tail:_,tailExpiration:0,tailMode:R,lastEffect:j}:(V.isBackwards=c,V.rendering=null,V.last=T,V.tail=_,V.tailExpiration=0,V.tailMode=R,V.lastEffect=j)}function rp(a,c,_){var T=c.pendingProps,R=T.revealOrder,j=T.tail,V=T.children;km(R),Vh(j,R),Mm(V,R),_o(a,c,V,_);var te=xl.current,oe=Jc(te,Qc);if(oe)te=c2(te,Qc),c.effectTag|=Hr;else{var Ie=a!==null&&(a.effectTag&Hr)!==_i;Ie&&Rm(c,c.child,_),te=ca(te)}if(Or(c,te),(c.mode&Y)===Sr)c.memoizedState=null;else switch(R){case"forwards":{var Ye=Om(c.child),pt;Ye===null?(pt=c.child,c.child=null):(pt=Ye.sibling,Ye.sibling=null),np(c,!1,pt,Ye,j,c.lastEffect);break}case"backwards":{var Nt=null,Vt=c.child;for(c.child=null;Vt!==null;){var zt=Vt.alternate;if(zt!==null&&Zc(zt)===null){c.child=Vt;break}var vn=Vt.sibling;Vt.sibling=Nt,Nt=Vt,Vt=vn}np(c,!0,Nt,null,j,c.lastEffect);break}case"together":{np(c,!1,null,null,void 0,c.lastEffect);break}default:c.memoizedState=null}return c.child}function Nm(a,c,_){za(c,c.stateNode.containerInfo);var T=c.pendingProps;return a===null?c.child=gf(c,null,T,_):_o(a,c,T,_),c.child}function Lm(a,c,_){var T=c.type,R=T._context,j=c.pendingProps,V=c.memoizedProps,te=j.value;{var oe=c.type.propTypes;oe&&E(oe,j,"prop","Context.Provider",Rr)}if(Er(c,te),V!==null){var Ie=V.value,Ye=iu(R,te,Ie);if(Ye===0){if(V.children===j.children&&!na())return ya(a,c,_)}else Tl(c,R,Ye,_)}var pt=j.children;return _o(a,c,pt,_),c.child}var Gh=!1;function Fm(a,c,_){var T=c.type;T._context===void 0?T!==T.Consumer&&(Gh||(Gh=!0,Kt(!1,"Rendering directly is not supported and will be removed in a future major release. Did you mean to render instead?"))):T=T._context;var R=c.pendingProps,j=R.children;typeof j!="function"&&Ke(!1,"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),e0(c,_);var V=He(T,R.unstable_observedBits),te;return d1.current=c,Ze("render"),te=j(V),Ze(null),c.effectTag|=eu,_o(a,c,te,_),c.child}function bm(a,c,_){var T=c.type.impl;if(T.reconcileChildren===!1)return null;var R=c.pendingProps,j=R.children;return _o(a,c,j,_),c.child}function ip(a,c,_){var T=c.pendingProps,R=T.children;return _o(a,c,R,_),c.child}function up(){va=!0}function ya(a,c,_){Ki(c),a!==null&&(c.dependencies=a.dependencies),Zt&&kh(c);var T=c.expirationTime;T!==lt&&G2(T);var R=c.childExpirationTime;return R<_?null:(gh(a,c),c.child)}function m1(a,c,_){{var T=c.return;if(T===null)throw new Error("Cannot swap the root fiber.");if(a.alternate=null,c.alternate=null,_.index=c.index,_.sibling=c.sibling,_.return=c.return,_.ref=c.ref,c===T.child)T.child=_;else{var R=T.child;if(R===null)throw new Error("Expected parent to have a child.");for(;R.sibling!==c;)if(R=R.sibling,R===null)throw new Error("Expected to find the previous sibling.");R.sibling=_}var j=T.lastEffect;return j!==null?(j.nextEffect=a,T.lastEffect=a):T.firstEffect=T.lastEffect=a,a.nextEffect=null,a.effectTag=W0,_.effectTag|=ai,_}}function op(a,c,_){var T=c.expirationTime;if(c._debugNeedsRemount&&a!==null)return m1(a,c,Sy(c.type,c.key,c.pendingProps,c._debugOwner||null,c.mode,c.expirationTime));if(a!==null){var R=a.memoizedProps,j=c.pendingProps;if(R!==j||na()||c.type!==a.type)va=!0;else if(T<_){switch(va=!1,c.tag){case U:zh(c),c1();break;case W:if(dc(c),c.mode&Qr&&_!==hi&&d0(c.type,j))return Ln&&x(hi),c.expirationTime=c.childExpirationTime=hi,null;break;case N:{var V=c.type;zi(V)&&Fi(c);break}case q:za(c,c.stateNode.containerInfo);break;case he:{var te=c.memoizedProps.value;Er(c,te);break}case ze:if(Zt){var oe=c.childExpirationTime>=_;oe&&(c.effectTag|=mr)}break;case pe:{var Ie=c.memoizedState;if(Ie!==null){if(Di&&Ie.dehydrated!==null){Or(c,ca(xl.current)),c.effectTag|=Hr;break}var Ye=c.child,pt=Ye.childExpirationTime;if(pt!==lt&&pt>=_)return qh(a,c,_);Or(c,ca(xl.current));var Nt=ya(a,c,_);return Nt!==null?Nt.sibling:null}else Or(c,ca(xl.current));break}case wt:{var Vt=(a.effectTag&Hr)!==_i,zt=c.childExpirationTime>=_;if(Vt){if(zt)return rp(a,c,_);c.effectTag|=Hr}var vn=c.memoizedState;if(vn!==null&&(vn.rendering=null,vn.tail=null),Or(c,xl.current),zt)break;return null}}return ya(a,c,_)}else va=!1}else va=!1;switch(c.expirationTime=lt,c.tag){case C:return Am(a,c,c.type,_);case Ue:{var xr=c.elementType;return kf(a,c,xr,T,_)}case L:{var $r=c.type,wi=c.pendingProps,N0=c.elementType===$r?wi:bi($r,wi);return Qd(a,c,$r,N0,_)}case N:{var Vi=c.type,it=c.pendingProps,Ot=c.elementType===Vi?it:bi(Vi,it);return jh(a,c,Vi,Ot,_)}case U:return Cm(a,c,_);case W:return xm(a,c,_);case ne:return Of(a,c);case pe:return qh(a,c,_);case q:return Nm(a,c,_);case ge:{var Je=c.type,Bt=c.pendingProps,Mn=c.elementType===Je?Bt:bi(Je,Bt);return bh(a,c,Je,Mn,_)}case m:return Tm(a,c,_);case we:return Bh(a,c,_);case ze:return Uh(a,c,_);case he:return Lm(a,c,_);case Se:return Fm(a,c,_);case Oe:{var pn=c.type,Pi=c.pendingProps,oi=bi(pn,Pi);if(c.type!==c.elementType){var qu=pn.propTypes;qu&&E(qu,oi,"prop",qt(pn),Rr)}return oi=bi(pn.type,oi),Ph(a,c,pn,oi,T,_)}case le:return Ih(a,c,c.type,c.pendingProps,T,_);case Ge:{var ar=c.type,ou=c.pendingProps,qr=c.elementType===ar?ou:bi(ar,ou);return D2(a,c,ar,qr,_)}case wt:return rp(a,c,_);case xt:{if(Ht)return bm(a,c,_);break}case $e:{if(Du)return ip(a,c,_);break}}throw Error("Unknown unit of work tag ("+c.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Yh(a,c,_,T){return{currentFiber:a,impl:_,instance:null,prevProps:null,props:c,state:T}}function S2(a){return a.tag===pe&&a.memoizedState!==null}function y1(a){return a.child.sibling.child}var Kh={};function lp(a,c,_){if(Du){if(a.tag===W){var T=a.type,R=a.memoizedProps,j=a.stateNode,V=Ro(j);V!==null&&c(T,R||Kh,V)===!0&&_.push(V)}var te=a.child;S2(a)&&(te=y1(a)),te!==null&&sp(te,c,_)}}function Xh(a,c){if(Du){if(a.tag===W){var _=a.type,T=a.memoizedProps,R=a.stateNode,j=Ro(R);if(j!==null&&c(_,T,j)===!0)return j}var V=a.child;if(S2(a)&&(V=y1(a)),V!==null)return Qh(V,c)}return null}function sp(a,c,_){for(var T=a;T!==null;)lp(T,c,_),T=T.sibling}function Qh(a,c){for(var _=a;_!==null;){var T=Xh(_,c);if(T!==null)return T;_=_.sibling}return null}function Jh(a,c,_){if(T2(a,c))_.push(a.stateNode.methods);else{var T=a.child;S2(a)&&(T=y1(a)),T!==null&&ap(T,c,_)}}function ap(a,c,_){for(var T=a;T!==null;)Jh(T,c,_),T=T.sibling}function T2(a,c){return a.tag===$e&&a.type===c&&a.stateNode!==null}function C2(a,c){return{getChildren:function(){var _=c.fiber,T=_.child,R=[];return T!==null&&ap(T,a,R),R.length===0?null:R},getChildrenFromRoot:function(){for(var _=c.fiber,T=_;T!==null;){var R=T.return;if(R===null||(T=R,T.tag===$e&&T.type===a))break}var j=[];return ap(T.child,a,j),j.length===0?null:j},getParent:function(){for(var _=c.fiber.return;_!==null;){if(_.tag===$e&&_.type===a)return _.stateNode.methods;_=_.return}return null},getProps:function(){var _=c.fiber;return _.memoizedProps},queryAllNodes:function(_){var T=c.fiber,R=T.child,j=[];return R!==null&&sp(R,_,j),j.length===0?null:j},queryFirstNode:function(_){var T=c.fiber,R=T.child;return R!==null?Qh(R,_):null},containsNode:function(_){for(var T=or(_);T!==null;){if(T.tag===$e&&T.type===a&&T.stateNode===c)return!0;T=T.return}return!1}}}function z0(a){a.effectTag|=mr}function x2(a){a.effectTag|=To}var ga,Ya,A2,R2;if(P0)ga=function(a,c,_,T){for(var R=c.child;R!==null;){if(R.tag===W||R.tag===ne)Wr(a,R.stateNode);else if(Ht&&R.tag===xt)Wr(a,R.stateNode.instance);else if(R.tag!==q){if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R===c)return;for(;R.sibling===null;){if(R.return===null||R.return===c)return;R=R.return}R.sibling.return=R.return,R=R.sibling}},Ya=function(a){},A2=function(a,c,_,T,R){var j=a.memoizedProps;if(j!==T){var V=c.stateNode,te=ul(),oe=c0(V,_,j,T,R,te);c.updateQueue=oe,oe&&z0(c)}},R2=function(a,c,_,T){_!==T&&z0(c)};else if(X){ga=function(a,c,_,T){for(var R=c.child;R!==null;){e:if(R.tag===W){var j=R.stateNode;if(_&&T){var V=R.memoizedProps,te=R.type;j=Gr(j,te,V,R)}Wr(a,j)}else if(R.tag===ne){var oe=R.stateNode;if(_&&T){var Ie=R.memoizedProps;oe=Yl(oe,Ie,R)}Wr(a,oe)}else if(Ht&&R.tag===xt){var Ye=R.stateNode.instance;if(_&&T){var pt=R.memoizedProps,Nt=R.type;Ye=Gr(Ye,Nt,pt,R)}Wr(a,Ye)}else if(R.tag!==q){if(R.tag===pe){if((R.effectTag&mr)!==_i){var Vt=R.memoizedState!==null;if(Vt){var zt=R.child;if(zt!==null){zt.child!==null&&(zt.child.return=zt,ga(a,zt,!0,Vt));var vn=zt.sibling;if(vn!==null){vn.return=R,R=vn;continue}}}}if(R.child!==null){R.child.return=R,R=R.child;continue}}else if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R=R,R===c)return;for(;R.sibling===null;){if(R.return===null||R.return===c)return;R=R.return}R.sibling.return=R.return,R=R.sibling}};var fp=function(a,c,_,T){for(var R=c.child;R!==null;){e:if(R.tag===W){var j=R.stateNode;if(_&&T){var V=R.memoizedProps,te=R.type;j=Gr(j,te,V,R)}Gn(a,j)}else if(R.tag===ne){var oe=R.stateNode;if(_&&T){var Ie=R.memoizedProps;oe=Yl(oe,Ie,R)}Gn(a,oe)}else if(Ht&&R.tag===xt){var Ye=R.stateNode.instance;if(_&&T){var pt=R.memoizedProps,Nt=R.type;Ye=Gr(Ye,Nt,pt,R)}Gn(a,Ye)}else if(R.tag!==q){if(R.tag===pe){if((R.effectTag&mr)!==_i){var Vt=R.memoizedState!==null;if(Vt){var zt=R.child;if(zt!==null){zt.child!==null&&(zt.child.return=zt,fp(a,zt,!0,Vt));var vn=zt.sibling;if(vn!==null){vn.return=R,R=vn;continue}}}}if(R.child!==null){R.child.return=R,R=R.child;continue}}else if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R=R,R===c)return;for(;R.sibling===null;){if(R.return===null||R.return===c)return;R=R.return}R.sibling.return=R.return,R=R.sibling}};Ya=function(a){var c=a.stateNode,_=a.firstEffect===null;if(!_){var T=c.containerInfo,R=w0(T);fp(R,a,!1,!1),c.pendingChildren=R,z0(a),ic(T,R)}},A2=function(a,c,_,T,R){var j=a.stateNode,V=a.memoizedProps,te=c.firstEffect===null;if(te&&V===T){c.stateNode=j;return}var oe=c.stateNode,Ie=ul(),Ye=null;if(V!==T&&(Ye=c0(oe,_,V,T,R,Ie)),te&&Ye===null){c.stateNode=j;return}var pt=cs(j,Ye,_,V,T,c,te,oe);wu(pt,_,T,R,Ie)&&z0(c),c.stateNode=pt,te?z0(c):ga(pt,c,!1,!1)},R2=function(a,c,_,T){if(_!==T){var R=Jl(),j=ul();c.stateNode=as(T,R,j,c),z0(c)}}}else Ya=function(a){},A2=function(a,c,_,T,R){},R2=function(a,c,_,T){};function O2(a,c){switch(a.tailMode){case"hidden":{for(var _=a.tail,T=null;_!==null;)_.alternate!==null&&(T=_),_=_.sibling;T===null?a.tail=null:T.sibling=null;break}case"collapsed":{for(var R=a.tail,j=null;R!==null;)R.alternate!==null&&(j=R),R=R.sibling;j===null?!c&&a.tail!==null?a.tail.sibling=null:a.tail=null:j.sibling=null;break}}}function Zh(a,c,_){var T=c.pendingProps;switch(c.tag){case C:break;case Ue:break;case le:case L:break;case N:{var R=c.type;zi(R)&&Is(c);break}case U:{no(c),x0(c);var j=c.stateNode;if(j.pendingContext&&(j.context=j.pendingContext,j.pendingContext=null),a===null||a.child===null){var V=f1(c);V&&z0(c)}Ya(c);break}case W:{Od(c);var te=Jl(),oe=c.type;if(a!==null&&c.stateNode!=null){if(A2(a,c,oe,T,te),ci){var Ie=a.memoizedProps.listeners,Ye=T.listeners;Ie!==Ye&&z0(c)}a.ref!==c.ref&&x2(c)}else{if(!T){if(c.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");break}var pt=ul(),Nt=f1(c);if(Nt){if(Dm(c,te,pt)&&z0(c),ci){var Vt=T.listeners;Vt!=null&&dn(Vt,c,te)}}else{var zt=ji(oe,T,te,pt,c);if(ga(zt,c,!1,!1),c.stateNode=zt,ci){var vn=T.listeners;vn!=null&&dn(vn,c,te)}wu(zt,oe,T,te,pt)&&z0(c)}c.ref!==null&&x2(c)}break}case ne:{var xr=T;if(a&&c.stateNode!=null){var $r=a.memoizedProps;R2(a,c,$r,xr)}else{if(typeof xr!="string"&&c.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var wi=Jl(),N0=ul(),Vi=f1(c);Vi?wm(c)&&z0(c):c.stateNode=as(xr,wi,N0,c)}break}case ge:break;case pe:{da(c);var it=c.memoizedState;if(Di&&it!==null&&it.dehydrated!==null)if(a===null){var Ot=f1(c);if(!Ot)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");return Lh(c),Ln&&x(hi),null}else return c1(),(c.effectTag&Hr)===_i&&(c.memoizedState=null),c.effectTag|=mr,null;if((c.effectTag&Hr)!==_i)return c.expirationTime=_,c;var Je=it!==null,Bt=!1;if(a===null)c.memoizedProps.fallback!==void 0&&f1(c);else{var Mn=a.memoizedState;if(Bt=Mn!==null,!Je&&Mn!==null){var pn=a.child.sibling;if(pn!==null){var Pi=c.firstEffect;Pi!==null?(c.firstEffect=pn,pn.nextEffect=Pi):(c.firstEffect=c.lastEffect=pn,pn.nextEffect=null),pn.effectTag=W0}}}if(Je&&!Bt&&(c.mode&Y)!==Sr){var oi=a===null&&c.memoizedProps.unstable_avoidThisFallback!==!0;oi||Jc(xl.current,Ef)?mv():yv()}X&&Je&&(c.effectTag|=mr),P0&&(Je||Bt)&&(c.effectTag|=mr),Ui&&c.updateQueue!==null&&c.memoizedProps.suspenseCallback!=null&&(c.effectTag|=mr);break}case m:break;case we:break;case ze:break;case q:no(c),Ya(c);break;case he:$u(c);break;case Se:break;case Oe:break;case Ge:{var qu=c.type;zi(qu)&&Is(c);break}case wt:{da(c);var ar=c.memoizedState;if(ar===null)break;var ou=(c.effectTag&Hr)!==_i,qr=ar.rendering;if(qr===null)if(ou)O2(ar,!1);else{var _u=gv()&&(a===null||(a.effectTag&Hr)===_i);if(!_u)for(var _0=c.child;_0!==null;){var H0=Zc(_0);if(H0!==null){ou=!0,c.effectTag|=Hr,O2(ar,!1);var Cs=H0.updateQueue;return Cs!==null&&(c.updateQueue=Cs,c.effectTag|=mr),ar.lastEffect===null&&(c.firstEffect=null),c.lastEffect=ar.lastEffect,vm(c,_),Or(c,c2(xl.current,Qc)),c.child}_0=_0.sibling}}else{if(!ou){var Hu=Zc(qr);if(Hu!==null){c.effectTag|=Hr,ou=!0;var pl=Hu.updateQueue;if(pl!==null&&(c.updateQueue=pl,c.effectTag|=mr),O2(ar,!0),ar.tail===null&&ar.tailMode==="hidden"&&!qr.alternate){var Ja=c.lastEffect=ar.lastEffect;return Ja!==null&&(Ja.nextEffect=null),null}}else if(vt()>ar.tailExpiration&&_>hi){c.effectTag|=Hr,ou=!0,O2(ar,!1);var jo=_-1;c.expirationTime=c.childExpirationTime=jo,Ln&&x(jo)}}if(ar.isBackwards)qr.sibling=c.child,c.child=qr;else{var xs=ar.last;xs!==null?xs.sibling=qr:c.child=qr,ar.last=qr}}if(ar.tail!==null){if(ar.tailExpiration===0){var X2=500;ar.tailExpiration=vt()+X2}var Uf=ar.tail;ar.rendering=Uf,ar.tail=Uf.sibling,ar.lastEffect=c.lastEffect,Uf.sibling=null;var Rc=xl.current;return ou?Rc=c2(Rc,Qc):Rc=ca(Rc),Or(c,Rc),Uf}break}case xt:{if(Ht){var Pl=c.type.impl,zo=c.stateNode;if(zo===null){var O1=Pl.getInitialState,m_;O1!==void 0&&(m_=O1(T)),zo=c.stateNode=Yh(c,T,Pl,m_||{});var y_=dt(zo);if(zo.instance=y_,Pl.reconcileChildren===!1)return null;ga(y_,c,!1,!1),Hn(zo)}else{var yE=zo.props;if(zo.prevProps=yE,zo.props=T,zo.currentFiber=c,X){var g_=ea(zo);zo.instance=g_,ga(g_,c,!1,!1)}var gE=Dn(zo);gE&&z0(c)}}break}case $e:{if(Du)if(a===null){var _E=c.type,Ly={fiber:c,methods:null};if(c.stateNode=Ly,Ly.methods=C2(_E,Ly),ci){var __=T.listeners;if(__!=null){var EE=Jl();dn(__,c,EE)}}c.ref!==null&&(x2(c),z0(c))}else{if(ci){var DE=a.memoizedProps.listeners,wE=T.listeners;(DE!==wE||c.ref!==null)&&z0(c)}else c.ref!==null&&z0(c);a.ref!==c.ref&&x2(c)}break}default:throw Error("Unknown unit of work tag ("+c.tag+"). This error is likely caused by a bug in React. Please file an issue.")}return null}function Pm(a,c){switch(a.tag){case N:{var _=a.type;zi(_)&&Is(a);var T=a.effectTag;return T&f0?(a.effectTag=T&~f0|Hr,a):null}case U:{no(a),x0(a);var R=a.effectTag;if((R&Hr)!==_i)throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return a.effectTag=R&~f0|Hr,a}case W:return Od(a),null;case pe:{if(da(a),Di){var j=a.memoizedState;if(j!==null&&j.dehydrated!==null){if(a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");c1()}}var V=a.effectTag;return V&f0?(a.effectTag=V&~f0|Hr,a):null}case wt:return da(a),null;case q:return no(a),null;case he:return $u(a),null;default:return null}}function $h(a){switch(a.tag){case N:{var c=a.type.childContextTypes;c!=null&&Is(a);break}case U:{no(a),x0(a);break}case W:{Od(a);break}case q:no(a);break;case pe:da(a);break;case wt:da(a);break;case he:$u(a);break;default:break}}function cp(a,c){return{value:a,source:c,stack:_r(c)}}var dp=function(a,c,_,T,R,j,V,te,oe){var Ie=Array.prototype.slice.call(arguments,3);try{c.apply(_,Ie)}catch(Ye){this.onError(Ye)}};if(typeof window!="undefined"&&typeof window.dispatchEvent=="function"&&typeof document!="undefined"&&typeof document.createEvent=="function"){var pp=document.createElement("react"),Im=function(a,c,_,T,R,j,V,te,oe){if(typeof document=="undefined")throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var Ie=document.createEvent("Event"),Ye=!0,pt=window.event,Nt=Object.getOwnPropertyDescriptor(window,"event"),Vt=Array.prototype.slice.call(arguments,3);function zt(){pp.removeEventListener(N0,zt,!1),typeof window.event!="undefined"&&window.hasOwnProperty("event")&&(window.event=pt),c.apply(_,Vt),Ye=!1}var vn,xr=!1,$r=!1;function wi(Vi){if(vn=Vi.error,xr=!0,vn===null&&Vi.colno===0&&Vi.lineno===0&&($r=!0),Vi.defaultPrevented&&vn!=null&&typeof vn=="object")try{vn._suppressLogging=!0}catch(it){}}var N0="react-"+(a||"invokeguardedcallback");window.addEventListener("error",wi),pp.addEventListener(N0,zt,!1),Ie.initEvent(N0,!1,!1),pp.dispatchEvent(Ie),Nt&&Object.defineProperty(window,"event",Nt),Ye&&(xr?$r&&(vn=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")):vn=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(vn)),window.removeEventListener("error",wi)};dp=Im}var Bm=dp,Eo=!1,k2=null,Um={onError:function(a){Eo=!0,k2=a}};function sl(a,c,_,T,R,j,V,te,oe){Eo=!1,k2=null,Bm.apply(Um,arguments)}function Jn(){return Eo}function Vs(){if(Eo){var a=k2;return Eo=!1,k2=null,a}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function al(a){return!0}function n0(a){var c=al(a);if(c!==!1){var _=a.error;{var T=a.componentName,R=a.componentStack,j=a.errorBoundaryName,V=a.errorBoundaryFound,te=a.willRetry;if(_!=null&&_._suppressLogging){if(V&&te)return;console.error(_)}var oe=T?"The above error occurred in the <"+T+"> component:":"The above error occurred in one of your React components:",Ie;V&&j?te?Ie="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+j+"."):Ie="This error was initially handled by the error boundary "+j+`. -Recreating the tree from scratch failed so React will unmount the tree.`:Ie=`Consider adding an error boundary to your tree to customize error handling behavior. -Visit https://fb.me/react-error-boundaries to learn more about error boundaries.`;var Ye=""+oe+R+` - -`+(""+Ie);console.error(Ye)}}}var ev=null;ev=new Set;var Gs=typeof WeakSet=="function"?WeakSet:Set;function hp(a,c){var _=c.source,T=c.stack;T===null&&_!==null&&(T=_r(_));var R={componentName:_!==null?qt(_.type):null,componentStack:T!==null?T:"",error:c.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:!1,willRetry:!1};a!==null&&a.tag===N&&(R.errorBoundary=a.stateNode,R.errorBoundaryName=qt(a.type),R.errorBoundaryFound=!0,R.willRetry=!0);try{n0(R)}catch(j){setTimeout(function(){throw j})}}var jm=function(a,c){Oi(a,"componentWillUnmount"),c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount(),gi()};function tv(a,c){if(sl(null,jm,null,a,c),Jn()){var _=Vs();Pf(a,_)}}function vp(a){var c=a.ref;if(c!==null)if(typeof c=="function"){if(sl(null,c,null,null),Jn()){var _=Vs();Pf(a,_)}}else c.current=null}function zm(a,c){if(sl(null,c,null),Jn()){var _=Vs();Pf(a,_)}}function mp(a,c){switch(c.tag){case L:case ge:case le:{_c(ym,wf,c);return}case N:{if(c.effectTag&Co&&a!==null){var _=a.memoizedProps,T=a.memoizedState;Oi(c,"getSnapshotBeforeUpdate");var R=c.stateNode;c.type===c.elementType&&!ma&&(R.props!==c.memoizedProps&&Kt(!1,"Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(c.type)||"instance"),R.state!==c.memoizedState&&Kt(!1,"Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(c.type)||"instance"));var j=R.getSnapshotBeforeUpdate(c.elementType===c.type?_:bi(c.type,_),T);{var V=ev;j===void 0&&!V.has(c.type)&&(V.add(c.type),Ke(!1,"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",qt(c.type)))}R.__reactInternalSnapshotBeforeUpdate=j,gi()}return}case U:case W:case ne:case q:case Ge:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function _c(a,c,_){var T=_.updateQueue,R=T!==null?T.lastEffect:null;if(R!==null){var j=R.next,V=j;do{if((V.tag&a)!==wf){var te=V.destroy;V.destroy=void 0,te!==void 0&&te()}if((V.tag&c)!==wf){var oe=V.create;V.destroy=oe();{var Ie=V.destroy;if(Ie!==void 0&&typeof Ie!="function"){var Ye=void 0;Ie===null?Ye=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof Ie.then=="function"?Ye=` - -It looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately: - -useEffect(() => { - async function fetchData() { - // You can await here - const response = await MyAPI.getData(someId); - // ... - } - fetchData(); -}, [someId]); // Or [] if effect doesn't need props or state - -Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching`:Ye=" You returned: "+Ie,Ke(!1,"An effect function must not return anything besides a function, which is used for clean-up.%s%s",Ye,_r(_))}}}V=V.next}while(V!==j)}}function Ea(a){if((a.effectTag&L0)!==_i)switch(a.tag){case L:case ge:case le:{_c(rr,wf,a),_c(wf,$c,a);break}default:break}}function yp(a,c,_,T){switch(_.tag){case L:case ge:case le:{_c(gm,ol,_);break}case N:{var R=_.stateNode;if(_.effectTag&mr)if(c===null)Oi(_,"componentDidMount"),_.type===_.elementType&&!ma&&(R.props!==_.memoizedProps&&Kt(!1,"Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance"),R.state!==_.memoizedState&&Kt(!1,"Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance")),R.componentDidMount(),gi();else{var j=_.elementType===_.type?c.memoizedProps:bi(_.type,c.memoizedProps),V=c.memoizedState;Oi(_,"componentDidUpdate"),_.type===_.elementType&&!ma&&(R.props!==_.memoizedProps&&Kt(!1,"Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance"),R.state!==_.memoizedState&&Kt(!1,"Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance")),R.componentDidUpdate(j,V,R.__reactInternalSnapshotBeforeUpdate),gi()}var te=_.updateQueue;te!==null&&(_.type===_.elementType&&!ma&&(R.props!==_.memoizedProps&&Kt(!1,"Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance"),R.state!==_.memoizedState&&Kt(!1,"Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance")),vo(_,te,R,T));return}case U:{var oe=_.updateQueue;if(oe!==null){var Ie=null;if(_.child!==null)switch(_.child.tag){case W:Ie=Ro(_.child.stateNode);break;case N:Ie=_.child.stateNode;break}vo(_,oe,Ie,T)}return}case W:{var Ye=_.stateNode;if(c===null&&_.effectTag&mr){var pt=_.type,Nt=_.memoizedProps;Pu(Ye,pt,Nt,_)}return}case ne:return;case q:return;case ze:{if(Zt){var Vt=_.memoizedProps.onRender;typeof Vt=="function"&&(Ln?Vt(_.memoizedProps.id,c===null?"mount":"update",_.actualDuration,_.treeBaseDuration,_.actualStartTime,kl(),a.memoizedInteractions):Vt(_.memoizedProps.id,c===null?"mount":"update",_.actualDuration,_.treeBaseDuration,_.actualStartTime,kl()))}return}case pe:{Nl(a,_);return}case wt:case Ge:case xt:case $e:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function M2(a,c){if(P0)for(var _=a;;){if(_.tag===W){var T=_.stateNode;c?Oa(T):Zs(_.stateNode,_.memoizedProps)}else if(_.tag===ne){var R=_.stateNode;c?p0(R):K0(R,_.memoizedProps)}else if(_.tag===pe&&_.memoizedState!==null&&_.memoizedState.dehydrated===null){var j=_.child.sibling;j.return=_,_=j;continue}else if(_.child!==null){_.child.return=_,_=_.child;continue}if(_===a)return;for(;_.sibling===null;){if(_.return===null||_.return===a)return;_=_.return}_.sibling.return=_.return,_=_.sibling}}function ku(a){var c=a.ref;if(c!==null){var _=a.stateNode,T;switch(a.tag){case W:T=Ro(_);break;default:T=_}Du&&a.tag===$e&&(T=_.methods),typeof c=="function"?c(T):(c.hasOwnProperty("current")||Ke(!1,"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().%s",qt(a.type),_r(a)),c.current=T)}}function zu(a){var c=a.ref;c!==null&&(typeof c=="function"?c(null):c.current=null)}function gp(a,c,_){switch(Rn(c),c.tag){case L:case ge:case Oe:case le:{var T=c.updateQueue;if(T!==null){var R=T.lastEffect;if(R!==null){var j=R.next,V=_>Wn?Wn:_;_n(V,function(){var $r=j;do{var wi=$r.destroy;wi!==void 0&&zm(c,wi),$r=$r.next}while($r!==j)})}}break}case N:{vp(c);var te=c.stateNode;typeof te.componentWillUnmount=="function"&&tv(c,te);return}case W:{if(ci){var oe=c.dependencies;if(oe!==null){var Ie=oe.responders;if(Ie!==null){for(var Ye=Array.from(Ie.values()),pt=0,Nt=Ye.length;pt component higher in the tree to provide a loading indicator or placeholder to display.`+_r(_))}Rp(),T=cp(T,_);var Nt=c;do{switch(Nt.tag){case U:{var Vt=T;Nt.effectTag|=f0,Nt.expirationTime=R;var zt=uv(Nt,Vt,R);r2(Nt,zt);return}case N:var vn=T,xr=Nt.type,$r=Nt.stateNode;if((Nt.effectTag&Hr)===_i&&(typeof xr.getDerivedStateFromError=="function"||$r!==null&&typeof $r.componentDidCatch=="function"&&!Lp($r))){Nt.effectTag|=f0,Nt.expirationTime=R;var wi=ov(Nt,vn,R);r2(Nt,wi);return}break;default:break}Nt=Nt.return}while(Nt!==null)}var wa=Math.ceil,Cr=at.ReactCurrentDispatcher,Ep=at.ReactCurrentOwner,fl=at.IsSomeRendererActing,cu=0,E1=1,ki=2,Dp=4,F2=8,Do=16,Ss=32,Mf=0,b2=1,wp=2,D1=3,w1=4,Sp=5,Zn=cu,cl=null,qn=null,q0=lt,k0=Mf,P2=null,Ll=bn,S1=bn,Dc=null,wc=lt,I2=!1,Tp=0,M0=500,fn=null,B2=!1,U2=null,Sc=null,Tc=!1,Cc=null,T1=y0,Cp=lt,Ka=null,Km=50,xc=0,j2=null,sv=50,C1=0,Nf=null,Lf=null,x1=lt;function Fl(){return(Zn&(Do|Ss))!==cu?Ju(vt()):(x1!==lt||(x1=Ju(vt())),x1)}function Ac(){return Ju(vt())}function Ff(a,c,_){var T=c.mode;if((T&Y)===Sr)return bn;var R=Xt();if((T&Qr)===Sr)return R===Ci?bn:Qu;if((Zn&Do)!==cu)return q0;var j;if(_!==null)j=ia(a,_.timeoutMs|0||pf);else switch(R){case Ci:j=bn;break;case Xr:j=La(a);break;case Wn:case Xu:j=ms(a);break;case m0:j=Qi;break;default:throw Error("Expected a valid priority level")}return cl!==null&&j===q0&&(j-=1),j}function Xm(a,c){hy(),gy(a);var _=z2(a,c);if(_===null){my(a);return}Up(a,c),ta();var T=Xt();if(c===bn?(Zn&F2)!==cu&&(Zn&(Do|Ss))===cu?(H(_,c),A1(_)):(Uo(_),H(_,c),Zn===cu&&It()):(Uo(_),H(_,c)),(Zn&Dp)!==cu&&(T===Xr||T===Ci))if(Ka===null)Ka=new Map([[_,c]]);else{var R=Ka.get(_);(R===void 0||R>c)&&Ka.set(_,c)}}var dl=Xm;function z2(a,c){a.expirationTimeR?T:R}function Uo(a){var c=a.lastExpiredTime;if(c!==lt){a.callbackExpirationTime=bn,a.callbackPriority=Ci,a.callbackNode=En(A1.bind(null,a));return}var _=q2(a),T=a.callbackNode;if(_===lt){T!==null&&(a.callbackNode=null,a.callbackExpirationTime=lt,a.callbackPriority=y0);return}var R=Fl(),j=$1(R,_);if(T!==null){var V=a.callbackPriority,te=a.callbackExpirationTime;if(te===_&&V>=j)return;er(T)}a.callbackExpirationTime=_,a.callbackPriority=j;var oe;_===bn?oe=En(A1.bind(null,a)):oo?oe=yn(j,H2.bind(null,a)):oe=yn(j,H2.bind(null,a),{timeout:bo(_)-vt()}),a.callbackNode=oe}function H2(a,c){if(x1=lt,c){var _=Fl();return qp(a,_),Uo(a),null}var T=q2(a);if(T!==lt){var R=a.callbackNode;if((Zn&(Do|Ss))!==cu)throw Error("Should not already be working.");if(Xa(),(a!==cl||T!==q0)&&(bf(a,T),ee(a,T)),qn!==null){var j=Zn;Zn|=Do;var V=pv(a),te=W2(a);ff(qn);do try{oy();break}catch(Ye){dv(a,Ye)}while(!0);if(mt(),Zn=j,hv(V),Ln&&V2(te),k0===b2){var oe=P2;throw Bp(),bf(a,T),Bf(a,T),Uo(a),oe}if(qn!==null)Bp();else{Tv();var Ie=a.finishedWork=a.current.alternate;a.finishedExpirationTime=T,Qm(a,Ie,k0,T)}if(Uo(a),a.callbackNode===R)return H2.bind(null,a)}}return null}function Qm(a,c,_,T){switch(cl=null,_){case Mf:case b2:throw Error("Root did not complete. This is a bug in React.");case wp:{qp(a,T>Qi?Qi:T);break}case D1:{Bf(a,T);var R=a.lastSuspendedTime;T===R&&(a.nextKnownPendingLevel=Op(c)),d();var j=Ll===bn;if(j&&!(Y0&&If.current)){var V=Tp+M0-vt();if(V>10){if(I2){var te=a.lastPingedTime;if(te===lt||te>=T){a.lastPingedTime=T,bf(a,T);break}}var oe=q2(a);if(oe!==lt&&oe!==T)break;if(R!==lt&&R!==T){a.lastPingedTime=R;break}a.timeoutHandle=St(r0.bind(null,a),V);break}}r0(a);break}case w1:{Bf(a,T);var Ie=a.lastSuspendedTime;if(T===Ie&&(a.nextKnownPendingLevel=Op(c)),d(),!(Y0&&If.current)){if(I2){var Ye=a.lastPingedTime;if(Ye===lt||Ye>=T){a.lastPingedTime=T,bf(a,T);break}}var pt=q2(a);if(pt!==lt&&pt!==T)break;if(Ie!==lt&&Ie!==T){a.lastPingedTime=Ie;break}var Nt;if(S1!==bn)Nt=bo(S1)-vt();else if(Ll===bn)Nt=0;else{var Vt=_v(Ll),zt=vt(),vn=bo(T)-zt,xr=zt-Vt;xr<0&&(xr=0),Nt=Pp(xr)-xr,vn10){a.timeoutHandle=St(r0.bind(null,a),Nt);break}}r0(a);break}case Sp:{if(!(Y0&&If.current)&&Ll!==bn&&Dc!==null){var $r=Ip(Ll,T,Dc);if($r>10){Bf(a,T),a.timeoutHandle=St(r0.bind(null,a),$r);break}}r0(a);break}default:throw Error("Unknown root exit status.")}}function A1(a){var c=a.lastExpiredTime,_=c!==lt?c:bn;if(a.finishedExpirationTime===_)r0(a);else{if((Zn&(Do|Ss))!==cu)throw Error("Should not already be working.");if(Xa(),(a!==cl||_!==q0)&&(bf(a,_),ee(a,_)),qn!==null){var T=Zn;Zn|=Do;var R=pv(a),j=W2(a);ff(qn);do try{Ev();break}catch(te){dv(a,te)}while(!0);if(mt(),Zn=T,hv(R),Ln&&V2(j),k0===b2){var V=P2;throw Bp(),bf(a,_),Bf(a,_),Uo(a),V}if(qn!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");Tv(),a.finishedWork=a.current.alternate,a.finishedExpirationTime=_,Jm(a,k0,_),Uo(a)}}return null}function Jm(a,c,_){cl=null,(c===D1||c===w1)&&d(),r0(a)}function Zm(a,c){qp(a,c),Uo(a),(Zn&(Do|Ss))===cu&&It()}function av(){if((Zn&(E1|Do|Ss))!==cu){(Zn&Do)!==cu&&Kt(!1,"unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.");return}ey(),Xa()}function $m(a){return _n(Wn,a)}function fv(a,c,_,T){return _n(Ci,a.bind(null,c,_,T))}function ey(){if(Ka!==null){var a=Ka;Ka=null,a.forEach(function(c,_){qp(_,c),Uo(_)}),It()}}function ty(a,c){var _=Zn;Zn|=E1;try{return a(c)}finally{Zn=_,Zn===cu&&It()}}function ny(a,c){var _=Zn;Zn|=ki;try{return a(c)}finally{Zn=_,Zn===cu&&It()}}function cv(a,c,_,T){var R=Zn;Zn|=Dp;try{return _n(Xr,a.bind(null,c,_,T))}finally{Zn=R,Zn===cu&&It()}}function ry(a,c){var _=Zn;Zn&=~E1,Zn|=F2;try{return a(c)}finally{Zn=_,Zn===cu&&It()}}function xp(a,c){if((Zn&(Do|Ss))!==cu)throw Error("flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.");var _=Zn;Zn|=E1;try{return _n(Ci,a.bind(null,c))}finally{Zn=_,It()}}function iy(a){var c=Zn;Zn|=E1;try{_n(Ci,a)}finally{Zn=c,Zn===cu&&It()}}function bf(a,c){a.finishedWork=null,a.finishedExpirationTime=lt;var _=a.timeoutHandle;if(_!==Jo&&(a.timeoutHandle=Jo,so(_)),qn!==null)for(var T=qn.return;T!==null;)$h(T),T=T.return;cl=a,qn=wo(a.current,null,c),q0=c,k0=Mf,P2=null,Ll=bn,S1=bn,Dc=null,wc=lt,I2=!1,Ln&&(Lf=null),wl.discardPendingWarnings(),Ys=null}function dv(a,c){do{try{if(mt(),m2(),nt(),qn===null||qn.return===null)return k0=b2,P2=c,null;Zt&&qn.mode&Jr&&a1(qn,!0),lv(a,qn.return,qn,c,q0),qn=Dv(qn)}catch(_){c=_;continue}return}while(!0)}function pv(a){var c=Cr.current;return Cr.current=o1,c===null?o1:c}function hv(a){Cr.current=a}function W2(a){if(Ln){var c=k.__interactionsRef.current;return k.__interactionsRef.current=a.memoizedInteractions,c}return null}function V2(a){Ln&&(k.__interactionsRef.current=a)}function Ap(){Tp=vt()}function vv(a,c){aQi&&(Ll=a),c!==null&&aQi&&(S1=a,Dc=c)}function G2(a){a>wc&&(wc=a)}function mv(){k0===Mf&&(k0=D1)}function yv(){(k0===Mf||k0===D1)&&(k0=w1),wc!==lt&&cl!==null&&(Bf(cl,q0),o_(cl,wc))}function Rp(){k0!==Sp&&(k0=wp)}function gv(){return k0===Mf}function _v(a){var c=bo(a);return c-pf}function uy(a,c){var _=bo(a);return _-(c.timeoutMs|0||pf)}function Ev(){for(;qn!==null;)qn=Y2(qn)}function oy(){for(;qn!==null&&!kn();)qn=Y2(qn)}function Y2(a){var c=a.alternate;Kl(a),_t(a);var _;return Zt&&(a.mode&Jr)!==Sr?(zd(a),_=R1(c,a,q0),a1(a,!0)):_=R1(c,a,q0),nt(),a.memoizedProps=a.pendingProps,_===null&&(_=Dv(a)),Ep.current=null,_}function Dv(a){qn=a;do{var c=qn.alternate,_=qn.return;if((qn.effectTag&F0)===_i){_t(qn);var T=void 0;if(!Zt||(qn.mode&Jr)===Sr?T=Zh(c,qn,q0):(zd(qn),T=Zh(c,qn,q0),a1(qn,!1)),Yr(qn),nt(),ly(qn),T!==null)return T;if(_!==null&&(_.effectTag&F0)===_i){_.firstEffect===null&&(_.firstEffect=qn.firstEffect),qn.lastEffect!==null&&(_.lastEffect!==null&&(_.lastEffect.nextEffect=qn.firstEffect),_.lastEffect=qn.lastEffect);var R=qn.effectTag;R>eu&&(_.lastEffect!==null?_.lastEffect.nextEffect=qn:_.firstEffect=qn,_.lastEffect=qn)}}else{var j=Pm(qn,q0);if(Zt&&(qn.mode&Jr)!==Sr){a1(qn,!1);for(var V=qn.actualDuration,te=qn.child;te!==null;)V+=te.actualDuration,te=te.sibling;qn.actualDuration=V}if(j!==null)return fo(qn),j.effectTag&=Hl,j;Yr(qn),_!==null&&(_.firstEffect=_.lastEffect=null,_.effectTag|=F0)}var oe=qn.sibling;if(oe!==null)return oe;qn=_}while(qn!==null);return k0===Mf&&(k0=Sp),null}function Op(a){var c=a.expirationTime,_=a.childExpirationTime;return c>_?c:_}function ly(a){if(!(q0!==hi&&a.childExpirationTime===hi)){var c=lt;if(Zt&&(a.mode&Jr)!==Sr){for(var _=a.actualDuration,T=a.selfBaseDuration,R=a.alternate===null||a.child!==a.alternate.child,j=a.child;j!==null;){var V=j.expirationTime,te=j.childExpirationTime;V>c&&(c=V),te>c&&(c=te),R&&(_+=j.actualDuration),T+=j.treeBaseDuration,j=j.sibling}a.actualDuration=_,a.treeBaseDuration=T}else for(var oe=a.child;oe!==null;){var Ie=oe.expirationTime,Ye=oe.childExpirationTime;Ie>c&&(c=Ie),Ye>c&&(c=Ye),oe=oe.sibling}a.childExpirationTime=c}}function r0(a){var c=Xt();return _n(Ci,kp.bind(null,a,c)),null}function kp(a,c){do Xa();while(Cc!==null);if(vy(),(Zn&(Do|Ss))!==cu)throw Error("Should not already be working.");var _=a.finishedWork,T=a.finishedExpirationTime;if(_===null)return null;if(a.finishedWork=null,a.finishedExpirationTime=lt,_===a.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");a.callbackNode=null,a.callbackExpirationTime=lt,a.callbackPriority=y0,a.nextKnownPendingLevel=lt,J0();var R=Op(_);iE(a,T,R),a===cl&&(cl=null,qn=null,q0=lt);var j;if(_.effectTag>eu?_.lastEffect!==null?(_.lastEffect.nextEffect=_,j=_.firstEffect):j=_:j=_.firstEffect,j!==null){var V=Zn;Zn|=Ss;var te=W2(a);Ep.current=null,Te(),Bn(a.containerInfo),fn=j;do if(sl(null,sy,null),Jn()){if(fn===null)throw Error("Should be working on an effect.");var oe=Vs();Pf(fn,oe),fn=fn.nextEffect}while(fn!==null);et(),Zt&&Oh(),Ve(),fn=j;do if(sl(null,ay,null,a,c),Jn()){if(fn===null)throw Error("Should be working on an effect.");var Ie=Vs();Pf(fn,Ie),fn=fn.nextEffect}while(fn!==null);Gt(),Ir(a.containerInfo),a.current=_,Yt(),fn=j;do if(sl(null,Mp,null,a,T),Jn()){if(fn===null)throw Error("Should be working on an effect.");var Ye=Vs();Pf(fn,Ye),fn=fn.nextEffect}while(fn!==null);sr(),fn=null,se(),Ln&&V2(te),Zn=V}else a.current=_,Te(),et(),Zt&&Oh(),Ve(),Gt(),Yt(),sr();Z0();var pt=Tc;if(Tc)Tc=!1,Cc=a,Cp=T,T1=c;else for(fn=j;fn!==null;){var Nt=fn.nextEffect;fn.nextEffect=null,fn=Nt}var Vt=a.firstPendingTime;if(Vt!==lt){if(Ln){if(Lf!==null){var zt=Lf;Lf=null;for(var vn=0;vnWn?Wn:T1;return T1=y0,_n(a,Np)}}function Np(){if(Cc===null)return!1;var a=Cc,c=Cp;if(Cc=null,Cp=lt,(Zn&(Do|Ss))!==cu)throw Error("Cannot flush passive effects while already rendering.");var _=Zn;Zn|=Ss;for(var T=W2(a),R=a.current.firstEffect;R!==null;){{if(_t(R),sl(null,Ea,null,R),Jn()){if(R===null)throw Error("Should be working on an effect.");var j=Vs();Pf(R,j)}nt()}var V=R.nextEffect;R.nextEffect=null,R=V}return Ln&&(V2(T),de(a,c)),Zn=_,It(),C1=Cc===null?0:C1+1,!0}function Lp(a){return Sc!==null&&Sc.has(a)}function Fp(a){Sc===null?Sc=new Set([a]):Sc.add(a)}function fy(a){B2||(B2=!0,U2=a)}var cy=fy;function wv(a,c,_){var T=cp(_,c),R=uv(a,T,bn);Ua(a,R);var j=z2(a,bn);j!==null&&(Uo(j),H(j,bn))}function Pf(a,c){if(a.tag===U){wv(a,a,c);return}for(var _=a.return;_!==null;){if(_.tag===U){wv(_,a,c);return}else if(_.tag===N){var T=_.type,R=_.stateNode;if(typeof T.getDerivedStateFromError=="function"||typeof R.componentDidCatch=="function"&&!Lp(R)){var j=cp(c,a),V=ov(_,j,bn);Ua(_,V);var te=z2(_,bn);te!==null&&(Uo(te),H(te,bn));return}}_=_.return}}function bp(a,c,_){var T=a.pingCache;if(T!==null&&T.delete(c),cl===a&&q0===_){k0===w1||k0===D1&&Ll===bn&&vt()-TpKm)throw xc=0,j2=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");C1>sv&&(C1=0,Kt(!1,"Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function vy(){wl.flushLegacyContextWarning(),fi&&wl.flushPendingUnsafeLifecycleWarnings()}function Tv(){var a=!0;cf(Nf,a),Nf=null}function Bp(){var a=!1;cf(Nf,a),Nf=null}function Up(a,c){Pr&&cl!==null&&c>q0&&(Nf=a)}var K2=null;function my(a){{var c=a.tag;if(c!==U&&c!==N&&c!==L&&c!==ge&&c!==Oe&&c!==le)return;var _=qt(a.type)||"ReactComponent";if(K2!==null){if(K2.has(_))return;K2.add(_)}else K2=new Set([_]);Ke(!1,"Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.%s",c===N?"the componentWillUnmount method":"a useEffect cleanup function",_r(a))}}var R1;if(G0){var yy=null;R1=function(a,c,_){var T=i_(yy,c);try{return op(a,c,_)}catch(j){if(j!==null&&typeof j=="object"&&typeof j.then=="function")throw j;if(mt(),m2(),$h(c),i_(c,T),Zt&&c.mode&Jr&&zd(c),sl(null,op,null,a,c,_),Jn()){var R=Vs();throw R}else throw j}}}else R1=op;var Cv=!1,xv=!1;function gy(a){if(a.tag===N)switch(Ar){case"getChildContext":if(xv)return;Ke(!1,"setState(...): Cannot call setState() inside getChildContext()"),xv=!0;break;case"render":if(Cv)return;Ke(!1,"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Cv=!0;break}}var If={current:!1};function jp(a){fs===!0&&fl.current===!0&&If.current!==!0&&Ke(!1,`It looks like you're using the wrong act() around your test interactions. -Be sure to use the matching version of act() corresponding to your renderer: - -// for react-dom: -import {act} from 'react-dom/test-utils'; -// ... -act(() => ...); - -// for react-test-renderer: -import TestRenderer from 'react-test-renderer'; -const {act} = TestRenderer; -// ... -act(() => ...);%s`,_r(a))}function Av(a){fs===!0&&(a.mode&cr)!==Sr&&fl.current===!1&&If.current===!1&&Ke(!1,`An update to %s ran an effect, but was not wrapped in act(...). - -When testing, code that causes React state updates should be wrapped into act(...): - -act(() => { - /* fire events that update state */ -}); -/* assert on the output */ - -This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(a.type),_r(a))}function _y(a){fs===!0&&Zn===cu&&fl.current===!1&&If.current===!1&&Ke(!1,`An update to %s inside a test was not wrapped in act(...). - -When testing, code that causes React state updates should be wrapped into act(...): - -act(() => { - /* fire events that update state */ -}); -/* assert on the output */ - -This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(a.type),_r(a))}var Ey=_y,zp=!1;function Dy(a){zp===!1&&t.unstable_flushAllWithoutAsserting===void 0&&(a.mode&Y||a.mode&Qr?(zp=!0,Ke(!1,`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: -jest.mock('scheduler', () => require('scheduler/unstable_mock')); - -For more info, visit https://fb.me/react-mock-scheduler`)):Yi===!0&&(zp=!0,Ke(!1,`Starting from React v17, the "scheduler" module will need to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: -jest.mock('scheduler', () => require('scheduler/unstable_mock')); - -For more info, visit https://fb.me/react-mock-scheduler`)))}var Ys=null;function wy(a){{var c=Xt();if((a.mode&Qr)!==_i&&(c===Xr||c===Ci))for(var _=a;_!==null;){var T=_.alternate;if(T!==null)switch(_.tag){case N:var R=T.updateQueue;if(R!==null)for(var j=R.firstUpdate;j!==null;){var V=j.priority;if(V===Xr||V===Ci){Ys===null?Ys=new Set([qt(_.type)]):Ys.add(qt(_.type));break}j=j.next}break;case L:case ge:case le:if(_.memoizedState!==null&&_.memoizedState.baseUpdate!==null)for(var te=_.memoizedState.baseUpdate;te!==null;){var oe=te.priority;if(oe===Xr||oe===Ci){Ys===null?Ys=new Set([qt(_.type)]):Ys.add(qt(_.type));break}if(te.next===_.memoizedState.baseUpdate)break;te=te.next}break;default:break}_=_.return}}}function d(){if(Ys!==null){var a=[];Ys.forEach(function(c){return a.push(c)}),Ys=null,a.length>0&&Ke(!1,`%s triggered a user-blocking update that suspended. - -The fix is to split the update into multiple parts: a user-blocking update to provide immediate feedback, and another update that triggers the bulk of the changes. - -Refer to the documentation for useTransition to learn how to implement this pattern.`,a.sort().join(", "))}}function v(a,c){return c*1e3+a.interactionThreadID}function x(a){!Ln||(Lf===null?Lf=[a]:Lf.push(a))}function b(a,c,_){if(!!Ln&&_.size>0){var T=a.pendingInteractionMap,R=T.get(c);R!=null?_.forEach(function(te){R.has(te)||te.__count++,R.add(te)}):(T.set(c,new Set(_)),_.forEach(function(te){te.__count++}));var j=k.__subscriberRef.current;if(j!==null){var V=v(a,c);j.onWorkScheduled(_,V)}}}function H(a,c){!Ln||b(a,c,k.__interactionsRef.current)}function ee(a,c){if(!!Ln){var _=new Set;if(a.pendingInteractionMap.forEach(function(j,V){V>=c&&j.forEach(function(te){return _.add(te)})}),a.memoizedInteractions=_,_.size>0){var T=k.__subscriberRef.current;if(T!==null){var R=v(a,c);try{T.onWorkStarted(_,R)}catch(j){yn(Ci,function(){throw j})}}}}}function de(a,c){if(!!Ln){var _=a.firstPendingTime,T;try{if(T=k.__subscriberRef.current,T!==null&&a.memoizedInteractions.size>0){var R=v(a,c);T.onWorkStopped(a.memoizedInteractions,R)}}catch(V){yn(Ci,function(){throw V})}finally{var j=a.pendingInteractionMap;j.forEach(function(V,te){te>_&&(j.delete(te),V.forEach(function(oe){if(oe.__count--,T!==null&&oe.__count===0)try{T.onInteractionScheduledWorkCompleted(oe)}catch(Ie){yn(Ci,function(){throw Ie})}}))})}}}var ye=null,be=null,gt=!1,Dt=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined";function Rt(a){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined")return!1;var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled)return!0;if(!c.supportsFiber)return Ke(!1,"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"),!0;try{var _=c.inject(a);ye=function(T,R){try{var j=(T.current.effectTag&Hr)===Hr;if(Zt){var V=Ac(),te=$1(V,R);c.onCommitFiberRoot(_,T,te,j)}else c.onCommitFiberRoot(_,T,void 0,j)}catch(oe){gt||(gt=!0,Ke(!1,"React DevTools encountered an error: %s",oe))}},be=function(T){try{c.onCommitFiberUnmount(_,T)}catch(R){gt||(gt=!0,Ke(!1,"React DevTools encountered an error: %s",R))}}}catch(T){Ke(!1,"React DevTools encountered an error: %s.",T)}return!0}function rn(a,c){typeof ye=="function"&&ye(a,c)}function Rn(a){typeof be=="function"&&be(a)}var $n;{$n=!1;try{var Nr=Object.preventExtensions({}),ir=new Map([[Nr,null]]),Zr=new Set([Nr]);ir.set(0,0),Zr.add(0)}catch(a){$n=!0}}var ui=1;function bl(a,c,_,T){this.tag=a,this.key=_,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=c,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=T,this.effectTag=_i,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.expirationTime=lt,this.childExpirationTime=lt,this.alternate=null,Zt&&(this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0),Pr&&(this._debugID=ui++,this._debugIsCurrentlyTiming=!1),this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!$n&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Wi=function(a,c,_,T){return new bl(a,c,_,T)};function uo(a){var c=a.prototype;return!!(c&&c.isReactComponent)}function i0(a){return typeof a=="function"&&!uo(a)&&a.defaultProps===void 0}function Ts(a){if(typeof a=="function")return uo(a)?N:L;if(a!=null){var c=a.$$typeof;if(c===An)return ge;if(c===Wt)return Oe}return C}function wo(a,c,_){var T=a.alternate;T===null?(T=Wi(a.tag,c,a.key,a.mode),T.elementType=a.elementType,T.type=a.type,T.stateNode=a.stateNode,T._debugID=a._debugID,T._debugSource=a._debugSource,T._debugOwner=a._debugOwner,T._debugHookTypes=a._debugHookTypes,T.alternate=a,a.alternate=T):(T.pendingProps=c,T.effectTag=_i,T.nextEffect=null,T.firstEffect=null,T.lastEffect=null,Zt&&(T.actualDuration=0,T.actualStartTime=-1)),T.childExpirationTime=a.childExpirationTime,T.expirationTime=a.expirationTime,T.child=a.child,T.memoizedProps=a.memoizedProps,T.memoizedState=a.memoizedState,T.updateQueue=a.updateQueue;var R=a.dependencies;switch(T.dependencies=R===null?null:{expirationTime:R.expirationTime,firstContext:R.firstContext,responders:R.responders},T.sibling=a.sibling,T.index=a.index,T.ref=a.ref,Zt&&(T.selfBaseDuration=a.selfBaseDuration,T.treeBaseDuration=a.treeBaseDuration),T._debugNeedsRemount=a._debugNeedsRemount,T.tag){case C:case L:case le:T.type=Zu(a.type);break;case N:T.type=U0(a.type);break;case ge:T.type=vf(a.type);break;default:break}return T}function Rv(a,c){a.effectTag&=ai,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null;var _=a.alternate;if(_===null)a.childExpirationTime=lt,a.expirationTime=c,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,Zt&&(a.selfBaseDuration=0,a.treeBaseDuration=0);else{a.childExpirationTime=_.childExpirationTime,a.expirationTime=_.expirationTime,a.child=_.child,a.memoizedProps=_.memoizedProps,a.memoizedState=_.memoizedState,a.updateQueue=_.updateQueue;var T=_.dependencies;a.dependencies=T===null?null:{expirationTime:T.expirationTime,firstContext:T.firstContext,responders:T.responders},Zt&&(a.selfBaseDuration=_.selfBaseDuration,a.treeBaseDuration=_.treeBaseDuration)}return a}function X4(a){var c;return a===R0?c=Qr|Y|cr:a===I0?c=Y|cr:c=Sr,Zt&&Dt&&(c|=Jr),Wi(U,null,null,c)}function Sy(a,c,_,T,R,j){var V,te=C,oe=a;if(typeof a=="function")uo(a)?(te=N,oe=U0(oe)):oe=Zu(oe);else if(typeof a=="string")te=W;else{e:switch(a){case ue:return Qa(_.children,R,j,c);case ln:te=we,R|=Qr|Y|cr;break;case je:te=we,R|=cr;break;case ct:return J4(_,R,j,c);case nr:return Z4(_,R,j,c);case un:return $4(_,R,j,c);default:{if(typeof a=="object"&&a!==null)switch(a.$$typeof){case At:te=he;break e;case en:te=Se;break e;case An:te=ge,oe=vf(oe);break e;case Wt:te=Oe;break e;case vr:te=Ue,oe=null;break e;case w:if(Ht)return r_(a,_,R,j,c);break;case Vn:if(Du)return Q4(a,_,R,j,c)}var Ie="";{(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(Ie+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ye=T?qt(T.type):null;Ye&&(Ie+=` - -Check the render method of \``+Ye+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(a==null?a:typeof a)+"."+Ie)}}}return V=Wi(te,_,c,R),V.elementType=a,V.type=oe,V.expirationTime=j,V}function Ty(a,c,_){var T=null;T=a._owner;var R=a.type,j=a.key,V=a.props,te=Sy(R,j,V,T,c,_);return te._debugSource=a._source,te._debugOwner=a._owner,te}function Qa(a,c,_,T){var R=Wi(m,a,T,c);return R.expirationTime=_,R}function r_(a,c,_,T,R){var j=Wi(xt,c,R,_);return j.elementType=a,j.type=a,j.expirationTime=T,j}function Q4(a,c,_,T,R){var j=Wi($e,c,R,_);return j.type=a,j.elementType=a,j.expirationTime=T,j}function J4(a,c,_,T){(typeof a.id!="string"||typeof a.onRender!="function")&&Ke(!1,'Profiler must specify an "id" string and "onRender" function as props');var R=Wi(ze,a,T,c|Jr);return R.elementType=ct,R.type=ct,R.expirationTime=_,R}function Z4(a,c,_,T){var R=Wi(pe,a,T,c);return R.type=nr,R.elementType=nr,R.expirationTime=_,R}function $4(a,c,_,T){var R=Wi(wt,a,T,c);return R.type=un,R.elementType=un,R.expirationTime=_,R}function Cy(a,c,_){var T=Wi(ne,a,null,c);return T.expirationTime=_,T}function eE(){var a=Wi(W,null,null,Sr);return a.elementType="DELETED",a.type="DELETED",a}function tE(a){var c=Wi(rt,null,null,Sr);return c.stateNode=a,c}function xy(a,c,_){var T=a.children!==null?a.children:[],R=Wi(q,T,a.key,c);return R.expirationTime=_,R.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},R}function i_(a,c){return a===null&&(a=Wi(C,null,null,Sr)),a.tag=c.tag,a.key=c.key,a.elementType=c.elementType,a.type=c.type,a.stateNode=c.stateNode,a.return=c.return,a.child=c.child,a.sibling=c.sibling,a.index=c.index,a.ref=c.ref,a.pendingProps=c.pendingProps,a.memoizedProps=c.memoizedProps,a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.dependencies=c.dependencies,a.mode=c.mode,a.effectTag=c.effectTag,a.nextEffect=c.nextEffect,a.firstEffect=c.firstEffect,a.lastEffect=c.lastEffect,a.expirationTime=c.expirationTime,a.childExpirationTime=c.childExpirationTime,a.alternate=c.alternate,Zt&&(a.actualDuration=c.actualDuration,a.actualStartTime=c.actualStartTime,a.selfBaseDuration=c.selfBaseDuration,a.treeBaseDuration=c.treeBaseDuration),a._debugID=c._debugID,a._debugSource=c._debugSource,a._debugOwner=c._debugOwner,a._debugIsCurrentlyTiming=c._debugIsCurrentlyTiming,a._debugNeedsRemount=c._debugNeedsRemount,a._debugHookTypes=c._debugHookTypes,a}function nE(a,c,_){this.tag=c,this.current=null,this.containerInfo=a,this.pendingChildren=null,this.pingCache=null,this.finishedExpirationTime=lt,this.finishedWork=null,this.timeoutHandle=Jo,this.context=null,this.pendingContext=null,this.hydrate=_,this.callbackNode=null,this.callbackPriority=y0,this.firstPendingTime=lt,this.firstSuspendedTime=lt,this.lastSuspendedTime=lt,this.nextKnownPendingLevel=lt,this.lastPingedTime=lt,this.lastExpiredTime=lt,Ln&&(this.interactionThreadID=k.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map),Ui&&(this.hydrationCallbacks=null)}function rE(a,c,_,T){var R=new nE(a,c,_);Ui&&(R.hydrationCallbacks=T);var j=X4(c);return R.current=j,j.stateNode=R,R}function u_(a,c){var _=a.firstSuspendedTime,T=a.lastSuspendedTime;return _!==lt&&_>=c&&T<=c}function Bf(a,c){var _=a.firstSuspendedTime,T=a.lastSuspendedTime;_c||_===lt)&&(a.lastSuspendedTime=c),c<=a.lastPingedTime&&(a.lastPingedTime=lt),c<=a.lastExpiredTime&&(a.lastExpiredTime=lt)}function o_(a,c){var _=a.firstPendingTime;c>_&&(a.firstPendingTime=c);var T=a.firstSuspendedTime;T!==lt&&(c>=T?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=lt:c>=a.lastSuspendedTime&&(a.lastSuspendedTime=c+1),c>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=c))}function iE(a,c,_){a.firstPendingTime=_,c<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=lt:c<=a.firstSuspendedTime&&(a.firstSuspendedTime=c-1),c<=a.lastPingedTime&&(a.lastPingedTime=lt),c<=a.lastExpiredTime&&(a.lastExpiredTime=lt)}function qp(a,c){var _=a.lastExpiredTime;(_===lt||_>c)&&(a.lastExpiredTime=c)}var uE={debugTool:null},Ov=uE,Ay,Ry;Ay=!1,Ry={};function oE(a){if(!a)return Sn;var c=jt(a),_=El(c);if(c.tag===N){var T=c.type;if(zi(T))return A0(c,T,_)}return _}function Oy(a){var c=jt(a);if(c===void 0)throw typeof a.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(a));var _=b0(c);return _===null?null:_.stateNode}function lE(a,c){{var _=jt(a);if(_===void 0)throw typeof a.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(a));var T=b0(_);if(T===null)return null;if(T.mode&cr){var R=qt(_.type)||"Component";Ry[R]||(Ry[R]=!0,_.mode&cr?Ke(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",c,c,R,_r(T)):Ke(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",c,c,R,_r(T)))}return T.stateNode}return Oy(a)}function sE(a,c,_,T){return rE(a,c,_,T)}function l_(a,c,_,T){var R=c.current,j=Fl();typeof jest!="undefined"&&(Dy(R),jp(R));var V=mo(),te=Ff(j,R,V);Ov.debugTool&&(R.alternate===null?Ov.debugTool.onMountContainer(c):a===null?Ov.debugTool.onUnmountContainer(c):Ov.debugTool.onUpdateContainer(c));var oe=oE(_);c.context===null?c.context=oe:c.pendingContext=oe,Ar==="render"&&Cn!==null&&!Ay&&(Ay=!0,Ke(!1,`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. - -Check the render method of %s.`,qt(Cn.type)||"Unknown"));var Ie=gu(te,V);return Ie.payload={element:a},T=T===void 0?null:T,T!==null&&(typeof T!="function"&&Ke(!1,"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",T),Ie.callback=T),Ua(R,Ie),dl(R,te),te}function aE(a){var c=a.current;if(!c.child)return null;switch(c.child.tag){case W:return Ro(c.child.stateNode);default:return c.child.stateNode}}function fE(a){switch(a.tag){case U:var c=a.stateNode;c.hydrate&&Zm(c,c.firstPendingTime);break;case pe:xp(function(){return dl(a,bn)});var _=La(Fl());kv(a,_);break}}function s_(a,c){var _=a.memoizedState;_!==null&&_.dehydrated!==null&&_.retryTime=c.length)return T;var R=c[_],j=Array.isArray(a)?a.slice():f({},a);return j[R]=Ny(a[R],c,_+1,T),j},h_=function(a,c,_){return Ny(a,c,0,_)};f_=function(a,c,_,T){for(var R=a.memoizedState;R!==null&&c>0;)R=R.next,c--;if(R!==null){var j=h_(R.memoizedState,_,T);R.memoizedState=j,R.baseState=j,a.memoizedProps=f({},a.memoizedProps),dl(a,bn)}},c_=function(a,c,_){a.pendingProps=h_(a.memoizedProps,c,_),a.alternate&&(a.alternate.pendingProps=a.pendingProps),dl(a,bn)},d_=function(a){dl(a,bn)},p_=function(a){My=a}}function hE(a){var c=a.findFiberByHostInstance,_=at.ReactCurrentDispatcher;return Rt(f({},a,{overrideHookState:f_,overrideProps:c_,setSuspenseHandler:p_,scheduleUpdate:d_,currentDispatcherRef:_,findHostInstanceByFiber:function(T){var R=b0(T);return R===null?null:R.stateNode},findFiberByHostInstance:function(T){return c?c(T):null},findHostInstancesForRefresh:n2,scheduleRefresh:Sl,scheduleRoot:_s,setRefreshHandler:Ia,getCurrentFiber:function(){return Cn}}))}var v_=Object.freeze({createContainer:sE,updateContainer:l_,batchedEventUpdates:ny,batchedUpdates:ty,unbatchedUpdates:ry,deferredUpdates:$m,syncUpdates:fv,discreteUpdates:cv,flushDiscreteUpdates:av,flushControlled:iy,flushSync:xp,flushPassiveEffects:Xa,IsThisRendererActing:If,getPublicRootInstance:aE,attemptSynchronousHydration:fE,attemptUserBlockingHydration:cE,attemptContinuousHydration:ky,attemptHydrationAtCurrentPriority:dE,findHostInstance:Oy,findHostInstanceWithWarning:lE,findHostInstanceWithNoPortals:pE,shouldSuspend:a_,injectIntoDevTools:hE}),vE=v_.default||v_;hg.exports=vE;var mE=hg.exports;return hg.exports=i,mE})});var D9=ce((zne,cw)=>{"use strict";process.env.NODE_ENV==="production"?cw.exports=m9():cw.exports=E9()});var S9=ce((qne,w9)=>{"use strict";var ZK={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};w9.exports=ZK});var A9=ce((Hne,T9)=>{"use strict";var $K=Object.assign||function(i){for(var o=1;o"}}]),i}(),C9=function(){v4(i,null,[{key:"fromJS",value:function(f){var p=f.width,E=f.height;return new i(p,E)}}]);function i(o,f){pw(this,i),this.width=o,this.height=f}return v4(i,[{key:"fromJS",value:function(f){f(this.width,this.height)}},{key:"toString",value:function(){return""}}]),i}(),x9=function(){function i(o,f){pw(this,i),this.unit=o,this.value=f}return v4(i,[{key:"fromJS",value:function(f){f(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case Jf.UNIT_POINT:return String(this.value);case Jf.UNIT_PERCENT:return this.value+"%";case Jf.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),i}();T9.exports=function(i,o){function f(k,L,N){var C=k[L];k[L]=function(){for(var U=arguments.length,q=Array(U),W=0;W1?q-1:0),ne=1;ne1&&arguments[1]!==void 0?arguments[1]:NaN,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Jf.DIRECTION_LTR;return k.call(this,L,N,C)}),$K({Config:o.Config,Node:o.Node,Layout:i("Layout",eX),Size:i("Size",C9),Value:i("Value",x9),getInstanceCount:function(){return o.getInstanceCount.apply(o,arguments)}},Jf)}});var R9=ce((exports,module)=>{(function(i,o){typeof define=="function"&&define.amd?define([],function(){return o}):typeof module=="object"&&module.exports?module.exports=o:(i.nbind=i.nbind||{}).init=o})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(i,o){return function(){i&&i.apply(this,arguments);try{Module.ccall("nbind_init")}catch(f){o(f);return}o(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module!="undefined"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(o,f){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),o=nodePath.normalize(o);var p=nodeFS.readFileSync(o);return f?p:p.toString()},Module.readBinary=function(o){var f=Module.read(o,!0);return f.buffer||(f=new Uint8Array(f)),assert(f.buffer),f},Module.load=function(o){globalEval(read(o))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module!="undefined"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr!="undefined"&&(Module.printErr=printErr),typeof read!="undefined"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(o){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(o));var f=read(o,"binary");return assert(typeof f=="object"),f},typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(i,o){quit(i)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.send(null),f.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.responseType="arraybuffer",f.send(null),new Uint8Array(f.response)}),Module.readAsync=function(o,f,p){var E=new XMLHttpRequest;E.open("GET",o,!0),E.responseType="arraybuffer",E.onload=function(){E.status==200||E.status==0&&E.response?f(E.response):p()},E.onerror=p,E.send(null)},typeof arguments!="undefined"&&(Module.arguments=arguments),typeof console!="undefined")Module.print||(Module.print=function(o){console.log(o)}),Module.printErr||(Module.printErr=function(o){console.warn(o)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(i){dump(i)}:function(i){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle=="undefined"&&(Module.setWindowTitle=function(i){document.title=i})}else throw"Unknown runtime environment. Where are we?";function globalEval(i){eval.call(null,i)}!Module.load&&Module.read&&(Module.load=function(o){globalEval(Module.read(o))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(i,o){throw o}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(i){return tempRet0=i,i},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(i){STACKTOP=i},getNativeTypeSize:function(i){switch(i){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(i[i.length-1]==="*")return Runtime.QUANTUM_SIZE;if(i[0]==="i"){var o=parseInt(i.substr(1));return assert(o%8==0),o/8}else return 0}}},getNativeFieldSize:function(i){return Math.max(Runtime.getNativeTypeSize(i),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(i,o){return o==="double"||o==="i64"?i&7&&(assert((i&7)==4),i+=4):assert((i&3)==0),i},getAlignSize:function(i,o,f){return!f&&(i=="i64"||i=="double")?8:i?Math.min(o||(i?Runtime.getNativeFieldSize(i):0),Runtime.QUANTUM_SIZE):Math.min(o,8)},dynCall:function(i,o,f){return f&&f.length?Module["dynCall_"+i].apply(null,[o].concat(f)):Module["dynCall_"+i].call(null,o)},functionPointers:[],addFunction:function(i){for(var o=0;o>2],f=(o+i+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=f,f>=TOTAL_MEMORY){var p=enlargeMemory();if(!p)return HEAP32[DYNAMICTOP_PTR>>2]=o,0}return o},alignMemory:function(i,o){var f=i=Math.ceil(i/(o||16))*(o||16);return f},makeBigInt:function(i,o,f){var p=f?+(i>>>0)+ +(o>>>0)*4294967296:+(i>>>0)+ +(o|0)*4294967296;return p},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(i,o){i||abort("Assertion failed: "+o)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(i){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(i){var o=Runtime.stackAlloc(i.length);return writeArrayToMemory(i,o),o},stringToC:function(i){var o=0;if(i!=null&&i!==0){var f=(i.length<<2)+1;o=Runtime.stackAlloc(f),stringToUTF8(i,o,f)}return o}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(o,f,p,E,t){var k=getCFunc(o),L=[],N=0;if(E)for(var C=0;C>0]=o;break;case"i8":HEAP8[i>>0]=o;break;case"i16":HEAP16[i>>1]=o;break;case"i32":HEAP32[i>>2]=o;break;case"i64":tempI64=[o>>>0,(tempDouble=o,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i>>2]=tempI64[0],HEAP32[i+4>>2]=tempI64[1];break;case"float":HEAPF32[i>>2]=o;break;case"double":HEAPF64[i>>3]=o;break;default:abort("invalid type for setValue: "+f)}}Module.setValue=setValue;function getValue(i,o,f){switch(o=o||"i8",o.charAt(o.length-1)==="*"&&(o="i32"),o){case"i1":return HEAP8[i>>0];case"i8":return HEAP8[i>>0];case"i16":return HEAP16[i>>1];case"i32":return HEAP32[i>>2];case"i64":return HEAP32[i>>2];case"float":return HEAPF32[i>>2];case"double":return HEAPF64[i>>3];default:abort("invalid type for setValue: "+o)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(i,o,f,p){var E,t;typeof i=="number"?(E=!0,t=i):(E=!1,t=i.length);var k=typeof o=="string"?o:null,L;if(f==ALLOC_NONE?L=p:L=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][f===void 0?ALLOC_STATIC:f](Math.max(t,k?1:o.length)),E){var p=L,N;for(assert((L&3)==0),N=L+(t&~3);p>2]=0;for(N=L+t;p>0]=0;return L}if(k==="i8")return i.subarray||i.slice?HEAPU8.set(i,L):HEAPU8.set(new Uint8Array(i),L),L;for(var C=0,U,q,W;C>0],f|=p,!(p==0&&!o||(E++,o&&E==o)););o||(o=E);var t="";if(f<128){for(var k=1024,L;o>0;)L=String.fromCharCode.apply(String,HEAPU8.subarray(i,i+Math.min(o,k))),t=t?t+L:L,i+=k,o-=k;return t}return Module.UTF8ToString(i)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(i){for(var o="";;){var f=HEAP8[i++>>0];if(!f)return o;o+=String.fromCharCode(f)}}Module.AsciiToString=AsciiToString;function stringToAscii(i,o){return writeAsciiToMemory(i,o,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(i,o){for(var f=o;i[f];)++f;if(f-o>16&&i.subarray&&UTF8Decoder)return UTF8Decoder.decode(i.subarray(o,f));for(var p,E,t,k,L,N,C="";;){if(p=i[o++],!p)return C;if(!(p&128)){C+=String.fromCharCode(p);continue}if(E=i[o++]&63,(p&224)==192){C+=String.fromCharCode((p&31)<<6|E);continue}if(t=i[o++]&63,(p&240)==224?p=(p&15)<<12|E<<6|t:(k=i[o++]&63,(p&248)==240?p=(p&7)<<18|E<<12|t<<6|k:(L=i[o++]&63,(p&252)==248?p=(p&3)<<24|E<<18|t<<12|k<<6|L:(N=i[o++]&63,p=(p&1)<<30|E<<24|t<<18|k<<12|L<<6|N))),p<65536)C+=String.fromCharCode(p);else{var U=p-65536;C+=String.fromCharCode(55296|U>>10,56320|U&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(i){return UTF8ArrayToString(HEAPU8,i)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(i,o,f,p){if(!(p>0))return 0;for(var E=f,t=f+p-1,k=0;k=55296&&L<=57343&&(L=65536+((L&1023)<<10)|i.charCodeAt(++k)&1023),L<=127){if(f>=t)break;o[f++]=L}else if(L<=2047){if(f+1>=t)break;o[f++]=192|L>>6,o[f++]=128|L&63}else if(L<=65535){if(f+2>=t)break;o[f++]=224|L>>12,o[f++]=128|L>>6&63,o[f++]=128|L&63}else if(L<=2097151){if(f+3>=t)break;o[f++]=240|L>>18,o[f++]=128|L>>12&63,o[f++]=128|L>>6&63,o[f++]=128|L&63}else if(L<=67108863){if(f+4>=t)break;o[f++]=248|L>>24,o[f++]=128|L>>18&63,o[f++]=128|L>>12&63,o[f++]=128|L>>6&63,o[f++]=128|L&63}else{if(f+5>=t)break;o[f++]=252|L>>30,o[f++]=128|L>>24&63,o[f++]=128|L>>18&63,o[f++]=128|L>>12&63,o[f++]=128|L>>6&63,o[f++]=128|L&63}}return o[f]=0,f-E}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(i,o,f){return stringToUTF8Array(i,HEAPU8,o,f)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(i){for(var o=0,f=0;f=55296&&p<=57343&&(p=65536+((p&1023)<<10)|i.charCodeAt(++f)&1023),p<=127?++o:p<=2047?o+=2:p<=65535?o+=3:p<=2097151?o+=4:p<=67108863?o+=5:o+=6}return o}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function demangle(i){var o=Module.___cxa_demangle||Module.__cxa_demangle;if(o){try{var f=i.substr(1),p=lengthBytesUTF8(f)+1,E=_malloc(p);stringToUTF8(f,E,p);var t=_malloc(4),k=o(E,0,0,t);if(getValue(t,"i32")===0&&k)return Pointer_stringify(k)}catch(L){}finally{E&&_free(E),t&&_free(t),k&&_free(k)}return i}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),i}function demangleAll(i){var o=/__Z[\w\d_]+/g;return i.replace(o,function(f){var p=demangle(f);return f===p?f:f+" ["+p+"]"})}function jsStackTrace(){var i=new Error;if(!i.stack){try{throw new Error(0)}catch(o){i=o}if(!i.stack)return"(no stack trace available)"}return i.stack.toString()}function stackTrace(){var i=jsStackTrace();return Module.extraStackTrace&&(i+=` -`+Module.extraStackTrace()),demangleAll(i)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY0;){var o=i.shift();if(typeof o=="function"){o();continue}var f=o.func;typeof f=="number"?o.arg===void 0?Module.dynCall_v(f):Module.dynCall_vi(f,o.arg):f(o.arg===void 0?null:o.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(i){__ATPRERUN__.unshift(i)}Module.addOnPreRun=addOnPreRun;function addOnInit(i){__ATINIT__.unshift(i)}Module.addOnInit=addOnInit;function addOnPreMain(i){__ATMAIN__.unshift(i)}Module.addOnPreMain=addOnPreMain;function addOnExit(i){__ATEXIT__.unshift(i)}Module.addOnExit=addOnExit;function addOnPostRun(i){__ATPOSTRUN__.unshift(i)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(i,o,f){var p=f>0?f:lengthBytesUTF8(i)+1,E=new Array(p),t=stringToUTF8Array(i,E,0,E.length);return o&&(E.length=t),E}Module.intArrayFromString=intArrayFromString;function intArrayToString(i){for(var o=[],f=0;f255&&(p&=255),o.push(String.fromCharCode(p))}return o.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(i,o,f){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var p,E;f&&(E=o+lengthBytesUTF8(i),p=HEAP8[E]),stringToUTF8(i,o,Infinity),f&&(HEAP8[E]=p)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(i,o){HEAP8.set(i,o)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(i,o,f){for(var p=0;p>0]=i.charCodeAt(p);f||(HEAP8[o>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function(o,f){var p=o>>>16,E=o&65535,t=f>>>16,k=f&65535;return E*k+(p*k+E*t<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(i){return froundBuffer[0]=i,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(i){i=i>>>0;for(var o=0;o<32;o++)if(i&1<<31-o)return o;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(i){return i<0?Math.ceil(i):Math.floor(i)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(i){return i}function addRunDependency(i){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(i){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var o=dependenciesFulfilled;dependenciesFulfilled=null,o()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(i,o,f,p,E,t,k,L){return _nbind.callbackSignatureList[i].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(i,o,f,p,E,t,k,L){return ASM_CONSTS[i](o,f,p,E,t,k,L)}function _emscripten_asm_const_iiiii(i,o,f,p,E){return ASM_CONSTS[i](o,f,p,E)}function _emscripten_asm_const_iiidddddd(i,o,f,p,E,t,k,L,N){return ASM_CONSTS[i](o,f,p,E,t,k,L,N)}function _emscripten_asm_const_iiididi(i,o,f,p,E,t,k){return ASM_CONSTS[i](o,f,p,E,t,k)}function _emscripten_asm_const_iiii(i,o,f,p){return ASM_CONSTS[i](o,f,p)}function _emscripten_asm_const_iiiid(i,o,f,p,E){return ASM_CONSTS[i](o,f,p,E)}function _emscripten_asm_const_iiiiii(i,o,f,p,E,t){return ASM_CONSTS[i](o,f,p,E,t)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(i,o){__ATEXIT__.unshift({func:i,arg:o})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(i,o,f,p){var E=arguments.length,t=E<3?o:p===null?p=Object.getOwnPropertyDescriptor(o,f):p,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,o,f,p);else for(var L=i.length-1;L>=0;L--)(k=i[L])&&(t=(E<3?k(t):E>3?k(o,f,t):k(o,f))||t);return E>3&&t&&Object.defineProperty(o,f,t),t}function _defineHidden(i){return function(o,f){Object.defineProperty(o,f,{configurable:!1,enumerable:!1,value:i,writable:!0})}}var _nbind={};function __nbind_free_external(i){_nbind.externalList[i].dereference(i)}function __nbind_reference_external(i){_nbind.externalList[i].reference()}function _llvm_stackrestore(i){var o=_llvm_stacksave,f=o.LLVM_SAVEDSTACKS[i];o.LLVM_SAVEDSTACKS.splice(i,1),Runtime.stackRestore(f)}function __nbind_register_pool(i,o,f,p){_nbind.Pool.pageSize=i,_nbind.Pool.usedPtr=o/4,_nbind.Pool.rootPtr=f,_nbind.Pool.pagePtr=p/4,HEAP32[o/4]=16909060,HEAP8[o]==1&&(_nbind.bigEndian=!0),HEAP32[o/4]=0,_nbind.makeTypeKindTbl=(t={},t[1024]=_nbind.PrimitiveType,t[64]=_nbind.Int64Type,t[2048]=_nbind.BindClass,t[3072]=_nbind.BindClassPtr,t[4096]=_nbind.SharedClassPtr,t[5120]=_nbind.ArrayType,t[6144]=_nbind.ArrayType,t[7168]=_nbind.CStringType,t[9216]=_nbind.CallbackType,t[10240]=_nbind.BindType,t),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var E=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});E.proto=Module,_nbind.BindClass.list.push(E);var t}function _emscripten_set_main_loop_timing(i,o){if(Browser.mainLoop.timingMode=i,Browser.mainLoop.timingValue=o,!Browser.mainLoop.func)return 1;if(i==0)Browser.mainLoop.scheduler=function(){var k=Math.max(0,Browser.mainLoop.tickStartTime+o-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,k)},Browser.mainLoop.method="timeout";else if(i==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(i==2){if(!window.setImmediate){let t=function(k){k.source===window&&k.data===p&&(k.stopPropagation(),f.shift()())};var E=t,f=[],p="setimmediate";window.addEventListener("message",t,!0),window.setImmediate=function(L){f.push(L),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(L),window.postMessage({target:p})):window.postMessage(p,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(i,o,f,p,E){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=i,Browser.mainLoop.arg=p;var t;typeof p!="undefined"?t=function(){Module.dynCall_vi(i,p)}:t=function(){Module.dynCall_v(i)};var k=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var N=Date.now(),C=Browser.mainLoop.queue.shift();if(C.func(C.arg),Browser.mainLoop.remainingBlockers){var U=Browser.mainLoop.remainingBlockers,q=U%1==0?U-1:Math.floor(U);C.counted?Browser.mainLoop.remainingBlockers=q:(q=q+.5,Browser.mainLoop.remainingBlockers=(8*U+q)/9)}if(console.log('main loop blocker "'+C.name+'" took '+(Date.now()-N)+" ms"),Browser.mainLoop.updateStatus(),k1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(t),!(k0?_emscripten_set_main_loop_timing(0,1e3/o):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),f)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var i=Browser.mainLoop.timingMode,o=Browser.mainLoop.timingValue,f=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(f,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(i,o),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var i=Module.statusMessage||"Please wait...",o=Browser.mainLoop.remainingBlockers,f=Browser.mainLoop.expectedBlockers;o?o=6;){var rt=le>>Ue-6&63;Ue-=6,Oe+=ze[rt]}return Ue==2?(Oe+=ze[(le&3)<<4],Oe+=pe+pe):Ue==4&&(Oe+=ze[(le&15)<<2],Oe+=pe),Oe}m.src="data:audio/x-"+k.substr(-3)+";base64,"+he(t),U(m)},m.src=ne,Browser.safeSetTimeout(function(){U(m)},1e4)}else return q()},Module.preloadPlugins.push(o);function f(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var p=Module.canvas;p&&(p.requestPointerLock=p.requestPointerLock||p.mozRequestPointerLock||p.webkitRequestPointerLock||p.msRequestPointerLock||function(){},p.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},p.exitPointerLock=p.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",f,!1),document.addEventListener("mozpointerlockchange",f,!1),document.addEventListener("webkitpointerlockchange",f,!1),document.addEventListener("mspointerlockchange",f,!1),Module.elementPointerLock&&p.addEventListener("click",function(E){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),E.preventDefault())},!1))},createContext:function(i,o,f,p){if(o&&Module.ctx&&i==Module.canvas)return Module.ctx;var E,t;if(o){var k={antialias:!1,alpha:!1};if(p)for(var L in p)k[L]=p[L];t=GL.createContext(i,k),t&&(E=GL.getContext(t).GLctx)}else E=i.getContext("2d");return E?(f&&(o||assert(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=E,o&&GL.makeContextCurrent(t),Module.useWebGL=o,Browser.moduleContextCreatedCallbacks.forEach(function(N){N()}),Browser.init()),E):null},destroyContext:function(i,o,f){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(i,o,f){Browser.lockPointer=i,Browser.resizeCanvas=o,Browser.vrDevice=f,typeof Browser.lockPointer=="undefined"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas=="undefined"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice=="undefined"&&(Browser.vrDevice=null);var p=Module.canvas;function E(){Browser.isFullscreen=!1;var k=p.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===k?(p.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},p.exitFullscreen=p.exitFullscreen.bind(document),Browser.lockPointer&&p.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(k.parentNode.insertBefore(p,k),k.parentNode.removeChild(k),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(p)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",E,!1),document.addEventListener("mozfullscreenchange",E,!1),document.addEventListener("webkitfullscreenchange",E,!1),document.addEventListener("MSFullscreenChange",E,!1));var t=document.createElement("div");p.parentNode.insertBefore(t,p),t.appendChild(p),t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||(t.webkitRequestFullscreen?function(){t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(t.webkitRequestFullScreen?function(){t.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),f?t.requestFullscreen({vrDisplay:f}):t.requestFullscreen()},requestFullScreen:function(i,o,f){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(p,E,t){return Browser.requestFullscreen(p,E,t)},Browser.requestFullscreen(i,o,f)},nextRAF:0,fakeRequestAnimationFrame:function(i){var o=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=o+1e3/60;else for(;o+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var f=Math.max(Browser.nextRAF-o,0);setTimeout(i,f)},requestAnimationFrame:function(o){typeof window=="undefined"?Browser.fakeRequestAnimationFrame(o):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(o))},safeCallback:function(i){return function(){if(!ABORT)return i.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var i=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],i.forEach(function(o){o()})}},safeRequestAnimationFrame:function(i){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))})},safeSetTimeout:function(i,o){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))},o)},safeSetInterval:function(i,o){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&i()},o)},getMimetype:function(i){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[i.substr(i.lastIndexOf(".")+1)]},getUserMedia:function(i){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(i)},getMovementX:function(i){return i.movementX||i.mozMovementX||i.webkitMovementX||0},getMovementY:function(i){return i.movementY||i.mozMovementY||i.webkitMovementY||0},getMouseWheelDelta:function(i){var o=0;switch(i.type){case"DOMMouseScroll":o=i.detail;break;case"mousewheel":o=i.wheelDelta;break;case"wheel":o=i.deltaY;break;default:throw"unrecognized mouse wheel event: "+i.type}return o},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(i){if(Browser.pointerLock)i.type!="mousemove"&&"mozMovementX"in i?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(i),Browser.mouseMovementY=Browser.getMovementY(i)),typeof SDL!="undefined"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var o=Module.canvas.getBoundingClientRect(),f=Module.canvas.width,p=Module.canvas.height,E=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset,t=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(i.type==="touchstart"||i.type==="touchend"||i.type==="touchmove"){var k=i.touch;if(k===void 0)return;var L=k.pageX-(E+o.left),N=k.pageY-(t+o.top);L=L*(f/o.width),N=N*(p/o.height);var C={x:L,y:N};if(i.type==="touchstart")Browser.lastTouches[k.identifier]=C,Browser.touches[k.identifier]=C;else if(i.type==="touchend"||i.type==="touchmove"){var U=Browser.touches[k.identifier];U||(U=C),Browser.lastTouches[k.identifier]=U,Browser.touches[k.identifier]=C}return}var q=i.pageX-(E+o.left),W=i.pageY-(t+o.top);q=q*(f/o.width),W=W*(p/o.height),Browser.mouseMovementX=q-Browser.mouseX,Browser.mouseMovementY=W-Browser.mouseY,Browser.mouseX=q,Browser.mouseY=W}},asyncLoad:function(i,o,f,p){var E=p?"":getUniqueRunDependency("al "+i);Module.readAsync(i,function(t){assert(t,'Loading data file "'+i+'" failed (no arrayBuffer).'),o(new Uint8Array(t)),E&&removeRunDependency(E)},function(t){if(f)f();else throw'Loading data file "'+i+'" failed.'}),E&&addRunDependency(E)},resizeListeners:[],updateResizeListeners:function(){var i=Module.canvas;Browser.resizeListeners.forEach(function(o){o(i.width,i.height)})},setCanvasSize:function(i,o,f){var p=Module.canvas;Browser.updateCanvasDimensions(p,i,o),f||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i&~8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},updateCanvasDimensions:function(i,o,f){o&&f?(i.widthNative=o,i.heightNative=f):(o=i.widthNative,f=i.heightNative);var p=o,E=f;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(p/E>2];return o},getStr:function(){var i=Pointer_stringify(SYSCALLS.get());return i},get64:function(){var i=SYSCALLS.get(),o=SYSCALLS.get();return i>=0?assert(o===0):assert(o===-1),i},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(i,o){SYSCALLS.varargs=o;try{var f=SYSCALLS.getStreamFromFD();return FS.close(f),0}catch(p){return(typeof FS=="undefined"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall54(i,o){SYSCALLS.varargs=o;try{return 0}catch(f){return(typeof FS=="undefined"||!(f instanceof FS.ErrnoError))&&abort(f),-f.errno}}function _typeModule(i){var o=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr"],[640,1,"std::unique_ptr"],[5120,1,"std::vector"],[6144,2,"std::array"],[9216,-1,"std::function"]];function f(N,C,U,q,W,ne){if(C==1){var m=q&896;(m==128||m==256||m==384)&&(N="X const")}var we;return ne?we=U.replace("X",N).replace("Y",W):we=N.replace("X",U).replace("Y",W),we.replace(/([*&]) (?=[*&])/g,"$1")}function p(N,C,U,q,W){throw new Error(N+" type "+U.replace("X",C+"?")+(q?" with flag "+q:"")+" in "+W)}function E(N,C,U,q,W,ne,m,we){ne===void 0&&(ne="X"),we===void 0&&(we=1);var Se=U(N);if(Se)return Se;var he=q(N),ge=he.placeholderFlag,ze=o[ge];m&&ze&&(ne=f(m[2],m[0],ne,ze[0],"?",!0));var pe;ge==0&&(pe="Unbound"),ge>=10&&(pe="Corrupt"),we>20&&(pe="Deeply nested"),pe&&p(pe,N,ne,ge,W||"?");var Oe=he.paramList[0],le=E(Oe,C,U,q,W,ne,ze,we+1),Ue,Ge={flags:ze[0],id:N,name:"",paramList:[le]},rt=[],wt="?";switch(he.placeholderFlag){case 1:Ue=le.spec;break;case 2:if((le.flags&15360)==1024&&le.spec.ptrSize==1){Ge.flags=7168;break}case 3:case 6:case 5:Ue=le.spec,(le.flags&15360)!=2048;break;case 8:wt=""+he.paramList[1],Ge.paramList.push(he.paramList[1]);break;case 9:for(var xt=0,$e=he.paramList[1];xt<$e.length;xt++){var ft=$e[xt],Ke=E(ft,C,U,q,W,ne,ze,we+1);rt.push(Ke.name),Ge.paramList.push(Ke)}wt=rt.join(", ");break;default:break}if(Ge.name=f(ze[2],ze[0],le.name,le.flags,wt),Ue){for(var jt=0,$t=Object.keys(Ue);jt<$t.length;jt++){var at=$t[jt];Ge[at]=Ge[at]||Ue[at]}Ge.flags|=Ue.flags}return t(C,Ge)}function t(N,C){var U=C.flags,q=U&896,W=U&15360;return!C.name&&W==1024&&(C.ptrSize==1?C.name=(U&16?"":(U&8?"un":"")+"signed ")+"char":C.name=(U&8?"u":"")+(U&32?"float":"int")+(C.ptrSize*8+"_t")),C.ptrSize==8&&!(U&32)&&(W=64),W==2048&&(q==512||q==640?W=4096:q&&(W=3072)),N(W,C)}var k=function(){function N(C){this.id=C.id,this.name=C.name,this.flags=C.flags,this.spec=C}return N.prototype.toString=function(){return this.name},N}(),L={Type:k,getComplexType:E,makeType:t,structureList:o};return i.output=L,i.output||L}function __nbind_register_type(i,o){var f=_nbind.readAsciiString(o),p={flags:10240,id:i,name:f};_nbind.makeType(_nbind.constructType,p)}function __nbind_register_callback_signature(i,o){var f=_nbind.readTypeIdList(i,o),p=_nbind.callbackSignatureList.length;return _nbind.callbackSignatureList[p]=_nbind.makeJSCaller(f),p}function __extends(i,o){for(var f in o)o.hasOwnProperty(f)&&(i[f]=o[f]);function p(){this.constructor=i}p.prototype=o.prototype,i.prototype=new p}function __nbind_register_class(i,o,f,p,E,t,k){var L=_nbind.readAsciiString(k),N=_nbind.readPolicyList(o),C=HEAPU32.subarray(i/4,i/4+2),U={flags:2048|(N.Value?2:0),id:C[0],name:L},q=_nbind.makeType(_nbind.constructType,U);q.ptrType=_nbind.getComplexType(C[1],_nbind.constructType,_nbind.getType,_nbind.queryType),q.destroy=_nbind.makeMethodCaller(q.ptrType,{boundID:U.id,flags:0,name:"destroy",num:0,ptr:t,title:q.name+".free",typeList:["void","uint32_t","uint32_t"]}),E&&(q.superIdList=Array.prototype.slice.call(HEAPU32.subarray(f/4,f/4+E)),q.upcastList=Array.prototype.slice.call(HEAPU32.subarray(p/4,p/4+E))),Module[q.name]=q.makeBound(N),_nbind.BindClass.list.push(q)}function _removeAccessorPrefix(i){var o=/^[Gg]et_?([A-Z]?([A-Z]?))/;return i.replace(o,function(f,p,E){return E?p:p.toLowerCase()})}function __nbind_register_function(i,o,f,p,E,t,k,L,N,C){var U=_nbind.getType(i),q=_nbind.readPolicyList(o),W=_nbind.readTypeIdList(f,p),ne;if(k==5)ne=[{direct:E,name:"__nbindConstructor",ptr:0,title:U.name+" constructor",typeList:["uint32_t"].concat(W.slice(1))},{direct:t,name:"__nbindValueConstructor",ptr:0,title:U.name+" value constructor",typeList:["void","uint32_t"].concat(W.slice(1))}];else{var m=_nbind.readAsciiString(L),we=(U.name&&U.name+".")+m;(k==3||k==4)&&(m=_removeAccessorPrefix(m)),ne=[{boundID:i,direct:t,name:m,ptr:E,title:we,typeList:W}]}for(var Se=0,he=ne;Se>2]=i),i}function _llvm_stacksave(){var i=_llvm_stacksave;return i.LLVM_SAVEDSTACKS||(i.LLVM_SAVEDSTACKS=[]),i.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),i.LLVM_SAVEDSTACKS.length-1}function ___syscall140(i,o){SYSCALLS.varargs=o;try{var f=SYSCALLS.getStreamFromFD(),p=SYSCALLS.get(),E=SYSCALLS.get(),t=SYSCALLS.get(),k=SYSCALLS.get(),L=E;return FS.llseek(f,L,k),HEAP32[t>>2]=f.position,f.getdents&&L===0&&k===0&&(f.getdents=null),0}catch(N){return(typeof FS=="undefined"||!(N instanceof FS.ErrnoError))&&abort(N),-N.errno}}function ___syscall146(i,o){SYSCALLS.varargs=o;try{var f=SYSCALLS.get(),p=SYSCALLS.get(),E=SYSCALLS.get(),t=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(U,q){var W=___syscall146.buffers[U];assert(W),q===0||q===10?((U===1?Module.print:Module.printErr)(UTF8ArrayToString(W,0)),W.length=0):W.push(q)});for(var k=0;k>2],N=HEAP32[p+(k*8+4)>>2],C=0;Ci.pageSize/2||o>i.pageSize-f){var p=_nbind.typeNameTbl.NBind.proto;return p.lalloc(o)}else return HEAPU32[i.usedPtr]=f+o,i.rootPtr+f},i.lreset=function(o,f){var p=HEAPU32[i.pagePtr];if(p){var E=_nbind.typeNameTbl.NBind.proto;E.lreset(o,f)}else HEAPU32[i.usedPtr]=o},i}();_nbind.Pool=Pool;function constructType(i,o){var f=i==10240?_nbind.makeTypeNameTbl[o.name]||_nbind.BindType:_nbind.makeTypeKindTbl[i],p=new f(o);return typeIdTbl[o.id]=p,_nbind.typeNameTbl[o.name]=p,p}_nbind.constructType=constructType;function getType(i){return typeIdTbl[i]}_nbind.getType=getType;function queryType(i){var o=HEAPU8[i],f=_nbind.structureList[o][1];i/=4,f<0&&(++i,f=HEAPU32[i]+1);var p=Array.prototype.slice.call(HEAPU32.subarray(i+1,i+1+f));return o==9&&(p=[p[0],p.slice(1)]),{paramList:p,placeholderFlag:o}}_nbind.queryType=queryType;function getTypes(i,o){return i.map(function(f){return typeof f=="number"?_nbind.getComplexType(f,constructType,getType,queryType,o):_nbind.typeNameTbl[f]})}_nbind.getTypes=getTypes;function readTypeIdList(i,o){return Array.prototype.slice.call(HEAPU32,i/4,i/4+o)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(i){for(var o=i;HEAPU8[o++];);return String.fromCharCode.apply("",HEAPU8.subarray(i,o-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(i){var o={};if(i)for(;;){var f=HEAPU32[i/4];if(!f)break;o[readAsciiString(f)]=!0,i+=4}return o}_nbind.readPolicyList=readPolicyList;function getDynCall(i,o){var f={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},p=i.map(function(t){return f[t.name]||"i"}).join(""),E=Module["dynCall_"+p];if(!E)throw new Error("dynCall_"+p+" not found for "+o+"("+i.map(function(t){return t.name}).join(", ")+")");return E}_nbind.getDynCall=getDynCall;function addMethod(i,o,f,p){var E=i[o];i.hasOwnProperty(o)&&E?((E.arity||E.arity===0)&&(E=_nbind.makeOverloader(E,E.arity),i[o]=E),E.addMethod(f,p)):(f.arity=p,i[o]=f)}_nbind.addMethod=addMethod;function throwError(i){throw new Error(i)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(i){__extends(o,i);function o(){var f=i!==null&&i.apply(this,arguments)||this;return f.heap=HEAPU32,f.ptrSize=4,f}return o.prototype.needsWireRead=function(f){return!!this.wireRead||!!this.makeWireRead},o.prototype.needsWireWrite=function(f){return!!this.wireWrite||!!this.makeWireWrite},o}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(i){__extends(o,i);function o(f){var p=i.call(this,f)||this,E=f.flags&32?{32:HEAPF32,64:HEAPF64}:f.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return p.heap=E[f.ptrSize*8],p.ptrSize=f.ptrSize,p}return o.prototype.needsWireWrite=function(f){return!!f&&!!f.Strict},o.prototype.makeWireWrite=function(f,p){return p&&p.Strict&&function(E){if(typeof E=="number")return E;throw new Error("Type mismatch")}},o}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(i,o){if(i==null){if(o&&o.Nullable)return 0;throw new Error("Type mismatch")}if(o&&o.Strict){if(typeof i!="string")throw new Error("Type mismatch")}else i=i.toString();var f=Module.lengthBytesUTF8(i)+1,p=_nbind.Pool.lalloc(f);return Module.stringToUTF8Array(i,HEAPU8,p,f),p}_nbind.pushCString=pushCString;function popCString(i){return i===0?null:Module.Pointer_stringify(i)}_nbind.popCString=popCString;var CStringType=function(i){__extends(o,i);function o(){var f=i!==null&&i.apply(this,arguments)||this;return f.wireRead=popCString,f.wireWrite=pushCString,f.readResources=[_nbind.resources.pool],f.writeResources=[_nbind.resources.pool],f}return o.prototype.makeWireWrite=function(f,p){return function(E){return pushCString(E,p)}},o}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(i){__extends(o,i);function o(){var f=i!==null&&i.apply(this,arguments)||this;return f.wireRead=function(p){return!!p},f}return o.prototype.needsWireWrite=function(f){return!!f&&!!f.Strict},o.prototype.makeWireRead=function(f){return"!!("+f+")"},o.prototype.makeWireWrite=function(f,p){return p&&p.Strict&&function(E){if(typeof E=="boolean")return E;throw new Error("Type mismatch")}||f},o}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function i(){}return i.prototype.persist=function(){this.__nbindState|=1},i}();_nbind.Wrapper=Wrapper;function makeBound(i,o){var f=function(p){__extends(E,p);function E(t,k,L,N){var C=p.call(this)||this;if(!(C instanceof E))return new(Function.prototype.bind.apply(E,Array.prototype.concat.apply([null],arguments)));var U=k,q=L,W=N;if(t!==_nbind.ptrMarker){var ne=C.__nbindConstructor.apply(C,arguments);U=4096|512,W=HEAPU32[ne/4],q=HEAPU32[ne/4+1]}var m={configurable:!0,enumerable:!1,value:null,writable:!1},we={__nbindFlags:U,__nbindPtr:q};W&&(we.__nbindShared=W,_nbind.mark(C));for(var Se=0,he=Object.keys(we);Se>=1;var f=_nbind.valueList[i];return _nbind.valueList[i]=firstFreeValue,firstFreeValue=i,f}else{if(o)return _nbind.popShared(i,o);throw new Error("Invalid value slot "+i)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(i){return typeof i=="number"?i:pushValue(i)*4096+valueBase}function pop64(i){return i=3?k=Buffer.from(t):k=new Buffer(t),k.copy(p)}else getBuffer(p).set(t)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var i=0,o=dirtyList;i>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(i,o,f,p,E,t){try{Module.dynCall_viiiii(i,o,f,p,E,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_vif(i,o,f){try{Module.dynCall_vif(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_vid(i,o,f){try{Module.dynCall_vid(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_fiff(i,o,f,p){try{return Module.dynCall_fiff(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_vi(i,o){try{Module.dynCall_vi(i,o)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_vii(i,o,f){try{Module.dynCall_vii(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_ii(i,o){try{return Module.dynCall_ii(i,o)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_viddi(i,o,f,p,E){try{Module.dynCall_viddi(i,o,f,p,E)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_vidd(i,o,f,p){try{Module.dynCall_vidd(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_iiii(i,o,f,p){try{return Module.dynCall_iiii(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_diii(i,o,f,p){try{return Module.dynCall_diii(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_di(i,o){try{return Module.dynCall_di(i,o)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_iid(i,o,f){try{return Module.dynCall_iid(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_iii(i,o,f){try{return Module.dynCall_iii(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_viiddi(i,o,f,p,E,t){try{Module.dynCall_viiddi(i,o,f,p,E,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_viiiiii(i,o,f,p,E,t,k){try{Module.dynCall_viiiiii(i,o,f,p,E,t,k)}catch(L){if(typeof L!="number"&&L!=="longjmp")throw L;Module.setThrew(1,0)}}function invoke_dii(i,o,f){try{return Module.dynCall_dii(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_i(i){try{return Module.dynCall_i(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_iiiiii(i,o,f,p,E,t){try{return Module.dynCall_iiiiii(i,o,f,p,E,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_viiid(i,o,f,p,E){try{Module.dynCall_viiid(i,o,f,p,E)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_viififi(i,o,f,p,E,t,k){try{Module.dynCall_viififi(i,o,f,p,E,t,k)}catch(L){if(typeof L!="number"&&L!=="longjmp")throw L;Module.setThrew(1,0)}}function invoke_viii(i,o,f,p){try{Module.dynCall_viii(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_v(i){try{Module.dynCall_v(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viid(i,o,f,p){try{Module.dynCall_viid(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_idd(i,o,f){try{return Module.dynCall_idd(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_viiii(i,o,f,p,E){try{Module.dynCall_viiii(i,o,f,p,E)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:Infinity},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(i,o,f){var p=new i.Int8Array(f),E=new i.Int16Array(f),t=new i.Int32Array(f),k=new i.Uint8Array(f),L=new i.Uint16Array(f),N=new i.Uint32Array(f),C=new i.Float32Array(f),U=new i.Float64Array(f),q=o.DYNAMICTOP_PTR|0,W=o.tempDoublePtr|0,ne=o.ABORT|0,m=o.STACKTOP|0,we=o.STACK_MAX|0,Se=o.cttz_i8|0,he=o.___dso_handle|0,ge=0,ze=0,pe=0,Oe=0,le=i.NaN,Ue=i.Infinity,Ge=0,rt=0,wt=0,xt=0,$e=0,ft=0,Ke=i.Math.floor,jt=i.Math.abs,$t=i.Math.sqrt,at=i.Math.pow,Q=i.Math.cos,ae=i.Math.sin,Ce=i.Math.tan,ue=i.Math.acos,je=i.Math.asin,ct=i.Math.atan,At=i.Math.atan2,en=i.Math.exp,ln=i.Math.log,An=i.Math.ceil,nr=i.Math.imul,un=i.Math.min,Wt=i.Math.max,vr=i.Math.clz32,w=i.Math.fround,Ut=o.abort,Vn=o.assert,fr=o.enlargeMemory,Fr=o.getTotalMemory,ur=o.abortOnCannotGrowMemory,br=o.invoke_viiiii,Kt=o.invoke_vif,vu=o.invoke_vid,a0=o.invoke_fiff,So=o.invoke_vi,Go=o.invoke_vii,Os=o.invoke_ii,Yo=o.invoke_viddi,Ko=o.invoke_vidd,qt=o.invoke_iiii,_i=o.invoke_diii,eu=o.invoke_di,ai=o.invoke_iid,mr=o.invoke_iii,Xo=o.invoke_viiddi,W0=o.invoke_viiiiii,Lu=o.invoke_dii,V0=o.invoke_i,Hr=o.invoke_iiiiii,To=o.invoke_viiid,Co=o.invoke_viififi,L0=o.invoke_viii,tu=o.invoke_v,Si=o.invoke_viid,ks=o.invoke_idd,Hl=o.invoke_viiii,F0=o._emscripten_asm_const_iiiii,f0=o._emscripten_asm_const_iiidddddd,Pr=o._emscripten_asm_const_iiiid,Ei=o.__nbind_reference_external,G0=o._emscripten_asm_const_iiiiiiii,fi=o._removeAccessorPrefix,Zt=o._typeModule,Ln=o.__nbind_register_pool,Di=o.__decorate,ci=o._llvm_stackrestore,Ht=o.___cxa_atexit,Du=o.__extends,Yi=o.__nbind_get_value_object,Y0=o.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Ui=o._emscripten_set_main_loop_timing,Wl=o.__nbind_register_primitive,xo=o.__nbind_register_type,ni=o._emscripten_memcpy_big,oo=o.__nbind_register_function,Vl=o.___setErrNo,Ao=o.__nbind_register_class,Ms=o.__nbind_finish,Xn=o._abort,Qo=o._nbind_value,lo=o._llvm_stacksave,b0=o.___syscall54,yl=o._defineHidden,Ro=o._emscripten_set_main_loop,Et=o._emscripten_get_now,Pt=o.__nbind_register_callback_signature,Bn=o._emscripten_asm_const_iiiiii,Ir=o.__nbind_free_external,ji=o._emscripten_asm_const_iiii,Wr=o._emscripten_asm_const_iiididi,wu=o.___syscall6,c0=o._atexit,Ti=o.___syscall140,d0=o.___syscall146,as=w(0);let St=w(0);function so(e){e=e|0;var n=0;return n=m,m=m+e|0,m=m+15&-16,n|0}function Jo(){return m|0}function Gl(e){e=e|0,m=e}function Fu(e,n){e=e|0,n=n|0,m=e,we=n}function fs(e,n){e=e|0,n=n|0,ge||(ge=e,ze=n)}function P0(e){e=e|0,ft=e}function X(){return ft|0}function _e(){var e=0,n=0;pr(8104,8,400)|0,pr(8504,408,540)|0,e=9044,n=e+44|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));p[9088]=0,p[9089]=1,t[2273]=0,t[2274]=948,t[2275]=948,Ht(17,8104,he|0)|0}function Ne(e){e=e|0,ic(e+948|0)}function Me(e){return e=w(e),((cr(e)|0)&2147483647)>>>0>2139095040|0}function dt(e,n,r){e=e|0,n=n|0,r=r|0;e:do if(t[e+(n<<3)+4>>2]|0)e=e+(n<<3)|0;else{if((n|2|0)==3?t[e+60>>2]|0:0){e=e+56|0;break}switch(n|0){case 0:case 2:case 4:case 5:{if(t[e+52>>2]|0){e=e+48|0;break e}break}default:}if(t[e+68>>2]|0){e=e+64|0;break}else{e=(n|1|0)==5?948:r;break}}while(0);return e|0}function Hn(e){e=e|0;var n=0;return n=C_(1e3)|0,Dn(e,(n|0)!=0,2456),t[2276]=(t[2276]|0)+1,pr(n|0,8104,1e3)|0,p[e+2>>0]|0&&(t[n+4>>2]=2,t[n+12>>2]=4),t[n+976>>2]=e,n|0}function Dn(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,_l(e,5,3197,u)),m=l}function or(){return Hn(956)|0}function mi(e){e=e|0;var n=0;return n=cn(1e3)|0,Su(n,e),Dn(t[e+976>>2]|0,1,2456),t[2276]=(t[2276]|0)+1,t[n+944>>2]=0,n|0}function Su(e,n){e=e|0,n=n|0;var r=0;pr(e|0,n|0,948)|0,na(e+948|0,n+948|0),r=e+960|0,e=n+960|0,n=r+40|0;do t[r>>2]=t[e>>2],r=r+4|0,e=e+4|0;while((r|0)<(n|0))}function bu(e){e=e|0;var n=0,r=0,u=0,l=0;if(n=e+944|0,r=t[n>>2]|0,r|0&&(Pu(r+948|0,e)|0,t[n>>2]=0),r=mu(e)|0,r|0){n=0;do t[(yi(e,n)|0)+944>>2]=0,n=n+1|0;while((n|0)!=(r|0))}r=e+948|0,u=t[r>>2]|0,l=e+952|0,n=t[l>>2]|0,(n|0)!=(u|0)&&(t[l>>2]=n+(~((n+-4-u|0)>>>2)<<2)),Oo(r),x_(e),t[2276]=(t[2276]|0)+-1}function Pu(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0;u=t[e>>2]|0,D=e+4|0,r=t[D>>2]|0,s=r;e:do if((u|0)==(r|0))l=u,h=4;else for(e=u;;){if((t[e>>2]|0)==(n|0)){l=e,h=4;break e}if(e=e+4|0,(e|0)==(r|0)){e=0;break}}while(0);return(h|0)==4&&((l|0)!=(r|0)?(u=l+4|0,e=s-u|0,n=e>>2,n&&(Iy(l|0,u|0,e|0)|0,r=t[D>>2]|0),e=l+(n<<2)|0,(r|0)==(e|0)||(t[D>>2]=r+(~((r+-4-e|0)>>>2)<<2)),e=1):e=0),e|0}function mu(e){return e=e|0,(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2|0}function yi(e,n){e=e|0,n=n|0;var r=0;return r=t[e+948>>2]|0,(t[e+952>>2]|0)-r>>2>>>0>n>>>0?e=t[r+(n<<2)>>2]|0:e=0,e|0}function Oo(e){e=e|0;var n=0,r=0,u=0,l=0;u=m,m=m+32|0,n=u,l=t[e>>2]|0,r=(t[e+4>>2]|0)-l|0,((t[e+8>>2]|0)-l|0)>>>0>r>>>0&&(l=r>>2,Y(n,l,l,e+8|0),Qr(e,n),Jr(n)),m=u}function Tu(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0;M=mu(e)|0;do if(M|0){if((t[(yi(e,0)|0)+944>>2]|0)==(e|0)){if(!(Pu(e+948|0,n)|0))break;pr(n+400|0,8504,540)|0,t[n+944>>2]=0,Gn(e);break}h=t[(t[e+976>>2]|0)+12>>2]|0,D=e+948|0,S=(h|0)==0,r=0,s=0;do u=t[(t[D>>2]|0)+(s<<2)>>2]|0,(u|0)==(n|0)?Gn(e):(l=mi(u)|0,t[(t[D>>2]|0)+(r<<2)>>2]=l,t[l+944>>2]=e,S||$E[h&15](u,l,e,r),r=r+1|0),s=s+1|0;while((s|0)!=(M|0));if(r>>>0>>0){S=e+948|0,D=e+952|0,h=r,r=t[D>>2]|0;do s=(t[S>>2]|0)+(h<<2)|0,u=s+4|0,l=r-u|0,n=l>>2,n&&(Iy(s|0,u|0,l|0)|0,r=t[D>>2]|0),l=r,u=s+(n<<2)|0,(l|0)!=(u|0)&&(r=l+(~((l+-4-u|0)>>>2)<<2)|0,t[D>>2]=r),h=h+1|0;while((h|0)!=(M|0))}}while(0)}function ao(e){e=e|0;var n=0,r=0,u=0,l=0;Iu(e,(mu(e)|0)==0,2491),Iu(e,(t[e+944>>2]|0)==0,2545),n=e+948|0,r=t[n>>2]|0,u=e+952|0,l=t[u>>2]|0,(l|0)!=(r|0)&&(t[u>>2]=l+(~((l+-4-r|0)>>>2)<<2)),Oo(n),n=e+976|0,r=t[n>>2]|0,pr(e|0,8104,1e3)|0,p[r+2>>0]|0&&(t[e+4>>2]=2,t[e+12>>2]=4),t[n>>2]=r}function Iu(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,sr(e,5,3197,u)),m=l}function Oa(){return t[2276]|0}function p0(){var e=0;return e=C_(20)|0,Zs((e|0)!=0,2592),t[2277]=(t[2277]|0)+1,t[e>>2]=t[239],t[e+4>>2]=t[240],t[e+8>>2]=t[241],t[e+12>>2]=t[242],t[e+16>>2]=t[243],e|0}function Zs(e,n){e=e|0,n=n|0;var r=0,u=0;u=m,m=m+16|0,r=u,e||(t[r>>2]=n,sr(0,5,3197,r)),m=u}function K0(e){e=e|0,x_(e),t[2277]=(t[2277]|0)+-1}function $s(e,n){e=e|0,n=n|0;var r=0;n?(Iu(e,(mu(e)|0)==0,2629),r=1):(r=0,n=0),t[e+964>>2]=n,t[e+988>>2]=r}function ka(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,s=u+8|0,l=u+4|0,h=u,t[l>>2]=n,Iu(e,(t[n+944>>2]|0)==0,2709),Iu(e,(t[e+964>>2]|0)==0,2763),cs(e),n=e+948|0,t[h>>2]=(t[n>>2]|0)+(r<<2),t[s>>2]=t[h>>2],w0(n,s,l)|0,t[(t[l>>2]|0)+944>>2]=e,Gn(e),m=u}function cs(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;if(r=mu(e)|0,r|0?(t[(yi(e,0)|0)+944>>2]|0)!=(e|0):0){u=t[(t[e+976>>2]|0)+12>>2]|0,l=e+948|0,s=(u|0)==0,n=0;do h=t[(t[l>>2]|0)+(n<<2)>>2]|0,D=mi(h)|0,t[(t[l>>2]|0)+(n<<2)>>2]=D,t[D+944>>2]=e,s||$E[u&15](h,D,e,n),n=n+1|0;while((n|0)!=(r|0))}}function w0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0;Qe=m,m=m+64|0,P=Qe+52|0,D=Qe+48|0,K=Qe+28|0,Pe=Qe+24|0,Ee=Qe+20|0,ve=Qe,u=t[e>>2]|0,s=u,n=u+((t[n>>2]|0)-s>>2<<2)|0,u=e+4|0,l=t[u>>2]|0,h=e+8|0;do if(l>>>0<(t[h>>2]|0)>>>0){if((n|0)==(l|0)){t[n>>2]=t[r>>2],t[u>>2]=(t[u>>2]|0)+4;break}Ur(e,n,l,n+4|0),n>>>0<=r>>>0&&(r=(t[u>>2]|0)>>>0>r>>>0?r+4|0:r),t[n>>2]=t[r>>2]}else{u=(l-s>>2)+1|0,l=x0(e)|0,l>>>0>>0&&li(e),O=t[e>>2]|0,M=(t[h>>2]|0)-O|0,s=M>>1,Y(ve,M>>2>>>0>>1>>>0?s>>>0>>0?u:s:l,n-O>>2,e+8|0),O=ve+8|0,u=t[O>>2]|0,s=ve+12|0,M=t[s>>2]|0,h=M,S=u;do if((u|0)==(M|0)){if(M=ve+4|0,u=t[M>>2]|0,We=t[ve>>2]|0,l=We,u>>>0<=We>>>0){u=h-l>>1,u=(u|0)==0?1:u,Y(K,u,u>>>2,t[ve+16>>2]|0),t[Pe>>2]=t[M>>2],t[Ee>>2]=t[O>>2],t[D>>2]=t[Pe>>2],t[P>>2]=t[Ee>>2],hi(K,D,P),u=t[ve>>2]|0,t[ve>>2]=t[K>>2],t[K>>2]=u,u=K+4|0,We=t[M>>2]|0,t[M>>2]=t[u>>2],t[u>>2]=We,u=K+8|0,We=t[O>>2]|0,t[O>>2]=t[u>>2],t[u>>2]=We,u=K+12|0,We=t[s>>2]|0,t[s>>2]=t[u>>2],t[u>>2]=We,Jr(K),u=t[O>>2]|0;break}s=u,h=((s-l>>2)+1|0)/-2|0,D=u+(h<<2)|0,l=S-s|0,s=l>>2,s&&(Iy(D|0,u|0,l|0)|0,u=t[M>>2]|0),We=D+(s<<2)|0,t[O>>2]=We,t[M>>2]=u+(h<<2),u=We}while(0);t[u>>2]=t[r>>2],t[O>>2]=(t[O>>2]|0)+4,n=lt(e,ve,n)|0,Jr(ve)}while(0);return m=Qe,n|0}function Gn(e){e=e|0;var n=0;do{if(n=e+984|0,p[n>>0]|0)break;p[n>>0]=1,C[e+504>>2]=w(le),e=t[e+944>>2]|0}while((e|0)!=0)}function ic(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),yt(r))}function ri(e){return e=e|0,t[e+944>>2]|0}function Gr(e){e=e|0,Iu(e,(t[e+964>>2]|0)!=0,2832),Gn(e)}function Yl(e){return e=e|0,(p[e+984>>0]|0)!=0|0}function ea(e,n){e=e|0,n=n|0,MI(e,n,400)|0&&(pr(e|0,n|0,400)|0,Gn(e))}function lf(e){e=e|0;var n=St;return n=w(C[e+44>>2]),e=Me(n)|0,w(e?w(0):n)}function Ns(e){e=e|0;var n=St;return n=w(C[e+48>>2]),Me(n)|0&&(n=p[(t[e+976>>2]|0)+2>>0]|0?w(1):w(0)),w(n)}function Ma(e,n){e=e|0,n=n|0,t[e+980>>2]=n}function Ls(e){return e=e|0,t[e+980>>2]|0}function h0(e,n){e=e|0,n=n|0;var r=0;r=e+4|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function Fs(e){return e=e|0,t[e+4>>2]|0}function Ni(e,n){e=e|0,n=n|0;var r=0;r=e+8|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function B(e){return e=e|0,t[e+8>>2]|0}function z(e,n){e=e|0,n=n|0;var r=0;r=e+12|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function G(e){return e=e|0,t[e+12>>2]|0}function $(e,n){e=e|0,n=n|0;var r=0;r=e+16|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function De(e){return e=e|0,t[e+16>>2]|0}function me(e,n){e=e|0,n=n|0;var r=0;r=e+20|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function xe(e){return e=e|0,t[e+20>>2]|0}function Z(e,n){e=e|0,n=n|0;var r=0;r=e+24|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function ke(e){return e=e|0,t[e+24>>2]|0}function Xe(e,n){e=e|0,n=n|0;var r=0;r=e+28|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function ht(e){return e=e|0,t[e+28>>2]|0}function ie(e,n){e=e|0,n=n|0;var r=0;r=e+32|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function qe(e){return e=e|0,t[e+32>>2]|0}function tt(e,n){e=e|0,n=n|0;var r=0;r=e+36|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function Tt(e){return e=e|0,t[e+36>>2]|0}function kt(e,n){e=e|0,n=w(n);var r=0;r=e+40|0,w(C[r>>2])!=n&&(C[r>>2]=n,Gn(e))}function bt(e,n){e=e|0,n=w(n);var r=0;r=e+44|0,w(C[r>>2])!=n&&(C[r>>2]=n,Gn(e))}function on(e,n){e=e|0,n=w(n);var r=0;r=e+48|0,w(C[r>>2])!=n&&(C[r>>2]=n,Gn(e))}function tn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+52|0,l=e+56|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function Lt(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+52|0,r=e+56|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Me(n)|0,t[r>>2]=u?3:2,Gn(e))}function gn(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+52|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function lr(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=(s^1)&1,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function Qn(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=s?0:2,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function _r(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+132+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Cn(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=(s^1)&1,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function Ar(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=s?0:2,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function v0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+60+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Rr(e,n){e=e|0,n=n|0;var r=0;r=e+60+(n<<3)+4|0,(t[r>>2]|0)!=3&&(C[e+60+(n<<3)>>2]=w(le),t[r>>2]=3,Gn(e))}function nt(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=(s^1)&1,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function _t(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=s?0:2,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function Ze(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+204+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Ft(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=(s^1)&1,l=e+276+(n<<3)|0,n=e+276+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function nn(e,n){return e=e|0,n=n|0,w(C[e+276+(n<<3)>>2])}function sn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+348|0,l=e+352|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function Yn(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+348|0,r=e+352|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Me(n)|0,t[r>>2]=u?3:2,Gn(e))}function yr(e){e=e|0;var n=0;n=e+352|0,(t[n>>2]|0)!=3&&(C[e+348>>2]=w(le),t[n>>2]=3,Gn(e))}function nu(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+348|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Cu(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+356|0,l=e+360|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function S0(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+356|0,r=e+360|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Me(n)|0,t[r>>2]=u?3:2,Gn(e))}function X0(e){e=e|0;var n=0;n=e+360|0,(t[n>>2]|0)!=3&&(C[e+356>>2]=w(le),t[n>>2]=3,Gn(e))}function xu(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+356|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function di(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+364|0,l=e+368|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function ko(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=s?0:2,u=e+364|0,l=e+368|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function Zo(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+364|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function sf(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+372|0,l=e+376|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function gl(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=s?0:2,u=e+372|0,l=e+376|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function af(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+372|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Mo(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+380|0,l=e+384|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function ds(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=s?0:2,u=e+380|0,l=e+384|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function bs(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+380|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function No(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+388|0,l=e+392|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function Lo(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=s?0:2,u=e+388|0,l=e+392|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function ps(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+388|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Vu(e,n){e=e|0,n=w(n);var r=0;r=e+396|0,w(C[r>>2])!=n&&(C[r>>2]=n,Gn(e))}function yu(e){return e=e|0,w(C[e+396>>2])}function pi(e){return e=e|0,w(C[e+400>>2])}function T0(e){return e=e|0,w(C[e+404>>2])}function Q0(e){return e=e|0,w(C[e+408>>2])}function Fo(e){return e=e|0,w(C[e+412>>2])}function ta(e){return e=e|0,w(C[e+416>>2])}function Kl(e){return e=e|0,w(C[e+420>>2])}function Ki(e,n){switch(e=e|0,n=n|0,Iu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+424+(n<<2)>>2])}function Yr(e,n){switch(e=e|0,n=n|0,Iu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+448+(n<<2)>>2])}function fo(e,n){switch(e=e|0,n=n|0,Iu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+472+(n<<2)>>2])}function Oi(e,n){e=e|0,n=n|0;var r=0,u=St;return r=t[e+4>>2]|0,(r|0)==(t[n+4>>2]|0)?r?(u=w(C[e>>2]),e=w(jt(w(u-w(C[n>>2]))))>2]=0,t[u+4>>2]=0,t[u+8>>2]=0,Y0(u|0,e|0,n|0,0),sr(e,3,(p[u+11>>0]|0)<0?t[u>>2]|0:u,r),eB(u),m=r}function J0(e,n,r,u){e=w(e),n=w(n),r=r|0,u=u|0;var l=St;e=w(e*n),l=w(YE(e,w(1)));do if(gi(l,w(0))|0)e=w(e-l);else{if(e=w(e-l),gi(l,w(1))|0){e=w(e+w(1));break}if(r){e=w(e+w(1));break}u||(l>w(.5)?l=w(1):(u=gi(l,w(.5))|0,l=w(u?1:0)),e=w(e+l))}while(0);return w(e/n)}function Z0(e,n,r,u,l,s,h,D,S,M,O,P,K){e=e|0,n=w(n),r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,D=w(D),S=w(S),M=w(M),O=w(O),P=w(P),K=K|0;var Pe=0,Ee=St,ve=St,Qe=St,We=St,st=St,Re=St;return S>2]),Ee!=w(0)):0)?(Qe=w(J0(n,Ee,0,0)),We=w(J0(u,Ee,0,0)),ve=w(J0(s,Ee,0,0)),Ee=w(J0(D,Ee,0,0))):(ve=s,Qe=n,Ee=D,We=u),(l|0)==(e|0)?Pe=gi(ve,Qe)|0:Pe=0,(h|0)==(r|0)?K=gi(Ee,We)|0:K=0,((Pe?0:(st=w(n-O),!(Te(e,st,S)|0)))?!(et(e,st,l,S)|0):0)?Pe=Ve(e,st,l,s,S)|0:Pe=1,((K?0:(Re=w(u-P),!(Te(r,Re,M)|0)))?!(et(r,Re,h,M)|0):0)?K=Ve(r,Re,h,D,M)|0:K=1,K=Pe&K),K|0}function Te(e,n,r){return e=e|0,n=w(n),r=w(r),(e|0)==1?e=gi(n,r)|0:e=0,e|0}function et(e,n,r,u){return e=e|0,n=w(n),r=r|0,u=w(u),(e|0)==2&(r|0)==0?n>=u?e=1:e=gi(n,u)|0:e=0,e|0}function Ve(e,n,r,u,l){return e=e|0,n=w(n),r=r|0,u=w(u),l=w(l),(e|0)==2&(r|0)==2&u>n?l<=n?e=1:e=gi(n,l)|0:e=0,e|0}function Gt(e,n,r,u,l,s,h,D,S,M,O){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,M=M|0,O=O|0;var P=0,K=0,Pe=0,Ee=0,ve=St,Qe=St,We=0,st=0,Re=0,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0,Zi=St,ts=St,ns=St,rs=0,Xs=0;On=m,m=m+160|0,mn=On+152|0,Nn=On+120|0,Lr=On+104|0,Re=On+72|0,Ee=On+56|0,Qt=On+8|0,st=On,Fe=(t[2279]|0)+1|0,t[2279]=Fe,hr=e+984|0,((p[hr>>0]|0)!=0?(t[e+512>>2]|0)!=(t[2278]|0):0)?We=4:(t[e+516>>2]|0)==(u|0)?kr=0:We=4,(We|0)==4&&(t[e+520>>2]=0,t[e+924>>2]=-1,t[e+928>>2]=-1,C[e+932>>2]=w(-1),C[e+936>>2]=w(-1),kr=1);e:do if(t[e+964>>2]|0)if(ve=w(Yt(e,2,h)),Qe=w(Yt(e,0,h)),P=e+916|0,ns=w(C[P>>2]),ts=w(C[e+920>>2]),Zi=w(C[e+932>>2]),Z0(l,n,s,r,t[e+924>>2]|0,ns,t[e+928>>2]|0,ts,Zi,w(C[e+936>>2]),ve,Qe,O)|0)We=22;else if(Pe=t[e+520>>2]|0,!Pe)We=21;else for(K=0;;){if(P=e+524+(K*24|0)|0,Zi=w(C[P>>2]),ts=w(C[e+524+(K*24|0)+4>>2]),ns=w(C[e+524+(K*24|0)+16>>2]),Z0(l,n,s,r,t[e+524+(K*24|0)+8>>2]|0,Zi,t[e+524+(K*24|0)+12>>2]|0,ts,ns,w(C[e+524+(K*24|0)+20>>2]),ve,Qe,O)|0){We=22;break e}if(K=K+1|0,K>>>0>=Pe>>>0){We=21;break}}else{if(S){if(P=e+916|0,!(gi(w(C[P>>2]),n)|0)){We=21;break}if(!(gi(w(C[e+920>>2]),r)|0)){We=21;break}if((t[e+924>>2]|0)!=(l|0)){We=21;break}P=(t[e+928>>2]|0)==(s|0)?P:0,We=22;break}if(Pe=t[e+520>>2]|0,!Pe)We=21;else for(K=0;;){if(P=e+524+(K*24|0)|0,((gi(w(C[P>>2]),n)|0?gi(w(C[e+524+(K*24|0)+4>>2]),r)|0:0)?(t[e+524+(K*24|0)+8>>2]|0)==(l|0):0)?(t[e+524+(K*24|0)+12>>2]|0)==(s|0):0){We=22;break e}if(K=K+1|0,K>>>0>=Pe>>>0){We=21;break}}}while(0);do if((We|0)==21)p[11697]|0?(P=0,We=28):(P=0,We=31);else if((We|0)==22){if(K=(p[11697]|0)!=0,!((P|0)!=0&(kr^1)))if(K){We=28;break}else{We=31;break}Ee=P+16|0,t[e+908>>2]=t[Ee>>2],Pe=P+20|0,t[e+912>>2]=t[Pe>>2],(p[11698]|0)==0|K^1||(t[st>>2]=Br(Fe)|0,t[st+4>>2]=Fe,sr(e,4,2972,st),K=t[e+972>>2]|0,K|0&&M1[K&127](e),l=wn(l,S)|0,s=wn(s,S)|0,Xs=+w(C[Ee>>2]),rs=+w(C[Pe>>2]),t[Qt>>2]=l,t[Qt+4>>2]=s,U[Qt+8>>3]=+n,U[Qt+16>>3]=+r,U[Qt+24>>3]=Xs,U[Qt+32>>3]=rs,t[Qt+40>>2]=M,sr(e,4,2989,Qt))}while(0);return(We|0)==28&&(K=Br(Fe)|0,t[Ee>>2]=K,t[Ee+4>>2]=Fe,t[Ee+8>>2]=kr?3047:11699,sr(e,4,3038,Ee),K=t[e+972>>2]|0,K|0&&M1[K&127](e),Qt=wn(l,S)|0,We=wn(s,S)|0,t[Re>>2]=Qt,t[Re+4>>2]=We,U[Re+8>>3]=+n,U[Re+16>>3]=+r,t[Re+24>>2]=M,sr(e,4,3049,Re),We=31),(We|0)==31&&(fu(e,n,r,u,l,s,h,D,S,O),p[11697]|0&&(K=t[2279]|0,Qt=Br(K)|0,t[Lr>>2]=Qt,t[Lr+4>>2]=K,t[Lr+8>>2]=kr?3047:11699,sr(e,4,3083,Lr),K=t[e+972>>2]|0,K|0&&M1[K&127](e),Qt=wn(l,S)|0,Lr=wn(s,S)|0,rs=+w(C[e+908>>2]),Xs=+w(C[e+912>>2]),t[Nn>>2]=Qt,t[Nn+4>>2]=Lr,U[Nn+8>>3]=rs,U[Nn+16>>3]=Xs,t[Nn+24>>2]=M,sr(e,4,3092,Nn)),t[e+516>>2]=u,P||(K=e+520|0,P=t[K>>2]|0,(P|0)==16&&(p[11697]|0&&sr(e,4,3124,mn),t[K>>2]=0,P=0),S?P=e+916|0:(t[K>>2]=P+1,P=e+524+(P*24|0)|0),C[P>>2]=n,C[P+4>>2]=r,t[P+8>>2]=l,t[P+12>>2]=s,t[P+16>>2]=t[e+908>>2],t[P+20>>2]=t[e+912>>2],P=0)),S&&(t[e+416>>2]=t[e+908>>2],t[e+420>>2]=t[e+912>>2],p[e+985>>0]=1,p[hr>>0]=0),t[2279]=(t[2279]|0)+-1,t[e+512>>2]=t[2278],m=On,kr|(P|0)==0|0}function Yt(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return u=w(Li(e,n,r)),w(u+w(A0(e,n,r)))}function sr(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=m,m=m+16|0,l=s,t[l>>2]=u,e?u=t[e+976>>2]|0:u=0,Ps(u,e,n,r,l),m=s}function Br(e){return e=e|0,(e>>>0>60?3201:3201+(60-e)|0)|0}function wn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+32|0,r=l+12|0,u=l,t[r>>2]=t[254],t[r+4>>2]=t[255],t[r+8>>2]=t[256],t[u>>2]=t[257],t[u+4>>2]=t[258],t[u+8>>2]=t[259],(e|0)>2?e=11699:e=t[(n?u:r)+(e<<2)>>2]|0,m=l,e|0}function fu(e,n,r,u,l,s,h,D,S,M){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,M=M|0;var O=0,P=0,K=0,Pe=0,Ee=St,ve=St,Qe=St,We=St,st=St,Re=St,Fe=St,Qt=0,Lr=0,Nn=0,mn=St,hr=St,kr=0,On=St,Zi=0,ts=0,ns=0,rs=0,Xs=0,$2=0,ed=0,Za=0,td=0,Oc=0,kc=0,nd=0,rd=0,id=0,si=0,$a=0,ud=0,zf=0,od=St,ld=St,Mc=St,Nc=St,qf=St,Il=0,Aa=0,As=0,ef=0,L1=0,F1=St,Lc=St,b1=St,P1=St,Bl=St,vl=St,tf=0,lu=St,I1=St,is=St,Hf=St,us=St,Wf=St,B1=0,U1=0,Vf=St,Ul=St,nf=0,j1=0,z1=0,q1=0,gr=St,Mu=0,ml=0,os=0,jl=0,Tr=0,Fn=0,rf=0,hn=St,H1=0,u0=0;rf=m,m=m+16|0,Il=rf+12|0,Aa=rf+8|0,As=rf+4|0,ef=rf,Iu(e,(l|0)==0|(Me(n)|0)^1,3326),Iu(e,(s|0)==0|(Me(r)|0)^1,3406),ml=El(e,u)|0,t[e+496>>2]=ml,Tr=I0(2,ml)|0,Fn=I0(0,ml)|0,C[e+440>>2]=w(Li(e,Tr,h)),C[e+444>>2]=w(A0(e,Tr,h)),C[e+428>>2]=w(Li(e,Fn,h)),C[e+436>>2]=w(A0(e,Fn,h)),C[e+464>>2]=w(R0(e,Tr)),C[e+468>>2]=w(co(e,Tr)),C[e+452>>2]=w(R0(e,Fn)),C[e+460>>2]=w(co(e,Fn)),C[e+488>>2]=w(Ru(e,Tr,h)),C[e+492>>2]=w(Yu(e,Tr,h)),C[e+476>>2]=w(Ru(e,Fn,h)),C[e+484>>2]=w(Yu(e,Fn,h));do if(t[e+964>>2]|0)Xl(e,n,r,l,s,h,D);else{if(os=e+948|0,jl=(t[e+952>>2]|0)-(t[os>>2]|0)>>2,!jl){hs(e,n,r,l,s,h,D);break}if(S?0:ra(e,n,r,l,s,h,D)|0)break;cs(e),$a=e+508|0,p[$a>>0]=0,Tr=I0(t[e+4>>2]|0,ml)|0,Fn=df(Tr,ml)|0,Mu=Fi(Tr)|0,ud=t[e+8>>2]|0,j1=e+28|0,zf=(t[j1>>2]|0)!=0,us=Mu?h:D,Vf=Mu?D:h,od=w(Ku(e,Tr,h)),ld=w(vs(e,Tr,h)),Ee=w(Ku(e,Fn,h)),Wf=w(wr(e,Tr,h)),Ul=w(wr(e,Fn,h)),Nn=Mu?l:s,nf=Mu?s:l,gr=Mu?Wf:Ul,st=Mu?Ul:Wf,Hf=w(Yt(e,2,h)),We=w(Yt(e,0,h)),ve=w(w(Sn(e+364|0,h))-gr),Qe=w(w(Sn(e+380|0,h))-gr),Re=w(w(Sn(e+372|0,D))-st),Fe=w(w(Sn(e+388|0,D))-st),Mc=Mu?ve:Re,Nc=Mu?Qe:Fe,Hf=w(n-Hf),n=w(Hf-gr),Me(n)|0?gr=n:gr=w(Eu(w(Yp(n,Qe)),ve)),I1=w(r-We),n=w(I1-st),Me(n)|0?is=n:is=w(Eu(w(Yp(n,Fe)),Re)),ve=Mu?gr:is,lu=Mu?is:gr;e:do if((Nn|0)==1)for(u=0,P=0;;){if(O=yi(e,P)|0,!u)(w(Xi(O))>w(0)?w(ru(O))>w(0):0)?u=O:u=0;else if($0(O)|0){Pe=0;break e}if(P=P+1|0,P>>>0>=jl>>>0){Pe=u;break}}else Pe=0;while(0);Qt=Pe+500|0,Lr=Pe+504|0,u=0,O=0,n=w(0),K=0;do{if(P=t[(t[os>>2]|0)+(K<<2)>>2]|0,(t[P+36>>2]|0)==1)Ci(P),p[P+985>>0]=1,p[P+984>>0]=0;else{Vr(P),S&&C0(P,El(P,ml)|0,ve,lu,gr);do if((t[P+24>>2]|0)!=1)if((P|0)==(Pe|0)){t[Qt>>2]=t[2278],C[Lr>>2]=w(0);break}else{Xr(e,P,gr,l,is,gr,is,s,ml,M);break}else O|0&&(t[O+960>>2]=P),t[P+960>>2]=0,O=P,u=(u|0)==0?P:u;while(0);vl=w(C[P+504>>2]),n=w(n+w(vl+w(Yt(P,Tr,gr))))}K=K+1|0}while((K|0)!=(jl|0));for(ns=n>ve,tf=zf&((Nn|0)==2&ns)?1:Nn,Zi=(nf|0)==1,Xs=Zi&(S^1),$2=(tf|0)==1,ed=(tf|0)==2,Za=976+(Tr<<2)|0,td=(nf|2|0)==2,id=Zi&(zf^1),Oc=1040+(Fn<<2)|0,kc=1040+(Tr<<2)|0,nd=976+(Fn<<2)|0,rd=(nf|0)!=1,ns=zf&((Nn|0)!=0&ns),ts=e+976|0,Zi=Zi^1,n=ve,kr=0,rs=0,vl=w(0),qf=w(0);;){e:do if(kr>>>0>>0)for(Lr=t[os>>2]|0,K=0,Fe=w(0),Re=w(0),Qe=w(0),ve=w(0),P=0,O=0,Pe=kr;;){if(Qt=t[Lr+(Pe<<2)>>2]|0,(t[Qt+36>>2]|0)!=1?(t[Qt+940>>2]=rs,(t[Qt+24>>2]|0)!=1):0){if(We=w(Yt(Qt,Tr,gr)),si=t[Za>>2]|0,r=w(Sn(Qt+380+(si<<3)|0,us)),st=w(C[Qt+504>>2]),r=w(Yp(r,st)),r=w(Eu(w(Sn(Qt+364+(si<<3)|0,us)),r)),zf&(K|0)!=0&w(We+w(Re+r))>n){s=K,We=Fe,Nn=Pe;break e}We=w(We+r),r=w(Re+We),We=w(Fe+We),$0(Qt)|0&&(Qe=w(Qe+w(Xi(Qt))),ve=w(ve-w(st*w(ru(Qt))))),O|0&&(t[O+960>>2]=Qt),t[Qt+960>>2]=0,K=K+1|0,O=Qt,P=(P|0)==0?Qt:P}else We=Fe,r=Re;if(Pe=Pe+1|0,Pe>>>0>>0)Fe=We,Re=r;else{s=K,Nn=Pe;break}}else s=0,We=w(0),Qe=w(0),ve=w(0),P=0,Nn=kr;while(0);si=Qe>w(0)&Qew(0)&veNc&((Me(Nc)|0)^1))n=Nc,si=51;else if(p[(t[ts>>2]|0)+3>>0]|0)si=51;else{if(mn!=w(0)?w(Xi(e))!=w(0):0){si=53;break}n=We,si=53}while(0);if((si|0)==51&&(si=0,Me(n)|0?si=53:(hr=w(n-We),On=n)),(si|0)==53&&(si=0,We>2]|0,Pe=hrw(0),Re=w(hr/mn),Qe=w(0),We=w(0),n=w(0),O=P;do r=w(Sn(O+380+(K<<3)|0,us)),ve=w(Sn(O+364+(K<<3)|0,us)),ve=w(Yp(r,w(Eu(ve,w(C[O+504>>2]))))),Pe?(r=w(ve*w(ru(O))),(r!=w(-0)?(hn=w(ve-w(st*r)),F1=w(Wn(O,Tr,hn,On,gr)),hn!=F1):0)&&(Qe=w(Qe-w(F1-ve)),n=w(n+r))):((Qt?(Lc=w(Xi(O)),Lc!=w(0)):0)?(hn=w(ve+w(Re*Lc)),b1=w(Wn(O,Tr,hn,On,gr)),hn!=b1):0)&&(Qe=w(Qe-w(b1-ve)),We=w(We-Lc)),O=t[O+960>>2]|0;while((O|0)!=0);if(n=w(Fe+n),ve=w(hr+Qe),L1)n=w(0);else{st=w(mn+We),Pe=t[Za>>2]|0,Qt=vew(0),st=w(ve/st),n=w(0);do{hn=w(Sn(P+380+(Pe<<3)|0,us)),Qe=w(Sn(P+364+(Pe<<3)|0,us)),Qe=w(Yp(hn,w(Eu(Qe,w(C[P+504>>2]))))),Qt?(hn=w(Qe*w(ru(P))),ve=w(-hn),hn!=w(-0)?(hn=w(Re*ve),ve=w(Wn(P,Tr,w(Qe+(Lr?ve:hn)),On,gr))):ve=Qe):(K?(P1=w(Xi(P)),P1!=w(0)):0)?ve=w(Wn(P,Tr,w(Qe+w(st*P1)),On,gr)):ve=Qe,n=w(n-w(ve-Qe)),We=w(Yt(P,Tr,gr)),r=w(Yt(P,Fn,gr)),ve=w(ve+We),C[Aa>>2]=ve,t[ef>>2]=1,Qe=w(C[P+396>>2]);e:do if(Me(Qe)|0){O=Me(lu)|0;do if(!O){if(ns|(Bu(P,Fn,lu)|0|Zi)||(Xu(e,P)|0)!=4||(t[(m0(P,Fn)|0)+4>>2]|0)==3||(t[(y0(P,Fn)|0)+4>>2]|0)==3)break;C[Il>>2]=lu,t[As>>2]=1;break e}while(0);if(Bu(P,Fn,lu)|0){O=t[P+992+(t[nd>>2]<<2)>>2]|0,hn=w(r+w(Sn(O,lu))),C[Il>>2]=hn,O=rd&(t[O+4>>2]|0)==2,t[As>>2]=((Me(hn)|0|O)^1)&1;break}else{C[Il>>2]=lu,t[As>>2]=O?0:2;break}}else hn=w(ve-We),mn=w(hn/Qe),hn=w(Qe*hn),t[As>>2]=1,C[Il>>2]=w(r+(Mu?mn:hn));while(0);kn(P,Tr,On,gr,ef,Aa),kn(P,Fn,lu,gr,As,Il);do if(Bu(P,Fn,lu)|0?0:(Xu(e,P)|0)==4){if((t[(m0(P,Fn)|0)+4>>2]|0)==3){O=0;break}O=(t[(y0(P,Fn)|0)+4>>2]|0)!=3}else O=0;while(0);hn=w(C[Aa>>2]),mn=w(C[Il>>2]),H1=t[ef>>2]|0,u0=t[As>>2]|0,Gt(P,Mu?hn:mn,Mu?mn:hn,ml,Mu?H1:u0,Mu?u0:H1,gr,is,S&(O^1),3488,M)|0,p[$a>>0]=p[$a>>0]|p[P+508>>0],P=t[P+960>>2]|0}while((P|0)!=0)}}else n=w(0);if(n=w(hr+n),u0=n>0]=u0|k[$a>>0],ed&n>w(0)?(O=t[Za>>2]|0,((t[e+364+(O<<3)+4>>2]|0)!=0?(Bl=w(Sn(e+364+(O<<3)|0,us)),Bl>=w(0)):0)?ve=w(Eu(w(0),w(Bl-w(On-n)))):ve=w(0)):ve=n,Qt=kr>>>0>>0,Qt){Pe=t[os>>2]|0,K=kr,O=0;do P=t[Pe+(K<<2)>>2]|0,t[P+24>>2]|0||(O=((t[(m0(P,Tr)|0)+4>>2]|0)==3&1)+O|0,O=O+((t[(y0(P,Tr)|0)+4>>2]|0)==3&1)|0),K=K+1|0;while((K|0)!=(Nn|0));O?(We=w(0),r=w(0)):si=101}else si=101;e:do if((si|0)==101)switch(si=0,ud|0){case 1:{O=0,We=w(ve*w(.5)),r=w(0);break e}case 2:{O=0,We=ve,r=w(0);break e}case 3:{if(s>>>0<=1){O=0,We=w(0),r=w(0);break e}r=w((s+-1|0)>>>0),O=0,We=w(0),r=w(w(Eu(ve,w(0)))/r);break e}case 5:{r=w(ve/w((s+1|0)>>>0)),O=0,We=r;break e}case 4:{r=w(ve/w(s>>>0)),O=0,We=w(r*w(.5));break e}default:{O=0,We=w(0),r=w(0);break e}}while(0);if(n=w(od+We),Qt){Qe=w(ve/w(O|0)),K=t[os>>2]|0,P=kr,ve=w(0);do{O=t[K+(P<<2)>>2]|0;e:do if((t[O+36>>2]|0)!=1){switch(t[O+24>>2]|0){case 1:{if(se(O,Tr)|0){if(!S)break e;hn=w(re(O,Tr,On)),hn=w(hn+w(R0(e,Tr))),hn=w(hn+w(Li(O,Tr,gr))),C[O+400+(t[kc>>2]<<2)>>2]=hn;break e}break}case 0:if(u0=(t[(m0(O,Tr)|0)+4>>2]|0)==3,hn=w(Qe+n),n=u0?hn:n,S&&(u0=O+400+(t[kc>>2]<<2)|0,C[u0>>2]=w(n+w(C[u0>>2]))),u0=(t[(y0(O,Tr)|0)+4>>2]|0)==3,hn=w(Qe+n),n=u0?hn:n,Xs){hn=w(r+w(Yt(O,Tr,gr))),ve=lu,n=w(n+w(hn+w(C[O+504>>2])));break e}else{n=w(n+w(r+w(Le(O,Tr,gr)))),ve=w(Eu(ve,w(Le(O,Fn,gr))));break e}default:}S&&(hn=w(We+w(R0(e,Tr))),u0=O+400+(t[kc>>2]<<2)|0,C[u0>>2]=w(hn+w(C[u0>>2])))}while(0);P=P+1|0}while((P|0)!=(Nn|0))}else ve=w(0);if(r=w(ld+n),td?We=w(w(Wn(e,Fn,w(Ul+ve),Vf,h))-Ul):We=lu,Qe=w(w(Wn(e,Fn,w(Ul+(id?lu:ve)),Vf,h))-Ul),Qt&S){P=kr;do{K=t[(t[os>>2]|0)+(P<<2)>>2]|0;do if((t[K+36>>2]|0)!=1){if((t[K+24>>2]|0)==1){if(se(K,Fn)|0){if(hn=w(re(K,Fn,lu)),hn=w(hn+w(R0(e,Fn))),hn=w(hn+w(Li(K,Fn,gr))),O=t[Oc>>2]|0,C[K+400+(O<<2)>>2]=hn,!(Me(hn)|0))break}else O=t[Oc>>2]|0;hn=w(R0(e,Fn)),C[K+400+(O<<2)>>2]=w(hn+w(Li(K,Fn,gr)));break}O=Xu(e,K)|0;do if((O|0)==4){if((t[(m0(K,Fn)|0)+4>>2]|0)==3){si=139;break}if((t[(y0(K,Fn)|0)+4>>2]|0)==3){si=139;break}if(Bu(K,Fn,lu)|0){n=Ee;break}H1=t[K+908+(t[Za>>2]<<2)>>2]|0,t[Il>>2]=H1,n=w(C[K+396>>2]),u0=Me(n)|0,ve=(t[W>>2]=H1,w(C[W>>2])),u0?n=Qe:(hr=w(Yt(K,Fn,gr)),hn=w(ve/n),n=w(n*ve),n=w(hr+(Mu?hn:n))),C[Aa>>2]=n,C[Il>>2]=w(w(Yt(K,Tr,gr))+ve),t[As>>2]=1,t[ef>>2]=1,kn(K,Tr,On,gr,As,Il),kn(K,Fn,lu,gr,ef,Aa),n=w(C[Il>>2]),hr=w(C[Aa>>2]),hn=Mu?n:hr,n=Mu?hr:n,u0=((Me(hn)|0)^1)&1,Gt(K,hn,n,ml,u0,((Me(n)|0)^1)&1,gr,is,1,3493,M)|0,n=Ee}else si=139;while(0);e:do if((si|0)==139){si=0,n=w(We-w(Le(K,Fn,gr)));do if((t[(m0(K,Fn)|0)+4>>2]|0)==3){if((t[(y0(K,Fn)|0)+4>>2]|0)!=3)break;n=w(Ee+w(Eu(w(0),w(n*w(.5)))));break e}while(0);if((t[(y0(K,Fn)|0)+4>>2]|0)==3){n=Ee;break}if((t[(m0(K,Fn)|0)+4>>2]|0)==3){n=w(Ee+w(Eu(w(0),n)));break}switch(O|0){case 1:{n=Ee;break e}case 2:{n=w(Ee+w(n*w(.5)));break e}default:{n=w(Ee+n);break e}}}while(0);hn=w(vl+n),u0=K+400+(t[Oc>>2]<<2)|0,C[u0>>2]=w(hn+w(C[u0>>2]))}while(0);P=P+1|0}while((P|0)!=(Nn|0))}if(vl=w(vl+Qe),qf=w(Eu(qf,r)),s=rs+1|0,Nn>>>0>=jl>>>0)break;n=On,kr=Nn,rs=s}do if(S){if(O=s>>>0>1,O?0:!(Ae(e)|0))break;if(!(Me(lu)|0)){n=w(lu-vl);e:do switch(t[e+12>>2]|0){case 3:{Ee=w(Ee+n),Re=w(0);break}case 2:{Ee=w(Ee+w(n*w(.5))),Re=w(0);break}case 4:{lu>vl?Re=w(n/w(s>>>0)):Re=w(0);break}case 7:if(lu>vl){Ee=w(Ee+w(n/w(s<<1>>>0))),Re=w(n/w(s>>>0)),Re=O?Re:w(0);break e}else{Ee=w(Ee+w(n*w(.5))),Re=w(0);break e}case 6:{Re=w(n/w(rs>>>0)),Re=lu>vl&O?Re:w(0);break}default:Re=w(0)}while(0);if(s|0)for(Qt=1040+(Fn<<2)|0,Lr=976+(Fn<<2)|0,Pe=0,P=0;;){e:do if(P>>>0>>0)for(ve=w(0),Qe=w(0),n=w(0),K=P;;){O=t[(t[os>>2]|0)+(K<<2)>>2]|0;do if((t[O+36>>2]|0)!=1?(t[O+24>>2]|0)==0:0){if((t[O+940>>2]|0)!=(Pe|0))break e;if(ot(O,Fn)|0&&(hn=w(C[O+908+(t[Lr>>2]<<2)>>2]),n=w(Eu(n,w(hn+w(Yt(O,Fn,gr)))))),(Xu(e,O)|0)!=5)break;Bl=w(vt(O)),Bl=w(Bl+w(Li(O,0,gr))),hn=w(C[O+912>>2]),hn=w(w(hn+w(Yt(O,0,gr)))-Bl),Bl=w(Eu(Qe,Bl)),hn=w(Eu(ve,hn)),ve=hn,Qe=Bl,n=w(Eu(n,w(Bl+hn)))}while(0);if(O=K+1|0,O>>>0>>0)K=O;else{K=O;break}}else Qe=w(0),n=w(0),K=P;while(0);if(st=w(Re+n),r=Ee,Ee=w(Ee+st),P>>>0>>0){We=w(r+Qe),O=P;do{P=t[(t[os>>2]|0)+(O<<2)>>2]|0;e:do if((t[P+36>>2]|0)!=1?(t[P+24>>2]|0)==0:0)switch(Xu(e,P)|0){case 1:{hn=w(r+w(Li(P,Fn,gr))),C[P+400+(t[Qt>>2]<<2)>>2]=hn;break e}case 3:{hn=w(w(Ee-w(A0(P,Fn,gr)))-w(C[P+908+(t[Lr>>2]<<2)>>2])),C[P+400+(t[Qt>>2]<<2)>>2]=hn;break e}case 2:{hn=w(r+w(w(st-w(C[P+908+(t[Lr>>2]<<2)>>2]))*w(.5))),C[P+400+(t[Qt>>2]<<2)>>2]=hn;break e}case 4:{if(hn=w(r+w(Li(P,Fn,gr))),C[P+400+(t[Qt>>2]<<2)>>2]=hn,Bu(P,Fn,lu)|0||(Mu?(ve=w(C[P+908>>2]),n=w(ve+w(Yt(P,Tr,gr))),Qe=st):(Qe=w(C[P+912>>2]),Qe=w(Qe+w(Yt(P,Fn,gr))),n=st,ve=w(C[P+908>>2])),gi(n,ve)|0?gi(Qe,w(C[P+912>>2]))|0:0))break e;Gt(P,n,Qe,ml,1,1,gr,is,1,3501,M)|0;break e}case 5:{C[P+404>>2]=w(w(We-w(vt(P)))+w(re(P,0,lu)));break e}default:break e}while(0);O=O+1|0}while((O|0)!=(K|0))}if(Pe=Pe+1|0,(Pe|0)==(s|0))break;P=K}}}while(0);if(C[e+908>>2]=w(Wn(e,2,Hf,h,h)),C[e+912>>2]=w(Wn(e,0,I1,D,h)),((tf|0)!=0?(B1=t[e+32>>2]|0,U1=(tf|0)==2,!(U1&(B1|0)!=2)):0)?U1&(B1|0)==2&&(n=w(Wf+On),n=w(Eu(w(Yp(n,w(Xt(e,Tr,qf,us)))),Wf)),si=198):(n=w(Wn(e,Tr,qf,us,h)),si=198),(si|0)==198&&(C[e+908+(t[976+(Tr<<2)>>2]<<2)>>2]=n),((nf|0)!=0?(z1=t[e+32>>2]|0,q1=(nf|0)==2,!(q1&(z1|0)!=2)):0)?q1&(z1|0)==2&&(n=w(Ul+lu),n=w(Eu(w(Yp(n,w(Xt(e,Fn,w(Ul+vl),Vf)))),Ul)),si=204):(n=w(Wn(e,Fn,w(Ul+vl),Vf,h)),si=204),(si|0)==204&&(C[e+908+(t[976+(Fn<<2)>>2]<<2)>>2]=n),S){if((t[j1>>2]|0)==2){P=976+(Fn<<2)|0,K=1040+(Fn<<2)|0,O=0;do Pe=yi(e,O)|0,t[Pe+24>>2]|0||(H1=t[P>>2]|0,hn=w(C[e+908+(H1<<2)>>2]),u0=Pe+400+(t[K>>2]<<2)|0,hn=w(hn-w(C[u0>>2])),C[u0>>2]=w(hn-w(C[Pe+908+(H1<<2)>>2]))),O=O+1|0;while((O|0)!=(jl|0))}if(u|0){O=Mu?tf:l;do xn(e,u,gr,O,is,ml,M),u=t[u+960>>2]|0;while((u|0)!=0)}if(O=(Tr|2|0)==3,P=(Fn|2|0)==3,O|P){u=0;do K=t[(t[os>>2]|0)+(u<<2)>>2]|0,(t[K+36>>2]|0)!=1&&(O&&_n(e,K,Tr),P&&_n(e,K,Fn)),u=u+1|0;while((u|0)!=(jl|0))}}}while(0);m=rf}function Gu(e,n){e=e|0,n=w(n);var r=0;Dn(e,n>=w(0),3147),r=n==w(0),C[e+4>>2]=r?w(0):n}function Kr(e,n,r,u){e=e|0,n=w(n),r=w(r),u=u|0;var l=St,s=St,h=0,D=0,S=0;t[2278]=(t[2278]|0)+1,Vr(e),Bu(e,2,n)|0?(l=w(Sn(t[e+992>>2]|0,n)),S=1,l=w(l+w(Yt(e,2,n)))):(l=w(Sn(e+380|0,n)),l>=w(0)?S=2:(S=((Me(n)|0)^1)&1,l=n)),Bu(e,0,r)|0?(s=w(Sn(t[e+996>>2]|0,r)),D=1,s=w(s+w(Yt(e,0,n)))):(s=w(Sn(e+388|0,r)),s>=w(0)?D=2:(D=((Me(r)|0)^1)&1,s=r)),h=e+976|0,(Gt(e,l,s,u,S,D,n,r,1,3189,t[h>>2]|0)|0?(C0(e,t[e+496>>2]|0,n,r,n),Au(e,w(C[(t[h>>2]|0)+4>>2]),w(0),w(0)),p[11696]|0):0)&&ff(e,7)}function Vr(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;D=m,m=m+32|0,h=D+24|0,s=D+16|0,u=D+8|0,l=D,r=0;do n=e+380+(r<<3)|0,((t[e+380+(r<<3)+4>>2]|0)!=0?(S=n,M=t[S+4>>2]|0,O=u,t[O>>2]=t[S>>2],t[O+4>>2]=M,O=e+364+(r<<3)|0,M=t[O+4>>2]|0,S=l,t[S>>2]=t[O>>2],t[S+4>>2]=M,t[s>>2]=t[u>>2],t[s+4>>2]=t[u+4>>2],t[h>>2]=t[l>>2],t[h+4>>2]=t[l+4>>2],Oi(s,h)|0):0)||(n=e+348+(r<<3)|0),t[e+992+(r<<2)>>2]=n,r=r+1|0;while((r|0)!=2);m=D}function Bu(e,n,r){e=e|0,n=n|0,r=w(r);var u=0;switch(e=t[e+992+(t[976+(n<<2)>>2]<<2)>>2]|0,t[e+4>>2]|0){case 0:case 3:{e=0;break}case 1:{w(C[e>>2])>2])>2]|0){case 2:{n=w(w(w(C[e>>2])*n)/w(100));break}case 1:{n=w(C[e>>2]);break}default:n=w(le)}return w(n)}function C0(e,n,r,u,l){e=e|0,n=n|0,r=w(r),u=w(u),l=w(l);var s=0,h=St;n=t[e+944>>2]|0?n:1,s=I0(t[e+4>>2]|0,n)|0,n=df(s,n)|0,r=w(Sr(e,s,r)),u=w(Sr(e,n,u)),h=w(r+w(Li(e,s,l))),C[e+400+(t[1040+(s<<2)>>2]<<2)>>2]=h,r=w(r+w(A0(e,s,l))),C[e+400+(t[1e3+(s<<2)>>2]<<2)>>2]=r,r=w(u+w(Li(e,n,l))),C[e+400+(t[1040+(n<<2)>>2]<<2)>>2]=r,l=w(u+w(A0(e,n,l))),C[e+400+(t[1e3+(n<<2)>>2]<<2)>>2]=l}function Au(e,n,r,u){e=e|0,n=w(n),r=w(r),u=w(u);var l=0,s=0,h=St,D=St,S=0,M=0,O=St,P=0,K=St,Pe=St,Ee=St,ve=St;if(n!=w(0)&&(l=e+400|0,ve=w(C[l>>2]),s=e+404|0,Ee=w(C[s>>2]),P=e+416|0,Pe=w(C[P>>2]),M=e+420|0,h=w(C[M>>2]),K=w(ve+r),O=w(Ee+u),u=w(K+Pe),D=w(O+h),S=(t[e+988>>2]|0)==1,C[l>>2]=w(J0(ve,n,0,S)),C[s>>2]=w(J0(Ee,n,0,S)),r=w(YE(w(Pe*n),w(1))),gi(r,w(0))|0?s=0:s=(gi(r,w(1))|0)^1,r=w(YE(w(h*n),w(1))),gi(r,w(0))|0?l=0:l=(gi(r,w(1))|0)^1,ve=w(J0(u,n,S&s,S&(s^1))),C[P>>2]=w(ve-w(J0(K,n,0,S))),ve=w(J0(D,n,S&l,S&(l^1))),C[M>>2]=w(ve-w(J0(O,n,0,S))),s=(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2,s|0)){l=0;do Au(yi(e,l)|0,n,K,O),l=l+1|0;while((l|0)!=(s|0))}}function ei(e,n,r,u,l){switch(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,r|0){case 5:case 0:{e=F8(t[489]|0,u,l)|0;break}default:e=QI(u,l)|0}return e|0}function _l(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;l=m,m=m+16|0,s=l,t[s>>2]=u,Ps(e,0,n,r,s),m=l}function Ps(e,n,r,u,l){if(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,e=e|0?e:956,tS[t[e+8>>2]&1](e,n,r,u,l)|0,(r|0)==5)Xn();else return}function Uu(e,n,r){e=e|0,n=n|0,r=r|0,p[e+n>>0]=r&1}function na(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(zi(e,u),Is(e,t[n>>2]|0,t[r>>2]|0,u))}function zi(e,n){e=e|0,n=n|0;var r=0;if((x0(e)|0)>>>0>>0&&li(e),n>>>0>1073741823)Xn();else{r=cn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function Is(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(pr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function x0(e){return e=e|0,1073741823}function Li(e,n,r){return e=e|0,n=n|0,r=w(r),(Fi(n)|0?(t[e+96>>2]|0)!=0:0)?e=e+92|0:e=dt(e+60|0,t[1040+(n<<2)>>2]|0,992)|0,w($o(e,r))}function A0(e,n,r){return e=e|0,n=n|0,r=w(r),(Fi(n)|0?(t[e+104>>2]|0)!=0:0)?e=e+100|0:e=dt(e+60|0,t[1e3+(n<<2)>>2]|0,992)|0,w($o(e,r))}function Fi(e){return e=e|0,(e|1|0)==3|0}function $o(e,n){return e=e|0,n=w(n),(t[e+4>>2]|0)==3?n=w(0):n=w(Sn(e,n)),w(n)}function El(e,n){return e=e|0,n=n|0,e=t[e>>2]|0,((e|0)==0?(n|0)>1?n:1:e)|0}function I0(e,n){e=e|0,n=n|0;var r=0;e:do if((n|0)==2){switch(e|0){case 2:{e=3;break e}case 3:break;default:{r=4;break e}}e=2}else r=4;while(0);return e|0}function R0(e,n){e=e|0,n=n|0;var r=St;return((Fi(n)|0?(t[e+312>>2]|0)!=0:0)?(r=w(C[e+308>>2]),r>=w(0)):0)||(r=w(Eu(w(C[(dt(e+276|0,t[1040+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function co(e,n){e=e|0,n=n|0;var r=St;return((Fi(n)|0?(t[e+320>>2]|0)!=0:0)?(r=w(C[e+316>>2]),r>=w(0)):0)||(r=w(Eu(w(C[(dt(e+276|0,t[1e3+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function Ru(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return((Fi(n)|0?(t[e+240>>2]|0)!=0:0)?(u=w(Sn(e+236|0,r)),u>=w(0)):0)||(u=w(Eu(w(Sn(dt(e+204|0,t[1040+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function Yu(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return((Fi(n)|0?(t[e+248>>2]|0)!=0:0)?(u=w(Sn(e+244|0,r)),u>=w(0)):0)||(u=w(Eu(w(Sn(dt(e+204|0,t[1e3+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function Xl(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=St,S=St,M=St,O=St,P=St,K=St,Pe=0,Ee=0,ve=0;ve=m,m=m+16|0,Pe=ve,Ee=e+964|0,Iu(e,(t[Ee>>2]|0)!=0,3519),D=w(wr(e,2,n)),S=w(wr(e,0,n)),M=w(Yt(e,2,n)),O=w(Yt(e,0,n)),Me(n)|0?P=n:P=w(Eu(w(0),w(w(n-M)-D))),Me(r)|0?K=r:K=w(Eu(w(0),w(w(r-O)-S))),(u|0)==1&(l|0)==1?(C[e+908>>2]=w(Wn(e,2,w(n-M),s,s)),n=w(Wn(e,0,w(r-O),h,s))):(nS[t[Ee>>2]&1](Pe,e,P,u,K,l),P=w(D+w(C[Pe>>2])),K=w(n-M),C[e+908>>2]=w(Wn(e,2,(u|2|0)==2?P:K,s,s)),K=w(S+w(C[Pe+4>>2])),n=w(r-O),n=w(Wn(e,0,(l|2|0)==2?K:n,h,s))),C[e+912>>2]=n,m=ve}function hs(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=St,S=St,M=St,O=St;M=w(wr(e,2,s)),D=w(wr(e,0,s)),O=w(Yt(e,2,s)),S=w(Yt(e,0,s)),n=w(n-O),C[e+908>>2]=w(Wn(e,2,(u|2|0)==2?M:n,s,s)),r=w(r-S),C[e+912>>2]=w(Wn(e,0,(l|2|0)==2?D:r,h,s))}function ra(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=0,S=St,M=St;return D=(u|0)==2,((n<=w(0)&D?0:!(r<=w(0)&(l|0)==2))?!((u|0)==1&(l|0)==1):0)?e=0:(S=w(Yt(e,0,s)),M=w(Yt(e,2,s)),D=n>2]=w(Wn(e,2,D?w(0):n,s,s)),n=w(r-S),D=r>2]=w(Wn(e,0,D?w(0):n,h,s)),e=1),e|0}function df(e,n){return e=e|0,n=n|0,yn(e)|0?e=I0(2,n)|0:e=0,e|0}function Ku(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Ru(e,n,r)),w(r+w(R0(e,n)))}function vs(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Yu(e,n,r)),w(r+w(co(e,n)))}function wr(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return u=w(Ku(e,n,r)),w(u+w(vs(e,n,r)))}function $0(e){return e=e|0,t[e+24>>2]|0?e=0:w(Xi(e))!=w(0)?e=1:e=w(ru(e))!=w(0),e|0}function Xi(e){e=e|0;var n=St;if(t[e+944>>2]|0){if(n=w(C[e+44>>2]),Me(n)|0)return n=w(C[e+40>>2]),e=n>w(0)&((Me(n)|0)^1),w(e?n:w(0))}else n=w(0);return w(n)}function ru(e){e=e|0;var n=St,r=0,u=St;do if(t[e+944>>2]|0){if(n=w(C[e+48>>2]),Me(n)|0){if(r=p[(t[e+976>>2]|0)+2>>0]|0,r<<24>>24==0?(u=w(C[e+40>>2]),u>24?w(1):w(0)}}else n=w(0);while(0);return w(n)}function Ci(e){e=e|0;var n=0,r=0;if(Iv(e+400|0,0,540)|0,p[e+985>>0]=1,cs(e),r=mu(e)|0,r|0){n=e+948|0,e=0;do Ci(t[(t[n>>2]|0)+(e<<2)>>2]|0),e=e+1|0;while((e|0)!=(r|0))}}function Xr(e,n,r,u,l,s,h,D,S,M){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=w(s),h=w(h),D=D|0,S=S|0,M=M|0;var O=0,P=St,K=0,Pe=0,Ee=St,ve=St,Qe=0,We=St,st=0,Re=St,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0,Zi=0,ts=0;Zi=m,m=m+16|0,Lr=Zi+12|0,Nn=Zi+8|0,mn=Zi+4|0,hr=Zi,On=I0(t[e+4>>2]|0,S)|0,Fe=Fi(On)|0,P=w(Sn(En(n)|0,Fe?s:h)),Qt=Bu(n,2,s)|0,kr=Bu(n,0,h)|0;do if(Me(P)|0?0:!(Me(Fe?r:l)|0)){if(O=n+504|0,!(Me(w(C[O>>2]))|0)&&(!(er(t[n+976>>2]|0,0)|0)||(t[n+500>>2]|0)==(t[2278]|0)))break;C[O>>2]=w(Eu(P,w(wr(n,On,s))))}else K=7;while(0);do if((K|0)==7){if(st=Fe^1,!(st|Qt^1)){h=w(Sn(t[n+992>>2]|0,s)),C[n+504>>2]=w(Eu(h,w(wr(n,2,s))));break}if(!(Fe|kr^1)){h=w(Sn(t[n+996>>2]|0,h)),C[n+504>>2]=w(Eu(h,w(wr(n,0,s))));break}C[Lr>>2]=w(le),C[Nn>>2]=w(le),t[mn>>2]=0,t[hr>>2]=0,We=w(Yt(n,2,s)),Re=w(Yt(n,0,s)),Qt?(Ee=w(We+w(Sn(t[n+992>>2]|0,s))),C[Lr>>2]=Ee,t[mn>>2]=1,Pe=1):(Pe=0,Ee=w(le)),kr?(P=w(Re+w(Sn(t[n+996>>2]|0,h))),C[Nn>>2]=P,t[hr>>2]=1,O=1):(O=0,P=w(le)),K=t[e+32>>2]|0,Fe&(K|0)==2?K=2:(Me(Ee)|0?!(Me(r)|0):0)&&(C[Lr>>2]=r,t[mn>>2]=2,Pe=2,Ee=r),(((K|0)==2&st?0:Me(P)|0)?!(Me(l)|0):0)&&(C[Nn>>2]=l,t[hr>>2]=2,O=2,P=l),ve=w(C[n+396>>2]),Qe=Me(ve)|0;do if(Qe)K=Pe;else{if((Pe|0)==1&st){C[Nn>>2]=w(w(Ee-We)/ve),t[hr>>2]=1,O=1,K=1;break}Fe&(O|0)==1?(C[Lr>>2]=w(ve*w(P-Re)),t[mn>>2]=1,O=1,K=1):K=Pe}while(0);ts=Me(r)|0,Pe=(Xu(e,n)|0)!=4,(Fe|Qt|((u|0)!=1|ts)|(Pe|(K|0)==1)?0:(C[Lr>>2]=r,t[mn>>2]=1,!Qe))&&(C[Nn>>2]=w(w(r-We)/ve),t[hr>>2]=1,O=1),(kr|st|((D|0)!=1|(Me(l)|0))|(Pe|(O|0)==1)?0:(C[Nn>>2]=l,t[hr>>2]=1,!Qe))&&(C[Lr>>2]=w(ve*w(l-Re)),t[mn>>2]=1),kn(n,2,s,s,mn,Lr),kn(n,0,h,s,hr,Nn),r=w(C[Lr>>2]),l=w(C[Nn>>2]),Gt(n,r,l,S,t[mn>>2]|0,t[hr>>2]|0,s,h,0,3565,M)|0,h=w(C[n+908+(t[976+(On<<2)>>2]<<2)>>2]),C[n+504>>2]=w(Eu(h,w(wr(n,On,s))))}while(0);t[n+500>>2]=t[2278],m=Zi}function Wn(e,n,r,u,l){return e=e|0,n=n|0,r=w(r),u=w(u),l=w(l),u=w(Xt(e,n,r,u)),w(Eu(u,w(wr(e,n,l))))}function Xu(e,n){return e=e|0,n=n|0,n=n+20|0,n=t[((t[n>>2]|0)==0?e+16|0:n)>>2]|0,((n|0)==5?yn(t[e+4>>2]|0)|0:0)&&(n=1),n|0}function m0(e,n){return e=e|0,n=n|0,(Fi(n)|0?(t[e+96>>2]|0)!=0:0)?n=4:n=t[1040+(n<<2)>>2]|0,e+60+(n<<3)|0}function y0(e,n){return e=e|0,n=n|0,(Fi(n)|0?(t[e+104>>2]|0)!=0:0)?n=5:n=t[1e3+(n<<2)>>2]|0,e+60+(n<<3)|0}function kn(e,n,r,u,l,s){switch(e=e|0,n=n|0,r=w(r),u=w(u),l=l|0,s=s|0,r=w(Sn(e+380+(t[976+(n<<2)>>2]<<3)|0,r)),r=w(r+w(Yt(e,n,u))),t[l>>2]|0){case 2:case 1:{l=Me(r)|0,u=w(C[s>>2]),C[s>>2]=l|u>2]=2,C[s>>2]=r);break}default:}}function se(e,n){return e=e|0,n=n|0,e=e+132|0,(Fi(n)|0?(t[(dt(e,4,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(dt(e,t[1040+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function re(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Fi(n)|0?(u=dt(e,4,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=dt(e,t[1040+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Sn(u,r))),w(r)}function Le(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return u=w(C[e+908+(t[976+(n<<2)>>2]<<2)>>2]),u=w(u+w(Li(e,n,r))),w(u+w(A0(e,n,r)))}function Ae(e){e=e|0;var n=0,r=0,u=0;e:do if(yn(t[e+4>>2]|0)|0)n=0;else if((t[e+16>>2]|0)!=5)if(r=mu(e)|0,!r)n=0;else for(n=0;;){if(u=yi(e,n)|0,(t[u+24>>2]|0)==0?(t[u+20>>2]|0)==5:0){n=1;break e}if(n=n+1|0,n>>>0>=r>>>0){n=0;break}}else n=1;while(0);return n|0}function ot(e,n){e=e|0,n=n|0;var r=St;return r=w(C[e+908+(t[976+(n<<2)>>2]<<2)>>2]),r>=w(0)&((Me(r)|0)^1)|0}function vt(e){e=e|0;var n=St,r=0,u=0,l=0,s=0,h=0,D=0,S=St;if(r=t[e+968>>2]|0,r)S=w(C[e+908>>2]),n=w(C[e+912>>2]),n=w(J8[r&0](e,S,n)),Iu(e,(Me(n)|0)^1,3573);else{s=mu(e)|0;do if(s|0){for(r=0,l=0;;){if(u=yi(e,l)|0,t[u+940>>2]|0){h=8;break}if((t[u+24>>2]|0)!=1)if(D=(Xu(e,u)|0)==5,D){r=u;break}else r=(r|0)==0?u:r;if(l=l+1|0,l>>>0>=s>>>0){h=8;break}}if((h|0)==8&&!r)break;return n=w(vt(r)),w(n+w(C[r+404>>2]))}while(0);n=w(C[e+912>>2])}return w(n)}function Xt(e,n,r,u){e=e|0,n=n|0,r=w(r),u=w(u);var l=St,s=0;return yn(n)|0?(n=1,s=3):Fi(n)|0?(n=0,s=3):(u=w(le),l=w(le)),(s|0)==3&&(l=w(Sn(e+364+(n<<3)|0,u)),u=w(Sn(e+380+(n<<3)|0,u))),s=u=w(0)&((Me(u)|0)^1)),r=s?u:r,s=l>=w(0)&((Me(l)|0)^1)&r>2]|0,s)|0,Ee=df(Qe,s)|0,ve=Fi(Qe)|0,P=w(Yt(n,2,r)),K=w(Yt(n,0,r)),Bu(n,2,r)|0?D=w(P+w(Sn(t[n+992>>2]|0,r))):(se(n,2)|0?It(n,2)|0:0)?(D=w(C[e+908>>2]),S=w(R0(e,2)),S=w(D-w(S+w(co(e,2)))),D=w(re(n,2,r)),D=w(Wn(n,2,w(S-w(D+w(xi(n,2,r)))),r,r))):D=w(le),Bu(n,0,l)|0?S=w(K+w(Sn(t[n+996>>2]|0,l))):(se(n,0)|0?It(n,0)|0:0)?(S=w(C[e+912>>2]),st=w(R0(e,0)),st=w(S-w(st+w(co(e,0)))),S=w(re(n,0,l)),S=w(Wn(n,0,w(st-w(S+w(xi(n,0,l)))),l,r))):S=w(le),M=Me(D)|0,O=Me(S)|0;do if(M^O?(Pe=w(C[n+396>>2]),!(Me(Pe)|0)):0)if(M){D=w(P+w(w(S-K)*Pe));break}else{st=w(K+w(w(D-P)/Pe)),S=O?st:S;break}while(0);O=Me(D)|0,M=Me(S)|0,O|M&&(Re=(O^1)&1,u=r>w(0)&((u|0)!=0&O),D=ve?D:u?r:D,Gt(n,D,S,s,ve?Re:u?2:Re,O&(M^1)&1,D,S,0,3623,h)|0,D=w(C[n+908>>2]),D=w(D+w(Yt(n,2,r))),S=w(C[n+912>>2]),S=w(S+w(Yt(n,0,r)))),Gt(n,D,S,s,1,1,D,S,1,3635,h)|0,(It(n,Qe)|0?!(se(n,Qe)|0):0)?(Re=t[976+(Qe<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(st-w(C[n+908+(Re<<2)>>2])),st=w(st-w(co(e,Qe))),st=w(st-w(A0(n,Qe,r))),st=w(st-w(xi(n,Qe,ve?r:l))),C[n+400+(t[1040+(Qe<<2)>>2]<<2)>>2]=st):We=21;do if((We|0)==21){if(se(n,Qe)|0?0:(t[e+8>>2]|0)==1){Re=t[976+(Qe<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(w(st-w(C[n+908+(Re<<2)>>2]))*w(.5)),C[n+400+(t[1040+(Qe<<2)>>2]<<2)>>2]=st;break}(se(n,Qe)|0?0:(t[e+8>>2]|0)==2)&&(Re=t[976+(Qe<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(st-w(C[n+908+(Re<<2)>>2])),C[n+400+(t[1040+(Qe<<2)>>2]<<2)>>2]=st)}while(0);(It(n,Ee)|0?!(se(n,Ee)|0):0)?(Re=t[976+(Ee<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(st-w(C[n+908+(Re<<2)>>2])),st=w(st-w(co(e,Ee))),st=w(st-w(A0(n,Ee,r))),st=w(st-w(xi(n,Ee,ve?l:r))),C[n+400+(t[1040+(Ee<<2)>>2]<<2)>>2]=st):We=30;do if((We|0)==30?!(se(n,Ee)|0):0){if((Xu(e,n)|0)==2){Re=t[976+(Ee<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(w(st-w(C[n+908+(Re<<2)>>2]))*w(.5)),C[n+400+(t[1040+(Ee<<2)>>2]<<2)>>2]=st;break}Re=(Xu(e,n)|0)==3,Re^(t[e+28>>2]|0)==2&&(Re=t[976+(Ee<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(st-w(C[n+908+(Re<<2)>>2])),C[n+400+(t[1040+(Ee<<2)>>2]<<2)>>2]=st)}while(0)}function _n(e,n,r){e=e|0,n=n|0,r=r|0;var u=St,l=0;l=t[976+(r<<2)>>2]|0,u=w(C[n+908+(l<<2)>>2]),u=w(w(C[e+908+(l<<2)>>2])-u),u=w(u-w(C[n+400+(t[1040+(r<<2)>>2]<<2)>>2])),C[n+400+(t[1e3+(r<<2)>>2]<<2)>>2]=u}function yn(e){return e=e|0,(e|1|0)==1|0}function En(e){e=e|0;var n=St;switch(t[e+56>>2]|0){case 0:case 3:{n=w(C[e+40>>2]),n>w(0)&((Me(n)|0)^1)?e=p[(t[e+976>>2]|0)+2>>0]|0?1056:992:e=1056;break}default:e=e+52|0}return e|0}function er(e,n){return e=e|0,n=n|0,(p[e+n>>0]|0)!=0|0}function It(e,n){return e=e|0,n=n|0,e=e+132|0,(Fi(n)|0?(t[(dt(e,5,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(dt(e,t[1e3+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function xi(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Fi(n)|0?(u=dt(e,5,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=dt(e,t[1e3+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Sn(u,r))),w(r)}function Sr(e,n,r){return e=e|0,n=n|0,r=w(r),se(e,n)|0?r=w(re(e,n,r)):r=w(-w(xi(e,n,r))),w(r)}function cr(e){return e=w(e),C[W>>2]=e,t[W>>2]|0|0}function Y(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)Xn();else{l=cn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function Qr(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Jr(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&yt(e)}function Ur(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;if(h=e+4|0,D=t[h>>2]|0,l=D-u|0,s=l>>2,e=n+(s<<2)|0,e>>>0>>0){u=D;do t[u>>2]=t[e>>2],e=e+4|0,u=(t[h>>2]|0)+4|0,t[h>>2]=u;while(e>>>0>>0)}s|0&&Iy(D+(0-s<<2)|0,n|0,l|0)|0}function lt(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return D=n+4|0,S=t[D>>2]|0,l=t[e>>2]|0,h=r,s=h-l|0,u=S+(0-(s>>2)<<2)|0,t[D>>2]=u,(s|0)>0&&pr(u|0,l|0,s|0)|0,l=e+4|0,s=n+8|0,u=(t[l>>2]|0)-h|0,(u|0)>0&&(pr(t[s>>2]|0,r|0,u|0)|0,t[s>>2]=(t[s>>2]|0)+(u>>>2<<2)),h=t[e>>2]|0,t[e>>2]=t[D>>2],t[D>>2]=h,h=t[l>>2]|0,t[l>>2]=t[s>>2],t[s>>2]=h,h=e+8|0,r=n+12|0,e=t[h>>2]|0,t[h>>2]=t[r>>2],t[r>>2]=e,t[n>>2]=t[D>>2],S|0}function hi(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(h=t[n>>2]|0,s=t[r>>2]|0,(h|0)!=(s|0)){l=e+8|0,r=((s+-4-h|0)>>>2)+1|0,e=h,u=t[l>>2]|0;do t[u>>2]=t[e>>2],u=(t[l>>2]|0)+4|0,t[l>>2]=u,e=e+4|0;while((e|0)!=(s|0));t[n>>2]=h+(r<<2)}}function Qi(){_e()}function g0(){var e=0;return e=cn(4)|0,bn(e),e|0}function bn(e){e=e|0,t[e>>2]=p0()|0}function Qu(e){e=e|0,e|0&&(eo(e),yt(e))}function eo(e){e=e|0,K0(t[e>>2]|0)}function po(e,n,r){e=e|0,n=n|0,r=r|0,Uu(t[e>>2]|0,n,r)}function Ju(e,n){e=e|0,n=w(n),Gu(t[e>>2]|0,n)}function bo(e,n){return e=e|0,n=n|0,er(t[e>>2]|0,n)|0}function to(){var e=0;return e=cn(8)|0,Na(e,0),e|0}function Na(e,n){e=e|0,n=n|0,n?n=Hn(t[n>>2]|0)|0:n=or()|0,t[e>>2]=n,t[e+4>>2]=0,Ma(n,e)}function pf(e){e=e|0;var n=0;return n=cn(8)|0,Na(n,e),n|0}function uc(e){e=e|0,e|0&&(ms(e),yt(e))}function ms(e){e=e|0;var n=0;bu(t[e>>2]|0),n=e+4|0,e=t[n>>2]|0,t[n>>2]=0,e|0&&(ia(e),yt(e))}function ia(e){e=e|0,B0(e)}function B0(e){e=e|0,e=t[e>>2]|0,e|0&&Ir(e|0)}function oc(e){return e=e|0,Ls(e)|0}function La(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(ia(n),yt(n)),ao(t[e>>2]|0)}function gd(e,n){e=e|0,n=n|0,ea(t[e>>2]|0,t[n>>2]|0)}function $1(e,n){e=e|0,n=n|0,Z(t[e>>2]|0,n)}function e2(e,n,r){e=e|0,n=n|0,r=+r,lr(t[e>>2]|0,n,w(r))}function ho(e,n,r){e=e|0,n=n|0,r=+r,Qn(t[e>>2]|0,n,w(r))}function Uc(e,n){e=e|0,n=n|0,z(t[e>>2]|0,n)}function Dl(e,n){e=e|0,n=n|0,$(t[e>>2]|0,n)}function el(e,n){e=e|0,n=n|0,me(t[e>>2]|0,n)}function _d(e,n){e=e|0,n=n|0,h0(t[e>>2]|0,n)}function Bs(e,n){e=e|0,n=n|0,Xe(t[e>>2]|0,n)}function wl(e,n){e=e|0,n=n|0,Ni(t[e>>2]|0,n)}function t2(e,n,r){e=e|0,n=n|0,r=+r,Cn(t[e>>2]|0,n,w(r))}function Po(e,n,r){e=e|0,n=n|0,r=+r,Ar(t[e>>2]|0,n,w(r))}function Fa(e,n){e=e|0,n=n|0,Rr(t[e>>2]|0,n)}function ba(e,n){e=e|0,n=n|0,ie(t[e>>2]|0,n)}function Pa(e,n){e=e|0,n=n|0,tt(t[e>>2]|0,n)}function ua(e,n){e=e|0,n=+n,kt(t[e>>2]|0,w(n))}function ys(e,n){e=e|0,n=+n,tn(t[e>>2]|0,w(n))}function gs(e,n){e=e|0,n=+n,Lt(t[e>>2]|0,w(n))}function Ql(e,n){e=e|0,n=+n,bt(t[e>>2]|0,w(n))}function Io(e,n){e=e|0,n=+n,on(t[e>>2]|0,w(n))}function hf(e,n){e=e|0,n=+n,sn(t[e>>2]|0,w(n))}function tl(e,n){e=e|0,n=+n,Yn(t[e>>2]|0,w(n))}function ju(e){e=e|0,yr(t[e>>2]|0)}function Ia(e,n){e=e|0,n=+n,Cu(t[e>>2]|0,w(n))}function Zu(e,n){e=e|0,n=+n,S0(t[e>>2]|0,w(n))}function U0(e){e=e|0,X0(t[e>>2]|0)}function vf(e,n){e=e|0,n=+n,di(t[e>>2]|0,w(n))}function jc(e,n){e=e|0,n=+n,ko(t[e>>2]|0,w(n))}function lc(e,n){e=e|0,n=+n,sf(t[e>>2]|0,w(n))}function Sl(e,n){e=e|0,n=+n,gl(t[e>>2]|0,w(n))}function _s(e,n){e=e|0,n=+n,Mo(t[e>>2]|0,w(n))}function oa(e,n){e=e|0,n=+n,ds(t[e>>2]|0,w(n))}function n2(e,n){e=e|0,n=+n,No(t[e>>2]|0,w(n))}function la(e,n){e=e|0,n=+n,Lo(t[e>>2]|0,w(n))}function sc(e,n){e=e|0,n=+n,Vu(t[e>>2]|0,w(n))}function zc(e,n,r){e=e|0,n=n|0,r=+r,Ft(t[e>>2]|0,n,w(r))}function bi(e,n,r){e=e|0,n=n|0,r=+r,nt(t[e>>2]|0,n,w(r))}function g(e,n,r){e=e|0,n=n|0,r=+r,_t(t[e>>2]|0,n,w(r))}function y(e){return e=e|0,ke(t[e>>2]|0)|0}function A(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,_r(l,t[n>>2]|0,r),F(e,l),m=u}function F(e,n){e=e|0,n=n|0,I(e,t[n+4>>2]|0,+w(C[n>>2]))}function I(e,n,r){e=e|0,n=n|0,r=+r,t[e>>2]=n,U[e+8>>3]=r}function J(e){return e=e|0,G(t[e>>2]|0)|0}function fe(e){return e=e|0,De(t[e>>2]|0)|0}function mt(e){return e=e|0,xe(t[e>>2]|0)|0}function Ct(e){return e=e|0,Fs(t[e>>2]|0)|0}function Mt(e){return e=e|0,ht(t[e>>2]|0)|0}function Er(e){return e=e|0,B(t[e>>2]|0)|0}function $u(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,v0(l,t[n>>2]|0,r),F(e,l),m=u}function iu(e){return e=e|0,qe(t[e>>2]|0)|0}function j0(e){return e=e|0,Tt(t[e>>2]|0)|0}function Tl(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,gn(u,t[n>>2]|0),F(e,u),m=r}function e0(e){return e=e|0,+ +w(lf(t[e>>2]|0))}function He(e){return e=e|0,+ +w(Ns(t[e>>2]|0))}function Be(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,nu(u,t[n>>2]|0),F(e,u),m=r}function ut(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,xu(u,t[n>>2]|0),F(e,u),m=r}function Jt(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Zo(u,t[n>>2]|0),F(e,u),m=r}function jn(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,af(u,t[n>>2]|0),F(e,u),m=r}function ti(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,bs(u,t[n>>2]|0),F(e,u),m=r}function tr(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,ps(u,t[n>>2]|0),F(e,u),m=r}function ii(e){return e=e|0,+ +w(yu(t[e>>2]|0))}function qi(e,n){return e=e|0,n=n|0,+ +w(nn(t[e>>2]|0,n))}function jr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,Ze(l,t[n>>2]|0,r),F(e,l),m=u}function gu(e,n,r){e=e|0,n=n|0,r=r|0,ka(t[e>>2]|0,t[n>>2]|0,r)}function Ba(e,n){e=e|0,n=n|0,Tu(t[e>>2]|0,t[n>>2]|0)}function Ua(e){return e=e|0,mu(t[e>>2]|0)|0}function r2(e){return e=e|0,e=ri(t[e>>2]|0)|0,e?e=oc(e)|0:e=0,e|0}function Ed(e,n){return e=e|0,n=n|0,e=yi(t[e>>2]|0,n)|0,e?e=oc(e)|0:e=0,e|0}function Dd(e,n){e=e|0,n=n|0;var r=0,u=0;u=cn(4)|0,mf(u,n),r=e+4|0,n=t[r>>2]|0,t[r>>2]=u,n|0&&(ia(n),yt(n)),$s(t[e>>2]|0,1)}function mf(e,n){e=e|0,n=n|0,rl(e,n)}function i2(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,ch(D,Ls(n)|0,+r,u,+l,s),C[e>>2]=w(+U[D>>3]),C[e+4>>2]=w(+U[D+8>>3]),m=h}function ch(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0,D=0,S=0,M=0,O=0;h=m,m=m+32|0,O=h+8|0,M=h+20|0,S=h,D=h+16|0,U[O>>3]=r,t[M>>2]=u,U[S>>3]=l,t[D>>2]=s,qc(e,t[n+4>>2]|0,O,M,S,D),m=h}function qc(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,Ta(D),n=vo(n)|0,dh(e,n,+U[r>>3],t[u>>2]|0,+U[l>>3],t[s>>2]|0),Ca(D),m=h}function vo(e){return e=e|0,t[e>>2]|0}function dh(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0;h=mo(ph()|0)|0,r=+Cl(r),u=u2(u)|0,l=+Cl(l),o2(e,Wr(0,h|0,n|0,+r,u|0,+l,u2(s)|0)|0)}function ph(){var e=0;return p[7608]|0||(Wc(9120),e=7608,t[e>>2]=1,t[e+4>>2]=0),9120}function mo(e){return e=e|0,t[e+8>>2]|0}function Cl(e){return e=+e,+ +ja(e)}function u2(e){return e=e|0,s2(e)|0}function o2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=n,u&1?(wd(r,0),Yi(u|0,r|0)|0,Hc(e,r),Mr(r)):(t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]),m=l}function wd(e,n){e=e|0,n=n|0,l2(e,n),t[e+8>>2]=0,p[e+24>>0]=0}function Hc(e,n){e=e|0,n=n|0,n=n+8|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]}function Mr(e){e=e|0,p[e+24>>0]=0}function l2(e,n){e=e|0,n=n|0,t[e>>2]=n}function s2(e){return e=e|0,e|0}function ja(e){return e=+e,+e}function Wc(e){e=e|0,nl(e,Sd()|0,4)}function Sd(){return 1064}function nl(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=Pt(n|0,r+1|0)|0}function rl(e,n){e=e|0,n=n|0,n=t[n>>2]|0,t[e>>2]=n,Ei(n|0)}function hh(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(ia(n),yt(n)),$s(t[e>>2]|0,0)}function yf(e){e=e|0,Gr(t[e>>2]|0)}function Vc(e){return e=e|0,Yl(t[e>>2]|0)|0}function Td(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,Kr(t[e>>2]|0,w(n),w(r),u)}function vh(e){return e=e|0,+ +w(pi(t[e>>2]|0))}function il(e){return e=e|0,+ +w(Q0(t[e>>2]|0))}function sa(e){return e=e|0,+ +w(T0(t[e>>2]|0))}function Cd(e){return e=e|0,+ +w(Fo(t[e>>2]|0))}function xd(e){return e=e|0,+ +w(ta(t[e>>2]|0))}function ac(e){return e=e|0,+ +w(Kl(t[e>>2]|0))}function mh(e,n){e=e|0,n=n|0,U[e>>3]=+w(pi(t[n>>2]|0)),U[e+8>>3]=+w(Q0(t[n>>2]|0)),U[e+16>>3]=+w(T0(t[n>>2]|0)),U[e+24>>3]=+w(Fo(t[n>>2]|0)),U[e+32>>3]=+w(ta(t[n>>2]|0)),U[e+40>>3]=+w(Kl(t[n>>2]|0))}function Ad(e,n){return e=e|0,n=n|0,+ +w(Ki(t[e>>2]|0,n))}function a2(e,n){return e=e|0,n=n|0,+ +w(Yr(t[e>>2]|0,n))}function Gc(e,n){return e=e|0,n=n|0,+ +w(fo(t[e>>2]|0,n))}function Yc(){return Oa()|0}function Us(){Rd(),aa(),Kc(),fc(),cc(),f2()}function Rd(){bN(11713,4938,1)}function aa(){eN(10448)}function Kc(){bM(10408)}function fc(){iM(10324)}function cc(){yE(10096)}function f2(){yh(9132)}function yh(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0,Re=0,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0,Zi=0,ts=0,ns=0,rs=0,Xs=0,$2=0,ed=0,Za=0,td=0,Oc=0,kc=0,nd=0,rd=0,id=0,si=0,$a=0,ud=0,zf=0,od=0,ld=0,Mc=0,Nc=0,qf=0,Il=0,Aa=0,As=0,ef=0,L1=0,F1=0,Lc=0,b1=0,P1=0,Bl=0,vl=0,tf=0,lu=0,I1=0,is=0,Hf=0,us=0,Wf=0,B1=0,U1=0,Vf=0,Ul=0,nf=0,j1=0,z1=0,q1=0,gr=0,Mu=0,ml=0,os=0,jl=0,Tr=0,Fn=0,rf=0;n=m,m=m+672|0,r=n+656|0,rf=n+648|0,Fn=n+640|0,Tr=n+632|0,jl=n+624|0,os=n+616|0,ml=n+608|0,Mu=n+600|0,gr=n+592|0,q1=n+584|0,z1=n+576|0,j1=n+568|0,nf=n+560|0,Ul=n+552|0,Vf=n+544|0,U1=n+536|0,B1=n+528|0,Wf=n+520|0,us=n+512|0,Hf=n+504|0,is=n+496|0,I1=n+488|0,lu=n+480|0,tf=n+472|0,vl=n+464|0,Bl=n+456|0,P1=n+448|0,b1=n+440|0,Lc=n+432|0,F1=n+424|0,L1=n+416|0,ef=n+408|0,As=n+400|0,Aa=n+392|0,Il=n+384|0,qf=n+376|0,Nc=n+368|0,Mc=n+360|0,ld=n+352|0,od=n+344|0,zf=n+336|0,ud=n+328|0,$a=n+320|0,si=n+312|0,id=n+304|0,rd=n+296|0,nd=n+288|0,kc=n+280|0,Oc=n+272|0,td=n+264|0,Za=n+256|0,ed=n+248|0,$2=n+240|0,Xs=n+232|0,rs=n+224|0,ns=n+216|0,ts=n+208|0,Zi=n+200|0,On=n+192|0,kr=n+184|0,hr=n+176|0,mn=n+168|0,Nn=n+160|0,Lr=n+152|0,Qt=n+144|0,Fe=n+136|0,Re=n+128|0,st=n+120|0,We=n+112|0,Qe=n+104|0,ve=n+96|0,Ee=n+88|0,Pe=n+80|0,K=n+72|0,P=n+64|0,O=n+56|0,M=n+48|0,S=n+40|0,D=n+32|0,h=n+24|0,s=n+16|0,l=n+8|0,u=n,gf(e,3646),Xc(e,3651,2)|0,gh(e,3665,2)|0,vm(e,3682,18)|0,t[rf>>2]=19,t[rf+4>>2]=0,t[r>>2]=t[rf>>2],t[r+4>>2]=t[rf+4>>2],js(e,3690,r)|0,t[Fn>>2]=1,t[Fn+4>>2]=0,t[r>>2]=t[Fn>>2],t[r+4>>2]=t[Fn+4>>2],fa(e,3696,r)|0,t[Tr>>2]=2,t[Tr+4>>2]=0,t[r>>2]=t[Tr>>2],t[r+4>>2]=t[Tr+4>>2],Ji(e,3706,r)|0,t[jl>>2]=1,t[jl+4>>2]=0,t[r>>2]=t[jl>>2],t[r+4>>2]=t[jl+4>>2],O0(e,3722,r)|0,t[os>>2]=2,t[os+4>>2]=0,t[r>>2]=t[os>>2],t[r+4>>2]=t[os+4>>2],O0(e,3734,r)|0,t[ml>>2]=3,t[ml+4>>2]=0,t[r>>2]=t[ml>>2],t[r+4>>2]=t[ml+4>>2],Ji(e,3753,r)|0,t[Mu>>2]=4,t[Mu+4>>2]=0,t[r>>2]=t[Mu>>2],t[r+4>>2]=t[Mu+4>>2],Ji(e,3769,r)|0,t[gr>>2]=5,t[gr+4>>2]=0,t[r>>2]=t[gr>>2],t[r+4>>2]=t[gr+4>>2],Ji(e,3783,r)|0,t[q1>>2]=6,t[q1+4>>2]=0,t[r>>2]=t[q1>>2],t[r+4>>2]=t[q1+4>>2],Ji(e,3796,r)|0,t[z1>>2]=7,t[z1+4>>2]=0,t[r>>2]=t[z1>>2],t[r+4>>2]=t[z1+4>>2],Ji(e,3813,r)|0,t[j1>>2]=8,t[j1+4>>2]=0,t[r>>2]=t[j1>>2],t[r+4>>2]=t[j1+4>>2],Ji(e,3825,r)|0,t[nf>>2]=3,t[nf+4>>2]=0,t[r>>2]=t[nf>>2],t[r+4>>2]=t[nf+4>>2],O0(e,3843,r)|0,t[Ul>>2]=4,t[Ul+4>>2]=0,t[r>>2]=t[Ul>>2],t[r+4>>2]=t[Ul+4>>2],O0(e,3853,r)|0,t[Vf>>2]=9,t[Vf+4>>2]=0,t[r>>2]=t[Vf>>2],t[r+4>>2]=t[Vf+4>>2],Ji(e,3870,r)|0,t[U1>>2]=10,t[U1+4>>2]=0,t[r>>2]=t[U1>>2],t[r+4>>2]=t[U1+4>>2],Ji(e,3884,r)|0,t[B1>>2]=11,t[B1+4>>2]=0,t[r>>2]=t[B1>>2],t[r+4>>2]=t[B1+4>>2],Ji(e,3896,r)|0,t[Wf>>2]=1,t[Wf+4>>2]=0,t[r>>2]=t[Wf>>2],t[r+4>>2]=t[Wf+4>>2],t0(e,3907,r)|0,t[us>>2]=2,t[us+4>>2]=0,t[r>>2]=t[us>>2],t[r+4>>2]=t[us+4>>2],t0(e,3915,r)|0,t[Hf>>2]=3,t[Hf+4>>2]=0,t[r>>2]=t[Hf>>2],t[r+4>>2]=t[Hf+4>>2],t0(e,3928,r)|0,t[is>>2]=4,t[is+4>>2]=0,t[r>>2]=t[is>>2],t[r+4>>2]=t[is+4>>2],t0(e,3948,r)|0,t[I1>>2]=5,t[I1+4>>2]=0,t[r>>2]=t[I1>>2],t[r+4>>2]=t[I1+4>>2],t0(e,3960,r)|0,t[lu>>2]=6,t[lu+4>>2]=0,t[r>>2]=t[lu>>2],t[r+4>>2]=t[lu+4>>2],t0(e,3974,r)|0,t[tf>>2]=7,t[tf+4>>2]=0,t[r>>2]=t[tf>>2],t[r+4>>2]=t[tf+4>>2],t0(e,3983,r)|0,t[vl>>2]=20,t[vl+4>>2]=0,t[r>>2]=t[vl>>2],t[r+4>>2]=t[vl+4>>2],js(e,3999,r)|0,t[Bl>>2]=8,t[Bl+4>>2]=0,t[r>>2]=t[Bl>>2],t[r+4>>2]=t[Bl+4>>2],t0(e,4012,r)|0,t[P1>>2]=9,t[P1+4>>2]=0,t[r>>2]=t[P1>>2],t[r+4>>2]=t[P1+4>>2],t0(e,4022,r)|0,t[b1>>2]=21,t[b1+4>>2]=0,t[r>>2]=t[b1>>2],t[r+4>>2]=t[b1+4>>2],js(e,4039,r)|0,t[Lc>>2]=10,t[Lc+4>>2]=0,t[r>>2]=t[Lc>>2],t[r+4>>2]=t[Lc+4>>2],t0(e,4053,r)|0,t[F1>>2]=11,t[F1+4>>2]=0,t[r>>2]=t[F1>>2],t[r+4>>2]=t[F1+4>>2],t0(e,4065,r)|0,t[L1>>2]=12,t[L1+4>>2]=0,t[r>>2]=t[L1>>2],t[r+4>>2]=t[L1+4>>2],t0(e,4084,r)|0,t[ef>>2]=13,t[ef+4>>2]=0,t[r>>2]=t[ef>>2],t[r+4>>2]=t[ef+4>>2],t0(e,4097,r)|0,t[As>>2]=14,t[As+4>>2]=0,t[r>>2]=t[As>>2],t[r+4>>2]=t[As+4>>2],t0(e,4117,r)|0,t[Aa>>2]=15,t[Aa+4>>2]=0,t[r>>2]=t[Aa>>2],t[r+4>>2]=t[Aa+4>>2],t0(e,4129,r)|0,t[Il>>2]=16,t[Il+4>>2]=0,t[r>>2]=t[Il>>2],t[r+4>>2]=t[Il+4>>2],t0(e,4148,r)|0,t[qf>>2]=17,t[qf+4>>2]=0,t[r>>2]=t[qf>>2],t[r+4>>2]=t[qf+4>>2],t0(e,4161,r)|0,t[Nc>>2]=18,t[Nc+4>>2]=0,t[r>>2]=t[Nc>>2],t[r+4>>2]=t[Nc+4>>2],t0(e,4181,r)|0,t[Mc>>2]=5,t[Mc+4>>2]=0,t[r>>2]=t[Mc>>2],t[r+4>>2]=t[Mc+4>>2],O0(e,4196,r)|0,t[ld>>2]=6,t[ld+4>>2]=0,t[r>>2]=t[ld>>2],t[r+4>>2]=t[ld+4>>2],O0(e,4206,r)|0,t[od>>2]=7,t[od+4>>2]=0,t[r>>2]=t[od>>2],t[r+4>>2]=t[od+4>>2],O0(e,4217,r)|0,t[zf>>2]=3,t[zf+4>>2]=0,t[r>>2]=t[zf>>2],t[r+4>>2]=t[zf+4>>2],Jl(e,4235,r)|0,t[ud>>2]=1,t[ud+4>>2]=0,t[r>>2]=t[ud>>2],t[r+4>>2]=t[ud+4>>2],za(e,4251,r)|0,t[$a>>2]=4,t[$a+4>>2]=0,t[r>>2]=t[$a>>2],t[r+4>>2]=t[$a+4>>2],Jl(e,4263,r)|0,t[si>>2]=5,t[si+4>>2]=0,t[r>>2]=t[si>>2],t[r+4>>2]=t[si+4>>2],Jl(e,4279,r)|0,t[id>>2]=6,t[id+4>>2]=0,t[r>>2]=t[id>>2],t[r+4>>2]=t[id+4>>2],Jl(e,4293,r)|0,t[rd>>2]=7,t[rd+4>>2]=0,t[r>>2]=t[rd>>2],t[r+4>>2]=t[rd+4>>2],Jl(e,4306,r)|0,t[nd>>2]=8,t[nd+4>>2]=0,t[r>>2]=t[nd>>2],t[r+4>>2]=t[nd+4>>2],Jl(e,4323,r)|0,t[kc>>2]=9,t[kc+4>>2]=0,t[r>>2]=t[kc>>2],t[r+4>>2]=t[kc+4>>2],Jl(e,4335,r)|0,t[Oc>>2]=2,t[Oc+4>>2]=0,t[r>>2]=t[Oc>>2],t[r+4>>2]=t[Oc+4>>2],za(e,4353,r)|0,t[td>>2]=12,t[td+4>>2]=0,t[r>>2]=t[td>>2],t[r+4>>2]=t[td+4>>2],no(e,4363,r)|0,t[Za>>2]=1,t[Za+4>>2]=0,t[r>>2]=t[Za>>2],t[r+4>>2]=t[Za+4>>2],ul(e,4376,r)|0,t[ed>>2]=2,t[ed+4>>2]=0,t[r>>2]=t[ed>>2],t[r+4>>2]=t[ed+4>>2],ul(e,4388,r)|0,t[$2>>2]=13,t[$2+4>>2]=0,t[r>>2]=t[$2>>2],t[r+4>>2]=t[$2+4>>2],no(e,4402,r)|0,t[Xs>>2]=14,t[Xs+4>>2]=0,t[r>>2]=t[Xs>>2],t[r+4>>2]=t[Xs+4>>2],no(e,4411,r)|0,t[rs>>2]=15,t[rs+4>>2]=0,t[r>>2]=t[rs>>2],t[r+4>>2]=t[rs+4>>2],no(e,4421,r)|0,t[ns>>2]=16,t[ns+4>>2]=0,t[r>>2]=t[ns>>2],t[r+4>>2]=t[ns+4>>2],no(e,4433,r)|0,t[ts>>2]=17,t[ts+4>>2]=0,t[r>>2]=t[ts>>2],t[r+4>>2]=t[ts+4>>2],no(e,4446,r)|0,t[Zi>>2]=18,t[Zi+4>>2]=0,t[r>>2]=t[Zi>>2],t[r+4>>2]=t[Zi+4>>2],no(e,4458,r)|0,t[On>>2]=3,t[On+4>>2]=0,t[r>>2]=t[On>>2],t[r+4>>2]=t[On+4>>2],ul(e,4471,r)|0,t[kr>>2]=1,t[kr+4>>2]=0,t[r>>2]=t[kr>>2],t[r+4>>2]=t[kr+4>>2],dc(e,4486,r)|0,t[hr>>2]=10,t[hr+4>>2]=0,t[r>>2]=t[hr>>2],t[r+4>>2]=t[hr+4>>2],Jl(e,4496,r)|0,t[mn>>2]=11,t[mn+4>>2]=0,t[r>>2]=t[mn>>2],t[r+4>>2]=t[mn+4>>2],Jl(e,4508,r)|0,t[Nn>>2]=3,t[Nn+4>>2]=0,t[r>>2]=t[Nn>>2],t[r+4>>2]=t[Nn+4>>2],za(e,4519,r)|0,t[Lr>>2]=4,t[Lr+4>>2]=0,t[r>>2]=t[Lr>>2],t[r+4>>2]=t[Lr+4>>2],Od(e,4530,r)|0,t[Qt>>2]=19,t[Qt+4>>2]=0,t[r>>2]=t[Qt>>2],t[r+4>>2]=t[Qt+4>>2],_h(e,4542,r)|0,t[Fe>>2]=12,t[Fe+4>>2]=0,t[r>>2]=t[Fe>>2],t[r+4>>2]=t[Fe+4>>2],_f(e,4554,r)|0,t[Re>>2]=13,t[Re+4>>2]=0,t[r>>2]=t[Re>>2],t[r+4>>2]=t[Re+4>>2],Ef(e,4568,r)|0,t[st>>2]=2,t[st+4>>2]=0,t[r>>2]=t[st>>2],t[r+4>>2]=t[st+4>>2],Qc(e,4578,r)|0,t[We>>2]=20,t[We+4>>2]=0,t[r>>2]=t[We>>2],t[r+4>>2]=t[We+4>>2],xl(e,4587,r)|0,t[Qe>>2]=22,t[Qe+4>>2]=0,t[r>>2]=t[Qe>>2],t[r+4>>2]=t[Qe+4>>2],js(e,4602,r)|0,t[ve>>2]=23,t[ve+4>>2]=0,t[r>>2]=t[ve>>2],t[r+4>>2]=t[ve+4>>2],js(e,4619,r)|0,t[Ee>>2]=14,t[Ee+4>>2]=0,t[r>>2]=t[Ee>>2],t[r+4>>2]=t[Ee+4>>2],Jc(e,4629,r)|0,t[Pe>>2]=1,t[Pe+4>>2]=0,t[r>>2]=t[Pe>>2],t[r+4>>2]=t[Pe+4>>2],ca(e,4637,r)|0,t[K>>2]=4,t[K+4>>2]=0,t[r>>2]=t[K>>2],t[r+4>>2]=t[K+4>>2],ul(e,4653,r)|0,t[P>>2]=5,t[P+4>>2]=0,t[r>>2]=t[P>>2],t[r+4>>2]=t[P+4>>2],ul(e,4669,r)|0,t[O>>2]=6,t[O+4>>2]=0,t[r>>2]=t[O>>2],t[r+4>>2]=t[O+4>>2],ul(e,4686,r)|0,t[M>>2]=7,t[M+4>>2]=0,t[r>>2]=t[M>>2],t[r+4>>2]=t[M+4>>2],ul(e,4701,r)|0,t[S>>2]=8,t[S+4>>2]=0,t[r>>2]=t[S>>2],t[r+4>>2]=t[S+4>>2],ul(e,4719,r)|0,t[D>>2]=9,t[D+4>>2]=0,t[r>>2]=t[D>>2],t[r+4>>2]=t[D+4>>2],ul(e,4736,r)|0,t[h>>2]=21,t[h+4>>2]=0,t[r>>2]=t[h>>2],t[r+4>>2]=t[h+4>>2],c2(e,4754,r)|0,t[s>>2]=2,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],dc(e,4772,r)|0,t[l>>2]=3,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],dc(e,4790,r)|0,t[u>>2]=4,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],dc(e,4808,r)|0,m=n}function gf(e,n){e=e|0,n=n|0;var r=0;r=Ja()|0,t[e>>2]=r,jo(r,n),Q2(t[e>>2]|0)}function Xc(e,n,r){return e=e|0,n=n|0,r=r|0,Ot(e,Or(n)|0,r,0),e|0}function gh(e,n,r){return e=e|0,n=n|0,r=r|0,c(e,Or(n)|0,r,0),e|0}function vm(e,n,r){return e=e|0,n=n|0,r=r|0,cE(e,Or(n)|0,r,0),e|0}function js(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],rE(e,n,l),m=u,e|0}function fa(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bl(e,n,l),m=u,e|0}function Ji(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],d(e,n,l),m=u,e|0}function O0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Tv(e,n,l),m=u,e|0}function t0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],sy(e,n,l),m=u,e|0}function Jl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],W2(e,n,l),m=u,e|0}function za(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],H2(e,n,l),m=u,e|0}function no(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],k0(e,n,l),m=u,e|0}function ul(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ep(e,n,l),m=u,e|0}function dc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Hm(e,n,l),m=u,e|0}function Od(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],n0(e,n,l),m=u,e|0}function _h(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],x2(e,n,l),m=u,e|0}function _f(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Fm(e,n,l),m=u,e|0}function Ef(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Zd(e,n,l),m=u,e|0}function Qc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],p1(e,n,l),m=u,e|0}function xl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ga(e,n,l),m=u,e|0}function Jc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Id(e,n,l),m=u,e|0}function ca(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Nd(e,n,l),m=u,e|0}function c2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],d2(e,n,l),m=u,e|0}function d2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],da(e,r,l,1),m=u}function Or(e){return e=e|0,e|0}function da(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=kd()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Zc(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,p2(s,u)|0,u),m=l}function kd(){var e=0,n=0;if(p[7616]|0||(ol(9136),Ht(24,9136,he|0)|0,n=7616,t[n>>2]=1,t[n+4>>2]=0),!(rr(9136)|0)){e=9136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));ol(9136)}return 9136}function Zc(e){return e=e|0,0}function p2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=kd()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Df(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(wf(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function vi(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0;h=m,m=m+32|0,K=h+24|0,P=h+20|0,S=h+16|0,O=h+12|0,M=h+8|0,D=h+4|0,Pe=h,t[P>>2]=n,t[S>>2]=r,t[O>>2]=u,t[M>>2]=l,t[D>>2]=s,s=e+28|0,t[Pe>>2]=t[s>>2],t[K>>2]=t[Pe>>2],Md(e+24|0,K,P,O,M,S,D)|0,t[s>>2]=t[t[s>>2]>>2],m=h}function Md(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,e=mm(n)|0,n=cn(24)|0,h2(n+4|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0,t[h>>2]|0),t[n>>2]=t[e>>2],t[e>>2]=n,n|0}function mm(e){return e=e|0,t[e>>2]|0}function h2(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function dn(e,n){return e=e|0,n=n|0,n|e|0}function Df(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function wf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=ym(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Sf(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Df(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Eh(e,D),gm(D),m=M;return}}function ym(e){return e=e|0,357913941}function Sf(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Eh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function gm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function ol(e){e=e|0,Bo(e)}function $c(e){e=e|0,Un(e+24|0)}function rr(e){return e=e|0,t[e>>2]|0}function Un(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Bo(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,3,n,zn()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function dr(){return 9228}function zn(){return 1140}function ll(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=yo(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=pc(n,u)|0,m=r,n|0}function Pn(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function yo(e){return e=e|0,(t[(kd()|0)+24>>2]|0)+(e*12|0)|0}function pc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+48|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),N1[r&31](u,e),u=ro(u)|0,m=l,u|0}function ro(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Ou(qa()|0)|0,u?(Zl(n,u),Tf(r,n),hc(e,r),e=Es(n)|0):e=vc(e)|0,m=l,e|0}function qa(){var e=0;return p[7632]|0||(xf(9184),Ht(25,9184,he|0)|0,e=7632,t[e>>2]=1,t[e+4>>2]=0),9184}function Ou(e){return e=e|0,t[e+36>>2]|0}function Zl(e,n){e=e|0,n=n|0,t[e>>2]=n,t[e+4>>2]=e,t[e+8>>2]=0}function Tf(e,n){e=e|0,n=n|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=0}function hc(e,n){e=e|0,n=n|0,io(n,e,e+8|0,e+16|0,e+24|0,e+32|0,e+40|0)|0}function Es(e){return e=e|0,t[(t[e+4>>2]|0)+8>>2]|0}function vc(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;S=m,m=m+16|0,r=S+4|0,u=S,l=Sa(8)|0,s=l,h=cn(48)|0,D=h,n=D+48|0;do t[D>>2]=t[e>>2],D=D+4|0,e=e+4|0;while((D|0)<(n|0));return n=s+4|0,t[n>>2]=h,D=cn(8)|0,h=t[n>>2]|0,t[u>>2]=0,t[r>>2]=t[u>>2],Dh(D,h,r),t[l>>2]=D,m=S,s|0}function Dh(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1092,t[r+12>>2]=n,t[e+4>>2]=r}function an(e){e=e|0,Pv(e),yt(e)}function $l(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function go(e){e=e|0,yt(e)}function io(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,s=Hi(t[e>>2]|0,n,r,u,l,s,h)|0,h=e+4|0,t[(t[h>>2]|0)+8>>2]=s,t[(t[h>>2]|0)+8>>2]|0}function Hi(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0;var D=0,S=0;return D=m,m=m+16|0,S=D,Ta(S),e=vo(e)|0,h=zr(e,+U[n>>3],+U[r>>3],+U[u>>3],+U[l>>3],+U[s>>3],+U[h>>3])|0,Ca(S),m=D,h|0}function zr(e,n,r,u,l,s,h){e=e|0,n=+n,r=+r,u=+u,l=+l,s=+s,h=+h;var D=0;return D=mo(Cf()|0)|0,n=+Cl(n),r=+Cl(r),u=+Cl(u),l=+Cl(l),s=+Cl(s),f0(0,D|0,e|0,+n,+r,+u,+l,+s,+ +Cl(h))|0}function Cf(){var e=0;return p[7624]|0||(_m(9172),e=7624,t[e>>2]=1,t[e+4>>2]=0),9172}function _m(e){e=e|0,nl(e,Al()|0,6)}function Al(){return 1112}function xf(e){e=e|0,Ha(e)}function Af(e){e=e|0,v2(e+24|0),m2(e+16|0)}function v2(e){e=e|0,e1(e)}function m2(e){e=e|0,mc(e)}function mc(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,yt(r);while((n|0)!=0);t[e>>2]=0}function e1(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,yt(r);while((n|0)!=0);t[e>>2]=0}function Ha(e){e=e|0;var n=0;t[e+16>>2]=0,t[e+20>>2]=0,n=e+24|0,t[n>>2]=0,t[e+28>>2]=n,t[e+36>>2]=0,p[e+40>>0]=0,p[e+41>>0]=0}function Nd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],y2(e,r,l,0),m=u}function y2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=t1()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Rf(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,n1(s,u)|0,u),m=l}function t1(){var e=0,n=0;if(p[7640]|0||(Rl(9232),Ht(26,9232,he|0)|0,n=7640,t[n>>2]=1,t[n+4>>2]=0),!(rr(9232)|0)){e=9232,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Rl(9232)}return 9232}function Rf(e){return e=e|0,0}function n1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=t1()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Wa(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(r1(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Wa(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function r1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ld(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,g2(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Wa(s,u,r),t[S>>2]=(t[S>>2]|0)+12,yc(e,D),i1(D),m=M;return}}function Ld(e){return e=e|0,357913941}function g2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function yc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function i1(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Rl(e){e=e|0,Fd(e)}function pa(e){e=e|0,wh(e+24|0)}function wh(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Fd(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,1,n,bd()|0,3),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function bd(){return 1144}function Sh(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,h=s+8|0,D=s,S=_2(e)|0,e=t[S+4>>2]|0,t[D>>2]=t[S>>2],t[D+4>>2]=e,t[h>>2]=t[D>>2],t[h+4>>2]=t[D+4>>2],Th(n,h,r,u,l),m=s}function _2(e){return e=e|0,(t[(t1()|0)+24>>2]|0)+(e*12|0)|0}function Th(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0,M=0;M=m,m=m+16|0,h=M+2|0,D=M+1|0,S=M,s=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(s=t[(t[e>>2]|0)+s>>2]|0),Ol(h,r),r=+es(h,r),Ol(D,u),u=+es(D,u),Ds(S,l),S=zs(S,l)|0,Z8[s&1](e,r,u,S),m=M}function Ol(e,n){e=e|0,n=+n}function es(e,n){return e=e|0,n=+n,+ +Ch(n)}function Ds(e,n){e=e|0,n=n|0}function zs(e,n){return e=e|0,n=n|0,Pd(n)|0}function Pd(e){return e=e|0,e|0}function Ch(e){return e=+e,+e}function Id(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Bd(e,r,l,1),m=u}function Bd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=u1()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=o1(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,xh(s,u)|0,u),m=l}function u1(){var e=0,n=0;if(p[7648]|0||(l1(9268),Ht(27,9268,he|0)|0,n=7648,t[n>>2]=1,t[n+4>>2]=0),!(rr(9268)|0)){e=9268,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));l1(9268)}return 9268}function o1(e){return e=e|0,0}function xh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=u1()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Ud(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jd(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Ud(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function jd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=ws(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Va(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Ud(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Ah(e,D),uu(D),m=M;return}}function ws(e){return e=e|0,357913941}function Va(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Ah(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function uu(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function l1(e){e=e|0,kl(e)}function Rh(e){e=e|0,s1(e+24|0)}function s1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function kl(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,4,n,Oh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Oh(){return 1160}function zd(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=kh(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=a1(n,u)|0,m=r,n|0}function kh(e){return e=e|0,(t[(u1()|0)+24>>2]|0)+(e*12|0)|0}function a1(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Ml(Xp[r&31](e)|0)|0}function Ml(e){return e=e|0,e&1|0}function Ga(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ha(e,r,l,0),m=u}function ha(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=qd()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Hd(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Em(s,u)|0,u),m=l}function qd(){var e=0,n=0;if(p[7656]|0||(Lh(9304),Ht(28,9304,he|0)|0,n=7656,t[n>>2]=1,t[n+4>>2]=0),!(rr(9304)|0)){e=9304,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Lh(9304)}return 9304}function Hd(e){return e=e|0,0}function Em(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=qd()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Wd(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Mh(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Wd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Mh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Nh(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Vd(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Wd(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Dm(e,D),wm(D),m=M;return}}function Nh(e){return e=e|0,357913941}function Vd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Dm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function wm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Lh(e){e=e|0,f1(e)}function Sm(e){e=e|0,Gd(e+24|0)}function Gd(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function f1(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,5,n,c1()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function c1(){return 1164}function d1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=va(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Yd(n,l,r),m=u}function va(e){return e=e|0,(t[(qd()|0)+24>>2]|0)+(e*12|0)|0}function Yd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),qs(l,r),r=Hs(l,r)|0,N1[u&31](e,r),Ws(l),m=s}function qs(e,n){e=e|0,n=n|0,Kd(e,n)}function Hs(e,n){return e=e|0,n=n|0,e|0}function Ws(e){e=e|0,ia(e)}function Kd(e,n){e=e|0,n=n|0,ma(e,n)}function ma(e,n){e=e|0,n=n|0,t[e>>2]=n}function p1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],E2(e,r,l,0),m=u}function E2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=gc()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Xd(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,_o(s,u)|0,u),m=l}function gc(){var e=0,n=0;if(p[7664]|0||(Uh(9340),Ht(29,9340,he|0)|0,n=7664,t[n>>2]=1,t[n+4>>2]=0),!(rr(9340)|0)){e=9340,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Uh(9340)}return 9340}function Xd(e){return e=e|0,0}function _o(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=gc()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Fh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(bh(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Fh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function bh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ph(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Ih(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Fh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Tm(e,D),Bh(D),m=M;return}}function Ph(e){return e=e|0,357913941}function Ih(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Tm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Bh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Uh(e){e=e|0,jh(e)}function h1(e){e=e|0,Qd(e+24|0)}function Qd(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function jh(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,4,n,Jd()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Jd(){return 1180}function zh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=Cm(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=xm(n,l,r)|0,m=u,r|0}function Cm(e){return e=e|0,(t[(gc()|0)+24>>2]|0)+(e*12|0)|0}function xm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Of(l,r),l=kf(l,r)|0,l=D2(ZE[u&15](e,l)|0)|0,m=s,l|0}function Of(e,n){e=e|0,n=n|0}function kf(e,n){return e=e|0,n=n|0,Am(n)|0}function D2(e){return e=e|0,e|0}function Am(e){return e=e|0,e|0}function Zd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],w2(e,r,l,0),m=u}function w2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=$d()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=qh(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,ep(s,u)|0,u),m=l}function $d(){var e=0,n=0;if(p[7672]|0||(Vh(9376),Ht(30,9376,he|0)|0,n=7672,t[n>>2]=1,t[n+4>>2]=0),!(rr(9376)|0)){e=9376,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Vh(9376)}return 9376}function qh(e){return e=e|0,0}function ep(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=$d()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Hh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Wh(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Hh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Wh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=tp(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Rm(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Hh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Om(e,D),km(D),m=M;return}}function tp(e){return e=e|0,357913941}function Rm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Om(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function km(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Vh(e){e=e|0,np(e)}function v1(e){e=e|0,Mm(e+24|0)}function Mm(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function np(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,5,n,rp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function rp(){return 1196}function Nm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Lm(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Gh(n,u)|0,m=r,n|0}function Lm(e){return e=e|0,(t[($d()|0)+24>>2]|0)+(e*12|0)|0}function Gh(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),D2(Xp[r&31](e)|0)|0}function Fm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bm(e,r,l,1),m=u}function bm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=ip()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=up(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,ya(s,u)|0,u),m=l}function ip(){var e=0,n=0;if(p[7680]|0||(lp(9412),Ht(31,9412,he|0)|0,n=7680,t[n>>2]=1,t[n+4>>2]=0),!(rr(9412)|0)){e=9412,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));lp(9412)}return 9412}function up(e){return e=e|0,0}function ya(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=ip()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],m1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(op(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function m1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function op(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Yh(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,S2(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],m1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,y1(e,D),Kh(D),m=M;return}}function Yh(e){return e=e|0,357913941}function S2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function y1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Kh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function lp(e){e=e|0,Qh(e)}function Xh(e){e=e|0,sp(e+24|0)}function sp(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Qh(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,6,n,Jh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Jh(){return 1200}function ap(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=T2(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=C2(n,u)|0,m=r,n|0}function T2(e){return e=e|0,(t[(ip()|0)+24>>2]|0)+(e*12|0)|0}function C2(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),z0(Xp[r&31](e)|0)|0}function z0(e){return e=e|0,e|0}function x2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ga(e,r,l,0),m=u}function ga(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Ya()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=A2(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,R2(s,u)|0,u),m=l}function Ya(){var e=0,n=0;if(p[7688]|0||(dp(9448),Ht(32,9448,he|0)|0,n=7688,t[n>>2]=1,t[n+4>>2]=0),!(rr(9448)|0)){e=9448,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));dp(9448)}return 9448}function A2(e){return e=e|0,0}function R2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Ya()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],fp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(O2(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function fp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function O2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Zh(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Pm(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],fp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,$h(e,D),cp(D),m=M;return}}function Zh(e){return e=e|0,357913941}function Pm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function $h(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function cp(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function dp(e){e=e|0,Bm(e)}function pp(e){e=e|0,Im(e+24|0)}function Im(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Bm(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,6,n,Eo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Eo(){return 1204}function k2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=Um(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],sl(n,l,r),m=u}function Um(e){return e=e|0,(t[(Ya()|0)+24>>2]|0)+(e*12|0)|0}function sl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Jn(l,r),l=Vs(l,r)|0,N1[u&31](e,l),m=s}function Jn(e,n){e=e|0,n=n|0}function Vs(e,n){return e=e|0,n=n|0,al(n)|0}function al(e){return e=e|0,e|0}function n0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ev(e,r,l,0),m=u}function ev(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Gs()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=hp(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,jm(s,u)|0,u),m=l}function Gs(){var e=0,n=0;if(p[7696]|0||(yp(9484),Ht(33,9484,he|0)|0,n=7696,t[n>>2]=1,t[n+4>>2]=0),!(rr(9484)|0)){e=9484,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));yp(9484)}return 9484}function hp(e){return e=e|0,0}function jm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Gs()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],tv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(vp(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function tv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function vp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=zm(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,mp(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],tv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,_c(e,D),Ea(D),m=M;return}}function zm(e){return e=e|0,357913941}function mp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function _c(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ea(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function yp(e){e=e|0,zu(e)}function M2(e){e=e|0,ku(e+24|0)}function ku(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function zu(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,1,n,gp()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gp(){return 1212}function _p(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=nv(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],qm(n,s,r,u),m=l}function nv(e){return e=e|0,(t[(Gs()|0)+24>>2]|0)+(e*12|0)|0}function qm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),Jn(s,r),s=Vs(s,r)|0,Of(h,u),h=kf(h,u)|0,jy[l&15](e,s,h),m=D}function Hm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Wm(e,r,l,1),m=u}function Wm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=N2()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=rv(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Ec(s,u)|0,u),m=l}function N2(){var e=0,n=0;if(p[7704]|0||(iv(9520),Ht(34,9520,he|0)|0,n=7704,t[n>>2]=1,t[n+4>>2]=0),!(rr(9520)|0)){e=9520,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));iv(9520)}return 9520}function rv(e){return e=e|0,0}function Ec(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=N2()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],g1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Vm(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function g1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Vm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=L2(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,_1(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],g1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Nl(e,D),Da(D),m=M;return}}function L2(e){return e=e|0,357913941}function _1(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Nl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Da(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function iv(e){e=e|0,ov(e)}function Gm(e){e=e|0,uv(e+24|0)}function uv(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function ov(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,1,n,Ym()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Ym(){return 1224}function lv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;return l=m,m=m+16|0,s=l+8|0,h=l,D=wa(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],u=+Cr(n,s,r),m=l,+u}function wa(e){return e=e|0,(t[(N2()|0)+24>>2]|0)+(e*12|0)|0}function Cr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ds(l,r),l=zs(l,r)|0,h=+ja(+eS[u&7](e,l)),m=s,+h}function Ep(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],fl(e,r,l,1),m=u}function fl(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=cu()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=E1(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,ki(s,u)|0,u),m=l}function cu(){var e=0,n=0;if(p[7712]|0||(wp(9556),Ht(35,9556,he|0)|0,n=7712,t[n>>2]=1,t[n+4>>2]=0),!(rr(9556)|0)){e=9556,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));wp(9556)}return 9556}function E1(e){return e=e|0,0}function ki(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=cu()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Dp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(F2(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Dp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function F2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Do(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Ss(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Dp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Mf(e,D),b2(D),m=M;return}}function Do(e){return e=e|0,357913941}function Ss(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Mf(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function b2(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function wp(e){e=e|0,Sp(e)}function D1(e){e=e|0,w1(e+24|0)}function w1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Sp(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,5,n,Zn()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Zn(){return 1232}function cl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=qn(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=+q0(n,l),m=u,+r}function qn(e){return e=e|0,(t[(cu()|0)+24>>2]|0)+(e*12|0)|0}function q0(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),+ +ja(+$8[r&15](e))}function k0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],P2(e,r,l,1),m=u}function P2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Ll()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=S1(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Dc(s,u)|0,u),m=l}function Ll(){var e=0,n=0;if(p[7720]|0||(U2(9592),Ht(36,9592,he|0)|0,n=7720,t[n>>2]=1,t[n+4>>2]=0),!(rr(9592)|0)){e=9592,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));U2(9592)}return 9592}function S1(e){return e=e|0,0}function Dc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Ll()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],wc(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(I2(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function wc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function I2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Tp(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,M0(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],wc(s,u,r),t[S>>2]=(t[S>>2]|0)+12,fn(e,D),B2(D),m=M;return}}function Tp(e){return e=e|0,357913941}function M0(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function fn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function B2(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function U2(e){e=e|0,Cc(e)}function Sc(e){e=e|0,Tc(e+24|0)}function Tc(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Cc(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,7,n,T1()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function T1(){return 1276}function Cp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Ka(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Km(n,u)|0,m=r,n|0}function Ka(e){return e=e|0,(t[(Ll()|0)+24>>2]|0)+(e*12|0)|0}function Km(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+16|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),N1[r&31](u,e),u=xc(u)|0,m=l,u|0}function xc(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Ou(j2()|0)|0,u?(Zl(n,u),Tf(r,n),sv(e,r),e=Es(n)|0):e=C1(e)|0,m=l,e|0}function j2(){var e=0;return p[7736]|0||(Uo(9640),Ht(25,9640,he|0)|0,e=7736,t[e>>2]=1,t[e+4>>2]=0),9640}function sv(e,n){e=e|0,n=n|0,Ac(n,e,e+8|0)|0}function C1(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Sa(8)|0,n=u,D=cn(16)|0,t[D>>2]=t[e>>2],t[D+4>>2]=t[e+4>>2],t[D+8>>2]=t[e+8>>2],t[D+12>>2]=t[e+12>>2],s=n+4|0,t[s>>2]=D,e=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Nf(e,s,l),t[u>>2]=e,m=r,n|0}function Nf(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1244,t[r+12>>2]=n,t[e+4>>2]=r}function Lf(e){e=e|0,Pv(e),yt(e)}function x1(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function Fl(e){e=e|0,yt(e)}function Ac(e,n,r){return e=e|0,n=n|0,r=r|0,n=Ff(t[e>>2]|0,n,r)|0,r=e+4|0,t[(t[r>>2]|0)+8>>2]=n,t[(t[r>>2]|0)+8>>2]|0}function Ff(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return u=m,m=m+16|0,l=u,Ta(l),e=vo(e)|0,r=Xm(e,t[n>>2]|0,+U[r>>3])|0,Ca(l),m=u,r|0}function Xm(e,n,r){e=e|0,n=n|0,r=+r;var u=0;return u=mo(dl()|0)|0,n=u2(n)|0,Pr(0,u|0,e|0,n|0,+ +Cl(r))|0}function dl(){var e=0;return p[7728]|0||(z2(9628),e=7728,t[e>>2]=1,t[e+4>>2]=0),9628}function z2(e){e=e|0,nl(e,q2()|0,2)}function q2(){return 1264}function Uo(e){e=e|0,Ha(e)}function H2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Qm(e,r,l,1),m=u}function Qm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=A1()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Jm(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Zm(s,u)|0,u),m=l}function A1(){var e=0,n=0;if(p[7744]|0||(cv(9684),Ht(37,9684,he|0)|0,n=7744,t[n>>2]=1,t[n+4>>2]=0),!(rr(9684)|0)){e=9684,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));cv(9684)}return 9684}function Jm(e){return e=e|0,0}function Zm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=A1()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],av(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):($m(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function av(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function $m(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=fv(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,ey(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],av(s,u,r),t[S>>2]=(t[S>>2]|0)+12,ty(e,D),ny(D),m=M;return}}function fv(e){return e=e|0,357913941}function ey(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function ty(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function ny(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function cv(e){e=e|0,iy(e)}function ry(e){e=e|0,xp(e+24|0)}function xp(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function iy(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,5,n,bf()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function bf(){return 1280}function dv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=pv(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=hv(n,l,r)|0,m=u,r|0}function pv(e){return e=e|0,(t[(A1()|0)+24>>2]|0)+(e*12|0)|0}function hv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return h=m,m=m+32|0,l=h,s=h+16|0,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ds(s,r),s=zs(s,r)|0,jy[u&15](l,e,s),s=xc(l)|0,m=h,s|0}function W2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],V2(e,r,l,1),m=u}function V2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Ap()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=vv(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,G2(s,u)|0,u),m=l}function Ap(){var e=0,n=0;if(p[7752]|0||(Ev(9720),Ht(38,9720,he|0)|0,n=7752,t[n>>2]=1,t[n+4>>2]=0),!(rr(9720)|0)){e=9720,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ev(9720)}return 9720}function vv(e){return e=e|0,0}function G2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Ap()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],mv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(yv(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function mv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function yv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Rp(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,gv(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],mv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,_v(e,D),uy(D),m=M;return}}function Rp(e){return e=e|0,357913941}function gv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function _v(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function uy(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Ev(e){e=e|0,Dv(e)}function oy(e){e=e|0,Y2(e+24|0)}function Y2(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Dv(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,8,n,Op()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Op(){return 1288}function ly(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=r0(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=kp(n,u)|0,m=r,n|0}function r0(e){return e=e|0,(t[(Ap()|0)+24>>2]|0)+(e*12|0)|0}function kp(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),s2(Xp[r&31](e)|0)|0}function sy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ay(e,r,l,0),m=u}function ay(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Mp()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Xa(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Np(s,u)|0,u),m=l}function Mp(){var e=0,n=0;if(p[7760]|0||(bp(9756),Ht(39,9756,he|0)|0,n=7760,t[n>>2]=1,t[n+4>>2]=0),!(rr(9756)|0)){e=9756,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));bp(9756)}return 9756}function Xa(e){return e=e|0,0}function Np(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Mp()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Lp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Fp(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Lp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Fp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=fy(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,cy(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Lp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,wv(e,D),Pf(D),m=M;return}}function fy(e){return e=e|0,357913941}function cy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function wv(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Pf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function bp(e){e=e|0,py(e)}function Sv(e){e=e|0,dy(e+24|0)}function dy(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function py(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,8,n,Pp()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Pp(){return 1292}function Ip(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=hy(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],vy(n,l,r),m=u}function hy(e){return e=e|0,(t[(Mp()|0)+24>>2]|0)+(e*12|0)|0}function vy(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ol(l,r),r=+es(l,r),Q8[u&31](e,r),m=s}function Tv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Bp(e,r,l,0),m=u}function Bp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Up()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=K2(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,my(s,u)|0,u),m=l}function Up(){var e=0,n=0;if(p[7768]|0||(jp(9792),Ht(40,9792,he|0)|0,n=7768,t[n>>2]=1,t[n+4>>2]=0),!(rr(9792)|0)){e=9792,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));jp(9792)}return 9792}function K2(e){return e=e|0,0}function my(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Up()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],R1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(yy(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function R1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function yy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Cv(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,xv(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],R1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,gy(e,D),If(D),m=M;return}}function Cv(e){return e=e|0,357913941}function xv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function gy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function If(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function jp(e){e=e|0,Ey(e)}function Av(e){e=e|0,_y(e+24|0)}function _y(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Ey(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,1,n,zp()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zp(){return 1300}function Dy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=Ys(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],wy(n,s,r,u),m=l}function Ys(e){return e=e|0,(t[(Up()|0)+24>>2]|0)+(e*12|0)|0}function wy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),Ds(s,r),s=zs(s,r)|0,Ol(h,u),u=+es(h,u),iS[l&15](e,s,u),m=D}function d(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],v(e,r,l,0),m=u}function v(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=x()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=b(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,H(s,u)|0,u),m=l}function x(){var e=0,n=0;if(p[7776]|0||(Rt(9828),Ht(41,9828,he|0)|0,n=7776,t[n>>2]=1,t[n+4>>2]=0),!(rr(9828)|0)){e=9828,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Rt(9828)}return 9828}function b(e){return e=e|0,0}function H(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=x()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],ee(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(de(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function ee(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function de(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=ye(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,be(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],ee(s,u,r),t[S>>2]=(t[S>>2]|0)+12,gt(e,D),Dt(D),m=M;return}}function ye(e){return e=e|0,357913941}function be(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function gt(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Dt(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Rt(e){e=e|0,$n(e)}function rn(e){e=e|0,Rn(e+24|0)}function Rn(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function $n(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,7,n,Nr()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Nr(){return 1312}function ir(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=Zr(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ui(n,l,r),m=u}function Zr(e){return e=e|0,(t[(x()|0)+24>>2]|0)+(e*12|0)|0}function ui(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ds(l,r),l=zs(l,r)|0,N1[u&31](e,l),m=s}function bl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Wi(e,r,l,0),m=u}function Wi(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=uo()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=i0(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Ts(s,u)|0,u),m=l}function uo(){var e=0,n=0;if(p[7784]|0||(r_(9864),Ht(42,9864,he|0)|0,n=7784,t[n>>2]=1,t[n+4>>2]=0),!(rr(9864)|0)){e=9864,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));r_(9864)}return 9864}function i0(e){return e=e|0,0}function Ts(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=uo()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],wo(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Rv(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function wo(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Rv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=X4(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Sy(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],wo(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Ty(e,D),Qa(D),m=M;return}}function X4(e){return e=e|0,357913941}function Sy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Ty(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Qa(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function r_(e){e=e|0,Z4(e)}function Q4(e){e=e|0,J4(e+24|0)}function J4(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Z4(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,8,n,$4()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function $4(){return 1320}function Cy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=eE(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],tE(n,l,r),m=u}function eE(e){return e=e|0,(t[(uo()|0)+24>>2]|0)+(e*12|0)|0}function tE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xy(l,r),l=i_(l,r)|0,N1[u&31](e,l),m=s}function xy(e,n){e=e|0,n=n|0}function i_(e,n){return e=e|0,n=n|0,nE(n)|0}function nE(e){return e=e|0,e|0}function rE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],u_(e,r,l,0),m=u}function u_(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Bf()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=o_(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,iE(s,u)|0,u),m=l}function Bf(){var e=0,n=0;if(p[7792]|0||(Oy(9900),Ht(43,9900,he|0)|0,n=7792,t[n>>2]=1,t[n+4>>2]=0),!(rr(9900)|0)){e=9900,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Oy(9900)}return 9900}function o_(e){return e=e|0,0}function iE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Bf()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],qp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(uE(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function qp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function uE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ov(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Ay(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],qp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Ry(e,D),oE(D),m=M;return}}function Ov(e){return e=e|0,357913941}function Ay(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Ry(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function oE(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Oy(e){e=e|0,l_(e)}function lE(e){e=e|0,sE(e+24|0)}function sE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function l_(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,22,n,aE()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function aE(){return 1344}function fE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;r=m,m=m+16|0,u=r+8|0,l=r,s=s_(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],kv(n,u),m=r}function s_(e){return e=e|0,(t[(Bf()|0)+24>>2]|0)+(e*12|0)|0}function kv(e,n){e=e|0,n=n|0;var r=0;r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),M1[r&127](e)}function cE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=ky()|0,e=dE(r)|0,vi(s,n,l,e,pE(r,u)|0,u)}function ky(){var e=0,n=0;if(p[7800]|0||(Ny(9936),Ht(44,9936,he|0)|0,n=7800,t[n>>2]=1,t[n+4>>2]=0),!(rr(9936)|0)){e=9936,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ny(9936)}return 9936}function dE(e){return e=e|0,e|0}function pE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=ky()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(My(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(a_(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function My(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function a_(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=f_(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,c_(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,My(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,d_(e,l),p_(l),m=D;return}}function f_(e){return e=e|0,536870911}function c_(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function d_(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function p_(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function Ny(e){e=e|0,v_(e)}function h_(e){e=e|0,hE(e+24|0)}function hE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function v_(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,23,n,Eo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function vE(e,n){e=e|0,n=n|0,a(t[(mE(e)|0)>>2]|0,n)}function mE(e){return e=e|0,(t[(ky()|0)+24>>2]|0)+(e<<3)|0}function a(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Jn(u,n),n=Vs(u,n)|0,M1[e&127](n),m=r}function c(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=_()|0,e=T(r)|0,vi(s,n,l,e,R(r,u)|0,u)}function _(){var e=0,n=0;if(p[7808]|0||(pt(9972),Ht(45,9972,he|0)|0,n=7808,t[n>>2]=1,t[n+4>>2]=0),!(rr(9972)|0)){e=9972,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));pt(9972)}return 9972}function T(e){return e=e|0,e|0}function R(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=_()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(j(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(V(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function j(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function V(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=te(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,oe(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,j(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Ie(e,l),Ye(l),m=D;return}}function te(e){return e=e|0,536870911}function oe(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Ie(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ye(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function pt(e){e=e|0,zt(e)}function Nt(e){e=e|0,Vt(e+24|0)}function Vt(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function zt(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,9,n,vn()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function vn(){return 1348}function xr(e,n){return e=e|0,n=n|0,wi(t[($r(e)|0)>>2]|0,n)|0}function $r(e){return e=e|0,(t[(_()|0)+24>>2]|0)+(e<<3)|0}function wi(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,N0(u,n),n=Vi(u,n)|0,n=D2(Xp[e&31](n)|0)|0,m=r,n|0}function N0(e,n){e=e|0,n=n|0}function Vi(e,n){return e=e|0,n=n|0,it(n)|0}function it(e){return e=e|0,e|0}function Ot(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=Je()|0,e=Bt(r)|0,vi(s,n,l,e,Mn(r,u)|0,u)}function Je(){var e=0,n=0;if(p[7816]|0||(qr(10008),Ht(46,10008,he|0)|0,n=7816,t[n>>2]=1,t[n+4>>2]=0),!(rr(10008)|0)){e=10008,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));qr(10008)}return 10008}function Bt(e){return e=e|0,e|0}function Mn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=Je()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(pn(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Pi(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function pn(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Pi(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=oi(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,qu(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,pn(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,ar(e,l),ou(l),m=D;return}}function oi(e){return e=e|0,536870911}function qu(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function ar(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function ou(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function qr(e){e=e|0,H0(e)}function _u(e){e=e|0,_0(e+24|0)}function _0(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function H0(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,15,n,rp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Cs(e){return e=e|0,pl(t[(Hu(e)|0)>>2]|0)|0}function Hu(e){return e=e|0,(t[(Je()|0)+24>>2]|0)+(e<<3)|0}function pl(e){return e=e|0,D2(N_[e&7]()|0)|0}function Ja(){var e=0;return p[7832]|0||(y_(10052),Ht(25,10052,he|0)|0,e=7832,t[e>>2]=1,t[e+4>>2]=0),10052}function jo(e,n){e=e|0,n=n|0,t[e>>2]=xs()|0,t[e+4>>2]=X2()|0,t[e+12>>2]=n,t[e+8>>2]=Uf()|0,t[e+32>>2]=2}function xs(){return 11709}function X2(){return 1188}function Uf(){return O1()|0}function Rc(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(zo(r),yt(r)):n|0&&(ms(n),yt(n))}function Pl(e,n){return e=e|0,n=n|0,n&e|0}function zo(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function O1(){var e=0;return p[7824]|0||(t[2511]=m_()|0,t[2512]=0,e=7824,t[e>>2]=1,t[e+4>>2]=0),10044}function m_(){return 0}function y_(e){e=e|0,Ha(e)}function yE(e){e=e|0;var n=0,r=0,u=0,l=0,s=0;n=m,m=m+32|0,r=n+24|0,s=n+16|0,l=n+8|0,u=n,g_(e,4827),gE(e,4834,3)|0,_E(e,3682,47)|0,t[s>>2]=9,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],Ly(e,4841,r)|0,t[l>>2]=1,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],__(e,4871,r)|0,t[u>>2]=10,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],EE(e,4891,r)|0,m=n}function g_(e,n){e=e|0,n=n|0;var r=0;r=Qk()|0,t[e>>2]=r,Jk(r,n),Q2(t[e>>2]|0)}function gE(e,n,r){return e=e|0,n=n|0,r=r|0,Fk(e,Or(n)|0,r,0),e|0}function _E(e,n,r){return e=e|0,n=n|0,r=r|0,_k(e,Or(n)|0,r,0),e|0}function Ly(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ek(e,n,l),m=u,e|0}function __(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bO(e,n,l),m=u,e|0}function EE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],DE(e,n,l),m=u,e|0}function DE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],wE(e,r,l,1),m=u}function wE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=SE()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=DO(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,wO(s,u)|0,u),m=l}function SE(){var e=0,n=0;if(p[7840]|0||(L3(10100),Ht(48,10100,he|0)|0,n=7840,t[n>>2]=1,t[n+4>>2]=0),!(rr(10100)|0)){e=10100,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));L3(10100)}return 10100}function DO(e){return e=e|0,0}function wO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=SE()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],N3(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(SO(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function N3(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function SO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=TO(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,CO(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],N3(s,u,r),t[S>>2]=(t[S>>2]|0)+12,xO(e,D),AO(D),m=M;return}}function TO(e){return e=e|0,357913941}function CO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function xO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function AO(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function L3(e){e=e|0,kO(e)}function RO(e){e=e|0,OO(e+24|0)}function OO(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function kO(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,6,n,MO()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function MO(){return 1364}function NO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=LO(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=FO(n,l,r)|0,m=u,r|0}function LO(e){return e=e|0,(t[(SE()|0)+24>>2]|0)+(e*12|0)|0}function FO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ds(l,r),l=zs(l,r)|0,l=Ml(ZE[u&15](e,l)|0)|0,m=s,l|0}function bO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],PO(e,r,l,0),m=u}function PO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=TE()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=IO(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,BO(s,u)|0,u),m=l}function TE(){var e=0,n=0;if(p[7848]|0||(b3(10136),Ht(49,10136,he|0)|0,n=7848,t[n>>2]=1,t[n+4>>2]=0),!(rr(10136)|0)){e=10136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));b3(10136)}return 10136}function IO(e){return e=e|0,0}function BO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=TE()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],F3(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(UO(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function F3(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function UO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=jO(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,zO(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],F3(s,u,r),t[S>>2]=(t[S>>2]|0)+12,qO(e,D),HO(D),m=M;return}}function jO(e){return e=e|0,357913941}function zO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function qO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function HO(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function b3(e){e=e|0,GO(e)}function WO(e){e=e|0,VO(e+24|0)}function VO(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function GO(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,9,n,YO()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function YO(){return 1372}function KO(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=XO(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],QO(n,l,r),m=u}function XO(e){return e=e|0,(t[(TE()|0)+24>>2]|0)+(e*12|0)|0}function QO(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=St;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),JO(l,r),h=w(ZO(l,r)),X8[u&1](e,h),m=s}function JO(e,n){e=e|0,n=+n}function ZO(e,n){return e=e|0,n=+n,w($O(n))}function $O(e){return e=+e,w(e)}function ek(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],tk(e,r,l,0),m=u}function tk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=CE()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=nk(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,rk(s,u)|0,u),m=l}function CE(){var e=0,n=0;if(p[7856]|0||(I3(10172),Ht(50,10172,he|0)|0,n=7856,t[n>>2]=1,t[n+4>>2]=0),!(rr(10172)|0)){e=10172,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));I3(10172)}return 10172}function nk(e){return e=e|0,0}function rk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=CE()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],P3(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(ik(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function P3(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function ik(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=uk(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,ok(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],P3(s,u,r),t[S>>2]=(t[S>>2]|0)+12,lk(e,D),sk(D),m=M;return}}function uk(e){return e=e|0,357913941}function ok(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function lk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function sk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function I3(e){e=e|0,ck(e)}function ak(e){e=e|0,fk(e+24|0)}function fk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function ck(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,3,n,dk()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function dk(){return 1380}function pk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=hk(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],vk(n,s,r,u),m=l}function hk(e){return e=e|0,(t[(CE()|0)+24>>2]|0)+(e*12|0)|0}function vk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),Ds(s,r),s=zs(s,r)|0,mk(h,u),h=yk(h,u)|0,jy[l&15](e,s,h),m=D}function mk(e,n){e=e|0,n=n|0}function yk(e,n){return e=e|0,n=n|0,gk(n)|0}function gk(e){return e=e|0,(e|0)!=0|0}function _k(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=xE()|0,e=Ek(r)|0,vi(s,n,l,e,Dk(r,u)|0,u)}function xE(){var e=0,n=0;if(p[7864]|0||(U3(10208),Ht(51,10208,he|0)|0,n=7864,t[n>>2]=1,t[n+4>>2]=0),!(rr(10208)|0)){e=10208,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));U3(10208)}return 10208}function Ek(e){return e=e|0,e|0}function Dk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=xE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(B3(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(wk(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function B3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function wk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Sk(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,Tk(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,B3(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Ck(e,l),xk(l),m=D;return}}function Sk(e){return e=e|0,536870911}function Tk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Ck(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function xk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function U3(e){e=e|0,Ok(e)}function Ak(e){e=e|0,Rk(e+24|0)}function Rk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function Ok(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,24,n,kk()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function kk(){return 1392}function Mk(e,n){e=e|0,n=n|0,Lk(t[(Nk(e)|0)>>2]|0,n)}function Nk(e){return e=e|0,(t[(xE()|0)+24>>2]|0)+(e<<3)|0}function Lk(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,N0(u,n),n=Vi(u,n)|0,M1[e&127](n),m=r}function Fk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=AE()|0,e=bk(r)|0,vi(s,n,l,e,Pk(r,u)|0,u)}function AE(){var e=0,n=0;if(p[7872]|0||(z3(10244),Ht(52,10244,he|0)|0,n=7872,t[n>>2]=1,t[n+4>>2]=0),!(rr(10244)|0)){e=10244,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));z3(10244)}return 10244}function bk(e){return e=e|0,e|0}function Pk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=AE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(j3(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Ik(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function j3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Ik(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Bk(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,Uk(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,j3(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,jk(e,l),zk(l),m=D;return}}function Bk(e){return e=e|0,536870911}function Uk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function jk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function zk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function z3(e){e=e|0,Wk(e)}function qk(e){e=e|0,Hk(e+24|0)}function Hk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function Wk(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,16,n,Vk()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Vk(){return 1400}function Gk(e){return e=e|0,Kk(t[(Yk(e)|0)>>2]|0)|0}function Yk(e){return e=e|0,(t[(AE()|0)+24>>2]|0)+(e<<3)|0}function Kk(e){return e=e|0,Xk(N_[e&7]()|0)|0}function Xk(e){return e=e|0,e|0}function Qk(){var e=0;return p[7880]|0||(rM(10280),Ht(25,10280,he|0)|0,e=7880,t[e>>2]=1,t[e+4>>2]=0),10280}function Jk(e,n){e=e|0,n=n|0,t[e>>2]=Zk()|0,t[e+4>>2]=$k()|0,t[e+12>>2]=n,t[e+8>>2]=eM()|0,t[e+32>>2]=4}function Zk(){return 11711}function $k(){return 1356}function eM(){return O1()|0}function tM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(nM(r),yt(r)):n|0&&(eo(n),yt(n))}function nM(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function rM(e){e=e|0,Ha(e)}function iM(e){e=e|0,uM(e,4920),oM(e)|0,lM(e)|0}function uM(e,n){e=e|0,n=n|0;var r=0;r=j2()|0,t[e>>2]=r,RM(r,n),Q2(t[e>>2]|0)}function oM(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,gM()|0),e|0}function lM(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,sM()|0),e|0}function sM(){var e=0;return p[7888]|0||(q3(10328),Ht(53,10328,he|0)|0,e=7888,t[e>>2]=1,t[e+4>>2]=0),rr(10328)|0||q3(10328),10328}function Hp(e,n){e=e|0,n=n|0,vi(e,0,n,0,0,0)}function q3(e){e=e|0,cM(e),Wp(e,10)}function aM(e){e=e|0,fM(e+24|0)}function fM(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function cM(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,1,n,vM()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function dM(e,n,r){e=e|0,n=n|0,r=+r,pM(e,n,r)}function Wp(e,n){e=e|0,n=n|0,t[e+20>>2]=n}function pM(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,s=u+8|0,D=u+13|0,l=u,h=u+12|0,Ds(D,n),t[s>>2]=zs(D,n)|0,Ol(h,r),U[l>>3]=+es(h,r),hM(e,s,l),m=u}function hM(e,n,r){e=e|0,n=n|0,r=r|0,I(e+8|0,t[n>>2]|0,+U[r>>3]),p[e+24>>0]=1}function vM(){return 1404}function mM(e,n){return e=e|0,n=+n,yM(e,n)|0}function yM(e,n){e=e|0,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,s=u+4|0,h=u+8|0,D=u,l=Sa(8)|0,r=l,S=cn(16)|0,Ds(s,e),e=zs(s,e)|0,Ol(h,n),I(S,e,+es(h,n)),h=r+4|0,t[h>>2]=S,e=cn(8)|0,h=t[h>>2]|0,t[D>>2]=0,t[s>>2]=t[D>>2],Nf(e,h,s),t[l>>2]=e,m=u,r|0}function gM(){var e=0;return p[7896]|0||(H3(10364),Ht(54,10364,he|0)|0,e=7896,t[e>>2]=1,t[e+4>>2]=0),rr(10364)|0||H3(10364),10364}function H3(e){e=e|0,DM(e),Wp(e,55)}function _M(e){e=e|0,EM(e+24|0)}function EM(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function DM(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,4,n,CM()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function wM(e){e=e|0,SM(e)}function SM(e){e=e|0,TM(e)}function TM(e){e=e|0,W3(e+8|0),p[e+24>>0]=1}function W3(e){e=e|0,t[e>>2]=0,U[e+8>>3]=0}function CM(){return 1424}function xM(){return AM()|0}function AM(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Sa(8)|0,e=r,u=cn(16)|0,W3(u),s=e+4|0,t[s>>2]=u,u=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Nf(u,s,l),t[r>>2]=u,m=n,e|0}function RM(e,n){e=e|0,n=n|0,t[e>>2]=OM()|0,t[e+4>>2]=kM()|0,t[e+12>>2]=n,t[e+8>>2]=MM()|0,t[e+32>>2]=5}function OM(){return 11710}function kM(){return 1416}function MM(){return E_()|0}function NM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(LM(r),yt(r)):n|0&&yt(n)}function LM(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function E_(){var e=0;return p[7904]|0||(t[2600]=FM()|0,t[2601]=0,e=7904,t[e>>2]=1,t[e+4>>2]=0),10400}function FM(){return t[357]|0}function bM(e){e=e|0,PM(e,4926),IM(e)|0}function PM(e,n){e=e|0,n=n|0;var r=0;r=qa()|0,t[e>>2]=r,KM(r,n),Q2(t[e>>2]|0)}function IM(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,BM()|0),e|0}function BM(){var e=0;return p[7912]|0||(V3(10412),Ht(56,10412,he|0)|0,e=7912,t[e>>2]=1,t[e+4>>2]=0),rr(10412)|0||V3(10412),10412}function V3(e){e=e|0,zM(e),Wp(e,57)}function UM(e){e=e|0,jM(e+24|0)}function jM(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function zM(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,5,n,VM()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function qM(e){e=e|0,HM(e)}function HM(e){e=e|0,WM(e)}function WM(e){e=e|0;var n=0,r=0;n=e+8|0,r=n+48|0;do t[n>>2]=0,n=n+4|0;while((n|0)<(r|0));p[e+56>>0]=1}function VM(){return 1432}function GM(){return YM()|0}function YM(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0;h=m,m=m+16|0,e=h+4|0,n=h,r=Sa(8)|0,u=r,l=cn(48)|0,s=l,D=s+48|0;do t[s>>2]=0,s=s+4|0;while((s|0)<(D|0));return s=u+4|0,t[s>>2]=l,D=cn(8)|0,s=t[s>>2]|0,t[n>>2]=0,t[e>>2]=t[n>>2],Dh(D,s,e),t[r>>2]=D,m=h,u|0}function KM(e,n){e=e|0,n=n|0,t[e>>2]=XM()|0,t[e+4>>2]=QM()|0,t[e+12>>2]=n,t[e+8>>2]=JM()|0,t[e+32>>2]=6}function XM(){return 11704}function QM(){return 1436}function JM(){return E_()|0}function ZM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&($M(r),yt(r)):n|0&&yt(n)}function $M(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function eN(e){e=e|0,tN(e,4933),nN(e)|0,rN(e)|0}function tN(e,n){e=e|0,n=n|0;var r=0;r=AN()|0,t[e>>2]=r,RN(r,n),Q2(t[e>>2]|0)}function nN(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,yN()|0),e|0}function rN(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,iN()|0),e|0}function iN(){var e=0;return p[7920]|0||(G3(10452),Ht(58,10452,he|0)|0,e=7920,t[e>>2]=1,t[e+4>>2]=0),rr(10452)|0||G3(10452),10452}function G3(e){e=e|0,lN(e),Wp(e,1)}function uN(e){e=e|0,oN(e+24|0)}function oN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function lN(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,1,n,cN()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function sN(e,n,r){e=e|0,n=+n,r=+r,aN(e,n,r)}function aN(e,n,r){e=e|0,n=+n,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,s=u+8|0,D=u+17|0,l=u,h=u+16|0,Ol(D,n),U[s>>3]=+es(D,n),Ol(h,r),U[l>>3]=+es(h,r),fN(e,s,l),m=u}function fN(e,n,r){e=e|0,n=n|0,r=r|0,Y3(e+8|0,+U[n>>3],+U[r>>3]),p[e+24>>0]=1}function Y3(e,n,r){e=e|0,n=+n,r=+r,U[e>>3]=n,U[e+8>>3]=r}function cN(){return 1472}function dN(e,n){return e=+e,n=+n,pN(e,n)|0}function pN(e,n){e=+e,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,h=u+4|0,D=u+8|0,S=u,l=Sa(8)|0,r=l,s=cn(16)|0,Ol(h,e),e=+es(h,e),Ol(D,n),Y3(s,e,+es(D,n)),D=r+4|0,t[D>>2]=s,s=cn(8)|0,D=t[D>>2]|0,t[S>>2]=0,t[h>>2]=t[S>>2],K3(s,D,h),t[l>>2]=s,m=u,r|0}function K3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1452,t[r+12>>2]=n,t[e+4>>2]=r}function hN(e){e=e|0,Pv(e),yt(e)}function vN(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function mN(e){e=e|0,yt(e)}function yN(){var e=0;return p[7928]|0||(X3(10488),Ht(59,10488,he|0)|0,e=7928,t[e>>2]=1,t[e+4>>2]=0),rr(10488)|0||X3(10488),10488}function X3(e){e=e|0,EN(e),Wp(e,60)}function gN(e){e=e|0,_N(e+24|0)}function _N(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function EN(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,6,n,TN()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function DN(e){e=e|0,wN(e)}function wN(e){e=e|0,SN(e)}function SN(e){e=e|0,Q3(e+8|0),p[e+24>>0]=1}function Q3(e){e=e|0,t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,t[e+12>>2]=0}function TN(){return 1492}function CN(){return xN()|0}function xN(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Sa(8)|0,e=r,u=cn(16)|0,Q3(u),s=e+4|0,t[s>>2]=u,u=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],K3(u,s,l),t[r>>2]=u,m=n,e|0}function AN(){var e=0;return p[7936]|0||(FN(10524),Ht(25,10524,he|0)|0,e=7936,t[e>>2]=1,t[e+4>>2]=0),10524}function RN(e,n){e=e|0,n=n|0,t[e>>2]=ON()|0,t[e+4>>2]=kN()|0,t[e+12>>2]=n,t[e+8>>2]=MN()|0,t[e+32>>2]=7}function ON(){return 11700}function kN(){return 1484}function MN(){return E_()|0}function NN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(LN(r),yt(r)):n|0&&yt(n)}function LN(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function FN(e){e=e|0,Ha(e)}function bN(e,n,r){e=e|0,n=n|0,r=r|0,e=Or(n)|0,n=PN(r)|0,r=IN(r,0)|0,pL(e,n,r,RE()|0,0)}function PN(e){return e=e|0,e|0}function IN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=RE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Z3(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(WN(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function RE(){var e=0,n=0;if(p[7944]|0||(J3(10568),Ht(61,10568,he|0)|0,n=7944,t[n>>2]=1,t[n+4>>2]=0),!(rr(10568)|0)){e=10568,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));J3(10568)}return 10568}function J3(e){e=e|0,jN(e)}function BN(e){e=e|0,UN(e+24|0)}function UN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function jN(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,17,n,Jh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zN(e){return e=e|0,HN(t[(qN(e)|0)>>2]|0)|0}function qN(e){return e=e|0,(t[(RE()|0)+24>>2]|0)+(e<<3)|0}function HN(e){return e=e|0,z0(N_[e&7]()|0)|0}function Z3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function WN(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=VN(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,GN(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Z3(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,YN(e,l),KN(l),m=D;return}}function VN(e){return e=e|0,536870911}function GN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function YN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function KN(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function XN(){QN()}function QN(){JN(10604)}function JN(e){e=e|0,ZN(e,4955)}function ZN(e,n){e=e|0,n=n|0;var r=0;r=$N()|0,t[e>>2]=r,eL(r,n),Q2(t[e>>2]|0)}function $N(){var e=0;return p[7952]|0||(aL(10612),Ht(25,10612,he|0)|0,e=7952,t[e>>2]=1,t[e+4>>2]=0),10612}function eL(e,n){e=e|0,n=n|0,t[e>>2]=iL()|0,t[e+4>>2]=uL()|0,t[e+12>>2]=n,t[e+8>>2]=oL()|0,t[e+32>>2]=8}function Q2(e){e=e|0;var n=0,r=0;n=m,m=m+16|0,r=n,Mv()|0,t[r>>2]=e,tL(10608,r),m=n}function Mv(){return p[11714]|0||(t[2652]=0,Ht(62,10608,he|0)|0,p[11714]=1),10608}function tL(e,n){e=e|0,n=n|0;var r=0;r=cn(8)|0,t[r+4>>2]=t[n>>2],t[r>>2]=t[e>>2],t[e>>2]=r}function nL(e){e=e|0,rL(e)}function rL(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,yt(r);while((n|0)!=0);t[e>>2]=0}function iL(){return 11715}function uL(){return 1496}function oL(){return O1()|0}function lL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(sL(r),yt(r)):n|0&&yt(n)}function sL(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function aL(e){e=e|0,Ha(e)}function fL(e,n){e=e|0,n=n|0;var r=0,u=0;Mv()|0,r=t[2652]|0;e:do if(r|0){for(;u=t[r+4>>2]|0,!(u|0?(L8(OE(u)|0,e)|0)==0:0);)if(r=t[r>>2]|0,!r)break e;cL(u,n)}while(0)}function OE(e){return e=e|0,t[e+12>>2]|0}function cL(e,n){e=e|0,n=n|0;var r=0;e=e+36|0,r=t[e>>2]|0,r|0&&(ia(r),yt(r)),r=cn(4)|0,mf(r,n),t[e>>2]=r}function kE(){return p[11716]|0||(t[2664]=0,Ht(63,10656,he|0)|0,p[11716]=1),10656}function $3(){var e=0;return p[11717]|0?e=t[2665]|0:(dL(),t[2665]=1504,p[11717]=1,e=1504),e|0}function dL(){p[11740]|0||(p[11718]=dn(dn(8,0)|0,0)|0,p[11719]=dn(dn(0,0)|0,0)|0,p[11720]=dn(dn(0,16)|0,0)|0,p[11721]=dn(dn(8,0)|0,0)|0,p[11722]=dn(dn(0,0)|0,0)|0,p[11723]=dn(dn(8,0)|0,0)|0,p[11724]=dn(dn(0,0)|0,0)|0,p[11725]=dn(dn(8,0)|0,0)|0,p[11726]=dn(dn(0,0)|0,0)|0,p[11727]=dn(dn(8,0)|0,0)|0,p[11728]=dn(dn(0,0)|0,0)|0,p[11729]=dn(dn(0,0)|0,32)|0,p[11730]=dn(dn(0,0)|0,32)|0,p[11740]=1)}function e8(){return 1572}function pL(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0,O=0;s=m,m=m+32|0,O=s+16|0,M=s+12|0,S=s+8|0,D=s+4|0,h=s,t[O>>2]=e,t[M>>2]=n,t[S>>2]=r,t[D>>2]=u,t[h>>2]=l,kE()|0,hL(10656,O,M,S,D,h),m=s}function hL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0;h=cn(24)|0,h2(h+4|0,t[n>>2]|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0),t[h>>2]=t[e>>2],t[e>>2]=h}function t8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0;if(st=m,m=m+32|0,Ee=st+20|0,ve=st+8|0,Qe=st+4|0,We=st,n=t[n>>2]|0,n|0){Pe=Ee+4|0,S=Ee+8|0,M=ve+4|0,O=ve+8|0,P=ve+8|0,K=Ee+8|0;do{if(h=n+4|0,D=ME(h)|0,D|0){if(l=Fy(D)|0,t[Ee>>2]=0,t[Pe>>2]=0,t[S>>2]=0,u=(by(D)|0)+1|0,vL(Ee,u),u|0)for(;u=u+-1|0,jf(ve,t[l>>2]|0),s=t[Pe>>2]|0,s>>>0<(t[K>>2]|0)>>>0?(t[s>>2]=t[ve>>2],t[Pe>>2]=(t[Pe>>2]|0)+4):NE(Ee,ve),u;)l=l+4|0;u=Py(D)|0,t[ve>>2]=0,t[M>>2]=0,t[O>>2]=0;e:do if(t[u>>2]|0)for(l=0,s=0;;){if((l|0)==(s|0)?mL(ve,u):(t[l>>2]=t[u>>2],t[M>>2]=(t[M>>2]|0)+4),u=u+4|0,!(t[u>>2]|0))break e;l=t[M>>2]|0,s=t[P>>2]|0}while(0);t[Qe>>2]=D_(h)|0,t[We>>2]=rr(D)|0,yL(r,e,Qe,We,Ee,ve),LE(ve),k1(Ee)}n=t[n>>2]|0}while((n|0)!=0)}m=st}function ME(e){return e=e|0,t[e+12>>2]|0}function Fy(e){return e=e|0,t[e+12>>2]|0}function by(e){return e=e|0,t[e+16>>2]|0}function vL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=t[e>>2]|0,(t[e+8>>2]|0)-u>>2>>>0>>0&&(a8(r,n,(t[e+4>>2]|0)-u>>2,e+8|0),f8(e,r),c8(r)),m=l}function NE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=s8(e)|0,s>>>0>>0)li(e);else{D=t[e>>2]|0,M=(t[e+8>>2]|0)-D|0,S=M>>1,a8(r,M>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,f8(e,r),c8(r),m=h;return}}function Py(e){return e=e|0,t[e+8>>2]|0}function mL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=l8(e)|0,s>>>0>>0)li(e);else{D=t[e>>2]|0,M=(t[e+8>>2]|0)-D|0,S=M>>1,PL(r,M>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,IL(e,r),BL(r),m=h;return}}function D_(e){return e=e|0,t[e>>2]|0}function yL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,gL(e,n,r,u,l,s)}function LE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),yt(r))}function k1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),yt(r))}function gL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0;h=m,m=m+48|0,O=h+40|0,D=h+32|0,P=h+24|0,S=h+12|0,M=h,Ta(D),e=vo(e)|0,t[P>>2]=t[n>>2],r=t[r>>2]|0,u=t[u>>2]|0,FE(S,l),_L(M,s),t[O>>2]=t[P>>2],EL(e,O,r,u,S,M),LE(M),k1(S),Ca(D),m=h}function FE(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(FL(e,u),bL(e,t[n>>2]|0,t[r>>2]|0,u))}function _L(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(NL(e,u),LL(e,t[n>>2]|0,t[r>>2]|0,u))}function EL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0;h=m,m=m+32|0,O=h+28|0,P=h+24|0,D=h+12|0,S=h,M=mo(DL()|0)|0,t[P>>2]=t[n>>2],t[O>>2]=t[P>>2],n=Vp(O)|0,r=n8(r)|0,u=bE(u)|0,t[D>>2]=t[l>>2],O=l+4|0,t[D+4>>2]=t[O>>2],P=l+8|0,t[D+8>>2]=t[P>>2],t[P>>2]=0,t[O>>2]=0,t[l>>2]=0,l=PE(D)|0,t[S>>2]=t[s>>2],O=s+4|0,t[S+4>>2]=t[O>>2],P=s+8|0,t[S+8>>2]=t[P>>2],t[P>>2]=0,t[O>>2]=0,t[s>>2]=0,G0(0,M|0,e|0,n|0,r|0,u|0,l|0,wL(S)|0)|0,LE(S),k1(D),m=h}function DL(){var e=0;return p[7968]|0||(kL(10708),e=7968,t[e>>2]=1,t[e+4>>2]=0),10708}function Vp(e){return e=e|0,i8(e)|0}function n8(e){return e=e|0,r8(e)|0}function bE(e){return e=e|0,z0(e)|0}function PE(e){return e=e|0,TL(e)|0}function wL(e){return e=e|0,SL(e)|0}function SL(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Sa(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=r8(t[(t[e>>2]|0)+(n<<2)>>2]|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function r8(e){return e=e|0,e|0}function TL(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Sa(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=i8((t[e>>2]|0)+(n<<2)|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function i8(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Ou(u8()|0)|0,u?(Zl(n,u),Tf(r,n),lI(e,r),e=Es(n)|0):e=CL(e)|0,m=l,e|0}function u8(){var e=0;return p[7960]|0||(OL(10664),Ht(25,10664,he|0)|0,e=7960,t[e>>2]=1,t[e+4>>2]=0),10664}function CL(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Sa(8)|0,n=u,D=cn(4)|0,t[D>>2]=t[e>>2],s=n+4|0,t[s>>2]=D,e=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],o8(e,s,l),t[u>>2]=e,m=r,n|0}function o8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1656,t[r+12>>2]=n,t[e+4>>2]=r}function xL(e){e=e|0,Pv(e),yt(e)}function AL(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function RL(e){e=e|0,yt(e)}function OL(e){e=e|0,Ha(e)}function kL(e){e=e|0,nl(e,ML()|0,5)}function ML(){return 1676}function NL(e,n){e=e|0,n=n|0;var r=0;if((l8(e)|0)>>>0>>0&&li(e),n>>>0>1073741823)Xn();else{r=cn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function LL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(pr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function l8(e){return e=e|0,1073741823}function FL(e,n){e=e|0,n=n|0;var r=0;if((s8(e)|0)>>>0>>0&&li(e),n>>>0>1073741823)Xn();else{r=cn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function bL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(pr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function s8(e){return e=e|0,1073741823}function PL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)Xn();else{l=cn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function IL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function BL(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&yt(e)}function a8(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)Xn();else{l=cn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function f8(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function c8(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&yt(e)}function UL(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0;if(ve=m,m=m+32|0,O=ve+20|0,P=ve+12|0,M=ve+16|0,K=ve+4|0,Pe=ve,Ee=ve+8|0,D=$3()|0,s=t[D>>2]|0,h=t[s>>2]|0,h|0)for(S=t[D+8>>2]|0,D=t[D+4>>2]|0;jf(O,h),jL(e,O,D,S),s=s+4|0,h=t[s>>2]|0,h;)S=S+1|0,D=D+1|0;if(s=e8()|0,h=t[s>>2]|0,h|0)do jf(O,h),t[P>>2]=t[s+4>>2],zL(n,O,P),s=s+8|0,h=t[s>>2]|0;while((h|0)!=0);if(s=t[(Mv()|0)>>2]|0,s|0)do n=t[s+4>>2]|0,jf(O,t[(Nv(n)|0)>>2]|0),t[P>>2]=OE(n)|0,qL(r,O,P),s=t[s>>2]|0;while((s|0)!=0);if(jf(M,0),s=kE()|0,t[O>>2]=t[M>>2],t8(O,s,l),s=t[(Mv()|0)>>2]|0,s|0){e=O+4|0,n=O+8|0,r=O+8|0;do{if(S=t[s+4>>2]|0,jf(P,t[(Nv(S)|0)>>2]|0),HL(K,d8(S)|0),h=t[K>>2]|0,h|0){t[O>>2]=0,t[e>>2]=0,t[n>>2]=0;do jf(Pe,t[(Nv(t[h+4>>2]|0)|0)>>2]|0),D=t[e>>2]|0,D>>>0<(t[r>>2]|0)>>>0?(t[D>>2]=t[Pe>>2],t[e>>2]=(t[e>>2]|0)+4):NE(O,Pe),h=t[h>>2]|0;while((h|0)!=0);WL(u,P,O),k1(O)}t[Ee>>2]=t[P>>2],M=p8(S)|0,t[O>>2]=t[Ee>>2],t8(O,M,l),m2(K),s=t[s>>2]|0}while((s|0)!=0)}m=ve}function jL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,rF(e,n,r,u)}function zL(e,n,r){e=e|0,n=n|0,r=r|0,nF(e,n,r)}function Nv(e){return e=e|0,e|0}function qL(e,n,r){e=e|0,n=n|0,r=r|0,ZL(e,n,r)}function d8(e){return e=e|0,e+16|0}function HL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(s=m,m=m+16|0,l=s+8|0,r=s,t[e>>2]=0,u=t[n>>2]|0,t[l>>2]=u,t[r>>2]=e,r=JL(r)|0,u|0){if(u=cn(12)|0,h=(h8(l)|0)+4|0,e=t[h+4>>2]|0,n=u+4|0,t[n>>2]=t[h>>2],t[n+4>>2]=e,n=t[t[l>>2]>>2]|0,t[l>>2]=n,!n)e=u;else for(n=u;e=cn(12)|0,S=(h8(l)|0)+4|0,D=t[S+4>>2]|0,h=e+4|0,t[h>>2]=t[S>>2],t[h+4>>2]=D,t[n>>2]=e,h=t[t[l>>2]>>2]|0,t[l>>2]=h,h;)n=e;t[e>>2]=t[r>>2],t[r>>2]=u}m=s}function WL(e,n,r){e=e|0,n=n|0,r=r|0,VL(e,n,r)}function p8(e){return e=e|0,e+24|0}function VL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+24|0,l=u+16|0,D=u+12|0,s=u,Ta(l),e=vo(e)|0,t[D>>2]=t[n>>2],FE(s,r),t[h>>2]=t[D>>2],YL(e,h,s),k1(s),Ca(l),m=u}function YL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+16|0,D=u+12|0,l=u,s=mo(KL()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Vp(h)|0,t[l>>2]=t[r>>2],h=r+4|0,t[l+4>>2]=t[h>>2],D=r+8|0,t[l+8>>2]=t[D>>2],t[D>>2]=0,t[h>>2]=0,t[r>>2]=0,F0(0,s|0,e|0,n|0,PE(l)|0)|0,k1(l),m=u}function KL(){var e=0;return p[7976]|0||(XL(10720),e=7976,t[e>>2]=1,t[e+4>>2]=0),10720}function XL(e){e=e|0,nl(e,QL()|0,2)}function QL(){return 1732}function JL(e){return e=e|0,t[e>>2]|0}function h8(e){return e=e|0,t[e>>2]|0}function ZL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,Ta(l),e=vo(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],v8(e,s,r),Ca(l),m=u}function v8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,s=u+4|0,h=u,l=mo($L()|0)|0,t[h>>2]=t[n>>2],t[s>>2]=t[h>>2],n=Vp(s)|0,F0(0,l|0,e|0,n|0,n8(r)|0)|0,m=u}function $L(){var e=0;return p[7984]|0||(eF(10732),e=7984,t[e>>2]=1,t[e+4>>2]=0),10732}function eF(e){e=e|0,nl(e,tF()|0,2)}function tF(){return 1744}function nF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,Ta(l),e=vo(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],v8(e,s,r),Ca(l),m=u}function rF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,Ta(s),e=vo(e)|0,t[D>>2]=t[n>>2],r=p[r>>0]|0,u=p[u>>0]|0,t[h>>2]=t[D>>2],iF(e,h,r,u),Ca(s),m=l}function iF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,h=l+4|0,D=l,s=mo(uF()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Vp(h)|0,r=Lv(r)|0,Bn(0,s|0,e|0,n|0,r|0,Lv(u)|0)|0,m=l}function uF(){var e=0;return p[7992]|0||(lF(10744),e=7992,t[e>>2]=1,t[e+4>>2]=0),10744}function Lv(e){return e=e|0,oF(e)|0}function oF(e){return e=e|0,e&255|0}function lF(e){e=e|0,nl(e,sF()|0,3)}function sF(){return 1756}function aF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;switch(K=m,m=m+32|0,D=K+8|0,S=K+4|0,M=K+20|0,O=K,ma(e,0),u=oI(n)|0,t[D>>2]=0,P=D+4|0,t[P>>2]=0,t[D+8>>2]=0,u<<24>>24){case 0:{p[M>>0]=0,fF(S,r,M),w_(e,S)|0,B0(S);break}case 8:{P=qE(n)|0,p[M>>0]=8,jf(O,t[P+4>>2]|0),cF(S,r,M,O,P+8|0),w_(e,S)|0,B0(S);break}case 9:{if(s=qE(n)|0,n=t[s+4>>2]|0,n|0)for(h=D+8|0,l=s+12|0;n=n+-1|0,jf(S,t[l>>2]|0),u=t[P>>2]|0,u>>>0<(t[h>>2]|0)>>>0?(t[u>>2]=t[S>>2],t[P>>2]=(t[P>>2]|0)+4):NE(D,S),n;)l=l+4|0;p[M>>0]=9,jf(O,t[s+8>>2]|0),dF(S,r,M,O,D),w_(e,S)|0,B0(S);break}default:P=qE(n)|0,p[M>>0]=u,jf(O,t[P+4>>2]|0),pF(S,r,M,O),w_(e,S)|0,B0(S)}k1(D),m=K}function fF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,Ta(l),n=vo(n)|0,xF(e,n,p[r>>0]|0),Ca(l),m=u}function w_(e,n){e=e|0,n=n|0;var r=0;return r=t[e>>2]|0,r|0&&Ir(r|0),t[e>>2]=t[n>>2],t[n>>2]=0,e|0}function cF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+32|0,D=s+16|0,h=s+8|0,S=s,Ta(h),n=vo(n)|0,r=p[r>>0]|0,t[S>>2]=t[u>>2],l=t[l>>2]|0,t[D>>2]=t[S>>2],wF(e,n,r,D,l),Ca(h),m=s}function dF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0;s=m,m=m+32|0,S=s+24|0,h=s+16|0,M=s+12|0,D=s,Ta(h),n=vo(n)|0,r=p[r>>0]|0,t[M>>2]=t[u>>2],FE(D,l),t[S>>2]=t[M>>2],gF(e,n,r,S,D),k1(D),Ca(h),m=s}function pF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,Ta(s),n=vo(n)|0,r=p[r>>0]|0,t[D>>2]=t[u>>2],t[h>>2]=t[D>>2],hF(e,n,r,h),Ca(s),m=l}function hF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+4|0,D=l,h=mo(vF()|0)|0,r=Lv(r)|0,t[D>>2]=t[u>>2],t[s>>2]=t[D>>2],S_(e,F0(0,h|0,n|0,r|0,Vp(s)|0)|0),m=l}function vF(){var e=0;return p[8e3]|0||(mF(10756),e=8e3,t[e>>2]=1,t[e+4>>2]=0),10756}function S_(e,n){e=e|0,n=n|0,ma(e,n)}function mF(e){e=e|0,nl(e,yF()|0,2)}function yF(){return 1772}function gF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0;s=m,m=m+32|0,S=s+16|0,M=s+12|0,h=s,D=mo(_F()|0)|0,r=Lv(r)|0,t[M>>2]=t[u>>2],t[S>>2]=t[M>>2],u=Vp(S)|0,t[h>>2]=t[l>>2],S=l+4|0,t[h+4>>2]=t[S>>2],M=l+8|0,t[h+8>>2]=t[M>>2],t[M>>2]=0,t[S>>2]=0,t[l>>2]=0,S_(e,Bn(0,D|0,n|0,r|0,u|0,PE(h)|0)|0),k1(h),m=s}function _F(){var e=0;return p[8008]|0||(EF(10768),e=8008,t[e>>2]=1,t[e+4>>2]=0),10768}function EF(e){e=e|0,nl(e,DF()|0,3)}function DF(){return 1784}function wF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,D=s+4|0,S=s,h=mo(SF()|0)|0,r=Lv(r)|0,t[S>>2]=t[u>>2],t[D>>2]=t[S>>2],u=Vp(D)|0,S_(e,Bn(0,h|0,n|0,r|0,u|0,bE(l)|0)|0),m=s}function SF(){var e=0;return p[8016]|0||(TF(10780),e=8016,t[e>>2]=1,t[e+4>>2]=0),10780}function TF(e){e=e|0,nl(e,CF()|0,3)}function CF(){return 1800}function xF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=mo(AF()|0)|0,S_(e,ji(0,u|0,n|0,Lv(r)|0)|0)}function AF(){var e=0;return p[8024]|0||(RF(10792),e=8024,t[e>>2]=1,t[e+4>>2]=0),10792}function RF(e){e=e|0,nl(e,OF()|0,1)}function OF(){return 1816}function kF(){MF(),NF(),LF()}function MF(){t[2702]=H8(65536)|0}function NF(){$F(10856)}function LF(){FF(10816)}function FF(e){e=e|0,bF(e,5044),PF(e)|0}function bF(e,n){e=e|0,n=n|0;var r=0;r=u8()|0,t[e>>2]=r,YF(r,n),Q2(t[e>>2]|0)}function PF(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,IF()|0),e|0}function IF(){var e=0;return p[8032]|0||(m8(10820),Ht(64,10820,he|0)|0,e=8032,t[e>>2]=1,t[e+4>>2]=0),rr(10820)|0||m8(10820),10820}function m8(e){e=e|0,jF(e),Wp(e,25)}function BF(e){e=e|0,UF(e+24|0)}function UF(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function jF(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,18,n,WF()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zF(e,n){e=e|0,n=n|0,qF(e,n)}function qF(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;r=m,m=m+16|0,u=r,l=r+4|0,Of(l,n),t[u>>2]=kf(l,n)|0,HF(e,u),m=r}function HF(e,n){e=e|0,n=n|0,y8(e+4|0,t[n>>2]|0),p[e+8>>0]=1}function y8(e,n){e=e|0,n=n|0,t[e>>2]=n}function WF(){return 1824}function VF(e){return e=e|0,GF(e)|0}function GF(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Sa(8)|0,n=u,D=cn(4)|0,Of(l,e),y8(D,kf(l,e)|0),s=n+4|0,t[s>>2]=D,e=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],o8(e,s,l),t[u>>2]=e,m=r,n|0}function Sa(e){e=e|0;var n=0,r=0;return e=e+7&-8,(e>>>0<=32768?(n=t[2701]|0,e>>>0<=(65536-n|0)>>>0):0)?(r=(t[2702]|0)+n|0,t[2701]=n+e,e=r):(e=H8(e+8|0)|0,t[e>>2]=t[2703],t[2703]=e,e=e+8|0),e|0}function YF(e,n){e=e|0,n=n|0,t[e>>2]=KF()|0,t[e+4>>2]=XF()|0,t[e+12>>2]=n,t[e+8>>2]=QF()|0,t[e+32>>2]=9}function KF(){return 11744}function XF(){return 1832}function QF(){return E_()|0}function JF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(ZF(r),yt(r)):n|0&&yt(n)}function ZF(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function $F(e){e=e|0,eb(e,5052),tb(e)|0,nb(e,5058,26)|0,rb(e,5069,1)|0,ib(e,5077,10)|0,ub(e,5087,19)|0,ob(e,5094,27)|0}function eb(e,n){e=e|0,n=n|0;var r=0;r=ZP()|0,t[e>>2]=r,$P(r,n),Q2(t[e>>2]|0)}function tb(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,BP()|0),e|0}function nb(e,n,r){return e=e|0,n=n|0,r=r|0,EP(e,Or(n)|0,r,0),e|0}function rb(e,n,r){return e=e|0,n=n|0,r=r|0,uP(e,Or(n)|0,r,0),e|0}function ib(e,n,r){return e=e|0,n=n|0,r=r|0,Ib(e,Or(n)|0,r,0),e|0}function ub(e,n,r){return e=e|0,n=n|0,r=r|0,wb(e,Or(n)|0,r,0),e|0}function g8(e,n){e=e|0,n=n|0;var r=0,u=0;e:for(;;){for(r=t[2703]|0;;){if((r|0)==(n|0))break e;if(u=t[r>>2]|0,t[2703]=u,!r)r=u;else break}yt(r)}t[2701]=e}function ob(e,n,r){return e=e|0,n=n|0,r=r|0,lb(e,Or(n)|0,r,0),e|0}function lb(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=IE()|0,e=sb(r)|0,vi(s,n,l,e,ab(r,u)|0,u)}function IE(){var e=0,n=0;if(p[8040]|0||(E8(10860),Ht(65,10860,he|0)|0,n=8040,t[n>>2]=1,t[n+4>>2]=0),!(rr(10860)|0)){e=10860,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));E8(10860)}return 10860}function sb(e){return e=e|0,e|0}function ab(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=IE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(_8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(fb(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function _8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function fb(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=cb(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,db(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,_8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,pb(e,l),hb(l),m=D;return}}function cb(e){return e=e|0,536870911}function db(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function pb(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function hb(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function E8(e){e=e|0,yb(e)}function vb(e){e=e|0,mb(e+24|0)}function mb(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function yb(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,11,n,gb()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gb(){return 1840}function _b(e,n,r){e=e|0,n=n|0,r=r|0,Db(t[(Eb(e)|0)>>2]|0,n,r)}function Eb(e){return e=e|0,(t[(IE()|0)+24>>2]|0)+(e<<3)|0}function Db(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+1|0,l=u,Of(s,n),n=kf(s,n)|0,Of(l,r),r=kf(l,r)|0,N1[e&31](n,r),m=u}function wb(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=BE()|0,e=Sb(r)|0,vi(s,n,l,e,Tb(r,u)|0,u)}function BE(){var e=0,n=0;if(p[8048]|0||(w8(10896),Ht(66,10896,he|0)|0,n=8048,t[n>>2]=1,t[n+4>>2]=0),!(rr(10896)|0)){e=10896,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));w8(10896)}return 10896}function Sb(e){return e=e|0,e|0}function Tb(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=BE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(D8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Cb(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function D8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Cb(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=xb(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,Ab(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,D8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Rb(e,l),Ob(l),m=D;return}}function xb(e){return e=e|0,536870911}function Ab(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Rb(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ob(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function w8(e){e=e|0,Nb(e)}function kb(e){e=e|0,Mb(e+24|0)}function Mb(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function Nb(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,11,n,Lb()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Lb(){return 1852}function Fb(e,n){return e=e|0,n=n|0,Pb(t[(bb(e)|0)>>2]|0,n)|0}function bb(e){return e=e|0,(t[(BE()|0)+24>>2]|0)+(e<<3)|0}function Pb(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,Of(u,n),n=kf(u,n)|0,n=z0(Xp[e&31](n)|0)|0,m=r,n|0}function Ib(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=UE()|0,e=Bb(r)|0,vi(s,n,l,e,Ub(r,u)|0,u)}function UE(){var e=0,n=0;if(p[8056]|0||(T8(10932),Ht(67,10932,he|0)|0,n=8056,t[n>>2]=1,t[n+4>>2]=0),!(rr(10932)|0)){e=10932,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));T8(10932)}return 10932}function Bb(e){return e=e|0,e|0}function Ub(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=UE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(S8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(jb(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function S8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function jb(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=zb(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,qb(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,S8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Hb(e,l),Wb(l),m=D;return}}function zb(e){return e=e|0,536870911}function qb(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Hb(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Wb(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function T8(e){e=e|0,Yb(e)}function Vb(e){e=e|0,Gb(e+24|0)}function Gb(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function Yb(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,7,n,Kb()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Kb(){return 1860}function Xb(e,n,r){return e=e|0,n=n|0,r=r|0,Jb(t[(Qb(e)|0)>>2]|0,n,r)|0}function Qb(e){return e=e|0,(t[(UE()|0)+24>>2]|0)+(e<<3)|0}function Jb(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+32|0,h=u+12|0,s=u+8|0,D=u,S=u+16|0,l=u+4|0,Zb(S,n),$b(D,S,n),qs(l,r),r=Hs(l,r)|0,t[h>>2]=t[D>>2],jy[e&15](s,h,r),r=eP(s)|0,B0(s),Ws(l),m=u,r|0}function Zb(e,n){e=e|0,n=n|0}function $b(e,n,r){e=e|0,n=n|0,r=r|0,tP(e,r)}function eP(e){return e=e|0,vo(e)|0}function tP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+16|0,r=l,u=n,u&1?(nP(r,0),Yi(u|0,r|0)|0,rP(e,r),iP(r)):t[e>>2]=t[n>>2],m=l}function nP(e,n){e=e|0,n=n|0,l2(e,n),t[e+4>>2]=0,p[e+8>>0]=0}function rP(e,n){e=e|0,n=n|0,t[e>>2]=t[n+4>>2]}function iP(e){e=e|0,p[e+8>>0]=0}function uP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=jE()|0,e=oP(r)|0,vi(s,n,l,e,lP(r,u)|0,u)}function jE(){var e=0,n=0;if(p[8064]|0||(x8(10968),Ht(68,10968,he|0)|0,n=8064,t[n>>2]=1,t[n+4>>2]=0),!(rr(10968)|0)){e=10968,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));x8(10968)}return 10968}function oP(e){return e=e|0,e|0}function lP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=jE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(C8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(sP(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function C8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function sP(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=aP(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,fP(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,C8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,cP(e,l),dP(l),m=D;return}}function aP(e){return e=e|0,536870911}function fP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function cP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function dP(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function x8(e){e=e|0,vP(e)}function pP(e){e=e|0,hP(e+24|0)}function hP(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function vP(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,1,n,mP()|0,5),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function mP(){return 1872}function yP(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,_P(t[(gP(e)|0)>>2]|0,n,r,u,l,s)}function gP(e){return e=e|0,(t[(jE()|0)+24>>2]|0)+(e<<3)|0}function _P(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0;h=m,m=m+32|0,D=h+16|0,S=h+12|0,M=h+8|0,O=h+4|0,P=h,qs(D,n),n=Hs(D,n)|0,qs(S,r),r=Hs(S,r)|0,qs(M,u),u=Hs(M,u)|0,qs(O,l),l=Hs(O,l)|0,qs(P,s),s=Hs(P,s)|0,K8[e&1](n,r,u,l,s),Ws(P),Ws(O),Ws(M),Ws(S),Ws(D),m=h}function EP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=zE()|0,e=DP(r)|0,vi(s,n,l,e,wP(r,u)|0,u)}function zE(){var e=0,n=0;if(p[8072]|0||(R8(11004),Ht(69,11004,he|0)|0,n=8072,t[n>>2]=1,t[n+4>>2]=0),!(rr(11004)|0)){e=11004,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));R8(11004)}return 11004}function DP(e){return e=e|0,e|0}function wP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=zE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(A8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(SP(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function A8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function SP(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=TP(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,CP(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,A8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,xP(e,l),AP(l),m=D;return}}function TP(e){return e=e|0,536870911}function CP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function xP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function AP(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function R8(e){e=e|0,kP(e)}function RP(e){e=e|0,OP(e+24|0)}function OP(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function kP(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,12,n,MP()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function MP(){return 1896}function NP(e,n,r){e=e|0,n=n|0,r=r|0,FP(t[(LP(e)|0)>>2]|0,n,r)}function LP(e){return e=e|0,(t[(zE()|0)+24>>2]|0)+(e<<3)|0}function FP(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+4|0,l=u,bP(s,n),n=PP(s,n)|0,qs(l,r),r=Hs(l,r)|0,N1[e&31](n,r),Ws(l),m=u}function bP(e,n){e=e|0,n=n|0}function PP(e,n){return e=e|0,n=n|0,IP(n)|0}function IP(e){return e=e|0,e|0}function BP(){var e=0;return p[8080]|0||(O8(11040),Ht(70,11040,he|0)|0,e=8080,t[e>>2]=1,t[e+4>>2]=0),rr(11040)|0||O8(11040),11040}function O8(e){e=e|0,zP(e),Wp(e,71)}function UP(e){e=e|0,jP(e+24|0)}function jP(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function zP(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,7,n,VP()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function qP(e){e=e|0,HP(e)}function HP(e){e=e|0,WP(e)}function WP(e){e=e|0,p[e+8>>0]=1}function VP(){return 1936}function GP(){return YP()|0}function YP(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Sa(8)|0,e=r,s=e+4|0,t[s>>2]=cn(1)|0,u=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],KP(u,s,l),t[r>>2]=u,m=n,e|0}function KP(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1916,t[r+12>>2]=n,t[e+4>>2]=r}function XP(e){e=e|0,Pv(e),yt(e)}function QP(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function JP(e){e=e|0,yt(e)}function ZP(){var e=0;return p[8088]|0||(uI(11076),Ht(25,11076,he|0)|0,e=8088,t[e>>2]=1,t[e+4>>2]=0),11076}function $P(e,n){e=e|0,n=n|0,t[e>>2]=eI()|0,t[e+4>>2]=tI()|0,t[e+12>>2]=n,t[e+8>>2]=nI()|0,t[e+32>>2]=10}function eI(){return 11745}function tI(){return 1940}function nI(){return O1()|0}function rI(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(iI(r),yt(r)):n|0&&yt(n)}function iI(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function uI(e){e=e|0,Ha(e)}function jf(e,n){e=e|0,n=n|0,t[e>>2]=n}function qE(e){return e=e|0,t[e>>2]|0}function oI(e){return e=e|0,p[t[e>>2]>>0]|0}function lI(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,t[u>>2]=t[e>>2],sI(n,u)|0,m=r}function sI(e,n){e=e|0,n=n|0;var r=0;return r=aI(t[e>>2]|0,n)|0,n=e+4|0,t[(t[n>>2]|0)+8>>2]=r,t[(t[n>>2]|0)+8>>2]|0}function aI(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,Ta(u),e=vo(e)|0,n=fI(e,t[n>>2]|0)|0,Ca(u),m=r,n|0}function Ta(e){e=e|0,t[e>>2]=t[2701],t[e+4>>2]=t[2703]}function fI(e,n){e=e|0,n=n|0;var r=0;return r=mo(cI()|0)|0,ji(0,r|0,e|0,bE(n)|0)|0}function Ca(e){e=e|0,g8(t[e>>2]|0,t[e+4>>2]|0)}function cI(){var e=0;return p[8096]|0||(dI(11120),e=8096,t[e>>2]=1,t[e+4>>2]=0),11120}function dI(e){e=e|0,nl(e,pI()|0,1)}function pI(){return 1948}function hI(){vI()}function vI(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0;if(Ee=m,m=m+16|0,O=Ee+4|0,P=Ee,Ln(65536,10804,t[2702]|0,10812),r=$3()|0,n=t[r>>2]|0,e=t[n>>2]|0,e|0)for(u=t[r+8>>2]|0,r=t[r+4>>2]|0;Wl(e|0,k[r>>0]|0|0,p[u>>0]|0),n=n+4|0,e=t[n>>2]|0,e;)u=u+1|0,r=r+1|0;if(e=e8()|0,n=t[e>>2]|0,n|0)do xo(n|0,t[e+4>>2]|0),e=e+8|0,n=t[e>>2]|0;while((n|0)!=0);xo(mI()|0,5167),M=Mv()|0,e=t[M>>2]|0;e:do if(e|0){do yI(t[e+4>>2]|0),e=t[e>>2]|0;while((e|0)!=0);if(e=t[M>>2]|0,e|0){S=M;do{for(;l=e,e=t[e>>2]|0,l=t[l+4>>2]|0,!!(gI(l)|0);)if(t[P>>2]=S,t[O>>2]=t[P>>2],_I(M,O)|0,!e)break e;if(EI(l),S=t[S>>2]|0,n=k8(l)|0,s=lo()|0,h=m,m=m+((1*(n<<2)|0)+15&-16)|0,D=m,m=m+((1*(n<<2)|0)+15&-16)|0,n=t[(d8(l)|0)>>2]|0,n|0)for(r=h,u=D;t[r>>2]=t[(Nv(t[n+4>>2]|0)|0)>>2],t[u>>2]=t[n+8>>2],n=t[n>>2]|0,n;)r=r+4|0,u=u+4|0;ve=Nv(l)|0,n=DI(l)|0,r=k8(l)|0,u=wI(l)|0,Ao(ve|0,n|0,h|0,D|0,r|0,u|0,OE(l)|0),ci(s|0)}while((e|0)!=0)}}while(0);if(e=t[(kE()|0)>>2]|0,e|0)do ve=e+4|0,M=ME(ve)|0,l=Py(M)|0,s=Fy(M)|0,h=(by(M)|0)+1|0,D=T_(M)|0,S=M8(ve)|0,M=rr(M)|0,O=D_(ve)|0,P=HE(ve)|0,oo(0,l|0,s|0,h|0,D|0,S|0,M|0,O|0,P|0,WE(ve)|0),e=t[e>>2]|0;while((e|0)!=0);e=t[(Mv()|0)>>2]|0;e:do if(e|0){t:for(;;){if(n=t[e+4>>2]|0,n|0?(K=t[(Nv(n)|0)>>2]|0,Pe=t[(p8(n)|0)>>2]|0,Pe|0):0){r=Pe;do{n=r+4|0,u=ME(n)|0;n:do if(u|0)switch(rr(u)|0){case 0:break t;case 4:case 3:case 2:{D=Py(u)|0,S=Fy(u)|0,M=(by(u)|0)+1|0,O=T_(u)|0,P=rr(u)|0,ve=D_(n)|0,oo(K|0,D|0,S|0,M|0,O|0,0,P|0,ve|0,HE(n)|0,WE(n)|0);break n}case 1:{h=Py(u)|0,D=Fy(u)|0,S=(by(u)|0)+1|0,M=T_(u)|0,O=M8(n)|0,P=rr(u)|0,ve=D_(n)|0,oo(K|0,h|0,D|0,S|0,M|0,O|0,P|0,ve|0,HE(n)|0,WE(n)|0);break n}case 5:{M=Py(u)|0,O=Fy(u)|0,P=(by(u)|0)+1|0,ve=T_(u)|0,oo(K|0,M|0,O|0,P|0,ve|0,SI(u)|0,rr(u)|0,0,0,0);break n}default:break n}while(0);r=t[r>>2]|0}while((r|0)!=0)}if(e=t[e>>2]|0,!e)break e}Xn()}while(0);Ms(),m=Ee}function mI(){return 11703}function yI(e){e=e|0,p[e+40>>0]=0}function gI(e){return e=e|0,(p[e+40>>0]|0)!=0|0}function _I(e,n){return e=e|0,n=n|0,n=TI(n)|0,e=t[n>>2]|0,t[n>>2]=t[e>>2],yt(e),t[n>>2]|0}function EI(e){e=e|0,p[e+40>>0]=1}function k8(e){return e=e|0,t[e+20>>2]|0}function DI(e){return e=e|0,t[e+8>>2]|0}function wI(e){return e=e|0,t[e+32>>2]|0}function T_(e){return e=e|0,t[e+4>>2]|0}function M8(e){return e=e|0,t[e+4>>2]|0}function HE(e){return e=e|0,t[e+8>>2]|0}function WE(e){return e=e|0,t[e+16>>2]|0}function SI(e){return e=e|0,t[e+20>>2]|0}function TI(e){return e=e|0,t[e>>2]|0}function C_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0,Re=0,Fe=0,Qt=0;Qt=m,m=m+16|0,K=Qt;do if(e>>>0<245){if(M=e>>>0<11?16:e+11&-8,e=M>>>3,P=t[2783]|0,r=P>>>e,r&3|0)return n=(r&1^1)+e|0,e=11172+(n<<1<<2)|0,r=e+8|0,u=t[r>>2]|0,l=u+8|0,s=t[l>>2]|0,(e|0)==(s|0)?t[2783]=P&~(1<>2]=e,t[r>>2]=s),Fe=n<<3,t[u+4>>2]=Fe|3,Fe=u+Fe+4|0,t[Fe>>2]=t[Fe>>2]|1,Fe=l,m=Qt,Fe|0;if(O=t[2785]|0,M>>>0>O>>>0){if(r|0)return n=2<>>12&16,n=n>>>h,r=n>>>5&8,n=n>>>r,l=n>>>2&4,n=n>>>l,e=n>>>1&2,n=n>>>e,u=n>>>1&1,u=(r|h|l|e|u)+(n>>>u)|0,n=11172+(u<<1<<2)|0,e=n+8|0,l=t[e>>2]|0,h=l+8|0,r=t[h>>2]|0,(n|0)==(r|0)?(e=P&~(1<>2]=n,t[e>>2]=r,e=P),s=(u<<3)-M|0,t[l+4>>2]=M|3,u=l+M|0,t[u+4>>2]=s|1,t[u+s>>2]=s,O|0&&(l=t[2788]|0,n=O>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=l,t[n+12>>2]=l,t[l+8>>2]=n,t[l+12>>2]=r),t[2785]=s,t[2788]=u,Fe=h,m=Qt,Fe|0;if(D=t[2784]|0,D){if(r=(D&0-D)+-1|0,h=r>>>12&16,r=r>>>h,s=r>>>5&8,r=r>>>s,S=r>>>2&4,r=r>>>S,u=r>>>1&2,r=r>>>u,e=r>>>1&1,e=t[11436+((s|h|S|u|e)+(r>>>e)<<2)>>2]|0,r=(t[e+4>>2]&-8)-M|0,u=t[e+16+(((t[e+16>>2]|0)==0&1)<<2)>>2]|0,!u)S=e,s=r;else{do h=(t[u+4>>2]&-8)-M|0,S=h>>>0>>0,r=S?h:r,e=S?u:e,u=t[u+16+(((t[u+16>>2]|0)==0&1)<<2)>>2]|0;while((u|0)!=0);S=e,s=r}if(h=S+M|0,S>>>0>>0){l=t[S+24>>2]|0,n=t[S+12>>2]|0;do if((n|0)==(S|0)){if(e=S+20|0,n=t[e>>2]|0,!n&&(e=S+16|0,n=t[e>>2]|0,!n)){r=0;break}for(;;){if(r=n+20|0,u=t[r>>2]|0,u|0){n=u,e=r;continue}if(r=n+16|0,u=t[r>>2]|0,u)n=u,e=r;else break}t[e>>2]=0,r=n}else r=t[S+8>>2]|0,t[r+12>>2]=n,t[n+8>>2]=r,r=n;while(0);do if(l|0){if(n=t[S+28>>2]|0,e=11436+(n<<2)|0,(S|0)==(t[e>>2]|0)){if(t[e>>2]=r,!r){t[2784]=D&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=l,n=t[S+16>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),n=t[S+20>>2]|0,n|0&&(t[r+20>>2]=n,t[n+24>>2]=r)}while(0);return s>>>0<16?(Fe=s+M|0,t[S+4>>2]=Fe|3,Fe=S+Fe+4|0,t[Fe>>2]=t[Fe>>2]|1):(t[S+4>>2]=M|3,t[h+4>>2]=s|1,t[h+s>>2]=s,O|0&&(u=t[2788]|0,n=O>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=P|n,n=r,e=r+8|0),t[e>>2]=u,t[n+12>>2]=u,t[u+8>>2]=n,t[u+12>>2]=r),t[2785]=s,t[2788]=h),Fe=S+8|0,m=Qt,Fe|0}else P=M}else P=M}else P=M}else if(e>>>0<=4294967231)if(e=e+11|0,M=e&-8,S=t[2784]|0,S){u=0-M|0,e=e>>>8,e?M>>>0>16777215?D=31:(P=(e+1048320|0)>>>16&8,Re=e<>>16&4,Re=Re<>>16&2,D=14-(O|P|D)+(Re<>>15)|0,D=M>>>(D+7|0)&1|D<<1):D=0,r=t[11436+(D<<2)>>2]|0;e:do if(!r)r=0,e=0,Re=57;else for(e=0,h=M<<((D|0)==31?0:25-(D>>>1)|0),s=0;;){if(l=(t[r+4>>2]&-8)-M|0,l>>>0>>0)if(l)e=r,u=l;else{e=r,u=0,l=r,Re=61;break e}if(l=t[r+20>>2]|0,r=t[r+16+(h>>>31<<2)>>2]|0,s=(l|0)==0|(l|0)==(r|0)?s:l,l=(r|0)==0,l){r=s,Re=57;break}else h=h<<((l^1)&1)}while(0);if((Re|0)==57){if((r|0)==0&(e|0)==0){if(e=2<>>12&16,P=P>>>h,s=P>>>5&8,P=P>>>s,D=P>>>2&4,P=P>>>D,O=P>>>1&2,P=P>>>O,r=P>>>1&1,e=0,r=t[11436+((s|h|D|O|r)+(P>>>r)<<2)>>2]|0}r?(l=r,Re=61):(D=e,h=u)}if((Re|0)==61)for(;;)if(Re=0,r=(t[l+4>>2]&-8)-M|0,P=r>>>0>>0,r=P?r:u,e=P?l:e,l=t[l+16+(((t[l+16>>2]|0)==0&1)<<2)>>2]|0,l)u=r,Re=61;else{D=e,h=r;break}if((D|0)!=0?h>>>0<((t[2785]|0)-M|0)>>>0:0){if(s=D+M|0,D>>>0>=s>>>0)return Fe=0,m=Qt,Fe|0;l=t[D+24>>2]|0,n=t[D+12>>2]|0;do if((n|0)==(D|0)){if(e=D+20|0,n=t[e>>2]|0,!n&&(e=D+16|0,n=t[e>>2]|0,!n)){n=0;break}for(;;){if(r=n+20|0,u=t[r>>2]|0,u|0){n=u,e=r;continue}if(r=n+16|0,u=t[r>>2]|0,u)n=u,e=r;else break}t[e>>2]=0}else Fe=t[D+8>>2]|0,t[Fe+12>>2]=n,t[n+8>>2]=Fe;while(0);do if(l){if(e=t[D+28>>2]|0,r=11436+(e<<2)|0,(D|0)==(t[r>>2]|0)){if(t[r>>2]=n,!n){u=S&~(1<>2]|0)!=(D|0)&1)<<2)>>2]=n,!n){u=S;break}t[n+24>>2]=l,e=t[D+16>>2]|0,e|0&&(t[n+16>>2]=e,t[e+24>>2]=n),e=t[D+20>>2]|0,e&&(t[n+20>>2]=e,t[e+24>>2]=n),u=S}else u=S;while(0);do if(h>>>0>=16){if(t[D+4>>2]=M|3,t[s+4>>2]=h|1,t[s+h>>2]=h,n=h>>>3,h>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=s,t[n+12>>2]=s,t[s+8>>2]=n,t[s+12>>2]=r;break}if(n=h>>>8,n?h>>>0>16777215?n=31:(Re=(n+1048320|0)>>>16&8,Fe=n<>>16&4,Fe=Fe<>>16&2,n=14-(st|Re|n)+(Fe<>>15)|0,n=h>>>(n+7|0)&1|n<<1):n=0,r=11436+(n<<2)|0,t[s+28>>2]=n,e=s+16|0,t[e+4>>2]=0,t[e>>2]=0,e=1<>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}for(e=h<<((n|0)==31?0:25-(n>>>1)|0),r=t[r>>2]|0;;){if((t[r+4>>2]&-8|0)==(h|0)){Re=97;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Re=96;break}}if((Re|0)==96){t[u>>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}else if((Re|0)==97){Re=r+8|0,Fe=t[Re>>2]|0,t[Fe+12>>2]=s,t[Re>>2]=s,t[s+8>>2]=Fe,t[s+12>>2]=r,t[s+24>>2]=0;break}}else Fe=h+M|0,t[D+4>>2]=Fe|3,Fe=D+Fe+4|0,t[Fe>>2]=t[Fe>>2]|1;while(0);return Fe=D+8|0,m=Qt,Fe|0}else P=M}else P=M;else P=-1;while(0);if(r=t[2785]|0,r>>>0>=P>>>0)return n=r-P|0,e=t[2788]|0,n>>>0>15?(Fe=e+P|0,t[2788]=Fe,t[2785]=n,t[Fe+4>>2]=n|1,t[Fe+n>>2]=n,t[e+4>>2]=P|3):(t[2785]=0,t[2788]=0,t[e+4>>2]=r|3,Fe=e+r+4|0,t[Fe>>2]=t[Fe>>2]|1),Fe=e+8|0,m=Qt,Fe|0;if(h=t[2786]|0,h>>>0>P>>>0)return st=h-P|0,t[2786]=st,Fe=t[2789]|0,Re=Fe+P|0,t[2789]=Re,t[Re+4>>2]=st|1,t[Fe+4>>2]=P|3,Fe=Fe+8|0,m=Qt,Fe|0;if(t[2901]|0?e=t[2903]|0:(t[2903]=4096,t[2902]=4096,t[2904]=-1,t[2905]=-1,t[2906]=0,t[2894]=0,e=K&-16^1431655768,t[K>>2]=e,t[2901]=e,e=4096),D=P+48|0,S=P+47|0,s=e+S|0,l=0-e|0,M=s&l,M>>>0<=P>>>0||(e=t[2893]|0,e|0?(O=t[2891]|0,K=O+M|0,K>>>0<=O>>>0|K>>>0>e>>>0):0))return Fe=0,m=Qt,Fe|0;e:do if(t[2894]&4)n=0,Re=133;else{r=t[2789]|0;t:do if(r){for(u=11580;e=t[u>>2]|0,!(e>>>0<=r>>>0?(ve=u+4|0,(e+(t[ve>>2]|0)|0)>>>0>r>>>0):0);)if(e=t[u+8>>2]|0,e)u=e;else{Re=118;break t}if(n=s-h&l,n>>>0<2147483647)if(e=Z2(n|0)|0,(e|0)==((t[u>>2]|0)+(t[ve>>2]|0)|0)){if((e|0)!=(-1|0)){h=n,s=e,Re=135;break e}}else u=e,Re=126;else n=0}else Re=118;while(0);do if((Re|0)==118)if(r=Z2(0)|0,(r|0)!=(-1|0)?(n=r,Pe=t[2902]|0,Ee=Pe+-1|0,n=((Ee&n|0)==0?0:(Ee+n&0-Pe)-n|0)+M|0,Pe=t[2891]|0,Ee=n+Pe|0,n>>>0>P>>>0&n>>>0<2147483647):0){if(ve=t[2893]|0,ve|0?Ee>>>0<=Pe>>>0|Ee>>>0>ve>>>0:0){n=0;break}if(e=Z2(n|0)|0,(e|0)==(r|0)){h=n,s=r,Re=135;break e}else u=e,Re=126}else n=0;while(0);do if((Re|0)==126){if(r=0-n|0,!(D>>>0>n>>>0&(n>>>0<2147483647&(u|0)!=(-1|0))))if((u|0)==(-1|0)){n=0;break}else{h=n,s=u,Re=135;break e}if(e=t[2903]|0,e=S-n+e&0-e,e>>>0>=2147483647){h=n,s=u,Re=135;break e}if((Z2(e|0)|0)==(-1|0)){Z2(r|0)|0,n=0;break}else{h=e+n|0,s=u,Re=135;break e}}while(0);t[2894]=t[2894]|4,Re=133}while(0);if((((Re|0)==133?M>>>0<2147483647:0)?(st=Z2(M|0)|0,ve=Z2(0)|0,Qe=ve-st|0,We=Qe>>>0>(P+40|0)>>>0,!((st|0)==(-1|0)|We^1|st>>>0>>0&((st|0)!=(-1|0)&(ve|0)!=(-1|0))^1)):0)&&(h=We?Qe:n,s=st,Re=135),(Re|0)==135){n=(t[2891]|0)+h|0,t[2891]=n,n>>>0>(t[2892]|0)>>>0&&(t[2892]=n),S=t[2789]|0;do if(S){for(n=11580;;){if(e=t[n>>2]|0,r=n+4|0,u=t[r>>2]|0,(s|0)==(e+u|0)){Re=145;break}if(l=t[n+8>>2]|0,l)n=l;else break}if(((Re|0)==145?(t[n+12>>2]&8|0)==0:0)?S>>>0>>0&S>>>0>=e>>>0:0){t[r>>2]=u+h,Fe=S+8|0,Fe=(Fe&7|0)==0?0:0-Fe&7,Re=S+Fe|0,Fe=(t[2786]|0)+(h-Fe)|0,t[2789]=Re,t[2786]=Fe,t[Re+4>>2]=Fe|1,t[Re+Fe+4>>2]=40,t[2790]=t[2905];break}for(s>>>0<(t[2787]|0)>>>0&&(t[2787]=s),r=s+h|0,n=11580;;){if((t[n>>2]|0)==(r|0)){Re=153;break}if(e=t[n+8>>2]|0,e)n=e;else break}if((Re|0)==153?(t[n+12>>2]&8|0)==0:0){t[n>>2]=s,O=n+4|0,t[O>>2]=(t[O>>2]|0)+h,O=s+8|0,O=s+((O&7|0)==0?0:0-O&7)|0,n=r+8|0,n=r+((n&7|0)==0?0:0-n&7)|0,M=O+P|0,D=n-O-P|0,t[O+4>>2]=P|3;do if((n|0)!=(S|0)){if((n|0)==(t[2788]|0)){Fe=(t[2785]|0)+D|0,t[2785]=Fe,t[2788]=M,t[M+4>>2]=Fe|1,t[M+Fe>>2]=Fe;break}if(e=t[n+4>>2]|0,(e&3|0)==1){h=e&-8,u=e>>>3;e:do if(e>>>0<256)if(e=t[n+8>>2]|0,r=t[n+12>>2]|0,(r|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=r,t[r+8>>2]=e;break}else{s=t[n+24>>2]|0,e=t[n+12>>2]|0;do if((e|0)==(n|0)){if(u=n+16|0,r=u+4|0,e=t[r>>2]|0,!e)if(e=t[u>>2]|0,e)r=u;else{e=0;break}for(;;){if(u=e+20|0,l=t[u>>2]|0,l|0){e=l,r=u;continue}if(u=e+16|0,l=t[u>>2]|0,l)e=l,r=u;else break}t[r>>2]=0}else Fe=t[n+8>>2]|0,t[Fe+12>>2]=e,t[e+8>>2]=Fe;while(0);if(!s)break;r=t[n+28>>2]|0,u=11436+(r<<2)|0;do if((n|0)!=(t[u>>2]|0)){if(t[s+16+(((t[s+16>>2]|0)!=(n|0)&1)<<2)>>2]=e,!e)break e}else{if(t[u>>2]=e,e|0)break;t[2784]=t[2784]&~(1<>2]=s,r=n+16|0,u=t[r>>2]|0,u|0&&(t[e+16>>2]=u,t[u+24>>2]=e),r=t[r+4>>2]|0,!r)break;t[e+20>>2]=r,t[r+24>>2]=e}while(0);n=n+h|0,l=h+D|0}else l=D;if(n=n+4|0,t[n>>2]=t[n>>2]&-2,t[M+4>>2]=l|1,t[M+l>>2]=l,n=l>>>3,l>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=M,t[n+12>>2]=M,t[M+8>>2]=n,t[M+12>>2]=r;break}n=l>>>8;do if(!n)n=0;else{if(l>>>0>16777215){n=31;break}Re=(n+1048320|0)>>>16&8,Fe=n<>>16&4,Fe=Fe<>>16&2,n=14-(st|Re|n)+(Fe<>>15)|0,n=l>>>(n+7|0)&1|n<<1}while(0);if(u=11436+(n<<2)|0,t[M+28>>2]=n,e=M+16|0,t[e+4>>2]=0,t[e>>2]=0,e=t[2784]|0,r=1<>2]=M,t[M+24>>2]=u,t[M+12>>2]=M,t[M+8>>2]=M;break}for(e=l<<((n|0)==31?0:25-(n>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){Re=194;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Re=193;break}}if((Re|0)==193){t[u>>2]=M,t[M+24>>2]=r,t[M+12>>2]=M,t[M+8>>2]=M;break}else if((Re|0)==194){Re=r+8|0,Fe=t[Re>>2]|0,t[Fe+12>>2]=M,t[Re>>2]=M,t[M+8>>2]=Fe,t[M+12>>2]=r,t[M+24>>2]=0;break}}else Fe=(t[2786]|0)+D|0,t[2786]=Fe,t[2789]=M,t[M+4>>2]=Fe|1;while(0);return Fe=O+8|0,m=Qt,Fe|0}for(n=11580;e=t[n>>2]|0,!(e>>>0<=S>>>0?(Fe=e+(t[n+4>>2]|0)|0,Fe>>>0>S>>>0):0);)n=t[n+8>>2]|0;l=Fe+-47|0,e=l+8|0,e=l+((e&7|0)==0?0:0-e&7)|0,l=S+16|0,e=e>>>0>>0?S:e,n=e+8|0,r=s+8|0,r=(r&7|0)==0?0:0-r&7,Re=s+r|0,r=h+-40-r|0,t[2789]=Re,t[2786]=r,t[Re+4>>2]=r|1,t[Re+r+4>>2]=40,t[2790]=t[2905],r=e+4|0,t[r>>2]=27,t[n>>2]=t[2895],t[n+4>>2]=t[2896],t[n+8>>2]=t[2897],t[n+12>>2]=t[2898],t[2895]=s,t[2896]=h,t[2898]=0,t[2897]=n,n=e+24|0;do Re=n,n=n+4|0,t[n>>2]=7;while((Re+8|0)>>>0>>0);if((e|0)!=(S|0)){if(s=e-S|0,t[r>>2]=t[r>>2]&-2,t[S+4>>2]=s|1,t[e>>2]=s,n=s>>>3,s>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=S,t[n+12>>2]=S,t[S+8>>2]=n,t[S+12>>2]=r;break}if(n=s>>>8,n?s>>>0>16777215?r=31:(Re=(n+1048320|0)>>>16&8,Fe=n<>>16&4,Fe=Fe<>>16&2,r=14-(st|Re|r)+(Fe<>>15)|0,r=s>>>(r+7|0)&1|r<<1):r=0,u=11436+(r<<2)|0,t[S+28>>2]=r,t[S+20>>2]=0,t[l>>2]=0,n=t[2784]|0,e=1<>2]=S,t[S+24>>2]=u,t[S+12>>2]=S,t[S+8>>2]=S;break}for(e=s<<((r|0)==31?0:25-(r>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(s|0)){Re=216;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Re=215;break}}if((Re|0)==215){t[u>>2]=S,t[S+24>>2]=r,t[S+12>>2]=S,t[S+8>>2]=S;break}else if((Re|0)==216){Re=r+8|0,Fe=t[Re>>2]|0,t[Fe+12>>2]=S,t[Re>>2]=S,t[S+8>>2]=Fe,t[S+12>>2]=r,t[S+24>>2]=0;break}}}else{Fe=t[2787]|0,(Fe|0)==0|s>>>0>>0&&(t[2787]=s),t[2895]=s,t[2896]=h,t[2898]=0,t[2792]=t[2901],t[2791]=-1,n=0;do Fe=11172+(n<<1<<2)|0,t[Fe+12>>2]=Fe,t[Fe+8>>2]=Fe,n=n+1|0;while((n|0)!=32);Fe=s+8|0,Fe=(Fe&7|0)==0?0:0-Fe&7,Re=s+Fe|0,Fe=h+-40-Fe|0,t[2789]=Re,t[2786]=Fe,t[Re+4>>2]=Fe|1,t[Re+Fe+4>>2]=40,t[2790]=t[2905]}while(0);if(n=t[2786]|0,n>>>0>P>>>0)return st=n-P|0,t[2786]=st,Fe=t[2789]|0,Re=Fe+P|0,t[2789]=Re,t[Re+4>>2]=st|1,t[Fe+4>>2]=P|3,Fe=Fe+8|0,m=Qt,Fe|0}return t[(Fv()|0)>>2]=12,Fe=0,m=Qt,Fe|0}function x_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(!!e){r=e+-8|0,l=t[2787]|0,e=t[e+-4>>2]|0,n=e&-8,S=r+n|0;do if(e&1)D=r,h=r;else{if(u=t[r>>2]|0,!(e&3)||(h=r+(0-u)|0,s=u+n|0,h>>>0>>0))return;if((h|0)==(t[2788]|0)){if(e=S+4|0,n=t[e>>2]|0,(n&3|0)!=3){D=h,n=s;break}t[2785]=s,t[e>>2]=n&-2,t[h+4>>2]=s|1,t[h+s>>2]=s;return}if(r=u>>>3,u>>>0<256)if(e=t[h+8>>2]|0,n=t[h+12>>2]|0,(n|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=n,t[n+8>>2]=e,D=h,n=s;break}l=t[h+24>>2]|0,e=t[h+12>>2]|0;do if((e|0)==(h|0)){if(r=h+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{e=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0}else D=t[h+8>>2]|0,t[D+12>>2]=e,t[e+8>>2]=D;while(0);if(l){if(n=t[h+28>>2]|0,r=11436+(n<<2)|0,(h|0)==(t[r>>2]|0)){if(t[r>>2]=e,!e){t[2784]=t[2784]&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=e,!e){D=h,n=s;break}t[e+24>>2]=l,n=h+16|0,r=t[n>>2]|0,r|0&&(t[e+16>>2]=r,t[r+24>>2]=e),n=t[n+4>>2]|0,n?(t[e+20>>2]=n,t[n+24>>2]=e,D=h,n=s):(D=h,n=s)}else D=h,n=s}while(0);if(!(h>>>0>=S>>>0)&&(e=S+4|0,u=t[e>>2]|0,!!(u&1))){if(u&2)t[e>>2]=u&-2,t[D+4>>2]=n|1,t[h+n>>2]=n,l=n;else{if(e=t[2788]|0,(S|0)==(t[2789]|0)){if(S=(t[2786]|0)+n|0,t[2786]=S,t[2789]=D,t[D+4>>2]=S|1,(D|0)!=(e|0))return;t[2788]=0,t[2785]=0;return}if((S|0)==(e|0)){S=(t[2785]|0)+n|0,t[2785]=S,t[2788]=h,t[D+4>>2]=S|1,t[h+S>>2]=S;return}l=(u&-8)+n|0,r=u>>>3;do if(u>>>0<256)if(n=t[S+8>>2]|0,e=t[S+12>>2]|0,(e|0)==(n|0)){t[2783]=t[2783]&~(1<>2]=e,t[e+8>>2]=n;break}else{s=t[S+24>>2]|0,e=t[S+12>>2]|0;do if((e|0)==(S|0)){if(r=S+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{r=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0,r=e}else r=t[S+8>>2]|0,t[r+12>>2]=e,t[e+8>>2]=r,r=e;while(0);if(s|0){if(e=t[S+28>>2]|0,n=11436+(e<<2)|0,(S|0)==(t[n>>2]|0)){if(t[n>>2]=r,!r){t[2784]=t[2784]&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=s,e=S+16|0,n=t[e>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),e=t[e+4>>2]|0,e|0&&(t[r+20>>2]=e,t[e+24>>2]=r)}}while(0);if(t[D+4>>2]=l|1,t[h+l>>2]=l,(D|0)==(t[2788]|0)){t[2785]=l;return}}if(e=l>>>3,l>>>0<256){r=11172+(e<<1<<2)|0,n=t[2783]|0,e=1<>2]|0):(t[2783]=n|e,e=r,n=r+8|0),t[n>>2]=D,t[e+12>>2]=D,t[D+8>>2]=e,t[D+12>>2]=r;return}e=l>>>8,e?l>>>0>16777215?e=31:(h=(e+1048320|0)>>>16&8,S=e<>>16&4,S=S<>>16&2,e=14-(s|h|e)+(S<>>15)|0,e=l>>>(e+7|0)&1|e<<1):e=0,u=11436+(e<<2)|0,t[D+28>>2]=e,t[D+20>>2]=0,t[D+16>>2]=0,n=t[2784]|0,r=1<>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){e=73;break}if(u=r+16+(n>>>31<<2)|0,e=t[u>>2]|0,e)n=n<<1,r=e;else{e=72;break}}if((e|0)==72){t[u>>2]=D,t[D+24>>2]=r,t[D+12>>2]=D,t[D+8>>2]=D;break}else if((e|0)==73){h=r+8|0,S=t[h>>2]|0,t[S+12>>2]=D,t[h>>2]=D,t[D+8>>2]=S,t[D+12>>2]=r,t[D+24>>2]=0;break}}else t[2784]=n|r,t[u>>2]=D,t[D+24>>2]=u,t[D+12>>2]=D,t[D+8>>2]=D;while(0);if(S=(t[2791]|0)+-1|0,t[2791]=S,!S)e=11588;else return;for(;e=t[e>>2]|0,e;)e=e+8|0;t[2791]=-1}}}function CI(){return 11628}function xI(e){e=e|0;var n=0,r=0;return n=m,m=m+16|0,r=n,t[r>>2]=OI(t[e+60>>2]|0)|0,e=A_(wu(6,r|0)|0)|0,m=n,e|0}function N8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0;P=m,m=m+48|0,M=P+16|0,s=P,l=P+32|0,D=e+28|0,u=t[D>>2]|0,t[l>>2]=u,S=e+20|0,u=(t[S>>2]|0)-u|0,t[l+4>>2]=u,t[l+8>>2]=n,t[l+12>>2]=r,u=u+r|0,h=e+60|0,t[s>>2]=t[h>>2],t[s+4>>2]=l,t[s+8>>2]=2,s=A_(d0(146,s|0)|0)|0;e:do if((u|0)!=(s|0)){for(n=2;!((s|0)<0);)if(u=u-s|0,Pe=t[l+4>>2]|0,K=s>>>0>Pe>>>0,l=K?l+8|0:l,n=(K<<31>>31)+n|0,Pe=s-(K?Pe:0)|0,t[l>>2]=(t[l>>2]|0)+Pe,K=l+4|0,t[K>>2]=(t[K>>2]|0)-Pe,t[M>>2]=t[h>>2],t[M+4>>2]=l,t[M+8>>2]=n,s=A_(d0(146,M|0)|0)|0,(u|0)==(s|0)){O=3;break e}t[e+16>>2]=0,t[D>>2]=0,t[S>>2]=0,t[e>>2]=t[e>>2]|32,(n|0)==2?r=0:r=r-(t[l+4>>2]|0)|0}else O=3;while(0);return(O|0)==3&&(Pe=t[e+44>>2]|0,t[e+16>>2]=Pe+(t[e+48>>2]|0),t[D>>2]=Pe,t[S>>2]=Pe),m=P,r|0}function AI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return l=m,m=m+32|0,s=l,u=l+20|0,t[s>>2]=t[e+60>>2],t[s+4>>2]=0,t[s+8>>2]=n,t[s+12>>2]=u,t[s+16>>2]=r,(A_(Ti(140,s|0)|0)|0)<0?(t[u>>2]=-1,e=-1):e=t[u>>2]|0,m=l,e|0}function A_(e){return e=e|0,e>>>0>4294963200&&(t[(Fv()|0)>>2]=0-e,e=-1),e|0}function Fv(){return(RI()|0)+64|0}function RI(){return VE()|0}function VE(){return 2084}function OI(e){return e=e|0,e|0}function kI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return l=m,m=m+32|0,u=l,t[e+36>>2]=1,((t[e>>2]&64|0)==0?(t[u>>2]=t[e+60>>2],t[u+4>>2]=21523,t[u+8>>2]=l+16,b0(54,u|0)|0):0)&&(p[e+75>>0]=-1),u=N8(e,n,r)|0,m=l,u|0}function L8(e,n){e=e|0,n=n|0;var r=0,u=0;if(r=p[e>>0]|0,u=p[n>>0]|0,r<<24>>24==0?1:r<<24>>24!=u<<24>>24)e=u;else{do e=e+1|0,n=n+1|0,r=p[e>>0]|0,u=p[n>>0]|0;while(!(r<<24>>24==0?1:r<<24>>24!=u<<24>>24));e=u}return(r&255)-(e&255)|0}function MI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;e:do if(!r)e=0;else{for(;u=p[e>>0]|0,l=p[n>>0]|0,u<<24>>24==l<<24>>24;)if(r=r+-1|0,r)e=e+1|0,n=n+1|0;else{e=0;break e}e=(u&255)-(l&255)|0}while(0);return e|0}function F8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0;ve=m,m=m+224|0,O=ve+120|0,P=ve+80|0,Pe=ve,Ee=ve+136|0,u=P,l=u+40|0;do t[u>>2]=0,u=u+4|0;while((u|0)<(l|0));return t[O>>2]=t[r>>2],(GE(0,n,O,Pe,P)|0)<0?r=-1:((t[e+76>>2]|0)>-1?K=NI(e)|0:K=0,r=t[e>>2]|0,M=r&32,(p[e+74>>0]|0)<1&&(t[e>>2]=r&-33),u=e+48|0,t[u>>2]|0?r=GE(e,n,O,Pe,P)|0:(l=e+44|0,s=t[l>>2]|0,t[l>>2]=Ee,h=e+28|0,t[h>>2]=Ee,D=e+20|0,t[D>>2]=Ee,t[u>>2]=80,S=e+16|0,t[S>>2]=Ee+80,r=GE(e,n,O,Pe,P)|0,s&&(M_[t[e+36>>2]&7](e,0,0)|0,r=(t[D>>2]|0)==0?-1:r,t[l>>2]=s,t[u>>2]=0,t[S>>2]=0,t[h>>2]=0,t[D>>2]=0)),u=t[e>>2]|0,t[e>>2]=u|M,K|0&&LI(e),r=(u&32|0)==0?r:-1),m=ve,r|0}function GE(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0,Re=0,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0;On=m,m=m+64|0,Nn=On+16|0,mn=On,Qt=On+24|0,hr=On+8|0,kr=On+20|0,t[Nn>>2]=n,st=(e|0)!=0,Re=Qt+40|0,Fe=Re,Qt=Qt+39|0,Lr=hr+4|0,h=0,s=0,O=0;e:for(;;){do if((s|0)>-1)if((h|0)>(2147483647-s|0)){t[(Fv()|0)>>2]=75,s=-1;break}else{s=h+s|0;break}while(0);if(h=p[n>>0]|0,h<<24>>24)D=n;else{We=87;break}t:for(;;){switch(h<<24>>24){case 37:{h=D,We=9;break t}case 0:{h=D;break t}default:}Qe=D+1|0,t[Nn>>2]=Qe,h=p[Qe>>0]|0,D=Qe}t:do if((We|0)==9)for(;;){if(We=0,(p[D+1>>0]|0)!=37)break t;if(h=h+1|0,D=D+2|0,t[Nn>>2]=D,(p[D>>0]|0)==37)We=9;else break}while(0);if(h=h-n|0,st&&qo(e,n,h),h|0){n=D;continue}S=D+1|0,h=(p[S>>0]|0)+-48|0,h>>>0<10?(Qe=(p[D+2>>0]|0)==36,ve=Qe?h:-1,O=Qe?1:O,S=Qe?D+3|0:S):ve=-1,t[Nn>>2]=S,h=p[S>>0]|0,D=(h<<24>>24)+-32|0;t:do if(D>>>0<32)for(M=0,P=h;;){if(h=1<>2]=S,h=p[S>>0]|0,D=(h<<24>>24)+-32|0,D>>>0>=32)break;P=h}else M=0;while(0);if(h<<24>>24==42){if(D=S+1|0,h=(p[D>>0]|0)+-48|0,h>>>0<10?(p[S+2>>0]|0)==36:0)t[l+(h<<2)>>2]=10,h=t[u+((p[D>>0]|0)+-48<<3)>>2]|0,O=1,S=S+3|0;else{if(O|0){s=-1;break}st?(O=(t[r>>2]|0)+(4-1)&~(4-1),h=t[O>>2]|0,t[r>>2]=O+4,O=0,S=D):(h=0,O=0,S=D)}t[Nn>>2]=S,Qe=(h|0)<0,h=Qe?0-h|0:h,M=Qe?M|8192:M}else{if(h=b8(Nn)|0,(h|0)<0){s=-1;break}S=t[Nn>>2]|0}do if((p[S>>0]|0)==46){if((p[S+1>>0]|0)!=42){t[Nn>>2]=S+1,D=b8(Nn)|0,S=t[Nn>>2]|0;break}if(P=S+2|0,D=(p[P>>0]|0)+-48|0,D>>>0<10?(p[S+3>>0]|0)==36:0){t[l+(D<<2)>>2]=10,D=t[u+((p[P>>0]|0)+-48<<3)>>2]|0,S=S+4|0,t[Nn>>2]=S;break}if(O|0){s=-1;break e}st?(Qe=(t[r>>2]|0)+(4-1)&~(4-1),D=t[Qe>>2]|0,t[r>>2]=Qe+4):D=0,t[Nn>>2]=P,S=P}else D=-1;while(0);for(Ee=0;;){if(((p[S>>0]|0)+-65|0)>>>0>57){s=-1;break e}if(Qe=S+1|0,t[Nn>>2]=Qe,P=p[(p[S>>0]|0)+-65+(5178+(Ee*58|0))>>0]|0,K=P&255,(K+-1|0)>>>0<8)Ee=K,S=Qe;else break}if(!(P<<24>>24)){s=-1;break}Pe=(ve|0)>-1;do if(P<<24>>24==19)if(Pe){s=-1;break e}else We=49;else{if(Pe){t[l+(ve<<2)>>2]=K,Pe=u+(ve<<3)|0,ve=t[Pe+4>>2]|0,We=mn,t[We>>2]=t[Pe>>2],t[We+4>>2]=ve,We=49;break}if(!st){s=0;break e}P8(mn,K,r)}while(0);if((We|0)==49?(We=0,!st):0){h=0,n=Qe;continue}S=p[S>>0]|0,S=(Ee|0)!=0&(S&15|0)==3?S&-33:S,Pe=M&-65537,ve=(M&8192|0)==0?M:Pe;t:do switch(S|0){case 110:switch((Ee&255)<<24>>24){case 0:{t[t[mn>>2]>>2]=s,h=0,n=Qe;continue e}case 1:{t[t[mn>>2]>>2]=s,h=0,n=Qe;continue e}case 2:{h=t[mn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Qe;continue e}case 3:{E[t[mn>>2]>>1]=s,h=0,n=Qe;continue e}case 4:{p[t[mn>>2]>>0]=s,h=0,n=Qe;continue e}case 6:{t[t[mn>>2]>>2]=s,h=0,n=Qe;continue e}case 7:{h=t[mn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Qe;continue e}default:{h=0,n=Qe;continue e}}case 112:{S=120,D=D>>>0>8?D:8,n=ve|8,We=61;break}case 88:case 120:{n=ve,We=61;break}case 111:{S=mn,n=t[S>>2]|0,S=t[S+4>>2]|0,K=bI(n,S,Re)|0,Pe=Fe-K|0,M=0,P=5642,D=(ve&8|0)==0|(D|0)>(Pe|0)?D:Pe+1|0,Pe=ve,We=67;break}case 105:case 100:if(S=mn,n=t[S>>2]|0,S=t[S+4>>2]|0,(S|0)<0){n=R_(0,0,n|0,S|0)|0,S=ft,M=mn,t[M>>2]=n,t[M+4>>2]=S,M=1,P=5642,We=66;break t}else{M=(ve&2049|0)!=0&1,P=(ve&2048|0)==0?(ve&1|0)==0?5642:5644:5643,We=66;break t}case 117:{S=mn,M=0,P=5642,n=t[S>>2]|0,S=t[S+4>>2]|0,We=66;break}case 99:{p[Qt>>0]=t[mn>>2],n=Qt,M=0,P=5642,K=Re,S=1,D=Pe;break}case 109:{S=PI(t[(Fv()|0)>>2]|0)|0,We=71;break}case 115:{S=t[mn>>2]|0,S=S|0?S:5652,We=71;break}case 67:{t[hr>>2]=t[mn>>2],t[Lr>>2]=0,t[mn>>2]=hr,K=-1,S=hr,We=75;break}case 83:{n=t[mn>>2]|0,D?(K=D,S=n,We=75):(hl(e,32,h,0,ve),n=0,We=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{h=BI(e,+U[mn>>3],h,D,ve,S)|0,n=Qe;continue e}default:M=0,P=5642,K=Re,S=D,D=ve}while(0);t:do if((We|0)==61)ve=mn,Ee=t[ve>>2]|0,ve=t[ve+4>>2]|0,K=FI(Ee,ve,Re,S&32)|0,P=(n&8|0)==0|(Ee|0)==0&(ve|0)==0,M=P?0:2,P=P?5642:5642+(S>>4)|0,Pe=n,n=Ee,S=ve,We=67;else if((We|0)==66)K=bv(n,S,Re)|0,Pe=ve,We=67;else if((We|0)==71)We=0,ve=II(S,0,D)|0,Ee=(ve|0)==0,n=S,M=0,P=5642,K=Ee?S+D|0:ve,S=Ee?D:ve-S|0,D=Pe;else if((We|0)==75){for(We=0,P=S,n=0,D=0;M=t[P>>2]|0,!(!M||(D=I8(kr,M)|0,(D|0)<0|D>>>0>(K-n|0)>>>0));)if(n=D+n|0,K>>>0>n>>>0)P=P+4|0;else break;if((D|0)<0){s=-1;break e}if(hl(e,32,h,n,ve),!n)n=0,We=84;else for(M=0;;){if(D=t[S>>2]|0,!D){We=84;break t}if(D=I8(kr,D)|0,M=D+M|0,(M|0)>(n|0)){We=84;break t}if(qo(e,kr,D),M>>>0>=n>>>0){We=84;break}else S=S+4|0}}while(0);if((We|0)==67)We=0,S=(n|0)!=0|(S|0)!=0,ve=(D|0)!=0|S,S=((S^1)&1)+(Fe-K)|0,n=ve?K:Re,K=Re,S=ve?(D|0)>(S|0)?D:S:D,D=(D|0)>-1?Pe&-65537:Pe;else if((We|0)==84){We=0,hl(e,32,h,n,ve^8192),h=(h|0)>(n|0)?h:n,n=Qe;continue}Ee=K-n|0,Pe=(S|0)<(Ee|0)?Ee:S,ve=Pe+M|0,h=(h|0)<(ve|0)?ve:h,hl(e,32,h,ve,D),qo(e,P,M),hl(e,48,h,ve,D^65536),hl(e,48,Pe,Ee,0),qo(e,n,Ee),hl(e,32,h,ve,D^8192),n=Qe}e:do if((We|0)==87&&!e)if(!O)s=0;else{for(s=1;n=t[l+(s<<2)>>2]|0,!!n;)if(P8(u+(s<<3)|0,n,r),s=s+1|0,(s|0)>=10){s=1;break e}for(;;){if(t[l+(s<<2)>>2]|0){s=-1;break e}if(s=s+1|0,(s|0)>=10){s=1;break}}}while(0);return m=On,s|0}function NI(e){return e=e|0,0}function LI(e){e=e|0}function qo(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]&32||YI(n,r,e)|0}function b8(e){e=e|0;var n=0,r=0,u=0;if(r=t[e>>2]|0,u=(p[r>>0]|0)+-48|0,u>>>0<10){n=0;do n=u+(n*10|0)|0,r=r+1|0,t[e>>2]=r,u=(p[r>>0]|0)+-48|0;while(u>>>0<10)}else n=0;return n|0}function P8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;e:do if(n>>>0<=20)do switch(n|0){case 9:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,t[e>>2]=n;break e}case 10:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=((n|0)<0)<<31>>31;break e}case 11:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=0;break e}case 12:{u=(t[r>>2]|0)+(8-1)&~(8-1),n=u,l=t[n>>2]|0,n=t[n+4>>2]|0,t[r>>2]=u+8,u=e,t[u>>2]=l,t[u+4>>2]=n;break e}case 13:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&65535)<<16>>16,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 14:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&65535,t[l+4>>2]=0;break e}case 15:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&255)<<24>>24,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 16:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&255,t[l+4>>2]=0;break e}case 17:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+U[l>>3],t[r>>2]=l+8,U[e>>3]=s;break e}case 18:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+U[l>>3],t[r>>2]=l+8,U[e>>3]=s;break e}default:break e}while(0);while(0)}function FI(e,n,r,u){if(e=e|0,n=n|0,r=r|0,u=u|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,p[r>>0]=k[5694+(e&15)>>0]|0|u,e=O_(e|0,n|0,4)|0,n=ft;while(!((e|0)==0&(n|0)==0));return r|0}function bI(e,n,r){if(e=e|0,n=n|0,r=r|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,p[r>>0]=e&7|48,e=O_(e|0,n|0,3)|0,n=ft;while(!((e|0)==0&(n|0)==0));return r|0}function bv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if(n>>>0>0|(n|0)==0&e>>>0>4294967295){for(;u=QE(e|0,n|0,10,0)|0,r=r+-1|0,p[r>>0]=u&255|48,u=e,e=XE(e|0,n|0,10,0)|0,n>>>0>9|(n|0)==9&u>>>0>4294967295;)n=ft;n=e}else n=e;if(n)for(;r=r+-1|0,p[r>>0]=(n>>>0)%10|0|48,!(n>>>0<10);)n=(n>>>0)/10|0;return r|0}function PI(e){return e=e|0,HI(e,t[(qI()|0)+188>>2]|0)|0}function II(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;s=n&255,u=(r|0)!=0;e:do if(u&(e&3|0)!=0)for(l=n&255;;){if((p[e>>0]|0)==l<<24>>24){h=6;break e}if(e=e+1|0,r=r+-1|0,u=(r|0)!=0,!(u&(e&3|0)!=0)){h=5;break}}else h=5;while(0);(h|0)==5&&(u?h=6:r=0);e:do if((h|0)==6&&(l=n&255,(p[e>>0]|0)!=l<<24>>24)){u=nr(s,16843009)|0;t:do if(r>>>0>3){for(;s=t[e>>2]^u,!((s&-2139062144^-2139062144)&s+-16843009|0);)if(e=e+4|0,r=r+-4|0,r>>>0<=3){h=11;break t}}else h=11;while(0);if((h|0)==11&&!r){r=0;break}for(;;){if((p[e>>0]|0)==l<<24>>24)break e;if(e=e+1|0,r=r+-1|0,!r){r=0;break}}}while(0);return(r|0?e:0)|0}function hl(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0;if(h=m,m=m+256|0,s=h,(r|0)>(u|0)&(l&73728|0)==0){if(l=r-u|0,Iv(s|0,n|0,(l>>>0<256?l:256)|0)|0,l>>>0>255){n=r-u|0;do qo(e,s,256),l=l+-256|0;while(l>>>0>255);l=n&255}qo(e,s,l)}m=h}function I8(e,n){return e=e|0,n=n|0,e?e=jI(e,n,0)|0:e=0,e|0}function BI(e,n,r,u,l,s){e=e|0,n=+n,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0,Re=0,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0,Zi=0;Zi=m,m=m+560|0,S=Zi+8|0,Qe=Zi,On=Zi+524|0,kr=On,M=Zi+512|0,t[Qe>>2]=0,hr=M+12|0,B8(n)|0,(ft|0)<0?(n=-n,Nn=1,Lr=5659):(Nn=(l&2049|0)!=0&1,Lr=(l&2048|0)==0?(l&1|0)==0?5660:5665:5662),B8(n)|0,mn=ft&2146435072;do if(mn>>>0<2146435072|(mn|0)==2146435072&0<0){if(Pe=+UI(n,Qe)*2,h=Pe!=0,h&&(t[Qe>>2]=(t[Qe>>2]|0)+-1),st=s|32,(st|0)==97){Ee=s&32,K=(Ee|0)==0?Lr:Lr+9|0,P=Nn|2,h=12-u|0;do if(u>>>0>11|(h|0)==0)n=Pe;else{n=8;do h=h+-1|0,n=n*16;while((h|0)!=0);if((p[K>>0]|0)==45){n=-(n+(-Pe-n));break}else{n=Pe+n-n;break}}while(0);D=t[Qe>>2]|0,h=(D|0)<0?0-D|0:D,h=bv(h,((h|0)<0)<<31>>31,hr)|0,(h|0)==(hr|0)&&(h=M+11|0,p[h>>0]=48),p[h+-1>>0]=(D>>31&2)+43,O=h+-2|0,p[O>>0]=s+15,M=(u|0)<1,S=(l&8|0)==0,h=On;do mn=~~n,D=h+1|0,p[h>>0]=k[5694+mn>>0]|Ee,n=(n-+(mn|0))*16,((D-kr|0)==1?!(S&(M&n==0)):0)?(p[D>>0]=46,h=h+2|0):h=D;while(n!=0);mn=h-kr|0,kr=hr-O|0,hr=(u|0)!=0&(mn+-2|0)<(u|0)?u+2|0:mn,h=kr+P+hr|0,hl(e,32,r,h,l),qo(e,K,P),hl(e,48,r,h,l^65536),qo(e,On,mn),hl(e,48,hr-mn|0,0,0),qo(e,O,kr),hl(e,32,r,h,l^8192);break}D=(u|0)<0?6:u,h?(h=(t[Qe>>2]|0)+-28|0,t[Qe>>2]=h,n=Pe*268435456):(n=Pe,h=t[Qe>>2]|0),mn=(h|0)<0?S:S+288|0,S=mn;do Fe=~~n>>>0,t[S>>2]=Fe,S=S+4|0,n=(n-+(Fe>>>0))*1e9;while(n!=0);if((h|0)>0)for(M=mn,P=S;;){if(O=(h|0)<29?h:29,h=P+-4|0,h>>>0>=M>>>0){S=0;do Re=W8(t[h>>2]|0,0,O|0)|0,Re=KE(Re|0,ft|0,S|0,0)|0,Fe=ft,We=QE(Re|0,Fe|0,1e9,0)|0,t[h>>2]=We,S=XE(Re|0,Fe|0,1e9,0)|0,h=h+-4|0;while(h>>>0>=M>>>0);S&&(M=M+-4|0,t[M>>2]=S)}for(S=P;!(S>>>0<=M>>>0);)if(h=S+-4|0,!(t[h>>2]|0))S=h;else break;if(h=(t[Qe>>2]|0)-O|0,t[Qe>>2]=h,(h|0)>0)P=S;else break}else M=mn;if((h|0)<0){u=((D+25|0)/9|0)+1|0,ve=(st|0)==102;do{if(Ee=0-h|0,Ee=(Ee|0)<9?Ee:9,M>>>0>>0){O=(1<>>Ee,K=0,h=M;do Fe=t[h>>2]|0,t[h>>2]=(Fe>>>Ee)+K,K=nr(Fe&O,P)|0,h=h+4|0;while(h>>>0>>0);h=(t[M>>2]|0)==0?M+4|0:M,K?(t[S>>2]=K,M=h,h=S+4|0):(M=h,h=S)}else M=(t[M>>2]|0)==0?M+4|0:M,h=S;S=ve?mn:M,S=(h-S>>2|0)>(u|0)?S+(u<<2)|0:h,h=(t[Qe>>2]|0)+Ee|0,t[Qe>>2]=h}while((h|0)<0);h=M,u=S}else h=M,u=S;if(Fe=mn,h>>>0>>0){if(S=(Fe-h>>2)*9|0,O=t[h>>2]|0,O>>>0>=10){M=10;do M=M*10|0,S=S+1|0;while(O>>>0>=M>>>0)}}else S=0;if(ve=(st|0)==103,We=(D|0)!=0,M=D-((st|0)!=102?S:0)+((We&ve)<<31>>31)|0,(M|0)<(((u-Fe>>2)*9|0)+-9|0)){if(M=M+9216|0,Ee=mn+4+(((M|0)/9|0)+-1024<<2)|0,M=((M|0)%9|0)+1|0,(M|0)<9){O=10;do O=O*10|0,M=M+1|0;while((M|0)!=9)}else O=10;if(P=t[Ee>>2]|0,K=(P>>>0)%(O>>>0)|0,M=(Ee+4|0)==(u|0),M&(K|0)==0)M=Ee;else if(Pe=(((P>>>0)/(O>>>0)|0)&1|0)==0?9007199254740992:9007199254740994,Re=(O|0)/2|0,n=K>>>0>>0?.5:M&(K|0)==(Re|0)?1:1.5,Nn&&(Re=(p[Lr>>0]|0)==45,n=Re?-n:n,Pe=Re?-Pe:Pe),M=P-K|0,t[Ee>>2]=M,Pe+n!=Pe){if(Re=M+O|0,t[Ee>>2]=Re,Re>>>0>999999999)for(S=Ee;M=S+-4|0,t[S>>2]=0,M>>>0>>0&&(h=h+-4|0,t[h>>2]=0),Re=(t[M>>2]|0)+1|0,t[M>>2]=Re,Re>>>0>999999999;)S=M;else M=Ee;if(S=(Fe-h>>2)*9|0,P=t[h>>2]|0,P>>>0>=10){O=10;do O=O*10|0,S=S+1|0;while(P>>>0>=O>>>0)}}else M=Ee;M=M+4|0,M=u>>>0>M>>>0?M:u,Re=h}else M=u,Re=h;for(st=M;;){if(st>>>0<=Re>>>0){Qe=0;break}if(h=st+-4|0,!(t[h>>2]|0))st=h;else{Qe=1;break}}u=0-S|0;do if(ve)if(h=((We^1)&1)+D|0,(h|0)>(S|0)&(S|0)>-5?(O=s+-1|0,D=h+-1-S|0):(O=s+-2|0,D=h+-1|0),h=l&8,h)Ee=h;else{if(Qe?(Qt=t[st+-4>>2]|0,(Qt|0)!=0):0)if((Qt>>>0)%10|0)M=0;else{M=0,h=10;do h=h*10|0,M=M+1|0;while(!((Qt>>>0)%(h>>>0)|0|0))}else M=9;if(h=((st-Fe>>2)*9|0)+-9|0,(O|32|0)==102){Ee=h-M|0,Ee=(Ee|0)>0?Ee:0,D=(D|0)<(Ee|0)?D:Ee,Ee=0;break}else{Ee=h+S-M|0,Ee=(Ee|0)>0?Ee:0,D=(D|0)<(Ee|0)?D:Ee,Ee=0;break}}else O=s,Ee=l&8;while(0);if(ve=D|Ee,P=(ve|0)!=0&1,K=(O|32|0)==102,K)We=0,h=(S|0)>0?S:0;else{if(h=(S|0)<0?u:S,h=bv(h,((h|0)<0)<<31>>31,hr)|0,M=hr,(M-h|0)<2)do h=h+-1|0,p[h>>0]=48;while((M-h|0)<2);p[h+-1>>0]=(S>>31&2)+43,h=h+-2|0,p[h>>0]=O,We=h,h=M-h|0}if(h=Nn+1+D+P+h|0,hl(e,32,r,h,l),qo(e,Lr,Nn),hl(e,48,r,h,l^65536),K){O=Re>>>0>mn>>>0?mn:Re,Ee=On+9|0,P=Ee,K=On+8|0,M=O;do{if(S=bv(t[M>>2]|0,0,Ee)|0,(M|0)==(O|0))(S|0)==(Ee|0)&&(p[K>>0]=48,S=K);else if(S>>>0>On>>>0){Iv(On|0,48,S-kr|0)|0;do S=S+-1|0;while(S>>>0>On>>>0)}qo(e,S,P-S|0),M=M+4|0}while(M>>>0<=mn>>>0);if(ve|0&&qo(e,5710,1),M>>>0>>0&(D|0)>0)for(;;){if(S=bv(t[M>>2]|0,0,Ee)|0,S>>>0>On>>>0){Iv(On|0,48,S-kr|0)|0;do S=S+-1|0;while(S>>>0>On>>>0)}if(qo(e,S,(D|0)<9?D:9),M=M+4|0,S=D+-9|0,M>>>0>>0&(D|0)>9)D=S;else{D=S;break}}hl(e,48,D+9|0,9,0)}else{if(ve=Qe?st:Re+4|0,(D|0)>-1){Qe=On+9|0,Ee=(Ee|0)==0,u=Qe,P=0-kr|0,K=On+8|0,O=Re;do{S=bv(t[O>>2]|0,0,Qe)|0,(S|0)==(Qe|0)&&(p[K>>0]=48,S=K);do if((O|0)==(Re|0)){if(M=S+1|0,qo(e,S,1),Ee&(D|0)<1){S=M;break}qo(e,5710,1),S=M}else{if(S>>>0<=On>>>0)break;Iv(On|0,48,S+P|0)|0;do S=S+-1|0;while(S>>>0>On>>>0)}while(0);kr=u-S|0,qo(e,S,(D|0)>(kr|0)?kr:D),D=D-kr|0,O=O+4|0}while(O>>>0>>0&(D|0)>-1)}hl(e,48,D+18|0,18,0),qo(e,We,hr-We|0)}hl(e,32,r,h,l^8192)}else On=(s&32|0)!=0,h=Nn+3|0,hl(e,32,r,h,l&-65537),qo(e,Lr,Nn),qo(e,n!=n|!1?On?5686:5690:On?5678:5682,3),hl(e,32,r,h,l^8192);while(0);return m=Zi,((h|0)<(r|0)?r:h)|0}function B8(e){e=+e;var n=0;return U[W>>3]=e,n=t[W>>2]|0,ft=t[W+4>>2]|0,n|0}function UI(e,n){return e=+e,n=n|0,+ +U8(e,n)}function U8(e,n){e=+e,n=n|0;var r=0,u=0,l=0;switch(U[W>>3]=e,r=t[W>>2]|0,u=t[W+4>>2]|0,l=O_(r|0,u|0,52)|0,l&2047){case 0:{e!=0?(e=+U8(e*18446744073709552e3,n),r=(t[n>>2]|0)+-64|0):r=0,t[n>>2]=r;break}case 2047:break;default:t[n>>2]=(l&2047)+-1022,t[W>>2]=r,t[W+4>>2]=u&-2146435073|1071644672,e=+U[W>>3]}return+e}function jI(e,n,r){e=e|0,n=n|0,r=r|0;do if(e){if(n>>>0<128){p[e>>0]=n,e=1;break}if(!(t[t[(zI()|0)+188>>2]>>2]|0))if((n&-128|0)==57216){p[e>>0]=n,e=1;break}else{t[(Fv()|0)>>2]=84,e=-1;break}if(n>>>0<2048){p[e>>0]=n>>>6|192,p[e+1>>0]=n&63|128,e=2;break}if(n>>>0<55296|(n&-8192|0)==57344){p[e>>0]=n>>>12|224,p[e+1>>0]=n>>>6&63|128,p[e+2>>0]=n&63|128,e=3;break}if((n+-65536|0)>>>0<1048576){p[e>>0]=n>>>18|240,p[e+1>>0]=n>>>12&63|128,p[e+2>>0]=n>>>6&63|128,p[e+3>>0]=n&63|128,e=4;break}else{t[(Fv()|0)>>2]=84,e=-1;break}}else e=1;while(0);return e|0}function zI(){return VE()|0}function qI(){return VE()|0}function HI(e,n){e=e|0,n=n|0;var r=0,u=0;for(u=0;;){if((k[5712+u>>0]|0)==(e|0)){e=2;break}if(r=u+1|0,(r|0)==87){r=5800,u=87,e=5;break}else u=r}if((e|0)==2&&(u?(r=5800,e=5):r=5800),(e|0)==5)for(;;){do e=r,r=r+1|0;while((p[e>>0]|0)!=0);if(u=u+-1|0,u)e=5;else break}return WI(r,t[n+20>>2]|0)|0}function WI(e,n){return e=e|0,n=n|0,VI(e,n)|0}function VI(e,n){return e=e|0,n=n|0,n?n=GI(t[n>>2]|0,t[n+4>>2]|0,e)|0:n=0,(n|0?n:e)|0}function GI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;K=(t[e>>2]|0)+1794895138|0,s=Gp(t[e+8>>2]|0,K)|0,u=Gp(t[e+12>>2]|0,K)|0,l=Gp(t[e+16>>2]|0,K)|0;e:do if((s>>>0>>2>>>0?(P=n-(s<<2)|0,u>>>0

>>0&l>>>0

>>0):0)?((l|u)&3|0)==0:0){for(P=u>>>2,O=l>>>2,M=0;;){if(D=s>>>1,S=M+D|0,h=S<<1,l=h+P|0,u=Gp(t[e+(l<<2)>>2]|0,K)|0,l=Gp(t[e+(l+1<<2)>>2]|0,K)|0,!(l>>>0>>0&u>>>0<(n-l|0)>>>0)){u=0;break e}if(p[e+(l+u)>>0]|0){u=0;break e}if(u=L8(r,e+l|0)|0,!u)break;if(u=(u|0)<0,(s|0)==1){u=0;break e}else M=u?M:S,s=u?D:s-D|0}u=h+O|0,l=Gp(t[e+(u<<2)>>2]|0,K)|0,u=Gp(t[e+(u+1<<2)>>2]|0,K)|0,u>>>0>>0&l>>>0<(n-u|0)>>>0?u=(p[e+(u+l)>>0]|0)==0?e+u|0:0:u=0}else u=0;while(0);return u|0}function Gp(e,n){e=e|0,n=n|0;var r=0;return r=Y8(e|0)|0,((n|0)==0?e:r)|0}function YI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=r+16|0,l=t[u>>2]|0,l?s=5:KI(r)|0?u=0:(l=t[u>>2]|0,s=5);e:do if((s|0)==5){if(D=r+20|0,h=t[D>>2]|0,u=h,(l-h|0)>>>0>>0){u=M_[t[r+36>>2]&7](r,e,n)|0;break}t:do if((p[r+75>>0]|0)>-1){for(h=n;;){if(!h){s=0,l=e;break t}if(l=h+-1|0,(p[e+l>>0]|0)==10)break;h=l}if(u=M_[t[r+36>>2]&7](r,e,h)|0,u>>>0>>0)break e;s=h,l=e+h|0,n=n-h|0,u=t[D>>2]|0}else s=0,l=e;while(0);pr(u|0,l|0,n|0)|0,t[D>>2]=(t[D>>2]|0)+n,u=s+n|0}while(0);return u|0}function KI(e){e=e|0;var n=0,r=0;return n=e+74|0,r=p[n>>0]|0,p[n>>0]=r+255|r,n=t[e>>2]|0,n&8?(t[e>>2]=n|32,e=-1):(t[e+8>>2]=0,t[e+4>>2]=0,r=t[e+44>>2]|0,t[e+28>>2]=r,t[e+20>>2]=r,t[e+16>>2]=r+(t[e+48>>2]|0),e=0),e|0}function Eu(e,n){e=w(e),n=w(n);var r=0,u=0;r=j8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=j8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?n:e;break}else{e=e>2]=e,t[W>>2]|0|0}function Yp(e,n){e=w(e),n=w(n);var r=0,u=0;r=z8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=z8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?e:n;break}else{e=e>2]=e,t[W>>2]|0|0}function YE(e,n){e=w(e),n=w(n);var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0;s=(C[W>>2]=e,t[W>>2]|0),D=(C[W>>2]=n,t[W>>2]|0),r=s>>>23&255,h=D>>>23&255,S=s&-2147483648,l=D<<1;e:do if((l|0)!=0?!((r|0)==255|((XI(n)|0)&2147483647)>>>0>2139095040):0){if(u=s<<1,u>>>0<=l>>>0)return n=w(e*w(0)),w((u|0)==(l|0)?n:e);if(r)u=s&8388607|8388608;else{if(r=s<<9,(r|0)>-1){u=r,r=0;do r=r+-1|0,u=u<<1;while((u|0)>-1)}else r=0;u=s<<1-r}if(h)D=D&8388607|8388608;else{if(s=D<<9,(s|0)>-1){l=0;do l=l+-1|0,s=s<<1;while((s|0)>-1)}else l=0;h=l,D=D<<1-l}l=u-D|0,s=(l|0)>-1;t:do if((r|0)>(h|0)){for(;;){if(s)if(l)u=l;else break;if(u=u<<1,r=r+-1|0,l=u-D|0,s=(l|0)>-1,(r|0)<=(h|0))break t}n=w(e*w(0));break e}while(0);if(s)if(l)u=l;else{n=w(e*w(0));break}if(u>>>0<8388608)do u=u<<1,r=r+-1|0;while(u>>>0<8388608);(r|0)>0?r=u+-8388608|r<<23:r=u>>>(1-r|0),n=(t[W>>2]=r|S,w(C[W>>2]))}else M=3;while(0);return(M|0)==3&&(n=w(e*n),n=w(n/n)),w(n)}function XI(e){return e=w(e),C[W>>2]=e,t[W>>2]|0|0}function QI(e,n){return e=e|0,n=n|0,F8(t[582]|0,e,n)|0}function li(e){e=e|0,Xn()}function Pv(e){e=e|0}function JI(e,n){return e=e|0,n=n|0,0}function ZI(e){return e=e|0,(q8(e+4|0)|0)==-1?(M1[t[(t[e>>2]|0)+8>>2]&127](e),e=1):e=0,e|0}function q8(e){e=e|0;var n=0;return n=t[e>>2]|0,t[e>>2]=n+-1,n+-1|0}function J2(e){e=e|0,ZI(e)|0&&$I(e)}function $I(e){e=e|0;var n=0;n=e+8|0,((t[n>>2]|0)!=0?(q8(n)|0)!=-1:0)||M1[t[(t[e>>2]|0)+16>>2]&127](e)}function cn(e){e=e|0;var n=0;for(n=(e|0)==0?1:e;e=C_(n)|0,!(e|0);){if(e=tB()|0,!e){e=0;break}rS[e&0]()}return e|0}function H8(e){return e=e|0,cn(e)|0}function yt(e){e=e|0,x_(e)}function eB(e){e=e|0,(p[e+11>>0]|0)<0&&yt(t[e>>2]|0)}function tB(){var e=0;return e=t[2923]|0,t[2923]=e+0,e|0}function nB(){}function R_(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,u=n-u-(r>>>0>e>>>0|0)>>>0,ft=u,e-r>>>0|0|0}function KE(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,r=e+r>>>0,ft=n+u+(r>>>0>>0|0)>>>0,r|0|0}function Iv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(s=e+r|0,n=n&255,(r|0)>=67){for(;e&3;)p[e>>0]=n,e=e+1|0;for(u=s&-4|0,l=u-64|0,h=n|n<<8|n<<16|n<<24;(e|0)<=(l|0);)t[e>>2]=h,t[e+4>>2]=h,t[e+8>>2]=h,t[e+12>>2]=h,t[e+16>>2]=h,t[e+20>>2]=h,t[e+24>>2]=h,t[e+28>>2]=h,t[e+32>>2]=h,t[e+36>>2]=h,t[e+40>>2]=h,t[e+44>>2]=h,t[e+48>>2]=h,t[e+52>>2]=h,t[e+56>>2]=h,t[e+60>>2]=h,e=e+64|0;for(;(e|0)<(u|0);)t[e>>2]=h,e=e+4|0}for(;(e|0)<(s|0);)p[e>>0]=n,e=e+1|0;return s-r|0}function W8(e,n,r){return e=e|0,n=n|0,r=r|0,(r|0)<32?(ft=n<>>32-r,e<>>r,e>>>r|(n&(1<>>r-32|0)}function pr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;if((r|0)>=8192)return ni(e|0,n|0,r|0)|0;if(s=e|0,l=e+r|0,(e&3)==(n&3)){for(;e&3;){if(!r)return s|0;p[e>>0]=p[n>>0]|0,e=e+1|0,n=n+1|0,r=r-1|0}for(r=l&-4|0,u=r-64|0;(e|0)<=(u|0);)t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2],t[e+16>>2]=t[n+16>>2],t[e+20>>2]=t[n+20>>2],t[e+24>>2]=t[n+24>>2],t[e+28>>2]=t[n+28>>2],t[e+32>>2]=t[n+32>>2],t[e+36>>2]=t[n+36>>2],t[e+40>>2]=t[n+40>>2],t[e+44>>2]=t[n+44>>2],t[e+48>>2]=t[n+48>>2],t[e+52>>2]=t[n+52>>2],t[e+56>>2]=t[n+56>>2],t[e+60>>2]=t[n+60>>2],e=e+64|0,n=n+64|0;for(;(e|0)<(r|0);)t[e>>2]=t[n>>2],e=e+4|0,n=n+4|0}else for(r=l-4|0;(e|0)<(r|0);)p[e>>0]=p[n>>0]|0,p[e+1>>0]=p[n+1>>0]|0,p[e+2>>0]=p[n+2>>0]|0,p[e+3>>0]=p[n+3>>0]|0,e=e+4|0,n=n+4|0;for(;(e|0)<(l|0);)p[e>>0]=p[n>>0]|0,e=e+1|0,n=n+1|0;return s|0}function V8(e){e=e|0;var n=0;return n=p[Se+(e&255)>>0]|0,(n|0)<8?n|0:(n=p[Se+(e>>8&255)>>0]|0,(n|0)<8?n+8|0:(n=p[Se+(e>>16&255)>>0]|0,(n|0)<8?n+16|0:(p[Se+(e>>>24)>>0]|0)+24|0))}function G8(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0;if(O=e,S=n,M=S,h=r,K=u,D=K,!M)return s=(l|0)!=0,D?s?(t[l>>2]=e|0,t[l+4>>2]=n&0,K=0,l=0,ft=K,l|0):(K=0,l=0,ft=K,l|0):(s&&(t[l>>2]=(O>>>0)%(h>>>0),t[l+4>>2]=0),K=0,l=(O>>>0)/(h>>>0)>>>0,ft=K,l|0);s=(D|0)==0;do if(h){if(!s){if(s=(vr(D|0)|0)-(vr(M|0)|0)|0,s>>>0<=31){P=s+1|0,D=31-s|0,n=s-31>>31,h=P,e=O>>>(P>>>0)&n|M<>>(P>>>0)&n,s=0,D=O<>2]=e|0,t[l+4>>2]=S|n&0,K=0,l=0,ft=K,l|0):(K=0,l=0,ft=K,l|0)}if(s=h-1|0,s&h|0){D=(vr(h|0)|0)+33-(vr(M|0)|0)|0,Ee=64-D|0,P=32-D|0,S=P>>31,Pe=D-32|0,n=Pe>>31,h=D,e=P-1>>31&M>>>(Pe>>>0)|(M<>>(D>>>0))&n,n=n&M>>>(D>>>0),s=O<>>(Pe>>>0))&S|O<>31;break}return l|0&&(t[l>>2]=s&O,t[l+4>>2]=0),(h|0)==1?(Pe=S|n&0,Ee=e|0|0,ft=Pe,Ee|0):(Ee=V8(h|0)|0,Pe=M>>>(Ee>>>0)|0,Ee=M<<32-Ee|O>>>(Ee>>>0)|0,ft=Pe,Ee|0)}else{if(s)return l|0&&(t[l>>2]=(M>>>0)%(h>>>0),t[l+4>>2]=0),Pe=0,Ee=(M>>>0)/(h>>>0)>>>0,ft=Pe,Ee|0;if(!O)return l|0&&(t[l>>2]=0,t[l+4>>2]=(M>>>0)%(D>>>0)),Pe=0,Ee=(M>>>0)/(D>>>0)>>>0,ft=Pe,Ee|0;if(s=D-1|0,!(s&D))return l|0&&(t[l>>2]=e|0,t[l+4>>2]=s&M|n&0),Pe=0,Ee=M>>>((V8(D|0)|0)>>>0),ft=Pe,Ee|0;if(s=(vr(D|0)|0)-(vr(M|0)|0)|0,s>>>0<=30){n=s+1|0,D=31-s|0,h=n,e=M<>>(n>>>0),n=M>>>(n>>>0),s=0,D=O<>2]=e|0,t[l+4>>2]=S|n&0,Pe=0,Ee=0,ft=Pe,Ee|0):(Pe=0,Ee=0,ft=Pe,Ee|0)}while(0);if(!h)M=D,S=0,D=0;else{P=r|0|0,O=K|u&0,M=KE(P|0,O|0,-1,-1)|0,r=ft,S=D,D=0;do u=S,S=s>>>31|S<<1,s=D|s<<1,u=e<<1|u>>>31|0,K=e>>>31|n<<1|0,R_(M|0,r|0,u|0,K|0)|0,Ee=ft,Pe=Ee>>31|((Ee|0)<0?-1:0)<<1,D=Pe&1,e=R_(u|0,K|0,Pe&P|0,(((Ee|0)<0?-1:0)>>31|((Ee|0)<0?-1:0)<<1)&O|0)|0,n=ft,h=h-1|0;while((h|0)!=0);M=S,S=0}return h=0,l|0&&(t[l>>2]=e,t[l+4>>2]=n),Pe=(s|0)>>>31|(M|h)<<1|(h<<1|s>>>31)&0|S,Ee=(s<<1|0>>>31)&-2|D,ft=Pe,Ee|0}function XE(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,G8(e,n,r,u,0)|0}function Z2(e){e=e|0;var n=0,r=0;return r=e+15&-16|0,n=t[q>>2]|0,e=n+r|0,(r|0)>0&(e|0)<(n|0)|(e|0)<0?(ur()|0,Vl(12),-1):(t[q>>2]=e,((e|0)>(Fr()|0)?(fr()|0)==0:0)?(t[q>>2]=n,Vl(12),-1):n|0)}function Iy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if((n|0)<(e|0)&(e|0)<(n+r|0)){for(u=e,n=n+r|0,e=e+r|0;(r|0)>0;)e=e-1|0,n=n-1|0,r=r-1|0,p[e>>0]=p[n>>0]|0;e=u}else pr(e,n,r)|0;return e|0}function QE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;return s=m,m=m+16|0,l=s|0,G8(e,n,r,u,l)|0,m=s,ft=t[l+4>>2]|0,t[l>>2]|0|0}function Y8(e){return e=e|0,(e&255)<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function rB(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,K8[e&1](n|0,r|0,u|0,l|0,s|0)}function iB(e,n,r){e=e|0,n=n|0,r=w(r),X8[e&1](n|0,w(r))}function uB(e,n,r){e=e|0,n=n|0,r=+r,Q8[e&31](n|0,+r)}function oB(e,n,r,u){return e=e|0,n=n|0,r=w(r),u=w(u),w(J8[e&0](n|0,w(r),w(u)))}function lB(e,n){e=e|0,n=n|0,M1[e&127](n|0)}function sB(e,n,r){e=e|0,n=n|0,r=r|0,N1[e&31](n|0,r|0)}function aB(e,n){return e=e|0,n=n|0,Xp[e&31](n|0)|0}function fB(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,Z8[e&1](n|0,+r,+u,l|0)}function cB(e,n,r,u){e=e|0,n=n|0,r=+r,u=+u,VB[e&1](n|0,+r,+u)}function dB(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,M_[e&7](n|0,r|0,u|0)|0}function pB(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,+GB[e&1](n|0,r|0,u|0)}function hB(e,n){return e=e|0,n=n|0,+$8[e&15](n|0)}function vB(e,n,r){return e=e|0,n=n|0,r=+r,YB[e&1](n|0,+r)|0}function mB(e,n,r){return e=e|0,n=n|0,r=r|0,ZE[e&15](n|0,r|0)|0}function yB(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=+u,l=+l,s=s|0,KB[e&1](n|0,r|0,+u,+l,s|0)}function gB(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,XB[e&1](n|0,r|0,u|0,l|0,s|0,h|0)}function _B(e,n,r){return e=e|0,n=n|0,r=r|0,+eS[e&7](n|0,r|0)}function EB(e){return e=e|0,N_[e&7]()|0}function DB(e,n,r,u,l,s){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,tS[e&1](n|0,r|0,u|0,l|0,s|0)|0}function wB(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=+l,QB[e&1](n|0,r|0,u|0,+l)}function SB(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,nS[e&1](n|0,r|0,w(u),l|0,w(s),h|0)}function TB(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,jy[e&15](n|0,r|0,u|0)}function CB(e){e=e|0,rS[e&0]()}function xB(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,iS[e&15](n|0,r|0,+u)}function AB(e,n,r){return e=e|0,n=+n,r=+r,JB[e&1](+n,+r)|0}function RB(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,$E[e&15](n|0,r|0,u|0,l|0)}function OB(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,Ut(0)}function kB(e,n){e=e|0,n=w(n),Ut(1)}function Ks(e,n){e=e|0,n=+n,Ut(2)}function MB(e,n,r){return e=e|0,n=w(n),r=w(r),Ut(3),St}function Kn(e){e=e|0,Ut(4)}function By(e,n){e=e|0,n=n|0,Ut(5)}function xa(e){return e=e|0,Ut(6),0}function NB(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,Ut(7)}function LB(e,n,r){e=e|0,n=+n,r=+r,Ut(8)}function FB(e,n,r){return e=e|0,n=n|0,r=r|0,Ut(9),0}function bB(e,n,r){return e=e|0,n=n|0,r=r|0,Ut(10),0}function Kp(e){return e=e|0,Ut(11),0}function PB(e,n){return e=e|0,n=+n,Ut(12),0}function Uy(e,n){return e=e|0,n=n|0,Ut(13),0}function IB(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,Ut(14)}function BB(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,Ut(15)}function JE(e,n){return e=e|0,n=n|0,Ut(16),0}function UB(){return Ut(17),0}function jB(e,n,r,u,l){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,Ut(18),0}function zB(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,Ut(19)}function qB(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0,Ut(20)}function k_(e,n,r){e=e|0,n=n|0,r=r|0,Ut(21)}function HB(){Ut(22)}function Bv(e,n,r){e=e|0,n=n|0,r=+r,Ut(23)}function WB(e,n){return e=+e,n=+n,Ut(24),0}function Uv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,Ut(25)}var K8=[OB,UL],X8=[kB,Ju],Q8=[Ks,ua,ys,gs,Ql,Io,hf,tl,Ia,Zu,vf,jc,lc,Sl,_s,oa,n2,la,sc,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks],J8=[MB],M1=[Kn,Pv,an,$l,go,Lf,x1,Fl,hN,vN,mN,xL,AL,RL,XP,QP,JP,Ne,uc,La,ju,U0,hh,yf,$c,Af,pa,Rh,Sm,h1,v1,Xh,pp,M2,Gm,D1,Sc,ry,oy,Sv,Av,rn,Q4,lE,h_,Nt,_u,Qu,RO,WO,ak,Ak,qk,aM,_M,wM,UM,qM,uN,gN,DN,BN,nL,v2,BF,vb,kb,Vb,pP,RP,UP,qP,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn],N1=[By,gd,$1,Uc,Dl,el,_d,Bs,wl,Fa,ba,Pa,Tl,Be,ut,Jt,jn,ti,tr,Ba,Dd,mh,fE,vE,Mk,zF,fL,g8,By,By,By,By],Xp=[xa,xI,pf,y,J,fe,mt,Ct,Mt,Er,iu,j0,Ua,r2,Vc,Cs,Gk,zN,VF,Sa,xa,xa,xa,xa,xa,xa,xa,xa,xa,xa,xa,xa],Z8=[NB,Td],VB=[LB,sN],M_=[FB,N8,AI,kI,zh,dv,NO,Xb],GB=[bB,lv],$8=[Kp,e0,He,ii,vh,il,sa,Cd,xd,ac,Kp,Kp,Kp,Kp,Kp,Kp],YB=[PB,mM],ZE=[Uy,JI,Ed,ll,zd,Nm,ap,Cp,ly,xr,bo,Fb,Uy,Uy,Uy,Uy],KB=[IB,Sh],XB=[BB,yP],eS=[JE,qi,Ad,a2,Gc,cl,JE,JE],N_=[UB,Yc,to,g0,xM,GM,CN,GP],tS=[jB,ei],QB=[zB,Dy],nS=[qB,i2],jy=[k_,A,$u,jr,gu,d1,k2,ir,Cy,po,aF,_b,NP,k_,k_,k_],rS=[HB],iS=[Bv,e2,ho,t2,Po,zc,bi,g,Ip,KO,dM,Bv,Bv,Bv,Bv,Bv],JB=[WB,dN],$E=[Uv,_p,Rc,pk,tM,NM,ZM,NN,lL,JF,rI,Uv,Uv,Uv,Uv,Uv];return{_llvm_bswap_i32:Y8,dynCall_idd:AB,dynCall_i:EB,_i64Subtract:R_,___udivdi3:XE,dynCall_vif:iB,setThrew:fs,dynCall_viii:TB,_bitshift64Lshr:O_,_bitshift64Shl:W8,dynCall_vi:lB,dynCall_viiddi:yB,dynCall_diii:pB,dynCall_iii:mB,_memset:Iv,_sbrk:Z2,_memcpy:pr,__GLOBAL__sub_I_Yoga_cpp:Qi,dynCall_vii:sB,___uremdi3:QE,dynCall_vid:uB,stackAlloc:so,_nbind_init:hI,getTempRet0:X,dynCall_di:hB,dynCall_iid:vB,setTempRet0:P0,_i64Add:KE,dynCall_fiff:oB,dynCall_iiii:dB,_emscripten_get_global_libc:CI,dynCall_viid:xB,dynCall_viiid:wB,dynCall_viififi:SB,dynCall_ii:aB,__GLOBAL__sub_I_Binding_cc:kF,dynCall_viiii:RB,dynCall_iiiiii:DB,stackSave:Jo,dynCall_viiiii:rB,__GLOBAL__sub_I_nbind_cc:Us,dynCall_vidd:cB,_free:x_,runPostSets:nB,dynCall_viiiiii:gB,establishStackSpace:Fu,_memmove:Iy,stackRestore:Gl,_malloc:C_,__GLOBAL__sub_I_common_cc:XN,dynCall_viddi:fB,dynCall_dii:_B,dynCall_v:CB}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(i){this.name="ExitStatus",this.message="Program terminated with exit("+i+")",this.status=i}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function i(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=i)},Module.callMain=Module.callMain=function(o){o=o||[],ensureInitRuntime();var f=o.length+1;function p(){for(var N=0;N<4-1;N++)E.push(0)}var E=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];p();for(var t=0;t0||(preRun(),runDependencies>0)||Module.calledRun)return;function o(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(i),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),o()},1)):o()}Module.run=Module.run=run;function exit(i,o){o&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=i,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(i)),ENVIRONMENT_IS_NODE&&process.exit(i),Module.quit(i,new ExitStatus(i)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(i){Module.onAbort&&Module.onAbort(i),i!==void 0?(Module.print(i),Module.printErr(i),i=JSON.stringify(i)):i="",ABORT=!0,EXITSTATUS=1;var o=` -If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,f="abort("+i+") at "+stackTrace()+o;throw abortDecorators&&abortDecorators.forEach(function(p){f=p(f,i)}),f}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var eh=ce((Wne,O9)=>{"use strict";var tX=A9(),nX=R9(),hw=!1,vw=null;nX({},function(i,o){if(!hw){if(hw=!0,i)throw i;vw=o}});if(!hw)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");O9.exports=tX(vw.bind,vw.lib)});var M9=ce((Vne,k9)=>{"use strict";k9.exports=({onlyFirst:i=!1}={})=>{let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i?void 0:"g")}});var mw=ce((Gne,N9)=>{"use strict";var rX=M9();N9.exports=i=>typeof i=="string"?i.replace(rX(),""):i});var gw=ce((Yne,yw)=>{"use strict";var L9=i=>Number.isNaN(i)?!1:i>=4352&&(i<=4447||i===9001||i===9002||11904<=i&&i<=12871&&i!==12351||12880<=i&&i<=19903||19968<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65131||65281<=i&&i<=65376||65504<=i&&i<=65510||110592<=i&&i<=110593||127488<=i&&i<=127569||131072<=i&&i<=262141);yw.exports=L9;yw.exports.default=L9});var b9=ce((Kne,F9)=>{"use strict";F9.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var m4=ce((Xne,_w)=>{"use strict";var iX=mw(),uX=gw(),oX=b9(),P9=i=>{if(i=i.replace(oX()," "),typeof i!="string"||i.length===0)return 0;i=iX(i);let o=0;for(let f=0;f=127&&p<=159||p>=768&&p<=879||(p>65535&&f++,o+=uX(p)?2:1)}return o};_w.exports=P9;_w.exports.default=P9});var Dw=ce((Qne,Ew)=>{"use strict";var lX=m4(),I9=i=>{let o=0;for(let f of i.split(` -`))o=Math.max(o,lX(f));return o};Ew.exports=I9;Ew.exports.default=I9});var B9=ce(vg=>{"use strict";var sX=vg&&vg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(vg,"__esModule",{value:!0});var aX=sX(Dw()),ww={};vg.default=i=>{if(i.length===0)return{width:0,height:0};if(ww[i])return ww[i];let o=aX.default(i),f=i.split(` -`).length;return ww[i]={width:o,height:f},{width:o,height:f}}});var U9=ce(mg=>{"use strict";var fX=mg&&mg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(mg,"__esModule",{value:!0});var Ii=fX(eh()),cX=(i,o)=>{"position"in o&&i.setPositionType(o.position==="absolute"?Ii.default.POSITION_TYPE_ABSOLUTE:Ii.default.POSITION_TYPE_RELATIVE)},dX=(i,o)=>{"marginLeft"in o&&i.setMargin(Ii.default.EDGE_START,o.marginLeft||0),"marginRight"in o&&i.setMargin(Ii.default.EDGE_END,o.marginRight||0),"marginTop"in o&&i.setMargin(Ii.default.EDGE_TOP,o.marginTop||0),"marginBottom"in o&&i.setMargin(Ii.default.EDGE_BOTTOM,o.marginBottom||0)},pX=(i,o)=>{"paddingLeft"in o&&i.setPadding(Ii.default.EDGE_LEFT,o.paddingLeft||0),"paddingRight"in o&&i.setPadding(Ii.default.EDGE_RIGHT,o.paddingRight||0),"paddingTop"in o&&i.setPadding(Ii.default.EDGE_TOP,o.paddingTop||0),"paddingBottom"in o&&i.setPadding(Ii.default.EDGE_BOTTOM,o.paddingBottom||0)},hX=(i,o)=>{var f;"flexGrow"in o&&i.setFlexGrow((f=o.flexGrow)!==null&&f!==void 0?f:0),"flexShrink"in o&&i.setFlexShrink(typeof o.flexShrink=="number"?o.flexShrink:1),"flexDirection"in o&&(o.flexDirection==="row"&&i.setFlexDirection(Ii.default.FLEX_DIRECTION_ROW),o.flexDirection==="row-reverse"&&i.setFlexDirection(Ii.default.FLEX_DIRECTION_ROW_REVERSE),o.flexDirection==="column"&&i.setFlexDirection(Ii.default.FLEX_DIRECTION_COLUMN),o.flexDirection==="column-reverse"&&i.setFlexDirection(Ii.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in o&&(typeof o.flexBasis=="number"?i.setFlexBasis(o.flexBasis):typeof o.flexBasis=="string"?i.setFlexBasisPercent(Number.parseInt(o.flexBasis,10)):i.setFlexBasis(NaN)),"alignItems"in o&&((o.alignItems==="stretch"||!o.alignItems)&&i.setAlignItems(Ii.default.ALIGN_STRETCH),o.alignItems==="flex-start"&&i.setAlignItems(Ii.default.ALIGN_FLEX_START),o.alignItems==="center"&&i.setAlignItems(Ii.default.ALIGN_CENTER),o.alignItems==="flex-end"&&i.setAlignItems(Ii.default.ALIGN_FLEX_END)),"alignSelf"in o&&((o.alignSelf==="auto"||!o.alignSelf)&&i.setAlignSelf(Ii.default.ALIGN_AUTO),o.alignSelf==="flex-start"&&i.setAlignSelf(Ii.default.ALIGN_FLEX_START),o.alignSelf==="center"&&i.setAlignSelf(Ii.default.ALIGN_CENTER),o.alignSelf==="flex-end"&&i.setAlignSelf(Ii.default.ALIGN_FLEX_END)),"justifyContent"in o&&((o.justifyContent==="flex-start"||!o.justifyContent)&&i.setJustifyContent(Ii.default.JUSTIFY_FLEX_START),o.justifyContent==="center"&&i.setJustifyContent(Ii.default.JUSTIFY_CENTER),o.justifyContent==="flex-end"&&i.setJustifyContent(Ii.default.JUSTIFY_FLEX_END),o.justifyContent==="space-between"&&i.setJustifyContent(Ii.default.JUSTIFY_SPACE_BETWEEN),o.justifyContent==="space-around"&&i.setJustifyContent(Ii.default.JUSTIFY_SPACE_AROUND))},vX=(i,o)=>{var f,p;"width"in o&&(typeof o.width=="number"?i.setWidth(o.width):typeof o.width=="string"?i.setWidthPercent(Number.parseInt(o.width,10)):i.setWidthAuto()),"height"in o&&(typeof o.height=="number"?i.setHeight(o.height):typeof o.height=="string"?i.setHeightPercent(Number.parseInt(o.height,10)):i.setHeightAuto()),"minWidth"in o&&(typeof o.minWidth=="string"?i.setMinWidthPercent(Number.parseInt(o.minWidth,10)):i.setMinWidth((f=o.minWidth)!==null&&f!==void 0?f:0)),"minHeight"in o&&(typeof o.minHeight=="string"?i.setMinHeightPercent(Number.parseInt(o.minHeight,10)):i.setMinHeight((p=o.minHeight)!==null&&p!==void 0?p:0))},mX=(i,o)=>{"display"in o&&i.setDisplay(o.display==="flex"?Ii.default.DISPLAY_FLEX:Ii.default.DISPLAY_NONE)},yX=(i,o)=>{if("borderStyle"in o){let f=typeof o.borderStyle=="string"?1:0;i.setBorder(Ii.default.EDGE_TOP,f),i.setBorder(Ii.default.EDGE_BOTTOM,f),i.setBorder(Ii.default.EDGE_LEFT,f),i.setBorder(Ii.default.EDGE_RIGHT,f)}};mg.default=(i,o={})=>{cX(i,o),dX(i,o),pX(i,o),hX(i,o),vX(i,o),mX(i,o),yX(i,o)}});var z9=ce(($ne,j9)=>{"use strict";j9.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Sw=ce((ere,q9)=>{var yg=z9(),H9={};for(let i of Object.keys(yg))H9[yg[i]]=i;var In={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};q9.exports=In;for(let i of Object.keys(In)){if(!("channels"in In[i]))throw new Error("missing channels property: "+i);if(!("labels"in In[i]))throw new Error("missing channel labels property: "+i);if(In[i].labels.length!==In[i].channels)throw new Error("channel and label counts mismatch: "+i);let{channels:o,labels:f}=In[i];delete In[i].channels,delete In[i].labels,Object.defineProperty(In[i],"channels",{value:o}),Object.defineProperty(In[i],"labels",{value:f})}In.rgb.hsl=function(i){let o=i[0]/255,f=i[1]/255,p=i[2]/255,E=Math.min(o,f,p),t=Math.max(o,f,p),k=t-E,L,N;t===E?L=0:o===t?L=(f-p)/k:f===t?L=2+(p-o)/k:p===t&&(L=4+(o-f)/k),L=Math.min(L*60,360),L<0&&(L+=360);let C=(E+t)/2;return t===E?N=0:C<=.5?N=k/(t+E):N=k/(2-t-E),[L,N*100,C*100]};In.rgb.hsv=function(i){let o,f,p,E,t,k=i[0]/255,L=i[1]/255,N=i[2]/255,C=Math.max(k,L,N),U=C-Math.min(k,L,N),q=function(W){return(C-W)/6/U+1/2};return U===0?(E=0,t=0):(t=U/C,o=q(k),f=q(L),p=q(N),k===C?E=p-f:L===C?E=1/3+o-p:N===C&&(E=2/3+f-o),E<0?E+=1:E>1&&(E-=1)),[E*360,t*100,C*100]};In.rgb.hwb=function(i){let o=i[0],f=i[1],p=i[2],E=In.rgb.hsl(i)[0],t=1/255*Math.min(o,Math.min(f,p));return p=1-1/255*Math.max(o,Math.max(f,p)),[E,t*100,p*100]};In.rgb.cmyk=function(i){let o=i[0]/255,f=i[1]/255,p=i[2]/255,E=Math.min(1-o,1-f,1-p),t=(1-o-E)/(1-E)||0,k=(1-f-E)/(1-E)||0,L=(1-p-E)/(1-E)||0;return[t*100,k*100,L*100,E*100]};function gX(i,o){return(i[0]-o[0])**2+(i[1]-o[1])**2+(i[2]-o[2])**2}In.rgb.keyword=function(i){let o=H9[i];if(o)return o;let f=Infinity,p;for(let E of Object.keys(yg)){let t=yg[E],k=gX(i,t);k.04045?((o+.055)/1.055)**2.4:o/12.92,f=f>.04045?((f+.055)/1.055)**2.4:f/12.92,p=p>.04045?((p+.055)/1.055)**2.4:p/12.92;let E=o*.4124+f*.3576+p*.1805,t=o*.2126+f*.7152+p*.0722,k=o*.0193+f*.1192+p*.9505;return[E*100,t*100,k*100]};In.rgb.lab=function(i){let o=In.rgb.xyz(i),f=o[0],p=o[1],E=o[2];f/=95.047,p/=100,E/=108.883,f=f>.008856?f**(1/3):7.787*f+16/116,p=p>.008856?p**(1/3):7.787*p+16/116,E=E>.008856?E**(1/3):7.787*E+16/116;let t=116*p-16,k=500*(f-p),L=200*(p-E);return[t,k,L]};In.hsl.rgb=function(i){let o=i[0]/360,f=i[1]/100,p=i[2]/100,E,t,k;if(f===0)return k=p*255,[k,k,k];p<.5?E=p*(1+f):E=p+f-p*f;let L=2*p-E,N=[0,0,0];for(let C=0;C<3;C++)t=o+1/3*-(C-1),t<0&&t++,t>1&&t--,6*t<1?k=L+(E-L)*6*t:2*t<1?k=E:3*t<2?k=L+(E-L)*(2/3-t)*6:k=L,N[C]=k*255;return N};In.hsl.hsv=function(i){let o=i[0],f=i[1]/100,p=i[2]/100,E=f,t=Math.max(p,.01);p*=2,f*=p<=1?p:2-p,E*=t<=1?t:2-t;let k=(p+f)/2,L=p===0?2*E/(t+E):2*f/(p+f);return[o,L*100,k*100]};In.hsv.rgb=function(i){let o=i[0]/60,f=i[1]/100,p=i[2]/100,E=Math.floor(o)%6,t=o-Math.floor(o),k=255*p*(1-f),L=255*p*(1-f*t),N=255*p*(1-f*(1-t));switch(p*=255,E){case 0:return[p,N,k];case 1:return[L,p,k];case 2:return[k,p,N];case 3:return[k,L,p];case 4:return[N,k,p];case 5:return[p,k,L]}};In.hsv.hsl=function(i){let o=i[0],f=i[1]/100,p=i[2]/100,E=Math.max(p,.01),t,k;k=(2-f)*p;let L=(2-f)*E;return t=f*E,t/=L<=1?L:2-L,t=t||0,k/=2,[o,t*100,k*100]};In.hwb.rgb=function(i){let o=i[0]/360,f=i[1]/100,p=i[2]/100,E=f+p,t;E>1&&(f/=E,p/=E);let k=Math.floor(6*o),L=1-p;t=6*o-k,(k&1)!=0&&(t=1-t);let N=f+t*(L-f),C,U,q;switch(k){default:case 6:case 0:C=L,U=N,q=f;break;case 1:C=N,U=L,q=f;break;case 2:C=f,U=L,q=N;break;case 3:C=f,U=N,q=L;break;case 4:C=N,U=f,q=L;break;case 5:C=L,U=f,q=N;break}return[C*255,U*255,q*255]};In.cmyk.rgb=function(i){let o=i[0]/100,f=i[1]/100,p=i[2]/100,E=i[3]/100,t=1-Math.min(1,o*(1-E)+E),k=1-Math.min(1,f*(1-E)+E),L=1-Math.min(1,p*(1-E)+E);return[t*255,k*255,L*255]};In.xyz.rgb=function(i){let o=i[0]/100,f=i[1]/100,p=i[2]/100,E,t,k;return E=o*3.2406+f*-1.5372+p*-.4986,t=o*-.9689+f*1.8758+p*.0415,k=o*.0557+f*-.204+p*1.057,E=E>.0031308?1.055*E**(1/2.4)-.055:E*12.92,t=t>.0031308?1.055*t**(1/2.4)-.055:t*12.92,k=k>.0031308?1.055*k**(1/2.4)-.055:k*12.92,E=Math.min(Math.max(0,E),1),t=Math.min(Math.max(0,t),1),k=Math.min(Math.max(0,k),1),[E*255,t*255,k*255]};In.xyz.lab=function(i){let o=i[0],f=i[1],p=i[2];o/=95.047,f/=100,p/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,f=f>.008856?f**(1/3):7.787*f+16/116,p=p>.008856?p**(1/3):7.787*p+16/116;let E=116*f-16,t=500*(o-f),k=200*(f-p);return[E,t,k]};In.lab.xyz=function(i){let o=i[0],f=i[1],p=i[2],E,t,k;t=(o+16)/116,E=f/500+t,k=t-p/200;let L=t**3,N=E**3,C=k**3;return t=L>.008856?L:(t-16/116)/7.787,E=N>.008856?N:(E-16/116)/7.787,k=C>.008856?C:(k-16/116)/7.787,E*=95.047,t*=100,k*=108.883,[E,t,k]};In.lab.lch=function(i){let o=i[0],f=i[1],p=i[2],E;E=Math.atan2(p,f)*360/2/Math.PI,E<0&&(E+=360);let k=Math.sqrt(f*f+p*p);return[o,k,E]};In.lch.lab=function(i){let o=i[0],f=i[1],E=i[2]/360*2*Math.PI,t=f*Math.cos(E),k=f*Math.sin(E);return[o,t,k]};In.rgb.ansi16=function(i,o=null){let[f,p,E]=i,t=o===null?In.rgb.hsv(i)[2]:o;if(t=Math.round(t/50),t===0)return 30;let k=30+(Math.round(E/255)<<2|Math.round(p/255)<<1|Math.round(f/255));return t===2&&(k+=60),k};In.hsv.ansi16=function(i){return In.rgb.ansi16(In.hsv.rgb(i),i[2])};In.rgb.ansi256=function(i){let o=i[0],f=i[1],p=i[2];return o===f&&f===p?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(f/255*5)+Math.round(p/255*5)};In.ansi16.rgb=function(i){let o=i%10;if(o===0||o===7)return i>50&&(o+=3.5),o=o/10.5*255,[o,o,o];let f=(~~(i>50)+1)*.5,p=(o&1)*f*255,E=(o>>1&1)*f*255,t=(o>>2&1)*f*255;return[p,E,t]};In.ansi256.rgb=function(i){if(i>=232){let t=(i-232)*10+8;return[t,t,t]}i-=16;let o,f=Math.floor(i/36)/5*255,p=Math.floor((o=i%36)/6)/5*255,E=o%6/5*255;return[f,p,E]};In.rgb.hex=function(i){let f=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(f.length)+f};In.hex.rgb=function(i){let o=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let f=o[0];o[0].length===3&&(f=f.split("").map(L=>L+L).join(""));let p=parseInt(f,16),E=p>>16&255,t=p>>8&255,k=p&255;return[E,t,k]};In.rgb.hcg=function(i){let o=i[0]/255,f=i[1]/255,p=i[2]/255,E=Math.max(Math.max(o,f),p),t=Math.min(Math.min(o,f),p),k=E-t,L,N;return k<1?L=t/(1-k):L=0,k<=0?N=0:E===o?N=(f-p)/k%6:E===f?N=2+(p-o)/k:N=4+(o-f)/k,N/=6,N%=1,[N*360,k*100,L*100]};In.hsl.hcg=function(i){let o=i[1]/100,f=i[2]/100,p=f<.5?2*o*f:2*o*(1-f),E=0;return p<1&&(E=(f-.5*p)/(1-p)),[i[0],p*100,E*100]};In.hsv.hcg=function(i){let o=i[1]/100,f=i[2]/100,p=o*f,E=0;return p<1&&(E=(f-p)/(1-p)),[i[0],p*100,E*100]};In.hcg.rgb=function(i){let o=i[0]/360,f=i[1]/100,p=i[2]/100;if(f===0)return[p*255,p*255,p*255];let E=[0,0,0],t=o%1*6,k=t%1,L=1-k,N=0;switch(Math.floor(t)){case 0:E[0]=1,E[1]=k,E[2]=0;break;case 1:E[0]=L,E[1]=1,E[2]=0;break;case 2:E[0]=0,E[1]=1,E[2]=k;break;case 3:E[0]=0,E[1]=L,E[2]=1;break;case 4:E[0]=k,E[1]=0,E[2]=1;break;default:E[0]=1,E[1]=0,E[2]=L}return N=(1-f)*p,[(f*E[0]+N)*255,(f*E[1]+N)*255,(f*E[2]+N)*255]};In.hcg.hsv=function(i){let o=i[1]/100,f=i[2]/100,p=o+f*(1-o),E=0;return p>0&&(E=o/p),[i[0],E*100,p*100]};In.hcg.hsl=function(i){let o=i[1]/100,p=i[2]/100*(1-o)+.5*o,E=0;return p>0&&p<.5?E=o/(2*p):p>=.5&&p<1&&(E=o/(2*(1-p))),[i[0],E*100,p*100]};In.hcg.hwb=function(i){let o=i[1]/100,f=i[2]/100,p=o+f*(1-o);return[i[0],(p-o)*100,(1-p)*100]};In.hwb.hcg=function(i){let o=i[1]/100,f=i[2]/100,p=1-f,E=p-o,t=0;return E<1&&(t=(p-E)/(1-E)),[i[0],E*100,t*100]};In.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};In.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};In.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};In.gray.hsl=function(i){return[0,0,i[0]]};In.gray.hsv=In.gray.hsl;In.gray.hwb=function(i){return[0,100,i[0]]};In.gray.cmyk=function(i){return[0,0,0,i[0]]};In.gray.lab=function(i){return[i[0],0,0]};In.gray.hex=function(i){let o=Math.round(i[0]/100*255)&255,p=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(p.length)+p};In.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]}});var V9=ce((tre,W9)=>{var y4=Sw();function _X(){let i={},o=Object.keys(y4);for(let f=o.length,p=0;p{var Tw=Sw(),SX=V9(),sm={},TX=Object.keys(Tw);function CX(i){let o=function(...f){let p=f[0];return p==null?p:(p.length>1&&(f=p),i(f))};return"conversion"in i&&(o.conversion=i.conversion),o}function xX(i){let o=function(...f){let p=f[0];if(p==null)return p;p.length>1&&(f=p);let E=i(f);if(typeof E=="object")for(let t=E.length,k=0;k{sm[i]={},Object.defineProperty(sm[i],"channels",{value:Tw[i].channels}),Object.defineProperty(sm[i],"labels",{value:Tw[i].labels});let o=SX(i);Object.keys(o).forEach(p=>{let E=o[p];sm[i][p]=xX(E),sm[i][p].raw=CX(E)})});G9.exports=sm});var _4=ce((rre,K9)=>{"use strict";var X9=(i,o)=>(...f)=>`[${i(...f)+o}m`,Q9=(i,o)=>(...f)=>{let p=i(...f);return`[${38+o};5;${p}m`},J9=(i,o)=>(...f)=>{let p=i(...f);return`[${38+o};2;${p[0]};${p[1]};${p[2]}m`},g4=i=>i,Z9=(i,o,f)=>[i,o,f],am=(i,o,f)=>{Object.defineProperty(i,o,{get:()=>{let p=f();return Object.defineProperty(i,o,{value:p,enumerable:!0,configurable:!0}),p},enumerable:!0,configurable:!0})},Cw,fm=(i,o,f,p)=>{Cw===void 0&&(Cw=Y9());let E=p?10:0,t={};for(let[k,L]of Object.entries(Cw)){let N=k==="ansi16"?"ansi":k;k===o?t[N]=i(f,E):typeof L=="object"&&(t[N]=i(L[o],E))}return t};function AX(){let i=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};o.color.gray=o.color.blackBright,o.bgColor.bgGray=o.bgColor.bgBlackBright,o.color.grey=o.color.blackBright,o.bgColor.bgGrey=o.bgColor.bgBlackBright;for(let[f,p]of Object.entries(o)){for(let[E,t]of Object.entries(p))o[E]={open:`[${t[0]}m`,close:`[${t[1]}m`},p[E]=o[E],i.set(t[0],t[1]);Object.defineProperty(o,f,{value:p,enumerable:!1})}return Object.defineProperty(o,"codes",{value:i,enumerable:!1}),o.color.close="",o.bgColor.close="",am(o.color,"ansi",()=>fm(X9,"ansi16",g4,!1)),am(o.color,"ansi256",()=>fm(Q9,"ansi256",g4,!1)),am(o.color,"ansi16m",()=>fm(J9,"rgb",Z9,!1)),am(o.bgColor,"ansi",()=>fm(X9,"ansi16",g4,!0)),am(o.bgColor,"ansi256",()=>fm(Q9,"ansi256",g4,!0)),am(o.bgColor,"ansi16m",()=>fm(J9,"rgb",Z9,!0)),o}Object.defineProperty(K9,"exports",{enumerable:!0,get:AX})});var tA=ce((ire,$9)=>{"use strict";var gg=m4(),RX=mw(),OX=_4(),xw=new Set(["","\x9B"]),kX=39,eA=i=>`${xw.values().next().value}[${i}m`,MX=i=>i.split(" ").map(o=>gg(o)),Aw=(i,o,f)=>{let p=[...o],E=!1,t=gg(RX(i[i.length-1]));for(let[k,L]of p.entries()){let N=gg(L);if(t+N<=f?i[i.length-1]+=L:(i.push(L),t=0),xw.has(L))E=!0;else if(E&&L==="m"){E=!1;continue}E||(t+=N,t===f&&k0&&i.length>1&&(i[i.length-2]+=i.pop())},NX=i=>{let o=i.split(" "),f=o.length;for(;f>0&&!(gg(o[f-1])>0);)f--;return f===o.length?i:o.slice(0,f).join(" ")+o.slice(f).join("")},LX=(i,o,f={})=>{if(f.trim!==!1&&i.trim()==="")return"";let p="",E="",t,k=MX(i),L=[""];for(let[N,C]of i.split(" ").entries()){f.trim!==!1&&(L[L.length-1]=L[L.length-1].trimLeft());let U=gg(L[L.length-1]);if(N!==0&&(U>=o&&(f.wordWrap===!1||f.trim===!1)&&(L.push(""),U=0),(U>0||f.trim===!1)&&(L[L.length-1]+=" ",U++)),f.hard&&k[N]>o){let q=o-U,W=1+Math.floor((k[N]-q-1)/o);Math.floor((k[N]-1)/o)o&&U>0&&k[N]>0){if(f.wordWrap===!1&&Uo&&f.wordWrap===!1){Aw(L,C,o);continue}L[L.length-1]+=C}f.trim!==!1&&(L=L.map(NX)),p=L.join(` -`);for(let[N,C]of[...p].entries()){if(E+=C,xw.has(C)){let q=parseFloat(/\d[^m]*/.exec(p.slice(N,N+4)));t=q===kX?null:q}let U=OX.codes.get(Number(t));t&&U&&(p[N+1]===` -`?E+=eA(U):C===` -`&&(E+=eA(t)))}return E};$9.exports=(i,o,f)=>String(i).normalize().replace(/\r\n/g,` -`).split(` -`).map(p=>LX(p,o,f)).join(` -`)});var iA=ce((ure,nA)=>{"use strict";var rA="[\uD800-\uDBFF][\uDC00-\uDFFF]",FX=i=>i&&i.exact?new RegExp(`^${rA}$`):new RegExp(rA,"g");nA.exports=FX});var Rw=ce((ore,uA)=>{"use strict";var bX=gw(),PX=iA(),oA=_4(),lA=["","\x9B"],E4=i=>`${lA[0]}[${i}m`,sA=(i,o,f)=>{let p=[];i=[...i];for(let E of i){let t=E;E.match(";")&&(E=E.split(";")[0][0]+"0");let k=oA.codes.get(parseInt(E,10));if(k){let L=i.indexOf(k.toString());L>=0?i.splice(L,1):p.push(E4(o?k:t))}else if(o){p.push(E4(0));break}else p.push(E4(t))}if(o&&(p=p.filter((E,t)=>p.indexOf(E)===t),f!==void 0)){let E=E4(oA.codes.get(parseInt(f,10)));p=p.reduce((t,k)=>k===E?[k,...t]:[...t,k],[])}return p.join("")};uA.exports=(i,o,f)=>{let p=[...i.normalize()],E=[];f=typeof f=="number"?f:p.length;let t=!1,k,L=0,N="";for(let[C,U]of p.entries()){let q=!1;if(lA.includes(U)){let W=/\d[^m]*/.exec(i.slice(C,C+18));k=W&&W.length>0?W[0]:void 0,Lo&&L<=f)N+=U;else if(L===o&&!t&&k!==void 0)N=sA(E);else if(L>=f){N+=sA(E,!0,k);break}}return N}});var fA=ce((lre,aA)=>{"use strict";var pd=Rw(),IX=m4();function D4(i,o,f){if(i.charAt(o)===" ")return o;for(let p=1;p<=3;p++)if(f){if(i.charAt(o+p)===" ")return o+p}else if(i.charAt(o-p)===" ")return o-p;return o}aA.exports=(i,o,f)=>{f=E0({position:"end",preferTruncationOnSpace:!1},f);let{position:p,space:E,preferTruncationOnSpace:t}=f,k="\u2026",L=1;if(typeof i!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof i}`);if(typeof o!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof o}`);if(o<1)return"";if(o===1)return k;let N=IX(i);if(N<=o)return i;if(p==="start"){if(t){let C=D4(i,N-o+1,!0);return k+pd(i,C,N).trim()}return E===!0&&(k+=" ",L=2),k+pd(i,N-o+L,N)}if(p==="middle"){E===!0&&(k=" "+k+" ",L=3);let C=Math.floor(o/2);if(t){let U=D4(i,C),q=D4(i,N-(o-C)+1,!0);return pd(i,0,U)+k+pd(i,q,N).trim()}return pd(i,0,C)+k+pd(i,N-(o-C)+L,N)}if(p==="end"){if(t){let C=D4(i,o-1);return pd(i,0,C)+k}return E===!0&&(k=" "+k,L=2),pd(i,0,o-L)+k}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${p}`)}});var kw=ce(_g=>{"use strict";var cA=_g&&_g.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_g,"__esModule",{value:!0});var BX=cA(tA()),UX=cA(fA()),Ow={};_g.default=(i,o,f)=>{let p=i+String(o)+String(f);if(Ow[p])return Ow[p];let E=i;if(f==="wrap"&&(E=BX.default(i,o,{trim:!1,hard:!0})),f.startsWith("truncate")){let t="end";f==="truncate-middle"&&(t="middle"),f==="truncate-start"&&(t="start"),E=UX.default(i,o,{position:t})}return Ow[p]=E,E}});var Nw=ce(Mw=>{"use strict";Object.defineProperty(Mw,"__esModule",{value:!0});var dA=i=>{let o="";if(i.childNodes.length>0)for(let f of i.childNodes){let p="";f.nodeName==="#text"?p=f.nodeValue:((f.nodeName==="ink-text"||f.nodeName==="ink-virtual-text")&&(p=dA(f)),p.length>0&&typeof f.internal_transform=="function"&&(p=f.internal_transform(p))),o+=p}return o};Mw.default=dA});var Lw=ce(l0=>{"use strict";var Eg=l0&&l0.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(l0,"__esModule",{value:!0});l0.setTextNodeValue=l0.createTextNode=l0.setStyle=l0.setAttribute=l0.removeChildNode=l0.insertBeforeNode=l0.appendChildNode=l0.createNode=l0.TEXT_NAME=void 0;var jX=Eg(eh()),pA=Eg(B9()),zX=Eg(U9()),qX=Eg(kw()),HX=Eg(Nw());l0.TEXT_NAME="#text";l0.createNode=i=>{var o;let f={nodeName:i,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:i==="ink-virtual-text"?void 0:jX.default.Node.create()};return i==="ink-text"&&((o=f.yogaNode)===null||o===void 0||o.setMeasureFunc(WX.bind(null,f))),f};l0.appendChildNode=(i,o)=>{var f;o.parentNode&&l0.removeChildNode(o.parentNode,o),o.parentNode=i,i.childNodes.push(o),o.yogaNode&&((f=i.yogaNode)===null||f===void 0||f.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&w4(i)};l0.insertBeforeNode=(i,o,f)=>{var p,E;o.parentNode&&l0.removeChildNode(o.parentNode,o),o.parentNode=i;let t=i.childNodes.indexOf(f);if(t>=0){i.childNodes.splice(t,0,o),o.yogaNode&&((p=i.yogaNode)===null||p===void 0||p.insertChild(o.yogaNode,t));return}i.childNodes.push(o),o.yogaNode&&((E=i.yogaNode)===null||E===void 0||E.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&w4(i)};l0.removeChildNode=(i,o)=>{var f,p;o.yogaNode&&((p=(f=o.parentNode)===null||f===void 0?void 0:f.yogaNode)===null||p===void 0||p.removeChild(o.yogaNode)),o.parentNode=null;let E=i.childNodes.indexOf(o);E>=0&&i.childNodes.splice(E,1),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&w4(i)};l0.setAttribute=(i,o,f)=>{i.attributes[o]=f};l0.setStyle=(i,o)=>{i.style=o,i.yogaNode&&zX.default(i.yogaNode,o)};l0.createTextNode=i=>{let o={nodeName:"#text",nodeValue:i,yogaNode:void 0,parentNode:null,style:{}};return l0.setTextNodeValue(o,i),o};var WX=function(i,o){var f,p;let E=i.nodeName==="#text"?i.nodeValue:HX.default(i),t=pA.default(E);if(t.width<=o||t.width>=1&&o>0&&o<1)return t;let k=(p=(f=i.style)===null||f===void 0?void 0:f.textWrap)!==null&&p!==void 0?p:"wrap",L=qX.default(E,o,k);return pA.default(L)},hA=i=>{var o;if(!(!i||!i.parentNode))return(o=i.yogaNode)!==null&&o!==void 0?o:hA(i.parentNode)},w4=i=>{let o=hA(i);o==null||o.markDirty()};l0.setTextNodeValue=(i,o)=>{typeof o!="string"&&(o=String(o)),i.nodeValue=o,w4(i)}});var th=ce((cre,vA)=>{"use strict";vA.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}});var Dg=ce((dre,Fw)=>{"use strict";var{EMPTY_BUFFER:VX}=th();function mA(i,o){if(i.length===0)return VX;if(i.length===1)return i[0];let f=Buffer.allocUnsafe(o),p=0;for(let E=0;E{"use strict";var DA=Symbol("kDone"),bw=Symbol("kRun"),wA=class{constructor(o){this[DA]=()=>{this.pending--,this[bw]()},this.concurrency=o||Infinity,this.jobs=[],this.pending=0}add(o){this.jobs.push(o),this[bw]()}[bw](){if(this.pending!==this.concurrency&&this.jobs.length){let o=this.jobs.shift();this.pending++,o(this[DA])}}};EA.exports=wA});var Tg=ce((hre,TA)=>{"use strict";var wg=require("zlib"),CA=Dg(),GX=SA(),{kStatusCode:xA,NOOP:YX}=th(),KX=Buffer.from([0,0,255,255]),T4=Symbol("permessage-deflate"),G1=Symbol("total-length"),Sg=Symbol("callback"),hd=Symbol("buffers"),Pw=Symbol("error"),C4,AA=class{constructor(o,f,p){if(this._maxPayload=p|0,this._options=o||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!f,this._deflate=null,this._inflate=null,this.params=null,!C4){let E=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;C4=new GX(E)}}static get extensionName(){return"permessage-deflate"}offer(){let o={};return this._options.serverNoContextTakeover&&(o.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(o.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(o.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?o.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(o.client_max_window_bits=!0),o}accept(o){return o=this.normalizeParams(o),this.params=this._isServer?this.acceptAsServer(o):this.acceptAsClient(o),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let o=this._deflate[Sg];this._deflate.close(),this._deflate=null,o&&o(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(o){let f=this._options,p=o.find(E=>!(f.serverNoContextTakeover===!1&&E.server_no_context_takeover||E.server_max_window_bits&&(f.serverMaxWindowBits===!1||typeof f.serverMaxWindowBits=="number"&&f.serverMaxWindowBits>E.server_max_window_bits)||typeof f.clientMaxWindowBits=="number"&&!E.client_max_window_bits));if(!p)throw new Error("None of the extension offers can be accepted");return f.serverNoContextTakeover&&(p.server_no_context_takeover=!0),f.clientNoContextTakeover&&(p.client_no_context_takeover=!0),typeof f.serverMaxWindowBits=="number"&&(p.server_max_window_bits=f.serverMaxWindowBits),typeof f.clientMaxWindowBits=="number"?p.client_max_window_bits=f.clientMaxWindowBits:(p.client_max_window_bits===!0||f.clientMaxWindowBits===!1)&&delete p.client_max_window_bits,p}acceptAsClient(o){let f=o[0];if(this._options.clientNoContextTakeover===!1&&f.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!f.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(f.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&f.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return f}normalizeParams(o){return o.forEach(f=>{Object.keys(f).forEach(p=>{let E=f[p];if(E.length>1)throw new Error(`Parameter "${p}" must have only a single value`);if(E=E[0],p==="client_max_window_bits"){if(E!==!0){let t=+E;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${p}": ${E}`);E=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${p}": ${E}`)}else if(p==="server_max_window_bits"){let t=+E;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${p}": ${E}`);E=t}else if(p==="client_no_context_takeover"||p==="server_no_context_takeover"){if(E!==!0)throw new TypeError(`Invalid value for parameter "${p}": ${E}`)}else throw new Error(`Unknown parameter "${p}"`);f[p]=E})}),o}decompress(o,f,p){C4.add(E=>{this._decompress(o,f,(t,k)=>{E(),p(t,k)})})}compress(o,f,p){C4.add(E=>{this._compress(o,f,(t,k)=>{E(),p(t,k)})})}_decompress(o,f,p){let E=this._isServer?"client":"server";if(!this._inflate){let t=`${E}_max_window_bits`,k=typeof this.params[t]!="number"?wg.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=wg.createInflateRaw(Gf(E0({},this._options.zlibInflateOptions),{windowBits:k})),this._inflate[T4]=this,this._inflate[G1]=0,this._inflate[hd]=[],this._inflate.on("error",QX),this._inflate.on("data",RA)}this._inflate[Sg]=p,this._inflate.write(o),f&&this._inflate.write(KX),this._inflate.flush(()=>{let t=this._inflate[Pw];if(t){this._inflate.close(),this._inflate=null,p(t);return}let k=CA.concat(this._inflate[hd],this._inflate[G1]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[G1]=0,this._inflate[hd]=[],f&&this.params[`${E}_no_context_takeover`]&&this._inflate.reset()),p(null,k)})}_compress(o,f,p){let E=this._isServer?"server":"client";if(!this._deflate){let t=`${E}_max_window_bits`,k=typeof this.params[t]!="number"?wg.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=wg.createDeflateRaw(Gf(E0({},this._options.zlibDeflateOptions),{windowBits:k})),this._deflate[G1]=0,this._deflate[hd]=[],this._deflate.on("error",YX),this._deflate.on("data",XX)}this._deflate[Sg]=p,this._deflate.write(o),this._deflate.flush(wg.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let t=CA.concat(this._deflate[hd],this._deflate[G1]);f&&(t=t.slice(0,t.length-4)),this._deflate[Sg]=null,this._deflate[G1]=0,this._deflate[hd]=[],f&&this.params[`${E}_no_context_takeover`]&&this._deflate.reset(),p(null,t)})}};TA.exports=AA;function XX(i){this[hd].push(i),this[G1]+=i.length}function RA(i){if(this[G1]+=i.length,this[T4]._maxPayload<1||this[G1]<=this[T4]._maxPayload){this[hd].push(i);return}this[Pw]=new RangeError("Max payload size exceeded"),this[Pw][xA]=1009,this.removeListener("data",RA),this.reset()}function QX(i){this[T4]._inflate=null,i[xA]=1007,this[Sg](i)}});var Bw=ce((vre,Iw)=>{"use strict";function OA(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function kA(i){let o=i.length,f=0;for(;f=o||(i[f+1]&192)!=128||(i[f+2]&192)!=128||i[f]===224&&(i[f+1]&224)==128||i[f]===237&&(i[f+1]&224)==160)return!1;f+=3}else if((i[f]&248)==240){if(f+3>=o||(i[f+1]&192)!=128||(i[f+2]&192)!=128||(i[f+3]&192)!=128||i[f]===240&&(i[f+1]&240)==128||i[f]===244&&i[f+1]>143||i[f]>244)return!1;f+=4}else return!1;return!0}try{let i=require("utf-8-validate");typeof i=="object"&&(i=i.Validation.isValidUTF8),Iw.exports={isValidStatusCode:OA,isValidUTF8(o){return o.length<150?kA(o):i(o)}}}catch(i){Iw.exports={isValidStatusCode:OA,isValidUTF8:kA}}});var zw=ce((mre,MA)=>{"use strict";var{Writable:JX}=require("stream"),NA=Tg(),{BINARY_TYPES:ZX,EMPTY_BUFFER:$X,kStatusCode:eQ,kWebSocket:tQ}=th(),{concat:Uw,toArrayBuffer:nQ,unmask:rQ}=Dg(),{isValidStatusCode:iQ,isValidUTF8:LA}=Bw(),Cg=0,FA=1,bA=2,PA=3,jw=4,uQ=5,IA=class extends JX{constructor(o,f,p,E){super();this._binaryType=o||ZX[0],this[tQ]=void 0,this._extensions=f||{},this._isServer=!!p,this._maxPayload=E|0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=Cg,this._loop=!1}_write(o,f,p){if(this._opcode===8&&this._state==Cg)return p();this._bufferedBytes+=o.length,this._buffers.push(o),this.startLoop(p)}consume(o){if(this._bufferedBytes-=o,o===this._buffers[0].length)return this._buffers.shift();if(o=p.length?f.set(this._buffers.shift(),E):(f.set(new Uint8Array(p.buffer,p.byteOffset,o),E),this._buffers[0]=p.slice(o)),o-=p.length}while(o>0);return f}startLoop(o){let f;this._loop=!0;do switch(this._state){case Cg:f=this.getInfo();break;case FA:f=this.getPayloadLength16();break;case bA:f=this.getPayloadLength64();break;case PA:this.getMask();break;case jw:f=this.getData(o);break;default:this._loop=!1;return}while(this._loop);o(f)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!=0)return this._loop=!1,Ho(RangeError,"RSV2 and RSV3 must be clear",!0,1002);let f=(o[0]&64)==64;if(f&&!this._extensions[NA.extensionName])return this._loop=!1,Ho(RangeError,"RSV1 must be clear",!0,1002);if(this._fin=(o[0]&128)==128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(f)return this._loop=!1,Ho(RangeError,"RSV1 must be clear",!0,1002);if(!this._fragmented)return this._loop=!1,Ho(RangeError,"invalid opcode 0",!0,1002);this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,Ho(RangeError,`invalid opcode ${this._opcode}`,!0,1002);this._compressed=f}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,Ho(RangeError,"FIN must be set",!0,1002);if(f)return this._loop=!1,Ho(RangeError,"RSV1 must be clear",!0,1002);if(this._payloadLength>125)return this._loop=!1,Ho(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002)}else return this._loop=!1,Ho(RangeError,`invalid opcode ${this._opcode}`,!0,1002);if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)==128,this._isServer){if(!this._masked)return this._loop=!1,Ho(RangeError,"MASK must be set",!0,1002)}else if(this._masked)return this._loop=!1,Ho(RangeError,"MASK must be clear",!0,1002);if(this._payloadLength===126)this._state=FA;else if(this._payloadLength===127)this._state=bA;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),f=o.readUInt32BE(0);return f>Math.pow(2,53-32)-1?(this._loop=!1,Ho(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009)):(this._payloadLength=f*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Ho(RangeError,"Max payload size exceeded",!1,1009);this._masked?this._state=PA:this._state=jw}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=jw}getData(o){let f=$X;if(this._payloadLength){if(this._bufferedBytes7)return this.controlMessage(f);if(this._compressed){this._state=uQ,this.decompress(f,o);return}return f.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(f)),this.dataMessage()}decompress(o,f){this._extensions[NA.extensionName].decompress(o,this._fin,(E,t)=>{if(E)return f(E);if(t.length){if(this._messageLength+=t.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return f(Ho(RangeError,"Max payload size exceeded",!1,1009));this._fragments.push(t)}let k=this.dataMessage();if(k)return f(k);this.startLoop(f)})}dataMessage(){if(this._fin){let o=this._messageLength,f=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let p;this._binaryType==="nodebuffer"?p=Uw(f,o):this._binaryType==="arraybuffer"?p=nQ(Uw(f,o)):p=f,this.emit("message",p)}else{let p=Uw(f,o);if(!LA(p))return this._loop=!1,Ho(Error,"invalid UTF-8 sequence",!0,1007);this.emit("message",p.toString())}}this._state=Cg}controlMessage(o){if(this._opcode===8)if(this._loop=!1,o.length===0)this.emit("conclude",1005,""),this.end();else{if(o.length===1)return Ho(RangeError,"invalid payload length 1",!0,1002);{let f=o.readUInt16BE(0);if(!iQ(f))return Ho(RangeError,`invalid status code ${f}`,!0,1002);let p=o.slice(2);if(!LA(p))return Ho(Error,"invalid UTF-8 sequence",!0,1007);this.emit("conclude",f,p.toString()),this.end()}}else this._opcode===9?this.emit("ping",o):this.emit("pong",o);this._state=Cg}};MA.exports=IA;function Ho(i,o,f,p){let E=new i(f?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(E,Ho),E[eQ]=p,E}});var qw=ce((yre,BA)=>{"use strict";var{randomFillSync:oQ}=require("crypto"),UA=Tg(),{EMPTY_BUFFER:lQ}=th(),{isValidStatusCode:sQ}=Bw(),{mask:jA,toBuffer:Y1}=Dg(),nh=Buffer.alloc(4),K1=class{constructor(o,f){this._extensions=f||{},this._socket=o,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(o,f){let p=f.mask&&f.readOnly,E=f.mask?6:2,t=o.length;o.length>=65536?(E+=8,t=127):o.length>125&&(E+=2,t=126);let k=Buffer.allocUnsafe(p?o.length+E:E);return k[0]=f.fin?f.opcode|128:f.opcode,f.rsv1&&(k[0]|=64),k[1]=t,t===126?k.writeUInt16BE(o.length,2):t===127&&(k.writeUInt32BE(0,2),k.writeUInt32BE(o.length,6)),f.mask?(oQ(nh,0,4),k[1]|=128,k[E-4]=nh[0],k[E-3]=nh[1],k[E-2]=nh[2],k[E-1]=nh[3],p?(jA(o,nh,k,E,o.length),[k]):(jA(o,nh,o,0,o.length),[k,o])):[k,o]}close(o,f,p,E){let t;if(o===void 0)t=lQ;else{if(typeof o!="number"||!sQ(o))throw new TypeError("First argument must be a valid error code number");if(f===void 0||f==="")t=Buffer.allocUnsafe(2),t.writeUInt16BE(o,0);else{let k=Buffer.byteLength(f);if(k>123)throw new RangeError("The message must not be greater than 123 bytes");t=Buffer.allocUnsafe(2+k),t.writeUInt16BE(o,0),t.write(f,2)}}this._deflating?this.enqueue([this.doClose,t,p,E]):this.doClose(t,p,E)}doClose(o,f,p){this.sendFrame(K1.frame(o,{fin:!0,rsv1:!1,opcode:8,mask:f,readOnly:!1}),p)}ping(o,f,p){let E=Y1(o);if(E.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,E,f,Y1.readOnly,p]):this.doPing(E,f,Y1.readOnly,p)}doPing(o,f,p,E){this.sendFrame(K1.frame(o,{fin:!0,rsv1:!1,opcode:9,mask:f,readOnly:p}),E)}pong(o,f,p){let E=Y1(o);if(E.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,E,f,Y1.readOnly,p]):this.doPong(E,f,Y1.readOnly,p)}doPong(o,f,p,E){this.sendFrame(K1.frame(o,{fin:!0,rsv1:!1,opcode:10,mask:f,readOnly:p}),E)}send(o,f,p){let E=Y1(o),t=this._extensions[UA.extensionName],k=f.binary?2:1,L=f.compress;if(this._firstFragment?(this._firstFragment=!1,L&&t&&(L=E.length>=t._threshold),this._compress=L):(L=!1,k=0),f.fin&&(this._firstFragment=!0),t){let N={fin:f.fin,rsv1:L,opcode:k,mask:f.mask,readOnly:Y1.readOnly};this._deflating?this.enqueue([this.dispatch,E,this._compress,N,p]):this.dispatch(E,this._compress,N,p)}else this.sendFrame(K1.frame(E,{fin:f.fin,rsv1:!1,opcode:k,mask:f.mask,readOnly:Y1.readOnly}),p)}dispatch(o,f,p,E){if(!f){this.sendFrame(K1.frame(o,p),E);return}let t=this._extensions[UA.extensionName];this._bufferedBytes+=o.length,this._deflating=!0,t.compress(o,p.fin,(k,L)=>{if(this._socket.destroyed){let N=new Error("The socket was closed while data was being compressed");typeof E=="function"&&E(N);for(let C=0;C{"use strict";var xg=class{constructor(o,f){this.target=f,this.type=o}},qA=class extends xg{constructor(o,f){super("message",f);this.data=o}},HA=class extends xg{constructor(o,f,p){super("close",p);this.wasClean=p._closeFrameReceived&&p._closeFrameSent,this.reason=f,this.code=o}},WA=class extends xg{constructor(o){super("open",o)}},VA=class extends xg{constructor(o,f){super("error",f);this.message=o.message,this.error=o}},aQ={addEventListener(i,o,f){if(typeof o!="function")return;function p(N){o.call(this,new qA(N,this))}function E(N,C){o.call(this,new HA(N,C,this))}function t(N){o.call(this,new VA(N,this))}function k(){o.call(this,new WA(this))}let L=f&&f.once?"once":"on";i==="message"?(p._listener=o,this[L](i,p)):i==="close"?(E._listener=o,this[L](i,E)):i==="error"?(t._listener=o,this[L](i,t)):i==="open"?(k._listener=o,this[L](i,k)):this[L](i,o)},removeEventListener(i,o){let f=this.listeners(i);for(let p=0;p{"use strict";var Ag=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Pc(i,o,f){i[o]===void 0?i[o]=[f]:i[o].push(f)}function fQ(i){let o=Object.create(null);if(i===void 0||i==="")return o;let f=Object.create(null),p=!1,E=!1,t=!1,k,L,N=-1,C=-1,U=0;for(;U{let f=i[o];return Array.isArray(f)||(f=[f]),f.map(p=>[o].concat(Object.keys(p).map(E=>{let t=p[E];return Array.isArray(t)||(t=[t]),t.map(k=>k===!0?E:`${E}=${k}`).join("; ")})).join("; ")).join(", ")}).join(", ")}YA.exports={format:cQ,parse:fQ}});var Kw=ce((Ere,KA)=>{"use strict";var dQ=require("events"),pQ=require("https"),hQ=require("http"),XA=require("net"),vQ=require("tls"),{randomBytes:mQ,createHash:yQ}=require("crypto"),{URL:Ww}=require("url"),vd=Tg(),gQ=zw(),_Q=qw(),{BINARY_TYPES:QA,EMPTY_BUFFER:Vw,GUID:EQ,kStatusCode:DQ,kWebSocket:Qs,NOOP:JA}=th(),{addEventListener:wQ,removeEventListener:SQ}=GA(),{format:TQ,parse:CQ}=Hw(),{toBuffer:xQ}=Dg(),ZA=["CONNECTING","OPEN","CLOSING","CLOSED"],Gw=[8,13],AQ=30*1e3,Bi=class extends dQ{constructor(o,f,p){super();this._binaryType=QA[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=Bi.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,o!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(f)?f=f.join(", "):typeof f=="object"&&f!==null&&(p=f,f=void 0),$A(this,o,f,p)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(o){!QA.includes(o)||(this._binaryType=o,this._receiver&&(this._receiver._binaryType=o))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(o,f,p){let E=new gQ(this.binaryType,this._extensions,this._isServer,p);this._sender=new _Q(o,this._extensions),this._receiver=E,this._socket=o,E[Qs]=this,o[Qs]=this,E.on("conclude",RQ),E.on("drain",OQ),E.on("error",kQ),E.on("message",MQ),E.on("ping",NQ),E.on("pong",LQ),o.setTimeout(0),o.setNoDelay(),f.length>0&&o.unshift(f),o.on("close",eR),o.on("data",x4),o.on("end",tR),o.on("error",nR),this._readyState=Bi.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=Bi.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[vd.extensionName]&&this._extensions[vd.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Bi.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(o,f){if(this.readyState!==Bi.CLOSED){if(this.readyState===Bi.CONNECTING){let p="WebSocket was closed before the connection was established";return X1(this,this._req,p)}if(this.readyState===Bi.CLOSING){this._closeFrameSent&&this._closeFrameReceived&&this._socket.end();return}this._readyState=Bi.CLOSING,this._sender.close(o,f,!this._isServer,p=>{p||(this._closeFrameSent=!0,this._closeFrameReceived&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),AQ)}}ping(o,f,p){if(this.readyState===Bi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(p=o,o=f=void 0):typeof f=="function"&&(p=f,f=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Bi.OPEN){Yw(this,o,p);return}f===void 0&&(f=!this._isServer),this._sender.ping(o||Vw,f,p)}pong(o,f,p){if(this.readyState===Bi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(p=o,o=f=void 0):typeof f=="function"&&(p=f,f=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Bi.OPEN){Yw(this,o,p);return}f===void 0&&(f=!this._isServer),this._sender.pong(o||Vw,f,p)}send(o,f,p){if(this.readyState===Bi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof f=="function"&&(p=f,f={}),typeof o=="number"&&(o=o.toString()),this.readyState!==Bi.OPEN){Yw(this,o,p);return}let E=E0({binary:typeof o!="string",mask:!this._isServer,compress:!0,fin:!0},f);this._extensions[vd.extensionName]||(E.compress=!1),this._sender.send(o||Vw,E,p)}terminate(){if(this.readyState!==Bi.CLOSED){if(this.readyState===Bi.CONNECTING){let o="WebSocket was closed before the connection was established";return X1(this,this._req,o)}this._socket&&(this._readyState=Bi.CLOSING,this._socket.destroy())}}};ZA.forEach((i,o)=>{let f={enumerable:!0,value:o};Object.defineProperty(Bi.prototype,i,f),Object.defineProperty(Bi,i,f)});["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach(i=>{Object.defineProperty(Bi.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(Bi.prototype,`on${i}`,{configurable:!0,enumerable:!0,get(){let o=this.listeners(i);for(let f=0;f{X1(i,W,"Opening handshake has timed out")}),W.on("error",ne=>{W===null||W.aborted||(W=i._req=null,i._readyState=Bi.CLOSING,i.emit("error",ne),i.emitClose())}),W.on("response",ne=>{let m=ne.headers.location,we=ne.statusCode;if(m&&E.followRedirects&&we>=300&&we<400){if(++i._redirects>E.maxRedirects){X1(i,W,"Maximum redirects exceeded");return}W.abort();let Se=new Ww(m,o);$A(i,Se,f,p)}else i.emit("unexpected-response",W,ne)||X1(i,W,`Unexpected server response: ${ne.statusCode}`)}),W.on("upgrade",(ne,m,we)=>{if(i.emit("upgrade",ne),i.readyState!==Bi.CONNECTING)return;W=i._req=null;let Se=yQ("sha1").update(C+EQ).digest("base64");if(ne.headers["sec-websocket-accept"]!==Se){X1(i,m,"Invalid Sec-WebSocket-Accept header");return}let he=ne.headers["sec-websocket-protocol"],ge=(f||"").split(/, */),ze;if(!f&&he?ze="Server sent a subprotocol but none was requested":f&&!he?ze="Server sent no subprotocol":he&&!ge.includes(he)&&(ze="Server sent an invalid subprotocol"),ze){X1(i,m,ze);return}if(he&&(i._protocol=he),q)try{let pe=CQ(ne.headers["sec-websocket-extensions"]);pe[vd.extensionName]&&(q.accept(pe[vd.extensionName]),i._extensions[vd.extensionName]=q)}catch(pe){X1(i,m,"Invalid Sec-WebSocket-Extensions header");return}i.setSocket(m,we,E.maxPayload)})}function FQ(i){return i.path=i.socketPath,XA.connect(i)}function bQ(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=XA.isIP(i.host)?"":i.host),vQ.connect(i)}function X1(i,o,f){i._readyState=Bi.CLOSING;let p=new Error(f);Error.captureStackTrace(p,X1),o.setHeader?(o.abort(),o.socket&&!o.socket.destroyed&&o.socket.destroy(),o.once("abort",i.emitClose.bind(i)),i.emit("error",p)):(o.destroy(p),o.once("error",i.emit.bind(i,"error")),o.once("close",i.emitClose.bind(i)))}function Yw(i,o,f){if(o){let p=xQ(o).length;i._socket?i._sender._bufferedBytes+=p:i._bufferedAmount+=p}if(f){let p=new Error(`WebSocket is not open: readyState ${i.readyState} (${ZA[i.readyState]})`);f(p)}}function RQ(i,o){let f=this[Qs];f._socket.removeListener("data",x4),f._socket.resume(),f._closeFrameReceived=!0,f._closeMessage=o,f._closeCode=i,i===1005?f.close():f.close(i,o)}function OQ(){this[Qs]._socket.resume()}function kQ(i){let o=this[Qs];o._socket.removeListener("data",x4),o._readyState=Bi.CLOSING,o._closeCode=i[DQ],o.emit("error",i),o._socket.destroy()}function rR(){this[Qs].emitClose()}function MQ(i){this[Qs].emit("message",i)}function NQ(i){let o=this[Qs];o.pong(i,!o._isServer,JA),o.emit("ping",i)}function LQ(i){this[Qs].emit("pong",i)}function eR(){let i=this[Qs];this.removeListener("close",eR),this.removeListener("end",tR),i._readyState=Bi.CLOSING,i._socket.read(),i._receiver.end(),this.removeListener("data",x4),this[Qs]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",rR),i._receiver.on("finish",rR))}function x4(i){this[Qs]._receiver.write(i)||this.pause()}function tR(){let i=this[Qs];i._readyState=Bi.CLOSING,i._receiver.end(),this.end()}function nR(){let i=this[Qs];this.removeListener("error",nR),this.on("error",JA),i&&(i._readyState=Bi.CLOSING,this.destroy())}});var lR=ce((Dre,iR)=>{"use strict";var{Duplex:PQ}=require("stream");function uR(i){i.emit("close")}function IQ(){!this.destroyed&&this._writableState.finished&&this.destroy()}function oR(i){this.removeListener("error",oR),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function BQ(i,o){let f=!0;function p(){f&&i._socket.resume()}i.readyState===i.CONNECTING?i.once("open",function(){i._receiver.removeAllListeners("drain"),i._receiver.on("drain",p)}):(i._receiver.removeAllListeners("drain"),i._receiver.on("drain",p));let E=new PQ(Gf(E0({},o),{autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1}));return i.on("message",function(k){E.push(k)||(f=!1,i._socket.pause())}),i.once("error",function(k){E.destroyed||E.destroy(k)}),i.once("close",function(){E.destroyed||E.push(null)}),E._destroy=function(t,k){if(i.readyState===i.CLOSED){k(t),process.nextTick(uR,E);return}let L=!1;i.once("error",function(C){L=!0,k(C)}),i.once("close",function(){L||k(t),process.nextTick(uR,E)}),i.terminate()},E._final=function(t){if(i.readyState===i.CONNECTING){i.once("open",function(){E._final(t)});return}i._socket!==null&&(i._socket._writableState.finished?(t(),E._readableState.endEmitted&&E.destroy()):(i._socket.once("finish",function(){t()}),i.close()))},E._read=function(){i.readyState===i.OPEN&&!f&&(f=!0,i._receiver._writableState.needDrain||i._socket.resume())},E._write=function(t,k,L){if(i.readyState===i.CONNECTING){i.once("open",function(){E._write(t,k,L)});return}i.send(t,L)},E.on("end",IQ),E.on("error",oR),E}iR.exports=BQ});var fR=ce((wre,sR)=>{"use strict";var UQ=require("events"),{createHash:jQ}=require("crypto"),{createServer:zQ,STATUS_CODES:Xw}=require("http"),rh=Tg(),qQ=Kw(),{format:HQ,parse:WQ}=Hw(),{GUID:VQ,kWebSocket:GQ}=th(),YQ=/^[+/0-9A-Za-z]{22}==$/,aR=class extends UQ{constructor(o,f){super();if(o=E0({maxPayload:100*1024*1024,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null},o),o.port==null&&!o.server&&!o.noServer)throw new TypeError('One of the "port", "server", or "noServer" options must be specified');if(o.port!=null?(this._server=zQ((p,E)=>{let t=Xw[426];E.writeHead(426,{"Content-Length":t.length,"Content-Type":"text/plain"}),E.end(t)}),this._server.listen(o.port,o.host,o.backlog,f)):o.server&&(this._server=o.server),this._server){let p=this.emit.bind(this,"connection");this._removeListeners=KQ(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(E,t,k)=>{this.handleUpgrade(E,t,k,p)}})}o.perMessageDeflate===!0&&(o.perMessageDeflate={}),o.clientTracking&&(this.clients=new Set),this.options=o}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(o){if(o&&this.once("close",o),this.clients)for(let p of this.clients)p.terminate();let f=this._server;if(f&&(this._removeListeners(),this._removeListeners=this._server=null,this.options.port!=null)){f.close(()=>this.emit("close"));return}process.nextTick(XQ,this)}shouldHandle(o){if(this.options.path){let f=o.url.indexOf("?");if((f!==-1?o.url.slice(0,f):o.url)!==this.options.path)return!1}return!0}handleUpgrade(o,f,p,E){f.on("error",Qw);let t=o.headers["sec-websocket-key"]!==void 0?o.headers["sec-websocket-key"].trim():!1,k=+o.headers["sec-websocket-version"],L={};if(o.method!=="GET"||o.headers.upgrade.toLowerCase()!=="websocket"||!t||!YQ.test(t)||k!==8&&k!==13||!this.shouldHandle(o))return A4(f,400);if(this.options.perMessageDeflate){let N=new rh(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let C=WQ(o.headers["sec-websocket-extensions"]);C[rh.extensionName]&&(N.accept(C[rh.extensionName]),L[rh.extensionName]=N)}catch(C){return A4(f,400)}}if(this.options.verifyClient){let N={origin:o.headers[`${k===8?"sec-websocket-origin":"origin"}`],secure:!!(o.socket.authorized||o.socket.encrypted),req:o};if(this.options.verifyClient.length===2){this.options.verifyClient(N,(C,U,q,W)=>{if(!C)return A4(f,U||401,q,W);this.completeUpgrade(t,L,o,f,p,E)});return}if(!this.options.verifyClient(N))return A4(f,401)}this.completeUpgrade(t,L,o,f,p,E)}completeUpgrade(o,f,p,E,t,k){if(!E.readable||!E.writable)return E.destroy();if(E[GQ])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");let L=jQ("sha1").update(o+VQ).digest("base64"),N=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${L}`],C=new qQ(null),U=p.headers["sec-websocket-protocol"];if(U&&(U=U.split(",").map(QQ),this.options.handleProtocols?U=this.options.handleProtocols(U,p):U=U[0],U&&(N.push(`Sec-WebSocket-Protocol: ${U}`),C._protocol=U)),f[rh.extensionName]){let q=f[rh.extensionName].params,W=HQ({[rh.extensionName]:[q]});N.push(`Sec-WebSocket-Extensions: ${W}`),C._extensions=f}this.emit("headers",N,p),E.write(N.concat(`\r -`).join(`\r -`)),E.removeListener("error",Qw),C.setSocket(E,t,this.options.maxPayload),this.clients&&(this.clients.add(C),C.on("close",()=>this.clients.delete(C))),k(C,p)}};sR.exports=aR;function KQ(i,o){for(let f of Object.keys(o))i.on(f,o[f]);return function(){for(let p of Object.keys(o))i.removeListener(p,o[p])}}function XQ(i){i.emit("close")}function Qw(){this.destroy()}function A4(i,o,f,p){i.writable&&(f=f||Xw[o],p=E0({Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(f)},p),i.write(`HTTP/1.1 ${o} ${Xw[o]}\r -`+Object.keys(p).map(E=>`${E}: ${p[E]}`).join(`\r -`)+`\r -\r -`+f)),i.removeListener("error",Qw),i.destroy()}function QQ(i){return i.trim()}});var dR=ce((Sre,cR)=>{"use strict";var Rg=Kw();Rg.createWebSocketStream=lR();Rg.Server=fR();Rg.Receiver=zw();Rg.Sender=qw();cR.exports=Rg});var pR=ce(R4=>{"use strict";var JQ=R4&&R4.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(R4,"__esModule",{value:!0});var ZQ=JQ(dR()),Og=global;Og.WebSocket||(Og.WebSocket=ZQ.default);Og.window||(Og.window=global);Og.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}]});var hR=ce((O4,Jw)=>{(function(i,o){typeof O4=="object"&&typeof Jw=="object"?Jw.exports=o():typeof define=="function"&&define.amd?define([],o):typeof O4=="object"?O4.ReactDevToolsBackend=o():i.ReactDevToolsBackend=o()})(window,function(){return function(i){var o={};function f(p){if(o[p])return o[p].exports;var E=o[p]={i:p,l:!1,exports:{}};return i[p].call(E.exports,E,E.exports,f),E.l=!0,E.exports}return f.m=i,f.c=o,f.d=function(p,E,t){f.o(p,E)||Object.defineProperty(p,E,{enumerable:!0,get:t})},f.r=function(p){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},f.t=function(p,E){if(1&E&&(p=f(p)),8&E||4&E&&typeof p=="object"&&p&&p.__esModule)return p;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:p}),2&E&&typeof p!="string")for(var k in p)f.d(t,k,function(L){return p[L]}.bind(null,k));return t},f.n=function(p){var E=p&&p.__esModule?function(){return p.default}:function(){return p};return f.d(E,"a",E),E},f.o=function(p,E){return Object.prototype.hasOwnProperty.call(p,E)},f.p="",f(f.s=20)}([function(i,o,f){"use strict";i.exports=f(12)},function(i,o,f){"use strict";var p=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function k(L){if(L==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(L)}i.exports=function(){try{if(!Object.assign)return!1;var L=new String("abc");if(L[5]="de",Object.getOwnPropertyNames(L)[0]==="5")return!1;for(var N={},C=0;C<10;C++)N["_"+String.fromCharCode(C)]=C;if(Object.getOwnPropertyNames(N).map(function(q){return N[q]}).join("")!=="0123456789")return!1;var U={};return"abcdefghijklmnopqrst".split("").forEach(function(q){U[q]=q}),Object.keys(Object.assign({},U)).join("")==="abcdefghijklmnopqrst"}catch(q){return!1}}()?Object.assign:function(L,N){for(var C,U,q=k(L),W=1;W=le||en<0||$t&&At-Ke>=wt}function ue(){var At=Se();if(Ce(At))return je(At);$e=setTimeout(ue,function(en){var ln=le-(en-ft);return $t?we(ln,wt-(en-Ke)):ln}(At))}function je(At){return $e=void 0,at&&Ge?Q(At):(Ge=rt=void 0,xt)}function ct(){var At=Se(),en=Ce(At);if(Ge=arguments,rt=this,ft=At,en){if($e===void 0)return ae(ft);if($t)return $e=setTimeout(ue,le),Q(ft)}return $e===void 0&&($e=setTimeout(ue,le)),xt}return le=pe(le)||0,ge(Ue)&&(jt=!!Ue.leading,wt=($t="maxWait"in Ue)?m(pe(Ue.maxWait)||0,le):wt,at="trailing"in Ue?!!Ue.trailing:at),ct.cancel=function(){$e!==void 0&&clearTimeout($e),Ke=0,Ge=ft=rt=$e=void 0},ct.flush=function(){return $e===void 0?xt:je(Se())},ct}function ge(Oe){var le=E(Oe);return!!Oe&&(le=="object"||le=="function")}function ze(Oe){return E(Oe)=="symbol"||function(le){return!!le&&E(le)=="object"}(Oe)&&ne.call(Oe)=="[object Symbol]"}function pe(Oe){if(typeof Oe=="number")return Oe;if(ze(Oe))return NaN;if(ge(Oe)){var le=typeof Oe.valueOf=="function"?Oe.valueOf():Oe;Oe=ge(le)?le+"":le}if(typeof Oe!="string")return Oe===0?Oe:+Oe;Oe=Oe.replace(t,"");var Ue=L.test(Oe);return Ue||N.test(Oe)?C(Oe.slice(2),Ue?2:8):k.test(Oe)?NaN:+Oe}i.exports=function(Oe,le,Ue){var Ge=!0,rt=!0;if(typeof Oe!="function")throw new TypeError("Expected a function");return ge(Ue)&&(Ge="leading"in Ue?!!Ue.leading:Ge,rt="trailing"in Ue?!!Ue.trailing:rt),he(Oe,le,{leading:Ge,maxWait:le,trailing:rt})}}).call(this,f(4))},function(i,o,f){(function(p){function E(Q){return(E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae})(Q)}var t;o=i.exports=m,t=(p===void 0?"undefined":E(p))==="object"&&p.env&&p.env.NODE_DEBUG&&/\bsemver\b/i.test(p.env.NODE_DEBUG)?function(){var Q=Array.prototype.slice.call(arguments,0);Q.unshift("SEMVER"),console.log.apply(console,Q)}:function(){},o.SEMVER_SPEC_VERSION="2.0.0";var k=Number.MAX_SAFE_INTEGER||9007199254740991,L=o.re=[],N=o.src=[],C=o.tokens={},U=0;function q(Q){C[Q]=U++}q("NUMERICIDENTIFIER"),N[C.NUMERICIDENTIFIER]="0|[1-9]\\d*",q("NUMERICIDENTIFIERLOOSE"),N[C.NUMERICIDENTIFIERLOOSE]="[0-9]+",q("NONNUMERICIDENTIFIER"),N[C.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",q("MAINVERSION"),N[C.MAINVERSION]="("+N[C.NUMERICIDENTIFIER]+")\\.("+N[C.NUMERICIDENTIFIER]+")\\.("+N[C.NUMERICIDENTIFIER]+")",q("MAINVERSIONLOOSE"),N[C.MAINVERSIONLOOSE]="("+N[C.NUMERICIDENTIFIERLOOSE]+")\\.("+N[C.NUMERICIDENTIFIERLOOSE]+")\\.("+N[C.NUMERICIDENTIFIERLOOSE]+")",q("PRERELEASEIDENTIFIER"),N[C.PRERELEASEIDENTIFIER]="(?:"+N[C.NUMERICIDENTIFIER]+"|"+N[C.NONNUMERICIDENTIFIER]+")",q("PRERELEASEIDENTIFIERLOOSE"),N[C.PRERELEASEIDENTIFIERLOOSE]="(?:"+N[C.NUMERICIDENTIFIERLOOSE]+"|"+N[C.NONNUMERICIDENTIFIER]+")",q("PRERELEASE"),N[C.PRERELEASE]="(?:-("+N[C.PRERELEASEIDENTIFIER]+"(?:\\."+N[C.PRERELEASEIDENTIFIER]+")*))",q("PRERELEASELOOSE"),N[C.PRERELEASELOOSE]="(?:-?("+N[C.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+N[C.PRERELEASEIDENTIFIERLOOSE]+")*))",q("BUILDIDENTIFIER"),N[C.BUILDIDENTIFIER]="[0-9A-Za-z-]+",q("BUILD"),N[C.BUILD]="(?:\\+("+N[C.BUILDIDENTIFIER]+"(?:\\."+N[C.BUILDIDENTIFIER]+")*))",q("FULL"),q("FULLPLAIN"),N[C.FULLPLAIN]="v?"+N[C.MAINVERSION]+N[C.PRERELEASE]+"?"+N[C.BUILD]+"?",N[C.FULL]="^"+N[C.FULLPLAIN]+"$",q("LOOSEPLAIN"),N[C.LOOSEPLAIN]="[v=\\s]*"+N[C.MAINVERSIONLOOSE]+N[C.PRERELEASELOOSE]+"?"+N[C.BUILD]+"?",q("LOOSE"),N[C.LOOSE]="^"+N[C.LOOSEPLAIN]+"$",q("GTLT"),N[C.GTLT]="((?:<|>)?=?)",q("XRANGEIDENTIFIERLOOSE"),N[C.XRANGEIDENTIFIERLOOSE]=N[C.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",q("XRANGEIDENTIFIER"),N[C.XRANGEIDENTIFIER]=N[C.NUMERICIDENTIFIER]+"|x|X|\\*",q("XRANGEPLAIN"),N[C.XRANGEPLAIN]="[v=\\s]*("+N[C.XRANGEIDENTIFIER]+")(?:\\.("+N[C.XRANGEIDENTIFIER]+")(?:\\.("+N[C.XRANGEIDENTIFIER]+")(?:"+N[C.PRERELEASE]+")?"+N[C.BUILD]+"?)?)?",q("XRANGEPLAINLOOSE"),N[C.XRANGEPLAINLOOSE]="[v=\\s]*("+N[C.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+N[C.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+N[C.XRANGEIDENTIFIERLOOSE]+")(?:"+N[C.PRERELEASELOOSE]+")?"+N[C.BUILD]+"?)?)?",q("XRANGE"),N[C.XRANGE]="^"+N[C.GTLT]+"\\s*"+N[C.XRANGEPLAIN]+"$",q("XRANGELOOSE"),N[C.XRANGELOOSE]="^"+N[C.GTLT]+"\\s*"+N[C.XRANGEPLAINLOOSE]+"$",q("COERCE"),N[C.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",q("COERCERTL"),L[C.COERCERTL]=new RegExp(N[C.COERCE],"g"),q("LONETILDE"),N[C.LONETILDE]="(?:~>?)",q("TILDETRIM"),N[C.TILDETRIM]="(\\s*)"+N[C.LONETILDE]+"\\s+",L[C.TILDETRIM]=new RegExp(N[C.TILDETRIM],"g"),q("TILDE"),N[C.TILDE]="^"+N[C.LONETILDE]+N[C.XRANGEPLAIN]+"$",q("TILDELOOSE"),N[C.TILDELOOSE]="^"+N[C.LONETILDE]+N[C.XRANGEPLAINLOOSE]+"$",q("LONECARET"),N[C.LONECARET]="(?:\\^)",q("CARETTRIM"),N[C.CARETTRIM]="(\\s*)"+N[C.LONECARET]+"\\s+",L[C.CARETTRIM]=new RegExp(N[C.CARETTRIM],"g"),q("CARET"),N[C.CARET]="^"+N[C.LONECARET]+N[C.XRANGEPLAIN]+"$",q("CARETLOOSE"),N[C.CARETLOOSE]="^"+N[C.LONECARET]+N[C.XRANGEPLAINLOOSE]+"$",q("COMPARATORLOOSE"),N[C.COMPARATORLOOSE]="^"+N[C.GTLT]+"\\s*("+N[C.LOOSEPLAIN]+")$|^$",q("COMPARATOR"),N[C.COMPARATOR]="^"+N[C.GTLT]+"\\s*("+N[C.FULLPLAIN]+")$|^$",q("COMPARATORTRIM"),N[C.COMPARATORTRIM]="(\\s*)"+N[C.GTLT]+"\\s*("+N[C.LOOSEPLAIN]+"|"+N[C.XRANGEPLAIN]+")",L[C.COMPARATORTRIM]=new RegExp(N[C.COMPARATORTRIM],"g"),q("HYPHENRANGE"),N[C.HYPHENRANGE]="^\\s*("+N[C.XRANGEPLAIN]+")\\s+-\\s+("+N[C.XRANGEPLAIN]+")\\s*$",q("HYPHENRANGELOOSE"),N[C.HYPHENRANGELOOSE]="^\\s*("+N[C.XRANGEPLAINLOOSE]+")\\s+-\\s+("+N[C.XRANGEPLAINLOOSE]+")\\s*$",q("STAR"),N[C.STAR]="(<|>)?=?\\s*\\*";for(var W=0;W256||!(ae.loose?L[C.LOOSE]:L[C.FULL]).test(Q))return null;try{return new m(Q,ae)}catch(Ce){return null}}function m(Q,ae){if(ae&&E(ae)==="object"||(ae={loose:!!ae,includePrerelease:!1}),Q instanceof m){if(Q.loose===ae.loose)return Q;Q=Q.version}else if(typeof Q!="string")throw new TypeError("Invalid Version: "+Q);if(Q.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof m))return new m(Q,ae);t("SemVer",Q,ae),this.options=ae,this.loose=!!ae.loose;var Ce=Q.trim().match(ae.loose?L[C.LOOSE]:L[C.FULL]);if(!Ce)throw new TypeError("Invalid Version: "+Q);if(this.raw=Q,this.major=+Ce[1],this.minor=+Ce[2],this.patch=+Ce[3],this.major>k||this.major<0)throw new TypeError("Invalid major version");if(this.minor>k||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>k||this.patch<0)throw new TypeError("Invalid patch version");Ce[4]?this.prerelease=Ce[4].split(".").map(function(ue){if(/^[0-9]+$/.test(ue)){var je=+ue;if(je>=0&&je=0;)typeof this.prerelease[Ce]=="number"&&(this.prerelease[Ce]++,Ce=-2);Ce===-1&&this.prerelease.push(0)}ae&&(this.prerelease[0]===ae?isNaN(this.prerelease[1])&&(this.prerelease=[ae,0]):this.prerelease=[ae,0]);break;default:throw new Error("invalid increment argument: "+Q)}return this.format(),this.raw=this.version,this},o.inc=function(Q,ae,Ce,ue){typeof Ce=="string"&&(ue=Ce,Ce=void 0);try{return new m(Q,Ce).inc(ae,ue).version}catch(je){return null}},o.diff=function(Q,ae){if(pe(Q,ae))return null;var Ce=ne(Q),ue=ne(ae),je="";if(Ce.prerelease.length||ue.prerelease.length){je="pre";var ct="prerelease"}for(var At in Ce)if((At==="major"||At==="minor"||At==="patch")&&Ce[At]!==ue[At])return je+At;return ct},o.compareIdentifiers=Se;var we=/^[0-9]+$/;function Se(Q,ae){var Ce=we.test(Q),ue=we.test(ae);return Ce&&ue&&(Q=+Q,ae=+ae),Q===ae?0:Ce&&!ue?-1:ue&&!Ce?1:Q0}function ze(Q,ae,Ce){return he(Q,ae,Ce)<0}function pe(Q,ae,Ce){return he(Q,ae,Ce)===0}function Oe(Q,ae,Ce){return he(Q,ae,Ce)!==0}function le(Q,ae,Ce){return he(Q,ae,Ce)>=0}function Ue(Q,ae,Ce){return he(Q,ae,Ce)<=0}function Ge(Q,ae,Ce,ue){switch(ae){case"===":return E(Q)==="object"&&(Q=Q.version),E(Ce)==="object"&&(Ce=Ce.version),Q===Ce;case"!==":return E(Q)==="object"&&(Q=Q.version),E(Ce)==="object"&&(Ce=Ce.version),Q!==Ce;case"":case"=":case"==":return pe(Q,Ce,ue);case"!=":return Oe(Q,Ce,ue);case">":return ge(Q,Ce,ue);case">=":return le(Q,Ce,ue);case"<":return ze(Q,Ce,ue);case"<=":return Ue(Q,Ce,ue);default:throw new TypeError("Invalid operator: "+ae)}}function rt(Q,ae){if(ae&&E(ae)==="object"||(ae={loose:!!ae,includePrerelease:!1}),Q instanceof rt){if(Q.loose===!!ae.loose)return Q;Q=Q.value}if(!(this instanceof rt))return new rt(Q,ae);t("comparator",Q,ae),this.options=ae,this.loose=!!ae.loose,this.parse(Q),this.semver===wt?this.value="":this.value=this.operator+this.semver.version,t("comp",this)}o.rcompareIdentifiers=function(Q,ae){return Se(ae,Q)},o.major=function(Q,ae){return new m(Q,ae).major},o.minor=function(Q,ae){return new m(Q,ae).minor},o.patch=function(Q,ae){return new m(Q,ae).patch},o.compare=he,o.compareLoose=function(Q,ae){return he(Q,ae,!0)},o.compareBuild=function(Q,ae,Ce){var ue=new m(Q,Ce),je=new m(ae,Ce);return ue.compare(je)||ue.compareBuild(je)},o.rcompare=function(Q,ae,Ce){return he(ae,Q,Ce)},o.sort=function(Q,ae){return Q.sort(function(Ce,ue){return o.compareBuild(Ce,ue,ae)})},o.rsort=function(Q,ae){return Q.sort(function(Ce,ue){return o.compareBuild(ue,Ce,ae)})},o.gt=ge,o.lt=ze,o.eq=pe,o.neq=Oe,o.gte=le,o.lte=Ue,o.cmp=Ge,o.Comparator=rt;var wt={};function xt(Q,ae){if(ae&&E(ae)==="object"||(ae={loose:!!ae,includePrerelease:!1}),Q instanceof xt)return Q.loose===!!ae.loose&&Q.includePrerelease===!!ae.includePrerelease?Q:new xt(Q.raw,ae);if(Q instanceof rt)return new xt(Q.value,ae);if(!(this instanceof xt))return new xt(Q,ae);if(this.options=ae,this.loose=!!ae.loose,this.includePrerelease=!!ae.includePrerelease,this.raw=Q,this.set=Q.split(/\s*\|\|\s*/).map(function(Ce){return this.parseRange(Ce.trim())},this).filter(function(Ce){return Ce.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+Q);this.format()}function $e(Q,ae){for(var Ce=!0,ue=Q.slice(),je=ue.pop();Ce&&ue.length;)Ce=ue.every(function(ct){return je.intersects(ct,ae)}),je=ue.pop();return Ce}function ft(Q){return!Q||Q.toLowerCase()==="x"||Q==="*"}function Ke(Q,ae,Ce,ue,je,ct,At,en,ln,An,nr,un,Wt){return((ae=ft(Ce)?"":ft(ue)?">="+Ce+".0.0":ft(je)?">="+Ce+"."+ue+".0":">="+ae)+" "+(en=ft(ln)?"":ft(An)?"<"+(+ln+1)+".0.0":ft(nr)?"<"+ln+"."+(+An+1)+".0":un?"<="+ln+"."+An+"."+nr+"-"+un:"<="+en)).trim()}function jt(Q,ae,Ce){for(var ue=0;ue0){var je=Q[ue].semver;if(je.major===ae.major&&je.minor===ae.minor&&je.patch===ae.patch)return!0}return!1}return!0}function $t(Q,ae,Ce){try{ae=new xt(ae,Ce)}catch(ue){return!1}return ae.test(Q)}function at(Q,ae,Ce,ue){var je,ct,At,en,ln;switch(Q=new m(Q,ue),ae=new xt(ae,ue),Ce){case">":je=ge,ct=Ue,At=ze,en=">",ln=">=";break;case"<":je=ze,ct=le,At=ge,en="<",ln="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if($t(Q,ae,ue))return!1;for(var An=0;An=0.0.0")),un=un||vr,Wt=Wt||vr,je(vr.semver,un.semver,ue)?un=vr:At(vr.semver,Wt.semver,ue)&&(Wt=vr)}),un.operator===en||un.operator===ln||(!Wt.operator||Wt.operator===en)&&ct(Q,Wt.semver)||Wt.operator===ln&&At(Q,Wt.semver))return!1}return!0}rt.prototype.parse=function(Q){var ae=this.options.loose?L[C.COMPARATORLOOSE]:L[C.COMPARATOR],Ce=Q.match(ae);if(!Ce)throw new TypeError("Invalid comparator: "+Q);this.operator=Ce[1]!==void 0?Ce[1]:"",this.operator==="="&&(this.operator=""),Ce[2]?this.semver=new m(Ce[2],this.options.loose):this.semver=wt},rt.prototype.toString=function(){return this.value},rt.prototype.test=function(Q){if(t("Comparator.test",Q,this.options.loose),this.semver===wt||Q===wt)return!0;if(typeof Q=="string")try{Q=new m(Q,this.options)}catch(ae){return!1}return Ge(Q,this.operator,this.semver,this.options)},rt.prototype.intersects=function(Q,ae){if(!(Q instanceof rt))throw new TypeError("a Comparator is required");var Ce;if(ae&&E(ae)==="object"||(ae={loose:!!ae,includePrerelease:!1}),this.operator==="")return this.value===""||(Ce=new xt(Q.value,ae),$t(this.value,Ce,ae));if(Q.operator==="")return Q.value===""||(Ce=new xt(this.value,ae),$t(Q.semver,Ce,ae));var ue=!(this.operator!==">="&&this.operator!==">"||Q.operator!==">="&&Q.operator!==">"),je=!(this.operator!=="<="&&this.operator!=="<"||Q.operator!=="<="&&Q.operator!=="<"),ct=this.semver.version===Q.semver.version,At=!(this.operator!==">="&&this.operator!=="<="||Q.operator!==">="&&Q.operator!=="<="),en=Ge(this.semver,"<",Q.semver,ae)&&(this.operator===">="||this.operator===">")&&(Q.operator==="<="||Q.operator==="<"),ln=Ge(this.semver,">",Q.semver,ae)&&(this.operator==="<="||this.operator==="<")&&(Q.operator===">="||Q.operator===">");return ue||je||ct&&At||en||ln},o.Range=xt,xt.prototype.format=function(){return this.range=this.set.map(function(Q){return Q.join(" ").trim()}).join("||").trim(),this.range},xt.prototype.toString=function(){return this.range},xt.prototype.parseRange=function(Q){var ae=this.options.loose;Q=Q.trim();var Ce=ae?L[C.HYPHENRANGELOOSE]:L[C.HYPHENRANGE];Q=Q.replace(Ce,Ke),t("hyphen replace",Q),Q=Q.replace(L[C.COMPARATORTRIM],"$1$2$3"),t("comparator trim",Q,L[C.COMPARATORTRIM]),Q=(Q=(Q=Q.replace(L[C.TILDETRIM],"$1~")).replace(L[C.CARETTRIM],"$1^")).split(/\s+/).join(" ");var ue=ae?L[C.COMPARATORLOOSE]:L[C.COMPARATOR],je=Q.split(" ").map(function(ct){return function(At,en){return t("comp",At,en),At=function(ln,An){return ln.trim().split(/\s+/).map(function(nr){return function(un,Wt){t("caret",un,Wt);var vr=Wt.loose?L[C.CARETLOOSE]:L[C.CARET];return un.replace(vr,function(w,Ut,Vn,fr,Fr){var ur;return t("caret",un,w,Ut,Vn,fr,Fr),ft(Ut)?ur="":ft(Vn)?ur=">="+Ut+".0.0 <"+(+Ut+1)+".0.0":ft(fr)?ur=Ut==="0"?">="+Ut+"."+Vn+".0 <"+Ut+"."+(+Vn+1)+".0":">="+Ut+"."+Vn+".0 <"+(+Ut+1)+".0.0":Fr?(t("replaceCaret pr",Fr),ur=Ut==="0"?Vn==="0"?">="+Ut+"."+Vn+"."+fr+"-"+Fr+" <"+Ut+"."+Vn+"."+(+fr+1):">="+Ut+"."+Vn+"."+fr+"-"+Fr+" <"+Ut+"."+(+Vn+1)+".0":">="+Ut+"."+Vn+"."+fr+"-"+Fr+" <"+(+Ut+1)+".0.0"):(t("no pr"),ur=Ut==="0"?Vn==="0"?">="+Ut+"."+Vn+"."+fr+" <"+Ut+"."+Vn+"."+(+fr+1):">="+Ut+"."+Vn+"."+fr+" <"+Ut+"."+(+Vn+1)+".0":">="+Ut+"."+Vn+"."+fr+" <"+(+Ut+1)+".0.0"),t("caret return",ur),ur})}(nr,An)}).join(" ")}(At,en),t("caret",At),At=function(ln,An){return ln.trim().split(/\s+/).map(function(nr){return function(un,Wt){var vr=Wt.loose?L[C.TILDELOOSE]:L[C.TILDE];return un.replace(vr,function(w,Ut,Vn,fr,Fr){var ur;return t("tilde",un,w,Ut,Vn,fr,Fr),ft(Ut)?ur="":ft(Vn)?ur=">="+Ut+".0.0 <"+(+Ut+1)+".0.0":ft(fr)?ur=">="+Ut+"."+Vn+".0 <"+Ut+"."+(+Vn+1)+".0":Fr?(t("replaceTilde pr",Fr),ur=">="+Ut+"."+Vn+"."+fr+"-"+Fr+" <"+Ut+"."+(+Vn+1)+".0"):ur=">="+Ut+"."+Vn+"."+fr+" <"+Ut+"."+(+Vn+1)+".0",t("tilde return",ur),ur})}(nr,An)}).join(" ")}(At,en),t("tildes",At),At=function(ln,An){return t("replaceXRanges",ln,An),ln.split(/\s+/).map(function(nr){return function(un,Wt){un=un.trim();var vr=Wt.loose?L[C.XRANGELOOSE]:L[C.XRANGE];return un.replace(vr,function(w,Ut,Vn,fr,Fr,ur){t("xRange",un,w,Ut,Vn,fr,Fr,ur);var br=ft(Vn),Kt=br||ft(fr),vu=Kt||ft(Fr),a0=vu;return Ut==="="&&a0&&(Ut=""),ur=Wt.includePrerelease?"-0":"",br?w=Ut===">"||Ut==="<"?"<0.0.0-0":"*":Ut&&a0?(Kt&&(fr=0),Fr=0,Ut===">"?(Ut=">=",Kt?(Vn=+Vn+1,fr=0,Fr=0):(fr=+fr+1,Fr=0)):Ut==="<="&&(Ut="<",Kt?Vn=+Vn+1:fr=+fr+1),w=Ut+Vn+"."+fr+"."+Fr+ur):Kt?w=">="+Vn+".0.0"+ur+" <"+(+Vn+1)+".0.0"+ur:vu&&(w=">="+Vn+"."+fr+".0"+ur+" <"+Vn+"."+(+fr+1)+".0"+ur),t("xRange return",w),w})}(nr,An)}).join(" ")}(At,en),t("xrange",At),At=function(ln,An){return t("replaceStars",ln,An),ln.trim().replace(L[C.STAR],"")}(At,en),t("stars",At),At}(ct,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(je=je.filter(function(ct){return!!ct.match(ue)})),je=je.map(function(ct){return new rt(ct,this.options)},this)},xt.prototype.intersects=function(Q,ae){if(!(Q instanceof xt))throw new TypeError("a Range is required");return this.set.some(function(Ce){return $e(Ce,ae)&&Q.set.some(function(ue){return $e(ue,ae)&&Ce.every(function(je){return ue.every(function(ct){return je.intersects(ct,ae)})})})})},o.toComparators=function(Q,ae){return new xt(Q,ae).set.map(function(Ce){return Ce.map(function(ue){return ue.value}).join(" ").trim().split(" ")})},xt.prototype.test=function(Q){if(!Q)return!1;if(typeof Q=="string")try{Q=new m(Q,this.options)}catch(Ce){return!1}for(var ae=0;ae":ct.prerelease.length===0?ct.patch++:ct.prerelease.push(0),ct.raw=ct.format();case"":case">=":Ce&&!ge(Ce,ct)||(Ce=ct);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+je.operator)}});return Ce&&Q.test(Ce)?Ce:null},o.validRange=function(Q,ae){try{return new xt(Q,ae).range||"*"}catch(Ce){return null}},o.ltr=function(Q,ae,Ce){return at(Q,ae,"<",Ce)},o.gtr=function(Q,ae,Ce){return at(Q,ae,">",Ce)},o.outside=at,o.prerelease=function(Q,ae){var Ce=ne(Q,ae);return Ce&&Ce.prerelease.length?Ce.prerelease:null},o.intersects=function(Q,ae,Ce){return Q=new xt(Q,Ce),ae=new xt(ae,Ce),Q.intersects(ae)},o.coerce=function(Q,ae){if(Q instanceof m)return Q;if(typeof Q=="number"&&(Q=String(Q)),typeof Q!="string")return null;var Ce=null;if((ae=ae||{}).rtl){for(var ue;(ue=L[C.COERCERTL].exec(Q))&&(!Ce||Ce.index+Ce[0].length!==Q.length);)Ce&&ue.index+ue[0].length===Ce.index+Ce[0].length||(Ce=ue),L[C.COERCERTL].lastIndex=ue.index+ue[1].length+ue[2].length;L[C.COERCERTL].lastIndex=-1}else Ce=Q.match(L[C.COERCE]);return Ce===null?null:ne(Ce[2]+"."+(Ce[3]||"0")+"."+(Ce[4]||"0"),ae)}}).call(this,f(5))},function(i,o){function f(E){return(f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(E)}var p;p=function(){return this}();try{p=p||new Function("return this")()}catch(E){(typeof window=="undefined"?"undefined":f(window))==="object"&&(p=window)}i.exports=p},function(i,o){var f,p,E=i.exports={};function t(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}function L(Se){if(f===setTimeout)return setTimeout(Se,0);if((f===t||!f)&&setTimeout)return f=setTimeout,setTimeout(Se,0);try{return f(Se,0)}catch(he){try{return f.call(null,Se,0)}catch(ge){return f.call(this,Se,0)}}}(function(){try{f=typeof setTimeout=="function"?setTimeout:t}catch(Se){f=t}try{p=typeof clearTimeout=="function"?clearTimeout:k}catch(Se){p=k}})();var N,C=[],U=!1,q=-1;function W(){U&&N&&(U=!1,N.length?C=N.concat(C):q=-1,C.length&&ne())}function ne(){if(!U){var Se=L(W);U=!0;for(var he=C.length;he;){for(N=C,C=[];++q1)for(var ge=1;gethis[k])return Oe(this,this[m].get($e)),!1;var at=this[m].get($e).value;return this[q]&&(this[W]||this[q]($e,at.value)),at.now=jt,at.maxAge=Ke,at.value=ft,this[L]+=$t-at.length,at.length=$t,this.get($e),pe(this),!0}var Q=new le($e,ft,$t,jt,Ke);return Q.length>this[k]?(this[q]&&this[q]($e,ft),!1):(this[L]+=Q.length,this[ne].unshift(Q),this[m].set($e,this[ne].head),pe(this),!0)}},{key:"has",value:function($e){if(!this[m].has($e))return!1;var ft=this[m].get($e).value;return!ze(this,ft)}},{key:"get",value:function($e){return ge(this,$e,!0)}},{key:"peek",value:function($e){return ge(this,$e,!1)}},{key:"pop",value:function(){var $e=this[ne].tail;return $e?(Oe(this,$e),$e.value):null}},{key:"del",value:function($e){Oe(this,this[m].get($e))}},{key:"load",value:function($e){this.reset();for(var ft=Date.now(),Ke=$e.length-1;Ke>=0;Ke--){var jt=$e[Ke],$t=jt.e||0;if($t===0)this.set(jt.k,jt.v);else{var at=$t-ft;at>0&&this.set(jt.k,jt.v,at)}}}},{key:"prune",value:function(){var $e=this;this[m].forEach(function(ft,Ke){return ge($e,Ke,!1)})}},{key:"max",set:function($e){if(typeof $e!="number"||$e<0)throw new TypeError("max must be a non-negative number");this[k]=$e||1/0,pe(this)},get:function(){return this[k]}},{key:"allowStale",set:function($e){this[C]=!!$e},get:function(){return this[C]}},{key:"maxAge",set:function($e){if(typeof $e!="number")throw new TypeError("maxAge must be a non-negative number");this[U]=$e,pe(this)},get:function(){return this[U]}},{key:"lengthCalculator",set:function($e){var ft=this;typeof $e!="function"&&($e=Se),$e!==this[N]&&(this[N]=$e,this[L]=0,this[ne].forEach(function(Ke){Ke.length=ft[N](Ke.value,Ke.key),ft[L]+=Ke.length})),pe(this)},get:function(){return this[N]}},{key:"length",get:function(){return this[L]}},{key:"itemCount",get:function(){return this[ne].length}}])&&E(rt.prototype,wt),xt&&E(rt,xt),Ge}(),ge=function(Ge,rt,wt){var xt=Ge[m].get(rt);if(xt){var $e=xt.value;if(ze(Ge,$e)){if(Oe(Ge,xt),!Ge[C])return}else wt&&(Ge[we]&&(xt.value.now=Date.now()),Ge[ne].unshiftNode(xt));return $e.value}},ze=function(Ge,rt){if(!rt||!rt.maxAge&&!Ge[U])return!1;var wt=Date.now()-rt.now;return rt.maxAge?wt>rt.maxAge:Ge[U]&&wt>Ge[U]},pe=function(Ge){if(Ge[L]>Ge[k])for(var rt=Ge[ne].tail;Ge[L]>Ge[k]&&rt!==null;){var wt=rt.prev;Oe(Ge,rt),rt=wt}},Oe=function(Ge,rt){if(rt){var wt=rt.value;Ge[q]&&Ge[q](wt.key,wt.value),Ge[L]-=wt.length,Ge[m].delete(wt.key),Ge[ne].removeNode(rt)}},le=function Ge(rt,wt,xt,$e,ft){p(this,Ge),this.key=rt,this.value=wt,this.length=xt,this.now=$e,this.maxAge=ft||0},Ue=function(Ge,rt,wt,xt){var $e=wt.value;ze(Ge,$e)&&(Oe(Ge,wt),Ge[C]||($e=void 0)),$e&&rt.call(xt,$e.value,$e.key,Ge)};i.exports=he},function(i,o,f){(function(p){function E(t){return(E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(t)}i.exports=function(){if(typeof document=="undefined"||!document.addEventListener)return null;var t,k,L,N={};return N.copy=function(){var C=!1,U=null,q=!1;function W(){C=!1,U=null,q&&window.getSelection().removeAllRanges(),q=!1}return document.addEventListener("copy",function(ne){if(C){for(var m in U)ne.clipboardData.setData(m,U[m]);ne.preventDefault()}}),function(ne){return new Promise(function(m,we){C=!0,typeof ne=="string"?U={"text/plain":ne}:ne instanceof Node?U={"text/html":new XMLSerializer().serializeToString(ne)}:ne instanceof Object?U=ne:we("Invalid data type. Must be string, DOM node, or an object mapping MIME types to strings."),function Se(he){try{if(document.execCommand("copy"))W(),m();else{if(he)throw W(),new Error("Unable to copy. Perhaps it's not available in your browser?");(function(){var ge=document.getSelection();if(!document.queryCommandEnabled("copy")&&ge.isCollapsed){var ze=document.createRange();ze.selectNodeContents(document.body),ge.removeAllRanges(),ge.addRange(ze),q=!0}})(),Se(!0)}}catch(ge){W(),we(ge)}}(!1)})}}(),N.paste=(L=!1,document.addEventListener("paste",function(C){if(L){L=!1,C.preventDefault();var U=t;t=null,U(C.clipboardData.getData(k))}}),function(C){return new Promise(function(U,q){L=!0,t=U,k=C||"text/plain";try{document.execCommand("paste")||(L=!1,q(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")))}catch(W){L=!1,q(new Error(W))}})}),typeof ClipboardEvent=="undefined"&&window.clipboardData!==void 0&&window.clipboardData.setData!==void 0&&(function(C){function U(pe,Oe){return function(){pe.apply(Oe,arguments)}}function q(pe){if(E(this)!="object")throw new TypeError("Promises must be constructed via new");if(typeof pe!="function")throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],he(pe,U(ne,this),U(m,this))}function W(pe){var Oe=this;return this._state===null?void this._deferreds.push(pe):void ge(function(){var le=Oe._state?pe.onFulfilled:pe.onRejected;if(le!==null){var Ue;try{Ue=le(Oe._value)}catch(Ge){return void pe.reject(Ge)}pe.resolve(Ue)}else(Oe._state?pe.resolve:pe.reject)(Oe._value)})}function ne(pe){try{if(pe===this)throw new TypeError("A promise cannot be resolved with itself.");if(pe&&(E(pe)=="object"||typeof pe=="function")){var Oe=pe.then;if(typeof Oe=="function")return void he(U(Oe,pe),U(ne,this),U(m,this))}this._state=!0,this._value=pe,we.call(this)}catch(le){m.call(this,le)}}function m(pe){this._state=!1,this._value=pe,we.call(this)}function we(){for(var pe=0,Oe=this._deferreds.length;Oe>pe;pe++)W.call(this,this._deferreds[pe]);this._deferreds=null}function Se(pe,Oe,le,Ue){this.onFulfilled=typeof pe=="function"?pe:null,this.onRejected=typeof Oe=="function"?Oe:null,this.resolve=le,this.reject=Ue}function he(pe,Oe,le){var Ue=!1;try{pe(function(Ge){Ue||(Ue=!0,Oe(Ge))},function(Ge){Ue||(Ue=!0,le(Ge))})}catch(Ge){if(Ue)return;Ue=!0,le(Ge)}}var ge=q.immediateFn||typeof p=="function"&&p||function(pe){setTimeout(pe,1)},ze=Array.isArray||function(pe){return Object.prototype.toString.call(pe)==="[object Array]"};q.prototype.catch=function(pe){return this.then(null,pe)},q.prototype.then=function(pe,Oe){var le=this;return new q(function(Ue,Ge){W.call(le,new Se(pe,Oe,Ue,Ge))})},q.all=function(){var pe=Array.prototype.slice.call(arguments.length===1&&ze(arguments[0])?arguments[0]:arguments);return new q(function(Oe,le){function Ue(wt,xt){try{if(xt&&(E(xt)=="object"||typeof xt=="function")){var $e=xt.then;if(typeof $e=="function")return void $e.call(xt,function(ft){Ue(wt,ft)},le)}pe[wt]=xt,--Ge==0&&Oe(pe)}catch(ft){le(ft)}}if(pe.length===0)return Oe([]);for(var Ge=pe.length,rt=0;rtUe;Ue++)pe[Ue].then(Oe,le)})},i.exports?i.exports=q:C.Promise||(C.Promise=q)}(this),N.copy=function(C){return new Promise(function(U,q){if(typeof C!="string"&&!("text/plain"in C))throw new Error("You must provide a text/plain type.");var W=typeof C=="string"?C:C["text/plain"];window.clipboardData.setData("Text",W)?U():q(new Error("Copying was rejected."))})},N.paste=function(){return new Promise(function(C,U){var q=window.clipboardData.getData("Text");q?C(q):U(new Error("Pasting was rejected."))})}),N}()}).call(this,f(13).setImmediate)},function(i,o,f){"use strict";i.exports=f(15)},function(i,o,f){"use strict";f.r(o),o.default=`:root { - /** - * IMPORTANT: When new theme variables are added below\u2013 also add them to SettingsContext updateThemeVariables() - */ - - /* Light theme */ - --light-color-attribute-name: #ef6632; - --light-color-attribute-name-not-editable: #23272f; - --light-color-attribute-name-inverted: rgba(255, 255, 255, 0.7); - --light-color-attribute-value: #1a1aa6; - --light-color-attribute-value-inverted: #ffffff; - --light-color-attribute-editable-value: #1a1aa6; - --light-color-background: #ffffff; - --light-color-background-hover: rgba(0, 136, 250, 0.1); - --light-color-background-inactive: #e5e5e5; - --light-color-background-invalid: #fff0f0; - --light-color-background-selected: #0088fa; - --light-color-button-background: #ffffff; - --light-color-button-background-focus: #ededed; - --light-color-button: #5f6673; - --light-color-button-disabled: #cfd1d5; - --light-color-button-active: #0088fa; - --light-color-button-focus: #23272f; - --light-color-button-hover: #23272f; - --light-color-border: #eeeeee; - --light-color-commit-did-not-render-fill: #cfd1d5; - --light-color-commit-did-not-render-fill-text: #000000; - --light-color-commit-did-not-render-pattern: #cfd1d5; - --light-color-commit-did-not-render-pattern-text: #333333; - --light-color-commit-gradient-0: #37afa9; - --light-color-commit-gradient-1: #63b19e; - --light-color-commit-gradient-2: #80b393; - --light-color-commit-gradient-3: #97b488; - --light-color-commit-gradient-4: #abb67d; - --light-color-commit-gradient-5: #beb771; - --light-color-commit-gradient-6: #cfb965; - --light-color-commit-gradient-7: #dfba57; - --light-color-commit-gradient-8: #efbb49; - --light-color-commit-gradient-9: #febc38; - --light-color-commit-gradient-text: #000000; - --light-color-component-name: #6a51b2; - --light-color-component-name-inverted: #ffffff; - --light-color-component-badge-background: rgba(0, 0, 0, 0.1); - --light-color-component-badge-background-inverted: rgba(255, 255, 255, 0.25); - --light-color-component-badge-count: #777d88; - --light-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --light-color-context-background: rgba(0,0,0,.9); - --light-color-context-background-hover: rgba(255, 255, 255, 0.1); - --light-color-context-background-selected: #178fb9; - --light-color-context-border: #3d424a; - --light-color-context-text: #ffffff; - --light-color-context-text-selected: #ffffff; - --light-color-dim: #777d88; - --light-color-dimmer: #cfd1d5; - --light-color-dimmest: #eff0f1; - --light-color-error-background: hsl(0, 100%, 97%); - --light-color-error-border: hsl(0, 100%, 92%); - --light-color-error-text: #ff0000; - --light-color-expand-collapse-toggle: #777d88; - --light-color-link: #0000ff; - --light-color-modal-background: rgba(255, 255, 255, 0.75); - --light-color-record-active: #fc3a4b; - --light-color-record-hover: #3578e5; - --light-color-record-inactive: #0088fa; - --light-color-scroll-thumb: #c2c2c2; - --light-color-scroll-track: #fafafa; - --light-color-search-match: yellow; - --light-color-search-match-current: #f7923b; - --light-color-selected-tree-highlight-active: rgba(0, 136, 250, 0.1); - --light-color-selected-tree-highlight-inactive: rgba(0, 0, 0, 0.05); - --light-color-shadow: rgba(0, 0, 0, 0.25); - --light-color-tab-selected-border: #0088fa; - --light-color-text: #000000; - --light-color-text-invalid: #ff0000; - --light-color-text-selected: #ffffff; - --light-color-toggle-background-invalid: #fc3a4b; - --light-color-toggle-background-on: #0088fa; - --light-color-toggle-background-off: #cfd1d5; - --light-color-toggle-text: #ffffff; - --light-color-tooltip-background: rgba(0, 0, 0, 0.9); - --light-color-tooltip-text: #ffffff; - - /* Dark theme */ - --dark-color-attribute-name: #9d87d2; - --dark-color-attribute-name-not-editable: #ededed; - --dark-color-attribute-name-inverted: #282828; - --dark-color-attribute-value: #cedae0; - --dark-color-attribute-value-inverted: #ffffff; - --dark-color-attribute-editable-value: yellow; - --dark-color-background: #282c34; - --dark-color-background-hover: rgba(255, 255, 255, 0.1); - --dark-color-background-inactive: #3d424a; - --dark-color-background-invalid: #5c0000; - --dark-color-background-selected: #178fb9; - --dark-color-button-background: #282c34; - --dark-color-button-background-focus: #3d424a; - --dark-color-button: #afb3b9; - --dark-color-button-active: #61dafb; - --dark-color-button-disabled: #4f5766; - --dark-color-button-focus: #a2e9fc; - --dark-color-button-hover: #ededed; - --dark-color-border: #3d424a; - --dark-color-commit-did-not-render-fill: #777d88; - --dark-color-commit-did-not-render-fill-text: #000000; - --dark-color-commit-did-not-render-pattern: #666c77; - --dark-color-commit-did-not-render-pattern-text: #ffffff; - --dark-color-commit-gradient-0: #37afa9; - --dark-color-commit-gradient-1: #63b19e; - --dark-color-commit-gradient-2: #80b393; - --dark-color-commit-gradient-3: #97b488; - --dark-color-commit-gradient-4: #abb67d; - --dark-color-commit-gradient-5: #beb771; - --dark-color-commit-gradient-6: #cfb965; - --dark-color-commit-gradient-7: #dfba57; - --dark-color-commit-gradient-8: #efbb49; - --dark-color-commit-gradient-9: #febc38; - --dark-color-commit-gradient-text: #000000; - --dark-color-component-name: #61dafb; - --dark-color-component-name-inverted: #282828; - --dark-color-component-badge-background: rgba(255, 255, 255, 0.25); - --dark-color-component-badge-background-inverted: rgba(0, 0, 0, 0.25); - --dark-color-component-badge-count: #8f949d; - --dark-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --dark-color-context-background: rgba(255,255,255,.9); - --dark-color-context-background-hover: rgba(0, 136, 250, 0.1); - --dark-color-context-background-selected: #0088fa; - --dark-color-context-border: #eeeeee; - --dark-color-context-text: #000000; - --dark-color-context-text-selected: #ffffff; - --dark-color-dim: #8f949d; - --dark-color-dimmer: #777d88; - --dark-color-dimmest: #4f5766; - --dark-color-error-background: #200; - --dark-color-error-border: #900; - --dark-color-error-text: #f55; - --dark-color-expand-collapse-toggle: #8f949d; - --dark-color-link: #61dafb; - --dark-color-modal-background: rgba(0, 0, 0, 0.75); - --dark-color-record-active: #fc3a4b; - --dark-color-record-hover: #a2e9fc; - --dark-color-record-inactive: #61dafb; - --dark-color-scroll-thumb: #afb3b9; - --dark-color-scroll-track: #313640; - --dark-color-search-match: yellow; - --dark-color-search-match-current: #f7923b; - --dark-color-selected-tree-highlight-active: rgba(23, 143, 185, 0.15); - --dark-color-selected-tree-highlight-inactive: rgba(255, 255, 255, 0.05); - --dark-color-shadow: rgba(0, 0, 0, 0.5); - --dark-color-tab-selected-border: #178fb9; - --dark-color-text: #ffffff; - --dark-color-text-invalid: #ff8080; - --dark-color-text-selected: #ffffff; - --dark-color-toggle-background-invalid: #fc3a4b; - --dark-color-toggle-background-on: #178fb9; - --dark-color-toggle-background-off: #777d88; - --dark-color-toggle-text: #ffffff; - --dark-color-tooltip-background: rgba(255, 255, 255, 0.9); - --dark-color-tooltip-text: #000000; - - /* Font smoothing */ - --light-font-smoothing: auto; - --dark-font-smoothing: antialiased; - --font-smoothing: auto; - - /* Compact density */ - --compact-font-size-monospace-small: 9px; - --compact-font-size-monospace-normal: 11px; - --compact-font-size-monospace-large: 15px; - --compact-font-size-sans-small: 10px; - --compact-font-size-sans-normal: 12px; - --compact-font-size-sans-large: 14px; - --compact-line-height-data: 18px; - --compact-root-font-size: 16px; - - /* Comfortable density */ - --comfortable-font-size-monospace-small: 10px; - --comfortable-font-size-monospace-normal: 13px; - --comfortable-font-size-monospace-large: 17px; - --comfortable-font-size-sans-small: 12px; - --comfortable-font-size-sans-normal: 14px; - --comfortable-font-size-sans-large: 16px; - --comfortable-line-height-data: 22px; - --comfortable-root-font-size: 20px; - - /* GitHub.com system fonts */ - --font-family-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, - Courier, monospace; - --font-family-sans: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, - Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; - - /* Constant values shared between JS and CSS */ - --interaction-commit-size: 10px; - --interaction-label-width: 200px; -} -`},function(i,o,f){"use strict";function p(N){var C=this;if(C instanceof p||(C=new p),C.tail=null,C.head=null,C.length=0,N&&typeof N.forEach=="function")N.forEach(function(W){C.push(W)});else if(arguments.length>0)for(var U=0,q=arguments.length;U1)U=C;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");q=this.head.next,U=this.head.value}for(var W=0;q!==null;W++)U=N(U,q.value,W),q=q.next;return U},p.prototype.reduceReverse=function(N,C){var U,q=this.tail;if(arguments.length>1)U=C;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");q=this.tail.prev,U=this.tail.value}for(var W=this.length-1;q!==null;W--)U=N(U,q.value,W),q=q.prev;return U},p.prototype.toArray=function(){for(var N=new Array(this.length),C=0,U=this.head;U!==null;C++)N[C]=U.value,U=U.next;return N},p.prototype.toArrayReverse=function(){for(var N=new Array(this.length),C=0,U=this.tail;U!==null;C++)N[C]=U.value,U=U.prev;return N},p.prototype.slice=function(N,C){(C=C||this.length)<0&&(C+=this.length),(N=N||0)<0&&(N+=this.length);var U=new p;if(Cthis.length&&(C=this.length);for(var q=0,W=this.head;W!==null&&qthis.length&&(C=this.length);for(var q=this.length,W=this.tail;W!==null&&q>C;q--)W=W.prev;for(;W!==null&&q>N;q--,W=W.prev)U.push(W.value);return U},p.prototype.splice=function(N,C){N>this.length&&(N=this.length-1),N<0&&(N=this.length+N);for(var U=0,q=this.head;q!==null&&U=0&&(L._idleTimeoutId=setTimeout(function(){L._onTimeout&&L._onTimeout()},N))},f(14),o.setImmediate=typeof self!="undefined"&&self.setImmediate||p!==void 0&&p.setImmediate||this&&this.setImmediate,o.clearImmediate=typeof self!="undefined"&&self.clearImmediate||p!==void 0&&p.clearImmediate||this&&this.clearImmediate}).call(this,f(4))},function(i,o,f){(function(p,E){(function(t,k){"use strict";if(!t.setImmediate){var L,N,C,U,q,W=1,ne={},m=!1,we=t.document,Se=Object.getPrototypeOf&&Object.getPrototypeOf(t);Se=Se&&Se.setTimeout?Se:t,{}.toString.call(t.process)==="[object process]"?L=function(ze){E.nextTick(function(){ge(ze)})}:function(){if(t.postMessage&&!t.importScripts){var ze=!0,pe=t.onmessage;return t.onmessage=function(){ze=!1},t.postMessage("","*"),t.onmessage=pe,ze}}()?(U="setImmediate$"+Math.random()+"$",q=function(ze){ze.source===t&&typeof ze.data=="string"&&ze.data.indexOf(U)===0&&ge(+ze.data.slice(U.length))},t.addEventListener?t.addEventListener("message",q,!1):t.attachEvent("onmessage",q),L=function(ze){t.postMessage(U+ze,"*")}):t.MessageChannel?((C=new MessageChannel).port1.onmessage=function(ze){ge(ze.data)},L=function(ze){C.port2.postMessage(ze)}):we&&"onreadystatechange"in we.createElement("script")?(N=we.documentElement,L=function(ze){var pe=we.createElement("script");pe.onreadystatechange=function(){ge(ze),pe.onreadystatechange=null,N.removeChild(pe),pe=null},N.appendChild(pe)}):L=function(ze){setTimeout(ge,0,ze)},Se.setImmediate=function(ze){typeof ze!="function"&&(ze=new Function(""+ze));for(var pe=new Array(arguments.length-1),Oe=0;Oeae;ae++)if((Q=he(at,jt,ae))!==-1){Se=ae,jt=Q;break e}jt=-1}}e:{if(at=$t,(Q=W().get(Ke.primitive))!==void 0){for(ae=0;aejt-at?null:$t.slice(at,jt-1))!==null){if(jt=0,rt!==null){for(;jt<$t.length&&jtjt;rt--)wt=$e.pop()}for(rt=$t.length-jt-1;1<=rt;rt--)jt=[],wt.push({id:null,isStateEditable:!1,name:ze($t[rt-1].functionName),value:void 0,subHooks:jt}),$e.push(wt),wt=jt;rt=$t}jt=($t=Ke.primitive)==="Context"||$t==="DebugValue"?null:xt++,wt.push({id:jt,isStateEditable:$t==="Reducer"||$t==="State",name:$t,value:Ke.value,subHooks:[]})}return function Ce(ue,je){for(var ct=[],At=0;At-1&&(ne=ne.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var m=ne.replace(/^\s+/,"").replace(/\(eval code/g,"("),we=m.match(/ (\((.+):(\d+):(\d+)\)$)/),Se=(m=we?m.replace(we[0],""):m).split(/\s+/).slice(1),he=this.extractLocation(we?we[1]:Se.pop()),ge=Se.join(" ")||void 0,ze=["eval",""].indexOf(he[0])>-1?void 0:he[0];return new N({functionName:ge,fileName:ze,lineNumber:he[1],columnNumber:he[2],source:ne})},this)},parseFFOrSafari:function(W){return W.stack.split(` -`).filter(function(ne){return!ne.match(q)},this).map(function(ne){if(ne.indexOf(" > eval")>-1&&(ne=ne.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),ne.indexOf("@")===-1&&ne.indexOf(":")===-1)return new N({functionName:ne});var m=/((.*".+"[^@]*)?[^@]*)(?:@)/,we=ne.match(m),Se=we&&we[1]?we[1]:void 0,he=this.extractLocation(ne.replace(m,""));return new N({functionName:Se,fileName:he[0],lineNumber:he[1],columnNumber:he[2],source:ne})},this)},parseOpera:function(W){return!W.stacktrace||W.message.indexOf(` -`)>-1&&W.message.split(` -`).length>W.stacktrace.split(` -`).length?this.parseOpera9(W):W.stack?this.parseOpera11(W):this.parseOpera10(W)},parseOpera9:function(W){for(var ne=/Line (\d+).*script (?:in )?(\S+)/i,m=W.message.split(` -`),we=[],Se=2,he=m.length;Se/,"$2").replace(/\([^)]*\)/g,"")||void 0;he.match(/\(([^)]*)\)/)&&(m=he.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var ze=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new N({functionName:ge,args:ze,fileName:Se[0],lineNumber:Se[1],columnNumber:Se[2],source:ne})},this)}}})=="function"?p.apply(o,E):p)===void 0||(i.exports=t)})()},function(i,o,f){var p,E,t;(function(k,L){"use strict";E=[],(t=typeof(p=function(){function N(ge){return ge.charAt(0).toUpperCase()+ge.substring(1)}function C(ge){return function(){return this[ge]}}var U=["isConstructor","isEval","isNative","isToplevel"],q=["columnNumber","lineNumber"],W=["fileName","functionName","source"],ne=U.concat(q,W,["args"]);function m(ge){if(ge)for(var ze=0;ze1?xe-1:0),ke=1;ke=0&&xe.splice(Z,1)}}}])&&p(z.prototype,G),$&&p(z,$),B}(),t=f(2),k=f.n(t);try{var L=f(9).default,N=function(B){var z=new RegExp("".concat(B,": ([0-9]+)")),G=L.match(z);return parseInt(G[1],10)};N("comfortable-line-height-data"),N("compact-line-height-data")}catch(B){}function C(B){try{return sessionStorage.getItem(B)}catch(z){return null}}function U(B){try{sessionStorage.removeItem(B)}catch(z){}}function q(B,z){try{return sessionStorage.setItem(B,z)}catch(G){}}var W=function(B,z){return B===z},ne=f(1),m=f.n(ne);function we(B){return B.ownerDocument?B.ownerDocument.defaultView:null}function Se(B){var z=we(B);return z?z.frameElement:null}function he(B){var z=pe(B);return ge([B.getBoundingClientRect(),{top:z.borderTop,left:z.borderLeft,bottom:z.borderBottom,right:z.borderRight,width:0,height:0}])}function ge(B){return B.reduce(function(z,G){return z==null?G:{top:z.top+G.top,left:z.left+G.left,width:z.width,height:z.height,bottom:z.bottom+G.bottom,right:z.right+G.right}})}function ze(B,z){var G=Se(B);if(G&&G!==z){for(var $=[B.getBoundingClientRect()],De=G,me=!1;De;){var xe=he(De);if($.push(xe),De=Se(De),me)break;De&&we(De)===z&&(me=!0)}return ge($)}return B.getBoundingClientRect()}function pe(B){var z=window.getComputedStyle(B);return{borderLeft:parseInt(z.borderLeftWidth,10),borderRight:parseInt(z.borderRightWidth,10),borderTop:parseInt(z.borderTopWidth,10),borderBottom:parseInt(z.borderBottomWidth,10),marginLeft:parseInt(z.marginLeft,10),marginRight:parseInt(z.marginRight,10),marginTop:parseInt(z.marginTop,10),marginBottom:parseInt(z.marginBottom,10),paddingLeft:parseInt(z.paddingLeft,10),paddingRight:parseInt(z.paddingRight,10),paddingTop:parseInt(z.paddingTop,10),paddingBottom:parseInt(z.paddingBottom,10)}}function Oe(B,z){var G;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(G=function(ke,Xe){if(!!ke){if(typeof ke=="string")return le(ke,Xe);var ht=Object.prototype.toString.call(ke).slice(8,-1);if(ht==="Object"&&ke.constructor&&(ht=ke.constructor.name),ht==="Map"||ht==="Set")return Array.from(ke);if(ht==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ht))return le(ke,Xe)}}(B))||z&&B&&typeof B.length=="number"){G&&(B=G);var $=0,De=function(){};return{s:De,n:function(){return $>=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:De}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var me,xe=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return xe=ke.done,ke},e:function(ke){Z=!0,me=ke},f:function(){try{xe||G.return==null||G.return()}finally{if(Z)throw me}}}}function le(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);Gxe.left+xe.width&&(ie=xe.left+xe.width-ht-5),{style:{top:ke+="px",left:ie+="px"}}}(z,G,{width:$.width,height:$.height});m()(this.tip.style,De.style)}}]),B}(),$e=function(){function B(){Ue(this,B);var z=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.window=z;var G=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.tipBoundsWindow=G;var $=z.document;this.container=$.createElement("div"),this.container.style.zIndex="10000000",this.tip=new xt($,this.container),this.rects=[],$.body.appendChild(this.container)}return rt(B,[{key:"remove",value:function(){this.tip.remove(),this.rects.forEach(function(z){z.remove()}),this.rects.length=0,this.container.parentNode&&this.container.parentNode.removeChild(this.container)}},{key:"inspect",value:function(z,G){for(var $=this,De=z.filter(function(Tt){return Tt.nodeType===Node.ELEMENT_NODE});this.rects.length>De.length;)this.rects.pop().remove();if(De.length!==0){for(;this.rects.length1&&arguments[1]!==void 0?arguments[1]:W,tt=void 0,Tt=[],kt=void 0,bt=!1,on=function(Lt,gn){return qe(Lt,Tt[gn])},tn=function(){for(var Lt=arguments.length,gn=Array(Lt),lr=0;lr5&&arguments[5]!==void 0?arguments[5]:0,Z=Co(B);switch(Z){case"html_element":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B.tagName,type:Z};case"function":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:typeof B.name!="function"&&B.name?B.name:"function",type:Z};case"string":return B.length<=500?B:B.slice(0,500)+"...";case"bigint":case"symbol":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B.toString(),type:Z};case"react_element":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:L0(B)||"Unknown",type:Z};case"array_buffer":case"data_view":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:Z==="data_view"?"DataView":"ArrayBuffer",size:B.byteLength,type:Z};case"array":return me=De($),xe>=2&&!me?a0(Z,!0,B,z,$):B.map(function(ht,ie){return So(ht,z,G,$.concat([ie]),De,me?1:xe+1)});case"html_all_collection":case"typed_array":case"iterator":if(me=De($),xe>=2&&!me)return a0(Z,!0,B,z,$);var ke={unserializable:!0,type:Z,readonly:!0,size:Z==="typed_array"?B.length:void 0,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B.constructor&&B.constructor.name!=="Object"?B.constructor.name:""};return Kt(B[Symbol.iterator])&&Array.from(B).forEach(function(ht,ie){return ke[ie]=So(ht,z,G,$.concat([ie]),De,me?1:xe+1)}),G.push($),ke;case"opaque_iterator":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B[Symbol.toStringTag],type:Z};case"date":case"regexp":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B.toString(),type:Z};case"object":if(me=De($),xe>=2&&!me)return a0(Z,!0,B,z,$);var Xe={};return eu(B).forEach(function(ht){var ie=ht.toString();Xe[ie]=So(B[ht],z,G,$.concat([ie]),De,me?1:xe+1)}),Xe;case"infinity":case"nan":case"undefined":return z.push($),{type:Z};default:return B}}function Go(B){return(Go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function Os(B){return function(z){if(Array.isArray(z))return Yo(z)}(B)||function(z){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(z))return Array.from(z)}(B)||function(z,G){if(!!z){if(typeof z=="string")return Yo(z,G);var $=Object.prototype.toString.call(z).slice(8,-1);if($==="Object"&&z.constructor&&($=z.constructor.name),$==="Map"||$==="Set")return Array.from(z);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return Yo(z,G)}}(B)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Yo(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);Gz.toString()?1:z.toString()>B.toString()?-1:0}function eu(B){for(var z=[],G=B,$=function(){var De=[].concat(Os(Object.keys(G)),Os(Object.getOwnPropertySymbols(G))),me=Object.getOwnPropertyDescriptors(G);De.forEach(function(xe){me[xe].enumerable&&z.push(xe)}),G=Object.getPrototypeOf(G)};G!=null;)$();return z}function ai(B){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Anonymous",G=Ko.get(B);if(G!=null)return G;var $=z;return typeof B.displayName=="string"?$=B.displayName:typeof B.name=="string"&&B.name!==""&&($=B.name),Ko.set(B,$),$}var mr=0;function Xo(){return++mr}function W0(B){var z=qt.get(B);if(z!==void 0)return z;for(var G=new Array(B.length),$=0;$1&&arguments[1]!==void 0?arguments[1]:50;return B.length>z?B.substr(0,z)+"\u2026":B}function Si(B,z){if(B!=null&&hasOwnProperty.call(B,vu.type))return z?B[vu.preview_long]:B[vu.preview_short];switch(Co(B)){case"html_element":return"<".concat(tu(B.tagName.toLowerCase())," />");case"function":return tu("\u0192 ".concat(typeof B.name=="function"?"":B.name,"() {}"));case"string":return'"'.concat(B,'"');case"bigint":return tu(B.toString()+"n");case"regexp":case"symbol":return tu(B.toString());case"react_element":return"<".concat(tu(L0(B)||"Unknown")," />");case"array_buffer":return"ArrayBuffer(".concat(B.byteLength,")");case"data_view":return"DataView(".concat(B.buffer.byteLength,")");case"array":if(z){for(var G="",$=0;$0&&(G+=", "),!((G+=Si(B[$],!1)).length>50));$++);return"[".concat(tu(G),"]")}var De=hasOwnProperty.call(B,vu.size)?B[vu.size]:B.length;return"Array(".concat(De,")");case"typed_array":var me="".concat(B.constructor.name,"(").concat(B.length,")");if(z){for(var xe="",Z=0;Z0&&(xe+=", "),!((xe+=B[Z]).length>50));Z++);return"".concat(me," [").concat(tu(xe),"]")}return me;case"iterator":var ke=B.constructor.name;if(z){for(var Xe=Array.from(B),ht="",ie=0;ie0&&(ht+=", "),Array.isArray(qe)){var tt=Si(qe[0],!0),Tt=Si(qe[1],!1);ht+="".concat(tt," => ").concat(Tt)}else ht+=Si(qe,!1);if(ht.length>50)break}return"".concat(ke,"(").concat(B.size,") {").concat(tu(ht),"}")}return"".concat(ke,"(").concat(B.size,")");case"opaque_iterator":return B[Symbol.toStringTag];case"date":return B.toString();case"object":if(z){for(var kt=eu(B).sort(_i),bt="",on=0;on0&&(bt+=", "),(bt+="".concat(tn.toString(),": ").concat(Si(B[tn],!1))).length>50)break}return"{".concat(tu(bt),"}")}return"{\u2026}";case"boolean":case"number":case"infinity":case"nan":case"null":case"undefined":return B;default:try{return tu(""+B)}catch(Lt){return"unserializable"}}}var ks=f(7);function Hl(B){return(Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function F0(B,z){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);z&&($=$.filter(function(De){return Object.getOwnPropertyDescriptor(B,De).enumerable})),G.push.apply(G,$)}return G}function f0(B){for(var z=1;z2&&arguments[2]!==void 0?arguments[2]:[];if(B!==null){var $=[],De=[],me=So(B,$,De,G,z);return{data:me,cleaned:$,unserializable:De}}return null}function G0(B){var z,G,$=(z=B,G=new Set,JSON.stringify(z,function(xe,Z){if(Hl(Z)==="object"&&Z!==null){if(G.has(Z))return;G.add(Z)}return typeof Z=="bigint"?Z.toString()+"n":Z})),De=$===void 0?"undefined":$,me=window.__REACT_DEVTOOLS_GLOBAL_HOOK__.clipboardCopyText;typeof me=="function"?me(De).catch(function(xe){}):Object(ks.copy)(De)}function fi(B,z){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,$=z[G],De=Array.isArray(B)?B.slice():f0({},B);return G+1===z.length?Array.isArray(De)?De.splice($,1):delete De[$]:De[$]=fi(B[$],z,G+1),De}function Zt(B,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,De=z[$],me=Array.isArray(B)?B.slice():f0({},B);if($+1===z.length){var xe=G[$];me[xe]=me[De],Array.isArray(me)?me.splice(De,1):delete me[De]}else me[De]=Zt(B[De],z,G,$+1);return me}function Ln(B,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if($>=z.length)return G;var De=z[$],me=Array.isArray(B)?B.slice():f0({},B);return me[De]=Ln(B[De],z,G,$+1),me}var Di=f(8);function ci(B,z){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);z&&($=$.filter(function(De){return Object.getOwnPropertyDescriptor(B,De).enumerable})),G.push.apply(G,$)}return G}function Ht(B){for(var z=1;z=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:De}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var me,xe=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return xe=ke.done,ke},e:function(ke){Z=!0,me=ke},f:function(){try{xe||G.return==null||G.return()}finally{if(Z)throw me}}}}function Wl(B,z){if(B){if(typeof B=="string")return xo(B,z);var G=Object.prototype.toString.call(B).slice(8,-1);return G==="Object"&&B.constructor&&(G=B.constructor.name),G==="Map"||G==="Set"?Array.from(B):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?xo(B,z):void 0}}function xo(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);G0){var vt=me(se);if(vt!=null){var Xt,xn=Ui(Mo);try{for(xn.s();!(Xt=xn.n()).done;)if(Xt.value.test(vt))return!0}catch(er){xn.e(er)}finally{xn.f()}}}if(re!=null&&ds.size>0){var _n,yn=re.fileName,En=Ui(ds);try{for(En.s();!(_n=En.n()).done;)if(_n.value.test(yn))return!0}catch(er){En.e(er)}finally{En.f()}}return!1}function yu(se){var re=se.type;switch(se.tag){case Tt:case _r:return 1;case tt:case Cn:return 5;case tn:return 6;case Lt:return 11;case lr:return 7;case gn:case Qn:case on:return 9;case Ar:case Rr:return 8;case nt:return 12;case _t:return 13;default:switch(xe(re)){case 60111:case"Symbol(react.concurrent_mode)":case"Symbol(react.async_mode)":return 9;case 60109:case"Symbol(react.provider)":return 2;case 60110:case"Symbol(react.context)":return 2;case 60108:case"Symbol(react.strict_mode)":return 9;case 60114:case"Symbol(react.profiler)":return 10;default:return 9}}}function pi(se){if(Fo.has(se))return se;var re=se.alternate;return re!=null&&Fo.has(re)?re:(Fo.add(se),se)}window.__REACT_DEVTOOLS_COMPONENT_FILTERS__!=null?ps(window.__REACT_DEVTOOLS_COMPONENT_FILTERS__):ps([{type:1,value:7,isEnabled:!0}]);var T0=new Map,Q0=new Map,Fo=new Set,ta=new Map,Kl=new Map,Ki=-1;function Yr(se){if(!T0.has(se)){var re=Xo();T0.set(se,re),Q0.set(re,se)}return T0.get(se)}function fo(se){switch(yu(se)){case 1:if(I0!==null){var re=Yr(pi(se)),Le=gi(se);Le!==null&&I0.set(re,Le)}}}var Oi={};function gi(se){switch(yu(se)){case 1:var re=se.stateNode,Le=Oi,Ae=Oi;return re!=null&&(re.constructor&&re.constructor.contextType!=null?Ae=re.context:(Le=re.context)&&Object.keys(Le).length===0&&(Le=Oi)),[Le,Ae];default:return null}}function ff(se){switch(yu(se)){case 1:if(I0!==null){var re=Yr(pi(se)),Le=I0.has(re)?I0.get(re):null,Ae=gi(se);if(Le==null||Ae==null)return null;var ot=Y0(Le,2),vt=ot[0],Xt=ot[1],xn=Y0(Ae,2),_n=xn[0],yn=xn[1];if(_n!==Oi)return J0(vt,_n);if(yn!==Oi)return Xt!==yn}}return null}function cf(se,re){if(se==null||re==null)return!1;if(re.hasOwnProperty("baseState")&&re.hasOwnProperty("memoizedState")&&re.hasOwnProperty("next")&&re.hasOwnProperty("queue"))for(;re!==null;){if(re.memoizedState!==se.memoizedState)return!0;re=re.next,se=se.next}return!1}function J0(se,re){if(se==null||re==null||re.hasOwnProperty("baseState")&&re.hasOwnProperty("memoizedState")&&re.hasOwnProperty("next")&&re.hasOwnProperty("queue"))return null;var Le,Ae=[],ot=Ui(new Set([].concat(Yi(Object.keys(se)),Yi(Object.keys(re)))));try{for(ot.s();!(Le=ot.n()).done;){var vt=Le.value;se[vt]!==re[vt]&&Ae.push(vt)}}catch(Xt){ot.e(Xt)}finally{ot.f()}return Ae}function Z0(se,re){switch(re.tag){case Tt:case tt:case kt:case Ar:case Rr:return(oo(re)&ie)===ie;default:return se.memoizedProps!==re.memoizedProps||se.memoizedState!==re.memoizedState||se.ref!==re.ref}}var Te=[],et=[],Ve=[],Gt=[],Yt=new Map,sr=0,Br=null;function wn(se){Te.push(se)}function fu(se){if(Te.length!==0||et.length!==0||Ve.length!==0||Br!==null||Ru){var re=et.length+Ve.length+(Br===null?0:1),Le=new Array(3+sr+(re>0?2+re:0)+Te.length),Ae=0;if(Le[Ae++]=z,Le[Ae++]=Ki,Le[Ae++]=sr,Yt.forEach(function(xn,_n){Le[Ae++]=_n.length;for(var yn=W0(_n),En=0;En0){Le[Ae++]=2,Le[Ae++]=re;for(var ot=et.length-1;ot>=0;ot--)Le[Ae++]=et[ot];for(var vt=0;vt0?se.forEach(function(re){B.emit("operations",re)}):(wr!==null&&(ru=!0),B.getFiberRoots(z).forEach(function(re){Xu(Ki=Yr(pi(re.current)),re.current),Ru&&re.memoizedInteractions!=null&&($o={changeDescriptions:Xl?new Map:null,durations:[],commitTime:Vl()-Yu,interactions:Array.from(re.memoizedInteractions).map(function(Le){return Ht(Ht({},Le),{},{timestamp:Le.timestamp-Yu})}),maxActualDuration:0,priorityLevel:null}),Vr(re.current,null,!1,!1),fu(),Ki=-1}))},getBestMatchForTrackedPath:function(){if(wr===null||$0===null)return null;for(var se=$0;se!==null&&Vu(se);)se=se.return;return se===null?null:{id:Yr(pi(se)),isFullMatch:Xi===wr.length-1}},getDisplayNameForFiberID:function(se){var re=Q0.get(se);return re!=null?me(re):null},getFiberIDForNative:function(se){var re=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Le=G.findFiberByHostInstance(se);if(Le!=null){if(re)for(;Le!==null&&Vu(Le);)Le=Le.return;return Yr(pi(Le))}return null},getInstanceAndStyle:function(se){var re=null,Le=null,Ae=Uu(se);return Ae!==null&&(re=Ae.stateNode,Ae.memoizedProps!==null&&(Le=Ae.memoizedProps.style)),{instance:re,style:Le}},getOwnersList:function(se){var re=Uu(se);if(re==null)return null;var Le=re._debugOwner,Ae=[{displayName:me(re)||"Anonymous",id:se,type:yu(re)}];if(Le)for(var ot=Le;ot!==null;)Ae.unshift({displayName:me(ot)||"Anonymous",id:Yr(pi(ot)),type:yu(ot)}),ot=ot._debugOwner||null;return Ae},getPathForElement:function(se){var re=Q0.get(se);if(re==null)return null;for(var Le=[];re!==null;)Le.push(y0(re)),re=re.return;return Le.reverse(),Le},getProfilingData:function(){var se=[];if(hs===null)throw Error("getProfilingData() called before any profiling data was recorded");return hs.forEach(function(re,Le){var Ae=[],ot=[],vt=new Map,Xt=new Map,xn=El!==null&&El.get(Le)||"Unknown";R0!=null&&R0.forEach(function(_n,yn){co!=null&&co.get(yn)===Le&&ot.push([yn,_n])}),re.forEach(function(_n,yn){var En=_n.changeDescriptions,er=_n.durations,It=_n.interactions,xi=_n.maxActualDuration,Sr=_n.priorityLevel,cr=_n.commitTime,Y=[];It.forEach(function(hi){vt.has(hi.id)||vt.set(hi.id,hi),Y.push(hi.id);var Qi=Xt.get(hi.id);Qi!=null?Qi.push(yn):Xt.set(hi.id,[yn])});for(var Qr=[],Jr=[],Ur=0;Ur1?Wn.set(En,er-1):Wn.delete(En),Xr.delete(_n)}(Ki),Kr(Le,!1))}else Xu(Ki,Le),Vr(Le,null,!1,!1);if(Ru&&ot){var xn=hs.get(Ki);xn!=null?xn.push($o):hs.set(Ki,[$o])}fu(),No&&B.emit("traceUpdates",Lo),Ki=-1},handleCommitFiberUnmount:function(se){Kr(se,!1)},inspectElement:function(se,re){if(Li(se)){if(re!=null){A0(re);var Le=null;return re[0]==="hooks"&&(Le="hooks"),{id:se,type:"hydrated-path",path:re,value:Ei(Lu(zi,re),Fi(null,Le),re)}}return{id:se,type:"no-change"}}if(Is=!1,zi!==null&&zi.id===se||(x0={}),(zi=na(se))===null)return{id:se,type:"not-found"};re!=null&&A0(re),function(ot){var vt=ot.hooks,Xt=ot.id,xn=ot.props,_n=Q0.get(Xt);if(_n!=null){var yn=_n.elementType,En=_n.stateNode,er=_n.tag,It=_n.type;switch(er){case Tt:case _r:case Cn:$.$r=En;break;case tt:$.$r={hooks:vt,props:xn,type:It};break;case tn:$.$r={props:xn,type:It.render};break;case Ar:case Rr:$.$r={props:xn,type:yn!=null&&yn.type!=null?yn.type:It};break;default:$.$r=null}}else console.warn('Could not find Fiber with id "'.concat(Xt,'"'))}(zi);var Ae=Ht({},zi);return Ae.context=Ei(Ae.context,Fi("context",null)),Ae.hooks=Ei(Ae.hooks,Fi("hooks","hooks")),Ae.props=Ei(Ae.props,Fi("props",null)),Ae.state=Ei(Ae.state,Fi("state",null)),{id:se,type:"full-data",value:Ae}},logElementToConsole:function(se){var re=Li(se)?zi:na(se);if(re!==null){var Le=typeof console.groupCollapsed=="function";Le&&console.groupCollapsed("[Click to expand] %c<".concat(re.displayName||"Component"," />"),"color: var(--dom-tag-name-color); font-weight: normal;"),re.props!==null&&console.log("Props:",re.props),re.state!==null&&console.log("State:",re.state),re.hooks!==null&&console.log("Hooks:",re.hooks);var Ae=_l(se);Ae!==null&&console.log("Nodes:",Ae),re.source!==null&&console.log("Location:",re.source),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),Le&&console.groupEnd()}else console.warn('Could not find Fiber with id "'.concat(se,'"'))},prepareViewAttributeSource:function(se,re){Li(se)&&(window.$attribute=Lu(zi,re))},prepareViewElementSource:function(se){var re=Q0.get(se);if(re!=null){var Le=re.elementType,Ae=re.tag,ot=re.type;switch(Ae){case Tt:case _r:case Cn:case tt:$.$type=ot;break;case tn:$.$type=ot.render;break;case Ar:case Rr:$.$type=Le!=null&&Le.type!=null?Le.type:ot;break;default:$.$type=null}}else console.warn('Could not find Fiber with id "'.concat(se,'"'))},overrideSuspense:function(se,re){if(typeof ko!="function"||typeof Zo!="function")throw new Error("Expected overrideSuspense() to not get called for earlier React versions.");re?(Ku.add(se),Ku.size===1&&ko(vs)):(Ku.delete(se),Ku.size===0&&ko(df));var Le=Q0.get(se);Le!=null&&Zo(Le)},overrideValueAtPath:function(se,re,Le,Ae,ot){var vt=Uu(re);if(vt!==null){var Xt=vt.stateNode;switch(se){case"context":switch(Ae=Ae.slice(1),vt.tag){case Tt:Ae.length===0?Xt.context=ot:To(Xt.context,Ae,ot),Xt.forceUpdate()}break;case"hooks":typeof nu=="function"&&nu(vt,Le,Ae,ot);break;case"props":switch(vt.tag){case Tt:vt.pendingProps=Ln(Xt.props,Ae,ot),Xt.forceUpdate();break;default:typeof X0=="function"&&X0(vt,Ae,ot)}break;case"state":switch(vt.tag){case Tt:To(Xt.state,Ae,ot),Xt.forceUpdate()}}}},renamePath:function(se,re,Le,Ae,ot){var vt=Uu(re);if(vt!==null){var Xt=vt.stateNode;switch(se){case"context":switch(Ae=Ae.slice(1),ot=ot.slice(1),vt.tag){case Tt:Ae.length===0||Hr(Xt.context,Ae,ot),Xt.forceUpdate()}break;case"hooks":typeof S0=="function"&&S0(vt,Le,Ae,ot);break;case"props":Xt===null?typeof di=="function"&&di(vt,Ae,ot):(vt.pendingProps=Zt(Xt.props,Ae,ot),Xt.forceUpdate());break;case"state":Hr(Xt.state,Ae,ot),Xt.forceUpdate()}}},renderer:G,setTraceUpdatesEnabled:function(se){No=se},setTrackedPath:Ci,startProfiling:ra,stopProfiling:function(){Ru=!1,Xl=!1},storeAsGlobal:function(se,re,Le){if(Li(se)){var Ae=Lu(zi,re),ot="$reactTemp".concat(Le);window[ot]=Ae,console.log(ot),console.log(Ae)}},updateComponentFilters:function(se){if(Ru)throw Error("Cannot modify filter preferences while profiling");B.getFiberRoots(z).forEach(function(re){Ki=Yr(pi(re.current)),Bu(re.current),Kr(re.current,!1),Ki=-1}),ps(se),Wn.clear(),B.getFiberRoots(z).forEach(function(re){Xu(Ki=Yr(pi(re.current)),re.current),Vr(re.current,null,!1,!1),fu(re),Ki=-1})}}}var Xn;function Qo(B){return(Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function lo(B,z,G){if(Xn===void 0)try{throw Error()}catch(De){var $=De.stack.trim().match(/\n( *(at )?)/);Xn=$&&$[1]||""}return` -`+Xn+B}var b0=!1;function yl(B,z,G){if(!B||b0)return"";var $,De=Error.prepareStackTrace;Error.prepareStackTrace=void 0,b0=!0;var me=G.current;G.current=null;try{if(z){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),(typeof Reflect=="undefined"?"undefined":Qo(Reflect))==="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(qe){$=qe}Reflect.construct(B,[],xe)}else{try{xe.call()}catch(qe){$=qe}B.call(xe.prototype)}}else{try{throw Error()}catch(qe){$=qe}B()}}catch(qe){if(qe&&$&&typeof qe.stack=="string"){for(var Z=qe.stack.split(` -`),ke=$.stack.split(` -`),Xe=Z.length-1,ht=ke.length-1;Xe>=1&&ht>=0&&Z[Xe]!==ke[ht];)ht--;for(;Xe>=1&&ht>=0;Xe--,ht--)if(Z[Xe]!==ke[ht]){if(Xe!==1||ht!==1)do if(Xe--,--ht<0||Z[Xe]!==ke[ht])return` -`+Z[Xe].replace(" at new "," at ");while(Xe>=1&&ht>=0);break}}}finally{b0=!1,Error.prepareStackTrace=De,G.current=me}var ie=B?B.displayName||B.name:"";return ie?lo(ie):""}function Ro(B,z,G,$){return yl(B,!1,$)}function Et(B,z,G){var $=B.HostComponent,De=B.LazyComponent,me=B.SuspenseComponent,xe=B.SuspenseListComponent,Z=B.FunctionComponent,ke=B.IndeterminateComponent,Xe=B.SimpleMemoComponent,ht=B.ForwardRef,ie=B.Block,qe=B.ClassComponent;switch(z.tag){case $:return lo(z.type);case De:return lo("Lazy");case me:return lo("Suspense");case xe:return lo("SuspenseList");case Z:case ke:case Xe:return Ro(z.type,0,0,G);case ht:return Ro(z.type.render,0,0,G);case ie:return Ro(z.type._render,0,0,G);case qe:return function(tt,Tt,kt,bt){return yl(tt,!0,bt)}(z.type,0,0,G);default:return""}}function Pt(B,z,G){try{var $="",De=z;do $+=Et(B,De,G),De=De.return;while(De);return $}catch(me){return` -Error generating stack: `+me.message+` -`+me.stack}}function Bn(B,z){var G;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(G=function(ke,Xe){if(!!ke){if(typeof ke=="string")return Ir(ke,Xe);var ht=Object.prototype.toString.call(ke).slice(8,-1);if(ht==="Object"&&ke.constructor&&(ht=ke.constructor.name),ht==="Map"||ht==="Set")return Array.from(ke);if(ht==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ht))return Ir(ke,Xe)}}(B))||z&&B&&typeof B.length=="number"){G&&(B=G);var $=0,De=function(){};return{s:De,n:function(){return $>=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:De}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var me,xe=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return xe=ke.done,ke},e:function(ke){Z=!0,me=ke},f:function(){try{xe||G.return==null||G.return()}finally{if(Z)throw me}}}}function Ir(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);G0?Xe[Xe.length-1]:null,qe=ie!==null&&(Wr.test(ie)||wu.test(ie));if(!qe){var tt,Tt=Bn(c0.values());try{for(Tt.s();!(tt=Tt.n()).done;){var kt=tt.value,bt=kt.currentDispatcherRef,on=kt.getCurrentFiber,tn=kt.workTagMap,Lt=on();if(Lt!=null){var gn=Pt(tn,Lt,bt);gn!==""&&Xe.push(gn);break}}}catch(lr){Tt.e(lr)}finally{Tt.f()}}}catch(lr){}me.apply(void 0,Xe)};xe.__REACT_DEVTOOLS_ORIGINAL_METHOD__=me,Ti[De]=xe}catch(Z){}})}}function Fu(B){return(Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function fs(B,z){for(var G=0;GB.length)&&(z=B.length);for(var G=0,$=new Array(z);G1?Z-1:0),Xe=1;Xe0?ie[ie.length-1]:0),ie.push(nn),Z.set(Ze,Xe(Ft._topLevelWrapper));try{var sn=nt.apply(this,_t);return ie.pop(),sn}catch(yr){throw ie=[],yr}finally{if(ie.length===0){var Yn=Z.get(Ze);if(Yn===void 0)throw new Error("Expected to find root ID.");lr(Yn)}}},performUpdateIfNecessary:function(nt,_t){var Ze=_t[0];if(w0(Ze)===9)return nt.apply(this,_t);var Ft=Xe(Ze);ie.push(Ft);var nn=Gn(Ze);try{var sn=nt.apply(this,_t),Yn=Gn(Ze);return ht(nn,Yn)||Tt(Ze,Ft,Yn),ie.pop(),sn}catch(nu){throw ie=[],nu}finally{if(ie.length===0){var yr=Z.get(Ze);if(yr===void 0)throw new Error("Expected to find root ID.");lr(yr)}}},receiveComponent:function(nt,_t){var Ze=_t[0];if(w0(Ze)===9)return nt.apply(this,_t);var Ft=Xe(Ze);ie.push(Ft);var nn=Gn(Ze);try{var sn=nt.apply(this,_t),Yn=Gn(Ze);return ht(nn,Yn)||Tt(Ze,Ft,Yn),ie.pop(),sn}catch(nu){throw ie=[],nu}finally{if(ie.length===0){var yr=Z.get(Ze);if(yr===void 0)throw new Error("Expected to find root ID.");lr(yr)}}},unmountComponent:function(nt,_t){var Ze=_t[0];if(w0(Ze)===9)return nt.apply(this,_t);var Ft=Xe(Ze);ie.push(Ft);try{var nn=nt.apply(this,_t);return ie.pop(),function(Yn,yr){tn.push(yr),me.delete(yr)}(0,Ft),nn}catch(Yn){throw ie=[],Yn}finally{if(ie.length===0){var sn=Z.get(Ze);if(sn===void 0)throw new Error("Expected to find root ID.");lr(sn)}}}}));var bt=[],on=new Map,tn=[],Lt=0,gn=null;function lr(nt){if(bt.length!==0||tn.length!==0||gn!==null){var _t=tn.length+(gn===null?0:1),Ze=new Array(3+Lt+(_t>0?2+_t:0)+bt.length),Ft=0;if(Ze[Ft++]=z,Ze[Ft++]=nt,Ze[Ft++]=Lt,on.forEach(function(Yn,yr){Ze[Ft++]=yr.length;for(var nu=W0(yr),Cu=0;Cu0){Ze[Ft++]=2,Ze[Ft++]=_t;for(var nn=0;nn"),"color: var(--dom-tag-name-color); font-weight: normal;"),_t.props!==null&&console.log("Props:",_t.props),_t.state!==null&&console.log("State:",_t.state),_t.context!==null&&console.log("Context:",_t.context);var Ft=De(nt);Ft!==null&&console.log("Node:",Ft),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),Ze&&console.groupEnd()}else console.warn('Could not find element with id "'.concat(nt,'"'))},overrideSuspense:function(){throw new Error("overrideSuspense not supported by this renderer")},overrideValueAtPath:function(nt,_t,Ze,Ft,nn){var sn=me.get(_t);if(sn!=null){var Yn=sn._instance;if(Yn!=null)switch(nt){case"context":To(Yn.context,Ft,nn),p0(Yn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var yr=sn._currentElement;sn._currentElement=K0(K0({},yr),{},{props:Ln(yr.props,Ft,nn)}),p0(Yn);break;case"state":To(Yn.state,Ft,nn),p0(Yn)}}},renamePath:function(nt,_t,Ze,Ft,nn){var sn=me.get(_t);if(sn!=null){var Yn=sn._instance;if(Yn!=null)switch(nt){case"context":Hr(Yn.context,Ft,nn),p0(Yn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var yr=sn._currentElement;sn._currentElement=K0(K0({},yr),{},{props:Zt(yr.props,Ft,nn)}),p0(Yn);break;case"state":Hr(Yn.state,Ft,nn),p0(Yn)}}},prepareViewAttributeSource:function(nt,_t){var Ze=Rr(nt);Ze!==null&&(window.$attribute=Lu(Ze,_t))},prepareViewElementSource:function(nt){var _t=me.get(nt);if(_t!=null){var Ze=_t._currentElement;Ze!=null?$.$type=Ze.type:console.warn('Could not find element with id "'.concat(nt,'"'))}else console.warn('Could not find instance with id "'.concat(nt,'"'))},renderer:G,setTraceUpdatesEnabled:function(nt){},setTrackedPath:function(nt){},startProfiling:function(){},stopProfiling:function(){},storeAsGlobal:function(nt,_t,Ze){var Ft=Rr(nt);if(Ft!==null){var nn=Lu(Ft,_t),sn="$reactTemp".concat(Ze);window[sn]=nn,console.log(sn),console.log(nn)}},updateComponentFilters:function(nt){}}}function ri(B,z){var G=!1,$={bottom:0,left:0,right:0,top:0},De=z[B];if(De!=null){for(var me=0,xe=Object.keys($);me0?"development":"production";var bt=Function.prototype.toString;if(kt.Mount&&kt.Mount._renderNewRootComponent){var on=bt.call(kt.Mount._renderNewRootComponent);return on.indexOf("function")!==0?"production":on.indexOf("storedMeasure")!==-1?"development":on.indexOf("should be a pure function")!==-1?on.indexOf("NODE_ENV")!==-1||on.indexOf("development")!==-1||on.indexOf("true")!==-1?"development":on.indexOf("nextElement")!==-1||on.indexOf("nextComponent")!==-1?"unminified":"development":on.indexOf("nextElement")!==-1||on.indexOf("nextComponent")!==-1?"unminified":"outdated"}}catch(tn){}return"production"}(ke);try{var ie=window.__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__!==!1,qe=window.__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__===!0;(ie||qe)&&(so(ke),Gl({appendComponentStack:ie,breakOnConsoleErrors:qe}))}catch(kt){}var tt=B.__REACT_DEVTOOLS_ATTACH__;if(typeof tt=="function"){var Tt=tt(Z,Xe,ke,B);Z.rendererInterfaces.set(Xe,Tt)}return Z.emit("renderer",{id:Xe,renderer:ke,reactBuildType:ht}),Xe},on:function(ke,Xe){me[ke]||(me[ke]=[]),me[ke].push(Xe)},off:function(ke,Xe){if(me[ke]){var ht=me[ke].indexOf(Xe);ht!==-1&&me[ke].splice(ht,1),me[ke].length||delete me[ke]}},sub:function(ke,Xe){return Z.on(ke,Xe),function(){return Z.off(ke,Xe)}},supportsFiber:!0,checkDCE:function(ke){try{Function.prototype.toString.call(ke).indexOf("^_^")>-1&&(G=!0,setTimeout(function(){throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch(Xe){}},onCommitFiberUnmount:function(ke,Xe){var ht=De.get(ke);ht!=null&&ht.handleCommitFiberUnmount(Xe)},onCommitFiberRoot:function(ke,Xe,ht){var ie=Z.getFiberRoots(ke),qe=Xe.current,tt=ie.has(Xe),Tt=qe.memoizedState==null||qe.memoizedState.element==null;tt||Tt?tt&&Tt&&ie.delete(Xe):ie.add(Xe);var kt=De.get(ke);kt!=null&&kt.handleCommitFiberRoot(Xe,ht)}};Object.defineProperty(B,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!1,enumerable:!1,get:function(){return Z}})})(window);var h0=window.__REACT_DEVTOOLS_GLOBAL_HOOK__,Fs=[{type:1,value:7,isEnabled:!0}];function Ni(B){if(h0!=null){var z=B||{},G=z.host,$=G===void 0?"localhost":G,De=z.nativeStyleEditorValidAttributes,me=z.useHttps,xe=me!==void 0&&me,Z=z.port,ke=Z===void 0?8097:Z,Xe=z.websocket,ht=z.resolveRNStyle,ie=ht===void 0?null:ht,qe=z.isAppActive,tt=xe?"wss":"ws",Tt=null;if((qe===void 0?function(){return!0}:qe)()){var kt=null,bt=[],on=tt+"://"+$+":"+ke,tn=Xe||new window.WebSocket(on);tn.onclose=function(){kt!==null&&kt.emit("shutdown"),Lt()},tn.onerror=function(){Lt()},tn.onmessage=function(gn){var lr;try{if(typeof gn.data!="string")throw Error();lr=JSON.parse(gn.data)}catch(Qn){return void console.error("[React DevTools] Failed to parse JSON: "+gn.data)}bt.forEach(function(Qn){try{Qn(lr)}catch(_r){throw console.log("[React DevTools] Error calling listener",lr),console.log("error:",_r),_r}})},tn.onopen=function(){(kt=new ao({listen:function(Cn){return bt.push(Cn),function(){var Ar=bt.indexOf(Cn);Ar>=0&&bt.splice(Ar,1)}},send:function(Cn,Ar,v0){tn.readyState===tn.OPEN?tn.send(JSON.stringify({event:Cn,payload:Ar})):(kt!==null&&kt.shutdown(),Lt())}})).addListener("inspectElement",function(Cn){var Ar=Cn.id,v0=Cn.rendererID,Rr=gn.rendererInterfaces[v0];if(Rr!=null){var nt=Rr.findNativeNodesForFiberID(Ar);nt!=null&&nt[0]!=null&&gn.emit("showNativeHighlight",nt[0])}}),kt.addListener("updateComponentFilters",function(Cn){Fs=Cn}),window.__REACT_DEVTOOLS_COMPONENT_FILTERS__==null&&kt.send("overrideComponentFilters",Fs);var gn=new Hn(kt);if(gn.addListener("shutdown",function(){h0.emit("shutdown")}),function(Cn,Ar,v0){if(Cn==null)return function(){};var Rr=[Cn.sub("renderer-attached",function(Ze){var Ft=Ze.id,nn=(Ze.renderer,Ze.rendererInterface);Ar.setRendererInterface(Ft,nn),nn.flushInitialOperations()}),Cn.sub("unsupported-renderer-version",function(Ze){Ar.onUnsupportedRenderer(Ze)}),Cn.sub("operations",Ar.onHookOperations),Cn.sub("traceUpdates",Ar.onTraceUpdates)],nt=function(Ze,Ft){var nn=Cn.rendererInterfaces.get(Ze);nn==null&&(typeof Ft.findFiberByHostInstance=="function"?nn=Ms(Cn,Ze,Ft,v0):Ft.ComponentTree&&(nn=ic(Cn,Ze,Ft,v0)),nn!=null&&Cn.rendererInterfaces.set(Ze,nn)),nn!=null?Cn.emit("renderer-attached",{id:Ze,renderer:Ft,rendererInterface:nn}):Cn.emit("unsupported-renderer-version",Ze)};Cn.renderers.forEach(function(Ze,Ft){nt(Ft,Ze)}),Rr.push(Cn.sub("renderer",function(Ze){var Ft=Ze.id,nn=Ze.renderer;nt(Ft,nn)})),Cn.emit("react-devtools",Ar),Cn.reactDevtoolsAgent=Ar;var _t=function(){Rr.forEach(function(Ze){return Ze()}),Cn.rendererInterfaces.forEach(function(Ze){Ze.cleanup()}),Cn.reactDevtoolsAgent=null};Ar.addListener("shutdown",_t),Rr.push(function(){Ar.removeListener("shutdown",_t)})}(h0,gn,window),ie!=null||h0.resolveRNStyle!=null)ea(kt,gn,ie||h0.resolveRNStyle,De||h0.nativeStyleEditorValidAttributes||null);else{var lr,Qn,_r=function(){kt!==null&&ea(kt,gn,lr,Qn)};h0.hasOwnProperty("resolveRNStyle")||Object.defineProperty(h0,"resolveRNStyle",{enumerable:!1,get:function(){return lr},set:function(Cn){lr=Cn,_r()}}),h0.hasOwnProperty("nativeStyleEditorValidAttributes")||Object.defineProperty(h0,"nativeStyleEditorValidAttributes",{enumerable:!1,get:function(){return Qn},set:function(Cn){Qn=Cn,_r()}})}}}else Lt()}function Lt(){Tt===null&&(Tt=setTimeout(function(){return Ni(B)},2e3))}}}])})});var mR=ce(vR=>{"use strict";Object.defineProperty(vR,"__esModule",{value:!0});pR();var $Q=hR();$Q.connectToDevTools()});var DR=ce(kg=>{"use strict";var yR=kg&&kg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(kg,"__esModule",{value:!0});var gR=h4(),eJ=yR(D9()),_R=yR(eh()),ss=Lw();process.env.DEV==="true"&&mR();var ER=i=>{i==null||i.unsetMeasureFunc(),i==null||i.freeRecursive()};kg.default=eJ.default({schedulePassiveEffects:gR.unstable_scheduleCallback,cancelPassiveEffects:gR.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>{},resetAfterCommit:i=>{if(i.isStaticDirty){i.isStaticDirty=!1,typeof i.onImmediateRender=="function"&&i.onImmediateRender();return}typeof i.onRender=="function"&&i.onRender()},getChildHostContext:(i,o)=>{let f=i.isInsideText,p=o==="ink-text"||o==="ink-virtual-text";return f===p?i:{isInsideText:p}},shouldSetTextContent:()=>!1,createInstance:(i,o,f,p)=>{if(p.isInsideText&&i==="ink-box")throw new Error(" can\u2019t be nested inside component");let E=i==="ink-text"&&p.isInsideText?"ink-virtual-text":i,t=ss.createNode(E);for(let[k,L]of Object.entries(o))k!=="children"&&(k==="style"?ss.setStyle(t,L):k==="internal_transform"?t.internal_transform=L:k==="internal_static"?t.internal_static=!0:ss.setAttribute(t,k,L));return t},createTextInstance:(i,o,f)=>{if(!f.isInsideText)throw new Error(`Text string "${i}" must be rendered inside component`);return ss.createTextNode(i)},resetTextContent:()=>{},hideTextInstance:i=>{ss.setTextNodeValue(i,"")},unhideTextInstance:(i,o)=>{ss.setTextNodeValue(i,o)},getPublicInstance:i=>i,hideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(_R.default.DISPLAY_NONE)},unhideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(_R.default.DISPLAY_FLEX)},appendInitialChild:ss.appendChildNode,appendChild:ss.appendChildNode,insertBefore:ss.insertBeforeNode,finalizeInitialChildren:(i,o,f,p)=>(i.internal_static&&(p.isStaticDirty=!0,p.staticNode=i),!1),supportsMutation:!0,appendChildToContainer:ss.appendChildNode,insertInContainerBefore:ss.insertBeforeNode,removeChildFromContainer:(i,o)=>{ss.removeChildNode(i,o),ER(o.yogaNode)},prepareUpdate:(i,o,f,p,E)=>{i.internal_static&&(E.isStaticDirty=!0);let t={},k=Object.keys(p);for(let L of k)if(p[L]!==f[L]){if(L==="style"&&typeof p.style=="object"&&typeof f.style=="object"){let C=p.style,U=f.style,q=Object.keys(C);for(let W of q){if(W==="borderStyle"||W==="borderColor"){if(typeof t.style!="object"){let ne={};t.style=ne}t.style.borderStyle=C.borderStyle,t.style.borderColor=C.borderColor}if(C[W]!==U[W]){if(typeof t.style!="object"){let ne={};t.style=ne}t.style[W]=C[W]}}continue}t[L]=p[L]}return t},commitUpdate:(i,o)=>{for(let[f,p]of Object.entries(o))f!=="children"&&(f==="style"?ss.setStyle(i,p):f==="internal_transform"?i.internal_transform=p:f==="internal_static"?i.internal_static=!0:ss.setAttribute(i,f,p))},commitTextUpdate:(i,o,f)=>{ss.setTextNodeValue(i,f)},removeChild:(i,o)=>{ss.removeChildNode(i,o),ER(o.yogaNode)}})});var SR=ce((Are,wR)=>{"use strict";wR.exports=(i,o=1,f)=>{if(f=E0({indent:" ",includeEmptyLines:!1},f),typeof i!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof i}\``);if(typeof o!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof o}\``);if(typeof f.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof f.indent}\``);if(o===0)return i;let p=f.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return i.replace(p,f.indent.repeat(o))}});var TR=ce(Mg=>{"use strict";var tJ=Mg&&Mg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Mg,"__esModule",{value:!0});var k4=tJ(eh());Mg.default=i=>i.getComputedWidth()-i.getComputedPadding(k4.default.EDGE_LEFT)-i.getComputedPadding(k4.default.EDGE_RIGHT)-i.getComputedBorder(k4.default.EDGE_LEFT)-i.getComputedBorder(k4.default.EDGE_RIGHT)});var xR=ce((Ore,CR)=>{CR.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var RR=ce((kre,Zw)=>{"use strict";var AR=xR();Zw.exports=AR;Zw.exports.default=AR});var kR=ce((Mre,OR)=>{"use strict";OR.exports=(i,o=process.argv)=>{let f=i.startsWith("-")?"":i.length===1?"-":"--",p=o.indexOf(f+i),E=o.indexOf("--");return p!==-1&&(E===-1||p{"use strict";var nJ=require("os"),NR=require("tty"),of=kR(),{env:Wo}=process,md;of("no-color")||of("no-colors")||of("color=false")||of("color=never")?md=0:(of("color")||of("colors")||of("color=true")||of("color=always"))&&(md=1);"FORCE_COLOR"in Wo&&(Wo.FORCE_COLOR==="true"?md=1:Wo.FORCE_COLOR==="false"?md=0:md=Wo.FORCE_COLOR.length===0?1:Math.min(parseInt(Wo.FORCE_COLOR,10),3));function $w(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function e3(i,o){if(md===0)return 0;if(of("color=16m")||of("color=full")||of("color=truecolor"))return 3;if(of("color=256"))return 2;if(i&&!o&&md===void 0)return 0;let f=md||0;if(Wo.TERM==="dumb")return f;if(process.platform==="win32"){let p=nJ.release().split(".");return Number(p[0])>=10&&Number(p[2])>=10586?Number(p[2])>=14931?3:2:1}if("CI"in Wo)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(p=>p in Wo)||Wo.CI_NAME==="codeship"?1:f;if("TEAMCITY_VERSION"in Wo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Wo.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in Wo)return 1;if(Wo.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Wo){let p=parseInt((Wo.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Wo.TERM_PROGRAM){case"iTerm.app":return p>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Wo.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Wo.TERM)||"COLORTERM"in Wo?1:f}function rJ(i){let o=e3(i,i&&i.isTTY);return $w(o)}MR.exports={supportsColor:rJ,stdout:$w(e3(!0,NR.isatty(1))),stderr:$w(e3(!0,NR.isatty(2)))}});var bR=ce((Lre,FR)=>{"use strict";var iJ=(i,o,f)=>{let p=i.indexOf(o);if(p===-1)return i;let E=o.length,t=0,k="";do k+=i.substr(t,p-t)+o+f,t=p+E,p=i.indexOf(o,t);while(p!==-1);return k+=i.substr(t),k},uJ=(i,o,f,p)=>{let E=0,t="";do{let k=i[p-1]==="\r";t+=i.substr(E,(k?p-1:p)-E)+o+(k?`\r -`:` -`)+f,E=p+1,p=i.indexOf(` -`,E)}while(p!==-1);return t+=i.substr(E),t};FR.exports={stringReplaceAll:iJ,stringEncaseCRLFWithFirstIndex:uJ}});var jR=ce((Fre,PR)=>{"use strict";var oJ=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,IR=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,lJ=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,sJ=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,aJ=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function BR(i){let o=i[0]==="u",f=i[1]==="{";return o&&!f&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):o&&f?String.fromCodePoint(parseInt(i.slice(2,-1),16)):aJ.get(i)||i}function fJ(i,o){let f=[],p=o.trim().split(/\s*,\s*/g),E;for(let t of p){let k=Number(t);if(!Number.isNaN(k))f.push(k);else if(E=t.match(lJ))f.push(E[2].replace(sJ,(L,N,C)=>N?BR(N):C));else throw new Error(`Invalid Chalk template style argument: ${t} (in style '${i}')`)}return f}function cJ(i){IR.lastIndex=0;let o=[],f;for(;(f=IR.exec(i))!==null;){let p=f[1];if(f[2]){let E=fJ(p,f[2]);o.push([p].concat(E))}else o.push([p])}return o}function UR(i,o){let f={};for(let E of o)for(let t of E.styles)f[t[0]]=E.inverse?null:t.slice(1);let p=i;for(let[E,t]of Object.entries(f))if(!!Array.isArray(t)){if(!(E in p))throw new Error(`Unknown Chalk style: ${E}`);p=t.length>0?p[E](...t):p[E]}return p}PR.exports=(i,o)=>{let f=[],p=[],E=[];if(o.replace(oJ,(t,k,L,N,C,U)=>{if(k)E.push(BR(k));else if(N){let q=E.join("");E=[],p.push(f.length===0?q:UR(i,f)(q)),f.push({inverse:L,styles:cJ(N)})}else if(C){if(f.length===0)throw new Error("Found extraneous } in Chalk template literal");p.push(UR(i,f)(E.join(""))),E=[],f.pop()}else E.push(U)}),p.push(E.join("")),f.length>0){let t=`Chalk template literal is missing ${f.length} closing bracket${f.length===1?"":"s"} (\`}\`)`;throw new Error(t)}return p.join("")}});var u3=ce((bre,zR)=>{"use strict";var Ng=_4(),{stdout:t3,stderr:n3}=LR(),{stringReplaceAll:dJ,stringEncaseCRLFWithFirstIndex:pJ}=bR(),{isArray:M4}=Array,qR=["ansi","ansi","ansi256","ansi16m"],cm=Object.create(null),hJ=(i,o={})=>{if(o.level&&!(Number.isInteger(o.level)&&o.level>=0&&o.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let f=t3?t3.level:0;i.level=o.level===void 0?f:o.level},HR=class{constructor(o){return WR(o)}},WR=i=>{let o={};return hJ(o,i),o.template=(...f)=>VR(o.template,...f),Object.setPrototypeOf(o,N4.prototype),Object.setPrototypeOf(o.template,o),o.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},o.template.Instance=HR,o.template};function N4(i){return WR(i)}for(let[i,o]of Object.entries(Ng))cm[i]={get(){let f=L4(this,r3(o.open,o.close,this._styler),this._isEmpty);return Object.defineProperty(this,i,{value:f}),f}};cm.visible={get(){let i=L4(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:i}),i}};var GR=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let i of GR)cm[i]={get(){let{level:o}=this;return function(...f){let p=r3(Ng.color[qR[o]][i](...f),Ng.color.close,this._styler);return L4(this,p,this._isEmpty)}}};for(let i of GR){let o="bg"+i[0].toUpperCase()+i.slice(1);cm[o]={get(){let{level:f}=this;return function(...p){let E=r3(Ng.bgColor[qR[f]][i](...p),Ng.bgColor.close,this._styler);return L4(this,E,this._isEmpty)}}}}var vJ=Object.defineProperties(()=>{},Gf(E0({},cm),{level:{enumerable:!0,get(){return this._generator.level},set(i){this._generator.level=i}}})),r3=(i,o,f)=>{let p,E;return f===void 0?(p=i,E=o):(p=f.openAll+i,E=o+f.closeAll),{open:i,close:o,openAll:p,closeAll:E,parent:f}},L4=(i,o,f)=>{let p=(...E)=>M4(E[0])&&M4(E[0].raw)?YR(p,VR(p,...E)):YR(p,E.length===1?""+E[0]:E.join(" "));return Object.setPrototypeOf(p,vJ),p._generator=i,p._styler=o,p._isEmpty=f,p},YR=(i,o)=>{if(i.level<=0||!o)return i._isEmpty?"":o;let f=i._styler;if(f===void 0)return o;let{openAll:p,closeAll:E}=f;if(o.indexOf("")!==-1)for(;f!==void 0;)o=dJ(o,f.close,f.open),f=f.parent;let t=o.indexOf(` -`);return t!==-1&&(o=pJ(o,E,p,t)),p+o+E},i3,VR=(i,...o)=>{let[f]=o;if(!M4(f)||!M4(f.raw))return o.join(" ");let p=o.slice(1),E=[f.raw[0]];for(let t=1;t{"use strict";var mJ=Lg&&Lg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Lg,"__esModule",{value:!0});var Fg=mJ(u3()),yJ=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,gJ=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,b4=(i,o)=>o==="foreground"?i:"bg"+i[0].toUpperCase()+i.slice(1);Lg.default=(i,o,f)=>{if(!o)return i;if(o in Fg.default){let E=b4(o,f);return Fg.default[E](i)}if(o.startsWith("#")){let E=b4("hex",f);return Fg.default[E](o)(i)}if(o.startsWith("ansi")){let E=gJ.exec(o);if(!E)return i;let t=b4(E[1],f),k=Number(E[2]);return Fg.default[t](k)(i)}if(o.startsWith("rgb")||o.startsWith("hsl")||o.startsWith("hsv")||o.startsWith("hwb")){let E=yJ.exec(o);if(!E)return i;let t=b4(E[1],f),k=Number(E[2]),L=Number(E[3]),N=Number(E[4]);return Fg.default[t](k,L,N)(i)}return i}});var XR=ce(bg=>{"use strict";var KR=bg&&bg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(bg,"__esModule",{value:!0});var _J=KR(RR()),l3=KR(o3());bg.default=(i,o,f,p)=>{if(typeof f.style.borderStyle=="string"){let E=f.yogaNode.getComputedWidth(),t=f.yogaNode.getComputedHeight(),k=f.style.borderColor,L=_J.default[f.style.borderStyle],N=l3.default(L.topLeft+L.horizontal.repeat(E-2)+L.topRight,k,"foreground"),C=(l3.default(L.vertical,k,"foreground")+` -`).repeat(t-2),U=l3.default(L.bottomLeft+L.horizontal.repeat(E-2)+L.bottomRight,k,"foreground");p.write(i,o,N,{transformers:[]}),p.write(i,o+1,C,{transformers:[]}),p.write(i+E-1,o+1,C,{transformers:[]}),p.write(i,o+t-1,U,{transformers:[]})}}});var JR=ce(Pg=>{"use strict";var ih=Pg&&Pg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Pg,"__esModule",{value:!0});var EJ=ih(eh()),DJ=ih(Dw()),wJ=ih(SR()),SJ=ih(kw()),TJ=ih(TR()),CJ=ih(Nw()),xJ=ih(XR()),AJ=(i,o)=>{var f;let p=(f=i.childNodes[0])===null||f===void 0?void 0:f.yogaNode;if(p){let E=p.getComputedLeft(),t=p.getComputedTop();o=` -`.repeat(t)+wJ.default(o,E)}return o},QR=(i,o,f)=>{var p;let{offsetX:E=0,offsetY:t=0,transformers:k=[],skipStaticElements:L}=f;if(L&&i.internal_static)return;let{yogaNode:N}=i;if(N){if(N.getDisplay()===EJ.default.DISPLAY_NONE)return;let C=E+N.getComputedLeft(),U=t+N.getComputedTop(),q=k;if(typeof i.internal_transform=="function"&&(q=[i.internal_transform,...k]),i.nodeName==="ink-text"){let W=CJ.default(i);if(W.length>0){let ne=DJ.default(W),m=TJ.default(N);if(ne>m){let we=(p=i.style.textWrap)!==null&&p!==void 0?p:"wrap";W=SJ.default(W,m,we)}W=AJ(i,W),o.write(C,U,W,{transformers:q})}return}if(i.nodeName==="ink-box"&&xJ.default(C,U,i,o),i.nodeName==="ink-root"||i.nodeName==="ink-box")for(let W of i.childNodes)QR(W,o,{offsetX:C,offsetY:U,transformers:q,skipStaticElements:L})}};Pg.default=QR});var $R=ce((Ure,ZR)=>{"use strict";ZR.exports=i=>{i=Object.assign({onlyFirst:!1},i);let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i.onlyFirst?void 0:"g")}});var t7=ce((jre,s3)=>{"use strict";var RJ=$R(),e7=i=>typeof i=="string"?i.replace(RJ(),""):i;s3.exports=e7;s3.exports.default=e7});var i7=ce((zre,n7)=>{"use strict";var r7="[\uD800-\uDBFF][\uDC00-\uDFFF]";n7.exports=i=>i&&i.exact?new RegExp(`^${r7}$`):new RegExp(r7,"g")});var o7=ce((qre,a3)=>{"use strict";var OJ=t7(),kJ=i7(),u7=i=>OJ(i).replace(kJ()," ").length;a3.exports=u7;a3.exports.default=u7});var f7=ce(Ig=>{"use strict";var l7=Ig&&Ig.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ig,"__esModule",{value:!0});var s7=l7(Rw()),MJ=l7(o7()),a7=class{constructor(o){this.writes=[];let{width:f,height:p}=o;this.width=f,this.height=p}write(o,f,p,E){let{transformers:t}=E;!p||this.writes.push({x:o,y:f,text:p,transformers:t})}get(){let o=[];for(let p=0;pp.trimRight()).join(` -`),height:o.length}}};Ig.default=a7});var p7=ce(Bg=>{"use strict";var f3=Bg&&Bg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Bg,"__esModule",{value:!0});var NJ=f3(eh()),c7=f3(JR()),d7=f3(f7());Bg.default=(i,o)=>{var f;if(i.yogaNode.setWidth(o),i.yogaNode){i.yogaNode.calculateLayout(void 0,void 0,NJ.default.DIRECTION_LTR);let p=new d7.default({width:i.yogaNode.getComputedWidth(),height:i.yogaNode.getComputedHeight()});c7.default(i,p,{skipStaticElements:!0});let E;((f=i.staticNode)===null||f===void 0?void 0:f.yogaNode)&&(E=new d7.default({width:i.staticNode.yogaNode.getComputedWidth(),height:i.staticNode.yogaNode.getComputedHeight()}),c7.default(i.staticNode,E,{skipStaticElements:!1}));let{output:t,height:k}=p.get();return{output:t,outputHeight:k,staticOutput:E?`${E.get().output} -`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var y7=ce((Vre,h7)=>{"use strict";var v7=require("stream"),m7=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],c3={},LJ=i=>{let o=new v7.PassThrough,f=new v7.PassThrough;o.write=E=>i("stdout",E),f.write=E=>i("stderr",E);let p=new console.Console(o,f);for(let E of m7)c3[E]=console[E],console[E]=p[E];return()=>{for(let E of m7)console[E]=c3[E];c3={}}};h7.exports=LJ});var p3=ce(d3=>{"use strict";Object.defineProperty(d3,"__esModule",{value:!0});d3.default=new WeakMap});var v3=ce(h3=>{"use strict";Object.defineProperty(h3,"__esModule",{value:!0});var FJ=su(),g7=FJ.createContext({exit:()=>{}});g7.displayName="InternalAppContext";h3.default=g7});var y3=ce(m3=>{"use strict";Object.defineProperty(m3,"__esModule",{value:!0});var bJ=su(),_7=bJ.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});_7.displayName="InternalStdinContext";m3.default=_7});var _3=ce(g3=>{"use strict";Object.defineProperty(g3,"__esModule",{value:!0});var PJ=su(),E7=PJ.createContext({stdout:void 0,write:()=>{}});E7.displayName="InternalStdoutContext";g3.default=E7});var D3=ce(E3=>{"use strict";Object.defineProperty(E3,"__esModule",{value:!0});var IJ=su(),D7=IJ.createContext({stderr:void 0,write:()=>{}});D7.displayName="InternalStderrContext";E3.default=D7});var P4=ce(w3=>{"use strict";Object.defineProperty(w3,"__esModule",{value:!0});var BJ=su(),w7=BJ.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});w7.displayName="InternalFocusContext";w3.default=w7});var T7=ce((Zre,S7)=>{"use strict";var UJ=/[|\\{}()[\]^$+*?.-]/g;S7.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(UJ,"\\$&")}});var R7=ce(($re,C7)=>{"use strict";var jJ=T7(),x7=[].concat(require("module").builtinModules,"bootstrap_node","node").map(i=>new RegExp(`(?:\\(${i}\\.js:\\d+:\\d+\\)$|^\\s*at ${i}\\.js:\\d+:\\d+$)`));x7.push(/\(internal\/[^:]+:\d+:\d+\)$/,/\s*at internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var I4=class{constructor(o){o=E0({ignoredPackages:[]},o),"internals"in o||(o.internals=I4.nodeInternals()),"cwd"in o||(o.cwd=process.cwd()),this._cwd=o.cwd.replace(/\\/g,"/"),this._internals=[].concat(o.internals,zJ(o.ignoredPackages)),this._wrapCallSite=o.wrapCallSite||!1}static nodeInternals(){return[...x7]}clean(o,f=0){f=" ".repeat(f),Array.isArray(o)||(o=o.split(` -`)),!/^\s*at /.test(o[0])&&/^\s*at /.test(o[1])&&(o=o.slice(1));let p=!1,E=null,t=[];return o.forEach(k=>{if(k=k.replace(/\\/g,"/"),this._internals.some(N=>N.test(k)))return;let L=/^\s*at /.test(k);p?k=k.trimEnd().replace(/^(\s+)at /,"$1"):(k=k.trim(),L&&(k=k.slice(3))),k=k.replace(`${this._cwd}/`,""),k&&(L?(E&&(t.push(E),E=null),t.push(k)):(p=!0,E=k))}),t.map(k=>`${f}${k} -`).join("")}captureString(o,f=this.captureString){typeof o=="function"&&(f=o,o=Infinity);let{stackTraceLimit:p}=Error;o&&(Error.stackTraceLimit=o);let E={};Error.captureStackTrace(E,f);let{stack:t}=E;return Error.stackTraceLimit=p,this.clean(t)}capture(o,f=this.capture){typeof o=="function"&&(f=o,o=Infinity);let{prepareStackTrace:p,stackTraceLimit:E}=Error;Error.prepareStackTrace=(L,N)=>this._wrapCallSite?N.map(this._wrapCallSite):N,o&&(Error.stackTraceLimit=o);let t={};Error.captureStackTrace(t,f);let{stack:k}=t;return Object.assign(Error,{prepareStackTrace:p,stackTraceLimit:E}),k}at(o=this.at){let[f]=this.capture(1,o);if(!f)return{};let p={line:f.getLineNumber(),column:f.getColumnNumber()};A7(p,f.getFileName(),this._cwd),f.isConstructor()&&(p.constructor=!0),f.isEval()&&(p.evalOrigin=f.getEvalOrigin()),f.isNative()&&(p.native=!0);let E;try{E=f.getTypeName()}catch(L){}E&&E!=="Object"&&E!=="[object Object]"&&(p.type=E);let t=f.getFunctionName();t&&(p.function=t);let k=f.getMethodName();return k&&t!==k&&(p.method=k),p}parseLine(o){let f=o&&o.match(qJ);if(!f)return null;let p=f[1]==="new",E=f[2],t=f[3],k=f[4],L=Number(f[5]),N=Number(f[6]),C=f[7],U=f[8],q=f[9],W=f[10]==="native",ne=f[11]===")",m,we={};if(U&&(we.line=Number(U)),q&&(we.column=Number(q)),ne&&C){let Se=0;for(let he=C.length-1;he>0;he--)if(C.charAt(he)===")")Se++;else if(C.charAt(he)==="("&&C.charAt(he-1)===" "&&(Se--,Se===-1&&C.charAt(he-1)===" ")){let ge=C.slice(0,he-1);C=C.slice(he+1),E+=` (${ge}`;break}}if(E){let Se=E.match(HJ);Se&&(E=Se[1],m=Se[2])}return A7(we,C,this._cwd),p&&(we.constructor=!0),t&&(we.evalOrigin=t,we.evalLine=L,we.evalColumn=N,we.evalFile=k&&k.replace(/\\/g,"/")),W&&(we.native=!0),E&&(we.function=E),m&&E!==m&&(we.method=m),we}};function A7(i,o,f){o&&(o=o.replace(/\\/g,"/"),o.startsWith(`${f}/`)&&(o=o.slice(f.length+1)),i.file=o)}function zJ(i){if(i.length===0)return[];let o=i.map(f=>jJ(f));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${o.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var qJ=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),HJ=/^(.*?) \[as (.*?)\]$/;C7.exports=I4});var k7=ce((eie,O7)=>{"use strict";O7.exports=(i,o)=>i.replace(/^\t+/gm,f=>" ".repeat(f.length*(o||2)))});var N7=ce((tie,M7)=>{"use strict";var WJ=k7(),VJ=(i,o)=>{let f=[],p=i-o,E=i+o;for(let t=p;t<=E;t++)f.push(t);return f};M7.exports=(i,o,f)=>{if(typeof i!="string")throw new TypeError("Source code is missing.");if(!o||o<1)throw new TypeError("Line number must start from `1`.");if(i=WJ(i).split(/\r?\n/),!(o>i.length))return f=E0({around:3},f),VJ(o,f.around).filter(p=>i[p-1]!==void 0).map(p=>({line:p,value:i[p-1]}))}});var B4=ce(Zf=>{"use strict";var GJ=Zf&&Zf.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),YJ=Zf&&Zf.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),KJ=Zf&&Zf.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&GJ(o,i,f);return YJ(o,i),o},XJ=Zf&&Zf.__rest||function(i,o){var f={};for(var p in i)Object.prototype.hasOwnProperty.call(i,p)&&o.indexOf(p)<0&&(f[p]=i[p]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,p=Object.getOwnPropertySymbols(i);E{var{children:f}=i,p=XJ(i,["children"]);let E=Object.assign(Object.assign({},p),{marginLeft:p.marginLeft||p.marginX||p.margin||0,marginRight:p.marginRight||p.marginX||p.margin||0,marginTop:p.marginTop||p.marginY||p.margin||0,marginBottom:p.marginBottom||p.marginY||p.margin||0,paddingLeft:p.paddingLeft||p.paddingX||p.padding||0,paddingRight:p.paddingRight||p.paddingX||p.padding||0,paddingTop:p.paddingTop||p.paddingY||p.padding||0,paddingBottom:p.paddingBottom||p.paddingY||p.padding||0});return L7.default.createElement("ink-box",{ref:o,style:E},f)});S3.displayName="Box";S3.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};Zf.default=S3});var x3=ce(Ug=>{"use strict";var T3=Ug&&Ug.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ug,"__esModule",{value:!0});var QJ=T3(su()),dm=T3(u3()),F7=T3(o3()),C3=({color:i,backgroundColor:o,dimColor:f,bold:p,italic:E,underline:t,strikethrough:k,inverse:L,wrap:N,children:C})=>{if(C==null)return null;let U=q=>(f&&(q=dm.default.dim(q)),i&&(q=F7.default(q,i,"foreground")),o&&(q=F7.default(q,o,"background")),p&&(q=dm.default.bold(q)),E&&(q=dm.default.italic(q)),t&&(q=dm.default.underline(q)),k&&(q=dm.default.strikethrough(q)),L&&(q=dm.default.inverse(q)),q);return QJ.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:N},internal_transform:U},C)};C3.displayName="Text";C3.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};Ug.default=C3});var B7=ce($f=>{"use strict";var JJ=$f&&$f.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),ZJ=$f&&$f.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),$J=$f&&$f.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&JJ(o,i,f);return ZJ(o,i),o},jg=$f&&$f.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty($f,"__esModule",{value:!0});var b7=$J(require("fs")),Vo=jg(su()),P7=jg(R7()),eZ=jg(N7()),Q1=jg(B4()),Ic=jg(x3()),I7=new P7.default({cwd:process.cwd(),internals:P7.default.nodeInternals()}),tZ=({error:i})=>{let o=i.stack?i.stack.split(` -`).slice(1):void 0,f=o?I7.parseLine(o[0]):void 0,p,E=0;if((f==null?void 0:f.file)&&(f==null?void 0:f.line)&&b7.existsSync(f.file)){let t=b7.readFileSync(f.file,"utf8");if(p=eZ.default(t,f.line),p)for(let{line:k}of p)E=Math.max(E,String(k).length)}return Vo.default.createElement(Q1.default,{flexDirection:"column",padding:1},Vo.default.createElement(Q1.default,null,Vo.default.createElement(Ic.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Vo.default.createElement(Ic.default,null," ",i.message)),f&&Vo.default.createElement(Q1.default,{marginTop:1},Vo.default.createElement(Ic.default,{dimColor:!0},f.file,":",f.line,":",f.column)),f&&p&&Vo.default.createElement(Q1.default,{marginTop:1,flexDirection:"column"},p.map(({line:t,value:k})=>Vo.default.createElement(Q1.default,{key:t},Vo.default.createElement(Q1.default,{width:E+1},Vo.default.createElement(Ic.default,{dimColor:t!==f.line,backgroundColor:t===f.line?"red":void 0,color:t===f.line?"white":void 0},String(t).padStart(E," "),":")),Vo.default.createElement(Ic.default,{key:t,backgroundColor:t===f.line?"red":void 0,color:t===f.line?"white":void 0}," "+k)))),i.stack&&Vo.default.createElement(Q1.default,{marginTop:1,flexDirection:"column"},i.stack.split(` -`).slice(1).map(t=>{let k=I7.parseLine(t);return k?Vo.default.createElement(Q1.default,{key:t},Vo.default.createElement(Ic.default,{dimColor:!0},"- "),Vo.default.createElement(Ic.default,{dimColor:!0,bold:!0},k.function),Vo.default.createElement(Ic.default,{dimColor:!0,color:"gray"}," ","(",k.file,":",k.line,":",k.column,")")):Vo.default.createElement(Q1.default,{key:t},Vo.default.createElement(Ic.default,{dimColor:!0},"- "),Vo.default.createElement(Ic.default,{dimColor:!0,bold:!0},t))})))};$f.default=tZ});var j7=ce(ec=>{"use strict";var nZ=ec&&ec.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),rZ=ec&&ec.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),iZ=ec&&ec.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&nZ(o,i,f);return rZ(o,i),o},uh=ec&&ec.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ec,"__esModule",{value:!0});var oh=iZ(su()),U7=uh(ZD()),uZ=uh(v3()),oZ=uh(y3()),lZ=uh(_3()),sZ=uh(D3()),aZ=uh(P4()),fZ=uh(B7()),cZ=" ",dZ="",pZ="",A3=class extends oh.PureComponent{constructor(){super(...arguments);this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=o=>{let{stdin:f}=this.props;if(!this.isRawModeSupported())throw f===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(f.setEncoding("utf8"),o){this.rawModeEnabledCount===0&&(f.addListener("data",this.handleInput),f.resume(),f.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount==0&&(f.setRawMode(!1),f.removeListener("data",this.handleInput),f.pause())},this.handleInput=o=>{o===""&&this.props.exitOnCtrlC&&this.handleExit(),o===pZ&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(o===cZ&&this.focusNext(),o===dZ&&this.focusPrevious())},this.handleExit=o=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(o)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(o=>{let f=o.focusables[0].id;return{activeFocusId:this.findNextFocusable(o)||f}})},this.focusPrevious=()=>{this.setState(o=>{let f=o.focusables[o.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(o)||f}})},this.addFocusable=(o,{autoFocus:f})=>{this.setState(p=>{let E=p.activeFocusId;return!E&&f&&(E=o),{activeFocusId:E,focusables:[...p.focusables,{id:o,isActive:!0}]}})},this.removeFocusable=o=>{this.setState(f=>({activeFocusId:f.activeFocusId===o?void 0:f.activeFocusId,focusables:f.focusables.filter(p=>p.id!==o)}))},this.activateFocusable=o=>{this.setState(f=>({focusables:f.focusables.map(p=>p.id!==o?p:{id:o,isActive:!0})}))},this.deactivateFocusable=o=>{this.setState(f=>({activeFocusId:f.activeFocusId===o?void 0:f.activeFocusId,focusables:f.focusables.map(p=>p.id!==o?p:{id:o,isActive:!1})}))},this.findNextFocusable=o=>{let f=o.focusables.findIndex(p=>p.id===o.activeFocusId);for(let p=f+1;p{let f=o.focusables.findIndex(p=>p.id===o.activeFocusId);for(let p=f-1;p>=0;p--)if(o.focusables[p].isActive)return o.focusables[p].id}}static getDerivedStateFromError(o){return{error:o}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return oh.default.createElement(uZ.default.Provider,{value:{exit:this.handleExit}},oh.default.createElement(oZ.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},oh.default.createElement(lZ.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},oh.default.createElement(sZ.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},oh.default.createElement(aZ.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?oh.default.createElement(fZ.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){U7.default.hide(this.props.stdout)}componentWillUnmount(){U7.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(o){this.handleExit(o)}};ec.default=A3;A3.displayName="InternalApp"});var W7=ce(tc=>{"use strict";var hZ=tc&&tc.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),vZ=tc&&tc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),mZ=tc&&tc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&hZ(o,i,f);return vZ(o,i),o},nc=tc&&tc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(tc,"__esModule",{value:!0});var yZ=nc(su()),z7=B5(),gZ=nc(Z5()),_Z=nc(GD()),EZ=nc(u9()),DZ=nc(l9()),U4=nc(DR()),wZ=nc(p7()),SZ=nc(JD()),TZ=nc(y7()),CZ=mZ(Lw()),xZ=nc(p3()),AZ=nc(j7()),pm=process.env.CI==="false"?!1:EZ.default,q7=()=>{},H7=class{constructor(o){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:f,outputHeight:p,staticOutput:E}=wZ.default(this.rootNode,this.options.stdout.columns||80),t=E&&E!==` -`;if(this.options.debug){t&&(this.fullStaticOutput+=E),this.options.stdout.write(this.fullStaticOutput+f);return}if(pm){t&&this.options.stdout.write(E),this.lastOutput=f;return}if(t&&(this.fullStaticOutput+=E),p>=this.options.stdout.rows){this.options.stdout.write(_Z.default.clearTerminal+this.fullStaticOutput+f),this.lastOutput=f;return}t&&(this.log.clear(),this.options.stdout.write(E),this.log(f)),!t&&f!==this.lastOutput&&this.throttledLog(f),this.lastOutput=f},DZ.default(this),this.options=o,this.rootNode=CZ.createNode("ink-root"),this.rootNode.onRender=o.debug?this.onRender:z7.throttle(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=gZ.default.create(o.stdout),this.throttledLog=o.debug?this.log:z7.throttle(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=U4.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=SZ.default(this.unmount,{alwaysLast:!1}),process.env.DEV==="true"&&U4.default.injectIntoDevTools({bundleType:0,version:"16.13.1",rendererPackageName:"ink"}),o.patchConsole&&this.patchConsole(),pm||(o.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{o.stdout.off("resize",this.onRender)})}render(o){let f=yZ.default.createElement(AZ.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},o);U4.default.updateContainer(f,this.container,null,q7)}writeToStdout(o){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(o+this.fullStaticOutput+this.lastOutput);return}if(pm){this.options.stdout.write(o);return}this.log.clear(),this.options.stdout.write(o),this.log(this.lastOutput)}}writeToStderr(o){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(o),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(pm){this.options.stderr.write(o);return}this.log.clear(),this.options.stderr.write(o),this.log(this.lastOutput)}}unmount(o){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),pm?this.options.stdout.write(this.lastOutput+` -`):this.options.debug||this.log.done(),this.isUnmounted=!0,U4.default.updateContainer(null,this.container,null,q7),xZ.default.delete(this.options.stdout),o instanceof Error?this.rejectExitPromise(o):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((o,f)=>{this.resolveExitPromise=o,this.rejectExitPromise=f})),this.exitPromise}clear(){!pm&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=TZ.default((o,f)=>{o==="stdout"&&this.writeToStdout(f),o==="stderr"&&(f.startsWith("The above error occurred")||this.writeToStderr(f))}))}};tc.default=H7});var G7=ce(zg=>{"use strict";var V7=zg&&zg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(zg,"__esModule",{value:!0});var RZ=V7(W7()),j4=V7(p3()),OZ=require("stream"),NZ=(i,o)=>{let f=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},kZ(o)),p=MZ(f.stdout,()=>new RZ.default(f));return p.render(i),{rerender:p.render,unmount:()=>p.unmount(),waitUntilExit:p.waitUntilExit,cleanup:()=>j4.default.delete(f.stdout),clear:p.clear}};zg.default=NZ;var kZ=(i={})=>i instanceof OZ.Stream?{stdout:i,stdin:process.stdin}:i,MZ=(i,o)=>{let f;return j4.default.has(i)?f=j4.default.get(i):(f=o(),j4.default.set(i,f)),f}});var K7=ce(J1=>{"use strict";var LZ=J1&&J1.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),FZ=J1&&J1.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),bZ=J1&&J1.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&LZ(o,i,f);return FZ(o,i),o};Object.defineProperty(J1,"__esModule",{value:!0});var qg=bZ(su()),Y7=i=>{let{items:o,children:f,style:p}=i,[E,t]=qg.useState(0),k=qg.useMemo(()=>o.slice(E),[o,E]);qg.useLayoutEffect(()=>{t(o.length)},[o.length]);let L=k.map((C,U)=>f(C,E+U)),N=qg.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},p),[p]);return qg.default.createElement("ink-box",{internal_static:!0,style:N},L)};Y7.displayName="Static";J1.default=Y7});var Q7=ce(Hg=>{"use strict";var PZ=Hg&&Hg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Hg,"__esModule",{value:!0});var IZ=PZ(su()),X7=({children:i,transform:o})=>i==null?null:IZ.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:o},i);X7.displayName="Transform";Hg.default=X7});var Z7=ce(Wg=>{"use strict";var BZ=Wg&&Wg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wg,"__esModule",{value:!0});var UZ=BZ(su()),J7=({count:i=1})=>UZ.default.createElement("ink-text",null,` -`.repeat(i));J7.displayName="Newline";Wg.default=J7});var tO=ce(Vg=>{"use strict";var $7=Vg&&Vg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vg,"__esModule",{value:!0});var jZ=$7(su()),zZ=$7(B4()),eO=()=>jZ.default.createElement(zZ.default,{flexGrow:1});eO.displayName="Spacer";Vg.default=eO});var z4=ce(Gg=>{"use strict";var qZ=Gg&&Gg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Gg,"__esModule",{value:!0});var HZ=su(),WZ=qZ(y3()),VZ=()=>HZ.useContext(WZ.default);Gg.default=VZ});var rO=ce(Yg=>{"use strict";var GZ=Yg&&Yg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Yg,"__esModule",{value:!0});var nO=su(),YZ=GZ(z4()),KZ=(i,o={})=>{let{stdin:f,setRawMode:p,internal_exitOnCtrlC:E}=YZ.default();nO.useEffect(()=>{if(o.isActive!==!1)return p(!0),()=>{p(!1)}},[o.isActive,p]),nO.useEffect(()=>{if(o.isActive===!1)return;let t=k=>{let L=String(k),N={upArrow:L==="",downArrow:L==="",leftArrow:L==="",rightArrow:L==="",pageDown:L==="[6~",pageUp:L==="[5~",return:L==="\r",escape:L==="",ctrl:!1,shift:!1,tab:L===" "||L==="",backspace:L==="\b",delete:L==="\x7F"||L==="[3~",meta:!1};L<=""&&!N.return&&(L=String.fromCharCode(L.charCodeAt(0)+"a".charCodeAt(0)-1),N.ctrl=!0),L.startsWith("")&&(L=L.slice(1),N.meta=!0);let C=L>="A"&&L<="Z",U=L>="\u0410"&&L<="\u042F";L.length===1&&(C||U)&&(N.shift=!0),N.tab&&L==="[Z"&&(N.shift=!0),(N.tab||N.backspace||N.delete)&&(L=""),(!(L==="c"&&N.ctrl)||!E)&&i(L,N)};return f==null||f.on("data",t),()=>{f==null||f.off("data",t)}},[o.isActive,f,E,i])};Yg.default=KZ});var iO=ce(Kg=>{"use strict";var XZ=Kg&&Kg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Kg,"__esModule",{value:!0});var QZ=su(),JZ=XZ(v3()),ZZ=()=>QZ.useContext(JZ.default);Kg.default=ZZ});var uO=ce(Xg=>{"use strict";var $Z=Xg&&Xg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Xg,"__esModule",{value:!0});var e$=su(),t$=$Z(_3()),n$=()=>e$.useContext(t$.default);Xg.default=n$});var oO=ce(Qg=>{"use strict";var r$=Qg&&Qg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Qg,"__esModule",{value:!0});var i$=su(),u$=r$(D3()),o$=()=>i$.useContext(u$.default);Qg.default=o$});var sO=ce(Jg=>{"use strict";var lO=Jg&&Jg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Jg,"__esModule",{value:!0});var Zg=su(),l$=lO(P4()),s$=lO(z4()),a$=({isActive:i=!0,autoFocus:o=!1}={})=>{let{isRawModeSupported:f,setRawMode:p}=s$.default(),{activeId:E,add:t,remove:k,activate:L,deactivate:N}=Zg.useContext(l$.default),C=Zg.useMemo(()=>Math.random().toString().slice(2,7),[]);return Zg.useEffect(()=>(t(C,{autoFocus:o}),()=>{k(C)}),[C,o]),Zg.useEffect(()=>{i?L(C):N(C)},[i,C]),Zg.useEffect(()=>{if(!(!f||!i))return p(!0),()=>{p(!1)}},[i]),{isFocused:Boolean(C)&&E===C}};Jg.default=a$});var aO=ce($g=>{"use strict";var f$=$g&&$g.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty($g,"__esModule",{value:!0});var c$=su(),d$=f$(P4()),p$=()=>{let i=c$.useContext(d$.default);return{enableFocus:i.enableFocus,disableFocus:i.disableFocus,focusNext:i.focusNext,focusPrevious:i.focusPrevious}};$g.default=p$});var fO=ce(R3=>{"use strict";Object.defineProperty(R3,"__esModule",{value:!0});R3.default=i=>{var o,f,p,E;return{width:(f=(o=i.yogaNode)===null||o===void 0?void 0:o.getComputedWidth())!==null&&f!==void 0?f:0,height:(E=(p=i.yogaNode)===null||p===void 0?void 0:p.getComputedHeight())!==null&&E!==void 0?E:0}}});var lh=ce(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var h$=G7();Object.defineProperty(ql,"render",{enumerable:!0,get:function(){return h$.default}});var v$=B4();Object.defineProperty(ql,"Box",{enumerable:!0,get:function(){return v$.default}});var m$=x3();Object.defineProperty(ql,"Text",{enumerable:!0,get:function(){return m$.default}});var y$=K7();Object.defineProperty(ql,"Static",{enumerable:!0,get:function(){return y$.default}});var g$=Q7();Object.defineProperty(ql,"Transform",{enumerable:!0,get:function(){return g$.default}});var _$=Z7();Object.defineProperty(ql,"Newline",{enumerable:!0,get:function(){return _$.default}});var E$=tO();Object.defineProperty(ql,"Spacer",{enumerable:!0,get:function(){return E$.default}});var D$=rO();Object.defineProperty(ql,"useInput",{enumerable:!0,get:function(){return D$.default}});var w$=iO();Object.defineProperty(ql,"useApp",{enumerable:!0,get:function(){return w$.default}});var S$=z4();Object.defineProperty(ql,"useStdin",{enumerable:!0,get:function(){return S$.default}});var T$=uO();Object.defineProperty(ql,"useStdout",{enumerable:!0,get:function(){return T$.default}});var C$=oO();Object.defineProperty(ql,"useStderr",{enumerable:!0,get:function(){return C$.default}});var x$=sO();Object.defineProperty(ql,"useFocus",{enumerable:!0,get:function(){return x$.default}});var A$=aO();Object.defineProperty(ql,"useFocusManager",{enumerable:!0,get:function(){return A$.default}});var R$=fO();Object.defineProperty(ql,"measureElement",{enumerable:!0,get:function(){return R$.default}})});var k$={};sS(k$,{default:()=>N$,versionUtils:()=>RD});var M3=Mi(require("@yarnpkg/core"));var X_=Mi(require("@yarnpkg/cli")),em=Mi(require("@yarnpkg/core")),Q_=Mi(require("@yarnpkg/core")),cd=Mi(require("clipanion"));var RD={};sS(RD,{Decision:()=>Nu,applyPrerelease:()=>v5,applyReleases:()=>ND,applyStrategy:()=>Y_,clearVersionFiles:()=>OD,fetchBase:()=>pK,fetchChangedFiles:()=>vK,fetchRoot:()=>hK,getUndecidedDependentWorkspaces:()=>Zy,getUndecidedWorkspaces:()=>K_,openVersionFile:()=>$v,requireMoreDecisions:()=>yK,resolveVersionFiles:()=>Jy,suggestStrategy:()=>MD,updateVersionFiles:()=>kD,validateReleaseDecision:()=>Zv});var Gi=Mi(require("@yarnpkg/core")),D0=Mi(require("@yarnpkg/fslib")),W1=Mi(require("@yarnpkg/parsers")),Zp=Mi(require("@yarnpkg/plugin-git")),Jv=Mi(require("clipanion")),h5=Mi(p5()),Fc=Mi(require("semver")),pK=Zp.gitUtils.fetchBase,hK=Zp.gitUtils.fetchRoot,vK=Zp.gitUtils.fetchChangedFiles,mK=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,Nu;(function(k){k.UNDECIDED="undecided",k.DECLINE="decline",k.MAJOR="major",k.MINOR="minor",k.PATCH="patch",k.PRERELEASE="prerelease"})(Nu||(Nu={}));function Zv(i){let o=Fc.default.valid(i);return o||Gi.miscUtils.validateEnum((0,h5.default)(Nu,"UNDECIDED"),i)}async function Jy(i,{prerelease:o=null}={}){var t;let f=new Map,p=i.configuration.get("deferredVersionFolder");if(!D0.xfs.existsSync(p))return new Map;let E=await D0.xfs.readdirPromise(p);for(let k of E){if(!k.endsWith(".yml"))continue;let L=D0.ppath.join(p,k),N=await D0.xfs.readFilePromise(L,"utf8"),C=(0,W1.parseSyml)(N);for(let[U,q]of Object.entries(C.releases||{})){if(q===Nu.DECLINE)continue;let W=Gi.structUtils.parseIdent(U),ne=i.tryWorkspaceByIdent(W);if(ne===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${D0.ppath.basename(L)} references ${U})`);if(ne.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${Gi.structUtils.prettyLocator(i.configuration,ne.anchoredLocator)})`);let m=(t=ne.manifest.raw.stableVersion)!=null?t:ne.manifest.version,we=f.get(ne),Se=Y_(m,Zv(q));if(Se===null)throw new Error(`Assertion failed: Expected ${m} to support being bumped via strategy ${q}`);let he=typeof we!="undefined"?Fc.default.gt(Se,we)?Se:we:Se;f.set(ne,he)}}return o&&(f=new Map([...f].map(([k,L])=>[k,v5(L,{current:k.manifest.version,prerelease:o})]))),f}async function OD(i){let o=i.configuration.get("deferredVersionFolder");!D0.xfs.existsSync(o)||await D0.xfs.removePromise(o)}async function kD(i){let o=i.configuration.get("deferredVersionFolder");if(!D0.xfs.existsSync(o))return;let f=await D0.xfs.readdirPromise(o);for(let p of f){if(!p.endsWith(".yml"))continue;let E=D0.ppath.join(o,p),t=await D0.xfs.readFilePromise(E,"utf8"),k=(0,W1.parseSyml)(t),L=k==null?void 0:k.releases;if(!!L){for(let N of Object.keys(L)){let C=Gi.structUtils.parseLocator(N);i.tryWorkspaceByLocator(C)===null&&delete k.releases[N]}await D0.xfs.changeFilePromise(E,(0,W1.stringifySyml)(new W1.stringifySyml.PreserveOrdering(k)))}}}async function $v(i,{allowEmpty:o=!1}={}){let f=i.configuration;if(f.projectCwd===null)throw new Jv.UsageError("This command can only be run from within a Yarn project");let p=await Zp.gitUtils.fetchRoot(f.projectCwd),E=p!==null?await Zp.gitUtils.fetchBase(p,{baseRefs:f.get("changesetBaseRefs")}):null,t=p!==null?await Zp.gitUtils.fetchChangedFiles(p,{base:E.hash,project:i}):[],k=f.get("deferredVersionFolder"),L=t.filter(ne=>D0.ppath.contains(k,ne)!==null);if(L.length>1)throw new Jv.UsageError(`Your current branch contains multiple versioning files; this isn't supported: -- ${L.map(ne=>D0.npath.fromPortablePath(ne)).join(` -- `)}`);let N=new Set(Gi.miscUtils.mapAndFilter(t,ne=>{let m=i.tryWorkspaceByFilePath(ne);return m===null?Gi.miscUtils.mapAndFilter.skip:m}));if(L.length===0&&N.size===0&&!o)return null;let C=L.length===1?L[0]:D0.ppath.join(k,`${Gi.hashUtils.makeHash(Math.random().toString()).slice(0,8)}.yml`),U=D0.xfs.existsSync(C)?await D0.xfs.readFilePromise(C,"utf8"):"{}",q=(0,W1.parseSyml)(U),W=new Map;for(let ne of q.declined||[]){let m=Gi.structUtils.parseIdent(ne),we=i.getWorkspaceByIdent(m);W.set(we,Nu.DECLINE)}for(let[ne,m]of Object.entries(q.releases||{})){let we=Gi.structUtils.parseIdent(ne),Se=i.getWorkspaceByIdent(we);W.set(Se,Zv(m))}return{project:i,root:p,baseHash:E!==null?E.hash:null,baseTitle:E!==null?E.title:null,changedFiles:new Set(t),changedWorkspaces:N,releaseRoots:new Set([...N].filter(ne=>ne.manifest.version!==null)),releases:W,async saveAll(){let ne={},m=[],we=[];for(let Se of i.workspaces){if(Se.manifest.version===null)continue;let he=Gi.structUtils.stringifyIdent(Se.locator),ge=W.get(Se);ge===Nu.DECLINE?m.push(he):typeof ge!="undefined"?ne[he]=Zv(ge):N.has(Se)&&we.push(he)}await D0.xfs.mkdirPromise(D0.ppath.dirname(C),{recursive:!0}),await D0.xfs.changeFilePromise(C,(0,W1.stringifySyml)(new W1.stringifySyml.PreserveOrdering({releases:Object.keys(ne).length>0?ne:void 0,declined:m.length>0?m:void 0,undecided:we.length>0?we:void 0})))}}}function yK(i){return K_(i).size>0||Zy(i).length>0}function K_(i){let o=new Set;for(let f of i.changedWorkspaces)f.manifest.version!==null&&(i.releases.has(f)||o.add(f));return o}function Zy(i,{include:o=new Set}={}){let f=[],p=new Map(Gi.miscUtils.mapAndFilter([...i.releases],([t,k])=>k===Nu.DECLINE?Gi.miscUtils.mapAndFilter.skip:[t.anchoredLocator.locatorHash,t])),E=new Map(Gi.miscUtils.mapAndFilter([...i.releases],([t,k])=>k!==Nu.DECLINE?Gi.miscUtils.mapAndFilter.skip:[t.anchoredLocator.locatorHash,t]));for(let t of i.project.workspaces)if(!(!o.has(t)&&(E.has(t.anchoredLocator.locatorHash)||p.has(t.anchoredLocator.locatorHash)))&&t.manifest.version!==null)for(let k of Gi.Manifest.hardDependencies)for(let L of t.manifest.getForScope(k).values()){let N=i.project.tryWorkspaceByDescriptor(L);N!==null&&p.has(N.anchoredLocator.locatorHash)&&f.push([t,N])}return f}function MD(i,o){let f=Fc.default.clean(o);for(let p of Object.values(Nu))if(p!==Nu.UNDECIDED&&p!==Nu.DECLINE&&Fc.default.inc(i,p)===f)return p;return null}function Y_(i,o){if(Fc.default.valid(o))return o;if(i===null)throw new Jv.UsageError(`Cannot apply the release strategy "${o}" unless the workspace already has a valid version`);if(!Fc.default.valid(i))throw new Jv.UsageError(`Cannot apply the release strategy "${o}" on a non-semver version (${i})`);let f=Fc.default.inc(i,o);if(f===null)throw new Jv.UsageError(`Cannot apply the release strategy "${o}" on the specified version (${i})`);return f}function ND(i,o,{report:f}){let p=new Map;for(let E of i.workspaces)for(let t of Gi.Manifest.allDependencies)for(let k of E.manifest[t].values()){let L=i.tryWorkspaceByDescriptor(k);if(L===null||!o.has(L))continue;Gi.miscUtils.getArrayWithDefault(p,L).push([E,t,k.identHash])}for(let[E,t]of o){let k=E.manifest.version;E.manifest.version=t,Fc.default.prerelease(t)===null?delete E.manifest.raw.stableVersion:E.manifest.raw.stableVersion||(E.manifest.raw.stableVersion=k);let L=E.manifest.name!==null?Gi.structUtils.stringifyIdent(E.manifest.name):null;f.reportInfo(Gi.MessageName.UNNAMED,`${Gi.structUtils.prettyLocator(i.configuration,E.anchoredLocator)}: Bumped to ${t}`),f.reportJson({cwd:D0.npath.fromPortablePath(E.cwd),ident:L,oldVersion:k,newVersion:t});let N=p.get(E);if(typeof N!="undefined")for(let[C,U,q]of N){let W=C.manifest[U].get(q);if(typeof W=="undefined")throw new Error("Assertion failed: The dependency should have existed");let ne=W.range,m=!1;if(ne.startsWith(Gi.WorkspaceResolver.protocol)&&(ne=ne.slice(Gi.WorkspaceResolver.protocol.length),m=!0,ne===E.relativeCwd))continue;let we=ne.match(mK);if(!we){f.reportWarning(Gi.MessageName.UNNAMED,`Couldn't auto-upgrade range ${ne} (in ${Gi.structUtils.prettyLocator(i.configuration,C.anchoredLocator)})`);continue}let Se=`${we[1]}${t}`;m&&(Se=`${Gi.WorkspaceResolver.protocol}${Se}`);let he=Gi.structUtils.makeDescriptor(W,Se);C.manifest[U].set(q,he)}}}var gK=new Map([["%n",{extract:i=>i.length>=1?[i[0],i.slice(1)]:null,generate:(i=0)=>`${i+1}`}]]);function v5(i,{current:o,prerelease:f}){let p=new Fc.default.SemVer(o),E=p.prerelease.slice(),t=[];p.prerelease=[],p.format()!==i&&(E.length=0);let k=!0,L=f.split(/\./g);for(let N of L){let C=gK.get(N);if(typeof C=="undefined")t.push(N),E[0]===N?E.shift():k=!1;else{let U=k?C.extract(E):null;U!==null&&typeof U[0]=="number"?(t.push(C.generate(U[0])),E=U[1]):(t.push(C.generate()),k=!1)}}return p.prerelease&&(p.prerelease=[]),`${i}-${t.join(".")}`}var $y=class extends X_.BaseCommand{constructor(){super(...arguments);this.all=cd.Option.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=cd.Option.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=cd.Option.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.recursive=cd.Option.Boolean("-R,--recursive",{description:"Release the transitive workspaces as well"});this.json=cd.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let o=await em.Configuration.find(this.context.cwd,this.context.plugins),{project:f,workspace:p}=await Q_.Project.find(o,this.context.cwd),E=await em.Cache.find(o);if(!p)throw new X_.WorkspaceRequiredError(f.cwd,this.context.cwd);return await f.restoreInstallState({restoreResolutions:!1}),(await Q_.StreamReport.start({configuration:o,json:this.json,stdout:this.context.stdout},async k=>{let L=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,N=await Jy(f,{prerelease:L}),C=new Map;if(this.all)C=N;else{let U=this.recursive?p.getRecursiveWorkspaceDependencies():[p];for(let q of U){let W=N.get(q);typeof W!="undefined"&&C.set(q,W)}}if(C.size===0){let U=N.size>0?" Did you want to add --all?":"";k.reportWarning(em.MessageName.UNNAMED,`The current workspace doesn't seem to require a version bump.${U}`);return}ND(f,C,{report:k}),this.dryRun||(L||(this.all?await OD(f):await kD(f)),k.reportSeparator(),await f.install({cache:E,report:k}))})).exitCode()}};$y.paths=[["version","apply"]],$y.usage=cd.Command.Usage({category:"Release-related commands",description:"apply all the deferred version bumps at once",details:` - This command will apply the deferred version changes and remove their definitions from the repository. - - Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%d\`) will be used on all new versions and the version definitions will be kept as-is. - - By default only the current workspace will be bumped, but you can configure this behavior by using one of: - - - \`--recursive\` to also apply the version bump on its dependencies - - \`--all\` to apply the version bump on all packages in the repository - - Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump. - `,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]});var m5=$y;var e_=Mi(require("@yarnpkg/cli")),s0=Mi(require("@yarnpkg/core")),rc=Mi(require("@yarnpkg/fslib"));var cO=Mi(lh()),sh=Mi(su()),dO=(0,sh.memo)(({active:i})=>{let o=(0,sh.useMemo)(()=>i?"\u25C9":"\u25EF",[i]),f=(0,sh.useMemo)(()=>i?"green":"yellow",[i]);return sh.default.createElement(cO.Text,{color:f},o)});var yd=Mi(lh()),Js=Mi(su());var pO=Mi(lh()),q4=Mi(su());function hm({active:i},o,f){let{stdin:p}=(0,pO.useStdin)(),E=(0,q4.useCallback)((t,k)=>o(t,k),f);(0,q4.useEffect)(()=>{if(!(!i||!p))return p.on("keypress",E),()=>{p.off("keypress",E)}},[i,E,p])}var ah;(function(f){f.BEFORE="before",f.AFTER="after"})(ah||(ah={}));var hO=function({active:i},o,f){hm({active:i},(p,E)=>{E.name==="tab"&&(E.shift?o(ah.BEFORE):o(ah.AFTER))},f)};var H4=function(i,o,{active:f,minus:p,plus:E,set:t,loop:k=!0}){hm({active:f},(L,N)=>{let C=o.indexOf(i);switch(N.name){case p:{let U=C-1;if(k){t(o[(o.length+U)%o.length]);return}if(U<0)return;t(o[U])}break;case E:{let U=C+1;if(k){t(o[U%o.length]);return}if(U>=o.length)return;t(o[U])}break}},[o,i,E,t,k])};var O3=({active:i=!0,children:o=[],radius:f=10,size:p=1,loop:E=!0,onFocusRequest:t,willReachEnd:k})=>{let L=Se=>{if(Se.key===null)throw new Error("Expected all children to have a key");return Se.key},N=Js.default.Children.map(o,Se=>L(Se)),C=N[0],[U,q]=(0,Js.useState)(C),W=N.indexOf(U);(0,Js.useEffect)(()=>{N.includes(U)||q(C)},[o]),(0,Js.useEffect)(()=>{k&&W>=N.length-2&&k()},[W]),hO({active:i&&!!t},Se=>{t==null||t(Se)},[t]),H4(U,N,{active:i,minus:"up",plus:"down",set:q,loop:E});let ne=W-f,m=W+f;m>N.length&&(ne-=m-N.length,m=N.length),ne<0&&(m+=-ne,ne=0),m>=N.length&&(m=N.length-1);let we=[];for(let Se=ne;Se<=m;++Se){let he=N[Se],ge=i&&he===U;we.push(Js.default.createElement(yd.Box,{key:he,height:p},Js.default.createElement(yd.Box,{marginLeft:1,marginRight:1},Js.default.createElement(yd.Text,null,ge?Js.default.createElement(yd.Text,{color:"cyan",bold:!0},">"):" ")),Js.default.createElement(yd.Box,null,Js.default.cloneElement(o[Se],{active:ge}))))}return Js.default.createElement(yd.Box,{flexDirection:"column",width:"100%"},we)};var W4=Mi(lh()),k3=Mi(su());var vO=Mi(lh()),Z1=Mi(su()),mO=Mi(require("readline")),O$=Z1.default.createContext(null),yO=({children:i})=>{let{stdin:o,setRawMode:f}=(0,vO.useStdin)();(0,Z1.useEffect)(()=>{f&&f(!0),o&&(0,mO.emitKeypressEvents)(o)},[o,f]);let[p,E]=(0,Z1.useState)(new Map),t=(0,Z1.useMemo)(()=>({getAll:()=>p,get:k=>p.get(k),set:(k,L)=>E(new Map([...p,[k,L]]))}),[p,E]);return Z1.default.createElement(O$.Provider,{value:t,children:i})};async function gO(i,o,{stdin:f,stdout:p,stderr:E}={}){let t,k=N=>{let{exit:C}=(0,W4.useApp)();hm({active:!0},(U,q)=>{q.name==="return"&&(t=N,C())},[C,N])},{waitUntilExit:L}=(0,W4.render)(k3.default.createElement(yO,null,k3.default.createElement(i,Gf(E0({},o),{useSubmit:k}))),{stdin:f,stdout:p,stderr:E});return await L(),t}var fh=Mi(require("clipanion")),Dr=Mi(lh()),Tn=Mi(su()),V4=Mi(require("semver"));var t_=class extends e_.BaseCommand{constructor(){super(...arguments);this.interactive=fh.Option.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){let o=await s0.Configuration.find(this.context.cwd,this.context.plugins),{project:f,workspace:p}=await s0.Project.find(o,this.context.cwd);if(!p)throw new e_.WorkspaceRequiredError(f.cwd,this.context.cwd);await f.restoreInstallState();let E=await $v(f);if(E===null||E.releaseRoots.size===0)return 0;if(E.root===null)throw new fh.UsageError("This command can only be run on Git repositories");let t=()=>Tn.default.createElement(Dr.Box,{flexDirection:"row",paddingBottom:1},Tn.default.createElement(Dr.Box,{flexDirection:"column",width:60},Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,null,"Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},""),"/",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to select workspaces.")),Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,null,"Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},""),"/",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to select release strategies."))),Tn.default.createElement(Dr.Box,{flexDirection:"column"},Tn.default.createElement(Dr.Box,{marginLeft:1},Tn.default.createElement(Dr.Text,null,"Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to save.")),Tn.default.createElement(Dr.Box,{marginLeft:1},Tn.default.createElement(Dr.Text,null,"Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),k=({workspace:W,active:ne,decision:m,setDecision:we})=>{var ze;let Se=(ze=W.manifest.raw.stableVersion)!=null?ze:W.manifest.version;if(Se===null)throw new Error(`Assertion failed: The version should have been set (${s0.structUtils.prettyLocator(o,W.anchoredLocator)})`);if(V4.default.prerelease(Se)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${Se})`);let he=[Nu.UNDECIDED,Nu.DECLINE,Nu.PATCH,Nu.MINOR,Nu.MAJOR];H4(m,he,{active:ne,minus:"left",plus:"right",set:we});let ge=m===Nu.UNDECIDED?Tn.default.createElement(Dr.Text,{color:"yellow"},Se):m===Nu.DECLINE?Tn.default.createElement(Dr.Text,{color:"green"},Se):Tn.default.createElement(Dr.Text,null,Tn.default.createElement(Dr.Text,{color:"magenta"},Se)," \u2192 ",Tn.default.createElement(Dr.Text,{color:"green"},V4.default.valid(m)?m:V4.default.inc(Se,m)));return Tn.default.createElement(Dr.Box,{flexDirection:"column"},Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,null,s0.structUtils.prettyLocator(o,W.anchoredLocator)," - ",ge)),Tn.default.createElement(Dr.Box,null,he.map(pe=>Tn.default.createElement(Dr.Box,{key:pe,paddingLeft:2},Tn.default.createElement(Dr.Text,null,Tn.default.createElement(dO,{active:pe===m})," ",pe)))))},L=W=>{let ne=new Set(E.releaseRoots),m=new Map([...W].filter(([we])=>ne.has(we)));for(;;){let we=Zy({project:E.project,releases:m}),Se=!1;if(we.length>0){for(let[he]of we)if(!ne.has(he)){ne.add(he),Se=!0;let ge=W.get(he);typeof ge!="undefined"&&m.set(he,ge)}}if(!Se)break}return{relevantWorkspaces:ne,relevantReleases:m}},N=()=>{let[W,ne]=(0,Tn.useState)(()=>new Map(E.releases)),m=(0,Tn.useCallback)((we,Se)=>{let he=new Map(W);Se!==Nu.UNDECIDED?he.set(we,Se):he.delete(we);let{relevantReleases:ge}=L(he);ne(ge)},[W,ne]);return[W,m]},C=({workspaces:W,releases:ne})=>{let m=[];m.push(`${W.size} total`);let we=0,Se=0;for(let he of W){let ge=ne.get(he);typeof ge=="undefined"?Se+=1:ge!==Nu.DECLINE&&(we+=1)}return m.push(`${we} release${we===1?"":"s"}`),m.push(`${Se} remaining`),Tn.default.createElement(Dr.Text,{color:"yellow"},m.join(", "))},q=await gO(({useSubmit:W})=>{let[ne,m]=N();W(ne);let{relevantWorkspaces:we}=L(ne),Se=new Set([...we].filter(pe=>!E.releaseRoots.has(pe))),[he,ge]=(0,Tn.useState)(0),ze=(0,Tn.useCallback)(pe=>{switch(pe){case ah.BEFORE:ge(he-1);break;case ah.AFTER:ge(he+1);break}},[he,ge]);return Tn.default.createElement(Dr.Box,{flexDirection:"column"},Tn.default.createElement(t,null),Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,{wrap:"wrap"},"The following files have been modified in your local checkout.")),Tn.default.createElement(Dr.Box,{flexDirection:"column",marginTop:1,paddingLeft:2},[...E.changedFiles].map(pe=>Tn.default.createElement(Dr.Box,{key:pe},Tn.default.createElement(Dr.Text,null,Tn.default.createElement(Dr.Text,{color:"grey"},rc.npath.fromPortablePath(E.root)),rc.npath.sep,rc.npath.relative(rc.npath.fromPortablePath(E.root),rc.npath.fromPortablePath(pe)))))),E.releaseRoots.size>0&&Tn.default.createElement(Tn.default.Fragment,null,Tn.default.createElement(Dr.Box,{marginTop:1},Tn.default.createElement(Dr.Text,{wrap:"wrap"},"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):")),Se.size>3?Tn.default.createElement(Dr.Box,{marginTop:1},Tn.default.createElement(C,{workspaces:E.releaseRoots,releases:ne})):null,Tn.default.createElement(Dr.Box,{marginTop:1,flexDirection:"column"},Tn.default.createElement(O3,{active:he%2==0,radius:1,size:2,onFocusRequest:ze},[...E.releaseRoots].map(pe=>Tn.default.createElement(k,{key:pe.cwd,workspace:pe,decision:ne.get(pe)||Nu.UNDECIDED,setDecision:Oe=>m(pe,Oe)}))))),Se.size>0?Tn.default.createElement(Tn.default.Fragment,null,Tn.default.createElement(Dr.Box,{marginTop:1},Tn.default.createElement(Dr.Text,{wrap:"wrap"},"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:")),Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,null,"(Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to move the focus between the workspace groups.)")),Se.size>5?Tn.default.createElement(Dr.Box,{marginTop:1},Tn.default.createElement(C,{workspaces:Se,releases:ne})):null,Tn.default.createElement(Dr.Box,{marginTop:1,flexDirection:"column"},Tn.default.createElement(O3,{active:he%2==1,radius:2,size:2,onFocusRequest:ze},[...Se].map(pe=>Tn.default.createElement(k,{key:pe.cwd,workspace:pe,decision:ne.get(pe)||Nu.UNDECIDED,setDecision:Oe=>m(pe,Oe)}))))):null)},{versionFile:E},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof q=="undefined")return 1;E.releases.clear();for(let[W,ne]of q)E.releases.set(W,ne);await E.saveAll()}async executeStandard(){let o=await s0.Configuration.find(this.context.cwd,this.context.plugins),{project:f,workspace:p}=await s0.Project.find(o,this.context.cwd);if(!p)throw new e_.WorkspaceRequiredError(f.cwd,this.context.cwd);return await f.restoreInstallState(),(await s0.StreamReport.start({configuration:o,stdout:this.context.stdout},async t=>{let k=await $v(f);if(k===null||k.releaseRoots.size===0)return;if(k.root===null)throw new fh.UsageError("This command can only be run on Git repositories");if(t.reportInfo(s0.MessageName.UNNAMED,`Your PR was started right after ${s0.formatUtils.pretty(o,k.baseHash.slice(0,7),"yellow")} ${s0.formatUtils.pretty(o,k.baseTitle,"magenta")}`),k.changedFiles.size>0){t.reportInfo(s0.MessageName.UNNAMED,"You have changed the following files since then:"),t.reportSeparator();for(let q of k.changedFiles)t.reportInfo(null,`${s0.formatUtils.pretty(o,rc.npath.fromPortablePath(k.root),"gray")}${rc.npath.sep}${rc.npath.relative(rc.npath.fromPortablePath(k.root),rc.npath.fromPortablePath(q))}`)}let L=!1,N=!1,C=K_(k);if(C.size>0){L||t.reportSeparator();for(let q of C)t.reportError(s0.MessageName.UNNAMED,`${s0.structUtils.prettyLocator(o,q.anchoredLocator)} has been modified but doesn't have a release strategy attached`);L=!0}let U=Zy(k);for(let[q,W]of U)N||t.reportSeparator(),t.reportError(s0.MessageName.UNNAMED,`${s0.structUtils.prettyLocator(o,q.anchoredLocator)} doesn't have a release strategy attached, but depends on ${s0.structUtils.prettyWorkspace(o,W)} which is planned for release.`),N=!0;(L||N)&&(t.reportSeparator(),t.reportInfo(s0.MessageName.UNNAMED,"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed)."),t.reportInfo(s0.MessageName.UNNAMED,"To correct these errors, run `yarn version check --interactive` then follow the instructions."))})).exitCode()}};t_.paths=[["version","check"]],t_.usage=fh.Command.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]});var _O=t_;var G4=Mi(require("@yarnpkg/cli")),Y4=Mi(require("@yarnpkg/core")),Bc=Mi(require("clipanion")),K4=Mi(require("semver"));var n_=class extends G4.BaseCommand{constructor(){super(...arguments);this.deferred=Bc.Option.Boolean("-d,--deferred",{description:"Prepare the version to be bumped during the next release cycle"});this.immediate=Bc.Option.Boolean("-i,--immediate",{description:"Bump the version immediately"});this.strategy=Bc.Option.String()}async execute(){let o=await Y4.Configuration.find(this.context.cwd,this.context.plugins),{project:f,workspace:p}=await Y4.Project.find(o,this.context.cwd);if(!p)throw new G4.WorkspaceRequiredError(f.cwd,this.context.cwd);let E=o.get("preferDeferredVersions");this.deferred&&(E=!0),this.immediate&&(E=!1);let t=K4.default.valid(this.strategy),k=this.strategy===Nu.DECLINE,L;if(t)if(p.manifest.version!==null){let C=MD(p.manifest.version,this.strategy);C!==null?L=C:L=this.strategy}else L=this.strategy;else{let C=p.manifest.version;if(!k){if(C===null)throw new Bc.UsageError("Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.");if(typeof C!="string"||!K4.default.valid(C))throw new Bc.UsageError(`Can't bump the version (${C}) if it's not valid semver`)}L=Zv(this.strategy)}if(!E){let U=(await Jy(f)).get(p);if(typeof U!="undefined"&&L!==Nu.DECLINE){let q=Y_(p.manifest.version,L);if(K4.default.lt(q,U))throw new Bc.UsageError(`Can't bump the version to one that would be lower than the current deferred one (${U})`)}}let N=await $v(f,{allowEmpty:!0});return N.releases.set(p,L),await N.saveAll(),E?0:await this.cli.run(["version","apply"])}};n_.paths=[["version"]],n_.usage=Bc.Command.Usage({category:"Release-related commands",description:"apply a new version to the current package",details:"\n This command will bump the version number for the given package, following the specified strategy:\n\n - If `major`, the first number from the semver range will be increased (`X.0.0`).\n - If `minor`, the second number from the semver range will be increased (`0.X.0`).\n - If `patch`, the third number from the semver range will be increased (`0.0.X`).\n - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\n - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\n - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\n - If a valid semver range, it will be used as new version.\n - If unspecified, Yarn will ask you for guidance.\n\n For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\n ",examples:[["Immediately bump the version to the next major","yarn version major"],["Prepare the version to be bumped to the next major","yarn version major --deferred"]]});var EO=n_;var M$={configuration:{deferredVersionFolder:{description:"Folder where are stored the versioning files",type:M3.SettingsType.ABSOLUTE_PATH,default:"./.yarn/versions"},preferDeferredVersions:{description:"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set",type:M3.SettingsType.BOOLEAN,default:!1}},commands:[m5,_O,EO]},N$=M$;return k$;})(); -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-debug-tools.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler-tracing.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler-tracing.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.24.0 - * react-reconciler.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.24.0 - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v16.13.1 - * react.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v16.13.1 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -return plugin; -} -}; diff --git a/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs b/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs deleted file mode 100644 index fc27b01d3..000000000 --- a/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-workspace-tools", -factory: function (require) { -var plugin=(()=>{var _r=Object.create;var we=Object.defineProperty;var Er=Object.getOwnPropertyDescriptor;var br=Object.getOwnPropertyNames;var xr=Object.getPrototypeOf,Cr=Object.prototype.hasOwnProperty;var W=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var q=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),wr=(e,r)=>{for(var t in r)we(e,t,{get:r[t],enumerable:!0})},Je=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of br(r))!Cr.call(e,s)&&s!==t&&we(e,s,{get:()=>r[s],enumerable:!(n=Er(r,s))||n.enumerable});return e};var Be=(e,r,t)=>(t=e!=null?_r(xr(e)):{},Je(r||!e||!e.__esModule?we(t,"default",{value:e,enumerable:!0}):t,e)),Sr=e=>Je(we({},"__esModule",{value:!0}),e);var ve=q(ee=>{"use strict";ee.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;ee.find=(e,r)=>e.nodes.find(t=>t.type===r);ee.exceedsLimit=(e,r,t=1,n)=>n===!1||!ee.isInteger(e)||!ee.isInteger(r)?!1:(Number(r)-Number(e))/Number(t)>=n;ee.escapeNode=(e,r=0,t)=>{let n=e.nodes[r];!n||(t&&n.type===t||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};ee.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;ee.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;ee.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;ee.reduce=e=>e.reduce((r,t)=>(t.type==="text"&&r.push(t.value),t.type==="range"&&(t.type="text"),r),[]);ee.flatten=(...e)=>{let r=[],t=n=>{for(let s=0;s{"use strict";var tt=ve();rt.exports=(e,r={})=>{let t=(n,s={})=>{let i=r.escapeInvalid&&tt.isInvalidBrace(s),a=n.invalid===!0&&r.escapeInvalid===!0,c="";if(n.value)return(i||a)&&tt.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let p of n.nodes)c+=t(p);return c};return t(e)}});var st=q((Jn,nt)=>{"use strict";nt.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var ht=q((es,pt)=>{"use strict";var at=st(),le=(e,r,t)=>{if(at(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(r===void 0||e===r)return String(e);if(at(r)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...t};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),i=String(n.shorthand),a=String(n.capture),c=String(n.wrap),p=e+":"+r+"="+s+i+a+c;if(le.cache.hasOwnProperty(p))return le.cache[p].result;let m=Math.min(e,r),h=Math.max(e,r);if(Math.abs(m-h)===1){let y=e+"|"+r;return n.capture?`(${y})`:n.wrap===!1?y:`(?:${y})`}let R=ft(e)||ft(r),f={min:e,max:r,a:m,b:h},$=[],_=[];if(R&&(f.isPadded=R,f.maxLen=String(f.max).length),m<0){let y=h<0?Math.abs(h):1;_=it(y,Math.abs(m),f,n),m=f.a=0}return h>=0&&($=it(m,h,f,n)),f.negatives=_,f.positives=$,f.result=vr(_,$,n),n.capture===!0?f.result=`(${f.result})`:n.wrap!==!1&&$.length+_.length>1&&(f.result=`(?:${f.result})`),le.cache[p]=f,f.result};function vr(e,r,t){let n=Me(e,r,"-",!1,t)||[],s=Me(r,e,"",!1,t)||[],i=Me(e,r,"-?",!0,t)||[];return n.concat(i).concat(s).join("|")}function Hr(e,r){let t=1,n=1,s=ut(e,t),i=new Set([r]);for(;e<=s&&s<=r;)i.add(s),t+=1,s=ut(e,t);for(s=ct(r+1,n)-1;e1&&c.count.pop(),c.count.push(h.count[0]),c.string=c.pattern+lt(c.count),a=m+1;continue}t.isPadded&&(R=Or(m,t,n)),h.string=R+h.pattern+lt(h.count),i.push(h),a=m+1,c=h}return i}function Me(e,r,t,n,s){let i=[];for(let a of e){let{string:c}=a;!n&&!ot(r,"string",c)&&i.push(t+c),n&&ot(r,"string",c)&&i.push(t+c)}return i}function Tr(e,r){let t=[];for(let n=0;nr?1:r>e?-1:0}function ot(e,r,t){return e.some(n=>n[r]===t)}function ut(e,r){return Number(String(e).slice(0,-r)+"9".repeat(r))}function ct(e,r){return e-e%Math.pow(10,r)}function lt(e){let[r=0,t=""]=e;return t||r>1?`{${r+(t?","+t:"")}}`:""}function Lr(e,r,t){return`[${e}${r-e===1?"":"-"}${r}]`}function ft(e){return/^-?(0+)\d/.test(e)}function Or(e,r,t){if(!r.isPadded)return e;let n=Math.abs(r.maxLen-String(e).length),s=t.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}le.cache={};le.clearCache=()=>le.cache={};pt.exports=le});var Ue=q((ts,Et)=>{"use strict";var Nr=W("util"),At=ht(),dt=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Ir=e=>r=>e===!0?Number(r):String(r),Pe=e=>typeof e=="number"||typeof e=="string"&&e!=="",Ae=e=>Number.isInteger(+e),De=e=>{let r=`${e}`,t=-1;if(r[0]==="-"&&(r=r.slice(1)),r==="0")return!1;for(;r[++t]==="0";);return t>0},Br=(e,r,t)=>typeof e=="string"||typeof r=="string"?!0:t.stringify===!0,Mr=(e,r,t)=>{if(r>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?r-1:r,"0")}return t===!1?String(e):e},gt=(e,r)=>{let t=e[0]==="-"?"-":"";for(t&&(e=e.slice(1),r--);e.length{e.negatives.sort((a,c)=>ac?1:0),e.positives.sort((a,c)=>ac?1:0);let t=r.capture?"":"?:",n="",s="",i;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(s=`-(${t}${e.negatives.join("|")})`),n&&s?i=`${n}|${s}`:i=n||s,r.wrap?`(${t}${i})`:i},mt=(e,r,t,n)=>{if(t)return At(e,r,{wrap:!1,...n});let s=String.fromCharCode(e);if(e===r)return s;let i=String.fromCharCode(r);return`[${s}-${i}]`},Rt=(e,r,t)=>{if(Array.isArray(e)){let n=t.wrap===!0,s=t.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return At(e,r,t)},yt=(...e)=>new RangeError("Invalid range arguments: "+Nr.inspect(...e)),_t=(e,r,t)=>{if(t.strictRanges===!0)throw yt([e,r]);return[]},Dr=(e,r)=>{if(r.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},Ur=(e,r,t=1,n={})=>{let s=Number(e),i=Number(r);if(!Number.isInteger(s)||!Number.isInteger(i)){if(n.strictRanges===!0)throw yt([e,r]);return[]}s===0&&(s=0),i===0&&(i=0);let a=s>i,c=String(e),p=String(r),m=String(t);t=Math.max(Math.abs(t),1);let h=De(c)||De(p)||De(m),R=h?Math.max(c.length,p.length,m.length):0,f=h===!1&&Br(e,r,n)===!1,$=n.transform||Ir(f);if(n.toRegex&&t===1)return mt(gt(e,R),gt(r,R),!0,n);let _={negatives:[],positives:[]},y=T=>_[T<0?"negatives":"positives"].push(Math.abs(T)),E=[],S=0;for(;a?s>=i:s<=i;)n.toRegex===!0&&t>1?y(s):E.push(Mr($(s,S),R,f)),s=a?s-t:s+t,S++;return n.toRegex===!0?t>1?Pr(_,n):Rt(E,null,{wrap:!1,...n}):E},Gr=(e,r,t=1,n={})=>{if(!Ae(e)&&e.length>1||!Ae(r)&&r.length>1)return _t(e,r,n);let s=n.transform||(f=>String.fromCharCode(f)),i=`${e}`.charCodeAt(0),a=`${r}`.charCodeAt(0),c=i>a,p=Math.min(i,a),m=Math.max(i,a);if(n.toRegex&&t===1)return mt(p,m,!1,n);let h=[],R=0;for(;c?i>=a:i<=a;)h.push(s(i,R)),i=c?i-t:i+t,R++;return n.toRegex===!0?Rt(h,null,{wrap:!1,options:n}):h},$e=(e,r,t,n={})=>{if(r==null&&Pe(e))return[e];if(!Pe(e)||!Pe(r))return _t(e,r,n);if(typeof t=="function")return $e(e,r,1,{transform:t});if(dt(t))return $e(e,r,0,t);let s={...n};return s.capture===!0&&(s.wrap=!0),t=t||s.step||1,Ae(t)?Ae(e)&&Ae(r)?Ur(e,r,t,s):Gr(e,r,Math.max(Math.abs(t),1),s):t!=null&&!dt(t)?Dr(t,s):$e(e,r,1,t)};Et.exports=$e});var Ct=q((rs,xt)=>{"use strict";var qr=Ue(),bt=ve(),Kr=(e,r={})=>{let t=(n,s={})=>{let i=bt.isInvalidBrace(s),a=n.invalid===!0&&r.escapeInvalid===!0,c=i===!0||a===!0,p=r.escapeInvalid===!0?"\\":"",m="";if(n.isOpen===!0||n.isClose===!0)return p+n.value;if(n.type==="open")return c?p+n.value:"(";if(n.type==="close")return c?p+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":c?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let h=bt.reduce(n.nodes),R=qr(...h,{...r,wrap:!1,toRegex:!0});if(R.length!==0)return h.length>1&&R.length>1?`(${R})`:R}if(n.nodes)for(let h of n.nodes)m+=t(h,n);return m};return t(e)};xt.exports=Kr});var vt=q((ns,St)=>{"use strict";var Wr=Ue(),wt=He(),he=ve(),fe=(e="",r="",t=!1)=>{let n=[];if(e=[].concat(e),r=[].concat(r),!r.length)return e;if(!e.length)return t?he.flatten(r).map(s=>`{${s}}`):r;for(let s of e)if(Array.isArray(s))for(let i of s)n.push(fe(i,r,t));else for(let i of r)t===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?fe(s,i,t):s+i);return he.flatten(n)},jr=(e,r={})=>{let t=r.rangeLimit===void 0?1e3:r.rangeLimit,n=(s,i={})=>{s.queue=[];let a=i,c=i.queue;for(;a.type!=="brace"&&a.type!=="root"&&a.parent;)a=a.parent,c=a.queue;if(s.invalid||s.dollar){c.push(fe(c.pop(),wt(s,r)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){c.push(fe(c.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let R=he.reduce(s.nodes);if(he.exceedsLimit(...R,r.step,t))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let f=Wr(...R,r);f.length===0&&(f=wt(s,r)),c.push(fe(c.pop(),f)),s.nodes=[];return}let p=he.encloseBrace(s),m=s.queue,h=s;for(;h.type!=="brace"&&h.type!=="root"&&h.parent;)h=h.parent,m=h.queue;for(let R=0;R{"use strict";Ht.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` -`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Nt=q((as,Ot)=>{"use strict";var Fr=He(),{MAX_LENGTH:Tt,CHAR_BACKSLASH:Ge,CHAR_BACKTICK:Qr,CHAR_COMMA:Xr,CHAR_DOT:Zr,CHAR_LEFT_PARENTHESES:Yr,CHAR_RIGHT_PARENTHESES:zr,CHAR_LEFT_CURLY_BRACE:Vr,CHAR_RIGHT_CURLY_BRACE:Jr,CHAR_LEFT_SQUARE_BRACKET:kt,CHAR_RIGHT_SQUARE_BRACKET:Lt,CHAR_DOUBLE_QUOTE:en,CHAR_SINGLE_QUOTE:tn,CHAR_NO_BREAK_SPACE:rn,CHAR_ZERO_WIDTH_NOBREAK_SPACE:nn}=$t(),sn=(e,r={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let t=r||{},n=typeof t.maxLength=="number"?Math.min(Tt,t.maxLength):Tt;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},i=[s],a=s,c=s,p=0,m=e.length,h=0,R=0,f,$={},_=()=>e[h++],y=E=>{if(E.type==="text"&&c.type==="dot"&&(c.type="text"),c&&c.type==="text"&&E.type==="text"){c.value+=E.value;return}return a.nodes.push(E),E.parent=a,E.prev=c,c=E,E};for(y({type:"bos"});h0){if(a.ranges>0){a.ranges=0;let E=a.nodes.shift();a.nodes=[E,{type:"text",value:Fr(a)}]}y({type:"comma",value:f}),a.commas++;continue}if(f===Zr&&R>0&&a.commas===0){let E=a.nodes;if(R===0||E.length===0){y({type:"text",value:f});continue}if(c.type==="dot"){if(a.range=[],c.value+=f,c.type="range",a.nodes.length!==3&&a.nodes.length!==5){a.invalid=!0,a.ranges=0,c.type="text";continue}a.ranges++,a.args=[];continue}if(c.type==="range"){E.pop();let S=E[E.length-1];S.value+=c.value+f,c=S,a.ranges--;continue}y({type:"dot",value:f});continue}y({type:"text",value:f})}do if(a=i.pop(),a.type!=="root"){a.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let E=i[i.length-1],S=E.nodes.indexOf(a);E.nodes.splice(S,1,...a.nodes)}while(i.length>0);return y({type:"eos"}),s};Ot.exports=sn});var Mt=q((is,Bt)=>{"use strict";var It=He(),an=Ct(),on=vt(),un=Nt(),X=(e,r={})=>{let t=[];if(Array.isArray(e))for(let n of e){let s=X.create(n,r);Array.isArray(s)?t.push(...s):t.push(s)}else t=[].concat(X.create(e,r));return r&&r.expand===!0&&r.nodupes===!0&&(t=[...new Set(t)]),t};X.parse=(e,r={})=>un(e,r);X.stringify=(e,r={})=>It(typeof e=="string"?X.parse(e,r):e,r);X.compile=(e,r={})=>(typeof e=="string"&&(e=X.parse(e,r)),an(e,r));X.expand=(e,r={})=>{typeof e=="string"&&(e=X.parse(e,r));let t=on(e,r);return r.noempty===!0&&(t=t.filter(Boolean)),r.nodupes===!0&&(t=[...new Set(t)]),t};X.create=(e,r={})=>e===""||e.length<3?[e]:r.expand!==!0?X.compile(e,r):X.expand(e,r);Bt.exports=X});var me=q((os,qt)=>{"use strict";var cn=W("path"),se="\\\\/",Pt=`[^${se}]`,ie="\\.",ln="\\+",fn="\\?",Te="\\/",pn="(?=.)",Dt="[^/]",qe=`(?:${Te}|$)`,Ut=`(?:^|${Te})`,Ke=`${ie}{1,2}${qe}`,hn=`(?!${ie})`,dn=`(?!${Ut}${Ke})`,gn=`(?!${ie}{0,1}${qe})`,An=`(?!${Ke})`,mn=`[^.${Te}]`,Rn=`${Dt}*?`,Gt={DOT_LITERAL:ie,PLUS_LITERAL:ln,QMARK_LITERAL:fn,SLASH_LITERAL:Te,ONE_CHAR:pn,QMARK:Dt,END_ANCHOR:qe,DOTS_SLASH:Ke,NO_DOT:hn,NO_DOTS:dn,NO_DOT_SLASH:gn,NO_DOTS_SLASH:An,QMARK_NO_DOT:mn,STAR:Rn,START_ANCHOR:Ut},yn={...Gt,SLASH_LITERAL:`[${se}]`,QMARK:Pt,STAR:`${Pt}*?`,DOTS_SLASH:`${ie}{1,2}(?:[${se}]|$)`,NO_DOT:`(?!${ie})`,NO_DOTS:`(?!(?:^|[${se}])${ie}{1,2}(?:[${se}]|$))`,NO_DOT_SLASH:`(?!${ie}{0,1}(?:[${se}]|$))`,NO_DOTS_SLASH:`(?!${ie}{1,2}(?:[${se}]|$))`,QMARK_NO_DOT:`[^.${se}]`,START_ANCHOR:`(?:^|[${se}])`,END_ANCHOR:`(?:[${se}]|$)`},_n={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};qt.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:_n,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:cn.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?yn:Gt}}});var Re=q(F=>{"use strict";var En=W("path"),bn=process.platform==="win32",{REGEX_BACKSLASH:xn,REGEX_REMOVE_BACKSLASH:Cn,REGEX_SPECIAL_CHARS:wn,REGEX_SPECIAL_CHARS_GLOBAL:Sn}=me();F.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);F.hasRegexChars=e=>wn.test(e);F.isRegexChar=e=>e.length===1&&F.hasRegexChars(e);F.escapeRegex=e=>e.replace(Sn,"\\$1");F.toPosixSlashes=e=>e.replace(xn,"/");F.removeBackslashes=e=>e.replace(Cn,r=>r==="\\"?"":r);F.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};F.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:bn===!0||En.sep==="\\";F.escapeLast=(e,r,t)=>{let n=e.lastIndexOf(r,t);return n===-1?e:e[n-1]==="\\"?F.escapeLast(e,r,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};F.removePrefix=(e,r={})=>{let t=e;return t.startsWith("./")&&(t=t.slice(2),r.prefix="./"),t};F.wrapOutput=(e,r={},t={})=>{let n=t.contains?"":"^",s=t.contains?"":"$",i=`${n}(?:${e})${s}`;return r.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var Yt=q((cs,Zt)=>{"use strict";var Kt=Re(),{CHAR_ASTERISK:We,CHAR_AT:vn,CHAR_BACKWARD_SLASH:ye,CHAR_COMMA:Hn,CHAR_DOT:je,CHAR_EXCLAMATION_MARK:Fe,CHAR_FORWARD_SLASH:Xt,CHAR_LEFT_CURLY_BRACE:Qe,CHAR_LEFT_PARENTHESES:Xe,CHAR_LEFT_SQUARE_BRACKET:$n,CHAR_PLUS:Tn,CHAR_QUESTION_MARK:Wt,CHAR_RIGHT_CURLY_BRACE:kn,CHAR_RIGHT_PARENTHESES:jt,CHAR_RIGHT_SQUARE_BRACKET:Ln}=me(),Ft=e=>e===Xt||e===ye,Qt=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},On=(e,r)=>{let t=r||{},n=e.length-1,s=t.parts===!0||t.scanToEnd===!0,i=[],a=[],c=[],p=e,m=-1,h=0,R=0,f=!1,$=!1,_=!1,y=!1,E=!1,S=!1,T=!1,L=!1,z=!1,I=!1,re=0,K,g,v={value:"",depth:0,isGlob:!1},k=()=>m>=n,l=()=>p.charCodeAt(m+1),H=()=>(K=g,p.charCodeAt(++m));for(;m0&&(B=p.slice(0,h),p=p.slice(h),R-=h),w&&_===!0&&R>0?(w=p.slice(0,R),o=p.slice(R)):_===!0?(w="",o=p):w=p,w&&w!==""&&w!=="/"&&w!==p&&Ft(w.charCodeAt(w.length-1))&&(w=w.slice(0,-1)),t.unescape===!0&&(o&&(o=Kt.removeBackslashes(o)),w&&T===!0&&(w=Kt.removeBackslashes(w)));let u={prefix:B,input:e,start:h,base:w,glob:o,isBrace:f,isBracket:$,isGlob:_,isExtglob:y,isGlobstar:E,negated:L,negatedExtglob:z};if(t.tokens===!0&&(u.maxDepth=0,Ft(g)||a.push(v),u.tokens=a),t.parts===!0||t.tokens===!0){let M;for(let b=0;b{"use strict";var ke=me(),Z=Re(),{MAX_LENGTH:Le,POSIX_REGEX_SOURCE:Nn,REGEX_NON_SPECIAL_CHARS:In,REGEX_SPECIAL_CHARS_BACKREF:Bn,REPLACEMENTS:zt}=ke,Mn=(e,r)=>{if(typeof r.expandRange=="function")return r.expandRange(...e,r);e.sort();let t=`[${e.join("-")}]`;try{new RegExp(t)}catch{return e.map(s=>Z.escapeRegex(s)).join("..")}return t},de=(e,r)=>`Missing ${e}: "${r}" - use "\\\\${r}" to match literal characters`,Vt=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=zt[e]||e;let t={...r},n=typeof t.maxLength=="number"?Math.min(Le,t.maxLength):Le,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);let i={type:"bos",value:"",output:t.prepend||""},a=[i],c=t.capture?"":"?:",p=Z.isWindows(r),m=ke.globChars(p),h=ke.extglobChars(m),{DOT_LITERAL:R,PLUS_LITERAL:f,SLASH_LITERAL:$,ONE_CHAR:_,DOTS_SLASH:y,NO_DOT:E,NO_DOT_SLASH:S,NO_DOTS_SLASH:T,QMARK:L,QMARK_NO_DOT:z,STAR:I,START_ANCHOR:re}=m,K=A=>`(${c}(?:(?!${re}${A.dot?y:R}).)*?)`,g=t.dot?"":E,v=t.dot?L:z,k=t.bash===!0?K(t):I;t.capture&&(k=`(${k})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let l={input:e,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};e=Z.removePrefix(e,l),s=e.length;let H=[],w=[],B=[],o=i,u,M=()=>l.index===s-1,b=l.peek=(A=1)=>e[l.index+A],V=l.advance=()=>e[++l.index]||"",J=()=>e.slice(l.index+1),Q=(A="",O=0)=>{l.consumed+=A,l.index+=O},Ee=A=>{l.output+=A.output!=null?A.output:A.value,Q(A.value)},Rr=()=>{let A=1;for(;b()==="!"&&(b(2)!=="("||b(3)==="?");)V(),l.start++,A++;return A%2===0?!1:(l.negated=!0,l.start++,!0)},be=A=>{l[A]++,B.push(A)},oe=A=>{l[A]--,B.pop()},C=A=>{if(o.type==="globstar"){let O=l.braces>0&&(A.type==="comma"||A.type==="brace"),d=A.extglob===!0||H.length&&(A.type==="pipe"||A.type==="paren");A.type!=="slash"&&A.type!=="paren"&&!O&&!d&&(l.output=l.output.slice(0,-o.output.length),o.type="star",o.value="*",o.output=k,l.output+=o.output)}if(H.length&&A.type!=="paren"&&(H[H.length-1].inner+=A.value),(A.value||A.output)&&Ee(A),o&&o.type==="text"&&A.type==="text"){o.value+=A.value,o.output=(o.output||"")+A.value;return}A.prev=o,a.push(A),o=A},xe=(A,O)=>{let d={...h[O],conditions:1,inner:""};d.prev=o,d.parens=l.parens,d.output=l.output;let x=(t.capture?"(":"")+d.open;be("parens"),C({type:A,value:O,output:l.output?"":_}),C({type:"paren",extglob:!0,value:V(),output:x}),H.push(d)},yr=A=>{let O=A.close+(t.capture?")":""),d;if(A.type==="negate"){let x=k;A.inner&&A.inner.length>1&&A.inner.includes("/")&&(x=K(t)),(x!==k||M()||/^\)+$/.test(J()))&&(O=A.close=`)$))${x}`),A.inner.includes("*")&&(d=J())&&/^\.[^\\/.]+$/.test(d)&&(O=A.close=`)${d})${x})`),A.prev.type==="bos"&&(l.negatedExtglob=!0)}C({type:"paren",extglob:!0,value:u,output:O}),oe("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let A=!1,O=e.replace(Bn,(d,x,P,j,G,Ie)=>j==="\\"?(A=!0,d):j==="?"?x?x+j+(G?L.repeat(G.length):""):Ie===0?v+(G?L.repeat(G.length):""):L.repeat(P.length):j==="."?R.repeat(P.length):j==="*"?x?x+j+(G?k:""):k:x?d:`\\${d}`);return A===!0&&(t.unescape===!0?O=O.replace(/\\/g,""):O=O.replace(/\\+/g,d=>d.length%2===0?"\\\\":d?"\\":"")),O===e&&t.contains===!0?(l.output=e,l):(l.output=Z.wrapOutput(O,l,r),l)}for(;!M();){if(u=V(),u==="\0")continue;if(u==="\\"){let d=b();if(d==="/"&&t.bash!==!0||d==="."||d===";")continue;if(!d){u+="\\",C({type:"text",value:u});continue}let x=/^\\+/.exec(J()),P=0;if(x&&x[0].length>2&&(P=x[0].length,l.index+=P,P%2!==0&&(u+="\\")),t.unescape===!0?u=V():u+=V(),l.brackets===0){C({type:"text",value:u});continue}}if(l.brackets>0&&(u!=="]"||o.value==="["||o.value==="[^")){if(t.posix!==!1&&u===":"){let d=o.value.slice(1);if(d.includes("[")&&(o.posix=!0,d.includes(":"))){let x=o.value.lastIndexOf("["),P=o.value.slice(0,x),j=o.value.slice(x+2),G=Nn[j];if(G){o.value=P+G,l.backtrack=!0,V(),!i.output&&a.indexOf(o)===1&&(i.output=_);continue}}}(u==="["&&b()!==":"||u==="-"&&b()==="]")&&(u=`\\${u}`),u==="]"&&(o.value==="["||o.value==="[^")&&(u=`\\${u}`),t.posix===!0&&u==="!"&&o.value==="["&&(u="^"),o.value+=u,Ee({value:u});continue}if(l.quotes===1&&u!=='"'){u=Z.escapeRegex(u),o.value+=u,Ee({value:u});continue}if(u==='"'){l.quotes=l.quotes===1?0:1,t.keepQuotes===!0&&C({type:"text",value:u});continue}if(u==="("){be("parens"),C({type:"paren",value:u});continue}if(u===")"){if(l.parens===0&&t.strictBrackets===!0)throw new SyntaxError(de("opening","("));let d=H[H.length-1];if(d&&l.parens===d.parens+1){yr(H.pop());continue}C({type:"paren",value:u,output:l.parens?")":"\\)"}),oe("parens");continue}if(u==="["){if(t.nobracket===!0||!J().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(de("closing","]"));u=`\\${u}`}else be("brackets");C({type:"bracket",value:u});continue}if(u==="]"){if(t.nobracket===!0||o&&o.type==="bracket"&&o.value.length===1){C({type:"text",value:u,output:`\\${u}`});continue}if(l.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(de("opening","["));C({type:"text",value:u,output:`\\${u}`});continue}oe("brackets");let d=o.value.slice(1);if(o.posix!==!0&&d[0]==="^"&&!d.includes("/")&&(u=`/${u}`),o.value+=u,Ee({value:u}),t.literalBrackets===!1||Z.hasRegexChars(d))continue;let x=Z.escapeRegex(o.value);if(l.output=l.output.slice(0,-o.value.length),t.literalBrackets===!0){l.output+=x,o.value=x;continue}o.value=`(${c}${x}|${o.value})`,l.output+=o.value;continue}if(u==="{"&&t.nobrace!==!0){be("braces");let d={type:"brace",value:u,output:"(",outputIndex:l.output.length,tokensIndex:l.tokens.length};w.push(d),C(d);continue}if(u==="}"){let d=w[w.length-1];if(t.nobrace===!0||!d){C({type:"text",value:u,output:u});continue}let x=")";if(d.dots===!0){let P=a.slice(),j=[];for(let G=P.length-1;G>=0&&(a.pop(),P[G].type!=="brace");G--)P[G].type!=="dots"&&j.unshift(P[G].value);x=Mn(j,t),l.backtrack=!0}if(d.comma!==!0&&d.dots!==!0){let P=l.output.slice(0,d.outputIndex),j=l.tokens.slice(d.tokensIndex);d.value=d.output="\\{",u=x="\\}",l.output=P;for(let G of j)l.output+=G.output||G.value}C({type:"brace",value:u,output:x}),oe("braces"),w.pop();continue}if(u==="|"){H.length>0&&H[H.length-1].conditions++,C({type:"text",value:u});continue}if(u===","){let d=u,x=w[w.length-1];x&&B[B.length-1]==="braces"&&(x.comma=!0,d="|"),C({type:"comma",value:u,output:d});continue}if(u==="/"){if(o.type==="dot"&&l.index===l.start+1){l.start=l.index+1,l.consumed="",l.output="",a.pop(),o=i;continue}C({type:"slash",value:u,output:$});continue}if(u==="."){if(l.braces>0&&o.type==="dot"){o.value==="."&&(o.output=R);let d=w[w.length-1];o.type="dots",o.output+=u,o.value+=u,d.dots=!0;continue}if(l.braces+l.parens===0&&o.type!=="bos"&&o.type!=="slash"){C({type:"text",value:u,output:R});continue}C({type:"dot",value:u,output:R});continue}if(u==="?"){if(!(o&&o.value==="(")&&t.noextglob!==!0&&b()==="("&&b(2)!=="?"){xe("qmark",u);continue}if(o&&o.type==="paren"){let x=b(),P=u;if(x==="<"&&!Z.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(o.value==="("&&!/[!=<:]/.test(x)||x==="<"&&!/<([!=]|\w+>)/.test(J()))&&(P=`\\${u}`),C({type:"text",value:u,output:P});continue}if(t.dot!==!0&&(o.type==="slash"||o.type==="bos")){C({type:"qmark",value:u,output:z});continue}C({type:"qmark",value:u,output:L});continue}if(u==="!"){if(t.noextglob!==!0&&b()==="("&&(b(2)!=="?"||!/[!=<:]/.test(b(3)))){xe("negate",u);continue}if(t.nonegate!==!0&&l.index===0){Rr();continue}}if(u==="+"){if(t.noextglob!==!0&&b()==="("&&b(2)!=="?"){xe("plus",u);continue}if(o&&o.value==="("||t.regex===!1){C({type:"plus",value:u,output:f});continue}if(o&&(o.type==="bracket"||o.type==="paren"||o.type==="brace")||l.parens>0){C({type:"plus",value:u});continue}C({type:"plus",value:f});continue}if(u==="@"){if(t.noextglob!==!0&&b()==="("&&b(2)!=="?"){C({type:"at",extglob:!0,value:u,output:""});continue}C({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);let d=In.exec(J());d&&(u+=d[0],l.index+=d[0].length),C({type:"text",value:u});continue}if(o&&(o.type==="globstar"||o.star===!0)){o.type="star",o.star=!0,o.value+=u,o.output=k,l.backtrack=!0,l.globstar=!0,Q(u);continue}let A=J();if(t.noextglob!==!0&&/^\([^?]/.test(A)){xe("star",u);continue}if(o.type==="star"){if(t.noglobstar===!0){Q(u);continue}let d=o.prev,x=d.prev,P=d.type==="slash"||d.type==="bos",j=x&&(x.type==="star"||x.type==="globstar");if(t.bash===!0&&(!P||A[0]&&A[0]!=="/")){C({type:"star",value:u,output:""});continue}let G=l.braces>0&&(d.type==="comma"||d.type==="brace"),Ie=H.length&&(d.type==="pipe"||d.type==="paren");if(!P&&d.type!=="paren"&&!G&&!Ie){C({type:"star",value:u,output:""});continue}for(;A.slice(0,3)==="/**";){let Ce=e[l.index+4];if(Ce&&Ce!=="/")break;A=A.slice(3),Q("/**",3)}if(d.type==="bos"&&M()){o.type="globstar",o.value+=u,o.output=K(t),l.output=o.output,l.globstar=!0,Q(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&!j&&M()){l.output=l.output.slice(0,-(d.output+o.output).length),d.output=`(?:${d.output}`,o.type="globstar",o.output=K(t)+(t.strictSlashes?")":"|$)"),o.value+=u,l.globstar=!0,l.output+=d.output+o.output,Q(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&A[0]==="/"){let Ce=A[1]!==void 0?"|$":"";l.output=l.output.slice(0,-(d.output+o.output).length),d.output=`(?:${d.output}`,o.type="globstar",o.output=`${K(t)}${$}|${$}${Ce})`,o.value+=u,l.output+=d.output+o.output,l.globstar=!0,Q(u+V()),C({type:"slash",value:"/",output:""});continue}if(d.type==="bos"&&A[0]==="/"){o.type="globstar",o.value+=u,o.output=`(?:^|${$}|${K(t)}${$})`,l.output=o.output,l.globstar=!0,Q(u+V()),C({type:"slash",value:"/",output:""});continue}l.output=l.output.slice(0,-o.output.length),o.type="globstar",o.output=K(t),o.value+=u,l.output+=o.output,l.globstar=!0,Q(u);continue}let O={type:"star",value:u,output:k};if(t.bash===!0){O.output=".*?",(o.type==="bos"||o.type==="slash")&&(O.output=g+O.output),C(O);continue}if(o&&(o.type==="bracket"||o.type==="paren")&&t.regex===!0){O.output=u,C(O);continue}(l.index===l.start||o.type==="slash"||o.type==="dot")&&(o.type==="dot"?(l.output+=S,o.output+=S):t.dot===!0?(l.output+=T,o.output+=T):(l.output+=g,o.output+=g),b()!=="*"&&(l.output+=_,o.output+=_)),C(O)}for(;l.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(de("closing","]"));l.output=Z.escapeLast(l.output,"["),oe("brackets")}for(;l.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(de("closing",")"));l.output=Z.escapeLast(l.output,"("),oe("parens")}for(;l.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(de("closing","}"));l.output=Z.escapeLast(l.output,"{"),oe("braces")}if(t.strictSlashes!==!0&&(o.type==="star"||o.type==="bracket")&&C({type:"maybe_slash",value:"",output:`${$}?`}),l.backtrack===!0){l.output="";for(let A of l.tokens)l.output+=A.output!=null?A.output:A.value,A.suffix&&(l.output+=A.suffix)}return l};Vt.fastpaths=(e,r)=>{let t={...r},n=typeof t.maxLength=="number"?Math.min(Le,t.maxLength):Le,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);e=zt[e]||e;let i=Z.isWindows(r),{DOT_LITERAL:a,SLASH_LITERAL:c,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:h,NO_DOTS:R,NO_DOTS_SLASH:f,STAR:$,START_ANCHOR:_}=ke.globChars(i),y=t.dot?R:h,E=t.dot?f:h,S=t.capture?"":"?:",T={negated:!1,prefix:""},L=t.bash===!0?".*?":$;t.capture&&(L=`(${L})`);let z=g=>g.noglobstar===!0?L:`(${S}(?:(?!${_}${g.dot?m:a}).)*?)`,I=g=>{switch(g){case"*":return`${y}${p}${L}`;case".*":return`${a}${p}${L}`;case"*.*":return`${y}${L}${a}${p}${L}`;case"*/*":return`${y}${L}${c}${p}${E}${L}`;case"**":return y+z(t);case"**/*":return`(?:${y}${z(t)}${c})?${E}${p}${L}`;case"**/*.*":return`(?:${y}${z(t)}${c})?${E}${L}${a}${p}${L}`;case"**/.*":return`(?:${y}${z(t)}${c})?${a}${p}${L}`;default:{let v=/^(.*?)\.(\w+)$/.exec(g);if(!v)return;let k=I(v[1]);return k?k+a+v[2]:void 0}}},re=Z.removePrefix(e,T),K=I(re);return K&&t.strictSlashes!==!0&&(K+=`${c}?`),K};Jt.exports=Vt});var rr=q((fs,tr)=>{"use strict";var Pn=W("path"),Dn=Yt(),Ze=er(),Ye=Re(),Un=me(),Gn=e=>e&&typeof e=="object"&&!Array.isArray(e),D=(e,r,t=!1)=>{if(Array.isArray(e)){let h=e.map(f=>D(f,r,t));return f=>{for(let $ of h){let _=$(f);if(_)return _}return!1}}let n=Gn(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let s=r||{},i=Ye.isWindows(r),a=n?D.compileRe(e,r):D.makeRe(e,r,!1,!0),c=a.state;delete a.state;let p=()=>!1;if(s.ignore){let h={...r,ignore:null,onMatch:null,onResult:null};p=D(s.ignore,h,t)}let m=(h,R=!1)=>{let{isMatch:f,match:$,output:_}=D.test(h,a,r,{glob:e,posix:i}),y={glob:e,state:c,regex:a,posix:i,input:h,output:_,match:$,isMatch:f};return typeof s.onResult=="function"&&s.onResult(y),f===!1?(y.isMatch=!1,R?y:!1):p(h)?(typeof s.onIgnore=="function"&&s.onIgnore(y),y.isMatch=!1,R?y:!1):(typeof s.onMatch=="function"&&s.onMatch(y),R?y:!0)};return t&&(m.state=c),m};D.test=(e,r,t,{glob:n,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=t||{},a=i.format||(s?Ye.toPosixSlashes:null),c=e===n,p=c&&a?a(e):e;return c===!1&&(p=a?a(e):e,c=p===n),(c===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?c=D.matchBase(e,r,t,s):c=r.exec(p)),{isMatch:Boolean(c),match:c,output:p}};D.matchBase=(e,r,t,n=Ye.isWindows(t))=>(r instanceof RegExp?r:D.makeRe(r,t)).test(Pn.basename(e));D.isMatch=(e,r,t)=>D(r,t)(e);D.parse=(e,r)=>Array.isArray(e)?e.map(t=>D.parse(t,r)):Ze(e,{...r,fastpaths:!1});D.scan=(e,r)=>Dn(e,r);D.compileRe=(e,r,t=!1,n=!1)=>{if(t===!0)return e.output;let s=r||{},i=s.contains?"":"^",a=s.contains?"":"$",c=`${i}(?:${e.output})${a}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let p=D.toRegex(c,r);return n===!0&&(p.state=e),p};D.makeRe=(e,r={},t=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return r.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=Ze.fastpaths(e,r)),s.output||(s=Ze(e,r)),D.compileRe(s,r,t,n)};D.toRegex=(e,r)=>{try{let t=r||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(t){if(r&&r.debug===!0)throw t;return/$^/}};D.constants=Un;tr.exports=D});var sr=q((ps,nr)=>{"use strict";nr.exports=rr()});var cr=q((hs,ur)=>{"use strict";var ir=W("util"),or=Mt(),ae=sr(),ze=Re(),ar=e=>e===""||e==="./",N=(e,r,t)=>{r=[].concat(r),e=[].concat(e);let n=new Set,s=new Set,i=new Set,a=0,c=h=>{i.add(h.output),t&&t.onResult&&t.onResult(h)};for(let h=0;h!n.has(h));if(t&&m.length===0){if(t.failglob===!0)throw new Error(`No matches found for "${r.join(", ")}"`);if(t.nonull===!0||t.nullglob===!0)return t.unescape?r.map(h=>h.replace(/\\/g,"")):r}return m};N.match=N;N.matcher=(e,r)=>ae(e,r);N.isMatch=(e,r,t)=>ae(r,t)(e);N.any=N.isMatch;N.not=(e,r,t={})=>{r=[].concat(r).map(String);let n=new Set,s=[],a=N(e,r,{...t,onResult:c=>{t.onResult&&t.onResult(c),s.push(c.output)}});for(let c of s)a.includes(c)||n.add(c);return[...n]};N.contains=(e,r,t)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${ir.inspect(e)}"`);if(Array.isArray(r))return r.some(n=>N.contains(e,n,t));if(typeof r=="string"){if(ar(e)||ar(r))return!1;if(e.includes(r)||e.startsWith("./")&&e.slice(2).includes(r))return!0}return N.isMatch(e,r,{...t,contains:!0})};N.matchKeys=(e,r,t)=>{if(!ze.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=N(Object.keys(e),r,t),s={};for(let i of n)s[i]=e[i];return s};N.some=(e,r,t)=>{let n=[].concat(e);for(let s of[].concat(r)){let i=ae(String(s),t);if(n.some(a=>i(a)))return!0}return!1};N.every=(e,r,t)=>{let n=[].concat(e);for(let s of[].concat(r)){let i=ae(String(s),t);if(!n.every(a=>i(a)))return!1}return!0};N.all=(e,r,t)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${ir.inspect(e)}"`);return[].concat(r).every(n=>ae(n,t)(e))};N.capture=(e,r,t)=>{let n=ze.isWindows(t),i=ae.makeRe(String(e),{...t,capture:!0}).exec(n?ze.toPosixSlashes(r):r);if(i)return i.slice(1).map(a=>a===void 0?"":a)};N.makeRe=(...e)=>ae.makeRe(...e);N.scan=(...e)=>ae.scan(...e);N.parse=(e,r)=>{let t=[];for(let n of[].concat(e||[]))for(let s of or(String(n),r))t.push(ae.parse(s,r));return t};N.braces=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a string");return r&&r.nobrace===!0||!/\{.*\}/.test(e)?[e]:or(e,r)};N.braceExpand=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a string");return N.braces(e,{...r,expand:!0})};ur.exports=N});var fr=q((ds,lr)=>{"use strict";lr.exports=(e,...r)=>new Promise(t=>{t(e(...r))})});var hr=q((gs,Ve)=>{"use strict";var qn=fr(),pr=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let r=[],t=0,n=()=>{t--,r.length>0&&r.shift()()},s=(c,p,...m)=>{t++;let h=qn(c,...m);p(h),h.then(n,n)},i=(c,p,...m)=>{tnew Promise(m=>i(c,m,...p));return Object.defineProperties(a,{activeCount:{get:()=>t},pendingCount:{get:()=>r.length}}),a};Ve.exports=pr;Ve.exports.default=pr});var Fn={};wr(Fn,{default:()=>jn});var Se=W("@yarnpkg/cli"),ne=W("@yarnpkg/core"),et=W("@yarnpkg/core"),ue=W("clipanion"),ce=class extends Se.BaseCommand{constructor(){super(...arguments);this.json=ue.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=ue.Option.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=ue.Option.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=ue.Option.Rest()}async execute(){let t=await ne.Configuration.find(this.context.cwd,this.context.plugins),{project:n,workspace:s}=await ne.Project.find(t,this.context.cwd),i=await ne.Cache.find(t);await n.restoreInstallState({restoreResolutions:!1});let a;if(this.all)a=new Set(n.workspaces);else if(this.workspaces.length===0){if(!s)throw new Se.WorkspaceRequiredError(n.cwd,this.context.cwd);a=new Set([s])}else a=new Set(this.workspaces.map(p=>n.getWorkspaceByIdent(et.structUtils.parseIdent(p))));for(let p of a)for(let m of this.production?["dependencies"]:ne.Manifest.hardDependencies)for(let h of p.manifest.getForScope(m).values()){let R=n.tryWorkspaceByDescriptor(h);R!==null&&a.add(R)}for(let p of n.workspaces)a.has(p)?this.production&&p.manifest.devDependencies.clear():(p.manifest.installConfig=p.manifest.installConfig||{},p.manifest.installConfig.selfReferences=!1,p.manifest.dependencies.clear(),p.manifest.devDependencies.clear(),p.manifest.peerDependencies.clear(),p.manifest.scripts.clear());return(await ne.StreamReport.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!0},async p=>{await n.install({cache:i,report:p,persistProject:!1})})).exitCode()}};ce.paths=[["workspaces","focus"]],ce.usage=ue.Command.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "});var Ne=W("@yarnpkg/cli"),ge=W("@yarnpkg/core"),_e=W("@yarnpkg/core"),Y=W("@yarnpkg/core"),gr=W("@yarnpkg/plugin-git"),U=W("clipanion"),Oe=Be(cr()),Ar=W("os"),mr=Be(hr()),te=Be(W("typanion")),pe=class extends Ne.BaseCommand{constructor(){super(...arguments);this.recursive=U.Option.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.from=U.Option.Array("--from",[],{description:"An array of glob pattern idents from which to base any recursion"});this.all=U.Option.Boolean("-A,--all",!1,{description:"Run the command on all workspaces of a project"});this.verbose=U.Option.Boolean("-v,--verbose",!1,{description:"Prefix each output line with the name of the originating workspace"});this.parallel=U.Option.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=U.Option.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=U.Option.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:te.isOneOf([te.isEnum(["unlimited"]),te.applyCascade(te.isNumber(),[te.isInteger(),te.isAtLeast(1)])])});this.topological=U.Option.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=U.Option.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=U.Option.Array("--include",[],{description:"An array of glob pattern idents; only matching workspaces will be traversed"});this.exclude=U.Option.Array("--exclude",[],{description:"An array of glob pattern idents; matching workspaces won't be traversed"});this.publicOnly=U.Option.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=U.Option.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.commandName=U.Option.String();this.args=U.Option.Proxy()}async execute(){let t=await ge.Configuration.find(this.context.cwd,this.context.plugins),{project:n,workspace:s}=await ge.Project.find(t,this.context.cwd);if(!this.all&&!s)throw new Ne.WorkspaceRequiredError(n.cwd,this.context.cwd);await n.restoreInstallState();let i=this.cli.process([this.commandName,...this.args]),a=i.path.length===1&&i.path[0]==="run"&&typeof i.scriptName<"u"?i.scriptName:null;if(i.path.length===0)throw new U.UsageError("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let c=this.all?n.topLevelWorkspace:s,p=this.since?Array.from(await gr.gitUtils.fetchChangedWorkspaces({ref:this.since,project:n})):[c,...this.from.length>0?c.getRecursiveWorkspaceChildren():[]],m=g=>Oe.default.isMatch(Y.structUtils.stringifyIdent(g.locator),this.from),h=this.from.length>0?p.filter(m):p,R=new Set([...h,...h.map(g=>[...this.recursive?this.since?g.getRecursiveWorkspaceDependents():g.getRecursiveWorkspaceDependencies():g.getRecursiveWorkspaceChildren()]).flat()]),f=[],$=!1;if(a!=null&&a.includes(":")){for(let g of n.workspaces)if(g.manifest.scripts.has(a)&&($=!$,$===!1))break}for(let g of R)a&&!g.manifest.scripts.has(a)&&!$&&!(await ge.scriptUtils.getWorkspaceAccessibleBinaries(g)).has(a)||a===process.env.npm_lifecycle_event&&g.cwd===s.cwd||this.include.length>0&&!Oe.default.isMatch(Y.structUtils.stringifyIdent(g.locator),this.include)||this.exclude.length>0&&Oe.default.isMatch(Y.structUtils.stringifyIdent(g.locator),this.exclude)||this.publicOnly&&g.manifest.private===!0||f.push(g);let _=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.max(1,(0,Ar.cpus)().length/2):1,y=_===1?!1:this.parallel,E=y?this.interlaced:!0,S=(0,mr.default)(_),T=new Map,L=new Set,z=0,I=null,re=!1,K=await _e.StreamReport.start({configuration:t,stdout:this.context.stdout},async g=>{let v=async(k,{commandIndex:l})=>{if(re)return-1;!y&&this.verbose&&l>1&&g.reportSeparator();let H=Kn(k,{configuration:t,verbose:this.verbose,commandIndex:l}),[w,B]=dr(g,{prefix:H,interlaced:E}),[o,u]=dr(g,{prefix:H,interlaced:E});try{this.verbose&&g.reportInfo(null,`${H} Process started`);let M=Date.now(),b=await this.cli.run([this.commandName,...this.args],{cwd:k.cwd,stdout:w,stderr:o})||0;w.end(),o.end(),await B,await u;let V=Date.now();if(this.verbose){let J=t.get("enableTimers")?`, completed in ${Y.formatUtils.pretty(t,V-M,Y.formatUtils.Type.DURATION)}`:"";g.reportInfo(null,`${H} Process exited (exit code ${b})${J}`)}return b===130&&(re=!0,I=b),b}catch(M){throw w.end(),o.end(),await B,await u,M}};for(let k of f)T.set(k.anchoredLocator.locatorHash,k);for(;T.size>0&&!g.hasErrors();){let k=[];for(let[w,B]of T){if(L.has(B.anchoredDescriptor.descriptorHash))continue;let o=!0;if(this.topological||this.topologicalDev){let u=this.topologicalDev?new Map([...B.manifest.dependencies,...B.manifest.devDependencies]):B.manifest.dependencies;for(let M of u.values()){let b=n.tryWorkspaceByDescriptor(M);if(o=b===null||!T.has(b.anchoredLocator.locatorHash),!o)break}}if(!!o&&(L.add(B.anchoredDescriptor.descriptorHash),k.push(S(async()=>{let u=await v(B,{commandIndex:++z});return T.delete(w),L.delete(B.anchoredDescriptor.descriptorHash),u})),!y))break}if(k.length===0){let w=Array.from(T.values()).map(B=>Y.structUtils.prettyLocator(t,B.anchoredLocator)).join(", ");g.reportError(_e.MessageName.CYCLIC_DEPENDENCIES,`Dependency cycle detected (${w})`);return}let H=(await Promise.all(k)).find(w=>w!==0);I===null&&(I=typeof H<"u"?1:I),(this.topological||this.topologicalDev)&&typeof H<"u"&&g.reportError(_e.MessageName.UNNAMED,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return I!==null?I:K.exitCode()}};pe.paths=[["workspaces","foreach"]],pe.usage=U.Command.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project. By default yarn runs the command only on current and all its descendant workspaces.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n Adding the `-v,--verbose` flag will cause Yarn to print more information; in particular the name of the workspace that generated the output will be printed at the front of each line.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish current and all descendant packages","yarn workspaces foreach npm publish --tolerate-republish"],["Run build script on current and all descendant packages","yarn workspaces foreach run build"],["Run build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -pt run build"],["Run build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -ptR --from '{workspace-a,workspace-b}' run build"]]});function dr(e,{prefix:r,interlaced:t}){let n=e.createStreamReporter(r),s=new Y.miscUtils.DefaultStream;s.pipe(n,{end:!1}),s.on("finish",()=>{n.end()});let i=new Promise(c=>{n.on("finish",()=>{c(s.active)})});if(t)return[s,i];let a=new Y.miscUtils.BufferStream;return a.pipe(s,{end:!1}),a.on("finish",()=>{s.end()}),[a,i]}function Kn(e,{configuration:r,commandIndex:t,verbose:n}){if(!n)return null;let i=`[${Y.structUtils.stringifyIdent(e.locator)}]:`,a=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],c=a[t%a.length];return Y.formatUtils.pretty(r,i,c)}var Wn={commands:[ce,pe]},jn=Wn;return Sr(Fn);})(); -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ -/*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */ -return plugin; -} -}; diff --git a/.yarn/releases/yarn-4.9.2.cjs b/.yarn/releases/yarn-4.9.2.cjs deleted file mode 100755 index 28f25b14b..000000000 --- a/.yarn/releases/yarn-4.9.2.cjs +++ /dev/null @@ -1,942 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable */ -//prettier-ignore -(()=>{var UVe=Object.create;var E_=Object.defineProperty;var HVe=Object.getOwnPropertyDescriptor;var jVe=Object.getOwnPropertyNames;var qVe=Object.getPrototypeOf,GVe=Object.prototype.hasOwnProperty;var Ie=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ct=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vt=(t,e)=>{for(var r in e)E_(t,r,{get:e[r],enumerable:!0})},WVe=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of jVe(e))!GVe.call(t,a)&&a!==r&&E_(t,a,{get:()=>e[a],enumerable:!(s=HVe(e,a))||s.enumerable});return t};var et=(t,e,r)=>(r=t!=null?UVe(qVe(t)):{},WVe(e||!t||!t.__esModule?E_(r,"default",{value:t,enumerable:!0}):r,t));var fi={};Vt(fi,{SAFE_TIME:()=>d$,S_IFDIR:()=>rx,S_IFLNK:()=>nx,S_IFMT:()=>_f,S_IFREG:()=>N2});var _f,rx,N2,nx,d$,m$=Ct(()=>{_f=61440,rx=16384,N2=32768,nx=40960,d$=456789e3});var or={};Vt(or,{EBADF:()=>Uo,EBUSY:()=>YVe,EEXIST:()=>XVe,EINVAL:()=>KVe,EISDIR:()=>ZVe,ENOENT:()=>JVe,ENOSYS:()=>VVe,ENOTDIR:()=>zVe,ENOTEMPTY:()=>e7e,EOPNOTSUPP:()=>t7e,EROFS:()=>$Ve,ERR_DIR_CLOSED:()=>I_});function wc(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function YVe(t){return wc("EBUSY",t)}function VVe(t,e){return wc("ENOSYS",`${t}, ${e}`)}function KVe(t){return wc("EINVAL",`invalid argument, ${t}`)}function Uo(t){return wc("EBADF",`bad file descriptor, ${t}`)}function JVe(t){return wc("ENOENT",`no such file or directory, ${t}`)}function zVe(t){return wc("ENOTDIR",`not a directory, ${t}`)}function ZVe(t){return wc("EISDIR",`illegal operation on a directory, ${t}`)}function XVe(t){return wc("EEXIST",`file already exists, ${t}`)}function $Ve(t){return wc("EROFS",`read-only filesystem, ${t}`)}function e7e(t){return wc("ENOTEMPTY",`directory not empty, ${t}`)}function t7e(t){return wc("EOPNOTSUPP",`operation not supported, ${t}`)}function I_(){return wc("ERR_DIR_CLOSED","Directory handle was closed")}var ix=Ct(()=>{});var el={};Vt(el,{BigIntStatsEntry:()=>rE,DEFAULT_MODE:()=>B_,DirEntry:()=>C_,StatEntry:()=>tE,areStatsEqual:()=>v_,clearStats:()=>sx,convertToBigIntStats:()=>n7e,makeDefaultStats:()=>y$,makeEmptyStats:()=>r7e});function y$(){return new tE}function r7e(){return sx(y$())}function sx(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):w_.types.isDate(r)&&(t[e]=new Date(0))}return t}function n7e(t){let e=new rE;for(let r in t)if(Object.hasOwn(t,r)){let s=t[r];typeof s=="number"?e[r]=BigInt(s):w_.types.isDate(s)&&(e[r]=new Date(s))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function v_(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,s=e;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var w_,B_,C_,tE,rE,S_=Ct(()=>{w_=et(Ie("util")),B_=33188,C_=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},tE=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=B_;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},rE=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(B_);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(61440))===BigInt(32768)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(61440))===BigInt(40960)}}});function l7e(t){let e,r;if(e=t.match(o7e))t=e[1];else if(r=t.match(a7e))t=`\\\\${r[1]?".\\":""}${r[2]}`;else return t;return t.replace(/\//g,"\\")}function c7e(t){t=t.replace(/\\/g,"/");let e,r;return(e=t.match(i7e))?t=`/${e[1]}`:(r=t.match(s7e))&&(t=`/unc/${r[1]?".dot/":""}${r[2]}`),t}function ox(t,e){return t===ue?I$(e):D_(e)}var O2,vt,Er,ue,K,E$,i7e,s7e,o7e,a7e,D_,I$,tl=Ct(()=>{O2=et(Ie("path")),vt={root:"/",dot:".",parent:".."},Er={home:"~",nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",virtual:"__virtual__",pnpJs:".pnp.js",pnpCjs:".pnp.cjs",pnpData:".pnp.data.json",pnpEsmLoader:".pnp.loader.mjs",rc:".yarnrc.yml",env:".env"},ue=Object.create(O2.default),K=Object.create(O2.default.posix);ue.cwd=()=>process.cwd();K.cwd=process.platform==="win32"?()=>D_(process.cwd()):process.cwd;process.platform==="win32"&&(K.resolve=(...t)=>t.length>0&&K.isAbsolute(t[0])?O2.default.posix.resolve(...t):O2.default.posix.resolve(K.cwd(),...t));E$=function(t,e,r){return e=t.normalize(e),r=t.normalize(r),e===r?".":(e.endsWith(t.sep)||(e=e+t.sep),r.startsWith(e)?r.slice(e.length):null)};ue.contains=(t,e)=>E$(ue,t,e);K.contains=(t,e)=>E$(K,t,e);i7e=/^([a-zA-Z]:.*)$/,s7e=/^\/\/(\.\/)?(.*)$/,o7e=/^\/([a-zA-Z]:.*)$/,a7e=/^\/unc\/(\.dot\/)?(.*)$/;D_=process.platform==="win32"?c7e:t=>t,I$=process.platform==="win32"?l7e:t=>t;ue.fromPortablePath=I$;ue.toPortablePath=D_});async function ax(t,e){let r="0123456789abcdef";await t.mkdirPromise(e.indexPath,{recursive:!0});let s=[];for(let a of r)for(let n of r)s.push(t.mkdirPromise(t.pathUtils.join(e.indexPath,`${a}${n}`),{recursive:!0}));return await Promise.all(s),e.indexPath}async function C$(t,e,r,s,a){let n=t.pathUtils.normalize(e),c=r.pathUtils.normalize(s),f=[],p=[],{atime:h,mtime:E}=a.stableTime?{atime:gd,mtime:gd}:await r.lstatPromise(c);await t.mkdirpPromise(t.pathUtils.dirname(e),{utimes:[h,E]}),await b_(f,p,t,n,r,c,{...a,didParentExist:!0});for(let C of f)await C();await Promise.all(p.map(C=>C()))}async function b_(t,e,r,s,a,n,c){let f=c.didParentExist?await w$(r,s):null,p=await a.lstatPromise(n),{atime:h,mtime:E}=c.stableTime?{atime:gd,mtime:gd}:p,C;switch(!0){case p.isDirectory():C=await f7e(t,e,r,s,f,a,n,p,c);break;case p.isFile():C=await h7e(t,e,r,s,f,a,n,p,c);break;case p.isSymbolicLink():C=await g7e(t,e,r,s,f,a,n,p,c);break;default:throw new Error(`Unsupported file type (${p.mode})`)}return(c.linkStrategy?.type!=="HardlinkFromIndex"||!p.isFile())&&((C||f?.mtime?.getTime()!==E.getTime()||f?.atime?.getTime()!==h.getTime())&&(e.push(()=>r.lutimesPromise(s,h,E)),C=!0),(f===null||(f.mode&511)!==(p.mode&511))&&(e.push(()=>r.chmodPromise(s,p.mode&511)),C=!0)),C}async function w$(t,e){try{return await t.lstatPromise(e)}catch{return null}}async function f7e(t,e,r,s,a,n,c,f,p){if(a!==null&&!a.isDirectory())if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;let h=!1;a===null&&(t.push(async()=>{try{await r.mkdirPromise(s,{mode:f.mode})}catch(S){if(S.code!=="EEXIST")throw S}}),h=!0);let E=await n.readdirPromise(c),C=p.didParentExist&&!a?{...p,didParentExist:!1}:p;if(p.stableSort)for(let S of E.sort())await b_(t,e,r,r.pathUtils.join(s,S),n,n.pathUtils.join(c,S),C)&&(h=!0);else(await Promise.all(E.map(async P=>{await b_(t,e,r,r.pathUtils.join(s,P),n,n.pathUtils.join(c,P),C)}))).some(P=>P)&&(h=!0);return h}async function A7e(t,e,r,s,a,n,c,f,p,h){let E=await n.checksumFilePromise(c,{algorithm:"sha1"}),C=420,S=f.mode&511,P=`${E}${S!==C?S.toString(8):""}`,I=r.pathUtils.join(h.indexPath,E.slice(0,2),`${P}.dat`),R;(ce=>(ce[ce.Lock=0]="Lock",ce[ce.Rename=1]="Rename"))(R||={});let N=1,U=await w$(r,I);if(a){let ie=U&&a.dev===U.dev&&a.ino===U.ino,Ae=U?.mtimeMs!==u7e;if(ie&&Ae&&h.autoRepair&&(N=0,U=null),!ie)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1}let W=!U&&N===1?`${I}.${Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0")}`:null,te=!1;return t.push(async()=>{if(!U&&(N===0&&await r.lockPromise(I,async()=>{let ie=await n.readFilePromise(c);await r.writeFilePromise(I,ie)}),N===1&&W)){let ie=await n.readFilePromise(c);await r.writeFilePromise(W,ie);try{await r.linkPromise(W,I)}catch(Ae){if(Ae.code==="EEXIST")te=!0,await r.unlinkPromise(W);else throw Ae}}a||await r.linkPromise(I,s)}),e.push(async()=>{U||(await r.lutimesPromise(I,gd,gd),S!==C&&await r.chmodPromise(I,S)),W&&!te&&await r.unlinkPromise(W)}),!1}async function p7e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{let h=await n.readFilePromise(c);await r.writeFilePromise(s,h)}),!0}async function h7e(t,e,r,s,a,n,c,f,p){return p.linkStrategy?.type==="HardlinkFromIndex"?A7e(t,e,r,s,a,n,c,f,p,p.linkStrategy):p7e(t,e,r,s,a,n,c,f,p)}async function g7e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{await r.symlinkPromise(ox(r.pathUtils,await n.readlinkPromise(c)),s)}),!0}var gd,u7e,P_=Ct(()=>{tl();gd=new Date(456789e3*1e3),u7e=gd.getTime()});function lx(t,e,r,s){let a=()=>{let n=r.shift();if(typeof n>"u")return null;let c=t.pathUtils.join(e,n);return Object.assign(t.statSync(c),{name:n,path:void 0})};return new L2(e,a,s)}var L2,B$=Ct(()=>{ix();L2=class{constructor(e,r,s={}){this.path=e;this.nextDirent=r;this.opts=s;this.closed=!1}throwIfClosed(){if(this.closed)throw I_()}async*[Symbol.asyncIterator](){try{let e;for(;(e=await this.read())!==null;)yield e}finally{await this.close()}}read(e){let r=this.readSync();return typeof e<"u"?e(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e<"u"?e(null):Promise.resolve()}closeSync(){this.throwIfClosed(),this.opts.onClose?.(),this.closed=!0}}});function v$(t,e){if(t!==e)throw new Error(`Invalid StatWatcher status: expected '${e}', got '${t}'`)}var S$,cx,D$=Ct(()=>{S$=Ie("events");S_();cx=class t extends S$.EventEmitter{constructor(r,s,{bigint:a=!1}={}){super();this.status="ready";this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=r,this.path=s,this.bigint=a,this.lastStats=this.stat()}static create(r,s,a){let n=new t(r,s,a);return n.start(),n}start(){v$(this.status,"ready"),this.status="running",this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit("change",this.lastStats,this.lastStats)},3)}stop(){v$(this.status,"running"),this.status="stopped",this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit("stop")}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch{let r=this.bigint?new rE:new tE;return sx(r)}}makeInterval(r){let s=setInterval(()=>{let a=this.stat(),n=this.lastStats;v_(a,n)||(this.lastStats=a,this.emit("change",a,n))},r.interval);return r.persistent?s:s.unref()}registerChangeListener(r,s){this.addListener("change",r),this.changeListeners.set(r,this.makeInterval(s))}unregisterChangeListener(r){this.removeListener("change",r);let s=this.changeListeners.get(r);typeof s<"u"&&clearInterval(s),this.changeListeners.delete(r)}unregisterAllChangeListeners(){for(let r of this.changeListeners.keys())this.unregisterChangeListener(r)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let r of this.changeListeners.values())r.ref();return this}unref(){for(let r of this.changeListeners.values())r.unref();return this}}});function nE(t,e,r,s){let a,n,c,f;switch(typeof r){case"function":a=!1,n=!0,c=5007,f=r;break;default:({bigint:a=!1,persistent:n=!0,interval:c=5007}=r),f=s;break}let p=ux.get(t);typeof p>"u"&&ux.set(t,p=new Map);let h=p.get(e);return typeof h>"u"&&(h=cx.create(t,e,{bigint:a}),p.set(e,h)),h.registerChangeListener(f,{persistent:n,interval:c}),h}function dd(t,e,r){let s=ux.get(t);if(typeof s>"u")return;let a=s.get(e);typeof a>"u"||(typeof r>"u"?a.unregisterAllChangeListeners():a.unregisterChangeListener(r),a.hasChangeListeners()||(a.stop(),s.delete(e)))}function md(t){let e=ux.get(t);if(!(typeof e>"u"))for(let r of e.keys())dd(t,r)}var ux,x_=Ct(()=>{D$();ux=new WeakMap});function d7e(t){let e=t.match(/\r?\n/g);if(e===null)return P$.EOL;let r=e.filter(a=>a===`\r -`).length,s=e.length-r;return r>s?`\r -`:` -`}function yd(t,e){return e.replace(/\r?\n/g,d7e(t))}var b$,P$,Ep,Uf,Ed=Ct(()=>{b$=Ie("crypto"),P$=Ie("os");P_();tl();Ep=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let s=[e];for(;s.length>0;){let a=s.shift();if((await this.lstatPromise(a)).isDirectory()){let c=await this.readdirPromise(a);if(r)for(let f of c.sort())s.push(this.pathUtils.join(a,f));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let s=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,b$.createHash)(r),f=0;for(;(f=await this.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest("hex")}finally{await this.closePromise(s)}}async removePromise(e,{recursive:r=!0,maxRetries:s=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(c=>this.removePromise(this.pathUtils.resolve(e,c))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(e);break}catch(c){if(c.code!=="EBUSY"&&c.code!=="ENOTEMPTY")throw c;nsetTimeout(f,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let s;try{s=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(s.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{await this.mkdirPromise(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&await this.chmodPromise(f,r),s!=null)await this.utimesPromise(f,s[0],s[1]);else{let p=await this.statPromise(this.pathUtils.dirname(f));await this.utimesPromise(f,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{this.mkdirSync(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&this.chmodSync(f,r),s!=null)this.utimesSync(f,s[0],s[1]);else{let p=this.statSync(this.pathUtils.dirname(f));this.utimesSync(f,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:s=this,overwrite:a=!0,stableSort:n=!1,stableTime:c=!1,linkStrategy:f=null}={}){return await C$(this,e,s,r,{overwrite:a,stableSort:n,stableTime:c,linkStrategy:f})}copySync(e,r,{baseFs:s=this,overwrite:a=!0}={}){let n=s.lstatSync(r),c=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=s.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),s.pathUtils.join(r,h),{baseFs:s,overwrite:a})}else if(n.isFile()){if(!c||a){c&&this.removeSync(e);let p=s.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!c||a){c&&this.removeSync(e);let p=s.readlinkSync(r);this.symlinkSync(ox(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let f=n.mode&511;this.chmodSync(e,f)}async changeFilePromise(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,s):this.changeFileTextPromise(e,r,s)}async changeFileBufferPromise(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:s})}async changeFileTextPromise(e,r,{automaticNewlines:s,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let c=s?yd(n,r):r;n!==c&&await this.writeFilePromise(e,c,{mode:a})}changeFileSync(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,s):this.changeFileTextSync(e,r,s)}changeFileBufferSync(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:s})}changeFileTextSync(e,r,{automaticNewlines:s=!1,mode:a}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch{}let c=s?yd(n,r):r;n!==c&&this.writeFileSync(e,c,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(s){if(s.code==="EXDEV")await this.copyPromise(r,e),await this.removePromise(e);else throw s}}moveSync(e,r){try{this.renameSync(e,r)}catch(s){if(s.code==="EXDEV")this.copySync(r,e),this.removeSync(e);else throw s}}async lockPromise(e,r){let s=`${e}.flock`,a=1e3/60,n=Date.now(),c=null,f=async()=>{let p;try{[p]=await this.readJsonPromise(s)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;c===null;)try{c=await this.openPromise(s,"wx")}catch(p){if(p.code==="EEXIST"){if(!await f())try{await this.unlinkPromise(s);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${s})`)}else throw p}await this.writePromise(c,JSON.stringify([process.pid]));try{return await r()}finally{try{await this.closePromise(c),await this.unlinkPromise(s)}catch{}}}async readJsonPromise(e){let r=await this.readFilePromise(e,"utf8");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}readJsonSync(e){let r=this.readFileSync(e,"utf8");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}async writeJsonPromise(e,r,{compact:s=!1}={}){let a=s?0:2;return await this.writeFilePromise(e,`${JSON.stringify(r,null,a)} -`)}writeJsonSync(e,r,{compact:s=!1}={}){let a=s?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)} -`)}async preserveTimePromise(e,r){let s=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,s.atime,s.mtime)}async preserveTimeSync(e,r){let s=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,s.atime,s.mtime)}},Uf=class extends Ep{constructor(){super(K)}}});var js,Ip=Ct(()=>{Ed();js=class extends Ep{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,s){return this.baseFs.openPromise(this.mapToBase(e),r,s)}openSync(e,r,s){return this.baseFs.openSync(this.mapToBase(e),r,s)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,s,a,n){return await this.baseFs.readPromise(e,r,s,a,n)}readSync(e,r,s,a,n){return this.baseFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,s):await this.baseFs.writePromise(e,r,s,a,n)}writeSync(e,r,s,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,s):this.baseFs.writeSync(e,r,s,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,s){return this.baseFs.fchownPromise(e,r,s)}fchownSync(e,r,s){return this.baseFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return this.baseFs.chownPromise(this.mapToBase(e),r,s)}chownSync(e,r,s){return this.baseFs.chownSync(this.mapToBase(e),r,s)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,s=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),s)}copyFileSync(e,r,s=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),s)}async appendFilePromise(e,r,s){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,s)}appendFileSync(e,r,s){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,s)}async writeFilePromise(e,r,s){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,s)}writeFileSync(e,r,s){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,s)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,s){return this.baseFs.utimesPromise(this.mapToBase(e),r,s)}utimesSync(e,r,s){return this.baseFs.utimesSync(this.mapToBase(e),r,s)}async lutimesPromise(e,r,s){return this.baseFs.lutimesPromise(this.mapToBase(e),r,s)}lutimesSync(e,r,s){return this.baseFs.lutimesSync(this.mapToBase(e),r,s)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async rmPromise(e,r){return this.baseFs.rmPromise(this.mapToBase(e),r)}rmSync(e,r){return this.baseFs.rmSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkPromise(c,a,s)}symlinkSync(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkSync(c,a,s)}async readFilePromise(e,r){return this.baseFs.readFilePromise(this.fsMapToBase(e),r)}readFileSync(e,r){return this.baseFs.readFileSync(this.fsMapToBase(e),r)}readdirPromise(e,r){return this.baseFs.readdirPromise(this.mapToBase(e),r)}readdirSync(e,r){return this.baseFs.readdirSync(this.mapToBase(e),r)}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,r){return this.baseFs.truncatePromise(this.mapToBase(e),r)}truncateSync(e,r){return this.baseFs.truncateSync(this.mapToBase(e),r)}async ftruncatePromise(e,r){return this.baseFs.ftruncatePromise(e,r)}ftruncateSync(e,r){return this.baseFs.ftruncateSync(e,r)}watch(e,r,s){return this.baseFs.watch(this.mapToBase(e),r,s)}watchFile(e,r,s){return this.baseFs.watchFile(this.mapToBase(e),r,s)}unwatchFile(e,r){return this.baseFs.unwatchFile(this.mapToBase(e),r)}fsMapToBase(e){return typeof e=="number"?e:this.mapToBase(e)}}});var Hf,x$=Ct(()=>{Ip();Hf=class extends js{constructor(e,{baseFs:r,pathUtils:s}){super(s),this.target=e,this.baseFs=r}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}});function k$(t){let e=t;return typeof t.path=="string"&&(e.path=ue.toPortablePath(t.path)),e}var Q$,Yn,Id=Ct(()=>{Q$=et(Ie("fs"));Ed();tl();Yn=class extends Uf{constructor(e=Q$.default){super(),this.realFs=e}getExtractHint(){return!1}getRealPath(){return vt.root}resolve(e){return K.resolve(e)}async openPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.open(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}openSync(e,r,s){return this.realFs.openSync(ue.fromPortablePath(e),r,s)}async opendirPromise(e,r){return await new Promise((s,a)=>{typeof r<"u"?this.realFs.opendir(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.opendir(ue.fromPortablePath(e),this.makeCallback(s,a))}).then(s=>{let a=s;return Object.defineProperty(a,"path",{value:e,configurable:!0,writable:!0}),a})}opendirSync(e,r){let a=typeof r<"u"?this.realFs.opendirSync(ue.fromPortablePath(e),r):this.realFs.opendirSync(ue.fromPortablePath(e));return Object.defineProperty(a,"path",{value:e,configurable:!0,writable:!0}),a}async readPromise(e,r,s=0,a=0,n=-1){return await new Promise((c,f)=>{this.realFs.read(e,r,s,a,n,(p,h)=>{p?f(p):c(h)})})}readSync(e,r,s,a,n){return this.realFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return await new Promise((c,f)=>typeof r=="string"?this.realFs.write(e,r,s,this.makeCallback(c,f)):this.realFs.write(e,r,s,a,n,this.makeCallback(c,f)))}writeSync(e,r,s,a,n){return typeof r=="string"?this.realFs.writeSync(e,r,s):this.realFs.writeSync(e,r,s,a,n)}async closePromise(e){await new Promise((r,s)=>{this.realFs.close(e,this.makeCallback(r,s))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,r){let s=e!==null?ue.fromPortablePath(e):e;return this.realFs.createReadStream(s,r)}createWriteStream(e,r){let s=e!==null?ue.fromPortablePath(e):e;return this.realFs.createWriteStream(s,r)}async realpathPromise(e){return await new Promise((r,s)=>{this.realFs.realpath(ue.fromPortablePath(e),{},this.makeCallback(r,s))}).then(r=>ue.toPortablePath(r))}realpathSync(e){return ue.toPortablePath(this.realFs.realpathSync(ue.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(r=>{this.realFs.exists(ue.fromPortablePath(e),r)})}accessSync(e,r){return this.realFs.accessSync(ue.fromPortablePath(e),r)}async accessPromise(e,r){return await new Promise((s,a)=>{this.realFs.access(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}existsSync(e){return this.realFs.existsSync(ue.fromPortablePath(e))}async statPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.stat(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.stat(ue.fromPortablePath(e),this.makeCallback(s,a))})}statSync(e,r){return r?this.realFs.statSync(ue.fromPortablePath(e),r):this.realFs.statSync(ue.fromPortablePath(e))}async fstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.fstat(e,r,this.makeCallback(s,a)):this.realFs.fstat(e,this.makeCallback(s,a))})}fstatSync(e,r){return r?this.realFs.fstatSync(e,r):this.realFs.fstatSync(e)}async lstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.lstat(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.lstat(ue.fromPortablePath(e),this.makeCallback(s,a))})}lstatSync(e,r){return r?this.realFs.lstatSync(ue.fromPortablePath(e),r):this.realFs.lstatSync(ue.fromPortablePath(e))}async fchmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.fchmod(e,r,this.makeCallback(s,a))})}fchmodSync(e,r){return this.realFs.fchmodSync(e,r)}async chmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.chmod(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}chmodSync(e,r){return this.realFs.chmodSync(ue.fromPortablePath(e),r)}async fchownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.fchown(e,r,s,this.makeCallback(a,n))})}fchownSync(e,r,s){return this.realFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.chown(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}chownSync(e,r,s){return this.realFs.chownSync(ue.fromPortablePath(e),r,s)}async renamePromise(e,r){return await new Promise((s,a)=>{this.realFs.rename(ue.fromPortablePath(e),ue.fromPortablePath(r),this.makeCallback(s,a))})}renameSync(e,r){return this.realFs.renameSync(ue.fromPortablePath(e),ue.fromPortablePath(r))}async copyFilePromise(e,r,s=0){return await new Promise((a,n)=>{this.realFs.copyFile(ue.fromPortablePath(e),ue.fromPortablePath(r),s,this.makeCallback(a,n))})}copyFileSync(e,r,s=0){return this.realFs.copyFileSync(ue.fromPortablePath(e),ue.fromPortablePath(r),s)}async appendFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e=="string"?ue.fromPortablePath(e):e;s?this.realFs.appendFile(c,r,s,this.makeCallback(a,n)):this.realFs.appendFile(c,r,this.makeCallback(a,n))})}appendFileSync(e,r,s){let a=typeof e=="string"?ue.fromPortablePath(e):e;s?this.realFs.appendFileSync(a,r,s):this.realFs.appendFileSync(a,r)}async writeFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e=="string"?ue.fromPortablePath(e):e;s?this.realFs.writeFile(c,r,s,this.makeCallback(a,n)):this.realFs.writeFile(c,r,this.makeCallback(a,n))})}writeFileSync(e,r,s){let a=typeof e=="string"?ue.fromPortablePath(e):e;s?this.realFs.writeFileSync(a,r,s):this.realFs.writeFileSync(a,r)}async unlinkPromise(e){return await new Promise((r,s)=>{this.realFs.unlink(ue.fromPortablePath(e),this.makeCallback(r,s))})}unlinkSync(e){return this.realFs.unlinkSync(ue.fromPortablePath(e))}async utimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.utimes(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}utimesSync(e,r,s){this.realFs.utimesSync(ue.fromPortablePath(e),r,s)}async lutimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.lutimes(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}lutimesSync(e,r,s){this.realFs.lutimesSync(ue.fromPortablePath(e),r,s)}async mkdirPromise(e,r){return await new Promise((s,a)=>{this.realFs.mkdir(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}mkdirSync(e,r){return this.realFs.mkdirSync(ue.fromPortablePath(e),r)}async rmdirPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rmdir(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rmdir(ue.fromPortablePath(e),this.makeCallback(s,a))})}rmdirSync(e,r){return this.realFs.rmdirSync(ue.fromPortablePath(e),r)}async rmPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rm(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rm(ue.fromPortablePath(e),this.makeCallback(s,a))})}rmSync(e,r){return this.realFs.rmSync(ue.fromPortablePath(e),r)}async linkPromise(e,r){return await new Promise((s,a)=>{this.realFs.link(ue.fromPortablePath(e),ue.fromPortablePath(r),this.makeCallback(s,a))})}linkSync(e,r){return this.realFs.linkSync(ue.fromPortablePath(e),ue.fromPortablePath(r))}async symlinkPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.symlink(ue.fromPortablePath(e.replace(/\/+$/,"")),ue.fromPortablePath(r),s,this.makeCallback(a,n))})}symlinkSync(e,r,s){return this.realFs.symlinkSync(ue.fromPortablePath(e.replace(/\/+$/,"")),ue.fromPortablePath(r),s)}async readFilePromise(e,r){return await new Promise((s,a)=>{let n=typeof e=="string"?ue.fromPortablePath(e):e;this.realFs.readFile(n,r,this.makeCallback(s,a))})}readFileSync(e,r){let s=typeof e=="string"?ue.fromPortablePath(e):e;return this.realFs.readFileSync(s,r)}async readdirPromise(e,r){return await new Promise((s,a)=>{r?r.recursive&&process.platform==="win32"?r.withFileTypes?this.realFs.readdir(ue.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(k$)),a)):this.realFs.readdir(ue.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(ue.toPortablePath)),a)):this.realFs.readdir(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.readdir(ue.fromPortablePath(e),this.makeCallback(s,a))})}readdirSync(e,r){return r?r.recursive&&process.platform==="win32"?r.withFileTypes?this.realFs.readdirSync(ue.fromPortablePath(e),r).map(k$):this.realFs.readdirSync(ue.fromPortablePath(e),r).map(ue.toPortablePath):this.realFs.readdirSync(ue.fromPortablePath(e),r):this.realFs.readdirSync(ue.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((r,s)=>{this.realFs.readlink(ue.fromPortablePath(e),this.makeCallback(r,s))}).then(r=>ue.toPortablePath(r))}readlinkSync(e){return ue.toPortablePath(this.realFs.readlinkSync(ue.fromPortablePath(e)))}async truncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.truncate(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}truncateSync(e,r){return this.realFs.truncateSync(ue.fromPortablePath(e),r)}async ftruncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.ftruncate(e,r,this.makeCallback(s,a))})}ftruncateSync(e,r){return this.realFs.ftruncateSync(e,r)}watch(e,r,s){return this.realFs.watch(ue.fromPortablePath(e),r,s)}watchFile(e,r,s){return this.realFs.watchFile(ue.fromPortablePath(e),r,s)}unwatchFile(e,r){return this.realFs.unwatchFile(ue.fromPortablePath(e),r)}makeCallback(e,r){return(s,a)=>{s?r(s):e(a)}}}});var Sn,T$=Ct(()=>{Id();Ip();tl();Sn=class extends js{constructor(e,{baseFs:r=new Yn}={}){super(K),this.target=this.pathUtils.normalize(e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?K.normalize(e):this.baseFs.resolve(K.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}});var R$,jf,F$=Ct(()=>{Id();Ip();tl();R$=vt.root,jf=class extends js{constructor(e,{baseFs:r=new Yn}={}){super(K),this.target=this.pathUtils.resolve(vt.root,e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(vt.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){let r=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(R$,e));if(r.match(/^\.\.\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(R$,this.pathUtils.relative(this.target,e))}}});var iE,N$=Ct(()=>{Ip();iE=class extends js{constructor(r,s){super(s);this.instance=null;this.factory=r}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(r){this.instance=r}mapFromBase(r){return r}mapToBase(r){return r}}});var Cd,rl,r0,O$=Ct(()=>{Cd=Ie("fs");Ed();Id();x_();ix();tl();rl=4278190080,r0=class extends Uf{constructor({baseFs:r=new Yn,filter:s=null,magicByte:a=42,maxOpenFiles:n=1/0,useCache:c=!0,maxAge:f=5e3,typeCheck:p=Cd.constants.S_IFREG,getMountPoint:h,factoryPromise:E,factorySync:C}){if(Math.floor(a)!==a||!(a>1&&a<=127))throw new Error("The magic byte must be set to a round value between 1 and 127 included");super();this.fdMap=new Map;this.nextFd=3;this.isMount=new Set;this.notMount=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.baseFs=r,this.mountInstances=c?new Map:null,this.factoryPromise=E,this.factorySync=C,this.filter=s,this.getMountPoint=h,this.magic=a<<24,this.maxAge=f,this.maxOpenFiles=n,this.typeCheck=p}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if(md(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.saveAndClose?.(),this.mountInstances.delete(r)}discardAndClose(){if(md(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.discardAndClose?.(),this.mountInstances.delete(r)}resolve(r){return this.baseFs.resolve(r)}remapFd(r,s){let a=this.nextFd++|this.magic;return this.fdMap.set(a,[r,s]),a}async openPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.openPromise(r,s,a),async(n,{subPath:c})=>this.remapFd(n,await n.openPromise(c,s,a)))}openSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.openSync(r,s,a),(n,{subPath:c})=>this.remapFd(n,n.openSync(c,s,a)))}async opendirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.opendirPromise(r,s),async(a,{subPath:n})=>await a.opendirPromise(n,s),{requireSubpath:!1})}opendirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.opendirSync(r,s),(a,{subPath:n})=>a.opendirSync(n,s),{requireSubpath:!1})}async readPromise(r,s,a,n,c){if((r&rl)!==this.magic)return await this.baseFs.readPromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>"u")throw Uo("read");let[p,h]=f;return await p.readPromise(h,s,a,n,c)}readSync(r,s,a,n,c){if((r&rl)!==this.magic)return this.baseFs.readSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>"u")throw Uo("readSync");let[p,h]=f;return p.readSync(h,s,a,n,c)}async writePromise(r,s,a,n,c){if((r&rl)!==this.magic)return typeof s=="string"?await this.baseFs.writePromise(r,s,a):await this.baseFs.writePromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>"u")throw Uo("write");let[p,h]=f;return typeof s=="string"?await p.writePromise(h,s,a):await p.writePromise(h,s,a,n,c)}writeSync(r,s,a,n,c){if((r&rl)!==this.magic)return typeof s=="string"?this.baseFs.writeSync(r,s,a):this.baseFs.writeSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>"u")throw Uo("writeSync");let[p,h]=f;return typeof s=="string"?p.writeSync(h,s,a):p.writeSync(h,s,a,n,c)}async closePromise(r){if((r&rl)!==this.magic)return await this.baseFs.closePromise(r);let s=this.fdMap.get(r);if(typeof s>"u")throw Uo("close");this.fdMap.delete(r);let[a,n]=s;return await a.closePromise(n)}closeSync(r){if((r&rl)!==this.magic)return this.baseFs.closeSync(r);let s=this.fdMap.get(r);if(typeof s>"u")throw Uo("closeSync");this.fdMap.delete(r);let[a,n]=s;return a.closeSync(n)}createReadStream(r,s){return r===null?this.baseFs.createReadStream(r,s):this.makeCallSync(r,()=>this.baseFs.createReadStream(r,s),(a,{archivePath:n,subPath:c})=>{let f=a.createReadStream(c,s);return f.path=ue.fromPortablePath(this.pathUtils.join(n,c)),f})}createWriteStream(r,s){return r===null?this.baseFs.createWriteStream(r,s):this.makeCallSync(r,()=>this.baseFs.createWriteStream(r,s),(a,{subPath:n})=>a.createWriteStream(n,s))}async realpathPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.realpathPromise(r),async(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>"u"&&(c=await this.baseFs.realpathPromise(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,await s.realpathPromise(n)))})}realpathSync(r){return this.makeCallSync(r,()=>this.baseFs.realpathSync(r),(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>"u"&&(c=this.baseFs.realpathSync(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,s.realpathSync(n)))})}async existsPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.existsPromise(r),async(s,{subPath:a})=>await s.existsPromise(a))}existsSync(r){return this.makeCallSync(r,()=>this.baseFs.existsSync(r),(s,{subPath:a})=>s.existsSync(a))}async accessPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.accessPromise(r,s),async(a,{subPath:n})=>await a.accessPromise(n,s))}accessSync(r,s){return this.makeCallSync(r,()=>this.baseFs.accessSync(r,s),(a,{subPath:n})=>a.accessSync(n,s))}async statPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.statPromise(r,s),async(a,{subPath:n})=>await a.statPromise(n,s))}statSync(r,s){return this.makeCallSync(r,()=>this.baseFs.statSync(r,s),(a,{subPath:n})=>a.statSync(n,s))}async fstatPromise(r,s){if((r&rl)!==this.magic)return this.baseFs.fstatPromise(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("fstat");let[n,c]=a;return n.fstatPromise(c,s)}fstatSync(r,s){if((r&rl)!==this.magic)return this.baseFs.fstatSync(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("fstatSync");let[n,c]=a;return n.fstatSync(c,s)}async lstatPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.lstatPromise(r,s),async(a,{subPath:n})=>await a.lstatPromise(n,s))}lstatSync(r,s){return this.makeCallSync(r,()=>this.baseFs.lstatSync(r,s),(a,{subPath:n})=>a.lstatSync(n,s))}async fchmodPromise(r,s){if((r&rl)!==this.magic)return this.baseFs.fchmodPromise(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("fchmod");let[n,c]=a;return n.fchmodPromise(c,s)}fchmodSync(r,s){if((r&rl)!==this.magic)return this.baseFs.fchmodSync(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("fchmodSync");let[n,c]=a;return n.fchmodSync(c,s)}async chmodPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.chmodPromise(r,s),async(a,{subPath:n})=>await a.chmodPromise(n,s))}chmodSync(r,s){return this.makeCallSync(r,()=>this.baseFs.chmodSync(r,s),(a,{subPath:n})=>a.chmodSync(n,s))}async fchownPromise(r,s,a){if((r&rl)!==this.magic)return this.baseFs.fchownPromise(r,s,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Uo("fchown");let[c,f]=n;return c.fchownPromise(f,s,a)}fchownSync(r,s,a){if((r&rl)!==this.magic)return this.baseFs.fchownSync(r,s,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Uo("fchownSync");let[c,f]=n;return c.fchownSync(f,s,a)}async chownPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.chownPromise(r,s,a),async(n,{subPath:c})=>await n.chownPromise(c,s,a))}chownSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.chownSync(r,s,a),(n,{subPath:c})=>n.chownSync(c,s,a))}async renamePromise(r,s){return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.renamePromise(r,s),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(a,{subPath:n})=>await this.makeCallPromise(s,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await a.renamePromise(n,f)}))}renameSync(r,s){return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.renameSync(r,s),()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(a,{subPath:n})=>this.makeCallSync(s,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return a.renameSync(n,f)}))}async copyFilePromise(r,s,a=0){let n=async(c,f,p,h)=>{if(a&Cd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:"EXDEV"});if(a&Cd.constants.COPYFILE_EXCL&&await this.existsPromise(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:"EEXIST"});let E;try{E=await c.readFilePromise(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:"EINVAL"})}await p.writeFilePromise(h,E)};return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.copyFilePromise(r,s,a),async(c,{subPath:f})=>await n(this.baseFs,r,c,f)),async(c,{subPath:f})=>await this.makeCallPromise(s,async()=>await n(c,f,this.baseFs,s),async(p,{subPath:h})=>c!==p?await n(c,f,p,h):await c.copyFilePromise(f,h,a)))}copyFileSync(r,s,a=0){let n=(c,f,p,h)=>{if(a&Cd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:"EXDEV"});if(a&Cd.constants.COPYFILE_EXCL&&this.existsSync(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:"EEXIST"});let E;try{E=c.readFileSync(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:"EINVAL"})}p.writeFileSync(h,E)};return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.copyFileSync(r,s,a),(c,{subPath:f})=>n(this.baseFs,r,c,f)),(c,{subPath:f})=>this.makeCallSync(s,()=>n(c,f,this.baseFs,s),(p,{subPath:h})=>c!==p?n(c,f,p,h):c.copyFileSync(f,h,a)))}async appendFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.appendFilePromise(r,s,a),async(n,{subPath:c})=>await n.appendFilePromise(c,s,a))}appendFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.appendFileSync(r,s,a),(n,{subPath:c})=>n.appendFileSync(c,s,a))}async writeFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.writeFilePromise(r,s,a),async(n,{subPath:c})=>await n.writeFilePromise(c,s,a))}writeFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.writeFileSync(r,s,a),(n,{subPath:c})=>n.writeFileSync(c,s,a))}async unlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.unlinkPromise(r),async(s,{subPath:a})=>await s.unlinkPromise(a))}unlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.unlinkSync(r),(s,{subPath:a})=>s.unlinkSync(a))}async utimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.utimesPromise(r,s,a),async(n,{subPath:c})=>await n.utimesPromise(c,s,a))}utimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.utimesSync(r,s,a),(n,{subPath:c})=>n.utimesSync(c,s,a))}async lutimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.lutimesPromise(r,s,a),async(n,{subPath:c})=>await n.lutimesPromise(c,s,a))}lutimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.lutimesSync(r,s,a),(n,{subPath:c})=>n.lutimesSync(c,s,a))}async mkdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.mkdirPromise(r,s),async(a,{subPath:n})=>await a.mkdirPromise(n,s))}mkdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.mkdirSync(r,s),(a,{subPath:n})=>a.mkdirSync(n,s))}async rmdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmdirPromise(r,s),async(a,{subPath:n})=>await a.rmdirPromise(n,s))}rmdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmdirSync(r,s),(a,{subPath:n})=>a.rmdirSync(n,s))}async rmPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmPromise(r,s),async(a,{subPath:n})=>await a.rmPromise(n,s))}rmSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmSync(r,s),(a,{subPath:n})=>a.rmSync(n,s))}async linkPromise(r,s){return await this.makeCallPromise(s,async()=>await this.baseFs.linkPromise(r,s),async(a,{subPath:n})=>await a.linkPromise(r,n))}linkSync(r,s){return this.makeCallSync(s,()=>this.baseFs.linkSync(r,s),(a,{subPath:n})=>a.linkSync(r,n))}async symlinkPromise(r,s,a){return await this.makeCallPromise(s,async()=>await this.baseFs.symlinkPromise(r,s,a),async(n,{subPath:c})=>await n.symlinkPromise(r,c))}symlinkSync(r,s,a){return this.makeCallSync(s,()=>this.baseFs.symlinkSync(r,s,a),(n,{subPath:c})=>n.symlinkSync(r,c))}async readFilePromise(r,s){return this.makeCallPromise(r,async()=>await this.baseFs.readFilePromise(r,s),async(a,{subPath:n})=>await a.readFilePromise(n,s))}readFileSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readFileSync(r,s),(a,{subPath:n})=>a.readFileSync(n,s))}async readdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.readdirPromise(r,s),async(a,{subPath:n})=>await a.readdirPromise(n,s),{requireSubpath:!1})}readdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readdirSync(r,s),(a,{subPath:n})=>a.readdirSync(n,s),{requireSubpath:!1})}async readlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.readlinkPromise(r),async(s,{subPath:a})=>await s.readlinkPromise(a))}readlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.readlinkSync(r),(s,{subPath:a})=>s.readlinkSync(a))}async truncatePromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.truncatePromise(r,s),async(a,{subPath:n})=>await a.truncatePromise(n,s))}truncateSync(r,s){return this.makeCallSync(r,()=>this.baseFs.truncateSync(r,s),(a,{subPath:n})=>a.truncateSync(n,s))}async ftruncatePromise(r,s){if((r&rl)!==this.magic)return this.baseFs.ftruncatePromise(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("ftruncate");let[n,c]=a;return n.ftruncatePromise(c,s)}ftruncateSync(r,s){if((r&rl)!==this.magic)return this.baseFs.ftruncateSync(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("ftruncateSync");let[n,c]=a;return n.ftruncateSync(c,s)}watch(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watch(r,s,a),(n,{subPath:c})=>n.watch(c,s,a))}watchFile(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watchFile(r,s,a),()=>nE(this,r,s,a))}unwatchFile(r,s){return this.makeCallSync(r,()=>this.baseFs.unwatchFile(r,s),()=>dd(this,r,s))}async makeCallPromise(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return await s();let c=this.resolve(r),f=this.findMount(c);return f?n&&f.subPath==="/"?await s():await this.getMountPromise(f.archivePath,async p=>await a(p,f)):await s()}makeCallSync(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return s();let c=this.resolve(r),f=this.findMount(c);return!f||n&&f.subPath==="/"?s():this.getMountSync(f.archivePath,p=>a(p,f))}findMount(r){if(this.filter&&!this.filter.test(r))return null;let s="";for(;;){let a=r.substring(s.length),n=this.getMountPoint(a,s);if(!n)return null;if(s=this.pathUtils.join(s,n),!this.isMount.has(s)){if(this.notMount.has(s))continue;try{if(this.typeCheck!==null&&(this.baseFs.statSync(s).mode&Cd.constants.S_IFMT)!==this.typeCheck){this.notMount.add(s);continue}}catch{return null}this.isMount.add(s)}return{archivePath:s,subPath:this.pathUtils.join(vt.root,r.substring(s.length))}}}limitOpenFiles(r){if(this.mountInstances===null)return;let s=Date.now(),a=s+this.maxAge,n=r===null?0:this.mountInstances.size-r;for(let[c,{childFs:f,expiresAt:p,refCount:h}]of this.mountInstances.entries())if(!(h!==0||f.hasOpenFileHandles?.())){if(s>=p){f.saveAndClose?.(),this.mountInstances.delete(c),n-=1;continue}else if(r===null||n<=0){a=p;break}f.saveAndClose?.(),this.mountInstances.delete(c),n-=1}this.limitOpenFilesTimeout===null&&(r===null&&this.mountInstances.size>0||r!==null)&&isFinite(a)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},a-s).unref())}async getMountPromise(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);if(!a){let n=await this.factoryPromise(this.baseFs,r);a=this.mountInstances.get(r),a||(a={childFs:n(),expiresAt:0,refCount:0})}this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,a.refCount+=1;try{return await s(a.childFs)}finally{a.refCount-=1}}else{let a=(await this.factoryPromise(this.baseFs,r))();try{return await s(a)}finally{a.saveAndClose?.()}}}getMountSync(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);return a||(a={childFs:this.factorySync(this.baseFs,r),expiresAt:0,refCount:0}),this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,s(a.childFs)}else{let a=this.factorySync(this.baseFs,r);try{return s(a)}finally{a.saveAndClose?.()}}}}});var er,fx,L$=Ct(()=>{Ed();tl();er=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"}),fx=class t extends Ep{static{this.instance=new t}constructor(){super(K)}getExtractHint(){throw er()}getRealPath(){throw er()}resolve(){throw er()}async openPromise(){throw er()}openSync(){throw er()}async opendirPromise(){throw er()}opendirSync(){throw er()}async readPromise(){throw er()}readSync(){throw er()}async writePromise(){throw er()}writeSync(){throw er()}async closePromise(){throw er()}closeSync(){throw er()}createWriteStream(){throw er()}createReadStream(){throw er()}async realpathPromise(){throw er()}realpathSync(){throw er()}async readdirPromise(){throw er()}readdirSync(){throw er()}async existsPromise(e){throw er()}existsSync(e){throw er()}async accessPromise(){throw er()}accessSync(){throw er()}async statPromise(){throw er()}statSync(){throw er()}async fstatPromise(e){throw er()}fstatSync(e){throw er()}async lstatPromise(e){throw er()}lstatSync(e){throw er()}async fchmodPromise(){throw er()}fchmodSync(){throw er()}async chmodPromise(){throw er()}chmodSync(){throw er()}async fchownPromise(){throw er()}fchownSync(){throw er()}async chownPromise(){throw er()}chownSync(){throw er()}async mkdirPromise(){throw er()}mkdirSync(){throw er()}async rmdirPromise(){throw er()}rmdirSync(){throw er()}async rmPromise(){throw er()}rmSync(){throw er()}async linkPromise(){throw er()}linkSync(){throw er()}async symlinkPromise(){throw er()}symlinkSync(){throw er()}async renamePromise(){throw er()}renameSync(){throw er()}async copyFilePromise(){throw er()}copyFileSync(){throw er()}async appendFilePromise(){throw er()}appendFileSync(){throw er()}async writeFilePromise(){throw er()}writeFileSync(){throw er()}async unlinkPromise(){throw er()}unlinkSync(){throw er()}async utimesPromise(){throw er()}utimesSync(){throw er()}async lutimesPromise(){throw er()}lutimesSync(){throw er()}async readFilePromise(){throw er()}readFileSync(){throw er()}async readlinkPromise(){throw er()}readlinkSync(){throw er()}async truncatePromise(){throw er()}truncateSync(){throw er()}async ftruncatePromise(e,r){throw er()}ftruncateSync(e,r){throw er()}watch(){throw er()}watchFile(){throw er()}unwatchFile(){throw er()}}});var n0,M$=Ct(()=>{Ip();tl();n0=class extends js{constructor(e){super(ue),this.baseFs=e}mapFromBase(e){return ue.fromPortablePath(e)}mapToBase(e){return ue.toPortablePath(e)}}});var m7e,k_,y7e,Ao,_$=Ct(()=>{Id();Ip();tl();m7e=/^[0-9]+$/,k_=/^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,y7e=/^([^/]+-)?[a-f0-9]+$/,Ao=class t extends js{static makeVirtualPath(e,r,s){if(K.basename(e)!=="__virtual__")throw new Error('Assertion failed: Virtual folders must be named "__virtual__"');if(!K.basename(r).match(y7e))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");let n=K.relative(K.dirname(e),s).split("/"),c=0;for(;c{Q_=et(Ie("buffer")),U$=Ie("url"),H$=Ie("util");Ip();tl();Ax=class extends js{constructor(e){super(ue),this.baseFs=e}mapFromBase(e){return e}mapToBase(e){if(typeof e=="string")return e;if(e instanceof URL)return(0,U$.fileURLToPath)(e);if(Buffer.isBuffer(e)){let r=e.toString();if(!E7e(e,r))throw new Error("Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942");return r}throw new Error(`Unsupported path type: ${(0,H$.inspect)(e)}`)}}});var V$,Ho,Cp,i0,px,hx,sE,Nu,Ou,q$,G$,W$,Y$,M2,K$=Ct(()=>{V$=Ie("readline"),Ho=Symbol("kBaseFs"),Cp=Symbol("kFd"),i0=Symbol("kClosePromise"),px=Symbol("kCloseResolve"),hx=Symbol("kCloseReject"),sE=Symbol("kRefs"),Nu=Symbol("kRef"),Ou=Symbol("kUnref"),M2=class{constructor(e,r){this[Y$]=1;this[W$]=void 0;this[G$]=void 0;this[q$]=void 0;this[Ho]=r,this[Cp]=e}get fd(){return this[Cp]}async appendFile(e,r){try{this[Nu](this.appendFile);let s=(typeof r=="string"?r:r?.encoding)??void 0;return await this[Ho].appendFilePromise(this.fd,e,s?{encoding:s}:void 0)}finally{this[Ou]()}}async chown(e,r){try{return this[Nu](this.chown),await this[Ho].fchownPromise(this.fd,e,r)}finally{this[Ou]()}}async chmod(e){try{return this[Nu](this.chmod),await this[Ho].fchmodPromise(this.fd,e)}finally{this[Ou]()}}createReadStream(e){return this[Ho].createReadStream(null,{...e,fd:this.fd})}createWriteStream(e){return this[Ho].createWriteStream(null,{...e,fd:this.fd})}datasync(){throw new Error("Method not implemented.")}sync(){throw new Error("Method not implemented.")}async read(e,r,s,a){try{this[Nu](this.read);let n;return Buffer.isBuffer(e)?n=e:(e??={},n=e.buffer??Buffer.alloc(16384),r=e.offset||0,s=e.length??n.byteLength,a=e.position??null),r??=0,s??=0,s===0?{bytesRead:s,buffer:n}:{bytesRead:await this[Ho].readPromise(this.fd,n,r,s,a),buffer:n}}finally{this[Ou]()}}async readFile(e){try{this[Nu](this.readFile);let r=(typeof e=="string"?e:e?.encoding)??void 0;return await this[Ho].readFilePromise(this.fd,r)}finally{this[Ou]()}}readLines(e){return(0,V$.createInterface)({input:this.createReadStream(e),crlfDelay:1/0})}async stat(e){try{return this[Nu](this.stat),await this[Ho].fstatPromise(this.fd,e)}finally{this[Ou]()}}async truncate(e){try{return this[Nu](this.truncate),await this[Ho].ftruncatePromise(this.fd,e)}finally{this[Ou]()}}utimes(e,r){throw new Error("Method not implemented.")}async writeFile(e,r){try{this[Nu](this.writeFile);let s=(typeof r=="string"?r:r?.encoding)??void 0;await this[Ho].writeFilePromise(this.fd,e,s)}finally{this[Ou]()}}async write(...e){try{if(this[Nu](this.write),ArrayBuffer.isView(e[0])){let[r,s,a,n]=e;return{bytesWritten:await this[Ho].writePromise(this.fd,r,s??void 0,a??void 0,n??void 0),buffer:r}}else{let[r,s,a]=e;return{bytesWritten:await this[Ho].writePromise(this.fd,r,s,a),buffer:r}}}finally{this[Ou]()}}async writev(e,r){try{this[Nu](this.writev);let s=0;if(typeof r<"u")for(let a of e){let n=await this.write(a,void 0,void 0,r);s+=n.bytesWritten,r+=n.bytesWritten}else for(let a of e){let n=await this.write(a);s+=n.bytesWritten}return{buffers:e,bytesWritten:s}}finally{this[Ou]()}}readv(e,r){throw new Error("Method not implemented.")}close(){if(this[Cp]===-1)return Promise.resolve();if(this[i0])return this[i0];if(this[sE]--,this[sE]===0){let e=this[Cp];this[Cp]=-1,this[i0]=this[Ho].closePromise(e).finally(()=>{this[i0]=void 0})}else this[i0]=new Promise((e,r)=>{this[px]=e,this[hx]=r}).finally(()=>{this[i0]=void 0,this[hx]=void 0,this[px]=void 0});return this[i0]}[(Ho,Cp,Y$=sE,W$=i0,G$=px,q$=hx,Nu)](e){if(this[Cp]===-1){let r=new Error("file closed");throw r.code="EBADF",r.syscall=e.name,r}this[sE]++}[Ou](){if(this[sE]--,this[sE]===0){let e=this[Cp];this[Cp]=-1,this[Ho].closePromise(e).then(this[px],this[hx])}}}});function _2(t,e){e=new Ax(e);let r=(s,a,n)=>{let c=s[a];s[a]=n,typeof c?.[oE.promisify.custom]<"u"&&(n[oE.promisify.custom]=c[oE.promisify.custom])};{r(t,"exists",(s,...a)=>{let c=typeof a[a.length-1]=="function"?a.pop():()=>{};process.nextTick(()=>{e.existsPromise(s).then(f=>{c(f)},()=>{c(!1)})})}),r(t,"read",(...s)=>{let[a,n,c,f,p,h]=s;if(s.length<=3){let E={};s.length<3?h=s[1]:(E=s[1],h=s[2]),{buffer:n=Buffer.alloc(16384),offset:c=0,length:f=n.byteLength,position:p}=E}if(c==null&&(c=0),f|=0,f===0){process.nextTick(()=>{h(null,0,n)});return}p==null&&(p=-1),process.nextTick(()=>{e.readPromise(a,n,c,f,p).then(E=>{h(null,E,n)},E=>{h(E,0,n)})})});for(let s of J$){let a=s.replace(/Promise$/,"");if(typeof t[a]>"u")continue;let n=e[s];if(typeof n>"u")continue;r(t,a,(...f)=>{let h=typeof f[f.length-1]=="function"?f.pop():()=>{};process.nextTick(()=>{n.apply(e,f).then(E=>{h(null,E)},E=>{h(E)})})})}t.realpath.native=t.realpath}{r(t,"existsSync",s=>{try{return e.existsSync(s)}catch{return!1}}),r(t,"readSync",(...s)=>{let[a,n,c,f,p]=s;return s.length<=3&&({offset:c=0,length:f=n.byteLength,position:p}=s[2]||{}),c==null&&(c=0),f|=0,f===0?0:(p==null&&(p=-1),e.readSync(a,n,c,f,p))});for(let s of I7e){let a=s;if(typeof t[a]>"u")continue;let n=e[s];typeof n>"u"||r(t,a,n.bind(e))}t.realpathSync.native=t.realpathSync}{let s=t.promises;for(let a of J$){let n=a.replace(/Promise$/,"");if(typeof s[n]>"u")continue;let c=e[a];typeof c>"u"||a!=="open"&&r(s,n,(f,...p)=>f instanceof M2?f[n].apply(f,p):c.call(e,f,...p))}r(s,"open",async(...a)=>{let n=await e.openPromise(...a);return new M2(n,e)})}t.read[oE.promisify.custom]=async(s,a,...n)=>({bytesRead:await e.readPromise(s,a,...n),buffer:a}),t.write[oE.promisify.custom]=async(s,a,...n)=>({bytesWritten:await e.writePromise(s,a,...n),buffer:a})}function gx(t,e){let r=Object.create(t);return _2(r,e),r}var oE,I7e,J$,z$=Ct(()=>{oE=Ie("util");j$();K$();I7e=new Set(["accessSync","appendFileSync","createReadStream","createWriteStream","chmodSync","fchmodSync","chownSync","fchownSync","closeSync","copyFileSync","linkSync","lstatSync","fstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","rmSync","statSync","symlinkSync","truncateSync","ftruncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),J$=new Set(["accessPromise","appendFilePromise","fchmodPromise","chmodPromise","fchownPromise","chownPromise","closePromise","copyFilePromise","linkPromise","fstatPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","rmPromise","statPromise","symlinkPromise","truncatePromise","ftruncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"])});function Z$(t){let e=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,"0");return`${t}${e}`}function X$(){if(T_)return T_;let t=ue.toPortablePath($$.default.tmpdir()),e=le.realpathSync(t);return process.once("exit",()=>{le.rmtempSync()}),T_={tmpdir:t,realTmpdir:e}}var $$,Lu,T_,le,eee=Ct(()=>{$$=et(Ie("os"));Id();tl();Lu=new Set,T_=null;le=Object.assign(new Yn,{detachTemp(t){Lu.delete(t)},mktempSync(t){let{tmpdir:e,realTmpdir:r}=X$();for(;;){let s=Z$("xfs-");try{this.mkdirSync(K.join(e,s))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=K.join(r,s);if(Lu.add(a),typeof t>"u")return a;try{return t(a)}finally{if(Lu.has(a)){Lu.delete(a);try{this.removeSync(a)}catch{}}}}},async mktempPromise(t){let{tmpdir:e,realTmpdir:r}=X$();for(;;){let s=Z$("xfs-");try{await this.mkdirPromise(K.join(e,s))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=K.join(r,s);if(Lu.add(a),typeof t>"u")return a;try{return await t(a)}finally{if(Lu.has(a)){Lu.delete(a);try{await this.removePromise(a)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(Lu.values()).map(async t=>{try{await le.removePromise(t,{maxRetries:0}),Lu.delete(t)}catch{}}))},rmtempSync(){for(let t of Lu)try{le.removeSync(t),Lu.delete(t)}catch{}}})});var U2={};Vt(U2,{AliasFS:()=>Hf,BasePortableFakeFS:()=>Uf,CustomDir:()=>L2,CwdFS:()=>Sn,FakeFS:()=>Ep,Filename:()=>Er,JailFS:()=>jf,LazyFS:()=>iE,MountFS:()=>r0,NoFS:()=>fx,NodeFS:()=>Yn,PortablePath:()=>vt,PosixFS:()=>n0,ProxiedFS:()=>js,VirtualFS:()=>Ao,constants:()=>fi,errors:()=>or,extendFs:()=>gx,normalizeLineEndings:()=>yd,npath:()=>ue,opendir:()=>lx,patchFs:()=>_2,ppath:()=>K,setupCopyIndex:()=>ax,statUtils:()=>el,unwatchAllFiles:()=>md,unwatchFile:()=>dd,watchFile:()=>nE,xfs:()=>le});var bt=Ct(()=>{m$();ix();S_();P_();B$();x_();Ed();tl();tl();x$();Ed();T$();F$();N$();O$();L$();Id();M$();Ip();_$();z$();eee()});var see=L((wGt,iee)=>{iee.exports=nee;nee.sync=w7e;var tee=Ie("fs");function C7e(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var s=0;s{cee.exports=aee;aee.sync=B7e;var oee=Ie("fs");function aee(t,e,r){oee.stat(t,function(s,a){r(s,s?!1:lee(a,e))})}function B7e(t,e){return lee(oee.statSync(t),e)}function lee(t,e){return t.isFile()&&v7e(t,e)}function v7e(t,e){var r=t.mode,s=t.uid,a=t.gid,n=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),c=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),f=parseInt("100",8),p=parseInt("010",8),h=parseInt("001",8),E=f|p,C=r&h||r&p&&a===c||r&f&&s===n||r&E&&n===0;return C}});var Aee=L((SGt,fee)=>{var vGt=Ie("fs"),dx;process.platform==="win32"||global.TESTING_WINDOWS?dx=see():dx=uee();fee.exports=R_;R_.sync=S7e;function R_(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(s,a){R_(t,e||{},function(n,c){n?a(n):s(c)})})}dx(t,e||{},function(s,a){s&&(s.code==="EACCES"||e&&e.ignoreErrors)&&(s=null,a=!1),r(s,a)})}function S7e(t,e){try{return dx.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Eee=L((DGt,yee)=>{var aE=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",pee=Ie("path"),D7e=aE?";":":",hee=Aee(),gee=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),dee=(t,e)=>{let r=e.colon||D7e,s=t.match(/\//)||aE&&t.match(/\\/)?[""]:[...aE?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],a=aE?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",n=aE?a.split(r):[""];return aE&&t.indexOf(".")!==-1&&n[0]!==""&&n.unshift(""),{pathEnv:s,pathExt:n,pathExtExe:a}},mee=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:s,pathExt:a,pathExtExe:n}=dee(t,e),c=[],f=h=>new Promise((E,C)=>{if(h===s.length)return e.all&&c.length?E(c):C(gee(t));let S=s[h],P=/^".*"$/.test(S)?S.slice(1,-1):S,I=pee.join(P,t),R=!P&&/^\.[\\\/]/.test(t)?t.slice(0,2)+I:I;E(p(R,h,0))}),p=(h,E,C)=>new Promise((S,P)=>{if(C===a.length)return S(f(E+1));let I=a[C];hee(h+I,{pathExt:n},(R,N)=>{if(!R&&N)if(e.all)c.push(h+I);else return S(h+I);return S(p(h,E,C+1))})});return r?f(0).then(h=>r(null,h),r):f(0)},b7e=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:s,pathExtExe:a}=dee(t,e),n=[];for(let c=0;c{"use strict";var Iee=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(s=>s.toUpperCase()==="PATH")||"Path"};F_.exports=Iee;F_.exports.default=Iee});var See=L((PGt,vee)=>{"use strict";var wee=Ie("path"),P7e=Eee(),x7e=Cee();function Bee(t,e){let r=t.options.env||process.env,s=process.cwd(),a=t.options.cwd!=null,n=a&&process.chdir!==void 0&&!process.chdir.disabled;if(n)try{process.chdir(t.options.cwd)}catch{}let c;try{c=P7e.sync(t.command,{path:r[x7e({env:r})],pathExt:e?wee.delimiter:void 0})}catch{}finally{n&&process.chdir(s)}return c&&(c=wee.resolve(a?t.options.cwd:"",c)),c}function k7e(t){return Bee(t)||Bee(t,!0)}vee.exports=k7e});var Dee=L((xGt,O_)=>{"use strict";var N_=/([()\][%!^"`<>&|;, *?])/g;function Q7e(t){return t=t.replace(N_,"^$1"),t}function T7e(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(N_,"^$1"),e&&(t=t.replace(N_,"^$1")),t}O_.exports.command=Q7e;O_.exports.argument=T7e});var Pee=L((kGt,bee)=>{"use strict";bee.exports=/^#!(.*)/});var kee=L((QGt,xee)=>{"use strict";var R7e=Pee();xee.exports=(t="")=>{let e=t.match(R7e);if(!e)return null;let[r,s]=e[0].replace(/#! ?/,"").split(" "),a=r.split("/").pop();return a==="env"?s:s?`${a} ${s}`:a}});var Tee=L((TGt,Qee)=>{"use strict";var L_=Ie("fs"),F7e=kee();function N7e(t){let r=Buffer.alloc(150),s;try{s=L_.openSync(t,"r"),L_.readSync(s,r,0,150,0),L_.closeSync(s)}catch{}return F7e(r.toString())}Qee.exports=N7e});var Oee=L((RGt,Nee)=>{"use strict";var O7e=Ie("path"),Ree=See(),Fee=Dee(),L7e=Tee(),M7e=process.platform==="win32",_7e=/\.(?:com|exe)$/i,U7e=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function H7e(t){t.file=Ree(t);let e=t.file&&L7e(t.file);return e?(t.args.unshift(t.file),t.command=e,Ree(t)):t.file}function j7e(t){if(!M7e)return t;let e=H7e(t),r=!_7e.test(e);if(t.options.forceShell||r){let s=U7e.test(e);t.command=O7e.normalize(t.command),t.command=Fee.command(t.command),t.args=t.args.map(n=>Fee.argument(n,s));let a=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${a}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function q7e(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let s={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?s:j7e(s)}Nee.exports=q7e});var _ee=L((FGt,Mee)=>{"use strict";var M_=process.platform==="win32";function __(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function G7e(t,e){if(!M_)return;let r=t.emit;t.emit=function(s,a){if(s==="exit"){let n=Lee(a,e);if(n)return r.call(t,"error",n)}return r.apply(t,arguments)}}function Lee(t,e){return M_&&t===1&&!e.file?__(e.original,"spawn"):null}function W7e(t,e){return M_&&t===1&&!e.file?__(e.original,"spawnSync"):null}Mee.exports={hookChildProcess:G7e,verifyENOENT:Lee,verifyENOENTSync:W7e,notFoundError:__}});var j_=L((NGt,lE)=>{"use strict";var Uee=Ie("child_process"),U_=Oee(),H_=_ee();function Hee(t,e,r){let s=U_(t,e,r),a=Uee.spawn(s.command,s.args,s.options);return H_.hookChildProcess(a,s),a}function Y7e(t,e,r){let s=U_(t,e,r),a=Uee.spawnSync(s.command,s.args,s.options);return a.error=a.error||H_.verifyENOENTSync(a.status,s),a}lE.exports=Hee;lE.exports.spawn=Hee;lE.exports.sync=Y7e;lE.exports._parse=U_;lE.exports._enoent=H_});var qee=L((OGt,jee)=>{"use strict";function V7e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function wd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,wd)}V7e(wd,Error);wd.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C0){for(C=1,S=1;C>",b=ur(">>",!1),y=">&",F=ur(">&",!1),z=">",Z=ur(">",!1),$="<<<",oe=ur("<<<",!1),xe="<&",Te=ur("<&",!1),lt="<",It=ur("<",!1),qt=function(O){return{type:"argument",segments:[].concat(...O)}},ir=function(O){return O},Pt="$'",gn=ur("$'",!1),Pr="'",Ir=ur("'",!1),Nr=function(O){return[{type:"text",text:O}]},nn='""',ai=ur('""',!1),wo=function(){return{type:"text",text:""}},ns='"',to=ur('"',!1),Bo=function(O){return O},ji=function(O){return{type:"arithmetic",arithmetic:O,quoted:!0}},ro=function(O){return{type:"shell",shell:O,quoted:!0}},vo=function(O){return{type:"variable",...O,quoted:!0}},RA=function(O){return{type:"text",text:O}},pf=function(O){return{type:"arithmetic",arithmetic:O,quoted:!1}},yh=function(O){return{type:"shell",shell:O,quoted:!1}},Eh=function(O){return{type:"variable",...O,quoted:!1}},no=function(O){return{type:"glob",pattern:O}},jn=/^[^']/,Fs=Zi(["'"],!0,!1),io=function(O){return O.join("")},lu=/^[^$"]/,cu=Zi(["$",'"'],!0,!1),uu=`\\ -`,FA=ur(`\\ -`,!1),NA=function(){return""},aa="\\",la=ur("\\",!1),OA=/^[\\$"`]/,gr=Zi(["\\","$",'"',"`"],!1,!1),So=function(O){return O},Me="\\a",fu=ur("\\a",!1),Cr=function(){return"a"},hf="\\b",LA=ur("\\b",!1),MA=function(){return"\b"},Au=/^[Ee]/,pu=Zi(["E","e"],!1,!1),ac=function(){return"\x1B"},ve="\\f",Nt=ur("\\f",!1),lc=function(){return"\f"},Li="\\n",so=ur("\\n",!1),Rt=function(){return` -`},xn="\\r",ca=ur("\\r",!1),qi=function(){return"\r"},Mi="\\t",Oa=ur("\\t",!1),dn=function(){return" "},Jn="\\v",hu=ur("\\v",!1),Ih=function(){return"\v"},La=/^[\\'"?]/,Ma=Zi(["\\","'",'"',"?"],!1,!1),Ua=function(O){return String.fromCharCode(parseInt(O,16))},Xe="\\x",Ha=ur("\\x",!1),gf="\\u",cc=ur("\\u",!1),wn="\\U",ua=ur("\\U",!1),_A=function(O){return String.fromCodePoint(parseInt(O,16))},UA=/^[0-7]/,fa=Zi([["0","7"]],!1,!1),vl=/^[0-9a-fA-f]/,Mt=Zi([["0","9"],["a","f"],["A","f"]],!1,!1),kn=Ef(),Aa="{}",ja=ur("{}",!1),is=function(){return"{}"},uc="-",gu=ur("-",!1),fc="+",qa=ur("+",!1),_i=".",ws=ur(".",!1),Sl=function(O,J,re){return{type:"number",value:(O==="-"?-1:1)*parseFloat(J.join("")+"."+re.join(""))}},df=function(O,J){return{type:"number",value:(O==="-"?-1:1)*parseInt(J.join(""))}},Ac=function(O){return{type:"variable",...O}},Bi=function(O){return{type:"variable",name:O}},Qn=function(O){return O},pc="*",Je=ur("*",!1),st="/",St=ur("/",!1),lr=function(O,J,re){return{type:J==="*"?"multiplication":"division",right:re}},ee=function(O,J){return J.reduce((re,de)=>({left:re,...de}),O)},Ee=function(O,J,re){return{type:J==="+"?"addition":"subtraction",right:re}},Oe="$((",gt=ur("$((",!1),yt="))",Dt=ur("))",!1),tr=function(O){return O},fn="$(",li=ur("$(",!1),Gi=function(O){return O},Tn="${",Ga=ur("${",!1),gy=":-",X1=ur(":-",!1),Do=function(O,J){return{name:O,defaultValue:J}},dy=":-}",Ch=ur(":-}",!1),$1=function(O){return{name:O,defaultValue:[]}},bo=":+",wh=ur(":+",!1),Bh=function(O,J){return{name:O,alternativeValue:J}},du=":+}",vh=ur(":+}",!1),Rg=function(O){return{name:O,alternativeValue:[]}},Fg=function(O){return{name:O}},Ng="$",my=ur("$",!1),mf=function(O){return e.isGlobPattern(O)},Po=function(O){return O},Dl=/^[a-zA-Z0-9_]/,Sh=Zi([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Og=function(){return Cy()},bl=/^[$@*?#a-zA-Z0-9_\-]/,Pl=Zi(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),yy=/^[()}<>$|&; \t"']/,HA=Zi(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Ey=/^[<>&; \t"']/,Iy=Zi(["<",">","&",";"," "," ",'"',"'"],!1,!1),jA=/^[ \t]/,qA=Zi([" "," "],!1,!1),Y=0,xt=0,GA=[{line:1,column:1}],xo=0,yf=[],mt=0,mu;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function Cy(){return t.substring(xt,Y)}function Lg(){return If(xt,Y)}function e2(O,J){throw J=J!==void 0?J:If(xt,Y),WA([Mg(O)],t.substring(xt,Y),J)}function Dh(O,J){throw J=J!==void 0?J:If(xt,Y),di(O,J)}function ur(O,J){return{type:"literal",text:O,ignoreCase:J}}function Zi(O,J,re){return{type:"class",parts:O,inverted:J,ignoreCase:re}}function Ef(){return{type:"any"}}function Wa(){return{type:"end"}}function Mg(O){return{type:"other",description:O}}function yu(O){var J=GA[O],re;if(J)return J;for(re=O-1;!GA[re];)re--;for(J=GA[re],J={line:J.line,column:J.column};rexo&&(xo=Y,yf=[]),yf.push(O))}function di(O,J){return new wd(O,null,null,J)}function WA(O,J,re){return new wd(wd.buildMessage(O,J),O,J,re)}function Ya(){var O,J,re;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(re=pa(),re===r&&(re=null),re!==r?(xt=O,J=n(re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function pa(){var O,J,re,de,Ke;if(O=Y,J=bh(),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de!==r?(Ke=Va(),Ke===r&&(Ke=null),Ke!==r?(xt=O,J=c(J,de,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;if(O===r)if(O=Y,J=bh(),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de===r&&(de=null),de!==r?(xt=O,J=f(J,de),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function Va(){var O,J,re,de,Ke;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=pa(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=p(re),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function _g(){var O;return t.charCodeAt(Y)===59?(O=h,Y++):(O=r,mt===0&&wt(E)),O===r&&(t.charCodeAt(Y)===38?(O=C,Y++):(O=r,mt===0&&wt(S))),O}function bh(){var O,J,re;return O=Y,J=YA(),J!==r?(re=Ug(),re===r&&(re=null),re!==r?(xt=O,J=P(J,re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function Ug(){var O,J,re,de,Ke,ft,dr;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=wy(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=bh(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();ft!==r?(xt=O,J=I(re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function wy(){var O;return t.substr(Y,2)===R?(O=R,Y+=2):(O=r,mt===0&&wt(N)),O===r&&(t.substr(Y,2)===U?(O=U,Y+=2):(O=r,mt===0&&wt(W))),O}function YA(){var O,J,re;return O=Y,J=Cf(),J!==r?(re=Hg(),re===r&&(re=null),re!==r?(xt=O,J=te(J,re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function Hg(){var O,J,re,de,Ke,ft,dr;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=Eu(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=YA(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();ft!==r?(xt=O,J=ie(re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function Eu(){var O;return t.substr(Y,2)===Ae?(O=Ae,Y+=2):(O=r,mt===0&&wt(ce)),O===r&&(t.charCodeAt(Y)===124?(O=me,Y++):(O=r,mt===0&&wt(pe))),O}function Iu(){var O,J,re,de,Ke,ft;if(O=Y,J=kh(),J!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,mt===0&&wt(Ce)),re!==r)if(de=VA(),de!==r){for(Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();Ke!==r?(xt=O,J=g(J,de),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;else Y=O,O=r;if(O===r)if(O=Y,J=kh(),J!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,mt===0&&wt(Ce)),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=we(J),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function Cf(){var O,J,re,de,Ke,ft,dr,Br,_n,mi,Bs;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(t.charCodeAt(Y)===40?(re=ye,Y++):(re=r,mt===0&&wt(fe)),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=pa(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();if(ft!==r)if(t.charCodeAt(Y)===41?(dr=se,Y++):(dr=r,mt===0&&wt(X)),dr!==r){for(Br=[],_n=kt();_n!==r;)Br.push(_n),_n=kt();if(Br!==r){for(_n=[],mi=qn();mi!==r;)_n.push(mi),mi=qn();if(_n!==r){for(mi=[],Bs=kt();Bs!==r;)mi.push(Bs),Bs=kt();mi!==r?(xt=O,J=De(Ke,_n),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(t.charCodeAt(Y)===123?(re=Re,Y++):(re=r,mt===0&&wt(dt)),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=pa(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();if(ft!==r)if(t.charCodeAt(Y)===125?(dr=j,Y++):(dr=r,mt===0&&wt(rt)),dr!==r){for(Br=[],_n=kt();_n!==r;)Br.push(_n),_n=kt();if(Br!==r){for(_n=[],mi=qn();mi!==r;)_n.push(mi),mi=qn();if(_n!==r){for(mi=[],Bs=kt();Bs!==r;)mi.push(Bs),Bs=kt();mi!==r?(xt=O,J=Fe(Ke,_n),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r){for(re=[],de=Iu();de!==r;)re.push(de),de=Iu();if(re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r){if(Ke=[],ft=Cu(),ft!==r)for(;ft!==r;)Ke.push(ft),ft=Cu();else Ke=r;if(Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();ft!==r?(xt=O,J=Ne(re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;if(O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r){if(re=[],de=Iu(),de!==r)for(;de!==r;)re.push(de),de=Iu();else re=r;if(re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=Pe(re),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}}}return O}function Ns(){var O,J,re,de,Ke;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r){if(re=[],de=ki(),de!==r)for(;de!==r;)re.push(de),de=ki();else re=r;if(re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=Ye(re),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r;return O}function Cu(){var O,J,re;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r?(re=qn(),re!==r?(xt=O,J=ke(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();J!==r?(re=ki(),re!==r?(xt=O,J=ke(re),O=J):(Y=O,O=r)):(Y=O,O=r)}return O}function qn(){var O,J,re,de,Ke;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(it.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(_e)),re===r&&(re=null),re!==r?(de=ss(),de!==r?(Ke=ki(),Ke!==r?(xt=O,J=x(re,de,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function ss(){var O;return t.substr(Y,2)===w?(O=w,Y+=2):(O=r,mt===0&&wt(b)),O===r&&(t.substr(Y,2)===y?(O=y,Y+=2):(O=r,mt===0&&wt(F)),O===r&&(t.charCodeAt(Y)===62?(O=z,Y++):(O=r,mt===0&&wt(Z)),O===r&&(t.substr(Y,3)===$?(O=$,Y+=3):(O=r,mt===0&&wt(oe)),O===r&&(t.substr(Y,2)===xe?(O=xe,Y+=2):(O=r,mt===0&&wt(Te)),O===r&&(t.charCodeAt(Y)===60?(O=lt,Y++):(O=r,mt===0&&wt(It))))))),O}function ki(){var O,J,re;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(re=VA(),re!==r?(xt=O,J=ke(re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function VA(){var O,J,re;if(O=Y,J=[],re=wf(),re!==r)for(;re!==r;)J.push(re),re=wf();else J=r;return J!==r&&(xt=O,J=qt(J)),O=J,O}function wf(){var O,J;return O=Y,J=mn(),J!==r&&(xt=O,J=ir(J)),O=J,O===r&&(O=Y,J=jg(),J!==r&&(xt=O,J=ir(J)),O=J,O===r&&(O=Y,J=qg(),J!==r&&(xt=O,J=ir(J)),O=J,O===r&&(O=Y,J=os(),J!==r&&(xt=O,J=ir(J)),O=J))),O}function mn(){var O,J,re,de;return O=Y,t.substr(Y,2)===Pt?(J=Pt,Y+=2):(J=r,mt===0&&wt(gn)),J!==r?(re=yn(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,mt===0&&wt(Ir)),de!==r?(xt=O,J=Nr(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function jg(){var O,J,re,de;return O=Y,t.charCodeAt(Y)===39?(J=Pr,Y++):(J=r,mt===0&&wt(Ir)),J!==r?(re=Bf(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,mt===0&&wt(Ir)),de!==r?(xt=O,J=Nr(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function qg(){var O,J,re,de;if(O=Y,t.substr(Y,2)===nn?(J=nn,Y+=2):(J=r,mt===0&&wt(ai)),J!==r&&(xt=O,J=wo()),O=J,O===r)if(O=Y,t.charCodeAt(Y)===34?(J=ns,Y++):(J=r,mt===0&&wt(to)),J!==r){for(re=[],de=xl();de!==r;)re.push(de),de=xl();re!==r?(t.charCodeAt(Y)===34?(de=ns,Y++):(de=r,mt===0&&wt(to)),de!==r?(xt=O,J=Bo(re),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function os(){var O,J,re;if(O=Y,J=[],re=ko(),re!==r)for(;re!==r;)J.push(re),re=ko();else J=r;return J!==r&&(xt=O,J=Bo(J)),O=J,O}function xl(){var O,J;return O=Y,J=Xr(),J!==r&&(xt=O,J=ji(J)),O=J,O===r&&(O=Y,J=xh(),J!==r&&(xt=O,J=ro(J)),O=J,O===r&&(O=Y,J=JA(),J!==r&&(xt=O,J=vo(J)),O=J,O===r&&(O=Y,J=vf(),J!==r&&(xt=O,J=RA(J)),O=J))),O}function ko(){var O,J;return O=Y,J=Xr(),J!==r&&(xt=O,J=pf(J)),O=J,O===r&&(O=Y,J=xh(),J!==r&&(xt=O,J=yh(J)),O=J,O===r&&(O=Y,J=JA(),J!==r&&(xt=O,J=Eh(J)),O=J,O===r&&(O=Y,J=By(),J!==r&&(xt=O,J=no(J)),O=J,O===r&&(O=Y,J=Ph(),J!==r&&(xt=O,J=RA(J)),O=J)))),O}function Bf(){var O,J,re;for(O=Y,J=[],jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Fs));re!==r;)J.push(re),jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Fs));return J!==r&&(xt=O,J=io(J)),O=J,O}function vf(){var O,J,re;if(O=Y,J=[],re=kl(),re===r&&(lu.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(cu))),re!==r)for(;re!==r;)J.push(re),re=kl(),re===r&&(lu.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(cu)));else J=r;return J!==r&&(xt=O,J=io(J)),O=J,O}function kl(){var O,J,re;return O=Y,t.substr(Y,2)===uu?(J=uu,Y+=2):(J=r,mt===0&&wt(FA)),J!==r&&(xt=O,J=NA()),O=J,O===r&&(O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,mt===0&&wt(la)),J!==r?(OA.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(gr)),re!==r?(xt=O,J=So(re),O=J):(Y=O,O=r)):(Y=O,O=r)),O}function yn(){var O,J,re;for(O=Y,J=[],re=Qo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Fs)));re!==r;)J.push(re),re=Qo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Fs)));return J!==r&&(xt=O,J=io(J)),O=J,O}function Qo(){var O,J,re;return O=Y,t.substr(Y,2)===Me?(J=Me,Y+=2):(J=r,mt===0&&wt(fu)),J!==r&&(xt=O,J=Cr()),O=J,O===r&&(O=Y,t.substr(Y,2)===hf?(J=hf,Y+=2):(J=r,mt===0&&wt(LA)),J!==r&&(xt=O,J=MA()),O=J,O===r&&(O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,mt===0&&wt(la)),J!==r?(Au.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(pu)),re!==r?(xt=O,J=ac(),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===ve?(J=ve,Y+=2):(J=r,mt===0&&wt(Nt)),J!==r&&(xt=O,J=lc()),O=J,O===r&&(O=Y,t.substr(Y,2)===Li?(J=Li,Y+=2):(J=r,mt===0&&wt(so)),J!==r&&(xt=O,J=Rt()),O=J,O===r&&(O=Y,t.substr(Y,2)===xn?(J=xn,Y+=2):(J=r,mt===0&&wt(ca)),J!==r&&(xt=O,J=qi()),O=J,O===r&&(O=Y,t.substr(Y,2)===Mi?(J=Mi,Y+=2):(J=r,mt===0&&wt(Oa)),J!==r&&(xt=O,J=dn()),O=J,O===r&&(O=Y,t.substr(Y,2)===Jn?(J=Jn,Y+=2):(J=r,mt===0&&wt(hu)),J!==r&&(xt=O,J=Ih()),O=J,O===r&&(O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,mt===0&&wt(la)),J!==r?(La.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Ma)),re!==r?(xt=O,J=So(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=wu()))))))))),O}function wu(){var O,J,re,de,Ke,ft,dr,Br,_n,mi,Bs,zA;return O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,mt===0&&wt(la)),J!==r?(re=ha(),re!==r?(xt=O,J=Ua(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Xe?(J=Xe,Y+=2):(J=r,mt===0&&wt(Ha)),J!==r?(re=Y,de=Y,Ke=ha(),Ke!==r?(ft=Os(),ft!==r?(Ke=[Ke,ft],de=Ke):(Y=de,de=r)):(Y=de,de=r),de===r&&(de=ha()),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,J=Ua(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===gf?(J=gf,Y+=2):(J=r,mt===0&&wt(cc)),J!==r?(re=Y,de=Y,Ke=Os(),Ke!==r?(ft=Os(),ft!==r?(dr=Os(),dr!==r?(Br=Os(),Br!==r?(Ke=[Ke,ft,dr,Br],de=Ke):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,J=Ua(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===wn?(J=wn,Y+=2):(J=r,mt===0&&wt(ua)),J!==r?(re=Y,de=Y,Ke=Os(),Ke!==r?(ft=Os(),ft!==r?(dr=Os(),dr!==r?(Br=Os(),Br!==r?(_n=Os(),_n!==r?(mi=Os(),mi!==r?(Bs=Os(),Bs!==r?(zA=Os(),zA!==r?(Ke=[Ke,ft,dr,Br,_n,mi,Bs,zA],de=Ke):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,J=_A(re),O=J):(Y=O,O=r)):(Y=O,O=r)))),O}function ha(){var O;return UA.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,mt===0&&wt(fa)),O}function Os(){var O;return vl.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,mt===0&&wt(Mt)),O}function Ph(){var O,J,re,de,Ke;if(O=Y,J=[],re=Y,t.charCodeAt(Y)===92?(de=aa,Y++):(de=r,mt===0&&wt(la)),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===Aa?(de=Aa,Y+=2):(de=r,mt===0&&wt(ja)),de!==r&&(xt=re,de=is()),re=de,re===r&&(re=Y,de=Y,mt++,Ke=vy(),mt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r))),re!==r)for(;re!==r;)J.push(re),re=Y,t.charCodeAt(Y)===92?(de=aa,Y++):(de=r,mt===0&&wt(la)),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===Aa?(de=Aa,Y+=2):(de=r,mt===0&&wt(ja)),de!==r&&(xt=re,de=is()),re=de,re===r&&(re=Y,de=Y,mt++,Ke=vy(),mt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r)));else J=r;return J!==r&&(xt=O,J=io(J)),O=J,O}function KA(){var O,J,re,de,Ke,ft;if(O=Y,t.charCodeAt(Y)===45?(J=uc,Y++):(J=r,mt===0&&wt(gu)),J===r&&(t.charCodeAt(Y)===43?(J=fc,Y++):(J=r,mt===0&&wt(qa))),J===r&&(J=null),J!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,mt===0&&wt(_e)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,mt===0&&wt(_e));else re=r;if(re!==r)if(t.charCodeAt(Y)===46?(de=_i,Y++):(de=r,mt===0&&wt(ws)),de!==r){if(Ke=[],it.test(t.charAt(Y))?(ft=t.charAt(Y),Y++):(ft=r,mt===0&&wt(_e)),ft!==r)for(;ft!==r;)Ke.push(ft),it.test(t.charAt(Y))?(ft=t.charAt(Y),Y++):(ft=r,mt===0&&wt(_e));else Ke=r;Ke!==r?(xt=O,J=Sl(J,re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;if(O===r){if(O=Y,t.charCodeAt(Y)===45?(J=uc,Y++):(J=r,mt===0&&wt(gu)),J===r&&(t.charCodeAt(Y)===43?(J=fc,Y++):(J=r,mt===0&&wt(qa))),J===r&&(J=null),J!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,mt===0&&wt(_e)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,mt===0&&wt(_e));else re=r;re!==r?(xt=O,J=df(J,re),O=J):(Y=O,O=r)}else Y=O,O=r;if(O===r&&(O=Y,J=JA(),J!==r&&(xt=O,J=Ac(J)),O=J,O===r&&(O=Y,J=hc(),J!==r&&(xt=O,J=Bi(J)),O=J,O===r)))if(O=Y,t.charCodeAt(Y)===40?(J=ye,Y++):(J=r,mt===0&&wt(fe)),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=oo(),de!==r){for(Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();Ke!==r?(t.charCodeAt(Y)===41?(ft=se,Y++):(ft=r,mt===0&&wt(X)),ft!==r?(xt=O,J=Qn(de),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r}return O}function Sf(){var O,J,re,de,Ke,ft,dr,Br;if(O=Y,J=KA(),J!==r){for(re=[],de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===42?(ft=pc,Y++):(ft=r,mt===0&&wt(Je)),ft===r&&(t.charCodeAt(Y)===47?(ft=st,Y++):(ft=r,mt===0&&wt(St))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=KA(),Br!==r?(xt=de,Ke=lr(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===42?(ft=pc,Y++):(ft=r,mt===0&&wt(Je)),ft===r&&(t.charCodeAt(Y)===47?(ft=st,Y++):(ft=r,mt===0&&wt(St))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=KA(),Br!==r?(xt=de,Ke=lr(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,J=ee(J,re),O=J):(Y=O,O=r)}else Y=O,O=r;return O}function oo(){var O,J,re,de,Ke,ft,dr,Br;if(O=Y,J=Sf(),J!==r){for(re=[],de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===43?(ft=fc,Y++):(ft=r,mt===0&&wt(qa)),ft===r&&(t.charCodeAt(Y)===45?(ft=uc,Y++):(ft=r,mt===0&&wt(gu))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=Sf(),Br!==r?(xt=de,Ke=Ee(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===43?(ft=fc,Y++):(ft=r,mt===0&&wt(qa)),ft===r&&(t.charCodeAt(Y)===45?(ft=uc,Y++):(ft=r,mt===0&&wt(gu))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=Sf(),Br!==r?(xt=de,Ke=Ee(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,J=ee(J,re),O=J):(Y=O,O=r)}else Y=O,O=r;return O}function Xr(){var O,J,re,de,Ke,ft;if(O=Y,t.substr(Y,3)===Oe?(J=Oe,Y+=3):(J=r,mt===0&&wt(gt)),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=oo(),de!==r){for(Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();Ke!==r?(t.substr(Y,2)===yt?(ft=yt,Y+=2):(ft=r,mt===0&&wt(Dt)),ft!==r?(xt=O,J=tr(de),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;return O}function xh(){var O,J,re,de;return O=Y,t.substr(Y,2)===fn?(J=fn,Y+=2):(J=r,mt===0&&wt(li)),J!==r?(re=pa(),re!==r?(t.charCodeAt(Y)===41?(de=se,Y++):(de=r,mt===0&&wt(X)),de!==r?(xt=O,J=Gi(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function JA(){var O,J,re,de,Ke,ft;return O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,2)===gy?(de=gy,Y+=2):(de=r,mt===0&&wt(X1)),de!==r?(Ke=Ns(),Ke!==r?(t.charCodeAt(Y)===125?(ft=j,Y++):(ft=r,mt===0&&wt(rt)),ft!==r?(xt=O,J=Do(re,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,3)===dy?(de=dy,Y+=3):(de=r,mt===0&&wt(Ch)),de!==r?(xt=O,J=$1(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,2)===bo?(de=bo,Y+=2):(de=r,mt===0&&wt(wh)),de!==r?(Ke=Ns(),Ke!==r?(t.charCodeAt(Y)===125?(ft=j,Y++):(ft=r,mt===0&&wt(rt)),ft!==r?(xt=O,J=Bh(re,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,3)===du?(de=du,Y+=3):(de=r,mt===0&&wt(vh)),de!==r?(xt=O,J=Rg(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.charCodeAt(Y)===125?(de=j,Y++):(de=r,mt===0&&wt(rt)),de!==r?(xt=O,J=Fg(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.charCodeAt(Y)===36?(J=Ng,Y++):(J=r,mt===0&&wt(my)),J!==r?(re=hc(),re!==r?(xt=O,J=Fg(re),O=J):(Y=O,O=r)):(Y=O,O=r)))))),O}function By(){var O,J,re;return O=Y,J=Gg(),J!==r?(xt=Y,re=mf(J),re?re=void 0:re=r,re!==r?(xt=O,J=Po(J),O=J):(Y=O,O=r)):(Y=O,O=r),O}function Gg(){var O,J,re,de,Ke;if(O=Y,J=[],re=Y,de=Y,mt++,Ke=Qh(),mt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r),re!==r)for(;re!==r;)J.push(re),re=Y,de=Y,mt++,Ke=Qh(),mt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r);else J=r;return J!==r&&(xt=O,J=io(J)),O=J,O}function kh(){var O,J,re;if(O=Y,J=[],Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Sh)),re!==r)for(;re!==r;)J.push(re),Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Sh));else J=r;return J!==r&&(xt=O,J=Og()),O=J,O}function hc(){var O,J,re;if(O=Y,J=[],bl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Pl)),re!==r)for(;re!==r;)J.push(re),bl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Pl));else J=r;return J!==r&&(xt=O,J=Og()),O=J,O}function vy(){var O;return yy.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,mt===0&&wt(HA)),O}function Qh(){var O;return Ey.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,mt===0&&wt(Iy)),O}function kt(){var O,J;if(O=[],jA.test(t.charAt(Y))?(J=t.charAt(Y),Y++):(J=r,mt===0&&wt(qA)),J!==r)for(;J!==r;)O.push(J),jA.test(t.charAt(Y))?(J=t.charAt(Y),Y++):(J=r,mt===0&&wt(qA));else O=r;return O}if(mu=a(),mu!==r&&Y===t.length)return mu;throw mu!==r&&Y!1}){try{return(0,Gee.parse)(t,e)}catch(r){throw r.location&&(r.message=r.message.replace(/(\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function cE(t,{endSemicolon:e=!1}={}){return t.map(({command:r,type:s},a)=>`${Ex(r)}${s===";"?a!==t.length-1||e?";":"":" &"}`).join(" ")}function Ex(t){return`${uE(t.chain)}${t.then?` ${q_(t.then)}`:""}`}function q_(t){return`${t.type} ${Ex(t.line)}`}function uE(t){return`${W_(t)}${t.then?` ${G_(t.then)}`:""}`}function G_(t){return`${t.type} ${uE(t.chain)}`}function W_(t){switch(t.type){case"command":return`${t.envs.length>0?`${t.envs.map(e=>mx(e)).join(" ")} `:""}${t.args.map(e=>Y_(e)).join(" ")}`;case"subshell":return`(${cE(t.subshell)})${t.args.length>0?` ${t.args.map(e=>H2(e)).join(" ")}`:""}`;case"group":return`{ ${cE(t.group,{endSemicolon:!0})} }${t.args.length>0?` ${t.args.map(e=>H2(e)).join(" ")}`:""}`;case"envs":return t.envs.map(e=>mx(e)).join(" ");default:throw new Error(`Unsupported command type: "${t.type}"`)}}function mx(t){return`${t.name}=${t.args[0]?Bd(t.args[0]):""}`}function Y_(t){switch(t.type){case"redirection":return H2(t);case"argument":return Bd(t);default:throw new Error(`Unsupported argument type: "${t.type}"`)}}function H2(t){return`${t.subtype} ${t.args.map(e=>Bd(e)).join(" ")}`}function Bd(t){return t.segments.map(e=>V_(e)).join("")}function V_(t){let e=(s,a)=>a?`"${s}"`:s,r=s=>s===""?"''":s.match(/[()}<>$|&;"'\n\t ]/)?s.match(/['\t\p{C}]/u)?s.match(/'/)?`"${s.replace(/["$\t\p{C}]/u,z7e)}"`:`$'${s.replace(/[\t\p{C}]/u,Yee)}'`:`'${s}'`:s;switch(t.type){case"text":return r(t.text);case"glob":return t.pattern;case"shell":return e(`$(${cE(t.shell)})`,t.quoted);case"variable":return e(typeof t.defaultValue>"u"?typeof t.alternativeValue>"u"?`\${${t.name}}`:t.alternativeValue.length===0?`\${${t.name}:+}`:`\${${t.name}:+${t.alternativeValue.map(s=>Bd(s)).join(" ")}}`:t.defaultValue.length===0?`\${${t.name}:-}`:`\${${t.name}:-${t.defaultValue.map(s=>Bd(s)).join(" ")}}`,t.quoted);case"arithmetic":return`$(( ${Ix(t.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${t.type}"`)}}function Ix(t){let e=a=>{switch(a){case"addition":return"+";case"subtraction":return"-";case"multiplication":return"*";case"division":return"/";default:throw new Error(`Can't extract operator from arithmetic expression of type "${a}"`)}},r=(a,n)=>n?`( ${a} )`:a,s=a=>r(Ix(a),!["number","variable"].includes(a.type));switch(t.type){case"number":return String(t.value);case"variable":return t.name;default:return`${s(t.left)} ${e(t.type)} ${s(t.right)}`}}var Gee,Wee,J7e,Yee,z7e,Vee=Ct(()=>{Gee=et(qee());Wee=new Map([["\f","\\f"],[` -`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),J7e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(Wee,([t,e])=>[t,`"$'${e}'"`])]),Yee=t=>Wee.get(t)??`\\x${t.charCodeAt(0).toString(16).padStart(2,"0")}`,z7e=t=>J7e.get(t)??`"$'${Yee(t)}'"`});var Jee=L((zGt,Kee)=>{"use strict";function Z7e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function vd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,vd)}Z7e(vd,Error);vd.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C0){for(C=1,S=1;CAe&&(Ae=W,ce=[]),ce.push(_e))}function rt(_e,x){return new vd(_e,null,null,x)}function Fe(_e,x,w){return new vd(vd.buildMessage(_e,x),_e,x,w)}function Ne(){var _e,x,w,b;return _e=W,x=Pe(),x!==r?(t.charCodeAt(W)===47?(w=n,W++):(w=r,me===0&&j(c)),w!==r?(b=Pe(),b!==r?(te=_e,x=f(x,b),_e=x):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r),_e===r&&(_e=W,x=Pe(),x!==r&&(te=_e,x=p(x)),_e=x),_e}function Pe(){var _e,x,w,b;return _e=W,x=Ye(),x!==r?(t.charCodeAt(W)===64?(w=h,W++):(w=r,me===0&&j(E)),w!==r?(b=it(),b!==r?(te=_e,x=C(x,b),_e=x):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r),_e===r&&(_e=W,x=Ye(),x!==r&&(te=_e,x=S(x)),_e=x),_e}function Ye(){var _e,x,w,b,y;return _e=W,t.charCodeAt(W)===64?(x=h,W++):(x=r,me===0&&j(E)),x!==r?(w=ke(),w!==r?(t.charCodeAt(W)===47?(b=n,W++):(b=r,me===0&&j(c)),b!==r?(y=ke(),y!==r?(te=_e,x=P(),_e=x):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r),_e===r&&(_e=W,x=ke(),x!==r&&(te=_e,x=P()),_e=x),_e}function ke(){var _e,x,w;if(_e=W,x=[],I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R)),w!==r)for(;w!==r;)x.push(w),I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R));else x=r;return x!==r&&(te=_e,x=P()),_e=x,_e}function it(){var _e,x,w;if(_e=W,x=[],N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U)),w!==r)for(;w!==r;)x.push(w),N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U));else x=r;return x!==r&&(te=_e,x=P()),_e=x,_e}if(pe=a(),pe!==r&&W===t.length)return pe;throw pe!==r&&W{zee=et(Jee())});var Dd=L((XGt,Sd)=>{"use strict";function Xee(t){return typeof t>"u"||t===null}function $7e(t){return typeof t=="object"&&t!==null}function eKe(t){return Array.isArray(t)?t:Xee(t)?[]:[t]}function tKe(t,e){var r,s,a,n;if(e)for(n=Object.keys(e),r=0,s=n.length;r{"use strict";function j2(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}j2.prototype=Object.create(Error.prototype);j2.prototype.constructor=j2;j2.prototype.toString=function(e){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!e&&this.mark&&(r+=" "+this.mark.toString()),r};$ee.exports=j2});var rte=L((e5t,tte)=>{"use strict";var ete=Dd();function K_(t,e,r,s,a){this.name=t,this.buffer=e,this.position=r,this.line=s,this.column=a}K_.prototype.getSnippet=function(e,r){var s,a,n,c,f;if(!this.buffer)return null;for(e=e||4,r=r||75,s="",a=this.position;a>0&&`\0\r -\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){s=" ... ",a+=5;break}for(n="",c=this.position;cr/2-1){n=" ... ",c-=5;break}return f=this.buffer.slice(a,c),ete.repeat(" ",e)+s+f+n+` -`+ete.repeat(" ",e+this.position-a+s.length)+"^"};K_.prototype.toString=function(e){var r,s="";return this.name&&(s+='in "'+this.name+'" '),s+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(s+=`: -`+r)),s};tte.exports=K_});var bs=L((t5t,ite)=>{"use strict";var nte=fE(),iKe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],sKe=["scalar","sequence","mapping"];function oKe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function aKe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(iKe.indexOf(r)===-1)throw new nte('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=oKe(e.styleAliases||null),sKe.indexOf(this.kind)===-1)throw new nte('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}ite.exports=aKe});var bd=L((r5t,ote)=>{"use strict";var ste=Dd(),Bx=fE(),lKe=bs();function J_(t,e,r){var s=[];return t.include.forEach(function(a){r=J_(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,c){n.tag===a.tag&&n.kind===a.kind&&s.push(c)}),r.push(a)}),r.filter(function(a,n){return s.indexOf(n)===-1})}function cKe(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function s(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e{"use strict";var uKe=bs();ate.exports=new uKe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var ute=L((i5t,cte)=>{"use strict";var fKe=bs();cte.exports=new fKe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var Ate=L((s5t,fte)=>{"use strict";var AKe=bs();fte.exports=new AKe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var vx=L((o5t,pte)=>{"use strict";var pKe=bd();pte.exports=new pKe({explicit:[lte(),ute(),Ate()]})});var gte=L((a5t,hte)=>{"use strict";var hKe=bs();function gKe(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function dKe(){return null}function mKe(t){return t===null}hte.exports=new hKe("tag:yaml.org,2002:null",{kind:"scalar",resolve:gKe,construct:dKe,predicate:mKe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var mte=L((l5t,dte)=>{"use strict";var yKe=bs();function EKe(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function IKe(t){return t==="true"||t==="True"||t==="TRUE"}function CKe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}dte.exports=new yKe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:EKe,construct:IKe,predicate:CKe,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})});var Ete=L((c5t,yte)=>{"use strict";var wKe=Dd(),BKe=bs();function vKe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function SKe(t){return 48<=t&&t<=55}function DKe(t){return 48<=t&&t<=57}function bKe(t){if(t===null)return!1;var e=t.length,r=0,s=!1,a;if(!e)return!1;if(a=t[r],(a==="-"||a==="+")&&(a=t[++r]),a==="0"){if(r+1===e)return!0;if(a=t[++r],a==="b"){for(r++;r=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var wte=L((u5t,Cte)=>{"use strict";var Ite=Dd(),kKe=bs(),QKe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function TKe(t){return!(t===null||!QKe.test(t)||t[t.length-1]==="_")}function RKe(t){var e,r,s,a;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,a=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(n){a.unshift(parseFloat(n,10))}),e=0,s=1,a.forEach(function(n){e+=n*s,s*=60}),r*e):r*parseFloat(e,10)}var FKe=/^[-+]?[0-9]+e/;function NKe(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ite.isNegativeZero(t))return"-0.0";return r=t.toString(10),FKe.test(r)?r.replace("e",".e"):r}function OKe(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Ite.isNegativeZero(t))}Cte.exports=new kKe("tag:yaml.org,2002:float",{kind:"scalar",resolve:TKe,construct:RKe,predicate:OKe,represent:NKe,defaultStyle:"lowercase"})});var z_=L((f5t,Bte)=>{"use strict";var LKe=bd();Bte.exports=new LKe({include:[vx()],implicit:[gte(),mte(),Ete(),wte()]})});var Z_=L((A5t,vte)=>{"use strict";var MKe=bd();vte.exports=new MKe({include:[z_()]})});var Pte=L((p5t,bte)=>{"use strict";var _Ke=bs(),Ste=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Dte=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function UKe(t){return t===null?!1:Ste.exec(t)!==null||Dte.exec(t)!==null}function HKe(t){var e,r,s,a,n,c,f,p=0,h=null,E,C,S;if(e=Ste.exec(t),e===null&&(e=Dte.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],s=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,s,a));if(n=+e[4],c=+e[5],f=+e[6],e[7]){for(p=e[7].slice(0,3);p.length<3;)p+="0";p=+p}return e[9]&&(E=+e[10],C=+(e[11]||0),h=(E*60+C)*6e4,e[9]==="-"&&(h=-h)),S=new Date(Date.UTC(r,s,a,n,c,f,p)),h&&S.setTime(S.getTime()-h),S}function jKe(t){return t.toISOString()}bte.exports=new _Ke("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:UKe,construct:HKe,instanceOf:Date,represent:jKe})});var kte=L((h5t,xte)=>{"use strict";var qKe=bs();function GKe(t){return t==="<<"||t===null}xte.exports=new qKe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:GKe})});var Rte=L((g5t,Tte)=>{"use strict";var Pd;try{Qte=Ie,Pd=Qte("buffer").Buffer}catch{}var Qte,WKe=bs(),X_=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function YKe(t){if(t===null)return!1;var e,r,s=0,a=t.length,n=X_;for(r=0;r64)){if(e<0)return!1;s+=6}return s%8===0}function VKe(t){var e,r,s=t.replace(/[\r\n=]/g,""),a=s.length,n=X_,c=0,f=[];for(e=0;e>16&255),f.push(c>>8&255),f.push(c&255)),c=c<<6|n.indexOf(s.charAt(e));return r=a%4*6,r===0?(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)):r===18?(f.push(c>>10&255),f.push(c>>2&255)):r===12&&f.push(c>>4&255),Pd?Pd.from?Pd.from(f):new Pd(f):f}function KKe(t){var e="",r=0,s,a,n=t.length,c=X_;for(s=0;s>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+t[s];return a=n%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}function JKe(t){return Pd&&Pd.isBuffer(t)}Tte.exports=new WKe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:YKe,construct:VKe,predicate:JKe,represent:KKe})});var Nte=L((m5t,Fte)=>{"use strict";var zKe=bs(),ZKe=Object.prototype.hasOwnProperty,XKe=Object.prototype.toString;function $Ke(t){if(t===null)return!0;var e=[],r,s,a,n,c,f=t;for(r=0,s=f.length;r{"use strict";var tJe=bs(),rJe=Object.prototype.toString;function nJe(t){if(t===null)return!0;var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e{"use strict";var sJe=bs(),oJe=Object.prototype.hasOwnProperty;function aJe(t){if(t===null)return!0;var e,r=t;for(e in r)if(oJe.call(r,e)&&r[e]!==null)return!1;return!0}function lJe(t){return t!==null?t:{}}Mte.exports=new sJe("tag:yaml.org,2002:set",{kind:"mapping",resolve:aJe,construct:lJe})});var pE=L((I5t,Ute)=>{"use strict";var cJe=bd();Ute.exports=new cJe({include:[Z_()],implicit:[Pte(),kte()],explicit:[Rte(),Nte(),Lte(),_te()]})});var jte=L((C5t,Hte)=>{"use strict";var uJe=bs();function fJe(){return!0}function AJe(){}function pJe(){return""}function hJe(t){return typeof t>"u"}Hte.exports=new uJe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:fJe,construct:AJe,predicate:hJe,represent:pJe})});var Gte=L((w5t,qte)=>{"use strict";var gJe=bs();function dJe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),s="";return!(e[0]==="/"&&(r&&(s=r[1]),s.length>3||e[e.length-s.length-1]!=="/"))}function mJe(t){var e=t,r=/\/([gim]*)$/.exec(t),s="";return e[0]==="/"&&(r&&(s=r[1]),e=e.slice(1,e.length-s.length-1)),new RegExp(e,s)}function yJe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function EJe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}qte.exports=new gJe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:dJe,construct:mJe,predicate:EJe,represent:yJe})});var Vte=L((B5t,Yte)=>{"use strict";var Sx;try{Wte=Ie,Sx=Wte("esprima")}catch{typeof window<"u"&&(Sx=window.esprima)}var Wte,IJe=bs();function CJe(t){if(t===null)return!1;try{var e="("+t+")",r=Sx.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function wJe(t){var e="("+t+")",r=Sx.parse(e,{range:!0}),s=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){s.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(s,e.slice(a[0]+1,a[1]-1)):new Function(s,"return "+e.slice(a[0],a[1]))}function BJe(t){return t.toString()}function vJe(t){return Object.prototype.toString.call(t)==="[object Function]"}Yte.exports=new IJe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:CJe,construct:wJe,predicate:vJe,represent:BJe})});var q2=L((S5t,Jte)=>{"use strict";var Kte=bd();Jte.exports=Kte.DEFAULT=new Kte({include:[pE()],explicit:[jte(),Gte(),Vte()]})});var hre=L((D5t,G2)=>{"use strict";var wp=Dd(),rre=fE(),SJe=rte(),nre=pE(),DJe=q2(),o0=Object.prototype.hasOwnProperty,Dx=1,ire=2,sre=3,bx=4,$_=1,bJe=2,zte=3,PJe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,xJe=/[\x85\u2028\u2029]/,kJe=/[,\[\]\{\}]/,ore=/^(?:!|!!|![a-z\-]+!)$/i,are=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Zte(t){return Object.prototype.toString.call(t)}function qf(t){return t===10||t===13}function kd(t){return t===9||t===32}function nl(t){return t===9||t===32||t===10||t===13}function hE(t){return t===44||t===91||t===93||t===123||t===125}function QJe(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function TJe(t){return t===120?2:t===117?4:t===85?8:0}function RJe(t){return 48<=t&&t<=57?t-48:-1}function Xte(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?` -`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function FJe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var lre=new Array(256),cre=new Array(256);for(xd=0;xd<256;xd++)lre[xd]=Xte(xd)?1:0,cre[xd]=Xte(xd);var xd;function NJe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||DJe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function ure(t,e){return new rre(e,new SJe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Rr(t,e){throw ure(t,e)}function Px(t,e){t.onWarning&&t.onWarning.call(null,ure(t,e))}var $te={YAML:function(e,r,s){var a,n,c;e.version!==null&&Rr(e,"duplication of %YAML directive"),s.length!==1&&Rr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),a===null&&Rr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),c=parseInt(a[2],10),n!==1&&Rr(e,"unacceptable YAML version of the document"),e.version=s[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&Px(e,"unsupported YAML version of the document")},TAG:function(e,r,s){var a,n;s.length!==2&&Rr(e,"TAG directive accepts exactly two arguments"),a=s[0],n=s[1],ore.test(a)||Rr(e,"ill-formed tag handle (first argument) of the TAG directive"),o0.call(e.tagMap,a)&&Rr(e,'there is a previously declared suffix for "'+a+'" tag handle'),are.test(n)||Rr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function s0(t,e,r,s){var a,n,c,f;if(e1&&(t.result+=wp.repeat(` -`,e-1))}function OJe(t,e,r){var s,a,n,c,f,p,h,E,C=t.kind,S=t.result,P;if(P=t.input.charCodeAt(t.position),nl(P)||hE(P)||P===35||P===38||P===42||P===33||P===124||P===62||P===39||P===34||P===37||P===64||P===96||(P===63||P===45)&&(a=t.input.charCodeAt(t.position+1),nl(a)||r&&hE(a)))return!1;for(t.kind="scalar",t.result="",n=c=t.position,f=!1;P!==0;){if(P===58){if(a=t.input.charCodeAt(t.position+1),nl(a)||r&&hE(a))break}else if(P===35){if(s=t.input.charCodeAt(t.position-1),nl(s))break}else{if(t.position===t.lineStart&&xx(t)||r&&hE(P))break;if(qf(P))if(p=t.line,h=t.lineStart,E=t.lineIndent,ls(t,!1,-1),t.lineIndent>=e){f=!0,P=t.input.charCodeAt(t.position);continue}else{t.position=c,t.line=p,t.lineStart=h,t.lineIndent=E;break}}f&&(s0(t,n,c,!1),tU(t,t.line-p),n=c=t.position,f=!1),kd(P)||(c=t.position+1),P=t.input.charCodeAt(++t.position)}return s0(t,n,c,!1),t.result?!0:(t.kind=C,t.result=S,!1)}function LJe(t,e){var r,s,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,s=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(s0(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,a=t.position;else return!0;else qf(r)?(s0(t,s,a,!0),tU(t,ls(t,!1,e)),s=a=t.position):t.position===t.lineStart&&xx(t)?Rr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Rr(t,"unexpected end of the stream within a single quoted scalar")}function MJe(t,e){var r,s,a,n,c,f;if(f=t.input.charCodeAt(t.position),f!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=s=t.position;(f=t.input.charCodeAt(t.position))!==0;){if(f===34)return s0(t,r,t.position,!0),t.position++,!0;if(f===92){if(s0(t,r,t.position,!0),f=t.input.charCodeAt(++t.position),qf(f))ls(t,!1,e);else if(f<256&&lre[f])t.result+=cre[f],t.position++;else if((c=TJe(f))>0){for(a=c,n=0;a>0;a--)f=t.input.charCodeAt(++t.position),(c=QJe(f))>=0?n=(n<<4)+c:Rr(t,"expected hexadecimal character");t.result+=FJe(n),t.position++}else Rr(t,"unknown escape sequence");r=s=t.position}else qf(f)?(s0(t,r,s,!0),tU(t,ls(t,!1,e)),r=s=t.position):t.position===t.lineStart&&xx(t)?Rr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,s=t.position)}Rr(t,"unexpected end of the stream within a double quoted scalar")}function _Je(t,e){var r=!0,s,a=t.tag,n,c=t.anchor,f,p,h,E,C,S={},P,I,R,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,C=!1,n=[];else if(N===123)p=125,C=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(ls(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=c,t.kind=C?"mapping":"sequence",t.result=n,!0;r||Rr(t,"missed comma between flow collection entries"),I=P=R=null,h=E=!1,N===63&&(f=t.input.charCodeAt(t.position+1),nl(f)&&(h=E=!0,t.position++,ls(t,!0,e))),s=t.line,dE(t,e,Dx,!1,!0),I=t.tag,P=t.result,ls(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===s)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),ls(t,!0,e),dE(t,e,Dx,!1,!0),R=t.result),C?gE(t,n,S,I,P,R):h?n.push(gE(t,null,S,I,P,R)):n.push(P),ls(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Rr(t,"unexpected end of the stream within a flow collection")}function UJe(t,e){var r,s,a=$_,n=!1,c=!1,f=e,p=0,h=!1,E,C;if(C=t.input.charCodeAt(t.position),C===124)s=!1;else if(C===62)s=!0;else return!1;for(t.kind="scalar",t.result="";C!==0;)if(C=t.input.charCodeAt(++t.position),C===43||C===45)$_===a?a=C===43?zte:bJe:Rr(t,"repeat of a chomping mode identifier");else if((E=RJe(C))>=0)E===0?Rr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Rr(t,"repeat of an indentation width identifier"):(f=e+E-1,c=!0);else break;if(kd(C)){do C=t.input.charCodeAt(++t.position);while(kd(C));if(C===35)do C=t.input.charCodeAt(++t.position);while(!qf(C)&&C!==0)}for(;C!==0;){for(eU(t),t.lineIndent=0,C=t.input.charCodeAt(t.position);(!c||t.lineIndentf&&(f=t.lineIndent),qf(C)){p++;continue}if(t.lineIndente)&&p!==0)Rr(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(dE(t,e,bx,!0,a)&&(I?S=t.result:P=t.result),I||(gE(t,h,E,C,S,P,n,c),C=S=P=null),ls(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Rr(t,"bad indentation of a mapping entry");else if(t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),C=0,S=t.implicitTypes.length;C tag; it should be "'+P.kind+'", not "'+t.kind+'"'),P.resolve(t.result)?(t.result=P.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Rr(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):Rr(t,"unknown tag !<"+t.tag+">");return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||E}function WJe(t){var e=t.position,r,s,a,n=!1,c;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(c=t.input.charCodeAt(t.position))!==0&&(ls(t,!0,-1),c=t.input.charCodeAt(t.position),!(t.lineIndent>0||c!==37));){for(n=!0,c=t.input.charCodeAt(++t.position),r=t.position;c!==0&&!nl(c);)c=t.input.charCodeAt(++t.position);for(s=t.input.slice(r,t.position),a=[],s.length<1&&Rr(t,"directive name must not be less than one character in length");c!==0;){for(;kd(c);)c=t.input.charCodeAt(++t.position);if(c===35){do c=t.input.charCodeAt(++t.position);while(c!==0&&!qf(c));break}if(qf(c))break;for(r=t.position;c!==0&&!nl(c);)c=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}c!==0&&eU(t),o0.call($te,s)?$te[s](t,s,a):Px(t,'unknown document directive "'+s+'"')}if(ls(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,ls(t,!0,-1)):n&&Rr(t,"directives end mark is expected"),dE(t,t.lineIndent-1,bx,!1,!0),ls(t,!0,-1),t.checkLineBreaks&&xJe.test(t.input.slice(e,t.position))&&Px(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&xx(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,ls(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var s=fre(t,r);if(typeof e!="function")return s;for(var a=0,n=s.length;a"u"&&(r=e,e=null),Are(t,e,wp.extend({schema:nre},r))}function VJe(t,e){return pre(t,wp.extend({schema:nre},e))}G2.exports.loadAll=Are;G2.exports.load=pre;G2.exports.safeLoadAll=YJe;G2.exports.safeLoad=VJe});var Lre=L((b5t,sU)=>{"use strict";var Y2=Dd(),V2=fE(),KJe=q2(),JJe=pE(),wre=Object.prototype.toString,Bre=Object.prototype.hasOwnProperty,zJe=9,W2=10,ZJe=13,XJe=32,$Je=33,eze=34,vre=35,tze=37,rze=38,nze=39,ize=42,Sre=44,sze=45,Dre=58,oze=61,aze=62,lze=63,cze=64,bre=91,Pre=93,uze=96,xre=123,fze=124,kre=125,jo={};jo[0]="\\0";jo[7]="\\a";jo[8]="\\b";jo[9]="\\t";jo[10]="\\n";jo[11]="\\v";jo[12]="\\f";jo[13]="\\r";jo[27]="\\e";jo[34]='\\"';jo[92]="\\\\";jo[133]="\\N";jo[160]="\\_";jo[8232]="\\L";jo[8233]="\\P";var Aze=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function pze(t,e){var r,s,a,n,c,f,p;if(e===null)return{};for(r={},s=Object.keys(e),a=0,n=s.length;a0?t.charCodeAt(n-1):null,S=S&&mre(c,f)}else{for(n=0;ns&&t[C+1]!==" ",C=n);else if(!mE(c))return kx;f=n>0?t.charCodeAt(n-1):null,S=S&&mre(c,f)}h=h||E&&n-C-1>s&&t[C+1]!==" "}return!p&&!h?S&&!a(t)?Tre:Rre:r>9&&Qre(t)?kx:h?Nre:Fre}function Eze(t,e,r,s){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&Aze.indexOf(e)!==-1)return"'"+e+"'";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),c=s||t.flowLevel>-1&&r>=t.flowLevel;function f(p){return gze(t,p)}switch(yze(e,c,t.indent,n,f)){case Tre:return e;case Rre:return"'"+e.replace(/'/g,"''")+"'";case Fre:return"|"+yre(e,t.indent)+Ere(dre(e,a));case Nre:return">"+yre(e,t.indent)+Ere(dre(Ize(e,n),a));case kx:return'"'+Cze(e,n)+'"';default:throw new V2("impossible error: invalid scalar style")}}()}function yre(t,e){var r=Qre(t)?String(e):"",s=t[t.length-1]===` -`,a=s&&(t[t.length-2]===` -`||t===` -`),n=a?"+":s?"":"-";return r+n+` -`}function Ere(t){return t[t.length-1]===` -`?t.slice(0,-1):t}function Ize(t,e){for(var r=/(\n+)([^\n]*)/g,s=function(){var h=t.indexOf(` -`);return h=h!==-1?h:t.length,r.lastIndex=h,Ire(t.slice(0,h),e)}(),a=t[0]===` -`||t[0]===" ",n,c;c=r.exec(t);){var f=c[1],p=c[2];n=p[0]===" ",s+=f+(!a&&!n&&p!==""?` -`:"")+Ire(p,e),a=n}return s}function Ire(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,s,a=0,n,c=0,f=0,p="";s=r.exec(t);)f=s.index,f-a>e&&(n=c>a?c:f,p+=` -`+t.slice(a,n),a=n+1),c=f;return p+=` -`,t.length-a>e&&c>a?p+=t.slice(a,c)+` -`+t.slice(c+1):p+=t.slice(a),p.slice(1)}function Cze(t){for(var e="",r,s,a,n=0;n=55296&&r<=56319&&(s=t.charCodeAt(n+1),s>=56320&&s<=57343)){e+=gre((r-55296)*1024+s-56320+65536),n++;continue}a=jo[r],e+=!a&&mE(r)?t[n]:a||gre(r)}return e}function wze(t,e,r){var s="",a=t.tag,n,c;for(n=0,c=r.length;n1024&&(E+="? "),E+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Qd(t,e,h,!1,!1)&&(E+=t.dump,s+=E));t.tag=a,t.dump="{"+s+"}"}function Sze(t,e,r,s){var a="",n=t.tag,c=Object.keys(r),f,p,h,E,C,S;if(t.sortKeys===!0)c.sort();else if(typeof t.sortKeys=="function")c.sort(t.sortKeys);else if(t.sortKeys)throw new V2("sortKeys must be a boolean or a function");for(f=0,p=c.length;f1024,C&&(t.dump&&W2===t.dump.charCodeAt(0)?S+="?":S+="? "),S+=t.dump,C&&(S+=rU(t,e)),Qd(t,e+1,E,!0,C)&&(t.dump&&W2===t.dump.charCodeAt(0)?S+=":":S+=": ",S+=t.dump,a+=S));t.tag=n,t.dump=a||"{}"}function Cre(t,e,r){var s,a,n,c,f,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,c=a.length;n tag resolver accepts not "'+p+'" style');t.dump=s}return!0}return!1}function Qd(t,e,r,s,a,n){t.tag=null,t.dump=r,Cre(t,r,!1)||Cre(t,r,!0);var c=wre.call(t.dump);s&&(s=t.flowLevel<0||t.flowLevel>e);var f=c==="[object Object]"||c==="[object Array]",p,h;if(f&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(f&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),c==="[object Object]")s&&Object.keys(t.dump).length!==0?(Sze(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(vze(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(c==="[object Array]"){var E=t.noArrayIndent&&e>0?e-1:e;s&&t.dump.length!==0?(Bze(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(wze(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(c==="[object String]")t.tag!=="?"&&Eze(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new V2("unacceptable kind of an object to dump "+c)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function Dze(t,e){var r=[],s=[],a,n;for(nU(t,r,s),a=0,n=s.length;a{"use strict";var Qx=hre(),Mre=Lre();function Tx(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Wi.exports.Type=bs();Wi.exports.Schema=bd();Wi.exports.FAILSAFE_SCHEMA=vx();Wi.exports.JSON_SCHEMA=z_();Wi.exports.CORE_SCHEMA=Z_();Wi.exports.DEFAULT_SAFE_SCHEMA=pE();Wi.exports.DEFAULT_FULL_SCHEMA=q2();Wi.exports.load=Qx.load;Wi.exports.loadAll=Qx.loadAll;Wi.exports.safeLoad=Qx.safeLoad;Wi.exports.safeLoadAll=Qx.safeLoadAll;Wi.exports.dump=Mre.dump;Wi.exports.safeDump=Mre.safeDump;Wi.exports.YAMLException=fE();Wi.exports.MINIMAL_SCHEMA=vx();Wi.exports.SAFE_SCHEMA=pE();Wi.exports.DEFAULT_SCHEMA=q2();Wi.exports.scan=Tx("scan");Wi.exports.parse=Tx("parse");Wi.exports.compose=Tx("compose");Wi.exports.addConstructor=Tx("addConstructor")});var Hre=L((x5t,Ure)=>{"use strict";var Pze=_re();Ure.exports=Pze});var qre=L((k5t,jre)=>{"use strict";function xze(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Td(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Td)}xze(Td,Error);Td.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C0){for(C=1,S=1;C({[gt]:Oe})))},Ae=function(ee){return ee},ce=function(ee){return ee},me=La("correct indentation"),pe=" ",Be=dn(" ",!1),Ce=function(ee){return ee.length===lr*St},g=function(ee){return ee.length===(lr+1)*St},we=function(){return lr++,!0},ye=function(){return lr--,!0},fe=function(){return ca()},se=La("pseudostring"),X=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,De=Jn(["\r",` -`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Re=/^[^\r\n\t ,\][{}:#"']/,dt=Jn(["\r",` -`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),j=function(){return ca().replace(/^ *| *$/g,"")},rt="--",Fe=dn("--",!1),Ne=/^[a-zA-Z\/0-9]/,Pe=Jn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ye=/^[^\r\n\t :,]/,ke=Jn(["\r",` -`," "," ",":",","],!0,!1),it="null",_e=dn("null",!1),x=function(){return null},w="true",b=dn("true",!1),y=function(){return!0},F="false",z=dn("false",!1),Z=function(){return!1},$=La("string"),oe='"',xe=dn('"',!1),Te=function(){return""},lt=function(ee){return ee},It=function(ee){return ee.join("")},qt=/^[^"\\\0-\x1F\x7F]/,ir=Jn(['"',"\\",["\0",""],"\x7F"],!0,!1),Pt='\\"',gn=dn('\\"',!1),Pr=function(){return'"'},Ir="\\\\",Nr=dn("\\\\",!1),nn=function(){return"\\"},ai="\\/",wo=dn("\\/",!1),ns=function(){return"/"},to="\\b",Bo=dn("\\b",!1),ji=function(){return"\b"},ro="\\f",vo=dn("\\f",!1),RA=function(){return"\f"},pf="\\n",yh=dn("\\n",!1),Eh=function(){return` -`},no="\\r",jn=dn("\\r",!1),Fs=function(){return"\r"},io="\\t",lu=dn("\\t",!1),cu=function(){return" "},uu="\\u",FA=dn("\\u",!1),NA=function(ee,Ee,Oe,gt){return String.fromCharCode(parseInt(`0x${ee}${Ee}${Oe}${gt}`))},aa=/^[0-9a-fA-F]/,la=Jn([["0","9"],["a","f"],["A","F"]],!1,!1),OA=La("blank space"),gr=/^[ \t]/,So=Jn([" "," "],!1,!1),Me=La("white space"),fu=/^[ \t\n\r]/,Cr=Jn([" "," ",` -`,"\r"],!1,!1),hf=`\r -`,LA=dn(`\r -`,!1),MA=` -`,Au=dn(` -`,!1),pu="\r",ac=dn("\r",!1),ve=0,Nt=0,lc=[{line:1,column:1}],Li=0,so=[],Rt=0,xn;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function ca(){return t.substring(Nt,ve)}function qi(){return Ua(Nt,ve)}function Mi(ee,Ee){throw Ee=Ee!==void 0?Ee:Ua(Nt,ve),gf([La(ee)],t.substring(Nt,ve),Ee)}function Oa(ee,Ee){throw Ee=Ee!==void 0?Ee:Ua(Nt,ve),Ha(ee,Ee)}function dn(ee,Ee){return{type:"literal",text:ee,ignoreCase:Ee}}function Jn(ee,Ee,Oe){return{type:"class",parts:ee,inverted:Ee,ignoreCase:Oe}}function hu(){return{type:"any"}}function Ih(){return{type:"end"}}function La(ee){return{type:"other",description:ee}}function Ma(ee){var Ee=lc[ee],Oe;if(Ee)return Ee;for(Oe=ee-1;!lc[Oe];)Oe--;for(Ee=lc[Oe],Ee={line:Ee.line,column:Ee.column};OeLi&&(Li=ve,so=[]),so.push(ee))}function Ha(ee,Ee){return new Td(ee,null,null,Ee)}function gf(ee,Ee,Oe){return new Td(Td.buildMessage(ee,Ee),ee,Ee,Oe)}function cc(){var ee;return ee=_A(),ee}function wn(){var ee,Ee,Oe;for(ee=ve,Ee=[],Oe=ua();Oe!==r;)Ee.push(Oe),Oe=ua();return Ee!==r&&(Nt=ee,Ee=n(Ee)),ee=Ee,ee}function ua(){var ee,Ee,Oe,gt,yt;return ee=ve,Ee=vl(),Ee!==r?(t.charCodeAt(ve)===45?(Oe=c,ve++):(Oe=r,Rt===0&&Xe(f)),Oe!==r?(gt=Qn(),gt!==r?(yt=fa(),yt!==r?(Nt=ee,Ee=p(yt),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee}function _A(){var ee,Ee,Oe;for(ee=ve,Ee=[],Oe=UA();Oe!==r;)Ee.push(Oe),Oe=UA();return Ee!==r&&(Nt=ee,Ee=h(Ee)),ee=Ee,ee}function UA(){var ee,Ee,Oe,gt,yt,Dt,tr,fn,li;if(ee=ve,Ee=Qn(),Ee===r&&(Ee=null),Ee!==r){if(Oe=ve,t.charCodeAt(ve)===35?(gt=E,ve++):(gt=r,Rt===0&&Xe(C)),gt!==r){if(yt=[],Dt=ve,tr=ve,Rt++,fn=st(),Rt--,fn===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(fn=t.charAt(ve),ve++):(fn=r,Rt===0&&Xe(S)),fn!==r?(tr=[tr,fn],Dt=tr):(ve=Dt,Dt=r)):(ve=Dt,Dt=r),Dt!==r)for(;Dt!==r;)yt.push(Dt),Dt=ve,tr=ve,Rt++,fn=st(),Rt--,fn===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(fn=t.charAt(ve),ve++):(fn=r,Rt===0&&Xe(S)),fn!==r?(tr=[tr,fn],Dt=tr):(ve=Dt,Dt=r)):(ve=Dt,Dt=r);else yt=r;yt!==r?(gt=[gt,yt],Oe=gt):(ve=Oe,Oe=r)}else ve=Oe,Oe=r;if(Oe===r&&(Oe=null),Oe!==r){if(gt=[],yt=Je(),yt!==r)for(;yt!==r;)gt.push(yt),yt=Je();else gt=r;gt!==r?(Nt=ee,Ee=P(),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r}else ve=ee,ee=r;if(ee===r&&(ee=ve,Ee=vl(),Ee!==r?(Oe=ja(),Oe!==r?(gt=Qn(),gt===r&&(gt=null),gt!==r?(t.charCodeAt(ve)===58?(yt=I,ve++):(yt=r,Rt===0&&Xe(R)),yt!==r?(Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(tr=fa(),tr!==r?(Nt=ee,Ee=N(Oe,tr),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r&&(ee=ve,Ee=vl(),Ee!==r?(Oe=is(),Oe!==r?(gt=Qn(),gt===r&&(gt=null),gt!==r?(t.charCodeAt(ve)===58?(yt=I,ve++):(yt=r,Rt===0&&Xe(R)),yt!==r?(Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(tr=fa(),tr!==r?(Nt=ee,Ee=N(Oe,tr),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r))){if(ee=ve,Ee=vl(),Ee!==r)if(Oe=is(),Oe!==r)if(gt=Qn(),gt!==r)if(yt=gu(),yt!==r){if(Dt=[],tr=Je(),tr!==r)for(;tr!==r;)Dt.push(tr),tr=Je();else Dt=r;Dt!==r?(Nt=ee,Ee=N(Oe,yt),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;else ve=ee,ee=r;else ve=ee,ee=r;else ve=ee,ee=r;if(ee===r)if(ee=ve,Ee=vl(),Ee!==r)if(Oe=is(),Oe!==r){if(gt=[],yt=ve,Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&Xe(W)),tr!==r?(fn=Qn(),fn===r&&(fn=null),fn!==r?(li=is(),li!==r?(Nt=yt,Dt=te(Oe,li),yt=Dt):(ve=yt,yt=r)):(ve=yt,yt=r)):(ve=yt,yt=r)):(ve=yt,yt=r),yt!==r)for(;yt!==r;)gt.push(yt),yt=ve,Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&Xe(W)),tr!==r?(fn=Qn(),fn===r&&(fn=null),fn!==r?(li=is(),li!==r?(Nt=yt,Dt=te(Oe,li),yt=Dt):(ve=yt,yt=r)):(ve=yt,yt=r)):(ve=yt,yt=r)):(ve=yt,yt=r);else gt=r;gt!==r?(yt=Qn(),yt===r&&(yt=null),yt!==r?(t.charCodeAt(ve)===58?(Dt=I,ve++):(Dt=r,Rt===0&&Xe(R)),Dt!==r?(tr=Qn(),tr===r&&(tr=null),tr!==r?(fn=fa(),fn!==r?(Nt=ee,Ee=ie(Oe,gt,fn),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)}else ve=ee,ee=r;else ve=ee,ee=r}return ee}function fa(){var ee,Ee,Oe,gt,yt,Dt,tr;if(ee=ve,Ee=ve,Rt++,Oe=ve,gt=st(),gt!==r?(yt=Mt(),yt!==r?(t.charCodeAt(ve)===45?(Dt=c,ve++):(Dt=r,Rt===0&&Xe(f)),Dt!==r?(tr=Qn(),tr!==r?(gt=[gt,yt,Dt,tr],Oe=gt):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r),Rt--,Oe!==r?(ve=Ee,Ee=void 0):Ee=r,Ee!==r?(Oe=Je(),Oe!==r?(gt=kn(),gt!==r?(yt=wn(),yt!==r?(Dt=Aa(),Dt!==r?(Nt=ee,Ee=Ae(yt),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r&&(ee=ve,Ee=st(),Ee!==r?(Oe=kn(),Oe!==r?(gt=_A(),gt!==r?(yt=Aa(),yt!==r?(Nt=ee,Ee=Ae(gt),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r))if(ee=ve,Ee=uc(),Ee!==r){if(Oe=[],gt=Je(),gt!==r)for(;gt!==r;)Oe.push(gt),gt=Je();else Oe=r;Oe!==r?(Nt=ee,Ee=ce(Ee),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;return ee}function vl(){var ee,Ee,Oe;for(Rt++,ee=ve,Ee=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));Oe!==r;)Ee.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));return Ee!==r?(Nt=ve,Oe=Ce(Ee),Oe?Oe=void 0:Oe=r,Oe!==r?(Ee=[Ee,Oe],ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r),Rt--,ee===r&&(Ee=r,Rt===0&&Xe(me)),ee}function Mt(){var ee,Ee,Oe;for(ee=ve,Ee=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));Oe!==r;)Ee.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));return Ee!==r?(Nt=ve,Oe=g(Ee),Oe?Oe=void 0:Oe=r,Oe!==r?(Ee=[Ee,Oe],ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r),ee}function kn(){var ee;return Nt=ve,ee=we(),ee?ee=void 0:ee=r,ee}function Aa(){var ee;return Nt=ve,ee=ye(),ee?ee=void 0:ee=r,ee}function ja(){var ee;return ee=Sl(),ee===r&&(ee=fc()),ee}function is(){var ee,Ee,Oe;if(ee=Sl(),ee===r){if(ee=ve,Ee=[],Oe=qa(),Oe!==r)for(;Oe!==r;)Ee.push(Oe),Oe=qa();else Ee=r;Ee!==r&&(Nt=ee,Ee=fe()),ee=Ee}return ee}function uc(){var ee;return ee=_i(),ee===r&&(ee=ws(),ee===r&&(ee=Sl(),ee===r&&(ee=fc()))),ee}function gu(){var ee;return ee=_i(),ee===r&&(ee=Sl(),ee===r&&(ee=qa())),ee}function fc(){var ee,Ee,Oe,gt,yt,Dt;if(Rt++,ee=ve,X.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(De)),Ee!==r){for(Oe=[],gt=ve,yt=Qn(),yt===r&&(yt=null),yt!==r?(Re.test(t.charAt(ve))?(Dt=t.charAt(ve),ve++):(Dt=r,Rt===0&&Xe(dt)),Dt!==r?(yt=[yt,Dt],gt=yt):(ve=gt,gt=r)):(ve=gt,gt=r);gt!==r;)Oe.push(gt),gt=ve,yt=Qn(),yt===r&&(yt=null),yt!==r?(Re.test(t.charAt(ve))?(Dt=t.charAt(ve),ve++):(Dt=r,Rt===0&&Xe(dt)),Dt!==r?(yt=[yt,Dt],gt=yt):(ve=gt,gt=r)):(ve=gt,gt=r);Oe!==r?(Nt=ee,Ee=j(),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;return Rt--,ee===r&&(Ee=r,Rt===0&&Xe(se)),ee}function qa(){var ee,Ee,Oe,gt,yt;if(ee=ve,t.substr(ve,2)===rt?(Ee=rt,ve+=2):(Ee=r,Rt===0&&Xe(Fe)),Ee===r&&(Ee=null),Ee!==r)if(Ne.test(t.charAt(ve))?(Oe=t.charAt(ve),ve++):(Oe=r,Rt===0&&Xe(Pe)),Oe!==r){for(gt=[],Ye.test(t.charAt(ve))?(yt=t.charAt(ve),ve++):(yt=r,Rt===0&&Xe(ke));yt!==r;)gt.push(yt),Ye.test(t.charAt(ve))?(yt=t.charAt(ve),ve++):(yt=r,Rt===0&&Xe(ke));gt!==r?(Nt=ee,Ee=j(),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;else ve=ee,ee=r;return ee}function _i(){var ee,Ee;return ee=ve,t.substr(ve,4)===it?(Ee=it,ve+=4):(Ee=r,Rt===0&&Xe(_e)),Ee!==r&&(Nt=ee,Ee=x()),ee=Ee,ee}function ws(){var ee,Ee;return ee=ve,t.substr(ve,4)===w?(Ee=w,ve+=4):(Ee=r,Rt===0&&Xe(b)),Ee!==r&&(Nt=ee,Ee=y()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,5)===F?(Ee=F,ve+=5):(Ee=r,Rt===0&&Xe(z)),Ee!==r&&(Nt=ee,Ee=Z()),ee=Ee),ee}function Sl(){var ee,Ee,Oe,gt;return Rt++,ee=ve,t.charCodeAt(ve)===34?(Ee=oe,ve++):(Ee=r,Rt===0&&Xe(xe)),Ee!==r?(t.charCodeAt(ve)===34?(Oe=oe,ve++):(Oe=r,Rt===0&&Xe(xe)),Oe!==r?(Nt=ee,Ee=Te(),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r&&(ee=ve,t.charCodeAt(ve)===34?(Ee=oe,ve++):(Ee=r,Rt===0&&Xe(xe)),Ee!==r?(Oe=df(),Oe!==r?(t.charCodeAt(ve)===34?(gt=oe,ve++):(gt=r,Rt===0&&Xe(xe)),gt!==r?(Nt=ee,Ee=lt(Oe),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)),Rt--,ee===r&&(Ee=r,Rt===0&&Xe($)),ee}function df(){var ee,Ee,Oe;if(ee=ve,Ee=[],Oe=Ac(),Oe!==r)for(;Oe!==r;)Ee.push(Oe),Oe=Ac();else Ee=r;return Ee!==r&&(Nt=ee,Ee=It(Ee)),ee=Ee,ee}function Ac(){var ee,Ee,Oe,gt,yt,Dt;return qt.test(t.charAt(ve))?(ee=t.charAt(ve),ve++):(ee=r,Rt===0&&Xe(ir)),ee===r&&(ee=ve,t.substr(ve,2)===Pt?(Ee=Pt,ve+=2):(Ee=r,Rt===0&&Xe(gn)),Ee!==r&&(Nt=ee,Ee=Pr()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===Ir?(Ee=Ir,ve+=2):(Ee=r,Rt===0&&Xe(Nr)),Ee!==r&&(Nt=ee,Ee=nn()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===ai?(Ee=ai,ve+=2):(Ee=r,Rt===0&&Xe(wo)),Ee!==r&&(Nt=ee,Ee=ns()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===to?(Ee=to,ve+=2):(Ee=r,Rt===0&&Xe(Bo)),Ee!==r&&(Nt=ee,Ee=ji()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===ro?(Ee=ro,ve+=2):(Ee=r,Rt===0&&Xe(vo)),Ee!==r&&(Nt=ee,Ee=RA()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===pf?(Ee=pf,ve+=2):(Ee=r,Rt===0&&Xe(yh)),Ee!==r&&(Nt=ee,Ee=Eh()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===no?(Ee=no,ve+=2):(Ee=r,Rt===0&&Xe(jn)),Ee!==r&&(Nt=ee,Ee=Fs()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===io?(Ee=io,ve+=2):(Ee=r,Rt===0&&Xe(lu)),Ee!==r&&(Nt=ee,Ee=cu()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===uu?(Ee=uu,ve+=2):(Ee=r,Rt===0&&Xe(FA)),Ee!==r?(Oe=Bi(),Oe!==r?(gt=Bi(),gt!==r?(yt=Bi(),yt!==r?(Dt=Bi(),Dt!==r?(Nt=ee,Ee=NA(Oe,gt,yt,Dt),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)))))))))),ee}function Bi(){var ee;return aa.test(t.charAt(ve))?(ee=t.charAt(ve),ve++):(ee=r,Rt===0&&Xe(la)),ee}function Qn(){var ee,Ee;if(Rt++,ee=[],gr.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(So)),Ee!==r)for(;Ee!==r;)ee.push(Ee),gr.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(So));else ee=r;return Rt--,ee===r&&(Ee=r,Rt===0&&Xe(OA)),ee}function pc(){var ee,Ee;if(Rt++,ee=[],fu.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(Cr)),Ee!==r)for(;Ee!==r;)ee.push(Ee),fu.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(Cr));else ee=r;return Rt--,ee===r&&(Ee=r,Rt===0&&Xe(Me)),ee}function Je(){var ee,Ee,Oe,gt,yt,Dt;if(ee=ve,Ee=st(),Ee!==r){for(Oe=[],gt=ve,yt=Qn(),yt===r&&(yt=null),yt!==r?(Dt=st(),Dt!==r?(yt=[yt,Dt],gt=yt):(ve=gt,gt=r)):(ve=gt,gt=r);gt!==r;)Oe.push(gt),gt=ve,yt=Qn(),yt===r&&(yt=null),yt!==r?(Dt=st(),Dt!==r?(yt=[yt,Dt],gt=yt):(ve=gt,gt=r)):(ve=gt,gt=r);Oe!==r?(Ee=[Ee,Oe],ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;return ee}function st(){var ee;return t.substr(ve,2)===hf?(ee=hf,ve+=2):(ee=r,Rt===0&&Xe(LA)),ee===r&&(t.charCodeAt(ve)===10?(ee=MA,ve++):(ee=r,Rt===0&&Xe(Au)),ee===r&&(t.charCodeAt(ve)===13?(ee=pu,ve++):(ee=r,Rt===0&&Xe(ac)))),ee}let St=2,lr=0;if(xn=a(),xn!==r&&ve===t.length)return xn;throw xn!==r&&ve"u"?!0:typeof t=="object"&&t!==null&&!Array.isArray(t)?Object.keys(t).every(e=>Vre(t[e])):!1}function oU(t,e,r){if(t===null)return`null -`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()} -`;if(typeof t=="string")return`${Wre(t)} -`;if(Array.isArray(t)){if(t.length===0)return`[] -`;let s=" ".repeat(e);return` -${t.map(n=>`${s}- ${oU(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[s,a]=t instanceof Rx?[t.data,!1]:[t,!0],n=" ".repeat(e),c=Object.keys(s);a&&c.sort((p,h)=>{let E=Gre.indexOf(p),C=Gre.indexOf(h);return E===-1&&C===-1?ph?1:0:E!==-1&&C===-1?-1:E===-1&&C!==-1?1:E-C});let f=c.filter(p=>!Vre(s[p])).map((p,h)=>{let E=s[p],C=Wre(p),S=oU(E,e+1,!0),P=h>0||r?n:"",I=C.length>1024?`? ${C} -${P}:`:`${C}:`,R=S.startsWith(` -`)?S:` ${S}`;return`${P}${I}${R}`}).join(e===0?` -`:"")||` -`;return r?` -${f}`:`${f}`}throw new Error(`Unsupported value type (${t})`)}function il(t){try{let e=oU(t,0,!1);return e!==` -`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function Tze(t){return t.endsWith(` -`)||(t+=` -`),(0,Yre.parse)(t)}function Fze(t){if(Rze.test(t))return Tze(t);let e=(0,Fx.safeLoad)(t,{schema:Fx.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function cs(t){return Fze(t)}var Fx,Yre,Qze,Gre,Rx,Rze,Kre=Ct(()=>{Fx=et(Hre()),Yre=et(qre()),Qze=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,Gre=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],Rx=class{constructor(e){this.data=e}};il.PreserveOrdering=Rx;Rze=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var K2={};Vt(K2,{parseResolution:()=>Cx,parseShell:()=>yx,parseSyml:()=>cs,stringifyArgument:()=>Y_,stringifyArgumentSegment:()=>V_,stringifyArithmeticExpression:()=>Ix,stringifyCommand:()=>W_,stringifyCommandChain:()=>uE,stringifyCommandChainThen:()=>G_,stringifyCommandLine:()=>Ex,stringifyCommandLineThen:()=>q_,stringifyEnvSegment:()=>mx,stringifyRedirectArgument:()=>H2,stringifyResolution:()=>wx,stringifyShell:()=>cE,stringifyShellLine:()=>cE,stringifySyml:()=>il,stringifyValueArgument:()=>Bd});var Bc=Ct(()=>{Vee();Zee();Kre()});var zre=L((N5t,aU)=>{"use strict";var Nze=t=>{let e=!1,r=!1,s=!1;for(let a=0;a{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=Nze(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};aU.exports=Jre;aU.exports.default=Jre});var Zre=L((O5t,Oze)=>{Oze.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var Rd=L(_l=>{"use strict";var $re=Zre(),Ps=process.env;Object.defineProperty(_l,"_vendors",{value:$re.map(function(t){return t.constant})});_l.name=null;_l.isPR=null;$re.forEach(function(t){let r=(Array.isArray(t.env)?t.env:[t.env]).every(function(s){return Xre(s)});if(_l[t.constant]=r,!!r)switch(_l.name=t.name,typeof t.pr){case"string":_l.isPR=!!Ps[t.pr];break;case"object":"env"in t.pr?_l.isPR=t.pr.env in Ps&&Ps[t.pr.env]!==t.pr.ne:"any"in t.pr?_l.isPR=t.pr.any.some(function(s){return!!Ps[s]}):_l.isPR=Xre(t.pr);break;default:_l.isPR=null}});_l.isCI=!!(Ps.CI!=="false"&&(Ps.BUILD_ID||Ps.BUILD_NUMBER||Ps.CI||Ps.CI_APP_ID||Ps.CI_BUILD_ID||Ps.CI_BUILD_NUMBER||Ps.CI_NAME||Ps.CONTINUOUS_INTEGRATION||Ps.RUN_ID||_l.name));function Xre(t){return typeof t=="string"?!!Ps[t]:"env"in t?Ps[t.env]&&Ps[t.env].includes(t.includes):"any"in t?t.any.some(function(e){return!!Ps[e]}):Object.keys(t).every(function(e){return Ps[e]===t[e]})}});var ei,En,Fd,lU,Nx,ene,cU,uU,Ox=Ct(()=>{(function(t){t.StartOfInput="\0",t.EndOfInput="",t.EndOfPartialInput=""})(ei||(ei={}));(function(t){t[t.InitialNode=0]="InitialNode",t[t.SuccessNode=1]="SuccessNode",t[t.ErrorNode=2]="ErrorNode",t[t.CustomNode=3]="CustomNode"})(En||(En={}));Fd=-1,lU=/^(-h|--help)(?:=([0-9]+))?$/,Nx=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,ene=/^-[a-zA-Z]{2,}$/,cU=/^([^=]+)=([\s\S]*)$/,uU=process.env.DEBUG_CLI==="1"});var nt,yE,Lx,fU,Mx=Ct(()=>{Ox();nt=class extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}},yE=class extends Error{constructor(e,r){if(super(),this.input=e,this.candidates=r,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(s=>s.reason!==null&&s.reason===r[0].reason)){let[{reason:s}]=this.candidates;this.message=`${s} - -${this.candidates.map(({usage:a})=>`$ ${a}`).join(` -`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean: - -$ ${s} -${fU(e)}`}else this.message=`Command not found; did you mean one of: - -${this.candidates.map(({usage:s},a)=>`${`${a}.`.padStart(4)} ${s}`).join(` -`)} - -${fU(e)}`}},Lx=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives: - -${this.usages.map((s,a)=>`${`${a}.`.padStart(4)} ${s}`).join(` -`)} - -${fU(e)}`}},fU=t=>`While running ${t.filter(e=>e!==ei.EndOfInput&&e!==ei.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function Lze(t){let e=t.split(` -`),r=e.filter(a=>a.match(/\S/)),s=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(s).trimRight()).join(` -`)}function qo(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,` -`),t=Lze(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 - -`),t=t.replace(/\n(\n)?\n*/g,(s,a)=>a||" "),r&&(t=t.split(/\n/).map(s=>{let a=s.match(/^\s*[*-][\t ]+(.*)/);if(!a)return s.match(/(.{1,80})(?: |$)/g).join(` -`);let n=s.length-s.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((c,f)=>" ".repeat(n)+(f===0?"- ":" ")+c).join(` -`)}).join(` - -`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(s,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(s,a,n)=>e.bold(a+n+a)),t?`${t} -`:""}var AU,tne,rne,pU=Ct(()=>{AU=Array(80).fill("\u2501");for(let t=0;t<=24;++t)AU[AU.length-t]=`\x1B[38;5;${232+t}m\u2501`;tne={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<75?` ${AU.slice(t.length+5).join("")}`:":"}\x1B[0m`,bold:t=>`\x1B[1m${t}\x1B[22m`,error:t=>`\x1B[31m\x1B[1m${t}\x1B[22m\x1B[39m`,code:t=>`\x1B[36m${t}\x1B[39m`},rne={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Ea(t){return{...t,[J2]:!0}}function Gf(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function _x(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,s,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=s!=="."||!e?`${s.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function z2(t,e){return e.length===1?new nt(`${t}${_x(e[0],{mergeName:!0})}`):new nt(`${t}: -${e.map(r=>` -- ${_x(r)}`).join("")}`)}function Nd(t,e,r){if(typeof r>"u")return e;let s=[],a=[],n=f=>{let p=e;return e=f,n.bind(null,p)};if(!r(e,{errors:s,coercions:a,coercion:n}))throw z2(`Invalid value for ${t}`,s);for(let[,f]of a)f();return e}var J2,Bp=Ct(()=>{Mx();J2=Symbol("clipanion/isOption")});var Ia={};Vt(Ia,{KeyRelationship:()=>Wf,TypeAssertionError:()=>l0,applyCascade:()=>$2,as:()=>rZe,assert:()=>$ze,assertWithErrors:()=>eZe,cascade:()=>qx,fn:()=>nZe,hasAtLeastOneKey:()=>IU,hasExactLength:()=>ane,hasForbiddenKeys:()=>wZe,hasKeyRelationship:()=>tB,hasMaxLength:()=>sZe,hasMinLength:()=>iZe,hasMutuallyExclusiveKeys:()=>BZe,hasRequiredKeys:()=>CZe,hasUniqueItems:()=>oZe,isArray:()=>Ux,isAtLeast:()=>yU,isAtMost:()=>cZe,isBase64:()=>mZe,isBoolean:()=>Wze,isDate:()=>Vze,isDict:()=>zze,isEnum:()=>po,isHexColor:()=>dZe,isISO8601:()=>gZe,isInExclusiveRange:()=>fZe,isInInclusiveRange:()=>uZe,isInstanceOf:()=>Xze,isInteger:()=>EU,isJSON:()=>yZe,isLiteral:()=>ine,isLowerCase:()=>AZe,isMap:()=>Jze,isNegative:()=>aZe,isNullable:()=>IZe,isNumber:()=>dU,isObject:()=>sne,isOneOf:()=>mU,isOptional:()=>EZe,isPartial:()=>Zze,isPayload:()=>Yze,isPositive:()=>lZe,isRecord:()=>jx,isSet:()=>Kze,isString:()=>IE,isTuple:()=>Hx,isUUID4:()=>hZe,isUnknown:()=>gU,isUpperCase:()=>pZe,makeTrait:()=>one,makeValidator:()=>Wr,matchesRegExp:()=>X2,softAssert:()=>tZe});function ti(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":typeof t=="symbol"?`<${t.toString()}>`:Array.isArray(t)?"an array":JSON.stringify(t)}function EE(t,e){if(t.length===0)return"nothing";if(t.length===1)return ti(t[0]);let r=t.slice(0,-1),s=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>ti(n)).join(", ")}${a}${ti(s)}`}function a0(t,e){var r,s,a;return typeof e=="number"?`${(r=t?.p)!==null&&r!==void 0?r:"."}[${e}]`:Mze.test(e)?`${(s=t?.p)!==null&&s!==void 0?s:""}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function hU(t,e,r){return t===1?e:r}function mr({errors:t,p:e}={},r){return t?.push(`${e??"."}: ${r}`),!1}function qze(t,e){return r=>{t[e]=r}}function Yf(t,e){return r=>{let s=t[e];return t[e]=r,Yf(t,e).bind(null,s)}}function Z2(t,e,r){let s=()=>(t(r()),a),a=()=>(t(e),s);return s}function gU(){return Wr({test:(t,e)=>!0})}function ine(t){return Wr({test:(e,r)=>e!==t?mr(r,`Expected ${ti(t)} (got ${ti(e)})`):!0})}function IE(){return Wr({test:(t,e)=>typeof t!="string"?mr(e,`Expected a string (got ${ti(t)})`):!0})}function po(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a=="string"||typeof a=="number"),s=new Set(e);return s.size===1?ine([...s][0]):Wr({test:(a,n)=>s.has(a)?!0:r?mr(n,`Expected one of ${EE(e,"or")} (got ${ti(a)})`):mr(n,`Expected a valid enumeration value (got ${ti(a)})`)})}function Wze(){return Wr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return mr(e,"Unbound coercion result");let s=Gze.get(t);if(typeof s<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a boolean (got ${ti(t)})`)}return!0}})}function dU(){return Wr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return mr(e,"Unbound coercion result");let s;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)s=a;else return mr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof s<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a number (got ${ti(t)})`)}return!0}})}function Yze(t){return Wr({test:(e,r)=>{var s;if(typeof r?.coercions>"u")return mr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return mr(r,"Unbound coercion result");if(typeof e!="string")return mr(r,`Expected a string (got ${ti(e)})`);let a;try{a=JSON.parse(e)}catch{return mr(r,`Expected a JSON string (got ${ti(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Yf(n,"value")}))?(r.coercions.push([(s=r.p)!==null&&s!==void 0?s:".",r.coercion.bind(null,n.value)]),!0):!1}})}function Vze(){return Wr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return mr(e,"Unbound coercion result");let s;if(typeof t=="string"&&nne.test(t))s=new Date(t);else{let a;if(typeof t=="string"){let n;try{n=JSON.parse(t)}catch{}typeof n=="number"&&(a=n)}else typeof t=="number"&&(a=t);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))s=new Date(a*1e3);else return mr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof s<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a date (got ${ti(t)})`)}return!0}})}function Ux(t,{delimiter:e}={}){return Wr({test:(r,s)=>{var a;let n=r;if(typeof r=="string"&&typeof e<"u"&&typeof s?.coercions<"u"){if(typeof s?.coercion>"u")return mr(s,"Unbound coercion result");r=r.split(e)}if(!Array.isArray(r))return mr(s,`Expected an array (got ${ti(r)})`);let c=!0;for(let f=0,p=r.length;f{var n,c;if(Object.getPrototypeOf(s).toString()==="[object Set]")if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return mr(a,"Unbound coercion result");let f=[...s],p=[...s];if(!r(p,Object.assign(Object.assign({},a),{coercion:void 0})))return!1;let h=()=>p.some((E,C)=>E!==f[C])?new Set(p):s;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",Z2(a.coercion,s,h)]),!0}else{let f=!0;for(let p of s)if(f=t(p,Object.assign({},a))&&f,!f&&a?.errors==null)break;return f}if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return mr(a,"Unbound coercion result");let f={value:s};return r(s,Object.assign(Object.assign({},a),{coercion:Yf(f,"value")}))?(a.coercions.push([(c=a.p)!==null&&c!==void 0?c:".",Z2(a.coercion,s,()=>new Set(f.value))]),!0):!1}return mr(a,`Expected a set (got ${ti(s)})`)}})}function Jze(t,e){let r=Ux(Hx([t,e])),s=jx(e,{keys:t});return Wr({test:(a,n)=>{var c,f,p;if(Object.getPrototypeOf(a).toString()==="[object Map]")if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return mr(n,"Unbound coercion result");let h=[...a],E=[...a];if(!r(E,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let C=()=>E.some((S,P)=>S[0]!==h[P][0]||S[1]!==h[P][1])?new Map(E):a;return n.coercions.push([(c=n.p)!==null&&c!==void 0?c:".",Z2(n.coercion,a,C)]),!0}else{let h=!0;for(let[E,C]of a)if(h=t(E,Object.assign({},n))&&h,!h&&n?.errors==null||(h=e(C,Object.assign(Object.assign({},n),{p:a0(n,E)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return mr(n,"Unbound coercion result");let h={value:a};return Array.isArray(a)?r(a,Object.assign(Object.assign({},n),{coercion:void 0}))?(n.coercions.push([(f=n.p)!==null&&f!==void 0?f:".",Z2(n.coercion,a,()=>new Map(h.value))]),!0):!1:s(a,Object.assign(Object.assign({},n),{coercion:Yf(h,"value")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:".",Z2(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return mr(n,`Expected a map (got ${ti(a)})`)}})}function Hx(t,{delimiter:e}={}){let r=ane(t.length);return Wr({test:(s,a)=>{var n;if(typeof s=="string"&&typeof e<"u"&&typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return mr(a,"Unbound coercion result");s=s.split(e),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,s)])}if(!Array.isArray(s))return mr(a,`Expected a tuple (got ${ti(s)})`);let c=r(s,Object.assign({},a));for(let f=0,p=s.length;f{var n;if(Array.isArray(s)&&typeof a?.coercions<"u")return typeof a?.coercion>"u"?mr(a,"Unbound coercion result"):r(s,Object.assign(Object.assign({},a),{coercion:void 0}))?(s=Object.fromEntries(s),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,s)]),!0):!1;if(typeof s!="object"||s===null)return mr(a,`Expected an object (got ${ti(s)})`);let c=Object.keys(s),f=!0;for(let p=0,h=c.length;p{if(typeof a!="object"||a===null)return mr(n,`Expected an object (got ${ti(a)})`);let c=new Set([...r,...Object.keys(a)]),f={},p=!0;for(let h of c){if(h==="constructor"||h==="__proto__")p=mr(Object.assign(Object.assign({},n),{p:a0(n,h)}),"Unsafe property name");else{let E=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0,C=Object.prototype.hasOwnProperty.call(a,h)?a[h]:void 0;typeof E<"u"?p=E(C,Object.assign(Object.assign({},n),{p:a0(n,h),coercion:Yf(a,h)}))&&p:e===null?p=mr(Object.assign(Object.assign({},n),{p:a0(n,h)}),`Extraneous property (got ${ti(C)})`):Object.defineProperty(f,h,{enumerable:!0,get:()=>C,set:qze(a,h)})}if(!p&&n?.errors==null)break}return e!==null&&(p||n?.errors!=null)&&(p=e(f,n)&&p),p}});return Object.assign(s,{properties:t})}function Zze(t){return sne(t,{extra:jx(gU())})}function one(t){return()=>t}function Wr({test:t}){return one(t)()}function $ze(t,e){if(!e(t))throw new l0}function eZe(t,e){let r=[];if(!e(t,{errors:r}))throw new l0({errors:r})}function tZe(t,e){}function rZe(t,e,{coerce:r=!1,errors:s,throw:a}={}){let n=s?[]:void 0;if(!r){if(e(t,{errors:n}))return a?t:{value:t,errors:void 0};if(a)throw new l0({errors:n});return{value:void 0,errors:n??!0}}let c={value:t},f=Yf(c,"value"),p=[];if(!e(t,{errors:n,coercion:f,coercions:p})){if(a)throw new l0({errors:n});return{value:void 0,errors:n??!0}}for(let[,h]of p)h();return a?c.value:{value:c.value,errors:void 0}}function nZe(t,e){let r=Hx(t);return(...s)=>{if(!r(s))throw new l0;return e(...s)}}function iZe(t){return Wr({test:(e,r)=>e.length>=t?!0:mr(r,`Expected to have a length of at least ${t} elements (got ${e.length})`)})}function sZe(t){return Wr({test:(e,r)=>e.length<=t?!0:mr(r,`Expected to have a length of at most ${t} elements (got ${e.length})`)})}function ane(t){return Wr({test:(e,r)=>e.length!==t?mr(r,`Expected to have a length of exactly ${t} elements (got ${e.length})`):!0})}function oZe({map:t}={}){return Wr({test:(e,r)=>{let s=new Set,a=new Set;for(let n=0,c=e.length;nt<=0?!0:mr(e,`Expected to be negative (got ${t})`)})}function lZe(){return Wr({test:(t,e)=>t>=0?!0:mr(e,`Expected to be positive (got ${t})`)})}function yU(t){return Wr({test:(e,r)=>e>=t?!0:mr(r,`Expected to be at least ${t} (got ${e})`)})}function cZe(t){return Wr({test:(e,r)=>e<=t?!0:mr(r,`Expected to be at most ${t} (got ${e})`)})}function uZe(t,e){return Wr({test:(r,s)=>r>=t&&r<=e?!0:mr(s,`Expected to be in the [${t}; ${e}] range (got ${r})`)})}function fZe(t,e){return Wr({test:(r,s)=>r>=t&&re!==Math.round(e)?mr(r,`Expected to be an integer (got ${e})`):!t&&!Number.isSafeInteger(e)?mr(r,`Expected to be a safe integer (got ${e})`):!0})}function X2(t){return Wr({test:(e,r)=>t.test(e)?!0:mr(r,`Expected to match the pattern ${t.toString()} (got ${ti(e)})`)})}function AZe(){return Wr({test:(t,e)=>t!==t.toLowerCase()?mr(e,`Expected to be all-lowercase (got ${t})`):!0})}function pZe(){return Wr({test:(t,e)=>t!==t.toUpperCase()?mr(e,`Expected to be all-uppercase (got ${t})`):!0})}function hZe(){return Wr({test:(t,e)=>jze.test(t)?!0:mr(e,`Expected to be a valid UUID v4 (got ${ti(t)})`)})}function gZe(){return Wr({test:(t,e)=>nne.test(t)?!0:mr(e,`Expected to be a valid ISO 8601 date string (got ${ti(t)})`)})}function dZe({alpha:t=!1}){return Wr({test:(e,r)=>(t?_ze.test(e):Uze.test(e))?!0:mr(r,`Expected to be a valid hexadecimal color string (got ${ti(e)})`)})}function mZe(){return Wr({test:(t,e)=>Hze.test(t)?!0:mr(e,`Expected to be a valid base 64 string (got ${ti(t)})`)})}function yZe(t=gU()){return Wr({test:(e,r)=>{let s;try{s=JSON.parse(e)}catch{return mr(r,`Expected to be a valid JSON string (got ${ti(e)})`)}return t(s,r)}})}function qx(t,...e){let r=Array.isArray(e[0])?e[0]:e;return Wr({test:(s,a)=>{var n,c;let f={value:s},p=typeof a?.coercions<"u"?Yf(f,"value"):void 0,h=typeof a?.coercions<"u"?[]:void 0;if(!t(s,Object.assign(Object.assign({},a),{coercion:p,coercions:h})))return!1;let E=[];if(typeof h<"u")for(let[,C]of h)E.push(C());try{if(typeof a?.coercions<"u"){if(f.value!==s){if(typeof a?.coercion>"u")return mr(a,"Unbound coercion result");a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,f.value)])}(c=a?.coercions)===null||c===void 0||c.push(...h)}return r.every(C=>C(f.value,a))}finally{for(let C of E)C()}}})}function $2(t,...e){let r=Array.isArray(e[0])?e[0]:e;return qx(t,r)}function EZe(t){return Wr({test:(e,r)=>typeof e>"u"?!0:t(e,r)})}function IZe(t){return Wr({test:(e,r)=>e===null?!0:t(e,r)})}function CZe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)||p.push(h);return p.length>0?mr(c,`Missing required ${hU(p.length,"property","properties")} ${EE(p,"and")}`):!0}})}function IU(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Wr({test:(n,c)=>Object.keys(n).some(h=>a(s,h,n))?!0:mr(c,`Missing at least one property from ${EE(Array.from(s),"or")}`)})}function wZe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>0?mr(c,`Forbidden ${hU(p.length,"property","properties")} ${EE(p,"and")}`):!0}})}function BZe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>1?mr(c,`Mutually exclusive properties ${EE(p,"and")}`):!0}})}function tB(t,e,r,s){var a,n;let c=new Set((a=s?.ignore)!==null&&a!==void 0?a:[]),f=eB[(n=s?.missingIf)!==null&&n!==void 0?n:"missing"],p=new Set(r),h=vZe[e],E=e===Wf.Forbids?"or":"and";return Wr({test:(C,S)=>{let P=new Set(Object.keys(C));if(!f(P,t,C)||c.has(C[t]))return!0;let I=[];for(let R of p)(f(P,R,C)&&!c.has(C[R]))!==h.expect&&I.push(R);return I.length>=1?mr(S,`Property "${t}" ${h.message} ${hU(I.length,"property","properties")} ${EE(I,E)}`):!0}})}var Mze,_ze,Uze,Hze,jze,nne,Gze,Xze,mU,l0,eB,Wf,vZe,Ul=Ct(()=>{Mze=/^[a-zA-Z_][a-zA-Z0-9_]*$/;_ze=/^#[0-9a-f]{6}$/i,Uze=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,Hze=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,jze=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,nne=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/;Gze=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]);Xze=t=>Wr({test:(e,r)=>e instanceof t?!0:mr(r,`Expected an instance of ${t.name} (got ${ti(e)})`)}),mU=(t,{exclusive:e=!1}={})=>Wr({test:(r,s)=>{var a,n,c;let f=[],p=typeof s?.errors<"u"?[]:void 0;for(let h=0,E=t.length;h1?mr(s,`Expected to match exactly a single predicate (matched ${f.join(", ")})`):(c=s?.errors)===null||c===void 0||c.push(...p),!1}});l0=class extends Error{constructor({errors:e}={}){let r="Type mismatch";if(e&&e.length>0){r+=` -`;for(let s of e)r+=` -- ${s}`}super(r)}};eB={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<"u",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids="Forbids",t.Requires="Requires"})(Wf||(Wf={}));vZe={[Wf.Forbids]:{expect:!1,message:"forbids using"},[Wf.Requires]:{expect:!0,message:"requires using"}}});var ot,c0=Ct(()=>{Bp();ot=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:c}=await Promise.resolve().then(()=>(Ul(),Ia)),f=c(a(n()),r),p=[],h=[];if(!f(this,{errors:p,coercions:h}))throw z2("Invalid option schema",p);for(let[,C]of h)C()}else if(r!=null)throw new Error("Invalid command schema");let s=await this.execute();return typeof s<"u"?s:0}};ot.isOption=J2;ot.Default=[]});function sl(t){uU&&console.log(t)}function cne(){let t={nodes:[]};for(let e=0;e{if(e.has(s))return;e.add(s);let a=t.nodes[s];for(let c of Object.values(a.statics))for(let{to:f}of c)r(f);for(let[,{to:c}]of a.dynamics)r(c);for(let{to:c}of a.shortcuts)r(c);let n=new Set(a.shortcuts.map(({to:c})=>c));for(;a.shortcuts.length>0;){let{to:c}=a.shortcuts.shift(),f=t.nodes[c];for(let[p,h]of Object.entries(f.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let C of h)E.some(({to:S})=>C.to===S)||E.push(C)}for(let[p,h]of f.dynamics)a.dynamics.some(([E,{to:C}])=>p===E&&h.to===C)||a.dynamics.push([p,h]);for(let p of f.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(En.InitialNode)}function bZe(t,{prefix:e=""}={}){if(uU){sl(`${e}Nodes are:`);for(let r=0;rE!==En.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===En.ErrorNode))throw new yE(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));s=kZe(h)}if(s.length>0){sl(" Results:");for(let n of s)sl(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else sl(" No results");return s}function xZe(t,e,{endToken:r=ei.EndOfInput}={}){let s=PZe(t,[...e,r]);return QZe(e,s.map(({state:a})=>a))}function kZe(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function QZe(t,e){let r=e.filter(S=>S.selectedIndex!==null),s=r.filter(S=>!S.partial);if(s.length>0&&(r=s),r.length===0)throw new Error;let a=r.filter(S=>S.selectedIndex===Fd||S.requiredOptions.every(P=>P.some(I=>S.options.find(R=>R.name===I))));if(a.length===0)throw new yE(t,r.map(S=>({usage:S.candidateUsage,reason:null})));let n=0;for(let S of a)S.path.length>n&&(n=S.path.length);let c=a.filter(S=>S.path.length===n),f=S=>S.positionals.filter(({extra:P})=>!P).length+S.options.length,p=c.map(S=>({state:S,positionalCount:f(S)})),h=0;for(let{positionalCount:S}of p)S>h&&(h=S);let E=p.filter(({positionalCount:S})=>S===h).map(({state:S})=>S),C=TZe(E);if(C.length>1)throw new Lx(t,C.map(S=>S.candidateUsage));return C[0]}function TZe(t){let e=[],r=[];for(let s of t)s.selectedIndex===Fd?r.push(s):e.push(s);return r.length>0&&e.push({...lne,path:une(...r.map(s=>s.path)),options:r.reduce((s,a)=>s.concat(a.options),[])}),e}function une(t,e,...r){return e===void 0?Array.from(t):une(t.filter((s,a)=>s===e[a]),...r)}function Hl(){return{dynamics:[],shortcuts:[],statics:{}}}function fne(t){return t===En.SuccessNode||t===En.ErrorNode}function CU(t,e=0){return{to:fne(t.to)?t.to:t.to>=En.CustomNode?t.to+e-En.CustomNode+1:t.to+e,reducer:t.reducer}}function RZe(t,e=0){let r=Hl();for(let[s,a]of t.dynamics)r.dynamics.push([s,CU(a,e)]);for(let s of t.shortcuts)r.shortcuts.push(CU(s,e));for(let[s,a]of Object.entries(t.statics))r.statics[s]=a.map(n=>CU(n,e));return r}function qs(t,e,r,s,a){t.nodes[e].dynamics.push([r,{to:s,reducer:a}])}function CE(t,e,r,s){t.nodes[e].shortcuts.push({to:r,reducer:s})}function Ca(t,e,r,s,a){(Object.prototype.hasOwnProperty.call(t.nodes[e].statics,r)?t.nodes[e].statics[r]:t.nodes[e].statics[r]=[]).push({to:s,reducer:a})}function Gx(t,e,r,s,a){if(Array.isArray(e)){let[n,...c]=e;return t[n](r,s,a,...c)}else return t[e](r,s,a)}var lne,FZe,wU,jl,BU,Wx,Yx=Ct(()=>{Ox();Mx();lne={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:Fd,partial:!1,tokens:[]};FZe={always:()=>!0,isOptionLike:(t,e)=>!t.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(t,e)=>t.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(t,e,r,s)=>!t.ignoreOptions&&e===s,isBatchOption:(t,e,r,s)=>!t.ignoreOptions&&ene.test(e)&&[...e.slice(1)].every(a=>s.has(`-${a}`)),isBoundOption:(t,e,r,s,a)=>{let n=e.match(cU);return!t.ignoreOptions&&!!n&&Nx.test(n[1])&&s.has(n[1])&&a.filter(c=>c.nameSet.includes(n[1])).every(c=>c.allowBinding)},isNegatedOption:(t,e,r,s)=>!t.ignoreOptions&&e===`--no-${s.slice(2)}`,isHelp:(t,e)=>!t.ignoreOptions&&lU.test(e),isUnsupportedOption:(t,e,r,s)=>!t.ignoreOptions&&e.startsWith("-")&&Nx.test(e)&&!s.has(e),isInvalidOption:(t,e)=>!t.ignoreOptions&&e.startsWith("-")&&!Nx.test(e)},wU={setCandidateState:(t,e,r,s)=>({...t,...s}),setSelectedIndex:(t,e,r,s)=>({...t,selectedIndex:s}),setPartialIndex:(t,e,r,s)=>({...t,selectedIndex:s,partial:!0}),pushBatch:(t,e,r,s)=>{let a=t.options.slice(),n=t.tokens.slice();for(let c=1;c{let[,s,a]=e.match(cU),n=t.options.concat({name:s,value:a}),c=t.tokens.concat([{segmentIndex:r,type:"option",slice:[0,s.length],option:s},{segmentIndex:r,type:"assign",slice:[s.length,s.length+1]},{segmentIndex:r,type:"value",slice:[s.length+1,s.length+a.length+1]}]);return{...t,options:n,tokens:c}},pushPath:(t,e,r)=>{let s=t.path.concat(e),a=t.tokens.concat({segmentIndex:r,type:"path"});return{...t,path:s,tokens:a}},pushPositional:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!1}),a=t.tokens.concat({segmentIndex:r,type:"positional"});return{...t,positionals:s,tokens:a}},pushExtra:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!0}),a=t.tokens.concat({segmentIndex:r,type:"positional"});return{...t,positionals:s,tokens:a}},pushExtraNoLimits:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:jl}),a=t.tokens.concat({segmentIndex:r,type:"positional"});return{...t,positionals:s,tokens:a}},pushTrue:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!0}),n=t.tokens.concat({segmentIndex:r,type:"option",option:s});return{...t,options:a,tokens:n}},pushFalse:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!1}),n=t.tokens.concat({segmentIndex:r,type:"option",option:s});return{...t,options:a,tokens:n}},pushUndefined:(t,e,r,s)=>{let a=t.options.concat({name:e,value:void 0}),n=t.tokens.concat({segmentIndex:r,type:"option",option:e});return{...t,options:a,tokens:n}},pushStringValue:(t,e,r)=>{var s;let a=t.options[t.options.length-1],n=t.options.slice(),c=t.tokens.concat({segmentIndex:r,type:"value"});return a.value=((s=a.value)!==null&&s!==void 0?s:[]).concat([e]),{...t,options:n,tokens:c}},setStringValue:(t,e,r)=>{let s=t.options[t.options.length-1],a=t.options.slice(),n=t.tokens.concat({segmentIndex:r,type:"value"});return s.value=e,{...t,options:a,tokens:n}},inhibateOptions:t=>({...t,ignoreOptions:!0}),useHelp:(t,e,r,s)=>{let[,,a]=e.match(lU);return typeof a<"u"?{...t,options:[{name:"-c",value:String(s)},{name:"-i",value:a}]}:{...t,options:[{name:"-c",value:String(s)}]}},setError:(t,e,r,s)=>e===ei.EndOfInput||e===ei.EndOfPartialInput?{...t,errorMessage:`${s}.`}:{...t,errorMessage:`${s} ("${e}").`},setOptionArityError:(t,e)=>{let r=t.options[t.options.length-1];return{...t,errorMessage:`Not enough arguments to option ${r.name}.`}}},jl=Symbol(),BU=class{constructor(e,r){this.allOptionNames=new Map,this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=r}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:r=this.arity.trailing,extra:s=this.arity.extra,proxy:a=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:r,extra:s,proxy:a})}addPositional({name:e="arg",required:r=!0}={}){if(!r&&this.arity.extra===jl)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!r&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!r&&this.arity.extra!==jl?this.arity.extra.push(e):this.arity.extra!==jl&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:r=0}={}){if(this.arity.extra===jl)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let s=0;s1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(s))throw new Error(`The arity must be an integer, got ${s}`);if(s<0)throw new Error(`The arity must be positive, got ${s}`);let f=e.reduce((p,h)=>h.length>p.length?h:p,"");for(let p of e)this.allOptionNames.set(p,f);this.options.push({preferredName:f,nameSet:e,description:r,arity:s,hidden:a,required:n,allowBinding:c})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:r=!0}={}){let s=[this.cliOpts.binaryName],a=[];if(this.paths.length>0&&s.push(...this.paths[0]),e){for(let{preferredName:c,nameSet:f,arity:p,hidden:h,description:E,required:C}of this.options){if(h)continue;let S=[];for(let I=0;I`:`[${P}]`)}s.push(...this.arity.leading.map(c=>`<${c}>`)),this.arity.extra===jl?s.push("..."):s.push(...this.arity.extra.map(c=>`[${c}]`)),s.push(...this.arity.trailing.map(c=>`<${c}>`))}return{usage:s.join(" "),options:a}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=cne(),r=En.InitialNode,s=this.usage().usage,a=this.options.filter(f=>f.required).map(f=>f.nameSet);r=Mu(e,Hl()),Ca(e,En.InitialNode,ei.StartOfInput,r,["setCandidateState",{candidateUsage:s,requiredOptions:a}]);let n=this.arity.proxy?"always":"isNotOptionLike",c=this.paths.length>0?this.paths:[[]];for(let f of c){let p=r;if(f.length>0){let S=Mu(e,Hl());CE(e,p,S),this.registerOptions(e,S),p=S}for(let S=0;S0||!this.arity.proxy){let S=Mu(e,Hl());qs(e,p,"isHelp",S,["useHelp",this.cliIndex]),qs(e,S,"always",S,"pushExtra"),Ca(e,S,ei.EndOfInput,En.SuccessNode,["setSelectedIndex",Fd]),this.registerOptions(e,p)}this.arity.leading.length>0&&(Ca(e,p,ei.EndOfInput,En.ErrorNode,["setError","Not enough positional arguments"]),Ca(e,p,ei.EndOfPartialInput,En.SuccessNode,["setPartialIndex",this.cliIndex]));let h=p;for(let S=0;S0||S+1!==this.arity.leading.length)&&(Ca(e,P,ei.EndOfInput,En.ErrorNode,["setError","Not enough positional arguments"]),Ca(e,P,ei.EndOfPartialInput,En.SuccessNode,["setPartialIndex",this.cliIndex])),qs(e,h,"isNotOptionLike",P,"pushPositional"),h=P}let E=h;if(this.arity.extra===jl||this.arity.extra.length>0){let S=Mu(e,Hl());if(CE(e,h,S),this.arity.extra===jl){let P=Mu(e,Hl());this.arity.proxy||this.registerOptions(e,P),qs(e,h,n,P,"pushExtraNoLimits"),qs(e,P,n,P,"pushExtraNoLimits"),CE(e,P,S)}else for(let P=0;P0)&&this.registerOptions(e,I),qs(e,E,n,I,"pushExtra"),CE(e,I,S),E=I}E=S}this.arity.trailing.length>0&&(Ca(e,E,ei.EndOfInput,En.ErrorNode,["setError","Not enough positional arguments"]),Ca(e,E,ei.EndOfPartialInput,En.SuccessNode,["setPartialIndex",this.cliIndex]));let C=E;for(let S=0;S=0&&e{let c=n?ei.EndOfPartialInput:ei.EndOfInput;return xZe(s,a,{endToken:c})}}}}});function pne(){return Vx.default&&"getColorDepth"in Vx.default.WriteStream.prototype?Vx.default.WriteStream.prototype.getColorDepth():process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}function hne(t){let e=Ane;if(typeof e>"u"){if(t.stdout===process.stdout&&t.stderr===process.stderr)return null;let{AsyncLocalStorage:r}=Ie("async_hooks");e=Ane=new r;let s=process.stdout._write;process.stdout._write=function(n,c,f){let p=e.getStore();return typeof p>"u"?s.call(this,n,c,f):p.stdout.write(n,c,f)};let a=process.stderr._write;process.stderr._write=function(n,c,f){let p=e.getStore();return typeof p>"u"?a.call(this,n,c,f):p.stderr.write(n,c,f)}}return r=>e.run(t,r)}var Vx,Ane,gne=Ct(()=>{Vx=et(Ie("tty"),1)});var Kx,dne=Ct(()=>{c0();Kx=class t extends ot{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,r){let s=new t(r);s.path=e.path;for(let a of e.options)switch(a.name){case"-c":s.commands.push(Number(a.value));break;case"-i":s.index=Number(a.value);break}return s}async execute(){let e=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: -`),this.context.stdout.write(` -`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(` -`),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. -`)}}}});async function Ene(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=Cne(t);return wa.from(r,e).runExit(s,a)}async function Ine(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=Cne(t);return wa.from(r,e).run(s,a)}function Cne(t){let e,r,s,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(s=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?s=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],s=t[2]):t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],s=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],s=t[2],a=t[3];break}if(typeof s>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}}function yne(t){return t()}var mne,wa,wne=Ct(()=>{Ox();Yx();pU();gne();c0();dne();mne=Symbol("clipanion/errorCommand");wa=class t{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:s,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Wx({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=s,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let s=new t(r),a=Array.isArray(e)?e:[e];for(let n of a)s.register(n);return s}register(e){var r;let s=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[ot.isOption]&&s.set(p,h)}let n=this.builder.command(),c=n.cliIndex,f=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof f<"u")for(let p of f)n.addPath(p);this.registrations.set(e,{specs:s,builder:n,index:c});for(let[p,{definition:h}]of s.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:s,context:a,partial:n}=typeof e=="object"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:c,process:f}=this.builder.compile(),p=f(s,{partial:n}),h={...t.defaultContext,...a};switch(p.selectedIndex){case Fd:{let E=Kx.from(p,c);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=c[p.selectedIndex],C=this.registrations.get(E);if(typeof C>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let S=new E;S.context=h,S.tokens=p.tokens,S.path=p.path;try{for(let[P,{transformer:I}]of C.specs.entries())S[P]=I(C.builder,P,p,h);return S}catch(P){throw P[mne]=S,P}}break}}async run(e,r){var s,a;let n,c={...t.defaultContext,...r},f=(s=this.enableColors)!==null&&s!==void 0?s:c.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,c)}catch(E){return c.stdout.write(this.error(E,{colored:f})),1}if(n.help)return c.stdout.write(this.usage(n,{colored:f,detailed:!0})),0;n.context=c,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,C)=>this.error(E,C),format:E=>this.format(E),process:(E,C)=>this.process(E,{...c,...C}),run:(E,C)=>this.run(E,{...c,...C}),usage:(E,C)=>this.usage(E,C)};let p=this.enableCapture&&(a=hne(c))!==null&&a!==void 0?a:yne,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return c.stdout.write(this.error(E,{colored:f,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:s}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),c=typeof e.usage.category<"u"?qo(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,f=typeof e.usage.description<"u"?qo(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<"u"?qo(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<"u"?e.usage.examples.map(([E,C])=>[qo(E,{format:this.format(r),paragraphs:!1}),C.replace(/\$0/g,this.binaryName)]):void 0;return{path:s,usage:a,category:c,description:f,details:p,examples:h,options:n}}definitions({colored:e=!1}={}){let r=[];for(let s of this.registrations.keys()){let a=this.definition(s,{colored:e});a&&r.push(a)}return r}usage(e=null,{colored:r,detailed:s=!1,prefix:a="$ "}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(P=>P.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(E){e=null;continue}}e&&(s=!0)}let c=e!==null&&e instanceof ot?e.constructor:e,f="";if(c)if(s){let{description:p="",details:h="",examples:E=[]}=c.usage||{};p!==""&&(f+=qo(p,{format:this.format(r),paragraphs:!1}).replace(/^./,P=>P.toUpperCase()),f+=` -`),(h!==""||E.length>0)&&(f+=`${this.format(r).header("Usage")} -`,f+=` -`);let{usage:C,options:S}=this.getUsageByRegistration(c,{inlineOptions:!1});if(f+=`${this.format(r).bold(a)}${C} -`,S.length>0){f+=` -`,f+=`${this.format(r).header("Options")} -`;let P=S.reduce((I,R)=>Math.max(I,R.definition.length),0);f+=` -`;for(let{definition:I,description:R}of S)f+=` ${this.format(r).bold(I.padEnd(P))} ${qo(R,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(f+=` -`,f+=`${this.format(r).header("Details")} -`,f+=` -`,f+=qo(h,{format:this.format(r),paragraphs:!0})),E.length>0){f+=` -`,f+=`${this.format(r).header("Examples")} -`;for(let[P,I]of E)f+=` -`,f+=qo(P,{format:this.format(r),paragraphs:!1}),f+=`${I.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)} -`}}else{let{usage:p}=this.getUsageByRegistration(c);f+=`${this.format(r).bold(a)}${p} -`}else{let p=new Map;for(let[S,{index:P}]of this.registrations.entries()){if(typeof S.usage>"u")continue;let I=typeof S.usage.category<"u"?qo(S.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(I);typeof R>"u"&&p.set(I,R=[]);let{usage:N}=this.getUsageByIndex(P);R.push({commandClass:S,usage:N})}let h=Array.from(p.keys()).sort((S,P)=>S===null?-1:P===null?1:S.localeCompare(P,"en",{usage:"sort",caseFirst:"upper"})),E=typeof this.binaryLabel<"u",C=typeof this.binaryVersion<"u";E||C?(E&&C?f+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)} - -`:E?f+=`${this.format(r).header(`${this.binaryLabel}`)} -`:f+=`${this.format(r).header(`${this.binaryVersion}`)} -`,f+=` ${this.format(r).bold(a)}${this.binaryName} -`):f+=`${this.format(r).bold(a)}${this.binaryName} -`;for(let S of h){let P=p.get(S).slice().sort((R,N)=>R.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),I=S!==null?S.trim():"General commands";f+=` -`,f+=`${this.format(r).header(`${I}`)} -`;for(let{commandClass:R,usage:N}of P){let U=R.usage.description||"undocumented";f+=` -`,f+=` ${this.format(r).bold(N)} -`,f+=` ${qo(U,{format:this.format(r),paragraphs:!1})}`}}f+=` -`,f+=qo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return f}error(e,r){var s,{colored:a,command:n=(s=e[mne])!==null&&s!==void 0?s:null}=r===void 0?{}:r;(!e||typeof e!="object"||!("stack"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let c="",f=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");f==="Error"&&(f="Internal Error"),c+=`${this.format(a).error(f)}: ${e.message} -`;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(c+=` -`,c+=this.usage(n)):e.stack&&(c+=`${e.stack.replace(/^.*\n/,"")} -`),c}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:t.defaultContext.colorDepth>1)?tne:rne}getUsageByRegistration(e,r){let s=this.registrations.get(e);if(typeof s>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(s.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};wa.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:pne()}});var rB,Bne=Ct(()=>{c0();rB=class extends ot{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} -`)}};rB.paths=[["--clipanion=definitions"]]});var nB,vne=Ct(()=>{c0();nB=class extends ot{async execute(){this.context.stdout.write(this.cli.usage())}};nB.paths=[["-h"],["--help"]]});function Jx(t={}){return Ea({definition(e,r){var s;e.addProxy({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){return s.positionals.map(({value:a})=>a)}})}var vU=Ct(()=>{Bp()});var iB,Sne=Ct(()=>{c0();vU();iB=class extends ot{constructor(){super(...arguments),this.args=Jx()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)} -`)}};iB.paths=[["--clipanion=tokens"]]});var sB,Dne=Ct(()=>{c0();sB=class extends ot{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} -`)}};sB.paths=[["-v"],["--version"]]});var SU={};Vt(SU,{DefinitionsCommand:()=>rB,HelpCommand:()=>nB,TokensCommand:()=>iB,VersionCommand:()=>sB});var bne=Ct(()=>{Bne();vne();Sne();Dne()});function Pne(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(","),f=new Set(c);return Ea({definition(p){p.addOption({names:c,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let C,S=typeof s<"u"?[...s]:void 0;for(let{name:P,value:I}of E.options)f.has(P)&&(C=P,S=S??[],S.push(I));return typeof S<"u"?Nd(C??h,S,a.validator):S}})}var xne=Ct(()=>{Bp()});function kne(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(","),c=new Set(n);return Ea({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E=S);return E}})}var Qne=Ct(()=>{Bp()});function Tne(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(","),c=new Set(n);return Ea({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E??(E=0),S?E+=1:E=0);return E}})}var Rne=Ct(()=>{Bp()});function Fne(t={}){return Ea({definition(e,r){var s;e.addRest({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){let a=c=>{let f=s.positionals[c];return f.extra===jl||f.extra===!1&&cc)}})}var Nne=Ct(()=>{Yx();Bp()});function NZe(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(","),f=new Set(c);return Ea({definition(p){p.addOption({names:c,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,C){let S,P=s;typeof a.env<"u"&&C.env[a.env]&&(S=a.env,P=C.env[a.env]);for(let{name:I,value:R}of E.options)f.has(I)&&(S=I,P=R);return typeof P=="string"?Nd(S??h,P,a.validator):P}})}function OZe(t={}){let{required:e=!0}=t;return Ea({definition(r,s){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:s,required:t.required})},transformer(r,s,a){var n;for(let c=0;c{Yx();Bp()});var ge={};Vt(ge,{Array:()=>Pne,Boolean:()=>kne,Counter:()=>Tne,Proxy:()=>Jx,Rest:()=>Fne,String:()=>One,applyValidator:()=>Nd,cleanValidationError:()=>_x,formatError:()=>z2,isOptionSymbol:()=>J2,makeCommandOption:()=>Ea,rerouteArguments:()=>Gf});var Mne=Ct(()=>{Bp();vU();xne();Qne();Rne();Nne();Lne()});var oB={};Vt(oB,{Builtins:()=>SU,Cli:()=>wa,Command:()=>ot,Option:()=>ge,UsageError:()=>nt,formatMarkdownish:()=>qo,run:()=>Ine,runExit:()=>Ene});var Wt=Ct(()=>{Mx();pU();c0();wne();bne();Mne()});var _ne=L((q9t,LZe)=>{LZe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var qne=L((G9t,vp)=>{var Une=Ie("fs"),bU=Ie("path"),MZe=Ie("os"),_Ze=Ie("crypto"),UZe=_ne(),PU=UZe.version,HZe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function jZe(t){let e={},r=t.toString();r=r.replace(/\r\n?/mg,` -`);let s;for(;(s=HZe.exec(r))!=null;){let a=s[1],n=s[2]||"";n=n.trim();let c=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),c==='"'&&(n=n.replace(/\\n/g,` -`),n=n.replace(/\\r/g,"\r")),e[a]=n}return e}function qZe(t){let e=jne(t),r=Gs.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let s=Hne(t).split(","),a=s.length,n;for(let c=0;c=a)throw f}return Gs.parse(n)}function GZe(t){console.log(`[dotenv@${PU}][INFO] ${t}`)}function WZe(t){console.log(`[dotenv@${PU}][WARN] ${t}`)}function DU(t){console.log(`[dotenv@${PU}][DEBUG] ${t}`)}function Hne(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function YZe(t,e){let r;try{r=new URL(e)}catch(f){throw f.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):f}let s=r.password;if(!s)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,c=t.parsed[n];if(!c)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:c,key:s}}function jne(t){let e=bU.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function VZe(t){return t[0]==="~"?bU.join(MZe.homedir(),t.slice(1)):t}function KZe(t){GZe("Loading env from encrypted .env.vault");let e=Gs._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),Gs.populate(r,e,t),{parsed:e}}function JZe(t){let e=bU.resolve(process.cwd(),".env"),r="utf8",s=!!(t&&t.debug);t&&(t.path!=null&&(e=VZe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=Gs.parse(Une.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),Gs.populate(n,a,t),{parsed:a}}catch(a){return s&&DU(`Failed to load ${e} ${a.message}`),{error:a}}}function zZe(t){let e=jne(t);return Hne(t).length===0?Gs.configDotenv(t):Une.existsSync(e)?Gs._configVault(t):(WZe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),Gs.configDotenv(t))}function ZZe(t,e){let r=Buffer.from(e.slice(-64),"hex"),s=Buffer.from(t,"base64"),a=s.slice(0,12),n=s.slice(-16);s=s.slice(12,-16);try{let c=_Ze.createDecipheriv("aes-256-gcm",r,a);return c.setAuthTag(n),`${c.update(s)}${c.final()}`}catch(c){let f=c instanceof RangeError,p=c.message==="Invalid key length",h=c.message==="Unsupported state or unable to authenticate data";if(f||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",c.code),console.error("Error: ",c.message),c}}function XZe(t,e,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof e!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),s&&DU(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):t[n]=e[n]}var Gs={configDotenv:JZe,_configVault:KZe,_parseVault:qZe,config:zZe,decrypt:ZZe,parse:jZe,populate:XZe};vp.exports.configDotenv=Gs.configDotenv;vp.exports._configVault=Gs._configVault;vp.exports._parseVault=Gs._parseVault;vp.exports.config=Gs.config;vp.exports.decrypt=Gs.decrypt;vp.exports.parse=Gs.parse;vp.exports.populate=Gs.populate;vp.exports=Gs});var Wne=L((W9t,Gne)=>{"use strict";Gne.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var Od=L((Y9t,xU)=>{"use strict";var $Ze=Wne(),Yne=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,s=()=>{r--,e.length>0&&e.shift()()},a=(f,p,...h)=>{r++;let E=$Ze(f,...h);p(E),E.then(s,s)},n=(f,p,...h)=>{rnew Promise(h=>n(f,h,...p));return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),c};xU.exports=Yne;xU.exports.default=Yne});function Vf(t){return`YN${t.toString(10).padStart(4,"0")}`}function zx(t){let e=Number(t.slice(2));if(typeof Dr[e]>"u")throw new Error(`Unknown message name: "${t}"`);return e}var Dr,Zx=Ct(()=>{Dr=(Me=>(Me[Me.UNNAMED=0]="UNNAMED",Me[Me.EXCEPTION=1]="EXCEPTION",Me[Me.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",Me[Me.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",Me[Me.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",Me[Me.BUILD_DISABLED=5]="BUILD_DISABLED",Me[Me.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",Me[Me.MUST_BUILD=7]="MUST_BUILD",Me[Me.MUST_REBUILD=8]="MUST_REBUILD",Me[Me.BUILD_FAILED=9]="BUILD_FAILED",Me[Me.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",Me[Me.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",Me[Me.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",Me[Me.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",Me[Me.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",Me[Me.REMOTE_INVALID=15]="REMOTE_INVALID",Me[Me.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",Me[Me.RESOLUTION_PACK=17]="RESOLUTION_PACK",Me[Me.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",Me[Me.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",Me[Me.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",Me[Me.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",Me[Me.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",Me[Me.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",Me[Me.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",Me[Me.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",Me[Me.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",Me[Me.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",Me[Me.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",Me[Me.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",Me[Me.FETCH_FAILED=30]="FETCH_FAILED",Me[Me.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",Me[Me.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",Me[Me.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",Me[Me.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",Me[Me.NETWORK_ERROR=35]="NETWORK_ERROR",Me[Me.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",Me[Me.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",Me[Me.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",Me[Me.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",Me[Me.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",Me[Me.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",Me[Me.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",Me[Me.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",Me[Me.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",Me[Me.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",Me[Me.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",Me[Me.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",Me[Me.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",Me[Me.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",Me[Me.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",Me[Me.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",Me[Me.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",Me[Me.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",Me[Me.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",Me[Me.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",Me[Me.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",Me[Me.INVALID_MANIFEST=57]="INVALID_MANIFEST",Me[Me.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",Me[Me.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",Me[Me.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",Me[Me.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",Me[Me.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",Me[Me.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",Me[Me.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",Me[Me.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",Me[Me.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",Me[Me.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",Me[Me.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",Me[Me.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION",Me[Me.AUTO_NM_SUCCESS=70]="AUTO_NM_SUCCESS",Me[Me.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK=71]="NM_CANT_INSTALL_EXTERNAL_SOFT_LINK",Me[Me.NM_PRESERVE_SYMLINKS_REQUIRED=72]="NM_PRESERVE_SYMLINKS_REQUIRED",Me[Me.UPDATE_LOCKFILE_ONLY_SKIP_LINK=73]="UPDATE_LOCKFILE_ONLY_SKIP_LINK",Me[Me.NM_HARDLINKS_MODE_DOWNGRADED=74]="NM_HARDLINKS_MODE_DOWNGRADED",Me[Me.PROLOG_INSTANTIATION_ERROR=75]="PROLOG_INSTANTIATION_ERROR",Me[Me.INCOMPATIBLE_ARCHITECTURE=76]="INCOMPATIBLE_ARCHITECTURE",Me[Me.GHOST_ARCHITECTURE=77]="GHOST_ARCHITECTURE",Me[Me.RESOLUTION_MISMATCH=78]="RESOLUTION_MISMATCH",Me[Me.PROLOG_LIMIT_EXCEEDED=79]="PROLOG_LIMIT_EXCEEDED",Me[Me.NETWORK_DISABLED=80]="NETWORK_DISABLED",Me[Me.NETWORK_UNSAFE_HTTP=81]="NETWORK_UNSAFE_HTTP",Me[Me.RESOLUTION_FAILED=82]="RESOLUTION_FAILED",Me[Me.AUTOMERGE_GIT_ERROR=83]="AUTOMERGE_GIT_ERROR",Me[Me.CONSTRAINTS_CHECK_FAILED=84]="CONSTRAINTS_CHECK_FAILED",Me[Me.UPDATED_RESOLUTION_RECORD=85]="UPDATED_RESOLUTION_RECORD",Me[Me.EXPLAIN_PEER_DEPENDENCIES_CTA=86]="EXPLAIN_PEER_DEPENDENCIES_CTA",Me[Me.MIGRATION_SUCCESS=87]="MIGRATION_SUCCESS",Me[Me.VERSION_NOTICE=88]="VERSION_NOTICE",Me[Me.TIPS_NOTICE=89]="TIPS_NOTICE",Me[Me.OFFLINE_MODE_ENABLED=90]="OFFLINE_MODE_ENABLED",Me[Me.INVALID_PROVENANCE_ENVIRONMENT=91]="INVALID_PROVENANCE_ENVIRONMENT",Me))(Dr||{})});var aB=L((K9t,Vne)=>{var eXe="2.0.0",tXe=Number.MAX_SAFE_INTEGER||9007199254740991,rXe=16,nXe=250,iXe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Vne.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:rXe,MAX_SAFE_BUILD_LENGTH:nXe,MAX_SAFE_INTEGER:tXe,RELEASE_TYPES:iXe,SEMVER_SPEC_VERSION:eXe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var lB=L((J9t,Kne)=>{var sXe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Kne.exports=sXe});var wE=L((Sp,Jne)=>{var{MAX_SAFE_COMPONENT_LENGTH:kU,MAX_SAFE_BUILD_LENGTH:oXe,MAX_LENGTH:aXe}=aB(),lXe=lB();Sp=Jne.exports={};var cXe=Sp.re=[],uXe=Sp.safeRe=[],rr=Sp.src=[],nr=Sp.t={},fXe=0,QU="[a-zA-Z0-9-]",AXe=[["\\s",1],["\\d",aXe],[QU,oXe]],pXe=t=>{for(let[e,r]of AXe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Kr=(t,e,r)=>{let s=pXe(e),a=fXe++;lXe(t,a,e),nr[t]=a,rr[a]=e,cXe[a]=new RegExp(e,r?"g":void 0),uXe[a]=new RegExp(s,r?"g":void 0)};Kr("NUMERICIDENTIFIER","0|[1-9]\\d*");Kr("NUMERICIDENTIFIERLOOSE","\\d+");Kr("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${QU}*`);Kr("MAINVERSION",`(${rr[nr.NUMERICIDENTIFIER]})\\.(${rr[nr.NUMERICIDENTIFIER]})\\.(${rr[nr.NUMERICIDENTIFIER]})`);Kr("MAINVERSIONLOOSE",`(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})`);Kr("PRERELEASEIDENTIFIER",`(?:${rr[nr.NUMERICIDENTIFIER]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Kr("PRERELEASEIDENTIFIERLOOSE",`(?:${rr[nr.NUMERICIDENTIFIERLOOSE]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Kr("PRERELEASE",`(?:-(${rr[nr.PRERELEASEIDENTIFIER]}(?:\\.${rr[nr.PRERELEASEIDENTIFIER]})*))`);Kr("PRERELEASELOOSE",`(?:-?(${rr[nr.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${rr[nr.PRERELEASEIDENTIFIERLOOSE]})*))`);Kr("BUILDIDENTIFIER",`${QU}+`);Kr("BUILD",`(?:\\+(${rr[nr.BUILDIDENTIFIER]}(?:\\.${rr[nr.BUILDIDENTIFIER]})*))`);Kr("FULLPLAIN",`v?${rr[nr.MAINVERSION]}${rr[nr.PRERELEASE]}?${rr[nr.BUILD]}?`);Kr("FULL",`^${rr[nr.FULLPLAIN]}$`);Kr("LOOSEPLAIN",`[v=\\s]*${rr[nr.MAINVERSIONLOOSE]}${rr[nr.PRERELEASELOOSE]}?${rr[nr.BUILD]}?`);Kr("LOOSE",`^${rr[nr.LOOSEPLAIN]}$`);Kr("GTLT","((?:<|>)?=?)");Kr("XRANGEIDENTIFIERLOOSE",`${rr[nr.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Kr("XRANGEIDENTIFIER",`${rr[nr.NUMERICIDENTIFIER]}|x|X|\\*`);Kr("XRANGEPLAIN",`[v=\\s]*(${rr[nr.XRANGEIDENTIFIER]})(?:\\.(${rr[nr.XRANGEIDENTIFIER]})(?:\\.(${rr[nr.XRANGEIDENTIFIER]})(?:${rr[nr.PRERELEASE]})?${rr[nr.BUILD]}?)?)?`);Kr("XRANGEPLAINLOOSE",`[v=\\s]*(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:${rr[nr.PRERELEASELOOSE]})?${rr[nr.BUILD]}?)?)?`);Kr("XRANGE",`^${rr[nr.GTLT]}\\s*${rr[nr.XRANGEPLAIN]}$`);Kr("XRANGELOOSE",`^${rr[nr.GTLT]}\\s*${rr[nr.XRANGEPLAINLOOSE]}$`);Kr("COERCEPLAIN",`(^|[^\\d])(\\d{1,${kU}})(?:\\.(\\d{1,${kU}}))?(?:\\.(\\d{1,${kU}}))?`);Kr("COERCE",`${rr[nr.COERCEPLAIN]}(?:$|[^\\d])`);Kr("COERCEFULL",rr[nr.COERCEPLAIN]+`(?:${rr[nr.PRERELEASE]})?(?:${rr[nr.BUILD]})?(?:$|[^\\d])`);Kr("COERCERTL",rr[nr.COERCE],!0);Kr("COERCERTLFULL",rr[nr.COERCEFULL],!0);Kr("LONETILDE","(?:~>?)");Kr("TILDETRIM",`(\\s*)${rr[nr.LONETILDE]}\\s+`,!0);Sp.tildeTrimReplace="$1~";Kr("TILDE",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAIN]}$`);Kr("TILDELOOSE",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAINLOOSE]}$`);Kr("LONECARET","(?:\\^)");Kr("CARETTRIM",`(\\s*)${rr[nr.LONECARET]}\\s+`,!0);Sp.caretTrimReplace="$1^";Kr("CARET",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAIN]}$`);Kr("CARETLOOSE",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAINLOOSE]}$`);Kr("COMPARATORLOOSE",`^${rr[nr.GTLT]}\\s*(${rr[nr.LOOSEPLAIN]})$|^$`);Kr("COMPARATOR",`^${rr[nr.GTLT]}\\s*(${rr[nr.FULLPLAIN]})$|^$`);Kr("COMPARATORTRIM",`(\\s*)${rr[nr.GTLT]}\\s*(${rr[nr.LOOSEPLAIN]}|${rr[nr.XRANGEPLAIN]})`,!0);Sp.comparatorTrimReplace="$1$2$3";Kr("HYPHENRANGE",`^\\s*(${rr[nr.XRANGEPLAIN]})\\s+-\\s+(${rr[nr.XRANGEPLAIN]})\\s*$`);Kr("HYPHENRANGELOOSE",`^\\s*(${rr[nr.XRANGEPLAINLOOSE]})\\s+-\\s+(${rr[nr.XRANGEPLAINLOOSE]})\\s*$`);Kr("STAR","(<|>)?=?\\s*\\*");Kr("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Kr("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Xx=L((z9t,zne)=>{var hXe=Object.freeze({loose:!0}),gXe=Object.freeze({}),dXe=t=>t?typeof t!="object"?hXe:t:gXe;zne.exports=dXe});var TU=L((Z9t,$ne)=>{var Zne=/^[0-9]+$/,Xne=(t,e)=>{let r=Zne.test(t),s=Zne.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:tXne(e,t);$ne.exports={compareIdentifiers:Xne,rcompareIdentifiers:mXe}});var Go=L((X9t,nie)=>{var $x=lB(),{MAX_LENGTH:eie,MAX_SAFE_INTEGER:ek}=aB(),{safeRe:tie,t:rie}=wE(),yXe=Xx(),{compareIdentifiers:BE}=TU(),RU=class t{constructor(e,r){if(r=yXe(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>eie)throw new TypeError(`version is longer than ${eie} characters`);$x("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?tie[rie.LOOSE]:tie[rie.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>ek||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ek||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ek||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let n=+a;if(n>=0&&n=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(r){let n=[r,a];s===!1&&(n=[r]),BE(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};nie.exports=RU});var Ld=L(($9t,sie)=>{var iie=Go(),EXe=(t,e,r=!1)=>{if(t instanceof iie)return t;try{return new iie(t,e)}catch(s){if(!r)return null;throw s}};sie.exports=EXe});var aie=L((eWt,oie)=>{var IXe=Ld(),CXe=(t,e)=>{let r=IXe(t,e);return r?r.version:null};oie.exports=CXe});var cie=L((tWt,lie)=>{var wXe=Ld(),BXe=(t,e)=>{let r=wXe(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};lie.exports=BXe});var Aie=L((rWt,fie)=>{var uie=Go(),vXe=(t,e,r,s,a)=>{typeof r=="string"&&(a=s,s=r,r=void 0);try{return new uie(t instanceof uie?t.version:t,r).inc(e,s,a).version}catch{return null}};fie.exports=vXe});var gie=L((nWt,hie)=>{var pie=Ld(),SXe=(t,e)=>{let r=pie(t,null,!0),s=pie(e,null,!0),a=r.compare(s);if(a===0)return null;let n=a>0,c=n?r:s,f=n?s:r,p=!!c.prerelease.length;if(!!f.prerelease.length&&!p)return!f.patch&&!f.minor?"major":c.patch?"patch":c.minor?"minor":"major";let E=p?"pre":"";return r.major!==s.major?E+"major":r.minor!==s.minor?E+"minor":r.patch!==s.patch?E+"patch":"prerelease"};hie.exports=SXe});var mie=L((iWt,die)=>{var DXe=Go(),bXe=(t,e)=>new DXe(t,e).major;die.exports=bXe});var Eie=L((sWt,yie)=>{var PXe=Go(),xXe=(t,e)=>new PXe(t,e).minor;yie.exports=xXe});var Cie=L((oWt,Iie)=>{var kXe=Go(),QXe=(t,e)=>new kXe(t,e).patch;Iie.exports=QXe});var Bie=L((aWt,wie)=>{var TXe=Ld(),RXe=(t,e)=>{let r=TXe(t,e);return r&&r.prerelease.length?r.prerelease:null};wie.exports=RXe});var vc=L((lWt,Sie)=>{var vie=Go(),FXe=(t,e,r)=>new vie(t,r).compare(new vie(e,r));Sie.exports=FXe});var bie=L((cWt,Die)=>{var NXe=vc(),OXe=(t,e,r)=>NXe(e,t,r);Die.exports=OXe});var xie=L((uWt,Pie)=>{var LXe=vc(),MXe=(t,e)=>LXe(t,e,!0);Pie.exports=MXe});var tk=L((fWt,Qie)=>{var kie=Go(),_Xe=(t,e,r)=>{let s=new kie(t,r),a=new kie(e,r);return s.compare(a)||s.compareBuild(a)};Qie.exports=_Xe});var Rie=L((AWt,Tie)=>{var UXe=tk(),HXe=(t,e)=>t.sort((r,s)=>UXe(r,s,e));Tie.exports=HXe});var Nie=L((pWt,Fie)=>{var jXe=tk(),qXe=(t,e)=>t.sort((r,s)=>jXe(s,r,e));Fie.exports=qXe});var cB=L((hWt,Oie)=>{var GXe=vc(),WXe=(t,e,r)=>GXe(t,e,r)>0;Oie.exports=WXe});var rk=L((gWt,Lie)=>{var YXe=vc(),VXe=(t,e,r)=>YXe(t,e,r)<0;Lie.exports=VXe});var FU=L((dWt,Mie)=>{var KXe=vc(),JXe=(t,e,r)=>KXe(t,e,r)===0;Mie.exports=JXe});var NU=L((mWt,_ie)=>{var zXe=vc(),ZXe=(t,e,r)=>zXe(t,e,r)!==0;_ie.exports=ZXe});var nk=L((yWt,Uie)=>{var XXe=vc(),$Xe=(t,e,r)=>XXe(t,e,r)>=0;Uie.exports=$Xe});var ik=L((EWt,Hie)=>{var e$e=vc(),t$e=(t,e,r)=>e$e(t,e,r)<=0;Hie.exports=t$e});var OU=L((IWt,jie)=>{var r$e=FU(),n$e=NU(),i$e=cB(),s$e=nk(),o$e=rk(),a$e=ik(),l$e=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return r$e(t,r,s);case"!=":return n$e(t,r,s);case">":return i$e(t,r,s);case">=":return s$e(t,r,s);case"<":return o$e(t,r,s);case"<=":return a$e(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};jie.exports=l$e});var Gie=L((CWt,qie)=>{var c$e=Go(),u$e=Ld(),{safeRe:sk,t:ok}=wE(),f$e=(t,e)=>{if(t instanceof c$e)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?sk[ok.COERCEFULL]:sk[ok.COERCE]);else{let p=e.includePrerelease?sk[ok.COERCERTLFULL]:sk[ok.COERCERTL],h;for(;(h=p.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||h.index+h[0].length!==r.index+r[0].length)&&(r=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(r===null)return null;let s=r[2],a=r[3]||"0",n=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",f=e.includePrerelease&&r[6]?`+${r[6]}`:"";return u$e(`${s}.${a}.${n}${c}${f}`,e)};qie.exports=f$e});var Yie=L((wWt,Wie)=>{"use strict";Wie.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var ak=L((BWt,Vie)=>{"use strict";Vie.exports=Fn;Fn.Node=Md;Fn.create=Fn;function Fn(t){var e=this;if(e instanceof Fn||(e=new Fn),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(a){e.push(a)});else if(arguments.length>0)for(var r=0,s=arguments.length;r1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;s!==null;a++)r=t(r,s.value,a),s=s.next;return r};Fn.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;s!==null;a--)r=t(r,s.value,a),s=s.prev;return r};Fn.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Fn.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Fn.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Fn;if(ethis.length&&(e=this.length);for(var s=0,a=this.head;a!==null&&sthis.length&&(e=this.length);for(var s=this.length,a=this.tail;a!==null&&s>e;s--)a=a.prev;for(;a!==null&&s>t;s--,a=a.prev)r.push(a.value);return r};Fn.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,a=this.head;a!==null&&s{"use strict";var g$e=ak(),_d=Symbol("max"),bp=Symbol("length"),vE=Symbol("lengthCalculator"),fB=Symbol("allowStale"),Ud=Symbol("maxAge"),Dp=Symbol("dispose"),Kie=Symbol("noDisposeOnSet"),Ws=Symbol("lruList"),_u=Symbol("cache"),zie=Symbol("updateAgeOnGet"),LU=()=>1,_U=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[_d]=e.max||1/0,s=e.length||LU;if(this[vE]=typeof s!="function"?LU:s,this[fB]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ud]=e.maxAge||0,this[Dp]=e.dispose,this[Kie]=e.noDisposeOnSet||!1,this[zie]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[_d]=e||1/0,uB(this)}get max(){return this[_d]}set allowStale(e){this[fB]=!!e}get allowStale(){return this[fB]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ud]=e,uB(this)}get maxAge(){return this[Ud]}set lengthCalculator(e){typeof e!="function"&&(e=LU),e!==this[vE]&&(this[vE]=e,this[bp]=0,this[Ws].forEach(r=>{r.length=this[vE](r.value,r.key),this[bp]+=r.length})),uB(this)}get lengthCalculator(){return this[vE]}get length(){return this[bp]}get itemCount(){return this[Ws].length}rforEach(e,r){r=r||this;for(let s=this[Ws].tail;s!==null;){let a=s.prev;Jie(this,e,s,r),s=a}}forEach(e,r){r=r||this;for(let s=this[Ws].head;s!==null;){let a=s.next;Jie(this,e,s,r),s=a}}keys(){return this[Ws].toArray().map(e=>e.key)}values(){return this[Ws].toArray().map(e=>e.value)}reset(){this[Dp]&&this[Ws]&&this[Ws].length&&this[Ws].forEach(e=>this[Dp](e.key,e.value)),this[_u]=new Map,this[Ws]=new g$e,this[bp]=0}dump(){return this[Ws].map(e=>lk(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ws]}set(e,r,s){if(s=s||this[Ud],s&&typeof s!="number")throw new TypeError("maxAge must be a number");let a=s?Date.now():0,n=this[vE](r,e);if(this[_u].has(e)){if(n>this[_d])return SE(this,this[_u].get(e)),!1;let p=this[_u].get(e).value;return this[Dp]&&(this[Kie]||this[Dp](e,p.value)),p.now=a,p.maxAge=s,p.value=r,this[bp]+=n-p.length,p.length=n,this.get(e),uB(this),!0}let c=new UU(e,r,n,a,s);return c.length>this[_d]?(this[Dp]&&this[Dp](e,r),!1):(this[bp]+=c.length,this[Ws].unshift(c),this[_u].set(e,this[Ws].head),uB(this),!0)}has(e){if(!this[_u].has(e))return!1;let r=this[_u].get(e).value;return!lk(this,r)}get(e){return MU(this,e,!0)}peek(e){return MU(this,e,!1)}pop(){let e=this[Ws].tail;return e?(SE(this,e),e.value):null}del(e){SE(this,this[_u].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let a=e[s],n=a.e||0;if(n===0)this.set(a.k,a.v);else{let c=n-r;c>0&&this.set(a.k,a.v,c)}}}prune(){this[_u].forEach((e,r)=>MU(this,r,!1))}},MU=(t,e,r)=>{let s=t[_u].get(e);if(s){let a=s.value;if(lk(t,a)){if(SE(t,s),!t[fB])return}else r&&(t[zie]&&(s.value.now=Date.now()),t[Ws].unshiftNode(s));return a.value}},lk=(t,e)=>{if(!e||!e.maxAge&&!t[Ud])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ud]&&r>t[Ud]},uB=t=>{if(t[bp]>t[_d])for(let e=t[Ws].tail;t[bp]>t[_d]&&e!==null;){let r=e.prev;SE(t,e),e=r}},SE=(t,e)=>{if(e){let r=e.value;t[Dp]&&t[Dp](r.key,r.value),t[bp]-=r.length,t[_u].delete(r.key),t[Ws].removeNode(e)}},UU=class{constructor(e,r,s,a,n){this.key=e,this.value=r,this.length=s,this.now=a,this.maxAge=n||0}},Jie=(t,e,r,s)=>{let a=r.value;lk(t,a)&&(SE(t,r),t[fB]||(a=void 0)),a&&e.call(s,a.value,a.key,t)};Zie.exports=_U});var Sc=L((SWt,rse)=>{var HU=class t{constructor(e,r){if(r=m$e(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof jU)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(a=>!ese(a[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&v$e(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&w$e)|(this.options.loose&&B$e))+":"+e,a=$ie.get(s);if(a)return a;let n=this.options.loose,c=n?ol[Ba.HYPHENRANGELOOSE]:ol[Ba.HYPHENRANGE];e=e.replace(c,F$e(this.options.includePrerelease)),Si("hyphen replace",e),e=e.replace(ol[Ba.COMPARATORTRIM],E$e),Si("comparator trim",e),e=e.replace(ol[Ba.TILDETRIM],I$e),Si("tilde trim",e),e=e.replace(ol[Ba.CARETTRIM],C$e),Si("caret trim",e);let f=e.split(" ").map(C=>S$e(C,this.options)).join(" ").split(/\s+/).map(C=>R$e(C,this.options));n&&(f=f.filter(C=>(Si("loose invalid filter",C,this.options),!!C.match(ol[Ba.COMPARATORLOOSE])))),Si("range list",f);let p=new Map,h=f.map(C=>new jU(C,this.options));for(let C of h){if(ese(C))return[C];p.set(C.value,C)}p.size>1&&p.has("")&&p.delete("");let E=[...p.values()];return $ie.set(s,E),E}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>tse(s,r)&&e.set.some(a=>tse(a,r)&&s.every(n=>a.every(c=>n.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new y$e(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0",v$e=t=>t.value==="",tse=(t,e)=>{let r=!0,s=t.slice(),a=s.pop();for(;r&&s.length;)r=s.every(n=>a.intersects(n,e)),a=s.pop();return r},S$e=(t,e)=>(Si("comp",t,e),t=P$e(t,e),Si("caret",t),t=D$e(t,e),Si("tildes",t),t=k$e(t,e),Si("xrange",t),t=T$e(t,e),Si("stars",t),t),va=t=>!t||t.toLowerCase()==="x"||t==="*",D$e=(t,e)=>t.trim().split(/\s+/).map(r=>b$e(r,e)).join(" "),b$e=(t,e)=>{let r=e.loose?ol[Ba.TILDELOOSE]:ol[Ba.TILDE];return t.replace(r,(s,a,n,c,f)=>{Si("tilde",t,s,a,n,c,f);let p;return va(a)?p="":va(n)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:va(c)?p=`>=${a}.${n}.0 <${a}.${+n+1}.0-0`:f?(Si("replaceTilde pr",f),p=`>=${a}.${n}.${c}-${f} <${a}.${+n+1}.0-0`):p=`>=${a}.${n}.${c} <${a}.${+n+1}.0-0`,Si("tilde return",p),p})},P$e=(t,e)=>t.trim().split(/\s+/).map(r=>x$e(r,e)).join(" "),x$e=(t,e)=>{Si("caret",t,e);let r=e.loose?ol[Ba.CARETLOOSE]:ol[Ba.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(a,n,c,f,p)=>{Si("caret",t,a,n,c,f,p);let h;return va(n)?h="":va(c)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:va(f)?n==="0"?h=`>=${n}.${c}.0${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.0${s} <${+n+1}.0.0-0`:p?(Si("replaceCaret pr",p),n==="0"?c==="0"?h=`>=${n}.${c}.${f}-${p} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}-${p} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f}-${p} <${+n+1}.0.0-0`):(Si("no pr"),n==="0"?c==="0"?h=`>=${n}.${c}.${f}${s} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f} <${+n+1}.0.0-0`),Si("caret return",h),h})},k$e=(t,e)=>(Si("replaceXRanges",t,e),t.split(/\s+/).map(r=>Q$e(r,e)).join(" ")),Q$e=(t,e)=>{t=t.trim();let r=e.loose?ol[Ba.XRANGELOOSE]:ol[Ba.XRANGE];return t.replace(r,(s,a,n,c,f,p)=>{Si("xRange",t,s,a,n,c,f,p);let h=va(n),E=h||va(c),C=E||va(f),S=C;return a==="="&&S&&(a=""),p=e.includePrerelease?"-0":"",h?a===">"||a==="<"?s="<0.0.0-0":s="*":a&&S?(E&&(c=0),f=0,a===">"?(a=">=",E?(n=+n+1,c=0,f=0):(c=+c+1,f=0)):a==="<="&&(a="<",E?n=+n+1:c=+c+1),a==="<"&&(p="-0"),s=`${a+n}.${c}.${f}${p}`):E?s=`>=${n}.0.0${p} <${+n+1}.0.0-0`:C&&(s=`>=${n}.${c}.0${p} <${n}.${+c+1}.0-0`),Si("xRange return",s),s})},T$e=(t,e)=>(Si("replaceStars",t,e),t.trim().replace(ol[Ba.STAR],"")),R$e=(t,e)=>(Si("replaceGTE0",t,e),t.trim().replace(ol[e.includePrerelease?Ba.GTE0PRE:Ba.GTE0],"")),F$e=t=>(e,r,s,a,n,c,f,p,h,E,C,S,P)=>(va(s)?r="":va(a)?r=`>=${s}.0.0${t?"-0":""}`:va(n)?r=`>=${s}.${a}.0${t?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,va(h)?p="":va(E)?p=`<${+h+1}.0.0-0`:va(C)?p=`<${h}.${+E+1}.0-0`:S?p=`<=${h}.${E}.${C}-${S}`:t?p=`<${h}.${E}.${+C+1}-0`:p=`<=${p}`,`${r} ${p}`.trim()),N$e=(t,e,r)=>{for(let s=0;s0){let a=t[s].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var AB=L((DWt,lse)=>{var pB=Symbol("SemVer ANY"),WU=class t{static get ANY(){return pB}constructor(e,r){if(r=nse(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),GU("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===pB?this.value="":this.value=this.operator+this.semver.version,GU("comp",this)}parse(e){let r=this.options.loose?ise[sse.COMPARATORLOOSE]:ise[sse.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new ose(s[2],this.options.loose):this.semver=pB}toString(){return this.value}test(e){if(GU("Comparator.test",e,this.options.loose),this.semver===pB||e===pB)return!0;if(typeof e=="string")try{e=new ose(e,this.options)}catch{return!1}return qU(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ase(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new ase(this.value,r).test(e.semver):(r=nse(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||qU(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||qU(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};lse.exports=WU;var nse=Xx(),{safeRe:ise,t:sse}=wE(),qU=OU(),GU=lB(),ose=Go(),ase=Sc()});var hB=L((bWt,cse)=>{var O$e=Sc(),L$e=(t,e,r)=>{try{e=new O$e(e,r)}catch{return!1}return e.test(t)};cse.exports=L$e});var fse=L((PWt,use)=>{var M$e=Sc(),_$e=(t,e)=>new M$e(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));use.exports=_$e});var pse=L((xWt,Ase)=>{var U$e=Go(),H$e=Sc(),j$e=(t,e,r)=>{let s=null,a=null,n=null;try{n=new H$e(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===-1)&&(s=c,a=new U$e(s,r))}),s};Ase.exports=j$e});var gse=L((kWt,hse)=>{var q$e=Go(),G$e=Sc(),W$e=(t,e,r)=>{let s=null,a=null,n=null;try{n=new G$e(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===1)&&(s=c,a=new q$e(s,r))}),s};hse.exports=W$e});var yse=L((QWt,mse)=>{var YU=Go(),Y$e=Sc(),dse=cB(),V$e=(t,e)=>{t=new Y$e(t,e);let r=new YU("0.0.0");if(t.test(r)||(r=new YU("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s{let f=new YU(c.semver.version);switch(c.operator){case">":f.prerelease.length===0?f.patch++:f.prerelease.push(0),f.raw=f.format();case"":case">=":(!n||dse(f,n))&&(n=f);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),n&&(!r||dse(r,n))&&(r=n)}return r&&t.test(r)?r:null};mse.exports=V$e});var Ise=L((TWt,Ese)=>{var K$e=Sc(),J$e=(t,e)=>{try{return new K$e(t,e).range||"*"}catch{return null}};Ese.exports=J$e});var ck=L((RWt,vse)=>{var z$e=Go(),Bse=AB(),{ANY:Z$e}=Bse,X$e=Sc(),$$e=hB(),Cse=cB(),wse=rk(),eet=ik(),tet=nk(),ret=(t,e,r,s)=>{t=new z$e(t,s),e=new X$e(e,s);let a,n,c,f,p;switch(r){case">":a=Cse,n=eet,c=wse,f=">",p=">=";break;case"<":a=wse,n=tet,c=Cse,f="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if($$e(t,e,s))return!1;for(let h=0;h{P.semver===Z$e&&(P=new Bse(">=0.0.0")),C=C||P,S=S||P,a(P.semver,C.semver,s)?C=P:c(P.semver,S.semver,s)&&(S=P)}),C.operator===f||C.operator===p||(!S.operator||S.operator===f)&&n(t,S.semver))return!1;if(S.operator===p&&c(t,S.semver))return!1}return!0};vse.exports=ret});var Dse=L((FWt,Sse)=>{var net=ck(),iet=(t,e,r)=>net(t,e,">",r);Sse.exports=iet});var Pse=L((NWt,bse)=>{var set=ck(),oet=(t,e,r)=>set(t,e,"<",r);bse.exports=oet});var Qse=L((OWt,kse)=>{var xse=Sc(),aet=(t,e,r)=>(t=new xse(t,r),e=new xse(e,r),t.intersects(e,r));kse.exports=aet});var Rse=L((LWt,Tse)=>{var cet=hB(),uet=vc();Tse.exports=(t,e,r)=>{let s=[],a=null,n=null,c=t.sort((E,C)=>uet(E,C,r));for(let E of c)cet(E,e,r)?(n=E,a||(a=E)):(n&&s.push([a,n]),n=null,a=null);a&&s.push([a,null]);let f=[];for(let[E,C]of s)E===C?f.push(E):!C&&E===c[0]?f.push("*"):C?E===c[0]?f.push(`<=${C}`):f.push(`${E} - ${C}`):f.push(`>=${E}`);let p=f.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length{var Fse=Sc(),KU=AB(),{ANY:VU}=KU,gB=hB(),JU=vc(),fet=(t,e,r={})=>{if(t===e)return!0;t=new Fse(t,r),e=new Fse(e,r);let s=!1;e:for(let a of t.set){for(let n of e.set){let c=pet(a,n,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},Aet=[new KU(">=0.0.0-0")],Nse=[new KU(">=0.0.0")],pet=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===VU){if(e.length===1&&e[0].semver===VU)return!0;r.includePrerelease?t=Aet:t=Nse}if(e.length===1&&e[0].semver===VU){if(r.includePrerelease)return!0;e=Nse}let s=new Set,a,n;for(let P of t)P.operator===">"||P.operator===">="?a=Ose(a,P,r):P.operator==="<"||P.operator==="<="?n=Lse(n,P,r):s.add(P.semver);if(s.size>1)return null;let c;if(a&&n){if(c=JU(a.semver,n.semver,r),c>0)return null;if(c===0&&(a.operator!==">="||n.operator!=="<="))return null}for(let P of s){if(a&&!gB(P,String(a),r)||n&&!gB(P,String(n),r))return null;for(let I of e)if(!gB(P,String(I),r))return!1;return!0}let f,p,h,E,C=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,S=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;C&&C.prerelease.length===1&&n.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(let P of e){if(E=E||P.operator===">"||P.operator===">=",h=h||P.operator==="<"||P.operator==="<=",a){if(S&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===S.major&&P.semver.minor===S.minor&&P.semver.patch===S.patch&&(S=!1),P.operator===">"||P.operator===">="){if(f=Ose(a,P,r),f===P&&f!==a)return!1}else if(a.operator===">="&&!gB(a.semver,String(P),r))return!1}if(n){if(C&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===C.major&&P.semver.minor===C.minor&&P.semver.patch===C.patch&&(C=!1),P.operator==="<"||P.operator==="<="){if(p=Lse(n,P,r),p===P&&p!==n)return!1}else if(n.operator==="<="&&!gB(n.semver,String(P),r))return!1}if(!P.operator&&(n||a)&&c!==0)return!1}return!(a&&h&&!n&&c!==0||n&&E&&!a&&c!==0||S||C)},Ose=(t,e,r)=>{if(!t)return e;let s=JU(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Lse=(t,e,r)=>{if(!t)return e;let s=JU(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Mse.exports=fet});var Ai=L((_Wt,jse)=>{var zU=wE(),Use=aB(),het=Go(),Hse=TU(),get=Ld(),det=aie(),met=cie(),yet=Aie(),Eet=gie(),Iet=mie(),Cet=Eie(),wet=Cie(),Bet=Bie(),vet=vc(),Det=bie(),bet=xie(),Pet=tk(),xet=Rie(),ket=Nie(),Qet=cB(),Tet=rk(),Ret=FU(),Fet=NU(),Net=nk(),Oet=ik(),Let=OU(),Met=Gie(),_et=AB(),Uet=Sc(),Het=hB(),jet=fse(),qet=pse(),Get=gse(),Wet=yse(),Yet=Ise(),Vet=ck(),Ket=Dse(),Jet=Pse(),zet=Qse(),Zet=Rse(),Xet=_se();jse.exports={parse:get,valid:det,clean:met,inc:yet,diff:Eet,major:Iet,minor:Cet,patch:wet,prerelease:Bet,compare:vet,rcompare:Det,compareLoose:bet,compareBuild:Pet,sort:xet,rsort:ket,gt:Qet,lt:Tet,eq:Ret,neq:Fet,gte:Net,lte:Oet,cmp:Let,coerce:Met,Comparator:_et,Range:Uet,satisfies:Het,toComparators:jet,maxSatisfying:qet,minSatisfying:Get,minVersion:Wet,validRange:Yet,outside:Vet,gtr:Ket,ltr:Jet,intersects:zet,simplifyRange:Zet,subset:Xet,SemVer:het,re:zU.re,src:zU.src,tokens:zU.t,SEMVER_SPEC_VERSION:Use.SEMVER_SPEC_VERSION,RELEASE_TYPES:Use.RELEASE_TYPES,compareIdentifiers:Hse.compareIdentifiers,rcompareIdentifiers:Hse.rcompareIdentifiers}});var Gse=L((UWt,qse)=>{"use strict";function $et(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Hd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Hd)}$et(Hd,Error);Hd.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C0){for(C=1,S=1;C{switch(Te[1]){case"|":return xe|Te[3];case"&":return xe&Te[3];case"^":return xe^Te[3]}},$)},S="!",P=Fe("!",!1),I=function($){return!$},R="(",N=Fe("(",!1),U=")",W=Fe(")",!1),te=function($){return $},ie=/^[^ \t\n\r()!|&\^]/,Ae=Ne([" "," ",` -`,"\r","(",")","!","|","&","^"],!0,!1),ce=function($){return e.queryPattern.test($)},me=function($){return e.checkFn($)},pe=ke("whitespace"),Be=/^[ \t\n\r]/,Ce=Ne([" "," ",` -`,"\r"],!1,!1),g=0,we=0,ye=[{line:1,column:1}],fe=0,se=[],X=0,De;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function Re(){return t.substring(we,g)}function dt(){return _e(we,g)}function j($,oe){throw oe=oe!==void 0?oe:_e(we,g),b([ke($)],t.substring(we,g),oe)}function rt($,oe){throw oe=oe!==void 0?oe:_e(we,g),w($,oe)}function Fe($,oe){return{type:"literal",text:$,ignoreCase:oe}}function Ne($,oe,xe){return{type:"class",parts:$,inverted:oe,ignoreCase:xe}}function Pe(){return{type:"any"}}function Ye(){return{type:"end"}}function ke($){return{type:"other",description:$}}function it($){var oe=ye[$],xe;if(oe)return oe;for(xe=$-1;!ye[xe];)xe--;for(oe=ye[xe],oe={line:oe.line,column:oe.column};xe<$;)t.charCodeAt(xe)===10?(oe.line++,oe.column=1):oe.column++,xe++;return ye[$]=oe,oe}function _e($,oe){var xe=it($),Te=it(oe);return{start:{offset:$,line:xe.line,column:xe.column},end:{offset:oe,line:Te.line,column:Te.column}}}function x($){gfe&&(fe=g,se=[]),se.push($))}function w($,oe){return new Hd($,null,null,oe)}function b($,oe,xe){return new Hd(Hd.buildMessage($,oe),$,oe,xe)}function y(){var $,oe,xe,Te,lt,It,qt,ir;if($=g,oe=F(),oe!==r){for(xe=[],Te=g,lt=Z(),lt!==r?(t.charCodeAt(g)===124?(It=n,g++):(It=r,X===0&&x(c)),It===r&&(t.charCodeAt(g)===38?(It=f,g++):(It=r,X===0&&x(p)),It===r&&(t.charCodeAt(g)===94?(It=h,g++):(It=r,X===0&&x(E)))),It!==r?(qt=Z(),qt!==r?(ir=F(),ir!==r?(lt=[lt,It,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);Te!==r;)xe.push(Te),Te=g,lt=Z(),lt!==r?(t.charCodeAt(g)===124?(It=n,g++):(It=r,X===0&&x(c)),It===r&&(t.charCodeAt(g)===38?(It=f,g++):(It=r,X===0&&x(p)),It===r&&(t.charCodeAt(g)===94?(It=h,g++):(It=r,X===0&&x(E)))),It!==r?(qt=Z(),qt!==r?(ir=F(),ir!==r?(lt=[lt,It,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);xe!==r?(we=$,oe=C(oe,xe),$=oe):(g=$,$=r)}else g=$,$=r;return $}function F(){var $,oe,xe,Te,lt,It;return $=g,t.charCodeAt(g)===33?(oe=S,g++):(oe=r,X===0&&x(P)),oe!==r?(xe=F(),xe!==r?(we=$,oe=I(xe),$=oe):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(oe=R,g++):(oe=r,X===0&&x(N)),oe!==r?(xe=Z(),xe!==r?(Te=y(),Te!==r?(lt=Z(),lt!==r?(t.charCodeAt(g)===41?(It=U,g++):(It=r,X===0&&x(W)),It!==r?(we=$,oe=te(Te),$=oe):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,oe,xe,Te,lt;if($=g,oe=Z(),oe!==r){if(xe=g,Te=[],ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,X===0&&x(Ae)),lt!==r)for(;lt!==r;)Te.push(lt),ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,X===0&&x(Ae));else Te=r;Te!==r?xe=t.substring(xe,g):xe=Te,xe!==r?(we=g,Te=ce(xe),Te?Te=void 0:Te=r,Te!==r?(we=$,oe=me(xe),$=oe):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function Z(){var $,oe;for(X++,$=[],Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,X===0&&x(Ce));oe!==r;)$.push(oe),Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,X===0&&x(Ce));return X--,$===r&&(oe=r,X===0&&x(pe)),$}if(De=a(),De!==r&&g===t.length)return De;throw De!==r&&g{var{parse:ttt}=Gse();uk.makeParser=(t=/[a-z]+/)=>(e,r)=>ttt(e,{queryPattern:t,checkFn:r});uk.parse=uk.makeParser()});var Vse=L((jWt,Yse)=>{"use strict";Yse.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var ZU=L((qWt,Jse)=>{var dB=Vse(),Kse={};for(let t of Object.keys(dB))Kse[dB[t]]=t;var hr={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Jse.exports=hr;for(let t of Object.keys(hr)){if(!("channels"in hr[t]))throw new Error("missing channels property: "+t);if(!("labels"in hr[t]))throw new Error("missing channel labels property: "+t);if(hr[t].labels.length!==hr[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=hr[t];delete hr[t].channels,delete hr[t].labels,Object.defineProperty(hr[t],"channels",{value:e}),Object.defineProperty(hr[t],"labels",{value:r})}hr.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(e,r,s),n=Math.max(e,r,s),c=n-a,f,p;n===a?f=0:e===n?f=(r-s)/c:r===n?f=2+(s-e)/c:s===n&&(f=4+(e-r)/c),f=Math.min(f*60,360),f<0&&(f+=360);let h=(a+n)/2;return n===a?p=0:h<=.5?p=c/(n+a):p=c/(2-n-a),[f,p*100,h*100]};hr.rgb.hsv=function(t){let e,r,s,a,n,c=t[0]/255,f=t[1]/255,p=t[2]/255,h=Math.max(c,f,p),E=h-Math.min(c,f,p),C=function(S){return(h-S)/6/E+1/2};return E===0?(a=0,n=0):(n=E/h,e=C(c),r=C(f),s=C(p),c===h?a=s-r:f===h?a=1/3+e-s:p===h&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[a*360,n*100,h*100]};hr.rgb.hwb=function(t){let e=t[0],r=t[1],s=t[2],a=hr.rgb.hsl(t)[0],n=1/255*Math.min(e,Math.min(r,s));return s=1-1/255*Math.max(e,Math.max(r,s)),[a,n*100,s*100]};hr.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(1-e,1-r,1-s),n=(1-e-a)/(1-a)||0,c=(1-r-a)/(1-a)||0,f=(1-s-a)/(1-a)||0;return[n*100,c*100,f*100,a*100]};function rtt(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}hr.rgb.keyword=function(t){let e=Kse[t];if(e)return e;let r=1/0,s;for(let a of Object.keys(dB)){let n=dB[a],c=rtt(t,n);c.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92;let a=e*.4124+r*.3576+s*.1805,n=e*.2126+r*.7152+s*.0722,c=e*.0193+r*.1192+s*.9505;return[a*100,n*100,c*100]};hr.rgb.lab=function(t){let e=hr.rgb.xyz(t),r=e[0],s=e[1],a=e[2];r/=95.047,s/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let n=116*s-16,c=500*(r-s),f=200*(s-a);return[n,c,f]};hr.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a,n,c;if(r===0)return c=s*255,[c,c,c];s<.5?a=s*(1+r):a=s+r-s*r;let f=2*s-a,p=[0,0,0];for(let h=0;h<3;h++)n=e+1/3*-(h-1),n<0&&n++,n>1&&n--,6*n<1?c=f+(a-f)*6*n:2*n<1?c=a:3*n<2?c=f+(a-f)*(2/3-n)*6:c=f,p[h]=c*255;return p};hr.hsl.hsv=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=r,n=Math.max(s,.01);s*=2,r*=s<=1?s:2-s,a*=n<=1?n:2-n;let c=(s+r)/2,f=s===0?2*a/(n+a):2*r/(s+r);return[e,f*100,c*100]};hr.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,s=t[2]/100,a=Math.floor(e)%6,n=e-Math.floor(e),c=255*s*(1-r),f=255*s*(1-r*n),p=255*s*(1-r*(1-n));switch(s*=255,a){case 0:return[s,p,c];case 1:return[f,s,c];case 2:return[c,s,p];case 3:return[c,f,s];case 4:return[p,c,s];case 5:return[s,c,f]}};hr.hsv.hsl=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=Math.max(s,.01),n,c;c=(2-r)*s;let f=(2-r)*a;return n=r*a,n/=f<=1?f:2-f,n=n||0,c/=2,[e,n*100,c*100]};hr.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a=r+s,n;a>1&&(r/=a,s/=a);let c=Math.floor(6*e),f=1-s;n=6*e-c,c&1&&(n=1-n);let p=r+n*(f-r),h,E,C;switch(c){default:case 6:case 0:h=f,E=p,C=r;break;case 1:h=p,E=f,C=r;break;case 2:h=r,E=f,C=p;break;case 3:h=r,E=p,C=f;break;case 4:h=p,E=r,C=f;break;case 5:h=f,E=r,C=p;break}return[h*255,E*255,C*255]};hr.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a=t[3]/100,n=1-Math.min(1,e*(1-a)+a),c=1-Math.min(1,r*(1-a)+a),f=1-Math.min(1,s*(1-a)+a);return[n*255,c*255,f*255]};hr.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a,n,c;return a=e*3.2406+r*-1.5372+s*-.4986,n=e*-.9689+r*1.8758+s*.0415,c=e*.0557+r*-.204+s*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),c=Math.min(Math.max(0,c),1),[a*255,n*255,c*255]};hr.xyz.lab=function(t){let e=t[0],r=t[1],s=t[2];e/=95.047,r/=100,s/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let a=116*r-16,n=500*(e-r),c=200*(r-s);return[a,n,c]};hr.lab.xyz=function(t){let e=t[0],r=t[1],s=t[2],a,n,c;n=(e+16)/116,a=r/500+n,c=n-s/200;let f=n**3,p=a**3,h=c**3;return n=f>.008856?f:(n-16/116)/7.787,a=p>.008856?p:(a-16/116)/7.787,c=h>.008856?h:(c-16/116)/7.787,a*=95.047,n*=100,c*=108.883,[a,n,c]};hr.lab.lch=function(t){let e=t[0],r=t[1],s=t[2],a;a=Math.atan2(s,r)*360/2/Math.PI,a<0&&(a+=360);let c=Math.sqrt(r*r+s*s);return[e,c,a]};hr.lch.lab=function(t){let e=t[0],r=t[1],a=t[2]/360*2*Math.PI,n=r*Math.cos(a),c=r*Math.sin(a);return[e,n,c]};hr.rgb.ansi16=function(t,e=null){let[r,s,a]=t,n=e===null?hr.rgb.hsv(t)[2]:e;if(n=Math.round(n/50),n===0)return 30;let c=30+(Math.round(a/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return n===2&&(c+=60),c};hr.hsv.ansi16=function(t){return hr.rgb.ansi16(hr.hsv.rgb(t),t[2])};hr.rgb.ansi256=function(t){let e=t[0],r=t[1],s=t[2];return e===r&&r===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)};hr.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,s=(e&1)*r*255,a=(e>>1&1)*r*255,n=(e>>2&1)*r*255;return[s,a,n]};hr.ansi256.rgb=function(t){if(t>=232){let n=(t-232)*10+8;return[n,n,n]}t-=16;let e,r=Math.floor(t/36)/5*255,s=Math.floor((e=t%36)/6)/5*255,a=e%6/5*255;return[r,s,a]};hr.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};hr.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(f=>f+f).join(""));let s=parseInt(r,16),a=s>>16&255,n=s>>8&255,c=s&255;return[a,n,c]};hr.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.max(Math.max(e,r),s),n=Math.min(Math.min(e,r),s),c=a-n,f,p;return c<1?f=n/(1-c):f=0,c<=0?p=0:a===e?p=(r-s)/c%6:a===r?p=2+(s-e)/c:p=4+(e-r)/c,p/=6,p%=1,[p*360,c*100,f*100]};hr.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=r<.5?2*e*r:2*e*(1-r),a=0;return s<1&&(a=(r-.5*s)/(1-s)),[t[0],s*100,a*100]};hr.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=e*r,a=0;return s<1&&(a=(r-s)/(1-s)),[t[0],s*100,a*100]};hr.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100;if(r===0)return[s*255,s*255,s*255];let a=[0,0,0],n=e%1*6,c=n%1,f=1-c,p=0;switch(Math.floor(n)){case 0:a[0]=1,a[1]=c,a[2]=0;break;case 1:a[0]=f,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=c;break;case 3:a[0]=0,a[1]=f,a[2]=1;break;case 4:a[0]=c,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=f}return p=(1-r)*s,[(r*a[0]+p)*255,(r*a[1]+p)*255,(r*a[2]+p)*255]};hr.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e),a=0;return s>0&&(a=e/s),[t[0],a*100,s*100]};hr.hcg.hsl=function(t){let e=t[1]/100,s=t[2]/100*(1-e)+.5*e,a=0;return s>0&&s<.5?a=e/(2*s):s>=.5&&s<1&&(a=e/(2*(1-s))),[t[0],a*100,s*100]};hr.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e);return[t[0],(s-e)*100,(1-s)*100]};hr.hwb.hcg=function(t){let e=t[1]/100,s=1-t[2]/100,a=s-e,n=0;return a<1&&(n=(s-a)/(1-a)),[t[0],a*100,n*100]};hr.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};hr.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};hr.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};hr.gray.hsl=function(t){return[0,0,t[0]]};hr.gray.hsv=hr.gray.hsl;hr.gray.hwb=function(t){return[0,100,t[0]]};hr.gray.cmyk=function(t){return[0,0,0,t[0]]};hr.gray.lab=function(t){return[t[0],0,0]};hr.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,s=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(s.length)+s};hr.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Zse=L((GWt,zse)=>{var fk=ZU();function ntt(){let t={},e=Object.keys(fk);for(let r=e.length,s=0;s{var XU=ZU(),att=Zse(),DE={},ltt=Object.keys(XU);function ctt(t){let e=function(...r){let s=r[0];return s==null?s:(s.length>1&&(r=s),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function utt(t){let e=function(...r){let s=r[0];if(s==null)return s;s.length>1&&(r=s);let a=t(r);if(typeof a=="object")for(let n=a.length,c=0;c{DE[t]={},Object.defineProperty(DE[t],"channels",{value:XU[t].channels}),Object.defineProperty(DE[t],"labels",{value:XU[t].labels});let e=att(t);Object.keys(e).forEach(s=>{let a=e[s];DE[t][s]=utt(a),DE[t][s].raw=ctt(a)})});Xse.exports=DE});var pk=L((YWt,ioe)=>{"use strict";var eoe=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,toe=(t,e)=>(...r)=>{let s=t(...r);return`\x1B[${38+e};5;${s}m`},roe=(t,e)=>(...r)=>{let s=t(...r);return`\x1B[${38+e};2;${s[0]};${s[1]};${s[2]}m`},Ak=t=>t,noe=(t,e,r)=>[t,e,r],bE=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let s=r();return Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0}),s},enumerable:!0,configurable:!0})},$U,PE=(t,e,r,s)=>{$U===void 0&&($U=$se());let a=s?10:0,n={};for(let[c,f]of Object.entries($U)){let p=c==="ansi16"?"ansi":c;c===e?n[p]=t(r,a):typeof f=="object"&&(n[p]=t(f[e],a))}return n};function ftt(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,s]of Object.entries(e)){for(let[a,n]of Object.entries(s))e[a]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[a]=e[a],t.set(n[0],n[1]);Object.defineProperty(e,r,{value:s,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",bE(e.color,"ansi",()=>PE(eoe,"ansi16",Ak,!1)),bE(e.color,"ansi256",()=>PE(toe,"ansi256",Ak,!1)),bE(e.color,"ansi16m",()=>PE(roe,"rgb",noe,!1)),bE(e.bgColor,"ansi",()=>PE(eoe,"ansi16",Ak,!0)),bE(e.bgColor,"ansi256",()=>PE(toe,"ansi256",Ak,!0)),bE(e.bgColor,"ansi16m",()=>PE(roe,"rgb",noe,!0)),e}Object.defineProperty(ioe,"exports",{enumerable:!0,get:ftt})});var ooe=L((VWt,soe)=>{"use strict";soe.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),a=e.indexOf("--");return s!==-1&&(a===-1||s{"use strict";var Att=Ie("os"),aoe=Ie("tty"),Dc=ooe(),{env:xs}=process,u0;Dc("no-color")||Dc("no-colors")||Dc("color=false")||Dc("color=never")?u0=0:(Dc("color")||Dc("colors")||Dc("color=true")||Dc("color=always"))&&(u0=1);"FORCE_COLOR"in xs&&(xs.FORCE_COLOR==="true"?u0=1:xs.FORCE_COLOR==="false"?u0=0:u0=xs.FORCE_COLOR.length===0?1:Math.min(parseInt(xs.FORCE_COLOR,10),3));function e4(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function t4(t,e){if(u0===0)return 0;if(Dc("color=16m")||Dc("color=full")||Dc("color=truecolor"))return 3;if(Dc("color=256"))return 2;if(t&&!e&&u0===void 0)return 0;let r=u0||0;if(xs.TERM==="dumb")return r;if(process.platform==="win32"){let s=Att.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in xs)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(s=>s in xs)||xs.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in xs)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(xs.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in xs)return 1;if(xs.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in xs){let s=parseInt((xs.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(xs.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(xs.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(xs.TERM)||"COLORTERM"in xs?1:r}function ptt(t){let e=t4(t,t&&t.isTTY);return e4(e)}loe.exports={supportsColor:ptt,stdout:e4(t4(!0,aoe.isatty(1))),stderr:e4(t4(!0,aoe.isatty(2)))}});var foe=L((JWt,uoe)=>{"use strict";var htt=(t,e,r)=>{let s=t.indexOf(e);if(s===-1)return t;let a=e.length,n=0,c="";do c+=t.substr(n,s-n)+e+r,n=s+a,s=t.indexOf(e,n);while(s!==-1);return c+=t.substr(n),c},gtt=(t,e,r,s)=>{let a=0,n="";do{let c=t[s-1]==="\r";n+=t.substr(a,(c?s-1:s)-a)+e+(c?`\r -`:` -`)+r,a=s+1,s=t.indexOf(` -`,a)}while(s!==-1);return n+=t.substr(a),n};uoe.exports={stringReplaceAll:htt,stringEncaseCRLFWithFirstIndex:gtt}});var doe=L((zWt,goe)=>{"use strict";var dtt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Aoe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,mtt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ytt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Ett=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function hoe(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):Ett.get(t)||t}function Itt(t,e){let r=[],s=e.trim().split(/\s*,\s*/g),a;for(let n of s){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(mtt))r.push(a[2].replace(ytt,(f,p,h)=>p?hoe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function Ctt(t){Aoe.lastIndex=0;let e=[],r;for(;(r=Aoe.exec(t))!==null;){let s=r[1];if(r[2]){let a=Itt(s,r[2]);e.push([s].concat(a))}else e.push([s])}return e}function poe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let s=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in s))throw new Error(`Unknown Chalk style: ${a}`);s=n.length>0?s[a](...n):s[a]}return s}goe.exports=(t,e)=>{let r=[],s=[],a=[];if(e.replace(dtt,(n,c,f,p,h,E)=>{if(c)a.push(hoe(c));else if(p){let C=a.join("");a=[],s.push(r.length===0?C:poe(t,r)(C)),r.push({inverse:f,styles:Ctt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(poe(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),s.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var kE=L((ZWt,woe)=>{"use strict";var mB=pk(),{stdout:n4,stderr:i4}=coe(),{stringReplaceAll:wtt,stringEncaseCRLFWithFirstIndex:Btt}=foe(),{isArray:hk}=Array,yoe=["ansi","ansi","ansi256","ansi16m"],xE=Object.create(null),vtt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=n4?n4.level:0;t.level=e.level===void 0?r:e.level},s4=class{constructor(e){return Eoe(e)}},Eoe=t=>{let e={};return vtt(e,t),e.template=(...r)=>Coe(e.template,...r),Object.setPrototypeOf(e,gk.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=s4,e.template};function gk(t){return Eoe(t)}for(let[t,e]of Object.entries(mB))xE[t]={get(){let r=dk(this,o4(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};xE.visible={get(){let t=dk(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Ioe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of Ioe)xE[t]={get(){let{level:e}=this;return function(...r){let s=o4(mB.color[yoe[e]][t](...r),mB.color.close,this._styler);return dk(this,s,this._isEmpty)}}};for(let t of Ioe){let e="bg"+t[0].toUpperCase()+t.slice(1);xE[e]={get(){let{level:r}=this;return function(...s){let a=o4(mB.bgColor[yoe[r]][t](...s),mB.bgColor.close,this._styler);return dk(this,a,this._isEmpty)}}}}var Stt=Object.defineProperties(()=>{},{...xE,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),o4=(t,e,r)=>{let s,a;return r===void 0?(s=t,a=e):(s=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:a,parent:r}},dk=(t,e,r)=>{let s=(...a)=>hk(a[0])&&hk(a[0].raw)?moe(s,Coe(s,...a)):moe(s,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(s,Stt),s._generator=t,s._styler=e,s._isEmpty=r,s},moe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=wtt(e,r.close,r.open),r=r.parent;let n=e.indexOf(` -`);return n!==-1&&(e=Btt(e,a,s,n)),s+e+a},r4,Coe=(t,...e)=>{let[r]=e;if(!hk(r)||!hk(r.raw))return e.join(" ");let s=e.slice(1),a=[r.raw[0]];for(let n=1;n{"use strict";bc.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;bc.find=(t,e)=>t.nodes.find(r=>r.type===e);bc.exceedsLimit=(t,e,r=1,s)=>s===!1||!bc.isInteger(t)||!bc.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=s;bc.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];s&&(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.escaped=!0)};bc.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);bc.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;bc.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;bc.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);bc.flatten=(...t)=>{let e=[],r=s=>{for(let a=0;a{"use strict";var Boe=yk();voe.exports=(t,e={})=>{let r=(s,a={})=>{let n=e.escapeInvalid&&Boe.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f="";if(s.value)return(n||c)&&Boe.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let p of s.nodes)f+=r(p);return f};return r(t)}});var Doe=L((eYt,Soe)=>{"use strict";Soe.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var Noe=L((tYt,Foe)=>{"use strict";var boe=Doe(),jd=(t,e,r)=>{if(boe(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(boe(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:!0,...r};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let a=String(s.relaxZeros),n=String(s.shorthand),c=String(s.capture),f=String(s.wrap),p=t+":"+e+"="+a+n+c+f;if(jd.cache.hasOwnProperty(p))return jd.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let R=t+"|"+e;return s.capture?`(${R})`:s.wrap===!1?R:`(?:${R})`}let C=Roe(t)||Roe(e),S={min:t,max:e,a:h,b:E},P=[],I=[];if(C&&(S.isPadded=C,S.maxLen=String(S.max).length),h<0){let R=E<0?Math.abs(E):1;I=Poe(R,Math.abs(h),S,s),h=S.a=0}return E>=0&&(P=Poe(h,E,S,s)),S.negatives=I,S.positives=P,S.result=Dtt(I,P,s),s.capture===!0?S.result=`(${S.result})`:s.wrap!==!1&&P.length+I.length>1&&(S.result=`(?:${S.result})`),jd.cache[p]=S,S.result};function Dtt(t,e,r){let s=a4(t,e,"-",!1,r)||[],a=a4(e,t,"",!1,r)||[],n=a4(t,e,"-?",!0,r)||[];return s.concat(n).concat(a).join("|")}function btt(t,e){let r=1,s=1,a=koe(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=koe(t,r);for(a=Qoe(e+1,s)-1;t1&&f.count.pop(),f.count.push(E.count[0]),f.string=f.pattern+Toe(f.count),c=h+1;continue}r.isPadded&&(C=Ttt(h,r,s)),E.string=C+E.pattern+Toe(E.count),n.push(E),c=h+1,f=E}return n}function a4(t,e,r,s,a){let n=[];for(let c of t){let{string:f}=c;!s&&!xoe(e,"string",f)&&n.push(r+f),s&&xoe(e,"string",f)&&n.push(r+f)}return n}function xtt(t,e){let r=[];for(let s=0;se?1:e>t?-1:0}function xoe(t,e,r){return t.some(s=>s[e]===r)}function koe(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Qoe(t,e){return t-t%Math.pow(10,e)}function Toe(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Qtt(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function Roe(t){return/^-?(0+)\d/.test(t)}function Ttt(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(s){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${s}}`:`0{${s}}`}}jd.cache={};jd.clearCache=()=>jd.cache={};Foe.exports=jd});var u4=L((rYt,qoe)=>{"use strict";var Rtt=Ie("util"),Moe=Noe(),Ooe=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Ftt=t=>e=>t===!0?Number(e):String(e),l4=t=>typeof t=="number"||typeof t=="string"&&t!=="",yB=t=>Number.isInteger(+t),c4=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Ntt=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,Ott=(t,e,r)=>{if(e>0){let s=t[0]==="-"?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0")}return r===!1?String(t):t},Loe=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length{t.negatives.sort((c,f)=>cf?1:0),t.positives.sort((c,f)=>cf?1:0);let r=e.capture?"":"?:",s="",a="",n;return t.positives.length&&(s=t.positives.join("|")),t.negatives.length&&(a=`-(${r}${t.negatives.join("|")})`),s&&a?n=`${s}|${a}`:n=s||a,e.wrap?`(${r}${n})`:n},_oe=(t,e,r,s)=>{if(r)return Moe(t,e,{wrap:!1,...s});let a=String.fromCharCode(t);if(t===e)return a;let n=String.fromCharCode(e);return`[${a}-${n}]`},Uoe=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===!0,a=r.capture?"":"?:";return s?`(${a}${t.join("|")})`:t.join("|")}return Moe(t,e,r)},Hoe=(...t)=>new RangeError("Invalid range arguments: "+Rtt.inspect(...t)),joe=(t,e,r)=>{if(r.strictRanges===!0)throw Hoe([t,e]);return[]},Mtt=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},_tt=(t,e,r=1,s={})=>{let a=Number(t),n=Number(e);if(!Number.isInteger(a)||!Number.isInteger(n)){if(s.strictRanges===!0)throw Hoe([t,e]);return[]}a===0&&(a=0),n===0&&(n=0);let c=a>n,f=String(t),p=String(e),h=String(r);r=Math.max(Math.abs(r),1);let E=c4(f)||c4(p)||c4(h),C=E?Math.max(f.length,p.length,h.length):0,S=E===!1&&Ntt(t,e,s)===!1,P=s.transform||Ftt(S);if(s.toRegex&&r===1)return _oe(Loe(t,C),Loe(e,C),!0,s);let I={negatives:[],positives:[]},R=W=>I[W<0?"negatives":"positives"].push(Math.abs(W)),N=[],U=0;for(;c?a>=n:a<=n;)s.toRegex===!0&&r>1?R(a):N.push(Ott(P(a,U),C,S)),a=c?a-r:a+r,U++;return s.toRegex===!0?r>1?Ltt(I,s):Uoe(N,null,{wrap:!1,...s}):N},Utt=(t,e,r=1,s={})=>{if(!yB(t)&&t.length>1||!yB(e)&&e.length>1)return joe(t,e,s);let a=s.transform||(S=>String.fromCharCode(S)),n=`${t}`.charCodeAt(0),c=`${e}`.charCodeAt(0),f=n>c,p=Math.min(n,c),h=Math.max(n,c);if(s.toRegex&&r===1)return _oe(p,h,!1,s);let E=[],C=0;for(;f?n>=c:n<=c;)E.push(a(n,C)),n=f?n-r:n+r,C++;return s.toRegex===!0?Uoe(E,null,{wrap:!1,options:s}):E},Ik=(t,e,r,s={})=>{if(e==null&&l4(t))return[t];if(!l4(t)||!l4(e))return joe(t,e,s);if(typeof r=="function")return Ik(t,e,1,{transform:r});if(Ooe(r))return Ik(t,e,0,r);let a={...s};return a.capture===!0&&(a.wrap=!0),r=r||a.step||1,yB(r)?yB(t)&&yB(e)?_tt(t,e,r,a):Utt(t,e,Math.max(Math.abs(r),1),a):r!=null&&!Ooe(r)?Mtt(r,a):Ik(t,e,1,r)};qoe.exports=Ik});var Yoe=L((nYt,Woe)=>{"use strict";var Htt=u4(),Goe=yk(),jtt=(t,e={})=>{let r=(s,a={})=>{let n=Goe.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f=n===!0||c===!0,p=e.escapeInvalid===!0?"\\":"",h="";if(s.isOpen===!0||s.isClose===!0)return p+s.value;if(s.type==="open")return f?p+s.value:"(";if(s.type==="close")return f?p+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":f?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let E=Goe.reduce(s.nodes),C=Htt(...E,{...e,wrap:!1,toRegex:!0});if(C.length!==0)return E.length>1&&C.length>1?`(${C})`:C}if(s.nodes)for(let E of s.nodes)h+=r(E,s);return h};return r(t)};Woe.exports=jtt});var Joe=L((iYt,Koe)=>{"use strict";var qtt=u4(),Voe=Ek(),QE=yk(),qd=(t="",e="",r=!1)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?QE.flatten(e).map(a=>`{${a}}`):e;for(let a of t)if(Array.isArray(a))for(let n of a)s.push(qd(n,e,r));else for(let n of e)r===!0&&typeof n=="string"&&(n=`{${n}}`),s.push(Array.isArray(n)?qd(a,n,r):a+n);return QE.flatten(s)},Gtt=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(a,n={})=>{a.queue=[];let c=n,f=n.queue;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,f=c.queue;if(a.invalid||a.dollar){f.push(qd(f.pop(),Voe(a,e)));return}if(a.type==="brace"&&a.invalid!==!0&&a.nodes.length===2){f.push(qd(f.pop(),["{}"]));return}if(a.nodes&&a.ranges>0){let C=QE.reduce(a.nodes);if(QE.exceedsLimit(...C,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let S=qtt(...C,e);S.length===0&&(S=Voe(a,e)),f.push(qd(f.pop(),S)),a.nodes=[];return}let p=QE.encloseBrace(a),h=a.queue,E=a;for(;E.type!=="brace"&&E.type!=="root"&&E.parent;)E=E.parent,h=E.queue;for(let C=0;C{"use strict";zoe.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` -`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var rae=L((oYt,tae)=>{"use strict";var Wtt=Ek(),{MAX_LENGTH:Xoe,CHAR_BACKSLASH:f4,CHAR_BACKTICK:Ytt,CHAR_COMMA:Vtt,CHAR_DOT:Ktt,CHAR_LEFT_PARENTHESES:Jtt,CHAR_RIGHT_PARENTHESES:ztt,CHAR_LEFT_CURLY_BRACE:Ztt,CHAR_RIGHT_CURLY_BRACE:Xtt,CHAR_LEFT_SQUARE_BRACKET:$oe,CHAR_RIGHT_SQUARE_BRACKET:eae,CHAR_DOUBLE_QUOTE:$tt,CHAR_SINGLE_QUOTE:ert,CHAR_NO_BREAK_SPACE:trt,CHAR_ZERO_WIDTH_NOBREAK_SPACE:rrt}=Zoe(),nrt=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(Xoe,r.maxLength):Xoe;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let a={type:"root",input:t,nodes:[]},n=[a],c=a,f=a,p=0,h=t.length,E=0,C=0,S,P={},I=()=>t[E++],R=N=>{if(N.type==="text"&&f.type==="dot"&&(f.type="text"),f&&f.type==="text"&&N.type==="text"){f.value+=N.value;return}return c.nodes.push(N),N.parent=c,N.prev=f,f=N,N};for(R({type:"bos"});E0){if(c.ranges>0){c.ranges=0;let N=c.nodes.shift();c.nodes=[N,{type:"text",value:Wtt(c)}]}R({type:"comma",value:S}),c.commas++;continue}if(S===Ktt&&C>0&&c.commas===0){let N=c.nodes;if(C===0||N.length===0){R({type:"text",value:S});continue}if(f.type==="dot"){if(c.range=[],f.value+=S,f.type="range",c.nodes.length!==3&&c.nodes.length!==5){c.invalid=!0,c.ranges=0,f.type="text";continue}c.ranges++,c.args=[];continue}if(f.type==="range"){N.pop();let U=N[N.length-1];U.value+=f.value+S,f=U,c.ranges--;continue}R({type:"dot",value:S});continue}R({type:"text",value:S})}do if(c=n.pop(),c.type!=="root"){c.nodes.forEach(W=>{W.nodes||(W.type==="open"&&(W.isOpen=!0),W.type==="close"&&(W.isClose=!0),W.nodes||(W.type="text"),W.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(c);N.nodes.splice(U,1,...c.nodes)}while(n.length>0);return R({type:"eos"}),a};tae.exports=nrt});var sae=L((aYt,iae)=>{"use strict";var nae=Ek(),irt=Yoe(),srt=Joe(),ort=rae(),ql=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let a=ql.create(s,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(ql.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};ql.parse=(t,e={})=>ort(t,e);ql.stringify=(t,e={})=>nae(typeof t=="string"?ql.parse(t,e):t,e);ql.compile=(t,e={})=>(typeof t=="string"&&(t=ql.parse(t,e)),irt(t,e));ql.expand=(t,e={})=>{typeof t=="string"&&(t=ql.parse(t,e));let r=srt(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};ql.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?ql.compile(t,e):ql.expand(t,e);iae.exports=ql});var EB=L((lYt,uae)=>{"use strict";var art=Ie("path"),Kf="\\\\/",oae=`[^${Kf}]`,Pp="\\.",lrt="\\+",crt="\\?",Ck="\\/",urt="(?=.)",aae="[^/]",A4=`(?:${Ck}|$)`,lae=`(?:^|${Ck})`,p4=`${Pp}{1,2}${A4}`,frt=`(?!${Pp})`,Art=`(?!${lae}${p4})`,prt=`(?!${Pp}{0,1}${A4})`,hrt=`(?!${p4})`,grt=`[^.${Ck}]`,drt=`${aae}*?`,cae={DOT_LITERAL:Pp,PLUS_LITERAL:lrt,QMARK_LITERAL:crt,SLASH_LITERAL:Ck,ONE_CHAR:urt,QMARK:aae,END_ANCHOR:A4,DOTS_SLASH:p4,NO_DOT:frt,NO_DOTS:Art,NO_DOT_SLASH:prt,NO_DOTS_SLASH:hrt,QMARK_NO_DOT:grt,STAR:drt,START_ANCHOR:lae},mrt={...cae,SLASH_LITERAL:`[${Kf}]`,QMARK:oae,STAR:`${oae}*?`,DOTS_SLASH:`${Pp}{1,2}(?:[${Kf}]|$)`,NO_DOT:`(?!${Pp})`,NO_DOTS:`(?!(?:^|[${Kf}])${Pp}{1,2}(?:[${Kf}]|$))`,NO_DOT_SLASH:`(?!${Pp}{0,1}(?:[${Kf}]|$))`,NO_DOTS_SLASH:`(?!${Pp}{1,2}(?:[${Kf}]|$))`,QMARK_NO_DOT:`[^.${Kf}]`,START_ANCHOR:`(?:^|[${Kf}])`,END_ANCHOR:`(?:[${Kf}]|$)`},yrt={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};uae.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:yrt,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:art.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?mrt:cae}}});var IB=L(al=>{"use strict";var Ert=Ie("path"),Irt=process.platform==="win32",{REGEX_BACKSLASH:Crt,REGEX_REMOVE_BACKSLASH:wrt,REGEX_SPECIAL_CHARS:Brt,REGEX_SPECIAL_CHARS_GLOBAL:vrt}=EB();al.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);al.hasRegexChars=t=>Brt.test(t);al.isRegexChar=t=>t.length===1&&al.hasRegexChars(t);al.escapeRegex=t=>t.replace(vrt,"\\$1");al.toPosixSlashes=t=>t.replace(Crt,"/");al.removeBackslashes=t=>t.replace(wrt,e=>e==="\\"?"":e);al.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};al.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Irt===!0||Ert.sep==="\\";al.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?al.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};al.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};al.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",a=r.contains?"":"$",n=`${s}(?:${t})${a}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n}});var yae=L((uYt,mae)=>{"use strict";var fae=IB(),{CHAR_ASTERISK:h4,CHAR_AT:Srt,CHAR_BACKWARD_SLASH:CB,CHAR_COMMA:Drt,CHAR_DOT:g4,CHAR_EXCLAMATION_MARK:d4,CHAR_FORWARD_SLASH:dae,CHAR_LEFT_CURLY_BRACE:m4,CHAR_LEFT_PARENTHESES:y4,CHAR_LEFT_SQUARE_BRACKET:brt,CHAR_PLUS:Prt,CHAR_QUESTION_MARK:Aae,CHAR_RIGHT_CURLY_BRACE:xrt,CHAR_RIGHT_PARENTHESES:pae,CHAR_RIGHT_SQUARE_BRACKET:krt}=EB(),hae=t=>t===dae||t===CB,gae=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Qrt=(t,e)=>{let r=e||{},s=t.length-1,a=r.parts===!0||r.scanToEnd===!0,n=[],c=[],f=[],p=t,h=-1,E=0,C=0,S=!1,P=!1,I=!1,R=!1,N=!1,U=!1,W=!1,te=!1,ie=!1,Ae=!1,ce=0,me,pe,Be={value:"",depth:0,isGlob:!1},Ce=()=>h>=s,g=()=>p.charCodeAt(h+1),we=()=>(me=pe,p.charCodeAt(++h));for(;h0&&(fe=p.slice(0,E),p=p.slice(E),C-=E),ye&&I===!0&&C>0?(ye=p.slice(0,C),se=p.slice(C)):I===!0?(ye="",se=p):ye=p,ye&&ye!==""&&ye!=="/"&&ye!==p&&hae(ye.charCodeAt(ye.length-1))&&(ye=ye.slice(0,-1)),r.unescape===!0&&(se&&(se=fae.removeBackslashes(se)),ye&&W===!0&&(ye=fae.removeBackslashes(ye)));let X={prefix:fe,input:t,start:E,base:ye,glob:se,isBrace:S,isBracket:P,isGlob:I,isExtglob:R,isGlobstar:N,negated:te,negatedExtglob:ie};if(r.tokens===!0&&(X.maxDepth=0,hae(pe)||c.push(Be),X.tokens=c),r.parts===!0||r.tokens===!0){let De;for(let Re=0;Re{"use strict";var wk=EB(),Gl=IB(),{MAX_LENGTH:Bk,POSIX_REGEX_SOURCE:Trt,REGEX_NON_SPECIAL_CHARS:Rrt,REGEX_SPECIAL_CHARS_BACKREF:Frt,REPLACEMENTS:Eae}=wk,Nrt=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(a=>Gl.escapeRegex(a)).join("..")}return r},TE=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,E4=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Eae[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(Bk,r.maxLength):Bk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},c=[n],f=r.capture?"":"?:",p=Gl.isWindows(e),h=wk.globChars(p),E=wk.extglobChars(h),{DOT_LITERAL:C,PLUS_LITERAL:S,SLASH_LITERAL:P,ONE_CHAR:I,DOTS_SLASH:R,NO_DOT:N,NO_DOT_SLASH:U,NO_DOTS_SLASH:W,QMARK:te,QMARK_NO_DOT:ie,STAR:Ae,START_ANCHOR:ce}=h,me=x=>`(${f}(?:(?!${ce}${x.dot?R:C}).)*?)`,pe=r.dot?"":N,Be=r.dot?te:ie,Ce=r.bash===!0?me(r):Ae;r.capture&&(Ce=`(${Ce})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let g={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:c};t=Gl.removePrefix(t,g),a=t.length;let we=[],ye=[],fe=[],se=n,X,De=()=>g.index===a-1,Re=g.peek=(x=1)=>t[g.index+x],dt=g.advance=()=>t[++g.index]||"",j=()=>t.slice(g.index+1),rt=(x="",w=0)=>{g.consumed+=x,g.index+=w},Fe=x=>{g.output+=x.output!=null?x.output:x.value,rt(x.value)},Ne=()=>{let x=1;for(;Re()==="!"&&(Re(2)!=="("||Re(3)==="?");)dt(),g.start++,x++;return x%2===0?!1:(g.negated=!0,g.start++,!0)},Pe=x=>{g[x]++,fe.push(x)},Ye=x=>{g[x]--,fe.pop()},ke=x=>{if(se.type==="globstar"){let w=g.braces>0&&(x.type==="comma"||x.type==="brace"),b=x.extglob===!0||we.length&&(x.type==="pipe"||x.type==="paren");x.type!=="slash"&&x.type!=="paren"&&!w&&!b&&(g.output=g.output.slice(0,-se.output.length),se.type="star",se.value="*",se.output=Ce,g.output+=se.output)}if(we.length&&x.type!=="paren"&&(we[we.length-1].inner+=x.value),(x.value||x.output)&&Fe(x),se&&se.type==="text"&&x.type==="text"){se.value+=x.value,se.output=(se.output||"")+x.value;return}x.prev=se,c.push(x),se=x},it=(x,w)=>{let b={...E[w],conditions:1,inner:""};b.prev=se,b.parens=g.parens,b.output=g.output;let y=(r.capture?"(":"")+b.open;Pe("parens"),ke({type:x,value:w,output:g.output?"":I}),ke({type:"paren",extglob:!0,value:dt(),output:y}),we.push(b)},_e=x=>{let w=x.close+(r.capture?")":""),b;if(x.type==="negate"){let y=Ce;if(x.inner&&x.inner.length>1&&x.inner.includes("/")&&(y=me(r)),(y!==Ce||De()||/^\)+$/.test(j()))&&(w=x.close=`)$))${y}`),x.inner.includes("*")&&(b=j())&&/^\.[^\\/.]+$/.test(b)){let F=E4(b,{...e,fastpaths:!1}).output;w=x.close=`)${F})${y})`}x.prev.type==="bos"&&(g.negatedExtglob=!0)}ke({type:"paren",extglob:!0,value:X,output:w}),Ye("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let x=!1,w=t.replace(Frt,(b,y,F,z,Z,$)=>z==="\\"?(x=!0,b):z==="?"?y?y+z+(Z?te.repeat(Z.length):""):$===0?Be+(Z?te.repeat(Z.length):""):te.repeat(F.length):z==="."?C.repeat(F.length):z==="*"?y?y+z+(Z?Ce:""):Ce:y?b:`\\${b}`);return x===!0&&(r.unescape===!0?w=w.replace(/\\/g,""):w=w.replace(/\\+/g,b=>b.length%2===0?"\\\\":b?"\\":"")),w===t&&r.contains===!0?(g.output=t,g):(g.output=Gl.wrapOutput(w,g,e),g)}for(;!De();){if(X=dt(),X==="\0")continue;if(X==="\\"){let b=Re();if(b==="/"&&r.bash!==!0||b==="."||b===";")continue;if(!b){X+="\\",ke({type:"text",value:X});continue}let y=/^\\+/.exec(j()),F=0;if(y&&y[0].length>2&&(F=y[0].length,g.index+=F,F%2!==0&&(X+="\\")),r.unescape===!0?X=dt():X+=dt(),g.brackets===0){ke({type:"text",value:X});continue}}if(g.brackets>0&&(X!=="]"||se.value==="["||se.value==="[^")){if(r.posix!==!1&&X===":"){let b=se.value.slice(1);if(b.includes("[")&&(se.posix=!0,b.includes(":"))){let y=se.value.lastIndexOf("["),F=se.value.slice(0,y),z=se.value.slice(y+2),Z=Trt[z];if(Z){se.value=F+Z,g.backtrack=!0,dt(),!n.output&&c.indexOf(se)===1&&(n.output=I);continue}}}(X==="["&&Re()!==":"||X==="-"&&Re()==="]")&&(X=`\\${X}`),X==="]"&&(se.value==="["||se.value==="[^")&&(X=`\\${X}`),r.posix===!0&&X==="!"&&se.value==="["&&(X="^"),se.value+=X,Fe({value:X});continue}if(g.quotes===1&&X!=='"'){X=Gl.escapeRegex(X),se.value+=X,Fe({value:X});continue}if(X==='"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&ke({type:"text",value:X});continue}if(X==="("){Pe("parens"),ke({type:"paren",value:X});continue}if(X===")"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(TE("opening","("));let b=we[we.length-1];if(b&&g.parens===b.parens+1){_e(we.pop());continue}ke({type:"paren",value:X,output:g.parens?")":"\\)"}),Ye("parens");continue}if(X==="["){if(r.nobracket===!0||!j().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(TE("closing","]"));X=`\\${X}`}else Pe("brackets");ke({type:"bracket",value:X});continue}if(X==="]"){if(r.nobracket===!0||se&&se.type==="bracket"&&se.value.length===1){ke({type:"text",value:X,output:`\\${X}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(TE("opening","["));ke({type:"text",value:X,output:`\\${X}`});continue}Ye("brackets");let b=se.value.slice(1);if(se.posix!==!0&&b[0]==="^"&&!b.includes("/")&&(X=`/${X}`),se.value+=X,Fe({value:X}),r.literalBrackets===!1||Gl.hasRegexChars(b))continue;let y=Gl.escapeRegex(se.value);if(g.output=g.output.slice(0,-se.value.length),r.literalBrackets===!0){g.output+=y,se.value=y;continue}se.value=`(${f}${y}|${se.value})`,g.output+=se.value;continue}if(X==="{"&&r.nobrace!==!0){Pe("braces");let b={type:"brace",value:X,output:"(",outputIndex:g.output.length,tokensIndex:g.tokens.length};ye.push(b),ke(b);continue}if(X==="}"){let b=ye[ye.length-1];if(r.nobrace===!0||!b){ke({type:"text",value:X,output:X});continue}let y=")";if(b.dots===!0){let F=c.slice(),z=[];for(let Z=F.length-1;Z>=0&&(c.pop(),F[Z].type!=="brace");Z--)F[Z].type!=="dots"&&z.unshift(F[Z].value);y=Nrt(z,r),g.backtrack=!0}if(b.comma!==!0&&b.dots!==!0){let F=g.output.slice(0,b.outputIndex),z=g.tokens.slice(b.tokensIndex);b.value=b.output="\\{",X=y="\\}",g.output=F;for(let Z of z)g.output+=Z.output||Z.value}ke({type:"brace",value:X,output:y}),Ye("braces"),ye.pop();continue}if(X==="|"){we.length>0&&we[we.length-1].conditions++,ke({type:"text",value:X});continue}if(X===","){let b=X,y=ye[ye.length-1];y&&fe[fe.length-1]==="braces"&&(y.comma=!0,b="|"),ke({type:"comma",value:X,output:b});continue}if(X==="/"){if(se.type==="dot"&&g.index===g.start+1){g.start=g.index+1,g.consumed="",g.output="",c.pop(),se=n;continue}ke({type:"slash",value:X,output:P});continue}if(X==="."){if(g.braces>0&&se.type==="dot"){se.value==="."&&(se.output=C);let b=ye[ye.length-1];se.type="dots",se.output+=X,se.value+=X,b.dots=!0;continue}if(g.braces+g.parens===0&&se.type!=="bos"&&se.type!=="slash"){ke({type:"text",value:X,output:C});continue}ke({type:"dot",value:X,output:C});continue}if(X==="?"){if(!(se&&se.value==="(")&&r.noextglob!==!0&&Re()==="("&&Re(2)!=="?"){it("qmark",X);continue}if(se&&se.type==="paren"){let y=Re(),F=X;if(y==="<"&&!Gl.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(se.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(j()))&&(F=`\\${X}`),ke({type:"text",value:X,output:F});continue}if(r.dot!==!0&&(se.type==="slash"||se.type==="bos")){ke({type:"qmark",value:X,output:ie});continue}ke({type:"qmark",value:X,output:te});continue}if(X==="!"){if(r.noextglob!==!0&&Re()==="("&&(Re(2)!=="?"||!/[!=<:]/.test(Re(3)))){it("negate",X);continue}if(r.nonegate!==!0&&g.index===0){Ne();continue}}if(X==="+"){if(r.noextglob!==!0&&Re()==="("&&Re(2)!=="?"){it("plus",X);continue}if(se&&se.value==="("||r.regex===!1){ke({type:"plus",value:X,output:S});continue}if(se&&(se.type==="bracket"||se.type==="paren"||se.type==="brace")||g.parens>0){ke({type:"plus",value:X});continue}ke({type:"plus",value:S});continue}if(X==="@"){if(r.noextglob!==!0&&Re()==="("&&Re(2)!=="?"){ke({type:"at",extglob:!0,value:X,output:""});continue}ke({type:"text",value:X});continue}if(X!=="*"){(X==="$"||X==="^")&&(X=`\\${X}`);let b=Rrt.exec(j());b&&(X+=b[0],g.index+=b[0].length),ke({type:"text",value:X});continue}if(se&&(se.type==="globstar"||se.star===!0)){se.type="star",se.star=!0,se.value+=X,se.output=Ce,g.backtrack=!0,g.globstar=!0,rt(X);continue}let x=j();if(r.noextglob!==!0&&/^\([^?]/.test(x)){it("star",X);continue}if(se.type==="star"){if(r.noglobstar===!0){rt(X);continue}let b=se.prev,y=b.prev,F=b.type==="slash"||b.type==="bos",z=y&&(y.type==="star"||y.type==="globstar");if(r.bash===!0&&(!F||x[0]&&x[0]!=="/")){ke({type:"star",value:X,output:""});continue}let Z=g.braces>0&&(b.type==="comma"||b.type==="brace"),$=we.length&&(b.type==="pipe"||b.type==="paren");if(!F&&b.type!=="paren"&&!Z&&!$){ke({type:"star",value:X,output:""});continue}for(;x.slice(0,3)==="/**";){let oe=t[g.index+4];if(oe&&oe!=="/")break;x=x.slice(3),rt("/**",3)}if(b.type==="bos"&&De()){se.type="globstar",se.value+=X,se.output=me(r),g.output=se.output,g.globstar=!0,rt(X);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&!z&&De()){g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type="globstar",se.output=me(r)+(r.strictSlashes?")":"|$)"),se.value+=X,g.globstar=!0,g.output+=b.output+se.output,rt(X);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&x[0]==="/"){let oe=x[1]!==void 0?"|$":"";g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type="globstar",se.output=`${me(r)}${P}|${P}${oe})`,se.value+=X,g.output+=b.output+se.output,g.globstar=!0,rt(X+dt()),ke({type:"slash",value:"/",output:""});continue}if(b.type==="bos"&&x[0]==="/"){se.type="globstar",se.value+=X,se.output=`(?:^|${P}|${me(r)}${P})`,g.output=se.output,g.globstar=!0,rt(X+dt()),ke({type:"slash",value:"/",output:""});continue}g.output=g.output.slice(0,-se.output.length),se.type="globstar",se.output=me(r),se.value+=X,g.output+=se.output,g.globstar=!0,rt(X);continue}let w={type:"star",value:X,output:Ce};if(r.bash===!0){w.output=".*?",(se.type==="bos"||se.type==="slash")&&(w.output=pe+w.output),ke(w);continue}if(se&&(se.type==="bracket"||se.type==="paren")&&r.regex===!0){w.output=X,ke(w);continue}(g.index===g.start||se.type==="slash"||se.type==="dot")&&(se.type==="dot"?(g.output+=U,se.output+=U):r.dot===!0?(g.output+=W,se.output+=W):(g.output+=pe,se.output+=pe),Re()!=="*"&&(g.output+=I,se.output+=I)),ke(w)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(TE("closing","]"));g.output=Gl.escapeLast(g.output,"["),Ye("brackets")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(TE("closing",")"));g.output=Gl.escapeLast(g.output,"("),Ye("parens")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(TE("closing","}"));g.output=Gl.escapeLast(g.output,"{"),Ye("braces")}if(r.strictSlashes!==!0&&(se.type==="star"||se.type==="bracket")&&ke({type:"maybe_slash",value:"",output:`${P}?`}),g.backtrack===!0){g.output="";for(let x of g.tokens)g.output+=x.output!=null?x.output:x.value,x.suffix&&(g.output+=x.suffix)}return g};E4.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(Bk,r.maxLength):Bk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);t=Eae[t]||t;let n=Gl.isWindows(e),{DOT_LITERAL:c,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:E,NO_DOTS:C,NO_DOTS_SLASH:S,STAR:P,START_ANCHOR:I}=wk.globChars(n),R=r.dot?C:E,N=r.dot?S:E,U=r.capture?"":"?:",W={negated:!1,prefix:""},te=r.bash===!0?".*?":P;r.capture&&(te=`(${te})`);let ie=pe=>pe.noglobstar===!0?te:`(${U}(?:(?!${I}${pe.dot?h:c}).)*?)`,Ae=pe=>{switch(pe){case"*":return`${R}${p}${te}`;case".*":return`${c}${p}${te}`;case"*.*":return`${R}${te}${c}${p}${te}`;case"*/*":return`${R}${te}${f}${p}${N}${te}`;case"**":return R+ie(r);case"**/*":return`(?:${R}${ie(r)}${f})?${N}${p}${te}`;case"**/*.*":return`(?:${R}${ie(r)}${f})?${N}${te}${c}${p}${te}`;case"**/.*":return`(?:${R}${ie(r)}${f})?${c}${p}${te}`;default:{let Be=/^(.*?)\.(\w+)$/.exec(pe);if(!Be)return;let Ce=Ae(Be[1]);return Ce?Ce+c+Be[2]:void 0}}},ce=Gl.removePrefix(t,W),me=Ae(ce);return me&&r.strictSlashes!==!0&&(me+=`${f}?`),me};Iae.exports=E4});var Bae=L((AYt,wae)=>{"use strict";var Ort=Ie("path"),Lrt=yae(),I4=Cae(),C4=IB(),Mrt=EB(),_rt=t=>t&&typeof t=="object"&&!Array.isArray(t),$i=(t,e,r=!1)=>{if(Array.isArray(t)){let E=t.map(S=>$i(S,e,r));return S=>{for(let P of E){let I=P(S);if(I)return I}return!1}}let s=_rt(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let a=e||{},n=C4.isWindows(e),c=s?$i.compileRe(t,e):$i.makeRe(t,e,!1,!0),f=c.state;delete c.state;let p=()=>!1;if(a.ignore){let E={...e,ignore:null,onMatch:null,onResult:null};p=$i(a.ignore,E,r)}let h=(E,C=!1)=>{let{isMatch:S,match:P,output:I}=$i.test(E,c,e,{glob:t,posix:n}),R={glob:t,state:f,regex:c,posix:n,input:E,output:I,match:P,isMatch:S};return typeof a.onResult=="function"&&a.onResult(R),S===!1?(R.isMatch=!1,C?R:!1):p(E)?(typeof a.onIgnore=="function"&&a.onIgnore(R),R.isMatch=!1,C?R:!1):(typeof a.onMatch=="function"&&a.onMatch(R),C?R:!0)};return r&&(h.state=f),h};$i.test=(t,e,r,{glob:s,posix:a}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let n=r||{},c=n.format||(a?C4.toPosixSlashes:null),f=t===s,p=f&&c?c(t):t;return f===!1&&(p=c?c(t):t,f=p===s),(f===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?f=$i.matchBase(t,e,r,a):f=e.exec(p)),{isMatch:!!f,match:f,output:p}};$i.matchBase=(t,e,r,s=C4.isWindows(r))=>(e instanceof RegExp?e:$i.makeRe(e,r)).test(Ort.basename(t));$i.isMatch=(t,e,r)=>$i(e,r)(t);$i.parse=(t,e)=>Array.isArray(t)?t.map(r=>$i.parse(r,e)):I4(t,{...e,fastpaths:!1});$i.scan=(t,e)=>Lrt(t,e);$i.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let a=e||{},n=a.contains?"":"^",c=a.contains?"":"$",f=`${n}(?:${t.output})${c}`;t&&t.negated===!0&&(f=`^(?!${f}).*$`);let p=$i.toRegex(f,e);return s===!0&&(p.state=t),p};$i.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let a={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(a.output=I4.fastpaths(t,e)),a.output||(a=I4(t,e)),$i.compileRe(a,e,r,s)};$i.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};$i.constants=Mrt;wae.exports=$i});var Sae=L((pYt,vae)=>{"use strict";vae.exports=Bae()});var Sa=L((hYt,xae)=>{"use strict";var bae=Ie("util"),Pae=sae(),Jf=Sae(),w4=IB(),Dae=t=>t===""||t==="./",Qi=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,a=new Set,n=new Set,c=0,f=E=>{n.add(E.output),r&&r.onResult&&r.onResult(E)};for(let E=0;E!s.has(E));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(E=>E.replace(/\\/g,"")):e}return h};Qi.match=Qi;Qi.matcher=(t,e)=>Jf(t,e);Qi.isMatch=(t,e,r)=>Jf(e,r)(t);Qi.any=Qi.isMatch;Qi.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,a=[],n=f=>{r.onResult&&r.onResult(f),a.push(f.output)},c=new Set(Qi(t,e,{...r,onResult:n}));for(let f of a)c.has(f)||s.add(f);return[...s]};Qi.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${bae.inspect(t)}"`);if(Array.isArray(e))return e.some(s=>Qi.contains(t,s,r));if(typeof e=="string"){if(Dae(t)||Dae(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return Qi.isMatch(t,e,{...r,contains:!0})};Qi.matchKeys=(t,e,r)=>{if(!w4.isObject(t))throw new TypeError("Expected the first argument to be an object");let s=Qi(Object.keys(t),e,r),a={};for(let n of s)a[n]=t[n];return a};Qi.some=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(s.some(c=>n(c)))return!0}return!1};Qi.every=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(!s.every(c=>n(c)))return!1}return!0};Qi.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${bae.inspect(t)}"`);return[].concat(e).every(s=>Jf(s,r)(t))};Qi.capture=(t,e,r)=>{let s=w4.isWindows(r),n=Jf.makeRe(String(t),{...r,capture:!0}).exec(s?w4.toPosixSlashes(e):e);if(n)return n.slice(1).map(c=>c===void 0?"":c)};Qi.makeRe=(...t)=>Jf.makeRe(...t);Qi.scan=(...t)=>Jf.scan(...t);Qi.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[]))for(let a of Pae(String(s),e))r.push(Jf.parse(a,e));return r};Qi.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:Pae(t,e)};Qi.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return Qi.braces(t,{...e,expand:!0})};xae.exports=Qi});var Qae=L((gYt,kae)=>{"use strict";kae.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var vk=L((dYt,Tae)=>{"use strict";var Urt=Qae();Tae.exports=t=>typeof t=="string"?t.replace(Urt(),""):t});var Fae=L((mYt,Rae)=>{function Hrt(){this.__data__=[],this.size=0}Rae.exports=Hrt});var RE=L((yYt,Nae)=>{function jrt(t,e){return t===e||t!==t&&e!==e}Nae.exports=jrt});var wB=L((EYt,Oae)=>{var qrt=RE();function Grt(t,e){for(var r=t.length;r--;)if(qrt(t[r][0],e))return r;return-1}Oae.exports=Grt});var Mae=L((IYt,Lae)=>{var Wrt=wB(),Yrt=Array.prototype,Vrt=Yrt.splice;function Krt(t){var e=this.__data__,r=Wrt(e,t);if(r<0)return!1;var s=e.length-1;return r==s?e.pop():Vrt.call(e,r,1),--this.size,!0}Lae.exports=Krt});var Uae=L((CYt,_ae)=>{var Jrt=wB();function zrt(t){var e=this.__data__,r=Jrt(e,t);return r<0?void 0:e[r][1]}_ae.exports=zrt});var jae=L((wYt,Hae)=>{var Zrt=wB();function Xrt(t){return Zrt(this.__data__,t)>-1}Hae.exports=Xrt});var Gae=L((BYt,qae)=>{var $rt=wB();function ent(t,e){var r=this.__data__,s=$rt(r,t);return s<0?(++this.size,r.push([t,e])):r[s][1]=e,this}qae.exports=ent});var BB=L((vYt,Wae)=>{var tnt=Fae(),rnt=Mae(),nnt=Uae(),int=jae(),snt=Gae();function FE(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var ont=BB();function ant(){this.__data__=new ont,this.size=0}Yae.exports=ant});var Jae=L((DYt,Kae)=>{function lnt(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}Kae.exports=lnt});var Zae=L((bYt,zae)=>{function cnt(t){return this.__data__.get(t)}zae.exports=cnt});var $ae=L((PYt,Xae)=>{function unt(t){return this.__data__.has(t)}Xae.exports=unt});var B4=L((xYt,ele)=>{var fnt=typeof global=="object"&&global&&global.Object===Object&&global;ele.exports=fnt});var Pc=L((kYt,tle)=>{var Ant=B4(),pnt=typeof self=="object"&&self&&self.Object===Object&&self,hnt=Ant||pnt||Function("return this")();tle.exports=hnt});var Gd=L((QYt,rle)=>{var gnt=Pc(),dnt=gnt.Symbol;rle.exports=dnt});var ole=L((TYt,sle)=>{var nle=Gd(),ile=Object.prototype,mnt=ile.hasOwnProperty,ynt=ile.toString,vB=nle?nle.toStringTag:void 0;function Ent(t){var e=mnt.call(t,vB),r=t[vB];try{t[vB]=void 0;var s=!0}catch{}var a=ynt.call(t);return s&&(e?t[vB]=r:delete t[vB]),a}sle.exports=Ent});var lle=L((RYt,ale)=>{var Int=Object.prototype,Cnt=Int.toString;function wnt(t){return Cnt.call(t)}ale.exports=wnt});var Wd=L((FYt,fle)=>{var cle=Gd(),Bnt=ole(),vnt=lle(),Snt="[object Null]",Dnt="[object Undefined]",ule=cle?cle.toStringTag:void 0;function bnt(t){return t==null?t===void 0?Dnt:Snt:ule&&ule in Object(t)?Bnt(t):vnt(t)}fle.exports=bnt});var Wl=L((NYt,Ale)=>{function Pnt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}Ale.exports=Pnt});var Sk=L((OYt,ple)=>{var xnt=Wd(),knt=Wl(),Qnt="[object AsyncFunction]",Tnt="[object Function]",Rnt="[object GeneratorFunction]",Fnt="[object Proxy]";function Nnt(t){if(!knt(t))return!1;var e=xnt(t);return e==Tnt||e==Rnt||e==Qnt||e==Fnt}ple.exports=Nnt});var gle=L((LYt,hle)=>{var Ont=Pc(),Lnt=Ont["__core-js_shared__"];hle.exports=Lnt});var yle=L((MYt,mle)=>{var v4=gle(),dle=function(){var t=/[^.]+$/.exec(v4&&v4.keys&&v4.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Mnt(t){return!!dle&&dle in t}mle.exports=Mnt});var S4=L((_Yt,Ele)=>{var _nt=Function.prototype,Unt=_nt.toString;function Hnt(t){if(t!=null){try{return Unt.call(t)}catch{}try{return t+""}catch{}}return""}Ele.exports=Hnt});var Cle=L((UYt,Ile)=>{var jnt=Sk(),qnt=yle(),Gnt=Wl(),Wnt=S4(),Ynt=/[\\^$.*+?()[\]{}|]/g,Vnt=/^\[object .+?Constructor\]$/,Knt=Function.prototype,Jnt=Object.prototype,znt=Knt.toString,Znt=Jnt.hasOwnProperty,Xnt=RegExp("^"+znt.call(Znt).replace(Ynt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $nt(t){if(!Gnt(t)||qnt(t))return!1;var e=jnt(t)?Xnt:Vnt;return e.test(Wnt(t))}Ile.exports=$nt});var Ble=L((HYt,wle)=>{function eit(t,e){return t?.[e]}wle.exports=eit});var f0=L((jYt,vle)=>{var tit=Cle(),rit=Ble();function nit(t,e){var r=rit(t,e);return tit(r)?r:void 0}vle.exports=nit});var Dk=L((qYt,Sle)=>{var iit=f0(),sit=Pc(),oit=iit(sit,"Map");Sle.exports=oit});var SB=L((GYt,Dle)=>{var ait=f0(),lit=ait(Object,"create");Dle.exports=lit});var xle=L((WYt,Ple)=>{var ble=SB();function cit(){this.__data__=ble?ble(null):{},this.size=0}Ple.exports=cit});var Qle=L((YYt,kle)=>{function uit(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}kle.exports=uit});var Rle=L((VYt,Tle)=>{var fit=SB(),Ait="__lodash_hash_undefined__",pit=Object.prototype,hit=pit.hasOwnProperty;function git(t){var e=this.__data__;if(fit){var r=e[t];return r===Ait?void 0:r}return hit.call(e,t)?e[t]:void 0}Tle.exports=git});var Nle=L((KYt,Fle)=>{var dit=SB(),mit=Object.prototype,yit=mit.hasOwnProperty;function Eit(t){var e=this.__data__;return dit?e[t]!==void 0:yit.call(e,t)}Fle.exports=Eit});var Lle=L((JYt,Ole)=>{var Iit=SB(),Cit="__lodash_hash_undefined__";function wit(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Iit&&e===void 0?Cit:e,this}Ole.exports=wit});var _le=L((zYt,Mle)=>{var Bit=xle(),vit=Qle(),Sit=Rle(),Dit=Nle(),bit=Lle();function NE(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var Ule=_le(),Pit=BB(),xit=Dk();function kit(){this.size=0,this.__data__={hash:new Ule,map:new(xit||Pit),string:new Ule}}Hle.exports=kit});var Gle=L((XYt,qle)=>{function Qit(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}qle.exports=Qit});var DB=L(($Yt,Wle)=>{var Tit=Gle();function Rit(t,e){var r=t.__data__;return Tit(e)?r[typeof e=="string"?"string":"hash"]:r.map}Wle.exports=Rit});var Vle=L((eVt,Yle)=>{var Fit=DB();function Nit(t){var e=Fit(this,t).delete(t);return this.size-=e?1:0,e}Yle.exports=Nit});var Jle=L((tVt,Kle)=>{var Oit=DB();function Lit(t){return Oit(this,t).get(t)}Kle.exports=Lit});var Zle=L((rVt,zle)=>{var Mit=DB();function _it(t){return Mit(this,t).has(t)}zle.exports=_it});var $le=L((nVt,Xle)=>{var Uit=DB();function Hit(t,e){var r=Uit(this,t),s=r.size;return r.set(t,e),this.size+=r.size==s?0:1,this}Xle.exports=Hit});var bk=L((iVt,ece)=>{var jit=jle(),qit=Vle(),Git=Jle(),Wit=Zle(),Yit=$le();function OE(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var Vit=BB(),Kit=Dk(),Jit=bk(),zit=200;function Zit(t,e){var r=this.__data__;if(r instanceof Vit){var s=r.__data__;if(!Kit||s.length{var Xit=BB(),$it=Vae(),est=Jae(),tst=Zae(),rst=$ae(),nst=rce();function LE(t){var e=this.__data__=new Xit(t);this.size=e.size}LE.prototype.clear=$it;LE.prototype.delete=est;LE.prototype.get=tst;LE.prototype.has=rst;LE.prototype.set=nst;nce.exports=LE});var sce=L((aVt,ice)=>{var ist="__lodash_hash_undefined__";function sst(t){return this.__data__.set(t,ist),this}ice.exports=sst});var ace=L((lVt,oce)=>{function ost(t){return this.__data__.has(t)}oce.exports=ost});var cce=L((cVt,lce)=>{var ast=bk(),lst=sce(),cst=ace();function xk(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ast;++e{function ust(t,e){for(var r=-1,s=t==null?0:t.length;++r{function fst(t,e){return t.has(e)}Ace.exports=fst});var D4=L((AVt,hce)=>{var Ast=cce(),pst=fce(),hst=pce(),gst=1,dst=2;function mst(t,e,r,s,a,n){var c=r&gst,f=t.length,p=e.length;if(f!=p&&!(c&&p>f))return!1;var h=n.get(t),E=n.get(e);if(h&&E)return h==e&&E==t;var C=-1,S=!0,P=r&dst?new Ast:void 0;for(n.set(t,e),n.set(e,t);++C{var yst=Pc(),Est=yst.Uint8Array;gce.exports=Est});var mce=L((hVt,dce)=>{function Ist(t){var e=-1,r=Array(t.size);return t.forEach(function(s,a){r[++e]=[a,s]}),r}dce.exports=Ist});var Ece=L((gVt,yce)=>{function Cst(t){var e=-1,r=Array(t.size);return t.forEach(function(s){r[++e]=s}),r}yce.exports=Cst});var vce=L((dVt,Bce)=>{var Ice=Gd(),Cce=b4(),wst=RE(),Bst=D4(),vst=mce(),Sst=Ece(),Dst=1,bst=2,Pst="[object Boolean]",xst="[object Date]",kst="[object Error]",Qst="[object Map]",Tst="[object Number]",Rst="[object RegExp]",Fst="[object Set]",Nst="[object String]",Ost="[object Symbol]",Lst="[object ArrayBuffer]",Mst="[object DataView]",wce=Ice?Ice.prototype:void 0,P4=wce?wce.valueOf:void 0;function _st(t,e,r,s,a,n,c){switch(r){case Mst:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Lst:return!(t.byteLength!=e.byteLength||!n(new Cce(t),new Cce(e)));case Pst:case xst:case Tst:return wst(+t,+e);case kst:return t.name==e.name&&t.message==e.message;case Rst:case Nst:return t==e+"";case Qst:var f=vst;case Fst:var p=s&Dst;if(f||(f=Sst),t.size!=e.size&&!p)return!1;var h=c.get(t);if(h)return h==e;s|=bst,c.set(t,e);var E=Bst(f(t),f(e),s,a,n,c);return c.delete(t),E;case Ost:if(P4)return P4.call(t)==P4.call(e)}return!1}Bce.exports=_st});var kk=L((mVt,Sce)=>{function Ust(t,e){for(var r=-1,s=e.length,a=t.length;++r{var Hst=Array.isArray;Dce.exports=Hst});var x4=L((EVt,bce)=>{var jst=kk(),qst=xc();function Gst(t,e,r){var s=e(t);return qst(t)?s:jst(s,r(t))}bce.exports=Gst});var xce=L((IVt,Pce)=>{function Wst(t,e){for(var r=-1,s=t==null?0:t.length,a=0,n=[];++r{function Yst(){return[]}kce.exports=Yst});var Qk=L((wVt,Tce)=>{var Vst=xce(),Kst=k4(),Jst=Object.prototype,zst=Jst.propertyIsEnumerable,Qce=Object.getOwnPropertySymbols,Zst=Qce?function(t){return t==null?[]:(t=Object(t),Vst(Qce(t),function(e){return zst.call(t,e)}))}:Kst;Tce.exports=Zst});var Fce=L((BVt,Rce)=>{function Xst(t,e){for(var r=-1,s=Array(t);++r{function $st(t){return t!=null&&typeof t=="object"}Nce.exports=$st});var Lce=L((SVt,Oce)=>{var eot=Wd(),tot=zf(),rot="[object Arguments]";function not(t){return tot(t)&&eot(t)==rot}Oce.exports=not});var bB=L((DVt,Uce)=>{var Mce=Lce(),iot=zf(),_ce=Object.prototype,sot=_ce.hasOwnProperty,oot=_ce.propertyIsEnumerable,aot=Mce(function(){return arguments}())?Mce:function(t){return iot(t)&&sot.call(t,"callee")&&!oot.call(t,"callee")};Uce.exports=aot});var jce=L((bVt,Hce)=>{function lot(){return!1}Hce.exports=lot});var xB=L((PB,ME)=>{var cot=Pc(),uot=jce(),Wce=typeof PB=="object"&&PB&&!PB.nodeType&&PB,qce=Wce&&typeof ME=="object"&&ME&&!ME.nodeType&&ME,fot=qce&&qce.exports===Wce,Gce=fot?cot.Buffer:void 0,Aot=Gce?Gce.isBuffer:void 0,pot=Aot||uot;ME.exports=pot});var kB=L((PVt,Yce)=>{var hot=9007199254740991,got=/^(?:0|[1-9]\d*)$/;function dot(t,e){var r=typeof t;return e=e??hot,!!e&&(r=="number"||r!="symbol"&&got.test(t))&&t>-1&&t%1==0&&t{var mot=9007199254740991;function yot(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=mot}Vce.exports=yot});var Jce=L((kVt,Kce)=>{var Eot=Wd(),Iot=Tk(),Cot=zf(),wot="[object Arguments]",Bot="[object Array]",vot="[object Boolean]",Sot="[object Date]",Dot="[object Error]",bot="[object Function]",Pot="[object Map]",xot="[object Number]",kot="[object Object]",Qot="[object RegExp]",Tot="[object Set]",Rot="[object String]",Fot="[object WeakMap]",Not="[object ArrayBuffer]",Oot="[object DataView]",Lot="[object Float32Array]",Mot="[object Float64Array]",_ot="[object Int8Array]",Uot="[object Int16Array]",Hot="[object Int32Array]",jot="[object Uint8Array]",qot="[object Uint8ClampedArray]",Got="[object Uint16Array]",Wot="[object Uint32Array]",Di={};Di[Lot]=Di[Mot]=Di[_ot]=Di[Uot]=Di[Hot]=Di[jot]=Di[qot]=Di[Got]=Di[Wot]=!0;Di[wot]=Di[Bot]=Di[Not]=Di[vot]=Di[Oot]=Di[Sot]=Di[Dot]=Di[bot]=Di[Pot]=Di[xot]=Di[kot]=Di[Qot]=Di[Tot]=Di[Rot]=Di[Fot]=!1;function Yot(t){return Cot(t)&&Iot(t.length)&&!!Di[Eot(t)]}Kce.exports=Yot});var Rk=L((QVt,zce)=>{function Vot(t){return function(e){return t(e)}}zce.exports=Vot});var Fk=L((QB,_E)=>{var Kot=B4(),Zce=typeof QB=="object"&&QB&&!QB.nodeType&&QB,TB=Zce&&typeof _E=="object"&&_E&&!_E.nodeType&&_E,Jot=TB&&TB.exports===Zce,Q4=Jot&&Kot.process,zot=function(){try{var t=TB&&TB.require&&TB.require("util").types;return t||Q4&&Q4.binding&&Q4.binding("util")}catch{}}();_E.exports=zot});var Nk=L((TVt,eue)=>{var Zot=Jce(),Xot=Rk(),Xce=Fk(),$ce=Xce&&Xce.isTypedArray,$ot=$ce?Xot($ce):Zot;eue.exports=$ot});var T4=L((RVt,tue)=>{var eat=Fce(),tat=bB(),rat=xc(),nat=xB(),iat=kB(),sat=Nk(),oat=Object.prototype,aat=oat.hasOwnProperty;function lat(t,e){var r=rat(t),s=!r&&tat(t),a=!r&&!s&&nat(t),n=!r&&!s&&!a&&sat(t),c=r||s||a||n,f=c?eat(t.length,String):[],p=f.length;for(var h in t)(e||aat.call(t,h))&&!(c&&(h=="length"||a&&(h=="offset"||h=="parent")||n&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||iat(h,p)))&&f.push(h);return f}tue.exports=lat});var Ok=L((FVt,rue)=>{var cat=Object.prototype;function uat(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||cat;return t===r}rue.exports=uat});var R4=L((NVt,nue)=>{function fat(t,e){return function(r){return t(e(r))}}nue.exports=fat});var sue=L((OVt,iue)=>{var Aat=R4(),pat=Aat(Object.keys,Object);iue.exports=pat});var aue=L((LVt,oue)=>{var hat=Ok(),gat=sue(),dat=Object.prototype,mat=dat.hasOwnProperty;function yat(t){if(!hat(t))return gat(t);var e=[];for(var r in Object(t))mat.call(t,r)&&r!="constructor"&&e.push(r);return e}oue.exports=yat});var RB=L((MVt,lue)=>{var Eat=Sk(),Iat=Tk();function Cat(t){return t!=null&&Iat(t.length)&&!Eat(t)}lue.exports=Cat});var Lk=L((_Vt,cue)=>{var wat=T4(),Bat=aue(),vat=RB();function Sat(t){return vat(t)?wat(t):Bat(t)}cue.exports=Sat});var F4=L((UVt,uue)=>{var Dat=x4(),bat=Qk(),Pat=Lk();function xat(t){return Dat(t,Pat,bat)}uue.exports=xat});var pue=L((HVt,Aue)=>{var fue=F4(),kat=1,Qat=Object.prototype,Tat=Qat.hasOwnProperty;function Rat(t,e,r,s,a,n){var c=r&kat,f=fue(t),p=f.length,h=fue(e),E=h.length;if(p!=E&&!c)return!1;for(var C=p;C--;){var S=f[C];if(!(c?S in e:Tat.call(e,S)))return!1}var P=n.get(t),I=n.get(e);if(P&&I)return P==e&&I==t;var R=!0;n.set(t,e),n.set(e,t);for(var N=c;++C{var Fat=f0(),Nat=Pc(),Oat=Fat(Nat,"DataView");hue.exports=Oat});var mue=L((qVt,due)=>{var Lat=f0(),Mat=Pc(),_at=Lat(Mat,"Promise");due.exports=_at});var Eue=L((GVt,yue)=>{var Uat=f0(),Hat=Pc(),jat=Uat(Hat,"Set");yue.exports=jat});var Cue=L((WVt,Iue)=>{var qat=f0(),Gat=Pc(),Wat=qat(Gat,"WeakMap");Iue.exports=Wat});var FB=L((YVt,Pue)=>{var N4=gue(),O4=Dk(),L4=mue(),M4=Eue(),_4=Cue(),bue=Wd(),UE=S4(),wue="[object Map]",Yat="[object Object]",Bue="[object Promise]",vue="[object Set]",Sue="[object WeakMap]",Due="[object DataView]",Vat=UE(N4),Kat=UE(O4),Jat=UE(L4),zat=UE(M4),Zat=UE(_4),Yd=bue;(N4&&Yd(new N4(new ArrayBuffer(1)))!=Due||O4&&Yd(new O4)!=wue||L4&&Yd(L4.resolve())!=Bue||M4&&Yd(new M4)!=vue||_4&&Yd(new _4)!=Sue)&&(Yd=function(t){var e=bue(t),r=e==Yat?t.constructor:void 0,s=r?UE(r):"";if(s)switch(s){case Vat:return Due;case Kat:return wue;case Jat:return Bue;case zat:return vue;case Zat:return Sue}return e});Pue.exports=Yd});var Oue=L((VVt,Nue)=>{var U4=Pk(),Xat=D4(),$at=vce(),elt=pue(),xue=FB(),kue=xc(),Que=xB(),tlt=Nk(),rlt=1,Tue="[object Arguments]",Rue="[object Array]",Mk="[object Object]",nlt=Object.prototype,Fue=nlt.hasOwnProperty;function ilt(t,e,r,s,a,n){var c=kue(t),f=kue(e),p=c?Rue:xue(t),h=f?Rue:xue(e);p=p==Tue?Mk:p,h=h==Tue?Mk:h;var E=p==Mk,C=h==Mk,S=p==h;if(S&&Que(t)){if(!Que(e))return!1;c=!0,E=!1}if(S&&!E)return n||(n=new U4),c||tlt(t)?Xat(t,e,r,s,a,n):$at(t,e,p,r,s,a,n);if(!(r&rlt)){var P=E&&Fue.call(t,"__wrapped__"),I=C&&Fue.call(e,"__wrapped__");if(P||I){var R=P?t.value():t,N=I?e.value():e;return n||(n=new U4),a(R,N,r,s,n)}}return S?(n||(n=new U4),elt(t,e,r,s,a,n)):!1}Nue.exports=ilt});var Uue=L((KVt,_ue)=>{var slt=Oue(),Lue=zf();function Mue(t,e,r,s,a){return t===e?!0:t==null||e==null||!Lue(t)&&!Lue(e)?t!==t&&e!==e:slt(t,e,r,s,Mue,a)}_ue.exports=Mue});var jue=L((JVt,Hue)=>{var olt=Uue();function alt(t,e){return olt(t,e)}Hue.exports=alt});var H4=L((zVt,que)=>{var llt=f0(),clt=function(){try{var t=llt(Object,"defineProperty");return t({},"",{}),t}catch{}}();que.exports=clt});var _k=L((ZVt,Wue)=>{var Gue=H4();function ult(t,e,r){e=="__proto__"&&Gue?Gue(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Wue.exports=ult});var j4=L((XVt,Yue)=>{var flt=_k(),Alt=RE();function plt(t,e,r){(r!==void 0&&!Alt(t[e],r)||r===void 0&&!(e in t))&&flt(t,e,r)}Yue.exports=plt});var Kue=L(($Vt,Vue)=>{function hlt(t){return function(e,r,s){for(var a=-1,n=Object(e),c=s(e),f=c.length;f--;){var p=c[t?f:++a];if(r(n[p],p,n)===!1)break}return e}}Vue.exports=hlt});var zue=L((e7t,Jue)=>{var glt=Kue(),dlt=glt();Jue.exports=dlt});var q4=L((NB,HE)=>{var mlt=Pc(),efe=typeof NB=="object"&&NB&&!NB.nodeType&&NB,Zue=efe&&typeof HE=="object"&&HE&&!HE.nodeType&&HE,ylt=Zue&&Zue.exports===efe,Xue=ylt?mlt.Buffer:void 0,$ue=Xue?Xue.allocUnsafe:void 0;function Elt(t,e){if(e)return t.slice();var r=t.length,s=$ue?$ue(r):new t.constructor(r);return t.copy(s),s}HE.exports=Elt});var Uk=L((t7t,rfe)=>{var tfe=b4();function Ilt(t){var e=new t.constructor(t.byteLength);return new tfe(e).set(new tfe(t)),e}rfe.exports=Ilt});var G4=L((r7t,nfe)=>{var Clt=Uk();function wlt(t,e){var r=e?Clt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}nfe.exports=wlt});var Hk=L((n7t,ife)=>{function Blt(t,e){var r=-1,s=t.length;for(e||(e=Array(s));++r{var vlt=Wl(),sfe=Object.create,Slt=function(){function t(){}return function(e){if(!vlt(e))return{};if(sfe)return sfe(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();ofe.exports=Slt});var jk=L((s7t,lfe)=>{var Dlt=R4(),blt=Dlt(Object.getPrototypeOf,Object);lfe.exports=blt});var W4=L((o7t,cfe)=>{var Plt=afe(),xlt=jk(),klt=Ok();function Qlt(t){return typeof t.constructor=="function"&&!klt(t)?Plt(xlt(t)):{}}cfe.exports=Qlt});var ffe=L((a7t,ufe)=>{var Tlt=RB(),Rlt=zf();function Flt(t){return Rlt(t)&&Tlt(t)}ufe.exports=Flt});var Y4=L((l7t,pfe)=>{var Nlt=Wd(),Olt=jk(),Llt=zf(),Mlt="[object Object]",_lt=Function.prototype,Ult=Object.prototype,Afe=_lt.toString,Hlt=Ult.hasOwnProperty,jlt=Afe.call(Object);function qlt(t){if(!Llt(t)||Nlt(t)!=Mlt)return!1;var e=Olt(t);if(e===null)return!0;var r=Hlt.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Afe.call(r)==jlt}pfe.exports=qlt});var V4=L((c7t,hfe)=>{function Glt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}hfe.exports=Glt});var qk=L((u7t,gfe)=>{var Wlt=_k(),Ylt=RE(),Vlt=Object.prototype,Klt=Vlt.hasOwnProperty;function Jlt(t,e,r){var s=t[e];(!(Klt.call(t,e)&&Ylt(s,r))||r===void 0&&!(e in t))&&Wlt(t,e,r)}gfe.exports=Jlt});var Vd=L((f7t,dfe)=>{var zlt=qk(),Zlt=_k();function Xlt(t,e,r,s){var a=!r;r||(r={});for(var n=-1,c=e.length;++n{function $lt(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}mfe.exports=$lt});var Ife=L((p7t,Efe)=>{var ect=Wl(),tct=Ok(),rct=yfe(),nct=Object.prototype,ict=nct.hasOwnProperty;function sct(t){if(!ect(t))return rct(t);var e=tct(t),r=[];for(var s in t)s=="constructor"&&(e||!ict.call(t,s))||r.push(s);return r}Efe.exports=sct});var jE=L((h7t,Cfe)=>{var oct=T4(),act=Ife(),lct=RB();function cct(t){return lct(t)?oct(t,!0):act(t)}Cfe.exports=cct});var Bfe=L((g7t,wfe)=>{var uct=Vd(),fct=jE();function Act(t){return uct(t,fct(t))}wfe.exports=Act});var xfe=L((d7t,Pfe)=>{var vfe=j4(),pct=q4(),hct=G4(),gct=Hk(),dct=W4(),Sfe=bB(),Dfe=xc(),mct=ffe(),yct=xB(),Ect=Sk(),Ict=Wl(),Cct=Y4(),wct=Nk(),bfe=V4(),Bct=Bfe();function vct(t,e,r,s,a,n,c){var f=bfe(t,r),p=bfe(e,r),h=c.get(p);if(h){vfe(t,r,h);return}var E=n?n(f,p,r+"",t,e,c):void 0,C=E===void 0;if(C){var S=Dfe(p),P=!S&&yct(p),I=!S&&!P&&wct(p);E=p,S||P||I?Dfe(f)?E=f:mct(f)?E=gct(f):P?(C=!1,E=pct(p,!0)):I?(C=!1,E=hct(p,!0)):E=[]:Cct(p)||Sfe(p)?(E=f,Sfe(f)?E=Bct(f):(!Ict(f)||Ect(f))&&(E=dct(p))):C=!1}C&&(c.set(p,E),a(E,p,s,n,c),c.delete(p)),vfe(t,r,E)}Pfe.exports=vct});var Tfe=L((m7t,Qfe)=>{var Sct=Pk(),Dct=j4(),bct=zue(),Pct=xfe(),xct=Wl(),kct=jE(),Qct=V4();function kfe(t,e,r,s,a){t!==e&&bct(e,function(n,c){if(a||(a=new Sct),xct(n))Pct(t,e,c,r,kfe,s,a);else{var f=s?s(Qct(t,c),n,c+"",t,e,a):void 0;f===void 0&&(f=n),Dct(t,c,f)}},kct)}Qfe.exports=kfe});var K4=L((y7t,Rfe)=>{function Tct(t){return t}Rfe.exports=Tct});var Nfe=L((E7t,Ffe)=>{function Rct(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}Ffe.exports=Rct});var J4=L((I7t,Lfe)=>{var Fct=Nfe(),Ofe=Math.max;function Nct(t,e,r){return e=Ofe(e===void 0?t.length-1:e,0),function(){for(var s=arguments,a=-1,n=Ofe(s.length-e,0),c=Array(n);++a{function Oct(t){return function(){return t}}Mfe.exports=Oct});var jfe=L((w7t,Hfe)=>{var Lct=_fe(),Ufe=H4(),Mct=K4(),_ct=Ufe?function(t,e){return Ufe(t,"toString",{configurable:!0,enumerable:!1,value:Lct(e),writable:!0})}:Mct;Hfe.exports=_ct});var Gfe=L((B7t,qfe)=>{var Uct=800,Hct=16,jct=Date.now;function qct(t){var e=0,r=0;return function(){var s=jct(),a=Hct-(s-r);if(r=s,a>0){if(++e>=Uct)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}qfe.exports=qct});var z4=L((v7t,Wfe)=>{var Gct=jfe(),Wct=Gfe(),Yct=Wct(Gct);Wfe.exports=Yct});var Vfe=L((S7t,Yfe)=>{var Vct=K4(),Kct=J4(),Jct=z4();function zct(t,e){return Jct(Kct(t,e,Vct),t+"")}Yfe.exports=zct});var Jfe=L((D7t,Kfe)=>{var Zct=RE(),Xct=RB(),$ct=kB(),eut=Wl();function tut(t,e,r){if(!eut(r))return!1;var s=typeof e;return(s=="number"?Xct(r)&&$ct(e,r.length):s=="string"&&e in r)?Zct(r[e],t):!1}Kfe.exports=tut});var Zfe=L((b7t,zfe)=>{var rut=Vfe(),nut=Jfe();function iut(t){return rut(function(e,r){var s=-1,a=r.length,n=a>1?r[a-1]:void 0,c=a>2?r[2]:void 0;for(n=t.length>3&&typeof n=="function"?(a--,n):void 0,c&&nut(r[0],r[1],c)&&(n=a<3?void 0:n,a=1),e=Object(e);++s{var sut=Tfe(),out=Zfe(),aut=out(function(t,e,r,s){sut(t,e,r,s)});Xfe.exports=aut});var je={};Vt(je,{AsyncActions:()=>$4,BufferStream:()=>X4,CachingStrategy:()=>fAe,DefaultStream:()=>e3,allSettledSafe:()=>Uu,assertNever:()=>r3,bufferStream:()=>GE,buildIgnorePattern:()=>hut,convertMapsToIndexableObjects:()=>Wk,dynamicRequire:()=>kp,escapeRegExp:()=>cut,getArrayWithDefault:()=>LB,getFactoryWithDefault:()=>Vl,getMapWithDefault:()=>n3,getSetWithDefault:()=>xp,groupBy:()=>mut,isIndexableObject:()=>Z4,isPathLike:()=>gut,isTaggedYarnVersion:()=>lut,makeDeferred:()=>lAe,mapAndFilter:()=>Yl,mapAndFind:()=>A0,mergeIntoTarget:()=>pAe,overrideType:()=>uut,parseBoolean:()=>MB,parseInt:()=>WE,parseOptionalBoolean:()=>AAe,plural:()=>Gk,prettifyAsyncErrors:()=>qE,prettifySyncErrors:()=>i3,releaseAfterUseAsync:()=>Aut,replaceEnvVariables:()=>Yk,sortMap:()=>Ys,toMerged:()=>dut,tryParseOptionalBoolean:()=>s3,validateEnum:()=>fut});function lut(t){return!!(sAe.default.valid(t)&&t.match(/^[^-]+(-rc\.[0-9]+)?$/))}function Gk(t,{one:e,more:r,zero:s=r}){return t===0?s:t===1?e:r}function cut(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uut(t){}function r3(t){throw new Error(`Assertion failed: Unexpected object '${t}'`)}function fut(t,e){let r=Object.values(t);if(!r.includes(e))throw new nt(`Invalid value for enumeration: ${JSON.stringify(e)} (expected one of ${r.map(s=>JSON.stringify(s)).join(", ")})`);return e}function Yl(t,e){let r=[];for(let s of t){let a=e(s);a!==oAe&&r.push(a)}return r}function A0(t,e){for(let r of t){let s=e(r);if(s!==aAe)return s}}function Z4(t){return typeof t=="object"&&t!==null}async function Uu(t){let e=await Promise.allSettled(t),r=[];for(let s of e){if(s.status==="rejected")throw s.reason;r.push(s.value)}return r}function Wk(t){if(t instanceof Map&&(t=Object.fromEntries(t)),Z4(t))for(let e of Object.keys(t)){let r=t[e];Z4(r)&&(t[e]=Wk(r))}return t}function Vl(t,e,r){let s=t.get(e);return typeof s>"u"&&t.set(e,s=r()),s}function LB(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=[]),r}function xp(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=new Set),r}function n3(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=new Map),r}async function Aut(t,e){if(e==null)return await t();try{return await t()}finally{await e()}}async function qE(t,e){try{return await t()}catch(r){throw r.message=e(r.message),r}}function i3(t,e){try{return t()}catch(r){throw r.message=e(r.message),r}}async function GE(t){return await new Promise((e,r)=>{let s=[];t.on("error",a=>{r(a)}),t.on("data",a=>{s.push(a)}),t.on("end",()=>{e(Buffer.concat(s))})})}function lAe(){let t,e;return{promise:new Promise((s,a)=>{t=s,e=a}),resolve:t,reject:e}}function cAe(t){return OB(ue.fromPortablePath(t))}function uAe(path){let physicalPath=ue.fromPortablePath(path),currentCacheEntry=OB.cache[physicalPath];delete OB.cache[physicalPath];let result;try{result=cAe(physicalPath);let freshCacheEntry=OB.cache[physicalPath],dynamicModule=eval("module"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{OB.cache[physicalPath]=currentCacheEntry}return result}function put(t){let e=eAe.get(t),r=le.statSync(t);if(e?.mtime===r.mtimeMs)return e.instance;let s=uAe(t);return eAe.set(t,{mtime:r.mtimeMs,instance:s}),s}function kp(t,{cachingStrategy:e=2}={}){switch(e){case 0:return uAe(t);case 1:return put(t);case 2:return cAe(t);default:throw new Error("Unsupported caching strategy")}}function Ys(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function hut(t){return t.length===0?null:t.map(e=>`(${nAe.default.makeRe(e,{windows:!1,dot:!0}).source})`).join("|")}function Yk(t,{env:e}){let r=/\${(?[\d\w_]+)(?:)?(?:-(?[^}]*))?}/g;return t.replace(r,(...s)=>{let{variableName:a,colon:n,fallback:c}=s[s.length-1],f=Object.hasOwn(e,a),p=e[a];if(p||f&&!n)return p;if(c!=null)return c;throw new nt(`Environment variable not found (${a})`)})}function MB(t){switch(t){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${t}" as a boolean`)}}function AAe(t){return typeof t>"u"?t:MB(t)}function s3(t){try{return AAe(t)}catch{return null}}function gut(t){return!!(ue.isAbsolute(t)||t.match(/^(\.{1,2}|~)\//))}function pAe(t,...e){let r=c=>({value:c}),s=r(t),a=e.map(c=>r(c)),{value:n}=(0,rAe.default)(s,...a,(c,f)=>{if(Array.isArray(c)&&Array.isArray(f)){for(let p of f)c.find(h=>(0,tAe.default)(h,p))||c.push(p);return c}});return n}function dut(...t){return pAe({},...t)}function mut(t,e){let r=Object.create(null);for(let s of t){let a=s[e];r[a]??=[],r[a].push(s)}return r}function WE(t){return typeof t=="string"?Number.parseInt(t,10):t}var tAe,rAe,nAe,iAe,sAe,t3,oAe,aAe,X4,$4,e3,OB,eAe,fAe,kc=Ct(()=>{bt();Wt();tAe=et(jue()),rAe=et($fe()),nAe=et(Sa()),iAe=et(Od()),sAe=et(Ai()),t3=Ie("stream");oAe=Symbol();Yl.skip=oAe;aAe=Symbol();A0.skip=aAe;X4=class extends t3.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(r,s,a){if(s!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(r),a(null,null)}_flush(r){r(null,Buffer.concat(this.chunks))}};$4=class{constructor(e){this.deferred=new Map;this.promises=new Map;this.limit=(0,iAe.default)(e)}set(e,r){let s=this.deferred.get(e);typeof s>"u"&&this.deferred.set(e,s=lAe());let a=this.limit(()=>r());return this.promises.set(e,a),a.then(()=>{this.promises.get(e)===a&&s.resolve()},n=>{this.promises.get(e)===a&&s.reject(n)}),s.promise}reduce(e,r){let s=this.promises.get(e)??Promise.resolve();this.set(e,()=>r(s))}async wait(){await Promise.all(this.promises.values())}},e3=class extends t3.Transform{constructor(r=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=r}_transform(r,s,a){if(s!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,a(null,r)}_flush(r){this.active&&this.ifEmpty.length>0?r(null,this.ifEmpty):r(null)}},OB=eval("require");eAe=new Map;fAe=(s=>(s[s.NoCache=0]="NoCache",s[s.FsTime=1]="FsTime",s[s.Node=2]="Node",s))(fAe||{})});var YE,o3,a3,hAe=Ct(()=>{YE=(r=>(r.HARD="HARD",r.SOFT="SOFT",r))(YE||{}),o3=(s=>(s.Dependency="Dependency",s.PeerDependency="PeerDependency",s.PeerDependencyMeta="PeerDependencyMeta",s))(o3||{}),a3=(s=>(s.Inactive="inactive",s.Redundant="redundant",s.Active="active",s))(a3||{})});var he={};Vt(he,{LogLevel:()=>Xk,Style:()=>Jk,Type:()=>pt,addLogFilterSupport:()=>HB,applyColor:()=>ri,applyHyperlink:()=>KE,applyStyle:()=>Kd,json:()=>Jd,jsonOrPretty:()=>Iut,mark:()=>A3,pretty:()=>Ut,prettyField:()=>Zf,prettyList:()=>f3,prettyTruncatedLocatorList:()=>Zk,stripAnsi:()=>VE.default,supportsColor:()=>zk,supportsHyperlinks:()=>u3,tuple:()=>Hu});function gAe(t){let e=["KiB","MiB","GiB","TiB"],r=e.length;for(;r>1&&t<1024**r;)r-=1;let s=1024**r;return`${Math.floor(t*100/s)/100} ${e[r-1]}`}function Vk(t,e){if(Array.isArray(e))return e.length===0?ri(t,"[]",pt.CODE):ri(t,"[ ",pt.CODE)+e.map(r=>Vk(t,r)).join(", ")+ri(t," ]",pt.CODE);if(typeof e=="string")return ri(t,JSON.stringify(e),pt.STRING);if(typeof e=="number")return ri(t,JSON.stringify(e),pt.NUMBER);if(typeof e=="boolean")return ri(t,JSON.stringify(e),pt.BOOLEAN);if(e===null)return ri(t,"null",pt.NULL);if(typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype){let r=Object.entries(e);return r.length===0?ri(t,"{}",pt.CODE):ri(t,"{ ",pt.CODE)+r.map(([s,a])=>`${Vk(t,s)}: ${Vk(t,a)}`).join(", ")+ri(t," }",pt.CODE)}if(typeof e>"u")return ri(t,"undefined",pt.NULL);throw new Error("Assertion failed: The value doesn't seem to be a valid JSON object")}function Hu(t,e){return[e,t]}function Kd(t,e,r){return t.get("enableColors")&&r&2&&(e=UB.default.bold(e)),e}function ri(t,e,r){if(!t.get("enableColors"))return e;let s=yut.get(r);if(s===null)return e;let a=typeof s>"u"?r:c3.level>=3?s[0]:s[1],n=typeof a=="number"?l3.ansi256(a):a.startsWith("#")?l3.hex(a):l3[a];if(typeof n!="function")throw new Error(`Invalid format type ${a}`);return n(e)}function KE(t,e,r){return t.get("enableHyperlinks")?Eut?`\x1B]8;;${r}\x1B\\${e}\x1B]8;;\x1B\\`:`\x1B]8;;${r}\x07${e}\x1B]8;;\x07`:e}function Ut(t,e,r){if(e===null)return ri(t,"null",pt.NULL);if(Object.hasOwn(Kk,r))return Kk[r].pretty(t,e);if(typeof e!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return ri(t,e,r)}function f3(t,e,r,{separator:s=", "}={}){return[...e].map(a=>Ut(t,a,r)).join(s)}function Jd(t,e){if(t===null)return null;if(Object.hasOwn(Kk,e))return Kk[e].json(t);if(typeof t!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof t}`);return t}function Iut(t,e,[r,s]){return t?Jd(r,s):Ut(e,r,s)}function A3(t){return{Check:ri(t,"\u2713","green"),Cross:ri(t,"\u2718","red"),Question:ri(t,"?","cyan")}}function Zf(t,{label:e,value:[r,s]}){return`${Ut(t,e,pt.CODE)}: ${Ut(t,r,s)}`}function Zk(t,e,r){let s=[],a=[...e],n=r;for(;a.length>0;){let h=a[0],E=`${Yr(t,h)}, `,C=p3(h).length+2;if(s.length>0&&nh).join("").slice(0,-2);let c="X".repeat(a.length.toString().length),f=`and ${c} more.`,p=a.length;for(;s.length>1&&nh).join(""),f.replace(c,Ut(t,p,pt.NUMBER))].join("")}function HB(t,{configuration:e}){let r=e.get("logFilters"),s=new Map,a=new Map,n=[];for(let C of r){let S=C.get("level");if(typeof S>"u")continue;let P=C.get("code");typeof P<"u"&&s.set(P,S);let I=C.get("text");typeof I<"u"&&a.set(I,S);let R=C.get("pattern");typeof R<"u"&&n.push([dAe.default.matcher(R,{contains:!0}),S])}n.reverse();let c=(C,S,P)=>{if(C===null||C===0)return P;let I=a.size>0||n.length>0?(0,VE.default)(S):S;if(a.size>0){let R=a.get(I);if(typeof R<"u")return R??P}if(n.length>0){for(let[R,N]of n)if(R(I))return N??P}if(s.size>0){let R=s.get(Vf(C));if(typeof R<"u")return R??P}return P},f=t.reportInfo,p=t.reportWarning,h=t.reportError,E=function(C,S,P,I){switch(c(S,P,I)){case"info":f.call(C,S,P);break;case"warning":p.call(C,S??0,P);break;case"error":h.call(C,S??0,P);break}};t.reportInfo=function(...C){return E(this,...C,"info")},t.reportWarning=function(...C){return E(this,...C,"warning")},t.reportError=function(...C){return E(this,...C,"error")}}var UB,_B,dAe,VE,pt,Jk,c3,zk,u3,l3,yut,Wo,Kk,Eut,Xk,Qc=Ct(()=>{bt();UB=et(kE()),_B=et(Rd());Wt();dAe=et(Sa()),VE=et(vk());Zx();Yo();pt={NO_HINT:"NO_HINT",ID:"ID",NULL:"NULL",SCOPE:"SCOPE",NAME:"NAME",RANGE:"RANGE",REFERENCE:"REFERENCE",NUMBER:"NUMBER",STRING:"STRING",BOOLEAN:"BOOLEAN",PATH:"PATH",URL:"URL",ADDED:"ADDED",REMOVED:"REMOVED",CODE:"CODE",INSPECT:"INSPECT",DURATION:"DURATION",SIZE:"SIZE",SIZE_DIFF:"SIZE_DIFF",IDENT:"IDENT",DESCRIPTOR:"DESCRIPTOR",LOCATOR:"LOCATOR",RESOLUTION:"RESOLUTION",DEPENDENT:"DEPENDENT",PACKAGE_EXTENSION:"PACKAGE_EXTENSION",SETTING:"SETTING",MARKDOWN:"MARKDOWN",MARKDOWN_INLINE:"MARKDOWN_INLINE"},Jk=(e=>(e[e.BOLD=2]="BOLD",e))(Jk||{}),c3=_B.default.GITHUB_ACTIONS?{level:2}:UB.default.supportsColor?{level:UB.default.supportsColor.level}:{level:0},zk=c3.level!==0,u3=zk&&!_B.default.GITHUB_ACTIONS&&!_B.default.CIRCLE&&!_B.default.GITLAB,l3=new UB.default.Instance(c3),yut=new Map([[pt.NO_HINT,null],[pt.NULL,["#a853b5",129]],[pt.SCOPE,["#d75f00",166]],[pt.NAME,["#d7875f",173]],[pt.RANGE,["#00afaf",37]],[pt.REFERENCE,["#87afff",111]],[pt.NUMBER,["#ffd700",220]],[pt.STRING,["#b4bd68",32]],[pt.BOOLEAN,["#faa023",209]],[pt.PATH,["#d75fd7",170]],[pt.URL,["#d75fd7",170]],[pt.ADDED,["#5faf00",70]],[pt.REMOVED,["#ff3131",160]],[pt.CODE,["#87afff",111]],[pt.SIZE,["#ffd700",220]]]),Wo=t=>t;Kk={[pt.ID]:Wo({pretty:(t,e)=>typeof e=="number"?ri(t,`${e}`,pt.NUMBER):ri(t,e,pt.CODE),json:t=>t}),[pt.INSPECT]:Wo({pretty:(t,e)=>Vk(t,e),json:t=>t}),[pt.NUMBER]:Wo({pretty:(t,e)=>ri(t,`${e}`,pt.NUMBER),json:t=>t}),[pt.IDENT]:Wo({pretty:(t,e)=>es(t,e),json:t=>cn(t)}),[pt.LOCATOR]:Wo({pretty:(t,e)=>Yr(t,e),json:t=>cl(t)}),[pt.DESCRIPTOR]:Wo({pretty:(t,e)=>ni(t,e),json:t=>ll(t)}),[pt.RESOLUTION]:Wo({pretty:(t,{descriptor:e,locator:r})=>jB(t,e,r),json:({descriptor:t,locator:e})=>({descriptor:ll(t),locator:e!==null?cl(e):null})}),[pt.DEPENDENT]:Wo({pretty:(t,{locator:e,descriptor:r})=>h3(t,e,r),json:({locator:t,descriptor:e})=>({locator:cl(t),descriptor:ll(e)})}),[pt.PACKAGE_EXTENSION]:Wo({pretty:(t,e)=>{switch(e.type){case"Dependency":return`${es(t,e.parentDescriptor)} \u27A4 ${ri(t,"dependencies",pt.CODE)} \u27A4 ${es(t,e.descriptor)}`;case"PeerDependency":return`${es(t,e.parentDescriptor)} \u27A4 ${ri(t,"peerDependencies",pt.CODE)} \u27A4 ${es(t,e.descriptor)}`;case"PeerDependencyMeta":return`${es(t,e.parentDescriptor)} \u27A4 ${ri(t,"peerDependenciesMeta",pt.CODE)} \u27A4 ${es(t,Da(e.selector))} \u27A4 ${ri(t,e.key,pt.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}},json:t=>{switch(t.type){case"Dependency":return`${cn(t.parentDescriptor)} > ${cn(t.descriptor)}`;case"PeerDependency":return`${cn(t.parentDescriptor)} >> ${cn(t.descriptor)}`;case"PeerDependencyMeta":return`${cn(t.parentDescriptor)} >> ${t.selector} / ${t.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${t.type}`)}}}),[pt.SETTING]:Wo({pretty:(t,e)=>(t.get(e),KE(t,ri(t,e,pt.CODE),`https://yarnpkg.com/configuration/yarnrc#${e}`)),json:t=>t}),[pt.DURATION]:Wo({pretty:(t,e)=>{if(e>1e3*60){let r=Math.floor(e/1e3/60),s=Math.ceil((e-r*60*1e3)/1e3);return s===0?`${r}m`:`${r}m ${s}s`}else{let r=Math.floor(e/1e3),s=e-r*1e3;return s===0?`${r}s`:`${r}s ${s}ms`}},json:t=>t}),[pt.SIZE]:Wo({pretty:(t,e)=>ri(t,gAe(e),pt.NUMBER),json:t=>t}),[pt.SIZE_DIFF]:Wo({pretty:(t,e)=>{let r=e>=0?"+":"-",s=r==="+"?pt.REMOVED:pt.ADDED;return ri(t,`${r} ${gAe(Math.max(Math.abs(e),1))}`,s)},json:t=>t}),[pt.PATH]:Wo({pretty:(t,e)=>ri(t,ue.fromPortablePath(e),pt.PATH),json:t=>ue.fromPortablePath(t)}),[pt.MARKDOWN]:Wo({pretty:(t,{text:e,format:r,paragraphs:s})=>qo(e,{format:r,paragraphs:s}),json:({text:t})=>t}),[pt.MARKDOWN_INLINE]:Wo({pretty:(t,e)=>(e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(r,s,a)=>Ut(t,s+a+s,pt.CODE)),e=e.replace(/(\*\*)((?:.|[\n])*?)\1/g,(r,s,a)=>Kd(t,a,2)),e),json:t=>t})};Eut=!!process.env.KONSOLE_VERSION;Xk=(a=>(a.Error="error",a.Warning="warning",a.Info="info",a.Discard="discard",a))(Xk||{})});var mAe=L(JE=>{"use strict";Object.defineProperty(JE,"__esModule",{value:!0});JE.splitWhen=JE.flatten=void 0;function Cut(t){return t.reduce((e,r)=>[].concat(e,r),[])}JE.flatten=Cut;function wut(t,e){let r=[[]],s=0;for(let a of t)e(a)?(s++,r[s]=[]):r[s].push(a);return r}JE.splitWhen=wut});var yAe=L($k=>{"use strict";Object.defineProperty($k,"__esModule",{value:!0});$k.isEnoentCodeError=void 0;function But(t){return t.code==="ENOENT"}$k.isEnoentCodeError=But});var EAe=L(eQ=>{"use strict";Object.defineProperty(eQ,"__esModule",{value:!0});eQ.createDirentFromStats=void 0;var g3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function vut(t,e){return new g3(t,e)}eQ.createDirentFromStats=vut});var BAe=L(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.convertPosixPathToPattern=us.convertWindowsPathToPattern=us.convertPathToPattern=us.escapePosixPath=us.escapeWindowsPath=us.escape=us.removeLeadingDotSegment=us.makeAbsolute=us.unixify=void 0;var Sut=Ie("os"),Dut=Ie("path"),IAe=Sut.platform()==="win32",but=2,Put=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,xut=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,kut=/^\\\\([.?])/,Qut=/\\(?![!()+@[\]{}])/g;function Tut(t){return t.replace(/\\/g,"/")}us.unixify=Tut;function Rut(t,e){return Dut.resolve(t,e)}us.makeAbsolute=Rut;function Fut(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(but)}return t}us.removeLeadingDotSegment=Fut;us.escape=IAe?d3:m3;function d3(t){return t.replace(xut,"\\$2")}us.escapeWindowsPath=d3;function m3(t){return t.replace(Put,"\\$2")}us.escapePosixPath=m3;us.convertPathToPattern=IAe?CAe:wAe;function CAe(t){return d3(t).replace(kut,"//$1").replace(Qut,"/")}us.convertWindowsPathToPattern=CAe;function wAe(t){return m3(t)}us.convertPosixPathToPattern=wAe});var SAe=L((q7t,vAe)=>{vAe.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var PAe=L((G7t,bAe)=>{var Nut=SAe(),DAe={"{":"}","(":")","[":"]"},Out=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,s=-2,a=-2,n=-2,c=-2;ee&&(c===-1||c>s||(c=t.indexOf("\\",e),c===-1||c>s)))||a!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(a=t.indexOf("}",e),a>e&&(c=t.indexOf("\\",e),c===-1||c>a))||n!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(n=t.indexOf(")",e),n>e&&(c=t.indexOf("\\",e),c===-1||c>n))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(rr&&(c=t.indexOf("\\",r),c===-1||c>n))))return!0;if(t[e]==="\\"){var f=t[e+1];e+=2;var p=DAe[f];if(p){var h=t.indexOf(p,e);h!==-1&&(e=h+1)}if(t[e]==="!")return!0}else e++}return!1},Lut=function(t){if(t[0]==="!")return!0;for(var e=0;e{"use strict";var Mut=PAe(),_ut=Ie("path").posix.dirname,Uut=Ie("os").platform()==="win32",y3="/",Hut=/\\/g,jut=/[\{\[].*[\}\]]$/,qut=/(^|[^\\])([\{\[]|\([^\)]+$)/,Gut=/\\([\!\*\?\|\[\]\(\)\{\}])/g;xAe.exports=function(e,r){var s=Object.assign({flipBackslashes:!0},r);s.flipBackslashes&&Uut&&e.indexOf(y3)<0&&(e=e.replace(Hut,y3)),jut.test(e)&&(e+=y3),e+="a";do e=_ut(e);while(Mut(e)||qut.test(e));return e.replace(Gut,"$1")}});var MAe=L(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.removeDuplicateSlashes=jr.matchAny=jr.convertPatternsToRe=jr.makeRe=jr.getPatternParts=jr.expandBraceExpansion=jr.expandPatternsWithBraceExpansion=jr.isAffectDepthOfReadingPattern=jr.endsWithSlashGlobStar=jr.hasGlobStar=jr.getBaseDirectory=jr.isPatternRelatedToParentDirectory=jr.getPatternsOutsideCurrentDirectory=jr.getPatternsInsideCurrentDirectory=jr.getPositivePatterns=jr.getNegativePatterns=jr.isPositivePattern=jr.isNegativePattern=jr.convertToNegativePattern=jr.convertToPositivePattern=jr.isDynamicPattern=jr.isStaticPattern=void 0;var Wut=Ie("path"),Yut=kAe(),E3=Sa(),QAe="**",Vut="\\",Kut=/[*?]|^!/,Jut=/\[[^[]*]/,zut=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Zut=/[!*+?@]\([^(]*\)/,Xut=/,|\.\./,$ut=/(?!^)\/{2,}/g;function TAe(t,e={}){return!RAe(t,e)}jr.isStaticPattern=TAe;function RAe(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(Vut)||Kut.test(t)||Jut.test(t)||zut.test(t)||e.extglob!==!1&&Zut.test(t)||e.braceExpansion!==!1&&eft(t))}jr.isDynamicPattern=RAe;function eft(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let s=t.slice(e,r);return Xut.test(s)}function tft(t){return tQ(t)?t.slice(1):t}jr.convertToPositivePattern=tft;function rft(t){return"!"+t}jr.convertToNegativePattern=rft;function tQ(t){return t.startsWith("!")&&t[1]!=="("}jr.isNegativePattern=tQ;function FAe(t){return!tQ(t)}jr.isPositivePattern=FAe;function nft(t){return t.filter(tQ)}jr.getNegativePatterns=nft;function ift(t){return t.filter(FAe)}jr.getPositivePatterns=ift;function sft(t){return t.filter(e=>!I3(e))}jr.getPatternsInsideCurrentDirectory=sft;function oft(t){return t.filter(I3)}jr.getPatternsOutsideCurrentDirectory=oft;function I3(t){return t.startsWith("..")||t.startsWith("./..")}jr.isPatternRelatedToParentDirectory=I3;function aft(t){return Yut(t,{flipBackslashes:!1})}jr.getBaseDirectory=aft;function lft(t){return t.includes(QAe)}jr.hasGlobStar=lft;function NAe(t){return t.endsWith("/"+QAe)}jr.endsWithSlashGlobStar=NAe;function cft(t){let e=Wut.basename(t);return NAe(t)||TAe(e)}jr.isAffectDepthOfReadingPattern=cft;function uft(t){return t.reduce((e,r)=>e.concat(OAe(r)),[])}jr.expandPatternsWithBraceExpansion=uft;function OAe(t){let e=E3.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,s)=>r.length-s.length),e.filter(r=>r!=="")}jr.expandBraceExpansion=OAe;function fft(t,e){let{parts:r}=E3.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}jr.getPatternParts=fft;function LAe(t,e){return E3.makeRe(t,e)}jr.makeRe=LAe;function Aft(t,e){return t.map(r=>LAe(r,e))}jr.convertPatternsToRe=Aft;function pft(t,e){return e.some(r=>r.test(t))}jr.matchAny=pft;function hft(t){return t.replace($ut,"/")}jr.removeDuplicateSlashes=hft});var jAe=L((V7t,HAe)=>{"use strict";var gft=Ie("stream"),_Ae=gft.PassThrough,dft=Array.prototype.slice;HAe.exports=mft;function mft(){let t=[],e=dft.call(arguments),r=!1,s=e[e.length-1];s&&!Array.isArray(s)&&s.pipe==null?e.pop():s={};let a=s.end!==!1,n=s.pipeError===!0;s.objectMode==null&&(s.objectMode=!0),s.highWaterMark==null&&(s.highWaterMark=64*1024);let c=_Ae(s);function f(){for(let E=0,C=arguments.length;E0||(r=!1,p())}function P(I){function R(){I.removeListener("merge2UnpipeEnd",R),I.removeListener("end",R),n&&I.removeListener("error",N),S()}function N(U){c.emit("error",U)}if(I._readableState.endEmitted)return S();I.on("merge2UnpipeEnd",R),I.on("end",R),n&&I.on("error",N),I.pipe(c,{end:!1}),I.resume()}for(let I=0;I{"use strict";Object.defineProperty(rQ,"__esModule",{value:!0});rQ.merge=void 0;var yft=jAe();function Eft(t){let e=yft(t);return t.forEach(r=>{r.once("error",s=>e.emit("error",s))}),e.once("close",()=>qAe(t)),e.once("end",()=>qAe(t)),e}rQ.merge=Eft;function qAe(t){t.forEach(e=>e.emit("close"))}});var WAe=L(zE=>{"use strict";Object.defineProperty(zE,"__esModule",{value:!0});zE.isEmpty=zE.isString=void 0;function Ift(t){return typeof t=="string"}zE.isString=Ift;function Cft(t){return t===""}zE.isEmpty=Cft});var Qp=L(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.string=Vo.stream=Vo.pattern=Vo.path=Vo.fs=Vo.errno=Vo.array=void 0;var wft=mAe();Vo.array=wft;var Bft=yAe();Vo.errno=Bft;var vft=EAe();Vo.fs=vft;var Sft=BAe();Vo.path=Sft;var Dft=MAe();Vo.pattern=Dft;var bft=GAe();Vo.stream=bft;var Pft=WAe();Vo.string=Pft});var JAe=L(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.convertPatternGroupToTask=Ko.convertPatternGroupsToTasks=Ko.groupPatternsByBaseDirectory=Ko.getNegativePatternsAsPositive=Ko.getPositivePatterns=Ko.convertPatternsToTasks=Ko.generate=void 0;var ju=Qp();function xft(t,e){let r=YAe(t,e),s=YAe(e.ignore,e),a=VAe(r),n=KAe(r,s),c=a.filter(E=>ju.pattern.isStaticPattern(E,e)),f=a.filter(E=>ju.pattern.isDynamicPattern(E,e)),p=C3(c,n,!1),h=C3(f,n,!0);return p.concat(h)}Ko.generate=xft;function YAe(t,e){let r=t;return e.braceExpansion&&(r=ju.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(s=>s.includes("/")?s:`**/${s}`)),r.map(s=>ju.pattern.removeDuplicateSlashes(s))}function C3(t,e,r){let s=[],a=ju.pattern.getPatternsOutsideCurrentDirectory(t),n=ju.pattern.getPatternsInsideCurrentDirectory(t),c=w3(a),f=w3(n);return s.push(...B3(c,e,r)),"."in f?s.push(v3(".",n,e,r)):s.push(...B3(f,e,r)),s}Ko.convertPatternsToTasks=C3;function VAe(t){return ju.pattern.getPositivePatterns(t)}Ko.getPositivePatterns=VAe;function KAe(t,e){return ju.pattern.getNegativePatterns(t).concat(e).map(ju.pattern.convertToPositivePattern)}Ko.getNegativePatternsAsPositive=KAe;function w3(t){let e={};return t.reduce((r,s)=>{let a=ju.pattern.getBaseDirectory(s);return a in r?r[a].push(s):r[a]=[s],r},e)}Ko.groupPatternsByBaseDirectory=w3;function B3(t,e,r){return Object.keys(t).map(s=>v3(s,t[s],e,r))}Ko.convertPatternGroupsToTasks=B3;function v3(t,e,r,s){return{dynamic:s,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(ju.pattern.convertToNegativePattern))}}Ko.convertPatternGroupToTask=v3});var ZAe=L(nQ=>{"use strict";Object.defineProperty(nQ,"__esModule",{value:!0});nQ.read=void 0;function kft(t,e,r){e.fs.lstat(t,(s,a)=>{if(s!==null){zAe(r,s);return}if(!a.isSymbolicLink()||!e.followSymbolicLink){S3(r,a);return}e.fs.stat(t,(n,c)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){zAe(r,n);return}S3(r,a);return}e.markSymbolicLink&&(c.isSymbolicLink=()=>!0),S3(r,c)})})}nQ.read=kft;function zAe(t,e){t(e)}function S3(t,e){t(null,e)}});var XAe=L(iQ=>{"use strict";Object.defineProperty(iQ,"__esModule",{value:!0});iQ.read=void 0;function Qft(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let s=e.fs.statSync(t);return e.markSymbolicLink&&(s.isSymbolicLink=()=>!0),s}catch(s){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw s}}iQ.read=Qft});var $Ae=L(p0=>{"use strict";Object.defineProperty(p0,"__esModule",{value:!0});p0.createFileSystemAdapter=p0.FILE_SYSTEM_ADAPTER=void 0;var sQ=Ie("fs");p0.FILE_SYSTEM_ADAPTER={lstat:sQ.lstat,stat:sQ.stat,lstatSync:sQ.lstatSync,statSync:sQ.statSync};function Tft(t){return t===void 0?p0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},p0.FILE_SYSTEM_ADAPTER),t)}p0.createFileSystemAdapter=Tft});var epe=L(b3=>{"use strict";Object.defineProperty(b3,"__esModule",{value:!0});var Rft=$Ae(),D3=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Rft.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};b3.default=D3});var zd=L(h0=>{"use strict";Object.defineProperty(h0,"__esModule",{value:!0});h0.statSync=h0.stat=h0.Settings=void 0;var tpe=ZAe(),Fft=XAe(),P3=epe();h0.Settings=P3.default;function Nft(t,e,r){if(typeof e=="function"){tpe.read(t,x3(),e);return}tpe.read(t,x3(e),r)}h0.stat=Nft;function Oft(t,e){let r=x3(e);return Fft.read(t,r)}h0.statSync=Oft;function x3(t={}){return t instanceof P3.default?t:new P3.default(t)}});var ipe=L((nKt,npe)=>{var rpe;npe.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(rpe||(rpe=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var ope=L((iKt,spe)=>{spe.exports=Mft;var Lft=ipe();function Mft(t,e){let r,s,a,n=!0;Array.isArray(t)?(r=[],s=t.length):(a=Object.keys(t),r={},s=a.length);function c(p){function h(){e&&e(p,r),e=null}n?Lft(h):h()}function f(p,h,E){r[p]=E,(--s===0||h)&&c(h)}s?a?a.forEach(function(p){t[p](function(h,E){f(p,h,E)})}):t.forEach(function(p,h){p(function(E,C){f(h,E,C)})}):c(null),n=!1}});var k3=L(aQ=>{"use strict";Object.defineProperty(aQ,"__esModule",{value:!0});aQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var oQ=process.versions.node.split(".");if(oQ[0]===void 0||oQ[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var ape=Number.parseInt(oQ[0],10),_ft=Number.parseInt(oQ[1],10),lpe=10,Uft=10,Hft=ape>lpe,jft=ape===lpe&&_ft>=Uft;aQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Hft||jft});var cpe=L(lQ=>{"use strict";Object.defineProperty(lQ,"__esModule",{value:!0});lQ.createDirentFromStats=void 0;var Q3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function qft(t,e){return new Q3(t,e)}lQ.createDirentFromStats=qft});var T3=L(cQ=>{"use strict";Object.defineProperty(cQ,"__esModule",{value:!0});cQ.fs=void 0;var Gft=cpe();cQ.fs=Gft});var R3=L(uQ=>{"use strict";Object.defineProperty(uQ,"__esModule",{value:!0});uQ.joinPathSegments=void 0;function Wft(t,e,r){return t.endsWith(r)?t+e:t+r+e}uQ.joinPathSegments=Wft});var gpe=L(g0=>{"use strict";Object.defineProperty(g0,"__esModule",{value:!0});g0.readdir=g0.readdirWithFileTypes=g0.read=void 0;var Yft=zd(),upe=ope(),Vft=k3(),fpe=T3(),Ape=R3();function Kft(t,e,r){if(!e.stats&&Vft.IS_SUPPORT_READDIR_WITH_FILE_TYPES){ppe(t,e,r);return}hpe(t,e,r)}g0.read=Kft;function ppe(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(s,a)=>{if(s!==null){fQ(r,s);return}let n=a.map(f=>({dirent:f,name:f.name,path:Ape.joinPathSegments(t,f.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){F3(r,n);return}let c=n.map(f=>Jft(f,e));upe(c,(f,p)=>{if(f!==null){fQ(r,f);return}F3(r,p)})})}g0.readdirWithFileTypes=ppe;function Jft(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(s,a)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,t);return}t.dirent=fpe.fs.createDirentFromStats(t.name,a),r(null,t)})}}function hpe(t,e,r){e.fs.readdir(t,(s,a)=>{if(s!==null){fQ(r,s);return}let n=a.map(c=>{let f=Ape.joinPathSegments(t,c,e.pathSegmentSeparator);return p=>{Yft.stat(f,e.fsStatSettings,(h,E)=>{if(h!==null){p(h);return}let C={name:c,path:f,dirent:fpe.fs.createDirentFromStats(c,E)};e.stats&&(C.stats=E),p(null,C)})}});upe(n,(c,f)=>{if(c!==null){fQ(r,c);return}F3(r,f)})})}g0.readdir=hpe;function fQ(t,e){t(e)}function F3(t,e){t(null,e)}});var Ipe=L(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0});d0.readdir=d0.readdirWithFileTypes=d0.read=void 0;var zft=zd(),Zft=k3(),dpe=T3(),mpe=R3();function Xft(t,e){return!e.stats&&Zft.IS_SUPPORT_READDIR_WITH_FILE_TYPES?ype(t,e):Epe(t,e)}d0.read=Xft;function ype(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(s=>{let a={dirent:s,name:s.name,path:mpe.joinPathSegments(t,s.name,e.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let n=e.fs.statSync(a.path);a.dirent=dpe.fs.createDirentFromStats(a.name,n)}catch(n){if(e.throwErrorOnBrokenSymbolicLink)throw n}return a})}d0.readdirWithFileTypes=ype;function Epe(t,e){return e.fs.readdirSync(t).map(s=>{let a=mpe.joinPathSegments(t,s,e.pathSegmentSeparator),n=zft.statSync(a,e.fsStatSettings),c={name:s,path:a,dirent:dpe.fs.createDirentFromStats(s,n)};return e.stats&&(c.stats=n),c})}d0.readdir=Epe});var Cpe=L(m0=>{"use strict";Object.defineProperty(m0,"__esModule",{value:!0});m0.createFileSystemAdapter=m0.FILE_SYSTEM_ADAPTER=void 0;var ZE=Ie("fs");m0.FILE_SYSTEM_ADAPTER={lstat:ZE.lstat,stat:ZE.stat,lstatSync:ZE.lstatSync,statSync:ZE.statSync,readdir:ZE.readdir,readdirSync:ZE.readdirSync};function $ft(t){return t===void 0?m0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},m0.FILE_SYSTEM_ADAPTER),t)}m0.createFileSystemAdapter=$ft});var wpe=L(O3=>{"use strict";Object.defineProperty(O3,"__esModule",{value:!0});var eAt=Ie("path"),tAt=zd(),rAt=Cpe(),N3=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=rAt.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,eAt.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new tAt.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};O3.default=N3});var AQ=L(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});y0.Settings=y0.scandirSync=y0.scandir=void 0;var Bpe=gpe(),nAt=Ipe(),L3=wpe();y0.Settings=L3.default;function iAt(t,e,r){if(typeof e=="function"){Bpe.read(t,M3(),e);return}Bpe.read(t,M3(e),r)}y0.scandir=iAt;function sAt(t,e){let r=M3(e);return nAt.read(t,r)}y0.scandirSync=sAt;function M3(t={}){return t instanceof L3.default?t:new L3.default(t)}});var Spe=L((hKt,vpe)=>{"use strict";function oAt(t){var e=new t,r=e;function s(){var n=e;return n.next?e=n.next:(e=new t,r=e),n.next=null,n}function a(n){r.next=n,r=n}return{get:s,release:a}}vpe.exports=oAt});var bpe=L((gKt,_3)=>{"use strict";var aAt=Spe();function Dpe(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=aAt(lAt),a=null,n=null,c=0,f=null,p={push:R,drain:Tc,saturated:Tc,pause:E,paused:!1,get concurrency(){return r},set concurrency(Ae){if(!(Ae>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=Ae,!p.paused)for(;a&&c=r||p.paused?n?(n.next=me,n=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function N(Ae,ce){var me=s.get();me.context=t,me.release=U,me.value=Ae,me.callback=ce||Tc,me.errorHandler=f,c>=r||p.paused?a?(me.next=a,a=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function U(Ae){Ae&&s.release(Ae);var ce=a;ce&&c<=r?p.paused?c--:(n===a&&(n=null),a=ce.next,ce.next=null,e.call(t,ce.value,ce.worked),n===null&&p.empty()):--c===0&&p.drain()}function W(){a=null,n=null,p.drain=Tc}function te(){a=null,n=null,p.drain(),p.drain=Tc}function ie(Ae){f=Ae}}function Tc(){}function lAt(){this.value=null,this.callback=Tc,this.next=null,this.release=Tc,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,s){var a=t.callback,n=t.errorHandler,c=t.value;t.value=null,t.callback=Tc,t.errorHandler&&n(r,c),a.call(t.context,r,s),t.release(t)}}function cAt(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function s(E,C){e.call(this,E).then(function(S){C(null,S)},C)}var a=Dpe(t,s,r),n=a.push,c=a.unshift;return a.push=f,a.unshift=p,a.drained=h,a;function f(E){var C=new Promise(function(S,P){n(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(Tc),C}function p(E){var C=new Promise(function(S,P){c(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(Tc),C}function h(){if(a.idle())return new Promise(function(S){S()});var E=a.drain,C=new Promise(function(S){a.drain=function(){E(),S()}});return C}}_3.exports=Dpe;_3.exports.promise=cAt});var pQ=L(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.joinPathSegments=Xf.replacePathSegmentSeparator=Xf.isAppliedFilter=Xf.isFatalError=void 0;function uAt(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}Xf.isFatalError=uAt;function fAt(t,e){return t===null||t(e)}Xf.isAppliedFilter=fAt;function AAt(t,e){return t.split(/[/\\]/).join(e)}Xf.replacePathSegmentSeparator=AAt;function pAt(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}Xf.joinPathSegments=pAt});var j3=L(H3=>{"use strict";Object.defineProperty(H3,"__esModule",{value:!0});var hAt=pQ(),U3=class{constructor(e,r){this._root=e,this._settings=r,this._root=hAt.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};H3.default=U3});var W3=L(G3=>{"use strict";Object.defineProperty(G3,"__esModule",{value:!0});var gAt=Ie("events"),dAt=AQ(),mAt=bpe(),hQ=pQ(),yAt=j3(),q3=class extends yAt.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=dAt.scandir,this._emitter=new gAt.EventEmitter,this._queue=mAt(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let s={directory:e,base:r};this._queue.push(s,a=>{a!==null&&this._handleError(a)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(s,a)=>{if(s!==null){r(s,void 0);return}for(let n of a)this._handleEntry(n,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!hQ.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let s=e.path;r!==void 0&&(e.path=hQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),hQ.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&hQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};G3.default=q3});var Ppe=L(V3=>{"use strict";Object.defineProperty(V3,"__esModule",{value:!0});var EAt=W3(),Y3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new EAt.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{IAt(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{CAt(e,this._storage)}),this._reader.read()}};V3.default=Y3;function IAt(t,e){t(e)}function CAt(t,e){t(null,e)}});var xpe=L(J3=>{"use strict";Object.defineProperty(J3,"__esModule",{value:!0});var wAt=Ie("stream"),BAt=W3(),K3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new BAt.default(this._root,this._settings),this._stream=new wAt.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};J3.default=K3});var kpe=L(Z3=>{"use strict";Object.defineProperty(Z3,"__esModule",{value:!0});var vAt=AQ(),gQ=pQ(),SAt=j3(),z3=class extends SAt.default{constructor(){super(...arguments),this._scandir=vAt.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let s=this._scandir(e,this._settings.fsScandirSettings);for(let a of s)this._handleEntry(a,r)}catch(s){this._handleError(s)}}_handleError(e){if(gQ.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let s=e.path;r!==void 0&&(e.path=gQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),gQ.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&gQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};Z3.default=z3});var Qpe=L($3=>{"use strict";Object.defineProperty($3,"__esModule",{value:!0});var DAt=kpe(),X3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new DAt.default(this._root,this._settings)}read(){return this._reader.read()}};$3.default=X3});var Tpe=L(t8=>{"use strict";Object.defineProperty(t8,"__esModule",{value:!0});var bAt=Ie("path"),PAt=AQ(),e8=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,bAt.sep),this.fsScandirSettings=new PAt.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};t8.default=e8});var mQ=L($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.Settings=$f.walkStream=$f.walkSync=$f.walk=void 0;var Rpe=Ppe(),xAt=xpe(),kAt=Qpe(),r8=Tpe();$f.Settings=r8.default;function QAt(t,e,r){if(typeof e=="function"){new Rpe.default(t,dQ()).read(e);return}new Rpe.default(t,dQ(e)).read(r)}$f.walk=QAt;function TAt(t,e){let r=dQ(e);return new kAt.default(t,r).read()}$f.walkSync=TAt;function RAt(t,e){let r=dQ(e);return new xAt.default(t,r).read()}$f.walkStream=RAt;function dQ(t={}){return t instanceof r8.default?t:new r8.default(t)}});var yQ=L(i8=>{"use strict";Object.defineProperty(i8,"__esModule",{value:!0});var FAt=Ie("path"),NAt=zd(),Fpe=Qp(),n8=class{constructor(e){this._settings=e,this._fsStatSettings=new NAt.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return FAt.resolve(this._settings.cwd,e)}_makeEntry(e,r){let s={name:r,path:r,dirent:Fpe.fs.createDirentFromStats(r,e)};return this._settings.stats&&(s.stats=e),s}_isFatalError(e){return!Fpe.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};i8.default=n8});var a8=L(o8=>{"use strict";Object.defineProperty(o8,"__esModule",{value:!0});var OAt=Ie("stream"),LAt=zd(),MAt=mQ(),_At=yQ(),s8=class extends _At.default{constructor(){super(...arguments),this._walkStream=MAt.walkStream,this._stat=LAt.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let s=e.map(this._getFullEntryPath,this),a=new OAt.PassThrough({objectMode:!0});a._write=(n,c,f)=>this._getEntry(s[n],e[n],r).then(p=>{p!==null&&r.entryFilter(p)&&a.push(p),n===s.length-1&&a.end(),f()}).catch(f);for(let n=0;nthis._makeEntry(a,r)).catch(a=>{if(s.errorFilter(a))return null;throw a})}_getStat(e){return new Promise((r,s)=>{this._stat(e,this._fsStatSettings,(a,n)=>a===null?r(n):s(a))})}};o8.default=s8});var Npe=L(c8=>{"use strict";Object.defineProperty(c8,"__esModule",{value:!0});var UAt=mQ(),HAt=yQ(),jAt=a8(),l8=class extends HAt.default{constructor(){super(...arguments),this._walkAsync=UAt.walk,this._readerStream=new jAt.default(this._settings)}dynamic(e,r){return new Promise((s,a)=>{this._walkAsync(e,r,(n,c)=>{n===null?s(c):a(n)})})}async static(e,r){let s=[],a=this._readerStream.static(e,r);return new Promise((n,c)=>{a.once("error",c),a.on("data",f=>s.push(f)),a.once("end",()=>n(s))})}};c8.default=l8});var Ope=L(f8=>{"use strict";Object.defineProperty(f8,"__esModule",{value:!0});var qB=Qp(),u8=class{constructor(e,r,s){this._patterns=e,this._settings=r,this._micromatchOptions=s,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),s=this._splitSegmentsIntoSections(r);this._storage.push({complete:s.length<=1,pattern:e,segments:r,sections:s})}}_getPatternSegments(e){return qB.pattern.getPatternParts(e,this._micromatchOptions).map(s=>qB.pattern.isDynamicPattern(s,this._settings)?{dynamic:!0,pattern:s,patternRe:qB.pattern.makeRe(s,this._micromatchOptions)}:{dynamic:!1,pattern:s})}_splitSegmentsIntoSections(e){return qB.array.splitWhen(e,r=>r.dynamic&&qB.pattern.hasGlobStar(r.pattern))}};f8.default=u8});var Lpe=L(p8=>{"use strict";Object.defineProperty(p8,"__esModule",{value:!0});var qAt=Ope(),A8=class extends qAt.default{match(e){let r=e.split("/"),s=r.length,a=this._storage.filter(n=>!n.complete||n.segments.length>s);for(let n of a){let c=n.sections[0];if(!n.complete&&s>c.length||r.every((p,h)=>{let E=n.segments[h];return!!(E.dynamic&&E.patternRe.test(p)||!E.dynamic&&E.pattern===p)}))return!0}return!1}};p8.default=A8});var Mpe=L(g8=>{"use strict";Object.defineProperty(g8,"__esModule",{value:!0});var EQ=Qp(),GAt=Lpe(),h8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,s){let a=this._getMatcher(r),n=this._getNegativePatternsRe(s);return c=>this._filter(e,c,a,n)}_getMatcher(e){return new GAt.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(EQ.pattern.isAffectDepthOfReadingPattern);return EQ.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,s,a){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let n=EQ.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(n,s)?!1:this._isSkippedByNegativePatterns(n,a)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let s=r.split("/").length;if(e==="")return s;let a=e.split("/").length;return s-a}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!EQ.pattern.matchAny(e,r)}};g8.default=h8});var _pe=L(m8=>{"use strict";Object.defineProperty(m8,"__esModule",{value:!0});var Zd=Qp(),d8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let s=Zd.pattern.convertPatternsToRe(e,this._micromatchOptions),a=Zd.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return n=>this._filter(n,s,a)}_filter(e,r,s){let a=Zd.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(a)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(a,s))return!1;let n=e.dirent.isDirectory(),c=this._isMatchToPatterns(a,r,n)&&!this._isMatchToPatterns(a,s,n);return this._settings.unique&&c&&this._createIndexRecord(a),c}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let s=Zd.path.makeAbsolute(this._settings.cwd,e);return Zd.pattern.matchAny(s,r)}_isMatchToPatterns(e,r,s){let a=Zd.pattern.matchAny(e,r);return!a&&s?Zd.pattern.matchAny(e+"/",r):a}};m8.default=d8});var Upe=L(E8=>{"use strict";Object.defineProperty(E8,"__esModule",{value:!0});var WAt=Qp(),y8=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return WAt.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};E8.default=y8});var jpe=L(C8=>{"use strict";Object.defineProperty(C8,"__esModule",{value:!0});var Hpe=Qp(),I8=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Hpe.path.makeAbsolute(this._settings.cwd,r),r=Hpe.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};C8.default=I8});var IQ=L(B8=>{"use strict";Object.defineProperty(B8,"__esModule",{value:!0});var YAt=Ie("path"),VAt=Mpe(),KAt=_pe(),JAt=Upe(),zAt=jpe(),w8=class{constructor(e){this._settings=e,this.errorFilter=new JAt.default(this._settings),this.entryFilter=new KAt.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new VAt.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new zAt.default(this._settings)}_getRootDirectory(e){return YAt.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};B8.default=w8});var qpe=L(S8=>{"use strict";Object.defineProperty(S8,"__esModule",{value:!0});var ZAt=Npe(),XAt=IQ(),v8=class extends XAt.default{constructor(){super(...arguments),this._reader=new ZAt.default(this._settings)}async read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return(await this.api(r,e,s)).map(n=>s.transform(n))}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};S8.default=v8});var Gpe=L(b8=>{"use strict";Object.defineProperty(b8,"__esModule",{value:!0});var $At=Ie("stream"),ept=a8(),tpt=IQ(),D8=class extends tpt.default{constructor(){super(...arguments),this._reader=new ept.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e),a=this.api(r,e,s),n=new $At.Readable({objectMode:!0,read:()=>{}});return a.once("error",c=>n.emit("error",c)).on("data",c=>n.emit("data",s.transform(c))).once("end",()=>n.emit("end")),n.once("close",()=>a.destroy()),n}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};b8.default=D8});var Wpe=L(x8=>{"use strict";Object.defineProperty(x8,"__esModule",{value:!0});var rpt=zd(),npt=mQ(),ipt=yQ(),P8=class extends ipt.default{constructor(){super(...arguments),this._walkSync=npt.walkSync,this._statSync=rpt.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let s=[];for(let a of e){let n=this._getFullEntryPath(a),c=this._getEntry(n,a,r);c===null||!r.entryFilter(c)||s.push(c)}return s}_getEntry(e,r,s){try{let a=this._getStat(e);return this._makeEntry(a,r)}catch(a){if(s.errorFilter(a))return null;throw a}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};x8.default=P8});var Ype=L(Q8=>{"use strict";Object.defineProperty(Q8,"__esModule",{value:!0});var spt=Wpe(),opt=IQ(),k8=class extends opt.default{constructor(){super(...arguments),this._reader=new spt.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return this.api(r,e,s).map(s.transform)}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};Q8.default=k8});var Vpe=L($E=>{"use strict";Object.defineProperty($E,"__esModule",{value:!0});$E.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var XE=Ie("fs"),apt=Ie("os"),lpt=Math.max(apt.cpus().length,1);$E.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:XE.lstat,lstatSync:XE.lstatSync,stat:XE.stat,statSync:XE.statSync,readdir:XE.readdir,readdirSync:XE.readdirSync};var T8=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,lpt),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},$E.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};$E.default=T8});var CQ=L((UKt,Jpe)=>{"use strict";var Kpe=JAe(),cpt=qpe(),upt=Gpe(),fpt=Ype(),R8=Vpe(),Rc=Qp();async function F8(t,e){qu(t);let r=N8(t,cpt.default,e),s=await Promise.all(r);return Rc.array.flatten(s)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(h,E){qu(h);let C=N8(h,fpt.default,E);return Rc.array.flatten(C)}t.sync=e;function r(h,E){qu(h);let C=N8(h,upt.default,E);return Rc.stream.merge(C)}t.stream=r;function s(h,E){qu(h);let C=[].concat(h),S=new R8.default(E);return Kpe.generate(C,S)}t.generateTasks=s;function a(h,E){qu(h);let C=new R8.default(E);return Rc.pattern.isDynamicPattern(h,C)}t.isDynamicPattern=a;function n(h){return qu(h),Rc.path.escape(h)}t.escapePath=n;function c(h){return qu(h),Rc.path.convertPathToPattern(h)}t.convertPathToPattern=c;let f;(function(h){function E(S){return qu(S),Rc.path.escapePosixPath(S)}h.escapePath=E;function C(S){return qu(S),Rc.path.convertPosixPathToPattern(S)}h.convertPathToPattern=C})(f=t.posix||(t.posix={}));let p;(function(h){function E(S){return qu(S),Rc.path.escapeWindowsPath(S)}h.escapePath=E;function C(S){return qu(S),Rc.path.convertWindowsPathToPattern(S)}h.convertPathToPattern=C})(p=t.win32||(t.win32={}))})(F8||(F8={}));function N8(t,e,r){let s=[].concat(t),a=new R8.default(r),n=Kpe.generate(s,a),c=new e(a);return n.map(c.read,c)}function qu(t){if(![].concat(t).every(s=>Rc.string.isString(s)&&!Rc.string.isEmpty(s)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Jpe.exports=F8});var Nn={};Vt(Nn,{checksumFile:()=>BQ,checksumPattern:()=>vQ,makeHash:()=>fs});function fs(...t){let e=(0,wQ.createHash)("sha512"),r="";for(let s of t)typeof s=="string"?r+=s:s&&(r&&(e.update(r),r=""),e.update(s));return r&&e.update(r),e.digest("hex")}async function BQ(t,{baseFs:e,algorithm:r}={baseFs:le,algorithm:"sha512"}){let s=await e.openPromise(t,"r");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,wQ.createHash)(r),f=0;for(;(f=await e.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest("hex")}finally{await e.closePromise(s)}}async function vQ(t,{cwd:e}){let s=(await(0,O8.default)(t,{cwd:ue.fromPortablePath(e),onlyDirectories:!0})).map(f=>`${f}/**/*`),a=await(0,O8.default)([t,...s],{cwd:ue.fromPortablePath(e),onlyFiles:!1});a.sort();let n=await Promise.all(a.map(async f=>{let p=[Buffer.from(f)],h=K.join(e,ue.toPortablePath(f)),E=await le.lstatPromise(h);return E.isSymbolicLink()?p.push(Buffer.from(await le.readlinkPromise(h))):E.isFile()&&p.push(await le.readFilePromise(h)),p.join("\0")})),c=(0,wQ.createHash)("sha512");for(let f of n)c.update(f);return c.digest("hex")}var wQ,O8,E0=Ct(()=>{bt();wQ=Ie("crypto"),O8=et(CQ())});var q={};Vt(q,{allPeerRequests:()=>XB,areDescriptorsEqual:()=>ehe,areIdentsEqual:()=>VB,areLocatorsEqual:()=>KB,areVirtualPackagesEquivalent:()=>Ipt,bindDescriptor:()=>ypt,bindLocator:()=>Ept,convertDescriptorToLocator:()=>SQ,convertLocatorToDescriptor:()=>M8,convertPackageToLocator:()=>gpt,convertToIdent:()=>hpt,convertToManifestRange:()=>kpt,copyPackage:()=>WB,devirtualizeDescriptor:()=>YB,devirtualizeLocator:()=>tI,ensureDevirtualizedDescriptor:()=>dpt,ensureDevirtualizedLocator:()=>mpt,getIdentVendorPath:()=>j8,isPackageCompatible:()=>kQ,isVirtualDescriptor:()=>Tp,isVirtualLocator:()=>Gu,makeDescriptor:()=>On,makeIdent:()=>ba,makeLocator:()=>Vs,makeRange:()=>PQ,parseDescriptor:()=>I0,parseFileStyleRange:()=>Ppt,parseIdent:()=>Da,parseLocator:()=>Rp,parseRange:()=>Xd,prettyDependent:()=>h3,prettyDescriptor:()=>ni,prettyIdent:()=>es,prettyLocator:()=>Yr,prettyLocatorNoColors:()=>p3,prettyRange:()=>nI,prettyReference:()=>zB,prettyResolution:()=>jB,prettyWorkspace:()=>ZB,renamePackage:()=>_8,slugifyIdent:()=>L8,slugifyLocator:()=>rI,sortDescriptors:()=>iI,stringifyDescriptor:()=>ll,stringifyIdent:()=>cn,stringifyLocator:()=>cl,tryParseDescriptor:()=>JB,tryParseIdent:()=>the,tryParseLocator:()=>bQ,tryParseRange:()=>bpt,unwrapIdentFromScope:()=>Tpt,virtualizeDescriptor:()=>U8,virtualizePackage:()=>H8,wrapIdentIntoScope:()=>Qpt});function ba(t,e){if(t?.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:fs(t,e),scope:t,name:e}}function On(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:fs(t.identHash,e),range:e}}function Vs(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:fs(t.identHash,e),reference:e}}function hpt(t){return{identHash:t.identHash,scope:t.scope,name:t.name}}function SQ(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.descriptorHash,reference:t.range}}function M8(t){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:t.locatorHash,range:t.reference}}function gpt(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference}}function _8(t,e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference,version:t.version,languageName:t.languageName,linkType:t.linkType,conditions:t.conditions,dependencies:new Map(t.dependencies),peerDependencies:new Map(t.peerDependencies),dependenciesMeta:new Map(t.dependenciesMeta),peerDependenciesMeta:new Map(t.peerDependenciesMeta),bin:new Map(t.bin)}}function WB(t){return _8(t,t)}function U8(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return On(t,`virtual:${e}#${t.range}`)}function H8(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return _8(t,Vs(t,`virtual:${e}#${t.reference}`))}function Tp(t){return t.range.startsWith(GB)}function Gu(t){return t.reference.startsWith(GB)}function YB(t){if(!Tp(t))throw new Error("Not a virtual descriptor");return On(t,t.range.replace(DQ,""))}function tI(t){if(!Gu(t))throw new Error("Not a virtual descriptor");return Vs(t,t.reference.replace(DQ,""))}function dpt(t){return Tp(t)?On(t,t.range.replace(DQ,"")):t}function mpt(t){return Gu(t)?Vs(t,t.reference.replace(DQ,"")):t}function ypt(t,e){return t.range.includes("::")?t:On(t,`${t.range}::${eI.default.stringify(e)}`)}function Ept(t,e){return t.reference.includes("::")?t:Vs(t,`${t.reference}::${eI.default.stringify(e)}`)}function VB(t,e){return t.identHash===e.identHash}function ehe(t,e){return t.descriptorHash===e.descriptorHash}function KB(t,e){return t.locatorHash===e.locatorHash}function Ipt(t,e){if(!Gu(t))throw new Error("Invalid package type");if(!Gu(e))throw new Error("Invalid package type");if(!VB(t,e)||t.dependencies.size!==e.dependencies.size)return!1;for(let r of t.dependencies.values()){let s=e.dependencies.get(r.identHash);if(!s||!ehe(r,s))return!1}return!0}function Da(t){let e=the(t);if(!e)throw new Error(`Invalid ident (${t})`);return e}function the(t){let e=t.match(Cpt);if(!e)return null;let[,r,s]=e;return ba(typeof r<"u"?r:null,s)}function I0(t,e=!1){let r=JB(t,e);if(!r)throw new Error(`Invalid descriptor (${t})`);return r}function JB(t,e=!1){let r=e?t.match(wpt):t.match(Bpt);if(!r)return null;let[,s,a,n]=r;if(n==="unknown")throw new Error(`Invalid range (${t})`);let c=typeof s<"u"?s:null,f=typeof n<"u"?n:"unknown";return On(ba(c,a),f)}function Rp(t,e=!1){let r=bQ(t,e);if(!r)throw new Error(`Invalid locator (${t})`);return r}function bQ(t,e=!1){let r=e?t.match(vpt):t.match(Spt);if(!r)return null;let[,s,a,n]=r;if(n==="unknown")throw new Error(`Invalid reference (${t})`);let c=typeof s<"u"?s:null,f=typeof n<"u"?n:"unknown";return Vs(ba(c,a),f)}function Xd(t,e){let r=t.match(Dpt);if(r===null)throw new Error(`Invalid range (${t})`);let s=typeof r[1]<"u"?r[1]:null;if(typeof e?.requireProtocol=="string"&&s!==e.requireProtocol)throw new Error(`Invalid protocol (${s})`);if(e?.requireProtocol&&s===null)throw new Error(`Missing protocol (${s})`);let a=typeof r[3]<"u"?decodeURIComponent(r[2]):null;if(e?.requireSource&&a===null)throw new Error(`Missing source (${t})`);let n=typeof r[3]<"u"?decodeURIComponent(r[3]):decodeURIComponent(r[2]),c=e?.parseSelector?eI.default.parse(n):n,f=typeof r[4]<"u"?eI.default.parse(r[4]):null;return{protocol:s,source:a,selector:c,params:f}}function bpt(t,e){try{return Xd(t,e)}catch{return null}}function Ppt(t,{protocol:e}){let{selector:r,params:s}=Xd(t,{requireProtocol:e,requireBindings:!0});if(typeof s.locator!="string")throw new Error(`Assertion failed: Invalid bindings for ${t}`);return{parentLocator:Rp(s.locator,!0),path:r}}function zpe(t){return t=t.replaceAll("%","%25"),t=t.replaceAll(":","%3A"),t=t.replaceAll("#","%23"),t}function xpt(t){return t===null?!1:Object.entries(t).length>0}function PQ({protocol:t,source:e,selector:r,params:s}){let a="";return t!==null&&(a+=`${t}`),e!==null&&(a+=`${zpe(e)}#`),a+=zpe(r),xpt(s)&&(a+=`::${eI.default.stringify(s)}`),a}function kpt(t){let{params:e,protocol:r,source:s,selector:a}=Xd(t);for(let n in e)n.startsWith("__")&&delete e[n];return PQ({protocol:r,source:s,params:e,selector:a})}function cn(t){return t.scope?`@${t.scope}/${t.name}`:`${t.name}`}function Qpt(t,e){return t.scope?ba(e,`${t.scope}__${t.name}`):ba(e,t.name)}function Tpt(t,e){if(t.scope!==e)return t;let r=t.name.indexOf("__");if(r===-1)return ba(null,t.name);let s=t.name.slice(0,r),a=t.name.slice(r+2);return ba(s,a)}function ll(t){return t.scope?`@${t.scope}/${t.name}@${t.range}`:`${t.name}@${t.range}`}function cl(t){return t.scope?`@${t.scope}/${t.name}@${t.reference}`:`${t.name}@${t.reference}`}function L8(t){return t.scope!==null?`@${t.scope}-${t.name}`:t.name}function rI(t){let{protocol:e,selector:r}=Xd(t.reference),s=e!==null?e.replace(Rpt,""):"exotic",a=Zpe.default.valid(r),n=a!==null?`${s}-${a}`:`${s}`,c=10;return t.scope?`${L8(t)}-${n}-${t.locatorHash.slice(0,c)}`:`${L8(t)}-${n}-${t.locatorHash.slice(0,c)}`}function es(t,e){return e.scope?`${Ut(t,`@${e.scope}/`,pt.SCOPE)}${Ut(t,e.name,pt.NAME)}`:`${Ut(t,e.name,pt.NAME)}`}function xQ(t){if(t.startsWith(GB)){let e=xQ(t.substring(t.indexOf("#")+1)),r=t.substring(GB.length,GB.length+Apt);return`${e} [${r}]`}else return t.replace(Fpt,"?[...]")}function nI(t,e){return`${Ut(t,xQ(e),pt.RANGE)}`}function ni(t,e){return`${es(t,e)}${Ut(t,"@",pt.RANGE)}${nI(t,e.range)}`}function zB(t,e){return`${Ut(t,xQ(e),pt.REFERENCE)}`}function Yr(t,e){return`${es(t,e)}${Ut(t,"@",pt.REFERENCE)}${zB(t,e.reference)}`}function p3(t){return`${cn(t)}@${xQ(t.reference)}`}function iI(t){return Ys(t,[e=>cn(e),e=>e.range])}function ZB(t,e){return es(t,e.anchoredLocator)}function jB(t,e,r){let s=Tp(e)?YB(e):e;return r===null?`${ni(t,s)} \u2192 ${A3(t).Cross}`:s.identHash===r.identHash?`${ni(t,s)} \u2192 ${zB(t,r.reference)}`:`${ni(t,s)} \u2192 ${Yr(t,r)}`}function h3(t,e,r){return r===null?`${Yr(t,e)}`:`${Yr(t,e)} (via ${nI(t,r.range)})`}function j8(t){return`node_modules/${cn(t)}`}function kQ(t,e){return t.conditions?ppt(t.conditions,r=>{let[,s,a]=r.match($pe),n=e[s];return n?n.includes(a):!0}):!0}function XB(t){let e=new Set;if("children"in t)e.add(t);else for(let r of t.requests.values())e.add(r);for(let r of e)for(let s of r.children.values())e.add(s);return e}var eI,Zpe,Xpe,GB,Apt,$pe,ppt,DQ,Cpt,wpt,Bpt,vpt,Spt,Dpt,Rpt,Fpt,Yo=Ct(()=>{eI=et(Ie("querystring")),Zpe=et(Ai()),Xpe=et(Wse());Qc();E0();kc();Yo();GB="virtual:",Apt=5,$pe=/(os|cpu|libc)=([a-z0-9_-]+)/,ppt=(0,Xpe.makeParser)($pe);DQ=/^[^#]*#/;Cpt=/^(?:@([^/]+?)\/)?([^@/]+)$/;wpt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/,Bpt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/;vpt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/,Spt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/;Dpt=/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/;Rpt=/:$/;Fpt=/\?.*/});var rhe,nhe=Ct(()=>{Yo();rhe={hooks:{reduceDependency:(t,e,r,s,{resolver:a,resolveOptions:n})=>{for(let{pattern:c,reference:f}of e.topLevelWorkspace.manifest.resolutions){if(c.from&&(c.from.fullName!==cn(r)||e.configuration.normalizeLocator(Vs(Da(c.from.fullName),c.from.description??r.reference)).locatorHash!==r.locatorHash)||c.descriptor.fullName!==cn(t)||e.configuration.normalizeDependency(On(Rp(c.descriptor.fullName),c.descriptor.description??t.range)).descriptorHash!==t.descriptorHash)continue;return a.bindDescriptor(e.configuration.normalizeDependency(On(t,f)),e.topLevelWorkspace.anchoredLocator,n)}return t},validateProject:async(t,e)=>{for(let r of t.workspaces){let s=ZB(t.configuration,r);await t.configuration.triggerHook(a=>a.validateWorkspace,r,{reportWarning:(a,n)=>e.reportWarning(a,`${s}: ${n}`),reportError:(a,n)=>e.reportError(a,`${s}: ${n}`)})}},validateWorkspace:async(t,e)=>{let{manifest:r}=t;r.resolutions.length&&t.cwd!==t.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(let s of r.errors)e.reportWarning(57,s.message)}}}});var Ei,$d=Ct(()=>{Ei=class t{static{this.protocol="workspace:"}supportsDescriptor(e,r){return!!(e.range.startsWith(t.protocol)||r.project.tryWorkspaceByDescriptor(e)!==null)}supportsLocator(e,r){return!!e.reference.startsWith(t.protocol)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[s.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.getWorkspaceByCwd(e.reference.slice(t.protocol.length));return{...e,version:s.manifest.version||"0.0.0",languageName:"unknown",linkType:"SOFT",conditions:null,dependencies:r.project.configuration.normalizeDependencyMap(new Map([...s.manifest.dependencies,...s.manifest.devDependencies])),peerDependencies:new Map([...s.manifest.peerDependencies]),dependenciesMeta:s.manifest.dependenciesMeta,peerDependenciesMeta:s.manifest.peerDependenciesMeta,bin:s.manifest.bin}}}});var Or={};Vt(Or,{SemVer:()=>lhe.SemVer,clean:()=>Opt,getComparator:()=>ohe,mergeComparators:()=>q8,satisfiesWithPrereleases:()=>eA,simplifyRanges:()=>G8,stringifyComparator:()=>ahe,validRange:()=>ul});function eA(t,e,r=!1){if(!t)return!1;let s=`${e}${r}`,a=ihe.get(s);if(typeof a>"u")try{a=new Fp.default.Range(e,{includePrerelease:!0,loose:r})}catch{return!1}finally{ihe.set(s,a||null)}else if(a===null)return!1;let n;try{n=new Fp.default.SemVer(t,a)}catch{return!1}return a.test(n)?!0:(n.prerelease&&(n.prerelease=[]),a.set.some(c=>{for(let f of c)f.semver.prerelease&&(f.semver.prerelease=[]);return c.every(f=>f.test(n))}))}function ul(t){if(t.indexOf(":")!==-1)return null;let e=she.get(t);if(typeof e<"u")return e;try{e=new Fp.default.Range(t)}catch{e=null}return she.set(t,e),e}function Opt(t){let e=Npt.exec(t);return e?e[1]:null}function ohe(t){if(t.semver===Fp.default.Comparator.ANY)return{gt:null,lt:null};switch(t.operator){case"":return{gt:[">=",t.semver],lt:["<=",t.semver]};case">":case">=":return{gt:[t.operator,t.semver],lt:null};case"<":case"<=":return{gt:null,lt:[t.operator,t.semver]};default:throw new Error(`Assertion failed: Unexpected comparator operator (${t.operator})`)}}function q8(t){if(t.length===0)return null;let e=null,r=null;for(let s of t){if(s.gt){let a=e!==null?Fp.default.compare(s.gt[1],e[1]):null;(a===null||a>0||a===0&&s.gt[0]===">")&&(e=s.gt)}if(s.lt){let a=r!==null?Fp.default.compare(s.lt[1],r[1]):null;(a===null||a<0||a===0&&s.lt[0]==="<")&&(r=s.lt)}}if(e&&r){let s=Fp.default.compare(e[1],r[1]);if(s===0&&(e[0]===">"||r[0]==="<")||s>0)return null}return{gt:e,lt:r}}function ahe(t){if(t.gt&&t.lt){if(t.gt[0]===">="&&t.lt[0]==="<="&&t.gt[1].version===t.lt[1].version)return t.gt[1].version;if(t.gt[0]===">="&&t.lt[0]==="<"){if(t.lt[1].version===`${t.gt[1].major+1}.0.0-0`)return`^${t.gt[1].version}`;if(t.lt[1].version===`${t.gt[1].major}.${t.gt[1].minor+1}.0-0`)return`~${t.gt[1].version}`}}let e=[];return t.gt&&e.push(t.gt[0]+t.gt[1].version),t.lt&&e.push(t.lt[0]+t.lt[1].version),e.length?e.join(" "):"*"}function G8(t){let e=t.map(Lpt).map(s=>ul(s).set.map(a=>a.map(n=>ohe(n)))),r=e.shift().map(s=>q8(s)).filter(s=>s!==null);for(let s of e){let a=[];for(let n of r)for(let c of s){let f=q8([n,...c]);f!==null&&a.push(f)}r=a}return r.length===0?null:r.map(s=>ahe(s)).join(" || ")}function Lpt(t){let e=t.split("||");if(e.length>1){let r=new Set;for(let s of e)e.some(a=>a!==s&&Fp.default.subset(s,a))||r.add(s);if(r.size{Fp=et(Ai()),lhe=et(Ai()),ihe=new Map;she=new Map;Npt=/^(?:[\sv=]*?)((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\s*)$/});function che(t){let e=t.match(/^[ \t]+/m);return e?e[0]:" "}function uhe(t){return t.charCodeAt(0)===65279?t.slice(1):t}function Pa(t){return t.replace(/\\/g,"/")}function QQ(t,{yamlCompatibilityMode:e}){return e?s3(t):typeof t>"u"||typeof t=="boolean"?t:null}function fhe(t,e){let r=e.search(/[^!]/);if(r===-1)return"invalid";let s=r%2===0?"":"!",a=e.slice(r);return`${s}${t}=${a}`}function W8(t,e){return e.length===1?fhe(t,e[0]):`(${e.map(r=>fhe(t,r)).join(" | ")})`}var Ahe,Ht,sI=Ct(()=>{bt();Bc();Ahe=et(Ai());$d();kc();Np();Yo();Ht=class t{constructor(){this.indent=" ";this.name=null;this.version=null;this.os=null;this.cpu=null;this.libc=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static{this.fileName="package.json"}static{this.allDependencies=["dependencies","devDependencies","peerDependencies"]}static{this.hardDependencies=["dependencies","devDependencies"]}static async tryFind(e,{baseFs:r=new Yn}={}){let s=K.join(e,"package.json");try{return await t.fromFile(s,{baseFs:r})}catch(a){if(a.code==="ENOENT")return null;throw a}}static async find(e,{baseFs:r}={}){let s=await t.tryFind(e,{baseFs:r});if(s===null)throw new Error("Manifest not found");return s}static async fromFile(e,{baseFs:r=new Yn}={}){let s=new t;return await s.loadFile(e,{baseFs:r}),s}static fromText(e){let r=new t;return r.loadFromText(e),r}loadFromText(e){let r;try{r=JSON.parse(uhe(e)||"{}")}catch(s){throw s.message+=` (when parsing ${e})`,s}this.load(r),this.indent=che(e)}async loadFile(e,{baseFs:r=new Yn}){let s=await r.readFilePromise(e,"utf8"),a;try{a=JSON.parse(uhe(s)||"{}")}catch(n){throw n.message+=` (when parsing ${e})`,n}this.load(a),this.indent=che(s)}load(e,{yamlCompatibilityMode:r=!1}={}){if(typeof e!="object"||e===null)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;let s=[];if(this.name=null,typeof e.name=="string")try{this.name=Da(e.name)}catch{s.push(new Error("Parsing failed for the 'name' field"))}if(typeof e.version=="string"?this.version=e.version:this.version=null,Array.isArray(e.os)){let n=[];this.os=n;for(let c of e.os)typeof c!="string"?s.push(new Error("Parsing failed for the 'os' field")):n.push(c)}else this.os=null;if(Array.isArray(e.cpu)){let n=[];this.cpu=n;for(let c of e.cpu)typeof c!="string"?s.push(new Error("Parsing failed for the 'cpu' field")):n.push(c)}else this.cpu=null;if(Array.isArray(e.libc)){let n=[];this.libc=n;for(let c of e.libc)typeof c!="string"?s.push(new Error("Parsing failed for the 'libc' field")):n.push(c)}else this.libc=null;if(typeof e.type=="string"?this.type=e.type:this.type=null,typeof e.packageManager=="string"?this.packageManager=e.packageManager:this.packageManager=null,typeof e.private=="boolean"?this.private=e.private:this.private=!1,typeof e.license=="string"?this.license=e.license:this.license=null,typeof e.languageName=="string"?this.languageName=e.languageName:this.languageName=null,typeof e.main=="string"?this.main=Pa(e.main):this.main=null,typeof e.module=="string"?this.module=Pa(e.module):this.module=null,e.browser!=null)if(typeof e.browser=="string")this.browser=Pa(e.browser);else{this.browser=new Map;for(let[n,c]of Object.entries(e.browser))this.browser.set(Pa(n),typeof c=="string"?Pa(c):c)}else this.browser=null;if(this.bin=new Map,typeof e.bin=="string")e.bin.trim()===""?s.push(new Error("Invalid bin field")):this.name!==null?this.bin.set(this.name.name,Pa(e.bin)):s.push(new Error("String bin field, but no attached package name"));else if(typeof e.bin=="object"&&e.bin!==null)for(let[n,c]of Object.entries(e.bin)){if(typeof c!="string"||c.trim()===""){s.push(new Error(`Invalid bin definition for '${n}'`));continue}let f=Da(n);this.bin.set(f.name,Pa(c))}if(this.scripts=new Map,typeof e.scripts=="object"&&e.scripts!==null)for(let[n,c]of Object.entries(e.scripts)){if(typeof c!="string"){s.push(new Error(`Invalid script definition for '${n}'`));continue}this.scripts.set(n,c)}if(this.dependencies=new Map,typeof e.dependencies=="object"&&e.dependencies!==null)for(let[n,c]of Object.entries(e.dependencies)){if(typeof c!="string"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p)}if(this.devDependencies=new Map,typeof e.devDependencies=="object"&&e.devDependencies!==null)for(let[n,c]of Object.entries(e.devDependencies)){if(typeof c!="string"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.devDependencies.set(p.identHash,p)}if(this.peerDependencies=new Map,typeof e.peerDependencies=="object"&&e.peerDependencies!==null)for(let[n,c]of Object.entries(e.peerDependencies)){let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}(typeof c!="string"||!c.startsWith(Ei.protocol)&&!ul(c))&&(s.push(new Error(`Invalid dependency range for '${n}'`)),c="*");let p=On(f,c);this.peerDependencies.set(p.identHash,p)}typeof e.workspaces=="object"&&e.workspaces!==null&&e.workspaces.nohoist&&s.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));let a=Array.isArray(e.workspaces)?e.workspaces:typeof e.workspaces=="object"&&e.workspaces!==null&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];this.workspaceDefinitions=[];for(let n of a){if(typeof n!="string"){s.push(new Error(`Invalid workspace definition for '${n}'`));continue}this.workspaceDefinitions.push({pattern:n})}if(this.dependenciesMeta=new Map,typeof e.dependenciesMeta=="object"&&e.dependenciesMeta!==null)for(let[n,c]of Object.entries(e.dependenciesMeta)){if(typeof c!="object"||c===null){s.push(new Error(`Invalid meta field for '${n}`));continue}let f=I0(n),p=this.ensureDependencyMeta(f),h=QQ(c.built,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid built meta field for '${n}'`));continue}let E=QQ(c.optional,{yamlCompatibilityMode:r});if(E===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}let C=QQ(c.unplugged,{yamlCompatibilityMode:r});if(C===null){s.push(new Error(`Invalid unplugged meta field for '${n}'`));continue}Object.assign(p,{built:h,optional:E,unplugged:C})}if(this.peerDependenciesMeta=new Map,typeof e.peerDependenciesMeta=="object"&&e.peerDependenciesMeta!==null)for(let[n,c]of Object.entries(e.peerDependenciesMeta)){if(typeof c!="object"||c===null){s.push(new Error(`Invalid meta field for '${n}'`));continue}let f=I0(n),p=this.ensurePeerDependencyMeta(f),h=QQ(c.optional,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}Object.assign(p,{optional:h})}if(this.resolutions=[],typeof e.resolutions=="object"&&e.resolutions!==null)for(let[n,c]of Object.entries(e.resolutions)){if(typeof c!="string"){s.push(new Error(`Invalid resolution entry for '${n}'`));continue}try{this.resolutions.push({pattern:Cx(n),reference:c})}catch(f){s.push(f);continue}}if(Array.isArray(e.files)){this.files=new Set;for(let n of e.files){if(typeof n!="string"){s.push(new Error(`Invalid files entry for '${n}'`));continue}this.files.add(n)}}else this.files=null;if(typeof e.publishConfig=="object"&&e.publishConfig!==null){if(this.publishConfig={},typeof e.publishConfig.access=="string"&&(this.publishConfig.access=e.publishConfig.access),typeof e.publishConfig.main=="string"&&(this.publishConfig.main=Pa(e.publishConfig.main)),typeof e.publishConfig.module=="string"&&(this.publishConfig.module=Pa(e.publishConfig.module)),e.publishConfig.browser!=null)if(typeof e.publishConfig.browser=="string")this.publishConfig.browser=Pa(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[n,c]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(Pa(n),typeof c=="string"?Pa(c):c)}if(typeof e.publishConfig.registry=="string"&&(this.publishConfig.registry=e.publishConfig.registry),typeof e.publishConfig.provenance=="boolean"&&(this.publishConfig.provenance=e.publishConfig.provenance),typeof e.publishConfig.bin=="string")this.name!==null?this.publishConfig.bin=new Map([[this.name.name,Pa(e.publishConfig.bin)]]):s.push(new Error("String bin field, but no attached package name"));else if(typeof e.publishConfig.bin=="object"&&e.publishConfig.bin!==null){this.publishConfig.bin=new Map;for(let[n,c]of Object.entries(e.publishConfig.bin)){if(typeof c!="string"){s.push(new Error(`Invalid bin definition for '${n}'`));continue}this.publishConfig.bin.set(n,Pa(c))}}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let n of e.publishConfig.executableFiles){if(typeof n!="string"){s.push(new Error("Invalid executable file definition"));continue}this.publishConfig.executableFiles.add(Pa(n))}}}else this.publishConfig=null;if(typeof e.installConfig=="object"&&e.installConfig!==null){this.installConfig={};for(let n of Object.keys(e.installConfig))n==="hoistingLimits"?typeof e.installConfig.hoistingLimits=="string"?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:s.push(new Error("Invalid hoisting limits definition")):n=="selfReferences"?typeof e.installConfig.selfReferences=="boolean"?this.installConfig.selfReferences=e.installConfig.selfReferences:s.push(new Error("Invalid selfReferences definition, must be a boolean value")):s.push(new Error(`Unrecognized installConfig key: ${n}`))}else this.installConfig=null;if(typeof e.optionalDependencies=="object"&&e.optionalDependencies!==null)for(let[n,c]of Object.entries(e.optionalDependencies)){if(typeof c!="string"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p);let h=On(f,"unknown"),E=this.ensureDependencyMeta(h);Object.assign(E,{optional:!0})}typeof e.preferUnplugged=="boolean"?this.preferUnplugged=e.preferUnplugged:this.preferUnplugged=null,this.errors=s}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!(this.dependencies.has(e.identHash)||this.peerDependencies.has(e.identHash))}hasHardDependency(e){return!!(this.dependencies.has(e.identHash)||this.devDependencies.has(e.identHash))}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!(this.hasHardDependency(e)||this.hasSoftDependency(e))}getConditions(){let e=[];return this.os&&this.os.length>0&&e.push(W8("os",this.os)),this.cpu&&this.cpu.length>0&&e.push(W8("cpu",this.cpu)),this.libc&&this.libc.length>0&&e.push(W8("libc",this.libc)),e.length>0?e.join(" & "):null}ensureDependencyMeta(e){if(e.range!=="unknown"&&!Ahe.default.valid(e.range))throw new Error(`Invalid meta field range for '${ll(e)}'`);let r=cn(e),s=e.range!=="unknown"?e.range:null,a=this.dependenciesMeta.get(r);a||this.dependenciesMeta.set(r,a=new Map);let n=a.get(s);return n||a.set(s,n={}),n}ensurePeerDependencyMeta(e){if(e.range!=="unknown")throw new Error(`Invalid meta field range for '${ll(e)}'`);let r=cn(e),s=this.peerDependenciesMeta.get(r);return s||this.peerDependenciesMeta.set(r,s={}),s}setRawField(e,r,{after:s=[]}={}){let a=new Set(s.filter(n=>Object.hasOwn(this.raw,n)));if(a.size===0||Object.hasOwn(this.raw,e))this.raw[e]=r;else{let n=this.raw,c=this.raw={},f=!1;for(let p of Object.keys(n))c[p]=n[p],f||(a.delete(p),a.size===0&&(c[e]=r,f=!0))}}exportTo(e,{compatibilityMode:r=!0}={}){if(Object.assign(e,this.raw),this.name!==null?e.name=cn(this.name):delete e.name,this.version!==null?e.version=this.version:delete e.version,this.os!==null?e.os=this.os:delete e.os,this.cpu!==null?e.cpu=this.cpu:delete e.cpu,this.type!==null?e.type=this.type:delete e.type,this.packageManager!==null?e.packageManager=this.packageManager:delete e.packageManager,this.private?e.private=!0:delete e.private,this.license!==null?e.license=this.license:delete e.license,this.languageName!==null?e.languageName=this.languageName:delete e.languageName,this.main!==null?e.main=this.main:delete e.main,this.module!==null?e.module=this.module:delete e.module,this.browser!==null){let n=this.browser;typeof n=="string"?e.browser=n:n instanceof Map&&(e.browser=Object.assign({},...Array.from(n.keys()).sort().map(c=>({[c]:n.get(c)}))))}else delete e.browser;this.bin.size===1&&this.name!==null&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(n=>({[n]:this.bin.get(n)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:n})=>n)}:e.workspaces=this.workspaceDefinitions.map(({pattern:n})=>n):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;let s=[],a=[];for(let n of this.dependencies.values()){let c=this.dependenciesMeta.get(cn(n)),f=!1;if(r&&c){let p=c.get(null);p&&p.optional&&(f=!0)}f?a.push(n):s.push(n)}s.length>0?e.dependencies=Object.assign({},...iI(s).map(n=>({[cn(n)]:n.range}))):delete e.dependencies,a.length>0?e.optionalDependencies=Object.assign({},...iI(a).map(n=>({[cn(n)]:n.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...iI(this.devDependencies.values()).map(n=>({[cn(n)]:n.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...iI(this.peerDependencies.values()).map(n=>({[cn(n)]:n.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(let[n,c]of Ys(this.dependenciesMeta.entries(),([f,p])=>f))for(let[f,p]of Ys(c.entries(),([h,E])=>h!==null?`0${h}`:"1")){let h=f!==null?ll(On(Da(n),f)):n,E={...p};r&&f===null&&delete E.optional,Object.keys(E).length!==0&&(e.dependenciesMeta[h]=E)}if(Object.keys(e.dependenciesMeta).length===0&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...Ys(this.peerDependenciesMeta.entries(),([n,c])=>n).map(([n,c])=>({[n]:c}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:n,reference:c})=>({[wx(n)]:c}))):delete e.resolutions,this.files!==null?e.files=Array.from(this.files):delete e.files,this.preferUnplugged!==null?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,this.scripts!==null&&this.scripts.size>0){e.scripts??={};for(let n of Object.keys(e.scripts))this.scripts.has(n)||delete e.scripts[n];for(let[n,c]of this.scripts.entries())e.scripts[n]=c}else delete e.scripts;return e}}});var hhe=L((tJt,phe)=>{var Mpt=Pc(),_pt=function(){return Mpt.Date.now()};phe.exports=_pt});var dhe=L((rJt,ghe)=>{var Upt=/\s/;function Hpt(t){for(var e=t.length;e--&&Upt.test(t.charAt(e)););return e}ghe.exports=Hpt});var yhe=L((nJt,mhe)=>{var jpt=dhe(),qpt=/^\s+/;function Gpt(t){return t&&t.slice(0,jpt(t)+1).replace(qpt,"")}mhe.exports=Gpt});var oI=L((iJt,Ehe)=>{var Wpt=Wd(),Ypt=zf(),Vpt="[object Symbol]";function Kpt(t){return typeof t=="symbol"||Ypt(t)&&Wpt(t)==Vpt}Ehe.exports=Kpt});var Bhe=L((sJt,whe)=>{var Jpt=yhe(),Ihe=Wl(),zpt=oI(),Che=NaN,Zpt=/^[-+]0x[0-9a-f]+$/i,Xpt=/^0b[01]+$/i,$pt=/^0o[0-7]+$/i,eht=parseInt;function tht(t){if(typeof t=="number")return t;if(zpt(t))return Che;if(Ihe(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ihe(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Jpt(t);var r=Xpt.test(t);return r||$pt.test(t)?eht(t.slice(2),r?2:8):Zpt.test(t)?Che:+t}whe.exports=tht});var Dhe=L((oJt,She)=>{var rht=Wl(),Y8=hhe(),vhe=Bhe(),nht="Expected a function",iht=Math.max,sht=Math.min;function oht(t,e,r){var s,a,n,c,f,p,h=0,E=!1,C=!1,S=!0;if(typeof t!="function")throw new TypeError(nht);e=vhe(e)||0,rht(r)&&(E=!!r.leading,C="maxWait"in r,n=C?iht(vhe(r.maxWait)||0,e):n,S="trailing"in r?!!r.trailing:S);function P(ce){var me=s,pe=a;return s=a=void 0,h=ce,c=t.apply(pe,me),c}function I(ce){return h=ce,f=setTimeout(U,e),E?P(ce):c}function R(ce){var me=ce-p,pe=ce-h,Be=e-me;return C?sht(Be,n-pe):Be}function N(ce){var me=ce-p,pe=ce-h;return p===void 0||me>=e||me<0||C&&pe>=n}function U(){var ce=Y8();if(N(ce))return W(ce);f=setTimeout(U,R(ce))}function W(ce){return f=void 0,S&&s?P(ce):(s=a=void 0,c)}function te(){f!==void 0&&clearTimeout(f),h=0,s=p=a=f=void 0}function ie(){return f===void 0?c:W(Y8())}function Ae(){var ce=Y8(),me=N(ce);if(s=arguments,a=this,p=ce,me){if(f===void 0)return I(p);if(C)return clearTimeout(f),f=setTimeout(U,e),P(p)}return f===void 0&&(f=setTimeout(U,e)),c}return Ae.cancel=te,Ae.flush=ie,Ae}She.exports=oht});var V8=L((aJt,bhe)=>{var aht=Dhe(),lht=Wl(),cht="Expected a function";function uht(t,e,r){var s=!0,a=!0;if(typeof t!="function")throw new TypeError(cht);return lht(r)&&(s="leading"in r?!!r.leading:s,a="trailing"in r?!!r.trailing:a),aht(t,e,{leading:s,maxWait:e,trailing:a})}bhe.exports=uht});function Aht(t){return typeof t.reportCode<"u"}var Phe,xhe,khe,fht,Yt,ho,Fc=Ct(()=>{Phe=et(V8()),xhe=Ie("stream"),khe=Ie("string_decoder"),fht=15,Yt=class extends Error{constructor(r,s,a){super(s);this.reportExtra=a;this.reportCode=r}};ho=class{constructor(){this.cacheHits=new Set;this.cacheMisses=new Set;this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}getRecommendedLength(){return 180}reportCacheHit(e){this.cacheHits.add(e.locatorHash)}reportCacheMiss(e,r){this.cacheMisses.add(e.locatorHash)}static progressViaCounter(e){let r=0,s,a=new Promise(p=>{s=p}),n=p=>{let h=s;a=new Promise(E=>{s=E}),r=p,h()},c=(p=0)=>{n(r+1)},f=async function*(){for(;r{r=c}),a=(0,Phe.default)(c=>{let f=r;s=new Promise(p=>{r=p}),e=c,f()},1e3/fht),n=async function*(){for(;;)await s,yield{title:e}}();return{[Symbol.asyncIterator](){return n},hasProgress:!1,hasTitle:!0,setTitle:a}}async startProgressPromise(e,r){let s=this.reportProgress(e);try{return await r(e)}finally{s.stop()}}startProgressSync(e,r){let s=this.reportProgress(e);try{return r(e)}finally{s.stop()}}reportInfoOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedInfos.has(a)||(this.reportedInfos.add(a),this.reportInfo(e,r),s?.reportExtra?.(this))}reportWarningOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedWarnings.has(a)||(this.reportedWarnings.add(a),this.reportWarning(e,r),s?.reportExtra?.(this))}reportErrorOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedErrors.has(a)||(this.reportedErrors.add(a),this.reportError(e,r),s?.reportExtra?.(this))}reportExceptionOnce(e){Aht(e)?this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra}):this.reportErrorOnce(1,e.stack||e.message,{key:e})}createStreamReporter(e=null){let r=new xhe.PassThrough,s=new khe.StringDecoder,a="";return r.on("data",n=>{let c=s.write(n),f;do if(f=c.indexOf(` -`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var aI,K8=Ct(()=>{Fc();Yo();aI=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));return s||null}getFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));if(!s)throw new Yt(11,`${Yr(r.project.configuration,e)} isn't supported by any available fetcher`);return s}}});var em,J8=Ct(()=>{Yo();em=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.getResolverByDescriptor(e,s).bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,s){return await this.getResolverByDescriptor(e,s).getCandidates(e,r,s)}async getSatisfying(e,r,s,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,s,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));return s||null}getResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!s)throw new Error(`${ni(r.project.configuration,e)} isn't supported by any available resolver`);return s}tryResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));return s||null}getResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));if(!s)throw new Error(`${Yr(r.project.configuration,e)} isn't supported by any available resolver`);return s}}});var lI,z8=Ct(()=>{bt();Yo();lI=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(s+1),n=Vs(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(s+1),n=Vs(e,a),c=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,c,r)}getLocatorFilename(e){return rI(e)}async ensureVirtualLink(e,r,s){let a=r.packageFs.getRealPath(),n=s.project.configuration.get("virtualFolder"),c=this.getLocatorFilename(e),f=Ao.makeVirtualPath(n,c,a),p=new Hf(f,{baseFs:r.packageFs,pathUtils:K});return{...r,packageFs:p}}}});var TQ,Qhe=Ct(()=>{TQ=class t{static{this.protocol="virtual:"}static isVirtualDescriptor(e){return!!e.range.startsWith(t.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(t.protocol)}supportsDescriptor(e,r){return t.isVirtualDescriptor(e)}supportsLocator(e,r){return t.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,s){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,s,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}});var cI,Z8=Ct(()=>{bt();$d();cI=class{supports(e){return!!e.reference.startsWith(Ei.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let s=this.getWorkspace(e,r).cwd;return{packageFs:new Sn(s),prefixPath:vt.dot,localPath:s}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(Ei.protocol.length))}}});function $B(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function The(t){return typeof t>"u"?3:$B(t)?0:Array.isArray(t)?1:2}function eH(t,e){return Object.hasOwn(t,e)}function hht(t){return $B(t)&&eH(t,"onConflict")&&typeof t.onConflict=="string"}function ght(t){if(typeof t>"u")return{onConflict:"default",value:t};if(!hht(t))return{onConflict:"default",value:t};if(eH(t,"value"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function Rhe(t,e){let r=$B(t)&&eH(t,e)?t[e]:void 0;return ght(r)}function uI(t,e){return[t,e,Fhe]}function tH(t){return Array.isArray(t)?t[2]===Fhe:!1}function X8(t,e){if($B(t)){let r={};for(let s of Object.keys(t))r[s]=X8(t[s],e);return uI(e,r)}return Array.isArray(t)?uI(e,t.map(r=>X8(r,e))):uI(e,t)}function $8(t,e,r,s,a){let n,c=[],f=a,p=0;for(let E=a-1;E>=s;--E){let[C,S]=t[E],{onConflict:P,value:I}=Rhe(S,r),R=The(I);if(R!==3){if(n??=R,R!==n||P==="hardReset"){p=f;break}if(R===2)return uI(C,I);if(c.unshift([C,I]),P==="reset"){p=E;break}P==="extend"&&E===s&&(s=0),f=E}}if(typeof n>"u")return null;let h=c.map(([E])=>E).join(", ");switch(n){case 1:return uI(h,new Array().concat(...c.map(([E,C])=>C.map(S=>X8(S,E)))));case 0:{let E=Object.assign({},...c.map(([,R])=>R)),C=Object.keys(E),S={},P=t.map(([R,N])=>[R,Rhe(N,r).value]),I=pht(P,([R,N])=>{let U=The(N);return U!==0&&U!==3});if(I!==-1){let R=P.slice(I+1);for(let N of C)S[N]=$8(R,e,N,0,R.length)}else for(let R of C)S[R]=$8(P,e,R,p,P.length);return uI(h,S)}default:throw new Error("Assertion failed: Non-extendable value type")}}function Nhe(t){return $8(t.map(([e,r])=>[e,{".":r}]),[],".",0,t.length)}function ev(t){return tH(t)?t[1]:t}function RQ(t){let e=tH(t)?t[1]:t;if(Array.isArray(e))return e.map(r=>RQ(r));if($B(e)){let r={};for(let[s,a]of Object.entries(e))r[s]=RQ(a);return r}return e}function rH(t){return tH(t)?t[0]:null}var pht,Fhe,Ohe=Ct(()=>{pht=(t,e,r)=>{let s=[...t];return s.reverse(),s.findIndex(e,r)};Fhe=Symbol()});var FQ={};Vt(FQ,{getDefaultGlobalFolder:()=>iH,getHomeFolder:()=>fI,isFolderInside:()=>sH});function iH(){if(process.platform==="win32"){let t=ue.toPortablePath(process.env.LOCALAPPDATA||ue.join((0,nH.homedir)(),"AppData","Local"));return K.resolve(t,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){let t=ue.toPortablePath(process.env.XDG_DATA_HOME);return K.resolve(t,"yarn/berry")}return K.resolve(fI(),".yarn/berry")}function fI(){return ue.toPortablePath((0,nH.homedir)()||"/usr/local/share")}function sH(t,e){let r=K.relative(e,t);return r&&!r.startsWith("..")&&!K.isAbsolute(r)}var nH,NQ=Ct(()=>{bt();nH=Ie("os")});var _he=L((IJt,Mhe)=>{"use strict";var oH=Ie("https"),aH=Ie("http"),{URL:Lhe}=Ie("url"),lH=class extends aH.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...a}=e;super(a),this.proxy=typeof r=="string"?new Lhe(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");s.headers["proxy-authorization"]=`Basic ${n}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let a=(this.proxy.protocol==="http:"?aH:oH).request(s);a.once("connect",(n,c,f)=>{a.removeAllListeners(),c.removeAllListeners(),n.statusCode===200?r(null,c):(c.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null))}),a.once("timeout",()=>{a.destroy(new Error("Proxy timeout"))}),a.once("error",n=>{a.removeAllListeners(),r(n,null)}),a.end()}},cH=class extends oH.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...a}=e;super(a),this.proxy=typeof r=="string"?new Lhe(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");s.headers["proxy-authorization"]=`Basic ${n}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let a=(this.proxy.protocol==="http:"?aH:oH).request(s);a.once("connect",(n,c,f)=>{if(a.removeAllListeners(),c.removeAllListeners(),n.statusCode===200){let p=super.createConnection({...e,socket:c});r(null,p)}else c.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null)}),a.once("timeout",()=>{a.destroy(new Error("Proxy timeout"))}),a.once("error",n=>{a.removeAllListeners(),r(n,null)}),a.end()}};Mhe.exports={HttpProxyAgent:lH,HttpsProxyAgent:cH}});var uH,Uhe,Hhe,jhe=Ct(()=>{uH=et(_he(),1),Uhe=uH.default.HttpProxyAgent,Hhe=uH.default.HttpsProxyAgent});var Lp=L((Op,OQ)=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var qhe=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function mht(t){return qhe.includes(t)}var yht=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...qhe];function Eht(t){return yht.includes(t)}var Iht=["null","undefined","string","number","bigint","boolean","symbol"];function Cht(t){return Iht.includes(t)}function AI(t){return e=>typeof e===t}var{toString:Ghe}=Object.prototype,tv=t=>{let e=Ghe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&be.domElement(t))return"HTMLElement";if(Eht(e))return e},pi=t=>e=>tv(e)===t;function be(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(be.observable(t))return"Observable";if(be.array(t))return"Array";if(be.buffer(t))return"Buffer";let e=tv(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}be.undefined=AI("undefined");be.string=AI("string");var wht=AI("number");be.number=t=>wht(t)&&!be.nan(t);be.bigint=AI("bigint");be.function_=AI("function");be.null_=t=>t===null;be.class_=t=>be.function_(t)&&t.toString().startsWith("class ");be.boolean=t=>t===!0||t===!1;be.symbol=AI("symbol");be.numericString=t=>be.string(t)&&!be.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));be.array=(t,e)=>Array.isArray(t)?be.function_(e)?t.every(e):!0:!1;be.buffer=t=>{var e,r,s,a;return(a=(s=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||s===void 0?void 0:s.call(r,t))!==null&&a!==void 0?a:!1};be.blob=t=>pi("Blob")(t);be.nullOrUndefined=t=>be.null_(t)||be.undefined(t);be.object=t=>!be.null_(t)&&(typeof t=="object"||be.function_(t));be.iterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};be.asyncIterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};be.generator=t=>{var e,r;return be.iterable(t)&&be.function_((e=t)===null||e===void 0?void 0:e.next)&&be.function_((r=t)===null||r===void 0?void 0:r.throw)};be.asyncGenerator=t=>be.asyncIterable(t)&&be.function_(t.next)&&be.function_(t.throw);be.nativePromise=t=>pi("Promise")(t);var Bht=t=>{var e,r;return be.function_((e=t)===null||e===void 0?void 0:e.then)&&be.function_((r=t)===null||r===void 0?void 0:r.catch)};be.promise=t=>be.nativePromise(t)||Bht(t);be.generatorFunction=pi("GeneratorFunction");be.asyncGeneratorFunction=t=>tv(t)==="AsyncGeneratorFunction";be.asyncFunction=t=>tv(t)==="AsyncFunction";be.boundFunction=t=>be.function_(t)&&!t.hasOwnProperty("prototype");be.regExp=pi("RegExp");be.date=pi("Date");be.error=pi("Error");be.map=t=>pi("Map")(t);be.set=t=>pi("Set")(t);be.weakMap=t=>pi("WeakMap")(t);be.weakSet=t=>pi("WeakSet")(t);be.int8Array=pi("Int8Array");be.uint8Array=pi("Uint8Array");be.uint8ClampedArray=pi("Uint8ClampedArray");be.int16Array=pi("Int16Array");be.uint16Array=pi("Uint16Array");be.int32Array=pi("Int32Array");be.uint32Array=pi("Uint32Array");be.float32Array=pi("Float32Array");be.float64Array=pi("Float64Array");be.bigInt64Array=pi("BigInt64Array");be.bigUint64Array=pi("BigUint64Array");be.arrayBuffer=pi("ArrayBuffer");be.sharedArrayBuffer=pi("SharedArrayBuffer");be.dataView=pi("DataView");be.enumCase=(t,e)=>Object.values(e).includes(t);be.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;be.urlInstance=t=>pi("URL")(t);be.urlString=t=>{if(!be.string(t))return!1;try{return new URL(t),!0}catch{return!1}};be.truthy=t=>!!t;be.falsy=t=>!t;be.nan=t=>Number.isNaN(t);be.primitive=t=>be.null_(t)||Cht(typeof t);be.integer=t=>Number.isInteger(t);be.safeInteger=t=>Number.isSafeInteger(t);be.plainObject=t=>{if(Ghe.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};be.typedArray=t=>mht(tv(t));var vht=t=>be.safeInteger(t)&&t>=0;be.arrayLike=t=>!be.nullOrUndefined(t)&&!be.function_(t)&&vht(t.length);be.inRange=(t,e)=>{if(be.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(be.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var Sht=1,Dht=["innerHTML","ownerDocument","style","attributes","nodeValue"];be.domElement=t=>be.object(t)&&t.nodeType===Sht&&be.string(t.nodeName)&&!be.plainObject(t)&&Dht.every(e=>e in t);be.observable=t=>{var e,r,s,a;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((a=(s=t)["@@observable"])===null||a===void 0?void 0:a.call(s)):!1};be.nodeStream=t=>be.object(t)&&be.function_(t.pipe)&&!be.observable(t);be.infinite=t=>t===1/0||t===-1/0;var Whe=t=>e=>be.integer(e)&&Math.abs(e%2)===t;be.evenInteger=Whe(0);be.oddInteger=Whe(1);be.emptyArray=t=>be.array(t)&&t.length===0;be.nonEmptyArray=t=>be.array(t)&&t.length>0;be.emptyString=t=>be.string(t)&&t.length===0;var bht=t=>be.string(t)&&!/\S/.test(t);be.emptyStringOrWhitespace=t=>be.emptyString(t)||bht(t);be.nonEmptyString=t=>be.string(t)&&t.length>0;be.nonEmptyStringAndNotWhitespace=t=>be.string(t)&&!be.emptyStringOrWhitespace(t);be.emptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length===0;be.nonEmptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length>0;be.emptySet=t=>be.set(t)&&t.size===0;be.nonEmptySet=t=>be.set(t)&&t.size>0;be.emptyMap=t=>be.map(t)&&t.size===0;be.nonEmptyMap=t=>be.map(t)&&t.size>0;be.propertyKey=t=>be.any([be.string,be.number,be.symbol],t);be.formData=t=>pi("FormData")(t);be.urlSearchParams=t=>pi("URLSearchParams")(t);var Yhe=(t,e,r)=>{if(!be.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};be.any=(t,...e)=>(be.array(t)?t:[t]).some(s=>Yhe(Array.prototype.some,s,e));be.all=(t,...e)=>Yhe(Array.prototype.every,t,e);var _t=(t,e,r,s={})=>{if(!t){let{multipleValues:a}=s,n=a?`received values of types ${[...new Set(r.map(c=>`\`${be(c)}\``))].join(", ")}`:`received value of type \`${be(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${n}.`)}};Op.assert={undefined:t=>_t(be.undefined(t),"undefined",t),string:t=>_t(be.string(t),"string",t),number:t=>_t(be.number(t),"number",t),bigint:t=>_t(be.bigint(t),"bigint",t),function_:t=>_t(be.function_(t),"Function",t),null_:t=>_t(be.null_(t),"null",t),class_:t=>_t(be.class_(t),"Class",t),boolean:t=>_t(be.boolean(t),"boolean",t),symbol:t=>_t(be.symbol(t),"symbol",t),numericString:t=>_t(be.numericString(t),"string with a number",t),array:(t,e)=>{_t(be.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>_t(be.buffer(t),"Buffer",t),blob:t=>_t(be.blob(t),"Blob",t),nullOrUndefined:t=>_t(be.nullOrUndefined(t),"null or undefined",t),object:t=>_t(be.object(t),"Object",t),iterable:t=>_t(be.iterable(t),"Iterable",t),asyncIterable:t=>_t(be.asyncIterable(t),"AsyncIterable",t),generator:t=>_t(be.generator(t),"Generator",t),asyncGenerator:t=>_t(be.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>_t(be.nativePromise(t),"native Promise",t),promise:t=>_t(be.promise(t),"Promise",t),generatorFunction:t=>_t(be.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>_t(be.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>_t(be.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>_t(be.boundFunction(t),"Function",t),regExp:t=>_t(be.regExp(t),"RegExp",t),date:t=>_t(be.date(t),"Date",t),error:t=>_t(be.error(t),"Error",t),map:t=>_t(be.map(t),"Map",t),set:t=>_t(be.set(t),"Set",t),weakMap:t=>_t(be.weakMap(t),"WeakMap",t),weakSet:t=>_t(be.weakSet(t),"WeakSet",t),int8Array:t=>_t(be.int8Array(t),"Int8Array",t),uint8Array:t=>_t(be.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>_t(be.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>_t(be.int16Array(t),"Int16Array",t),uint16Array:t=>_t(be.uint16Array(t),"Uint16Array",t),int32Array:t=>_t(be.int32Array(t),"Int32Array",t),uint32Array:t=>_t(be.uint32Array(t),"Uint32Array",t),float32Array:t=>_t(be.float32Array(t),"Float32Array",t),float64Array:t=>_t(be.float64Array(t),"Float64Array",t),bigInt64Array:t=>_t(be.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>_t(be.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>_t(be.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>_t(be.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>_t(be.dataView(t),"DataView",t),enumCase:(t,e)=>_t(be.enumCase(t,e),"EnumCase",t),urlInstance:t=>_t(be.urlInstance(t),"URL",t),urlString:t=>_t(be.urlString(t),"string with a URL",t),truthy:t=>_t(be.truthy(t),"truthy",t),falsy:t=>_t(be.falsy(t),"falsy",t),nan:t=>_t(be.nan(t),"NaN",t),primitive:t=>_t(be.primitive(t),"primitive",t),integer:t=>_t(be.integer(t),"integer",t),safeInteger:t=>_t(be.safeInteger(t),"integer",t),plainObject:t=>_t(be.plainObject(t),"plain object",t),typedArray:t=>_t(be.typedArray(t),"TypedArray",t),arrayLike:t=>_t(be.arrayLike(t),"array-like",t),domElement:t=>_t(be.domElement(t),"HTMLElement",t),observable:t=>_t(be.observable(t),"Observable",t),nodeStream:t=>_t(be.nodeStream(t),"Node.js Stream",t),infinite:t=>_t(be.infinite(t),"infinite number",t),emptyArray:t=>_t(be.emptyArray(t),"empty array",t),nonEmptyArray:t=>_t(be.nonEmptyArray(t),"non-empty array",t),emptyString:t=>_t(be.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>_t(be.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>_t(be.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>_t(be.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>_t(be.emptyObject(t),"empty object",t),nonEmptyObject:t=>_t(be.nonEmptyObject(t),"non-empty object",t),emptySet:t=>_t(be.emptySet(t),"empty set",t),nonEmptySet:t=>_t(be.nonEmptySet(t),"non-empty set",t),emptyMap:t=>_t(be.emptyMap(t),"empty map",t),nonEmptyMap:t=>_t(be.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>_t(be.propertyKey(t),"PropertyKey",t),formData:t=>_t(be.formData(t),"FormData",t),urlSearchParams:t=>_t(be.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>_t(be.evenInteger(t),"even integer",t),oddInteger:t=>_t(be.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>_t(be.directInstanceOf(t,e),"T",t),inRange:(t,e)=>_t(be.inRange(t,e),"in range",t),any:(t,...e)=>_t(be.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>_t(be.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(be,{class:{value:be.class_},function:{value:be.function_},null:{value:be.null_}});Object.defineProperties(Op.assert,{class:{value:Op.assert.class_},function:{value:Op.assert.function_},null:{value:Op.assert.null_}});Op.default=be;OQ.exports=be;OQ.exports.default=be;OQ.exports.assert=Op.assert});var Vhe=L((wJt,fH)=>{"use strict";var LQ=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},MQ=class t{static fn(e){return(...r)=>new t((s,a,n)=>{r.push(n),e(...r).then(s,a)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,s)=>{this._reject=s;let a=f=>{this._isPending=!1,r(f)},n=f=>{this._isPending=!1,s(f)},c=f=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(f)};return Object.defineProperties(c,{shouldReject:{get:()=>this._rejectOnCancel,set:f=>{this._rejectOnCancel=f}}}),e(a,n,c)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new LQ(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(MQ.prototype,Promise.prototype);fH.exports=MQ;fH.exports.CancelError=LQ});var Khe=L((pH,hH)=>{"use strict";Object.defineProperty(pH,"__esModule",{value:!0});function Pht(t){return t.encrypted}var AH=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let s=typeof r.connect=="function",a=typeof r.secureConnect=="function",n=typeof r.close=="function",c=()=>{s&&r.connect(),Pht(t)&&a&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),n&&t.once("close",r.close)};t.writable&&!t.connecting?c():t.connecting?t.once("connect",c):t.destroyed&&n&&r.close(t._hadError)};pH.default=AH;hH.exports=AH;hH.exports.default=AH});var Jhe=L((dH,mH)=>{"use strict";Object.defineProperty(dH,"__esModule",{value:!0});var xht=Khe(),kht=Number(process.versions.node.split(".")[0]),gH=t=>{let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=c=>{let f=c.emit.bind(c);c.emit=(p,...h)=>(p==="error"&&(e.error=Date.now(),e.phases.total=e.error-e.start,c.emit=f),f(p,...h))};r(t),t.prependOnceListener("abort",()=>{e.abort=Date.now(),(!e.response||kht>=13)&&(e.phases.total=Date.now()-e.start)});let s=c=>{e.socket=Date.now(),e.phases.wait=e.socket-e.start;let f=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};c.prependOnceListener("lookup",f),xht.default(c,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(c.removeListener("lookup",f),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?s(t.socket):t.prependOnceListener("socket",s);let a=()=>{var c;e.upload=Date.now(),e.phases.request=e.upload-(c=e.secureConnect,c??e.connect)};return(typeof t.writableFinished=="boolean"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))?a():t.prependOnceListener("finish",a),t.prependOnceListener("response",c=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,c.timings=e,r(c),c.prependOnceListener("end",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start})}),e};dH.default=gH;mH.exports=gH;mH.exports.default=gH});var r0e=L((BJt,IH)=>{"use strict";var{V4MAPPED:Qht,ADDRCONFIG:Tht,ALL:t0e,promises:{Resolver:zhe},lookup:Rht}=Ie("dns"),{promisify:yH}=Ie("util"),Fht=Ie("os"),pI=Symbol("cacheableLookupCreateConnection"),EH=Symbol("cacheableLookupInstance"),Zhe=Symbol("expires"),Nht=typeof t0e=="number",Xhe=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},Oht=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},$he=()=>{let t=!1,e=!1;for(let r of Object.values(Fht.networkInterfaces()))for(let s of r)if(!s.internal&&(s.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},Lht=t=>Symbol.iterator in t,e0e={ttl:!0},Mht={all:!0},_Q=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:s=3600,errorTtl:a=.15,resolver:n=new zhe,lookup:c=Rht}={}){if(this.maxTtl=r,this.errorTtl=a,this._cache=e,this._resolver=n,this._dnsLookup=yH(c),this._resolver instanceof zhe?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=yH(this._resolver.resolve4.bind(this._resolver)),this._resolve6=yH(this._resolver.resolve6.bind(this._resolver))),this._iface=$he(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,s<1)this._fallback=!1;else{this._fallback=!0;let f=setInterval(()=>{this._hostnamesToFallback.clear()},s*1e3);f.unref&&f.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,s){if(typeof r=="function"?(s=r,r={}):typeof r=="number"&&(r={family:r}),!s)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(a=>{r.all?s(null,a):s(null,a.address,a.family,a.expires,a.ttl)},s)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let s=await this.query(e);if(r.family===6){let a=s.filter(n=>n.family===6);r.hints&Qht&&(Nht&&r.hints&t0e||a.length===0)?Oht(s):s=a}else r.family===4&&(s=s.filter(a=>a.family===4));if(r.hints&Tht){let{_iface:a}=this;s=s.filter(n=>n.family===6?a.has6:a.has4)}if(s.length===0){let a=new Error(`cacheableLookup ENOTFOUND ${e}`);throw a.code="ENOTFOUND",a.hostname=e,a}return r.all?s:s[0]}async query(e){let r=await this._cache.get(e);if(!r){let s=this._pending[e];if(s)r=await s;else{let a=this.queryAndCache(e);this._pending[e]=a,r=await a}}return r=r.map(s=>({...s})),r}async _resolve(e){let r=async h=>{try{return await h}catch(E){if(E.code==="ENODATA"||E.code==="ENOTFOUND")return[];throw E}},[s,a]=await Promise.all([this._resolve4(e,e0e),this._resolve6(e,e0e)].map(h=>r(h))),n=0,c=0,f=0,p=Date.now();for(let h of s)h.family=4,h.expires=p+h.ttl*1e3,n=Math.max(n,h.ttl);for(let h of a)h.family=6,h.expires=p+h.ttl*1e3,c=Math.max(c,h.ttl);return s.length>0?a.length>0?f=Math.min(n,c):f=n:f=c,{entries:[...s,...a],cacheTtl:f}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,s){if(this.maxTtl>0&&s>0){s=Math.min(s,this.maxTtl)*1e3,r[Zhe]=Date.now()+s;try{await this._cache.set(e,r,s)}catch(a){this.lookupAsync=async()=>{let n=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw n.cause=a,n}}Lht(this._cache)&&this._tick(s)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Mht);try{let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));let s=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,s),delete this._pending[e],r.entries}catch(r){throw delete this._pending[e],r}}_tick(e){let r=this._nextRemovalTime;(!r||e{this._nextRemovalTime=!1;let s=1/0,a=Date.now();for(let[n,c]of this._cache){let f=c[Zhe];a>=f?this._cache.delete(n):f("lookup"in r||(r.lookup=this.lookup),e[pI](r,s))}uninstall(e){if(Xhe(e),e[pI]){if(e[EH]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[pI],delete e[pI],delete e[EH]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=$he(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};IH.exports=_Q;IH.exports.default=_Q});var s0e=L((vJt,CH)=>{"use strict";var _ht=typeof URL>"u"?Ie("url").URL:URL,Uht="text/plain",Hht="us-ascii",n0e=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),jht=(t,{stripHash:e})=>{let r=t.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${t}`);let s=r[1].split(";"),a=r[2],n=e?"":r[3],c=!1;s[s.length-1]==="base64"&&(s.pop(),c=!0);let f=(s.shift()||"").toLowerCase(),h=[...s.map(E=>{let[C,S=""]=E.split("=").map(P=>P.trim());return C==="charset"&&(S=S.toLowerCase(),S===Hht)?"":`${C}${S?`=${S}`:""}`}).filter(Boolean)];return c&&h.push("base64"),(h.length!==0||f&&f!==Uht)&&h.unshift(f),`data:${h.join(";")},${c?a.trim():a}${n?`#${n}`:""}`},i0e=(t,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},Reflect.has(e,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(e,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(e,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(t=t.trim(),/^data:/i.test(t))return jht(t,e);let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let a=new _ht(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),e.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),e.stripAuthentication&&(a.username="",a.password=""),e.stripHash&&(a.hash=""),a.pathname&&(a.pathname=a.pathname.replace(/((?!:).|^)\/{2,}/g,(n,c)=>/^(?!\/)/g.test(c)?`${c}/`:"/")),a.pathname&&(a.pathname=decodeURI(a.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let n=a.pathname.split("/"),c=n[n.length-1];n0e(c,e.removeDirectoryIndex)&&(n=n.slice(0,n.length-1),a.pathname=n.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let n of[...a.searchParams.keys()])n0e(n,e.removeQueryParameters)&&a.searchParams.delete(n);return e.sortQueryParameters&&a.searchParams.sort(),e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,"")),t=a.toString(),(e.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};CH.exports=i0e;CH.exports.default=i0e});var l0e=L((SJt,a0e)=>{a0e.exports=o0e;function o0e(t,e){if(t&&e)return o0e(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(s){r[s]=t[s]}),r;function r(){for(var s=new Array(arguments.length),a=0;a{var c0e=l0e();wH.exports=c0e(UQ);wH.exports.strict=c0e(u0e);UQ.proto=UQ(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return UQ(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return u0e(this)},configurable:!0})});function UQ(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function u0e(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});var vH=L((bJt,A0e)=>{var qht=BH(),Ght=function(){},Wht=function(t){return t.setHeader&&typeof t.abort=="function"},Yht=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},f0e=function(t,e,r){if(typeof e=="function")return f0e(t,null,e);e||(e={}),r=qht(r||Ght);var s=t._writableState,a=t._readableState,n=e.readable||e.readable!==!1&&t.readable,c=e.writable||e.writable!==!1&&t.writable,f=function(){t.writable||p()},p=function(){c=!1,n||r.call(t)},h=function(){n=!1,c||r.call(t)},E=function(I){r.call(t,I?new Error("exited with error code: "+I):null)},C=function(I){r.call(t,I)},S=function(){if(n&&!(a&&a.ended))return r.call(t,new Error("premature close"));if(c&&!(s&&s.ended))return r.call(t,new Error("premature close"))},P=function(){t.req.on("finish",p)};return Wht(t)?(t.on("complete",p),t.on("abort",S),t.req?P():t.on("request",P)):c&&!s&&(t.on("end",f),t.on("close",f)),Yht(t)&&t.on("exit",E),t.on("end",h),t.on("finish",p),e.error!==!1&&t.on("error",C),t.on("close",S),function(){t.removeListener("complete",p),t.removeListener("abort",S),t.removeListener("request",P),t.req&&t.req.removeListener("finish",p),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",p),t.removeListener("exit",E),t.removeListener("end",h),t.removeListener("error",C),t.removeListener("close",S)}};A0e.exports=f0e});var g0e=L((PJt,h0e)=>{var Vht=BH(),Kht=vH(),SH=Ie("fs"),rv=function(){},Jht=/^v?\.0/.test(process.version),HQ=function(t){return typeof t=="function"},zht=function(t){return!Jht||!SH?!1:(t instanceof(SH.ReadStream||rv)||t instanceof(SH.WriteStream||rv))&&HQ(t.close)},Zht=function(t){return t.setHeader&&HQ(t.abort)},Xht=function(t,e,r,s){s=Vht(s);var a=!1;t.on("close",function(){a=!0}),Kht(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,zht(t))return t.close(rv);if(Zht(t))return t.abort();if(HQ(t.destroy))return t.destroy();s(c||new Error("stream was destroyed"))}}},p0e=function(t){t()},$ht=function(t,e){return t.pipe(e)},e0t=function(){var t=Array.prototype.slice.call(arguments),e=HQ(t[t.length-1]||rv)&&t.pop()||rv;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,s=t.map(function(a,n){var c=n0;return Xht(a,c,f,function(p){r||(r=p),p&&s.forEach(p0e),!c&&(s.forEach(p0e),e(r))})});return t.reduce($ht)};h0e.exports=e0t});var m0e=L((xJt,d0e)=>{"use strict";var{PassThrough:t0t}=Ie("stream");d0e.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,s=r==="buffer",a=!1;e?a=!(r||s):r=r||"utf8",s&&(r=null);let n=new t0t({objectMode:a});r&&n.setEncoding(r);let c=0,f=[];return n.on("data",p=>{f.push(p),a?c=f.length:c+=p.length}),n.getBufferedValue=()=>e?f:s?Buffer.concat(f,c):f.join(""),n.getBufferedLength=()=>c,n}});var y0e=L((kJt,hI)=>{"use strict";var r0t=g0e(),n0t=m0e(),jQ=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function qQ(t,e){if(!t)return Promise.reject(new Error("Expected a stream"));e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,s;return await new Promise((a,n)=>{let c=f=>{f&&(f.bufferedData=s.getBufferedValue()),n(f)};s=r0t(t,n0t(e),f=>{if(f){c(f);return}a()}),s.on("data",()=>{s.getBufferedLength()>r&&c(new jQ)})}),s.getBufferedValue()}hI.exports=qQ;hI.exports.default=qQ;hI.exports.buffer=(t,e)=>qQ(t,{...e,encoding:"buffer"});hI.exports.array=(t,e)=>qQ(t,{...e,array:!0});hI.exports.MaxBufferError=jQ});var I0e=L((TJt,E0e)=>{"use strict";var i0t=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),s0t=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),o0t=new Set([500,502,503,504]),a0t={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},l0t={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function tm(t){let e=parseInt(t,10);return isFinite(e)?e:0}function c0t(t){return t?o0t.has(t.status):!0}function DH(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let s of r){let[a,n]=s.split(/=/,2);e[a.trim()]=n===void 0?!0:n.trim().replace(/^"|"$/g,"")}return e}function u0t(t){let e=[];for(let r in t){let s=t[r];e.push(s===!0?r:r+"="+s)}if(e.length)return e.join(", ")}E0e.exports=class{constructor(e,r,{shared:s,cacheHeuristic:a,immutableMinTimeToLive:n,ignoreCargoCult:c,_fromObject:f}={}){if(f){this._fromObject(f);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=s!==!1,this._cacheHeuristic=a!==void 0?a:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=DH(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=DH(e.headers["cache-control"]),c&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":u0t(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&s0t.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||i0t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=DH(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let s of r)if(e.headers[s]!==this._reqHeaders[s])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let s in e)a0t[s]||(r[s]=e[s]);if(e.connection){let s=e.connection.trim().split(/\s*,\s*/);for(let a of s)delete r[a]}if(r.warning){let s=r.warning.split(/,/).filter(a=>!/^\s*1[0-9][0-9]/.test(a));s.length?r.warning=s.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return tm(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return tm(this._rescc["s-maxage"])}if(this._rescc["max-age"])return tm(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let s=Date.parse(this._resHeaders.expires);return Number.isNaN(s)||ss)return Math.max(e,(r-s)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+tm(this._rescc["stale-if-error"]),s=e+tm(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,s)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+tm(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+tm(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let a=r["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));a.length?r["if-none-match"]=a.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&c0t(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let s=!1;if(r.status!==void 0&&r.status!=304?s=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?s=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?s=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?s=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(s=!0),!s)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let a={};for(let c in this._resHeaders)a[c]=c in r.headers&&!l0t[c]?r.headers[c]:this._resHeaders[c];let n=Object.assign({},r,{status:this._status,method:this._method,headers:a});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var GQ=L((RJt,C0e)=>{"use strict";C0e.exports=t=>{let e={};for(let[r,s]of Object.entries(t))e[r.toLowerCase()]=s;return e}});var B0e=L((FJt,w0e)=>{"use strict";var f0t=Ie("stream").Readable,A0t=GQ(),bH=class extends f0t{constructor(e,r,s,a){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(s instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof a!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=e,this.headers=A0t(r),this.body=s,this.url=a}_read(){this.push(this.body),this.push(null)}};w0e.exports=bH});var S0e=L((NJt,v0e)=>{"use strict";var p0t=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];v0e.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(p0t));for(let s of r)s in e||(e[s]=typeof t[s]=="function"?t[s].bind(t):t[s])}});var b0e=L((OJt,D0e)=>{"use strict";var h0t=Ie("stream").PassThrough,g0t=S0e(),d0t=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new h0t;return g0t(t,e),t.pipe(e)};D0e.exports=d0t});var P0e=L(PH=>{PH.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",s=Array.isArray(e);r=s?"[":"{";var a=!0;for(var n in e){var c=typeof e[n]=="function"||!s&&typeof e[n]>"u";Object.hasOwnProperty.call(e,n)&&!c&&(a||(r+=","),a=!1,s?e[n]==null?r+="null":r+=t(e[n]):e[n]!==void 0&&(r+=t(n)+":"+t(e[n])))}return r+=s?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)};PH.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var T0e=L((MJt,Q0e)=>{"use strict";var m0t=Ie("events"),x0e=P0e(),y0t=t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(Ie(e[r]))(t)}return new Map},k0e=["sqlite","postgres","mysql","mongo","redis","tiered"],xH=class extends m0t{constructor(e,{emitErrors:r=!0,...s}={}){if(super(),this.opts={namespace:"keyv",serialize:x0e.stringify,deserialize:x0e.parse,...typeof e=="string"?{uri:e}:e,...s},!this.opts.store){let n={...this.opts};this.opts.store=y0t(n)}if(this.opts.compression){let n=this.opts.compression;this.opts.serialize=n.serialize.bind(n),this.opts.deserialize=n.deserialize.bind(n)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",n=>this.emit("error",n)),this.opts.store.namespace=this.opts.namespace;let a=n=>async function*(){for await(let[c,f]of typeof n=="function"?n(this.opts.store.namespace):n){let p=await this.opts.deserialize(f);if(!(this.opts.store.namespace&&!c.includes(this.opts.store.namespace))){if(typeof p.expires=="number"&&Date.now()>p.expires){this.delete(c);continue}yield[this._getKeyUnprefix(c),p.value]}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=a(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=a(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return k0e.includes(this.opts.store.opts.dialect)||k0e.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:s}=this.opts,a=Array.isArray(e),n=a?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(a&&s.getMany===void 0){let c=[];for(let f of n)c.push(Promise.resolve().then(()=>s.get(f)).then(p=>typeof p=="string"?this.opts.deserialize(p):this.opts.compression?this.opts.deserialize(p):p).then(p=>{if(p!=null)return typeof p.expires=="number"&&Date.now()>p.expires?this.delete(f).then(()=>{}):r&&r.raw?p:p.value}));return Promise.allSettled(c).then(f=>{let p=[];for(let h of f)p.push(h.value);return p})}return Promise.resolve().then(()=>a?s.getMany(n):s.get(n)).then(c=>typeof c=="string"?this.opts.deserialize(c):this.opts.compression?this.opts.deserialize(c):c).then(c=>{if(c!=null)return a?c.map((f,p)=>{if(typeof f=="string"&&(f=this.opts.deserialize(f)),f!=null){if(typeof f.expires=="number"&&Date.now()>f.expires){this.delete(e[p]).then(()=>{});return}return r&&r.raw?f:f.value}}):typeof c.expires=="number"&&Date.now()>c.expires?this.delete(e).then(()=>{}):r&&r.raw?c:c.value})}set(e,r,s){let a=this._getKeyPrefix(e);typeof s>"u"&&(s=this.opts.ttl),s===0&&(s=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let c=typeof s=="number"?Date.now()+s:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:c},this.opts.serialize(r)}).then(c=>n.set(a,c,s)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let a=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let n=[];for(let c of a)n.push(r.delete(c));return Promise.allSettled(n).then(c=>c.every(f=>f.value===!0))}return Promise.resolve().then(()=>r.deleteMany(a))}let s=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(s))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:s}=this.opts;return Promise.resolve().then(async()=>typeof s.has=="function"?s.has(r):await s.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};Q0e.exports=xH});var N0e=L((UJt,F0e)=>{"use strict";var E0t=Ie("events"),WQ=Ie("url"),I0t=s0e(),C0t=y0e(),kH=I0e(),R0e=B0e(),w0t=GQ(),B0t=b0e(),v0t=T0e(),nv=class t{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new v0t({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,s)=>{let a;if(typeof r=="string")a=QH(WQ.parse(r)),r={};else if(r instanceof WQ.URL)a=QH(WQ.parse(r.toString())),r={};else{let[C,...S]=(r.path||"").split("?"),P=S.length>0?`?${S.join("?")}`:"";a=QH({...r,pathname:C,search:P})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...S0t(a)},r.headers=w0t(r.headers);let n=new E0t,c=I0t(WQ.format(a),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),f=`${r.method}:${c}`,p=!1,h=!1,E=C=>{h=!0;let S=!1,P,I=new Promise(N=>{P=()=>{S||(S=!0,N())}}),R=N=>{if(p&&!C.forceRefresh){N.status=N.statusCode;let W=kH.fromObject(p.cachePolicy).revalidatedPolicy(C,N);if(!W.modified){let te=W.policy.responseHeaders();N=new R0e(p.statusCode,te,p.body,p.url),N.cachePolicy=W.policy,N.fromCache=!0}}N.fromCache||(N.cachePolicy=new kH(C,N,C),N.fromCache=!1);let U;C.cache&&N.cachePolicy.storable()?(U=B0t(N),(async()=>{try{let W=C0t.buffer(N);if(await Promise.race([I,new Promise(ce=>N.once("end",ce))]),S)return;let te=await W,ie={cachePolicy:N.cachePolicy.toObject(),url:N.url,statusCode:N.fromCache?p.statusCode:N.statusCode,body:te},Ae=C.strictTtl?N.cachePolicy.timeToLive():void 0;C.maxTtl&&(Ae=Ae?Math.min(Ae,C.maxTtl):C.maxTtl),await this.cache.set(f,ie,Ae)}catch(W){n.emit("error",new t.CacheError(W))}})()):C.cache&&p&&(async()=>{try{await this.cache.delete(f)}catch(W){n.emit("error",new t.CacheError(W))}})(),n.emit("response",U||N),typeof s=="function"&&s(U||N)};try{let N=e(C,R);N.once("error",P),N.once("abort",P),n.emit("request",N)}catch(N){n.emit("error",new t.RequestError(N))}};return(async()=>{let C=async P=>{await Promise.resolve();let I=P.cache?await this.cache.get(f):void 0;if(typeof I>"u")return E(P);let R=kH.fromObject(I.cachePolicy);if(R.satisfiesWithoutRevalidation(P)&&!P.forceRefresh){let N=R.responseHeaders(),U=new R0e(I.statusCode,N,I.body,I.url);U.cachePolicy=R,U.fromCache=!0,n.emit("response",U),typeof s=="function"&&s(U)}else p=I,P.headers=R.revalidationHeaders(P),E(P)},S=P=>n.emit("error",new t.CacheError(P));this.cache.once("error",S),n.on("response",()=>this.cache.removeListener("error",S));try{await C(r)}catch(P){r.automaticFailover&&!h&&E(r),n.emit("error",new t.CacheError(P))}})(),n}}};function S0t(t){let e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function QH(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}nv.RequestError=class extends Error{constructor(t){super(t.message),this.name="RequestError",Object.assign(this,t)}};nv.CacheError=class extends Error{constructor(t){super(t.message),this.name="CacheError",Object.assign(this,t)}};F0e.exports=nv});var L0e=L((qJt,O0e)=>{"use strict";var D0t=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];O0e.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(D0t)),s={};for(let a of r)a in e||(s[a]={get(){let n=t[a];return typeof n=="function"?n.bind(t):n},set(n){t[a]=n},enumerable:!0,configurable:!1});return Object.defineProperties(e,s),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var _0e=L((GJt,M0e)=>{"use strict";var{Transform:b0t,PassThrough:P0t}=Ie("stream"),TH=Ie("zlib"),x0t=L0e();M0e.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof TH.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let s=!0,a=new b0t({transform(f,p,h){s=!1,h(null,f)},flush(f){f()}}),n=new P0t({autoDestroy:!1,destroy(f,p){t.destroy(),p(f)}}),c=r?TH.createBrotliDecompress():TH.createUnzip();return c.once("error",f=>{if(s&&!t.readable){n.end();return}n.destroy(f)}),x0t(t,n),t.pipe(a).pipe(c).pipe(n),n}});var FH=L((WJt,U0e)=>{"use strict";var RH=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[s,a]of this.oldCache.entries())this.onEviction(s,a);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};U0e.exports=RH});var OH=L((YJt,G0e)=>{"use strict";var k0t=Ie("events"),Q0t=Ie("tls"),T0t=Ie("http2"),R0t=FH(),xa=Symbol("currentStreamsCount"),H0e=Symbol("request"),Nc=Symbol("cachedOriginSet"),gI=Symbol("gracefullyClosing"),F0t=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],N0t=(t,e,r)=>{let s=0,a=t.length;for(;s>>1;r(t[n],e)?s=n+1:a=n}return s},O0t=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,NH=(t,e)=>{for(let r of t)r[Nc].lengthe[Nc].includes(s))&&r[xa]+e[xa]<=e.remoteSettings.maxConcurrentStreams&&q0e(r)},L0t=(t,e)=>{for(let r of t)e[Nc].lengthr[Nc].includes(s))&&e[xa]+r[xa]<=r.remoteSettings.maxConcurrentStreams&&q0e(e)},j0e=({agent:t,isFree:e})=>{let r={};for(let s in t.sessions){let n=t.sessions[s].filter(c=>{let f=c[rm.kCurrentStreamsCount]{t[gI]=!0,t[xa]===0&&t.close()},rm=class t extends k0t{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:s=10,maxCachedTlsSessions:a=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=s,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new R0t({maxSize:a})}static normalizeOrigin(e,r){return typeof e=="string"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r="";if(e)for(let s of F0t)e[s]&&(r+=`:${e[s]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let s=this.queue[e][r];this._sessionsCount{Array.isArray(s)?(s=[...s],a()):s=[{resolve:a,reject:n}];let c=this.normalizeOptions(r),f=t.normalizeOrigin(e,r&&r.servername);if(f===void 0){for(let{reject:E}of s)E(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(c in this.sessions){let E=this.sessions[c],C=-1,S=-1,P;for(let I of E){let R=I.remoteSettings.maxConcurrentStreams;if(R=R||I[gI]||I.destroyed)continue;P||(C=R),N>S&&(P=I,S=N)}}if(P){if(s.length!==1){for(let{reject:I}of s){let R=new Error(`Expected the length of listeners to be 1, got ${s.length}. -Please report this to https://github.com/szmarczak/http2-wrapper/`);I(R)}return}s[0].resolve(P);return}}if(c in this.queue){if(f in this.queue[c]){this.queue[c][f].listeners.push(...s),this._tryToCreateNewSession(c,f);return}}else this.queue[c]={};let p=()=>{c in this.queue&&this.queue[c][f]===h&&(delete this.queue[c][f],Object.keys(this.queue[c]).length===0&&delete this.queue[c])},h=()=>{let E=`${f}:${c}`,C=!1;try{let S=T0t.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});S[xa]=0,S[gI]=!1;let P=()=>S[xa]{this.tlsSessionCache.set(E,N)}),S.once("error",N=>{for(let{reject:U}of s)U(N);this.tlsSessionCache.delete(E)}),S.setTimeout(this.timeout,()=>{S.destroy()}),S.once("close",()=>{if(C){I&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[c];N.splice(N.indexOf(S),1),N.length===0&&delete this.sessions[c]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of s)U(N);p()}this._tryToCreateNewSession(c,f)});let R=()=>{if(!(!(c in this.queue)||!P())){for(let N of S[Nc])if(N in this.queue[c]){let{listeners:U}=this.queue[c][N];for(;U.length!==0&&P();)U.shift().resolve(S);let W=this.queue[c];if(W[N].listeners.length===0&&(delete W[N],Object.keys(W).length===0)){delete this.queue[c];break}if(!P())break}}};S.on("origin",()=>{S[Nc]=S.originSet,P()&&(R(),NH(this.sessions[c],S))}),S.once("remoteSettings",()=>{if(S.ref(),S.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let U of s)U.reject(N);S.destroy();return}S[Nc]=S.originSet;{let N=this.sessions;if(c in N){let U=N[c];U.splice(N0t(U,S,O0t),0,S)}else N[c]=[S]}this._freeSessionsCount+=1,C=!0,this.emit("session",S),R(),p(),S[xa]===0&&this._freeSessionsCount>this.maxFreeSessions&&S.close(),s.length!==0&&(this.getSession(f,r,s),s.length=0),S.on("remoteSettings",()=>{R(),NH(this.sessions[c],S)})}),S[H0e]=S.request,S.request=(N,U)=>{if(S[gI])throw new Error("The session is gracefully closing. No new streams are allowed.");let W=S[H0e](N,U);return S.ref(),++S[xa],S[xa]===S.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,W.once("close",()=>{if(I=P(),--S[xa],!S.destroyed&&!S.closed&&(L0t(this.sessions[c],S),P()&&!S.closed)){I||(this._freeSessionsCount++,I=!0);let te=S[xa]===0;te&&S.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||S[gI])?S.close():(NH(this.sessions[c],S),R())}}),W}}catch(S){for(let P of s)P.reject(S);p()}};h.listeners=s,h.completed=!1,h.destroyed=!1,this.queue[c][f]=h,this._tryToCreateNewSession(c,f)})}request(e,r,s,a){return new Promise((n,c)=>{this.getSession(e,r,[{reject:c,resolve:f=>{try{n(f.request(s,a))}catch(p){c(p)}}}])})}createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let s=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),Q0t.connect(s,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[xa]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(e);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return j0e({agent:this,isFree:!0})}get busySessions(){return j0e({agent:this,isFree:!1})}};rm.kCurrentStreamsCount=xa;rm.kGracefullyClosing=gI;G0e.exports={Agent:rm,globalAgent:new rm}});var MH=L((VJt,W0e)=>{"use strict";var{Readable:M0t}=Ie("stream"),LH=class extends M0t{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};W0e.exports=LH});var _H=L((KJt,Y0e)=>{"use strict";Y0e.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var K0e=L((JJt,V0e)=>{"use strict";V0e.exports=(t,e,r)=>{for(let s of r)t.on(s,(...a)=>e.emit(s,...a))}});var z0e=L((zJt,J0e)=>{"use strict";J0e.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var X0e=L((XJt,Z0e)=>{"use strict";var dI=(t,e,r)=>{Z0e.exports[e]=class extends t{constructor(...a){super(typeof r=="string"?r:r(a)),this.name=`${super.name} [${e}]`,this.code=e}}};dI(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],s=Array.isArray(r);return s&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${s?"one of":"of"} type ${r}. Received ${typeof t[2]}`});dI(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);dI(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);dI(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);dI(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);dI(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var GH=L(($Jt,sge)=>{"use strict";var _0t=Ie("http2"),{Writable:U0t}=Ie("stream"),{Agent:$0e,globalAgent:H0t}=OH(),j0t=MH(),q0t=_H(),G0t=K0e(),W0t=z0e(),{ERR_INVALID_ARG_TYPE:UH,ERR_INVALID_PROTOCOL:Y0t,ERR_HTTP_HEADERS_SENT:ege,ERR_INVALID_HTTP_TOKEN:V0t,ERR_HTTP_INVALID_HEADER_VALUE:K0t,ERR_INVALID_CHAR:J0t}=X0e(),{HTTP2_HEADER_STATUS:tge,HTTP2_HEADER_METHOD:rge,HTTP2_HEADER_PATH:nge,HTTP2_METHOD_CONNECT:z0t}=_0t.constants,Jo=Symbol("headers"),HH=Symbol("origin"),jH=Symbol("session"),ige=Symbol("options"),YQ=Symbol("flushedHeaders"),iv=Symbol("jobs"),Z0t=/^[\^`\-\w!#$%&*+.|~]+$/,X0t=/[^\t\u0020-\u007E\u0080-\u00FF]/,qH=class extends U0t{constructor(e,r,s){super({autoDestroy:!1});let a=typeof e=="string"||e instanceof URL;if(a&&(e=q0t(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(s=r,r=a?e:{...e}):r={...e,...r},r.h2session)this[jH]=r.h2session;else if(r.agent===!1)this.agent=new $0e({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new $0e({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=H0t;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new UH("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new Y0t(r.protocol,"https:");let n=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,c=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;let{timeout:f}=r;if(r.timeout=void 0,this[Jo]=Object.create(null),this[iv]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[p,h]of Object.entries(r.headers))this.setHeader(p,h);r.auth&&!("authorization"in this[Jo])&&(this[Jo].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[ige]=r,n===443?(this[HH]=`https://${c}`,":authority"in this[Jo]||(this[Jo][":authority"]=c)):(this[HH]=`https://${c}:${n}`,":authority"in this[Jo]||(this[Jo][":authority"]=`${c}:${n}`)),f&&this.setTimeout(f),s&&this.once("response",s),this[YQ]=!1}get method(){return this[Jo][rge]}set method(e){e&&(this[Jo][rge]=e.toUpperCase())}get path(){return this[Jo][nge]}set path(e){e&&(this[Jo][nge]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,s){if(this._mustNotHaveABody){s(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let a=()=>this._request.write(e,r,s);this._request?a():this[iv].push(a)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[iv].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[YQ]||this.destroyed)return;this[YQ]=!0;let e=this.method===z0t,r=s=>{if(this._request=s,this.destroyed){s.destroy();return}e||G0t(s,this,["timeout","continue","close","error"]);let a=c=>(...f)=>{!this.writable&&!this.destroyed?c(...f):this.once("finish",()=>{c(...f)})};s.once("response",a((c,f,p)=>{let h=new j0t(this.socket,s.readableHighWaterMark);this.res=h,h.req=this,h.statusCode=c[tge],h.headers=c,h.rawHeaders=p,h.once("end",()=>{this.aborted?(h.aborted=!0,h.emit("aborted")):(h.complete=!0,h.socket=null,h.connection=null)}),e?(h.upgrade=!0,this.emit("connect",h,s,Buffer.alloc(0))?this.emit("close"):s.destroy()):(s.on("data",E=>{!h._dumped&&!h.push(E)&&s.pause()}),s.once("end",()=>{h.push(null)}),this.emit("response",h)||h._dump())})),s.once("headers",a(c=>this.emit("information",{statusCode:c[tge]}))),s.once("trailers",a((c,f,p)=>{let{res:h}=this;h.trailers=c,h.rawTrailers=p}));let{socket:n}=s.session;this.socket=n,this.connection=n;for(let c of this[iv])c();this.emit("socket",this.socket)};if(this[jH])try{r(this[jH].request(this[Jo]))}catch(s){this.emit("error",s)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[HH],this[ige],this[Jo]))}catch(s){this.emit("error",s)}}}getHeader(e){if(typeof e!="string")throw new UH("name","string",e);return this[Jo][e.toLowerCase()]}get headersSent(){return this[YQ]}removeHeader(e){if(typeof e!="string")throw new UH("name","string",e);if(this.headersSent)throw new ege("remove");delete this[Jo][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new ege("set");if(typeof e!="string"||!Z0t.test(e)&&!W0t(e))throw new V0t("Header name",e);if(typeof r>"u")throw new K0t(r,e);if(X0t.test(r))throw new J0t("header content",e);this[Jo][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let s=()=>this._request.setTimeout(e,r);return this._request?s():this[iv].push(s),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};sge.exports=qH});var age=L((ezt,oge)=>{"use strict";var $0t=Ie("tls");oge.exports=(t={},e=$0t.connect)=>new Promise((r,s)=>{let a=!1,n,c=async()=>{await p,n.off("timeout",f),n.off("error",s),t.resolveSocket?(r({alpnProtocol:n.alpnProtocol,socket:n,timeout:a}),a&&(await Promise.resolve(),n.emit("timeout"))):(n.destroy(),r({alpnProtocol:n.alpnProtocol,timeout:a}))},f=async()=>{a=!0,c()},p=(async()=>{try{n=await e(t,c),n.on("error",s),n.once("timeout",f)}catch(h){s(h)}})()})});var cge=L((tzt,lge)=>{"use strict";var egt=Ie("net");lge.exports=t=>{let e=t.host,r=t.headers&&t.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?e=r:e=r.slice(1,-1):e=r.split(":",1)[0]),egt.isIP(e)?"":e}});var Age=L((rzt,YH)=>{"use strict";var uge=Ie("http"),WH=Ie("https"),tgt=age(),rgt=FH(),ngt=GH(),igt=cge(),sgt=_H(),VQ=new rgt({maxSize:100}),sv=new Map,fge=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let s=()=>{t.emit("free",e,r)};e.on("free",s);let a=()=>{t.removeSocket(e,r)};e.on("close",a);let n=()=>{t.removeSocket(e,r),e.off("close",a),e.off("free",s),e.off("agentRemove",n)};e.on("agentRemove",n),t.emit("free",e,r)},ogt=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!VQ.has(e)){if(sv.has(e))return(await sv.get(e)).alpnProtocol;let{path:r,agent:s}=t;t.path=t.socketPath;let a=tgt(t);sv.set(e,a);try{let{socket:n,alpnProtocol:c}=await a;if(VQ.set(e,c),t.path=r,c==="h2")n.destroy();else{let{globalAgent:f}=WH,p=WH.Agent.prototype.createConnection;s?s.createConnection===p?fge(s,n,t):n.destroy():f.createConnection===p?fge(f,n,t):n.destroy()}return sv.delete(e),c}catch(n){throw sv.delete(e),n}}return VQ.get(e)};YH.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=sgt(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let s=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||igt(e),e.port=e.port||(s?443:80),e._defaultAgent=s?WH.globalAgent:uge.globalAgent;let a=e.agent;if(a){if(a.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=a[s?"https":"http"]}return s&&await ogt(e)==="h2"?(a&&(e.agent=a.http2),new ngt(e,r)):uge.request(e,r)};YH.exports.protocolCache=VQ});var hge=L((nzt,pge)=>{"use strict";var agt=Ie("http2"),lgt=OH(),VH=GH(),cgt=MH(),ugt=Age(),fgt=(t,e,r)=>new VH(t,e,r),Agt=(t,e,r)=>{let s=new VH(t,e,r);return s.end(),s};pge.exports={...agt,ClientRequest:VH,IncomingMessage:cgt,...lgt,request:fgt,get:Agt,auto:ugt}});var JH=L(KH=>{"use strict";Object.defineProperty(KH,"__esModule",{value:!0});var gge=Lp();KH.default=t=>gge.default.nodeStream(t)&&gge.default.function_(t.getBoundary)});var Ege=L(zH=>{"use strict";Object.defineProperty(zH,"__esModule",{value:!0});var mge=Ie("fs"),yge=Ie("util"),dge=Lp(),pgt=JH(),hgt=yge.promisify(mge.stat);zH.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(dge.default.string(t))return Buffer.byteLength(t);if(dge.default.buffer(t))return t.length;if(pgt.default(t))return yge.promisify(t.getLength.bind(t))();if(t instanceof mge.ReadStream){let{size:r}=await hgt(t.path);return r===0?void 0:r}}});var XH=L(ZH=>{"use strict";Object.defineProperty(ZH,"__esModule",{value:!0});function ggt(t,e,r){let s={};for(let a of r)s[a]=(...n)=>{e.emit(a,...n)},t.on(a,s[a]);return()=>{for(let a of r)t.off(a,s[a])}}ZH.default=ggt});var Ige=L($H=>{"use strict";Object.defineProperty($H,"__esModule",{value:!0});$H.default=()=>{let t=[];return{once(e,r,s){e.once(r,s),t.push({origin:e,event:r,fn:s})},unhandleAll(){for(let e of t){let{origin:r,event:s,fn:a}=e;r.removeListener(s,a)}t.length=0}}}});var wge=L(ov=>{"use strict";Object.defineProperty(ov,"__esModule",{value:!0});ov.TimeoutError=void 0;var dgt=Ie("net"),mgt=Ige(),Cge=Symbol("reentry"),ygt=()=>{},KQ=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}};ov.TimeoutError=KQ;ov.default=(t,e,r)=>{if(Cge in t)return ygt;t[Cge]=!0;let s=[],{once:a,unhandleAll:n}=mgt.default(),c=(C,S,P)=>{var I;let R=setTimeout(S,C,C,P);(I=R.unref)===null||I===void 0||I.call(R);let N=()=>{clearTimeout(R)};return s.push(N),N},{host:f,hostname:p}=r,h=(C,S)=>{t.destroy(new KQ(C,S))},E=()=>{for(let C of s)C();n()};if(t.once("error",C=>{if(E(),t.listenerCount("error")===0)throw C}),t.once("close",E),a(t,"response",C=>{a(C,"end",E)}),typeof e.request<"u"&&c(e.request,h,"request"),typeof e.socket<"u"){let C=()=>{h(e.socket,"socket")};t.setTimeout(e.socket,C),s.push(()=>{t.removeListener("timeout",C)})}return a(t,"socket",C=>{var S;let{socketPath:P}=t;if(C.connecting){let I=!!(P??dgt.isIP((S=p??f)!==null&&S!==void 0?S:"")!==0);if(typeof e.lookup<"u"&&!I&&typeof C.address().address>"u"){let R=c(e.lookup,h,"lookup");a(C,"lookup",R)}if(typeof e.connect<"u"){let R=()=>c(e.connect,h,"connect");I?a(C,"connect",R()):a(C,"lookup",N=>{N===null&&a(C,"connect",R())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&a(C,"connect",()=>{let R=c(e.secureConnect,h,"secureConnect");a(C,"secureConnect",R)})}if(typeof e.send<"u"){let I=()=>c(e.send,h,"send");C.connecting?a(C,"connect",()=>{a(t,"upload-complete",I())}):a(t,"upload-complete",I())}}),typeof e.response<"u"&&a(t,"upload-complete",()=>{let C=c(e.response,h,"response");a(t,"response",C)}),E}});var vge=L(ej=>{"use strict";Object.defineProperty(ej,"__esModule",{value:!0});var Bge=Lp();ej.default=t=>{t=t;let e={protocol:t.protocol,hostname:Bge.default.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return Bge.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var Sge=L(tj=>{"use strict";Object.defineProperty(tj,"__esModule",{value:!0});var Egt=Ie("url"),Igt=["protocol","host","hostname","port","pathname","search"];tj.default=(t,e)=>{var r,s;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!e.protocol)throw new TypeError("No URL protocol specified");t=`${e.protocol}//${(s=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&s!==void 0?s:""}`}let a=new Egt.URL(t);if(e.path){let n=e.path.indexOf("?");n===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,n),e.search=e.path.slice(n+1)),delete e.path}for(let n of Igt)e[n]&&(a[n]=e[n].toString());return a}});var Dge=L(nj=>{"use strict";Object.defineProperty(nj,"__esModule",{value:!0});var rj=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};nj.default=rj});var sj=L(ij=>{"use strict";Object.defineProperty(ij,"__esModule",{value:!0});var Cgt=async t=>{let e=[],r=0;for await(let s of t)e.push(s),r+=Buffer.byteLength(s);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};ij.default=Cgt});var Pge=L(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.dnsLookupIpVersionToFamily=nm.isDnsLookupIpVersion=void 0;var bge={auto:0,ipv4:4,ipv6:6};nm.isDnsLookupIpVersion=t=>t in bge;nm.dnsLookupIpVersionToFamily=t=>{if(nm.isDnsLookupIpVersion(t))return bge[t];throw new Error("Invalid DNS lookup IP version")}});var oj=L(JQ=>{"use strict";Object.defineProperty(JQ,"__esModule",{value:!0});JQ.isResponseOk=void 0;JQ.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var kge=L(aj=>{"use strict";Object.defineProperty(aj,"__esModule",{value:!0});var xge=new Set;aj.default=t=>{xge.has(t)||(xge.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))}});var Qge=L(lj=>{"use strict";Object.defineProperty(lj,"__esModule",{value:!0});var bi=Lp(),wgt=(t,e)=>{if(bi.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");bi.assert.any([bi.default.string,bi.default.undefined],t.encoding),bi.assert.any([bi.default.boolean,bi.default.undefined],t.resolveBodyOnly),bi.assert.any([bi.default.boolean,bi.default.undefined],t.methodRewriting),bi.assert.any([bi.default.boolean,bi.default.undefined],t.isStream),bi.assert.any([bi.default.string,bi.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");let{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:s=>s.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},bi.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(s=>s.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):bi.default.number(r)&&(t.retry.limit=r),bi.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(bi.default.number))),bi.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:s}=t;if(!bi.default.function_(s.transform))throw new Error("`options.pagination.transform` must be implemented");if(!bi.default.function_(s.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!bi.default.function_(s.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!bi.default.function_(s.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};lj.default=wgt});var Tge=L(av=>{"use strict";Object.defineProperty(av,"__esModule",{value:!0});av.retryAfterStatusCodes=void 0;av.retryAfterStatusCodes=new Set([413,429,503]);var Bgt=({attemptCount:t,retryOptions:e,error:r,retryAfter:s})=>{if(t>e.limit)return 0;let a=e.methods.includes(r.options.method),n=e.errorCodes.includes(r.code),c=r.response&&e.statusCodes.includes(r.response.statusCode);if(!a||!n&&!c)return 0;if(r.response){if(s)return e.maxRetryAfter===void 0||s>e.maxRetryAfter?0:s;if(r.response.statusCode===413)return 0}let f=Math.random()*100;return 2**(t-1)*1e3+f};av.default=Bgt});var uv=L(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.UnsupportedProtocolError=Ln.ReadError=Ln.TimeoutError=Ln.UploadError=Ln.CacheError=Ln.HTTPError=Ln.MaxRedirectsError=Ln.RequestError=Ln.setNonEnumerableProperties=Ln.knownHookEvents=Ln.withoutBody=Ln.kIsNormalizedAlready=void 0;var Rge=Ie("util"),Fge=Ie("stream"),vgt=Ie("fs"),C0=Ie("url"),Nge=Ie("http"),cj=Ie("http"),Sgt=Ie("https"),Dgt=Jhe(),bgt=r0e(),Oge=N0e(),Pgt=_0e(),xgt=hge(),kgt=GQ(),at=Lp(),Qgt=Ege(),Lge=JH(),Tgt=XH(),Mge=wge(),Rgt=vge(),_ge=Sge(),Fgt=Dge(),Ngt=sj(),Uge=Pge(),Ogt=oj(),w0=kge(),Lgt=Qge(),Mgt=Tge(),uj,go=Symbol("request"),XQ=Symbol("response"),mI=Symbol("responseSize"),yI=Symbol("downloadedSize"),EI=Symbol("bodySize"),II=Symbol("uploadedSize"),zQ=Symbol("serverResponsesPiped"),Hge=Symbol("unproxyEvents"),jge=Symbol("isFromCache"),fj=Symbol("cancelTimeouts"),qge=Symbol("startedReading"),CI=Symbol("stopReading"),ZQ=Symbol("triggerRead"),B0=Symbol("body"),lv=Symbol("jobs"),Gge=Symbol("originalResponse"),Wge=Symbol("retryTimeout");Ln.kIsNormalizedAlready=Symbol("isNormalizedAlready");var _gt=at.default.string(process.versions.brotli);Ln.withoutBody=new Set(["GET","HEAD"]);Ln.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function Ugt(t){for(let e in t){let r=t[e];if(!at.default.string(r)&&!at.default.number(r)&&!at.default.boolean(r)&&!at.default.null_(r)&&!at.default.undefined(r))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}function Hgt(t){return at.default.object(t)&&!("statusCode"in t)}var Aj=new Fgt.default,jgt=async t=>new Promise((e,r)=>{let s=a=>{r(a)};t.pending||e(),t.once("error",s),t.once("ready",()=>{t.off("error",s),e()})}),qgt=new Set([300,301,302,303,304,307,308]),Ggt=["context","body","json","form"];Ln.setNonEnumerableProperties=(t,e)=>{let r={};for(let s of t)if(s)for(let a of Ggt)a in s&&(r[a]={writable:!0,configurable:!0,enumerable:!1,value:s[a]});Object.defineProperties(e,r)};var As=class extends Error{constructor(e,r,s){var a;if(super(e),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code,s instanceof sT?(Object.defineProperty(this,"request",{enumerable:!1,value:s}),Object.defineProperty(this,"response",{enumerable:!1,value:s[XQ]}),Object.defineProperty(this,"options",{enumerable:!1,value:s.options})):Object.defineProperty(this,"options",{enumerable:!1,value:s}),this.timings=(a=this.request)===null||a===void 0?void 0:a.timings,at.default.string(r.stack)&&at.default.string(this.stack)){let n=this.stack.indexOf(this.message)+this.message.length,c=this.stack.slice(n).split(` -`).reverse(),f=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(` -`).reverse();for(;f.length!==0&&f[0]===c[0];)c.shift();this.stack=`${this.stack.slice(0,n)}${c.reverse().join(` -`)}${f.reverse().join(` -`)}`}}};Ln.RequestError=As;var $Q=class extends As{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};Ln.MaxRedirectsError=$Q;var eT=class extends As{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};Ln.HTTPError=eT;var tT=class extends As{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};Ln.CacheError=tT;var rT=class extends As{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};Ln.UploadError=rT;var nT=class extends As{constructor(e,r,s){super(e.message,e,s),this.name="TimeoutError",this.event=e.event,this.timings=r}};Ln.TimeoutError=nT;var cv=class extends As{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};Ln.ReadError=cv;var iT=class extends As{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};Ln.UnsupportedProtocolError=iT;var Wgt=["socket","connect","continue","information","upgrade","timeout"],sT=class extends Fge.Duplex{constructor(e,r={},s){super({autoDestroy:!1,highWaterMark:0}),this[yI]=0,this[II]=0,this.requestInitialized=!1,this[zQ]=new Set,this.redirects=[],this[CI]=!1,this[ZQ]=!1,this[lv]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof cj.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:c,body:f,form:p}=r;if((c||f||p)&&this._lockWrite(),Ln.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(h){at.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof vgt.ReadStream&&await jgt(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError("Missing `url` property");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[go])===null||h===void 0||h.destroy();return}for(let C of this[lv])C();this[lv].length=0,this.requestInitialized=!0}catch(E){if(E instanceof As){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,s){var a,n,c,f,p;let h=r;if(at.default.object(e)&&!at.default.urlInstance(e))r={...s,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...s,...r},e!==void 0&&(r.url=e),at.default.urlInstance(r.url)&&(r.url=new C0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),at.assert.any([at.default.string,at.default.undefined],r.method),at.assert.any([at.default.object,at.default.undefined],r.headers),at.assert.any([at.default.string,at.default.urlInstance,at.default.undefined],r.prefixUrl),at.assert.any([at.default.object,at.default.undefined],r.cookieJar),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.searchParams),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.cache),at.assert.any([at.default.object,at.default.number,at.default.undefined],r.timeout),at.assert.any([at.default.object,at.default.undefined],r.context),at.assert.any([at.default.object,at.default.undefined],r.hooks),at.assert.any([at.default.boolean,at.default.undefined],r.decompress),at.assert.any([at.default.boolean,at.default.undefined],r.ignoreInvalidCookies),at.assert.any([at.default.boolean,at.default.undefined],r.followRedirect),at.assert.any([at.default.number,at.default.undefined],r.maxRedirects),at.assert.any([at.default.boolean,at.default.undefined],r.throwHttpErrors),at.assert.any([at.default.boolean,at.default.undefined],r.http2),at.assert.any([at.default.boolean,at.default.undefined],r.allowGetBody),at.assert.any([at.default.string,at.default.undefined],r.localAddress),at.assert.any([Uge.isDnsLookupIpVersion,at.default.undefined],r.dnsLookupIpVersion),at.assert.any([at.default.object,at.default.undefined],r.https),at.assert.any([at.default.boolean,at.default.undefined],r.rejectUnauthorized),r.https&&(at.assert.any([at.default.boolean,at.default.undefined],r.https.rejectUnauthorized),at.assert.any([at.default.function_,at.default.undefined],r.https.checkServerIdentity),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificateAuthority),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.key),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificate),at.assert.any([at.default.string,at.default.undefined],r.https.passphrase),at.assert.any([at.default.string,at.default.buffer,at.default.array,at.default.undefined],r.https.pfx)),at.assert.any([at.default.object,at.default.undefined],r.cacheOptions),at.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===s?.headers?r.headers={...r.headers}:r.headers=kgt({...s?.headers,...r.headers}),"slashes"in r)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in r)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in r&&r.searchParams&&r.searchParams!==s?.searchParams){let P;if(at.default.string(r.searchParams)||r.searchParams instanceof C0.URLSearchParams)P=new C0.URLSearchParams(r.searchParams);else{Ugt(r.searchParams),P=new C0.URLSearchParams;for(let I in r.searchParams){let R=r.searchParams[I];R===null?P.append(I,""):R!==void 0&&P.append(I,R)}}(a=s?.searchParams)===null||a===void 0||a.forEach((I,R)=>{P.has(R)||P.append(R,I)}),r.searchParams=P}if(r.username=(n=r.username)!==null&&n!==void 0?n:"",r.password=(c=r.password)!==null&&c!==void 0?c:"",at.default.undefined(r.prefixUrl)?r.prefixUrl=(f=s?.prefixUrl)!==null&&f!==void 0?f:"":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")&&(r.prefixUrl+="/")),at.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=_ge.default(r.prefixUrl+r.url,r)}else(at.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol)&&(r.url=_ge.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:P}=r;Object.defineProperty(r,"prefixUrl",{set:R=>{let N=r.url;if(!N.href.startsWith(R))throw new Error(`Cannot change \`prefixUrl\` from ${P} to ${R}: ${N.href}`);r.url=new C0.URL(R+N.href.slice(P.length)),P=R},get:()=>P});let{protocol:I}=r.url;if(I==="unix:"&&(I="http:",r.url=new C0.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),I!=="http:"&&I!=="https:")throw new iT(r);r.username===""?r.username=r.url.username:r.url.username=r.username,r.password===""?r.password=r.url.password:r.url.password=r.password}let{cookieJar:E}=r;if(E){let{setCookie:P,getCookieString:I}=E;at.assert.function_(P),at.assert.function_(I),P.length===4&&I.length===0&&(P=Rge.promisify(P.bind(r.cookieJar)),I=Rge.promisify(I.bind(r.cookieJar)),r.cookieJar={setCookie:P,getCookieString:I})}let{cache:C}=r;if(C&&(Aj.has(C)||Aj.set(C,new Oge((P,I)=>{let R=P[go](P,I);return at.default.promise(R)&&(R.once=(N,U)=>{if(N==="error")R.catch(U);else if(N==="abort")(async()=>{try{(await R).once("abort",U)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${N}`);return R}),R},C))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)uj||(uj=new bgt.default),r.dnsCache=uj;else if(!at.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${at.default(r.dnsCache)}`);at.default.number(r.timeout)?r.timeout={request:r.timeout}:s&&r.timeout!==s.timeout?r.timeout={...s.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let S=r.hooks===s?.hooks;r.hooks={...r.hooks};for(let P of Ln.knownHookEvents)if(P in r.hooks)if(at.default.array(r.hooks[P]))r.hooks[P]=[...r.hooks[P]];else throw new TypeError(`Parameter \`${P}\` must be an Array, got ${at.default(r.hooks[P])}`);else r.hooks[P]=[];if(s&&!S)for(let P of Ln.knownHookEvents)s.hooks[P].length>0&&(r.hooks[P]=[...s.hooks[P],...r.hooks[P]]);if("family"in r&&w0.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),s?.https&&(r.https={...s.https,...r.https}),"rejectUnauthorized"in r&&w0.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&w0.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&w0.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&w0.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&w0.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&w0.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&w0.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in r)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(r.agent){for(let P in r.agent)if(P!=="http"&&P!=="https"&&P!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${P}\``)}return r.maxRedirects=(p=r.maxRedirects)!==null&&p!==void 0?p:0,Ln.setNonEnumerableProperties([s,h],r),Lgt.default(r,s)}_lockWrite(){let e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:r}=e,s=!at.default.undefined(e.form),a=!at.default.undefined(e.json),n=!at.default.undefined(e.body),c=s||a||n,f=Ln.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=f,c){if(f)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([n,s,a].filter(p=>p).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(n&&!(e.body instanceof Fge.Readable)&&!at.default.string(e.body)&&!at.default.buffer(e.body)&&!Lge.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(s&&!at.default.object(e.form))throw new TypeError("The `form` option must be an Object");{let p=!at.default.string(r["content-type"]);n?(Lge.default(e.body)&&p&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[B0]=e.body):s?(p&&(r["content-type"]="application/x-www-form-urlencoded"),this[B0]=new C0.URLSearchParams(e.form).toString()):(p&&(r["content-type"]="application/json"),this[B0]=e.stringifyJson(e.json));let h=await Qgt.default(this[B0],e.headers);at.default.undefined(r["content-length"])&&at.default.undefined(r["transfer-encoding"])&&!f&&!at.default.undefined(h)&&(r["content-length"]=String(h))}}else f?this._lockWrite():this._unlockWrite();this[EI]=Number(r["content-length"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:s}=r;this[Gge]=e,r.decompress&&(e=Pgt(e));let a=e.statusCode,n=e;n.statusMessage=n.statusMessage?n.statusMessage:Nge.STATUS_CODES[a],n.url=r.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=e.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[jge]=n.isFromCache,this[mI]=Number(e.headers["content-length"])||void 0,this[XQ]=e,e.once("end",()=>{this[mI]=this[yI],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",f=>{e.destroy(),this._beforeError(new cv(f,this))}),e.once("aborted",()=>{this._beforeError(new cv({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let c=e.headers["set-cookie"];if(at.default.object(r.cookieJar)&&c){let f=c.map(async p=>r.cookieJar.setCookie(p,s.toString()));r.ignoreInvalidCookies&&(f=f.map(async p=>p.catch(()=>{})));try{await Promise.all(f)}catch(p){this._beforeError(p);return}}if(r.followRedirect&&e.headers.location&&qgt.has(a)){if(e.resume(),this[go]&&(this[fj](),delete this[go],this[Hge]()),(a===303&&r.method!=="GET"&&r.method!=="HEAD"||!r.methodRewriting)&&(r.method="GET","body"in r&&delete r.body,"json"in r&&delete r.json,"form"in r&&delete r.form,this[B0]=void 0,delete r.headers["content-length"]),this.redirects.length>=r.maxRedirects){this._beforeError(new $Q(this));return}try{let p=Buffer.from(e.headers.location,"binary").toString(),h=new C0.URL(p,s),E=h.toString();decodeURI(E),h.hostname!==s.hostname||h.port!==s.port?("host"in r.headers&&delete r.headers.host,"cookie"in r.headers&&delete r.headers.cookie,"authorization"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username="",r.password="")):(h.username=r.username,h.password=r.password),this.redirects.push(E),r.url=h;for(let C of r.hooks.beforeRedirect)await C(r,n);this.emit("redirect",n,r),await this._makeRequest()}catch(p){this._beforeError(p);return}return}if(r.isStream&&r.throwHttpErrors&&!Ogt.isResponseOk(n)){this._beforeError(new eT(n));return}e.on("readable",()=>{this[ZQ]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(let f of this[zQ])if(!f.headersSent){for(let p in e.headers){let h=r.decompress?p!=="content-encoding":!0,E=e.headers[p];h&&f.setHeader(p,E)}f.statusCode=a}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:s,url:a}=r;Dgt.default(e),this[fj]=Mge.default(e,s,a);let n=r.cache?"cacheableResponse":"response";e.once(n,p=>{this._onResponse(p)}),e.once("error",p=>{var h;e.destroy(),(h=e.res)===null||h===void 0||h.removeAllListeners("end"),p=p instanceof Mge.TimeoutError?new nT(p,this.timings,this):new As(p.message,p,this),this._beforeError(p)}),this[Hge]=Tgt.default(e,this,Wgt),this[go]=e,this.emit("uploadProgress",this.uploadProgress);let c=this[B0],f=this.redirects.length===0?this:e;at.default.nodeStream(c)?(c.pipe(f),c.once("error",p=>{this._beforeError(new rT(p,this))})):(this._unlockWrite(),at.default.undefined(c)?(this._cannotHaveBody||this._noPipe)&&(f.end(),this._lockWrite()):(this._writeRequest(c,void 0,()=>{}),f.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,r){return new Promise((s,a)=>{Object.assign(r,Rgt.default(e)),delete r.url;let n,c=Aj.get(r.cache)(r,async f=>{f._readableState.autoDestroy=!1,n&&(await n).emit("cacheableResponse",f),s(f)});r.url=e,c.once("error",a),c.once("request",async f=>{n=f,s(n)})})}async _makeRequest(){var e,r,s,a,n;let{options:c}=this,{headers:f}=c;for(let U in f)if(at.default.undefined(f[U]))delete f[U];else if(at.default.null_(f[U]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${U}\` header`);if(c.decompress&&at.default.undefined(f["accept-encoding"])&&(f["accept-encoding"]=_gt?"gzip, deflate, br":"gzip, deflate"),c.cookieJar){let U=await c.cookieJar.getCookieString(c.url.toString());at.default.nonEmptyString(U)&&(c.headers.cookie=U)}for(let U of c.hooks.beforeRequest){let W=await U(c);if(!at.default.undefined(W)){c.request=()=>W;break}}c.body&&this[B0]!==c.body&&(this[B0]=c.body);let{agent:p,request:h,timeout:E,url:C}=c;if(c.dnsCache&&!("lookup"in c)&&(c.lookup=c.dnsCache.lookup),C.hostname==="unix"){let U=/(?.+?):(?.+)/.exec(`${C.pathname}${C.search}`);if(U?.groups){let{socketPath:W,path:te}=U.groups;Object.assign(c,{socketPath:W,path:te,host:""})}}let S=C.protocol==="https:",P;c.http2?P=xgt.auto:P=S?Sgt.request:Nge.request;let I=(e=c.request)!==null&&e!==void 0?e:P,R=c.cache?this._createCacheableRequest:I;p&&!c.http2&&(c.agent=p[S?"https":"http"]),c[go]=I,delete c.request,delete c.timeout;let N=c;if(N.shared=(r=c.cacheOptions)===null||r===void 0?void 0:r.shared,N.cacheHeuristic=(s=c.cacheOptions)===null||s===void 0?void 0:s.cacheHeuristic,N.immutableMinTimeToLive=(a=c.cacheOptions)===null||a===void 0?void 0:a.immutableMinTimeToLive,N.ignoreCargoCult=(n=c.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult,c.dnsLookupIpVersion!==void 0)try{N.family=Uge.dnsLookupIpVersionToFamily(c.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}c.https&&("rejectUnauthorized"in c.https&&(N.rejectUnauthorized=c.https.rejectUnauthorized),c.https.checkServerIdentity&&(N.checkServerIdentity=c.https.checkServerIdentity),c.https.certificateAuthority&&(N.ca=c.https.certificateAuthority),c.https.certificate&&(N.cert=c.https.certificate),c.https.key&&(N.key=c.https.key),c.https.passphrase&&(N.passphrase=c.https.passphrase),c.https.pfx&&(N.pfx=c.https.pfx));try{let U=await R(C,N);at.default.undefined(U)&&(U=P(C,N)),c.request=h,c.timeout=E,c.agent=p,c.https&&("rejectUnauthorized"in c.https&&delete N.rejectUnauthorized,c.https.checkServerIdentity&&delete N.checkServerIdentity,c.https.certificateAuthority&&delete N.ca,c.https.certificate&&delete N.cert,c.https.key&&delete N.key,c.https.passphrase&&delete N.passphrase,c.https.pfx&&delete N.pfx),Hgt(U)?this._onRequest(U):this.writable?(this.once("finish",()=>{this._onResponse(U)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(U)}catch(U){throw U instanceof Oge.CacheError?new tT(U,this):new As(U.message,U,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new As(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[CI])return;let{options:r}=this,s=this.retryCount+1;this[CI]=!0,e instanceof As||(e=new As(e.message,e,this));let a=e,{response:n}=a;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await Ngt.default(n),n.body=n.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let c;try{let f;n&&"retry-after"in n.headers&&(f=Number(n.headers["retry-after"]),Number.isNaN(f)?(f=Date.parse(n.headers["retry-after"])-Date.now(),f<=0&&(f=1)):f*=1e3),c=await r.retry.calculateDelay({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:Mgt.default({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:0})})}catch(f){this._error(new As(f.message,f,this));return}if(c){let f=async()=>{try{for(let p of this.options.hooks.beforeRetry)await p(this.options,a,s)}catch(p){this._error(new As(p.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",s,e))};this[Wge]=setTimeout(f,c);return}}this._error(a)})()}_read(){this[ZQ]=!0;let e=this[XQ];if(e&&!this[CI]){e.readableLength&&(this[ZQ]=!1);let r;for(;(r=e.read())!==null;){this[yI]+=r.length,this[qge]=!0;let s=this.downloadProgress;s.percent<1&&this.emit("downloadProgress",s),this.push(r)}}}_write(e,r,s){let a=()=>{this._writeRequest(e,r,s)};this.requestInitialized?a():this[lv].push(a)}_writeRequest(e,r,s){this[go].destroyed||(this._progressCallbacks.push(()=>{this[II]+=Buffer.byteLength(e,r);let a=this.uploadProgress;a.percent<1&&this.emit("uploadProgress",a)}),this[go].write(e,r,a=>{!a&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),s(a)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(go in this)){e();return}if(this[go].destroyed){e();return}this[go].end(s=>{s||(this[EI]=this[II],this.emit("uploadProgress",this.uploadProgress),this[go].emit("upload-complete")),e(s)})};this.requestInitialized?r():this[lv].push(r)}_destroy(e,r){var s;this[CI]=!0,clearTimeout(this[Wge]),go in this&&(this[fj](),!((s=this[XQ])===null||s===void 0)&&s.complete||this[go].destroy()),e!==null&&!at.default.undefined(e)&&!(e instanceof As)&&(e=new As(e.message,e,this)),r(e)}get _isAboutToError(){return this[CI]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,s;return((r=(e=this[go])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((s=this[Gge])===null||s===void 0)&&s.complete)}get socket(){var e,r;return(r=(e=this[go])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[mI]?e=this[yI]/this[mI]:this[mI]===this[yI]?e=1:e=0,{percent:e,transferred:this[yI],total:this[mI]}}get uploadProgress(){let e;return this[EI]?e=this[II]/this[EI]:this[EI]===this[II]?e=1:e=0,{percent:e,transferred:this[II],total:this[EI]}}get timings(){var e;return(e=this[go])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[jge]}pipe(e,r){if(this[qge])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof cj.ServerResponse&&this[zQ].add(e),super.pipe(e,r)}unpipe(e){return e instanceof cj.ServerResponse&&this[zQ].delete(e),super.unpipe(e),this}};Ln.default=sT});var fv=L(Wu=>{"use strict";var Ygt=Wu&&Wu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Vgt=Wu&&Wu.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ygt(e,t,r)};Object.defineProperty(Wu,"__esModule",{value:!0});Wu.CancelError=Wu.ParseError=void 0;var Yge=uv(),pj=class extends Yge.RequestError{constructor(e,r){let{options:s}=r.request;super(`${e.message} in "${s.url.toString()}"`,e,r.request),this.name="ParseError"}};Wu.ParseError=pj;var hj=class extends Yge.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError"}get isCanceled(){return!0}};Wu.CancelError=hj;Vgt(uv(),Wu)});var Kge=L(gj=>{"use strict";Object.defineProperty(gj,"__esModule",{value:!0});var Vge=fv(),Kgt=(t,e,r,s)=>{let{rawBody:a}=t;try{if(e==="text")return a.toString(s);if(e==="json")return a.length===0?"":r(a.toString());if(e==="buffer")return a;throw new Vge.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(n){throw new Vge.ParseError(n,t)}};gj.default=Kgt});var dj=L(v0=>{"use strict";var Jgt=v0&&v0.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),zgt=v0&&v0.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Jgt(e,t,r)};Object.defineProperty(v0,"__esModule",{value:!0});var Zgt=Ie("events"),Xgt=Lp(),$gt=Vhe(),oT=fv(),Jge=Kge(),zge=uv(),edt=XH(),tdt=sj(),Zge=oj(),rdt=["request","response","redirect","uploadProgress","downloadProgress"];function Xge(t){let e,r,s=new Zgt.EventEmitter,a=new $gt((c,f,p)=>{let h=E=>{let C=new zge.default(void 0,t);C.retryCount=E,C._noPipe=!0,p(()=>C.destroy()),p.shouldReject=!1,p(()=>f(new oT.CancelError(C))),e=C,C.once("response",async I=>{var R;if(I.retryCount=E,I.request.aborted)return;let N;try{N=await tdt.default(C),I.rawBody=N}catch{return}if(C._isAboutToError)return;let U=((R=I.headers["content-encoding"])!==null&&R!==void 0?R:"").toLowerCase(),W=["gzip","deflate","br"].includes(U),{options:te}=C;if(W&&!te.decompress)I.body=N;else try{I.body=Jge.default(I,te.responseType,te.parseJson,te.encoding)}catch(ie){if(I.body=N.toString(),Zge.isResponseOk(I)){C._beforeError(ie);return}}try{for(let[ie,Ae]of te.hooks.afterResponse.entries())I=await Ae(I,async ce=>{let me=zge.default.normalizeArguments(void 0,{...ce,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},te);me.hooks.afterResponse=me.hooks.afterResponse.slice(0,ie);for(let Be of me.hooks.beforeRetry)await Be(me);let pe=Xge(me);return p(()=>{pe.catch(()=>{}),pe.cancel()}),pe})}catch(ie){C._beforeError(new oT.RequestError(ie.message,ie,C));return}if(!Zge.isResponseOk(I)){C._beforeError(new oT.HTTPError(I));return}r=I,c(C.options.resolveBodyOnly?I.body:I)});let S=I=>{if(a.isCanceled)return;let{options:R}=C;if(I instanceof oT.HTTPError&&!R.throwHttpErrors){let{response:N}=I;c(C.options.resolveBodyOnly?N.body:N);return}f(I)};C.once("error",S);let P=C.options.body;C.once("retry",(I,R)=>{var N,U;if(P===((N=R.request)===null||N===void 0?void 0:N.options.body)&&Xgt.default.nodeStream((U=R.request)===null||U===void 0?void 0:U.options.body)){S(R);return}h(I)}),edt.default(C,s,rdt)};h(0)});a.on=(c,f)=>(s.on(c,f),a);let n=c=>{let f=(async()=>{await a;let{options:p}=r.request;return Jge.default(r,c,p.parseJson,p.encoding)})();return Object.defineProperties(f,Object.getOwnPropertyDescriptors(a)),f};return a.json=()=>{let{headers:c}=e.options;return!e.writableFinished&&c.accept===void 0&&(c.accept="application/json"),n("json")},a.buffer=()=>n("buffer"),a.text=()=>n("text"),a}v0.default=Xge;zgt(fv(),v0)});var $ge=L(mj=>{"use strict";Object.defineProperty(mj,"__esModule",{value:!0});var ndt=fv();function idt(t,...e){let r=(async()=>{if(t instanceof ndt.RequestError)try{for(let a of e)if(a)for(let n of a)t=await n(t)}catch(a){t=a}throw t})(),s=()=>r;return r.json=s,r.text=s,r.buffer=s,r.on=s,r}mj.default=idt});var rde=L(yj=>{"use strict";Object.defineProperty(yj,"__esModule",{value:!0});var ede=Lp();function tde(t){for(let e of Object.values(t))(ede.default.plainObject(e)||ede.default.array(e))&&tde(e);return Object.freeze(t)}yj.default=tde});var ide=L(nde=>{"use strict";Object.defineProperty(nde,"__esModule",{value:!0})});var Ej=L(Lc=>{"use strict";var sdt=Lc&&Lc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),odt=Lc&&Lc.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&sdt(e,t,r)};Object.defineProperty(Lc,"__esModule",{value:!0});Lc.defaultHandler=void 0;var sde=Lp(),Oc=dj(),adt=$ge(),lT=uv(),ldt=rde(),cdt={RequestError:Oc.RequestError,CacheError:Oc.CacheError,ReadError:Oc.ReadError,HTTPError:Oc.HTTPError,MaxRedirectsError:Oc.MaxRedirectsError,TimeoutError:Oc.TimeoutError,ParseError:Oc.ParseError,CancelError:Oc.CancelError,UnsupportedProtocolError:Oc.UnsupportedProtocolError,UploadError:Oc.UploadError},udt=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:aT}=lT.default,ode=(...t)=>{let e;for(let r of t)e=aT(void 0,r,e);return e},fdt=t=>t.isStream?new lT.default(void 0,t):Oc.default(t),Adt=t=>"defaults"in t&&"options"in t.defaults,pdt=["get","post","put","patch","head","delete"];Lc.defaultHandler=(t,e)=>e(t);var ade=(t,e)=>{if(t)for(let r of t)r(e)},lde=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(s=>(a,n)=>{let c,f=s(a,p=>(c=n(p),c));if(f!==c&&!a.isStream&&c){let p=f,{then:h,catch:E,finally:C}=p;Object.setPrototypeOf(p,Object.getPrototypeOf(c)),Object.defineProperties(p,Object.getOwnPropertyDescriptors(c)),p.then=h,p.catch=E,p.finally=C}return f});let e=(s,a={},n)=>{var c,f;let p=0,h=E=>t.handlers[p++](E,p===t.handlers.length?fdt:h);if(sde.default.plainObject(s)){let E={...s,...a};lT.setNonEnumerableProperties([s,a],E),a=E,s=void 0}try{let E;try{ade(t.options.hooks.init,a),ade((c=a.hooks)===null||c===void 0?void 0:c.init,a)}catch(S){E=S}let C=aT(s,a,n??t.options);if(C[lT.kIsNormalizedAlready]=!0,E)throw new Oc.RequestError(E.message,E,C);return h(C)}catch(E){if(a.isStream)throw E;return adt.default(E,t.options.hooks.beforeError,(f=a.hooks)===null||f===void 0?void 0:f.beforeError)}};e.extend=(...s)=>{let a=[t.options],n=[...t._rawHandlers],c;for(let f of s)Adt(f)?(a.push(f.defaults.options),n.push(...f.defaults._rawHandlers),c=f.defaults.mutableDefaults):(a.push(f),"handlers"in f&&n.push(...f.handlers),c=f.mutableDefaults);return n=n.filter(f=>f!==Lc.defaultHandler),n.length===0&&n.push(Lc.defaultHandler),lde({options:ode(...a),handlers:n,mutableDefaults:!!c})};let r=async function*(s,a){let n=aT(s,a,t.options);n.resolveBodyOnly=!1;let c=n.pagination;if(!sde.default.object(c))throw new TypeError("`options.pagination` must be implemented");let f=[],{countLimit:p}=c,h=0;for(;h{let n=[];for await(let c of r(s,a))n.push(c);return n},e.paginate.each=r,e.stream=(s,a)=>e(s,{...a,isStream:!0});for(let s of pdt)e[s]=(a,n)=>e(a,{...n,method:s}),e.stream[s]=(a,n)=>e(a,{...n,method:s,isStream:!0});return Object.assign(e,cdt),Object.defineProperty(e,"defaults",{value:t.mutableDefaults?t:ldt.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=ode,e};Lc.default=lde;odt(ide(),Lc)});var fde=L((Mp,cT)=>{"use strict";var hdt=Mp&&Mp.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),cde=Mp&&Mp.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&hdt(e,t,r)};Object.defineProperty(Mp,"__esModule",{value:!0});var gdt=Ie("url"),ude=Ej(),ddt={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType==="json"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,"link"))return!1;let e=t.headers.link.split(","),r;for(let s of e){let a=s.split(";");if(a[1].includes("next")){r=a[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new gdt.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[ude.defaultHandler],mutableDefaults:!1},Ij=ude.default(ddt);Mp.default=Ij;cT.exports=Ij;cT.exports.default=Ij;cT.exports.__esModule=!0;cde(Ej(),Mp);cde(dj(),Mp)});var An={};Vt(An,{Method:()=>mde,del:()=>Cdt,get:()=>Bj,getNetworkSettings:()=>dde,post:()=>vj,put:()=>Idt,request:()=>Av});async function Cj(t){return Vl(pde,t,()=>le.readFilePromise(t).then(e=>(pde.set(t,e),e)))}function Edt({statusCode:t,statusMessage:e},r){let s=Ut(r,t,pt.NUMBER),a=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${t}`;return KE(r,`${s}${e?` (${e})`:""}`,a)}async function uT(t,{configuration:e,customErrorMessage:r}){try{return await t}catch(s){if(s.name!=="HTTPError")throw s;let a=r?.(s,e)??s.response.body?.error;a==null&&(s.message.startsWith("Response code")?a="The remote server failed to provide the requested resource":a=s.message),s.code==="ETIMEDOUT"&&s.event==="socket"&&(a+=`(can be increased via ${Ut(e,"httpTimeout",pt.SETTING)})`);let n=new Yt(35,a,c=>{s.response&&c.reportError(35,` ${Zf(e,{label:"Response Code",value:Hu(pt.NO_HINT,Edt(s.response,e))})}`),s.request&&(c.reportError(35,` ${Zf(e,{label:"Request Method",value:Hu(pt.NO_HINT,s.request.options.method)})}`),c.reportError(35,` ${Zf(e,{label:"Request URL",value:Hu(pt.URL,s.request.requestUrl)})}`)),s.request.redirects.length>0&&c.reportError(35,` ${Zf(e,{label:"Request Redirects",value:Hu(pt.NO_HINT,f3(e,s.request.redirects,pt.URL))})}`),s.request.retryCount===s.request.options.retry.limit&&c.reportError(35,` ${Zf(e,{label:"Request Retry Count",value:Hu(pt.NO_HINT,`${Ut(e,s.request.retryCount,pt.NUMBER)} (can be increased via ${Ut(e,"httpRetry",pt.SETTING)})`)})}`)});throw n.originalError=s,n}}function dde(t,e){let r=[...e.configuration.get("networkSettings")].sort(([c],[f])=>f.length-c.length),s={enableNetwork:void 0,httpsCaFilePath:void 0,httpProxy:void 0,httpsProxy:void 0,httpsKeyFilePath:void 0,httpsCertFilePath:void 0},a=Object.keys(s),n=typeof t=="string"?new URL(t):t;for(let[c,f]of r)if(wj.default.isMatch(n.hostname,c))for(let p of a){let h=f.get(p);h!==null&&typeof s[p]>"u"&&(s[p]=h)}for(let c of a)typeof s[c]>"u"&&(s[c]=e.configuration.get(c));return s}async function Av(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c="GET",wrapNetworkRequest:f}){let p={target:t,body:e,configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c},h=async()=>await wdt(t,e,p),E=typeof f<"u"?await f(h,p):h;return await(await r.reduceHook(S=>S.wrapNetworkRequest,E,p))()}async function Bj(t,{configuration:e,jsonResponse:r,customErrorMessage:s,wrapNetworkRequest:a,...n}){let c=()=>uT(Av(t,null,{configuration:e,wrapNetworkRequest:a,...n}),{configuration:e,customErrorMessage:s}).then(p=>p.body),f=await(typeof a<"u"?c():Vl(Ade,t,()=>c().then(p=>(Ade.set(t,p),p))));return r?JSON.parse(f.toString()):f}async function Idt(t,e,{customErrorMessage:r,...s}){return(await uT(Av(t,e,{...s,method:"PUT"}),{customErrorMessage:r,configuration:s.configuration})).body}async function vj(t,e,{customErrorMessage:r,...s}){return(await uT(Av(t,e,{...s,method:"POST"}),{customErrorMessage:r,configuration:s.configuration})).body}async function Cdt(t,{customErrorMessage:e,...r}){return(await uT(Av(t,null,{...r,method:"DELETE"}),{customErrorMessage:e,configuration:r.configuration})).body}async function wdt(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c="GET"}){let f=typeof t=="string"?new URL(t):t,p=dde(f,{configuration:r});if(p.enableNetwork===!1)throw new Yt(80,`Request to '${f.href}' has been blocked because of your configuration settings`);if(f.protocol==="http:"&&!wj.default.isMatch(f.hostname,r.get("unsafeHttpWhitelist")))throw new Yt(81,`Unsafe http requests must be explicitly whitelisted in your configuration (${f.hostname})`);let h={headers:s,method:c};h.responseType=n?"json":"buffer",e!==null&&(Buffer.isBuffer(e)||!a&&typeof e=="string"?h.body=e:h.json=e);let E=r.get("httpTimeout"),C=r.get("httpRetry"),S=r.get("enableStrictSsl"),P=p.httpsCaFilePath,I=p.httpsCertFilePath,R=p.httpsKeyFilePath,{default:N}=await Promise.resolve().then(()=>et(fde())),U=P?await Cj(P):void 0,W=I?await Cj(I):void 0,te=R?await Cj(R):void 0,ie={rejectUnauthorized:S,ca:U,cert:W,key:te},Ae={http:p.httpProxy?new Uhe({proxy:p.httpProxy,proxyRequestOptions:ie}):mdt,https:p.httpsProxy?new Hhe({proxy:p.httpsProxy,proxyRequestOptions:ie}):ydt},ce=N.extend({timeout:{socket:E},retry:C,agent:Ae,https:{rejectUnauthorized:S,certificateAuthority:U,certificate:W,key:te},...h});return r.getLimit("networkConcurrency")(()=>ce(f))}var hde,gde,wj,Ade,pde,mdt,ydt,mde,fT=Ct(()=>{bt();jhe();hde=Ie("https"),gde=Ie("http"),wj=et(Sa());Fc();Qc();kc();Ade=new Map,pde=new Map,mdt=new gde.Agent({keepAlive:!0}),ydt=new hde.Agent({keepAlive:!0});mde=(a=>(a.GET="GET",a.PUT="PUT",a.POST="POST",a.DELETE="DELETE",a))(mde||{})});var ps={};Vt(ps,{availableParallelism:()=>Dj,getArchitecture:()=>pv,getArchitectureName:()=>bdt,getArchitectureSet:()=>Sj,getCaller:()=>Qdt,major:()=>Bdt,openUrl:()=>vdt});function Ddt(){if(process.platform==="darwin"||process.platform==="win32")return null;let t;try{t=le.readFileSync(Sdt)}catch{}if(typeof t<"u"){if(t&&(t.includes("GLIBC")||t.includes("libc")))return"glibc";if(t&&t.includes("musl"))return"musl"}let r=(process.report?.getReport()??{}).sharedObjects??[],s=/\/(?:(ld-linux-|[^/]+-linux-gnu\/)|(libc.musl-|ld-musl-))/;return A0(r,a=>{let n=a.match(s);if(!n)return A0.skip;if(n[1])return"glibc";if(n[2])return"musl";throw new Error("Assertion failed: Expected the libc variant to have been detected")})??null}function pv(){return Ede=Ede??{os:process.platform,cpu:process.arch,libc:Ddt()}}function bdt(t=pv()){return t.libc?`${t.os}-${t.cpu}-${t.libc}`:`${t.os}-${t.cpu}`}function Sj(){let t=pv();return Ide=Ide??{os:[t.os],cpu:[t.cpu],libc:t.libc?[t.libc]:[]}}function kdt(t){let e=Pdt.exec(t);if(!e)return null;let r=e[2]&&e[2].indexOf("native")===0,s=e[2]&&e[2].indexOf("eval")===0,a=xdt.exec(e[2]);return s&&a!=null&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{file:r?null:e[2],methodName:e[1]||"",arguments:r?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}function Qdt(){let e=new Error().stack.split(` -`)[3];return kdt(e)}function Dj(){return typeof AT.default.availableParallelism<"u"?AT.default.availableParallelism():Math.max(1,AT.default.cpus().length)}var AT,Bdt,yde,vdt,Sdt,Ede,Ide,Pdt,xdt,pT=Ct(()=>{bt();AT=et(Ie("os"));hT();kc();Bdt=Number(process.versions.node.split(".")[0]),yde=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),vdt=typeof yde<"u"?async t=>{try{return await bj(yde,[t],{cwd:K.cwd()}),!0}catch{return!1}}:void 0,Sdt="/usr/bin/ldd";Pdt=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,xdt=/\((\S*)(?::(\d+))(?::(\d+))\)/});function Tj(t,e,r,s,a){let n=ev(r);if(s.isArray||s.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((c,f)=>Pj(t,`${e}[${f}]`,c,s,a)):String(n).split(/,/).map(c=>Pj(t,e,c,s,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return Pj(t,e,r,s,a)}function Pj(t,e,r,s,a){let n=ev(r);switch(s.type){case"ANY":return RQ(n);case"SHAPE":return Ndt(t,e,r,s,a);case"MAP":return Odt(t,e,r,s,a)}if(n===null&&!s.isNullable&&s.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if(s.values?.includes(n))return n;let f=(()=>{if(s.type==="BOOLEAN"&&typeof n!="string")return MB(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${e}" to be a string, got ${typeof n}`);let p=Yk(n,{env:t.env});switch(s.type){case"ABSOLUTE_PATH":{let h=a,E=rH(r);return E&&E[0]!=="<"&&(h=K.dirname(E)),K.resolve(h,ue.toPortablePath(p))}case"LOCATOR_LOOSE":return Rp(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return Rp(p);case"BOOLEAN":return MB(p);default:return p}})();if(s.values&&!s.values.includes(f))throw new Error(`Invalid value, expected one of ${s.values.join(", ")}`);return f}function Ndt(t,e,r,s,a){let n=ev(r);if(typeof n!="object"||Array.isArray(n))throw new nt(`Object configuration settings "${e}" must be an object`);let c=Rj(t,s,{ignoreArrays:!0});if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=`${e}.${f}`;if(!s.properties[f])throw new nt(`Unrecognized configuration settings found: ${e}.${f} - run "yarn config -v" to see the list of settings supported in Yarn`);c.set(f,Tj(t,h,p,s.properties[f],a))}return c}function Odt(t,e,r,s,a){let n=ev(r),c=new Map;if(typeof n!="object"||Array.isArray(n))throw new nt(`Map configuration settings "${e}" must be an object`);if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=s.normalizeKeys?s.normalizeKeys(f):f,E=`${e}['${h}']`,C=s.valueDefinition;c.set(h,Tj(t,E,p,C,a))}return c}function Rj(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let s=new Map;for(let[a,n]of Object.entries(e.properties))s.set(a,Rj(t,n));return s}case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(s=>K.normalize(s)):K.isAbsolute(e.default)?K.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(s=>K.resolve(t.projectCwd,s)):K.resolve(t.projectCwd,e.default);default:return e.default}}function dT(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return Fdt;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return ue.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let s=[];for(let a of t)s.push(dT(a,e,r));return s}if(e.type==="MAP"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=dT(n,e.valueDefinition,r);typeof c<"u"&&s.set(a,c)}return s}if(e.type==="SHAPE"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=e.properties[a],f=dT(n,c,r);typeof f<"u"&&s.set(a,f)}return s}return t}function Ldt(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(mT)&&(e=(0,wde.default)(e.slice(mT.length)),t[e]=r);return t}function kj(){let t=`${mT}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return Qj}async function Cde(t){try{return await le.readFilePromise(t)}catch{return Buffer.of()}}async function Mdt(t,e){return Buffer.compare(...await Promise.all([Cde(t),Cde(e)]))===0}async function _dt(t,e){let[r,s]=await Promise.all([le.statPromise(t),le.statPromise(e)]);return r.dev===s.dev&&r.ino===s.ino}async function Hdt({configuration:t,selfPath:e}){let r=t.get("yarnPath");return t.get("ignorePath")||r===null||r===e||await Udt(r,e)?null:r}var wde,_p,Bde,vde,Sde,xj,Tdt,hv,Rdt,Up,mT,Qj,Fdt,gv,Dde,yT,gT,Udt,ze,dv=Ct(()=>{bt();Bc();wde=et(zre()),_p=et(Rd());Wt();Bde=et(qne()),vde=Ie("module"),Sde=et(Od()),xj=Ie("stream");nhe();sI();K8();J8();z8();Qhe();Z8();$d();Ohe();NQ();Qc();E0();fT();kc();pT();Np();Yo();Tdt=function(){if(!_p.GITHUB_ACTIONS||!process.env.GITHUB_EVENT_PATH)return!1;let t=ue.toPortablePath(process.env.GITHUB_EVENT_PATH),e;try{e=le.readJsonSync(t)}catch{return!1}return!(!("repository"in e)||!e.repository||(e.repository.private??!0))}(),hv=new Set(["@yarnpkg/plugin-constraints","@yarnpkg/plugin-exec","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]),Rdt=new Set(["isTestEnv","injectNpmUser","injectNpmPassword","injectNpm2FaToken","zipDataEpilogue","cacheCheckpointOverride","cacheVersionOverride","lockfileVersionOverride","binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput","home","confDir","registry","ignoreCwd"]),Up=/^(?!v)[a-z0-9._-]+$/i,mT="yarn_",Qj=".yarnrc.yml",Fdt="********",gv=(E=>(E.ANY="ANY",E.BOOLEAN="BOOLEAN",E.ABSOLUTE_PATH="ABSOLUTE_PATH",E.LOCATOR="LOCATOR",E.LOCATOR_LOOSE="LOCATOR_LOOSE",E.NUMBER="NUMBER",E.STRING="STRING",E.SECRET="SECRET",E.SHAPE="SHAPE",E.MAP="MAP",E))(gv||{}),Dde=pt,yT=(r=>(r.JUNCTIONS="junctions",r.SYMLINKS="symlinks",r))(yT||{}),gT={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:"STRING",default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:"ABSOLUTE_PATH",default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:"BOOLEAN",default:!1},globalFolder:{description:"Folder where all system-global files are stored",type:"ABSOLUTE_PATH",default:iH()},cacheFolder:{description:"Folder where the cache files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:"NUMBER",values:["mixed",0,1,2,3,4,5,6,7,8,9],default:0},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)",type:"ABSOLUTE_PATH",default:"./.yarn/__virtual__"},installStatePath:{description:"Path of the file where the install state will be persisted",type:"ABSOLUTE_PATH",default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:"STRING",default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:"STRING",default:kj()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:"BOOLEAN",default:!0},cacheMigrationMode:{description:"Defines the conditions under which Yarn upgrades should cause the cache archives to be regenerated.",type:"STRING",values:["always","match-spec","required-only"],default:"always"},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:"BOOLEAN",default:zk,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:"BOOLEAN",default:u3,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:"BOOLEAN",default:_p.isCI,defaultText:""},enableMessageNames:{description:"If true, the CLI will prefix most messages with codes suitable for search engines",type:"BOOLEAN",default:!0},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:"BOOLEAN",default:!_p.isCI,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:"BOOLEAN",default:!0},enableTips:{description:"If true, installs will print a helpful message every day of the week",type:"BOOLEAN",default:!_p.isCI,defaultText:""},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:"BOOLEAN",default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:"BOOLEAN",default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:"STRING",default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:"STRING",default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:"STRING",default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:"BOOLEAN",default:!0},supportedArchitectures:{description:"Architectures that Yarn will fetch and inject into the resolver",type:"SHAPE",properties:{os:{description:"Array of supported process.platform strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},cpu:{description:"Array of supported process.arch strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},libc:{description:"Array of supported libc libraries, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]}}},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:"BOOLEAN",default:!0},enableNetwork:{description:"If false, Yarn will refuse to use the network if required to",type:"BOOLEAN",default:!0},enableOfflineMode:{description:"If true, Yarn will attempt to retrieve files and metadata from the global cache rather than the network",type:"BOOLEAN",default:!1},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:"STRING",default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:"NUMBER",default:6e4},httpRetry:{description:"Retry times on http failure",type:"NUMBER",default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:"NUMBER",default:50},taskPoolConcurrency:{description:"Maximal amount of concurrent heavy task processing",type:"NUMBER",default:Dj()},taskPoolMode:{description:"Execution strategy for heavy tasks",type:"STRING",values:["async","workers"],default:"workers"},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{httpsCaFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:"BOOLEAN",default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null}}}},httpsCaFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:"BOOLEAN",default:!0},logFilters:{description:"Overrides for log levels",type:"SHAPE",isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:"STRING",default:void 0},text:{description:"Code of the texts covered by this override",type:"STRING",default:void 0},pattern:{description:"Code of the patterns covered by this override",type:"STRING",default:void 0},level:{description:"Log level override, set to null to remove override",type:"STRING",values:Object.values(Xk),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:"BOOLEAN",default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:"NUMBER",default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:"STRING",default:null},enableHardenedMode:{description:"If true, automatically enable --check-resolutions --refresh-lockfile on installs",type:"BOOLEAN",default:_p.isPR&&Tdt,defaultText:""},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:"BOOLEAN",default:!0},enableStrictSettings:{description:"If true, unknown settings will cause Yarn to abort",type:"BOOLEAN",default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:"BOOLEAN",default:!1},enableCacheClean:{description:"If false, disallows the `cache clean` command",type:"BOOLEAN",default:!0},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:"STRING",default:"throw"},injectEnvironmentFiles:{description:"List of all the environment files that Yarn should inject inside the process when it starts",type:"ABSOLUTE_PATH",default:[".env.yarn?"],isArray:!0},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:"MAP",valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:"SHAPE",properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:"MAP",valueDefinition:{description:"A range",type:"STRING"}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:"MAP",valueDefinition:{description:"A semver range",type:"STRING"}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:"MAP",valueDefinition:{description:"The peerDependency meta",type:"SHAPE",properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:"BOOLEAN",default:!1}}}}}}}};Udt=process.platform==="win32"?Mdt:_dt;ze=class t{constructor(e){this.isCI=_p.isCI;this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.env={};this.limits=new Map;this.packageExtensions=null;this.startingCwd=e}static{this.deleteProperty=Symbol()}static{this.telemetry=null}static create(e,r,s){let a=new t(e);typeof r<"u"&&!(r instanceof Map)&&(a.projectCwd=r),a.importSettings(gT);let n=typeof s<"u"?s:r instanceof Map?r:new Map;for(let[c,f]of n)a.activatePlugin(c,f);return a}static async find(e,r,{strict:s=!0,usePathCheck:a=null,useRc:n=!0}={}){let c=Ldt();delete c.rcFilename;let f=new t(e),p=await t.findRcFiles(e),h=await t.findFolderRcFile(fI());h&&(p.find(me=>me.path===h.path)||p.unshift(h));let E=Nhe(p.map(ce=>[ce.path,ce.data])),C=vt.dot,S=new Set(Object.keys(gT)),P=({yarnPath:ce,ignorePath:me,injectEnvironmentFiles:pe})=>({yarnPath:ce,ignorePath:me,injectEnvironmentFiles:pe}),I=({yarnPath:ce,ignorePath:me,injectEnvironmentFiles:pe,...Be})=>{let Ce={};for(let[g,we]of Object.entries(Be))S.has(g)&&(Ce[g]=we);return Ce},R=({yarnPath:ce,ignorePath:me,...pe})=>{let Be={};for(let[Ce,g]of Object.entries(pe))S.has(Ce)||(Be[Ce]=g);return Be};if(f.importSettings(P(gT)),f.useWithSource("",P(c),e,{strict:!1}),E){let[ce,me]=E;f.useWithSource(ce,P(me),C,{strict:!1})}if(a){if(await Hdt({configuration:f,selfPath:a})!==null)return f;f.useWithSource("",{ignorePath:!0},e,{strict:!1,overwrite:!0})}let N=await t.findProjectCwd(e);f.startingCwd=e,f.projectCwd=N;let U=Object.assign(Object.create(null),process.env);f.env=U;let W=await Promise.all(f.get("injectEnvironmentFiles").map(async ce=>{let me=ce.endsWith("?")?await le.readFilePromise(ce.slice(0,-1),"utf8").catch(()=>""):await le.readFilePromise(ce,"utf8");return(0,Bde.parse)(me)}));for(let ce of W)for(let[me,pe]of Object.entries(ce))f.env[me]=Yk(pe,{env:U});if(f.importSettings(I(gT)),f.useWithSource("",I(c),e,{strict:s}),E){let[ce,me]=E;f.useWithSource(ce,I(me),C,{strict:s})}let te=ce=>"default"in ce?ce.default:ce,ie=new Map([["@@core",rhe]]);if(r!==null)for(let ce of r.plugins.keys())ie.set(ce,te(r.modules.get(ce)));for(let[ce,me]of ie)f.activatePlugin(ce,me);let Ae=new Map([]);if(r!==null){let ce=new Map;for(let[Be,Ce]of r.modules)ce.set(Be,()=>Ce);let me=new Set,pe=async(Be,Ce)=>{let{factory:g,name:we}=kp(Be);if(!g||me.has(we))return;let ye=new Map(ce),fe=X=>{if((0,vde.isBuiltin)(X))return kp(X);if(ye.has(X))return ye.get(X)();throw new nt(`This plugin cannot access the package referenced via ${X} which is neither a builtin, nor an exposed entry`)},se=await qE(async()=>te(await g(fe)),X=>`${X} (when initializing ${we}, defined in ${Ce})`);ce.set(we,()=>se),me.add(we),Ae.set(we,se)};if(c.plugins)for(let Be of c.plugins.split(";")){let Ce=K.resolve(e,ue.toPortablePath(Be));await pe(Ce,"")}for(let{path:Be,cwd:Ce,data:g}of p)if(n&&Array.isArray(g.plugins))for(let we of g.plugins){let ye=typeof we!="string"?we.path:we,fe=we?.spec??"",se=we?.checksum??"";if(hv.has(fe))continue;let X=K.resolve(Ce,ue.toPortablePath(ye));if(!await le.existsPromise(X)){if(!fe){let dt=Ut(f,K.basename(X,".cjs"),pt.NAME),j=Ut(f,".gitignore",pt.NAME),rt=Ut(f,f.values.get("rcFilename"),pt.NAME),Fe=Ut(f,"https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored",pt.URL);throw new nt(`Missing source for the ${dt} plugin - please try to remove the plugin from ${rt} then reinstall it manually. This error usually occurs because ${j} is incorrect, check ${Fe} to make sure your plugin folder isn't gitignored.`)}if(!fe.match(/^https?:/)){let dt=Ut(f,K.basename(X,".cjs"),pt.NAME),j=Ut(f,f.values.get("rcFilename"),pt.NAME);throw new nt(`Failed to recognize the source for the ${dt} plugin - please try to delete the plugin from ${j} then reinstall it manually.`)}let De=await Bj(fe,{configuration:f}),Re=fs(De);if(se&&se!==Re){let dt=Ut(f,K.basename(X,".cjs"),pt.NAME),j=Ut(f,f.values.get("rcFilename"),pt.NAME),rt=Ut(f,`yarn plugin import ${fe}`,pt.CODE);throw new nt(`Failed to fetch the ${dt} plugin from its remote location: its checksum seems to have changed. If this is expected, please remove the plugin from ${j} then run ${rt} to reimport it.`)}await le.mkdirPromise(K.dirname(X),{recursive:!0}),await le.writeFilePromise(X,De)}await pe(X,Be)}}for(let[ce,me]of Ae)f.activatePlugin(ce,me);if(f.useWithSource("",R(c),e,{strict:s}),E){let[ce,me]=E;f.useWithSource(ce,R(me),C,{strict:s})}return f.get("enableGlobalCache")&&(f.values.set("cacheFolder",`${f.get("globalFolder")}/cache`),f.sources.set("cacheFolder","")),f}static async findRcFiles(e){let r=kj(),s=[],a=e,n=null;for(;a!==n;){n=a;let c=K.join(n,r);if(le.existsSync(c)){let f,p;try{p=await le.readFilePromise(c,"utf8"),f=cs(p)}catch{let h="";throw p?.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(h=" (in particular, make sure you list the colons after each key name)"),new nt(`Parse error when loading ${c}; please check it's proper Yaml${h}`)}s.unshift({path:c,cwd:n,data:f})}a=K.dirname(n)}return s}static async findFolderRcFile(e){let r=K.join(e,Er.rc),s;try{s=await le.readFilePromise(r,"utf8")}catch(n){if(n.code==="ENOENT")return null;throw n}let a=cs(s);return{path:r,cwd:e,data:a}}static async findProjectCwd(e){let r=null,s=e,a=null;for(;s!==a;){if(a=s,le.existsSync(K.join(a,Er.lockfile)))return a;le.existsSync(K.join(a,Er.manifest))&&(r=a),s=K.dirname(a)}return r}static async updateConfiguration(e,r,s={}){let a=kj(),n=K.join(e,a),c=le.existsSync(n)?cs(await le.readFilePromise(n,"utf8")):{},f=!1,p;if(typeof r=="function"){try{p=r(c)}catch{p=r({})}if(p===c)return!1}else{p=c;for(let h of Object.keys(r)){let E=c[h],C=r[h],S;if(typeof C=="function")try{S=C(E)}catch{S=C(void 0)}else S=C;E!==S&&(S===t.deleteProperty?delete p[h]:p[h]=S,f=!0)}if(!f)return!1}return await le.changeFilePromise(n,il(p),{automaticNewlines:!0}),!0}static async addPlugin(e,r){r.length!==0&&await t.updateConfiguration(e,s=>{let a=s.plugins??[];if(a.length===0)return{...s,plugins:r};let n=[],c=[...r];for(let f of a){let p=typeof f!="string"?f.path:f,h=c.find(E=>E.path===p);h?(n.push(h),c=c.filter(E=>E!==h)):n.push(f)}return n.push(...c),{...s,plugins:n}})}static async updateHomeConfiguration(e){let r=fI();return await t.updateConfiguration(r,e)}activatePlugin(e,r){this.plugins.set(e,r),typeof r.configuration<"u"&&this.importSettings(r.configuration)}importSettings(e){for(let[r,s]of Object.entries(e))if(s!=null){if(this.settings.has(r))throw new Error(`Cannot redefine settings "${r}"`);this.settings.set(r,s),this.values.set(r,Rj(this,s))}}useWithSource(e,r,s,a){try{this.use(e,r,s,a)}catch(n){throw n.message+=` (in ${Ut(this,e,pt.PATH)})`,n}}use(e,r,s,{strict:a=!0,overwrite:n=!1}={}){a=a&&this.get("enableStrictSettings");for(let c of["enableStrictSettings",...Object.keys(r)]){let f=r[c],p=rH(f);if(p&&(e=p),typeof f>"u"||c==="plugins"||e===""&&Rdt.has(c))continue;if(c==="rcFilename")throw new nt(`The rcFilename settings can only be set via ${`${mT}RC_FILENAME`.toUpperCase()}, not via a rc file`);let h=this.settings.get(c);if(!h){let C=fI(),S=e[0]!=="<"?K.dirname(e):null;if(a&&!(S!==null?C===S:!1))throw new nt(`Unrecognized or legacy configuration settings found: ${c} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(c,e);continue}if(this.sources.has(c)&&!(n||h.type==="MAP"||h.isArray&&h.concatenateValues))continue;let E;try{E=Tj(this,c,f,h,s)}catch(C){throw C.message+=` in ${Ut(this,e,pt.PATH)}`,C}if(c==="enableStrictSettings"&&e!==""){a=E;continue}if(h.type==="MAP"){let C=this.values.get(c);this.values.set(c,new Map(n?[...C,...E]:[...E,...C])),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else if(h.isArray&&h.concatenateValues){let C=this.values.get(c);this.values.set(c,n?[...C,...E]:[...E,...C]),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else this.values.set(c,E),this.sources.set(c,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:r=!1,getNativePaths:s=!1}){let a=this.get(e),n=this.settings.get(e);if(typeof n>"u")throw new nt(`Couldn't find a configuration settings named "${e}"`);return dT(a,n,{hideSecrets:r,getNativePaths:s})}getSubprocessStreams(e,{header:r,prefix:s,report:a}){let n,c,f=le.createWriteStream(e);if(this.get("enableInlineBuilds")){let p=a.createStreamReporter(`${s} ${Ut(this,"STDOUT","green")}`),h=a.createStreamReporter(`${s} ${Ut(this,"STDERR","red")}`);n=new xj.PassThrough,n.pipe(p),n.pipe(f),c=new xj.PassThrough,c.pipe(h),c.pipe(f)}else n=f,c=f,typeof r<"u"&&n.write(`${r} -`);return{stdout:n,stderr:c}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])e.push(new s);return new em([new TQ,new Ei,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])e.push(new s);return new aI([new lI,new cI,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let s of r.linkers||[])e.push(new s);return e}getSupportedArchitectures(){let e=pv(),r=this.get("supportedArchitectures"),s=r.get("os");s!==null&&(s=s.map(c=>c==="current"?e.os:c));let a=r.get("cpu");a!==null&&(a=a.map(c=>c==="current"?e.cpu:c));let n=r.get("libc");return n!==null&&(n=Yl(n,c=>c==="current"?e.libc??Yl.skip:c)),{os:s,cpu:a,libc:n}}isInteractive({interactive:e,stdout:r}){return r.isTTY?e??this.get("preferInteractive"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(s,a,{userProvided:n=!1}={})=>{if(!ul(s.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let c=new Ht;c.load(a,{yamlCompatibilityMode:!0});let f=LB(e,s.identHash),p=[];f.push([s.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:s};for(let E of c.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of c.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,C]of c.peerDependenciesMeta)for(let[S,P]of Object.entries(C))p.push({...h,type:"PeerDependencyMeta",selector:E,key:S,value:P})};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,a]of this.get("packageExtensions"))r(I0(s,!0),Wk(a),{userProvided:!0});return e}normalizeLocator(e){return ul(e.reference)?Vs(e,`${this.get("defaultProtocol")}${e.reference}`):Up.test(e.reference)?Vs(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return ul(e.range)?On(e,`${this.get("defaultProtocol")}${e.range}`):Up.test(e.range)?On(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(e,{packageExtensions:r}){let s=WB(e),a=r.get(e.identHash);if(typeof a<"u"){let c=e.version;if(c!==null){for(let[f,p]of a)if(eA(c,f))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof s.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof s.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=s.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",Vl(s.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:r3(h)}}}let n=c=>c.scope?`${c.scope}__${c.name}`:`${c.name}`;for(let c of s.peerDependenciesMeta.keys()){let f=Da(c);s.peerDependencies.has(f.identHash)||s.peerDependencies.set(f.identHash,On(f,"*"))}for(let c of s.peerDependencies.values()){if(c.scope==="types")continue;let f=n(c),p=ba("types",f),h=cn(p);s.peerDependencies.has(p.identHash)||s.peerDependenciesMeta.has(h)||s.dependencies.has(p.identHash)||(s.peerDependencies.set(p.identHash,On(p,"*")),s.peerDependenciesMeta.set(h,{optional:!0}))}return s.dependencies=new Map(Ys(s.dependencies,([,c])=>ll(c))),s.peerDependencies=new Map(Ys(s.peerDependencies,([,c])=>ll(c))),s}getLimit(e){return Vl(this.limits,e,()=>(0,Sde.default)(this.get(e)))}async triggerHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);n&&await n(...r)}}async triggerMultipleHooks(e,r){for(let s of r)await this.triggerHook(e,...s)}async reduceHook(e,r,...s){let a=r;for(let n of this.plugins.values()){let c=n.hooks;if(!c)continue;let f=e(c);f&&(a=await f(a,...s))}return a}async firstHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);if(!n)continue;let c=await n(...r);if(typeof c<"u")return c}return null}}});var Gr={};Vt(Gr,{EndStrategy:()=>Lj,ExecError:()=>ET,PipeError:()=>mv,execvp:()=>bj,pipevp:()=>Yu});function im(t){return t!==null&&typeof t.fd=="number"}function Fj(){}function Nj(){for(let t of sm)t.kill()}async function Yu(t,e,{cwd:r,env:s=process.env,strict:a=!1,stdin:n=null,stdout:c,stderr:f,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":im(n)&&(h[0]=n),im(c)&&(h[1]=c),im(f)&&(h[2]=f);let E=(0,Oj.default)(t,e,{cwd:ue.fromPortablePath(r),env:{...s,PWD:ue.fromPortablePath(r)},stdio:h});sm.add(E),sm.size===1&&(process.on("SIGINT",Fj),process.on("SIGTERM",Nj)),!im(n)&&n!==null&&n.pipe(E.stdin),im(c)||E.stdout.pipe(c,{end:!1}),im(f)||E.stderr.pipe(f,{end:!1});let C=()=>{for(let S of new Set([c,f]))im(S)||S.end()};return new Promise((S,P)=>{E.on("error",I=>{sm.delete(E),sm.size===0&&(process.off("SIGINT",Fj),process.off("SIGTERM",Nj)),(p===2||p===1)&&C(),P(I)}),E.on("close",(I,R)=>{sm.delete(E),sm.size===0&&(process.off("SIGINT",Fj),process.off("SIGTERM",Nj)),(p===2||p===1&&I!==0)&&C(),I===0||!a?S({code:Mj(I,R)}):P(new mv({fileName:t,code:I,signal:R}))})})}async function bj(t,e,{cwd:r,env:s=process.env,encoding:a="utf8",strict:n=!1}){let c=["ignore","pipe","pipe"],f=[],p=[],h=ue.fromPortablePath(r);typeof s.PWD<"u"&&(s={...s,PWD:h});let E=(0,Oj.default)(t,e,{cwd:h,env:s,stdio:c});return E.stdout.on("data",C=>{f.push(C)}),E.stderr.on("data",C=>{p.push(C)}),await new Promise((C,S)=>{E.on("error",P=>{let I=ze.create(r),R=Ut(I,t,pt.PATH);S(new Yt(1,`Process ${R} failed to spawn`,N=>{N.reportError(1,` ${Zf(I,{label:"Thrown Error",value:Hu(pt.NO_HINT,P.message)})}`)}))}),E.on("close",(P,I)=>{let R=a==="buffer"?Buffer.concat(f):Buffer.concat(f).toString(a),N=a==="buffer"?Buffer.concat(p):Buffer.concat(p).toString(a);P===0||!n?C({code:Mj(P,I),stdout:R,stderr:N}):S(new ET({fileName:t,code:P,signal:I,stdout:R,stderr:N}))})})}function Mj(t,e){let r=jdt.get(e);return typeof r<"u"?128+r:t??1}function qdt(t,e,{configuration:r,report:s}){s.reportError(1,` ${Zf(r,t!==null?{label:"Exit Code",value:Hu(pt.NUMBER,t)}:{label:"Exit Signal",value:Hu(pt.CODE,e)})}`)}var Oj,Lj,mv,ET,sm,jdt,hT=Ct(()=>{bt();Oj=et(j_());dv();Fc();Qc();Lj=(s=>(s[s.Never=0]="Never",s[s.ErrorCode=1]="ErrorCode",s[s.Always=2]="Always",s))(Lj||{}),mv=class extends Yt{constructor({fileName:e,code:r,signal:s}){let a=ze.create(K.cwd()),n=Ut(a,e,pt.PATH);super(1,`Child ${n} reported an error`,c=>{qdt(r,s,{configuration:a,report:c})}),this.code=Mj(r,s)}},ET=class extends mv{constructor({fileName:e,code:r,signal:s,stdout:a,stderr:n}){super({fileName:e,code:r,signal:s}),this.stdout=a,this.stderr=n}};sm=new Set;jdt=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]])});function Pde(t){bde=t}function yv(){return typeof _j>"u"&&(_j=bde()),_j}var _j,bde,Uj=Ct(()=>{bde=()=>{throw new Error("Assertion failed: No libzip instance is available, and no factory was configured")}});var xde=L((IT,jj)=>{var Gdt=Object.assign({},Ie("fs")),Hj=function(){var t=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(t=t||__filename),function(e){e=e||{};var r=typeof e<"u"?e:{},s,a;r.ready=new Promise(function(Je,st){s=Je,a=st});var n={},c;for(c in r)r.hasOwnProperty(c)&&(n[c]=r[c]);var f=[],p="./this.program",h=function(Je,st){throw st},E=!1,C=!0,S="";function P(Je){return r.locateFile?r.locateFile(Je,S):S+Je}var I,R,N,U;C&&(E?S=Ie("path").dirname(S)+"/":S=__dirname+"/",I=function(st,St){var lr=Me(st);return lr?St?lr:lr.toString():(N||(N=Gdt),U||(U=Ie("path")),st=U.normalize(st),N.readFileSync(st,St?null:"utf8"))},R=function(st){var St=I(st,!0);return St.buffer||(St=new Uint8Array(St)),we(St.buffer),St},process.argv.length>1&&(p=process.argv[1].replace(/\\/g,"/")),f=process.argv.slice(2),h=function(Je){process.exit(Je)},r.inspect=function(){return"[Emscripten Module object]"});var W=r.print||console.log.bind(console),te=r.printErr||console.warn.bind(console);for(c in n)n.hasOwnProperty(c)&&(r[c]=n[c]);n=null,r.arguments&&(f=r.arguments),r.thisProgram&&(p=r.thisProgram),r.quit&&(h=r.quit);var ie=0,Ae=function(Je){ie=Je},ce;r.wasmBinary&&(ce=r.wasmBinary);var me=r.noExitRuntime||!0;typeof WebAssembly!="object"&&ns("no native wasm support detected");function pe(Je,st,St){switch(st=st||"i8",st.charAt(st.length-1)==="*"&&(st="i32"),st){case"i1":return Ye[Je>>0];case"i8":return Ye[Je>>0];case"i16":return Eh((Je>>1)*2);case"i32":return no((Je>>2)*4);case"i64":return no((Je>>2)*4);case"float":return pf((Je>>2)*4);case"double":return yh((Je>>3)*8);default:ns("invalid type for getValue: "+st)}return null}var Be,Ce=!1,g;function we(Je,st){Je||ns("Assertion failed: "+st)}function ye(Je){var st=r["_"+Je];return we(st,"Cannot call unknown function "+Je+", make sure it is exported"),st}function fe(Je,st,St,lr,ee){var Ee={string:function(Gi){var Tn=0;if(Gi!=null&&Gi!==0){var Ga=(Gi.length<<2)+1;Tn=Bi(Ga),dt(Gi,Tn,Ga)}return Tn},array:function(Gi){var Tn=Bi(Gi.length);return Fe(Gi,Tn),Tn}};function Oe(Gi){return st==="string"?De(Gi):st==="boolean"?!!Gi:Gi}var gt=ye(Je),yt=[],Dt=0;if(lr)for(var tr=0;tr=St)&&ke[lr];)++lr;return X.decode(ke.subarray(Je,lr))}function Re(Je,st,St,lr){if(!(lr>0))return 0;for(var ee=St,Ee=St+lr-1,Oe=0;Oe=55296&><=57343){var yt=Je.charCodeAt(++Oe);gt=65536+((gt&1023)<<10)|yt&1023}if(gt<=127){if(St>=Ee)break;st[St++]=gt}else if(gt<=2047){if(St+1>=Ee)break;st[St++]=192|gt>>6,st[St++]=128|gt&63}else if(gt<=65535){if(St+2>=Ee)break;st[St++]=224|gt>>12,st[St++]=128|gt>>6&63,st[St++]=128|gt&63}else{if(St+3>=Ee)break;st[St++]=240|gt>>18,st[St++]=128|gt>>12&63,st[St++]=128|gt>>6&63,st[St++]=128|gt&63}}return st[St]=0,St-ee}function dt(Je,st,St){return Re(Je,ke,st,St)}function j(Je){for(var st=0,St=0;St=55296&&lr<=57343&&(lr=65536+((lr&1023)<<10)|Je.charCodeAt(++St)&1023),lr<=127?++st:lr<=2047?st+=2:lr<=65535?st+=3:st+=4}return st}function rt(Je){var st=j(Je)+1,St=Ma(st);return St&&Re(Je,Ye,St,st),St}function Fe(Je,st){Ye.set(Je,st)}function Ne(Je,st){return Je%st>0&&(Je+=st-Je%st),Je}var Pe,Ye,ke,it,_e,x,w,b,y,F;function z(Je){Pe=Je,r.HEAP_DATA_VIEW=F=new DataView(Je),r.HEAP8=Ye=new Int8Array(Je),r.HEAP16=it=new Int16Array(Je),r.HEAP32=x=new Int32Array(Je),r.HEAPU8=ke=new Uint8Array(Je),r.HEAPU16=_e=new Uint16Array(Je),r.HEAPU32=w=new Uint32Array(Je),r.HEAPF32=b=new Float32Array(Je),r.HEAPF64=y=new Float64Array(Je)}var Z=r.INITIAL_MEMORY||16777216,$,oe=[],xe=[],Te=[],lt=!1;function It(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Pt(r.preRun.shift());Fs(oe)}function qt(){lt=!0,Fs(xe)}function ir(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Pr(r.postRun.shift());Fs(Te)}function Pt(Je){oe.unshift(Je)}function gn(Je){xe.unshift(Je)}function Pr(Je){Te.unshift(Je)}var Ir=0,Nr=null,nn=null;function ai(Je){Ir++,r.monitorRunDependencies&&r.monitorRunDependencies(Ir)}function wo(Je){if(Ir--,r.monitorRunDependencies&&r.monitorRunDependencies(Ir),Ir==0&&(Nr!==null&&(clearInterval(Nr),Nr=null),nn)){var st=nn;nn=null,st()}}r.preloadedImages={},r.preloadedAudios={};function ns(Je){r.onAbort&&r.onAbort(Je),Je+="",te(Je),Ce=!0,g=1,Je="abort("+Je+"). Build with -s ASSERTIONS=1 for more info.";var st=new WebAssembly.RuntimeError(Je);throw a(st),st}var to="data:application/octet-stream;base64,";function Bo(Je){return Je.startsWith(to)}var ji="data:application/octet-stream;base64,AGFzbQEAAAAB/wEkYAN/f38Bf2ABfwF/YAJ/fwF/YAF/AGAEf39/fwF/YAN/f38AYAV/f39/fwF/YAJ/fwBgBH9/f38AYAABf2AFf39/fn8BfmAEf35/fwF/YAR/f35/AX5gAn9+AX9gA398fwBgA39/fgF/YAF/AX5gBn9/f39/fwF/YAN/fn8Bf2AEf39/fwF+YAV/f35/fwF/YAR/f35/AX9gA39/fgF+YAJ/fgBgAn9/AX5gBX9/f39/AGADf35/AX5gBX5+f35/AX5gA39/fwF+YAZ/fH9/f38Bf2AAAGAHf35/f39+fwF/YAV/fn9/fwF/YAV/f39/fwF+YAJ+fwF/YAJ/fAACJQYBYQFhAAMBYQFiAAEBYQFjAAABYQFkAAEBYQFlAAIBYQFmAAED5wHlAQMAAwEDAwEHDAgDFgcNEgEDDRcFAQ8DEAUQAwIBAhgECxkEAQMBBQsFAwMDARACBAMAAggLBwEAAwADGgQDGwYGABwBBgMTFBEHBwcVCx4ABAgHBAICAgAfAQICAgIGFSAAIQAiAAIBBgIHAg0LEw0FAQUCACMDAQAUAAAGBQECBQUDCwsSAgEDBQIHAQEICAACCQQEAQABCAEBCQoBAwkBAQEBBgEGBgYABAIEBAQGEQQEAAARAAEDCQEJAQAJCQkBAQECCgoAAAMPAQEBAwACAgICBQIABwAKBgwHAAADAgICBQEEBQFwAT8/BQcBAYACgIACBgkBfwFBgInBAgsH+gEzAWcCAAFoAFQBaQDqAQFqALsBAWsAwQEBbACpAQFtAKgBAW4ApwEBbwClAQFwAKMBAXEAoAEBcgCbAQFzAMABAXQAugEBdQC5AQF2AEsBdwDiAQF4AMgBAXkAxwEBegDCAQFBAMkBAUIAuAEBQwAGAUQACQFFAKYBAUYAtwEBRwC2AQFIALUBAUkAtAEBSgCzAQFLALIBAUwAsQEBTQCwAQFOAK8BAU8AvAEBUACuAQFRAK0BAVIArAEBUwAaAVQACwFVAKQBAVYAMgFXAQABWACrAQFZAKoBAVoAxgEBXwDFAQEkAMQBAmFhAL8BAmJhAL4BAmNhAL0BCXgBAEEBCz6iAeMBjgGQAVpbjwFYnwGdAVeeAV1coQFZVlWcAZoBmQGYAZcBlgGVAZQBkwGSAZEB6QHoAecB5gHlAeQB4QHfAeAB3gHdAdwB2gHbAYUB2QHYAdcB1gHVAdQB0wHSAdEB0AHPAc4BzQHMAcsBygE4wwEK1N8G5QHMDAEHfwJAIABFDQAgAEEIayIDIABBBGsoAgAiAUF4cSIAaiEFAkAgAUEBcQ0AIAFBA3FFDQEgAyADKAIAIgFrIgNBxIQBKAIASQ0BIAAgAWohACADQciEASgCAEcEQCABQf8BTQRAIAMoAggiAiABQQN2IgRBA3RB3IQBakYaIAIgAygCDCIBRgRAQbSEAUG0hAEoAgBBfiAEd3E2AgAMAwsgAiABNgIMIAEgAjYCCAwCCyADKAIYIQYCQCADIAMoAgwiAUcEQCADKAIIIgIgATYCDCABIAI2AggMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEBDAELA0AgAiEHIAQiAUEUaiICKAIAIgQNACABQRBqIQIgASgCECIEDQALIAdBADYCAAsgBkUNAQJAIAMgAygCHCICQQJ0QeSGAWoiBCgCAEYEQCAEIAE2AgAgAQ0BQbiEAUG4hAEoAgBBfiACd3E2AgAMAwsgBkEQQRQgBigCECADRhtqIAE2AgAgAUUNAgsgASAGNgIYIAMoAhAiAgRAIAEgAjYCECACIAE2AhgLIAMoAhQiAkUNASABIAI2AhQgAiABNgIYDAELIAUoAgQiAUEDcUEDRw0AQbyEASAANgIAIAUgAUF+cTYCBCADIABBAXI2AgQgACADaiAANgIADwsgAyAFTw0AIAUoAgQiAUEBcUUNAAJAIAFBAnFFBEAgBUHMhAEoAgBGBEBBzIQBIAM2AgBBwIQBQcCEASgCACAAaiIANgIAIAMgAEEBcjYCBCADQciEASgCAEcNA0G8hAFBADYCAEHIhAFBADYCAA8LIAVByIQBKAIARgRAQciEASADNgIAQbyEAUG8hAEoAgAgAGoiADYCACADIABBAXI2AgQgACADaiAANgIADwsgAUF4cSAAaiEAAkAgAUH/AU0EQCAFKAIIIgIgAUEDdiIEQQN0QdyEAWpGGiACIAUoAgwiAUYEQEG0hAFBtIQBKAIAQX4gBHdxNgIADAILIAIgATYCDCABIAI2AggMAQsgBSgCGCEGAkAgBSAFKAIMIgFHBEAgBSgCCCICQcSEASgCAEkaIAIgATYCDCABIAI2AggMAQsCQCAFQRRqIgIoAgAiBA0AIAVBEGoiAigCACIEDQBBACEBDAELA0AgAiEHIAQiAUEUaiICKAIAIgQNACABQRBqIQIgASgCECIEDQALIAdBADYCAAsgBkUNAAJAIAUgBSgCHCICQQJ0QeSGAWoiBCgCAEYEQCAEIAE2AgAgAQ0BQbiEAUG4hAEoAgBBfiACd3E2AgAMAgsgBkEQQRQgBigCECAFRhtqIAE2AgAgAUUNAQsgASAGNgIYIAUoAhAiAgRAIAEgAjYCECACIAE2AhgLIAUoAhQiAkUNACABIAI2AhQgAiABNgIYCyADIABBAXI2AgQgACADaiAANgIAIANByIQBKAIARw0BQbyEASAANgIADwsgBSABQX5xNgIEIAMgAEEBcjYCBCAAIANqIAA2AgALIABB/wFNBEAgAEEDdiIBQQN0QdyEAWohAAJ/QbSEASgCACICQQEgAXQiAXFFBEBBtIQBIAEgAnI2AgAgAAwBCyAAKAIICyECIAAgAzYCCCACIAM2AgwgAyAANgIMIAMgAjYCCA8LQR8hAiADQgA3AhAgAEH///8HTQRAIABBCHYiASABQYD+P2pBEHZBCHEiAXQiAiACQYDgH2pBEHZBBHEiAnQiBCAEQYCAD2pBEHZBAnEiBHRBD3YgASACciAEcmsiAUEBdCAAIAFBFWp2QQFxckEcaiECCyADIAI2AhwgAkECdEHkhgFqIQECQAJAAkBBuIQBKAIAIgRBASACdCIHcUUEQEG4hAEgBCAHcjYCACABIAM2AgAgAyABNgIYDAELIABBAEEZIAJBAXZrIAJBH0YbdCECIAEoAgAhAQNAIAEiBCgCBEF4cSAARg0CIAJBHXYhASACQQF0IQIgBCABQQRxaiIHQRBqKAIAIgENAAsgByADNgIQIAMgBDYCGAsgAyADNgIMIAMgAzYCCAwBCyAEKAIIIgAgAzYCDCAEIAM2AgggA0EANgIYIAMgBDYCDCADIAA2AggLQdSEAUHUhAEoAgBBAWsiAEF/IAAbNgIACwuDBAEDfyACQYAETwRAIAAgASACEAIaIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAEEDcUUEQCAAIQIMAQsgAkEBSARAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAkEDcUUNASACIANJDQALCwJAIANBfHEiBEHAAEkNACACIARBQGoiBUsNAANAIAIgASgCADYCACACIAEoAgQ2AgQgAiABKAIINgIIIAIgASgCDDYCDCACIAEoAhA2AhAgAiABKAIUNgIUIAIgASgCGDYCGCACIAEoAhw2AhwgAiABKAIgNgIgIAIgASgCJDYCJCACIAEoAig2AiggAiABKAIsNgIsIAIgASgCMDYCMCACIAEoAjQ2AjQgAiABKAI4NgI4IAIgASgCPDYCPCABQUBrIQEgAkFAayICIAVNDQALCyACIARPDQEDQCACIAEoAgA2AgAgAUEEaiEBIAJBBGoiAiAESQ0ACwwBCyADQQRJBEAgACECDAELIAAgA0EEayIESwRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAiABLQABOgABIAIgAS0AAjoAAiACIAEtAAM6AAMgAUEEaiEBIAJBBGoiAiAETQ0ACwsgAiADSQRAA0AgAiABLQAAOgAAIAFBAWohASACQQFqIgIgA0cNAAsLIAALGgAgAARAIAAtAAEEQCAAKAIEEAYLIAAQBgsLoi4BDH8jAEEQayIMJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEH0AU0EQEG0hAEoAgAiBUEQIABBC2pBeHEgAEELSRsiCEEDdiICdiIBQQNxBEAgAUF/c0EBcSACaiIDQQN0IgFB5IQBaigCACIEQQhqIQACQCAEKAIIIgIgAUHchAFqIgFGBEBBtIQBIAVBfiADd3E2AgAMAQsgAiABNgIMIAEgAjYCCAsgBCADQQN0IgFBA3I2AgQgASAEaiIBIAEoAgRBAXI2AgQMDQsgCEG8hAEoAgAiCk0NASABBEACQEECIAJ0IgBBACAAa3IgASACdHEiAEEAIABrcUEBayIAIABBDHZBEHEiAnYiAUEFdkEIcSIAIAJyIAEgAHYiAUECdkEEcSIAciABIAB2IgFBAXZBAnEiAHIgASAAdiIBQQF2QQFxIgByIAEgAHZqIgNBA3QiAEHkhAFqKAIAIgQoAggiASAAQdyEAWoiAEYEQEG0hAEgBUF+IAN3cSIFNgIADAELIAEgADYCDCAAIAE2AggLIARBCGohACAEIAhBA3I2AgQgBCAIaiICIANBA3QiASAIayIDQQFyNgIEIAEgBGogAzYCACAKBEAgCkEDdiIBQQN0QdyEAWohB0HIhAEoAgAhBAJ/IAVBASABdCIBcUUEQEG0hAEgASAFcjYCACAHDAELIAcoAggLIQEgByAENgIIIAEgBDYCDCAEIAc2AgwgBCABNgIIC0HIhAEgAjYCAEG8hAEgAzYCAAwNC0G4hAEoAgAiBkUNASAGQQAgBmtxQQFrIgAgAEEMdkEQcSICdiIBQQV2QQhxIgAgAnIgASAAdiIBQQJ2QQRxIgByIAEgAHYiAUEBdkECcSIAciABIAB2IgFBAXZBAXEiAHIgASAAdmpBAnRB5IYBaigCACIBKAIEQXhxIAhrIQMgASECA0ACQCACKAIQIgBFBEAgAigCFCIARQ0BCyAAKAIEQXhxIAhrIgIgAyACIANJIgIbIQMgACABIAIbIQEgACECDAELCyABIAhqIgkgAU0NAiABKAIYIQsgASABKAIMIgRHBEAgASgCCCIAQcSEASgCAEkaIAAgBDYCDCAEIAA2AggMDAsgAUEUaiICKAIAIgBFBEAgASgCECIARQ0EIAFBEGohAgsDQCACIQcgACIEQRRqIgIoAgAiAA0AIARBEGohAiAEKAIQIgANAAsgB0EANgIADAsLQX8hCCAAQb9/Sw0AIABBC2oiAEF4cSEIQbiEASgCACIJRQ0AQQAgCGshAwJAAkACQAJ/QQAgCEGAAkkNABpBHyAIQf///wdLDQAaIABBCHYiACAAQYD+P2pBEHZBCHEiAnQiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASACciAAcmsiAEEBdCAIIABBFWp2QQFxckEcagsiBUECdEHkhgFqKAIAIgJFBEBBACEADAELQQAhACAIQQBBGSAFQQF2ayAFQR9GG3QhAQNAAkAgAigCBEF4cSAIayIHIANPDQAgAiEEIAciAw0AQQAhAyACIQAMAwsgACACKAIUIgcgByACIAFBHXZBBHFqKAIQIgJGGyAAIAcbIQAgAUEBdCEBIAINAAsLIAAgBHJFBEBBAiAFdCIAQQAgAGtyIAlxIgBFDQMgAEEAIABrcUEBayIAIABBDHZBEHEiAnYiAUEFdkEIcSIAIAJyIAEgAHYiAUECdkEEcSIAciABIAB2IgFBAXZBAnEiAHIgASAAdiIBQQF2QQFxIgByIAEgAHZqQQJ0QeSGAWooAgAhAAsgAEUNAQsDQCAAKAIEQXhxIAhrIgEgA0khAiABIAMgAhshAyAAIAQgAhshBCAAKAIQIgEEfyABBSAAKAIUCyIADQALCyAERQ0AIANBvIQBKAIAIAhrTw0AIAQgCGoiBiAETQ0BIAQoAhghBSAEIAQoAgwiAUcEQCAEKAIIIgBBxIQBKAIASRogACABNgIMIAEgADYCCAwKCyAEQRRqIgIoAgAiAEUEQCAEKAIQIgBFDQQgBEEQaiECCwNAIAIhByAAIgFBFGoiAigCACIADQAgAUEQaiECIAEoAhAiAA0ACyAHQQA2AgAMCQsgCEG8hAEoAgAiAk0EQEHIhAEoAgAhAwJAIAIgCGsiAUEQTwRAQbyEASABNgIAQciEASADIAhqIgA2AgAgACABQQFyNgIEIAIgA2ogATYCACADIAhBA3I2AgQMAQtByIQBQQA2AgBBvIQBQQA2AgAgAyACQQNyNgIEIAIgA2oiACAAKAIEQQFyNgIECyADQQhqIQAMCwsgCEHAhAEoAgAiBkkEQEHAhAEgBiAIayIBNgIAQcyEAUHMhAEoAgAiAiAIaiIANgIAIAAgAUEBcjYCBCACIAhBA3I2AgQgAkEIaiEADAsLQQAhACAIQS9qIgkCf0GMiAEoAgAEQEGUiAEoAgAMAQtBmIgBQn83AgBBkIgBQoCggICAgAQ3AgBBjIgBIAxBDGpBcHFB2KrVqgVzNgIAQaCIAUEANgIAQfCHAUEANgIAQYAgCyIBaiIFQQAgAWsiB3EiAiAITQ0KQeyHASgCACIEBEBB5IcBKAIAIgMgAmoiASADTQ0LIAEgBEsNCwtB8IcBLQAAQQRxDQUCQAJAQcyEASgCACIDBEBB9IcBIQADQCADIAAoAgAiAU8EQCABIAAoAgRqIANLDQMLIAAoAggiAA0ACwtBABApIgFBf0YNBiACIQVBkIgBKAIAIgNBAWsiACABcQRAIAIgAWsgACABakEAIANrcWohBQsgBSAITQ0GIAVB/v///wdLDQZB7IcBKAIAIgQEQEHkhwEoAgAiAyAFaiIAIANNDQcgACAESw0HCyAFECkiACABRw0BDAgLIAUgBmsgB3EiBUH+////B0sNBSAFECkiASAAKAIAIAAoAgRqRg0EIAEhAAsCQCAAQX9GDQAgCEEwaiAFTQ0AQZSIASgCACIBIAkgBWtqQQAgAWtxIgFB/v///wdLBEAgACEBDAgLIAEQKUF/RwRAIAEgBWohBSAAIQEMCAtBACAFaxApGgwFCyAAIgFBf0cNBgwECwALQQAhBAwHC0EAIQEMBQsgAUF/Rw0CC0HwhwFB8IcBKAIAQQRyNgIACyACQf7///8HSw0BIAIQKSEBQQAQKSEAIAFBf0YNASAAQX9GDQEgACABTQ0BIAAgAWsiBSAIQShqTQ0BC0HkhwFB5IcBKAIAIAVqIgA2AgBB6IcBKAIAIABJBEBB6IcBIAA2AgALAkACQAJAQcyEASgCACIHBEBB9IcBIQADQCABIAAoAgAiAyAAKAIEIgJqRg0CIAAoAggiAA0ACwwCC0HEhAEoAgAiAEEAIAAgAU0bRQRAQcSEASABNgIAC0EAIQBB+IcBIAU2AgBB9IcBIAE2AgBB1IQBQX82AgBB2IQBQYyIASgCADYCAEGAiAFBADYCAANAIABBA3QiA0HkhAFqIANB3IQBaiICNgIAIANB6IQBaiACNgIAIABBAWoiAEEgRw0AC0HAhAEgBUEoayIDQXggAWtBB3FBACABQQhqQQdxGyIAayICNgIAQcyEASAAIAFqIgA2AgAgACACQQFyNgIEIAEgA2pBKDYCBEHQhAFBnIgBKAIANgIADAILIAAtAAxBCHENACADIAdLDQAgASAHTQ0AIAAgAiAFajYCBEHMhAEgB0F4IAdrQQdxQQAgB0EIakEHcRsiAGoiAjYCAEHAhAFBwIQBKAIAIAVqIgEgAGsiADYCACACIABBAXI2AgQgASAHakEoNgIEQdCEAUGciAEoAgA2AgAMAQtBxIQBKAIAIAFLBEBBxIQBIAE2AgALIAEgBWohAkH0hwEhAAJAAkACQAJAAkACQANAIAIgACgCAEcEQCAAKAIIIgANAQwCCwsgAC0ADEEIcUUNAQtB9IcBIQADQCAHIAAoAgAiAk8EQCACIAAoAgRqIgQgB0sNAwsgACgCCCEADAALAAsgACABNgIAIAAgACgCBCAFajYCBCABQXggAWtBB3FBACABQQhqQQdxG2oiCSAIQQNyNgIEIAJBeCACa0EHcUEAIAJBCGpBB3EbaiIFIAggCWoiBmshAiAFIAdGBEBBzIQBIAY2AgBBwIQBQcCEASgCACACaiIANgIAIAYgAEEBcjYCBAwDCyAFQciEASgCAEYEQEHIhAEgBjYCAEG8hAFBvIQBKAIAIAJqIgA2AgAgBiAAQQFyNgIEIAAgBmogADYCAAwDCyAFKAIEIgBBA3FBAUYEQCAAQXhxIQcCQCAAQf8BTQRAIAUoAggiAyAAQQN2IgBBA3RB3IQBakYaIAMgBSgCDCIBRgRAQbSEAUG0hAEoAgBBfiAAd3E2AgAMAgsgAyABNgIMIAEgAzYCCAwBCyAFKAIYIQgCQCAFIAUoAgwiAUcEQCAFKAIIIgAgATYCDCABIAA2AggMAQsCQCAFQRRqIgAoAgAiAw0AIAVBEGoiACgCACIDDQBBACEBDAELA0AgACEEIAMiAUEUaiIAKAIAIgMNACABQRBqIQAgASgCECIDDQALIARBADYCAAsgCEUNAAJAIAUgBSgCHCIDQQJ0QeSGAWoiACgCAEYEQCAAIAE2AgAgAQ0BQbiEAUG4hAEoAgBBfiADd3E2AgAMAgsgCEEQQRQgCCgCECAFRhtqIAE2AgAgAUUNAQsgASAINgIYIAUoAhAiAARAIAEgADYCECAAIAE2AhgLIAUoAhQiAEUNACABIAA2AhQgACABNgIYCyAFIAdqIQUgAiAHaiECCyAFIAUoAgRBfnE2AgQgBiACQQFyNgIEIAIgBmogAjYCACACQf8BTQRAIAJBA3YiAEEDdEHchAFqIQICf0G0hAEoAgAiAUEBIAB0IgBxRQRAQbSEASAAIAFyNgIAIAIMAQsgAigCCAshACACIAY2AgggACAGNgIMIAYgAjYCDCAGIAA2AggMAwtBHyEAIAJB////B00EQCACQQh2IgAgAEGA/j9qQRB2QQhxIgN0IgAgAEGA4B9qQRB2QQRxIgF0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAEgA3IgAHJrIgBBAXQgAiAAQRVqdkEBcXJBHGohAAsgBiAANgIcIAZCADcCECAAQQJ0QeSGAWohBAJAQbiEASgCACIDQQEgAHQiAXFFBEBBuIQBIAEgA3I2AgAgBCAGNgIAIAYgBDYCGAwBCyACQQBBGSAAQQF2ayAAQR9GG3QhACAEKAIAIQEDQCABIgMoAgRBeHEgAkYNAyAAQR12IQEgAEEBdCEAIAMgAUEEcWoiBCgCECIBDQALIAQgBjYCECAGIAM2AhgLIAYgBjYCDCAGIAY2AggMAgtBwIQBIAVBKGsiA0F4IAFrQQdxQQAgAUEIakEHcRsiAGsiAjYCAEHMhAEgACABaiIANgIAIAAgAkEBcjYCBCABIANqQSg2AgRB0IQBQZyIASgCADYCACAHIARBJyAEa0EHcUEAIARBJ2tBB3EbakEvayIAIAAgB0EQakkbIgJBGzYCBCACQfyHASkCADcCECACQfSHASkCADcCCEH8hwEgAkEIajYCAEH4hwEgBTYCAEH0hwEgATYCAEGAiAFBADYCACACQRhqIQADQCAAQQc2AgQgAEEIaiEBIABBBGohACABIARJDQALIAIgB0YNAyACIAIoAgRBfnE2AgQgByACIAdrIgRBAXI2AgQgAiAENgIAIARB/wFNBEAgBEEDdiIAQQN0QdyEAWohAgJ/QbSEASgCACIBQQEgAHQiAHFFBEBBtIQBIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBzYCCCAAIAc2AgwgByACNgIMIAcgADYCCAwEC0EfIQAgB0IANwIQIARB////B00EQCAEQQh2IgAgAEGA/j9qQRB2QQhxIgJ0IgAgAEGA4B9qQRB2QQRxIgF0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAEgAnIgAHJrIgBBAXQgBCAAQRVqdkEBcXJBHGohAAsgByAANgIcIABBAnRB5IYBaiEDAkBBuIQBKAIAIgJBASAAdCIBcUUEQEG4hAEgASACcjYCACADIAc2AgAgByADNgIYDAELIARBAEEZIABBAXZrIABBH0YbdCEAIAMoAgAhAQNAIAEiAigCBEF4cSAERg0EIABBHXYhASAAQQF0IQAgAiABQQRxaiIDKAIQIgENAAsgAyAHNgIQIAcgAjYCGAsgByAHNgIMIAcgBzYCCAwDCyADKAIIIgAgBjYCDCADIAY2AgggBkEANgIYIAYgAzYCDCAGIAA2AggLIAlBCGohAAwFCyACKAIIIgAgBzYCDCACIAc2AgggB0EANgIYIAcgAjYCDCAHIAA2AggLQcCEASgCACIAIAhNDQBBwIQBIAAgCGsiATYCAEHMhAFBzIQBKAIAIgIgCGoiADYCACAAIAFBAXI2AgQgAiAIQQNyNgIEIAJBCGohAAwDC0GEhAFBMDYCAEEAIQAMAgsCQCAFRQ0AAkAgBCgCHCICQQJ0QeSGAWoiACgCACAERgRAIAAgATYCACABDQFBuIQBIAlBfiACd3EiCTYCAAwCCyAFQRBBFCAFKAIQIARGG2ogATYCACABRQ0BCyABIAU2AhggBCgCECIABEAgASAANgIQIAAgATYCGAsgBCgCFCIARQ0AIAEgADYCFCAAIAE2AhgLAkAgA0EPTQRAIAQgAyAIaiIAQQNyNgIEIAAgBGoiACAAKAIEQQFyNgIEDAELIAQgCEEDcjYCBCAGIANBAXI2AgQgAyAGaiADNgIAIANB/wFNBEAgA0EDdiIAQQN0QdyEAWohAgJ/QbSEASgCACIBQQEgAHQiAHFFBEBBtIQBIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBjYCCCAAIAY2AgwgBiACNgIMIAYgADYCCAwBC0EfIQAgA0H///8HTQRAIANBCHYiACAAQYD+P2pBEHZBCHEiAnQiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASACciAAcmsiAEEBdCADIABBFWp2QQFxckEcaiEACyAGIAA2AhwgBkIANwIQIABBAnRB5IYBaiECAkACQCAJQQEgAHQiAXFFBEBBuIQBIAEgCXI2AgAgAiAGNgIAIAYgAjYCGAwBCyADQQBBGSAAQQF2ayAAQR9GG3QhACACKAIAIQgDQCAIIgEoAgRBeHEgA0YNAiAAQR12IQIgAEEBdCEAIAEgAkEEcWoiAigCECIIDQALIAIgBjYCECAGIAE2AhgLIAYgBjYCDCAGIAY2AggMAQsgASgCCCIAIAY2AgwgASAGNgIIIAZBADYCGCAGIAE2AgwgBiAANgIICyAEQQhqIQAMAQsCQCALRQ0AAkAgASgCHCICQQJ0QeSGAWoiACgCACABRgRAIAAgBDYCACAEDQFBuIQBIAZBfiACd3E2AgAMAgsgC0EQQRQgCygCECABRhtqIAQ2AgAgBEUNAQsgBCALNgIYIAEoAhAiAARAIAQgADYCECAAIAQ2AhgLIAEoAhQiAEUNACAEIAA2AhQgACAENgIYCwJAIANBD00EQCABIAMgCGoiAEEDcjYCBCAAIAFqIgAgACgCBEEBcjYCBAwBCyABIAhBA3I2AgQgCSADQQFyNgIEIAMgCWogAzYCACAKBEAgCkEDdiIAQQN0QdyEAWohBEHIhAEoAgAhAgJ/QQEgAHQiACAFcUUEQEG0hAEgACAFcjYCACAEDAELIAQoAggLIQAgBCACNgIIIAAgAjYCDCACIAQ2AgwgAiAANgIIC0HIhAEgCTYCAEG8hAEgAzYCAAsgAUEIaiEACyAMQRBqJAAgAAuJAQEDfyAAKAIcIgEQMAJAIAAoAhAiAiABKAIQIgMgAiADSRsiAkUNACAAKAIMIAEoAgggAhAHGiAAIAAoAgwgAmo2AgwgASABKAIIIAJqNgIIIAAgACgCFCACajYCFCAAIAAoAhAgAms2AhAgASABKAIQIAJrIgA2AhAgAA0AIAEgASgCBDYCCAsLzgEBBX8CQCAARQ0AIAAoAjAiAQRAIAAgAUEBayIBNgIwIAENAQsgACgCIARAIABBATYCICAAEBoaCyAAKAIkQQFGBEAgABBDCwJAIAAoAiwiAUUNACAALQAoDQACQCABKAJEIgNFDQAgASgCTCEEA0AgACAEIAJBAnRqIgUoAgBHBEAgAyACQQFqIgJHDQEMAgsLIAUgBCADQQFrIgJBAnRqKAIANgIAIAEgAjYCRAsLIABBAEIAQQUQDhogACgCACIBBEAgARALCyAAEAYLC1oCAn4BfwJ/AkACQCAALQAARQ0AIAApAxAiAUJ9Vg0AIAFCAnwiAiAAKQMIWA0BCyAAQQA6AABBAAwBC0EAIAAoAgQiA0UNABogACACNwMQIAMgAadqLwAACwthAgJ+AX8CQAJAIAAtAABFDQAgACkDECICQn1WDQAgAkICfCIDIAApAwhYDQELIABBADoAAA8LIAAoAgQiBEUEQA8LIAAgAzcDECAEIAKnaiIAIAFBCHY6AAEgACABOgAAC8wCAQJ/IwBBEGsiBCQAAkAgACkDGCADrYinQQFxRQRAIABBDGoiAARAIABBADYCBCAAQRw2AgALQn8hAgwBCwJ+IAAoAgAiBUUEQCAAKAIIIAEgAiADIAAoAgQRDAAMAQsgBSAAKAIIIAEgAiADIAAoAgQRCgALIgJCf1UNAAJAIANBBGsOCwEAAAAAAAAAAAABAAsCQAJAIAAtABhBEHFFBEAgAEEMaiIBBEAgAUEANgIEIAFBHDYCAAsMAQsCfiAAKAIAIgFFBEAgACgCCCAEQQhqQghBBCAAKAIEEQwADAELIAEgACgCCCAEQQhqQghBBCAAKAIEEQoAC0J/VQ0BCyAAQQxqIgAEQCAAQQA2AgQgAEEUNgIACwwBCyAEKAIIIQEgBCgCDCEDIABBDGoiAARAIAAgAzYCBCAAIAE2AgALCyAEQRBqJAAgAguTFQIOfwN+AkACQAJAAkACQAJAAkACQAJAAkACQCAAKALwLQRAIAAoAogBQQFIDQEgACgCACIEKAIsQQJHDQQgAC8B5AENAyAALwHoAQ0DIAAvAewBDQMgAC8B8AENAyAALwH0AQ0DIAAvAfgBDQMgAC8B/AENAyAALwGcAg0DIAAvAaACDQMgAC8BpAINAyAALwGoAg0DIAAvAawCDQMgAC8BsAINAyAALwG0Ag0DIAAvAbgCDQMgAC8BvAINAyAALwHAAg0DIAAvAcQCDQMgAC8ByAINAyAALwHUAg0DIAAvAdgCDQMgAC8B3AINAyAALwHgAg0DIAAvAYgCDQIgAC8BjAINAiAALwGYAg0CQSAhBgNAIAAgBkECdCIFai8B5AENAyAAIAVBBHJqLwHkAQ0DIAAgBUEIcmovAeQBDQMgACAFQQxyai8B5AENAyAGQQRqIgZBgAJHDQALDAMLIABBBzYC/C0gAkF8Rw0FIAFFDQUMBgsgAkEFaiIEIQcMAwtBASEHCyAEIAc2AiwLIAAgAEHoFmoQUSAAIABB9BZqEFEgAC8B5gEhBCAAIABB7BZqKAIAIgxBAnRqQf//AzsB6gEgAEGQFmohECAAQZQWaiERIABBjBZqIQdBACEGIAxBAE4EQEEHQYoBIAQbIQ1BBEEDIAQbIQpBfyEJA0AgBCEIIAAgCyIOQQFqIgtBAnRqLwHmASEEAkACQCAGQQFqIgVB//8DcSIPIA1B//8DcU8NACAEIAhHDQAgBSEGDAELAn8gACAIQQJ0akHMFWogCkH//wNxIA9LDQAaIAgEQEEBIQUgByAIIAlGDQEaIAAgCEECdGpBzBVqIgYgBi8BAEEBajsBACAHDAELQQEhBSAQIBEgBkH//wNxQQpJGwsiBiAGLwEAIAVqOwEAQQAhBgJ/IARFBEBBAyEKQYoBDAELQQNBBCAEIAhGIgUbIQpBBkEHIAUbCyENIAghCQsgDCAORw0ACwsgAEHaE2ovAQAhBCAAIABB+BZqKAIAIgxBAnRqQd4TakH//wM7AQBBACEGIAxBAE4EQEEHQYoBIAQbIQ1BBEEDIAQbIQpBfyEJQQAhCwNAIAQhCCAAIAsiDkEBaiILQQJ0akHaE2ovAQAhBAJAAkAgBkEBaiIFQf//A3EiDyANQf//A3FPDQAgBCAIRw0AIAUhBgwBCwJ/IAAgCEECdGpBzBVqIApB//8DcSAPSw0AGiAIBEBBASEFIAcgCCAJRg0BGiAAIAhBAnRqQcwVaiIGIAYvAQBBAWo7AQAgBwwBC0EBIQUgECARIAZB//8DcUEKSRsLIgYgBi8BACAFajsBAEEAIQYCfyAERQRAQQMhCkGKAQwBC0EDQQQgBCAIRiIFGyEKQQZBByAFGwshDSAIIQkLIAwgDkcNAAsLIAAgAEGAF2oQUSAAIAAoAvgtAn9BEiAAQYoWai8BAA0AGkERIABB0hVqLwEADQAaQRAgAEGGFmovAQANABpBDyAAQdYVai8BAA0AGkEOIABBghZqLwEADQAaQQ0gAEHaFWovAQANABpBDCAAQf4Vai8BAA0AGkELIABB3hVqLwEADQAaQQogAEH6FWovAQANABpBCSAAQeIVai8BAA0AGkEIIABB9hVqLwEADQAaQQcgAEHmFWovAQANABpBBiAAQfIVai8BAA0AGkEFIABB6hVqLwEADQAaQQQgAEHuFWovAQANABpBA0ECIABBzhVqLwEAGwsiBkEDbGoiBEERajYC+C0gACgC/C1BCmpBA3YiByAEQRtqQQN2IgRNBEAgByEEDAELIAAoAowBQQRHDQAgByEECyAEIAJBBGpPQQAgARsNASAEIAdHDQQLIANBAmqtIRIgACkDmC4hFCAAKAKgLiIBQQNqIgdBP0sNASASIAGthiAUhCESDAILIAAgASACIAMQOQwDCyABQcAARgRAIAAoAgQgACgCEGogFDcAACAAIAAoAhBBCGo2AhBBAyEHDAELIAAoAgQgACgCEGogEiABrYYgFIQ3AAAgACAAKAIQQQhqNgIQIAFBPWshByASQcAAIAFrrYghEgsgACASNwOYLiAAIAc2AqAuIABBgMEAQYDKABCHAQwBCyADQQRqrSESIAApA5guIRQCQCAAKAKgLiIBQQNqIgRBP00EQCASIAGthiAUhCESDAELIAFBwABGBEAgACgCBCAAKAIQaiAUNwAAIAAgACgCEEEIajYCEEEDIQQMAQsgACgCBCAAKAIQaiASIAGthiAUhDcAACAAIAAoAhBBCGo2AhAgAUE9ayEEIBJBwAAgAWutiCESCyAAIBI3A5guIAAgBDYCoC4gAEHsFmooAgAiC6xCgAJ9IRMgAEH4FmooAgAhCQJAAkACfwJ+AkACfwJ/IARBOk0EQCATIASthiAShCETIARBBWoMAQsgBEHAAEYEQCAAKAIEIAAoAhBqIBI3AAAgACAAKAIQQQhqNgIQIAmsIRJCBSEUQQoMAgsgACgCBCAAKAIQaiATIASthiAShDcAACAAIAAoAhBBCGo2AhAgE0HAACAEa62IIRMgBEE7awshBSAJrCESIAVBOksNASAFrSEUIAVBBWoLIQcgEiAUhiAThAwBCyAFQcAARgRAIAAoAgQgACgCEGogEzcAACAAIAAoAhBBCGo2AhAgBq1CA30hE0IFIRRBCQwCCyAAKAIEIAAoAhBqIBIgBa2GIBOENwAAIAAgACgCEEEIajYCECAFQTtrIQcgEkHAACAFa62ICyESIAatQgN9IRMgB0E7Sw0BIAetIRQgB0EEagshBCATIBSGIBKEIRMMAQsgB0HAAEYEQCAAKAIEIAAoAhBqIBI3AAAgACAAKAIQQQhqNgIQQQQhBAwBCyAAKAIEIAAoAhBqIBMgB62GIBKENwAAIAAgACgCEEEIajYCECAHQTxrIQQgE0HAACAHa62IIRMLQQAhBQNAIAAgBSIBQZDWAGotAABBAnRqQc4VajMBACEUAn8gBEE8TQRAIBQgBK2GIBOEIRMgBEEDagwBCyAEQcAARgRAIAAoAgQgACgCEGogEzcAACAAIAAoAhBBCGo2AhAgFCETQQMMAQsgACgCBCAAKAIQaiAUIASthiAThDcAACAAIAAoAhBBCGo2AhAgFEHAACAEa62IIRMgBEE9awshBCABQQFqIQUgASAGRw0ACyAAIAQ2AqAuIAAgEzcDmC4gACAAQeQBaiICIAsQhgEgACAAQdgTaiIBIAkQhgEgACACIAEQhwELIAAQiAEgAwRAAkAgACgCoC4iBEE5TgRAIAAoAgQgACgCEGogACkDmC43AAAgACAAKAIQQQhqNgIQDAELIARBGU4EQCAAKAIEIAAoAhBqIAApA5guPgAAIAAgAEGcLmo1AgA3A5guIAAgACgCEEEEajYCECAAIAAoAqAuQSBrIgQ2AqAuCyAEQQlOBH8gACgCBCAAKAIQaiAAKQOYLj0AACAAIAAoAhBBAmo2AhAgACAAKQOYLkIQiDcDmC4gACgCoC5BEGsFIAQLQQFIDQAgACAAKAIQIgFBAWo2AhAgASAAKAIEaiAAKQOYLjwAAAsgAEEANgKgLiAAQgA3A5guCwsZACAABEAgACgCABAGIAAoAgwQBiAAEAYLC6wBAQJ+Qn8hAwJAIAAtACgNAAJAAkAgACgCIEUNACACQgBTDQAgAlANASABDQELIABBDGoiAARAIABBADYCBCAAQRI2AgALQn8PCyAALQA1DQBCACEDIAAtADQNACACUA0AA0AgACABIAOnaiACIAN9QQEQDiIEQn9XBEAgAEEBOgA1Qn8gAyADUBsPCyAEUEUEQCADIAR8IgMgAloNAgwBCwsgAEEBOgA0CyADC3UCAn4BfwJAAkAgAC0AAEUNACAAKQMQIgJCe1YNACACQgR8IgMgACkDCFgNAQsgAEEAOgAADwsgACgCBCIERQRADwsgACADNwMQIAQgAqdqIgAgAUEYdjoAAyAAIAFBEHY6AAIgACABQQh2OgABIAAgAToAAAtUAgF+AX8CQAJAIAAtAABFDQAgASAAKQMQIgF8IgIgAVQNACACIAApAwhYDQELIABBADoAAEEADwsgACgCBCIDRQRAQQAPCyAAIAI3AxAgAyABp2oLdwECfyMAQRBrIgMkAEF/IQQCQCAALQAoDQAgACgCIEEAIAJBA0kbRQRAIABBDGoiAARAIABBADYCBCAAQRI2AgALDAELIAMgAjYCCCADIAE3AwAgACADQhBBBhAOQgBTDQBBACEEIABBADoANAsgA0EQaiQAIAQLVwICfgF/AkACQCAALQAARQ0AIAApAxAiAUJ7Vg0AIAFCBHwiAiAAKQMIWA0BCyAAQQA6AABBAA8LIAAoAgQiA0UEQEEADwsgACACNwMQIAMgAadqKAAAC1UCAX4BfyAABEACQCAAKQMIUA0AQgEhAQNAIAAoAgAgAkEEdGoQPiABIAApAwhaDQEgAachAiABQgF8IQEMAAsACyAAKAIAEAYgACgCKBAQIAAQBgsLZAECfwJAAkACQCAARQRAIAGnEAkiA0UNAkEYEAkiAkUNAQwDCyAAIQNBGBAJIgINAkEADwsgAxAGC0EADwsgAkIANwMQIAIgATcDCCACIAM2AgQgAkEBOgAAIAIgAEU6AAEgAgudAQICfgF/AkACQCAALQAARQ0AIAApAxAiAkJ3Vg0AIAJCCHwiAyAAKQMIWA0BCyAAQQA6AAAPCyAAKAIEIgRFBEAPCyAAIAM3AxAgBCACp2oiACABQjiIPAAHIAAgAUIwiDwABiAAIAFCKIg8AAUgACABQiCIPAAEIAAgAUIYiDwAAyAAIAFCEIg8AAIgACABQgiIPAABIAAgATwAAAvwAgICfwF+AkAgAkUNACAAIAJqIgNBAWsgAToAACAAIAE6AAAgAkEDSQ0AIANBAmsgAToAACAAIAE6AAEgA0EDayABOgAAIAAgAToAAiACQQdJDQAgA0EEayABOgAAIAAgAToAAyACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiADYCACADIAIgBGtBfHEiAmoiAUEEayAANgIAIAJBCUkNACADIAA2AgggAyAANgIEIAFBCGsgADYCACABQQxrIAA2AgAgAkEZSQ0AIAMgADYCGCADIAA2AhQgAyAANgIQIAMgADYCDCABQRBrIAA2AgAgAUEUayAANgIAIAFBGGsgADYCACABQRxrIAA2AgAgAiADQQRxQRhyIgFrIgJBIEkNACAArUKBgICAEH4hBSABIANqIQEDQCABIAU3AxggASAFNwMQIAEgBTcDCCABIAU3AwAgAUEgaiEBIAJBIGsiAkEfSw0ACwsLbwEDfyAAQQxqIQICQAJ/IAAoAiAiAUUEQEF/IQFBEgwBCyAAIAFBAWsiAzYCIEEAIQEgAw0BIABBAEIAQQIQDhogACgCACIARQ0BIAAQGkF/Sg0BQRQLIQAgAgRAIAJBADYCBCACIAA2AgALCyABC58BAgF/AX4CfwJAAn4gACgCACIDKAIkQQFGQQAgAkJ/VRtFBEAgA0EMaiIBBEAgAUEANgIEIAFBEjYCAAtCfwwBCyADIAEgAkELEA4LIgRCf1cEQCAAKAIAIQEgAEEIaiIABEAgACABKAIMNgIAIAAgASgCEDYCBAsMAQtBACACIARRDQEaIABBCGoEQCAAQRs2AgwgAEEGNgIICwtBfwsLJAEBfyAABEADQCAAKAIAIQEgACgCDBAGIAAQBiABIgANAAsLC5gBAgJ+AX8CQAJAIAAtAABFDQAgACkDECIBQndWDQAgAUIIfCICIAApAwhYDQELIABBADoAAEIADwsgACgCBCIDRQRAQgAPCyAAIAI3AxAgAyABp2oiADEABkIwhiAAMQAHQjiGhCAAMQAFQiiGhCAAMQAEQiCGhCAAMQADQhiGhCAAMQACQhCGhCAAMQABQgiGhCAAMQAAfAsjACAAQShGBEAgAhAGDwsgAgRAIAEgAkEEaygCACAAEQcACwsyACAAKAIkQQFHBEAgAEEMaiIABEAgAEEANgIEIABBEjYCAAtCfw8LIABBAEIAQQ0QDgsPACAABEAgABA2IAAQBgsLgAEBAX8gAC0AKAR/QX8FIAFFBEAgAEEMagRAIABBADYCECAAQRI2AgwLQX8PCyABECoCQCAAKAIAIgJFDQAgAiABECFBf0oNACAAKAIAIQEgAEEMaiIABEAgACABKAIMNgIAIAAgASgCEDYCBAtBfw8LIAAgAUI4QQMQDkI/h6cLC38BA38gACEBAkAgAEEDcQRAA0AgAS0AAEUNAiABQQFqIgFBA3ENAAsLA0AgASICQQRqIQEgAigCACIDQX9zIANBgYKECGtxQYCBgoR4cUUNAAsgA0H/AXFFBEAgAiAAaw8LA0AgAi0AASEDIAJBAWoiASECIAMNAAsLIAEgAGsL3wIBCH8gAEUEQEEBDwsCQCAAKAIIIgINAEEBIQQgAC8BBCIHRQRAQQEhAgwBCyAAKAIAIQgDQAJAIAMgCGoiBS0AACICQSBPBEAgAkEYdEEYdUF/Sg0BCyACQQ1NQQBBASACdEGAzABxGw0AAn8CfyACQeABcUHAAUYEQEEBIQYgA0EBagwBCyACQfABcUHgAUYEQCADQQJqIQNBACEGQQEMAgsgAkH4AXFB8AFHBEBBBCECDAULQQAhBiADQQNqCyEDQQALIQlBBCECIAMgB08NAiAFLQABQcABcUGAAUcNAkEDIQQgBg0AIAUtAAJBwAFxQYABRw0CIAkNACAFLQADQcABcUGAAUcNAgsgBCECIANBAWoiAyAHSQ0ACwsgACACNgIIAn8CQCABRQ0AAkAgAUECRw0AIAJBA0cNAEECIQIgAEECNgIICyABIAJGDQBBBSACQQFHDQEaCyACCwtIAgJ+An8jAEEQayIEIAE2AgxCASAArYYhAgNAIAQgAUEEaiIANgIMIAIiA0IBIAEoAgAiBa2GhCECIAAhASAFQX9KDQALIAMLhwUBB38CQAJAIABFBEBBxRQhAiABRQ0BIAFBADYCAEHFFA8LIAJBwABxDQEgACgCCEUEQCAAQQAQIxoLIAAoAgghBAJAIAJBgAFxBEAgBEEBa0ECTw0BDAMLIARBBEcNAgsCQCAAKAIMIgINACAAAn8gACgCACEIIABBEGohCUEAIQICQAJAAkACQCAALwEEIgUEQEEBIQQgBUEBcSEHIAVBAUcNAQwCCyAJRQ0CIAlBADYCAEEADAQLIAVBfnEhBgNAIARBAUECQQMgAiAIai0AAEEBdEHQFGovAQAiCkGAEEkbIApBgAFJG2pBAUECQQMgCCACQQFyai0AAEEBdEHQFGovAQAiBEGAEEkbIARBgAFJG2ohBCACQQJqIQIgBkECayIGDQALCwJ/IAcEQCAEQQFBAkEDIAIgCGotAABBAXRB0BRqLwEAIgJBgBBJGyACQYABSRtqIQQLIAQLEAkiB0UNASAFQQEgBUEBSxshCkEAIQVBACEGA0AgBSAHaiEDAn8gBiAIai0AAEEBdEHQFGovAQAiAkH/AE0EQCADIAI6AAAgBUEBagwBCyACQf8PTQRAIAMgAkE/cUGAAXI6AAEgAyACQQZ2QcABcjoAACAFQQJqDAELIAMgAkE/cUGAAXI6AAIgAyACQQx2QeABcjoAACADIAJBBnZBP3FBgAFyOgABIAVBA2oLIQUgBkEBaiIGIApHDQALIAcgBEEBayICakEAOgAAIAlFDQAgCSACNgIACyAHDAELIAMEQCADQQA2AgQgA0EONgIAC0EACyICNgIMIAINAEEADwsgAUUNACABIAAoAhA2AgALIAIPCyABBEAgASAALwEENgIACyAAKAIAC4MBAQR/QRIhBQJAAkAgACkDMCABWA0AIAGnIQYgACgCQCEEIAJBCHEiB0UEQCAEIAZBBHRqKAIEIgINAgsgBCAGQQR0aiIEKAIAIgJFDQAgBC0ADEUNAUEXIQUgBw0BC0EAIQIgAyAAQQhqIAMbIgAEQCAAQQA2AgQgACAFNgIACwsgAgtuAQF/IwBBgAJrIgUkAAJAIARBgMAEcQ0AIAIgA0wNACAFIAFB/wFxIAIgA2siAkGAAiACQYACSSIBGxAZIAFFBEADQCAAIAVBgAIQLiACQYACayICQf8BSw0ACwsgACAFIAIQLgsgBUGAAmokAAuBAQEBfyMAQRBrIgQkACACIANsIQICQCAAQSdGBEAgBEEMaiACEIwBIQBBACAEKAIMIAAbIQAMAQsgAUEBIAJBxABqIAARAAAiAUUEQEEAIQAMAQtBwAAgAUE/cWsiACABakHAAEEAIABBBEkbaiIAQQRrIAE2AAALIARBEGokACAAC1IBAn9BhIEBKAIAIgEgAEEDakF8cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQA0UNAQtBhIEBIAA2AgAgAQ8LQYSEAUEwNgIAQX8LNwAgAEJ/NwMQIABBADYCCCAAQgA3AwAgAEEANgIwIABC/////w83AyggAEIANwMYIABCADcDIAulAQEBf0HYABAJIgFFBEBBAA8LAkAgAARAIAEgAEHYABAHGgwBCyABQgA3AyAgAUEANgIYIAFC/////w83AxAgAUEAOwEMIAFBv4YoNgIIIAFBAToABiABQQA6AAQgAUIANwNIIAFBgIDYjXg2AkQgAUIANwMoIAFCADcDMCABQgA3AzggAUFAa0EAOwEAIAFCADcDUAsgAUEBOgAFIAFBADYCACABC1gCAn4BfwJAAkAgAC0AAEUNACAAKQMQIgMgAq18IgQgA1QNACAEIAApAwhYDQELIABBADoAAA8LIAAoAgQiBUUEQA8LIAAgBDcDECAFIAOnaiABIAIQBxoLlgEBAn8CQAJAIAJFBEAgAacQCSIFRQ0BQRgQCSIEDQIgBRAGDAELIAIhBUEYEAkiBA0BCyADBEAgA0EANgIEIANBDjYCAAtBAA8LIARCADcDECAEIAE3AwggBCAFNgIEIARBAToAACAEIAJFOgABIAAgBSABIAMQZUEASAR/IAQtAAEEQCAEKAIEEAYLIAQQBkEABSAECwubAgEDfyAALQAAQSBxRQRAAkAgASEDAkAgAiAAIgEoAhAiAAR/IAAFAn8gASABLQBKIgBBAWsgAHI6AEogASgCACIAQQhxBEAgASAAQSByNgIAQX8MAQsgAUIANwIEIAEgASgCLCIANgIcIAEgADYCFCABIAAgASgCMGo2AhBBAAsNASABKAIQCyABKAIUIgVrSwRAIAEgAyACIAEoAiQRAAAaDAILAn8gASwAS0F/SgRAIAIhAANAIAIgACIERQ0CGiADIARBAWsiAGotAABBCkcNAAsgASADIAQgASgCJBEAACAESQ0CIAMgBGohAyABKAIUIQUgAiAEawwBCyACCyEAIAUgAyAAEAcaIAEgASgCFCAAajYCFAsLCwvNBQEGfyAAKAIwIgNBhgJrIQYgACgCPCECIAMhAQNAIAAoAkQgAiAAKAJoIgRqayECIAEgBmogBE0EQCAAKAJIIgEgASADaiADEAcaAkAgAyAAKAJsIgFNBEAgACABIANrNgJsDAELIABCADcCbAsgACAAKAJoIANrIgE2AmggACAAKAJYIANrNgJYIAEgACgChC5JBEAgACABNgKELgsgAEH8gAEoAgARAwAgAiADaiECCwJAIAAoAgAiASgCBCIERQ0AIAAoAjwhBSAAIAIgBCACIARJGyICBH8gACgCSCAAKAJoaiAFaiEFIAEgBCACazYCBAJAAkACQAJAIAEoAhwiBCgCFEEBaw4CAQACCyAEQaABaiAFIAEoAgAgAkHcgAEoAgARCAAMAgsgASABKAIwIAUgASgCACACQcSAASgCABEEADYCMAwBCyAFIAEoAgAgAhAHGgsgASABKAIAIAJqNgIAIAEgASgCCCACajYCCCAAKAI8BSAFCyACaiICNgI8AkAgACgChC4iASACakEDSQ0AIAAoAmggAWshAQJAIAAoAnRBgQhPBEAgACAAIAAoAkggAWoiAi0AACACLQABIAAoAnwRAAA2AlQMAQsgAUUNACAAIAFBAWsgACgChAERAgAaCyAAKAKELiAAKAI8IgJBAUZrIgRFDQAgACABIAQgACgCgAERBQAgACAAKAKELiAEazYChC4gACgCPCECCyACQYUCSw0AIAAoAgAoAgRFDQAgACgCMCEBDAELCwJAIAAoAkQiAiAAKAJAIgNNDQAgAAJ/IAAoAjwgACgCaGoiASADSwRAIAAoAkggAWpBACACIAFrIgNBggIgA0GCAkkbIgMQGSABIANqDAELIAFBggJqIgEgA00NASAAKAJIIANqQQAgAiADayICIAEgA2siAyACIANJGyIDEBkgACgCQCADags2AkALC50CAQF/AkAgAAJ/IAAoAqAuIgFBwABGBEAgACgCBCAAKAIQaiAAKQOYLjcAACAAQgA3A5guIAAgACgCEEEIajYCEEEADAELIAFBIE4EQCAAKAIEIAAoAhBqIAApA5guPgAAIAAgAEGcLmo1AgA3A5guIAAgACgCEEEEajYCECAAIAAoAqAuQSBrIgE2AqAuCyABQRBOBEAgACgCBCAAKAIQaiAAKQOYLj0AACAAIAAoAhBBAmo2AhAgACAAKQOYLkIQiDcDmC4gACAAKAKgLkEQayIBNgKgLgsgAUEISA0BIAAgACgCECIBQQFqNgIQIAEgACgCBGogACkDmC48AAAgACAAKQOYLkIIiDcDmC4gACgCoC5BCGsLNgKgLgsLEAAgACgCCBAGIABBADYCCAvwAQECf0F/IQECQCAALQAoDQAgACgCJEEDRgRAIABBDGoEQCAAQQA2AhAgAEEXNgIMC0F/DwsCQCAAKAIgBEAgACkDGELAAINCAFINASAAQQxqBEAgAEEANgIQIABBHTYCDAtBfw8LAkAgACgCACICRQ0AIAIQMkF/Sg0AIAAoAgAhASAAQQxqIgAEQCAAIAEoAgw2AgAgACABKAIQNgIEC0F/DwsgAEEAQgBBABAOQn9VDQAgACgCACIARQ0BIAAQGhpBfw8LQQAhASAAQQA7ATQgAEEMagRAIABCADcCDAsgACAAKAIgQQFqNgIgCyABCzsAIAAtACgEfkJ/BSAAKAIgRQRAIABBDGoiAARAIABBADYCBCAAQRI2AgALQn8PCyAAQQBCAEEHEA4LC5oIAQt/IABFBEAgARAJDwsgAUFATwRAQYSEAUEwNgIAQQAPCwJ/QRAgAUELakF4cSABQQtJGyEGIABBCGsiBSgCBCIJQXhxIQQCQCAJQQNxRQRAQQAgBkGAAkkNAhogBkEEaiAETQRAIAUhAiAEIAZrQZSIASgCAEEBdE0NAgtBAAwCCyAEIAVqIQcCQCAEIAZPBEAgBCAGayIDQRBJDQEgBSAJQQFxIAZyQQJyNgIEIAUgBmoiAiADQQNyNgIEIAcgBygCBEEBcjYCBCACIAMQOwwBCyAHQcyEASgCAEYEQEHAhAEoAgAgBGoiBCAGTQ0CIAUgCUEBcSAGckECcjYCBCAFIAZqIgMgBCAGayICQQFyNgIEQcCEASACNgIAQcyEASADNgIADAELIAdByIQBKAIARgRAQbyEASgCACAEaiIDIAZJDQICQCADIAZrIgJBEE8EQCAFIAlBAXEgBnJBAnI2AgQgBSAGaiIEIAJBAXI2AgQgAyAFaiIDIAI2AgAgAyADKAIEQX5xNgIEDAELIAUgCUEBcSADckECcjYCBCADIAVqIgIgAigCBEEBcjYCBEEAIQJBACEEC0HIhAEgBDYCAEG8hAEgAjYCAAwBCyAHKAIEIgNBAnENASADQXhxIARqIgogBkkNASAKIAZrIQwCQCADQf8BTQRAIAcoAggiBCADQQN2IgJBA3RB3IQBakYaIAQgBygCDCIDRgRAQbSEAUG0hAEoAgBBfiACd3E2AgAMAgsgBCADNgIMIAMgBDYCCAwBCyAHKAIYIQsCQCAHIAcoAgwiCEcEQCAHKAIIIgJBxIQBKAIASRogAiAINgIMIAggAjYCCAwBCwJAIAdBFGoiBCgCACICDQAgB0EQaiIEKAIAIgINAEEAIQgMAQsDQCAEIQMgAiIIQRRqIgQoAgAiAg0AIAhBEGohBCAIKAIQIgINAAsgA0EANgIACyALRQ0AAkAgByAHKAIcIgNBAnRB5IYBaiICKAIARgRAIAIgCDYCACAIDQFBuIQBQbiEASgCAEF+IAN3cTYCAAwCCyALQRBBFCALKAIQIAdGG2ogCDYCACAIRQ0BCyAIIAs2AhggBygCECICBEAgCCACNgIQIAIgCDYCGAsgBygCFCICRQ0AIAggAjYCFCACIAg2AhgLIAxBD00EQCAFIAlBAXEgCnJBAnI2AgQgBSAKaiICIAIoAgRBAXI2AgQMAQsgBSAJQQFxIAZyQQJyNgIEIAUgBmoiAyAMQQNyNgIEIAUgCmoiAiACKAIEQQFyNgIEIAMgDBA7CyAFIQILIAILIgIEQCACQQhqDwsgARAJIgVFBEBBAA8LIAUgAEF8QXggAEEEaygCACICQQNxGyACQXhxaiICIAEgASACSxsQBxogABAGIAUL6QEBA38CQCABRQ0AIAJBgDBxIgIEfwJ/IAJBgCBHBEBBAiACQYAQRg0BGiADBEAgA0EANgIEIANBEjYCAAtBAA8LQQQLIQJBAAVBAQshBkEUEAkiBEUEQCADBEAgA0EANgIEIANBDjYCAAtBAA8LIAQgAUEBahAJIgU2AgAgBUUEQCAEEAZBAA8LIAUgACABEAcgAWpBADoAACAEQQA2AhAgBEIANwMIIAQgATsBBCAGDQAgBCACECNBBUcNACAEKAIAEAYgBCgCDBAGIAQQBkEAIQQgAwRAIANBADYCBCADQRI2AgALCyAEC7UBAQJ/AkACQAJAAkACQAJAAkAgAC0ABQRAIAAtAABBAnFFDQELIAAoAjAQECAAQQA2AjAgAC0ABUUNAQsgAC0AAEEIcUUNAQsgACgCNBAcIABBADYCNCAALQAFRQ0BCyAALQAAQQRxRQ0BCyAAKAI4EBAgAEEANgI4IAAtAAVFDQELIAAtAABBgAFxRQ0BCyAAKAJUIgEEfyABQQAgARAiEBkgACgCVAVBAAsQBiAAQQA2AlQLC9wMAgl/AX4jAEFAaiIGJAACQAJAAkACQAJAIAEoAjBBABAjIgVBAkZBACABKAI4QQAQIyIEQQFGGw0AIAVBAUZBACAEQQJGGw0AIAVBAkciAw0BIARBAkcNAQsgASABLwEMQYAQcjsBDEEAIQMMAQsgASABLwEMQf/vA3E7AQxBACEFIANFBEBB9eABIAEoAjAgAEEIahBpIgVFDQILIAJBgAJxBEAgBSEDDAELIARBAkcEQCAFIQMMAQtB9cYBIAEoAjggAEEIahBpIgNFBEAgBRAcDAILIAMgBTYCAAsgASABLwEMQf7/A3EgAS8BUiIFQQBHcjsBDAJAAkACQAJAAn8CQAJAIAEpAyhC/v///w9WDQAgASkDIEL+////D1YNACACQYAEcUUNASABKQNIQv////8PVA0BCyAFQYECa0H//wNxQQNJIQdBAQwBCyAFQYECa0H//wNxIQQgAkGACnFBgApHDQEgBEEDSSEHQQALIQkgBkIcEBciBEUEQCAAQQhqIgAEQCAAQQA2AgQgAEEONgIACyADEBwMBQsgAkGACHEhBQJAAkAgAkGAAnEEQAJAIAUNACABKQMgQv////8PVg0AIAEpAyhCgICAgBBUDQMLIAQgASkDKBAYIAEpAyAhDAwBCwJAAkACQCAFDQAgASkDIEL/////D1YNACABKQMoIgxC/////w9WDQEgASkDSEKAgICAEFQNBAsgASkDKCIMQv////8PVA0BCyAEIAwQGAsgASkDICIMQv////8PWgRAIAQgDBAYCyABKQNIIgxC/////w9UDQELIAQgDBAYCyAELQAARQRAIABBCGoiAARAIABBADYCBCAAQRQ2AgALIAQQCCADEBwMBQtBASEKQQEgBC0AAAR+IAQpAxAFQgALp0H//wNxIAYQRyEFIAQQCCAFIAM2AgAgBw0BDAILIAMhBSAEQQJLDQELIAZCBxAXIgRFBEAgAEEIaiIABEAgAEEANgIEIABBDjYCAAsgBRAcDAMLIARBAhANIARBhxJBAhAsIAQgAS0AUhBwIAQgAS8BEBANIAQtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAsgBBAIDAILQYGyAkEHIAYQRyEDIAQQCCADIAU2AgBBASELIAMhBQsgBkIuEBciA0UEQCAAQQhqIgAEQCAAQQA2AgQgAEEONgIACyAFEBwMAgsgA0GjEkGoEiACQYACcSIHG0EEECwgB0UEQCADIAkEf0EtBSABLwEIC0H//wNxEA0LIAMgCQR/QS0FIAEvAQoLQf//A3EQDSADIAEvAQwQDSADIAsEf0HjAAUgASgCEAtB//8DcRANIAYgASgCFDYCPAJ/IAZBPGoQjQEiCEUEQEEAIQlBIQwBCwJ/IAgoAhQiBEHQAE4EQCAEQQl0DAELIAhB0AA2AhRBgMACCyEEIAgoAgRBBXQgCCgCCEELdGogCCgCAEEBdmohCSAIKAIMIAQgCCgCEEEFdGpqQaDAAWoLIQQgAyAJQf//A3EQDSADIARB//8DcRANIAMCfyALBEBBACABKQMoQhRUDQEaCyABKAIYCxASIAEpAyAhDCADAn8gAwJ/AkAgBwRAIAxC/v///w9YBEAgASkDKEL/////D1QNAgsgA0F/EBJBfwwDC0F/IAxC/v///w9WDQEaCyAMpwsQEiABKQMoIgxC/////w8gDEL/////D1QbpwsQEiADIAEoAjAiBAR/IAQvAQQFQQALQf//A3EQDSADIAEoAjQgAhBsIAVBgAYQbGpB//8DcRANIAdFBEAgAyABKAI4IgQEfyAELwEEBUEAC0H//wNxEA0gAyABLwE8EA0gAyABLwFAEA0gAyABKAJEEBIgAyABKQNIIgxC/////w8gDEL/////D1QbpxASCyADLQAARQRAIABBCGoiAARAIABBADYCBCAAQRQ2AgALIAMQCCAFEBwMAgsgACAGIAMtAAAEfiADKQMQBUIACxAbIQQgAxAIIARBf0wNACABKAIwIgMEQCAAIAMQYUF/TA0BCyAFBEAgACAFQYAGEGtBf0wNAQsgBRAcIAEoAjQiBQRAIAAgBSACEGtBAEgNAgsgBw0CIAEoAjgiAUUNAiAAIAEQYUEATg0CDAELIAUQHAtBfyEKCyAGQUBrJAAgCgtNAQJ/IAEtAAAhAgJAIAAtAAAiA0UNACACIANHDQADQCABLQABIQIgAC0AASIDRQ0BIAFBAWohASAAQQFqIQAgAiADRg0ACwsgAyACawvcAwICfgF/IAOtIQQgACkDmC4hBQJAIAACfyAAAn4gACgCoC4iBkEDaiIDQT9NBEAgBCAGrYYgBYQMAQsgBkHAAEYEQCAAKAIEIAAoAhBqIAU3AAAgACgCEEEIagwCCyAAKAIEIAAoAhBqIAQgBq2GIAWENwAAIAAgACgCEEEIajYCECAGQT1rIQMgBEHAACAGa62ICyIENwOYLiAAIAM2AqAuIANBOU4EQCAAKAIEIAAoAhBqIAQ3AAAgACAAKAIQQQhqNgIQDAILIANBGU4EQCAAKAIEIAAoAhBqIAQ+AAAgACAAKAIQQQRqNgIQIAAgACkDmC5CIIgiBDcDmC4gACAAKAKgLkEgayIDNgKgLgsgA0EJTgR/IAAoAgQgACgCEGogBD0AACAAIAAoAhBBAmo2AhAgACkDmC5CEIghBCAAKAKgLkEQawUgAwtBAUgNASAAKAIQCyIDQQFqNgIQIAAoAgQgA2ogBDwAAAsgAEEANgKgLiAAQgA3A5guIAAoAgQgACgCEGogAjsAACAAIAAoAhBBAmoiAzYCECAAKAIEIANqIAJBf3M7AAAgACAAKAIQQQJqIgM2AhAgAgRAIAAoAgQgA2ogASACEAcaIAAgACgCECACajYCEAsLrAQCAX8BfgJAIAANACABUA0AIAMEQCADQQA2AgQgA0ESNgIAC0EADwsCQAJAIAAgASACIAMQiQEiBEUNAEEYEAkiAkUEQCADBEAgA0EANgIEIANBDjYCAAsCQCAEKAIoIgBFBEAgBCkDGCEBDAELIABBADYCKCAEKAIoQgA3AyAgBCAEKQMYIgUgBCkDICIBIAEgBVQbIgE3AxgLIAQpAwggAVYEQANAIAQoAgAgAadBBHRqKAIAEAYgAUIBfCIBIAQpAwhUDQALCyAEKAIAEAYgBCgCBBAGIAQQBgwBCyACQQA2AhQgAiAENgIQIAJBABABNgIMIAJBADYCCCACQgA3AgACf0E4EAkiAEUEQCADBEAgA0EANgIEIANBDjYCAAtBAAwBCyAAQQA2AgggAEIANwMAIABCADcDICAAQoCAgIAQNwIsIABBADoAKCAAQQA2AhQgAEIANwIMIABBADsBNCAAIAI2AgggAEEkNgIEIABCPyACQQBCAEEOQSQRDAAiASABQgBTGzcDGCAACyIADQEgAigCECIDBEACQCADKAIoIgBFBEAgAykDGCEBDAELIABBADYCKCADKAIoQgA3AyAgAyADKQMYIgUgAykDICIBIAEgBVQbIgE3AxgLIAMpAwggAVYEQANAIAMoAgAgAadBBHRqKAIAEAYgAUIBfCIBIAMpAwhUDQALCyADKAIAEAYgAygCBBAGIAMQBgsgAhAGC0EAIQALIAALiwwBBn8gACABaiEFAkACQCAAKAIEIgJBAXENACACQQNxRQ0BIAAoAgAiAiABaiEBAkAgACACayIAQciEASgCAEcEQCACQf8BTQRAIAAoAggiBCACQQN2IgJBA3RB3IQBakYaIAAoAgwiAyAERw0CQbSEAUG0hAEoAgBBfiACd3E2AgAMAwsgACgCGCEGAkAgACAAKAIMIgNHBEAgACgCCCICQcSEASgCAEkaIAIgAzYCDCADIAI2AggMAQsCQCAAQRRqIgIoAgAiBA0AIABBEGoiAigCACIEDQBBACEDDAELA0AgAiEHIAQiA0EUaiICKAIAIgQNACADQRBqIQIgAygCECIEDQALIAdBADYCAAsgBkUNAgJAIAAgACgCHCIEQQJ0QeSGAWoiAigCAEYEQCACIAM2AgAgAw0BQbiEAUG4hAEoAgBBfiAEd3E2AgAMBAsgBkEQQRQgBigCECAARhtqIAM2AgAgA0UNAwsgAyAGNgIYIAAoAhAiAgRAIAMgAjYCECACIAM2AhgLIAAoAhQiAkUNAiADIAI2AhQgAiADNgIYDAILIAUoAgQiAkEDcUEDRw0BQbyEASABNgIAIAUgAkF+cTYCBCAAIAFBAXI2AgQgBSABNgIADwsgBCADNgIMIAMgBDYCCAsCQCAFKAIEIgJBAnFFBEAgBUHMhAEoAgBGBEBBzIQBIAA2AgBBwIQBQcCEASgCACABaiIBNgIAIAAgAUEBcjYCBCAAQciEASgCAEcNA0G8hAFBADYCAEHIhAFBADYCAA8LIAVByIQBKAIARgRAQciEASAANgIAQbyEAUG8hAEoAgAgAWoiATYCACAAIAFBAXI2AgQgACABaiABNgIADwsgAkF4cSABaiEBAkAgAkH/AU0EQCAFKAIIIgQgAkEDdiICQQN0QdyEAWpGGiAEIAUoAgwiA0YEQEG0hAFBtIQBKAIAQX4gAndxNgIADAILIAQgAzYCDCADIAQ2AggMAQsgBSgCGCEGAkAgBSAFKAIMIgNHBEAgBSgCCCICQcSEASgCAEkaIAIgAzYCDCADIAI2AggMAQsCQCAFQRRqIgQoAgAiAg0AIAVBEGoiBCgCACICDQBBACEDDAELA0AgBCEHIAIiA0EUaiIEKAIAIgINACADQRBqIQQgAygCECICDQALIAdBADYCAAsgBkUNAAJAIAUgBSgCHCIEQQJ0QeSGAWoiAigCAEYEQCACIAM2AgAgAw0BQbiEAUG4hAEoAgBBfiAEd3E2AgAMAgsgBkEQQRQgBigCECAFRhtqIAM2AgAgA0UNAQsgAyAGNgIYIAUoAhAiAgRAIAMgAjYCECACIAM2AhgLIAUoAhQiAkUNACADIAI2AhQgAiADNgIYCyAAIAFBAXI2AgQgACABaiABNgIAIABByIQBKAIARw0BQbyEASABNgIADwsgBSACQX5xNgIEIAAgAUEBcjYCBCAAIAFqIAE2AgALIAFB/wFNBEAgAUEDdiICQQN0QdyEAWohAQJ/QbSEASgCACIDQQEgAnQiAnFFBEBBtIQBIAIgA3I2AgAgAQwBCyABKAIICyECIAEgADYCCCACIAA2AgwgACABNgIMIAAgAjYCCA8LQR8hAiAAQgA3AhAgAUH///8HTQRAIAFBCHYiAiACQYD+P2pBEHZBCHEiBHQiAiACQYDgH2pBEHZBBHEiA3QiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAEciACcmsiAkEBdCABIAJBFWp2QQFxckEcaiECCyAAIAI2AhwgAkECdEHkhgFqIQcCQAJAQbiEASgCACIEQQEgAnQiA3FFBEBBuIQBIAMgBHI2AgAgByAANgIAIAAgBzYCGAwBCyABQQBBGSACQQF2ayACQR9GG3QhAiAHKAIAIQMDQCADIgQoAgRBeHEgAUYNAiACQR12IQMgAkEBdCECIAQgA0EEcWoiB0EQaigCACIDDQALIAcgADYCECAAIAQ2AhgLIAAgADYCDCAAIAA2AggPCyAEKAIIIgEgADYCDCAEIAA2AgggAEEANgIYIAAgBDYCDCAAIAE2AggLC1gCAX8BfgJAAn9BACAARQ0AGiAArUIChiICpyIBIABBBHJBgIAESQ0AGkF/IAEgAkIgiKcbCyIBEAkiAEUNACAAQQRrLQAAQQNxRQ0AIABBACABEBkLIAALQwEDfwJAIAJFDQADQCAALQAAIgQgAS0AACIFRgRAIAFBAWohASAAQQFqIQAgAkEBayICDQEMAgsLIAQgBWshAwsgAwsUACAAEEAgACgCABAgIAAoAgQQIAutBAIBfgV/IwBBEGsiBCQAIAAgAWshBgJAAkAgAUEBRgRAIAAgBi0AACACEBkMAQsgAUEJTwRAIAAgBikAADcAACAAIAJBAWtBB3FBAWoiBWohACACIAVrIgFFDQIgBSAGaiECA0AgACACKQAANwAAIAJBCGohAiAAQQhqIQAgAUEIayIBDQALDAILAkACQAJAAkAgAUEEaw4FAAICAgECCyAEIAYoAAAiATYCBCAEIAE2AgAMAgsgBCAGKQAANwMADAELQQghByAEQQhqIQgDQCAIIAYgByABIAEgB0sbIgUQByAFaiEIIAcgBWsiBw0ACyAEIAQpAwg3AwALAkAgBQ0AIAJBEEkNACAEKQMAIQMgAkEQayIGQQR2QQFqQQdxIgEEQANAIAAgAzcACCAAIAM3AAAgAkEQayECIABBEGohACABQQFrIgENAAsLIAZB8ABJDQADQCAAIAM3AHggACADNwBwIAAgAzcAaCAAIAM3AGAgACADNwBYIAAgAzcAUCAAIAM3AEggACADNwBAIAAgAzcAOCAAIAM3ADAgACADNwAoIAAgAzcAICAAIAM3ABggACADNwAQIAAgAzcACCAAIAM3AAAgAEGAAWohACACQYABayICQQ9LDQALCyACQQhPBEBBCCAFayEBA0AgACAEKQMANwAAIAAgAWohACACIAFrIgJBB0sNAAsLIAJFDQEgACAEIAIQBxoLIAAgAmohAAsgBEEQaiQAIAALXwECfyAAKAIIIgEEQCABEAsgAEEANgIICwJAIAAoAgQiAUUNACABKAIAIgJBAXFFDQAgASgCEEF+Rw0AIAEgAkF+cSICNgIAIAINACABECAgAEEANgIECyAAQQA6AAwL1wICBH8BfgJAAkAgACgCQCABp0EEdGooAgAiA0UEQCACBEAgAkEANgIEIAJBFDYCAAsMAQsgACgCACADKQNIIgdBABAUIQMgACgCACEAIANBf0wEQCACBEAgAiAAKAIMNgIAIAIgACgCEDYCBAsMAQtCACEBIwBBEGsiBiQAQX8hAwJAIABCGkEBEBRBf0wEQCACBEAgAiAAKAIMNgIAIAIgACgCEDYCBAsMAQsgAEIEIAZBCmogAhAtIgRFDQBBHiEAQQEhBQNAIAQQDCAAaiEAIAVBAkcEQCAFQQFqIQUMAQsLIAQtAAAEfyAEKQMQIAQpAwhRBUEAC0UEQCACBEAgAkEANgIEIAJBFDYCAAsgBBAIDAELIAQQCCAAIQMLIAZBEGokACADIgBBAEgNASAHIACtfCIBQn9VDQEgAgRAIAJBFjYCBCACQQQ2AgALC0IAIQELIAELYAIBfgF/AkAgAEUNACAAQQhqEF8iAEUNACABIAEoAjBBAWo2AjAgACADNgIIIAAgAjYCBCAAIAE2AgAgAEI/IAEgA0EAQgBBDiACEQoAIgQgBEIAUxs3AxggACEFCyAFCyIAIAAoAiRBAWtBAU0EQCAAQQBCAEEKEA4aIABBADYCJAsLbgACQAJAAkAgA0IQVA0AIAJFDQECfgJAAkACQCACKAIIDgMCAAEECyACKQMAIAB8DAILIAIpAwAgAXwMAQsgAikDAAsiA0IAUw0AIAEgA1oNAgsgBARAIARBADYCBCAEQRI2AgALC0J/IQMLIAMLggICAX8CfgJAQQEgAiADGwRAIAIgA2oQCSIFRQRAIAQEQCAEQQA2AgQgBEEONgIAC0EADwsgAq0hBgJAAkAgAARAIAAgBhATIgBFBEAgBARAIARBADYCBCAEQQ42AgALDAULIAUgACACEAcaIAMNAQwCCyABIAUgBhARIgdCf1cEQCAEBEAgBCABKAIMNgIAIAQgASgCEDYCBAsMBAsgBiAHVQRAIAQEQCAEQQA2AgQgBEERNgIACwwECyADRQ0BCyACIAVqIgBBADoAACACQQFIDQAgBSECA0AgAi0AAEUEQCACQSA6AAALIAJBAWoiAiAASQ0ACwsLIAUPCyAFEAZBAAuBAQEBfwJAIAAEQCADQYAGcSEFQQAhAwNAAkAgAC8BCCACRw0AIAUgACgCBHFFDQAgA0EATg0DIANBAWohAwsgACgCACIADQALCyAEBEAgBEEANgIEIARBCTYCAAtBAA8LIAEEQCABIAAvAQo7AQALIAAvAQpFBEBBwBQPCyAAKAIMC1cBAX9BEBAJIgNFBEBBAA8LIAMgATsBCiADIAA7AQggA0GABjYCBCADQQA2AgACQCABBEAgAyACIAEQYyIANgIMIAANASADEAZBAA8LIANBADYCDAsgAwvuBQIEfwV+IwBB4ABrIgQkACAEQQhqIgNCADcDICADQQA2AhggA0L/////DzcDECADQQA7AQwgA0G/hig2AgggA0EBOgAGIANBADsBBCADQQA2AgAgA0IANwNIIANBgIDYjXg2AkQgA0IANwMoIANCADcDMCADQgA3AzggA0FAa0EAOwEAIANCADcDUCABKQMIUCIDRQRAIAEoAgAoAgApA0ghBwsCfgJAIAMEQCAHIQkMAQsgByEJA0AgCqdBBHQiBSABKAIAaigCACIDKQNIIgggCSAIIAlUGyIJIAEpAyBWBEAgAgRAIAJBADYCBCACQRM2AgALQn8MAwsgAygCMCIGBH8gBi8BBAVBAAtB//8Dca0gCCADKQMgfHxCHnwiCCAHIAcgCFQbIgcgASkDIFYEQCACBEAgAkEANgIEIAJBEzYCAAtCfwwDCyAAKAIAIAEoAgAgBWooAgApA0hBABAUIQYgACgCACEDIAZBf0wEQCACBEAgAiADKAIMNgIAIAIgAygCEDYCBAtCfwwDCyAEQQhqIANBAEEBIAIQaEJ/UQRAIARBCGoQNkJ/DAMLAkACQCABKAIAIAVqKAIAIgMvAQogBC8BEkkNACADKAIQIAQoAhhHDQAgAygCFCAEKAIcRw0AIAMoAjAgBCgCOBBiRQ0AAkAgBCgCICIGIAMoAhhHBEAgBCkDKCEIDAELIAMpAyAiCyAEKQMoIghSDQAgCyEIIAMpAyggBCkDMFENAgsgBC0AFEEIcUUNACAGDQAgCEIAUg0AIAQpAzBQDQELIAIEQCACQQA2AgQgAkEVNgIACyAEQQhqEDZCfwwDCyABKAIAIAVqKAIAKAI0IAQoAjwQbyEDIAEoAgAgBWooAgAiBUEBOgAEIAUgAzYCNCAEQQA2AjwgBEEIahA2IApCAXwiCiABKQMIVA0ACwsgByAJfSIHQv///////////wAgB0L///////////8AVBsLIQcgBEHgAGokACAHC8YBAQJ/QdgAEAkiAUUEQCAABEAgAEEANgIEIABBDjYCAAtBAA8LIAECf0EYEAkiAkUEQCAABEAgAEEANgIEIABBDjYCAAtBAAwBCyACQQA2AhAgAkIANwMIIAJBADYCACACCyIANgJQIABFBEAgARAGQQAPCyABQgA3AwAgAUEANgIQIAFCADcCCCABQgA3AhQgAUEANgJUIAFCADcCHCABQgA3ACEgAUIANwMwIAFCADcDOCABQUBrQgA3AwAgAUIANwNIIAELgBMCD38CfiMAQdAAayIFJAAgBSABNgJMIAVBN2ohEyAFQThqIRBBACEBA0ACQCAOQQBIDQBB/////wcgDmsgAUgEQEGEhAFBPTYCAEF/IQ4MAQsgASAOaiEOCyAFKAJMIgchAQJAAkACQAJAAkACQAJAAkAgBQJ/AkAgBy0AACIGBEADQAJAAkAgBkH/AXEiBkUEQCABIQYMAQsgBkElRw0BIAEhBgNAIAEtAAFBJUcNASAFIAFBAmoiCDYCTCAGQQFqIQYgAS0AAiEMIAghASAMQSVGDQALCyAGIAdrIQEgAARAIAAgByABEC4LIAENDSAFKAJMIQEgBSgCTCwAAUEwa0EKTw0DIAEtAAJBJEcNAyABLAABQTBrIQ9BASERIAFBA2oMBAsgBSABQQFqIgg2AkwgAS0AASEGIAghAQwACwALIA4hDSAADQggEUUNAkEBIQEDQCAEIAFBAnRqKAIAIgAEQCADIAFBA3RqIAAgAhB4QQEhDSABQQFqIgFBCkcNAQwKCwtBASENIAFBCk8NCANAIAQgAUECdGooAgANCCABQQFqIgFBCkcNAAsMCAtBfyEPIAFBAWoLIgE2AkxBACEIAkAgASwAACIKQSBrIgZBH0sNAEEBIAZ0IgZBidEEcUUNAANAAkAgBSABQQFqIgg2AkwgASwAASIKQSBrIgFBIE8NAEEBIAF0IgFBidEEcUUNACABIAZyIQYgCCEBDAELCyAIIQEgBiEICwJAIApBKkYEQCAFAn8CQCABLAABQTBrQQpPDQAgBSgCTCIBLQACQSRHDQAgASwAAUECdCAEakHAAWtBCjYCACABLAABQQN0IANqQYADaygCACELQQEhESABQQNqDAELIBENCEEAIRFBACELIAAEQCACIAIoAgAiAUEEajYCACABKAIAIQsLIAUoAkxBAWoLIgE2AkwgC0F/Sg0BQQAgC2shCyAIQYDAAHIhCAwBCyAFQcwAahB3IgtBAEgNBiAFKAJMIQELQX8hCQJAIAEtAABBLkcNACABLQABQSpGBEACQCABLAACQTBrQQpPDQAgBSgCTCIBLQADQSRHDQAgASwAAkECdCAEakHAAWtBCjYCACABLAACQQN0IANqQYADaygCACEJIAUgAUEEaiIBNgJMDAILIBENByAABH8gAiACKAIAIgFBBGo2AgAgASgCAAVBAAshCSAFIAUoAkxBAmoiATYCTAwBCyAFIAFBAWo2AkwgBUHMAGoQdyEJIAUoAkwhAQtBACEGA0AgBiESQX8hDSABLAAAQcEAa0E5Sw0HIAUgAUEBaiIKNgJMIAEsAAAhBiAKIQEgBiASQTpsakGf7ABqLQAAIgZBAWtBCEkNAAsgBkETRg0CIAZFDQYgD0EATgRAIAQgD0ECdGogBjYCACAFIAMgD0EDdGopAwA3A0AMBAsgAA0BC0EAIQ0MBQsgBUFAayAGIAIQeCAFKAJMIQoMAgsgD0F/Sg0DC0EAIQEgAEUNBAsgCEH//3txIgwgCCAIQYDAAHEbIQZBACENQaQIIQ8gECEIAkACQAJAAn8CQAJAAkACQAJ/AkACQAJAAkACQAJAAkAgCkEBaywAACIBQV9xIAEgAUEPcUEDRhsgASASGyIBQdgAaw4hBBISEhISEhISDhIPBg4ODhIGEhISEgIFAxISCRIBEhIEAAsCQCABQcEAaw4HDhILEg4ODgALIAFB0wBGDQkMEQsgBSkDQCEUQaQIDAULQQAhAQJAAkACQAJAAkACQAJAIBJB/wFxDggAAQIDBBcFBhcLIAUoAkAgDjYCAAwWCyAFKAJAIA42AgAMFQsgBSgCQCAOrDcDAAwUCyAFKAJAIA47AQAMEwsgBSgCQCAOOgAADBILIAUoAkAgDjYCAAwRCyAFKAJAIA6sNwMADBALIAlBCCAJQQhLGyEJIAZBCHIhBkH4ACEBCyAQIQcgAUEgcSEMIAUpA0AiFFBFBEADQCAHQQFrIgcgFKdBD3FBsPAAai0AACAMcjoAACAUQg9WIQogFEIEiCEUIAoNAAsLIAUpA0BQDQMgBkEIcUUNAyABQQR2QaQIaiEPQQIhDQwDCyAQIQEgBSkDQCIUUEUEQANAIAFBAWsiASAUp0EHcUEwcjoAACAUQgdWIQcgFEIDiCEUIAcNAAsLIAEhByAGQQhxRQ0CIAkgECAHayIBQQFqIAEgCUgbIQkMAgsgBSkDQCIUQn9XBEAgBUIAIBR9IhQ3A0BBASENQaQIDAELIAZBgBBxBEBBASENQaUIDAELQaYIQaQIIAZBAXEiDRsLIQ8gECEBAkAgFEKAgICAEFQEQCAUIRUMAQsDQCABQQFrIgEgFCAUQgqAIhVCCn59p0EwcjoAACAUQv////+fAVYhByAVIRQgBw0ACwsgFaciBwRAA0AgAUEBayIBIAcgB0EKbiIMQQpsa0EwcjoAACAHQQlLIQogDCEHIAoNAAsLIAEhBwsgBkH//3txIAYgCUF/ShshBgJAIAUpA0AiFEIAUg0AIAkNAEEAIQkgECEHDAoLIAkgFFAgECAHa2oiASABIAlIGyEJDAkLIAUoAkAiAUGKEiABGyIHQQAgCRB6IgEgByAJaiABGyEIIAwhBiABIAdrIAkgARshCQwICyAJBEAgBSgCQAwCC0EAIQEgAEEgIAtBACAGECcMAgsgBUEANgIMIAUgBSkDQD4CCCAFIAVBCGo2AkBBfyEJIAVBCGoLIQhBACEBAkADQCAIKAIAIgdFDQECQCAFQQRqIAcQeSIHQQBIIgwNACAHIAkgAWtLDQAgCEEEaiEIIAkgASAHaiIBSw0BDAILC0F/IQ0gDA0FCyAAQSAgCyABIAYQJyABRQRAQQAhAQwBC0EAIQggBSgCQCEKA0AgCigCACIHRQ0BIAVBBGogBxB5IgcgCGoiCCABSg0BIAAgBUEEaiAHEC4gCkEEaiEKIAEgCEsNAAsLIABBICALIAEgBkGAwABzECcgCyABIAEgC0gbIQEMBQsgACAFKwNAIAsgCSAGIAFBABEdACEBDAQLIAUgBSkDQDwAN0EBIQkgEyEHIAwhBgwCC0F/IQ0LIAVB0ABqJAAgDQ8LIABBICANIAggB2siDCAJIAkgDEgbIgpqIgggCyAIIAtKGyIBIAggBhAnIAAgDyANEC4gAEEwIAEgCCAGQYCABHMQJyAAQTAgCiAMQQAQJyAAIAcgDBAuIABBICABIAggBkGAwABzECcMAAsAC54DAgR/AX4gAARAIAAoAgAiAQRAIAEQGhogACgCABALCyAAKAIcEAYgACgCIBAQIAAoAiQQECAAKAJQIgMEQCADKAIQIgIEQCADKAIAIgEEfwNAIAIgBEECdGooAgAiAgRAA0AgAigCGCEBIAIQBiABIgINAAsgAygCACEBCyABIARBAWoiBEsEQCADKAIQIQIMAQsLIAMoAhAFIAILEAYLIAMQBgsgACgCQCIBBEAgACkDMFAEfyABBSABED5CAiEFAkAgACkDMEICVA0AQQEhAgNAIAAoAkAgAkEEdGoQPiAFIAApAzBaDQEgBachAiAFQgF8IQUMAAsACyAAKAJACxAGCwJAIAAoAkRFDQBBACECQgEhBQNAIAAoAkwgAkECdGooAgAiAUEBOgAoIAFBDGoiASgCAEUEQCABBEAgAUEANgIEIAFBCDYCAAsLIAUgADUCRFoNASAFpyECIAVCAXwhBQwACwALIAAoAkwQBiAAKAJUIgIEQCACKAIIIgEEQCACKAIMIAERAwALIAIQBgsgAEEIahAxIAAQBgsL6gMCAX4EfwJAIAAEfiABRQRAIAMEQCADQQA2AgQgA0ESNgIAC0J/DwsgAkGDIHEEQAJAIAApAzBQDQBBPEE9IAJBAXEbIQcgAkECcUUEQANAIAAgBCACIAMQUyIFBEAgASAFIAcRAgBFDQYLIARCAXwiBCAAKQMwVA0ADAILAAsDQCAAIAQgAiADEFMiBQRAIAECfyAFECJBAWohBgNAQQAgBkUNARogBSAGQQFrIgZqIggtAABBL0cNAAsgCAsiBkEBaiAFIAYbIAcRAgBFDQULIARCAXwiBCAAKQMwVA0ACwsgAwRAIANBADYCBCADQQk2AgALQn8PC0ESIQYCQAJAIAAoAlAiBUUNACABRQ0AQQkhBiAFKQMIUA0AIAUoAhAgAS0AACIHBH9CpesKIQQgASEAA0AgBCAHrUL/AYN8IQQgAC0AASIHBEAgAEEBaiEAIARC/////w+DQiF+IQQMAQsLIASnBUGFKgsgBSgCAHBBAnRqKAIAIgBFDQADQCABIAAoAgAQOEUEQCACQQhxBEAgACkDCCIEQn9RDQMMBAsgACkDECIEQn9RDQIMAwsgACgCGCIADQALCyADBEAgA0EANgIEIAMgBjYCAAtCfyEECyAEBUJ/Cw8LIAMEQCADQgA3AgALIAQL3AQCB38BfgJAAkAgAEUNACABRQ0AIAJCf1UNAQsgBARAIARBADYCBCAEQRI2AgALQQAPCwJAIAAoAgAiB0UEQEGAAiEHQYACEDwiBkUNASAAKAIQEAYgAEGAAjYCACAAIAY2AhALAkACQCAAKAIQIAEtAAAiBQR/QqXrCiEMIAEhBgNAIAwgBa1C/wGDfCEMIAYtAAEiBQRAIAZBAWohBiAMQv////8Pg0IhfiEMDAELCyAMpwVBhSoLIgYgB3BBAnRqIggoAgAiBQRAA0ACQCAFKAIcIAZHDQAgASAFKAIAEDgNAAJAIANBCHEEQCAFKQMIQn9SDQELIAUpAxBCf1ENBAsgBARAIARBADYCBCAEQQo2AgALQQAPCyAFKAIYIgUNAAsLQSAQCSIFRQ0CIAUgATYCACAFIAgoAgA2AhggCCAFNgIAIAVCfzcDCCAFIAY2AhwgACAAKQMIQgF8Igw3AwggDLogB7hEAAAAAAAA6D+iZEUNACAHQQBIDQAgByAHQQF0IghGDQAgCBA8IgpFDQECQCAMQgAgBxtQBEAgACgCECEJDAELIAAoAhAhCUEAIQQDQCAJIARBAnRqKAIAIgYEQANAIAYoAhghASAGIAogBigCHCAIcEECdGoiCygCADYCGCALIAY2AgAgASIGDQALCyAEQQFqIgQgB0cNAAsLIAkQBiAAIAg2AgAgACAKNgIQCyADQQhxBEAgBSACNwMICyAFIAI3AxBBAQ8LIAQEQCAEQQA2AgQgBEEONgIAC0EADwsgBARAIARBADYCBCAEQQ42AgALQQAL3Q8BF38jAEFAaiIHQgA3AzAgB0IANwM4IAdCADcDICAHQgA3AygCQAJAAkACQAJAIAIEQCACQQNxIQggAkEBa0EDTwRAIAJBfHEhBgNAIAdBIGogASAJQQF0IgxqLwEAQQF0aiIKIAovAQBBAWo7AQAgB0EgaiABIAxBAnJqLwEAQQF0aiIKIAovAQBBAWo7AQAgB0EgaiABIAxBBHJqLwEAQQF0aiIKIAovAQBBAWo7AQAgB0EgaiABIAxBBnJqLwEAQQF0aiIKIAovAQBBAWo7AQAgCUEEaiEJIAZBBGsiBg0ACwsgCARAA0AgB0EgaiABIAlBAXRqLwEAQQF0aiIGIAYvAQBBAWo7AQAgCUEBaiEJIAhBAWsiCA0ACwsgBCgCACEJQQ8hCyAHLwE+IhENAgwBCyAEKAIAIQkLQQ4hC0EAIREgBy8BPA0AQQ0hCyAHLwE6DQBBDCELIAcvATgNAEELIQsgBy8BNg0AQQohCyAHLwE0DQBBCSELIAcvATINAEEIIQsgBy8BMA0AQQchCyAHLwEuDQBBBiELIAcvASwNAEEFIQsgBy8BKg0AQQQhCyAHLwEoDQBBAyELIAcvASYNAEECIQsgBy8BJA0AIAcvASJFBEAgAyADKAIAIgBBBGo2AgAgAEHAAjYBACADIAMoAgAiAEEEajYCACAAQcACNgEAQQEhDQwDCyAJQQBHIRtBASELQQEhCQwBCyALIAkgCSALSxshG0EBIQ5BASEJA0AgB0EgaiAJQQF0ai8BAA0BIAlBAWoiCSALRw0ACyALIQkLQX8hCCAHLwEiIg9BAksNAUEEIAcvASQiECAPQQF0amsiBkEASA0BIAZBAXQgBy8BJiISayIGQQBIDQEgBkEBdCAHLwEoIhNrIgZBAEgNASAGQQF0IAcvASoiFGsiBkEASA0BIAZBAXQgBy8BLCIVayIGQQBIDQEgBkEBdCAHLwEuIhZrIgZBAEgNASAGQQF0IAcvATAiF2siBkEASA0BIAZBAXQgBy8BMiIZayIGQQBIDQEgBkEBdCAHLwE0IhxrIgZBAEgNASAGQQF0IAcvATYiDWsiBkEASA0BIAZBAXQgBy8BOCIYayIGQQBIDQEgBkEBdCAHLwE6IgxrIgZBAEgNASAGQQF0IAcvATwiCmsiBkEASA0BIAZBAXQgEWsiBkEASA0BIAZBACAARSAOchsNASAJIBtLIRpBACEIIAdBADsBAiAHIA87AQQgByAPIBBqIgY7AQYgByAGIBJqIgY7AQggByAGIBNqIgY7AQogByAGIBRqIgY7AQwgByAGIBVqIgY7AQ4gByAGIBZqIgY7ARAgByAGIBdqIgY7ARIgByAGIBlqIgY7ARQgByAGIBxqIgY7ARYgByAGIA1qIgY7ARggByAGIBhqIgY7ARogByAGIAxqIgY7ARwgByAGIApqOwEeAkAgAkUNACACQQFHBEAgAkF+cSEGA0AgASAIQQF0ai8BACIKBEAgByAKQQF0aiIKIAovAQAiCkEBajsBACAFIApBAXRqIAg7AQALIAEgCEEBciIMQQF0ai8BACIKBEAgByAKQQF0aiIKIAovAQAiCkEBajsBACAFIApBAXRqIAw7AQALIAhBAmohCCAGQQJrIgYNAAsLIAJBAXFFDQAgASAIQQF0ai8BACICRQ0AIAcgAkEBdGoiAiACLwEAIgJBAWo7AQAgBSACQQF0aiAIOwEACyAJIBsgGhshDUEUIRBBACEWIAUiCiEYQQAhEgJAAkACQCAADgICAAELQQEhCCANQQpLDQNBgQIhEEHw2QAhGEGw2QAhCkEBIRIMAQsgAEECRiEWQQAhEEHw2gAhGEGw2gAhCiAAQQJHBEAMAQtBASEIIA1BCUsNAgtBASANdCITQQFrIRwgAygCACEUQQAhFSANIQZBACEPQQAhDkF/IQIDQEEBIAZ0IRoCQANAIAkgD2shFwJAIAUgFUEBdGovAQAiCCAQTwRAIAogCCAQa0EBdCIAai8BACERIAAgGGotAAAhAAwBC0EAQeAAIAhBAWogEEkiBhshACAIQQAgBhshEQsgDiAPdiEMQX8gF3QhBiAaIQgDQCAUIAYgCGoiCCAMakECdGoiGSAROwECIBkgFzoAASAZIAA6AAAgCA0AC0EBIAlBAWt0IQYDQCAGIgBBAXYhBiAAIA5xDQALIAdBIGogCUEBdGoiBiAGLwEAQQFrIgY7AQAgAEEBayAOcSAAakEAIAAbIQ4gFUEBaiEVIAZB//8DcUUEQCAJIAtGDQIgASAFIBVBAXRqLwEAQQF0ai8BACEJCyAJIA1NDQAgDiAccSIAIAJGDQALQQEgCSAPIA0gDxsiD2siBnQhAiAJIAtJBEAgCyAPayEMIAkhCAJAA0AgAiAHQSBqIAhBAXRqLwEAayICQQFIDQEgAkEBdCECIAZBAWoiBiAPaiIIIAtJDQALIAwhBgtBASAGdCECC0EBIQggEiACIBNqIhNBtApLcQ0DIBYgE0HQBEtxDQMgAygCACICIABBAnRqIgggDToAASAIIAY6AAAgCCAUIBpBAnRqIhQgAmtBAnY7AQIgACECDAELCyAOBEAgFCAOQQJ0aiIAQQA7AQIgACAXOgABIABBwAA6AAALIAMgAygCACATQQJ0ajYCAAsgBCANNgIAQQAhCAsgCAusAQICfgF/IAFBAmqtIQIgACkDmC4hAwJAIAAoAqAuIgFBA2oiBEE/TQRAIAIgAa2GIAOEIQIMAQsgAUHAAEYEQCAAKAIEIAAoAhBqIAM3AAAgACAAKAIQQQhqNgIQQQMhBAwBCyAAKAIEIAAoAhBqIAIgAa2GIAOENwAAIAAgACgCEEEIajYCECABQT1rIQQgAkHAACABa62IIQILIAAgAjcDmC4gACAENgKgLguXAwICfgN/QYDJADMBACECIAApA5guIQMCQCAAKAKgLiIFQYLJAC8BACIGaiIEQT9NBEAgAiAFrYYgA4QhAgwBCyAFQcAARgRAIAAoAgQgACgCEGogAzcAACAAIAAoAhBBCGo2AhAgBiEEDAELIAAoAgQgACgCEGogAiAFrYYgA4Q3AAAgACAAKAIQQQhqNgIQIARBQGohBCACQcAAIAVrrYghAgsgACACNwOYLiAAIAQ2AqAuIAEEQAJAIARBOU4EQCAAKAIEIAAoAhBqIAI3AAAgACAAKAIQQQhqNgIQDAELIARBGU4EQCAAKAIEIAAoAhBqIAI+AAAgACAAKAIQQQRqNgIQIAAgACkDmC5CIIgiAjcDmC4gACAAKAKgLkEgayIENgKgLgsgBEEJTgR/IAAoAgQgACgCEGogAj0AACAAIAAoAhBBAmo2AhAgACkDmC5CEIghAiAAKAKgLkEQawUgBAtBAUgNACAAIAAoAhAiAUEBajYCECABIAAoAgRqIAI8AAALIABBADYCoC4gAEIANwOYLgsL8hQBEn8gASgCCCICKAIAIQUgAigCDCEHIAEoAgAhCCAAQoCAgIDQxwA3A6ApQQAhAgJAAkAgB0EASgRAQX8hDANAAkAgCCACQQJ0aiIDLwEABEAgACAAKAKgKUEBaiIDNgKgKSAAIANBAnRqQawXaiACNgIAIAAgAmpBqClqQQA6AAAgAiEMDAELIANBADsBAgsgAkEBaiICIAdHDQALIABB/C1qIQ8gAEH4LWohESAAKAKgKSIEQQFKDQIMAQsgAEH8LWohDyAAQfgtaiERQX8hDAsDQCAAIARBAWoiAjYCoCkgACACQQJ0akGsF2ogDEEBaiIDQQAgDEECSCIGGyICNgIAIAggAkECdCIEakEBOwEAIAAgAmpBqClqQQA6AAAgACAAKAL4LUEBazYC+C0gBQRAIA8gDygCACAEIAVqLwECazYCAAsgAyAMIAYbIQwgACgCoCkiBEECSA0ACwsgASAMNgIEIARBAXYhBgNAIAAgBkECdGpBrBdqKAIAIQkCQCAGIgJBAXQiAyAESg0AIAggCUECdGohCiAAIAlqQagpaiENIAYhBQNAAkAgAyAETgRAIAMhAgwBCyAIIABBrBdqIgIgA0EBciIEQQJ0aigCACILQQJ0ai8BACIOIAggAiADQQJ0aigCACIQQQJ0ai8BACICTwRAIAIgDkcEQCADIQIMAgsgAyECIABBqClqIgMgC2otAAAgAyAQai0AAEsNAQsgBCECCyAKLwEAIgQgCCAAIAJBAnRqQawXaigCACIDQQJ0ai8BACILSQRAIAUhAgwCCwJAIAQgC0cNACANLQAAIAAgA2pBqClqLQAASw0AIAUhAgwCCyAAIAVBAnRqQawXaiADNgIAIAIhBSACQQF0IgMgACgCoCkiBEwNAAsLIAAgAkECdGpBrBdqIAk2AgAgBkECTgRAIAZBAWshBiAAKAKgKSEEDAELCyAAKAKgKSEDA0AgByEGIAAgA0EBayIENgKgKSAAKAKwFyEKIAAgACADQQJ0akGsF2ooAgAiCTYCsBdBASECAkAgA0EDSA0AIAggCUECdGohDSAAIAlqQagpaiELQQIhA0EBIQUDQAJAIAMgBE4EQCADIQIMAQsgCCAAQawXaiICIANBAXIiB0ECdGooAgAiBEECdGovAQAiDiAIIAIgA0ECdGooAgAiEEECdGovAQAiAk8EQCACIA5HBEAgAyECDAILIAMhAiAAQagpaiIDIARqLQAAIAMgEGotAABLDQELIAchAgsgDS8BACIHIAggACACQQJ0akGsF2ooAgAiA0ECdGovAQAiBEkEQCAFIQIMAgsCQCAEIAdHDQAgCy0AACAAIANqQagpai0AAEsNACAFIQIMAgsgACAFQQJ0akGsF2ogAzYCACACIQUgAkEBdCIDIAAoAqApIgRMDQALC0ECIQMgAEGsF2oiByACQQJ0aiAJNgIAIAAgACgCpClBAWsiBTYCpCkgACgCsBchAiAHIAVBAnRqIAo2AgAgACAAKAKkKUEBayIFNgKkKSAHIAVBAnRqIAI2AgAgCCAGQQJ0aiINIAggAkECdGoiBS8BACAIIApBAnRqIgQvAQBqOwEAIABBqClqIgkgBmoiCyACIAlqLQAAIgIgCSAKai0AACIKIAIgCksbQQFqOgAAIAUgBjsBAiAEIAY7AQIgACAGNgKwF0EBIQVBASECAkAgACgCoCkiBEECSA0AA0AgDS8BACIKIAggAAJ/IAMgAyAETg0AGiAIIAcgA0EBciICQQJ0aigCACIEQQJ0ai8BACIOIAggByADQQJ0aigCACIQQQJ0ai8BACISTwRAIAMgDiASRw0BGiADIAQgCWotAAAgCSAQai0AAEsNARoLIAILIgJBAnRqQawXaigCACIDQQJ0ai8BACIESQRAIAUhAgwCCwJAIAQgCkcNACALLQAAIAAgA2pBqClqLQAASw0AIAUhAgwCCyAAIAVBAnRqQawXaiADNgIAIAIhBSACQQF0IgMgACgCoCkiBEwNAAsLIAZBAWohByAAIAJBAnRqQawXaiAGNgIAIAAoAqApIgNBAUoNAAsgACAAKAKkKUEBayICNgKkKSAAQawXaiIDIAJBAnRqIAAoArAXNgIAIAEoAgQhCSABKAIIIgIoAhAhBiACKAIIIQogAigCBCEQIAIoAgAhDSABKAIAIQcgAEGkF2pCADcBACAAQZwXakIANwEAIABBlBdqQgA3AQAgAEGMF2oiAUIANwEAQQAhBSAHIAMgACgCpClBAnRqKAIAQQJ0akEAOwECAkAgACgCpCkiAkG7BEoNACACQQFqIQIDQCAHIAAgAkECdGpBrBdqKAIAIgRBAnQiEmoiCyAHIAsvAQJBAnRqLwECIgNBAWogBiADIAZJGyIOOwECIAMgBk8hEwJAIAQgCUoNACAAIA5BAXRqQYwXaiIDIAMvAQBBAWo7AQBBACEDIAQgCk4EQCAQIAQgCmtBAnRqKAIAIQMLIBEgESgCACALLwEAIgQgAyAOamxqNgIAIA1FDQAgDyAPKAIAIAMgDSASai8BAmogBGxqNgIACyAFIBNqIQUgAkEBaiICQb0ERw0ACyAFRQ0AIAAgBkEBdGpBjBdqIQQDQCAGIQIDQCAAIAIiA0EBayICQQF0akGMF2oiDy8BACIKRQ0ACyAPIApBAWs7AQAgACADQQF0akGMF2oiAiACLwEAQQJqOwEAIAQgBC8BAEEBayIDOwEAIAVBAkohAiAFQQJrIQUgAg0ACyAGRQ0AQb0EIQIDQCADQf//A3EiBQRAA0AgACACQQFrIgJBAnRqQawXaigCACIDIAlKDQAgByADQQJ0aiIDLwECIAZHBEAgESARKAIAIAYgAy8BAGxqIgQ2AgAgESAEIAMvAQAgAy8BAmxrNgIAIAMgBjsBAgsgBUEBayIFDQALCyAGQQFrIgZFDQEgACAGQQF0akGMF2ovAQAhAwwACwALIwBBIGsiAiABIgAvAQBBAXQiATsBAiACIAEgAC8BAmpBAXQiATsBBCACIAEgAC8BBGpBAXQiATsBBiACIAEgAC8BBmpBAXQiATsBCCACIAEgAC8BCGpBAXQiATsBCiACIAEgAC8BCmpBAXQiATsBDCACIAEgAC8BDGpBAXQiATsBDiACIAEgAC8BDmpBAXQiATsBECACIAEgAC8BEGpBAXQiATsBEiACIAEgAC8BEmpBAXQiATsBFCACIAEgAC8BFGpBAXQiATsBFiACIAEgAC8BFmpBAXQiATsBGCACIAEgAC8BGGpBAXQiATsBGiACIAEgAC8BGmpBAXQiATsBHCACIAAvARwgAWpBAXQ7AR5BACEAIAxBAE4EQANAIAggAEECdGoiAy8BAiIBBEAgAiABQQF0aiIFIAUvAQAiBUEBajsBACADIAWtQoD+A4NCCIhCgpCAgQh+QpDCiKKIAYNCgYKEiBB+QiCIp0H/AXEgBUH/AXGtQoKQgIEIfkKQwoiiiAGDQoGChIgQfkIYiKdBgP4DcXJBECABa3Y7AQALIAAgDEchASAAQQFqIQAgAQ0ACwsLcgEBfyMAQRBrIgQkAAJ/QQAgAEUNABogAEEIaiEAIAFFBEAgAlBFBEAgAARAIABBADYCBCAAQRI2AgALQQAMAgtBAEIAIAMgABA6DAELIAQgAjcDCCAEIAE2AgAgBEIBIAMgABA6CyEAIARBEGokACAACyIAIAAgASACIAMQJiIARQRAQQAPCyAAKAIwQQAgAiADECULAwABC8gFAQR/IABB//8DcSEDIABBEHYhBEEBIQAgAkEBRgRAIAMgAS0AAGpB8f8DcCIAIARqQfH/A3BBEHQgAHIPCwJAIAEEfyACQRBJDQECQCACQa8rSwRAA0AgAkGwK2shAkG1BSEFIAEhAANAIAMgAC0AAGoiAyAEaiADIAAtAAFqIgNqIAMgAC0AAmoiA2ogAyAALQADaiIDaiADIAAtAARqIgNqIAMgAC0ABWoiA2ogAyAALQAGaiIDaiADIAAtAAdqIgNqIQQgBQRAIABBCGohACAFQQFrIQUMAQsLIARB8f8DcCEEIANB8f8DcCEDIAFBsCtqIQEgAkGvK0sNAAsgAkEISQ0BCwNAIAMgAS0AAGoiACAEaiAAIAEtAAFqIgBqIAAgAS0AAmoiAGogACABLQADaiIAaiAAIAEtAARqIgBqIAAgAS0ABWoiAGogACABLQAGaiIAaiAAIAEtAAdqIgNqIQQgAUEIaiEBIAJBCGsiAkEHSw0ACwsCQCACRQ0AIAJBAWshBiACQQNxIgUEQCABIQADQCACQQFrIQIgAyAALQAAaiIDIARqIQQgAEEBaiIBIQAgBUEBayIFDQALCyAGQQNJDQADQCADIAEtAABqIgAgAS0AAWoiBSABLQACaiIGIAEtAANqIgMgBiAFIAAgBGpqamohBCABQQRqIQEgAkEEayICDQALCyADQfH/A3AgBEHx/wNwQRB0cgVBAQsPCwJAIAJFDQAgAkEBayEGIAJBA3EiBQRAIAEhAANAIAJBAWshAiADIAAtAABqIgMgBGohBCAAQQFqIgEhACAFQQFrIgUNAAsLIAZBA0kNAANAIAMgAS0AAGoiACABLQABaiIFIAEtAAJqIgYgAS0AA2oiAyAGIAUgACAEampqaiEEIAFBBGohASACQQRrIgINAAsLIANB8f8DcCAEQfH/A3BBEHRyCx8AIAAgAiADQcCAASgCABEAACEAIAEgAiADEAcaIAALIwAgACAAKAJAIAIgA0HUgAEoAgARAAA2AkAgASACIAMQBxoLzSoCGH8HfiAAKAIMIgIgACgCECIDaiEQIAMgAWshASAAKAIAIgUgACgCBGohA0F/IAAoAhwiBygCpAF0IQRBfyAHKAKgAXQhCyAHKAI4IQwCf0EAIAcoAiwiEUUNABpBACACIAxJDQAaIAJBhAJqIAwgEWpNCyEWIBBBgwJrIRMgASACaiEXIANBDmshFCAEQX9zIRggC0F/cyESIAcoApwBIRUgBygCmAEhDSAHKAKIASEIIAc1AoQBIR0gBygCNCEOIAcoAjAhGSAQQQFqIQ8DQCAIQThyIQYgBSAIQQN2QQdxayELAn8gAiANIAUpAAAgCK2GIB2EIh2nIBJxQQJ0IgFqIgMtAAAiBA0AGiACIAEgDWoiAS0AAjoAACAGIAEtAAEiAWshBiACQQFqIA0gHSABrYgiHacgEnFBAnQiAWoiAy0AACIEDQAaIAIgASANaiIDLQACOgABIAYgAy0AASIDayEGIA0gHSADrYgiHacgEnFBAnRqIgMtAAAhBCACQQJqCyEBIAtBB2ohBSAGIAMtAAEiAmshCCAdIAKtiCEdAkACQAJAIARB/wFxRQ0AAkACQAJAAkACQANAIARBEHEEQCAVIB0gBK1CD4OIIhqnIBhxQQJ0aiECAn8gCCAEQQ9xIgZrIgRBG0sEQCAEIQggBQwBCyAEQThyIQggBSkAACAErYYgGoQhGiAFIARBA3ZrQQdqCyELIAMzAQIhGyAIIAItAAEiA2shCCAaIAOtiCEaIAItAAAiBEEQcQ0CA0AgBEHAAHFFBEAgCCAVIAIvAQJBAnRqIBqnQX8gBHRBf3NxQQJ0aiICLQABIgNrIQggGiADrYghGiACLQAAIgRBEHFFDQEMBAsLIAdB0f4ANgIEIABB7A42AhggGiEdDAMLIARB/wFxIgJBwABxRQRAIAggDSADLwECQQJ0aiAdp0F/IAJ0QX9zcUECdGoiAy0AASICayEIIB0gAq2IIR0gAy0AACIERQ0HDAELCyAEQSBxBEAgB0G//gA2AgQgASECDAgLIAdB0f4ANgIEIABB0A42AhggASECDAcLIB1BfyAGdEF/c62DIBt8IhunIQUgCCAEQQ9xIgNrIQggGiAErUIPg4ghHSABIBdrIgYgAjMBAiAaQX8gA3RBf3Otg3ynIgRPDQIgBCAGayIGIBlNDQEgBygCjEdFDQEgB0HR/gA2AgQgAEG5DDYCGAsgASECIAshBQwFCwJAIA5FBEAgDCARIAZraiEDDAELIAYgDk0EQCAMIA4gBmtqIQMMAQsgDCARIAYgDmsiBmtqIQMgBSAGTQ0AIAUgBmshBQJAAkAgASADTSABIA8gAWusIhogBq0iGyAaIBtUGyIapyIGaiICIANLcQ0AIAMgBmogAUsgASADT3ENACABIAMgBhAHGiACIQEMAQsgASADIAMgAWsiASABQR91IgFqIAFzIgIQByACaiEBIBogAq0iHn0iHFANACACIANqIQIDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgASACKQAANwAAIAEgAikAGDcAGCABIAIpABA3ABAgASACKQAINwAIIBpCIH0hGiACQSBqIQIgAUEgaiEBIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAEgAikAADcAACABIAIpABg3ABggASACKQAQNwAQIAEgAikACDcACCABIAIpADg3ADggASACKQAwNwAwIAEgAikAKDcAKCABIAIpACA3ACAgASACKQBYNwBYIAEgAikAUDcAUCABIAIpAEg3AEggASACKQBANwBAIAEgAikAYDcAYCABIAIpAGg3AGggASACKQBwNwBwIAEgAikAeDcAeCACQYABaiECIAFBgAFqIQEgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAEgAikAADcAACABIAIpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCABIAIpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCABIAIoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCABIAIvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCABIAItAAA6AAAgAkEBaiECIAFBAWohAQsgHEIAUg0ACwsgDiEGIAwhAwsgBSAGSwRAAkACQCABIANNIAEgDyABa6wiGiAGrSIbIBogG1QbIhqnIglqIgIgA0txDQAgAyAJaiABSyABIANPcQ0AIAEgAyAJEAcaDAELIAEgAyADIAFrIgEgAUEfdSIBaiABcyIBEAcgAWohAiAaIAGtIh59IhxQDQAgASADaiEBA0ACQCAcIB4gHCAeVBsiG0IgVARAIBshGgwBCyAbIhpCIH0iIEIFiEIBfEIDgyIfUEUEQANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCAaQiB9IRogAUEgaiEBIAJBIGohAiAfQgF9Ih9CAFINAAsLICBC4ABUDQADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggAiABKQA4NwA4IAIgASkAMDcAMCACIAEpACg3ACggAiABKQAgNwAgIAIgASkAWDcAWCACIAEpAFA3AFAgAiABKQBINwBIIAIgASkAQDcAQCACIAEpAGA3AGAgAiABKQBoNwBoIAIgASkAcDcAcCACIAEpAHg3AHggAUGAAWohASACQYABaiECIBpCgAF9IhpCH1YNAAsLIBpCEFoEQCACIAEpAAA3AAAgAiABKQAINwAIIBpCEH0hGiACQRBqIQIgAUEQaiEBCyAaQghaBEAgAiABKQAANwAAIBpCCH0hGiACQQhqIQIgAUEIaiEBCyAaQgRaBEAgAiABKAAANgAAIBpCBH0hGiACQQRqIQIgAUEEaiEBCyAaQgJaBEAgAiABLwAAOwAAIBpCAn0hGiACQQJqIQIgAUECaiEBCyAcIBt9IRwgGlBFBEAgAiABLQAAOgAAIAJBAWohAiABQQFqIQELIBxCAFINAAsLIAUgBmshAUEAIARrIQUCQCAEQQdLBEAgBCEDDAELIAEgBE0EQCAEIQMMAQsgAiAEayEFA0ACQCACIAUpAAA3AAAgBEEBdCEDIAEgBGshASACIARqIQIgBEEDSw0AIAMhBCABIANLDQELC0EAIANrIQULIAIgBWohBAJAIAUgDyACa6wiGiABrSIbIBogG1QbIhqnIgFIIAVBf0pxDQAgBUEBSCABIARqIAJLcQ0AIAIgBCABEAcgAWohAgwDCyACIAQgAyADQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANAiABIARqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAILAkAgASADTSABIA8gAWusIhogBa0iGyAaIBtUGyIapyIEaiICIANLcQ0AIAMgBGogAUsgASADT3ENACABIAMgBBAHGgwCCyABIAMgAyABayIBIAFBH3UiAWogAXMiARAHIAFqIQIgGiABrSIefSIcUA0BIAEgA2ohAQNAAkAgHCAeIBwgHlQbIhtCIFQEQCAbIRoMAQsgGyIaQiB9IiBCBYhCAXxCA4MiH1BFBEADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggGkIgfSEaIAFBIGohASACQSBqIQIgH0IBfSIfQgBSDQALCyAgQuAAVA0AA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIAIgASkAODcAOCACIAEpADA3ADAgAiABKQAoNwAoIAIgASkAIDcAICACIAEpAFg3AFggAiABKQBQNwBQIAIgASkASDcASCACIAEpAEA3AEAgAiABKQBgNwBgIAIgASkAaDcAaCACIAEpAHA3AHAgAiABKQB4NwB4IAFBgAFqIQEgAkGAAWohAiAaQoABfSIaQh9WDQALCyAaQhBaBEAgAiABKQAANwAAIAIgASkACDcACCAaQhB9IRogAkEQaiECIAFBEGohAQsgGkIIWgRAIAIgASkAADcAACAaQgh9IRogAkEIaiECIAFBCGohAQsgGkIEWgRAIAIgASgAADYAACAaQgR9IRogAkEEaiECIAFBBGohAQsgGkICWgRAIAIgAS8AADsAACAaQgJ9IRogAkECaiECIAFBAmohAQsgHCAbfSEcIBpQRQRAIAIgAS0AADoAACACQQFqIQIgAUEBaiEBCyAcUEUNAAsMAQsCQAJAIBYEQAJAIAQgBUkEQCAHKAKYRyAESw0BCyABIARrIQMCQEEAIARrIgVBf0ogDyABa6wiGiAbIBogG1QbIhqnIgIgBUpxDQAgBUEBSCACIANqIAFLcQ0AIAEgAyACEAcgAmohAgwFCyABIAMgBCAEQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANBCABIANqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAQLIBAgAWsiCUEBaiIGIAUgBSAGSxshAyABIARrIQIgAUEHcUUNAiADRQ0CIAEgAi0AADoAACACQQFqIQIgAUEBaiIGQQdxQQAgA0EBayIFGw0BIAYhASAFIQMgCSEGDAILAkAgBCAFSQRAIAcoAphHIARLDQELIAEgASAEayIGKQAANwAAIAEgBUEBa0EHcUEBaiIDaiECIAUgA2siBEUNAyADIAZqIQEDQCACIAEpAAA3AAAgAUEIaiEBIAJBCGohAiAEQQhrIgQNAAsMAwsgASAEIAUQPyECDAILIAEgAi0AADoAASAJQQFrIQYgA0ECayEFIAJBAWohAgJAIAFBAmoiCkEHcUUNACAFRQ0AIAEgAi0AADoAAiAJQQJrIQYgA0EDayEFIAJBAWohAgJAIAFBA2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAAyAJQQNrIQYgA0EEayEFIAJBAWohAgJAIAFBBGoiCkEHcUUNACAFRQ0AIAEgAi0AADoABCAJQQRrIQYgA0EFayEFIAJBAWohAgJAIAFBBWoiCkEHcUUNACAFRQ0AIAEgAi0AADoABSAJQQVrIQYgA0EGayEFIAJBAWohAgJAIAFBBmoiCkEHcUUNACAFRQ0AIAEgAi0AADoABiAJQQZrIQYgA0EHayEFIAJBAWohAgJAIAFBB2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAByAJQQdrIQYgA0EIayEDIAFBCGohASACQQFqIQIMBgsgCiEBIAUhAwwFCyAKIQEgBSEDDAQLIAohASAFIQMMAwsgCiEBIAUhAwwCCyAKIQEgBSEDDAELIAohASAFIQMLAkACQCAGQRdNBEAgA0UNASADQQFrIQUgA0EHcSIEBEADQCABIAItAAA6AAAgA0EBayEDIAFBAWohASACQQFqIQIgBEEBayIEDQALCyAFQQdJDQEDQCABIAItAAA6AAAgASACLQABOgABIAEgAi0AAjoAAiABIAItAAM6AAMgASACLQAEOgAEIAEgAi0ABToABSABIAItAAY6AAYgASACLQAHOgAHIAFBCGohASACQQhqIQIgA0EIayIDDQALDAELIAMNAQsgASECDAELIAEgBCADED8hAgsgCyEFDAELIAEgAy0AAjoAACABQQFqIQILIAUgFE8NACACIBNJDQELCyAAIAI2AgwgACAFIAhBA3ZrIgE2AgAgACATIAJrQYMCajYCECAAIBQgAWtBDmo2AgQgByAIQQdxIgA2AogBIAcgHUJ/IACthkJ/hYM+AoQBC+cFAQR/IAMgAiACIANLGyEEIAAgAWshAgJAIABBB3FFDQAgBEUNACAAIAItAAA6AAAgA0EBayEGIAJBAWohAiAAQQFqIgdBB3FBACAEQQFrIgUbRQRAIAchACAFIQQgBiEDDAELIAAgAi0AADoAASADQQJrIQYgBEECayEFIAJBAWohAgJAIABBAmoiB0EHcUUNACAFRQ0AIAAgAi0AADoAAiADQQNrIQYgBEEDayEFIAJBAWohAgJAIABBA2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAAyADQQRrIQYgBEEEayEFIAJBAWohAgJAIABBBGoiB0EHcUUNACAFRQ0AIAAgAi0AADoABCADQQVrIQYgBEEFayEFIAJBAWohAgJAIABBBWoiB0EHcUUNACAFRQ0AIAAgAi0AADoABSADQQZrIQYgBEEGayEFIAJBAWohAgJAIABBBmoiB0EHcUUNACAFRQ0AIAAgAi0AADoABiADQQdrIQYgBEEHayEFIAJBAWohAgJAIABBB2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAByADQQhrIQMgBEEIayEEIABBCGohACACQQFqIQIMBgsgByEAIAUhBCAGIQMMBQsgByEAIAUhBCAGIQMMBAsgByEAIAUhBCAGIQMMAwsgByEAIAUhBCAGIQMMAgsgByEAIAUhBCAGIQMMAQsgByEAIAUhBCAGIQMLAkAgA0EXTQRAIARFDQEgBEEBayEBIARBB3EiAwRAA0AgACACLQAAOgAAIARBAWshBCAAQQFqIQAgAkEBaiECIANBAWsiAw0ACwsgAUEHSQ0BA0AgACACLQAAOgAAIAAgAi0AAToAASAAIAItAAI6AAIgACACLQADOgADIAAgAi0ABDoABCAAIAItAAU6AAUgACACLQAGOgAGIAAgAi0ABzoAByAAQQhqIQAgAkEIaiECIARBCGsiBA0ACwwBCyAERQ0AIAAgASAEED8hAAsgAAvyCAEXfyAAKAJoIgwgACgCMEGGAmsiBWtBACAFIAxJGyENIAAoAnQhAiAAKAKQASEPIAAoAkgiDiAMaiIJIAAoAnAiBUECIAUbIgVBAWsiBmoiAy0AASESIAMtAAAhEyAGIA5qIQZBAyEDIAAoApQBIRYgACgCPCEUIAAoAkwhECAAKAI4IRECQAJ/IAVBA0kEQCANIQggDgwBCyAAIABBACAJLQABIAAoAnwRAAAgCS0AAiAAKAJ8EQAAIQoDQCAAIAogAyAJai0AACAAKAJ8EQAAIQogACgCUCAKQQF0ai8BACIIIAEgCCABQf//A3FJIggbIQEgA0ECayAHIAgbIQcgA0EBaiIDIAVNDQALIAFB//8DcSAHIA1qIghB//8DcU0NASAGIAdB//8DcSIDayEGIA4gA2sLIQMCQAJAIAwgAUH//wNxTQ0AIAIgAkECdiAFIA9JGyEKIA1B//8DcSEVIAlBAmohDyAJQQRrIRcDQAJAAkAgBiABQf//A3EiC2otAAAgE0cNACAGIAtBAWoiAWotAAAgEkcNACADIAtqIgItAAAgCS0AAEcNACABIANqLQAAIAktAAFGDQELIApBAWsiCkUNAiAQIAsgEXFBAXRqLwEAIgEgCEH//wNxSw0BDAILIAJBAmohAUEAIQQgDyECAkADQCACLQAAIAEtAABHDQEgAi0AASABLQABRwRAIARBAXIhBAwCCyACLQACIAEtAAJHBEAgBEECciEEDAILIAItAAMgAS0AA0cEQCAEQQNyIQQMAgsgAi0ABCABLQAERwRAIARBBHIhBAwCCyACLQAFIAEtAAVHBEAgBEEFciEEDAILIAItAAYgAS0ABkcEQCAEQQZyIQQMAgsgAi0AByABLQAHRwRAIARBB3IhBAwCCyABQQhqIQEgAkEIaiECIARB+AFJIRggBEEIaiEEIBgNAAtBgAIhBAsCQAJAIAUgBEECaiICSQRAIAAgCyAHQf//A3FrIgY2AmwgAiAUSwRAIBQPCyACIBZPBEAgAg8LIAkgBEEBaiIFaiIBLQABIRIgAS0AACETAkAgAkEESQ0AIAIgBmogDE8NACAGQf//A3EhCCAEQQFrIQtBACEDQQAhBwNAIBAgAyAIaiARcUEBdGovAQAiASAGQf//A3FJBEAgAyAVaiABTw0IIAMhByABIQYLIANBAWoiAyALTQ0ACyAAIAAgAEEAIAIgF2oiAS0AACAAKAJ8EQAAIAEtAAEgACgCfBEAACABLQACIAAoAnwRAAAhASAAKAJQIAFBAXRqLwEAIgEgBkH//wNxTwRAIAdB//8DcSEDIAYhAQwDCyAEQQJrIgdB//8DcSIDIBVqIAFPDQYMAgsgAyAFaiEGIAIhBQsgCkEBayIKRQ0DIBAgCyARcUEBdGovAQAiASAIQf//A3FNDQMMAQsgByANaiEIIA4gA2siAyAFaiEGIAIhBQsgDCABQf//A3FLDQALCyAFDwsgAiEFCyAFIAAoAjwiACAAIAVLGwuGBQETfyAAKAJ0IgMgA0ECdiAAKAJwIgNBAiADGyIDIAAoApABSRshByAAKAJoIgogACgCMEGGAmsiBWtB//8DcUEAIAUgCkkbIQwgACgCSCIIIApqIgkgA0EBayICaiIFLQABIQ0gBS0AACEOIAlBAmohBSACIAhqIQsgACgClAEhEiAAKAI8IQ8gACgCTCEQIAAoAjghESAAKAKIAUEFSCETA0ACQCAKIAFB//8DcU0NAANAAkACQCALIAFB//8DcSIGai0AACAORw0AIAsgBkEBaiIBai0AACANRw0AIAYgCGoiAi0AACAJLQAARw0AIAEgCGotAAAgCS0AAUYNAQsgB0EBayIHRQ0CIAwgECAGIBFxQQF0ai8BACIBSQ0BDAILCyACQQJqIQRBACECIAUhAQJAA0AgAS0AACAELQAARw0BIAEtAAEgBC0AAUcEQCACQQFyIQIMAgsgAS0AAiAELQACRwRAIAJBAnIhAgwCCyABLQADIAQtAANHBEAgAkEDciECDAILIAEtAAQgBC0ABEcEQCACQQRyIQIMAgsgAS0ABSAELQAFRwRAIAJBBXIhAgwCCyABLQAGIAQtAAZHBEAgAkEGciECDAILIAEtAAcgBC0AB0cEQCACQQdyIQIMAgsgBEEIaiEEIAFBCGohASACQfgBSSEUIAJBCGohAiAUDQALQYACIQILAkAgAyACQQJqIgFJBEAgACAGNgJsIAEgD0sEQCAPDwsgASASTwRAIAEPCyAIIAJBAWoiA2ohCyADIAlqIgMtAAEhDSADLQAAIQ4gASEDDAELIBMNAQsgB0EBayIHRQ0AIAwgECAGIBFxQQF0ai8BACIBSQ0BCwsgAwvLAQECfwJAA0AgAC0AACABLQAARw0BIAAtAAEgAS0AAUcEQCACQQFyDwsgAC0AAiABLQACRwRAIAJBAnIPCyAALQADIAEtAANHBEAgAkEDcg8LIAAtAAQgAS0ABEcEQCACQQRyDwsgAC0ABSABLQAFRwRAIAJBBXIPCyAALQAGIAEtAAZHBEAgAkEGcg8LIAAtAAcgAS0AB0cEQCACQQdyDwsgAUEIaiEBIABBCGohACACQfgBSSEDIAJBCGohAiADDQALQYACIQILIAIL5wwBB38gAEF/cyEAIAJBF08EQAJAIAFBA3FFDQAgAS0AACAAQf8BcXNBAnRB0BhqKAIAIABBCHZzIQAgAkEBayIEQQAgAUEBaiIDQQNxG0UEQCAEIQIgAyEBDAELIAEtAAEgAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBAmohAwJAIAJBAmsiBEUNACADQQNxRQ0AIAEtAAIgAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBA2ohAwJAIAJBA2siBEUNACADQQNxRQ0AIAEtAAMgAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBBGohASACQQRrIQIMAgsgBCECIAMhAQwBCyAEIQIgAyEBCyACQRRuIgNBbGwhCQJAIANBAWsiCEUEQEEAIQQMAQsgA0EUbCABakEUayEDQQAhBANAIAEoAhAgB3MiB0EWdkH8B3FB0DhqKAIAIAdBDnZB/AdxQdAwaigCACAHQQZ2QfwHcUHQKGooAgAgB0H/AXFBAnRB0CBqKAIAc3NzIQcgASgCDCAGcyIGQRZ2QfwHcUHQOGooAgAgBkEOdkH8B3FB0DBqKAIAIAZBBnZB/AdxQdAoaigCACAGQf8BcUECdEHQIGooAgBzc3MhBiABKAIIIAVzIgVBFnZB/AdxQdA4aigCACAFQQ52QfwHcUHQMGooAgAgBUEGdkH8B3FB0ChqKAIAIAVB/wFxQQJ0QdAgaigCAHNzcyEFIAEoAgQgBHMiBEEWdkH8B3FB0DhqKAIAIARBDnZB/AdxQdAwaigCACAEQQZ2QfwHcUHQKGooAgAgBEH/AXFBAnRB0CBqKAIAc3NzIQQgASgCACAAcyIAQRZ2QfwHcUHQOGooAgAgAEEOdkH8B3FB0DBqKAIAIABBBnZB/AdxQdAoaigCACAAQf8BcUECdEHQIGooAgBzc3MhACABQRRqIQEgCEEBayIIDQALIAMhAQsgAiAJaiECIAEoAhAgASgCDCABKAIIIAEoAgQgASgCACAAcyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQf8BcUECdEHQGGooAgAgBHNzIABBCHZzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBB/wFxQQJ0QdAYaigCACAFc3MgAEEIdnMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEH/AXFBAnRB0BhqKAIAIAZzcyAAQQh2cyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQf8BcUECdEHQGGooAgAgB3NzIABBCHZzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyEAIAFBFGohAQsgAkEHSwRAA0AgAS0AByABLQAGIAEtAAUgAS0ABCABLQADIAEtAAIgAS0AASABLQAAIABB/wFxc0ECdEHQGGooAgAgAEEIdnMiAEH/AXFzQQJ0QdAYaigCACAAQQh2cyIAQf8BcXNBAnRB0BhqKAIAIABBCHZzIgBB/wFxc0ECdEHQGGooAgAgAEEIdnMiAEH/AXFzQQJ0QdAYaigCACAAQQh2cyIAQf8BcXNBAnRB0BhqKAIAIABBCHZzIgBB/wFxc0ECdEHQGGooAgAgAEEIdnMiAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBCGohASACQQhrIgJBB0sNAAsLAkAgAkUNACACQQFxBH8gAS0AACAAQf8BcXNBAnRB0BhqKAIAIABBCHZzIQAgAUEBaiEBIAJBAWsFIAILIQMgAkEBRg0AA0AgAS0AASABLQAAIABB/wFxc0ECdEHQGGooAgAgAEEIdnMiAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBAmohASADQQJrIgMNAAsLIABBf3MLwgIBA38jAEEQayIIJAACfwJAIAAEQCAEDQEgBVANAQsgBgRAIAZBADYCBCAGQRI2AgALQQAMAQtBgAEQCSIHRQRAIAYEQCAGQQA2AgQgBkEONgIAC0EADAELIAcgATcDCCAHQgA3AwAgB0EoaiIJECogByAFNwMYIAcgBDYCECAHIAM6AGAgB0EANgJsIAdCADcCZCAAKQMYIQEgCEF/NgIIIAhCjoCAgPAANwMAIAdBECAIECQgAUL/gQGDhCIBNwNwIAcgAadBBnZBAXE6AHgCQCACRQ0AIAkgAhBgQX9KDQAgBxAGQQAMAQsgBhBfIgIEQCAAIAAoAjBBAWo2AjAgAiAHNgIIIAJBATYCBCACIAA2AgAgAkI/IAAgB0EAQgBBDkEBEQoAIgEgAUIAUxs3AxgLIAILIQAgCEEQaiQAIAALYgEBf0E4EAkiAUUEQCAABEAgAEEANgIEIABBDjYCAAtBAA8LIAFBADYCCCABQgA3AwAgAUIANwMgIAFCgICAgBA3AiwgAUEAOgAoIAFBADYCFCABQgA3AgwgAUEAOwE0IAELuwEBAX4gASkDACICQgKDUEUEQCAAIAEpAxA3AxALIAJCBINQRQRAIAAgASkDGDcDGAsgAkIIg1BFBEAgACABKQMgNwMgCyACQhCDUEUEQCAAIAEoAig2AigLIAJCIINQRQRAIAAgASgCLDYCLAsgAkLAAINQRQRAIAAgAS8BMDsBMAsgAkKAAYNQRQRAIAAgAS8BMjsBMgsgAkKAAoNQRQRAIAAgASgCNDYCNAsgACAAKQMAIAKENwMAQQALGQAgAUUEQEEADwsgACABKAIAIAEzAQQQGws3AQJ/IABBACABG0UEQCAAIAFGDwsgAC8BBCIDIAEvAQRGBH8gACgCACABKAIAIAMQPQVBAQtFCyIBAX8gAUUEQEEADwsgARAJIgJFBEBBAA8LIAIgACABEAcLKQAgACABIAIgAyAEEEUiAEUEQEEADwsgACACQQAgBBA1IQEgABAGIAELcQEBfgJ/AkAgAkJ/VwRAIAMEQCADQQA2AgQgA0EUNgIACwwBCyAAIAEgAhARIgRCf1cEQCADBEAgAyAAKAIMNgIAIAMgACgCEDYCBAsMAQtBACACIARXDQEaIAMEQCADQQA2AgQgA0ERNgIACwtBfwsLNQAgACABIAJBABAmIgBFBEBBfw8LIAMEQCADIAAtAAk6AAALIAQEQCAEIAAoAkQ2AgALQQAL/AECAn8BfiMAQRBrIgMkAAJAIAAgA0EOaiABQYAGQQAQRiIARQRAIAIhAAwBCyADLwEOIgFBBUkEQCACIQAMAQsgAC0AAEEBRwRAIAIhAAwBCyAAIAGtQv//A4MQFyIBRQRAIAIhAAwBCyABEH0aAkAgARAVIAIEfwJ/IAIvAQQhAEEAIAIoAgAiBEUNABpBACAEIABB1IABKAIAEQAACwVBAAtHBEAgAiEADAELIAEgAS0AAAR+IAEpAwggASkDEH0FQgALIgVC//8DgxATIAWnQf//A3FBgBBBABA1IgBFBEAgAiEADAELIAIQEAsgARAICyADQRBqJAAgAAvmDwIIfwJ+IwBB4ABrIgckAEEeQS4gAxshCwJAAkAgAgRAIAIiBSIGLQAABH4gBikDCCAGKQMQfQVCAAsgC61aDQEgBARAIARBADYCBCAEQRM2AgALQn8hDQwCCyABIAutIAcgBBAtIgUNAEJ/IQ0MAQsgBUIEEBMoAABBoxJBqBIgAxsoAABHBEAgBARAIARBADYCBCAEQRM2AgALQn8hDSACDQEgBRAIDAELIABCADcDICAAQQA2AhggAEL/////DzcDECAAQQA7AQwgAEG/hig2AgggAEEBOgAGIABBADsBBCAAQQA2AgAgAEIANwNIIABBgIDYjXg2AkQgAEIANwMoIABCADcDMCAAQgA3AzggAEFAa0EAOwEAIABCADcDUCAAIAMEf0EABSAFEAwLOwEIIAAgBRAMOwEKIAAgBRAMOwEMIAAgBRAMNgIQIAUQDCEGIAUQDCEJIAdBADYCWCAHQgA3A1AgB0IANwNIIAcgCUEfcTYCPCAHIAZBC3Y2AjggByAGQQV2QT9xNgI0IAcgBkEBdEE+cTYCMCAHIAlBCXZB0ABqNgJEIAcgCUEFdkEPcUEBazYCQCAAIAdBMGoQBTYCFCAAIAUQFTYCGCAAIAUQFa03AyAgACAFEBWtNwMoIAUQDCEIIAUQDCEGIAACfiADBEBBACEJIABBADYCRCAAQQA7AUAgAEEANgI8QgAMAQsgBRAMIQkgACAFEAw2AjwgACAFEAw7AUAgACAFEBU2AkQgBRAVrQs3A0ggBS0AAEUEQCAEBEAgBEEANgIEIARBFDYCAAtCfyENIAINASAFEAgMAQsCQCAALwEMIgpBAXEEQCAKQcAAcQRAIABB//8DOwFSDAILIABBATsBUgwBCyAAQQA7AVILIABBADYCOCAAQgA3AzAgBiAIaiAJaiEKAkAgAgRAIAUtAAAEfiAFKQMIIAUpAxB9BUIACyAKrVoNASAEBEAgBEEANgIEIARBFTYCAAtCfyENDAILIAUQCCABIAqtQQAgBBAtIgUNAEJ/IQ0MAQsCQCAIRQ0AIAAgBSABIAhBASAEEGQiCDYCMCAIRQRAIAQoAgBBEUYEQCAEBEAgBEEANgIEIARBFTYCAAsLQn8hDSACDQIgBRAIDAILIAAtAA1BCHFFDQAgCEECECNBBUcNACAEBEAgBEEANgIEIARBFTYCAAtCfyENIAINASAFEAgMAQsgAEE0aiEIAkAgBkUNACAFIAEgBkEAIAQQRSIMRQRAQn8hDSACDQIgBRAIDAILIAwgBkGAAkGABCADGyAIIAQQbiEGIAwQBiAGRQRAQn8hDSACDQIgBRAIDAILIANFDQAgAEEBOgAECwJAIAlFDQAgACAFIAEgCUEAIAQQZCIBNgI4IAFFBEBCfyENIAINAiAFEAgMAgsgAC0ADUEIcUUNACABQQIQI0EFRw0AIAQEQCAEQQA2AgQgBEEVNgIAC0J/IQ0gAg0BIAUQCAwBCyAAIAAoAjRB9eABIAAoAjAQZzYCMCAAIAAoAjRB9cYBIAAoAjgQZzYCOAJAAkAgACkDKEL/////D1ENACAAKQMgQv////8PUQ0AIAApA0hC/////w9SDQELAkACQAJAIAgoAgAgB0EwakEBQYACQYAEIAMbIAQQRiIBRQRAIAJFDQEMAgsgASAHMwEwEBciAUUEQCAEBEAgBEEANgIEIARBDjYCAAsgAkUNAQwCCwJAIAApAyhC/////w9RBEAgACABEB03AygMAQsgA0UNAEEAIQYCQCABKQMQIg5CCHwiDSAOVA0AIAEpAwggDVQNACABIA03AxBBASEGCyABIAY6AAALIAApAyBC/////w9RBEAgACABEB03AyALAkAgAw0AIAApA0hC/////w9RBEAgACABEB03A0gLIAAoAjxB//8DRw0AIAAgARAVNgI8CyABLQAABH8gASkDECABKQMIUQVBAAsNAiAEBEAgBEEANgIEIARBFTYCAAsgARAIIAINAQsgBRAIC0J/IQ0MAgsgARAICyAFLQAARQRAIAQEQCAEQQA2AgQgBEEUNgIAC0J/IQ0gAg0BIAUQCAwBCyACRQRAIAUQCAtCfyENIAApA0hCf1cEQCAEBEAgBEEWNgIEIARBBDYCAAsMAQsjAEEQayIDJABBASEBAkAgACgCEEHjAEcNAEEAIQECQCAAKAI0IANBDmpBgbICQYAGQQAQRiICBEAgAy8BDiIFQQZLDQELIAQEQCAEQQA2AgQgBEEVNgIACwwBCyACIAWtQv//A4MQFyICRQRAIAQEQCAEQQA2AgQgBEEUNgIACwwBC0EBIQECQAJAAkAgAhAMQQFrDgICAQALQQAhASAEBEAgBEEANgIEIARBGDYCAAsgAhAIDAILIAApAyhCE1YhAQsgAkICEBMvAABBwYoBRwRAQQAhASAEBEAgBEEANgIEIARBGDYCAAsgAhAIDAELIAIQfUEBayIFQf8BcUEDTwRAQQAhASAEBEAgBEEANgIEIARBGDYCAAsgAhAIDAELIAMvAQ5BB0cEQEEAIQEgBARAIARBADYCBCAEQRU2AgALIAIQCAwBCyAAIAE6AAYgACAFQf8BcUGBAmo7AVIgACACEAw2AhAgAhAIQQEhAQsgA0EQaiQAIAFFDQAgCCAIKAIAEG02AgAgCiALaq0hDQsgB0HgAGokACANC4ECAQR/IwBBEGsiBCQAAkAgASAEQQxqQcAAQQAQJSIGRQ0AIAQoAgxBBWoiA0GAgARPBEAgAgRAIAJBADYCBCACQRI2AgALDAELQQAgA60QFyIDRQRAIAIEQCACQQA2AgQgAkEONgIACwwBCyADQQEQcCADIAEEfwJ/IAEvAQQhBUEAIAEoAgAiAUUNABpBACABIAVB1IABKAIAEQAACwVBAAsQEiADIAYgBCgCDBAsAn8gAy0AAEUEQCACBEAgAkEANgIEIAJBFDYCAAtBAAwBCyAAIAMtAAAEfiADKQMQBUIAC6dB//8DcSADKAIEEEcLIQUgAxAICyAEQRBqJAAgBQvgAQICfwF+QTAQCSICRQRAIAEEQCABQQA2AgQgAUEONgIAC0EADwsgAkIANwMIIAJBADYCACACQgA3AxAgAkIANwMYIAJCADcDICACQgA3ACUgAFAEQCACDwsCQCAAQv////8AVg0AIACnQQR0EAkiA0UNACACIAM2AgBBACEBQgEhBANAIAMgAUEEdGoiAUIANwIAIAFCADcABSAAIARSBEAgBKchASAEQgF8IQQMAQsLIAIgADcDCCACIAA3AxAgAg8LIAEEQCABQQA2AgQgAUEONgIAC0EAEBAgAhAGQQAL7gECA38BfiMAQRBrIgQkAAJAIARBDGpCBBAXIgNFBEBBfyECDAELAkAgAQRAIAJBgAZxIQUDQAJAIAUgASgCBHFFDQACQCADKQMIQgBUBEAgA0EAOgAADAELIANCADcDECADQQE6AAALIAMgAS8BCBANIAMgAS8BChANIAMtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAtBfyECDAQLQX8hAiAAIARBDGpCBBAbQQBIDQMgATMBCiIGUA0AIAAgASgCDCAGEBtBAEgNAwsgASgCACIBDQALC0EAIQILIAMQCAsgBEEQaiQAIAILPAEBfyAABEAgAUGABnEhAQNAIAEgACgCBHEEQCACIAAvAQpqQQRqIQILIAAoAgAiAA0ACwsgAkH//wNxC5wBAQN/IABFBEBBAA8LIAAhAwNAAn8CQAJAIAAvAQgiAUH04AFNBEAgAUEBRg0BIAFB9cYBRg0BDAILIAFBgbICRg0AIAFB9eABRw0BCyAAKAIAIQEgAEEANgIAIAAoAgwQBiAAEAYgASADIAAgA0YbIQMCQCACRQRAQQAhAgwBCyACIAE2AgALIAEMAQsgACICKAIACyIADQALIAMLsgQCBX8BfgJAAkACQCAAIAGtEBciAQRAIAEtAAANAUEAIQAMAgsgBARAIARBADYCBCAEQQ42AgALQQAPC0EAIQADQCABLQAABH4gASkDCCABKQMQfQVCAAtCBFQNASABEAwhByABIAEQDCIGrRATIghFBEBBACECIAQEQCAEQQA2AgQgBEEVNgIACyABEAggAEUNAwNAIAAoAgAhASAAKAIMEAYgABAGIAEiAA0ACwwDCwJAAkBBEBAJIgUEQCAFIAY7AQogBSAHOwEIIAUgAjYCBCAFQQA2AgAgBkUNASAFIAggBhBjIgY2AgwgBg0CIAUQBgtBACECIAQEQCAEQQA2AgQgBEEONgIACyABEAggAEUNBANAIAAoAgAhASAAKAIMEAYgABAGIAEiAA0ACwwECyAFQQA2AgwLAkAgAEUEQCAFIQAMAQsgCSAFNgIACyAFIQkgAS0AAA0ACwsCQCABLQAABH8gASkDECABKQMIUQVBAAsNACABIAEtAAAEfiABKQMIIAEpAxB9BUIACyIKQv////8PgxATIQICQCAKpyIFQQNLDQAgAkUNACACQcEUIAUQPUUNAQtBACECIAQEQCAEQQA2AgQgBEEVNgIACyABEAggAEUNAQNAIAAoAgAhASAAKAIMEAYgABAGIAEiAA0ACwwBCyABEAggAwRAIAMgADYCAEEBDwtBASECIABFDQADQCAAKAIAIQEgACgCDBAGIAAQBiABIgANAAsLIAILvgEBBX8gAAR/IAAhAgNAIAIiBCgCACICDQALIAEEQANAIAEiAy8BCCEGIAMoAgAhASAAIQICQAJAA0ACQCACLwEIIAZHDQAgAi8BCiIFIAMvAQpHDQAgBUUNAiACKAIMIAMoAgwgBRA9RQ0CCyACKAIAIgINAAsgA0EANgIAIAQgAzYCACADIQQMAQsgAiACKAIEIAMoAgRBgAZxcjYCBCADQQA2AgAgAygCDBAGIAMQBgsgAQ0ACwsgAAUgAQsLVQICfgF/AkACQCAALQAARQ0AIAApAxAiAkIBfCIDIAJUDQAgAyAAKQMIWA0BCyAAQQA6AAAPCyAAKAIEIgRFBEAPCyAAIAM3AxAgBCACp2ogAToAAAt9AQN/IwBBEGsiAiQAIAIgATYCDEF/IQMCQCAALQAoDQACQCAAKAIAIgRFDQAgBCABEHFBf0oNACAAKAIAIQEgAEEMaiIABEAgACABKAIMNgIAIAAgASgCEDYCBAsMAQsgACACQQxqQgRBExAOQj+HpyEDCyACQRBqJAAgAwvdAQEDfyABIAApAzBaBEAgAEEIagRAIABBADYCDCAAQRI2AggLQX8PCyAAQQhqIQIgAC0AGEECcQRAIAIEQCACQQA2AgQgAkEZNgIAC0F/DwtBfyEDAkAgACABQQAgAhBTIgRFDQAgACgCUCAEIAIQfkUNAAJ/IAEgACkDMFoEQCAAQQhqBEAgAEEANgIMIABBEjYCCAtBfwwBCyABp0EEdCICIAAoAkBqKAIEECAgACgCQCACaiICQQA2AgQgAhBAQQALDQAgACgCQCABp0EEdGpBAToADEEAIQMLIAMLpgIBBX9BfyEFAkAgACABQQBBABAmRQ0AIAAtABhBAnEEQCAAQQhqIgAEQCAAQQA2AgQgAEEZNgIAC0F/DwsCfyAAKAJAIgQgAaciBkEEdGooAgAiBUUEQCADQYCA2I14RyEHQQMMAQsgBSgCRCADRyEHIAUtAAkLIQggBCAGQQR0aiIEIQYgBCgCBCEEQQAgAiAIRiAHG0UEQAJAIAQNACAGIAUQKyIENgIEIAQNACAAQQhqIgAEQCAAQQA2AgQgAEEONgIAC0F/DwsgBCADNgJEIAQgAjoACSAEIAQoAgBBEHI2AgBBAA8LQQAhBSAERQ0AIAQgBCgCAEFvcSIANgIAIABFBEAgBBAgIAZBADYCBEEADwsgBCADNgJEIAQgCDoACQsgBQvjCAIFfwR+IAAtABhBAnEEQCAAQQhqBEAgAEEANgIMIABBGTYCCAtCfw8LIAApAzAhCwJAIANBgMAAcQRAIAAgASADQQAQTCIJQn9SDQELAn4CQAJAIAApAzAiCUIBfCIMIAApAzgiClQEQCAAKAJAIQQMAQsgCkIBhiIJQoAIIAlCgAhUGyIJQhAgCUIQVhsgCnwiCadBBHQiBK0gCkIEhkLw////D4NUDQEgACgCQCAEEDQiBEUNASAAIAk3AzggACAENgJAIAApAzAiCUIBfCEMCyAAIAw3AzAgBCAJp0EEdGoiBEIANwIAIARCADcABSAJDAELIABBCGoEQCAAQQA2AgwgAEEONgIIC0J/CyIJQgBZDQBCfw8LAkAgAUUNAAJ/QQAhBCAJIAApAzBaBEAgAEEIagRAIABBADYCDCAAQRI2AggLQX8MAQsgAC0AGEECcQRAIABBCGoEQCAAQQA2AgwgAEEZNgIIC0F/DAELAkAgAUUNACABLQAARQ0AQX8gASABECJB//8DcSADIABBCGoQNSIERQ0BGiADQYAwcQ0AIARBABAjQQNHDQAgBEECNgIICwJAIAAgAUEAQQAQTCIKQgBTIgENACAJIApRDQAgBBAQIABBCGoEQCAAQQA2AgwgAEEKNgIIC0F/DAELAkAgAUEBIAkgClEbRQ0AAkACfwJAIAAoAkAiASAJpyIFQQR0aiIGKAIAIgMEQCADKAIwIAQQYg0BCyAEIAYoAgQNARogBiAGKAIAECsiAzYCBCAEIAMNARogAEEIagRAIABBADYCDCAAQQ42AggLDAILQQEhByAGKAIAKAIwC0EAQQAgAEEIaiIDECUiCEUNAAJAAkAgASAFQQR0aiIFKAIEIgENACAGKAIAIgENAEEAIQEMAQsgASgCMCIBRQRAQQAhAQwBCyABQQBBACADECUiAUUNAQsgACgCUCAIIAlBACADEE1FDQAgAQRAIAAoAlAgAUEAEH4aCyAFKAIEIQMgBwRAIANFDQIgAy0AAEECcUUNAiADKAIwEBAgBSgCBCIBIAEoAgBBfXEiAzYCACADRQRAIAEQICAFQQA2AgQgBBAQQQAMBAsgASAGKAIAKAIwNgIwIAQQEEEADAMLIAMoAgAiAUECcQRAIAMoAjAQECAFKAIEIgMoAgAhAQsgAyAENgIwIAMgAUECcjYCAEEADAILIAQQEEF/DAELIAQQEEEAC0UNACALIAApAzBRBEBCfw8LIAAoAkAgCadBBHRqED4gACALNwMwQn8PCyAJpyIGQQR0IgEgACgCQGoQQAJAAkAgACgCQCIEIAFqIgMoAgAiBUUNAAJAIAMoAgQiAwRAIAMoAgAiAEEBcUUNAQwCCyAFECshAyAAKAJAIgQgBkEEdGogAzYCBCADRQ0CIAMoAgAhAAsgA0F+NgIQIAMgAEEBcjYCAAsgASAEaiACNgIIIAkPCyAAQQhqBEAgAEEANgIMIABBDjYCCAtCfwteAQF/IwBBEGsiAiQAAn8gACgCJEEBRwRAIABBDGoiAARAIABBADYCBCAAQRI2AgALQX8MAQsgAkEANgIIIAIgATcDACAAIAJCEEEMEA5CP4enCyEAIAJBEGokACAAC9oDAQZ/IwBBEGsiBSQAIAUgAjYCDCMAQaABayIEJAAgBEEIakHA8ABBkAEQBxogBCAANgI0IAQgADYCHCAEQX4gAGsiA0H/////ByADQf////8HSRsiBjYCOCAEIAAgBmoiADYCJCAEIAA2AhggBEEIaiEAIwBB0AFrIgMkACADIAI2AswBIANBoAFqQQBBKBAZIAMgAygCzAE2AsgBAkBBACABIANByAFqIANB0ABqIANBoAFqEEpBAEgNACAAKAJMQQBOIQcgACgCACECIAAsAEpBAEwEQCAAIAJBX3E2AgALIAJBIHEhCAJ/IAAoAjAEQCAAIAEgA0HIAWogA0HQAGogA0GgAWoQSgwBCyAAQdAANgIwIAAgA0HQAGo2AhAgACADNgIcIAAgAzYCFCAAKAIsIQIgACADNgIsIAAgASADQcgBaiADQdAAaiADQaABahBKIAJFDQAaIABBAEEAIAAoAiQRAAAaIABBADYCMCAAIAI2AiwgAEEANgIcIABBADYCECAAKAIUGiAAQQA2AhRBAAsaIAAgACgCACAIcjYCACAHRQ0ACyADQdABaiQAIAYEQCAEKAIcIgAgACAEKAIYRmtBADoAAAsgBEGgAWokACAFQRBqJAALUwEDfwJAIAAoAgAsAABBMGtBCk8NAANAIAAoAgAiAiwAACEDIAAgAkEBajYCACABIANqQTBrIQEgAiwAAUEwa0EKTw0BIAFBCmwhAQwACwALIAELuwIAAkAgAUEUSw0AAkACQAJAAkACQAJAAkACQAJAAkAgAUEJaw4KAAECAwQFBgcICQoLIAIgAigCACIBQQRqNgIAIAAgASgCADYCAA8LIAIgAigCACIBQQRqNgIAIAAgATQCADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATUCADcDAA8LIAIgAigCAEEHakF4cSIBQQhqNgIAIAAgASkDADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATIBADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATMBADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATAAADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATEAADcDAA8LIAIgAigCAEEHakF4cSIBQQhqNgIAIAAgASsDADkDAA8LIAAgAkEAEQcACwubAgAgAEUEQEEADwsCfwJAIAAEfyABQf8ATQ0BAkBB9IIBKAIAKAIARQRAIAFBgH9xQYC/A0YNAwwBCyABQf8PTQRAIAAgAUE/cUGAAXI6AAEgACABQQZ2QcABcjoAAEECDAQLIAFBgLADT0EAIAFBgEBxQYDAA0cbRQRAIAAgAUE/cUGAAXI6AAIgACABQQx2QeABcjoAACAAIAFBBnZBP3FBgAFyOgABQQMMBAsgAUGAgARrQf//P00EQCAAIAFBP3FBgAFyOgADIAAgAUESdkHwAXI6AAAgACABQQZ2QT9xQYABcjoAAiAAIAFBDHZBP3FBgAFyOgABQQQMBAsLQYSEAUEZNgIAQX8FQQELDAELIAAgAToAAEEBCwvjAQECfyACQQBHIQMCQAJAAkAgAEEDcUUNACACRQ0AIAFB/wFxIQQDQCAALQAAIARGDQIgAkEBayICQQBHIQMgAEEBaiIAQQNxRQ0BIAINAAsLIANFDQELAkAgAC0AACABQf8BcUYNACACQQRJDQAgAUH/AXFBgYKECGwhAwNAIAAoAgAgA3MiBEF/cyAEQYGChAhrcUGAgYKEeHENASAAQQRqIQAgAkEEayICQQNLDQALCyACRQ0AIAFB/wFxIQEDQCABIAAtAABGBEAgAA8LIABBAWohACACQQFrIgINAAsLQQALeQEBfAJAIABFDQAgACsDECAAKwMgIgIgAUQAAAAAAAAAACABRAAAAAAAAAAAZBsiAUQAAAAAAADwPyABRAAAAAAAAPA/YxsgACsDKCACoaKgIgEgACsDGKFjRQ0AIAAoAgAgASAAKAIMIAAoAgQRDgAgACABOQMYCwtIAQF8AkAgAEUNACAAKwMQIAArAyAiASAAKwMoIAGhoCIBIAArAxihY0UNACAAKAIAIAEgACgCDCAAKAIEEQ4AIAAgATkDGAsLWgICfgF/An8CQAJAIAAtAABFDQAgACkDECIBQgF8IgIgAVQNACACIAApAwhYDQELIABBADoAAEEADAELQQAgACgCBCIDRQ0AGiAAIAI3AxAgAyABp2otAAALC4IEAgZ/AX4gAEEAIAEbRQRAIAIEQCACQQA2AgQgAkESNgIAC0EADwsCQAJAIAApAwhQDQAgACgCECABLQAAIgQEf0Kl6wohCSABIQMDQCAJIAStQv8Bg3whCSADLQABIgQEQCADQQFqIQMgCUL/////D4NCIX4hCQwBCwsgCacFQYUqCyIEIAAoAgBwQQJ0aiIGKAIAIgNFDQADQAJAIAMoAhwgBEcNACABIAMoAgAQOA0AAkAgAykDCEJ/UQRAIAMoAhghAQJAIAUEQCAFIAE2AhgMAQsgBiABNgIACyADEAYgACAAKQMIQgF9Igk3AwggCbogACgCACIBuER7FK5H4XqEP6JjRQ0BIAFBgQJJDQECf0EAIQMgACgCACIGIAFBAXYiBUcEQCAFEDwiB0UEQCACBEAgAkEANgIEIAJBDjYCAAtBAAwCCwJAIAApAwhCACAGG1AEQCAAKAIQIQQMAQsgACgCECEEA0AgBCADQQJ0aigCACIBBEADQCABKAIYIQIgASAHIAEoAhwgBXBBAnRqIggoAgA2AhggCCABNgIAIAIiAQ0ACwsgA0EBaiIDIAZHDQALCyAEEAYgACAFNgIAIAAgBzYCEAtBAQsNAQwFCyADQn83AxALQQEPCyADIgUoAhgiAw0ACwsgAgRAIAJBADYCBCACQQk2AgALC0EAC6UGAgl/AX4jAEHwAGsiBSQAAkACQCAARQ0AAkAgAQRAIAEpAzAgAlYNAQtBACEDIABBCGoEQCAAQQA2AgwgAEESNgIICwwCCwJAIANBCHENACABKAJAIAKnQQR0aiIGKAIIRQRAIAYtAAxFDQELQQAhAyAAQQhqBEAgAEEANgIMIABBDzYCCAsMAgsgASACIANBCHIgBUE4ahCKAUF/TARAQQAhAyAAQQhqBEAgAEEANgIMIABBFDYCCAsMAgsgA0EDdkEEcSADciIGQQRxIQcgBSkDUCEOIAUvAWghCQJAIANBIHFFIAUvAWpBAEdxIgtFDQAgBA0AIAAoAhwiBA0AQQAhAyAAQQhqBEAgAEEANgIMIABBGjYCCAsMAgsgBSkDWFAEQCAAQQBCAEEAEFIhAwwCCwJAIAdFIgwgCUEAR3EiDUEBckUEQEEAIQMgBUEAOwEwIAUgDjcDICAFIA43AxggBSAFKAJgNgIoIAVC3AA3AwAgASgCACAOIAVBACABIAIgAEEIahBeIgYNAQwDC0EAIQMgASACIAYgAEEIaiIGECYiB0UNAiABKAIAIAUpA1ggBUE4aiAHLwEMQQF2QQNxIAEgAiAGEF4iBkUNAgsCfyAGIAE2AiwCQCABKAJEIghBAWoiCiABKAJIIgdJBEAgASgCTCEHDAELIAEoAkwgB0EKaiIIQQJ0EDQiB0UEQCABQQhqBEAgAUEANgIMIAFBDjYCCAtBfwwCCyABIAc2AkwgASAINgJIIAEoAkQiCEEBaiEKCyABIAo2AkQgByAIQQJ0aiAGNgIAQQALQX9MBEAgBhALDAELAkAgC0UEQCAGIQEMAQtBJkEAIAUvAWpBAUYbIgFFBEAgAEEIagRAIABBADYCDCAAQRg2AggLDAMLIAAgBiAFLwFqQQAgBCABEQYAIQEgBhALIAFFDQILAkAgDUUEQCABIQMMAQsgACABIAUvAWgQgQEhAyABEAsgA0UNAQsCQCAJRSAMckUEQCADIQEMAQsgACADQQEQgAEhASADEAsgAUUNAQsgASEDDAELQQAhAwsgBUHwAGokACADC4UBAQF/IAFFBEAgAEEIaiIABEAgAEEANgIEIABBEjYCAAtBAA8LQTgQCSIDRQRAIABBCGoiAARAIABBADYCBCAAQQ42AgALQQAPCyADQQA2AhAgA0IANwIIIANCADcDKCADQQA2AgQgAyACNgIAIANCADcDGCADQQA2AjAgACABQTsgAxBCCw8AIAAgASACQQBBABCCAQusAgECfyABRQRAIABBCGoiAARAIABBADYCBCAAQRI2AgALQQAPCwJAIAJBfUsNACACQf//A3FBCEYNACAAQQhqIgAEQCAAQQA2AgQgAEEQNgIAC0EADwsCQEGwwAAQCSIFBEAgBUEANgIIIAVCADcCACAFQYiBAUGogQEgAxs2AqhAIAUgAjYCFCAFIAM6ABAgBUEAOgAPIAVBADsBDCAFIAMgAkF9SyIGcToADiAFQQggAiAGG0H//wNxIAQgBUGIgQFBqIEBIAMbKAIAEQAAIgI2AqxAIAINASAFEDEgBRAGCyAAQQhqIgAEQCAAQQA2AgQgAEEONgIAC0EADwsgACABQTogBRBCIgAEfyAABSAFKAKsQCAFKAKoQCgCBBEDACAFEDEgBRAGQQALC6ABAQF/IAIgACgCBCIDIAIgA0kbIgIEQCAAIAMgAms2AgQCQAJAAkACQCAAKAIcIgMoAhRBAWsOAgEAAgsgA0GgAWogASAAKAIAIAJB3IABKAIAEQgADAILIAAgACgCMCABIAAoAgAgAkHEgAEoAgARBAA2AjAMAQsgASAAKAIAIAIQBxoLIAAgACgCACACajYCACAAIAAoAgggAmo2AggLC7cCAQR/QX4hAgJAIABFDQAgACgCIEUNACAAKAIkIgRFDQAgACgCHCIBRQ0AIAEoAgAgAEcNAAJAAkAgASgCICIDQTlrDjkBAgICAgICAgICAgIBAgICAQICAgICAgICAgICAgICAgICAQICAgICAgICAgICAQICAgICAgICAgEACyADQZoFRg0AIANBKkcNAQsCfwJ/An8gASgCBCICBEAgBCAAKAIoIAIQHiAAKAIcIQELIAEoAlAiAgsEQCAAKAIkIAAoAiggAhAeIAAoAhwhAQsgASgCTCICCwRAIAAoAiQgACgCKCACEB4gACgCHCEBCyABKAJIIgILBEAgACgCJCAAKAIoIAIQHiAAKAIcIQELIAAoAiQgACgCKCABEB4gAEEANgIcQX1BACADQfEARhshAgsgAgvrCQEIfyAAKAIwIgMgACgCDEEFayICIAIgA0sbIQggACgCACIEKAIEIQkgAUEERiEHAkADQCAEKAIQIgMgACgCoC5BKmpBA3UiAkkEQEEBIQYMAgsgCCADIAJrIgMgACgCaCAAKAJYayICIAQoAgRqIgVB//8DIAVB//8DSRsiBiADIAZJGyIDSwRAQQEhBiADQQBHIAdyRQ0CIAFFDQIgAyAFRw0CCyAAQQBBACAHIAMgBUZxIgUQOSAAIAAoAhBBBGsiBDYCECAAKAIEIARqIAM7AAAgACAAKAIQQQJqIgQ2AhAgACgCBCAEaiADQX9zOwAAIAAgACgCEEECajYCECAAKAIAEAoCfyACBEAgACgCACgCDCAAKAJIIAAoAlhqIAMgAiACIANLGyICEAcaIAAoAgAiBCAEKAIMIAJqNgIMIAQgBCgCECACazYCECAEIAQoAhQgAmo2AhQgACAAKAJYIAJqNgJYIAMgAmshAwsgAwsEQCAAKAIAIgIgAigCDCADEIMBIAAoAgAiAiACKAIMIANqNgIMIAIgAigCECADazYCECACIAIoAhQgA2o2AhQLIAAoAgAhBCAFRQ0AC0EAIQYLAkAgCSAEKAIEayICRQRAIAAoAmghAwwBCwJAIAAoAjAiAyACTQRAIABBAjYCgC4gACgCSCAEKAIAIANrIAMQBxogACAAKAIwIgM2AoQuIAAgAzYCaAwBCyACIAAoAkQgACgCaCIFa08EQCAAIAUgA2siBDYCaCAAKAJIIgUgAyAFaiAEEAcaIAAoAoAuIgNBAU0EQCAAIANBAWo2AoAuCyAAIAAoAmgiBSAAKAKELiIDIAMgBUsbNgKELiAAKAIAIQQLIAAoAkggBWogBCgCACACayACEAcaIAAgACgCaCACaiIDNgJoIAAgACgCMCAAKAKELiIEayIFIAIgAiAFSxsgBGo2AoQuCyAAIAM2AlgLIAAgAyAAKAJAIgIgAiADSRs2AkBBAyECAkAgBkUNACAAKAIAIgUoAgQhAgJAAkAgAUF7cUUNACACDQBBASECIAMgACgCWEYNAiAAKAJEIANrIQRBACECDAELIAIgACgCRCADayIETQ0AIAAoAlgiByAAKAIwIgZIDQAgACADIAZrIgM2AmggACAHIAZrNgJYIAAoAkgiAiACIAZqIAMQBxogACgCgC4iA0EBTQRAIAAgA0EBajYCgC4LIAAgACgCaCIDIAAoAoQuIgIgAiADSxs2AoQuIAAoAjAgBGohBCAAKAIAIgUoAgQhAgsCQCACIAQgAiAESRsiAkUEQCAAKAIwIQUMAQsgBSAAKAJIIANqIAIQgwEgACAAKAJoIAJqIgM2AmggACAAKAIwIgUgACgChC4iBGsiBiACIAIgBksbIARqNgKELgsgACADIAAoAkAiAiACIANJGzYCQCADIAAoAlgiBmsiAyAFIAAoAgwgACgCoC5BKmpBA3VrIgJB//8DIAJB//8DSRsiBCAEIAVLG0kEQEEAIQIgAUEERiADQQBHckUNASABRQ0BIAAoAgAoAgQNASADIARLDQELQQAhAiABQQRGBEAgACgCACgCBEUgAyAETXEhAgsgACAAKAJIIAZqIAQgAyADIARLGyIBIAIQOSAAIAAoAlggAWo2AlggACgCABAKQQJBACACGw8LIAIL/woCCn8DfiAAKQOYLiENIAAoAqAuIQQgAkEATgRAQQRBAyABLwECIggbIQlBB0GKASAIGyEFQX8hCgNAIAghByABIAsiDEEBaiILQQJ0ai8BAiEIAkACQCAGQQFqIgMgBU4NACAHIAhHDQAgAyEGDAELAkAgAyAJSARAIAAgB0ECdGoiBkHOFWohCSAGQcwVaiEKA0AgCjMBACEPAn8gBCAJLwEAIgZqIgVBP00EQCAPIASthiANhCENIAUMAQsgBEHAAEYEQCAAKAIEIAAoAhBqIA03AAAgACAAKAIQQQhqNgIQIA8hDSAGDAELIAAoAgQgACgCEGogDyAErYYgDYQ3AAAgACAAKAIQQQhqNgIQIA9BwAAgBGutiCENIAVBQGoLIQQgA0EBayIDDQALDAELIAcEQAJAIAcgCkYEQCANIQ8gBCEFIAMhBgwBCyAAIAdBAnRqIgNBzBVqMwEAIQ8gBCADQc4Vai8BACIDaiIFQT9NBEAgDyAErYYgDYQhDwwBCyAEQcAARgRAIAAoAgQgACgCEGogDTcAACAAIAAoAhBBCGo2AhAgAyEFDAELIAAoAgQgACgCEGogDyAErYYgDYQ3AAAgACAAKAIQQQhqNgIQIAVBQGohBSAPQcAAIARrrYghDwsgADMBjBYhDgJAIAUgAC8BjhYiBGoiA0E/TQRAIA4gBa2GIA+EIQ4MAQsgBUHAAEYEQCAAKAIEIAAoAhBqIA83AAAgACAAKAIQQQhqNgIQIAQhAwwBCyAAKAIEIAAoAhBqIA4gBa2GIA+ENwAAIAAgACgCEEEIajYCECADQUBqIQMgDkHAACAFa62IIQ4LIAasQgN9IQ0gA0E9TQRAIANBAmohBCANIAOthiAOhCENDAILIANBwABGBEAgACgCBCAAKAIQaiAONwAAIAAgACgCEEEIajYCEEECIQQMAgsgACgCBCAAKAIQaiANIAOthiAOhDcAACAAIAAoAhBBCGo2AhAgA0E+ayEEIA1BwAAgA2utiCENDAELIAZBCUwEQCAAMwGQFiEOAkAgBCAALwGSFiIFaiIDQT9NBEAgDiAErYYgDYQhDgwBCyAEQcAARgRAIAAoAgQgACgCEGogDTcAACAAIAAoAhBBCGo2AhAgBSEDDAELIAAoAgQgACgCEGogDiAErYYgDYQ3AAAgACAAKAIQQQhqNgIQIANBQGohAyAOQcAAIARrrYghDgsgBqxCAn0hDSADQTxNBEAgA0EDaiEEIA0gA62GIA6EIQ0MAgsgA0HAAEYEQCAAKAIEIAAoAhBqIA43AAAgACAAKAIQQQhqNgIQQQMhBAwCCyAAKAIEIAAoAhBqIA0gA62GIA6ENwAAIAAgACgCEEEIajYCECADQT1rIQQgDUHAACADa62IIQ0MAQsgADMBlBYhDgJAIAQgAC8BlhYiBWoiA0E/TQRAIA4gBK2GIA2EIQ4MAQsgBEHAAEYEQCAAKAIEIAAoAhBqIA03AAAgACAAKAIQQQhqNgIQIAUhAwwBCyAAKAIEIAAoAhBqIA4gBK2GIA2ENwAAIAAgACgCEEEIajYCECADQUBqIQMgDkHAACAEa62IIQ4LIAatQgp9IQ0gA0E4TQRAIANBB2ohBCANIAOthiAOhCENDAELIANBwABGBEAgACgCBCAAKAIQaiAONwAAIAAgACgCEEEIajYCEEEHIQQMAQsgACgCBCAAKAIQaiANIAOthiAOhDcAACAAIAAoAhBBCGo2AhAgA0E5ayEEIA1BwAAgA2utiCENC0EAIQYCfyAIRQRAQYoBIQVBAwwBC0EGQQcgByAIRiIDGyEFQQNBBCADGwshCSAHIQoLIAIgDEcNAAsLIAAgBDYCoC4gACANNwOYLgv5BQIIfwJ+AkAgACgC8C1FBEAgACkDmC4hCyAAKAKgLiEDDAELA0AgCSIDQQNqIQkgAyAAKALsLWoiAy0AAiEFIAApA5guIQwgACgCoC4hBAJAIAMvAAAiB0UEQCABIAVBAnRqIgMzAQAhCyAEIAMvAQIiBWoiA0E/TQRAIAsgBK2GIAyEIQsMAgsgBEHAAEYEQCAAKAIEIAAoAhBqIAw3AAAgACAAKAIQQQhqNgIQIAUhAwwCCyAAKAIEIAAoAhBqIAsgBK2GIAyENwAAIAAgACgCEEEIajYCECADQUBqIQMgC0HAACAEa62IIQsMAQsgBUGAzwBqLQAAIghBAnQiBiABaiIDQYQIajMBACELIANBhghqLwEAIQMgCEEIa0ETTQRAIAUgBkGA0QBqKAIAa60gA62GIAuEIQsgBkHA0wBqKAIAIANqIQMLIAMgAiAHQQFrIgcgB0EHdkGAAmogB0GAAkkbQYDLAGotAAAiBUECdCIIaiIKLwECaiEGIAozAQAgA62GIAuEIQsgBCAFQQRJBH8gBgUgByAIQYDSAGooAgBrrSAGrYYgC4QhCyAIQcDUAGooAgAgBmoLIgVqIgNBP00EQCALIASthiAMhCELDAELIARBwABGBEAgACgCBCAAKAIQaiAMNwAAIAAgACgCEEEIajYCECAFIQMMAQsgACgCBCAAKAIQaiALIASthiAMhDcAACAAIAAoAhBBCGo2AhAgA0FAaiEDIAtBwAAgBGutiCELCyAAIAs3A5guIAAgAzYCoC4gCSAAKALwLUkNAAsLIAFBgAhqMwEAIQwCQCADIAFBgghqLwEAIgJqIgFBP00EQCAMIAOthiALhCEMDAELIANBwABGBEAgACgCBCAAKAIQaiALNwAAIAAgACgCEEEIajYCECACIQEMAQsgACgCBCAAKAIQaiAMIAOthiALhDcAACAAIAAoAhBBCGo2AhAgAUFAaiEBIAxBwAAgA2utiCEMCyAAIAw3A5guIAAgATYCoC4L8AQBA38gAEHkAWohAgNAIAIgAUECdCIDakEAOwEAIAIgA0EEcmpBADsBACABQQJqIgFBngJHDQALIABBADsBzBUgAEEAOwHYEyAAQZQWakEAOwEAIABBkBZqQQA7AQAgAEGMFmpBADsBACAAQYgWakEAOwEAIABBhBZqQQA7AQAgAEGAFmpBADsBACAAQfwVakEAOwEAIABB+BVqQQA7AQAgAEH0FWpBADsBACAAQfAVakEAOwEAIABB7BVqQQA7AQAgAEHoFWpBADsBACAAQeQVakEAOwEAIABB4BVqQQA7AQAgAEHcFWpBADsBACAAQdgVakEAOwEAIABB1BVqQQA7AQAgAEHQFWpBADsBACAAQcwUakEAOwEAIABByBRqQQA7AQAgAEHEFGpBADsBACAAQcAUakEAOwEAIABBvBRqQQA7AQAgAEG4FGpBADsBACAAQbQUakEAOwEAIABBsBRqQQA7AQAgAEGsFGpBADsBACAAQagUakEAOwEAIABBpBRqQQA7AQAgAEGgFGpBADsBACAAQZwUakEAOwEAIABBmBRqQQA7AQAgAEGUFGpBADsBACAAQZAUakEAOwEAIABBjBRqQQA7AQAgAEGIFGpBADsBACAAQYQUakEAOwEAIABBgBRqQQA7AQAgAEH8E2pBADsBACAAQfgTakEAOwEAIABB9BNqQQA7AQAgAEHwE2pBADsBACAAQewTakEAOwEAIABB6BNqQQA7AQAgAEHkE2pBADsBACAAQeATakEAOwEAIABB3BNqQQA7AQAgAEIANwL8LSAAQeQJakEBOwEAIABBADYC+C0gAEEANgLwLQuKAwIGfwR+QcgAEAkiBEUEQEEADwsgBEIANwMAIARCADcDMCAEQQA2AiggBEIANwMgIARCADcDGCAEQgA3AxAgBEIANwMIIARCADcDOCABUARAIARBCBAJIgA2AgQgAEUEQCAEEAYgAwRAIANBADYCBCADQQ42AgALQQAPCyAAQgA3AwAgBA8LAkAgAaciBUEEdBAJIgZFDQAgBCAGNgIAIAVBA3RBCGoQCSIFRQ0AIAQgATcDECAEIAU2AgQDQCAAIAynIghBBHRqIgcpAwgiDVBFBEAgBygCACIHRQRAIAMEQCADQQA2AgQgA0ESNgIACyAGEAYgBRAGIAQQBkEADwsgBiAKp0EEdGoiCSANNwMIIAkgBzYCACAFIAhBA3RqIAs3AwAgCyANfCELIApCAXwhCgsgDEIBfCIMIAFSDQALIAQgCjcDCCAEQgAgCiACGzcDGCAFIAqnQQN0aiALNwMAIAQgCzcDMCAEDwsgAwRAIANBADYCBCADQQ42AgALIAYQBiAEEAZBAAvlAQIDfwF+QX8hBQJAIAAgASACQQAQJiIERQ0AIAAgASACEIsBIgZFDQACfgJAIAJBCHENACAAKAJAIAGnQQR0aigCCCICRQ0AIAIgAxAhQQBOBEAgAykDAAwCCyAAQQhqIgAEQCAAQQA2AgQgAEEPNgIAC0F/DwsgAxAqIAMgBCgCGDYCLCADIAQpAyg3AxggAyAEKAIUNgIoIAMgBCkDIDcDICADIAQoAhA7ATAgAyAELwFSOwEyQvwBQtwBIAQtAAYbCyEHIAMgBjYCCCADIAE3AxAgAyAHQgOENwMAQQAhBQsgBQspAQF/IAAgASACIABBCGoiABAmIgNFBEBBAA8LIAMoAjBBACACIAAQJQuAAwEGfwJ/An9BMCABQYB/Sw0BGgJ/IAFBgH9PBEBBhIQBQTA2AgBBAAwBC0EAQRAgAUELakF4cSABQQtJGyIFQcwAahAJIgFFDQAaIAFBCGshAgJAIAFBP3FFBEAgAiEBDAELIAFBBGsiBigCACIHQXhxIAFBP2pBQHFBCGsiASABQUBrIAEgAmtBD0sbIgEgAmsiA2shBCAHQQNxRQRAIAIoAgAhAiABIAQ2AgQgASACIANqNgIADAELIAEgBCABKAIEQQFxckECcjYCBCABIARqIgQgBCgCBEEBcjYCBCAGIAMgBigCAEEBcXJBAnI2AgAgAiADaiIEIAQoAgRBAXI2AgQgAiADEDsLAkAgASgCBCICQQNxRQ0AIAJBeHEiAyAFQRBqTQ0AIAEgBSACQQFxckECcjYCBCABIAVqIgIgAyAFayIFQQNyNgIEIAEgA2oiAyADKAIEQQFyNgIEIAIgBRA7CyABQQhqCyIBRQsEQEEwDwsgACABNgIAQQALCwoAIABBiIQBEAQL6AIBBX8gACgCUCEBIAAvATAhBEEEIQUDQCABQQAgAS8BACICIARrIgMgAiADSRs7AQAgAUEAIAEvAQIiAiAEayIDIAIgA0kbOwECIAFBACABLwEEIgIgBGsiAyACIANJGzsBBCABQQAgAS8BBiICIARrIgMgAiADSRs7AQYgBUGAgARGRQRAIAFBCGohASAFQQRqIQUMAQsLAkAgBEUNACAEQQNxIQUgACgCTCEBIARBAWtBA08EQCAEIAVrIQADQCABQQAgAS8BACICIARrIgMgAiADSRs7AQAgAUEAIAEvAQIiAiAEayIDIAIgA0kbOwECIAFBACABLwEEIgIgBGsiAyACIANJGzsBBCABQQAgAS8BBiICIARrIgMgAiADSRs7AQYgAUEIaiEBIABBBGsiAA0ACwsgBUUNAANAIAFBACABLwEAIgAgBGsiAiAAIAJJGzsBACABQQJqIQEgBUEBayIFDQALCwuDAQEEfyACQQFOBEAgAiAAKAJIIAFqIgJqIQMgACgCUCEEA0AgBCACKAAAQbHz3fF5bEEPdkH+/wdxaiIFLwEAIgYgAUH//wNxRwRAIAAoAkwgASAAKAI4cUH//wNxQQF0aiAGOwEAIAUgATsBAAsgAUEBaiEBIAJBAWoiAiADSQ0ACwsLUAECfyABIAAoAlAgACgCSCABaigAAEGx893xeWxBD3ZB/v8HcWoiAy8BACICRwRAIAAoAkwgACgCOCABcUEBdGogAjsBACADIAE7AQALIAILugEBAX8jAEEQayICJAAgAkEAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAgARBYIAJBEGokAAu9AQEBfyMAQRBrIgEkACABQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgAEEANgJAIAFBEGokAEEAC70BAQF/IwBBEGsiASQAIAFBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAKAJAIQAgAUEQaiQAIAALvgEBAX8jAEEQayIEJAAgBEEAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAgASACIAMQVyAEQRBqJAALygEAIwBBEGsiAyQAIANBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAIAAoAkAgASACQdSAASgCABEAADYCQCADQRBqJAALwAEBAX8jAEEQayIDJAAgA0EAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAgASACEF0hACADQRBqJAAgAAu+AQEBfyMAQRBrIgIkACACQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgACABEFwhACACQRBqJAAgAAu2AQEBfyMAQRBrIgAkACAAQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgAEEQaiQAQQgLwgEBAX8jAEEQayIEJAAgBEEAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAgASACIAMQWSEAIARBEGokACAAC8IBAQF/IwBBEGsiBCQAIARBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAIAEgAiADEFYhACAEQRBqJAAgAAsHACAALwEwC8ABAQF/IwBBEGsiAyQAIANBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAIAEgAhBVIQAgA0EQaiQAIAALBwAgACgCQAsaACAAIAAoAkAgASACQdSAASgCABEAADYCQAsLACAAQQA2AkBBAAsHACAAKAIgCwQAQQgLzgUCA34BfyMAQYBAaiIIJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAEDhECAwwFAAEECAkJCQkJCQcJBgkLIANCCFoEfiACIAEoAmQ2AgAgAiABKAJoNgIEQggFQn8LIQYMCwsgARAGDAoLIAEoAhAiAgRAIAIgASkDGCABQeQAaiICEEEiA1ANCCABKQMIIgVCf4UgA1QEQCACBEAgAkEANgIEIAJBFTYCAAsMCQsgAUEANgIQIAEgAyAFfDcDCCABIAEpAwAgA3w3AwALIAEtAHgEQCABKQMAIQUMCQtCACEDIAEpAwAiBVAEQCABQgA3AyAMCgsDQCAAIAggBSADfSIFQoDAACAFQoDAAFQbEBEiB0J/VwRAIAFB5ABqIgEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwJCyAHUEUEQCABKQMAIgUgAyAHfCIDWA0KDAELCyABQeQAagRAIAFBADYCaCABQRE2AmQLDAcLIAEpAwggASkDICIFfSIHIAMgAyAHVhsiA1ANCAJAIAEtAHhFDQAgACAFQQAQFEF/Sg0AIAFB5ABqIgEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwHCyAAIAIgAxARIgZCf1cEQCABQeQAagRAIAFBADYCaCABQRE2AmQLDAcLIAEgASkDICAGfCIDNwMgIAZCAFINCEIAIQYgAyABKQMIWg0IIAFB5ABqBEAgAUEANgJoIAFBETYCZAsMBgsgASkDICABKQMAIgV9IAEpAwggBX0gAiADIAFB5ABqEEQiA0IAUw0FIAEgASkDACADfDcDIAwHCyACIAFBKGoQYEEfdawhBgwGCyABMABgIQYMBQsgASkDcCEGDAQLIAEpAyAgASkDAH0hBgwDCyABQeQAagRAIAFBADYCaCABQRw2AmQLC0J/IQYMAQsgASAFNwMgCyAIQYBAayQAIAYLBwAgACgCAAsPACAAIAAoAjBBAWo2AjALGABB+IMBQgA3AgBBgIQBQQA2AgBB+IMBCwcAIABBDGoLBwAgACgCLAsHACAAKAIoCwcAIAAoAhgLFQAgACABrSACrUIghoQgAyAEEIoBCxMBAX4gABAzIgFCIIinEAAgAacLbwEBfiABrSACrUIghoQhBSMAQRBrIgEkAAJ/IABFBEAgBVBFBEAgBARAIARBADYCBCAEQRI2AgALQQAMAgtBAEIAIAMgBBA6DAELIAEgBTcDCCABIAA2AgAgAUIBIAMgBBA6CyEAIAFBEGokACAACxQAIAAgASACrSADrUIghoQgBBBSC9oCAgJ/AX4CfyABrSACrUIghoQiByAAKQMwVEEAIARBCkkbRQRAIABBCGoEQCAAQQA2AgwgAEESNgIIC0F/DAELIAAtABhBAnEEQCAAQQhqBEAgAEEANgIMIABBGTYCCAtBfwwBCyADBH8gA0H//wNxQQhGIANBfUtyBUEBC0UEQCAAQQhqBEAgAEEANgIMIABBEDYCCAtBfwwBCyAAKAJAIgEgB6ciBUEEdGooAgAiAgR/IAIoAhAgA0YFIANBf0YLIQYgASAFQQR0aiIBIQUgASgCBCEBAkAgBgRAIAFFDQEgAUEAOwFQIAEgASgCAEF+cSIANgIAIAANASABECAgBUEANgIEQQAMAgsCQCABDQAgBSACECsiATYCBCABDQAgAEEIagRAIABBADYCDCAAQQ42AggLQX8MAgsgASAEOwFQIAEgAzYCECABIAEoAgBBAXI2AgALQQALCxwBAX4gACABIAIgAEEIahBMIgNCIIinEAAgA6cLHwEBfiAAIAEgAq0gA61CIIaEEBEiBEIgiKcQACAEpwteAQF+An5CfyAARQ0AGiAAKQMwIgIgAUEIcUUNABpCACACUA0AGiAAKAJAIQADQCACIAKnQQR0IABqQRBrKAIADQEaIAJCAX0iAkIAUg0AC0IACyICQiCIpxAAIAKnCxMAIAAgAa0gAq1CIIaEIAMQiwELnwEBAn4CfiACrSADrUIghoQhBUJ/IQQCQCAARQ0AIAAoAgQNACAAQQRqIQIgBUJ/VwRAIAIEQCACQQA2AgQgAkESNgIAC0J/DAILQgAhBCAALQAQDQAgBVANACAAKAIUIAEgBRARIgRCf1UNACAAKAIUIQAgAgRAIAIgACgCDDYCACACIAAoAhA2AgQLQn8hBAsgBAsiBEIgiKcQACAEpwueAQEBfwJ/IAAgACABrSACrUIghoQgAyAAKAIcEH8iAQRAIAEQMkF/TARAIABBCGoEQCAAIAEoAgw2AgggACABKAIQNgIMCyABEAtBAAwCC0EYEAkiBEUEQCAAQQhqBEAgAEEANgIMIABBDjYCCAsgARALQQAMAgsgBCAANgIAIARBADYCDCAEQgA3AgQgBCABNgIUIARBADoAEAsgBAsLsQICAX8BfgJ/QX8hBAJAIAAgAa0gAq1CIIaEIgZBAEEAECZFDQAgAC0AGEECcQRAIABBCGoEQCAAQQA2AgwgAEEZNgIIC0F/DAILIAAoAkAiASAGpyICQQR0aiIEKAIIIgUEQEEAIQQgBSADEHFBf0oNASAAQQhqBEAgAEEANgIMIABBDzYCCAtBfwwCCwJAIAQoAgAiBQRAIAUoAhQgA0YNAQsCQCABIAJBBHRqIgEoAgQiBA0AIAEgBRArIgQ2AgQgBA0AIABBCGoEQCAAQQA2AgwgAEEONgIIC0F/DAMLIAQgAzYCFCAEIAQoAgBBIHI2AgBBAAwCC0EAIQQgASACQQR0aiIBKAIEIgBFDQAgACAAKAIAQV9xIgI2AgAgAg0AIAAQICABQQA2AgQLIAQLCxQAIAAgAa0gAq1CIIaEIAQgBRBzCxIAIAAgAa0gAq1CIIaEIAMQFAtBAQF+An4gAUEAIAIbRQRAIABBCGoEQCAAQQA2AgwgAEESNgIIC0J/DAELIAAgASACIAMQdAsiBEIgiKcQACAEpwvGAwIFfwF+An4CQAJAIAAiBC0AGEECcQRAIARBCGoEQCAEQQA2AgwgBEEZNgIICwwBCyABRQRAIARBCGoEQCAEQQA2AgwgBEESNgIICwwBCyABECIiByABakEBay0AAEEvRwRAIAdBAmoQCSIARQRAIARBCGoEQCAEQQA2AgwgBEEONgIICwwCCwJAAkAgACIGIAEiBXNBA3ENACAFQQNxBEADQCAGIAUtAAAiAzoAACADRQ0DIAZBAWohBiAFQQFqIgVBA3ENAAsLIAUoAgAiA0F/cyADQYGChAhrcUGAgYKEeHENAANAIAYgAzYCACAFKAIEIQMgBkEEaiEGIAVBBGohBSADQYGChAhrIANBf3NxQYCBgoR4cUUNAAsLIAYgBS0AACIDOgAAIANFDQADQCAGIAUtAAEiAzoAASAGQQFqIQYgBUEBaiEFIAMNAAsLIAcgACIDakEvOwAACyAEQQBCAEEAEFIiAEUEQCADEAYMAQsgBCADIAEgAxsgACACEHQhCCADEAYgCEJ/VwRAIAAQCyAIDAMLIAQgCEEDQYCA/I8EEHNBf0oNASAEIAgQchoLQn8hCAsgCAsiCEIgiKcQACAIpwsQACAAIAGtIAKtQiCGhBByCxYAIAAgAa0gAq1CIIaEIAMgBCAFEGYL3iMDD38IfgF8IwBB8ABrIgkkAAJAIAFBAE5BACAAG0UEQCACBEAgAkEANgIEIAJBEjYCAAsMAQsgACkDGCISAn5BsIMBKQMAIhNCf1EEQCAJQoOAgIBwNwMwIAlChoCAgPAANwMoIAlCgYCAgCA3AyBBsIMBQQAgCUEgahAkNwMAIAlCj4CAgHA3AxAgCUKJgICAoAE3AwAgCUKMgICA0AE3AwhBuIMBQQggCRAkNwMAQbCDASkDACETCyATC4MgE1IEQCACBEAgAkEANgIEIAJBHDYCAAsMAQsgASABQRByQbiDASkDACITIBKDIBNRGyIKQRhxQRhGBEAgAgRAIAJBADYCBCACQRk2AgALDAELIAlBOGoQKgJAIAAgCUE4ahAhBEACQCAAKAIMQQVGBEAgACgCEEEsRg0BCyACBEAgAiAAKAIMNgIAIAIgACgCEDYCBAsMAgsgCkEBcUUEQCACBEAgAkEANgIEIAJBCTYCAAsMAwsgAhBJIgVFDQEgBSAKNgIEIAUgADYCACAKQRBxRQ0CIAUgBSgCFEECcjYCFCAFIAUoAhhBAnI2AhgMAgsgCkECcQRAIAIEQCACQQA2AgQgAkEKNgIACwwCCyAAEDJBf0wEQCACBEAgAiAAKAIMNgIAIAIgACgCEDYCBAsMAQsCfyAKQQhxBEACQCACEEkiAUUNACABIAo2AgQgASAANgIAIApBEHFFDQAgASABKAIUQQJyNgIUIAEgASgCGEECcjYCGAsgAQwBCyMAQUBqIg4kACAOQQhqECoCQCAAIA5BCGoQIUF/TARAIAIEQCACIAAoAgw2AgAgAiAAKAIQNgIECwwBCyAOLQAIQQRxRQRAIAIEQCACQYoBNgIEIAJBBDYCAAsMAQsgDikDICETIAIQSSIFRQRAQQAhBQwBCyAFIAo2AgQgBSAANgIAIApBEHEEQCAFIAUoAhRBAnI2AhQgBSAFKAIYQQJyNgIYCwJAAkACQCATUARAAn8gACEBAkADQCABKQMYQoCAEINCAFINASABKAIAIgENAAtBAQwBCyABQQBCAEESEA6nCw0EIAVBCGoEQCAFQQA2AgwgBUETNgIICwwBCyMAQdAAayIBJAACQCATQhVYBEAgBUEIagRAIAVBADYCDCAFQRM2AggLDAELAkACQCAFKAIAQgAgE0KqgAQgE0KqgARUGyISfUECEBRBf0oNACAFKAIAIgMoAgxBBEYEQCADKAIQQRZGDQELIAVBCGoEQCAFIAMoAgw2AgggBSADKAIQNgIMCwwBCyAFKAIAEDMiE0J/VwRAIAUoAgAhAyAFQQhqIggEQCAIIAMoAgw2AgAgCCADKAIQNgIECwwBCyAFKAIAIBJBACAFQQhqIg8QLSIERQ0BIBJCqoAEWgRAAkAgBCkDCEIUVARAIARBADoAAAwBCyAEQhQ3AxAgBEEBOgAACwsgAQRAIAFBADYCBCABQRM2AgALIARCABATIQwCQCAELQAABH4gBCkDCCAEKQMQfQVCAAunIgdBEmtBA0sEQEJ/IRcDQCAMQQFrIQMgByAMakEVayEGAkADQCADQQFqIgNB0AAgBiADaxB6IgNFDQEgA0EBaiIMQZ8SQQMQPQ0ACwJAIAMgBCgCBGusIhIgBCkDCFYEQCAEQQA6AAAMAQsgBCASNwMQIARBAToAAAsgBC0AAAR+IAQpAxAFQgALIRICQCAELQAABH4gBCkDCCAEKQMQfQVCAAtCFVgEQCABBEAgAUEANgIEIAFBEzYCAAsMAQsgBEIEEBMoAABB0JaVMEcEQCABBEAgAUEANgIEIAFBEzYCAAsMAQsCQAJAAkAgEkIUVA0AIAQoAgQgEqdqQRRrKAAAQdCWmThHDQACQCASQhR9IhQgBCIDKQMIVgRAIANBADoAAAwBCyADIBQ3AxAgA0EBOgAACyAFKAIUIRAgBSgCACEGIAMtAAAEfiAEKQMQBUIACyEWIARCBBATGiAEEAwhCyAEEAwhDSAEEB0iFEJ/VwRAIAEEQCABQRY2AgQgAUEENgIACwwECyAUQjh8IhUgEyAWfCIWVgRAIAEEQCABQQA2AgQgAUEVNgIACwwECwJAAkAgEyAUVg0AIBUgEyAEKQMIfFYNAAJAIBQgE30iFSAEKQMIVgRAIANBADoAAAwBCyADIBU3AxAgA0EBOgAAC0EAIQcMAQsgBiAUQQAQFEF/TARAIAEEQCABIAYoAgw2AgAgASAGKAIQNgIECwwFC0EBIQcgBkI4IAFBEGogARAtIgNFDQQLIANCBBATKAAAQdCWmTBHBEAgAQRAIAFBADYCBCABQRU2AgALIAdFDQQgAxAIDAQLIAMQHSEVAkAgEEEEcSIGRQ0AIBQgFXxCDHwgFlENACABBEAgAUEANgIEIAFBFTYCAAsgB0UNBCADEAgMBAsgA0IEEBMaIAMQFSIQIAsgC0H//wNGGyELIAMQFSIRIA0gDUH//wNGGyENAkAgBkUNACANIBFGQQAgCyAQRhsNACABBEAgAUEANgIEIAFBFTYCAAsgB0UNBCADEAgMBAsgCyANcgRAIAEEQCABQQA2AgQgAUEBNgIACyAHRQ0EIAMQCAwECyADEB0iGCADEB1SBEAgAQRAIAFBADYCBCABQQE2AgALIAdFDQQgAxAIDAQLIAMQHSEVIAMQHSEWIAMtAABFBEAgAQRAIAFBADYCBCABQRQ2AgALIAdFDQQgAxAIDAQLIAcEQCADEAgLAkAgFkIAWQRAIBUgFnwiGSAWWg0BCyABBEAgAUEWNgIEIAFBBDYCAAsMBAsgEyAUfCIUIBlUBEAgAQRAIAFBADYCBCABQRU2AgALDAQLAkAgBkUNACAUIBlRDQAgAQRAIAFBADYCBCABQRU2AgALDAQLIBggFUIugFgNASABBEAgAUEANgIEIAFBFTYCAAsMAwsCQCASIAQpAwhWBEAgBEEAOgAADAELIAQgEjcDECAEQQE6AAALIAUoAhQhAyAELQAABH4gBCkDCCAEKQMQfQVCAAtCFVgEQCABBEAgAUEANgIEIAFBFTYCAAsMAwsgBC0AAAR+IAQpAxAFQgALIRQgBEIEEBMaIAQQFQRAIAEEQCABQQA2AgQgAUEBNgIACwwDCyAEEAwgBBAMIgZHBEAgAQRAIAFBADYCBCABQRM2AgALDAMLIAQQFSEHIAQQFa0iFiAHrSIVfCIYIBMgFHwiFFYEQCABBEAgAUEANgIEIAFBFTYCAAsMAwsCQCADQQRxRQ0AIBQgGFENACABBEAgAUEANgIEIAFBFTYCAAsMAwsgBq0gARBqIgNFDQIgAyAWNwMgIAMgFTcDGCADQQA6ACwMAQsgGCABEGoiA0UNASADIBY3AyAgAyAVNwMYIANBAToALAsCQCASQhR8IhQgBCkDCFYEQCAEQQA6AAAMAQsgBCAUNwMQIARBAToAAAsgBBAMIQYCQCADKQMYIAMpAyB8IBIgE3xWDQACQCAGRQRAIAUtAARBBHFFDQELAkAgEkIWfCISIAQpAwhWBEAgBEEAOgAADAELIAQgEjcDECAEQQE6AAALIAQtAAAEfiAEKQMIIAQpAxB9BUIACyIUIAatIhJUDQEgBS0ABEEEcUEAIBIgFFIbDQEgBkUNACADIAQgEhATIAZBACABEDUiBjYCKCAGDQAgAxAWDAILAkAgEyADKQMgIhJYBEACQCASIBN9IhIgBCkDCFYEQCAEQQA6AAAMAQsgBCASNwMQIARBAToAAAsgBCADKQMYEBMiBkUNAiAGIAMpAxgQFyIHDQEgAQRAIAFBADYCBCABQQ42AgALIAMQFgwDCyAFKAIAIBJBABAUIQcgBSgCACEGIAdBf0wEQCABBEAgASAGKAIMNgIAIAEgBigCEDYCBAsgAxAWDAMLQQAhByAGEDMgAykDIFENACABBEAgAUEANgIEIAFBEzYCAAsgAxAWDAILQgAhFAJAAkAgAykDGCIWUEUEQANAIBQgAykDCFIiC0UEQCADLQAsDQMgFkIuVA0DAn8CQCADKQMQIhVCgIAEfCISIBVaQQAgEkKAgICAAVQbRQ0AIAMoAgAgEqdBBHQQNCIGRQ0AIAMgBjYCAAJAIAMpAwgiFSASWg0AIAYgFadBBHRqIgZCADcCACAGQgA3AAUgFUIBfCIVIBJRDQADQCADKAIAIBWnQQR0aiIGQgA3AgAgBkIANwAFIBVCAXwiFSASUg0ACwsgAyASNwMIIAMgEjcDEEEBDAELIAEEQCABQQA2AgQgAUEONgIAC0EAC0UNBAtB2AAQCSIGBH8gBkIANwMgIAZBADYCGCAGQv////8PNwMQIAZBADsBDCAGQb+GKDYCCCAGQQE6AAYgBkEAOwEEIAZBADYCACAGQgA3A0ggBkGAgNiNeDYCRCAGQgA3AyggBkIANwMwIAZCADcDOCAGQUBrQQA7AQAgBkIANwNQIAYFQQALIQYgAygCACAUp0EEdGogBjYCAAJAIAYEQCAGIAUoAgAgB0EAIAEQaCISQn9VDQELIAsNBCABKAIAQRNHDQQgAQRAIAFBADYCBCABQRU2AgALDAQLIBRCAXwhFCAWIBJ9IhZCAFINAAsLIBQgAykDCFINAAJAIAUtAARBBHFFDQAgBwRAIActAAAEfyAHKQMQIAcpAwhRBUEAC0UNAgwBCyAFKAIAEDMiEkJ/VwRAIAUoAgAhBiABBEAgASAGKAIMNgIAIAEgBigCEDYCBAsgAxAWDAULIBIgAykDGCADKQMgfFINAQsgBxAIAn4gCARAAn8gF0IAVwRAIAUgCCABEEghFwsgBSADIAEQSCISIBdVCwRAIAgQFiASDAILIAMQFgwFC0IAIAUtAARBBHFFDQAaIAUgAyABEEgLIRcgAyEIDAMLIAEEQCABQQA2AgQgAUEVNgIACyAHEAggAxAWDAILIAMQFiAHEAgMAQsgAQRAIAFBADYCBCABQRU2AgALIAMQFgsCQCAMIAQoAgRrrCISIAQpAwhWBEAgBEEAOgAADAELIAQgEjcDECAEQQE6AAALIAQtAAAEfiAEKQMIIAQpAxB9BUIAC6ciB0ESa0EDSw0BCwsgBBAIIBdCf1UNAwwBCyAEEAgLIA8iAwRAIAMgASgCADYCACADIAEoAgQ2AgQLIAgQFgtBACEICyABQdAAaiQAIAgNAQsgAgRAIAIgBSgCCDYCACACIAUoAgw2AgQLDAELIAUgCCgCADYCQCAFIAgpAwg3AzAgBSAIKQMQNwM4IAUgCCgCKDYCICAIEAYgBSgCUCEIIAVBCGoiBCEBQQAhBwJAIAUpAzAiE1ANAEGAgICAeCEGAn8gE7pEAAAAAAAA6D+jRAAA4P///+9BpCIaRAAAAAAAAPBBYyAaRAAAAAAAAAAAZnEEQCAaqwwBC0EACyIDQYCAgIB4TQRAIANBAWsiA0EBdiADciIDQQJ2IANyIgNBBHYgA3IiA0EIdiADciIDQRB2IANyQQFqIQYLIAYgCCgCACIMTQ0AIAYQPCILRQRAIAEEQCABQQA2AgQgAUEONgIACwwBCwJAIAgpAwhCACAMG1AEQCAIKAIQIQ8MAQsgCCgCECEPA0AgDyAHQQJ0aigCACIBBEADQCABKAIYIQMgASALIAEoAhwgBnBBAnRqIg0oAgA2AhggDSABNgIAIAMiAQ0ACwsgB0EBaiIHIAxHDQALCyAPEAYgCCAGNgIAIAggCzYCEAsCQCAFKQMwUA0AQgAhEwJAIApBBHFFBEADQCAFKAJAIBOnQQR0aigCACgCMEEAQQAgAhAlIgFFDQQgBSgCUCABIBNBCCAEEE1FBEAgBCgCAEEKRw0DCyATQgF8IhMgBSkDMFQNAAwDCwALA0AgBSgCQCATp0EEdGooAgAoAjBBAEEAIAIQJSIBRQ0DIAUoAlAgASATQQggBBBNRQ0BIBNCAXwiEyAFKQMwVA0ACwwBCyACBEAgAiAEKAIANgIAIAIgBCgCBDYCBAsMAQsgBSAFKAIUNgIYDAELIAAgACgCMEEBajYCMCAFEEtBACEFCyAOQUBrJAAgBQsiBQ0BIAAQGhoLQQAhBQsgCUHwAGokACAFCxAAIwAgAGtBcHEiACQAIAALBgAgACQACwQAIwAL4CoDEX8IfgN8IwBBwMAAayIHJABBfyECAkAgAEUNAAJ/IAAtAChFBEBBACAAKAIYIAAoAhRGDQEaC0EBCyEBAkACQCAAKQMwIhRQRQRAIAAoAkAhCgNAIAogEqdBBHRqIgMtAAwhCwJAAkAgAygCCA0AIAsNACADKAIEIgNFDQEgAygCAEUNAQtBASEBCyAXIAtBAXOtQv8Bg3whFyASQgF8IhIgFFINAAsgF0IAUg0BCyAAKAIEQQhxIAFyRQ0BAn8gACgCACIDKAIkIgFBA0cEQCADKAIgBH9BfyADEBpBAEgNAhogAygCJAUgAQsEQCADEEMLQX8gA0EAQgBBDxAOQgBTDQEaIANBAzYCJAtBAAtBf0oNASAAKAIAKAIMQRZGBEAgACgCACgCEEEsRg0CCyAAKAIAIQEgAEEIagRAIAAgASgCDDYCCCAAIAEoAhA2AgwLDAILIAFFDQAgFCAXVARAIABBCGoEQCAAQQA2AgwgAEEUNgIICwwCCyAXp0EDdBAJIgtFDQFCfyEWQgAhEgNAAkAgCiASp0EEdGoiBigCACIDRQ0AAkAgBigCCA0AIAYtAAwNACAGKAIEIgFFDQEgASgCAEUNAQsgFiADKQNIIhMgEyAWVhshFgsgBi0ADEUEQCAXIBlYBEAgCxAGIABBCGoEQCAAQQA2AgwgAEEUNgIICwwECyALIBmnQQN0aiASNwMAIBlCAXwhGQsgEkIBfCISIBRSDQALIBcgGVYEQCALEAYgAEEIagRAIABBADYCDCAAQRQ2AggLDAILAkACQCAAKAIAKQMYQoCACINQDQACQAJAIBZCf1INACAAKQMwIhNQDQIgE0IBgyEVIAAoAkAhAwJAIBNCAVEEQEJ/IRRCACESQgAhFgwBCyATQn6DIRlCfyEUQgAhEkIAIRYDQCADIBKnQQR0aigCACIBBEAgFiABKQNIIhMgEyAWVCIBGyEWIBQgEiABGyEUCyADIBJCAYQiGKdBBHRqKAIAIgEEQCAWIAEpA0giEyATIBZUIgEbIRYgFCAYIAEbIRQLIBJCAnwhEiAZQgJ9IhlQRQ0ACwsCQCAVUA0AIAMgEqdBBHRqKAIAIgFFDQAgFiABKQNIIhMgEyAWVCIBGyEWIBQgEiABGyEUCyAUQn9RDQBCACETIwBBEGsiBiQAAkAgACAUIABBCGoiCBBBIhVQDQAgFSAAKAJAIBSnQQR0aigCACIKKQMgIhh8IhQgGFpBACAUQn9VG0UEQCAIBEAgCEEWNgIEIAhBBDYCAAsMAQsgCi0ADEEIcUUEQCAUIRMMAQsgACgCACAUQQAQFCEBIAAoAgAhAyABQX9MBEAgCARAIAggAygCDDYCACAIIAMoAhA2AgQLDAELIAMgBkEMakIEEBFCBFIEQCAAKAIAIQEgCARAIAggASgCDDYCACAIIAEoAhA2AgQLDAELIBRCBHwgFCAGKAAMQdCWncAARhtCFEIMAn9BASEBAkAgCikDKEL+////D1YNACAKKQMgQv7///8PVg0AQQAhAQsgAQsbfCIUQn9XBEAgCARAIAhBFjYCBCAIQQQ2AgALDAELIBQhEwsgBkEQaiQAIBMiFkIAUg0BIAsQBgwFCyAWUA0BCwJ/IAAoAgAiASgCJEEBRgRAIAFBDGoEQCABQQA2AhAgAUESNgIMC0F/DAELQX8gAUEAIBZBERAOQgBTDQAaIAFBATYCJEEAC0F/Sg0BC0IAIRYCfyAAKAIAIgEoAiRBAUYEQCABQQxqBEAgAUEANgIQIAFBEjYCDAtBfwwBC0F/IAFBAEIAQQgQDkIAUw0AGiABQQE2AiRBAAtBf0oNACAAKAIAIQEgAEEIagRAIAAgASgCDDYCCCAAIAEoAhA2AgwLIAsQBgwCCyAAKAJUIgIEQCACQgA3AxggAigCAEQAAAAAAAAAACACKAIMIAIoAgQRDgALIABBCGohBCAXuiEcQgAhFAJAAkACQANAIBcgFCITUgRAIBO6IByjIRsgE0IBfCIUuiAcoyEaAkAgACgCVCICRQ0AIAIgGjkDKCACIBs5AyAgAisDECAaIBuhRAAAAAAAAAAAoiAboCIaIAIrAxihY0UNACACKAIAIBogAigCDCACKAIEEQ4AIAIgGjkDGAsCfwJAIAAoAkAgCyATp0EDdGopAwAiE6dBBHRqIg0oAgAiAQRAIAEpA0ggFlQNAQsgDSgCBCEFAkACfwJAIA0oAggiAkUEQCAFRQ0BQQEgBSgCACICQQFxDQIaIAJBwABxQQZ2DAILQQEgBQ0BGgsgDSABECsiBTYCBCAFRQ0BIAJBAEcLIQZBACEJIwBBEGsiDCQAAkAgEyAAKQMwWgRAIABBCGoEQCAAQQA2AgwgAEESNgIIC0F/IQkMAQsgACgCQCIKIBOnIgNBBHRqIg8oAgAiAkUNACACLQAEDQACQCACKQNIQhp8IhhCf1cEQCAAQQhqBEAgAEEWNgIMIABBBDYCCAsMAQtBfyEJIAAoAgAgGEEAEBRBf0wEQCAAKAIAIQIgAEEIagRAIAAgAigCDDYCCCAAIAIoAhA2AgwLDAILIAAoAgBCBCAMQQxqIABBCGoiDhAtIhBFDQEgEBAMIQEgEBAMIQggEC0AAAR/IBApAxAgECkDCFEFQQALIQIgEBAIIAJFBEAgDgRAIA5BADYCBCAOQRQ2AgALDAILAkAgCEUNACAAKAIAIAGtQQEQFEF/TARAQYSEASgCACECIA4EQCAOIAI2AgQgDkEENgIACwwDC0EAIAAoAgAgCEEAIA4QRSIBRQ0BIAEgCEGAAiAMQQhqIA4QbiECIAEQBiACRQ0BIAwoAggiAkUNACAMIAIQbSICNgIIIA8oAgAoAjQgAhBvIQIgDygCACACNgI0CyAPKAIAIgJBAToABEEAIQkgCiADQQR0aigCBCIBRQ0BIAEtAAQNASACKAI0IQIgAUEBOgAEIAEgAjYCNAwBC0F/IQkLIAxBEGokACAJQQBIDQUgACgCABAfIhhCAFMNBSAFIBg3A0ggBgRAQQAhDCANKAIIIg0hASANRQRAIAAgACATQQhBABB/IgwhASAMRQ0HCwJAAkAgASAHQQhqECFBf0wEQCAEBEAgBCABKAIMNgIAIAQgASgCEDYCBAsMAQsgBykDCCISQsAAg1AEQCAHQQA7ATggByASQsAAhCISNwMICwJAAkAgBSgCECICQX5PBEAgBy8BOCIDRQ0BIAUgAzYCECADIQIMAgsgAg0AIBJCBINQDQAgByAHKQMgNwMoIAcgEkIIhCISNwMIQQAhAgwBCyAHIBJC9////w+DIhI3AwgLIBJCgAGDUARAIAdBADsBOiAHIBJCgAGEIhI3AwgLAn8gEkIEg1AEQEJ/IRVBgAoMAQsgBSAHKQMgIhU3AyggEkIIg1AEQAJAAkACQAJAQQggAiACQX1LG0H//wNxDg0CAwMDAwMDAwEDAwMAAwtBgApBgAIgFUKUwuTzD1YbDAQLQYAKQYACIBVCg4Ow/w9WGwwDC0GACkGAAiAVQv////8PVhsMAgtBgApBgAIgFUIAUhsMAQsgBSAHKQMoNwMgQYACCyEPIAAoAgAQHyITQn9XBEAgACgCACECIAQEQCAEIAIoAgw2AgAgBCACKAIQNgIECwwBCyAFIAUvAQxB9/8DcTsBDCAAIAUgDxA3IgpBAEgNACAHLwE4IghBCCAFKAIQIgMgA0F9SxtB//8DcSICRyEGAkACQAJAAkACQAJAAkAgAiAIRwRAIANBAEchAwwBC0EAIQMgBS0AAEGAAXFFDQELIAUvAVIhCSAHLwE6IQIMAQsgBS8BUiIJIAcvAToiAkYNAQsgASABKAIwQQFqNgIwIAJB//8DcQ0BIAEhAgwCCyABIAEoAjBBAWo2AjBBACEJDAILQSZBACAHLwE6QQFGGyICRQRAIAQEQCAEQQA2AgQgBEEYNgIACyABEAsMAwsgACABIAcvATpBACAAKAIcIAIRBgAhAiABEAsgAkUNAgsgCUEARyEJIAhBAEcgBnFFBEAgAiEBDAELIAAgAiAHLwE4EIEBIQEgAhALIAFFDQELAkAgCEUgBnJFBEAgASECDAELIAAgAUEAEIABIQIgARALIAJFDQELAkAgA0UEQCACIQMMAQsgACACIAUoAhBBASAFLwFQEIIBIQMgAhALIANFDQELAkAgCUUEQCADIQEMAQsgBSgCVCIBRQRAIAAoAhwhAQsCfyAFLwFSGkEBCwRAIAQEQCAEQQA2AgQgBEEYNgIACyADEAsMAgsgACADIAUvAVJBASABQQARBgAhASADEAsgAUUNAQsgACgCABAfIhhCf1cEQCAAKAIAIQIgBARAIAQgAigCDDYCACAEIAIoAhA2AgQLDAELAkAgARAyQQBOBEACfwJAAkAgASAHQUBrQoDAABARIhJCAVMNAEIAIRkgFUIAVQRAIBW5IRoDQCAAIAdBQGsgEhAbQQBIDQMCQCASQoDAAFINACAAKAJUIgJFDQAgAiAZQoBAfSIZuSAaoxB7CyABIAdBQGtCgMAAEBEiEkIAVQ0ACwwBCwNAIAAgB0FAayASEBtBAEgNAiABIAdBQGtCgMAAEBEiEkIAVQ0ACwtBACASQn9VDQEaIAQEQCAEIAEoAgw2AgAgBCABKAIQNgIECwtBfwshAiABEBoaDAELIAQEQCAEIAEoAgw2AgAgBCABKAIQNgIEC0F/IQILIAEgB0EIahAhQX9MBEAgBARAIAQgASgCDDYCACAEIAEoAhA2AgQLQX8hAgsCf0EAIQkCQCABIgNFDQADQCADLQAaQQFxBEBB/wEhCSADQQBCAEEQEA4iFUIAUw0CIBVCBFkEQCADQQxqBEAgA0EANgIQIANBFDYCDAsMAwsgFachCQwCCyADKAIAIgMNAAsLIAlBGHRBGHUiA0F/TAsEQCAEBEAgBCABKAIMNgIAIAQgASgCEDYCBAsgARALDAELIAEQCyACQQBIDQAgACgCABAfIRUgACgCACECIBVCf1cEQCAEBEAgBCACKAIMNgIAIAQgAigCEDYCBAsMAQsgAiATEHVBf0wEQCAAKAIAIQIgBARAIAQgAigCDDYCACAEIAIoAhA2AgQLDAELIAcpAwgiE0LkAINC5ABSBEAgBARAIARBADYCBCAEQRQ2AgALDAELAkAgBS0AAEEgcQ0AIBNCEINQRQRAIAUgBygCMDYCFAwBCyAFQRRqEAEaCyAFIAcvATg2AhAgBSAHKAI0NgIYIAcpAyAhEyAFIBUgGH03AyAgBSATNwMoIAUgBS8BDEH5/wNxIANB/wFxQQF0cjsBDCAPQQp2IQNBPyEBAkACQAJAAkAgBSgCECICQQxrDgMAAQIBCyAFQS47AQoMAgtBLSEBIAMNACAFKQMoQv7///8PVg0AIAUpAyBC/v///w9WDQBBFCEBIAJBCEYNACAFLwFSQQFGDQAgBSgCMCICBH8gAi8BBAVBAAtB//8DcSICBEAgAiAFKAIwKAIAakEBay0AAEEvRg0BC0EKIQELIAUgATsBCgsgACAFIA8QNyICQQBIDQAgAiAKRwRAIAQEQCAEQQA2AgQgBEEUNgIACwwBCyAAKAIAIBUQdUF/Sg0BIAAoAgAhAiAEBEAgBCACKAIMNgIAIAQgAigCEDYCBAsLIA0NByAMEAsMBwsgDQ0CIAwQCwwCCyAFIAUvAQxB9/8DcTsBDCAAIAVBgAIQN0EASA0FIAAgEyAEEEEiE1ANBSAAKAIAIBNBABAUQX9MBEAgACgCACECIAQEQCAEIAIoAgw2AgAgBCACKAIQNgIECwwGCyAFKQMgIRIjAEGAQGoiAyQAAkAgElBFBEAgAEEIaiECIBK6IRoDQEF/IQEgACgCACADIBJCgMAAIBJCgMAAVBsiEyACEGVBAEgNAiAAIAMgExAbQQBIDQIgACgCVCAaIBIgE30iErqhIBqjEHsgEkIAUg0ACwtBACEBCyADQYBAayQAIAFBf0oNAUEBIREgAUEcdkEIcUEIRgwCCyAEBEAgBEEANgIEIARBDjYCAAsMBAtBAAtFDQELCyARDQBBfyECAkAgACgCABAfQgBTDQAgFyEUQQAhCkIAIRcjAEHwAGsiESQAAkAgACgCABAfIhVCAFkEQCAUUEUEQANAIAAgACgCQCALIBenQQN0aigCAEEEdGoiAygCBCIBBH8gAQUgAygCAAtBgAQQNyIBQQBIBEBCfyEXDAQLIAFBAEcgCnIhCiAXQgF8IhcgFFINAAsLQn8hFyAAKAIAEB8iGEJ/VwRAIAAoAgAhASAAQQhqBEAgACABKAIMNgIIIAAgASgCEDYCDAsMAgsgEULiABAXIgZFBEAgAEEIagRAIABBADYCDCAAQQ42AggLDAILIBggFX0hEyAVQv////8PViAUQv//A1ZyIApyQQFxBEAgBkGZEkEEECwgBkIsEBggBkEtEA0gBkEtEA0gBkEAEBIgBkEAEBIgBiAUEBggBiAUEBggBiATEBggBiAVEBggBkGUEkEEECwgBkEAEBIgBiAYEBggBkEBEBILIAZBnhJBBBAsIAZBABASIAYgFEL//wMgFEL//wNUG6dB//8DcSIBEA0gBiABEA0gBkF/IBOnIBNC/v///w9WGxASIAZBfyAVpyAVQv7///8PVhsQEiAGIABBJEEgIAAtACgbaigCACIDBH8gAy8BBAVBAAtB//8DcRANIAYtAABFBEAgAEEIagRAIABBADYCDCAAQRQ2AggLIAYQCAwCCyAAIAYoAgQgBi0AAAR+IAYpAxAFQgALEBshASAGEAggAUEASA0BIAMEQCAAIAMoAgAgAzMBBBAbQQBIDQILIBMhFwwBCyAAKAIAIQEgAEEIagRAIAAgASgCDDYCCCAAIAEoAhA2AgwLQn8hFwsgEUHwAGokACAXQgBTDQAgACgCABAfQj+HpyECCyALEAYgAkEASA0BAn8gACgCACIBKAIkQQFHBEAgAUEMagRAIAFBADYCECABQRI2AgwLQX8MAQsgASgCICICQQJPBEAgAUEMagRAIAFBADYCECABQR02AgwLQX8MAQsCQCACQQFHDQAgARAaQQBODQBBfwwBCyABQQBCAEEJEA5Cf1cEQCABQQI2AiRBfwwBCyABQQA2AiRBAAtFDQIgACgCACECIAQEQCAEIAIoAgw2AgAgBCACKAIQNgIECwwBCyALEAYLIAAoAlQQfCAAKAIAEENBfyECDAILIAAoAlQQfAsgABBLQQAhAgsgB0HAwABqJAAgAgtFAEHwgwFCADcDAEHogwFCADcDAEHggwFCADcDAEHYgwFCADcDAEHQgwFCADcDAEHIgwFCADcDAEHAgwFCADcDAEHAgwELoQMBCH8jAEGgAWsiAiQAIAAQMQJAAn8CQCAAKAIAIgFBAE4EQCABQbATKAIASA0BCyACIAE2AhAgAkEgakH2ESACQRBqEHZBASEGIAJBIGohBCACQSBqECIhA0EADAELIAFBAnQiAUGwEmooAgAhBQJ/AkACQCABQcATaigCAEEBaw4CAAEECyAAKAIEIQNB9IIBKAIAIQdBACEBAkACQANAIAMgAUHQ8QBqLQAARwRAQdcAIQQgAUEBaiIBQdcARw0BDAILCyABIgQNAEGw8gAhAwwBC0Gw8gAhAQNAIAEtAAAhCCABQQFqIgMhASAIDQAgAyEBIARBAWsiBA0ACwsgBygCFBogAwwBC0EAIAAoAgRrQQJ0QdjAAGooAgALIgRFDQEgBBAiIQMgBUUEQEEAIQVBASEGQQAMAQsgBRAiQQJqCyEBIAEgA2pBAWoQCSIBRQRAQegSKAIAIQUMAQsgAiAENgIIIAJBrBJBkRIgBhs2AgQgAkGsEiAFIAYbNgIAIAFBqwogAhB2IAAgATYCCCABIQULIAJBoAFqJAAgBQszAQF/IAAoAhQiAyABIAIgACgCECADayIBIAEgAksbIgEQBxogACAAKAIUIAFqNgIUIAILBgBBsIgBCwYAQayIAQsGAEGkiAELBwAgAEEEagsHACAAQQhqCyYBAX8gACgCFCIBBEAgARALCyAAKAIEIQEgAEEEahAxIAAQBiABC6kBAQN/AkAgAC0AACICRQ0AA0AgAS0AACIERQRAIAIhAwwCCwJAIAIgBEYNACACQSByIAIgAkHBAGtBGkkbIAEtAAAiAkEgciACIAJBwQBrQRpJG0YNACAALQAAIQMMAgsgAUEBaiEBIAAtAAEhAiAAQQFqIQAgAg0ACwsgA0H/AXEiAEEgciAAIABBwQBrQRpJGyABLQAAIgBBIHIgACAAQcEAa0EaSRtrC8sGAgJ+An8jAEHgAGsiByQAAkACQAJAAkACQAJAAkACQAJAAkACQCAEDg8AAQoCAwQGBwgICAgICAUICyABQgA3AyAMCQsgACACIAMQESIFQn9XBEAgAUEIaiIBBEAgASAAKAIMNgIAIAEgACgCEDYCBAsMCAsCQCAFUARAIAEpAygiAyABKQMgUg0BIAEgAzcDGCABQQE2AgQgASgCAEUNASAAIAdBKGoQIUF/TARAIAFBCGoiAQRAIAEgACgCDDYCACABIAAoAhA2AgQLDAoLAkAgBykDKCIDQiCDUA0AIAcoAlQgASgCMEYNACABQQhqBEAgAUEANgIMIAFBBzYCCAsMCgsgA0IEg1ANASAHKQNAIAEpAxhRDQEgAUEIagRAIAFBADYCDCABQRU2AggLDAkLIAEoAgQNACABKQMoIgMgASkDICIGVA0AIAUgAyAGfSIDWA0AIAEoAjAhBANAIAECfyAFIAN9IgZC/////w8gBkL/////D1QbIganIQBBACACIAOnaiIIRQ0AGiAEIAggAEHUgAEoAgARAAALIgQ2AjAgASABKQMoIAZ8NwMoIAUgAyAGfCIDVg0ACwsgASABKQMgIAV8NwMgDAgLIAEoAgRFDQcgAiABKQMYIgM3AxggASgCMCEAIAJBADYCMCACIAM3AyAgAiAANgIsIAIgAikDAELsAYQ3AwAMBwsgA0IIWgR+IAIgASgCCDYCACACIAEoAgw2AgRCCAVCfwshBQwGCyABEAYMBQtCfyEFIAApAxgiA0J/VwRAIAFBCGoiAQRAIAEgACgCDDYCACABIAAoAhA2AgQLDAULIAdBfzYCGCAHQo+AgICAAjcDECAHQoyAgIDQATcDCCAHQomAgICgATcDACADQQggBxAkQn+FgyEFDAQLIANCD1gEQCABQQhqBEAgAUEANgIMIAFBEjYCCAsMAwsgAkUNAgJAIAAgAikDACACKAIIEBRBAE4EQCAAEDMiA0J/VQ0BCyABQQhqIgEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwDCyABIAM3AyAMAwsgASkDICEFDAILIAFBCGoEQCABQQA2AgwgAUEcNgIICwtCfyEFCyAHQeAAaiQAIAULjAcCAn4CfyMAQRBrIgckAAJAAkACQAJAAkACQAJAAkACQAJAIAQOEQABAgMFBggICAgICAgIBwgECAsgAUJ/NwMgIAFBADoADyABQQA7AQwgAUIANwMYIAEoAqxAIAEoAqhAKAIMEQEArUIBfSEFDAgLQn8hBSABKAIADQdCACEFIANQDQcgAS0ADQ0HIAFBKGohBAJAA0ACQCAHIAMgBX03AwggASgCrEAgAiAFp2ogB0EIaiABKAKoQCgCHBEAACEIQgAgBykDCCAIQQJGGyAFfCEFAkACQAJAIAhBAWsOAwADAQILIAFBAToADSABKQMgIgNCf1cEQCABBEAgAUEANgIEIAFBFDYCAAsMBQsgAS0ADkUNBCADIAVWDQQgASADNwMYIAFBAToADyACIAQgA6cQBxogASkDGCEFDAwLIAEtAAwNAyAAIARCgMAAEBEiBkJ/VwRAIAEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwECyAGUARAIAFBAToADCABKAKsQCABKAKoQCgCGBEDACABKQMgQn9VDQEgAUIANwMgDAELAkAgASkDIEIAWQRAIAFBADoADgwBCyABIAY3AyALIAEoAqxAIAQgBiABKAKoQCgCFBEPABoLIAMgBVYNAQwCCwsgASgCAA0AIAEEQCABQQA2AgQgAUEUNgIACwsgBVBFBEAgAUEAOgAOIAEgASkDGCAFfDcDGAwIC0J/QgAgASgCABshBQwHCyABKAKsQCABKAKoQCgCEBEBAK1CAX0hBQwGCyABLQAQBEAgAS0ADQRAIAIgAS0ADwR/QQAFQQggASgCFCIAIABBfUsbCzsBMCACIAEpAxg3AyAgAiACKQMAQsgAhDcDAAwHCyACIAIpAwBCt////w+DNwMADAYLIAJBADsBMCACKQMAIQMgAS0ADQRAIAEpAxghBSACIANCxACENwMAIAIgBTcDGEIAIQUMBgsgAiADQrv///8Pg0LAAIQ3AwAMBQsgAS0ADw0EIAEoAqxAIAEoAqhAKAIIEQEArCEFDAQLIANCCFoEfiACIAEoAgA2AgAgAiABKAIENgIEQggFQn8LIQUMAwsgAUUNAiABKAKsQCABKAKoQCgCBBEDACABEDEgARAGDAILIAdBfzYCAEEQIAcQJEI/hCEFDAELIAEEQCABQQA2AgQgAUEUNgIAC0J/IQULIAdBEGokACAFC2MAQcgAEAkiAEUEQEGEhAEoAgAhASACBEAgAiABNgIEIAJBATYCAAsgAA8LIABBADoADCAAQQA6AAQgACACNgIAIABBADYCOCAAQgA3AzAgACABQQkgAUEBa0EJSRs2AgggAAu3fAIefwZ+IAIpAwAhIiAAIAE2AhwgACAiQv////8PICJC/////w9UGz4CICAAQRBqIQECfyAALQAEBEACfyAALQAMQQJ0IQpBfiEEAkACQAJAIAEiBUUNACAFKAIgRQ0AIAUoAiRFDQAgBSgCHCIDRQ0AIAMoAgAgBUcNAAJAAkAgAygCICIGQTlrDjkBAgICAgICAgICAgIBAgICAQICAgICAgICAgICAgICAgICAQICAgICAgICAgICAQICAgICAgICAgEACyAGQZoFRg0AIAZBKkcNAQsgCkEFSw0AAkACQCAFKAIMRQ0AIAUoAgQiAQRAIAUoAgBFDQELIAZBmgVHDQEgCkEERg0BCyAFQeDAACgCADYCGEF+DAQLIAUoAhBFDQEgAygCJCEEIAMgCjYCJAJAIAMoAhAEQCADEDACQCAFKAIQIgYgAygCECIIIAYgCEkbIgFFDQAgBSgCDCADKAIIIAEQBxogBSAFKAIMIAFqNgIMIAMgAygCCCABajYCCCAFIAUoAhQgAWo2AhQgBSAFKAIQIAFrIgY2AhAgAyADKAIQIAFrIgg2AhAgCA0AIAMgAygCBDYCCEEAIQgLIAYEQCADKAIgIQYMAgsMBAsgAQ0AIApBAXRBd0EAIApBBEsbaiAEQQF0QXdBACAEQQRKG2pKDQAgCkEERg0ADAILAkACQAJAAkACQCAGQSpHBEAgBkGaBUcNASAFKAIERQ0DDAcLIAMoAhRFBEAgA0HxADYCIAwCCyADKAI0QQx0QYDwAWshBAJAIAMoAowBQQJODQAgAygCiAEiAUEBTA0AIAFBBUwEQCAEQcAAciEEDAELQYABQcABIAFBBkYbIARyIQQLIAMoAgQgCGogBEEgciAEIAMoAmgbIgFBH3AgAXJBH3NBCHQgAUGA/gNxQQh2cjsAACADIAMoAhBBAmoiATYCECADKAJoBEAgAygCBCABaiAFKAIwIgFBGHQgAUEIdEGAgPwHcXIgAUEIdkGA/gNxIAFBGHZycjYAACADIAMoAhBBBGo2AhALIAVBATYCMCADQfEANgIgIAUQCiADKAIQDQcgAygCICEGCwJAAkACQAJAIAZBOUYEfyADQaABakHkgAEoAgARAQAaIAMgAygCECIBQQFqNgIQIAEgAygCBGpBHzoAACADIAMoAhAiAUEBajYCECABIAMoAgRqQYsBOgAAIAMgAygCECIBQQFqNgIQIAEgAygCBGpBCDoAAAJAIAMoAhwiAUUEQCADKAIEIAMoAhBqQQA2AAAgAyADKAIQIgFBBWo2AhAgASADKAIEakEAOgAEQQIhBCADKAKIASIBQQlHBEBBBCABQQJIQQJ0IAMoAowBQQFKGyEECyADIAMoAhAiAUEBajYCECABIAMoAgRqIAQ6AAAgAyADKAIQIgFBAWo2AhAgASADKAIEakEDOgAAIANB8QA2AiAgBRAKIAMoAhBFDQEMDQsgASgCJCELIAEoAhwhCSABKAIQIQggASgCLCENIAEoAgAhBiADIAMoAhAiAUEBajYCEEECIQQgASADKAIEaiANQQBHQQF0IAZBAEdyIAhBAEdBAnRyIAlBAEdBA3RyIAtBAEdBBHRyOgAAIAMoAgQgAygCEGogAygCHCgCBDYAACADIAMoAhAiDUEEaiIGNgIQIAMoAogBIgFBCUcEQEEEIAFBAkhBAnQgAygCjAFBAUobIQQLIAMgDUEFajYCECADKAIEIAZqIAQ6AAAgAygCHCgCDCEEIAMgAygCECIBQQFqNgIQIAEgAygCBGogBDoAACADKAIcIgEoAhAEfyADKAIEIAMoAhBqIAEoAhQ7AAAgAyADKAIQQQJqNgIQIAMoAhwFIAELKAIsBEAgBQJ/IAUoAjAhBiADKAIQIQRBACADKAIEIgFFDQAaIAYgASAEQdSAASgCABEAAAs2AjALIANBxQA2AiAgA0EANgIYDAILIAMoAiAFIAYLQcUAaw4jAAQEBAEEBAQEBAQEBAQEBAQEBAQEBAIEBAQEBAQEBAQEBAMECyADKAIcIgEoAhAiBgRAIAMoAgwiCCADKAIQIgQgAS8BFCADKAIYIg1rIglqSQRAA0AgAygCBCAEaiAGIA1qIAggBGsiCBAHGiADIAMoAgwiDTYCEAJAIAMoAhwoAixFDQAgBCANTw0AIAUCfyAFKAIwIQZBACADKAIEIARqIgFFDQAaIAYgASANIARrQdSAASgCABEAAAs2AjALIAMgAygCGCAIajYCGCAFKAIcIgYQMAJAIAUoAhAiBCAGKAIQIgEgASAESxsiAUUNACAFKAIMIAYoAgggARAHGiAFIAUoAgwgAWo2AgwgBiAGKAIIIAFqNgIIIAUgBSgCFCABajYCFCAFIAUoAhAgAWs2AhAgBiAGKAIQIAFrIgE2AhAgAQ0AIAYgBigCBDYCCAsgAygCEA0MIAMoAhghDSADKAIcKAIQIQZBACEEIAkgCGsiCSADKAIMIghLDQALCyADKAIEIARqIAYgDWogCRAHGiADIAMoAhAgCWoiDTYCEAJAIAMoAhwoAixFDQAgBCANTw0AIAUCfyAFKAIwIQZBACADKAIEIARqIgFFDQAaIAYgASANIARrQdSAASgCABEAAAs2AjALIANBADYCGAsgA0HJADYCIAsgAygCHCgCHARAIAMoAhAiBCEJA0ACQCAEIAMoAgxHDQACQCADKAIcKAIsRQ0AIAQgCU0NACAFAn8gBSgCMCEGQQAgAygCBCAJaiIBRQ0AGiAGIAEgBCAJa0HUgAEoAgARAAALNgIwCyAFKAIcIgYQMAJAIAUoAhAiBCAGKAIQIgEgASAESxsiAUUNACAFKAIMIAYoAgggARAHGiAFIAUoAgwgAWo2AgwgBiAGKAIIIAFqNgIIIAUgBSgCFCABajYCFCAFIAUoAhAgAWs2AhAgBiAGKAIQIAFrIgE2AhAgAQ0AIAYgBigCBDYCCAtBACEEQQAhCSADKAIQRQ0ADAsLIAMoAhwoAhwhBiADIAMoAhgiAUEBajYCGCABIAZqLQAAIQEgAyAEQQFqNgIQIAMoAgQgBGogAToAACABBEAgAygCECEEDAELCwJAIAMoAhwoAixFDQAgAygCECIGIAlNDQAgBQJ/IAUoAjAhBEEAIAMoAgQgCWoiAUUNABogBCABIAYgCWtB1IABKAIAEQAACzYCMAsgA0EANgIYCyADQdsANgIgCwJAIAMoAhwoAiRFDQAgAygCECIEIQkDQAJAIAQgAygCDEcNAAJAIAMoAhwoAixFDQAgBCAJTQ0AIAUCfyAFKAIwIQZBACADKAIEIAlqIgFFDQAaIAYgASAEIAlrQdSAASgCABEAAAs2AjALIAUoAhwiBhAwAkAgBSgCECIEIAYoAhAiASABIARLGyIBRQ0AIAUoAgwgBigCCCABEAcaIAUgBSgCDCABajYCDCAGIAYoAgggAWo2AgggBSAFKAIUIAFqNgIUIAUgBSgCECABazYCECAGIAYoAhAgAWsiATYCECABDQAgBiAGKAIENgIIC0EAIQRBACEJIAMoAhBFDQAMCgsgAygCHCgCJCEGIAMgAygCGCIBQQFqNgIYIAEgBmotAAAhASADIARBAWo2AhAgAygCBCAEaiABOgAAIAEEQCADKAIQIQQMAQsLIAMoAhwoAixFDQAgAygCECIGIAlNDQAgBQJ/IAUoAjAhBEEAIAMoAgQgCWoiAUUNABogBCABIAYgCWtB1IABKAIAEQAACzYCMAsgA0HnADYCIAsCQCADKAIcKAIsBEAgAygCDCADKAIQIgFBAmpJBH8gBRAKIAMoAhANAkEABSABCyADKAIEaiAFKAIwOwAAIAMgAygCEEECajYCECADQaABakHkgAEoAgARAQAaCyADQfEANgIgIAUQCiADKAIQRQ0BDAcLDAYLIAUoAgQNAQsgAygCPA0AIApFDQEgAygCIEGaBUYNAQsCfyADKAKIASIBRQRAIAMgChCFAQwBCwJAAkACQCADKAKMAUECaw4CAAECCwJ/AkADQAJAAkAgAygCPA0AIAMQLyADKAI8DQAgCg0BQQAMBAsgAygCSCADKAJoai0AACEEIAMgAygC8C0iAUEBajYC8C0gASADKALsLWpBADoAACADIAMoAvAtIgFBAWo2AvAtIAEgAygC7C1qQQA6AAAgAyADKALwLSIBQQFqNgLwLSABIAMoAuwtaiAEOgAAIAMgBEECdGoiASABLwHkAUEBajsB5AEgAyADKAI8QQFrNgI8IAMgAygCaEEBaiIBNgJoIAMoAvAtIAMoAvQtRw0BQQAhBCADIAMoAlgiBkEATgR/IAMoAkggBmoFQQALIAEgBmtBABAPIAMgAygCaDYCWCADKAIAEAogAygCACgCEA0BDAILCyADQQA2AoQuIApBBEYEQCADIAMoAlgiAUEATgR/IAMoAkggAWoFQQALIAMoAmggAWtBARAPIAMgAygCaDYCWCADKAIAEApBA0ECIAMoAgAoAhAbDAILIAMoAvAtBEBBACEEIAMgAygCWCIBQQBOBH8gAygCSCABagVBAAsgAygCaCABa0EAEA8gAyADKAJoNgJYIAMoAgAQCiADKAIAKAIQRQ0BC0EBIQQLIAQLDAILAn8CQANAAkACQAJAAkACQCADKAI8Ig1BggJLDQAgAxAvAkAgAygCPCINQYICSw0AIAoNAEEADAgLIA1FDQQgDUECSw0AIAMoAmghCAwBCyADKAJoIghFBEBBACEIDAELIAMoAkggCGoiAUEBayIELQAAIgYgAS0AAEcNACAGIAQtAAJHDQAgBEEDaiEEQQAhCQJAA0AgBiAELQAARw0BIAQtAAEgBkcEQCAJQQFyIQkMAgsgBC0AAiAGRwRAIAlBAnIhCQwCCyAELQADIAZHBEAgCUEDciEJDAILIAQtAAQgBkcEQCAJQQRyIQkMAgsgBC0ABSAGRwRAIAlBBXIhCQwCCyAELQAGIAZHBEAgCUEGciEJDAILIAQtAAcgBkcEQCAJQQdyIQkMAgsgBEEIaiEEIAlB+AFJIQEgCUEIaiEJIAENAAtBgAIhCQtBggIhBCANIAlBAmoiASABIA1LGyIBQYECSw0BIAEiBEECSw0BCyADKAJIIAhqLQAAIQQgAyADKALwLSIBQQFqNgLwLSABIAMoAuwtakEAOgAAIAMgAygC8C0iAUEBajYC8C0gASADKALsLWpBADoAACADIAMoAvAtIgFBAWo2AvAtIAEgAygC7C1qIAQ6AAAgAyAEQQJ0aiIBIAEvAeQBQQFqOwHkASADIAMoAjxBAWs2AjwgAyADKAJoQQFqIgQ2AmgMAQsgAyADKALwLSIBQQFqNgLwLSABIAMoAuwtakEBOgAAIAMgAygC8C0iAUEBajYC8C0gASADKALsLWpBADoAACADIAMoAvAtIgFBAWo2AvAtIAEgAygC7C1qIARBA2s6AAAgAyADKAKALkEBajYCgC4gBEH9zgBqLQAAQQJ0IANqQegJaiIBIAEvAQBBAWo7AQAgA0GAywAtAABBAnRqQdgTaiIBIAEvAQBBAWo7AQAgAyADKAI8IARrNgI8IAMgAygCaCAEaiIENgJoCyADKALwLSADKAL0LUcNAUEAIQggAyADKAJYIgFBAE4EfyADKAJIIAFqBUEACyAEIAFrQQAQDyADIAMoAmg2AlggAygCABAKIAMoAgAoAhANAQwCCwsgA0EANgKELiAKQQRGBEAgAyADKAJYIgFBAE4EfyADKAJIIAFqBUEACyADKAJoIAFrQQEQDyADIAMoAmg2AlggAygCABAKQQNBAiADKAIAKAIQGwwCCyADKALwLQRAQQAhCCADIAMoAlgiAUEATgR/IAMoAkggAWoFQQALIAMoAmggAWtBABAPIAMgAygCaDYCWCADKAIAEAogAygCACgCEEUNAQtBASEICyAICwwBCyADIAogAUEMbEG42ABqKAIAEQIACyIBQX5xQQJGBEAgA0GaBTYCIAsgAUF9cUUEQEEAIQQgBSgCEA0CDAQLIAFBAUcNAAJAAkACQCAKQQFrDgUAAQEBAgELIAMpA5guISICfwJ+IAMoAqAuIgFBA2oiCUE/TQRAQgIgAa2GICKEDAELIAFBwABGBEAgAygCBCADKAIQaiAiNwAAIAMgAygCEEEIajYCEEICISJBCgwCCyADKAIEIAMoAhBqQgIgAa2GICKENwAAIAMgAygCEEEIajYCECABQT1rIQlCAkHAACABa62ICyEiIAlBB2ogCUE5SQ0AGiADKAIEIAMoAhBqICI3AAAgAyADKAIQQQhqNgIQQgAhIiAJQTlrCyEBIAMgIjcDmC4gAyABNgKgLiADEDAMAQsgA0EAQQBBABA5IApBA0cNACADKAJQQQBBgIAIEBkgAygCPA0AIANBADYChC4gA0EANgJYIANBADYCaAsgBRAKIAUoAhANAAwDC0EAIQQgCkEERw0AAkACfwJAAkAgAygCFEEBaw4CAQADCyAFIANBoAFqQeCAASgCABEBACIBNgIwIAMoAgQgAygCEGogATYAACADIAMoAhBBBGoiATYCECADKAIEIAFqIQQgBSgCCAwBCyADKAIEIAMoAhBqIQQgBSgCMCIBQRh0IAFBCHRBgID8B3FyIAFBCHZBgP4DcSABQRh2cnILIQEgBCABNgAAIAMgAygCEEEEajYCEAsgBRAKIAMoAhQiAUEBTgRAIANBACABazYCFAsgAygCEEUhBAsgBAwCCyAFQezAACgCADYCGEF7DAELIANBfzYCJEEACwwBCyMAQRBrIhQkAEF+IRcCQCABIgxFDQAgDCgCIEUNACAMKAIkRQ0AIAwoAhwiB0UNACAHKAIAIAxHDQAgBygCBCIIQbT+AGtBH0sNACAMKAIMIhBFDQAgDCgCACIBRQRAIAwoAgQNAQsgCEG//gBGBEAgB0HA/gA2AgRBwP4AIQgLIAdBpAFqIR8gB0G8BmohGSAHQbwBaiEcIAdBoAFqIR0gB0G4AWohGiAHQfwKaiEYIAdBQGshHiAHKAKIASEFIAwoAgQiICEGIAcoAoQBIQogDCgCECIPIRYCfwJAAkACQANAAkBBfSEEQQEhCQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAhBtP4Aaw4fBwYICQolJicoBSwtLQsZGgQMAjIzATUANw0OAzlISUwLIAcoApQBIQMgASEEIAYhCAw1CyAHKAKUASEDIAEhBCAGIQgMMgsgBygCtAEhCAwuCyAHKAIMIQgMQQsgBUEOTw0pIAZFDUEgBUEIaiEIIAFBAWohBCAGQQFrIQkgAS0AACAFdCAKaiEKIAVBBkkNDCAEIQEgCSEGIAghBQwpCyAFQSBPDSUgBkUNQCABQQFqIQQgBkEBayEIIAEtAAAgBXQgCmohCiAFQRhJDQ0gBCEBIAghBgwlCyAFQRBPDRUgBkUNPyAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEISQ0NIAQhASAJIQYgCCEFDBULIAcoAgwiC0UNByAFQRBPDSIgBkUNPiAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEISQ0NIAQhASAJIQYgCCEFDCILIAVBH0sNFQwUCyAFQQ9LDRYMFQsgBygCFCIEQYAIcUUEQCAFIQgMFwsgCiEIIAVBD0sNGAwXCyAKIAVBB3F2IQogBUF4cSIFQR9LDQwgBkUNOiAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEYSQ0GIAQhASAJIQYgCCEFDAwLIAcoArQBIgggBygCqAEiC08NIwwiCyAPRQ0qIBAgBygCjAE6AAAgB0HI/gA2AgQgD0EBayEPIBBBAWohECAHKAIEIQgMOQsgBygCDCIDRQRAQQAhCAwJCyAFQR9LDQcgBkUNNyAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEYSQ0BIAQhASAJIQYgCCEFDAcLIAdBwP4ANgIEDCoLIAlFBEAgBCEBQQAhBiAIIQUgDSEEDDgLIAVBEGohCSABQQJqIQQgBkECayELIAEtAAEgCHQgCmohCiAFQQ9LBEAgBCEBIAshBiAJIQUMBgsgC0UEQCAEIQFBACEGIAkhBSANIQQMOAsgBUEYaiEIIAFBA2ohBCAGQQNrIQsgAS0AAiAJdCAKaiEKIAVBB0sEQCAEIQEgCyEGIAghBQwGCyALRQRAIAQhAUEAIQYgCCEFIA0hBAw4CyAFQSBqIQUgBkEEayEGIAEtAAMgCHQgCmohCiABQQRqIQEMBQsgCUUEQCAEIQFBACEGIAghBSANIQQMNwsgBUEQaiEFIAZBAmshBiABLQABIAh0IApqIQogAUECaiEBDBwLIAlFBEAgBCEBQQAhBiAIIQUgDSEEDDYLIAVBEGohCSABQQJqIQQgBkECayELIAEtAAEgCHQgCmohCiAFQQ9LBEAgBCEBIAshBiAJIQUMBgsgC0UEQCAEIQFBACEGIAkhBSANIQQMNgsgBUEYaiEIIAFBA2ohBCAGQQNrIQsgAS0AAiAJdCAKaiEKIAUEQCAEIQEgCyEGIAghBQwGCyALRQRAIAQhAUEAIQYgCCEFIA0hBAw2CyAFQSBqIQUgBkEEayEGIAEtAAMgCHQgCmohCiABQQRqIQEMBQsgBUEIaiEJIAhFBEAgBCEBQQAhBiAJIQUgDSEEDDULIAFBAmohBCAGQQJrIQggAS0AASAJdCAKaiEKIAVBD0sEQCAEIQEgCCEGDBgLIAVBEGohCSAIRQRAIAQhAUEAIQYgCSEFIA0hBAw1CyABQQNqIQQgBkEDayEIIAEtAAIgCXQgCmohCiAFQQdLBEAgBCEBIAghBgwYCyAFQRhqIQUgCEUEQCAEIQFBACEGIA0hBAw1CyAGQQRrIQYgAS0AAyAFdCAKaiEKIAFBBGohAQwXCyAJDQYgBCEBQQAhBiAIIQUgDSEEDDMLIAlFBEAgBCEBQQAhBiAIIQUgDSEEDDMLIAVBEGohBSAGQQJrIQYgAS0AASAIdCAKaiEKIAFBAmohAQwUCyAMIBYgD2siCSAMKAIUajYCFCAHIAcoAiAgCWo2AiACQCADQQRxRQ0AIAkEQAJAIBAgCWshBCAMKAIcIggoAhQEQCAIQUBrIAQgCUEAQdiAASgCABEIAAwBCyAIIAgoAhwgBCAJQcCAASgCABEAACIENgIcIAwgBDYCMAsLIAcoAhRFDQAgByAeQeCAASgCABEBACIENgIcIAwgBDYCMAsCQCAHKAIMIghBBHFFDQAgBygCHCAKIApBCHRBgID8B3EgCkEYdHIgCkEIdkGA/gNxIApBGHZyciAHKAIUG0YNACAHQdH+ADYCBCAMQaQMNgIYIA8hFiAHKAIEIQgMMQtBACEKQQAhBSAPIRYLIAdBz/4ANgIEDC0LIApB//8DcSIEIApBf3NBEHZHBEAgB0HR/gA2AgQgDEGOCjYCGCAHKAIEIQgMLwsgB0HC/gA2AgQgByAENgKMAUEAIQpBACEFCyAHQcP+ADYCBAsgBygCjAEiBARAIA8gBiAEIAQgBksbIgQgBCAPSxsiCEUNHiAQIAEgCBAHIQQgByAHKAKMASAIazYCjAEgBCAIaiEQIA8gCGshDyABIAhqIQEgBiAIayEGIAcoAgQhCAwtCyAHQb/+ADYCBCAHKAIEIQgMLAsgBUEQaiEFIAZBAmshBiABLQABIAh0IApqIQogAUECaiEBCyAHIAo2AhQgCkH/AXFBCEcEQCAHQdH+ADYCBCAMQYIPNgIYIAcoAgQhCAwrCyAKQYDAA3EEQCAHQdH+ADYCBCAMQY0JNgIYIAcoAgQhCAwrCyAHKAIkIgQEQCAEIApBCHZBAXE2AgALAkAgCkGABHFFDQAgBy0ADEEEcUUNACAUIAo7AAwgBwJ/IAcoAhwhBUEAIBRBDGoiBEUNABogBSAEQQJB1IABKAIAEQAACzYCHAsgB0G2/gA2AgRBACEFQQAhCgsgBkUNKCABQQFqIQQgBkEBayEIIAEtAAAgBXQgCmohCiAFQRhPBEAgBCEBIAghBgwBCyAFQQhqIQkgCEUEQCAEIQFBACEGIAkhBSANIQQMKwsgAUECaiEEIAZBAmshCCABLQABIAl0IApqIQogBUEPSwRAIAQhASAIIQYMAQsgBUEQaiEJIAhFBEAgBCEBQQAhBiAJIQUgDSEEDCsLIAFBA2ohBCAGQQNrIQggAS0AAiAJdCAKaiEKIAVBB0sEQCAEIQEgCCEGDAELIAVBGGohBSAIRQRAIAQhAUEAIQYgDSEEDCsLIAZBBGshBiABLQADIAV0IApqIQogAUEEaiEBCyAHKAIkIgQEQCAEIAo2AgQLAkAgBy0AFUECcUUNACAHLQAMQQRxRQ0AIBQgCjYADCAHAn8gBygCHCEFQQAgFEEMaiIERQ0AGiAFIARBBEHUgAEoAgARAAALNgIcCyAHQbf+ADYCBEEAIQVBACEKCyAGRQ0mIAFBAWohBCAGQQFrIQggAS0AACAFdCAKaiEKIAVBCE8EQCAEIQEgCCEGDAELIAVBCGohBSAIRQRAIAQhAUEAIQYgDSEEDCkLIAZBAmshBiABLQABIAV0IApqIQogAUECaiEBCyAHKAIkIgQEQCAEIApBCHY2AgwgBCAKQf8BcTYCCAsCQCAHLQAVQQJxRQ0AIActAAxBBHFFDQAgFCAKOwAMIAcCfyAHKAIcIQVBACAUQQxqIgRFDQAaIAUgBEECQdSAASgCABEAAAs2AhwLIAdBuP4ANgIEQQAhCEEAIQVBACEKIAcoAhQiBEGACHENAQsgBygCJCIEBEAgBEEANgIQCyAIIQUMAgsgBkUEQEEAIQYgCCEKIA0hBAwmCyABQQFqIQkgBkEBayELIAEtAAAgBXQgCGohCiAFQQhPBEAgCSEBIAshBgwBCyAFQQhqIQUgC0UEQCAJIQFBACEGIA0hBAwmCyAGQQJrIQYgAS0AASAFdCAKaiEKIAFBAmohAQsgByAKQf//A3EiCDYCjAEgBygCJCIFBEAgBSAINgIUC0EAIQUCQCAEQYAEcUUNACAHLQAMQQRxRQ0AIBQgCjsADCAHAn8gBygCHCEIQQAgFEEMaiIERQ0AGiAIIARBAkHUgAEoAgARAAALNgIcC0EAIQoLIAdBuf4ANgIECyAHKAIUIglBgAhxBEAgBiAHKAKMASIIIAYgCEkbIg4EQAJAIAcoAiQiA0UNACADKAIQIgRFDQAgAygCGCILIAMoAhQgCGsiCE0NACAEIAhqIAEgCyAIayAOIAggDmogC0sbEAcaIAcoAhQhCQsCQCAJQYAEcUUNACAHLQAMQQRxRQ0AIAcCfyAHKAIcIQRBACABRQ0AGiAEIAEgDkHUgAEoAgARAAALNgIcCyAHIAcoAowBIA5rIgg2AowBIAYgDmshBiABIA5qIQELIAgNEwsgB0G6/gA2AgQgB0EANgKMAQsCQCAHLQAVQQhxBEBBACEIIAZFDQQDQCABIAhqLQAAIQMCQCAHKAIkIgtFDQAgCygCHCIERQ0AIAcoAowBIgkgCygCIE8NACAHIAlBAWo2AowBIAQgCWogAzoAAAsgA0EAIAYgCEEBaiIISxsNAAsCQCAHLQAVQQJxRQ0AIActAAxBBHFFDQAgBwJ/IAcoAhwhBEEAIAFFDQAaIAQgASAIQdSAASgCABEAAAs2AhwLIAEgCGohASAGIAhrIQYgA0UNAQwTCyAHKAIkIgRFDQAgBEEANgIcCyAHQbv+ADYCBCAHQQA2AowBCwJAIActABVBEHEEQEEAIQggBkUNAwNAIAEgCGotAAAhAwJAIAcoAiQiC0UNACALKAIkIgRFDQAgBygCjAEiCSALKAIoTw0AIAcgCUEBajYCjAEgBCAJaiADOgAACyADQQAgBiAIQQFqIghLGw0ACwJAIActABVBAnFFDQAgBy0ADEEEcUUNACAHAn8gBygCHCEEQQAgAUUNABogBCABIAhB1IABKAIAEQAACzYCHAsgASAIaiEBIAYgCGshBiADRQ0BDBILIAcoAiQiBEUNACAEQQA2AiQLIAdBvP4ANgIECyAHKAIUIgtBgARxBEACQCAFQQ9LDQAgBkUNHyAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEITwRAIAQhASAJIQYgCCEFDAELIAlFBEAgBCEBQQAhBiAIIQUgDSEEDCILIAVBEGohBSAGQQJrIQYgAS0AASAIdCAKaiEKIAFBAmohAQsCQCAHLQAMQQRxRQ0AIAogBy8BHEYNACAHQdH+ADYCBCAMQdcMNgIYIAcoAgQhCAwgC0EAIQpBACEFCyAHKAIkIgQEQCAEQQE2AjAgBCALQQl2QQFxNgIsCwJAIActAAxBBHFFDQAgC0UNACAHIB5B5IABKAIAEQEAIgQ2AhwgDCAENgIwCyAHQb/+ADYCBCAHKAIEIQgMHgtBACEGDA4LAkAgC0ECcUUNACAKQZ+WAkcNACAHKAIoRQRAIAdBDzYCKAtBACEKIAdBADYCHCAUQZ+WAjsADCAHIBRBDGoiBAR/QQAgBEECQdSAASgCABEAAAVBAAs2AhwgB0G1/gA2AgRBACEFIAcoAgQhCAwdCyAHKAIkIgQEQCAEQX82AjALAkAgC0EBcQRAIApBCHRBgP4DcSAKQQh2akEfcEUNAQsgB0HR/gA2AgQgDEH2CzYCGCAHKAIEIQgMHQsgCkEPcUEIRwRAIAdB0f4ANgIEIAxBgg82AhggBygCBCEIDB0LIApBBHYiBEEPcSIJQQhqIQsgCUEHTUEAIAcoAigiCAR/IAgFIAcgCzYCKCALCyALTxtFBEAgBUEEayEFIAdB0f4ANgIEIAxB+gw2AhggBCEKIAcoAgQhCAwdCyAHQQE2AhxBACEFIAdBADYCFCAHQYACIAl0NgIYIAxBATYCMCAHQb3+AEG//gAgCkGAwABxGzYCBEEAIQogBygCBCEIDBwLIAcgCkEIdEGAgPwHcSAKQRh0ciAKQQh2QYD+A3EgCkEYdnJyIgQ2AhwgDCAENgIwIAdBvv4ANgIEQQAhCkEAIQULIAcoAhBFBEAgDCAPNgIQIAwgEDYCDCAMIAY2AgQgDCABNgIAIAcgBTYCiAEgByAKNgKEAUECIRcMIAsgB0EBNgIcIAxBATYCMCAHQb/+ADYCBAsCfwJAIAcoAghFBEAgBUEDSQ0BIAUMAgsgB0HO/gA2AgQgCiAFQQdxdiEKIAVBeHEhBSAHKAIEIQgMGwsgBkUNGSAGQQFrIQYgAS0AACAFdCAKaiEKIAFBAWohASAFQQhqCyEEIAcgCkEBcTYCCAJAAkACQAJAAkAgCkEBdkEDcUEBaw4DAQIDAAsgB0HB/gA2AgQMAwsgB0Gw2wA2ApgBIAdCiYCAgNAANwOgASAHQbDrADYCnAEgB0HH/gA2AgQMAgsgB0HE/gA2AgQMAQsgB0HR/gA2AgQgDEHXDTYCGAsgBEEDayEFIApBA3YhCiAHKAIEIQgMGQsgByAKQR9xIghBgQJqNgKsASAHIApBBXZBH3EiBEEBajYCsAEgByAKQQp2QQ9xQQRqIgs2AqgBIAVBDmshBSAKQQ52IQogCEEdTUEAIARBHkkbRQRAIAdB0f4ANgIEIAxB6gk2AhggBygCBCEIDBkLIAdBxf4ANgIEQQAhCCAHQQA2ArQBCyAIIQQDQCAFQQJNBEAgBkUNGCAGQQFrIQYgAS0AACAFdCAKaiEKIAVBCGohBSABQQFqIQELIAcgBEEBaiIINgK0ASAHIARBAXRBsOwAai8BAEEBdGogCkEHcTsBvAEgBUEDayEFIApBA3YhCiALIAgiBEsNAAsLIAhBEk0EQEESIAhrIQ1BAyAIa0EDcSIEBEADQCAHIAhBAXRBsOwAai8BAEEBdGpBADsBvAEgCEEBaiEIIARBAWsiBA0ACwsgDUEDTwRAA0AgB0G8AWoiDSAIQQF0IgRBsOwAai8BAEEBdGpBADsBACANIARBsuwAai8BAEEBdGpBADsBACANIARBtOwAai8BAEEBdGpBADsBACANIARBtuwAai8BAEEBdGpBADsBACAIQQRqIghBE0cNAAsLIAdBEzYCtAELIAdBBzYCoAEgByAYNgKYASAHIBg2ArgBQQAhCEEAIBxBEyAaIB0gGRBOIg0EQCAHQdH+ADYCBCAMQfQINgIYIAcoAgQhCAwXCyAHQcb+ADYCBCAHQQA2ArQBQQAhDQsgBygCrAEiFSAHKAKwAWoiESAISwRAQX8gBygCoAF0QX9zIRIgBygCmAEhGwNAIAYhCSABIQsCQCAFIgMgGyAKIBJxIhNBAnRqLQABIg5PBEAgBSEEDAELA0AgCUUNDSALLQAAIAN0IQ4gC0EBaiELIAlBAWshCSADQQhqIgQhAyAEIBsgCiAOaiIKIBJxIhNBAnRqLQABIg5JDQALIAshASAJIQYLAkAgGyATQQJ0ai8BAiIFQQ9NBEAgByAIQQFqIgk2ArQBIAcgCEEBdGogBTsBvAEgBCAOayEFIAogDnYhCiAJIQgMAQsCfwJ/AkACQAJAIAVBEGsOAgABAgsgDkECaiIFIARLBEADQCAGRQ0bIAZBAWshBiABLQAAIAR0IApqIQogAUEBaiEBIARBCGoiBCAFSQ0ACwsgBCAOayEFIAogDnYhBCAIRQRAIAdB0f4ANgIEIAxBvAk2AhggBCEKIAcoAgQhCAwdCyAFQQJrIQUgBEECdiEKIARBA3FBA2ohCSAIQQF0IAdqLwG6AQwDCyAOQQNqIgUgBEsEQANAIAZFDRogBkEBayEGIAEtAAAgBHQgCmohCiABQQFqIQEgBEEIaiIEIAVJDQALCyAEIA5rQQNrIQUgCiAOdiIEQQN2IQogBEEHcUEDagwBCyAOQQdqIgUgBEsEQANAIAZFDRkgBkEBayEGIAEtAAAgBHQgCmohCiABQQFqIQEgBEEIaiIEIAVJDQALCyAEIA5rQQdrIQUgCiAOdiIEQQd2IQogBEH/AHFBC2oLIQlBAAshAyAIIAlqIBFLDRMgCUEBayEEIAlBA3EiCwRAA0AgByAIQQF0aiADOwG8ASAIQQFqIQggCUEBayEJIAtBAWsiCw0ACwsgBEEDTwRAA0AgByAIQQF0aiIEIAM7Ab4BIAQgAzsBvAEgBCADOwHAASAEIAM7AcIBIAhBBGohCCAJQQRrIgkNAAsLIAcgCDYCtAELIAggEUkNAAsLIAcvAbwFRQRAIAdB0f4ANgIEIAxB0Qs2AhggBygCBCEIDBYLIAdBCjYCoAEgByAYNgKYASAHIBg2ArgBQQEgHCAVIBogHSAZEE4iDQRAIAdB0f4ANgIEIAxB2Ag2AhggBygCBCEIDBYLIAdBCTYCpAEgByAHKAK4ATYCnAFBAiAHIAcoAqwBQQF0akG8AWogBygCsAEgGiAfIBkQTiINBEAgB0HR/gA2AgQgDEGmCTYCGCAHKAIEIQgMFgsgB0HH/gA2AgRBACENCyAHQcj+ADYCBAsCQCAGQQ9JDQAgD0GEAkkNACAMIA82AhAgDCAQNgIMIAwgBjYCBCAMIAE2AgAgByAFNgKIASAHIAo2AoQBIAwgFkHogAEoAgARBwAgBygCiAEhBSAHKAKEASEKIAwoAgQhBiAMKAIAIQEgDCgCECEPIAwoAgwhECAHKAIEQb/+AEcNByAHQX82ApBHIAcoAgQhCAwUCyAHQQA2ApBHIAUhCSAGIQggASEEAkAgBygCmAEiEiAKQX8gBygCoAF0QX9zIhVxIg5BAnRqLQABIgsgBU0EQCAFIQMMAQsDQCAIRQ0PIAQtAAAgCXQhCyAEQQFqIQQgCEEBayEIIAlBCGoiAyEJIAMgEiAKIAtqIgogFXEiDkECdGotAAEiC0kNAAsLIBIgDkECdGoiAS8BAiETAkBBACABLQAAIhEgEUHwAXEbRQRAIAshBgwBCyAIIQYgBCEBAkAgAyIFIAsgEiAKQX8gCyARanRBf3MiFXEgC3YgE2oiEUECdGotAAEiDmpPBEAgAyEJDAELA0AgBkUNDyABLQAAIAV0IQ4gAUEBaiEBIAZBAWshBiAFQQhqIgkhBSALIBIgCiAOaiIKIBVxIAt2IBNqIhFBAnRqLQABIg5qIAlLDQALIAEhBCAGIQgLIBIgEUECdGoiAS0AACERIAEvAQIhEyAHIAs2ApBHIAsgDmohBiAJIAtrIQMgCiALdiEKIA4hCwsgByAGNgKQRyAHIBNB//8DcTYCjAEgAyALayEFIAogC3YhCiARRQRAIAdBzf4ANgIEDBALIBFBIHEEQCAHQb/+ADYCBCAHQX82ApBHDBALIBFBwABxBEAgB0HR/gA2AgQgDEHQDjYCGAwQCyAHQcn+ADYCBCAHIBFBD3EiAzYClAELAkAgA0UEQCAHKAKMASELIAQhASAIIQYMAQsgBSEJIAghBiAEIQsCQCADIAVNBEAgBCEBDAELA0AgBkUNDSAGQQFrIQYgCy0AACAJdCAKaiEKIAtBAWoiASELIAlBCGoiCSADSQ0ACwsgByAHKAKQRyADajYCkEcgByAHKAKMASAKQX8gA3RBf3NxaiILNgKMASAJIANrIQUgCiADdiEKCyAHQcr+ADYCBCAHIAs2ApRHCyAFIQkgBiEIIAEhBAJAIAcoApwBIhIgCkF/IAcoAqQBdEF/cyIVcSIOQQJ0ai0AASIDIAVNBEAgBSELDAELA0AgCEUNCiAELQAAIAl0IQMgBEEBaiEEIAhBAWshCCAJQQhqIgshCSALIBIgAyAKaiIKIBVxIg5BAnRqLQABIgNJDQALCyASIA5BAnRqIgEvAQIhEwJAIAEtAAAiEUHwAXEEQCAHKAKQRyEGIAMhCQwBCyAIIQYgBCEBAkAgCyIFIAMgEiAKQX8gAyARanRBf3MiFXEgA3YgE2oiEUECdGotAAEiCWpPBEAgCyEODAELA0AgBkUNCiABLQAAIAV0IQkgAUEBaiEBIAZBAWshBiAFQQhqIg4hBSADIBIgCSAKaiIKIBVxIAN2IBNqIhFBAnRqLQABIglqIA5LDQALIAEhBCAGIQgLIBIgEUECdGoiAS0AACERIAEvAQIhEyAHIAcoApBHIANqIgY2ApBHIA4gA2shCyAKIAN2IQoLIAcgBiAJajYCkEcgCyAJayEFIAogCXYhCiARQcAAcQRAIAdB0f4ANgIEIAxB7A42AhggBCEBIAghBiAHKAIEIQgMEgsgB0HL/gA2AgQgByARQQ9xIgM2ApQBIAcgE0H//wNxNgKQAQsCQCADRQRAIAQhASAIIQYMAQsgBSEJIAghBiAEIQsCQCADIAVNBEAgBCEBDAELA0AgBkUNCCAGQQFrIQYgCy0AACAJdCAKaiEKIAtBAWoiASELIAlBCGoiCSADSQ0ACwsgByAHKAKQRyADajYCkEcgByAHKAKQASAKQX8gA3RBf3NxajYCkAEgCSADayEFIAogA3YhCgsgB0HM/gA2AgQLIA9FDQACfyAHKAKQASIIIBYgD2siBEsEQAJAIAggBGsiCCAHKAIwTQ0AIAcoAoxHRQ0AIAdB0f4ANgIEIAxBuQw2AhggBygCBCEIDBILAn8CQAJ/IAcoAjQiBCAISQRAIAcoAjggBygCLCAIIARrIghragwBCyAHKAI4IAQgCGtqCyILIBAgDyAQaiAQa0EBaqwiISAPIAcoAowBIgQgCCAEIAhJGyIEIAQgD0sbIgitIiIgISAiVBsiIqciCWoiBEkgCyAQT3ENACALIBBNIAkgC2ogEEtxDQAgECALIAkQBxogBAwBCyAQIAsgCyAQayIEIARBH3UiBGogBHMiCRAHIAlqIQQgIiAJrSIkfSIjUEUEQCAJIAtqIQkDQAJAICMgJCAjICRUGyIiQiBUBEAgIiEhDAELICIiIUIgfSImQgWIQgF8QgODIiVQRQRAA0AgBCAJKQAANwAAIAQgCSkAGDcAGCAEIAkpABA3ABAgBCAJKQAINwAIICFCIH0hISAJQSBqIQkgBEEgaiEEICVCAX0iJUIAUg0ACwsgJkLgAFQNAANAIAQgCSkAADcAACAEIAkpABg3ABggBCAJKQAQNwAQIAQgCSkACDcACCAEIAkpADg3ADggBCAJKQAwNwAwIAQgCSkAKDcAKCAEIAkpACA3ACAgBCAJKQBYNwBYIAQgCSkAUDcAUCAEIAkpAEg3AEggBCAJKQBANwBAIAQgCSkAYDcAYCAEIAkpAGg3AGggBCAJKQBwNwBwIAQgCSkAeDcAeCAJQYABaiEJIARBgAFqIQQgIUKAAX0iIUIfVg0ACwsgIUIQWgRAIAQgCSkAADcAACAEIAkpAAg3AAggIUIQfSEhIAlBEGohCSAEQRBqIQQLICFCCFoEQCAEIAkpAAA3AAAgIUIIfSEhIAlBCGohCSAEQQhqIQQLICFCBFoEQCAEIAkoAAA2AAAgIUIEfSEhIAlBBGohCSAEQQRqIQQLICFCAloEQCAEIAkvAAA7AAAgIUICfSEhIAlBAmohCSAEQQJqIQQLICMgIn0hIyAhUEUEQCAEIAktAAA6AAAgCUEBaiEJIARBAWohBAsgI0IAUg0ACwsgBAsMAQsgECAIIA8gBygCjAEiBCAEIA9LGyIIIA9ByIABKAIAEQQACyEQIAcgBygCjAEgCGsiBDYCjAEgDyAIayEPIAQNAiAHQcj+ADYCBCAHKAIEIQgMDwsgDSEJCyAJIQQMDgsgBygCBCEIDAwLIAEgBmohASAFIAZBA3RqIQUMCgsgBCAIaiEBIAUgCEEDdGohBQwJCyAEIAhqIQEgCyAIQQN0aiEFDAgLIAEgBmohASAFIAZBA3RqIQUMBwsgBCAIaiEBIAUgCEEDdGohBQwGCyAEIAhqIQEgAyAIQQN0aiEFDAULIAEgBmohASAFIAZBA3RqIQUMBAsgB0HR/gA2AgQgDEG8CTYCGCAHKAIEIQgMBAsgBCEBIAghBiAHKAIEIQgMAwtBACEGIAQhBSANIQQMAwsCQAJAIAhFBEAgCiEJDAELIAcoAhRFBEAgCiEJDAELAkAgBUEfSw0AIAZFDQMgBUEIaiEJIAFBAWohBCAGQQFrIQsgAS0AACAFdCAKaiEKIAVBGE8EQCAEIQEgCyEGIAkhBQwBCyALRQRAIAQhAUEAIQYgCSEFIA0hBAwGCyAFQRBqIQsgAUECaiEEIAZBAmshAyABLQABIAl0IApqIQogBUEPSwRAIAQhASADIQYgCyEFDAELIANFBEAgBCEBQQAhBiALIQUgDSEEDAYLIAVBGGohCSABQQNqIQQgBkEDayEDIAEtAAIgC3QgCmohCiAFQQdLBEAgBCEBIAMhBiAJIQUMAQsgA0UEQCAEIQFBACEGIAkhBSANIQQMBgsgBUEgaiEFIAZBBGshBiABLQADIAl0IApqIQogAUEEaiEBC0EAIQkgCEEEcQRAIAogBygCIEcNAgtBACEFCyAHQdD+ADYCBEEBIQQgCSEKDAMLIAdB0f4ANgIEIAxBjQw2AhggBygCBCEIDAELC0EAIQYgDSEECyAMIA82AhAgDCAQNgIMIAwgBjYCBCAMIAE2AgAgByAFNgKIASAHIAo2AoQBAkAgBygCLA0AIA8gFkYNAiAHKAIEIgFB0P4ASw0CIAFBzv4ASQ0ACwJ/IBYgD2shCiAHKAIMQQRxIQkCQAJAAkAgDCgCHCIDKAI4Ig1FBEBBASEIIAMgAygCACIBKAIgIAEoAiggAygCmEdBASADKAIodGpBARAoIg02AjggDUUNAQsgAygCLCIGRQRAIANCADcDMCADQQEgAygCKHQiBjYCLAsgBiAKTQRAAkAgCQRAAkAgBiAKTw0AIAogBmshBSAQIAprIQEgDCgCHCIGKAIUBEAgBkFAayABIAVBAEHYgAEoAgARCAAMAQsgBiAGKAIcIAEgBUHAgAEoAgARAAAiATYCHCAMIAE2AjALIAMoAiwiDUUNASAQIA1rIQUgAygCOCEBIAwoAhwiBigCFARAIAZBQGsgASAFIA1B3IABKAIAEQgADAILIAYgBigCHCABIAUgDUHEgAEoAgARBAAiATYCHCAMIAE2AjAMAQsgDSAQIAZrIAYQBxoLIANBADYCNCADIAMoAiw2AjBBAAwECyAKIAYgAygCNCIFayIBIAEgCksbIQsgECAKayEGIAUgDWohBQJAIAkEQAJAIAtFDQAgDCgCHCIBKAIUBEAgAUFAayAFIAYgC0HcgAEoAgARCAAMAQsgASABKAIcIAUgBiALQcSAASgCABEEACIBNgIcIAwgATYCMAsgCiALayIFRQ0BIBAgBWshBiADKAI4IQEgDCgCHCINKAIUBEAgDUFAayABIAYgBUHcgAEoAgARCAAMBQsgDSANKAIcIAEgBiAFQcSAASgCABEEACIBNgIcIAwgATYCMAwECyAFIAYgCxAHGiAKIAtrIgUNAgtBACEIIANBACADKAI0IAtqIgUgBSADKAIsIgFGGzYCNCABIAMoAjAiAU0NACADIAEgC2o2AjALIAgMAgsgAygCOCAQIAVrIAUQBxoLIAMgBTYCNCADIAMoAiw2AjBBAAtFBEAgDCgCECEPIAwoAgQhFyAHKAKIAQwDCyAHQdL+ADYCBAtBfCEXDAILIAYhFyAFCyEFIAwgICAXayIBIAwoAghqNgIIIAwgFiAPayIGIAwoAhRqNgIUIAcgBygCICAGajYCICAMIAcoAghBAEdBBnQgBWogBygCBCIFQb/+AEZBB3RqQYACIAVBwv4ARkEIdCAFQcf+AEYbajYCLCAEIARBeyAEGyABIAZyGyEXCyAUQRBqJAAgFwshASACIAIpAwAgADUCIH03AwACQAJAAkACQCABQQVqDgcBAgICAgMAAgtBAQ8LIAAoAhQNAEEDDwsgACgCACIABEAgACABNgIEIABBDTYCAAtBAiEBCyABCwkAIABBAToADAtEAAJAIAJC/////w9YBEAgACgCFEUNAQsgACgCACIABEAgAEEANgIEIABBEjYCAAtBAA8LIAAgATYCECAAIAI+AhRBAQu5AQEEfyAAQRBqIQECfyAALQAEBEAgARCEAQwBC0F+IQMCQCABRQ0AIAEoAiBFDQAgASgCJCIERQ0AIAEoAhwiAkUNACACKAIAIAFHDQAgAigCBEG0/gBrQR9LDQAgAigCOCIDBEAgBCABKAIoIAMQHiABKAIkIQQgASgCHCECCyAEIAEoAiggAhAeQQAhAyABQQA2AhwLIAMLIgEEQCAAKAIAIgAEQCAAIAE2AgQgAEENNgIACwsgAUUL0gwBBn8gAEIANwIQIABCADcCHCAAQRBqIQICfyAALQAEBEAgACgCCCEBQesMLQAAQTFGBH8Cf0F+IQMCQCACRQ0AIAJBADYCGCACKAIgIgRFBEAgAkEANgIoIAJBJzYCIEEnIQQLIAIoAiRFBEAgAkEoNgIkC0EGIAEgAUF/RhsiBUEASA0AIAVBCUoNAEF8IQMgBCACKAIoQQFB0C4QKCIBRQ0AIAIgATYCHCABIAI2AgAgAUEPNgI0IAFCgICAgKAFNwIcIAFBADYCFCABQYCAAjYCMCABQf//ATYCOCABIAIoAiAgAigCKEGAgAJBAhAoNgJIIAEgAigCICACKAIoIAEoAjBBAhAoIgM2AkwgA0EAIAEoAjBBAXQQGSACKAIgIAIoAihBgIAEQQIQKCEDIAFBgIACNgLoLSABQQA2AkAgASADNgJQIAEgAigCICACKAIoQYCAAkEEECgiAzYCBCABIAEoAugtIgRBAnQ2AgwCQAJAIAEoAkhFDQAgASgCTEUNACABKAJQRQ0AIAMNAQsgAUGaBTYCICACQejAACgCADYCGCACEIQBGkF8DAILIAFBADYCjAEgASAFNgKIASABQgA3AyggASADIARqNgLsLSABIARBA2xBA2s2AvQtQX4hAwJAIAJFDQAgAigCIEUNACACKAIkRQ0AIAIoAhwiAUUNACABKAIAIAJHDQACQAJAIAEoAiAiBEE5aw45AQICAgICAgICAgICAQICAgECAgICAgICAgICAgICAgICAgECAgICAgICAgICAgECAgICAgICAgIBAAsgBEGaBUYNACAEQSpHDQELIAJBAjYCLCACQQA2AgggAkIANwIUIAFBADYCECABIAEoAgQ2AgggASgCFCIDQX9MBEAgAUEAIANrIgM2AhQLIAFBOUEqIANBAkYbNgIgIAIgA0ECRgR/IAFBoAFqQeSAASgCABEBAAVBAQs2AjAgAUF+NgIkIAFBADYCoC4gAUIANwOYLiABQYgXakGg0wA2AgAgASABQcwVajYCgBcgAUH8FmpBjNMANgIAIAEgAUHYE2o2AvQWIAFB8BZqQfjSADYCACABIAFB5AFqNgLoFiABEIgBQQAhAwsgAw0AIAIoAhwiAiACKAIwQQF0NgJEQQAhAyACKAJQQQBBgIAIEBkgAiACKAKIASIEQQxsIgFBtNgAai8BADYClAEgAiABQbDYAGovAQA2ApABIAIgAUGy2ABqLwEANgJ4IAIgAUG22ABqLwEANgJ0QfiAASgCACEFQeyAASgCACEGQYCBASgCACEBIAJCADcCbCACQgA3AmQgAkEANgI8IAJBADYChC4gAkIANwJUIAJBKSABIARBCUYiARs2AnwgAkEqIAYgARs2AoABIAJBKyAFIAEbNgKEAQsgAwsFQXoLDAELAn9BekHrDC0AAEExRw0AGkF+IAJFDQAaIAJBADYCGCACKAIgIgNFBEAgAkEANgIoIAJBJzYCIEEnIQMLIAIoAiRFBEAgAkEoNgIkC0F8IAMgAigCKEEBQaDHABAoIgRFDQAaIAIgBDYCHCAEQQA2AjggBCACNgIAIARBtP4ANgIEIARBzIABKAIAEQkANgKYR0F+IQMCQCACRQ0AIAIoAiBFDQAgAigCJCIFRQ0AIAIoAhwiAUUNACABKAIAIAJHDQAgASgCBEG0/gBrQR9LDQACQAJAIAEoAjgiBgRAIAEoAihBD0cNAQsgAUEPNgIoIAFBADYCDAwBCyAFIAIoAiggBhAeIAFBADYCOCACKAIgIQUgAUEPNgIoIAFBADYCDCAFRQ0BCyACKAIkRQ0AIAIoAhwiAUUNACABKAIAIAJHDQAgASgCBEG0/gBrQR9LDQBBACEDIAFBADYCNCABQgA3AiwgAUEANgIgIAJBADYCCCACQgA3AhQgASgCDCIFBEAgAiAFQQFxNgIwCyABQrT+ADcCBCABQgA3AoQBIAFBADYCJCABQoCAgoAQNwMYIAFCgICAgHA3AxAgAUKBgICAcDcCjEcgASABQfwKaiIFNgK4ASABIAU2ApwBIAEgBTYCmAELQQAgA0UNABogAigCJCACKAIoIAQQHiACQQA2AhwgAwsLIgIEQCAAKAIAIgAEQCAAIAI2AgQgAEENNgIACwsgAkULKQEBfyAALQAERQRAQQAPC0ECIQEgACgCCCIAQQNOBH8gAEEHSgVBAgsLBgAgABAGC2MAQcgAEAkiAEUEQEGEhAEoAgAhASACBEAgAiABNgIEIAJBATYCAAsgAA8LIABBADoADCAAQQE6AAQgACACNgIAIABBADYCOCAAQgA3AzAgACABQQkgAUEBa0EJSRs2AgggAAukCgIIfwF+QfCAAUH0gAEgACgCdEGBCEkbIQYCQANAAkACfwJAIAAoAjxBhQJLDQAgABAvAkAgACgCPCICQYUCSw0AIAENAEEADwsgAkUNAiACQQRPDQBBAAwBCyAAIAAoAmggACgChAERAgALIQMgACAAKAJsOwFgQQIhAgJAIAA1AmggA619IgpCAVMNACAKIAAoAjBBhgJrrVUNACAAKAJwIAAoAnhPDQAgA0UNACAAIAMgBigCABECACICQQVLDQBBAiACIAAoAowBQQFGGyECCwJAIAAoAnAiA0EDSQ0AIAIgA0sNACAAIAAoAvAtIgJBAWo2AvAtIAAoAjwhBCACIAAoAuwtaiAAKAJoIgcgAC8BYEF/c2oiAjoAACAAIAAoAvAtIgVBAWo2AvAtIAUgACgC7C1qIAJBCHY6AAAgACAAKALwLSIFQQFqNgLwLSAFIAAoAuwtaiADQQNrOgAAIAAgACgCgC5BAWo2AoAuIANB/c4Aai0AAEECdCAAakHoCWoiAyADLwEAQQFqOwEAIAAgAkEBayICIAJBB3ZBgAJqIAJBgAJJG0GAywBqLQAAQQJ0akHYE2oiAiACLwEAQQFqOwEAIAAgACgCcCIFQQFrIgM2AnAgACAAKAI8IANrNgI8IAAoAvQtIQggACgC8C0hCSAEIAdqQQNrIgQgACgCaCICSwRAIAAgAkEBaiAEIAJrIgIgBUECayIEIAIgBEkbIAAoAoABEQUAIAAoAmghAgsgAEEANgJkIABBADYCcCAAIAIgA2oiBDYCaCAIIAlHDQJBACECIAAgACgCWCIDQQBOBH8gACgCSCADagVBAAsgBCADa0EAEA8gACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQDQIMAwsgACgCZARAIAAoAmggACgCSGpBAWstAAAhAyAAIAAoAvAtIgRBAWo2AvAtIAQgACgC7C1qQQA6AAAgACAAKALwLSIEQQFqNgLwLSAEIAAoAuwtakEAOgAAIAAgACgC8C0iBEEBajYC8C0gBCAAKALsLWogAzoAACAAIANBAnRqIgMgAy8B5AFBAWo7AeQBIAAoAvAtIAAoAvQtRgRAIAAgACgCWCIDQQBOBH8gACgCSCADagVBAAsgACgCaCADa0EAEA8gACAAKAJoNgJYIAAoAgAQCgsgACACNgJwIAAgACgCaEEBajYCaCAAIAAoAjxBAWs2AjwgACgCACgCEA0CQQAPBSAAQQE2AmQgACACNgJwIAAgACgCaEEBajYCaCAAIAAoAjxBAWs2AjwMAgsACwsgACgCZARAIAAoAmggACgCSGpBAWstAAAhAiAAIAAoAvAtIgNBAWo2AvAtIAMgACgC7C1qQQA6AAAgACAAKALwLSIDQQFqNgLwLSADIAAoAuwtakEAOgAAIAAgACgC8C0iA0EBajYC8C0gAyAAKALsLWogAjoAACAAIAJBAnRqIgIgAi8B5AFBAWo7AeQBIAAoAvAtIAAoAvQtRhogAEEANgJkCyAAIAAoAmgiA0ECIANBAkkbNgKELiABQQRGBEAgACAAKAJYIgFBAE4EfyAAKAJIIAFqBUEACyADIAFrQQEQDyAAIAAoAmg2AlggACgCABAKQQNBAiAAKAIAKAIQGw8LIAAoAvAtBEBBACECIAAgACgCWCIBQQBOBH8gACgCSCABagVBAAsgAyABa0EAEA8gACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQRQ0BC0EBIQILIAIL2BACEH8BfiAAKAKIAUEFSCEOA0ACQAJ/AkACQAJAAn8CQAJAIAAoAjxBhQJNBEAgABAvIAAoAjwiA0GFAksNASABDQFBAA8LIA4NASAIIQMgBSEHIAohDSAGQf//A3FFDQEMAwsgA0UNA0EAIANBBEkNARoLIAAgACgCaEH4gAEoAgARAgALIQZBASECQQAhDSAAKAJoIgOtIAatfSISQgFTDQIgEiAAKAIwQYYCa61VDQIgBkUNAiAAIAZB8IABKAIAEQIAIgZBASAGQfz/A3EbQQEgACgCbCINQf//A3EgA0H//wNxSRshBiADIQcLAkAgACgCPCIEIAZB//8DcSICQQRqTQ0AIAZB//8DcUEDTQRAQQEgBkEBa0H//wNxIglFDQQaIANB//8DcSIEIAdBAWpB//8DcSIDSw0BIAAgAyAJIAQgA2tBAWogAyAJaiAESxtB7IABKAIAEQUADAELAkAgACgCeEEEdCACSQ0AIARBBEkNACAGQQFrQf//A3EiDCAHQQFqQf//A3EiBGohCSAEIANB//8DcSIDTwRAQeyAASgCACELIAMgCUkEQCAAIAQgDCALEQUADAMLIAAgBCADIARrQQFqIAsRBQAMAgsgAyAJTw0BIAAgAyAJIANrQeyAASgCABEFAAwBCyAGIAdqQf//A3EiA0UNACAAIANBAWtB+IABKAIAEQIAGgsgBgwCCyAAIAAoAmgiBUECIAVBAkkbNgKELiABQQRGBEBBACEDIAAgACgCWCIBQQBOBH8gACgCSCABagVBAAsgBSABa0EBEA8gACAAKAJoNgJYIAAoAgAQCkEDQQIgACgCACgCEBsPCyAAKALwLQRAQQAhAkEAIQMgACAAKAJYIgFBAE4EfyAAKAJIIAFqBUEACyAFIAFrQQAQDyAAIAAoAmg2AlggACgCABAKIAAoAgAoAhBFDQMLQQEhAgwCCyADIQdBAQshBEEAIQYCQCAODQAgACgCPEGHAkkNACACIAdB//8DcSIQaiIDIAAoAkRBhgJrTw0AIAAgAzYCaEEAIQogACADQfiAASgCABECACEFAn8CQCAAKAJoIgitIAWtfSISQgFTDQAgEiAAKAIwQYYCa61VDQAgBUUNACAAIAVB8IABKAIAEQIAIQYgAC8BbCIKIAhB//8DcSIFTw0AIAZB//8DcSIDQQRJDQAgCCAEQf//A3FBAkkNARogCCACIApBAWpLDQEaIAggAiAFQQFqSw0BGiAIIAAoAkgiCSACa0EBaiICIApqLQAAIAIgBWotAABHDQEaIAggCUEBayICIApqIgwtAAAgAiAFaiIPLQAARw0BGiAIIAUgCCAAKAIwQYYCayICa0H//wNxQQAgAiAFSRsiEU0NARogCCADQf8BSw0BGiAGIQUgCCECIAQhAyAIIAoiCUECSQ0BGgNAAkAgA0EBayEDIAVBAWohCyAJQQFrIQkgAkEBayECIAxBAWsiDC0AACAPQQFrIg8tAABHDQAgA0H//wNxRQ0AIBEgAkH//wNxTw0AIAVB//8DcUH+AUsNACALIQUgCUH//wNxQQFLDQELCyAIIANB//8DcUEBSw0BGiAIIAtB//8DcUECRg0BGiAIQQFqIQggAyEEIAshBiAJIQogAgwBC0EBIQYgCAshBSAAIBA2AmgLAn8gBEH//wNxIgNBA00EQCAEQf//A3EiA0UNAyAAKAJIIAdB//8DcWotAAAhBCAAIAAoAvAtIgJBAWo2AvAtIAIgACgC7C1qQQA6AAAgACAAKALwLSICQQFqNgLwLSACIAAoAuwtakEAOgAAIAAgACgC8C0iAkEBajYC8C0gAiAAKALsLWogBDoAACAAIARBAnRqIgRB5AFqIAQvAeQBQQFqOwEAIAAgACgCPEEBazYCPCAAKALwLSICIAAoAvQtRiIEIANBAUYNARogACgCSCAHQQFqQf//A3FqLQAAIQkgACACQQFqNgLwLSAAKALsLSACakEAOgAAIAAgACgC8C0iAkEBajYC8C0gAiAAKALsLWpBADoAACAAIAAoAvAtIgJBAWo2AvAtIAIgACgC7C1qIAk6AAAgACAJQQJ0aiICQeQBaiACLwHkAUEBajsBACAAIAAoAjxBAWs2AjwgBCAAKALwLSICIAAoAvQtRmoiBCADQQJGDQEaIAAoAkggB0ECakH//wNxai0AACEHIAAgAkEBajYC8C0gACgC7C0gAmpBADoAACAAIAAoAvAtIgJBAWo2AvAtIAIgACgC7C1qQQA6AAAgACAAKALwLSICQQFqNgLwLSACIAAoAuwtaiAHOgAAIAAgB0ECdGoiB0HkAWogBy8B5AFBAWo7AQAgACAAKAI8QQFrNgI8IAQgACgC8C0gACgC9C1GagwBCyAAIAAoAvAtIgJBAWo2AvAtIAIgACgC7C1qIAdB//8DcSANQf//A3FrIgc6AAAgACAAKALwLSICQQFqNgLwLSACIAAoAuwtaiAHQQh2OgAAIAAgACgC8C0iAkEBajYC8C0gAiAAKALsLWogBEEDazoAACAAIAAoAoAuQQFqNgKALiADQf3OAGotAABBAnQgAGpB6AlqIgQgBC8BAEEBajsBACAAIAdBAWsiBCAEQQd2QYACaiAEQYACSRtBgMsAai0AAEECdGpB2BNqIgQgBC8BAEEBajsBACAAIAAoAjwgA2s2AjwgACgC8C0gACgC9C1GCyEEIAAgACgCaCADaiIHNgJoIARFDQFBACECQQAhBCAAIAAoAlgiA0EATgR/IAAoAkggA2oFQQALIAcgA2tBABAPIAAgACgCaDYCWCAAKAIAEAogACgCACgCEA0BCwsgAgu0BwIEfwF+AkADQAJAAkACQAJAIAAoAjxBhQJNBEAgABAvAkAgACgCPCICQYUCSw0AIAENAEEADwsgAkUNBCACQQRJDQELIAAgACgCaEH4gAEoAgARAgAhAiAANQJoIAKtfSIGQgFTDQAgBiAAKAIwQYYCa61VDQAgAkUNACAAIAJB8IABKAIAEQIAIgJBBEkNACAAIAAoAvAtIgNBAWo2AvAtIAMgACgC7C1qIAAoAmggACgCbGsiAzoAACAAIAAoAvAtIgRBAWo2AvAtIAQgACgC7C1qIANBCHY6AAAgACAAKALwLSIEQQFqNgLwLSAEIAAoAuwtaiACQQNrOgAAIAAgACgCgC5BAWo2AoAuIAJB/c4Aai0AAEECdCAAakHoCWoiBCAELwEAQQFqOwEAIAAgA0EBayIDIANBB3ZBgAJqIANBgAJJG0GAywBqLQAAQQJ0akHYE2oiAyADLwEAQQFqOwEAIAAgACgCPCACayIFNgI8IAAoAvQtIQMgACgC8C0hBCAAKAJ4IAJPQQAgBUEDSxsNASAAIAAoAmggAmoiAjYCaCAAIAJBAWtB+IABKAIAEQIAGiADIARHDQQMAgsgACgCSCAAKAJoai0AACECIAAgACgC8C0iA0EBajYC8C0gAyAAKALsLWpBADoAACAAIAAoAvAtIgNBAWo2AvAtIAMgACgC7C1qQQA6AAAgACAAKALwLSIDQQFqNgLwLSADIAAoAuwtaiACOgAAIAAgAkECdGoiAkHkAWogAi8B5AFBAWo7AQAgACAAKAI8QQFrNgI8IAAgACgCaEEBajYCaCAAKALwLSAAKAL0LUcNAwwBCyAAIAAoAmhBAWoiBTYCaCAAIAUgAkEBayICQeyAASgCABEFACAAIAAoAmggAmo2AmggAyAERw0CC0EAIQNBACECIAAgACgCWCIEQQBOBH8gACgCSCAEagVBAAsgACgCaCAEa0EAEA8gACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQDQEMAgsLIAAgACgCaCIEQQIgBEECSRs2AoQuIAFBBEYEQEEAIQIgACAAKAJYIgFBAE4EfyAAKAJIIAFqBUEACyAEIAFrQQEQDyAAIAAoAmg2AlggACgCABAKQQNBAiAAKAIAKAIQGw8LIAAoAvAtBEBBACEDQQAhAiAAIAAoAlgiAUEATgR/IAAoAkggAWoFQQALIAQgAWtBABAPIAAgACgCaDYCWCAAKAIAEAogACgCACgCEEUNAQtBASEDCyADC80JAgl/An4gAUEERiEGIAAoAiwhAgJAAkACQCABQQRGBEAgAkECRg0CIAIEQCAAQQAQUCAAQQA2AiwgACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQRQ0ECyAAIAYQTyAAQQI2AiwMAQsgAg0BIAAoAjxFDQEgACAGEE8gAEEBNgIsCyAAIAAoAmg2AlgLQQJBASABQQRGGyEKA0ACQCAAKAIMIAAoAhBBCGpLDQAgACgCABAKIAAoAgAiAigCEA0AQQAhAyABQQRHDQIgAigCBA0CIAAoAqAuDQIgACgCLEVBAXQPCwJAAkAgACgCPEGFAk0EQCAAEC8CQCAAKAI8IgNBhQJLDQAgAQ0AQQAPCyADRQ0CIAAoAiwEfyADBSAAIAYQTyAAIAo2AiwgACAAKAJoNgJYIAAoAjwLQQRJDQELIAAgACgCaEH4gAEoAgARAgAhBCAAKAJoIgKtIAStfSILQgFTDQAgCyAAKAIwQYYCa61VDQAgAiAAKAJIIgJqIgMvAAAgAiAEaiICLwAARw0AIANBAmogAkECakHQgAEoAgARAgBBAmoiA0EESQ0AIAAoAjwiAiADIAIgA0kbIgJBggIgAkGCAkkbIgdB/c4Aai0AACICQQJ0IgRBhMkAajMBACEMIARBhskAai8BACEDIAJBCGtBE00EQCAHQQNrIARBgNEAaigCAGutIAOthiAMhCEMIARBsNYAaigCACADaiEDCyAAKAKgLiEFIAMgC6dBAWsiCCAIQQd2QYACaiAIQYACSRtBgMsAai0AACICQQJ0IglBgsoAai8BAGohBCAJQYDKAGozAQAgA62GIAyEIQsgACkDmC4hDAJAIAUgAkEESQR/IAQFIAggCUGA0gBqKAIAa60gBK2GIAuEIQsgCUGw1wBqKAIAIARqCyICaiIDQT9NBEAgCyAFrYYgDIQhCwwBCyAFQcAARgRAIAAoAgQgACgCEGogDDcAACAAIAAoAhBBCGo2AhAgAiEDDAELIAAoAgQgACgCEGogCyAFrYYgDIQ3AAAgACAAKAIQQQhqNgIQIANBQGohAyALQcAAIAVrrYghCwsgACALNwOYLiAAIAM2AqAuIAAgACgCPCAHazYCPCAAIAAoAmggB2o2AmgMAgsgACgCSCAAKAJoai0AAEECdCICQYDBAGozAQAhCyAAKQOYLiEMAkAgACgCoC4iBCACQYLBAGovAQAiAmoiA0E/TQRAIAsgBK2GIAyEIQsMAQsgBEHAAEYEQCAAKAIEIAAoAhBqIAw3AAAgACAAKAIQQQhqNgIQIAIhAwwBCyAAKAIEIAAoAhBqIAsgBK2GIAyENwAAIAAgACgCEEEIajYCECADQUBqIQMgC0HAACAEa62IIQsLIAAgCzcDmC4gACADNgKgLiAAIAAoAmhBAWo2AmggACAAKAI8QQFrNgI8DAELCyAAIAAoAmgiAkECIAJBAkkbNgKELiAAKAIsIQIgAUEERgRAAkAgAkUNACAAQQEQUCAAQQA2AiwgACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQDQBBAg8LQQMPCyACBEBBACEDIABBABBQIABBADYCLCAAIAAoAmg2AlggACgCABAKIAAoAgAoAhBFDQELQQEhAwsgAwucAQEFfyACQQFOBEAgAiAAKAJIIAFqIgNqQQJqIQQgA0ECaiECIAAoAlQhAyAAKAJQIQUDQCAAIAItAAAgA0EFdEHg/wFxcyIDNgJUIAUgA0EBdGoiBi8BACIHIAFB//8DcUcEQCAAKAJMIAEgACgCOHFB//8DcUEBdGogBzsBACAGIAE7AQALIAFBAWohASACQQFqIgIgBEkNAAsLC1sBAn8gACAAKAJIIAFqLQACIAAoAlRBBXRB4P8BcXMiAjYCVCABIAAoAlAgAkEBdGoiAy8BACICRwRAIAAoAkwgACgCOCABcUEBdGogAjsBACADIAE7AQALIAILEwAgAUEFdEHg/wFxIAJB/wFxcwsGACABEAYLLwAjAEEQayIAJAAgAEEMaiABIAJsEIwBIQEgACgCDCECIABBEGokAEEAIAIgARsLjAoCAX4CfyMAQfAAayIGJAACQAJAAkACQAJAAkACQAJAIAQODwABBwIEBQYGBgYGBgYGAwYLQn8hBQJAIAAgBkHkAGpCDBARIgNCf1cEQCABBEAgASAAKAIMNgIAIAEgACgCEDYCBAsMAQsCQCADQgxSBEAgAQRAIAFBADYCBCABQRE2AgALDAELIAEoAhQhBEEAIQJCASEFA0AgBkHkAGogAmoiAiACLQAAIARB/f8DcSICQQJyIAJBA3NsQQh2cyICOgAAIAYgAjoAKCABAn8gASgCDEF/cyECQQAgBkEoaiIERQ0AGiACIARBAUHUgAEoAgARAAALQX9zIgI2AgwgASABKAIQIAJB/wFxakGFiKLAAGxBAWoiAjYCECAGIAJBGHY6ACggAQJ/IAEoAhRBf3MhAkEAIAZBKGoiBEUNABogAiAEQQFB1IABKAIAEQAAC0F/cyIENgIUIAVCDFIEQCAFpyECIAVCAXwhBQwBCwtCACEFIAAgBkEoahAhQQBIDQEgBigCUCEAIwBBEGsiAiQAIAIgADYCDCAGAn8gAkEMahCNASIARQRAIAZBITsBJEEADAELAn8gACgCFCIEQdAATgRAIARBCXQMAQsgAEHQADYCFEGAwAILIQQgBiAAKAIMIAQgACgCEEEFdGpqQaDAAWo7ASQgACgCBEEFdCAAKAIIQQt0aiAAKAIAQQF2ags7ASYgAkEQaiQAIAYtAG8iACAGLQBXRg0BIAYtACcgAEYNASABBEAgAUEANgIEIAFBGzYCAAsLQn8hBQsgBkHwAGokACAFDwtCfyEFIAAgAiADEBEiA0J/VwRAIAEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwGCyMAQRBrIgAkAAJAIANQDQAgASgCFCEEIAJFBEBCASEFA0AgACACIAdqLQAAIARB/f8DcSIEQQJyIARBA3NsQQh2czoADyABAn8gASgCDEF/cyEEQQAgAEEPaiIHRQ0AGiAEIAdBAUHUgAEoAgARAAALQX9zIgQ2AgwgASABKAIQIARB/wFxakGFiKLAAGxBAWoiBDYCECAAIARBGHY6AA8gAQJ/IAEoAhRBf3MhBEEAIABBD2oiB0UNABogBCAHQQFB1IABKAIAEQAAC0F/cyIENgIUIAMgBVENAiAFpyEHIAVCAXwhBQwACwALQgEhBQNAIAAgAiAHai0AACAEQf3/A3EiBEECciAEQQNzbEEIdnMiBDoADyACIAdqIAQ6AAAgAQJ/IAEoAgxBf3MhBEEAIABBD2oiB0UNABogBCAHQQFB1IABKAIAEQAAC0F/cyIENgIMIAEgASgCECAEQf8BcWpBhYiiwABsQQFqIgQ2AhAgACAEQRh2OgAPIAECfyABKAIUQX9zIQRBACAAQQ9qIgdFDQAaIAQgB0EBQdSAASgCABEAAAtBf3MiBDYCFCADIAVRDQEgBachByAFQgF8IQUMAAsACyAAQRBqJAAgAyEFDAULIAJBADsBMiACIAIpAwAiA0KAAYQ3AwAgA0IIg1ANBCACIAIpAyBCDH03AyAMBAsgBkKFgICAcDcDECAGQoOAgIDAADcDCCAGQoGAgIAgNwMAQQAgBhAkIQUMAwsgA0IIWgR+IAIgASgCADYCACACIAEoAgQ2AgRCCAVCfwshBQwCCyABEAYMAQsgAQRAIAFBADYCBCABQRI2AgALQn8hBQsgBkHwAGokACAFC60DAgJ/An4jAEEQayIGJAACQAJAAkAgBEUNACABRQ0AIAJBAUYNAQtBACEDIABBCGoiAARAIABBADYCBCAAQRI2AgALDAELIANBAXEEQEEAIQMgAEEIaiIABEAgAEEANgIEIABBGDYCAAsMAQtBGBAJIgVFBEBBACEDIABBCGoiAARAIABBADYCBCAAQQ42AgALDAELIAVBADYCCCAFQgA3AgAgBUGQ8dmiAzYCFCAFQvis0ZGR8dmiIzcCDAJAIAQQIiICRQ0AIAKtIQhBACEDQYfTru5+IQJCASEHA0AgBiADIARqLQAAOgAPIAUgBkEPaiIDBH8gAiADQQFB1IABKAIAEQAABUEAC0F/cyICNgIMIAUgBSgCECACQf8BcWpBhYiiwABsQQFqIgI2AhAgBiACQRh2OgAPIAUCfyAFKAIUQX9zIQJBACAGQQ9qIgNFDQAaIAIgA0EBQdSAASgCABEAAAtBf3M2AhQgByAIUQ0BIAUoAgxBf3MhAiAHpyEDIAdCAXwhBwwACwALIAAgAUElIAUQQiIDDQAgBRAGQQAhAwsgBkEQaiQAIAMLnRoCBn4FfyMAQdAAayILJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDhQFBhULAwQJDgACCBAKDw0HEQERDBELAkBByAAQCSIBBEAgAUIANwMAIAFCADcDMCABQQA2AiggAUIANwMgIAFCADcDGCABQgA3AxAgAUIANwMIIAFCADcDOCABQQgQCSIDNgIEIAMNASABEAYgAARAIABBADYCBCAAQQ42AgALCyAAQQA2AhQMFAsgA0IANwMAIAAgATYCFCABQUBrQgA3AwAgAUIANwM4DBQLAkACQCACUARAQcgAEAkiA0UNFCADQgA3AwAgA0IANwMwIANBADYCKCADQgA3AyAgA0IANwMYIANCADcDECADQgA3AwggA0IANwM4IANBCBAJIgE2AgQgAQ0BIAMQBiAABEAgAEEANgIEIABBDjYCAAsMFAsgAiAAKAIQIgEpAzBWBEAgAARAIABBADYCBCAAQRI2AgALDBQLIAEoAigEQCAABEAgAEEANgIEIABBHTYCAAsMFAsgASgCBCEDAkAgASkDCCIGQgF9IgdQDQADQAJAIAIgAyAHIAR9QgGIIAR8IgWnQQN0aikDAFQEQCAFQgF9IQcMAQsgBSAGUQRAIAYhBQwDCyADIAVCAXwiBKdBA3RqKQMAIAJWDQILIAQhBSAEIAdUDQALCwJAIAIgAyAFpyIKQQN0aikDAH0iBFBFBEAgASgCACIDIApBBHRqKQMIIQcMAQsgASgCACIDIAVCAX0iBadBBHRqKQMIIgchBAsgAiAHIAR9VARAIAAEQCAAQQA2AgQgAEEcNgIACwwUCyADIAVCAXwiBUEAIAAQiQEiA0UNEyADKAIAIAMoAggiCkEEdGpBCGsgBDcDACADKAIEIApBA3RqIAI3AwAgAyACNwMwIAMgASkDGCIGIAMpAwgiBEIBfSIHIAYgB1QbNwMYIAEgAzYCKCADIAE2AiggASAENwMgIAMgBTcDIAwBCyABQgA3AwALIAAgAzYCFCADIAQ3A0AgAyACNwM4QgAhBAwTCyAAKAIQIgEEQAJAIAEoAigiA0UEQCABKQMYIQIMAQsgA0EANgIoIAEoAihCADcDICABIAEpAxgiAiABKQMgIgUgAiAFVhsiAjcDGAsgASkDCCACVgRAA0AgASgCACACp0EEdGooAgAQBiACQgF8IgIgASkDCFQNAAsLIAEoAgAQBiABKAIEEAYgARAGCyAAKAIUIQEgAEEANgIUIAAgATYCEAwSCyACQghaBH4gASAAKAIANgIAIAEgACgCBDYCBEIIBUJ/CyEEDBELIAAoAhAiAQRAAkAgASgCKCIDRQRAIAEpAxghAgwBCyADQQA2AiggASgCKEIANwMgIAEgASkDGCICIAEpAyAiBSACIAVWGyICNwMYCyABKQMIIAJWBEADQCABKAIAIAKnQQR0aigCABAGIAJCAXwiAiABKQMIVA0ACwsgASgCABAGIAEoAgQQBiABEAYLIAAoAhQiAQRAAkAgASgCKCIDRQRAIAEpAxghAgwBCyADQQA2AiggASgCKEIANwMgIAEgASkDGCICIAEpAyAiBSACIAVWGyICNwMYCyABKQMIIAJWBEADQCABKAIAIAKnQQR0aigCABAGIAJCAXwiAiABKQMIVA0ACwsgASgCABAGIAEoAgQQBiABEAYLIAAQBgwQCyAAKAIQIgBCADcDOCAAQUBrQgA3AwAMDwsgAkJ/VwRAIAAEQCAAQQA2AgQgAEESNgIACwwOCyACIAAoAhAiAykDMCADKQM4IgZ9IgUgAiAFVBsiBVANDiABIAMpA0AiB6ciAEEEdCIBIAMoAgBqIgooAgAgBiADKAIEIABBA3RqKQMAfSICp2ogBSAKKQMIIAJ9IgYgBSAGVBsiBKcQByEKIAcgBCADKAIAIgAgAWopAwggAn1RrXwhAiAFIAZWBEADQCAKIASnaiAAIAKnQQR0IgFqIgAoAgAgBSAEfSIGIAApAwgiByAGIAdUGyIGpxAHGiACIAYgAygCACIAIAFqKQMIUa18IQIgBSAEIAZ8IgRWDQALCyADIAI3A0AgAyADKQM4IAR8NwM4DA4LQn8hBEHIABAJIgNFDQ0gA0IANwMAIANCADcDMCADQQA2AiggA0IANwMgIANCADcDGCADQgA3AxAgA0IANwMIIANCADcDOCADQQgQCSIBNgIEIAFFBEAgAxAGIAAEQCAAQQA2AgQgAEEONgIACwwOCyABQgA3AwAgACgCECIBBEACQCABKAIoIgpFBEAgASkDGCEEDAELIApBADYCKCABKAIoQgA3AyAgASABKQMYIgIgASkDICIFIAIgBVYbIgQ3AxgLIAEpAwggBFYEQANAIAEoAgAgBKdBBHRqKAIAEAYgBEIBfCIEIAEpAwhUDQALCyABKAIAEAYgASgCBBAGIAEQBgsgACADNgIQQgAhBAwNCyAAKAIUIgEEQAJAIAEoAigiA0UEQCABKQMYIQIMAQsgA0EANgIoIAEoAihCADcDICABIAEpAxgiAiABKQMgIgUgAiAFVhsiAjcDGAsgASkDCCACVgRAA0AgASgCACACp0EEdGooAgAQBiACQgF8IgIgASkDCFQNAAsLIAEoAgAQBiABKAIEEAYgARAGCyAAQQA2AhQMDAsgACgCECIDKQM4IAMpAzAgASACIAAQRCIHQgBTDQogAyAHNwM4AkAgAykDCCIGQgF9IgJQDQAgAygCBCEAA0ACQCAHIAAgAiAEfUIBiCAEfCIFp0EDdGopAwBUBEAgBUIBfSECDAELIAUgBlEEQCAGIQUMAwsgACAFQgF8IgSnQQN0aikDACAHVg0CCyAEIQUgAiAEVg0ACwsgAyAFNwNAQgAhBAwLCyAAKAIUIgMpAzggAykDMCABIAIgABBEIgdCAFMNCSADIAc3AzgCQCADKQMIIgZCAX0iAlANACADKAIEIQADQAJAIAcgACACIAR9QgGIIAR8IgWnQQN0aikDAFQEQCAFQgF9IQIMAQsgBSAGUQRAIAYhBQwDCyAAIAVCAXwiBKdBA3RqKQMAIAdWDQILIAQhBSACIARWDQALCyADIAU3A0BCACEEDAoLIAJCN1gEQCAABEAgAEEANgIEIABBEjYCAAsMCQsgARAqIAEgACgCDDYCKCAAKAIQKQMwIQIgAUEANgIwIAEgAjcDICABIAI3AxggAULcATcDAEI4IQQMCQsgACABKAIANgIMDAgLIAtBQGtBfzYCACALQouAgICwAjcDOCALQoyAgIDQATcDMCALQo+AgICgATcDKCALQpGAgICQATcDICALQoeAgICAATcDGCALQoWAgIDgADcDECALQoOAgIDAADcDCCALQoGAgIAgNwMAQQAgCxAkIQQMBwsgACgCECkDOCIEQn9VDQYgAARAIABBPTYCBCAAQR42AgALDAULIAAoAhQpAzgiBEJ/VQ0FIAAEQCAAQT02AgQgAEEeNgIACwwEC0J/IQQgAkJ/VwRAIAAEQCAAQQA2AgQgAEESNgIACwwFCyACIAAoAhQiAykDOCACfCIFQv//A3wiBFYEQCAABEAgAEEANgIEIABBEjYCAAsMBAsCQCAFIAMoAgQiCiADKQMIIganQQN0aikDACIHWA0AAkAgBCAHfUIQiCAGfCIIIAMpAxAiCVgNAEIQIAkgCVAbIQUDQCAFIgRCAYYhBSAEIAhUDQALIAQgCVQNACADKAIAIASnIgpBBHQQNCIMRQ0DIAMgDDYCACADKAIEIApBA3RBCGoQNCIKRQ0DIAMgBDcDECADIAo2AgQgAykDCCEGCyAGIAhaDQAgAygCACEMA0AgDCAGp0EEdGoiDUGAgAQQCSIONgIAIA5FBEAgAARAIABBADYCBCAAQQ42AgALDAYLIA1CgIAENwMIIAMgBkIBfCIFNwMIIAogBadBA3RqIAdCgIAEfCIHNwMAIAMpAwgiBiAIVA0ACwsgAykDQCEFIAMpAzghBwJAIAJQBEBCACEEDAELIAWnIgBBBHQiDCADKAIAaiINKAIAIAcgCiAAQQN0aikDAH0iBqdqIAEgAiANKQMIIAZ9IgcgAiAHVBsiBKcQBxogBSAEIAMoAgAiACAMaikDCCAGfVGtfCEFIAIgB1YEQANAIAAgBadBBHQiCmoiACgCACABIASnaiACIAR9IgYgACkDCCIHIAYgB1QbIganEAcaIAUgBiADKAIAIgAgCmopAwhRrXwhBSAEIAZ8IgQgAlQNAAsLIAMpAzghBwsgAyAFNwNAIAMgBCAHfCICNwM4IAIgAykDMFgNBCADIAI3AzAMBAsgAARAIABBADYCBCAAQRw2AgALDAILIAAEQCAAQQA2AgQgAEEONgIACyAABEAgAEEANgIEIABBDjYCAAsMAQsgAEEANgIUC0J/IQQLIAtB0ABqJAAgBAtIAQF/IABCADcCBCAAIAE2AgACQCABQQBIDQBBsBMoAgAgAUwNACABQQJ0QcATaigCAEEBRw0AQYSEASgCACECCyAAIAI2AgQLDgAgAkGx893xeWxBEHYLvgEAIwBBEGsiACQAIABBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAQRBqJAAgAkGx893xeWxBEHYLuQEBAX8jAEEQayIBJAAgAUEAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAQjgEgAUEQaiQAC78BAQF/IwBBEGsiAiQAIAJBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAIAEQkAEhACACQRBqJAAgAAu+AQEBfyMAQRBrIgIkACACQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgACABEFohACACQRBqJAAgAAu+AQEBfyMAQRBrIgIkACACQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgACABEFshACACQRBqJAAgAAu9AQEBfyMAQRBrIgMkACADQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgACABIAIQjwEgA0EQaiQAC4UBAgR/AX4jAEEQayIBJAACQCAAKQMwUARADAELA0ACQCAAIAVBACABQQ9qIAFBCGoQZiIEQX9GDQAgAS0AD0EDRw0AIAIgASgCCEGAgICAf3FBgICAgHpGaiECC0F/IQMgBEF/Rg0BIAIhAyAFQgF8IgUgACkDMFQNAAsLIAFBEGokACADCwuMdSUAQYAIC7ELaW5zdWZmaWNpZW50IG1lbW9yeQBuZWVkIGRpY3Rpb25hcnkALSsgICAwWDB4AFppcCBhcmNoaXZlIGluY29uc2lzdGVudABJbnZhbGlkIGFyZ3VtZW50AGludmFsaWQgbGl0ZXJhbC9sZW5ndGhzIHNldABpbnZhbGlkIGNvZGUgbGVuZ3RocyBzZXQAdW5rbm93biBoZWFkZXIgZmxhZ3Mgc2V0AGludmFsaWQgZGlzdGFuY2VzIHNldABpbnZhbGlkIGJpdCBsZW5ndGggcmVwZWF0AEZpbGUgYWxyZWFkeSBleGlzdHMAdG9vIG1hbnkgbGVuZ3RoIG9yIGRpc3RhbmNlIHN5bWJvbHMAaW52YWxpZCBzdG9yZWQgYmxvY2sgbGVuZ3RocwAlcyVzJXMAYnVmZmVyIGVycm9yAE5vIGVycm9yAHN0cmVhbSBlcnJvcgBUZWxsIGVycm9yAEludGVybmFsIGVycm9yAFNlZWsgZXJyb3IAV3JpdGUgZXJyb3IAZmlsZSBlcnJvcgBSZWFkIGVycm9yAFpsaWIgZXJyb3IAZGF0YSBlcnJvcgBDUkMgZXJyb3IAaW5jb21wYXRpYmxlIHZlcnNpb24AaW52YWxpZCBjb2RlIC0tIG1pc3NpbmcgZW5kLW9mLWJsb2NrAGluY29ycmVjdCBoZWFkZXIgY2hlY2sAaW5jb3JyZWN0IGxlbmd0aCBjaGVjawBpbmNvcnJlY3QgZGF0YSBjaGVjawBpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFjawBoZWFkZXIgY3JjIG1pc21hdGNoADEuMi4xMy56bGliLW5nAGludmFsaWQgd2luZG93IHNpemUAUmVhZC1vbmx5IGFyY2hpdmUATm90IGEgemlwIGFyY2hpdmUAUmVzb3VyY2Ugc3RpbGwgaW4gdXNlAE1hbGxvYyBmYWlsdXJlAGludmFsaWQgYmxvY2sgdHlwZQBGYWlsdXJlIHRvIGNyZWF0ZSB0ZW1wb3JhcnkgZmlsZQBDYW4ndCBvcGVuIGZpbGUATm8gc3VjaCBmaWxlAFByZW1hdHVyZSBlbmQgb2YgZmlsZQBDYW4ndCByZW1vdmUgZmlsZQBpbnZhbGlkIGxpdGVyYWwvbGVuZ3RoIGNvZGUAaW52YWxpZCBkaXN0YW5jZSBjb2RlAHVua25vd24gY29tcHJlc3Npb24gbWV0aG9kAHN0cmVhbSBlbmQAQ29tcHJlc3NlZCBkYXRhIGludmFsaWQATXVsdGktZGlzayB6aXAgYXJjaGl2ZXMgbm90IHN1cHBvcnRlZABPcGVyYXRpb24gbm90IHN1cHBvcnRlZABFbmNyeXB0aW9uIG1ldGhvZCBub3Qgc3VwcG9ydGVkAENvbXByZXNzaW9uIG1ldGhvZCBub3Qgc3VwcG9ydGVkAEVudHJ5IGhhcyBiZWVuIGRlbGV0ZWQAQ29udGFpbmluZyB6aXAgYXJjaGl2ZSB3YXMgY2xvc2VkAENsb3NpbmcgemlwIGFyY2hpdmUgZmFpbGVkAFJlbmFtaW5nIHRlbXBvcmFyeSBmaWxlIGZhaWxlZABFbnRyeSBoYXMgYmVlbiBjaGFuZ2VkAE5vIHBhc3N3b3JkIHByb3ZpZGVkAFdyb25nIHBhc3N3b3JkIHByb3ZpZGVkAFVua25vd24gZXJyb3IgJWQAQUUAKG51bGwpADogAFBLBgcAUEsGBgBQSwUGAFBLAwQAUEsBAgAAAAA/BQAAwAcAAJMIAAB4CAAAbwUAAJEFAAB6BQAAsgUAAFYIAAAbBwAA1gQAAAsHAADqBgAAnAUAAMgGAACyCAAAHggAACgHAABHBAAAoAYAAGAFAAAuBAAAPgcAAD8IAAD+BwAAjgYAAMkIAADeCAAA5gcAALIGAABVBQAAqAcAACAAQcgTCxEBAAAAAQAAAAEAAAABAAAAAQBB7BMLCQEAAAABAAAAAgBBmBQLAQEAQbgUCwEBAEHSFAukLDomOyZlJmYmYyZgJiIg2CXLJdklQiZAJmomayY8JrolxCWVITwgtgCnAKwlqCGRIZMhkiGQIR8ilCGyJbwlIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBgAGEAYgBjAGQAZQBmAGcAaABpAGoAawBsAG0AbgBvAHAAcQByAHMAdAB1AHYAdwB4AHkAegB7AHwAfQB+AAIjxwD8AOkA4gDkAOAA5QDnAOoA6wDoAO8A7gDsAMQAxQDJAOYAxgD0APYA8gD7APkA/wDWANwAogCjAKUApyCSAeEA7QDzAPoA8QDRAKoAugC/ABAjrAC9ALwAoQCrALsAkSWSJZMlAiUkJWElYiVWJVUlYyVRJVclXSVcJVslECUUJTQlLCUcJQAlPCVeJV8lWiVUJWklZiVgJVAlbCVnJWglZCVlJVklWCVSJVMlayVqJRglDCWIJYQljCWQJYAlsQPfAJMDwAOjA8MDtQDEA6YDmAOpA7QDHiLGA7UDKSJhIrEAZSJkIiAjISP3AEgisAAZIrcAGiJ/ILIAoCWgAAAAAACWMAd3LGEO7rpRCZkZxG0Hj/RqcDWlY+mjlWSeMojbDqS43Hke6dXgiNnSlytMtgm9fLF+By2455Edv5BkELcd8iCwakhxufPeQb6EfdTaGuvk3W1RtdT0x4XTg1aYbBPAqGtkevli/ezJZYpPXAEU2WwGY2M9D/r1DQiNyCBuO14QaUzkQWDVcnFnotHkAzxH1ARL/YUN0mu1CqX6qLU1bJiyQtbJu9tA+bys42zYMnVc30XPDdbcWT3Rq6ww2SY6AN5RgFHXyBZh0L+19LQhI8SzVpmVus8Ppb24nrgCKAiIBV+y2QzGJOkLsYd8by8RTGhYqx1hwT0tZraQQdx2BnHbAbwg0pgqENXviYWxcR+1tgal5L+fM9S46KLJB3g0+QAPjqgJlhiYDuG7DWp/LT1tCJdsZJEBXGPm9FFra2JhbBzYMGWFTgBi8u2VBmx7pQEbwfQIglfED/XG2bBlUOm3Euq4vot8iLn83x3dYkkt2hXzfNOMZUzU+1hhsk3OUbU6dAC8o+Iwu9RBpd9K15XYPW3E0aT79NbTaulpQ/zZbjRGiGet0Lhg2nMtBETlHQMzX0wKqsl8Dd08cQVQqkECJxAQC76GIAzJJbVoV7OFbyAJ1Ga5n+Rhzg753l6YydkpIpjQsLSo18cXPbNZgQ20LjtcvbetbLrAIIO47bazv5oM4rYDmtKxdDlH1eqvd9KdFSbbBIMW3HMSC2PjhDtklD5qbQ2oWmp6C88O5J3/CZMnrgAKsZ4HfUSTD/DSowiHaPIBHv7CBmldV2L3y2dlgHE2bBnnBmtudhvU/uAr04laetoQzErdZ2/fufn5776OQ763F9WOsGDoo9bWfpPRocTC2DhS8t9P8We70WdXvKbdBrU/SzaySNorDdhMGwqv9koDNmB6BEHD72DfVd9nqO+ObjF5vmlGjLNhyxqDZryg0m8lNuJoUpV3DMwDRwu7uRYCIi8mBVW+O7rFKAu9spJatCsEarNcp//XwjHP0LWLntksHa7eW7DCZJsm8mPsnKNqdQqTbQKpBgmcPzYO64VnB3ITVwAFgkq/lRR6uOKuK7F7OBu2DJuO0pINvtXlt+/cfCHf2wvU0tOGQuLU8fiz3Whug9ofzRa+gVsmufbhd7Bvd0e3GOZaCIhwag//yjsGZlwLARH/nmWPaa5i+NP/a2FFz2wWeOIKoO7SDddUgwROwrMDOWEmZ6f3FmDQTUdpSdt3bj5KatGu3FrW2WYL30DwO9g3U668qcWeu95/z7JH6f+1MBzyvb2KwrrKMJOzU6ajtCQFNtC6kwbXzSlX3lS/Z9kjLnpms7hKYcQCG2hdlCtvKje+C7ShjgzDG98FWo3vAi0AAAAARjtnZYx2zsrKTamvWevtTh/QiivVnSOEk6ZE4bLW25307bz4PqAVV3ibcjLrPTbTrQZRtmdL+BkhcJ98JavG4GOQoYWp3Qgq7+ZvT3xAK646e0zL8DblZLYNggGXfR190UZ6GBsL07ddMLTSzpbwM4itl1ZC4D75BNtZnAtQ/BpNa5t/hyYy0MEdVbVSuxFUFIB2Md7N356Y9rj7uYYnh/+9QOI18OlNc8uOKOBtysmmVq2sbBsEAyogY2Yu+zr6aMBdn6KN9DDktpNVdxDXtDErsNH7Zhl+vV1+G5wt4WfaFoYCEFsvrVZgSMjFxgwpg/1rTEmwwuMPi6WGFqD4NVCbn1Ca1jb/3O1Rmk9LFXsJcHIewz3bsYUGvNSkdiOo4k1EzSgA7WJuO4oH/Z3O5rumqYNx6wAsN9BnSTMLPtV1MFmwv33wH/lGl3pq4NObLNu0/uaWHVGgrXo0gd3lSMfmgi0NqyuCS5BM59g2CAaeDW9jVEDGzBJ7oakd8AQvW8tjSpGGyuXXva2ARBvpYQIgjgTIbSerjlZAzq8m37LpHbjXI1AReGVrdh32zTL8sPZVmXq7/DY8gJtTOFvCz35gpaq0LQwF8hZrYGGwL4Eni0jk7cbhS6v9hi6KjRlSzLZ+Nwb715hAwLD902b0HJVdk3lfEDrWGStdsyxA8Wtqe5YOoDY/oeYNWMR1qxwlM5B7QPnd0u+/5rWKnpYq9titTZMS4OQ8VNuDWcd9x7iBRqDdSwsJcg0wbhcJ6zeLT9BQ7oWd+UHDpp4kUADaxRY7vaDcdhQPmk1zars97Bb9BotzN0si3HFwRbni1gFYpO1mPW6gz5Iom6j3JxANcWErahSrZsO77V2k3n774D84wIda8o0u9bS2SZCVxtbs0/2xiRmwGCZfi39DzC07oooWXMdAW/VoBmCSDQK7y5FEgKz0js0FW8j2Yj5bUCbfHWtButcm6BWRHY9wsG0QDPZWd2k8G97GeiC5o+mG/UKvvZonZfAziCPLVO064AlefNtuO7aWx5TwraDxYwvkECUwg3XvfSraqUZNv4g20sPODbWmBEAcCUJ7e2zR3T+Nl+ZY6F2r8UcbkJYiH0vPvllwqNuTPQF01QZmEUagIvAAm0WVytbsOozti1+tnRQj66ZzRiHr2uln0L2M9Hb5bbJNngh4ADenPjtQwjGw9UR3i5IhvcY7jvv9XOtoWxgKLmB/b+Qt1sCiFrGlg2Yu2cVdSbwPEOATSSuHdtqNw5ectqTyVvsNXRDAajgUGzOkUiBUwZht/W7eVpoLTfDe6gvLuY/BhhAgh713RabN6Dng9o9cKrsm82yAQZb/JgV3uR1iEnNQy701a6zYAAAAAFiA4tfxBrR0qYZWo+INaOm6jYo+EwvcnUuLPkqFHaEJ3Z1D3nQbFX0sm/eqZxDJ4D+QKzeWFn2UzpafQwo7QhNSu6DE+z32Z6O9FLDoNir6sLbILRkwno5BsHxZjybjGtemAc1+IFduJqC1uW0ri/M1q2kknC0/h8St3VAUdoQmTPZm8eVwMFK98NKF9nvsz677DhgHfVi7X/26bJFrJS/J68f4YG2RWzjtc4xzZk3GK+avEYJg+bLa4BtlHk3GNUbNJOLvS3JBt8uQlvxArtykwEwLDUYaqFXG+H+bUGc8w9CF62pW00gy1jGfeV0P1SHd7QKIW7uh0NtZdijsCE1wbOqa2eq8OYFqXu7K4WCkkmGCczvn1NBjZzYHrfGpRPVxS5Nc9x0wBHf/50/8wa0XfCN6vvp12eZ6lw4i10peeleoidPR/iqLURz9wNoit5hawGAx3JbDaVx0FKfK61f/SgmAVsxfIw5MvfRFx4O+HUdhabTBN8rsQdUdPJqMa2QabrzNnDgflRzayN6X5IKGFwZVL5FQ9ncRsiG5hy1i4QfPtUiBmRYQAXvBW4pFiwMKp1yqjPH/8gwTKDahznhuISyvx6d6DJ8nmNvUrKaRjCxERiWqEuV9KvAys7xvces8jaZCutsFGjo50lGxB5gJMeVPoLez7Pg3UTtQ2BGaCFjzTaHepe75Xkc5stV5c+pVm6RD080HG1Mv0NXFsJONRVJEJMME53xD5jA3yNh6b0g6rcbObA6eTo7ZWuNTiQJjsV6r5ef982UFKrjuO2Dgbtm3SeiPFBFobcPf/vKAh34QVy74RvR2eKQjPfOaaWVzeL7M9S4dlHXMykSulbwcLndrtaghyO0owx+mo/1V/iMfglelSSEPJav2wbM0tZkz1mIwtYDBaDViFiO+XFx7Pr6L0rjoKIo4Cv9OldevFhU1eL+TY9vnE4EMrJi/RvQYXZFdngsyBR7p5cuIdqaTCJRxOo7C0mIOIAUphR5PcQX8mNiDqjuAA0jseDQZ1yC0+wCJMq2j0bJPdJo5cT7CuZPpaz/FSjO/J539KbjepalaCQwvDKpUr+59HyTQN0ekMuDuImRDtqKGlHIPW8Qqj7kTgwnvsNuJDWeQAjMtyILR+mEEh1k5hGWO9xL6za+SGBoGFE65XpSsbhUfkiRNn3Dz5BkmULyZxIdsQp3xNMJ/Jp1EKYXFxMtSjk/1GNbPF89/SUFsJ8mju+lfPPix394vGFmIjEDZalsLUlQRU9K2xvpU4GWi1AKyZnnf4j75PTWXf2uWz/+JQYR0twvc9FXcdXIDfy3y4ajjZH7ru+ScPBJiyp9K4ihIAWkWAlnp9NXwb6J2qO9AoQAAAADhtlLvg2vUBWLdhuoG16gL52H65IW8fA5kCi7hDK5RF+0YA/iPxYUSbnPX/Qp5+Rzrz6vziRItGWikf/YYXKMu+erxwZs3dyt6gSXEHosLJf89Wcqd4N8gfFaNzxTy8jn1RKDWl5kmPHYvdNMSJVoy85MI3ZFOjjdw+NzYMLhGXdEOFLKz05JYUmXAtzZv7lbX2by5tQQ6U1SyaLw8FhdK3aBFpb99w09ey5GgOsG/Qdt37a65qmtEWBw5qyjk5XPJUrecq48xdko5Y5kuM014z4Ufl61YmX1M7suSJEq0ZMX85ounIWBhRpcyjiKdHG/DK06AofbIakBAmoVgcI26gcbfVeMbWb8CrQtQZqclsYcRd17lzPG0BHqjW2ze3K2NaI5C77UIqA4DWkdqCXSmi78mSelioKMI1PJMeCwulJmafHv7R/qRGvGofn77hp+fTdRw/ZBSmhwmAHV0gn+DlTQtbPfpq4YWX/lpclXXiJPjhWfxPgONEIhRYlDIy+exfpkI06Mf4jIVTQ1WH2Pst6kxA9V0t+k0wuUGXGaa8L3QyB/fDU71PrscGlqxMvu7B2AU2drm/jhstBFIlGjJqSI6Jsv/vMwqSe4jTkPAwq/1ki3NKBTHLJ5GKEQ6Od6ljGsxx1Ht2ybnvzRC7ZHVo1vDOsGGRdAgMBc/geZrrmBQOUECjb+r4zvtRIcxw6Vmh5FKBFoXoOXsRU+NSDq5bP5oVg4j7rzvlbxTi5+SsmopwF0I9Ea36UIUWJm6yIB4DJpvGtEchftnTmqfbWCLftsyZBwGtI79sOZhlRSZl3Siy3gWf02S98kffZPDMZxydWNzEKjlmfEet3axXi3zUOh/HDI1+fbTg6sZt4mF+FY/1xc04lH91VQDEr3wfORcRi4LPpuo4d8t+g67J9TvWpGGADhMAOrZ+lIFqQKO3Ui03DIqaVrYy98IN6/VJtZOY3Q5LL7y080IoDylrN/KRBqNJSbHC8/HcVkgo3t3wULNJS4gEKPEwabxK+GW5hQAILT7Yv0yEYNLYP7nQU4fBvcc8GQqmhqFnMj17Ti3AwyO5exuU2MGj+Ux6evvHwgKWU3naITLDYkymeL5ykU6GHwX1XqhkT+bF8PQ/x3tMR6rv958djk0ncBr2/VkFC0U0kbCdg/AKJe5ksfzs7wmEgXuyXDYaCORbjrM0S6gSTCY8qZSRXRMs/Mmo9f5CEI2T1qtVJLcR7UkjqjdgPFePDajsV7rJVu/XXe021dZVTrhC7pYPI1QuYrfv8lyA2coxFGIShnXYquvhY3PpatsLhP5g0zOf2mteC2GxdxScCRqAJ9Gt4Z1pwHUmsML+nsivaiUQGAufqHWfJEAAAAAQ8umh8eQPNSEW5pTzycIc4zsrvQItzSnS3ySIJ5PEObdhLZhWd8sMhoUirVRaBiVEqO+Epb4JEHVM4LGfZlRFz5S95C6CW3D+cLLRLK+WWTxdf/jdS5lsDblwzfj1kHxoB3ndiRGfSVnjduiLPFJgm867wXrYXVWqKrT0foyoy65+QWpPaKf+n5pOX01Fatddt4N2vKFl4mxTjEOZH2zyCe2FU+j7Y8c4CYpm6tau7vokR08bMqHby8BIeiHq/I5xGBUvkA7zu0D8GhqSIz6SgtHXM2PHMaezNdgGRnk4t9aL0RY3nTeC52/eIzWw+qslQhMKxFT1nhSmHD/9GVGXbeu4Noz9XqJcD7cDjtCTi54ieip/NJy+r8Z1H1qKla7KeHwPK26am/ucczopQ1eyObG+E9inWIcIVbEm4n8F0rKN7HNTmwrng2njRlG2x85BRC5voFLI+3CgIVqF7MHrFR4oSvQIzt4k+id/9iUD9+bX6lYHwQzC1zPlYwOV+VzTZxD9MnH2aeKDH8gwXDtAIK7S4cG4NHURSt3U5AY9ZXT01MSV4jJQRRDb8ZfP/3mHPRbYZivwTLbZGe1c860ZDAFEuO0Xoiw95UuN7zpvBf/IhqQe3mAwziyJkTtgaSCrkoCBSoRmFZp2j7RIqas8WFtCnblNpAlpv02oujLjLqrACo9L1uwbmyQFukn7ITJZCciTuB8uB2jtx6adoScXDVPOtuxFKCI8t8GD7mjlC/6aDKofjOo+z34DnyVUt2t1pl7KlLC4XkRCUf+WnXV3hm+c1md5ekK3i5PjQsdzUtI1mvMzI3xn49GVxjEOsU4h/FjvwOq+exAYV9rEvkvlFEyiRPVaRNAlqK1x93eJ+eeFYFgGk4bM1mFvbSMtj9yz32Z9UsmA6YI7aUhQ5E3AQBakYaEAQvVx8qtUm9gfoMsq9gEqPBCV+s75NCgR3bw44zQd2fXSiQkHOyj8S9uZbLkyOI2v1KxdXT0Nj4IZhZ9w8CR+ZhawrpT/EUcrsrnX2VsYNs+9jOY9VC004nClJBCZBMUGf5AV9JYx4Lh2gHBKnyGRXHm1Qa6QFJNxtJyDg109YpW7qbJnUghYTeb8CL8PXemp6ck5WwBo64Qk4Pt2zUEaYCvVypLCdD/eIsWvLMtkTjot8J7IxFFMF+DZXOUJeL3z7+xtAQZNuacacmlV89OIQxVHWLH85opu2G6anDHPe4rXW6t4PvpeNN5LzsY36i/Q0X7/IjjfLf0cVz0P9fbcGRNiDOv6w+bBTje2M6eWVyVBAofXqKNVCIwrRfpliqTsgx50Hmq/gVKKDhGgY6/wtoU7IERsmvKbSBLiaaGzA39HJ9ONroYFAQAAJ0HAAAsCQAAhgUAAEgFAACnBQAAAAQAADIFAAC8BQAALAkAQYDBAAv3CQwACACMAAgATAAIAMwACAAsAAgArAAIAGwACADsAAgAHAAIAJwACABcAAgA3AAIADwACAC8AAgAfAAIAPwACAACAAgAggAIAEIACADCAAgAIgAIAKIACABiAAgA4gAIABIACACSAAgAUgAIANIACAAyAAgAsgAIAHIACADyAAgACgAIAIoACABKAAgAygAIACoACACqAAgAagAIAOoACAAaAAgAmgAIAFoACADaAAgAOgAIALoACAB6AAgA+gAIAAYACACGAAgARgAIAMYACAAmAAgApgAIAGYACADmAAgAFgAIAJYACABWAAgA1gAIADYACAC2AAgAdgAIAPYACAAOAAgAjgAIAE4ACADOAAgALgAIAK4ACABuAAgA7gAIAB4ACACeAAgAXgAIAN4ACAA+AAgAvgAIAH4ACAD+AAgAAQAIAIEACABBAAgAwQAIACEACAChAAgAYQAIAOEACAARAAgAkQAIAFEACADRAAgAMQAIALEACABxAAgA8QAIAAkACACJAAgASQAIAMkACAApAAgAqQAIAGkACADpAAgAGQAIAJkACABZAAgA2QAIADkACAC5AAgAeQAIAPkACAAFAAgAhQAIAEUACADFAAgAJQAIAKUACABlAAgA5QAIABUACACVAAgAVQAIANUACAA1AAgAtQAIAHUACAD1AAgADQAIAI0ACABNAAgAzQAIAC0ACACtAAgAbQAIAO0ACAAdAAgAnQAIAF0ACADdAAgAPQAIAL0ACAB9AAgA/QAIABMACQATAQkAkwAJAJMBCQBTAAkAUwEJANMACQDTAQkAMwAJADMBCQCzAAkAswEJAHMACQBzAQkA8wAJAPMBCQALAAkACwEJAIsACQCLAQkASwAJAEsBCQDLAAkAywEJACsACQArAQkAqwAJAKsBCQBrAAkAawEJAOsACQDrAQkAGwAJABsBCQCbAAkAmwEJAFsACQBbAQkA2wAJANsBCQA7AAkAOwEJALsACQC7AQkAewAJAHsBCQD7AAkA+wEJAAcACQAHAQkAhwAJAIcBCQBHAAkARwEJAMcACQDHAQkAJwAJACcBCQCnAAkApwEJAGcACQBnAQkA5wAJAOcBCQAXAAkAFwEJAJcACQCXAQkAVwAJAFcBCQDXAAkA1wEJADcACQA3AQkAtwAJALcBCQB3AAkAdwEJAPcACQD3AQkADwAJAA8BCQCPAAkAjwEJAE8ACQBPAQkAzwAJAM8BCQAvAAkALwEJAK8ACQCvAQkAbwAJAG8BCQDvAAkA7wEJAB8ACQAfAQkAnwAJAJ8BCQBfAAkAXwEJAN8ACQDfAQkAPwAJAD8BCQC/AAkAvwEJAH8ACQB/AQkA/wAJAP8BCQAAAAcAQAAHACAABwBgAAcAEAAHAFAABwAwAAcAcAAHAAgABwBIAAcAKAAHAGgABwAYAAcAWAAHADgABwB4AAcABAAHAEQABwAkAAcAZAAHABQABwBUAAcANAAHAHQABwADAAgAgwAIAEMACADDAAgAIwAIAKMACABjAAgA4wAIAAAABQAQAAUACAAFABgABQAEAAUAFAAFAAwABQAcAAUAAgAFABIABQAKAAUAGgAFAAYABQAWAAUADgAFAB4ABQABAAUAEQAFAAkABQAZAAUABQAFABUABQANAAUAHQAFAAMABQATAAUACwAFABsABQAHAAUAFwAFAEGBywAL7AYBAgMEBAUFBgYGBgcHBwcICAgICAgICAkJCQkJCQkJCgoKCgoKCgoKCgoKCgoKCgsLCwsLCwsLCwsLCwsLCwsMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8AABAREhITExQUFBQVFRUVFhYWFhYWFhYXFxcXFxcXFxgYGBgYGBgYGBgYGBgYGBgZGRkZGRkZGRkZGRkZGRkZGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhobGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwdHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dAAECAwQFBgcICAkJCgoLCwwMDAwNDQ0NDg4ODg8PDw8QEBAQEBAQEBEREREREREREhISEhISEhITExMTExMTExQUFBQUFBQUFBQUFBQUFBQVFRUVFRUVFRUVFRUVFRUVFhYWFhYWFhYWFhYWFhYWFhcXFxcXFxcXFxcXFxcXFxcYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhobGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbHAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAoAAAAMAAAADgAAABAAAAAUAAAAGAAAABwAAAAgAAAAKAAAADAAAAA4AAAAQAAAAFAAAABgAAAAcAAAAIAAAACgAAAAwAAAAOAAQYTSAAutAQEAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAAABAACAAQAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAgCAAAMApAAABAQAAHgEAAA8AAAAAJQAAQCoAAAAAAAAeAAAADwAAAAAAAADAKgAAAAAAABMAAAAHAEHg0wALTQEAAAABAAAAAQAAAAEAAAACAAAAAgAAAAIAAAACAAAAAwAAAAMAAAADAAAAAwAAAAQAAAAEAAAABAAAAAQAAAAFAAAABQAAAAUAAAAFAEHQ1AALZQEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAUAAAAGAAAABgAAAAcAAAAHAAAACAAAAAgAAAAJAAAACQAAAAoAAAAKAAAACwAAAAsAAAAMAAAADAAAAA0AAAANAEGA1gALIwIAAAADAAAABwAAAAAAAAAQERIACAcJBgoFCwQMAw0CDgEPAEHQ1gALTQEAAAABAAAAAQAAAAEAAAACAAAAAgAAAAIAAAACAAAAAwAAAAMAAAADAAAAAwAAAAQAAAAEAAAABAAAAAQAAAAFAAAABQAAAAUAAAAFAEHA1wALZQEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAUAAAAGAAAABgAAAAcAAAAHAAAACAAAAAgAAAAJAAAACQAAAAoAAAAKAAAACwAAAAsAAAAMAAAADAAAAA0AAAANAEG42AALASwAQcTYAAthLQAAAAQABAAIAAQALgAAAAQABgAQAAYALwAAAAQADAAgABgALwAAAAgAEAAgACAALwAAAAgAEACAAIAALwAAAAgAIACAAAABMAAAACAAgAACAQAEMAAAACAAAgECAQAQMABBsNkAC6UTAwAEAAUABgAHAAgACQAKAAsADQAPABEAEwAXABsAHwAjACsAMwA7AEMAUwBjAHMAgwCjAMMA4wACAQAAAAAAABAAEAAQABAAEAAQABAAEAARABEAEQARABIAEgASABIAEwATABMAEwAUABQAFAAUABUAFQAVABUAEABNAMoAAAABAAIAAwAEAAUABwAJAA0AEQAZACEAMQBBAGEAgQDBAAEBgQEBAgEDAQQBBgEIAQwBEAEYASABMAFAAWAAAAAAEAAQABAAEAARABEAEgASABMAEwAUABQAFQAVABYAFgAXABcAGAAYABkAGQAaABoAGwAbABwAHAAdAB0AQABAAGAHAAAACFAAAAgQABQIcwASBx8AAAhwAAAIMAAACcAAEAcKAAAIYAAACCAAAAmgAAAIAAAACIAAAAhAAAAJ4AAQBwYAAAhYAAAIGAAACZAAEwc7AAAIeAAACDgAAAnQABEHEQAACGgAAAgoAAAJsAAACAgAAAiIAAAISAAACfAAEAcEAAAIVAAACBQAFQjjABMHKwAACHQAAAg0AAAJyAARBw0AAAhkAAAIJAAACagAAAgEAAAIhAAACEQAAAnoABAHCAAACFwAAAgcAAAJmAAUB1MAAAh8AAAIPAAACdgAEgcXAAAIbAAACCwAAAm4AAAIDAAACIwAAAhMAAAJ+AAQBwMAAAhSAAAIEgAVCKMAEwcjAAAIcgAACDIAAAnEABEHCwAACGIAAAgiAAAJpAAACAIAAAiCAAAIQgAACeQAEAcHAAAIWgAACBoAAAmUABQHQwAACHoAAAg6AAAJ1AASBxMAAAhqAAAIKgAACbQAAAgKAAAIigAACEoAAAn0ABAHBQAACFYAAAgWAEAIAAATBzMAAAh2AAAINgAACcwAEQcPAAAIZgAACCYAAAmsAAAIBgAACIYAAAhGAAAJ7AAQBwkAAAheAAAIHgAACZwAFAdjAAAIfgAACD4AAAncABIHGwAACG4AAAguAAAJvAAACA4AAAiOAAAITgAACfwAYAcAAAAIUQAACBEAFQiDABIHHwAACHEAAAgxAAAJwgAQBwoAAAhhAAAIIQAACaIAAAgBAAAIgQAACEEAAAniABAHBgAACFkAAAgZAAAJkgATBzsAAAh5AAAIOQAACdIAEQcRAAAIaQAACCkAAAmyAAAICQAACIkAAAhJAAAJ8gAQBwQAAAhVAAAIFQAQCAIBEwcrAAAIdQAACDUAAAnKABEHDQAACGUAAAglAAAJqgAACAUAAAiFAAAIRQAACeoAEAcIAAAIXQAACB0AAAmaABQHUwAACH0AAAg9AAAJ2gASBxcAAAhtAAAILQAACboAAAgNAAAIjQAACE0AAAn6ABAHAwAACFMAAAgTABUIwwATByMAAAhzAAAIMwAACcYAEQcLAAAIYwAACCMAAAmmAAAIAwAACIMAAAhDAAAJ5gAQBwcAAAhbAAAIGwAACZYAFAdDAAAIewAACDsAAAnWABIHEwAACGsAAAgrAAAJtgAACAsAAAiLAAAISwAACfYAEAcFAAAIVwAACBcAQAgAABMHMwAACHcAAAg3AAAJzgARBw8AAAhnAAAIJwAACa4AAAgHAAAIhwAACEcAAAnuABAHCQAACF8AAAgfAAAJngAUB2MAAAh/AAAIPwAACd4AEgcbAAAIbwAACC8AAAm+AAAIDwAACI8AAAhPAAAJ/gBgBwAAAAhQAAAIEAAUCHMAEgcfAAAIcAAACDAAAAnBABAHCgAACGAAAAggAAAJoQAACAAAAAiAAAAIQAAACeEAEAcGAAAIWAAACBgAAAmRABMHOwAACHgAAAg4AAAJ0QARBxEAAAhoAAAIKAAACbEAAAgIAAAIiAAACEgAAAnxABAHBAAACFQAAAgUABUI4wATBysAAAh0AAAINAAACckAEQcNAAAIZAAACCQAAAmpAAAIBAAACIQAAAhEAAAJ6QAQBwgAAAhcAAAIHAAACZkAFAdTAAAIfAAACDwAAAnZABIHFwAACGwAAAgsAAAJuQAACAwAAAiMAAAITAAACfkAEAcDAAAIUgAACBIAFQijABMHIwAACHIAAAgyAAAJxQARBwsAAAhiAAAIIgAACaUAAAgCAAAIggAACEIAAAnlABAHBwAACFoAAAgaAAAJlQAUB0MAAAh6AAAIOgAACdUAEgcTAAAIagAACCoAAAm1AAAICgAACIoAAAhKAAAJ9QAQBwUAAAhWAAAIFgBACAAAEwczAAAIdgAACDYAAAnNABEHDwAACGYAAAgmAAAJrQAACAYAAAiGAAAIRgAACe0AEAcJAAAIXgAACB4AAAmdABQHYwAACH4AAAg+AAAJ3QASBxsAAAhuAAAILgAACb0AAAgOAAAIjgAACE4AAAn9AGAHAAAACFEAAAgRABUIgwASBx8AAAhxAAAIMQAACcMAEAcKAAAIYQAACCEAAAmjAAAIAQAACIEAAAhBAAAJ4wAQBwYAAAhZAAAIGQAACZMAEwc7AAAIeQAACDkAAAnTABEHEQAACGkAAAgpAAAJswAACAkAAAiJAAAISQAACfMAEAcEAAAIVQAACBUAEAgCARMHKwAACHUAAAg1AAAJywARBw0AAAhlAAAIJQAACasAAAgFAAAIhQAACEUAAAnrABAHCAAACF0AAAgdAAAJmwAUB1MAAAh9AAAIPQAACdsAEgcXAAAIbQAACC0AAAm7AAAIDQAACI0AAAhNAAAJ+wAQBwMAAAhTAAAIEwAVCMMAEwcjAAAIcwAACDMAAAnHABEHCwAACGMAAAgjAAAJpwAACAMAAAiDAAAIQwAACecAEAcHAAAIWwAACBsAAAmXABQHQwAACHsAAAg7AAAJ1wASBxMAAAhrAAAIKwAACbcAAAgLAAAIiwAACEsAAAn3ABAHBQAACFcAAAgXAEAIAAATBzMAAAh3AAAINwAACc8AEQcPAAAIZwAACCcAAAmvAAAIBwAACIcAAAhHAAAJ7wAQBwkAAAhfAAAIHwAACZ8AFAdjAAAIfwAACD8AAAnfABIHGwAACG8AAAgvAAAJvwAACA8AAAiPAAAITwAACf8AEAUBABcFAQETBREAGwUBEBEFBQAZBQEEFQVBAB0FAUAQBQMAGAUBAhQFIQAcBQEgEgUJABoFAQgWBYEAQAUAABAFAgAXBYEBEwUZABsFARgRBQcAGQUBBhUFYQAdBQFgEAUEABgFAQMUBTEAHAUBMBIFDQAaBQEMFgXBAEAFAAAQABEAEgAAAAgABwAJAAYACgAFAAsABAAMAAMADQACAA4AAQAPAEHg7AALQREACgAREREAAAAABQAAAAAAAAkAAAAACwAAAAAAAAAAEQAPChEREQMKBwABAAkLCwAACQYLAAALAAYRAAAAERERAEGx7QALIQsAAAAAAAAAABEACgoREREACgAAAgAJCwAAAAkACwAACwBB6+0ACwEMAEH37QALFQwAAAAADAAAAAAJDAAAAAAADAAADABBpe4ACwEOAEGx7gALFQ0AAAAEDQAAAAAJDgAAAAAADgAADgBB3+4ACwEQAEHr7gALHg8AAAAADwAAAAAJEAAAAAAAEAAAEAAAEgAAABISEgBBou8ACw4SAAAAEhISAAAAAAAACQBB0+8ACwELAEHf7wALFQoAAAAACgAAAAAJCwAAAAAACwAACwBBjfAACwEMAEGZ8AALJwwAAAAADAAAAAAJDAAAAAAADAAADAAAMDEyMzQ1Njc4OUFCQ0RFRgBB5PAACwE+AEGL8QALBf//////AEHQ8QALVxkSRDsCPyxHFD0zMAobBkZLRTcPSQ6OFwNAHTxpKzYfSi0cASAlKSEIDBUWIi4QOD4LNDEYZHR1di9BCX85ESNDMkKJiosFBCYoJw0qHjWMBxpIkxOUlQBBsPIAC4oOSWxsZWdhbCBieXRlIHNlcXVlbmNlAERvbWFpbiBlcnJvcgBSZXN1bHQgbm90IHJlcHJlc2VudGFibGUATm90IGEgdHR5AFBlcm1pc3Npb24gZGVuaWVkAE9wZXJhdGlvbiBub3QgcGVybWl0dGVkAE5vIHN1Y2ggZmlsZSBvciBkaXJlY3RvcnkATm8gc3VjaCBwcm9jZXNzAEZpbGUgZXhpc3RzAFZhbHVlIHRvbyBsYXJnZSBmb3IgZGF0YSB0eXBlAE5vIHNwYWNlIGxlZnQgb24gZGV2aWNlAE91dCBvZiBtZW1vcnkAUmVzb3VyY2UgYnVzeQBJbnRlcnJ1cHRlZCBzeXN0ZW0gY2FsbABSZXNvdXJjZSB0ZW1wb3JhcmlseSB1bmF2YWlsYWJsZQBJbnZhbGlkIHNlZWsAQ3Jvc3MtZGV2aWNlIGxpbmsAUmVhZC1vbmx5IGZpbGUgc3lzdGVtAERpcmVjdG9yeSBub3QgZW1wdHkAQ29ubmVjdGlvbiByZXNldCBieSBwZWVyAE9wZXJhdGlvbiB0aW1lZCBvdXQAQ29ubmVjdGlvbiByZWZ1c2VkAEhvc3QgaXMgZG93bgBIb3N0IGlzIHVucmVhY2hhYmxlAEFkZHJlc3MgaW4gdXNlAEJyb2tlbiBwaXBlAEkvTyBlcnJvcgBObyBzdWNoIGRldmljZSBvciBhZGRyZXNzAEJsb2NrIGRldmljZSByZXF1aXJlZABObyBzdWNoIGRldmljZQBOb3QgYSBkaXJlY3RvcnkASXMgYSBkaXJlY3RvcnkAVGV4dCBmaWxlIGJ1c3kARXhlYyBmb3JtYXQgZXJyb3IASW52YWxpZCBhcmd1bWVudABBcmd1bWVudCBsaXN0IHRvbyBsb25nAFN5bWJvbGljIGxpbmsgbG9vcABGaWxlbmFtZSB0b28gbG9uZwBUb28gbWFueSBvcGVuIGZpbGVzIGluIHN5c3RlbQBObyBmaWxlIGRlc2NyaXB0b3JzIGF2YWlsYWJsZQBCYWQgZmlsZSBkZXNjcmlwdG9yAE5vIGNoaWxkIHByb2Nlc3MAQmFkIGFkZHJlc3MARmlsZSB0b28gbGFyZ2UAVG9vIG1hbnkgbGlua3MATm8gbG9ja3MgYXZhaWxhYmxlAFJlc291cmNlIGRlYWRsb2NrIHdvdWxkIG9jY3VyAFN0YXRlIG5vdCByZWNvdmVyYWJsZQBQcmV2aW91cyBvd25lciBkaWVkAE9wZXJhdGlvbiBjYW5jZWxlZABGdW5jdGlvbiBub3QgaW1wbGVtZW50ZWQATm8gbWVzc2FnZSBvZiBkZXNpcmVkIHR5cGUASWRlbnRpZmllciByZW1vdmVkAERldmljZSBub3QgYSBzdHJlYW0ATm8gZGF0YSBhdmFpbGFibGUARGV2aWNlIHRpbWVvdXQAT3V0IG9mIHN0cmVhbXMgcmVzb3VyY2VzAExpbmsgaGFzIGJlZW4gc2V2ZXJlZABQcm90b2NvbCBlcnJvcgBCYWQgbWVzc2FnZQBGaWxlIGRlc2NyaXB0b3IgaW4gYmFkIHN0YXRlAE5vdCBhIHNvY2tldABEZXN0aW5hdGlvbiBhZGRyZXNzIHJlcXVpcmVkAE1lc3NhZ2UgdG9vIGxhcmdlAFByb3RvY29sIHdyb25nIHR5cGUgZm9yIHNvY2tldABQcm90b2NvbCBub3QgYXZhaWxhYmxlAFByb3RvY29sIG5vdCBzdXBwb3J0ZWQAU29ja2V0IHR5cGUgbm90IHN1cHBvcnRlZABOb3Qgc3VwcG9ydGVkAFByb3RvY29sIGZhbWlseSBub3Qgc3VwcG9ydGVkAEFkZHJlc3MgZmFtaWx5IG5vdCBzdXBwb3J0ZWQgYnkgcHJvdG9jb2wAQWRkcmVzcyBub3QgYXZhaWxhYmxlAE5ldHdvcmsgaXMgZG93bgBOZXR3b3JrIHVucmVhY2hhYmxlAENvbm5lY3Rpb24gcmVzZXQgYnkgbmV0d29yawBDb25uZWN0aW9uIGFib3J0ZWQATm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZQBTb2NrZXQgaXMgY29ubmVjdGVkAFNvY2tldCBub3QgY29ubmVjdGVkAENhbm5vdCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93bgBPcGVyYXRpb24gYWxyZWFkeSBpbiBwcm9ncmVzcwBPcGVyYXRpb24gaW4gcHJvZ3Jlc3MAU3RhbGUgZmlsZSBoYW5kbGUAUmVtb3RlIEkvTyBlcnJvcgBRdW90YSBleGNlZWRlZABObyBtZWRpdW0gZm91bmQAV3JvbmcgbWVkaXVtIHR5cGUATm8gZXJyb3IgaW5mb3JtYXRpb24AQcCAAQuFARMAAAAUAAAAFQAAABYAAAAXAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAgAAAAIQAAACIAAAAjAAAAgERQADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAQfSCAQsCXEQAQbCDAQsQ/////////////////////w==";Bo(ji)||(ji=P(ji));function ro(Je){try{if(Je==ji&&ce)return new Uint8Array(ce);var st=Me(Je);if(st)return st;if(R)return R(Je);throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"}catch(St){ns(St)}}function vo(Je,st){var St,lr,ee;try{ee=ro(Je),lr=new WebAssembly.Module(ee),St=new WebAssembly.Instance(lr,st)}catch(Oe){var Ee=Oe.toString();throw te("failed to compile wasm module: "+Ee),(Ee.includes("imported Memory")||Ee.includes("memory import"))&&te("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),Oe}return[St,lr]}function RA(){var Je={a:fu};function st(ee,Ee){var Oe=ee.exports;r.asm=Oe,Be=r.asm.g,z(Be.buffer),$=r.asm.W,gn(r.asm.h),wo("wasm-instantiate")}if(ai("wasm-instantiate"),r.instantiateWasm)try{var St=r.instantiateWasm(Je,st);return St}catch(ee){return te("Module.instantiateWasm callback failed with error: "+ee),!1}var lr=vo(ji,Je);return st(lr[0]),r.asm}function pf(Je){return F.getFloat32(Je,!0)}function yh(Je){return F.getFloat64(Je,!0)}function Eh(Je){return F.getInt16(Je,!0)}function no(Je){return F.getInt32(Je,!0)}function jn(Je,st){F.setInt32(Je,st,!0)}function Fs(Je){for(;Je.length>0;){var st=Je.shift();if(typeof st=="function"){st(r);continue}var St=st.func;typeof St=="number"?st.arg===void 0?$.get(St)():$.get(St)(st.arg):St(st.arg===void 0?null:st.arg)}}function io(Je,st){var St=new Date(no((Je>>2)*4)*1e3);jn((st>>2)*4,St.getUTCSeconds()),jn((st+4>>2)*4,St.getUTCMinutes()),jn((st+8>>2)*4,St.getUTCHours()),jn((st+12>>2)*4,St.getUTCDate()),jn((st+16>>2)*4,St.getUTCMonth()),jn((st+20>>2)*4,St.getUTCFullYear()-1900),jn((st+24>>2)*4,St.getUTCDay()),jn((st+36>>2)*4,0),jn((st+32>>2)*4,0);var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),ee=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((st+28>>2)*4,ee),io.GMTString||(io.GMTString=rt("GMT")),jn((st+40>>2)*4,io.GMTString),st}function lu(Je,st){return io(Je,st)}function cu(Je,st,St){ke.copyWithin(Je,st,st+St)}function uu(Je){try{return Be.grow(Je-Pe.byteLength+65535>>>16),z(Be.buffer),1}catch{}}function FA(Je){var st=ke.length;Je=Je>>>0;var St=2147483648;if(Je>St)return!1;for(var lr=1;lr<=4;lr*=2){var ee=st*(1+.2/lr);ee=Math.min(ee,Je+100663296);var Ee=Math.min(St,Ne(Math.max(Je,ee),65536)),Oe=uu(Ee);if(Oe)return!0}return!1}function NA(Je){Ae(Je)}function aa(Je){var st=Date.now()/1e3|0;return Je&&jn((Je>>2)*4,st),st}function la(){if(la.called)return;la.called=!0;var Je=new Date().getFullYear(),st=new Date(Je,0,1),St=new Date(Je,6,1),lr=st.getTimezoneOffset(),ee=St.getTimezoneOffset(),Ee=Math.max(lr,ee);jn((Sl()>>2)*4,Ee*60),jn((ws()>>2)*4,+(lr!=ee));function Oe(fn){var li=fn.toTimeString().match(/\(([A-Za-z ]+)\)$/);return li?li[1]:"GMT"}var gt=Oe(st),yt=Oe(St),Dt=rt(gt),tr=rt(yt);ee>2)*4,Dt),jn((_i()+4>>2)*4,tr)):(jn((_i()>>2)*4,tr),jn((_i()+4>>2)*4,Dt))}function OA(Je){la();var st=Date.UTC(no((Je+20>>2)*4)+1900,no((Je+16>>2)*4),no((Je+12>>2)*4),no((Je+8>>2)*4),no((Je+4>>2)*4),no((Je>>2)*4),0),St=new Date(st);jn((Je+24>>2)*4,St.getUTCDay());var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),ee=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((Je+28>>2)*4,ee),St.getTime()/1e3|0}var gr=typeof atob=="function"?atob:function(Je){var st="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",St="",lr,ee,Ee,Oe,gt,yt,Dt,tr=0;Je=Je.replace(/[^A-Za-z0-9\+\/\=]/g,"");do Oe=st.indexOf(Je.charAt(tr++)),gt=st.indexOf(Je.charAt(tr++)),yt=st.indexOf(Je.charAt(tr++)),Dt=st.indexOf(Je.charAt(tr++)),lr=Oe<<2|gt>>4,ee=(gt&15)<<4|yt>>2,Ee=(yt&3)<<6|Dt,St=St+String.fromCharCode(lr),yt!==64&&(St=St+String.fromCharCode(ee)),Dt!==64&&(St=St+String.fromCharCode(Ee));while(tr0||(It(),Ir>0))return;function st(){Qn||(Qn=!0,r.calledRun=!0,!Ce&&(qt(),s(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),ir()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),st()},1)):st()}if(r.run=pc,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return pc(),e}}();typeof IT=="object"&&typeof jj=="object"?jj.exports=Hj:typeof define=="function"&&define.amd?define([],function(){return Hj}):typeof IT=="object"&&(IT.createModule=Hj)});var Hp,kde,Qde,Tde=Ct(()=>{Hp=["number","number"],kde=(X=>(X[X.ZIP_ER_OK=0]="ZIP_ER_OK",X[X.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",X[X.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",X[X.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",X[X.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",X[X.ZIP_ER_READ=5]="ZIP_ER_READ",X[X.ZIP_ER_WRITE=6]="ZIP_ER_WRITE",X[X.ZIP_ER_CRC=7]="ZIP_ER_CRC",X[X.ZIP_ER_ZIPCLOSED=8]="ZIP_ER_ZIPCLOSED",X[X.ZIP_ER_NOENT=9]="ZIP_ER_NOENT",X[X.ZIP_ER_EXISTS=10]="ZIP_ER_EXISTS",X[X.ZIP_ER_OPEN=11]="ZIP_ER_OPEN",X[X.ZIP_ER_TMPOPEN=12]="ZIP_ER_TMPOPEN",X[X.ZIP_ER_ZLIB=13]="ZIP_ER_ZLIB",X[X.ZIP_ER_MEMORY=14]="ZIP_ER_MEMORY",X[X.ZIP_ER_CHANGED=15]="ZIP_ER_CHANGED",X[X.ZIP_ER_COMPNOTSUPP=16]="ZIP_ER_COMPNOTSUPP",X[X.ZIP_ER_EOF=17]="ZIP_ER_EOF",X[X.ZIP_ER_INVAL=18]="ZIP_ER_INVAL",X[X.ZIP_ER_NOZIP=19]="ZIP_ER_NOZIP",X[X.ZIP_ER_INTERNAL=20]="ZIP_ER_INTERNAL",X[X.ZIP_ER_INCONS=21]="ZIP_ER_INCONS",X[X.ZIP_ER_REMOVE=22]="ZIP_ER_REMOVE",X[X.ZIP_ER_DELETED=23]="ZIP_ER_DELETED",X[X.ZIP_ER_ENCRNOTSUPP=24]="ZIP_ER_ENCRNOTSUPP",X[X.ZIP_ER_RDONLY=25]="ZIP_ER_RDONLY",X[X.ZIP_ER_NOPASSWD=26]="ZIP_ER_NOPASSWD",X[X.ZIP_ER_WRONGPASSWD=27]="ZIP_ER_WRONGPASSWD",X[X.ZIP_ER_OPNOTSUPP=28]="ZIP_ER_OPNOTSUPP",X[X.ZIP_ER_INUSE=29]="ZIP_ER_INUSE",X[X.ZIP_ER_TELL=30]="ZIP_ER_TELL",X[X.ZIP_ER_COMPRESSED_DATA=31]="ZIP_ER_COMPRESSED_DATA",X))(kde||{}),Qde=t=>({get HEAPU8(){return t.HEAPU8},errors:kde,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_EXCL:2,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:t._malloc(1),uint32S:t._malloc(4),malloc:t._malloc,free:t._free,getValue:t.getValue,openFromSource:t.cwrap("zip_open_from_source","number",["number","number","number"]),close:t.cwrap("zip_close","number",["number"]),discard:t.cwrap("zip_discard",null,["number"]),getError:t.cwrap("zip_get_error","number",["number"]),getName:t.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:t.cwrap("zip_get_num_entries","number",["number","number"]),delete:t.cwrap("zip_delete","number",["number","number"]),statIndex:t.cwrap("zip_stat_index","number",["number",...Hp,"number","number"]),fopenIndex:t.cwrap("zip_fopen_index","number",["number",...Hp,"number"]),fread:t.cwrap("zip_fread","number",["number","number","number","number"]),fclose:t.cwrap("zip_fclose","number",["number"]),dir:{add:t.cwrap("zip_dir_add","number",["number","string"])},file:{add:t.cwrap("zip_file_add","number",["number","string","number","number"]),getError:t.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:t.cwrap("zip_file_get_external_attributes","number",["number",...Hp,"number","number","number"]),setExternalAttributes:t.cwrap("zip_file_set_external_attributes","number",["number",...Hp,"number","number","number"]),setMtime:t.cwrap("zip_file_set_mtime","number",["number",...Hp,"number","number"]),setCompression:t.cwrap("zip_set_file_compression","number",["number",...Hp,"number","number"])},ext:{countSymlinks:t.cwrap("zip_ext_count_symlinks","number",["number"])},error:{initWithCode:t.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:t.cwrap("zip_error_strerror","string",["number"])},name:{locate:t.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:t.cwrap("zip_source_buffer_create","number",["number",...Hp,"number","number"]),fromBuffer:t.cwrap("zip_source_buffer","number",["number","number",...Hp,"number"]),free:t.cwrap("zip_source_free",null,["number"]),keep:t.cwrap("zip_source_keep",null,["number"]),open:t.cwrap("zip_source_open","number",["number"]),close:t.cwrap("zip_source_close","number",["number"]),seek:t.cwrap("zip_source_seek","number",["number",...Hp,"number"]),tell:t.cwrap("zip_source_tell","number",["number"]),read:t.cwrap("zip_source_read","number",["number","number","number"]),error:t.cwrap("zip_source_error","number",["number"])},struct:{statS:t.cwrap("zipstruct_statS","number",[]),statSize:t.cwrap("zipstruct_stat_size","number",["number"]),statCompSize:t.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:t.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:t.cwrap("zipstruct_stat_mtime","number",["number"]),statCrc:t.cwrap("zipstruct_stat_crc","number",["number"]),errorS:t.cwrap("zipstruct_errorS","number",[]),errorCodeZip:t.cwrap("zipstruct_error_code_zip","number",["number"])}})});function qj(t,e){let r=t.indexOf(e);if(r<=0)return null;let s=r;for(;r>=0&&(s=r+e.length,t[s]!==K.sep);){if(t[r-1]===K.sep)return null;r=t.indexOf(e,s)}return t.length>s&&t[s]!==K.sep?null:t.slice(0,s)}var tA,Rde=Ct(()=>{bt();bt();rA();tA=class t extends r0{static async openPromise(e,r){let s=new t(r);try{return await e(s)}finally{s.saveAndClose()}}constructor(e={}){let r=e.fileExtensions,s=e.readOnlyArchives,a=typeof r>"u"?f=>qj(f,".zip"):f=>{for(let p of r){let h=qj(f,p);if(h)return h}return null},n=(f,p)=>new hs(p,{baseFs:f,readOnly:s,stats:f.statSync(p),customZipImplementation:e.customZipImplementation}),c=async(f,p)=>{let h={baseFs:f,readOnly:s,stats:await f.statPromise(p),customZipImplementation:e.customZipImplementation};return()=>new hs(p,h)};super({...e,factorySync:n,factoryPromise:c,getMountPoint:a})}}});var Gj,wI,Wj=Ct(()=>{Uj();Gj=class extends Error{constructor(e,r){super(e),this.name="Libzip Error",this.code=r}},wI=class{constructor(e){this.filesShouldBeCached=!0;let r="buffer"in e?e.buffer:e.baseFs.readFileSync(e.path);this.libzip=yv();let s=this.libzip.malloc(4);try{let c=0;e.readOnly&&(c|=this.libzip.ZIP_RDONLY);let f=this.allocateUnattachedSource(r);try{this.zip=this.libzip.openFromSource(f,c,s),this.lzSource=f}catch(p){throw this.libzip.source.free(f),p}if(this.zip===0){let p=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(p,this.libzip.getValue(s,"i32")),this.makeLibzipError(p)}}finally{this.libzip.free(s)}let a=this.libzip.getNumEntries(this.zip,0),n=new Array(a);for(let c=0;c>>0,n=this.libzip.struct.statMtime(r)>>>0,c=this.libzip.struct.statCrc(r)>>>0;return{size:a,mtime:n,crc:c}}makeLibzipError(e){let r=this.libzip.struct.errorCodeZip(e),s=this.libzip.error.strerror(e),a=new Gj(s,this.libzip.errors[r]);if(r===this.libzip.errors.ZIP_ER_CHANGED)throw new Error(`Assertion failed: Unexpected libzip error: ${a.message}`);return a}setFileSource(e,r,s){let a=this.allocateSource(s);try{let n=this.libzip.file.add(this.zip,e,a,this.libzip.ZIP_FL_OVERWRITE);if(n===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(r!==null&&this.libzip.file.setCompression(this.zip,n,0,r[0],r[1])===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return n}catch(n){throw this.libzip.source.free(a),n}}setMtime(e,r){if(this.libzip.file.setMtime(this.zip,e,0,r,0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}getExternalAttributes(e){if(this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let s=this.libzip.getValue(this.libzip.uint08S,"i8")>>>0,a=this.libzip.getValue(this.libzip.uint32S,"i32")>>>0;return[s,a]}setExternalAttributes(e,r,s){if(this.libzip.file.setExternalAttributes(this.zip,e,0,0,r,s)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}locate(e){return this.libzip.name.locate(this.zip,e,0)}getFileSource(e){let r=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,r)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.libzip.struct.statCompSize(r),n=this.libzip.struct.statCompMethod(r),c=this.libzip.malloc(a);try{let f=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(f===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let p=this.libzip.fread(f,c,a,0);if(p===-1)throw this.makeLibzipError(this.libzip.file.getError(f));if(pa)throw new Error("Overread");let h=this.libzip.HEAPU8.subarray(c,c+a);return{data:Buffer.from(h),compressionMethod:n}}finally{this.libzip.fclose(f)}}finally{this.libzip.free(c)}}deleteEntry(e){if(this.libzip.delete(this.zip,e)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}addDirectory(e){let r=this.libzip.dir.add(this.zip,e);if(r===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return r}getBufferAndClose(){try{if(this.libzip.source.keep(this.lzSource),this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.source.open(this.lzSource)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_END)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let e=this.libzip.source.tell(this.lzSource);if(e===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_SET)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let r=this.libzip.malloc(e);if(!r)throw new Error("Couldn't allocate enough memory");try{let s=this.libzip.source.read(this.lzSource,r,e);if(s===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(se)throw new Error("Overread");let a=Buffer.from(this.libzip.HEAPU8.subarray(r,r+e));return process.env.YARN_IS_TEST_ENV&&process.env.YARN_ZIP_DATA_EPILOGUE&&(a=Buffer.concat([a,Buffer.from(process.env.YARN_ZIP_DATA_EPILOGUE)])),a}finally{this.libzip.free(r)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource)}}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));let r=this.libzip.malloc(e.byteLength);if(!r)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,r,e.byteLength).set(e),{buffer:r,byteLength:e.byteLength}}allocateUnattachedSource(e){let r=this.libzip.struct.errorS(),{buffer:s,byteLength:a}=this.allocateBuffer(e),n=this.libzip.source.fromUnattachedBuffer(s,a,0,1,r);if(n===0)throw this.libzip.free(r),this.makeLibzipError(r);return n}allocateSource(e){let{buffer:r,byteLength:s}=this.allocateBuffer(e),a=this.libzip.source.fromBuffer(this.zip,r,s,0,1);if(a===0)throw this.libzip.free(r),this.makeLibzipError(this.libzip.getError(this.zip));return a}discard(){this.libzip.discard(this.zip)}}});function Wdt(t){if(typeof t=="string"&&String(+t)===t)return+t;if(typeof t=="number"&&Number.isFinite(t))return t<0?Date.now()/1e3:t;if(Fde.types.isDate(t))return t.getTime()/1e3;throw new Error("Invalid time")}function CT(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}var ka,Yj,Fde,Vj,om,Kj,Jj,Nde,hs,wT=Ct(()=>{bt();bt();bt();bt();bt();bt();ka=Ie("fs"),Yj=Ie("stream"),Fde=Ie("util"),Vj=et(Ie("zlib"));Wj();om=3,Kj=0,Jj=8,Nde="mixed";hs=class extends Uf{constructor(r,s={}){super();this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=!1;this.readOnly=!1;s.readOnly&&(this.readOnly=!0);let a=s;this.level=typeof a.level<"u"?a.level:Nde;let n=s.customZipImplementation??wI;if(typeof r=="string"){let{baseFs:f=new Yn}=a;this.baseFs=f,this.path=r}else this.path=null,this.baseFs=null;if(s.stats)this.stats=s.stats;else if(typeof r=="string")try{this.stats=this.baseFs.statSync(r)}catch(f){if(f.code==="ENOENT"&&a.create)this.stats=el.makeDefaultStats();else throw f}else this.stats=el.makeDefaultStats();typeof r=="string"?s.create?this.zipImpl=new n({buffer:CT(),readOnly:this.readOnly}):this.zipImpl=new n({path:r,baseFs:this.baseFs,readOnly:this.readOnly,size:this.stats.size}):this.zipImpl=new n({buffer:r??CT(),readOnly:this.readOnly}),this.listings.set(vt.root,new Set);let c=this.zipImpl.getListings();for(let f=0;f{this.closeSync(f)}})}async readPromise(r,s,a,n,c){return this.readSync(r,s,a,n,c)}readSync(r,s,a=0,n=s.byteLength,c=-1){let f=this.fds.get(r);if(typeof f>"u")throw or.EBADF("read");let p=c===-1||c===null?f.cursor:c,h=this.readFileSync(f.p);h.copy(s,a,p,p+n);let E=Math.max(0,Math.min(h.length-p,n));return(c===-1||c===null)&&(f.cursor+=E),E}async writePromise(r,s,a,n,c){return typeof s=="string"?this.writeSync(r,s,c):this.writeSync(r,s,a,n,c)}writeSync(r,s,a,n,c){throw typeof this.fds.get(r)>"u"?or.EBADF("read"):new Error("Unimplemented")}async closePromise(r){return this.closeSync(r)}closeSync(r){if(typeof this.fds.get(r)>"u")throw or.EBADF("read");this.fds.delete(r)}createReadStream(r,{encoding:s}={}){if(r===null)throw new Error("Unimplemented");let a=this.openSync(r,"r"),n=Object.assign(new Yj.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(f,p)=>{clearImmediate(c),this.closeSync(a),p(f)}}),{close(){n.destroy()},bytesRead:0,path:r,pending:!1}),c=setImmediate(async()=>{try{let f=await this.readFilePromise(r,s);n.bytesRead=f.length,n.end(f)}catch(f){n.destroy(f)}});return n}createWriteStream(r,{encoding:s}={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);if(r===null)throw new Error("Unimplemented");let a=[],n=this.openSync(r,"w"),c=Object.assign(new Yj.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(f,p)=>{try{f?p(f):(this.writeFileSync(r,Buffer.concat(a),s),p(null))}catch(h){p(h)}finally{this.closeSync(n)}}}),{close(){c.destroy()},bytesWritten:0,path:r,pending:!1});return c.on("data",f=>{let p=Buffer.from(f);c.bytesWritten+=p.length,a.push(p)}),c}async realpathPromise(r){return this.realpathSync(r)}realpathSync(r){let s=this.resolveFilename(`lstat '${r}'`,r);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`lstat '${r}'`);return s}async existsPromise(r){return this.existsSync(r)}existsSync(r){if(!this.ready)throw or.EBUSY(`archive closed, existsSync '${r}'`);if(this.symlinkCount===0){let a=K.resolve(vt.root,r);return this.entries.has(a)||this.listings.has(a)}let s;try{s=this.resolveFilename(`stat '${r}'`,r,void 0,!1)}catch{return!1}return s===void 0?!1:this.entries.has(s)||this.listings.has(s)}async accessPromise(r,s){return this.accessSync(r,s)}accessSync(r,s=ka.constants.F_OK){let a=this.resolveFilename(`access '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`access '${r}'`);if(this.readOnly&&s&ka.constants.W_OK)throw or.EROFS(`access '${r}'`)}async statPromise(r,s={bigint:!1}){return s.bigint?this.statSync(r,{bigint:!0}):this.statSync(r)}statSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`stat '${r}'`,r,void 0,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`stat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw or.ENOTDIR(`stat '${r}'`);return this.statImpl(`stat '${r}'`,a,s)}}async fstatPromise(r,s){return this.fstatSync(r,s)}fstatSync(r,s){let a=this.fds.get(r);if(typeof a>"u")throw or.EBADF("fstatSync");let{p:n}=a,c=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(c)&&!this.listings.has(c))throw or.ENOENT(`stat '${n}'`);if(n[n.length-1]==="/"&&!this.listings.has(c))throw or.ENOTDIR(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,c,s)}async lstatPromise(r,s={bigint:!1}){return s.bigint?this.lstatSync(r,{bigint:!0}):this.lstatSync(r)}lstatSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`lstat '${r}'`,r,!1,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`lstat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw or.ENOTDIR(`lstat '${r}'`);return this.statImpl(`lstat '${r}'`,a,s)}}statImpl(r,s,a={}){let n=this.entries.get(s);if(typeof n<"u"){let c=this.zipImpl.stat(n),f=c.crc,p=c.size,h=c.mtime*1e3,E=this.stats.uid,C=this.stats.gid,S=512,P=Math.ceil(c.size/S),I=h,R=h,N=h,U=new Date(I),W=new Date(R),te=new Date(N),ie=new Date(h),Ae=this.listings.has(s)?ka.constants.S_IFDIR:this.isSymbolicLink(n)?ka.constants.S_IFLNK:ka.constants.S_IFREG,ce=Ae===ka.constants.S_IFDIR?493:420,me=Ae|this.getUnixMode(n,ce)&511,pe=Object.assign(new el.StatEntry,{uid:E,gid:C,size:p,blksize:S,blocks:P,atime:U,birthtime:W,ctime:te,mtime:ie,atimeMs:I,birthtimeMs:R,ctimeMs:N,mtimeMs:h,mode:me,crc:f});return a.bigint===!0?el.convertToBigIntStats(pe):pe}if(this.listings.has(s)){let c=this.stats.uid,f=this.stats.gid,p=0,h=512,E=0,C=this.stats.mtimeMs,S=this.stats.mtimeMs,P=this.stats.mtimeMs,I=this.stats.mtimeMs,R=new Date(C),N=new Date(S),U=new Date(P),W=new Date(I),te=ka.constants.S_IFDIR|493,Ae=Object.assign(new el.StatEntry,{uid:c,gid:f,size:p,blksize:h,blocks:E,atime:R,birthtime:N,ctime:U,mtime:W,atimeMs:C,birthtimeMs:S,ctimeMs:P,mtimeMs:I,mode:te,crc:0});return a.bigint===!0?el.convertToBigIntStats(Ae):Ae}throw new Error("Unreachable")}getUnixMode(r,s){let[a,n]=this.zipImpl.getExternalAttributes(r);return a!==om?s:n>>>16}registerListing(r){let s=this.listings.get(r);if(s)return s;this.registerListing(K.dirname(r)).add(K.basename(r));let n=new Set;return this.listings.set(r,n),n}registerEntry(r,s){this.registerListing(K.dirname(r)).add(K.basename(r)),this.entries.set(r,s)}unregisterListing(r){this.listings.delete(r),this.listings.get(K.dirname(r))?.delete(K.basename(r))}unregisterEntry(r){this.unregisterListing(r);let s=this.entries.get(r);this.entries.delete(r),!(typeof s>"u")&&(this.fileSources.delete(s),this.isSymbolicLink(s)&&this.symlinkCount--)}deleteEntry(r,s){this.unregisterEntry(r),this.zipImpl.deleteEntry(s)}resolveFilename(r,s,a=!0,n=!0){if(!this.ready)throw or.EBUSY(`archive closed, ${r}`);let c=K.resolve(vt.root,s);if(c==="/")return vt.root;let f=this.entries.get(c);if(a&&f!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(f)){let p=this.getFileSource(f).toString();return this.resolveFilename(r,K.resolve(K.dirname(c),p),!0,n)}else return c;for(;;){let p=this.resolveFilename(r,K.dirname(c),!0,n);if(p===void 0)return p;let h=this.listings.has(p),E=this.entries.has(p);if(!h&&!E){if(n===!1)return;throw or.ENOENT(r)}if(!h)throw or.ENOTDIR(r);if(c=K.resolve(p,K.basename(c)),!a||this.symlinkCount===0)break;let C=this.zipImpl.locate(c.slice(1));if(C===-1)break;if(this.isSymbolicLink(C)){let S=this.getFileSource(C).toString();c=K.resolve(K.dirname(c),S)}else break}return c}setFileSource(r,s){let a=Buffer.isBuffer(s)?s:Buffer.from(s),n=K.relative(vt.root,r),c=null;this.level!=="mixed"&&(c=[this.level===0?Kj:Jj,this.level]);let f=this.zipImpl.setFileSource(n,c,a);return this.fileSources.set(f,a),f}isSymbolicLink(r){if(this.symlinkCount===0)return!1;let[s,a]=this.zipImpl.getExternalAttributes(r);return s!==om?!1:(a>>>16&ka.constants.S_IFMT)===ka.constants.S_IFLNK}getFileSource(r,s={asyncDecompress:!1}){let a=this.fileSources.get(r);if(typeof a<"u")return a;let{data:n,compressionMethod:c}=this.zipImpl.getFileSource(r);if(c===Kj)return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,n),n;if(c===Jj){if(s.asyncDecompress)return new Promise((f,p)=>{Vj.default.inflateRaw(n,(h,E)=>{h?p(h):(this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,E),f(E))})});{let f=Vj.default.inflateRawSync(n);return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,f),f}}else throw new Error(`Unsupported compression method: ${c}`)}async fchmodPromise(r,s){return this.chmodPromise(this.fdToPath(r,"fchmod"),s)}fchmodSync(r,s){return this.chmodSync(this.fdToPath(r,"fchmodSync"),s)}async chmodPromise(r,s){return this.chmodSync(r,s)}chmodSync(r,s){if(this.readOnly)throw or.EROFS(`chmod '${r}'`);s&=493;let a=this.resolveFilename(`chmod '${r}'`,r,!1),n=this.entries.get(a);if(typeof n>"u")throw new Error(`Assertion failed: The entry should have been registered (${a})`);let f=this.getUnixMode(n,ka.constants.S_IFREG|0)&-512|s;this.zipImpl.setExternalAttributes(n,om,f<<16)}async fchownPromise(r,s,a){return this.chownPromise(this.fdToPath(r,"fchown"),s,a)}fchownSync(r,s,a){return this.chownSync(this.fdToPath(r,"fchownSync"),s,a)}async chownPromise(r,s,a){return this.chownSync(r,s,a)}chownSync(r,s,a){throw new Error("Unimplemented")}async renamePromise(r,s){return this.renameSync(r,s)}renameSync(r,s){throw new Error("Unimplemented")}async copyFilePromise(r,s,a){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=await this.getFileSource(n,{asyncDecompress:!0}),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}copyFileSync(r,s,a=0){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=this.getFileSource(n),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}prepareCopyFile(r,s,a=0){if(this.readOnly)throw or.EROFS(`copyfile '${r} -> '${s}'`);if(a&ka.constants.COPYFILE_FICLONE_FORCE)throw or.ENOSYS("unsupported clone operation",`copyfile '${r}' -> ${s}'`);let n=this.resolveFilename(`copyfile '${r} -> ${s}'`,r),c=this.entries.get(n);if(typeof c>"u")throw or.EINVAL(`copyfile '${r}' -> '${s}'`);let f=this.resolveFilename(`copyfile '${r}' -> ${s}'`,s),p=this.entries.get(f);if(a&(ka.constants.COPYFILE_EXCL|ka.constants.COPYFILE_FICLONE_FORCE)&&typeof p<"u")throw or.EEXIST(`copyfile '${r}' -> '${s}'`);return{indexSource:c,resolvedDestP:f,indexDest:p}}async appendFilePromise(r,s,a){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFilePromise(r,s,a)}appendFileSync(r,s,a={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFileSync(r,s,a)}fdToPath(r,s){let a=this.fds.get(r)?.p;if(typeof a>"u")throw or.EBADF(s);return a}async writeFilePromise(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(s=Buffer.concat([await this.getFileSource(f,{asyncDecompress:!0}),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&await this.chmodPromise(p,c)}writeFileSync(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(s=Buffer.concat([this.getFileSource(f),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&this.chmodSync(p,c)}prepareWriteFile(r,s){if(typeof r=="number"&&(r=this.fdToPath(r,"read")),this.readOnly)throw or.EROFS(`open '${r}'`);let a=this.resolveFilename(`open '${r}'`,r);if(this.listings.has(a))throw or.EISDIR(`open '${r}'`);let n=null,c=null;typeof s=="string"?n=s:typeof s=="object"&&({encoding:n=null,mode:c=null}=s);let f=this.entries.get(a);return{encoding:n,mode:c,resolvedP:a,index:f}}async unlinkPromise(r){return this.unlinkSync(r)}unlinkSync(r){if(this.readOnly)throw or.EROFS(`unlink '${r}'`);let s=this.resolveFilename(`unlink '${r}'`,r);if(this.listings.has(s))throw or.EISDIR(`unlink '${r}'`);let a=this.entries.get(s);if(typeof a>"u")throw or.EINVAL(`unlink '${r}'`);this.deleteEntry(s,a)}async utimesPromise(r,s,a){return this.utimesSync(r,s,a)}utimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`utimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r);this.utimesImpl(n,a)}async lutimesPromise(r,s,a){return this.lutimesSync(r,s,a)}lutimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`lutimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r,!1);this.utimesImpl(n,a)}utimesImpl(r,s){this.listings.has(r)&&(this.entries.has(r)||this.hydrateDirectory(r));let a=this.entries.get(r);if(a===void 0)throw new Error("Unreachable");this.zipImpl.setMtime(a,Wdt(s))}async mkdirPromise(r,s){return this.mkdirSync(r,s)}mkdirSync(r,{mode:s=493,recursive:a=!1}={}){if(a)return this.mkdirpSync(r,{chmod:s});if(this.readOnly)throw or.EROFS(`mkdir '${r}'`);let n=this.resolveFilename(`mkdir '${r}'`,r);if(this.entries.has(n)||this.listings.has(n))throw or.EEXIST(`mkdir '${r}'`);this.hydrateDirectory(n),this.chmodSync(n,s)}async rmdirPromise(r,s){return this.rmdirSync(r,s)}rmdirSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rmdir '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rmdir '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rmdir '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rmdir '${r}'`);let c=this.entries.get(a);if(typeof c>"u")throw or.EINVAL(`rmdir '${r}'`);this.deleteEntry(r,c)}async rmPromise(r,s){return this.rmSync(r,s)}rmSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rm '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rm '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rm '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rm '${r}'`);let c=this.entries.get(a);if(typeof c>"u")throw or.EINVAL(`rm '${r}'`);this.deleteEntry(r,c)}hydrateDirectory(r){let s=this.zipImpl.addDirectory(K.relative(vt.root,r));return this.registerListing(r),this.registerEntry(r,s),s}async linkPromise(r,s){return this.linkSync(r,s)}linkSync(r,s){throw or.EOPNOTSUPP(`link '${r}' -> '${s}'`)}async symlinkPromise(r,s){return this.symlinkSync(r,s)}symlinkSync(r,s){if(this.readOnly)throw or.EROFS(`symlink '${r}' -> '${s}'`);let a=this.resolveFilename(`symlink '${r}' -> '${s}'`,s);if(this.listings.has(a))throw or.EISDIR(`symlink '${r}' -> '${s}'`);if(this.entries.has(a))throw or.EEXIST(`symlink '${r}' -> '${s}'`);let n=this.setFileSource(a,r);this.registerEntry(a,n),this.zipImpl.setExternalAttributes(n,om,(ka.constants.S_IFLNK|511)<<16),this.symlinkCount+=1}async readFilePromise(r,s){typeof s=="object"&&(s=s?s.encoding:void 0);let a=await this.readFileBuffer(r,{asyncDecompress:!0});return s?a.toString(s):a}readFileSync(r,s){typeof s=="object"&&(s=s?s.encoding:void 0);let a=this.readFileBuffer(r);return s?a.toString(s):a}readFileBuffer(r,s={asyncDecompress:!1}){typeof r=="number"&&(r=this.fdToPath(r,"read"));let a=this.resolveFilename(`open '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`open '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(a))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(a))throw or.EISDIR("read");let n=this.entries.get(a);if(n===void 0)throw new Error("Unreachable");return this.getFileSource(n,s)}async readdirPromise(r,s){return this.readdirSync(r,s)}readdirSync(r,s){let a=this.resolveFilename(`scandir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`scandir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`scandir '${r}'`);if(s?.recursive)if(s?.withFileTypes){let c=Array.from(n,f=>Object.assign(this.statImpl("lstat",K.join(r,f)),{name:f,path:vt.dot}));for(let f of c){if(!f.isDirectory())continue;let p=K.join(f.path,f.name),h=this.listings.get(K.join(a,p));for(let E of h)c.push(Object.assign(this.statImpl("lstat",K.join(r,p,E)),{name:E,path:p}))}return c}else{let c=[...n];for(let f of c){let p=this.listings.get(K.join(a,f));if(!(typeof p>"u"))for(let h of p)c.push(K.join(f,h))}return c}else return s?.withFileTypes?Array.from(n,c=>Object.assign(this.statImpl("lstat",K.join(r,c)),{name:c,path:void 0})):[...n]}async readlinkPromise(r){let s=this.prepareReadlink(r);return(await this.getFileSource(s,{asyncDecompress:!0})).toString()}readlinkSync(r){let s=this.prepareReadlink(r);return this.getFileSource(s).toString()}prepareReadlink(r){let s=this.resolveFilename(`readlink '${r}'`,r,!1);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`readlink '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(s))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(s))throw or.EINVAL(`readlink '${r}'`);let a=this.entries.get(s);if(a===void 0)throw new Error("Unreachable");if(!this.isSymbolicLink(a))throw or.EINVAL(`readlink '${r}'`);return a}async truncatePromise(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw or.EINVAL(`open '${r}'`);let c=await this.getFileSource(n,{asyncDecompress:!0}),f=Buffer.alloc(s,0);return c.copy(f),await this.writeFilePromise(r,f)}truncateSync(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw or.EINVAL(`open '${r}'`);let c=this.getFileSource(n),f=Buffer.alloc(s,0);return c.copy(f),this.writeFileSync(r,f)}async ftruncatePromise(r,s){return this.truncatePromise(this.fdToPath(r,"ftruncate"),s)}ftruncateSync(r,s){return this.truncateSync(this.fdToPath(r,"ftruncateSync"),s)}watch(r,s,a){let n;switch(typeof s){case"function":case"string":case"undefined":n=!0;break;default:({persistent:n=!0}=s);break}if(!n)return{on:()=>{},close:()=>{}};let c=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(c)}}}watchFile(r,s,a){let n=K.resolve(vt.root,r);return nE(this,n,s,a)}unwatchFile(r,s){let a=K.resolve(vt.root,r);return dd(this,a,s)}}});function Lde(t,e,r=Buffer.alloc(0),s){let a=new hs(r),n=C=>C===e||C.startsWith(`${e}/`)?C.slice(0,e.length):null,c=async(C,S)=>()=>a,f=(C,S)=>a,p={...t},h=new Yn(p),E=new r0({baseFs:h,getMountPoint:n,factoryPromise:c,factorySync:f,magicByte:21,maxAge:1/0,typeCheck:s?.typeCheck});return _2(Ode.default,new n0(E)),a}var Ode,Mde=Ct(()=>{bt();Ode=et(Ie("fs"));wT()});var _de=Ct(()=>{Rde();wT();Mde()});var zj,Ev,BT,Ude=Ct(()=>{bt();wT();zj={CENTRAL_DIRECTORY:33639248,END_OF_CENTRAL_DIRECTORY:101010256},Ev=22,BT=class t{constructor(e){this.filesShouldBeCached=!1;if("buffer"in e)throw new Error("Buffer based zip archives are not supported");if(!e.readOnly)throw new Error("Writable zip archives are not supported");this.baseFs=e.baseFs,this.fd=this.baseFs.openSync(e.path,"r");try{this.entries=t.readZipSync(this.fd,this.baseFs,e.size)}catch(r){throw this.baseFs.closeSync(this.fd),this.fd="closed",r}}static readZipSync(e,r,s){if(s=0;N--)if(n.readUInt32LE(N)===zj.END_OF_CENTRAL_DIRECTORY){a=N;break}if(a===-1)throw new Error("Not a zip archive")}let c=n.readUInt16LE(a+10),f=n.readUInt32LE(a+12),p=n.readUInt32LE(a+16),h=n.readUInt16LE(a+20);if(a+h+Ev>n.length)throw new Error("Zip archive inconsistent");if(c==65535||f==4294967295||p==4294967295)throw new Error("Zip 64 is not supported");if(f>s)throw new Error("Zip archive inconsistent");if(c>f/46)throw new Error("Zip archive inconsistent");let E=Buffer.alloc(f);if(r.readSync(e,E,0,E.length,p)!==E.length)throw new Error("Zip archive inconsistent");let C=[],S=0,P=0,I=0;for(;PE.length)throw new Error("Zip archive inconsistent");if(E.readUInt32LE(S)!==zj.CENTRAL_DIRECTORY)throw new Error("Zip archive inconsistent");let N=E.readUInt16LE(S+4)>>>8;if(E.readUInt16LE(S+8)&1)throw new Error("Encrypted zip files are not supported");let W=E.readUInt16LE(S+10),te=E.readUInt32LE(S+16),ie=E.readUInt16LE(S+28),Ae=E.readUInt16LE(S+30),ce=E.readUInt16LE(S+32),me=E.readUInt32LE(S+42),pe=E.toString("utf8",S+46,S+46+ie).replaceAll("\0"," ");if(pe.includes("\0"))throw new Error("Invalid ZIP file");let Be=E.readUInt32LE(S+20),Ce=E.readUInt32LE(S+38);C.push({name:pe,os:N,mtime:fi.SAFE_TIME,crc:te,compressionMethod:W,isSymbolicLink:N===om&&(Ce>>>16&fi.S_IFMT)===fi.S_IFLNK,size:E.readUInt32LE(S+24),compressedSize:Be,externalAttributes:Ce,localHeaderOffset:me}),I+=Be,P+=1,S+=46+ie+Ae+ce}if(I>s)throw new Error("Zip archive inconsistent");if(S!==E.length)throw new Error("Zip archive inconsistent");return C}getExternalAttributes(e){let r=this.entries[e];return[r.os,r.externalAttributes]}getListings(){return this.entries.map(e=>e.name)}getSymlinkCount(){let e=0;for(let r of this.entries)r.isSymbolicLink&&(e+=1);return e}stat(e){let r=this.entries[e];return{crc:r.crc,mtime:r.mtime,size:r.size}}locate(e){for(let r=0;rNde,DEFLATE:()=>Jj,JsZipImpl:()=>BT,LibZipImpl:()=>wI,STORE:()=>Kj,ZIP_UNIX:()=>om,ZipFS:()=>hs,ZipOpenFS:()=>tA,getArchivePart:()=>qj,getLibzipPromise:()=>Vdt,getLibzipSync:()=>Ydt,makeEmptyArchive:()=>CT,mountMemoryDrive:()=>Lde});function Ydt(){return yv()}async function Vdt(){return yv()}var Hde,rA=Ct(()=>{Uj();Hde=et(xde());Tde();_de();Ude();Wj();Pde(()=>{let t=(0,Hde.default)();return Qde(t)})});var Cv,jde=Ct(()=>{bt();Wt();wv();Cv=class extends ot{constructor(){super(...arguments);this.cwd=ge.String("--cwd",process.cwd(),{description:"The directory to run the command in"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.usage={description:"run a command using yarn's portable shell",details:` - This command will run a command using Yarn's portable shell. - - Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell. - - Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell. - - Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used. - - For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md. - `,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await BI(r,[],{cwd:ue.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var Kl,qde=Ct(()=>{Kl=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var DT={};Vt(DT,{fastGlobOptions:()=>Yde,isBraceExpansion:()=>Zj,isGlobPattern:()=>Kdt,match:()=>Jdt,micromatchOptions:()=>ST});function Kdt(t){if(!vT.default.scan(t,ST).isGlob)return!1;try{vT.default.parse(t,ST)}catch{return!1}return!0}function Jdt(t,{cwd:e,baseFs:r}){return(0,Gde.default)(t,{...Yde,cwd:ue.fromPortablePath(e),fs:gx(Wde.default,new n0(r))})}function Zj(t){return vT.default.scan(t,ST).isBrace}var Gde,Wde,vT,ST,Yde,Vde=Ct(()=>{bt();Gde=et(CQ()),Wde=et(Ie("fs")),vT=et(Sa()),ST={strictBrackets:!0},Yde={onlyDirectories:!1,onlyFiles:!1}});function Xj(){}function $j(){for(let t of am)t.kill()}function Zde(t,e,r,s){return a=>{let n=a[0]instanceof nA.Transform?"pipe":a[0],c=a[1]instanceof nA.Transform?"pipe":a[1],f=a[2]instanceof nA.Transform?"pipe":a[2],p=(0,Jde.default)(t,e,{...s,stdio:[n,c,f]});return am.add(p),am.size===1&&(process.on("SIGINT",Xj),process.on("SIGTERM",$j)),a[0]instanceof nA.Transform&&a[0].pipe(p.stdin),a[1]instanceof nA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof nA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(am.delete(p),am.size===0&&(process.off("SIGINT",Xj),process.off("SIGTERM",$j)),E.code){case"ENOENT":a[2].write(`command not found: ${t} -`),h(127);break;case"EACCES":a[2].write(`permission denied: ${t} -`),h(128);break;default:a[2].write(`uncaught error: ${E.message} -`),h(1);break}}),p.on("close",E=>{am.delete(p),am.size===0&&(process.off("SIGINT",Xj),process.off("SIGTERM",$j)),h(E!==null?E:129)})})}}}function Xde(t){return e=>{let r=e[0]==="pipe"?new nA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function bT(t,e){return t6.start(t,e)}function Kde(t,e=null){let r=new nA.PassThrough,s=new zde.StringDecoder,a="";return r.on("data",n=>{let c=s.write(n),f;do if(f=c.indexOf(` -`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",t(e!==null?`${e} ${p}`:p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function $de(t,{prefix:e}){return{stdout:Kde(r=>t.stdout.write(`${r} -`),t.stdout.isTTY?e:null),stderr:Kde(r=>t.stderr.write(`${r} -`),t.stderr.isTTY?e:null)}}var Jde,nA,zde,am,Mc,e6,t6,r6=Ct(()=>{Jde=et(j_()),nA=Ie("stream"),zde=Ie("string_decoder"),am=new Set;Mc=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},e6=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},t6=class t{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:s,stderr:a}){let n=new t(null,e);return n.stdin=r,n.stdout=s,n.stderr=a,n}pipeTo(e,r=1){let s=new t(this,e),a=new e6;return s.pipe=a,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let s;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");s=this.stderr,e[2]=s.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),s.close(),n))}async run(){let e=[];for(let s=this;s;s=s.ancestor)e.push(s.exec());return(await Promise.all(e))[0]}}});var Dv={};Vt(Dv,{EntryCommand:()=>Cv,ShellError:()=>Kl,execute:()=>BI,globUtils:()=>DT});function eme(t,e,r){let s=new Jl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(s,{end:!1}),(e&2)===2&&r.stdin instanceof Jl.Writable&&s.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stderr,{end:!1});break;default:throw new Kl(`Bad file descriptor: "${t}"`)}return s}function xT(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function Zdt(t,e,r){let s=[],a=new Jl.PassThrough;return a.on("data",n=>s.push(n)),await kT(t,e,xT(r,{stdout:a})),Buffer.concat(s).toString().replace(/[\r\n]+$/,"")}async function tme(t,e,r){let s=t.map(async n=>{let c=await lm(n.args,e,r);return{name:n.name,value:c.join(" ")}});return(await Promise.all(s)).reduce((n,c)=>(n[c.name]=c.value,n),{})}function PT(t){return t.match(/[^ \r\n\t]+/g)||[]}async function ame(t,e,r,s,a=s){switch(t.name){case"$":s(String(process.pid));break;case"#":s(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let c=PT(n);for(let f=0;f=0&&n"u"&&(t.defaultValue?c=(await lm(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(c="")),typeof c>"u")throw f?new Kl(`Unbound argument #${n}`):new Kl(`Unbound variable "${t.name}"`);if(t.quoted)s(c);else{let p=PT(c);for(let E=0;Es.push(n));let a=Number(s.join(" "));return Number.isNaN(a)?Bv({type:"variable",name:s.join(" ")},e,r):Bv({type:"number",value:a},e,r)}else return Xdt[t.type](await Bv(t.left,e,r),await Bv(t.right,e,r))}async function lm(t,e,r){let s=new Map,a=[],n=[],c=E=>{n.push(E)},f=()=>{n.length>0&&a.push(n.join("")),n=[]},p=E=>{c(E),f()},h=(E,C,S)=>{let P=JSON.stringify({type:E,fd:C}),I=s.get(P);typeof I>"u"&&s.set(P,I=[]),I.push(S)};for(let E of t){let C=!1;switch(E.type){case"redirection":{let S=await lm(E.args,e,r);for(let P of S)h(E.subtype,E.fd,P)}break;case"argument":for(let S of E.segments)switch(S.type){case"text":c(S.text);break;case"glob":c(S.pattern),C=!0;break;case"shell":{let P=await Zdt(S.shell,e,r);if(S.quoted)c(P);else{let I=PT(P);for(let R=0;R"u")throw new Error("Assertion failed: Expected a glob pattern to have been set");let P=await e.glob.match(S,{cwd:r.cwd,baseFs:e.baseFs});if(P.length===0){let I=Zj(S)?". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22":"";throw new Kl(`No matches found: "${S}"${I}`)}for(let I of P.sort())p(I)}}if(s.size>0){let E=[];for(let[C,S]of s.entries())E.splice(E.length,0,C,String(S.length),...S);a.splice(0,0,"__ysh_set_redirects",...E,"--")}return a}function vv(t,e,r){e.builtins.has(t[0])||(t=["command",...t]);let s=ue.fromPortablePath(r.cwd),a=r.environment;typeof a.PWD<"u"&&(a={...a,PWD:s});let[n,...c]=t;if(n==="command")return Zde(c[0],c.slice(1),e,{cwd:s,env:a});let f=e.builtins.get(n);if(typeof f>"u")throw new Error(`Assertion failed: A builtin should exist for "${n}"`);return Xde(async({stdin:p,stdout:h,stderr:E})=>{let{stdin:C,stdout:S,stderr:P}=r;r.stdin=p,r.stdout=h,r.stderr=E;try{return await f(c,e,r)}finally{r.stdin=C,r.stdout=S,r.stderr=P}})}function $dt(t,e,r){return s=>{let a=new Jl.PassThrough,n=kT(t,e,xT(r,{stdin:a}));return{stdin:a,promise:n}}}function emt(t,e,r){return s=>{let a=new Jl.PassThrough,n=kT(t,e,r);return{stdin:a,promise:n}}}function rme(t,e,r,s){if(e.length===0)return t;{let a;do a=String(Math.random());while(Object.hasOwn(s.procedures,a));return s.procedures={...s.procedures},s.procedures[a]=t,vv([...e,"__ysh_run_procedure",a],r,s)}}async function nme(t,e,r){let s=t,a=null,n=null;for(;s;){let c=s.then?{...r}:r,f;switch(s.type){case"command":{let p=await lm(s.args,e,r),h=await tme(s.envs,e,r);f=s.envs.length?vv(p,e,xT(c,{environment:h})):vv(p,e,c)}break;case"subshell":{let p=await lm(s.args,e,r),h=$dt(s.subshell,e,c);f=rme(h,p,e,c)}break;case"group":{let p=await lm(s.args,e,r),h=emt(s.group,e,c);f=rme(h,p,e,c)}break;case"envs":{let p=await tme(s.envs,e,r);c.environment={...c.environment,...p},f=vv(["true"],e,c)}break}if(typeof f>"u")throw new Error("Assertion failed: An action should have been generated");if(a===null)n=bT(f,{stdin:new Mc(c.stdin),stdout:new Mc(c.stdout),stderr:new Mc(c.stderr)});else{if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(a){case"|":n=n.pipeTo(f,1);break;case"|&":n=n.pipeTo(f,3);break}}s.then?(a=s.then.type,s=s.then.chain):s=null}if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");return await n.run()}async function tmt(t,e,r,{background:s=!1}={}){function a(n){let c=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],f=c[n%c.length];return ime.default.hex(f)}if(s){let n=r.nextBackgroundJobIndex++,c=a(n),f=`[${n}]`,p=c(f),{stdout:h,stderr:E}=$de(r,{prefix:p});return r.backgroundJobs.push(nme(t,e,xT(r,{stdout:h,stderr:E})).catch(C=>E.write(`${C.message} -`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${c(uE(t))}' has ended -`)})),0}return await nme(t,e,r)}async function rmt(t,e,r,{background:s=!1}={}){let a,n=f=>{a=f,r.variables["?"]=String(f)},c=async f=>{try{return await tmt(f.chain,e,r,{background:s&&typeof f.then>"u"})}catch(p){if(!(p instanceof Kl))throw p;return r.stderr.write(`${p.message} -`),1}};for(n(await c(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await c(t.then.line));break;case"||":a!==0&&n(await c(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function kT(t,e,r){let s=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:c}of t){if(a=await rmt(n,e,r,{background:c==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,a}function lme(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>Sv(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>Sv(e));case"arithmetic":return n6(t.arithmetic);case"shell":return i6(t.shell);default:return!1}}function Sv(t){switch(t.type){case"redirection":return t.args.some(e=>Sv(e));case"argument":return t.segments.some(e=>lme(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function n6(t){switch(t.type){case"variable":return lme(t);case"number":return!1;default:return n6(t.left)||n6(t.right)}}function i6(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let s;switch(r.type){case"subshell":s=i6(r.subshell);break;case"command":s=r.envs.some(a=>a.args.some(n=>Sv(n)))||r.args.some(a=>Sv(a));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function BI(t,e=[],{baseFs:r=new Yn,builtins:s={},cwd:a=ue.toPortablePath(process.cwd()),env:n=process.env,stdin:c=process.stdin,stdout:f=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=DT}={}){let C={};for(let[I,R]of Object.entries(n))typeof R<"u"&&(C[I]=R);let S=new Map(zdt);for(let[I,R]of Object.entries(s))S.set(I,R);c===null&&(c=new Jl.PassThrough,c.end());let P=yx(t,E);if(!i6(P)&&P.length>0&&e.length>0){let{command:I}=P[P.length-1];for(;I.then;)I=I.then.line;let R=I.chain;for(;R.then;)R=R.then.chain;R.type==="command"&&(R.args=R.args.concat(e.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await kT(P,{args:e,baseFs:r,builtins:S,initialStdin:c,initialStdout:f,initialStderr:p,glob:E},{cwd:a,environment:C,exitCode:null,procedures:{},stdin:c,stdout:f,stderr:p,variables:Object.assign({},h,{"?":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var ime,sme,Jl,ome,zdt,Xdt,wv=Ct(()=>{bt();Bc();ime=et(kE()),sme=Ie("os"),Jl=Ie("stream"),ome=Ie("timers/promises");jde();qde();Vde();r6();r6();zdt=new Map([["cd",async([t=(0,sme.homedir)(),...e],r,s)=>{let a=K.resolve(s.cwd,ue.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(c=>{throw c.code==="ENOENT"?new Kl(`cd: no such file or directory: ${t}`):c})).isDirectory())throw new Kl(`cd: not a directory: ${t}`);return s.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${ue.fromPortablePath(r.cwd)} -`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,s)=>s.exitCode=parseInt(t??s.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")} -`),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new Kl("sleep: missing operand");let s=Number(t);if(Number.isNaN(s))throw new Kl(`sleep: invalid time interval '${t}'`);return await(0,ome.setTimeout)(1e3*s,0)}],["unset",async(t,e,r)=>{for(let s of t)delete r.environment[s],delete r.variables[s];return 0}],["__ysh_run_procedure",async(t,e,r)=>{let s=r.procedures[t[0]];return await bT(s,{stdin:new Mc(r.stdin),stdout:new Mc(r.stdout),stderr:new Mc(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let s=r.stdin,a=r.stdout,n=r.stderr,c=[],f=[],p=[],h=0;for(;t[h]!=="--";){let C=t[h++],{type:S,fd:P}=JSON.parse(C),I=W=>{switch(P){case null:case 0:c.push(W);break;default:throw new Error(`Unsupported file descriptor: "${P}"`)}},R=W=>{switch(P){case null:case 1:f.push(W);break;case 2:p.push(W);break;default:throw new Error(`Unsupported file descriptor: "${P}"`)}},N=Number(t[h++]),U=h+N;for(let W=h;We.baseFs.createReadStream(K.resolve(r.cwd,ue.toPortablePath(t[W]))));break;case"<<<":I(()=>{let te=new Jl.PassThrough;return process.nextTick(()=>{te.write(`${t[W]} -`),te.end()}),te});break;case"<&":I(()=>eme(Number(t[W]),1,r));break;case">":case">>":{let te=K.resolve(r.cwd,ue.toPortablePath(t[W]));R(te==="/dev/null"?new Jl.Writable({autoDestroy:!0,emitClose:!0,write(ie,Ae,ce){setImmediate(ce)}}):e.baseFs.createWriteStream(te,S===">>"?{flags:"a"}:void 0))}break;case">&":R(eme(Number(t[W]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${S}"`)}}if(c.length>0){let C=new Jl.PassThrough;s=C;let S=P=>{if(P===c.length)C.end();else{let I=c[P]();I.pipe(C,{end:!1}),I.on("end",()=>{S(P+1)})}};S(0)}if(f.length>0){let C=new Jl.PassThrough;a=C;for(let S of f)C.pipe(S)}if(p.length>0){let C=new Jl.PassThrough;n=C;for(let S of p)C.pipe(S)}let E=await bT(vv(t.slice(h+1),e,r),{stdin:new Mc(s),stdout:new Mc(a),stderr:new Mc(n)}).run();return await Promise.all(f.map(C=>new Promise((S,P)=>{C.on("error",I=>{P(I)}),C.on("close",()=>{S()}),C.end()}))),await Promise.all(p.map(C=>new Promise((S,P)=>{C.on("error",I=>{P(I)}),C.on("close",()=>{S()}),C.end()}))),E}]]);Xdt={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var QT=L((DXt,cme)=>{function nmt(t,e){for(var r=-1,s=t==null?0:t.length,a=Array(s);++r{var ume=Gd(),imt=QT(),smt=xc(),omt=oI(),amt=1/0,fme=ume?ume.prototype:void 0,Ame=fme?fme.toString:void 0;function pme(t){if(typeof t=="string")return t;if(smt(t))return imt(t,pme)+"";if(omt(t))return Ame?Ame.call(t):"";var e=t+"";return e=="0"&&1/t==-amt?"-0":e}hme.exports=pme});var bv=L((PXt,dme)=>{var lmt=gme();function cmt(t){return t==null?"":lmt(t)}dme.exports=cmt});var s6=L((xXt,mme)=>{function umt(t,e,r){var s=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++s{var fmt=s6();function Amt(t,e,r){var s=t.length;return r=r===void 0?s:r,!e&&r>=s?t:fmt(t,e,r)}yme.exports=Amt});var o6=L((QXt,Ime)=>{var pmt="\\ud800-\\udfff",hmt="\\u0300-\\u036f",gmt="\\ufe20-\\ufe2f",dmt="\\u20d0-\\u20ff",mmt=hmt+gmt+dmt,ymt="\\ufe0e\\ufe0f",Emt="\\u200d",Imt=RegExp("["+Emt+pmt+mmt+ymt+"]");function Cmt(t){return Imt.test(t)}Ime.exports=Cmt});var wme=L((TXt,Cme)=>{function wmt(t){return t.split("")}Cme.exports=wmt});var kme=L((RXt,xme)=>{var Bme="\\ud800-\\udfff",Bmt="\\u0300-\\u036f",vmt="\\ufe20-\\ufe2f",Smt="\\u20d0-\\u20ff",Dmt=Bmt+vmt+Smt,bmt="\\ufe0e\\ufe0f",Pmt="["+Bme+"]",a6="["+Dmt+"]",l6="\\ud83c[\\udffb-\\udfff]",xmt="(?:"+a6+"|"+l6+")",vme="[^"+Bme+"]",Sme="(?:\\ud83c[\\udde6-\\uddff]){2}",Dme="[\\ud800-\\udbff][\\udc00-\\udfff]",kmt="\\u200d",bme=xmt+"?",Pme="["+bmt+"]?",Qmt="(?:"+kmt+"(?:"+[vme,Sme,Dme].join("|")+")"+Pme+bme+")*",Tmt=Pme+bme+Qmt,Rmt="(?:"+[vme+a6+"?",a6,Sme,Dme,Pmt].join("|")+")",Fmt=RegExp(l6+"(?="+l6+")|"+Rmt+Tmt,"g");function Nmt(t){return t.match(Fmt)||[]}xme.exports=Nmt});var Tme=L((FXt,Qme)=>{var Omt=wme(),Lmt=o6(),Mmt=kme();function _mt(t){return Lmt(t)?Mmt(t):Omt(t)}Qme.exports=_mt});var Fme=L((NXt,Rme)=>{var Umt=Eme(),Hmt=o6(),jmt=Tme(),qmt=bv();function Gmt(t){return function(e){e=qmt(e);var r=Hmt(e)?jmt(e):void 0,s=r?r[0]:e.charAt(0),a=r?Umt(r,1).join(""):e.slice(1);return s[t]()+a}}Rme.exports=Gmt});var Ome=L((OXt,Nme)=>{var Wmt=Fme(),Ymt=Wmt("toUpperCase");Nme.exports=Ymt});var c6=L((LXt,Lme)=>{var Vmt=bv(),Kmt=Ome();function Jmt(t){return Kmt(Vmt(t).toLowerCase())}Lme.exports=Jmt});var Mme=L((MXt,TT)=>{function zmt(){var t=0,e=1,r=2,s=3,a=4,n=5,c=6,f=7,p=8,h=9,E=10,C=11,S=12,P=13,I=14,R=15,N=16,U=17,W=0,te=1,ie=2,Ae=3,ce=4;function me(g,we){return 55296<=g.charCodeAt(we)&&g.charCodeAt(we)<=56319&&56320<=g.charCodeAt(we+1)&&g.charCodeAt(we+1)<=57343}function pe(g,we){we===void 0&&(we=0);var ye=g.charCodeAt(we);if(55296<=ye&&ye<=56319&&we=1){var fe=g.charCodeAt(we-1),se=ye;return 55296<=fe&&fe<=56319?(fe-55296)*1024+(se-56320)+65536:se}return ye}function Be(g,we,ye){var fe=[g].concat(we).concat([ye]),se=fe[fe.length-2],X=ye,De=fe.lastIndexOf(I);if(De>1&&fe.slice(1,De).every(function(j){return j==s})&&[s,P,U].indexOf(g)==-1)return ie;var Re=fe.lastIndexOf(a);if(Re>0&&fe.slice(1,Re).every(function(j){return j==a})&&[S,a].indexOf(se)==-1)return fe.filter(function(j){return j==a}).length%2==1?Ae:ce;if(se==t&&X==e)return W;if(se==r||se==t||se==e)return X==I&&we.every(function(j){return j==s})?ie:te;if(X==r||X==t||X==e)return te;if(se==c&&(X==c||X==f||X==h||X==E))return W;if((se==h||se==f)&&(X==f||X==p))return W;if((se==E||se==p)&&X==p)return W;if(X==s||X==R)return W;if(X==n)return W;if(se==S)return W;var dt=fe.indexOf(s)!=-1?fe.lastIndexOf(s)-1:fe.length-2;return[P,U].indexOf(fe[dt])!=-1&&fe.slice(dt+1,-1).every(function(j){return j==s})&&X==I||se==R&&[N,U].indexOf(X)!=-1?W:we.indexOf(a)!=-1?ie:se==a&&X==a?W:te}this.nextBreak=function(g,we){if(we===void 0&&(we=0),we<0)return 0;if(we>=g.length-1)return g.length;for(var ye=Ce(pe(g,we)),fe=[],se=we+1;se{var Zmt=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,RT;function Xmt(){if(RT)return RT;if(typeof Intl.Segmenter<"u"){let t=new Intl.Segmenter("en",{granularity:"grapheme"});return RT=e=>Array.from(t.segment(e),({segment:r})=>r)}else{let t=Mme(),e=new t;return RT=r=>e.splitGraphemes(r)}}_me.exports=(t,e=0,r=t.length)=>{if(e<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");let s=r-e,a="",n=0,c=0;for(;t.length>0;){let f=t.match(Zmt)||[t,t,void 0],p=Xmt()(f[1]),h=Math.min(e-n,p.length);p=p.slice(h);let E=Math.min(s-c,p.length);a+=p.slice(0,E).join(""),n+=h,c+=E,typeof f[2]<"u"&&(a+=f[2]),t=t.slice(f[0].length)}return a}});var un,Pv=Ct(()=>{un=process.env.YARN_IS_TEST_ENV?"0.0.0":"4.9.2"});function Yme(t,{configuration:e,json:r}){if(!e.get("enableMessageNames"))return"";let a=Vf(t===null?0:t);return!r&&t===null?Ut(e,a,"grey"):a}function u6(t,{configuration:e,json:r}){let s=Yme(t,{configuration:e,json:r});if(!s||t===null||t===0)return s;let a=Dr[t],n=`https://yarnpkg.com/advanced/error-codes#${s}---${a}`.toLowerCase();return KE(e,s,n)}async function vI({configuration:t,stdout:e,forceError:r},s){let a=await Ot.start({configuration:t,stdout:e,includeFooter:!1},async n=>{let c=!1,f=!1;for(let p of s)typeof p.option<"u"&&(p.error||r?(f=!0,n.reportError(50,p.message)):(c=!0,n.reportWarning(50,p.message)),p.callback?.());c&&!f&&n.reportSeparator()});return a.hasErrors()?a.exitCode():null}var Gme,FT,$mt,Hme,jme,S0,Wme,qme,eyt,tyt,NT,ryt,Ot,xv=Ct(()=>{Gme=et(Ume()),FT=et(Rd());Zx();Fc();Pv();Qc();$mt="\xB7",Hme=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],jme=80,S0=FT.default.GITHUB_ACTIONS?{start:t=>`::group::${t} -`,end:t=>`::endgroup:: -`}:FT.default.TRAVIS?{start:t=>`travis_fold:start:${t} -`,end:t=>`travis_fold:end:${t} -`}:FT.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${t} -`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,Wme=S0!==null,qme=new Date,eyt=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,tyt=t=>t,NT=tyt({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),ryt=eyt&&Object.keys(NT).find(t=>{let e=NT[t];return!(e.date&&(e.date[0]!==qme.getDate()||e.date[1]!==qme.getMonth()+1))})||"default";Ot=class extends ho{constructor({configuration:r,stdout:s,json:a=!1,forceSectionAlignment:n=!1,includeNames:c=!0,includePrefix:f=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:C=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(HB(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=c,this.includePrefix=f,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=C,this.json=a,this.stdout=s,r.get("enableProgressBars")&&!a&&s.isTTY&&s.columns>22){let S=r.get("progressBarStyle")||ryt;if(!Object.hasOwn(NT,S))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=NT[S];let P=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*P/80)}}static async start(r,s){let a=new this(r),n=process.emitWarning;process.emitWarning=(c,f)=>{if(typeof c!="string"){let h=c;c=h.message,f=f??h.name}let p=typeof f<"u"?`${f}: ${c}`:c;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,Kd(r.configuration,`Yarn ${un}`,2));try{await s(a)}catch(c){a.reportExceptionOnce(c)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let s=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,s-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}async startSectionPromise({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}startTimerImpl(r,s,a){return{cb:typeof s=="function"?s:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,S0!==null&&!this.json&&this.includeInfos&&this.stdout.write(S0.start(r))},reportFooter:f=>{if(this.indent-=1,S0!==null&&!this.json&&this.includeInfos){this.stdout.write(S0.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&f>200?this.reportInfo(null,`\u2514 Completed in ${Ut(this.configuration,f,pt.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof s=="function"?{}:s).skipIfEmpty}}startTimerSync(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionSync(c,n)}async startTimerPromise(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionPromise(c,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,s){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",c=`${this.formatPrefix(n,"blueBright")}${s}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(c)}reportWarning(r,s){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"yellowBright")}${s}`)}reportError(r,s){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,s)),this.reportErrorImpl(r,s)}reportErrorImpl(r,s){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"redBright")}${s}`,{truncate:!1})}reportFold(r,s){if(!S0)return;let a=`${S0.start(r)}${s}${S0.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)return{...Promise.resolve(),stop:()=>{}};if(r.hasProgress&&r.hasTitle)throw new Error("Unimplemented: Progress bars can't have both progress and titles.");let s=!1,a=Promise.resolve().then(async()=>{let c={progress:r.hasProgress?0:void 0,title:r.hasTitle?"":void 0};this.progress.set(r,{definition:c,lastScaledSize:r.hasProgress?-1:void 0,lastTitle:void 0}),this.refreshProgress({delta:-1});for await(let{progress:f,title:p}of r)s||c.progress===f&&c.title===p||(c.progress=f,c.title=p,this.refreshProgress());n()}),n=()=>{s||(s=!0,this.progress.delete(r),this.refreshProgress({delta:1}))};return{...a,stop:n}}reportJson(r){this.json&&this.writeLine(`${JSON.stringify(r)}`)}async finalize(){if(!this.includeFooter)return;let r="";this.errorCount>0?r="Failed with errors":this.warningCount>0?r="Done with warnings":r="Done";let s=Ut(this.configuration,Date.now()-this.startTime,pt.DURATION),a=this.configuration.get("enableTimers")?`${r} in ${s}`:r;this.errorCount>0?this.reportError(0,a):this.warningCount>0?this.reportWarning(0,a):this.reportInfo(0,a)}writeLine(r,{truncate:s}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(r,{truncate:s})} -`),this.writeProgress()}writeLines(r,{truncate:s}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:s})} -`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let s of r)s.committed=!0,s.action()}clearProgress({delta:r=0,clear:s=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||s)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>jme&&(this.progressFrame=(this.progressFrame+1)%Hme.length,this.progressTime=r);let s=Hme[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let c=this.formatName(null),f=c?`${c}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Ut(this.configuration,"\u27A4","blueBright")} ${f}${s}${n}${p} -`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},jme)}refreshProgress({delta:r=0,force:s=!1}={}){let a=!1,n=!1;if(s||this.progress.size===0)a=!0;else for(let c of this.progress.values()){let f=typeof c.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*c.definition.progress):void 0,p=c.lastScaledSize;c.lastScaledSize=f;let h=c.lastTitle;if(c.lastTitle=c.definition.title,f!==p||(n=h!==c.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:s}={}){return this.progressStyle===null&&(s=!1),typeof s>"u"&&(s=this.configuration.get("preferTruncatedLines")),s&&(r=(0,Gme.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Yme(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,s){return this.includePrefix?`${Ut(this.configuration,"\u27A4",s)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?u6(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${$mt} `}}});var In={};Vt(In,{PackageManager:()=>Jme,detectPackageManager:()=>zme,executePackageAccessibleBinary:()=>tye,executePackageScript:()=>OT,executePackageShellcode:()=>f6,executeWorkspaceAccessibleBinary:()=>cyt,executeWorkspaceLifecycleScript:()=>$me,executeWorkspaceScript:()=>Xme,getPackageAccessibleBinaries:()=>LT,getWorkspaceAccessibleBinaries:()=>eye,hasPackageScript:()=>oyt,hasWorkspaceScript:()=>A6,isNodeScript:()=>p6,makeScriptEnv:()=>kv,maybeExecuteWorkspaceLifecycleScript:()=>lyt,prepareExternalProject:()=>syt});async function D0(t,e,r,s=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${s.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await le.writeFilePromise(K.format({dir:t,name:e,ext:".cmd"}),a)}await le.writeFilePromise(K.join(t,e),`#!/bin/sh -exec "${r}" ${s.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@" -`,{mode:493})}async function zme(t){let e=await Ht.tryFind(t);if(e?.packageManager){let s=bQ(e.packageManager);if(s?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=s.reference.split(".");switch(s.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await le.readFilePromise(K.join(t,Er.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:le.existsSync(K.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:le.existsSync(K.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function kv({project:t,locator:e,binFolder:r,ignoreCorepack:s,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let c={};for(let[E,C]of Object.entries(n))typeof C<"u"&&(c[E.toLowerCase()!=="path"?E:"PATH"]=C);let f=ue.fromPortablePath(r);c.BERRY_BIN_FOLDER=ue.fromPortablePath(f);let p=process.env.COREPACK_ROOT&&!s?ue.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([D0(r,"node",process.execPath),...un!==null?[D0(r,"run",process.execPath,[p,"run"]),D0(r,"yarn",process.execPath,[p]),D0(r,"yarnpkg",process.execPath,[p]),D0(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),t&&(c.INIT_CWD=ue.fromPortablePath(t.configuration.startingCwd),c.PROJECT_CWD=ue.fromPortablePath(t.cwd)),c.PATH=c.PATH?`${f}${ue.delimiter}${c.PATH}`:`${f}`,c.npm_execpath=`${f}${ue.sep}yarn`,c.npm_node_execpath=`${f}${ue.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let E=t.tryWorkspaceByLocator(e),C=E?E.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";c.npm_package_name=cn(e),c.npm_package_version=C;let S;if(E)S=E.cwd;else{let P=t.storedPackages.get(e.locatorHash);if(!P)throw new Error(`Package for ${Yr(t.configuration,e)} not found in the project`);let I=t.configuration.getLinkers(),R={project:t,report:new Ot({stdout:new b0.PassThrough,configuration:t.configuration})},N=I.find(U=>U.supportsPackage(P,R));if(!N)throw new Error(`The package ${Yr(t.configuration,P)} isn't supported by any of the available linkers`);S=await N.findPackageLocation(P,R)}c.npm_package_json=ue.fromPortablePath(K.join(S,Er.manifest))}let h=un!==null?`yarn/${un}`:`yarn/${kp("@yarnpkg/core").version}-core`;return c.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(c.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,c,async(E,C,S)=>await D0(r,E,C,S)),c}async function syt(t,e,{configuration:r,report:s,workspace:a=null,locator:n=null}){await iyt(async()=>{await le.mktempPromise(async c=>{let f=K.join(c,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(f,{prefix:ue.fromPortablePath(t),report:s}),C=n&&Gu(n)?tI(n):n,S=C?cl(C):"an external project";h.write(`Packing ${S} from sources -`);let P=await zme(t),I;P!==null?(h.write(`Using ${P.packageManager} for bootstrap. Reason: ${P.reason} - -`),I=P.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn - -`),I="Yarn");let R=I==="Yarn"&&!P?.packageManagerField;await le.mktempPromise(async N=>{let U=await kv({binFolder:N,ignoreCorepack:R,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:"0"}}),te=new Map([["Yarn Classic",async()=>{let Ae=a!==null?["workspace",a]:[],ce=K.join(t,Er.manifest),me=await le.readFilePromise(ce),pe=await Yu(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(pe.code!==0)return pe.code;await le.writeFilePromise(ce,me),await le.appendFilePromise(K.join(t,".npmignore"),`/.yarn -`),h.write(` -`),delete U.NODE_ENV;let Be=await Yu("yarn",["install"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Be.code!==0)return Be.code;h.write(` -`);let Ce=await Yu("yarn",[...Ae,"pack","--filename",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ce.code!==0?Ce.code:0}],["Yarn",async()=>{let Ae=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let ce=K.join(t,Er.lockfile);await le.existsPromise(ce)||await le.writeFilePromise(ce,"");let me=await Yu("yarn",[...Ae,"pack","--install-if-needed","--filename",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return me.code!==0?me.code:0}],["npm",async()=>{if(a!==null){let we=new b0.PassThrough,ye=GE(we);we.pipe(h,{end:!1});let fe=await Yu("npm",["--version"],{cwd:t,env:U,stdin:p,stdout:we,stderr:E,end:0});if(we.end(),fe.code!==0)return h.end(),E.end(),fe.code;let se=(await ye).toString().trim();if(!eA(se,">=7.x")){let X=ba(null,"npm"),De=On(X,se),Re=On(X,">=7.x");throw new Error(`Workspaces aren't supported by ${ni(r,De)}; please upgrade to ${ni(r,Re)} (npm has been detected as the primary package manager for ${Ut(r,t,pt.PATH)})`)}}let Ae=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ce=await Yu("npm",["install","--legacy-peer-deps"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ce.code!==0)return ce.code;let me=new b0.PassThrough,pe=GE(me);me.pipe(h);let Be=await Yu("npm",["pack","--silent",...Ae],{cwd:t,env:U,stdin:p,stdout:me,stderr:E});if(Be.code!==0)return Be.code;let Ce=(await pe).toString().trim().replace(/^.*\n/s,""),g=K.resolve(t,ue.toPortablePath(Ce));return await le.renamePromise(g,e),0}]]).get(I);if(typeof te>"u")throw new Error("Assertion failed: Unsupported workflow");let ie=await te();if(!(ie===0||typeof ie>"u"))throw le.detachTemp(c),new Yt(58,`Packing the package failed (exit code ${ie}, logs can be found here: ${Ut(r,f,pt.PATH)})`)})})})}async function oyt(t,e,{project:r}){let s=r.tryWorkspaceByLocator(t);if(s!==null)return A6(s,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r.configuration,t)} not found in the project`);return await tA.openPromise(async n=>{let c=r.configuration,f=r.configuration.getLinkers(),p={project:r,report:new Ot({stdout:new b0.PassThrough,configuration:c})},h=f.find(P=>P.supportsPackage(a,p));if(!h)throw new Error(`The package ${Yr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),C=new Sn(E,{baseFs:n});return(await Ht.find(vt.dot,{baseFs:C})).scripts.has(e)})}async function OT(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{manifest:h,env:E,cwd:C}=await Zme(t,{project:a,binFolder:p,cwd:s,lifecycleScript:e}),S=h.scripts.get(e);if(typeof S>"u")return 1;let P=async()=>await BI(S,r,{cwd:C,env:E,stdin:n,stdout:c,stderr:f});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,P,a,t,e,{script:S,args:r,cwd:C,env:E,stdin:n,stdout:c,stderr:f}))()})}async function f6(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{env:h,cwd:E}=await Zme(t,{project:a,binFolder:p,cwd:s});return await BI(e,r,{cwd:E,env:h,stdin:n,stdout:c,stderr:f})})}async function ayt(t,{binFolder:e,cwd:r,lifecycleScript:s}){let a=await kv({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:s});return await h6(e,await eye(t)),typeof r>"u"&&(r=K.dirname(await le.realpathPromise(K.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function Zme(t,{project:e,binFolder:r,cwd:s,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return ayt(n,{binFolder:r,cwd:s,lifecycleScript:a});let c=e.storedPackages.get(t.locatorHash);if(!c)throw new Error(`Package for ${Yr(e.configuration,t)} not found in the project`);return await tA.openPromise(async f=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Ot({stdout:new b0.PassThrough,configuration:p})},C=h.find(N=>N.supportsPackage(c,E));if(!C)throw new Error(`The package ${Yr(e.configuration,c)} isn't supported by any of the available linkers`);let S=await kv({project:e,locator:t,binFolder:r,lifecycleScript:a});await h6(r,await LT(t,{project:e}));let P=await C.findPackageLocation(c,E),I=new Sn(P,{baseFs:f}),R=await Ht.find(vt.dot,{baseFs:I});return typeof s>"u"&&(s=P),{manifest:R,binFolder:r,env:S,cwd:s}})}async function Xme(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c}){return await OT(t.anchoredLocator,e,r,{cwd:s,project:t.project,stdin:a,stdout:n,stderr:c})}function A6(t,e){return t.manifest.scripts.has(e)}async function $me(t,e,{cwd:r,report:s}){let{configuration:a}=t.project,n=null;await le.mktempPromise(async c=>{let f=K.join(c,`${e}.log`),p=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${ue.fromPortablePath(t.cwd)}") -`,{stdout:h,stderr:E}=a.getSubprocessStreams(f,{report:s,prefix:Yr(a,t.anchoredLocator),header:p});s.reportInfo(36,`Calling the "${e}" lifecycle script`);let C=await Xme(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),C!==0)throw le.detachTemp(c),new Yt(36,`${(0,Vme.default)(e)} script failed (exit code ${Ut(a,C,pt.NUMBER)}, logs can be found here: ${Ut(a,f,pt.PATH)}); run ${Ut(a,`yarn ${e}`,pt.CODE)} to investigate`)})}async function lyt(t,e,r){A6(t,e)&&await $me(t,e,r)}function p6(t){let e=K.extname(t);if(e.match(/\.[cm]?[jt]sx?$/))return!0;if(e===".exe"||e===".bin")return!1;let r=Buffer.alloc(4),s;try{s=le.openSync(t,"r")}catch{return!0}try{le.readSync(s,r,0,r.length,0)}finally{le.closeSync(s)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function LT(t,{project:e}){let r=e.configuration,s=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r,t)} not found in the project`);let n=new b0.Writable,c=r.getLinkers(),f={project:e,report:new Ot({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let C=e.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(`Assertion failed: The resolution (${ni(r,E)}) should have been registered`);p.add(C)}let h=await Promise.all(Array.from(p,async E=>{let C=e.storedPackages.get(E);if(!C)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(C.bin.size===0)return Yl.skip;let S=c.find(I=>I.supportsPackage(C,f));if(!S)return Yl.skip;let P=null;try{P=await S.findPackageLocation(C,f)}catch(I){if(I.code==="LOCATOR_NOT_INSTALLED")return Yl.skip;throw I}return{dependency:C,packageLocation:P}}));for(let E of h){if(E===Yl.skip)continue;let{dependency:C,packageLocation:S}=E;for(let[P,I]of C.bin){let R=K.resolve(S,I);s.set(P,[C,ue.fromPortablePath(R),p6(R)])}}return s}async function eye(t){return await LT(t.anchoredLocator,{project:t.project})}async function h6(t,e){await Promise.all(Array.from(e,([r,[,s,a]])=>a?D0(t,r,process.execPath,[s]):D0(t,r,s,[])))}async function tye(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await LT(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${Yr(a.configuration,t)}`);return await le.mktempPromise(async C=>{let[,S]=E,P=await kv({project:a,locator:t,binFolder:C});await h6(P.BERRY_BIN_FOLDER,h);let I=p6(ue.toPortablePath(S))?Yu(process.execPath,[...p,S,...r],{cwd:s,env:P,stdin:n,stdout:c,stderr:f}):Yu(S,r,{cwd:s,env:P,stdin:n,stdout:c,stderr:f}),R;try{R=await I}finally{await le.removePromise(P.BERRY_BIN_FOLDER)}return R.code})}async function cyt(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f}){return await tye(t.anchoredLocator,e,r,{project:t.project,cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f})}var Vme,Kme,b0,Jme,nyt,iyt,g6=Ct(()=>{bt();bt();rA();wv();Vme=et(c6()),Kme=et(Od()),b0=Ie("stream");sI();Fc();xv();Pv();hT();Qc();kc();Np();Yo();Jme=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(Jme||{});nyt=2,iyt=(0,Kme.default)(nyt)});var SI=L((o$t,nye)=>{"use strict";var rye=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);nye.exports=t=>t?Object.keys(t).map(e=>[rye.has(e)?rye.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var bI=L((a$t,Aye)=>{"use strict";var iye=typeof process=="object"&&process?process:{stdout:null,stderr:null},uyt=Ie("events"),sye=Ie("stream"),oye=Ie("string_decoder").StringDecoder,jp=Symbol("EOF"),qp=Symbol("maybeEmitEnd"),P0=Symbol("emittedEnd"),MT=Symbol("emittingEnd"),Qv=Symbol("emittedError"),_T=Symbol("closed"),aye=Symbol("read"),UT=Symbol("flush"),lye=Symbol("flushChunk"),fl=Symbol("encoding"),Gp=Symbol("decoder"),HT=Symbol("flowing"),Tv=Symbol("paused"),DI=Symbol("resume"),Ks=Symbol("bufferLength"),d6=Symbol("bufferPush"),m6=Symbol("bufferShift"),zo=Symbol("objectMode"),Zo=Symbol("destroyed"),y6=Symbol("emitData"),cye=Symbol("emitEnd"),E6=Symbol("emitEnd2"),Wp=Symbol("async"),Rv=t=>Promise.resolve().then(t),uye=global._MP_NO_ITERATOR_SYMBOLS_!=="1",fyt=uye&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),Ayt=uye&&Symbol.iterator||Symbol("iterator not implemented"),pyt=t=>t==="end"||t==="finish"||t==="prefinish",hyt=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,gyt=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),jT=class{constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[DI](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},I6=class extends jT{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit("error",a),e.on("error",this.proxyErrors)}};Aye.exports=class fye extends sye{constructor(e){super(),this[HT]=!1,this[Tv]=!1,this.pipes=[],this.buffer=[],this[zo]=e&&e.objectMode||!1,this[zo]?this[fl]=null:this[fl]=e&&e.encoding||null,this[fl]==="buffer"&&(this[fl]=null),this[Wp]=e&&!!e.async||!1,this[Gp]=this[fl]?new oye(this[fl]):null,this[jp]=!1,this[P0]=!1,this[MT]=!1,this[_T]=!1,this[Qv]=null,this.writable=!0,this.readable=!0,this[Ks]=0,this[Zo]=!1}get bufferLength(){return this[Ks]}get encoding(){return this[fl]}set encoding(e){if(this[zo])throw new Error("cannot set encoding in objectMode");if(this[fl]&&e!==this[fl]&&(this[Gp]&&this[Gp].lastNeed||this[Ks]))throw new Error("cannot change encoding");this[fl]!==e&&(this[Gp]=e?new oye(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Gp].write(r)))),this[fl]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[zo]}set objectMode(e){this[zo]=this[zo]||!!e}get async(){return this[Wp]}set async(e){this[Wp]=this[Wp]||!!e}write(e,r,s){if(this[jp])throw new Error("write after end");if(this[Zo])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(s=r,r="utf8"),r||(r="utf8");let a=this[Wp]?Rv:n=>n();return!this[zo]&&!Buffer.isBuffer(e)&&(gyt(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):hyt(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[zo]?(this.flowing&&this[Ks]!==0&&this[UT](!0),this.flowing?this.emit("data",e):this[d6](e),this[Ks]!==0&&this.emit("readable"),s&&a(s),this.flowing):e.length?(typeof e=="string"&&!(r===this[fl]&&!this[Gp].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[fl]&&(e=this[Gp].write(e)),this.flowing&&this[Ks]!==0&&this[UT](!0),this.flowing?this.emit("data",e):this[d6](e),this[Ks]!==0&&this.emit("readable"),s&&a(s),this.flowing):(this[Ks]!==0&&this.emit("readable"),s&&a(s),this.flowing)}read(e){if(this[Zo])return null;if(this[Ks]===0||e===0||e>this[Ks])return this[qp](),null;this[zo]&&(e=null),this.buffer.length>1&&!this[zo]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[Ks])]);let r=this[aye](e||null,this.buffer[0]);return this[qp](),r}[aye](e,r){return e===r.length||e===null?this[m6]():(this.buffer[0]=r.slice(e),r=r.slice(0,e),this[Ks]-=e),this.emit("data",r),!this.buffer.length&&!this[jp]&&this.emit("drain"),r}end(e,r,s){return typeof e=="function"&&(s=e,e=null),typeof r=="function"&&(s=r,r="utf8"),e&&this.write(e,r),s&&this.once("end",s),this[jp]=!0,this.writable=!1,(this.flowing||!this[Tv])&&this[qp](),this}[DI](){this[Zo]||(this[Tv]=!1,this[HT]=!0,this.emit("resume"),this.buffer.length?this[UT]():this[jp]?this[qp]():this.emit("drain"))}resume(){return this[DI]()}pause(){this[HT]=!1,this[Tv]=!0}get destroyed(){return this[Zo]}get flowing(){return this[HT]}get paused(){return this[Tv]}[d6](e){this[zo]?this[Ks]+=1:this[Ks]+=e.length,this.buffer.push(e)}[m6](){return this.buffer.length&&(this[zo]?this[Ks]-=1:this[Ks]-=this.buffer[0].length),this.buffer.shift()}[UT](e){do;while(this[lye](this[m6]()));!e&&!this.buffer.length&&!this[jp]&&this.emit("drain")}[lye](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[Zo])return;let s=this[P0];return r=r||{},e===iye.stdout||e===iye.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this.pipes.push(r.proxyErrors?new I6(this,e,r):new jT(this,e,r)),this[Wp]?Rv(()=>this[DI]()):this[DI]()),e}unpipe(e){let r=this.pipes.find(s=>s.dest===e);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);return e==="data"&&!this.pipes.length&&!this.flowing?this[DI]():e==="readable"&&this[Ks]!==0?super.emit("readable"):pyt(e)&&this[P0]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[Qv]&&(this[Wp]?Rv(()=>r.call(this,this[Qv])):r.call(this,this[Qv])),s}get emittedEnd(){return this[P0]}[qp](){!this[MT]&&!this[P0]&&!this[Zo]&&this.buffer.length===0&&this[jp]&&(this[MT]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[_T]&&this.emit("close"),this[MT]=!1)}emit(e,r,...s){if(e!=="error"&&e!=="close"&&e!==Zo&&this[Zo])return;if(e==="data")return r?this[Wp]?Rv(()=>this[y6](r)):this[y6](r):!1;if(e==="end")return this[cye]();if(e==="close"){if(this[_T]=!0,!this[P0]&&!this[Zo])return;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Qv]=r;let n=super.emit("error",r);return this[qp](),n}else if(e==="resume"){let n=super.emit("resume");return this[qp](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,r,...s);return this[qp](),a}[y6](e){for(let s of this.pipes)s.dest.write(e)===!1&&this.pause();let r=super.emit("data",e);return this[qp](),r}[cye](){this[P0]||(this[P0]=!0,this.readable=!1,this[Wp]?Rv(()=>this[E6]()):this[E6]())}[E6](){if(this[Gp]){let r=this[Gp].end();if(r){for(let s of this.pipes)s.dest.write(r);super.emit("data",r)}}for(let r of this.pipes)r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[zo]||(e.dataLength=0);let r=this.promise();return this.on("data",s=>{e.push(s),this[zo]||(e.dataLength+=s.length)}),r.then(()=>e)}concat(){return this[zo]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[zo]?Promise.reject(new Error("cannot concat in objectMode")):this[fl]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Zo,()=>r(new Error("stream destroyed"))),this.on("error",s=>r(s)),this.on("end",()=>e())})}[fyt](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[jp])return Promise.resolve({done:!0});let s=null,a=null,n=h=>{this.removeListener("data",c),this.removeListener("end",f),a(h)},c=h=>{this.removeListener("error",n),this.removeListener("end",f),this.pause(),s({value:h,done:!!this[jp]})},f=()=>{this.removeListener("error",n),this.removeListener("data",c),s({done:!0})},p=()=>n(new Error("stream destroyed"));return new Promise((h,E)=>{a=E,s=h,this.once(Zo,p),this.once("error",n),this.once("end",f),this.once("data",c)})}}}[Ayt](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Zo]?(e?this.emit("error",e):this.emit(Zo),this):(this[Zo]=!0,this.buffer.length=0,this[Ks]=0,typeof this.close=="function"&&!this[_T]&&this.close(),e?this.emit("error",e):this.emit(Zo),this)}static isStream(e){return!!e&&(e instanceof fye||e instanceof sye||e instanceof uyt&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var hye=L((l$t,pye)=>{var dyt=Ie("zlib").constants||{ZLIB_VERNUM:4736};pye.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},dyt))});var O6=L(zl=>{"use strict";var S6=Ie("assert"),x0=Ie("buffer").Buffer,mye=Ie("zlib"),cm=zl.constants=hye(),myt=bI(),gye=x0.concat,um=Symbol("_superWrite"),xI=class extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},yyt=Symbol("opts"),Fv=Symbol("flushFlag"),dye=Symbol("finishFlushFlag"),N6=Symbol("fullFlushFlag"),Ii=Symbol("handle"),qT=Symbol("onError"),PI=Symbol("sawError"),C6=Symbol("level"),w6=Symbol("strategy"),B6=Symbol("ended"),c$t=Symbol("_defaultFullFlush"),GT=class extends myt{constructor(e,r){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e),this[PI]=!1,this[B6]=!1,this[yyt]=e,this[Fv]=e.flush,this[dye]=e.finishFlush;try{this[Ii]=new mye[r](e)}catch(s){throw new xI(s)}this[qT]=s=>{this[PI]||(this[PI]=!0,this.close(),this.emit("error",s))},this[Ii].on("error",s=>this[qT](new xI(s))),this.once("end",()=>this.close)}close(){this[Ii]&&(this[Ii].close(),this[Ii]=null,this.emit("close"))}reset(){if(!this[PI])return S6(this[Ii],"zlib binding closed"),this[Ii].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[N6]),this.write(Object.assign(x0.alloc(0),{[Fv]:e})))}end(e,r,s){return e&&this.write(e,r),this.flush(this[dye]),this[B6]=!0,super.end(null,null,s)}get ended(){return this[B6]}write(e,r,s){if(typeof r=="function"&&(s=r,r="utf8"),typeof e=="string"&&(e=x0.from(e,r)),this[PI])return;S6(this[Ii],"zlib binding closed");let a=this[Ii]._handle,n=a.close;a.close=()=>{};let c=this[Ii].close;this[Ii].close=()=>{},x0.concat=h=>h;let f;try{let h=typeof e[Fv]=="number"?e[Fv]:this[Fv];f=this[Ii]._processChunk(e,h),x0.concat=gye}catch(h){x0.concat=gye,this[qT](new xI(h))}finally{this[Ii]&&(this[Ii]._handle=a,a.close=n,this[Ii].close=c,this[Ii].removeAllListeners("error"))}this[Ii]&&this[Ii].on("error",h=>this[qT](new xI(h)));let p;if(f)if(Array.isArray(f)&&f.length>0){p=this[um](x0.from(f[0]));for(let h=1;h{this.flush(a),n()};try{this[Ii].params(e,r)}finally{this[Ii].flush=s}this[Ii]&&(this[C6]=e,this[w6]=r)}}}},D6=class extends Yp{constructor(e){super(e,"Deflate")}},b6=class extends Yp{constructor(e){super(e,"Inflate")}},v6=Symbol("_portable"),P6=class extends Yp{constructor(e){super(e,"Gzip"),this[v6]=e&&!!e.portable}[um](e){return this[v6]?(this[v6]=!1,e[9]=255,super[um](e)):super[um](e)}},x6=class extends Yp{constructor(e){super(e,"Gunzip")}},k6=class extends Yp{constructor(e){super(e,"DeflateRaw")}},Q6=class extends Yp{constructor(e){super(e,"InflateRaw")}},T6=class extends Yp{constructor(e){super(e,"Unzip")}},WT=class extends GT{constructor(e,r){e=e||{},e.flush=e.flush||cm.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||cm.BROTLI_OPERATION_FINISH,super(e,r),this[N6]=cm.BROTLI_OPERATION_FLUSH}},R6=class extends WT{constructor(e){super(e,"BrotliCompress")}},F6=class extends WT{constructor(e){super(e,"BrotliDecompress")}};zl.Deflate=D6;zl.Inflate=b6;zl.Gzip=P6;zl.Gunzip=x6;zl.DeflateRaw=k6;zl.InflateRaw=Q6;zl.Unzip=T6;typeof mye.BrotliCompress=="function"?(zl.BrotliCompress=R6,zl.BrotliDecompress=F6):zl.BrotliCompress=zl.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var kI=L((A$t,yye)=>{var Eyt=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;yye.exports=Eyt!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/")});var YT=L((h$t,Eye)=>{"use strict";var Iyt=bI(),L6=kI(),M6=Symbol("slurp");Eye.exports=class extends Iyt{constructor(e,r,s){switch(super(),this.pause(),this.extended=r,this.globalExtended=s,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=L6(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=L6(e.linkpath),this.uname=e.uname,this.gname=e.gname,r&&this[M6](r),s&&this[M6](s,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let s=this.remain,a=this.blockRemain;return this.remain=Math.max(0,s-r),this.blockRemain=Math.max(0,a-r),this.ignore?!0:s>=r?super.write(e):super.write(e.slice(0,s))}[M6](e,r){for(let s in e)e[s]!==null&&e[s]!==void 0&&!(r&&s==="path")&&(this[s]=s==="path"||s==="linkpath"?L6(e[s]):e[s])}}});var _6=L(VT=>{"use strict";VT.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);VT.code=new Map(Array.from(VT.name).map(t=>[t[1],t[0]]))});var Bye=L((d$t,wye)=>{"use strict";var Cyt=(t,e)=>{if(Number.isSafeInteger(t))t<0?Byt(t,e):wyt(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},wyt=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},Byt=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var s=e.length;s>1;s--){var a=t&255;t=Math.floor(t/256),r?e[s-1]=Iye(a):a===0?e[s-1]=0:(r=!0,e[s-1]=Cye(a))}},vyt=t=>{let e=t[0],r=e===128?Dyt(t.slice(1,t.length)):e===255?Syt(t):null;if(r===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(r))throw Error("parsed number outside of javascript safe integer range");return r},Syt=t=>{for(var e=t.length,r=0,s=!1,a=e-1;a>-1;a--){var n=t[a],c;s?c=Iye(n):n===0?c=n:(s=!0,c=Cye(n)),c!==0&&(r-=c*Math.pow(256,e-a-1))}return r},Dyt=t=>{for(var e=t.length,r=0,s=e-1;s>-1;s--){var a=t[s];a!==0&&(r+=a*Math.pow(256,e-s-1))}return r},Iye=t=>(255^t)&255,Cye=t=>(255^t)+1&255;wye.exports={encode:Cyt,parse:vyt}});var TI=L((m$t,Sye)=>{"use strict";var U6=_6(),QI=Ie("path").posix,vye=Bye(),H6=Symbol("slurp"),Zl=Symbol("type"),G6=class{constructor(e,r,s,a){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[Zl]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,s,a):e&&this.set(e)}decode(e,r,s,a){if(r||(r=0),!e||!(e.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=fm(e,r,100),this.mode=k0(e,r+100,8),this.uid=k0(e,r+108,8),this.gid=k0(e,r+116,8),this.size=k0(e,r+124,12),this.mtime=j6(e,r+136,12),this.cksum=k0(e,r+148,12),this[H6](s),this[H6](a,!0),this[Zl]=fm(e,r+156,1),this[Zl]===""&&(this[Zl]="0"),this[Zl]==="0"&&this.path.substr(-1)==="/"&&(this[Zl]="5"),this[Zl]==="5"&&(this.size=0),this.linkpath=fm(e,r+157,100),e.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=fm(e,r+265,32),this.gname=fm(e,r+297,32),this.devmaj=k0(e,r+329,8),this.devmin=k0(e,r+337,8),e[r+475]!==0){let c=fm(e,r+345,155);this.path=c+"/"+this.path}else{let c=fm(e,r+345,130);c&&(this.path=c+"/"+this.path),this.atime=j6(e,r+476,12),this.ctime=j6(e,r+488,12)}let n=8*32;for(let c=r;c=r+512))throw new Error("need 512 bytes for header");let s=this.ctime||this.atime?130:155,a=byt(this.path||"",s),n=a[0],c=a[1];this.needPax=a[2],this.needPax=Am(e,r,100,n)||this.needPax,this.needPax=Q0(e,r+100,8,this.mode)||this.needPax,this.needPax=Q0(e,r+108,8,this.uid)||this.needPax,this.needPax=Q0(e,r+116,8,this.gid)||this.needPax,this.needPax=Q0(e,r+124,12,this.size)||this.needPax,this.needPax=q6(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[Zl].charCodeAt(0),this.needPax=Am(e,r+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",r+257,8),this.needPax=Am(e,r+265,32,this.uname)||this.needPax,this.needPax=Am(e,r+297,32,this.gname)||this.needPax,this.needPax=Q0(e,r+329,8,this.devmaj)||this.needPax,this.needPax=Q0(e,r+337,8,this.devmin)||this.needPax,this.needPax=Am(e,r+345,s,c)||this.needPax,e[r+475]!==0?this.needPax=Am(e,r+345,155,c)||this.needPax:(this.needPax=Am(e,r+345,130,c)||this.needPax,this.needPax=q6(e,r+476,12,this.atime)||this.needPax,this.needPax=q6(e,r+488,12,this.ctime)||this.needPax);let f=8*32;for(let p=r;p{let s=t,a="",n,c=QI.parse(t).root||".";if(Buffer.byteLength(s)<100)n=[s,a,!1];else{a=QI.dirname(s),s=QI.basename(s);do Buffer.byteLength(s)<=100&&Buffer.byteLength(a)<=e?n=[s,a,!1]:Buffer.byteLength(s)>100&&Buffer.byteLength(a)<=e?n=[s.substr(0,99),a,!0]:(s=QI.join(QI.basename(a),s),a=QI.dirname(a));while(a!==c&&!n);n||(n=[t.substr(0,99),"",!0])}return n},fm=(t,e,r)=>t.slice(e,e+r).toString("utf8").replace(/\0.*/,""),j6=(t,e,r)=>Pyt(k0(t,e,r)),Pyt=t=>t===null?null:new Date(t*1e3),k0=(t,e,r)=>t[e]&128?vye.parse(t.slice(e,e+r)):kyt(t,e,r),xyt=t=>isNaN(t)?null:t,kyt=(t,e,r)=>xyt(parseInt(t.slice(e,e+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),Qyt={12:8589934591,8:2097151},Q0=(t,e,r,s)=>s===null?!1:s>Qyt[r]||s<0?(vye.encode(s,t.slice(e,e+r)),!0):(Tyt(t,e,r,s),!1),Tyt=(t,e,r,s)=>t.write(Ryt(s,r),e,r,"ascii"),Ryt=(t,e)=>Fyt(Math.floor(t).toString(8),e),Fyt=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",q6=(t,e,r,s)=>s===null?!1:Q0(t,e,r,s.getTime()/1e3),Nyt=new Array(156).join("\0"),Am=(t,e,r,s)=>s===null?!1:(t.write(s+Nyt,e,r,"utf8"),s.length!==Buffer.byteLength(s)||s.length>r);Sye.exports=G6});var KT=L((y$t,Dye)=>{"use strict";var Oyt=TI(),Lyt=Ie("path"),Nv=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e==="")return null;let r=Buffer.byteLength(e),s=512*Math.ceil(1+r/512),a=Buffer.allocUnsafe(s);for(let n=0;n<512;n++)a[n]=0;new Oyt({path:("PaxHeader/"+Lyt.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(a),a.write(e,512,r,"utf8");for(let n=r+512;n=Math.pow(10,n)&&(n+=1),n+a+s}};Nv.parse=(t,e,r)=>new Nv(Myt(_yt(t),e),r);var Myt=(t,e)=>e?Object.keys(t).reduce((r,s)=>(r[s]=t[s],r),e):t,_yt=t=>t.replace(/\n$/,"").split(` -`).reduce(Uyt,Object.create(null)),Uyt=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let s=e.split("="),a=s.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=s.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};Dye.exports=Nv});var RI=L((E$t,bye)=>{bye.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var JT=L((I$t,Pye)=>{"use strict";Pye.exports=t=>class extends t{warn(e,r,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=r instanceof Error&&r.code||e,s.tarCode=e,!this.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),this.emit("warn",s.tarCode,r,s)):r instanceof Error?this.emit("error",Object.assign(r,s)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),s))}}});var Y6=L((w$t,xye)=>{"use strict";var zT=["|","<",">","?",":"],W6=zT.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Hyt=new Map(zT.map((t,e)=>[t,W6[e]])),jyt=new Map(W6.map((t,e)=>[t,zT[e]]));xye.exports={encode:t=>zT.reduce((e,r)=>e.split(r).join(Hyt.get(r)),t),decode:t=>W6.reduce((e,r)=>e.split(r).join(jyt.get(r)),t)}});var V6=L((B$t,Qye)=>{var{isAbsolute:qyt,parse:kye}=Ie("path").win32;Qye.exports=t=>{let e="",r=kye(t);for(;qyt(t)||r.root;){let s=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(s.length),e+=s,r=kye(t)}return[e,t]}});var Rye=L((v$t,Tye)=>{"use strict";Tye.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var nq=L((b$t,Vye)=>{"use strict";var Uye=bI(),Hye=KT(),jye=TI(),sA=Ie("fs"),Fye=Ie("path"),iA=kI(),Gyt=RI(),qye=(t,e)=>e?(t=iA(t).replace(/^\.(\/|$)/,""),Gyt(e)+"/"+t):iA(t),Wyt=16*1024*1024,Nye=Symbol("process"),Oye=Symbol("file"),Lye=Symbol("directory"),J6=Symbol("symlink"),Mye=Symbol("hardlink"),Ov=Symbol("header"),ZT=Symbol("read"),z6=Symbol("lstat"),XT=Symbol("onlstat"),Z6=Symbol("onread"),X6=Symbol("onreadlink"),$6=Symbol("openfile"),eq=Symbol("onopenfile"),T0=Symbol("close"),$T=Symbol("mode"),tq=Symbol("awaitDrain"),K6=Symbol("ondrain"),oA=Symbol("prefix"),_ye=Symbol("hadError"),Gye=JT(),Yyt=Y6(),Wye=V6(),Yye=Rye(),eR=Gye(class extends Uye{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=iA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||Wyt,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=iA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?iA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=Wye(this.path);a&&(this.path=n,s=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=Yyt.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=iA(r.absolute||Fye.resolve(this.cwd,e)),this.path===""&&(this.path="./"),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.statCache.has(this.absolute)?this[XT](this.statCache.get(this.absolute)):this[z6]()}emit(e,...r){return e==="error"&&(this[_ye]=!0),super.emit(e,...r)}[z6](){sA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[XT](r)})}[XT](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=Kyt(e),this.emit("stat",e),this[Nye]()}[Nye](){switch(this.type){case"File":return this[Oye]();case"Directory":return this[Lye]();case"SymbolicLink":return this[J6]();default:return this.end()}}[$T](e){return Yye(e,this.type==="Directory",this.portable)}[oA](e){return qye(e,this.prefix)}[Ov](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new jye({path:this[oA](this.path),linkpath:this.type==="Link"?this[oA](this.linkpath):this.linkpath,mode:this[$T](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new Hye({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[oA](this.path),linkpath:this.type==="Link"?this[oA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Lye](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[Ov](),this.end()}[J6](){sA.readlink(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[X6](r)})}[X6](e){this.linkpath=iA(e),this[Ov](),this.end()}[Mye](e){this.type="Link",this.linkpath=iA(Fye.relative(this.cwd,e)),this.stat.size=0,this[Ov](),this.end()}[Oye](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let r=this.linkCache.get(e);if(r.indexOf(this.cwd)===0)return this[Mye](r)}this.linkCache.set(e,this.absolute)}if(this[Ov](),this.stat.size===0)return this.end();this[$6]()}[$6](){sA.open(this.absolute,"r",(e,r)=>{if(e)return this.emit("error",e);this[eq](r)})}[eq](e){if(this.fd=e,this[_ye])return this[T0]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[ZT]()}[ZT](){let{fd:e,buf:r,offset:s,length:a,pos:n}=this;sA.read(e,r,s,a,n,(c,f)=>{if(c)return this[T0](()=>this.emit("error",c));this[Z6](f)})}[T0](e){sA.close(this.fd,e)}[Z6](e){if(e<=0&&this.remain>0){let a=new Error("encountered unexpected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[T0](()=>this.emit("error",a))}if(e>this.remain){let a=new Error("did not encounter expected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[T0](()=>this.emit("error",a))}if(e===this.remain)for(let a=e;athis[K6]())}[tq](e){this.once("drain",e)}write(e){if(this.blockRemaine?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[ZT]()}}),rq=class extends eR{[z6](){this[XT](sA.lstatSync(this.absolute))}[J6](){this[X6](sA.readlinkSync(this.absolute))}[$6](){this[eq](sA.openSync(this.absolute,"r"))}[ZT](){let e=!0;try{let{fd:r,buf:s,offset:a,length:n,pos:c}=this,f=sA.readSync(r,s,a,n,c);this[Z6](f),e=!1}finally{if(e)try{this[T0](()=>{})}catch{}}}[tq](e){e()}[T0](e){sA.closeSync(this.fd),e()}},Vyt=Gye(class extends Uye{constructor(e,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=iA(e.path),this.mode=this[$T](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:r.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=iA(e.linkpath),typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=Wye(this.path);a&&(this.path=n,s=a)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new jye({path:this[oA](this.path),linkpath:this.type==="Link"?this[oA](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.header.encode()&&!this.noPax&&super.write(new Hye({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[oA](this.path),linkpath:this.type==="Link"?this[oA](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[oA](e){return qye(e,this.prefix)}[$T](e){return Yye(e,this.type==="Directory",this.portable)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});eR.Sync=rq;eR.Tar=Vyt;var Kyt=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";Vye.exports=eR});var cR=L((x$t,eEe)=>{"use strict";var aR=class{constructor(e,r){this.path=e||"./",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},Jyt=bI(),zyt=O6(),Zyt=YT(),Aq=nq(),Xyt=Aq.Sync,$yt=Aq.Tar,eEt=ak(),Kye=Buffer.alloc(1024),nR=Symbol("onStat"),tR=Symbol("ended"),aA=Symbol("queue"),FI=Symbol("current"),pm=Symbol("process"),rR=Symbol("processing"),Jye=Symbol("processJob"),lA=Symbol("jobs"),iq=Symbol("jobDone"),iR=Symbol("addFSEntry"),zye=Symbol("addTarEntry"),lq=Symbol("stat"),cq=Symbol("readdir"),sR=Symbol("onreaddir"),oR=Symbol("pipe"),Zye=Symbol("entry"),sq=Symbol("entryOpt"),uq=Symbol("writeEntryClass"),$ye=Symbol("write"),oq=Symbol("ondrain"),lR=Ie("fs"),Xye=Ie("path"),tEt=JT(),aq=kI(),pq=tEt(class extends Jyt{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=aq(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[uq]=Aq,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new zyt.Gzip(e.gzip),this.zip.on("data",r=>super.write(r)),this.zip.on("end",r=>super.end()),this.zip.on("drain",r=>this[oq]()),this.on("resume",r=>this.zip.resume())):this.on("drain",this[oq]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:r=>!0,this[aA]=new eEt,this[lA]=0,this.jobs=+e.jobs||4,this[rR]=!1,this[tR]=!1}[$ye](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[tR]=!0,this[pm](),this}write(e){if(this[tR])throw new Error("write after end");return e instanceof Zyt?this[zye](e):this[iR](e),this.flowing}[zye](e){let r=aq(Xye.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let s=new aR(e.path,r,!1);s.entry=new $yt(e,this[sq](s)),s.entry.on("end",a=>this[iq](s)),this[lA]+=1,this[aA].push(s)}this[pm]()}[iR](e){let r=aq(Xye.resolve(this.cwd,e));this[aA].push(new aR(e,r)),this[pm]()}[lq](e){e.pending=!0,this[lA]+=1;let r=this.follow?"stat":"lstat";lR[r](e.absolute,(s,a)=>{e.pending=!1,this[lA]-=1,s?this.emit("error",s):this[nR](e,a)})}[nR](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[pm]()}[cq](e){e.pending=!0,this[lA]+=1,lR.readdir(e.absolute,(r,s)=>{if(e.pending=!1,this[lA]-=1,r)return this.emit("error",r);this[sR](e,s)})}[sR](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[pm]()}[pm](){if(!this[rR]){this[rR]=!0;for(let e=this[aA].head;e!==null&&this[lA]this.warn(r,s,a),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[Zye](e){this[lA]+=1;try{return new this[uq](e.path,this[sq](e)).on("end",()=>this[iq](e)).on("error",r=>this.emit("error",r))}catch(r){this.emit("error",r)}}[oq](){this[FI]&&this[FI].entry&&this[FI].entry.resume()}[oR](e){e.piped=!0,e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n==="./"?"":n.replace(/\/*$/,"/");this[iR](c+a)});let r=e.entry,s=this.zip;s?r.on("data",a=>{s.write(a)||r.pause()}):r.on("data",a=>{super.write(a)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),fq=class extends pq{constructor(e){super(e),this[uq]=Xyt}pause(){}resume(){}[lq](e){let r=this.follow?"statSync":"lstatSync";this[nR](e,lR[r](e.absolute))}[cq](e,r){this[sR](e,lR.readdirSync(e.absolute))}[oR](e){let r=e.entry,s=this.zip;e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n==="./"?"":n.replace(/\/*$/,"/");this[iR](c+a)}),s?r.on("data",a=>{s.write(a)}):r.on("data",a=>{super[$ye](a)})}};pq.Sync=fq;eEe.exports=pq});var jI=L(Mv=>{"use strict";var rEt=bI(),nEt=Ie("events").EventEmitter,Al=Ie("fs"),dq=Al.writev;if(!dq){let t=process.binding("fs"),e=t.FSReqWrap||t.FSReqCallback;dq=(r,s,a,n)=>{let c=(p,h)=>n(p,h,s),f=new e;f.oncomplete=c,t.writeBuffers(r,s,a,f)}}var UI=Symbol("_autoClose"),Vu=Symbol("_close"),Lv=Symbol("_ended"),ii=Symbol("_fd"),tEe=Symbol("_finished"),F0=Symbol("_flags"),hq=Symbol("_flush"),mq=Symbol("_handleChunk"),yq=Symbol("_makeBuf"),hR=Symbol("_mode"),uR=Symbol("_needDrain"),MI=Symbol("_onerror"),HI=Symbol("_onopen"),gq=Symbol("_onread"),OI=Symbol("_onwrite"),N0=Symbol("_open"),Vp=Symbol("_path"),hm=Symbol("_pos"),cA=Symbol("_queue"),LI=Symbol("_read"),rEe=Symbol("_readSize"),R0=Symbol("_reading"),fR=Symbol("_remain"),nEe=Symbol("_size"),AR=Symbol("_write"),NI=Symbol("_writing"),pR=Symbol("_defaultFlag"),_I=Symbol("_errored"),gR=class extends rEt{constructor(e,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[_I]=!1,this[ii]=typeof r.fd=="number"?r.fd:null,this[Vp]=e,this[rEe]=r.readSize||16*1024*1024,this[R0]=!1,this[nEe]=typeof r.size=="number"?r.size:1/0,this[fR]=this[nEe],this[UI]=typeof r.autoClose=="boolean"?r.autoClose:!0,typeof this[ii]=="number"?this[LI]():this[N0]()}get fd(){return this[ii]}get path(){return this[Vp]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[N0](){Al.open(this[Vp],"r",(e,r)=>this[HI](e,r))}[HI](e,r){e?this[MI](e):(this[ii]=r,this.emit("open",r),this[LI]())}[yq](){return Buffer.allocUnsafe(Math.min(this[rEe],this[fR]))}[LI](){if(!this[R0]){this[R0]=!0;let e=this[yq]();if(e.length===0)return process.nextTick(()=>this[gq](null,0,e));Al.read(this[ii],e,0,e.length,null,(r,s,a)=>this[gq](r,s,a))}}[gq](e,r,s){this[R0]=!1,e?this[MI](e):this[mq](r,s)&&this[LI]()}[Vu](){if(this[UI]&&typeof this[ii]=="number"){let e=this[ii];this[ii]=null,Al.close(e,r=>r?this.emit("error",r):this.emit("close"))}}[MI](e){this[R0]=!0,this[Vu](),this.emit("error",e)}[mq](e,r){let s=!1;return this[fR]-=e,e>0&&(s=super.write(ethis[HI](e,r))}[HI](e,r){this[pR]&&this[F0]==="r+"&&e&&e.code==="ENOENT"?(this[F0]="w",this[N0]()):e?this[MI](e):(this[ii]=r,this.emit("open",r),this[hq]())}end(e,r){return e&&this.write(e,r),this[Lv]=!0,!this[NI]&&!this[cA].length&&typeof this[ii]=="number"&&this[OI](null,0),this}write(e,r){return typeof e=="string"&&(e=Buffer.from(e,r)),this[Lv]?(this.emit("error",new Error("write() after end()")),!1):this[ii]===null||this[NI]||this[cA].length?(this[cA].push(e),this[uR]=!0,!1):(this[NI]=!0,this[AR](e),!0)}[AR](e){Al.write(this[ii],e,0,e.length,this[hm],(r,s)=>this[OI](r,s))}[OI](e,r){e?this[MI](e):(this[hm]!==null&&(this[hm]+=r),this[cA].length?this[hq]():(this[NI]=!1,this[Lv]&&!this[tEe]?(this[tEe]=!0,this[Vu](),this.emit("finish")):this[uR]&&(this[uR]=!1,this.emit("drain"))))}[hq](){if(this[cA].length===0)this[Lv]&&this[OI](null,0);else if(this[cA].length===1)this[AR](this[cA].pop());else{let e=this[cA];this[cA]=[],dq(this[ii],e,this[hm],(r,s)=>this[OI](r,s))}}[Vu](){if(this[UI]&&typeof this[ii]=="number"){let e=this[ii];this[ii]=null,Al.close(e,r=>r?this.emit("error",r):this.emit("close"))}}},Iq=class extends dR{[N0](){let e;if(this[pR]&&this[F0]==="r+")try{e=Al.openSync(this[Vp],this[F0],this[hR])}catch(r){if(r.code==="ENOENT")return this[F0]="w",this[N0]();throw r}else e=Al.openSync(this[Vp],this[F0],this[hR]);this[HI](null,e)}[Vu](){if(this[UI]&&typeof this[ii]=="number"){let e=this[ii];this[ii]=null,Al.closeSync(e),this.emit("close")}}[AR](e){let r=!0;try{this[OI](null,Al.writeSync(this[ii],e,0,e.length,this[hm])),r=!1}finally{if(r)try{this[Vu]()}catch{}}}};Mv.ReadStream=gR;Mv.ReadStreamSync=Eq;Mv.WriteStream=dR;Mv.WriteStreamSync=Iq});var BR=L((T$t,uEe)=>{"use strict";var iEt=JT(),sEt=TI(),oEt=Ie("events"),aEt=ak(),lEt=1024*1024,cEt=YT(),iEe=KT(),uEt=O6(),Cq=Buffer.from([31,139]),_c=Symbol("state"),gm=Symbol("writeEntry"),Kp=Symbol("readEntry"),wq=Symbol("nextEntry"),sEe=Symbol("processEntry"),Uc=Symbol("extendedHeader"),_v=Symbol("globalExtendedHeader"),O0=Symbol("meta"),oEe=Symbol("emitMeta"),Pi=Symbol("buffer"),Jp=Symbol("queue"),dm=Symbol("ended"),aEe=Symbol("emittedEnd"),mm=Symbol("emit"),pl=Symbol("unzip"),mR=Symbol("consumeChunk"),yR=Symbol("consumeChunkSub"),Bq=Symbol("consumeBody"),lEe=Symbol("consumeMeta"),cEe=Symbol("consumeHeader"),ER=Symbol("consuming"),vq=Symbol("bufferConcat"),Sq=Symbol("maybeEnd"),Uv=Symbol("writing"),L0=Symbol("aborted"),IR=Symbol("onDone"),ym=Symbol("sawValidEntry"),CR=Symbol("sawNullBlock"),wR=Symbol("sawEOF"),fEt=t=>!0;uEe.exports=iEt(class extends oEt{constructor(e){e=e||{},super(e),this.file=e.file||"",this[ym]=null,this.on(IR,r=>{(this[_c]==="begin"||this[ym]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(IR,e.ondone):this.on(IR,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||lEt,this.filter=typeof e.filter=="function"?e.filter:fEt,this.writable=!0,this.readable=!1,this[Jp]=new aEt,this[Pi]=null,this[Kp]=null,this[gm]=null,this[_c]="begin",this[O0]="",this[Uc]=null,this[_v]=null,this[dm]=!1,this[pl]=null,this[L0]=!1,this[CR]=!1,this[wR]=!1,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[cEe](e,r){this[ym]===null&&(this[ym]=!1);let s;try{s=new sEt(e,r,this[Uc],this[_v])}catch(a){return this.warn("TAR_ENTRY_INVALID",a)}if(s.nullBlock)this[CR]?(this[wR]=!0,this[_c]==="begin"&&(this[_c]="header"),this[mm]("eof")):(this[CR]=!0,this[mm]("nullBlock"));else if(this[CR]=!1,!s.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:s});else if(!s.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:s});else{let a=s.type;if(/^(Symbolic)?Link$/.test(a)&&!s.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:s});else if(!/^(Symbolic)?Link$/.test(a)&&s.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:s});else{let n=this[gm]=new cEt(s,this[Uc],this[_v]);if(!this[ym])if(n.remain){let c=()=>{n.invalid||(this[ym]=!0)};n.on("end",c)}else this[ym]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[mm]("ignoredEntry",n),this[_c]="ignore",n.resume()):n.size>0&&(this[O0]="",n.on("data",c=>this[O0]+=c),this[_c]="meta"):(this[Uc]=null,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[mm]("ignoredEntry",n),this[_c]=n.remain?"ignore":"header",n.resume()):(n.remain?this[_c]="body":(this[_c]="header",n.end()),this[Kp]?this[Jp].push(n):(this[Jp].push(n),this[wq]())))}}}[sEe](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[Kp]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",s=>this[wq]()),r=!1)):(this[Kp]=null,r=!1),r}[wq](){do;while(this[sEe](this[Jp].shift()));if(!this[Jp].length){let e=this[Kp];!e||e.flowing||e.size===e.remain?this[Uv]||this.emit("drain"):e.once("drain",s=>this.emit("drain"))}}[Bq](e,r){let s=this[gm],a=s.blockRemain,n=a>=e.length&&r===0?e:e.slice(r,r+a);return s.write(n),s.blockRemain||(this[_c]="header",this[gm]=null,s.end()),n.length}[lEe](e,r){let s=this[gm],a=this[Bq](e,r);return this[gm]||this[oEe](s),a}[mm](e,r,s){!this[Jp].length&&!this[Kp]?this.emit(e,r,s):this[Jp].push([e,r,s])}[oEe](e){switch(this[mm]("meta",this[O0]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[Uc]=iEe.parse(this[O0],this[Uc],!1);break;case"GlobalExtendedHeader":this[_v]=iEe.parse(this[O0],this[_v],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[Uc]=this[Uc]||Object.create(null),this[Uc].path=this[O0].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[Uc]=this[Uc]||Object.create(null),this[Uc].linkpath=this[O0].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[L0]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[L0])return;if(this[pl]===null&&e){if(this[Pi]&&(e=Buffer.concat([this[Pi],e]),this[Pi]=null),e.lengththis[mR](n)),this[pl].on("error",n=>this.abort(n)),this[pl].on("end",n=>{this[dm]=!0,this[mR]()}),this[Uv]=!0;let a=this[pl][s?"end":"write"](e);return this[Uv]=!1,a}}this[Uv]=!0,this[pl]?this[pl].write(e):this[mR](e),this[Uv]=!1;let r=this[Jp].length?!1:this[Kp]?this[Kp].flowing:!0;return!r&&!this[Jp].length&&this[Kp].once("drain",s=>this.emit("drain")),r}[vq](e){e&&!this[L0]&&(this[Pi]=this[Pi]?Buffer.concat([this[Pi],e]):e)}[Sq](){if(this[dm]&&!this[aEe]&&!this[L0]&&!this[ER]){this[aEe]=!0;let e=this[gm];if(e&&e.blockRemain){let r=this[Pi]?this[Pi].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[Pi]&&e.write(this[Pi]),e.end()}this[mm](IR)}}[mR](e){if(this[ER])this[vq](e);else if(!e&&!this[Pi])this[Sq]();else{if(this[ER]=!0,this[Pi]){this[vq](e);let r=this[Pi];this[Pi]=null,this[yR](r)}else this[yR](e);for(;this[Pi]&&this[Pi].length>=512&&!this[L0]&&!this[wR];){let r=this[Pi];this[Pi]=null,this[yR](r)}this[ER]=!1}(!this[Pi]||this[dm])&&this[Sq]()}[yR](e){let r=0,s=e.length;for(;r+512<=s&&!this[L0]&&!this[wR];)switch(this[_c]){case"begin":case"header":this[cEe](e,r),r+=512;break;case"ignore":case"body":r+=this[Bq](e,r);break;case"meta":r+=this[lEe](e,r);break;default:throw new Error("invalid state: "+this[_c])}r{"use strict";var AEt=SI(),AEe=BR(),qI=Ie("fs"),pEt=jI(),fEe=Ie("path"),Dq=RI();hEe.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=AEt(t);if(s.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!s.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&gEt(s,e),s.noResume||hEt(s),s.file&&s.sync?dEt(s):s.file?mEt(s,r):pEe(s)};var hEt=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},gEt=(t,e)=>{let r=new Map(e.map(n=>[Dq(n),!0])),s=t.filter,a=(n,c)=>{let f=c||fEe.parse(n).root||".",p=n===f?!1:r.has(n)?r.get(n):a(fEe.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(Dq(n)):n=>a(Dq(n))},dEt=t=>{let e=pEe(t),r=t.file,s=!0,a;try{let n=qI.statSync(r),c=t.maxReadSize||16*1024*1024;if(n.size{let r=new AEe(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on("error",f),r.on("end",c),qI.stat(a,(p,h)=>{if(p)f(p);else{let E=new pEt.ReadStream(a,{readSize:s,size:h.size});E.on("error",f),E.pipe(r)}})});return e?n.then(e,e):n},pEe=t=>new AEe(t)});var IEe=L((F$t,EEe)=>{"use strict";var yEt=SI(),SR=cR(),gEe=jI(),dEe=vR(),mEe=Ie("path");EEe.exports=(t,e,r)=>{if(typeof e=="function"&&(r=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let s=yEt(t);if(s.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!s.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return s.file&&s.sync?EEt(s,e):s.file?IEt(s,e,r):s.sync?CEt(s,e):wEt(s,e)};var EEt=(t,e)=>{let r=new SR.Sync(t),s=new gEe.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(s),yEe(r,e)},IEt=(t,e,r)=>{let s=new SR(t),a=new gEe.WriteStream(t.file,{mode:t.mode||438});s.pipe(a);let n=new Promise((c,f)=>{a.on("error",f),a.on("close",c),s.on("error",f)});return bq(s,e),r?n.then(r,r):n},yEe=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?dEe({file:mEe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},bq=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return dEe({file:mEe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>bq(t,e));t.add(r)}t.end()},CEt=(t,e)=>{let r=new SR.Sync(t);return yEe(r,e),r},wEt=(t,e)=>{let r=new SR(t);return bq(r,e),r}});var Pq=L((N$t,bEe)=>{"use strict";var BEt=SI(),CEe=cR(),Xl=Ie("fs"),wEe=jI(),BEe=vR(),vEe=Ie("path"),SEe=TI();bEe.exports=(t,e,r)=>{let s=BEt(t);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),s.sync?vEt(s,e):DEt(s,e,r)};var vEt=(t,e)=>{let r=new CEe.Sync(t),s=!0,a,n;try{try{a=Xl.openSync(t.file,"r+")}catch(p){if(p.code==="ENOENT")a=Xl.openSync(t.file,"w+");else throw p}let c=Xl.fstatSync(a),f=Buffer.alloc(512);e:for(n=0;nc.size)break;n+=h,t.mtimeCache&&t.mtimeCache.set(p.path,p.mtime)}s=!1,SEt(t,r,n,a,e)}finally{if(s)try{Xl.closeSync(a)}catch{}}},SEt=(t,e,r,s,a)=>{let n=new wEe.WriteStreamSync(t.file,{fd:s,start:r});e.pipe(n),bEt(e,a)},DEt=(t,e,r)=>{e=Array.from(e);let s=new CEe(t),a=(c,f,p)=>{let h=(I,R)=>{I?Xl.close(c,N=>p(I)):p(null,R)},E=0;if(f===0)return h(null,0);let C=0,S=Buffer.alloc(512),P=(I,R)=>{if(I)return h(I);if(C+=R,C<512&&R)return Xl.read(c,S,C,S.length-C,E+C,P);if(E===0&&S[0]===31&&S[1]===139)return h(new Error("cannot append to compressed archives"));if(C<512)return h(null,E);let N=new SEe(S);if(!N.cksumValid)return h(null,E);let U=512*Math.ceil(N.size/512);if(E+U+512>f||(E+=U+512,E>=f))return h(null,E);t.mtimeCache&&t.mtimeCache.set(N.path,N.mtime),C=0,Xl.read(c,S,0,512,E,P)};Xl.read(c,S,0,512,E,P)},n=new Promise((c,f)=>{s.on("error",f);let p="r+",h=(E,C)=>{if(E&&E.code==="ENOENT"&&p==="r+")return p="w+",Xl.open(t.file,p,h);if(E)return f(E);Xl.fstat(C,(S,P)=>{if(S)return Xl.close(C,()=>f(S));a(C,P.size,(I,R)=>{if(I)return f(I);let N=new wEe.WriteStream(t.file,{fd:C,start:R});s.pipe(N),N.on("error",f),N.on("close",c),DEe(s,e)})})};Xl.open(t.file,p,h)});return r?n.then(r,r):n},bEt=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?BEe({file:vEe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},DEe=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return BEe({file:vEe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>DEe(t,e));t.add(r)}t.end()}});var xEe=L((O$t,PEe)=>{"use strict";var PEt=SI(),xEt=Pq();PEe.exports=(t,e,r)=>{let s=PEt(t);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),kEt(s),xEt(s,e,r)};var kEt=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,s)=>e(r,s)&&!(t.mtimeCache.get(r)>s.mtime):(r,s)=>!(t.mtimeCache.get(r)>s.mtime)}});var TEe=L((L$t,QEe)=>{var{promisify:kEe}=Ie("util"),M0=Ie("fs"),QEt=t=>{if(!t)t={mode:511,fs:M0};else if(typeof t=="object")t={mode:511,fs:M0,...t};else if(typeof t=="number")t={mode:t,fs:M0};else if(typeof t=="string")t={mode:parseInt(t,8),fs:M0};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||M0.mkdir,t.mkdirAsync=kEe(t.mkdir),t.stat=t.stat||t.fs.stat||M0.stat,t.statAsync=kEe(t.stat),t.statSync=t.statSync||t.fs.statSync||M0.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||M0.mkdirSync,t};QEe.exports=QEt});var FEe=L((M$t,REe)=>{var TEt=process.platform,{resolve:REt,parse:FEt}=Ie("path"),NEt=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=REt(t),TEt==="win32"){let e=/[*|"<>?:]/,{root:r}=FEt(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};REe.exports=NEt});var _Ee=L((_$t,MEe)=>{var{dirname:NEe}=Ie("path"),OEe=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(s=>s.isDirectory()?r:void 0,s=>s.code==="ENOENT"?OEe(t,NEe(e),e):void 0),LEe=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(s){return s.code==="ENOENT"?LEe(t,NEe(e),e):void 0}};MEe.exports={findMade:OEe,findMadeSync:LEe}});var Qq=L((U$t,HEe)=>{var{dirname:UEe}=Ie("path"),xq=(t,e,r)=>{e.recursive=!1;let s=UEe(t);return s===t?e.mkdirAsync(t,e).catch(a=>{if(a.code!=="EISDIR")throw a}):e.mkdirAsync(t,e).then(()=>r||t,a=>{if(a.code==="ENOENT")return xq(s,e).then(n=>xq(t,e,n));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;return e.statAsync(t).then(n=>{if(n.isDirectory())return r;throw a},()=>{throw a})})},kq=(t,e,r)=>{let s=UEe(t);if(e.recursive=!1,s===t)try{return e.mkdirSync(t,e)}catch(a){if(a.code!=="EISDIR")throw a;return}try{return e.mkdirSync(t,e),r||t}catch(a){if(a.code==="ENOENT")return kq(t,e,kq(s,e,r));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;try{if(!e.statSync(t).isDirectory())throw a}catch{throw a}}};HEe.exports={mkdirpManual:xq,mkdirpManualSync:kq}});var GEe=L((H$t,qEe)=>{var{dirname:jEe}=Ie("path"),{findMade:OEt,findMadeSync:LEt}=_Ee(),{mkdirpManual:MEt,mkdirpManualSync:_Et}=Qq(),UEt=(t,e)=>(e.recursive=!0,jEe(t)===t?e.mkdirAsync(t,e):OEt(e,t).then(s=>e.mkdirAsync(t,e).then(()=>s).catch(a=>{if(a.code==="ENOENT")return MEt(t,e);throw a}))),HEt=(t,e)=>{if(e.recursive=!0,jEe(t)===t)return e.mkdirSync(t,e);let s=LEt(e,t);try{return e.mkdirSync(t,e),s}catch(a){if(a.code==="ENOENT")return _Et(t,e);throw a}};qEe.exports={mkdirpNative:UEt,mkdirpNativeSync:HEt}});var KEe=L((j$t,VEe)=>{var WEe=Ie("fs"),jEt=process.version,Tq=jEt.replace(/^v/,"").split("."),YEe=+Tq[0]>10||+Tq[0]==10&&+Tq[1]>=12,qEt=YEe?t=>t.mkdir===WEe.mkdir:()=>!1,GEt=YEe?t=>t.mkdirSync===WEe.mkdirSync:()=>!1;VEe.exports={useNative:qEt,useNativeSync:GEt}});var eIe=L((q$t,$Ee)=>{var GI=TEe(),WI=FEe(),{mkdirpNative:JEe,mkdirpNativeSync:zEe}=GEe(),{mkdirpManual:ZEe,mkdirpManualSync:XEe}=Qq(),{useNative:WEt,useNativeSync:YEt}=KEe(),YI=(t,e)=>(t=WI(t),e=GI(e),WEt(e)?JEe(t,e):ZEe(t,e)),VEt=(t,e)=>(t=WI(t),e=GI(e),YEt(e)?zEe(t,e):XEe(t,e));YI.sync=VEt;YI.native=(t,e)=>JEe(WI(t),GI(e));YI.manual=(t,e)=>ZEe(WI(t),GI(e));YI.nativeSync=(t,e)=>zEe(WI(t),GI(e));YI.manualSync=(t,e)=>XEe(WI(t),GI(e));$Ee.exports=YI});var aIe=L((G$t,oIe)=>{"use strict";var Hc=Ie("fs"),Em=Ie("path"),KEt=Hc.lchown?"lchown":"chown",JEt=Hc.lchownSync?"lchownSync":"chownSync",rIe=Hc.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),tIe=(t,e,r)=>{try{return Hc[JEt](t,e,r)}catch(s){if(s.code!=="ENOENT")throw s}},zEt=(t,e,r)=>{try{return Hc.chownSync(t,e,r)}catch(s){if(s.code!=="ENOENT")throw s}},ZEt=rIe?(t,e,r,s)=>a=>{!a||a.code!=="EISDIR"?s(a):Hc.chown(t,e,r,s)}:(t,e,r,s)=>s,Rq=rIe?(t,e,r)=>{try{return tIe(t,e,r)}catch(s){if(s.code!=="EISDIR")throw s;zEt(t,e,r)}}:(t,e,r)=>tIe(t,e,r),XEt=process.version,nIe=(t,e,r)=>Hc.readdir(t,e,r),$Et=(t,e)=>Hc.readdirSync(t,e);/^v4\./.test(XEt)&&(nIe=(t,e,r)=>Hc.readdir(t,r));var DR=(t,e,r,s)=>{Hc[KEt](t,e,r,ZEt(t,e,r,a=>{s(a&&a.code!=="ENOENT"?a:null)}))},iIe=(t,e,r,s,a)=>{if(typeof e=="string")return Hc.lstat(Em.resolve(t,e),(n,c)=>{if(n)return a(n.code!=="ENOENT"?n:null);c.name=e,iIe(t,c,r,s,a)});if(e.isDirectory())Fq(Em.resolve(t,e.name),r,s,n=>{if(n)return a(n);let c=Em.resolve(t,e.name);DR(c,r,s,a)});else{let n=Em.resolve(t,e.name);DR(n,r,s,a)}},Fq=(t,e,r,s)=>{nIe(t,{withFileTypes:!0},(a,n)=>{if(a){if(a.code==="ENOENT")return s();if(a.code!=="ENOTDIR"&&a.code!=="ENOTSUP")return s(a)}if(a||!n.length)return DR(t,e,r,s);let c=n.length,f=null,p=h=>{if(!f){if(h)return s(f=h);if(--c===0)return DR(t,e,r,s)}};n.forEach(h=>iIe(t,h,e,r,p))})},eIt=(t,e,r,s)=>{if(typeof e=="string")try{let a=Hc.lstatSync(Em.resolve(t,e));a.name=e,e=a}catch(a){if(a.code==="ENOENT")return;throw a}e.isDirectory()&&sIe(Em.resolve(t,e.name),r,s),Rq(Em.resolve(t,e.name),r,s)},sIe=(t,e,r)=>{let s;try{s=$Et(t,{withFileTypes:!0})}catch(a){if(a.code==="ENOENT")return;if(a.code==="ENOTDIR"||a.code==="ENOTSUP")return Rq(t,e,r);throw a}return s&&s.length&&s.forEach(a=>eIt(t,a,e,r)),Rq(t,e,r)};oIe.exports=Fq;Fq.sync=sIe});var fIe=L((W$t,Nq)=>{"use strict";var lIe=eIe(),jc=Ie("fs"),bR=Ie("path"),cIe=aIe(),Ku=kI(),PR=class extends Error{constructor(e,r){super("Cannot extract through symbolic link"),this.path=r,this.symlink=e}get name(){return"SylinkError"}},xR=class extends Error{constructor(e,r){super(r+": Cannot cd into '"+e+"'"),this.path=e,this.code=r}get name(){return"CwdError"}},kR=(t,e)=>t.get(Ku(e)),Hv=(t,e,r)=>t.set(Ku(e),r),tIt=(t,e)=>{jc.stat(t,(r,s)=>{(r||!s.isDirectory())&&(r=new xR(t,r&&r.code||"ENOTDIR")),e(r)})};Nq.exports=(t,e,r)=>{t=Ku(t);let s=e.umask,a=e.mode|448,n=(a&s)!==0,c=e.uid,f=e.gid,p=typeof c=="number"&&typeof f=="number"&&(c!==e.processUid||f!==e.processGid),h=e.preserve,E=e.unlink,C=e.cache,S=Ku(e.cwd),P=(N,U)=>{N?r(N):(Hv(C,t,!0),U&&p?cIe(U,c,f,W=>P(W)):n?jc.chmod(t,a,r):r())};if(C&&kR(C,t)===!0)return P();if(t===S)return tIt(t,P);if(h)return lIe(t,{mode:a}).then(N=>P(null,N),P);let R=Ku(bR.relative(S,t)).split("/");QR(S,R,a,C,E,S,null,P)};var QR=(t,e,r,s,a,n,c,f)=>{if(!e.length)return f(null,c);let p=e.shift(),h=Ku(bR.resolve(t+"/"+p));if(kR(s,h))return QR(h,e,r,s,a,n,c,f);jc.mkdir(h,r,uIe(h,e,r,s,a,n,c,f))},uIe=(t,e,r,s,a,n,c,f)=>p=>{p?jc.lstat(t,(h,E)=>{if(h)h.path=h.path&&Ku(h.path),f(h);else if(E.isDirectory())QR(t,e,r,s,a,n,c,f);else if(a)jc.unlink(t,C=>{if(C)return f(C);jc.mkdir(t,r,uIe(t,e,r,s,a,n,c,f))});else{if(E.isSymbolicLink())return f(new PR(t,t+"/"+e.join("/")));f(p)}}):(c=c||t,QR(t,e,r,s,a,n,c,f))},rIt=t=>{let e=!1,r="ENOTDIR";try{e=jc.statSync(t).isDirectory()}catch(s){r=s.code}finally{if(!e)throw new xR(t,r)}};Nq.exports.sync=(t,e)=>{t=Ku(t);let r=e.umask,s=e.mode|448,a=(s&r)!==0,n=e.uid,c=e.gid,f=typeof n=="number"&&typeof c=="number"&&(n!==e.processUid||c!==e.processGid),p=e.preserve,h=e.unlink,E=e.cache,C=Ku(e.cwd),S=N=>{Hv(E,t,!0),N&&f&&cIe.sync(N,n,c),a&&jc.chmodSync(t,s)};if(E&&kR(E,t)===!0)return S();if(t===C)return rIt(C),S();if(p)return S(lIe.sync(t,s));let I=Ku(bR.relative(C,t)).split("/"),R=null;for(let N=I.shift(),U=C;N&&(U+="/"+N);N=I.shift())if(U=Ku(bR.resolve(U)),!kR(E,U))try{jc.mkdirSync(U,s),R=R||U,Hv(E,U,!0)}catch{let te=jc.lstatSync(U);if(te.isDirectory()){Hv(E,U,!0);continue}else if(h){jc.unlinkSync(U),jc.mkdirSync(U,s),R=R||U,Hv(E,U,!0);continue}else if(te.isSymbolicLink())return new PR(U,U+"/"+I.join("/"))}return S(R)}});var Lq=L((Y$t,AIe)=>{var Oq=Object.create(null),{hasOwnProperty:nIt}=Object.prototype;AIe.exports=t=>(nIt.call(Oq,t)||(Oq[t]=t.normalize("NFKD")),Oq[t])});var dIe=L((V$t,gIe)=>{var pIe=Ie("assert"),iIt=Lq(),sIt=RI(),{join:hIe}=Ie("path"),oIt=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,aIt=oIt==="win32";gIe.exports=()=>{let t=new Map,e=new Map,r=h=>h.split("/").slice(0,-1).reduce((C,S)=>(C.length&&(S=hIe(C[C.length-1],S)),C.push(S||"/"),C),[]),s=new Set,a=h=>{let E=e.get(h);if(!E)throw new Error("function does not have any path reservations");return{paths:E.paths.map(C=>t.get(C)),dirs:[...E.dirs].map(C=>t.get(C))}},n=h=>{let{paths:E,dirs:C}=a(h);return E.every(S=>S[0]===h)&&C.every(S=>S[0]instanceof Set&&S[0].has(h))},c=h=>s.has(h)||!n(h)?!1:(s.add(h),h(()=>f(h)),!0),f=h=>{if(!s.has(h))return!1;let{paths:E,dirs:C}=e.get(h),S=new Set;return E.forEach(P=>{let I=t.get(P);pIe.equal(I[0],h),I.length===1?t.delete(P):(I.shift(),typeof I[0]=="function"?S.add(I[0]):I[0].forEach(R=>S.add(R)))}),C.forEach(P=>{let I=t.get(P);pIe(I[0]instanceof Set),I[0].size===1&&I.length===1?t.delete(P):I[0].size===1?(I.shift(),S.add(I[0])):I[0].delete(h)}),s.delete(h),S.forEach(P=>c(P)),!0};return{check:n,reserve:(h,E)=>{h=aIt?["win32 parallelization disabled"]:h.map(S=>iIt(sIt(hIe(S))).toLowerCase());let C=new Set(h.map(S=>r(S)).reduce((S,P)=>S.concat(P)));return e.set(E,{dirs:C,paths:h}),h.forEach(S=>{let P=t.get(S);P?P.push(E):t.set(S,[E])}),C.forEach(S=>{let P=t.get(S);P?P[P.length-1]instanceof Set?P[P.length-1].add(E):P.push(new Set([E])):t.set(S,[new Set([E])])}),c(E)}}}});var EIe=L((K$t,yIe)=>{var lIt=process.platform,cIt=lIt==="win32",uIt=global.__FAKE_TESTING_FS__||Ie("fs"),{O_CREAT:fIt,O_TRUNC:AIt,O_WRONLY:pIt,UV_FS_O_FILEMAP:mIe=0}=uIt.constants,hIt=cIt&&!!mIe,gIt=512*1024,dIt=mIe|AIt|fIt|pIt;yIe.exports=hIt?t=>t"w"});var Yq=L((J$t,RIe)=>{"use strict";var mIt=Ie("assert"),yIt=BR(),Mn=Ie("fs"),EIt=jI(),zp=Ie("path"),kIe=fIe(),IIe=Y6(),IIt=dIe(),CIt=V6(),$l=kI(),wIt=RI(),BIt=Lq(),CIe=Symbol("onEntry"),Uq=Symbol("checkFs"),wIe=Symbol("checkFs2"),FR=Symbol("pruneCache"),Hq=Symbol("isReusable"),qc=Symbol("makeFs"),jq=Symbol("file"),qq=Symbol("directory"),NR=Symbol("link"),BIe=Symbol("symlink"),vIe=Symbol("hardlink"),SIe=Symbol("unsupported"),DIe=Symbol("checkPath"),_0=Symbol("mkdir"),Xo=Symbol("onError"),TR=Symbol("pending"),bIe=Symbol("pend"),VI=Symbol("unpend"),Mq=Symbol("ended"),_q=Symbol("maybeClose"),Gq=Symbol("skip"),jv=Symbol("doChown"),qv=Symbol("uid"),Gv=Symbol("gid"),Wv=Symbol("checkedCwd"),QIe=Ie("crypto"),TIe=EIe(),vIt=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Yv=vIt==="win32",SIt=(t,e)=>{if(!Yv)return Mn.unlink(t,e);let r=t+".DELETE."+QIe.randomBytes(16).toString("hex");Mn.rename(t,r,s=>{if(s)return e(s);Mn.unlink(r,e)})},DIt=t=>{if(!Yv)return Mn.unlinkSync(t);let e=t+".DELETE."+QIe.randomBytes(16).toString("hex");Mn.renameSync(t,e),Mn.unlinkSync(e)},PIe=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,xIe=t=>BIt(wIt($l(t))).toLowerCase(),bIt=(t,e)=>{e=xIe(e);for(let r of t.keys()){let s=xIe(r);(s===e||s.indexOf(e+"/")===0)&&t.delete(r)}},PIt=t=>{for(let e of t.keys())t.delete(e)},Vv=class extends yIt{constructor(e){if(e||(e={}),e.ondone=r=>{this[Mq]=!0,this[_q]()},super(e),this[Wv]=!1,this.reservations=IIt(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[TR]=0,this[Mq]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Yv,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=$l(zp.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",r=>this[CIe](r))}warn(e,r,s={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(s.recoverable=!1),super.warn(e,r,s)}[_q](){this[Mq]&&this[TR]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[DIe](e){if(this.strip){let r=$l(e.path).split("/");if(r.length=this.strip)e.linkpath=s.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let r=$l(e.path),s=r.split("/");if(s.includes("..")||Yv&&/^[a-z]:\.\.$/i.test(s[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:r}),!1;let[a,n]=CIt(r);a&&(e.path=n,this.warn("TAR_ENTRY_INFO",`stripping ${a} from absolute path`,{entry:e,path:r}))}if(zp.isAbsolute(e.path)?e.absolute=$l(zp.resolve(e.path)):e.absolute=$l(zp.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:$l(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=zp.win32.parse(e.absolute);e.absolute=r+IIe.encode(e.absolute.substr(r.length));let{root:s}=zp.win32.parse(e.path);e.path=s+IIe.encode(e.path.substr(s.length))}return!0}[CIe](e){if(!this[DIe](e))return e.resume();switch(mIt.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Uq](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[SIe](e)}}[Xo](e,r){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:r}),this[VI](),r.resume())}[_0](e,r,s){kIe($l(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},s)}[jv](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[qv](e){return PIe(this.uid,e.uid,this.processUid)}[Gv](e){return PIe(this.gid,e.gid,this.processGid)}[jq](e,r){let s=e.mode&4095||this.fmode,a=new EIt.WriteStream(e.absolute,{flags:TIe(e.size),mode:s,autoClose:!1});a.on("error",p=>{a.fd&&Mn.close(a.fd,()=>{}),a.write=()=>!0,this[Xo](p,e),r()});let n=1,c=p=>{if(p){a.fd&&Mn.close(a.fd,()=>{}),this[Xo](p,e),r();return}--n===0&&Mn.close(a.fd,h=>{h?this[Xo](h,e):this[VI](),r()})};a.on("finish",p=>{let h=e.absolute,E=a.fd;if(e.mtime&&!this.noMtime){n++;let C=e.atime||new Date,S=e.mtime;Mn.futimes(E,C,S,P=>P?Mn.utimes(h,C,S,I=>c(I&&P)):c())}if(this[jv](e)){n++;let C=this[qv](e),S=this[Gv](e);Mn.fchown(E,C,S,P=>P?Mn.chown(h,C,S,I=>c(I&&P)):c())}c()});let f=this.transform&&this.transform(e)||e;f!==e&&(f.on("error",p=>{this[Xo](p,e),r()}),e.pipe(f)),f.pipe(a)}[qq](e,r){let s=e.mode&4095||this.dmode;this[_0](e.absolute,s,a=>{if(a){this[Xo](a,e),r();return}let n=1,c=f=>{--n===0&&(r(),this[VI](),e.resume())};e.mtime&&!this.noMtime&&(n++,Mn.utimes(e.absolute,e.atime||new Date,e.mtime,c)),this[jv](e)&&(n++,Mn.chown(e.absolute,this[qv](e),this[Gv](e),c)),c()})}[SIe](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[BIe](e,r){this[NR](e,e.linkpath,"symlink",r)}[vIe](e,r){let s=$l(zp.resolve(this.cwd,e.linkpath));this[NR](e,s,"link",r)}[bIe](){this[TR]++}[VI](){this[TR]--,this[_q]()}[Gq](e){this[VI](),e.resume()}[Hq](e,r){return e.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Yv}[Uq](e){this[bIe]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,s=>this[wIe](e,s))}[FR](e){e.type==="SymbolicLink"?PIt(this.dirCache):e.type!=="Directory"&&bIt(this.dirCache,e.absolute)}[wIe](e,r){this[FR](e);let s=f=>{this[FR](e),r(f)},a=()=>{this[_0](this.cwd,this.dmode,f=>{if(f){this[Xo](f,e),s();return}this[Wv]=!0,n()})},n=()=>{if(e.absolute!==this.cwd){let f=$l(zp.dirname(e.absolute));if(f!==this.cwd)return this[_0](f,this.dmode,p=>{if(p){this[Xo](p,e),s();return}c()})}c()},c=()=>{Mn.lstat(e.absolute,(f,p)=>{if(p&&(this.keep||this.newer&&p.mtime>e.mtime)){this[Gq](e),s();return}if(f||this[Hq](e,p))return this[qc](null,e,s);if(p.isDirectory()){if(e.type==="Directory"){let h=!this.noChmod&&e.mode&&(p.mode&4095)!==e.mode,E=C=>this[qc](C,e,s);return h?Mn.chmod(e.absolute,e.mode,E):E()}if(e.absolute!==this.cwd)return Mn.rmdir(e.absolute,h=>this[qc](h,e,s))}if(e.absolute===this.cwd)return this[qc](null,e,s);SIt(e.absolute,h=>this[qc](h,e,s))})};this[Wv]?n():a()}[qc](e,r,s){if(e){this[Xo](e,r),s();return}switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[jq](r,s);case"Link":return this[vIe](r,s);case"SymbolicLink":return this[BIe](r,s);case"Directory":case"GNUDumpDir":return this[qq](r,s)}}[NR](e,r,s,a){Mn[s](r,e.absolute,n=>{n?this[Xo](n,e):(this[VI](),e.resume()),a()})}},RR=t=>{try{return[null,t()]}catch(e){return[e,null]}},Wq=class extends Vv{[qc](e,r){return super[qc](e,r,()=>{})}[Uq](e){if(this[FR](e),!this[Wv]){let n=this[_0](this.cwd,this.dmode);if(n)return this[Xo](n,e);this[Wv]=!0}if(e.absolute!==this.cwd){let n=$l(zp.dirname(e.absolute));if(n!==this.cwd){let c=this[_0](n,this.dmode);if(c)return this[Xo](c,e)}}let[r,s]=RR(()=>Mn.lstatSync(e.absolute));if(s&&(this.keep||this.newer&&s.mtime>e.mtime))return this[Gq](e);if(r||this[Hq](e,s))return this[qc](null,e);if(s.isDirectory()){if(e.type==="Directory"){let c=!this.noChmod&&e.mode&&(s.mode&4095)!==e.mode,[f]=c?RR(()=>{Mn.chmodSync(e.absolute,e.mode)}):[];return this[qc](f,e)}let[n]=RR(()=>Mn.rmdirSync(e.absolute));this[qc](n,e)}let[a]=e.absolute===this.cwd?[]:RR(()=>DIt(e.absolute));this[qc](a,e)}[jq](e,r){let s=e.mode&4095||this.fmode,a=f=>{let p;try{Mn.closeSync(n)}catch(h){p=h}(f||p)&&this[Xo](f||p,e),r()},n;try{n=Mn.openSync(e.absolute,TIe(e.size),s)}catch(f){return a(f)}let c=this.transform&&this.transform(e)||e;c!==e&&(c.on("error",f=>this[Xo](f,e)),e.pipe(c)),c.on("data",f=>{try{Mn.writeSync(n,f,0,f.length)}catch(p){a(p)}}),c.on("end",f=>{let p=null;if(e.mtime&&!this.noMtime){let h=e.atime||new Date,E=e.mtime;try{Mn.futimesSync(n,h,E)}catch(C){try{Mn.utimesSync(e.absolute,h,E)}catch{p=C}}}if(this[jv](e)){let h=this[qv](e),E=this[Gv](e);try{Mn.fchownSync(n,h,E)}catch(C){try{Mn.chownSync(e.absolute,h,E)}catch{p=p||C}}}a(p)})}[qq](e,r){let s=e.mode&4095||this.dmode,a=this[_0](e.absolute,s);if(a){this[Xo](a,e),r();return}if(e.mtime&&!this.noMtime)try{Mn.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[jv](e))try{Mn.chownSync(e.absolute,this[qv](e),this[Gv](e))}catch{}r(),e.resume()}[_0](e,r){try{return kIe.sync($l(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(s){return s}}[NR](e,r,s,a){try{Mn[s+"Sync"](r,e.absolute),a(),e.resume()}catch(n){return this[Xo](n,e)}}};Vv.Sync=Wq;RIe.exports=Vv});var MIe=L((z$t,LIe)=>{"use strict";var xIt=SI(),OR=Yq(),NIe=Ie("fs"),OIe=jI(),FIe=Ie("path"),Vq=RI();LIe.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=xIt(t);if(s.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!s.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&kIt(s,e),s.file&&s.sync?QIt(s):s.file?TIt(s,r):s.sync?RIt(s):FIt(s)};var kIt=(t,e)=>{let r=new Map(e.map(n=>[Vq(n),!0])),s=t.filter,a=(n,c)=>{let f=c||FIe.parse(n).root||".",p=n===f?!1:r.has(n)?r.get(n):a(FIe.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(Vq(n)):n=>a(Vq(n))},QIt=t=>{let e=new OR.Sync(t),r=t.file,s=NIe.statSync(r),a=t.maxReadSize||16*1024*1024;new OIe.ReadStreamSync(r,{readSize:a,size:s.size}).pipe(e)},TIt=(t,e)=>{let r=new OR(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on("error",f),r.on("close",c),NIe.stat(a,(p,h)=>{if(p)f(p);else{let E=new OIe.ReadStream(a,{readSize:s,size:h.size});E.on("error",f),E.pipe(r)}})});return e?n.then(e,e):n},RIt=t=>new OR.Sync(t),FIt=t=>new OR(t)});var _Ie=L(ks=>{"use strict";ks.c=ks.create=IEe();ks.r=ks.replace=Pq();ks.t=ks.list=vR();ks.u=ks.update=xEe();ks.x=ks.extract=MIe();ks.Pack=cR();ks.Unpack=Yq();ks.Parse=BR();ks.ReadEntry=YT();ks.WriteEntry=nq();ks.Header=TI();ks.Pax=KT();ks.types=_6()});var Kq,UIe,U0,Kv,Jv,HIe=Ct(()=>{Kq=et(Od()),UIe=Ie("worker_threads"),U0=Symbol("kTaskInfo"),Kv=class{constructor(e,r){this.fn=e;this.limit=(0,Kq.default)(r.poolSize)}run(e){return this.limit(()=>this.fn(e))}},Jv=class{constructor(e,r){this.source=e;this.workers=[];this.limit=(0,Kq.default)(r.poolSize),this.cleanupInterval=setInterval(()=>{if(this.limit.pendingCount===0&&this.limit.activeCount===0){let s=this.workers.pop();s?s.terminate():clearInterval(this.cleanupInterval)}},5e3).unref()}createWorker(){this.cleanupInterval.refresh();let e=new UIe.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,"--unhandled-rejections=strict"]});return e.on("message",r=>{if(!e[U0])throw new Error("Assertion failed: Worker sent a result without having a task assigned");e[U0].resolve(r),e[U0]=null,e.unref(),this.workers.push(e)}),e.on("error",r=>{e[U0]?.reject(r),e[U0]=null}),e.on("exit",r=>{r!==0&&e[U0]?.reject(new Error(`Worker exited with code ${r}`)),e[U0]=null}),e}run(e){return this.limit(()=>{let r=this.workers.pop()??this.createWorker();return r.ref(),new Promise((s,a)=>{r[U0]={resolve:s,reject:a},r.postMessage(e)})})}}});var qIe=L((eer,jIe)=>{var Jq;jIe.exports.getContent=()=>(typeof Jq>"u"&&(Jq=Ie("zlib").brotliDecompressSync(Buffer.from("W2xFdgBPZrjSneDvVbLecg9fIhuy4cX6GuF9CJQpmu4RdNt2tSIi3YZAPJzO1Ju/O0dV1bTkYsgCLThVdbatry9HdhTU1geV2ROjsMltUFBZJKzSZoSLXaDMA7MJtfXUZJlq3aQXKbUKncLmJdo5ByJUTvhIXveNwEBNvBd2oxvnpn4bPkVdGHlvHIlNFxsdCpFJELoRwnbMYlM4po2Z06KXwCi1p2pjs9id3NE2aovZB2yHbSj773jMlfchfy8YwvdDUZ/vn38/MrcgKXdhPVyCRIJINOTc+nvG10A05G5fDWBJlRYRLcZ2SJ9KXzV9P+t4bZ/4ta/XzPq/ny+h1gFHGaDHLBUStJHA1I6ePGRc71wTQyYfc9XD5lW9lkNwtRR9fQNnHnpZTidToeBJ1Jm1RF0pyQsV2LW+fcW218zX0zX/IxA45ZhdTxJH79h9EQSUiPkborYYSHZWctm7f//rd+ZPtVfMU6BpdkJgCVQmfvqm+fVbEgYxqmR7xsfeTPDsKih7u8clJ/eEIKB1UIl7ilvT1LKqXzCI9eUZcoOKhSFnla7zhX1BzrDkzGO57PXtznEtQ5DI6RoVcQbKVsRC1v/6verXL2YYcm90hZP2vehoS2TLcW3ZHklOOlVVgmElU0lA2ZUfMcB//6lpq63QR6LxhEs0eyZXsfAPJnM1aQnRmWpTsunAngg8P3/llEf/LfOOuZqsQdCgcRCUxFQtq9rYCAxxd6DQ1POB53uacqH73VQR/fjG1vHQQUpr8fjmM+CgUANS0Y0wBrINE3e/ZGGx+Xz4MEVr7XN2s8kFODQXAtIf2roXIqLa9ogq2qqyBS5z7CeYnNVZchZhFsDSTev96F0FZpBgFPCIpvrj8NtZ6eMDCElwZ9JHVxBmuu6Hpnl4+nDr+/x4u6vOw5XfU7e701UkJJXQQvzDoBWIBB0ce3RguzkawgT8AMPzlHgdDw5idYnj+5NJM9XBL7HSG0M/wsbK7v5iUUOt5+PuLthWduVnVU8PNAbsQUGJ/JPlTUOUBMvIGWn96Efznz4/dnfvRE2e+TxVXd0UA2iBjTJ/E+ZaENTxhknQ/K5h3/EKWn6Wo8yMRhKZla5AvalupPqw5Kso3q/5ebzuH7bEI/DiYAraB7m1PH5xtjTj/2+m9u366oab8TLrfeSCpGGktTbc8Adh1zXvEuWaaAeyuwEMAYLUgJQ4BCGNce++V01VVUOaBsDZA0DaORiOMSZa+fUuC5wNNwyMTcL9/3vTrLb3/R8IBAgmBTJZEqgsk1WebctvO2CkSqmMPX3Uzq16sRHevfe/k/+990OK/yPQiv8j0EJEAEeIAHkKEQCrCYD5fwBkBUBmDpiZVYOkpDqUqTOUqTkse7KqfRKkZpSZ0jmVmVKbVHvVGONSY6xdOXf2bfxYs+r97Gaz7/VidrNczmo5i+X4/79WaRtnVo6UQAk7u1v/33o7HGQdPSpQj/7rqqYgCstG5MTLOF+dsIv//2aWtasTQFXXSGVKy0Ch0FwtLAv5xL+sjMzIJeSZkqQ+090j9RMRiYjIRDMBVHEBdLMPuzhK9ArtKWmta6w91npmkeMIbXl7nz+t0qqu7mqNZH8NgWcOML8gqf5fsvkoWoqCW/Uv9a31Jb231iAdAFq2b0f2AXJIgEFCSX5xeJctKHDjpJQ3m3Urk0iC5/t7U/875277i6mGdxYoptsKpVKptp46HgxpRCOeWYxBRAIkEfH8P2f4vnxABfSq3okFhW7Sh7EOU6Zknm9b/2dQZl1CfrShJVuQKkmDUKRlwEAYpohyd7/uuRO4vjhiW92oa7DifsWphJQsLIonVqN9+X6G95E9gJv1/aVCu6Vysu/NbAvVQJAIkgSLIIEgCcE1iBZvi3Talbv/B95N+2tvY1Qof7OKQVArLUEjJSQhhBgSgWJaCGz+exJ5As24WxMMguChXfbB3r3z09qdsMUgWww4SIpBUgwSMGCKKVKkSDFoiimmuGKFLRY8P+/j/1z/z8vcC0/38z9ixBEjRoTHiLRERESEEhFKHk1poFts2iWWWCLiyP783Pr/f3p9jjDzv+KKLbZo0QLRAoEgGQSZIMgEgSCZEogSJUqUWJmUwG/uv3/60+facZ/fES1atGixxRZhCENEGEpElAhMifCIiMh7RNRARD0osUTmQzS53d7gIWweY/AMx+gtFBHZ+QKBsEAgEAiEnXyTePKGdLaKJm1heyFaU3uzbTmJnADDv5s+/2iBsQLt8213mBZIEC+iwULwYIFUkDqt7977a5EjE/PA5Kn3lAZJ2jN6FtU6hpJswxeRU8EDzmheRavGU+8SAXcv9hs2VHFHpGFd2uSqhHfl+2vjalI8eXtMfadrWGGNgIrP+vNSPghBQhnaYRowg/SWg6qitd+w5dduV3M/w+v7ZmNa2EHT7PCw7b26WSDoIaI+BqiP5p2zrxStV+M2GSTNwLZe7+NuQ2yBmwrOzjTUkFHwTV/eBa16T3gA4/213h/1KeX+30V2dZfwJfquaEB6xymhDz3/VMrY5GD9qnZSnAOdHwOrSiaW52B2t2N16zP70evD5mkQyIw0SkzGfUSC0v6MnmPjA/zDgnWuNgwjo7uqtquP5iVWyxtfYeRFHYCX8Ri+J5QLlWqdxq/rU5NcBfWU0gwJLQozOPn8AKW8O8tlag5jTBhcLinjQ3x+ROz+sC1XeAEFjsiL/RBz5ZaHIRt1Zbw7BI/oqy9GqIvPir/AVOOYmyvYsW4S+OjA6lAao99TaXVi1/zOSY7OsRX/YRjJGmdyzupZMt8/DVsorPED2dvEHJaq3K/NE3bKc+Ilrb/azbMvPOIR2+6+xdd8ma/RzeYh23z26tLr9RU6lUdspWd2NAZvk1KsuWtCCp0djmdRFF8HywmTO5KH5Q7JmWezwwKTluDzWDDEEErDdtCCr0a3/GLiI1+HFJKGSB6KtqRHbbS4nsotDPyRz6MFVsQZEL/84gHTA3INdbmG+IoQeUnuY9jGbwRzWSQPASvKFzPQ8sMX+Ty0xAooDSUYEg2rB2Asi8sg++mGqyPPdcZaQiV7O4lZKh/GtbLxz6f2bTsRiLCS7YyUlJjXyQfUAqv97xnph6+1be14kuOkiiW9yBJa3qGJc/jQpCNb/vnTbiO8xEL8sWjHbz2Bnbw/6u0defDAf0FGLaQbLe/+iCD19fZdW4gLDjOLrMbQ2T9vzdtlMqbVl3aCRT/5cB8G8CCpn5B9Lf3jpPZHybpehwzVihnKVbsZkH26pXEqhZl3TmBX61DuBRGWyjOcuBvMT14I2t2ppPMw9ZDpZixooFP9mAgeVVq/i0VyO1POaBTOdukyymNgYmnefdg99y0VvJTipQXLHiIB+GYJk6iLBUtXC5Eut2DpuKRTvuBkW3pv6b3l9xr3/tvyL7GOfiZJ5G+M1aBLJ8TSrpD/ib7xQ9H4b9AfOQ/uEcDmZB6cL2xC41vkwfpiTmh85keSHMtuqSwHp3CQjy0hCN4mosrShflH0n4J1MoTLAROsfy6R7DbEVIUplDwMc4bwsJzphym5GmaVt3+FVff00PZlpU7E5+eHCn5OBo5v0P3QHYrsHNk0PZ7klsowDlcZtJdJgvEbmwvROEM44XY0SuLhahpubgq3SzjsieuutCgAA3qM4rw/MfmzN6HiA++fyU4Rojl44Jb3lXXiQdVSyENix+uraEeD7BibuDCZyFx7aSSW3MA55ymmgAwipqWKus8ykE9HSnJ7CAcn4q4rnO13Ll54POTEjqOxF+FpSAggq+iW01ABNH0JIpBemwUz1pq6GW5MeY0mCE5NtDFSzPrukTra4iNQgyYuZRHSsz72UwNvCA042mO1PKJUG7b896RNyXM88mIr7W1lyhCT8uigfq1LwQ1zXpPQsUrUocxVC+No06fCYUsGWWUjl0/D4tExtJmp4w1SYeaLpnQJ7CNbVODe+nUys2PIKLyxnBq0kHPfRWcq+THl5c2JS2fQeZBVxYtIn74wmnVXuTeFKjE4apGeJAQWnr5Jum5VD/KXuOoyZRPRtrgkZfqvDIhmlbcO6TcjEIhK7mkfR/ad7WeqFjihp7L40OITvp037LNCGX/L6y51MCmkxcpjKCpzBA0noqXTJW2WtDBHUAiBTBi4eBW4rLSC2L+o208CmJ/sxGolgvDgv6hwNsfmxveCnGodx1iKVgEsUO1vE1JKVnT4SgRTO2dgh9K+H599CAmLZE8YvfNp3nhge3MhwAfna99yEZihxv/XwtnAneD0/eEOhyhBTIjd37wBrwuGTKcNBm0/Mx8mIj73As7n47h25bDP3X6UH6TyhtoUa+4M/rKf5ClWLs9Y21CYGxQE809XrP2Jk3orKEJ6hOiL28/33rVJeS5dVpluNegSJcPZfWrG3wDPe1BG6B5cHPnHbNBlhNozcJdZMyFTFG7UPzgl+oUCXRn+ISQ1WnXACLe4kbKtvvthKJhtUPPc2w70asPUj6hAjfITl0GnlA+vRox2VZA9LnskDs68Tk16hXuKd1zfFgC7b6qnLKaoEVXr+2g/BhWXIgw+GVBoqgnDnVuAp2qiUC6qOG4x6GNRVF5WUi7Odw/iUrK/gQUFTBttWGE+ceQumw2t+2dqUrzOrsHSaolipYpBpeLVPvA+1LureB631Tl56A1Wd0ryu96SzibapY3Nz1TXxbMfhInq7WkbUrgGfVaH2vd/tsicD5w5CYV+eISjPH/omyb0wzec5XMokuSw+38AZ2b9rNMawsYSIHvehmbPWUWUuFHVW7var3Am1LM8YFd+G9VDZuKFOvxqm68LDL8bNbjxFevGsFlTyXE1FAbwNZcd6k29dl6ub5BZ6V/O5cTFBmJtgRrraPr7PoqJUnMj6QIpMIodZLDE57k2i6TROku8ZdH3m6Y1vYJFSWTeioWMDaeNqyKHeN8tlp4nDWkSQxHMqbaON4f71KnQF1IwiOkHHPCMrVw/D5W089eWX3/j60UkkuvoRPJTsumkpFd6wW09GwYBwLMgvEZcBgHED3tGu6bESdiXTBcD8W+EIsfaJeutJZ5THXopIx6YVJDbcsMGmYsZtIXb8bsVjewXzc88FcTZ5lYYoFhIrBcO6ljLt5+dp5HmzXv1Kg2MwCJDrRr7qVlXdraGTP828XfilNRkEJ1GwtTE3I1t/aITjVWiTHgXNljdnMXh5wdZpZcKzszsONMKEJhMh0NK+bDGn+rAJDC3mgiOZxq1OUUXNsxkQWhYW1GFtRiWFZNcNDeLLlIQll0jLYPjE2ynxKXI4lcBwCNsxFW85dwAN0PW2KmOMcI6cTvka8d0LYiqm5TNUQfQJPIoralnyMJ4bt6oiIaYBwZu+k4MkkXTQfL1e90rIWXSgjgUBMgCXkoTn9Rr9HCuegYSj1NaIXnzEQUfbtnz7/FkaUwrNSQpHIL+Jj0VvXs5zg6Gn4hCOMevrvMmTvdBdt6DOzxoF88Zp3bG+juT/Zl9hHsXlZY/IeRVTezaepfT0+FNz8u+rCFX+1LykI9/PPmJIfH8/IRAejJVADY7rGj+r8PWPt4mhxDEd6+n9rB/NPcTe2dTs3pXtOjtNyFndrtwLPSz6s+d+vOkWnztCqcbmMfyfd0LcFRcVF8kjkoWIncdj9IKIfZhh+PP+DeY7TVAGAK++IgvZUF6PTLIJT9EhxpprSPCoWuxThGwP8vmEbDs6kDehX0zWXz47U9+/Hqajad+simdjof8lRabLnIvfxoaVOQL907ZBofU7FPER91ifRhlz9nXfSHyGA+c9sQnfOh/SDUqx+vRyM4oJLJXEyfaISzIFoC6MDWR2JB9vBLhhchIiznCQbr7n4zxaEcvphNcZfivwbIKk4C7kb+IcPA8u66nd2Gb/vUiilkp7G6ydQXj82jFjlebJ0yyezuSSbikTcg/iPlGxcWL0JnPmnSbXtHfKBGopIcI3lir17wt8hz8Tw0UHbloVh1oDnNdFBZVkteweiH42CzircC5ZTif9eeYhieGEnmUuVH7ai/JO7HRhjYEPIibvKkVqM3z0jfZE3TOv0ECUC8NkRhCWEHvAOZQ2Di9cpB1UFmdoTca81BmGHQHV52E9WYKITgpIkjtau2nj2g+/51uj2O1NqXpe7/et2u+ywiRJcxClnpB8zPWr8KpuDNG1On7P5XzL7w4LaThoWCyw51tg67gUiQxAvac5QMfVAg7A9hcPddIYKqXNqHKVTRL1cI18UOJxu71LHOStvahBLKaojwKBgRA37Txbt+RZS2SV8fnhjPK3JtIrQYXS/KbLS+FL65SGQrNoZCPoQ3jPPJ5oGmhVQ7p1HPtUJWZUSK9u52UhHSn7Fz4LaB7f232yKKRJk07LL/FidQB0163aXVWAUV+9Uo0KWhJRPowfH1uqYdJztTXYWif3SQ2veJvBWruwtw9FsVjhQC7panWsvhWmb/auexdM60b7dpZ6YWOyOJa0qT+G9zC+cUTlJul16NOjStrdI5+HmW42OyTZigq9e6wSExmEs9irgKnyuV2XcQjptcAhXGxzo0uId2qEuEZLPpPSpkxKQDdnY2nESOYlFBYmNWyWgXWU1cgMEOrISgwBaXV58jMLxLhTFsomEXb26Cnyiq2J2giU9Fm2absgPt4Rbymjjkcd7KgXAtHaXNVLic47oHHBk8ARny/M5iBziv+H09TI7cjX/4l1dt0YkbjOG67cwvyDnwimukP5zYBXBFF7hxXAov2L5b2RfPdccCG3yiboYvK/mEAdstGcwwoUpM2weBoiRPCYEpRZxbEcXZdI3lGC5+PAl0a9AOvplhycISXApYj/Cb6zYy1K01G+osg1+ehGE0m/zhJpyLJ7Z57DmuoP90ZNkReZoycA3m5rCOFZTV8N6IbLjf5BqGMUl4znKQZT8ehgTTt5IvwXbnJLz/7W2WXCWlXpiwfXydTi/zOvfh/iZZU5gT/fCx3nc4PpiXjU8MdqGAs84cdBbTDHTs/YbHBvUVFzcLVURv20/zNCLGxwIchrqFeEBiuug3jSpTTTU7nE2FRDhL0LYczn6cZASeq3qNqi1zQVYub8kofKMm6437UYd5b3/SO7CKivw4FWFPLCLc4Z8CBcULyQE9K8kclUkMZwxwWqSVYIrnqhl3jFaMYj9xzk4XxZQBOZeTHSYKTGcyN0fb56s9a6UvmqOL8RLP5maDP0skmaEs2VciXWCWkS8gbAyh6gHDIsnXCmDhDERh10JM1UdBGKpt3XYeJrw/+Ox5PFGyCLErC+uRMXw76JlFhorQtT6lEItxakSkm2joAbmHfVOulpr1LyuY5qrCVm7ZV8y6SBu2UYc1R9GKlgLZ0FCB7GyxzUfoiunzAJUkS4CwDLnKYZlJE5rs6JF008a55Dco1ZmpojV5KSQyO3RGmuIu6MJqCkKcv/VWPC5Cmzr77J8L2amlHANFA8v4MLWPFTxCuY9+llLIkHb9KqC6drvO76U/HhzYd4TCrtX3hIMtbCl4wpA/crGvRH0eb0k3lkNxfNADxb3kdLBtYQIKSVtpVDXnukN6/Jdmoy9bYx2lx/ziK38opmSgnSmwC8vM2i8fKZ8MSMatN+ll9Va3rQptqQeOiUWdB5P8j67+kp4MWQFGUJgq/jA2SU0WLYbL3FznrYOcZUA2pFzq8l+c26QbiCbAl8Ch0La9zRiLDPy2srfCpXRVcMOatjv3XJEqv6lQBhL4ygI3GKN8DSMNoacSezvDfw84MD+EGYUFiyxXhVwAcjhmct3ea/nmTEyFPJL03efr5cMR1jXApiV6KATnd6csvUBQIDUUE/gF87lpIhcASzc3FNkongQzQBhyilusxM5JCHhq1vsAHUSGlgfPu3T1LMf8fUvu+nWo1UBLM6eduqghd2CF8y4g+jxwScriC7to9zCH1oCqa+AO4eXSC2V6Ayu3vW127r3ABmlmG7suJd51EhqnAydEaetoL5Z+Ih9DtWAiYG1DSpjkcYPAD5smccfdVDpabrJdAdk1Bwhk2f/0XFt+gZ89z9cWBxBadW17CYPkcnfxboTMe+1Gm9uLOdI72/ZEW8/y0dSUqGtJdXZHqbBgpaZqxg9gdyvqrqrbu6pWaCOvqGZ9bS2aNQDDcttEfa7PXefhfw+AEl08ngtUlua0VZbiX43A5T84leaUEbC5JWu0ClotsUtMv9U9Ma8XonMcneCouY74ROyoXJb2qJ3JxdQ0t2Q4GJsnrM6NKuEQsucEeknJx9Kow/RNlZAi5gmhVfd9kZGBWxrcGjGGclP8Dlyf/begmrKtRtKZ5yBT8yKmq5BbFMBNJ3ipr7VHfJAIAEVxbHyfCVVxhN4Ea+KJOX1kmZaTU/zPKeIuHT9RFhcximF6rOEch4CCeVy0QojIiYrbkxQjbaoz5+dTT2lV8Rvem+gxY85I+O944aZIxHzaH3mJ0YT77dfahgwJEN+Ecac7wiCCIbmkaWV98mdvPxjT8bb5DRzhJR3z2dolyrlyaNktNUvWxPOjxcke/OgOG/FwhyIXgS9DOAEITNdNLXNtuKDHc8plFH43V4UF92UVd917U4OC+UYmM9htdQeQb5I/FQp+3cw6YsWkTBNupvHaX4FOeZk90YqUGUsSz1gWzC1geFSSiYQeEdS0CY6LXPM4KVsvR61UCB4pu70JHkvpAE4e0B7PIba/7aQvUbAr9ZlScVQ3ZXzHatAGkBg+fO4eawSGac8km+CpXbCs+fb7FJ8xW/0Fy3TDoZwOwb6pW+BIv8uCG5EDbNrUSRJ/WUcQn4nnt35rFYyt6GLoroOfLw+6Gcj0pO2fsa+AtutLPb9/jmtx+rXd6t3Ls22SglWOFNbJHGG8r7Q9xIThX+tITsfORZ/N/tf/jGqe2ikQDYq2celmNH7OnXLzSvuO9YNSrDOoTSTs3LlGKochkEZlMW/XAAMt7Yp/jbjIlVq2TSg8sewqPiwvBC23Zm/dTcmPDerVVzsUQcHhB+nzht1kaCTCdTNhdvoWKwvYZ4oSsaqOGGcbb5Fl+rid+q6arHmMR20GI6+uWKihVOIb707/PrT1cPyirhOh3NZKdbTbl0cuJuRSqmEV3BOkAGkr3zd0DUr+L5QTewxGAetWpDipU3AdliEJHg0sdyYLdHyNYQueZGb6g0jlOWQQ5J5v3aM199JVy3Uf/1Ge3bkUt13caf0uBvT8mPeOg705fTxlxlV8YqKpH3Ky0eqPaZDkVLcckyXL+x/Se8g56COoCA+vP5ov6o+Gq0F+INLDEJbG6H7QTc1uS8BzgI5xdRrVjdzNfNl7xrtUcdNhwEyTmciqsCw9t2xIe+RMCZTaG6rH0HSa8IzUrSafJqsbmtZwLNfIT+ipGbS6EDg/AOjP2S0Q7NpnkskF6On9uZfJBNMc/vRuPPO+CgdQfjClqSgsCSMKIdCVJSvc5lo7XijOtAu1+cAnisoJqanxLtNhMiZquTYxAg0RznpnCrQ1N8m5SKv/9Ka54quCMo1bPbNcYTa/iO3IWD+FCky5gplE7yvElfoQPOiy3GB0tsPgZH0HbIeEcx5cI6QO00aSWe8+aiLcg8lMxFwL5rRyH2XFwnT+ZpIDbUYiKNB/G0P3n75pLoHkRmfle8JmO5BO2juC2oc1qe6HJ/TC45AjhJ6czzOtLg0Q99Zri3cs+gIfZMwKN+ZARqPe540Aj0bGZso2NHB1O1t5/RkeDdikWUxkEFPKEMbII7WtZuIc1sFeyNo0fo+No1AljZ40n68sAS64VLmvZ4P5++PAqbMkRjyKYh3PXfxynQI1lAg/kz1Ky+RNG2hK0Lu+tIqLD7o9+gSk4ACGxLoKeLU1+YaI1HXJtoNRuw1pMGcuWfZTpIvUyIatl1l45Elm6xNdbDS02RGC7HxTMmZULCwdGyYXsYp4/RJgdqBWINVf7FKIaio4QYm6H5aZIpV+2XsVIn2ATFIBBq739vS8O10e1CI9Zros+/6UQ2nmCDXg6z3adf3sV9bEp8t+e7piPl0Vn6K+O0ZwZDjsWLVv1mgXeNI1bBh6kk8iojUn7nRitqTJ7o+xfs6NZTQfilDoypCeK/kaNg0+yScxuUa3HXBSpNCIkv8gbspwrErL08UpBDJieyBraCuOA1hAPfmkPFJZ9wWq4uR4fB3I6YYRqJERQ5cGX7At+5Np41bUzSNyjseRMm+HeG/Y4AOTh4sFQ6eZrtDMr6g0N5x4Qj/WEqGJ53g3lPIgwX/BjbkvAN63C4acLsxgdIE6mJCCXUZhvDTnr7Nxa6EAYH4AlflhCVNGE6TM10ypmFEoUVr30VFr5dMlvj1dIZ+iXWpUQpswhGTZ0rUdIE1uAB2ho3IZCUkoAETlgWTYTpeHTq+R59HnIeee8yLnEKghPA6gPynJCqv9EmBxl5DHixNZwGIC+ISIP596tmySz1lKWOfJSzCNvSCsphu1WSjnZ5BhOFZrKuj4Q5BJTEAqjd5FcdDoy7EPgtGmeNT6dAtdPT5oKKNBnrUNt1bmp3X8dGpblRXKqVL6+ReHnjdSY3QaLY1HU/FmqVXaPTFvxYHJxUlqTNMfb/OJaIMHrSXQ6d5QHmVpnSy8xGXfAcd6FdokA1MKAzBqB+j85xb7scozV4FTownJXNbX9hsG6i8VjLYfYfFVwvqdoWg8d49fazKaITx5BOo3bIcHKBdMaTC3DrBju3cwmjGERPEz67R4I+AEDzJIO3z0q/ZjUo9uI6WejbnyrEJp+V/2TkToGvLmdDxPqLdErgttfHueQZ4wRk42tDr1WI8ZUpkTvHvSi0wss9WMPTuTccFYOp7Vc+65+JKgOZUryMKe4H6cmOM0m3GsQxeaOPGNKY9TnaotMkhqAptsqyevZ4uGBuo0ZWacIsUxWpCQz+DT7IwKbQRnd1CSfDDOh1mmV0VZj9xygoOSlrf3TxLf8QylmirPfJRzz0bzs5Rn15+jMml2WhWeddU8AM4eATCKiVf/80RzQzE/HS7HcZBCA7w7y8fl0m+8fuf2BIEPdXRYvXUac2yxwkuOKA77mLoxfFbWKQndw7U8GDJShjJxBIgNBGN+UU14ox0YgJ+IM7vYX5ObmNF8NKUC4CN00gHk+OEuqpI3rCNei6d1kR6KzxyHsQ2bruIRx1VHoFq+zW9Ig0WemXUnkWLSlgPd0Dm+ARifyFS0uujurMDt1a8HpqbYz911nQb4TwHyRqdLsFgm3PLoUmOnDL4udj7Z/97w1eaPfyMtBP0ewBq4l/Xnypqpl4el6OnUYFt4SecDUJjh5B0Hg3uQayutsdsj6iRMwO2hMuVSyPagTWUEh5No3x8CE/QRkQHzxmWErQwksxqj7aIQyRA0obK2FRuX67Fs04IxIWOrytjmMZpyMlZdOQowSjQ2jstNQt9dyGFTjTwsdzQsyj4OQ1SOojVrNBLDUtOyjB36Q88MyXlKDihQT1mhoAElDZhpRAJ1KJkLj2EwzWYaI+3SN/5dVpV5LZftFyzcztT2sLCjuGuAKPgaNxY7Nc2bn2UgA3xIlzlUPE0x5wMiNMa7b4KpKq1kS2RcZXz1l0RJajkZzj5iiSqvqYNE0wvIytCMEQBK8fuOzqNBwV/CBCcfhfuwuq64o6mT4miwYCeoAblNBALa6rhaPPQTiijH4KaYg2bD9IUkWwtoDFhpw2/q+paPxEU3jCQGs/LnZKbNxJoqZecAyVC18y6st4me59Qnfco59MewM7GFrp8eZChAKRvXk1tLx+HFdBacQZHR0oXoXdscR+45nbBRMdY0Jt1QH04iAHUwDO7Iku+pHtupJ/XuNcuDeCgbKlpbAd1u91zwSjAOoE80NFnZX8q1YRnYpbffDudICa6eWt5NSVcKLfl+cbdk+sUIOibTNqBNJjyYHkBbLOfADZHkSI8CCggwbr9goMPQZcvj6cKiR+uOQ4/HK/GAOIzNcVLj8a5bVHwJIbNgV+IosU8kQnt/O6JN4z08ORoYvyN5iOfg4xJgMRceOc3anQf65YOrZTSP0Zq+Rcsyms8Itz+PxKCKxZkYMeVFOKfGYbISW3i7P5Iax0nQH+BW/QAjDik9AJDdDqTFQb1zfgQv2wJ/FO2jTAh2jL6lLnM2dnbL/7BygCU0AWKvBHJbwu+CED04ZVad3yNuNpb93gn+XsopRH5LteJEwkqG+Ekrqy7OJlRyn5UJ4BnpxLRCksfT+YhG57Ay0Ivh6rmqT+9J7yZXr58Eus52M4TYBYndTj3HkRS7OBJ7dUkfcRDKiLrgSRcxZxD1MikpUfnjLYoBgonb3gcE2R/otu25r2+sl8+C/eTRvq4+dTSetKZnL4qG/6D/Im0MDe3VQRr+lkROZBeXPhUhu7hVT5NL512dVCWx71GZo3MherjBXD2vePP+q3poRAc6+bB6IvVW+xcbAVAujruIz8OE3RbaOl1Ugqs/uDJjqJRpZPQ0SlQ9Ivo1WkaqU6R68Mvrt3lPeOvET1iGUQXgTMyshouibO3A/wuZoOjc2hD3B/OdIjSXYkhPII7JCPu3QKMV80nSyM/n4VKY7pdIb6qZhR2JvplYrasbD6F/cIKnNGHvZkbINmSUNy0sdlwHbCEExifPCp+l5HM/2kKUEJzMZluCjiXCNENLG7iyYGLvnhldiknwSxYHZN3NzDk9D8kbcCT2woGofSJem943nDYcmMtyZCpzEMdwsO/loCxz+grJ4MZitO6rDKDHIacWBxibAWoc9BWWwTyoy/kNdOVEloQkyII9AVU18e871tLqGS3CaI3folUwms9IXwEaXE/cqv9yRW4ESOkBgOxmgJYM/6tyrZOHVK8w4pDSA+DB6ZW0ZOhTtGRUjoZEfVEetd9rNOYClETrOvfURb1BWPYd9e9lMmN9edm6qA3CfC/S4BpRLTvrhQw5kfcdLVg/ig29gUiTiPdeo+VHCmwWnCxcl0ZNLYmYOGTBPoLkfUd5/fRqQQVr2ToqcEtoKAc1mT1AXDno0x4vt+vn5WzkXyHLXjI38zzj4ty/MLhuiLqYb0FXHHmQRABZsAOpKkB3CYy8rp6YggkRGyElTkgUR4gqkhCxE57jta3ILH4Gn+nru/dQmojvt1k+R06Ba4lIkp9IDHJ5VWdBdyIFINaQgHe9u1B7PKcdQhGKWcg4sJTW6K90F0JTZChHDNkce5itjJb5yr8O89zqdb632zyIPe0df+TBW2qNtJQt+7585WbdQ2dOlTAnHsQSz002FRKZvcPR8/Qc/fK4lhzqXcgkRtdPoTN7kXOMGRXItT0fr4Zi1GSJvOeB9SzIa1APrT+tTPeDxfHZpd1itV1vgdSXkiUlzxzTS+hJfUoD2UoZphAnfXB5uXoUI8EF2hcXj820hev769o1gsGYtEa1tFPgATELWqPyeV2ZYIzyAl7J+Qo4F/a1N3LqV/OjrnJGpoZo0uI4Y1DW1jf3DRqEzWv7RRdVv5yG4Lnyh7agT/tf+tktBzkd0sPdHFLfP3ZBpI74T8AdJc1Tf2g4TN06i6ziXBnwpqSoypI3u7D/aPNAz/D6tI4YyGUT+cOzJ71ReWL1AerHHOeqeO7CeqEBneqw3DHPhYutpNg4VQ+NMwDTWTzmnjE/97qTUKzdmxox9WPjwyr8/58Bdi4dU5JylYkp9ubriWgYgJYJBF9Qw//H4tSwBgDEJRALURops49OS5z6RZtluLDJ0x9lA799/c34tDHsfWLhDLX8IklPe7Wtp/V4NO89nFMo7i9+6RC8gWUx0FyZIMGGOR/WjiMQ9paDOkxFdRTBSfaVVDA2Gsr0lxDsbwrR863VdxY6i6KQQBLJJV2nGQjU/Mjtwp7+AekN3fW3A/7Dexq8poXDXB3kGW19YXa47n+n9gMpu//ZPwFzWR62lY6J/Tm8pVlB305Smnkl6In+9yEVNsbk1wRrxY7077fU9sjDB6ntBtBpgd2hEdKrv+kraxOWGwjTjOhRX6IQXE17xq3LixEEvQkMM+Ye0BFpOg5jWMCwStz5yGye48bVSa3WvB19O1p7nRv6tXlp9IpT58bvHtjrXsWLLe4QSmL14mnfcL2GmS7BYK/vjDkt4lm8AN3zWxix275LeB7nitYSH3boqqh84JEUlRdUCSqMLxf5cfwC+0KEBfU01o0U2ddbRNFuQICKoT+p8MeYhwZi35FzW5c3BatsW/X09ZfOw2K/XY8NNZ7bW3hPd09j+DhJoFopL2Td1KTEJV199pnPzC1Mv7csySdSqxt52wPq1/vxEY94I+PF/p4w7nn2/maWKq4ij//uPUbPPtz7Iet8uu9+34heqvtT6XaMBcCQA5dmE6YdznFrpM1jhceli/E/VkZsWyo9dL+wWwvPYJeLud2MkvsCQBaTjuwjPqTReNJIMrJAKcvsIuCR1x45zt00mwAMdDhr0uwmz5o/E672l6mxa5uSvi7g6dVUyiyjl+Ki4M8PdC8vnIdK695dhKM/IU1YflL554i+KIFsmpa+vhg1dPxi4pPRf47NVb4nh/b+1BZZyXt8m1BEkHM6OzTEEb7jhtlIZMb1tOgRe12nWf0kp1iu7Y3Zjwtxxi9cscph6+Wpdek9k2NZe6t15LBAOMAA9bM02pYzOjsovPhIrf7cfs7Pa1Or4UaRtUAbKlhl5F/unfqvPMiBnAOil/djhSc4rS0c3Ji1evkgvKI4lyivNmGl70MPpN63Gk1Mix9dtf7pivhKe1Ib1LmcwTNoFNQS2XxhhNIA1gDKgwua/CzrXHScGUBOTb361NcszobHMitEj7TzDDB2266FC1hc0XliJvE0ltDflTsPLq32TMqeA0njyEngPyfkyRXqv39HpwJQZsRBHPrD0Fx2UhF7UTSH675ZD1i9ETygY3cFWcZM6IUJ+J3v5jc0jwzjp0Yr1DTOT4vezCVrqO3TJVoEswD42nl73LYLP03itFGb20YFwZ7zi3SiVmeqwt45dMeut02k0c0o0Lot9LMq64I1WzlSzuXGc45veEqE3SHDeM2WZ1kQRmnpGBpUi9bv+8NbQo7Th+8W2d63Fw42nFzatdTjhWEak2mQF8tkhmhwJYuzf2v33iN68SJPVkzcqiR3znKD1ZXD/ydzLbUdwLltd1Mfbc9w/P9S+4qyDsQ20e/3mfbvRAtCzNLQRm4cN4p2KGwDTxGdnkbSnUOI7uM1LiKXvqWXrOoKc+rxbDC09VyntHsFxIEmCUlRhHU/YTOyP74+KouFO1OF1LfmUzwkF/i1U4/8yTtIqbJKPRltRFFLn7Ld4PjOGFYGNAmd+EGG2P5pFEtTglQu9qPaQg8ZtHIFXQAukCgCpPde4xQoIzaxP+yPQxTA5riD/0FwJ4hED9uhk0W6/Wchrrgw82nl/xaCX8uKIUgLKoacHY+ZmBtbX4JSrV/vUalha6YBUOAH1tMAG7W4VAmCoWNQDLkBMzH49fMDlIO/b6jYig6JCXyhfTiyFGjymkPiyM3p5hvXg0mpQTJsYPtjTjqu1mbeYSWrYh80f90OJHOHOHJahZCL1EEuhUSUR9FiUXNaRpX89llNu8DXdA4xj7doINu8Q6kXN3lvp3fost3vHV7KMdYhtGIpvpx1pVimIu2Gm39hPpK/m6KMKVvhT91EOxJSgQ1TxNtzmt8WV+IfeiutIrRxznlCMrRB9aYamZ0sdMVm2pbCCBeLeArNOWnRQ8r44uYvXqV0MMHl6r8fCp/XFpGYVC6/gNOBclOa1pZkwbmU87FR0wh3DFIvsMqzO8g86q92AVgXKlCDBtZOfX+3SW0vXa/92dBx5L3PMRjFFkbhJRAXzIDOLgv3CZuOiQqD10pHQb7FoqtUS4xfsVCxKgAnW+72X+7PkgNFjPE8WgUgh8eX6W1gvY/UcjnbfPzAd5vjl6DB/TISaX1DFWUWFEkzvM3jer1BwAtKx0B2AOPYGL2DtxvhiW/TuwocAXO/UKtnTvGLWPJCWbwN0f5yTlkUIGNIo707TNY/KbbRWsvKVjYTm2CO/BAtV0XWnW15YA7T+B92yN5IUvGvXl94bN5x49vD5JKuS4yjdcrx+g6JyTxZL1NTFHTkOfIfWUseh69la1YBzdgi7a9WXyzxQrEVDzC1YWqh8rN39vtEbeIBDVEHgH56nsgYq/fauFgbD6u+q1RzO6zaA6D2RAxNGAePqVW0nDzqiZtPCGp8P/GPmID82P9wS/UHKxXbJxfAWsYCENQGbsfydLYzy8vhkTksn3XgNShDELREsxG2VjPi6AJZOwyV8xOO+EqHDmtt/jw/hCIg3XsVvgXPPsTybLbfbbzS0EZ/2+b9zj+1PA87FNYgYrlvvx/V3lMqQ8Hz+s8bnDiSUu2vIL00oMn81NaO1WxIIixPWxlo9WvX8dsw7aNR7kDgCsJppKHso1VBGmvmHqAhiana1+i3yYFETyE1vtPpc6J1QXLUwboWe5/R7cJkOisw6fCPiJBghYzyKL6zc9nahDl+l/xFNCfSJimbUCCP7wp+vDzeCuQ7S4VAPoD9S1dwJHZp3fng8+GCfP7vBIMn7GbdIQRpHv05T2a9+2kp84hZ1Nn6Tc18ueBdXfHcV0C9lPxtPc08HucFChZoyXjCIAsErejHgtEusvRrFk3HA7jXY6EZEL/S29ZFrZ6Km/CGs+fj3M8qkWzMJFb5HyWNCtfBCryU7wQnVm3bIYK3jqBPkkt9nF3sY+f1wTYtgvRA58uqvY1pf8TLanzsaDA3IEhQM12NiVlqFuNwizzh7/6bwIxnzOza9VAeILoQDrVZzVG0+IDA8jNTJ9fKJuwx99dq9p37ZhlqHJeZeMXo8yFEfdE2jZCaou76IAWa9H4dhts7MWKZZ74O0z/f7BoanEpX/aIq/EEKHvPDlKHLSXo145vg7QBkxFSvXmpf+lO/M09T9aPbfIgziu7rnKrRj+4d6kb1zorI6B0nJ8qhMc7+7M7zSh3XSAuQLtWWUSsLXGoSkGMWK3VgT3BOy3F02Gg/9wMw1p9wa6SwkrafkmrpfgN7L2GJbR72nAClVbtye8V8a4DPyQIu0EhmSgo1Oltrp4RVWpS0Xx/UqzodyprcKVDqpERN9RliKi608b1uKy1UyO8G54ZoWIoP3OTJzFh5aCU3ZceHeqFTMzja5JbLsh51q1IIq4MQFyaT1Hq9aojBzuMDlvwwJD6TKp6+rWlSfKUNWYVIQmBkGlgo+CFyfygBgmKKuzxTIxSJdsZf1+FqPFugGUHKZjm8ZP72tG55AIUZpcWdiQ/iE8lKqIKrajmMvGXyzTO3bjaQCZ3rMJaJaap54V9QPftcmAkl2lZfLmS9tbn5mBnkCIRY8tvSowaesopFhUnUOclWirztsmmtqu93W0fRf41ucwSLGiMtgStPNm3WNxtMSHLsMeq8jaFSHZ9kOvZJ6wuT7FEyLD8Yv+uzisUw68n3H5TQQsaL/tjUTwYIkkBML99VKpPdISLwCENHAOANUmcwqI0g+IMUjpy+Nn9Fx1Yr2b0mvqZSEdEm4lBwNgdeuPyhlGru8p5SvbNUDA6YP2MF/TB7xkwIeDIEzqYH5UKymipf76wlfWXxhDxYSjrdnuAGg30N6qzifM8DvBdcRryjmrU+CDMJtLhGuoKZVMBSscgJk9Y/l5ZctkwNwPmKJtRcd4lIq5g1qIu+sefQmeuUmleU0WG3YXalHaQqxdlY80WdMzsp0FtN2Q2UlDsLV1i6fhnTUre7pq0kcQ7hmtpU8VJUsxEMOngMNVuEibhaNZLMr8x11LZoeJ0dpEIvtywIwo4YvPktiRepoD8PLoi0IDzu7ubGEvms6twDJy3JnenAR24eKHclGnNwXEbn8uyxfgTABY3pz+GPQbaWgDyWTY++zP/jg3fRHy7Kxrh6TxvZsC2K0T071qArULYam2hKmhnOCoWJGXXxi9VPOadzx5lj43GN/7fYAFRFNDubI4Eh9vxm01VOZFEI0fHJzHHmuHl9bVjDr6rk/P8cb9c4JhW6vBtXLFJDy/GMplr8MaHAyknKnf2/1CFf6Jo1kW9+iFXItI6Dcw0u8hKZqJWt6QiY6riwjCKlNbBwDI6uYwtYdJTCRt5GE/PO/XBaI6fZHr2+NuiZDiFbkXMCWUwsVe3gDJeyZ66raXNpnzff0JBDH+dQnV5JpeTYqz7nQFDpUdkP9YAM6ZCby+tO3fZDHLobrKhJqsaj5tvBnDDiRXEsLzX6IK2djp9wKKH3vbjd5OZ5wxTRYFWmnCmAHmN8+2zO7mWQANUwBvDpxx44kS2x2d461wJgzA+hnt+VYujuO9J8ab1bz7g08J+XxtrdHMU2Q11sWGtb1ajdvRX7Ycf13NOJlfWdUBpxoN4kfMEmgC4l/4py7Xm9nnkuaWf2o9CJOVLNTWS/X/aOtXoph3sNY27ym0FqAug2/kj7jZJ28dOPYrD5RrnfdXjbU+pSi3VZyj8LJLzZCqYtRB1bOo1Sue/XF3F3pc2dVBq+FHZuod0Rivt3zsE98h99arUCUaYEBPvjmCZqeXtTGQiT0Yeh0iLEnGAfH0dUht9WKOViaxVrqsh+izP6oFdT0ouFvQjVQDFcl+mpeEcUdOpFoHg0JJy3c11gAvurWC8gzBPdtiSewge+BiFZA4AJUlAyZdkO7YFtBxiLmN4l6oTbCAJdv3OspEXBV8vYxoFEjJyMWACi5XM8QmQIoC3oqf+IkHD8SdUhWI1jcxhqk27jbLYY4yox5OIp8XavBwDYAr2Rb6Wc884TqFDh3qYjC3El2lk/AqyCRRnh7siTEuH3VB7Kaqyt8GQ/lzeN5SViIgrDCtM8hvbhCmFPpSH99dE1IS62QU3eflbvuA1SEeClfhqvC/i7YQgOFc7GRfmRyzsgTUAXLPcD8ND34Km5UzfowwTQMWAiu5h1CZ7aN6DhlIDy4iqkSoPlppfyXq5UWgl/baz8ATbywzL5mEAJ6JnGJ6xaCFwnFNkAnDzFnQZqIAPICL9OKyHzSsOEUrYHGHjQelWQEjGojkIZ8ji9sIB7w7xlMd3APfhNODKB51feEbINNvfm7b9oUONTI1dybZxzm9n2kmJgvcw5sF8kJhN3kemSjhZibMxV27jV75hATdrH15J6CroCWB+DOkVH+EOiCdyb6yMTbufK9guzqSbeuJK4hLOmnKIwcTQspZUClg2K7Mf0JtGTeQ/HqZpC7PNYxCzeU0mt5tbrlti1J0MdOQZ33QVJf/n7PbOsAbCO2d06CNQbtAyAdSQrNMXC0NWpnPmSCRoUFFlRJaeZ+Z4SOR6gQAqo/U4DoE5Sbb3AZx4vgZhyrFy6PbzhlkTxWCgrhcDezEZKldMgzVOrPSAsbAHowadGZDEuniZpVvfnPdGL+KZ00NGg1Vs1N40WVs1va07fSuDovh6mAjuCGmXjqCIULnVPsStWPWUq456n6IMmHXOn9vTIb0AV+ERrADpOHYglvFGNj3JJ8hVKSynUPqAclHrQNnkCyX6WtXTJ/GdiBA2HcX4/UA3GpNF70urARZWnYBv1wuaAUqU54MFwvl3KsEPVH8rq9rFPKR0dqm3aLUbZSRhkCUxKCYBicPVYuqQo0V93Aoqo+mkUJzRgqj6RqIVWw+n2kXts59IRMd/wVOYTaEhD1DnfGOmTGNus1E5edrHH/Y+UaerZUTEuEgoFEyTSAAD3IAwNUZ/nm/tKwfIr/2bG1XjYK1a4YhFg+BbjYpXxfvEHngADkXfSAeOQXULQGVY8O4nRqnxFYPZHtdm0DBPlLu/H96SoJ2wT05u1ye8xkVRGQmnwLzNiUdb7UC7sc0oQO1No54IgN2tFG0ZMmOoYlhgmV8+xFl0cL6eCq1lcSntZAd6Q+kZk0ls0fVD08fDVu8Kzem7zfET94w8YcJK41b5/DKVDevEFJPsliIBqUMj+mpnH5Ht6ccyltm8CnB/ZJWECv5StR6y2FqniG7V/26IMzRPd0+UMruS+naD0z7DCdStVfdu+wN7YKxb7YCtilZrWSNJKZG9fjkNx77fRbomr0j7W4w6Z/IVl9Icc8IPfApB+OF2PG66NK731jLUGYWb9HgEazE6l8b5tzCqZ7Z2heyMdgOE8V5pvT99gHP8y++9t0IoYnMJASKHDGM13KGwG8dhLjno6k4A1mXpfQO+N+1oNP1wCZqTLpJ61+jy5jCJb8sGP3NPC5dp2Wc09GKpX/WBq1CWj8906tTk+lB9ytk+A5ZHFhabqGin1lQRN4wmxNEd1CSuiy0k+hg5RORQJF4f8CMXsXxR3E1Dm6F+40ajj8hkCx2ARwO9rw1rnp/kspFw9Y6H71m8FsW9fbNsYt3bCM/g9P+cvNwcSHdwwa3yCAz3t9lUag/6sKdbcBqaqLy9BExuvW8eOcyv7uKMJFlKycAGdjCNCC0h1+mcJqbaf5lrIHJEhTOR5+scW2FzN9kZQZaMsgAbpmEiYy6pej/RnhPesKTP61hCKcR5ERR2f0xWT/JbZev3QBAZ7Z4DjWzlvxIVMVvqTS71FWaobdBnVmW+ZeFXiUUYJ+wJlf2hEGySkL6qtk0yNG8CL/AC9704eCnBepEB9scj9OrJX3kfdaChUHK2UV7F2dOeQuB9I5i9vANRw457YlljMHIeJaDbWe+TiaJ26riL3f1329f3Q2FucOurSIWWQ2jCJ52j6ZSSn/+sYAtocRfTp50EQ8tDUZjFOrVF8OEPWv5xrPf6G4kFNhxzFco+09JikmOpFjTjKWh27NQZiGqlrf5jvkkN+2szHUX8DgE3XbY7OTf5ldJP3zFOGogsH4rsJSstLjxZnSazmsMNQQsm0sjinT+eaNm7PG0j0NSNlGeQ4qPjasFM8y+RnBwGKcbSiNFr2PzsE6I8fFdYJ4IWnjWotZtBZtDqukcucDohIqXMoWhJF4eJcU6Ff9iDCw176pIzLKfh+WyJr7fZm5/tJvyC6nSPyxBT+dgdgUMOnMaz/fH7IZqehJvh2a2T6ZEhnNrqFRny3DkgMal0Z7sGS3Jw58rf1Tf1Uhsk31rItwgsotYpCHuucOO3f4TxC9gMEg9X6GM0AxUBhUa3l+hCXvXDSCSNTOiHxnUH2/MN+rNIWygUiPlmORqhYZ0tvGhJavnaPJTCCxggvqEsul7zhE/JVNAn9C7IVRwkvI/PFAYY7lEAGxpdeDQ+EHWlrM/glBLgb8+VTQmsDrkDsGcKUDFHUpOxbqlg3kJ6ej+y234ABf4gpjGJTr/NtpjBhmC3MarGDlAxpakIsaeoPBZiATv/rhJY6gyIneE80q0E0D3gXlbtZKVcXaYS9rQgRU8B5HIlYFqUfQsbm3oeAkUDBE++iIe0zqrQEPhCA86AsBvWFdEMgzgV0nBnV0bARuDOZhbZa59eN0Ar7ZzsrpNoV8gd9ZJlv5TwyuSu6DMJxAu8nZno/XBFGEm2e+MWiJZYFYfmg4XE/5rMzFLbZ9XiIYp92cBmdYmkwDJN8Pq+TU3T00JmGEbcduvzw+P/a4tY8VM65gdFAIpPNMcLoq6HbY+03j2qA+r+psSEyIUWU3Hv/We8dR3+seisFnkWi0cfgp1NXhh7Aa3QLpIz0wjlGSqdxQIRMioFv7uduNcltFYnu0HLS4MQTTgg2qXkRoc/PQZ5PaZYXQiJlS2H/1EaLUD4oPVGPNTex/ED6/k32yHB+SB6Dwdj80C+uhfT60+lI5NXc8moC9WB7oR5LAfcZRIi1cxTimeIpdJ98kJQF0PjHQhAQ5clWTFamAOqVG8wzCu7RadNvQqM1Mu5rTRqsSgMwVJJnx6RWra+kuT3YIIsALStrOFb9MFInjnh+ZOQGyi8Y7979auPp/EF+x0KKmAaIByCjiQePNoeo4IvljmG6Th6MrmVjtiBgC7RyKnHCNcLKw7x5UeLzcZDhSGcE8NhqXgCfC8DvAZchyih6JxiQLAHp7plvSyAdNQkcJhIm3PLAiHLiqDOuGLpbPaHIGzJfN2k7zgfWBo2R1fX6FHEQSDebBhhMqNVbH8/atmoReisrOgCuVeLgc4ZLesQ5obNElBQbQFBQRpYTFADoNRmwgMF4zGesJb+Skf5bqYg6KOomQZcNLWbnNBpFtrrdwwJKf4tC8133rLcwPbmheDZHfjnJIOz96sr8FKcIR35n5yA++nosoJR2U77fRxwfKlSEtiUxgzh/rhVEk813AY57CS4w/5l4iBxyUQFpWP+ILPgWOHpMiSWTZ5M6rg3WuWIKqG2GBAFIAa81WmDiCRd6g2P/NAAaPEySnz2AffbGZ/PuMlKx+CYQDs/iV3US5w73T8PFVWLcMMWjBY12DM/L2GaGGdxNQXVLmMEhVKi5oyW3eHF1ZzjMlozYk6g7Jk2TEAP5h72HUe+/H4cP+sKY8IJJL2pQT7T/kmIA5UoLZraDBPXY8oFEnRTy01TbC0PYGV++2L0oceQypwwEquHXJSUNPuU+KeChw3qQUIwmbCTULskc+m1FtHQDJxC7Rw5l/Jf/cirjF7/nAHAr91yKyD6ECzge6PiL3fd0aMW+UF0fdMxqd5h5Xyauxv7+rKpEq8oQKlQyouG6u5XKaGg66ZRUgnokQtJKJm8G2/aDkg23ZBXSwV70MAONVIExLPZGWV/d1TW4OatRa4FjL7/F9+2L7GH+N/4NusigrwXcoEqYqCVSTLlxi6LBtvew+9YrLNxfo773YTuhCh1eSGemgpjQVEGN6mq8SvDpffNaNuQHRIMA7oAPuTO/b0v6RgHy6AEG3ZQ2uyF3F/f7B97cPwNLZyFNoOVovg1sUQuM9/uJ2HWiYJsKc6vAyJgo50PFK41+5MXKQYrNCATVspR+lMxyOI6coxpqbLaoRVF4deS3rVy7bTxVxUm7qriOr2jiExdDj3/htp0zKpaQEeTZrIWtJ6p3QBihnzvMMLRbWSHr5CpDNUDeiFJ9kXeSJ7lEo/2R3XBlxSBzv5SoSTKlFAH2MWNofhf4L5qwD+rGgp2FI7/SquPiw2+x9fi8ofZeKbbKjnXuNLejn6mlDlDb4L1VKIea5lxExFFlj2Fo1b4Huozuk1mTiQ9WEYKTNYoE8A+qXFekEXF0Ho300UnSta4RBoO1swiEekYYNJf689Z4eruKWefoYM5mc2OIpqYb1shI+Eb5b82V4h6iDGI+JFb3XooGueQA5Mk9wrjKwSD+k0KbF7aA5L/wejFYxcMvZ3DH1urC+xog3W/1/2oyySIrT6iPRqFMFRtbwhgVc8rAUVkvgQUC6e26yaroEXGhIS5/edUT17dmc2sTePHCnsxLlhfx7KHzu7VXq0zH02j6PVqk5OW172tQJ72Lg4BDXZeKr8mlDAgLIKoGw+RdarEVEYMUqcASNY0vZsJmnXeazGFbJuXSkjEsEf+B5lHhYopRgSFYVD7l2/rmh+sLB+GxSXG8tBobHAjncV5gjGn6o6l4dBe6/85SkRIBBKRQtmCi/kHgh+uzVQczrsAMjd5OVdq2E3r6+cbfA88Oyqp8Q0Qv0Cq9nQptRq4xmfUoy1zr88LmKmH0HFUWdV+HL0aby3yD6BHAanRufB2bz0puq+G56TtfHBiWIVdt/Ggs1oQrLFV5pVJIIheyapbxVMeL6cHg7fGHR7bYJDfaKdZHVuEWasDvkFRR7KY1g4RXDzDOg57exUYPVTnRjk6DvmG3L4Y+ory30leorypJmM4Wf6EUAB7wWOX34s1VcCtB6L6UuDzRSD9hLAWUFdBMUzZywBu3jEuHqVyVXBaov6qr2vfYRN8Xdk91XrcUnOlRqCi6tSA7HLqrAG8izlmvOsogVF8i2kaSTJDAnuo8rVTq8G4K/ZjxwAkYmtw/eYBtI7WjJYzq6921FWhIhV7TUmuOxmgezAAkpGPAWfFofuSTQMgCx/1m2GUaU+WSlbPwP+fLJiVeVrwLaUpzTJWeeekRBvK7JIc5T854+ZEQQP8pr2I1VVkqPHHKX/lDHSD1MCeoWIpoj1gnTqFYwFk6OR85WMSqvGK1uT6ppX7rxo6eZHb2gspPWQ+kIfNGPSnDGNdmC2wYJ8oyhVzNaNOCx1RUxpTteGoGnC50456n3aC7xs+ugeGJpLR5QaofOCf2qjAKzmZYnDnvF/1WWW0nKZMFo1Lf3MT+PeO8zirLRZMzOyu8/VPQ7WYzpzEUrLYHmUvPFBkmrIaHkIQxxR4xJ1oOahd5jLZ9kOoHThbs5z66lR7WUp1ocp8cpPculdPKkRdYgrMRRqaaIVCDp4Cw+JbjbjaEj8yIQEIcjKHN0Tp2muBYroVGXXji14U5Zt8FTzbkqHMp4byJRc0FcF2L+rjRslgumUaNi1PMZ7xVJi3c8IhbyTT2sS9X1NdtwuPjX3EcXeiJhrIZLW3yN6NhyYhVsOch4AuRG6yJMjZlHW46PULXjuPtgYnsjAK5wMzlIU7CIapAZuNGaCWbXgseFqngcRjFa6ZbHnHR4pMgVVyjheGcYeqZ7lv+yjVhKusjsYgGsfEg91ioNKbsFNQCJ7/Pw06iSqz92tvwwxUyr2fECoqDSLUmJgUV/TSeWw00hlsD5hD73UzkL3ACWJ0tsKT0QnhP8WgCmUGVbAUK9wvhN9smcoZwEbCGCkHQzor941LOpfkJdM32c3EuzozmR/lHP4v/MfcO/2lSbN+Vfe0xUMN9JcU0BO32/PCOJ5C2mYgsKKqawVF2UMFgPp8fn6GzMTOtyzIhWeXcJUMXVBLpFaJq6lEI9cYltaBcMtjtgQsO/26ZZOjLdPVjhLYDxvp8YYFofLgAkjmbQhsQcDa38qBcSli22uYA0iTlg+4Pws5FB2vKDFgK3r4Bv2YpwaBwQ5wIk3TxH5JhMw9SPqUAXGpjQ9GG6hC4eGTGR/3Woh4Xwkas4DiLhdHMEQEtUuZo5e4USnZj1k6dFsu8X2cRtbX2aK7Wo7BXpvCN5YdLFAIykmyBw0YiRus7lUx6lR/mafZ1ekJal9iThy7Q0H1SdCIJqthItA4aedoB45I2UJ4NpV2YGOECTc8Iz9CcYZ8g4H62rryPso2tKbEfAxkIZ27Lno2U9jcONseDH+vSz6Y26JbBsIwyYL8KVSg/OefVfOQJVqgWcTyd3su2ZG1quF1SpdWE+eNlMKaN9b9SVQJidb1OS7TSH82J9mf/GNn92SxUnLEkdFJRRPwwGdzRgBa+V4tw7rqmVWXWJdUnyj8vgxkgJ0Xa0Y/jMB72C2aF3LveEPOJpIPQn3bMgqwBGc3CslNoSDEdqgt8n3Y+4ACfZEnZDTrOBEB+8cadmvk8Ci6xW4ek/KrOMHIaQIWyNVMyx7m7RSbIYuokoTetUAtcUpWnTMrNFLntX6FAXlBvJhPls8gi5DgKtmMC5rgECl0X4tyjhC7U9FVkogMpBH1/pEcd+l334uTDgqAGzK13yVFn0gHaXbrGWU+0Shi2K/kx7sTmXEzNjg0usmC9Kvj0nSWuqf+E4HBunQ8wIF0OW/gE9glOykYo3rfStrcYRlcfSs5FRpUap9CcIiCikzNLd4k4LOR69veGmSOds+ZFNz4ShbftUfnw8wvM27bPzeV6H8zE+pIqO1Gz8mzFcqhw6DANr8VL6Lh67tI8lAPMlmNOnI5lOpCUYXpvI/FarqxN2bHMsQdgG6/JjL1Py+D7js6M5WdrrkZ2ovqIHEQvqUlpa6XLumFpayUgXScAr+V5jFa7L4vzEitaOTIO8QR5lKyzNrATn9AsmkC0bRKP1j5YB7a9SP66YtWJL4dbDrdsL+PF57kAZooIyheTMhwOcMBayIGj+bsaNOW87s0DZlzqrslkFa2c7fPaAMtV3ncWpztjTzi97c8Odfa12wtx3UyzMicoZiUxt7DF5tD7bxkfLoyKfdCapQNk4EzvbN0FVO0JGePRaN5/dODIBVJmGhN8qHDlDBRfG2mXefC4eahBFojRskKPUpXa1ArYqHIdaHN5QO4KQ4BDzQwGVk0KmDKAMAYQsTDclQTjfyTIAHhIDWog8s5SUVLHHY0Wo4AzqwTpgyHxABhQP1QAvoNG2+BFjhDhAMxGoXRg9/1WpwEgjvJfjMPYC9gyA9cXzGD1XGtPA0AnONL9jhWI5VlnHYsGdTN2Feq5HXXWZYhQsCslwhLAVDhVU5bdUMXjFUnNjeOpGB530QdqbdDaj6UlPExmeBQkc40IPwlwkg5SKz4HH4qyc8b2nF0qyXuSn5SKVqPxWFFJfkKEqkurmKBsTI2woYiISrv3SGZL4+MU8mZvI6LjzzfBvtjuYXQ67SdRSyU8RnrHS01sKyR2fITg1knC+II82444iVk9UeGDxiTJz1XAfCh8bG0Hw9vcmMJi2MPVs1jq6LqdLPocnn06PYd19D65mB2a7LhTxN6V6eMZwKFoyQm0UY3wXijyjoifO/BlIKxK6GiFqjpVeEfAKAeR/WwkoaZH4ZzeO0SUMEtcxM5gswrFAOIIh9CVDlRaAoaHqWTZLt7g9j5pa6v2w8MfYMUMIAk3v4jSATueDk9U3MLdUH0/qjh1ywHEOLOUohk+FuS9js5qHTsIyRcsODsq7X8kovdbHWzgbBOftCoVdMkxnZN1uied4oK7Brc60QzHQuMlIeq2eazCgCDmSTcx8NGdVO+0+7T1jxQbMkWp5CNjT2PqgaQ0JfQzgeG24P7p/asg0Lp8anDZYjPJ88ddRxe7ExgNs7YI3B34Fhat+fdW2KHjB7SaW81dKXZAhRs3rOaCAlc2jJvuKnTBETKpGW67xwbbnLt09ipyNfzAYlsJ6yGQNnnHgHpvtfx2J7rAaqi/2uMc5XRptsyNFJOhgQb5VebV/SD7io2MejwNLCJRQGBgmc1vNHVAdcBtL6Du13XggvEgZ34I9veqmrgVYWg09zw2hlHuIKbSeGxIZ7Fwz6qjmsx2BiwVJ9rJiopl7cfnE6iFIUBY0dKR6WVaTxUB8QOaLbIu2GINk27++FwOtgVap0bMzCVI8KJK7eTkTBmwL0Jfeby1y1vrpfKF2UeqI0S7ocPrHO4m3kWgtu/YFGYnGIdoOjicp52CNi7P7EzZMjMmG3bjynaGg7xz4MrxKZlQAm5GJRxUlHqE9LFsNQkCByxqxGEG+j2y+aHBnyAI8qQDw4uBJrm4aCWQ33C5no5vsfgzdiYCCsoR7gLwHScxgLAmPxOTJlDSQail9rcC+0n14FIdo0qrSmoyPNBOox7Wv+zIS7qL6DNn9dz5e7Hjn3bjchqBH/sKnNy7dg/WKy40/rrTKywLwjbftwovOqUgClosgqFpHeCAOQlillefGI+/Sf6XUi2CH+ynjHFUf+8ik9q0O93ebMcdkQ9HsU7NEOQ+9xFhvzPRM9E90fvwHPhH2IiTk2BvOvH2ys/qW9z6fwTy06bwMJitnR8HXp3V4pJ2GcbDzmRWuT6J/sgHV98j4v8ATmQ2sLrhCR15j+YCfLhaJIU7YkyRrJn6ZcGF8aZ3oCXTG+IeJiIzCyjFiHOZrDkVLOoc/BiLdUUpskucvq5Fzmlv6qkS6I3HhL6vryG6XViEfsyvqsxA+Mq208JOGGbbk09+0OkFR/YvAeCpChuIC95zYVW+ExMRJLF2Ix0U2W6A2Lun5+Rnf/PMxl82gO8r/y2EyvTXpHLefzU/7wYbCuogUYtisx9L7PoDVapgg/emvB7EOXwXrI2U67GzXF/I27qKEkCF7mCDMsKGap9Rwwxh12yrR1XGlexnIlsHSPYXyOp7jokuht6TNDnijSUVgZykbs4IluMUUnWd7vQlkf3yBCqgTP30Q8cEVQ58PuubMGPjIjaDW23AR4xFs0WiAGByugzWDXx+VTxRIdm5f1B2XEmPUPD0lll6BWeN/4NGWRPZouiP1KBC+oW+a7reSgAqRL9MWWV436LOQh67IXPTTYsSHq1uljwXMkFIB1fUaX5ym0Kc1YUfOtUaCUr6gbvIBcqduJicG89qt1Lm1pzdC5Vl7TAWUAlSOdxtuIAQf5gD+BMm6MES83MeAB8Bl8z6yo1U4vd84IxJaZTXqWTv+aYN9lrBxjyklm0PwML/ulXg7Zv0WWvVwJN9WzqxagM6Kk12OTA+OYJIrXOHYtxOklzBtrqq1AoH4qvokdysJ60/+v/zAMmJGLqWuFn3wgB2G9V/Uh/m32M3XT9Qf7vwx8nZiyJ+WNqcsi8VbsotHVSENJC1DaY4XgL2U8ddj+8H2PGq9v319qaup+9XmUHbblm0paZJ82T+AsJhY4fwjpUtmTmUouTJFm/kl/il2ht9wIFCI7z6EHNX3Gia5/BQK0yRimbJujfZeUDzQusaqDMggRTo5DKIjsZDh3HqK8K5eHwCMK2ee1FdxNnbZxLjbT3/FVj5suDMPhoLGSg+PaeRqmAn6ifao66xcxTxUQG9nCAvmuFTxcL+2dNBwJ6yaBUZPMy0tePe9scNtOIRrj6RquPqJ7W5v+1U76/yQkEF7teG4cDGOj5sWbOdq4OHWlfX2kr+q8dq6T9GquFSFbZbzBBvmArbfp+gn5l6T7Ai/9bOAITxxhn8b1jTQPgdFtvLbKcIhLuIUvkt7pHNFZNLlmrI1j//4iP0TYSomqi/PZ4EIXlvLa99PTKWZ+FkhPFup80IFmpoEybwX0AEfTYho5gmbmIt40QOkxA8fJD+tVl13N4O98sgaH3eZInMJMmI5U+UJ8b0/z5Zo5gtnGpHdl9SQK1xKg5CpBISxYgbnC+02vb4D2VRICQ+rV2l56BFRWQl2jNqYZG/xAH2RYPQmp3F6sM2OO1fnwISvKa1DEhrVfH82JyhEFfAkjLuHVWFjmWba6O7EewTCA35G1Lk+QEsTUmk7hO/9IsYhVSmV9Ri+JwmhAuNVWqaq0YRe+4RoXN9iEuHs0jCWpmm6IM4EO/Mo3So5iM6uGxTDds5WLEEfa76zFyEcr6Iqx4mV9VVO+h568MkU9CXoOLE8YnhF30GY0sdKCoczpvQxCsKTgUQ6qPx8EgWNJIZbFxXizVNcVTTKbqovZFfW0FvdLmniEVM4/5/QrpYXAFbVCEEu0J0pfCGk1vK4jHal8pCM82+shClbWhRbP4ziOiGl66/I4jV3uJJEeu6IK/Df9ygqOtovnmMaSaICNfWeKMgEiKtYKJZ2WZZQZgQVYEdObRP9sEmz1UVBt48Wqv6AJYHqDIvJYk8v1OEXhvJlKo2i+ZfT71l+S4TiDJLNhydJURrLQQlwHNZMKakMwxVi24V61JyvW0p+037zm2yCCPGqJU8NK6NFAKy+enGJpLDC4DHCWAMEEBiApYIRmtgbc7cK8t0LZP10wjlQRqlZrvj+NMJMSUHMwu41YQUAVUX+H4KGj9ZLutUKP9yWk5PIlkc8nRQrOt3jrX5zi6KDcVEv32++o6D0QQwCEsn68NEum5DvwR8kvgHXTlcZdDCkBCwWRPZA5PdXnDG1Y6dT98lu+O+Z4NejVSMWhI54GOCZT7vw3EBjKXl8Q2p7w6g7SX8ZnDMrp8IzRDcQGNxGkzP14FRvxVJnDamGL0a1sEIFsdieRLPQU++q7RwICGpdvYG/fEDWDmeCbCSJGjmmtis6Ma409c+kJGwiCKOLsL12hOX6b3EaU9Z6C32lk8GdFj2YjQuJVKrk3Uam+HDBVous5xZJYhciFGWG/R10+oxfEHerfWDLGFXg2TfPQl9DhYbzpvnyjl4nWxiBMpipIyJackA5h8VPqkiuEJZf0woD/qeFnJ7k6DGDJAhcNwIsy2SSiDOsrHJya8HOZJIYVFNpY15i4yiNMxvqLnFE1ppEEJPAoFfhPnTpmS15GYqqf4Yq47WHhRB3Yi+wfpBTCexINpsDWc9Vwj4E4VN1y3UVz7s9cvrWfSVepMo+hgj/UDHVLTw1qPcE+OUU+1IvUWMNl5bZUE2xGtyLl8ZWxE9hQC8ssihqH0uwUFC7/vTzqBkbfjx6fYrpdfn14cfj3SnnpubC3bNQXsJeot4YUO9urxJdrfQ/CrMaA8Zd+e97v8W6y/DRQlY4FOh3OHumblV29Hm+IZ7pZV7GeXh6fO10N0kIh9e95w/E/9kYKQKRHlCPNvqaBXFTJ3c4TcVyh2EjwTHxmABGNDfkEjrU9lpSUHUYiJP2Nt6fNKvG3X7ppsODhgcQfRW1TmQigS0EgYb+iIG6z/NPL4COclYWIDVRXDFEWpgaYECwggrpC2KgnAdaslISl5KLZa+vdp73X+OV7OFqM+pjueu9XG7fIyh3/XSPidzk1L3r44R6NK7wcJ+XJdmYfr1kvLLQSdNC8XvK79vgAU40yCLy1IFyY9v4qgETv0qlP61A6vIs5yY1ahNFp2wfDFwAlLxntFWt6qCD+RRnNO/fGHnSN32HfVSr4o1Z1dTID4oz+7r5XpgOUYB2T4oWHFUxfZYxc11uRCORyixMI7vKR/UyTM0AIglNvYAzQKb+HQW76Z2yYPnMd4kCowCuxjpQHcfpnmL52IAx95ytVEv5//LlV9OjYMtvXmFOOCmBFisc9xRdAulCODb8T0/z3JgqnnqtHwAaU/7bD0eKoBuQzei1OyXfB81j+4wOi/egyoHoRunYwD6A3jnVaFBOfo0Ds3yph7JwHVP9/bwku0xxwqsXZgRWNogv6r5vKOdS916kmgc6LDQ+mBYuTKuQxAwyHtQz6SAGTtwIk2Qc/tz+qBUxI9Jr/taZPYR4yxNmXGy6YXU2XLh5+68Uw7o0rhKjxfD4V1ROLxL2lC+MbRTCXZ1dEoLiSzllw+ghs2HBSVthh8hNXeCc+3ZEnvuTrtPf5ufwdR+AXnzq3UeOyy03jhcHKsmzWGiP2rONY0VgUNaVEvG/N0bhIvv1bgPiKVQO3Ls0usuYCOtB1WUSsAchHQQTk2I7UoYsuGploBQeKIWmhXG1WJFMc24fONjOn85KxjFlLh80dgtBhv0QiK56iDnJyCdnlcSYGb6UWJImqbQWuGO1W2Z4XZSAkLRtd83wZvfpKYBGUJ3AGJ7spEbwPO2sFnjMqlUhHp9FZMPic7lgJ72/sWbOATLXUb8wVWYJw4XZV5M1DbskjvUdu+qIluO/qdsk+TrbF16zc69gWWf6/hABsERZndhgw6eACxIGTycQS7a9Ew5jOAHGHzQYcuWj+8u9/cjMfqhf46hisR2xqoeLO1CZV1VY+LDSaLojJc5yXwVbvMYMcA8CIscca+CYTmvvXyFvrTX6u7iLjD5VUClfgq8Al8ubHV3ceePWyhiIW2UquAPImGK22ZmHbe7h/iWMHo46hLC2JrXh9kDCH5BRBwS74y8tycMd+zvCVMci16R3kKfF96zzx+9vAIcJiVCPKBCDr7Uc3eDqwHkxgagAz33NAC6hgyCvmjuwJAV8ztii3O5AYZfX/JZoisZ/qF4td8ub+R2zI0kbdIS1GvejepoScGs7V5P1RD1ZJU0JERoi/nrweld1YfaAP8IF/Up3y/v5eGbt9Se/PHuTYOPnthgU5xd46ejr1PYWrLO4VSelbBjVeQxB5vyh9zn8FKO5Gi+0OhDyeSbC3fdsFGPo+ywqW3Ww4kDv3VCom3Y18plV11sZsu0dPuGswyoDQF4nKFm0Cy53tv2+ndXcb/JZ9CINPy04x+uyeGuB+2lVP8OJFsg8h4FRKvYHYHl0hpYD0VFegsd3nYNL7Ulzrc5m8kPrkhVTUE5C/8yQXTuZWBICE6Fbp8g6r4iR0yuB6K9zr5vrwReYOoCaVLWTp86KG4aWOFEdo7hO93sCIfJla7vrIC8wBQRrd5mwFag47us79GwAgrPfTwdmMNFeUfQeH5So1Vgk0M5DAsGoSk0FLhsJ/XF0lcX7447xSN5+Pn00s4PBD/Sl2pbFznqL0Y166wybWbKy1+s7zs1I6+oRvTf0tBxpWZzkn4cGLNezhTnGLJnJ2iogZ1qHA7e3uTf2sMlWwfHh784XJRXsu/jMfEx7tx7ViCeU3GzrjL0AFazslaqRo/Qatkb8IHiPfHu47Ad3wiqvI494lke8TAH0lWkfC9ytdV6PfpnVJJ6ktD9JLsH845XQGX24sUmXyj6gSFc9kwikQ6V+vhfr949YvKgdEKCZZTWAzIjLGZNToY3lnTZJWzmV32SYlP82haTbsU5xSZF1nac+RCmvTwP3qDb6hGOOQrFaQ7cBmFm7FDnGFl2ACmLX0j6QSfWD47WsG0KQubHAt9JvrsJKDag+gPRsQpFYq4QucRAA6mP95Sf9RfTqXA7VrSeBg/cfzEfd/weIl45yeqmVjNVUAY+ENiUyhpbEppm9YbVF6ljKQkSbKOUfdxPCqR0vwG5amMMN9XscvyKb3LRSxE8VN+kjmH62/s/GplOfxCVmpRhFDemyqTuJtkvmhDZmr2QjIV8W8sX/Ci1Jelsr6j9RX6JEihAxROfuG9zm7jgY0YkajA8ANj48JkdZ4QQ/EV//JcdmlsgWCF0fHFU1eHuGSGTw8fxzubYySuRo637fJmpId6imVh4Dul0Xxkw+XRWo5FNLzpbw7TipeuS/iV/iVqzcUJrKcVNHK10tufaJ9do5m5+RvRWfUR0fok5Hha50OBURRedWObHT6qw1BjqnJQIlYu5MhvFQeAY23jMIx4HSzzmgOOgxjWr3ilj8ODrS9D7g6HxgnvJ2hGBteRTbH/7sVYpKnx1EcA+DmwJfe8zzyvlPI8fOLhMvM7fykrCAXXCATmd5cr5zymxK9t3zm0T2LopDGkPI71130tCDoAe018dbCUzpV8m290WI67TwnrfpaBGFUwwFAkyT7H3xG7WEQobVs/lMsbMzz3aoukkFOgemQIVKTqGGOba7EF6fjEHwQoTOU6PvYNc4vxw6lLcdweccmHD/EKxIiPKj8J06UwybFTQ1ltvqx2CqMj06uxuW82a8ViKUfJB31csKMOCq2SjDJ/Z5EHsLs+2bN+k5+pMvn7FedIwOAYoJzXV+/7U/NSwlchc1RiNREtHNOOF3D8uyk+wVKTpvM36vOrq0PUlv/SRmbcy5KIY3/drDL5JUJWvn33LVXbL40mFjIwivr2FaKHDlZFY1apOb+GIMfjmt7tZCoiOCjufSx9uZU/zIbDfe/LO6lLu9d0judEFDsooN2jb0437G6WHd0tCy1hwvnMStPzeWtaHxSCIvgjT40S3/BML47tivCg3anAOFE5WakeID9iCgrGBBlTksuMSm6LTp4icidpU4ZBpnhqYrVzIsLUzua0lBUzzExgDImsy0qKF2oiUuw6MbcOwWnKb+tZh/uKWjqga6EJv59C1DcO04Dauf2MK+lscYbwn1FTqyqDbMAiUqtBChYe7hT2iLwmt3s5hAKwk5OWOy+hvQV1F9/SW8Kejk9+MxQTorcuH3gXI1lmFZJx8Ac4X0u6F6QMhXqnEQekVviAWK3wBaykqAEEdw1SuugAdYuCEHJRqYxbVZPNUE9g8IRekR8z0mlySHqmTSOOwt21ex8D38HBgvH5l84zv2aLnhNY7st55Ch10borHIJZOuuYg1gTnQCPUsUlMQq004Qu2owdInYCvrtnh2GvUJ6zZeDJV9igdXCVh3Bp5A9QbaL1Gnutdgh0VY7S4G1B7EjNyycpOdGqGmbbNPeGVsmxcS8kq1q6BxWukRwBTFiWg+hjgyjX+mB4BTOmTHBummeG6JBWKaMQJHP9xdJQtzLPSMIK2eoFRsxKAH4N+eyT5skyuIMt8AQdbXOcgrA9xugiqLyi8VMlH3ItsZa0rArKdLHi7lEO0g5cq6x7cdiIx+ComcliJA3E4iSzreVhxFtloGDYchPqFVJ3UbXlH8vV3zIJujcFiX7Otw5RWJMMTh9f4+CVbuVWHxIye1lqoqR6muCK0bglwMPhJW03aB6XRNC9Caj961DJt2syzZbIj+RP9+yTX2jsneeA1B7r/UFFd0Nq4qMOiP2QF+t/b+VJWyoZRZV0d8OfiCI/bEMgcgIZAx7G81nq3kt/V53NoO8BhdwVEqLbL92pyforF3ahaX5bh3pv2dFgf25ypJ0dWQKMsM0sfCLq/U13ER21xsdBcLzhtPaBs9P+QNJjfscNTJ8gDo2qQwzbUbLhmwza+cjXQCUlrGIsVII60OtOmbsq1YXrxBFJrotDiJbDJMKBivZFTXHHN+YeL2HSzffjnMccpHJT4whVizD9hIbwagSPzxT4Nyn/IHUMSUQ/sCoo0ieaMNcOH0ulIm5f7eBTgFoG5C3PMgIw7hhy5dkL1n7uBgyRkcW2sBBfcx2z4UeJE/Za+zhz3EiRIrLkID+4hTSHSQYFuHVyDYg3HOjCNjNOI4wzhPdijRkGtFNkoPWcLgqUANyM2OA2Pbjt5co05nA0ATReWW1IC085Dj6+L7i9xzxeUP1yVbhKQhBAn6bOFuHmOXe8cKev+jDY9Bo7byXfHiKwdhC1QXoQ6LqiFjV87Ic/3CljDWoEteGuzPC/6AmbIbQ7KK7ynejfyTokUJjeVKNAL6Uy14lXQKJop7tYdySAu7wML0EdWA7fzGP5mic5TNFTjmrsAGTaOVadL74fdFB1TCUh2y/To5BTJQzuWTvTdFKhJtmCZVhBlpUOjQGs1fZCw4IWBGhmlvKWsUL7yD5wkp9h/clGdYN592+M97VoiZ+H1YOE62Vy7ZEhFM4BJrZjDqjgje29swXPd2VDlejd3CUeCpmNdi8wQNVNcFxjD64ofaTzZVPRh82yyBi53cS+4NLJq7OGpU4ZUixVBzIzAj7VsS+b5cZOn98ftPC71c+Kx9pUqzp/3OMaain4tFxcv+/33qM19LPkMfv/OTBDDO/uDAH9ARZpeJKwReUBxwPYXx3ofbR5NGkAFt976AKs9Wbiy9uRSMnjyEbK2Zynapfke4GVV5RcFsh0Odg8qLv2xXV385xV9Qefhu8DcTnEXmimI1o4ZPvvydergaWdWcW1tzpUeRMlCv01dCEmDiYaxj1tQvYKJCok6IdBctLa5XL10+A+gQr5/OO2KTgvHJ+F3w/JL9Qu0a1njElxJVXgzK1orXSes0rhakFHP8oK2C261nDsTiALuCLo4avykuBkMx4QzpGlgtIjzCFMXhWxI1PBhT/KcaT5LwFz9YqTK9tbnuB2U1FaY/nJ1dg0UThFmfJLUkG3SyxVoUAjrL5RmA4zElppDiDV9Q2Co0OSM6K23ffGYIfhaEGrZa+iTY9KN/xQYGvUq1jKdX7eoblJtBTP2KKFp0o6d2cNJd5fzsvcQdjQV9/GLZ4zCdwuPyaoU32LBWTQhTRZ8+iuGoAzKhVM1tw2MoD5zf4x5ql0E3J6aULhC8NQ/GZooz4R6fA5PpcfsrxByGKc2nVMXUwHUmAvhs0kr7kGU6QT2lRP2r8JNI/pAMJsDw81XNJqQOZRI0V4H5Fjcc4zLTVZtytMfF6bChVg3kILIyJakQr06XrdwYqyfpFBrvTHrsAIDh8ELs6mZTvNNFfxRAvnz+HDqRucTB6YyylRLVYgFDjOt0NMIllIi5UyEEIWP5xW/j7RiH+qZjFNEWvoCiyA2w9lIseiMzisyObBH2ppURL9auW0hmmYFgzinZdiGeNjT4BkmMkywLE0tv0Qu96KQPVqZU7Giir3K8iaVejG/CpZOkGIYNs8hoy4aRT9+c0TDQvmQLzPjMTcy9PtAywWPRCX9lcML3J5uBll6JzvXzZpW+ARXnmFvMg5JLVBqFx+ksEOCS3rEKaWdGUzYc7lzYnqpzb4wD+bsLZPCiMEi9ey1VgfZ7twhZt/aje2NNiRSiWyjy4QBFWktrYr85JFwdPyY4oEWliUDDEknpVn7iAPOAs7+sWUlW3Eu5R+5CirwejT6kiO3cXCGn3agkTHzc1SP25yEp0ZPCJbuDLcFaHE1kzgVLeFDK0AmaSlEsLBHGHEYLOnqYrGd6/B2A5jvkz9GvcmcMOlY5q+bT6YcNj0OBwKrQfB1fHzb/j8RseMumdWe/dsdihuynyzeLJBSAPwMj73b6g3W+uRP6IeXUGAThGvUKWPV9dek/Stzg9jBpoOUu3NR61T4VU09HOCVyPQKwhatlIjGibdAG64yeLdAvNv7KkGzlugUFEelerd5VkX6LzKHEb7WKbykFMLz4v9LAkchdMQkVrQgChs6I4QAJqa3mZGC7CgazReEMF8dKlT601GcMB3ElEKyjJ40Xlf2F46IzW4qiBjTRbPjKIbCaqk9kAxasHslTKnhRVsbwFcgbk0iINOhoVwjlkbEUV6R0DLimAkOEitBcAtMEopViSEXGldzHuf7K4zSYLM3TGJVuIBILtiiOOH9sIZPVx4DWxqqwm3tZ9lOgWJ43fVWnpN//s4mn+wWbD9vHJiQebYDCpSY4Wyaz7js+GRCkE9yWg0EaxxBym+lo1WPRDHv1b943jn0JCMcNeZMdQdtKkEpK8NiZ7yqRKcLlvNbzlCTD++/2bhbwainlm9jHBYT/7oARrT4oHxckgA9hTYKTCYX3L9Vadg1t8LfV6N19vsKDodSgZ8+if579G12SwnMij0CqIjtZQcMKbUSipj7aPYv47+zPf+pNtErza0vs8Z/LQA0gbz7Y0VuJXdrWqrR/7JOb/GW1EfH8vC9bKpZ1Z+MDv9pZ/BniKZviEWxFi7oRvXj6mVHAHmCk6wy9mXasMKKxSVNo6kF87c5VKuBHpby6oBC7iP74aEPjte4fJaqbe2BFhhj7Fs0vL9/FrVX3t0NuHW4fyz73UiiMeWnmqsfy3S+weHtGSX9Ahwx3hPo3obYHtNujr4iMNtOCTRkYXHOvDaDjnPgBgoKEIfnmU6laDHJA91VF1/LHmRQFoIF+z+xu+BwfRjz0eCzHJ2Yq2a+9MlQE9/GWlvH2Pr21+6inbtCMySmwmL+T3Z0GjX9ojoBque9MaEvlUJ7zI0r9PLJMiW5EkuqOLlJGBthHY3YbSL/ZE4T1GhnzLhwA37aPonY4Ek9g7cc8nxTIId+eYUArHKwbZs40512ve4v+btfh6xrqj9tmPTUCLXap/EVVv3O30Z/xHW7dQOsSr72rFVO3EvHqXNtf+M/6TjXqXDFn7ziXreZmtb1LhTH3EM0pt/5W+KFC/zW1OGwb0z28Ik6vONc3UoVWPCBUs+n0s0ZHvS2+x2MN3/I7ffjHYbyx9Ll6IseAir+tpPDm+zWZ8JvUXPmTk1egQLl58RW/pB00e5dMEVH4RhYvp0tKbUDrPcSGqsKk39aW/hEpfytKQVGmGkP9tfqhs/uJ39ZFyhmkED161KVXhT5qbEh3cbV8QTcYl+CT1NcZwhq68Oz3fDF0Yc7kmKcwlq9eSXnWha4v12YXy1jzU6QqZzZbTESuFWYrZCww2Klx2+r34yjowqskqTv8K2DyNYtNTaszvP1ebTgx2h+RSaXvz21xDKv+1OTptqS6OfoezVb12oiDc3FTIACpfjTC9eqKX7kyFYm8eqi1WFl+44ZmQPTU2/zdnYQRQcY1Nn7siFNlUmM3qVlbnRDnbB334QvZdem8y5rIPWoav/L3C8ckxHBafJYBR7vLNJvzov+rhyMV0e81h/8jWe+kQe+kT6wc/DxmQm9lkSZ5ZfLN+9eBDacOtCHktpvsAHvMdXxc93Vl/WjRtRfZeN5hAOW39dOkjdJ4Rt86u8hT/UsScuHa4/jsxJiqODB6ef+mk9qB5ZwtDp+ODBtKhoLYB+KvA2UaMMcpRVzeQeyR8Zcwm8vK88VD7m+4xhpzcf3iFw6NFntNP0KaT+I1PUsHDTomU14ep7aSTz4JAjtvvPjWYgR3Qw6Hrm4knXGl0W8STZn4fOdP3Aap4HgdqLt9l2+8Mt+U52Yy9NIhIoWpWk02ySyq61XXWtwqOqo9rXqavKbrnV/OnUs9tAwpM8+DfHf29GWSdWOzwk+VV1n7Z+q+Q/mzTcy4WYBG9qJ6ex+czepnguyWvy1fhCr1bQpXH2fA29+Dwqc+CBv7Ee+Z/9a323nszyzPtHp38h0hMHB2ETgew0Pxg/5Mp74xWD+HYQY+3uF4LbLPyo4/b0DZ6ez+Iexu6NNzQQPn34ArI9cJGmTulBOSVub8gqfveI1v39ztNk4C2L0UdwUvh5/hX18T5aL3tdHTa2k88+9z+rk7UvMLnzw/2oXmImFbRRXU76hgmnzm1j+FIZvb5tBn56QPtmhnPko/Qi/GrMw6q6nVXza8+eXGuz95pwpwyW/5sf5nMO/GsOH7FmvGM7MzWTvcpRXAu0fkPcLewAk8e9LEgCghee6Q7Polmt2t6Aux8sa5WJfYq+tcYEE8nx3n1B2FQP6Rcr5VSq79dEHSMfMyvea3S/AyGdo5/xR8XrveL3/D17Xjqv79TaGK221mAGma0wDK93imAuMgeBgDdIXaGAFvCIw99BEgpDHdP7+P0gKDAdsg5UPY4hCls1/6qCXeN6uirbMQPlRAE61plrjHqhfMDgCnw7sMYEvR8XfyXCfq/8vnTEDNrXYtIvgwdmhE1cbFW2EhYGRDZsRJle+HhWWEekUsbUWLZhQA+4NeQU22MSSTfzOgzzJ2nVMXJA/bPm6AsErgjIcz4jCcPNxCahhBkpk1sGLhrciwioGZxEMGUAiZSatgvPLBq6WVAoYKwPsVBkGchByOgq2I2FMZOrJdiCoECxhUwbQAhKccglD6fRIGLOzGaB+gjFhA8ONSQXksSDLFYAANyZlIY091uEn0pYYwGZgsiOfcySzV8KX6sL4C9tWgDjilJpqfxDjHywn4nHClITewSfE+IKFEY8rvGel9ywviLHHIiM8Mc4ItS6PiPEvehCeFL9D6ZD4HhbfQVb+zqEQ4xVqI56OOGeljwgMiwn1kciK3wiph0c2sMYx9jUhD7hkpcLLDBYLqoqQF/yFUGnyhRjvUAkhb/hMQnt1HjF+xD4k8i3+QKgC/yPGBfYB0Qt+QajasGejYB832Cuhr1FbfICBXsBnxPgN+1HQj5xd6dUHB+MFvRJe44hlSLzWI5Yr4rUbsQzoXo0QIff718SfM/r0MqI/vfzIcfedy9/YfNyxuT3M1b09f319wq9RjsnXOLR88XKDg9IxlwkHpoe0Gflzw+9eveBPpVXadPgDLb36jd+ZM68esavoLm1qnA785tUGp0RBrhJOSgGKJ4wr/qYuw7iwuV7nrIvbLizv0yaLIEWXaygojhQOET1OswIiSqYZRSHH1WETcExzWKDIQm0yUETCdYwjZUeD3UKhHj9MO7papC0UnQYUwLEdGxhB28nQmUBGjQ6k3Zp7LaCoR9QnCqSa35n3hOuelmbU9N3eoY7mYp1QYT3sfSPIKRghZ5TUTcjpTq/g6LEtjgLlZr1AHIcdO2zCM+wWOojVTh2CoB7RPJFHjQ5hC1V1U6xrFzmQQK/g3sImiQ5Bi+LH1E4oimAHRUOcxqSEgEWCEoGZIkiFHRzFOoENZMnHdN5CoZ5WYJAW9GNRHMlEWCQoKsGJCLUDVmcdVrAUitrQXDonrJoG6eOdx+OYwiaQgc1BFHIFhyIG1PfJkNOKzBT+pFg1aqHGEiKMUPTnE+DZcm7giyMh5WY7QoURDe1BsskMLiSTNxlIEtd2xKpTol/YRXMEWeh/kmYJ7SCh8AXs/arogMYMiuzI8abd7xw5BAERnuQKnhSM0CRozBD84mhwe18ACtTNDVDKCG/biOHMRUbgRXtiol+LJKjv4CRvkbQVCdcxcExHgfoLRKj9kRV1S4ddGY5wfBakkH0bbhtBT7PsKCYWVxBys6aSRy6sQSGLfF7OkzrnIIeVYoFqx7sUJX2xWcJhcjHNg3S4Kh5PpR9gOiIvDmzckbqjC+Ime105u8Ol6kNDK4Hsz+ZMJt5xwgJlqoW6EztiHNezE9Z2Q+j9W/aO3swQ/yTuv3CgM+p3/za9Tx+n2OuSi/IM/CTdLMchRSNb3RfskhJnLRNIX+8Z7ydCy/LijwHYz7YUEC18vCKGQ0TKE6r6Z0C50PcNUryIHQ868NAxTUJhu+jVni8HG3kG9lDlWVkAx9eOnQN3ry87GqDkkfpl3DZahCMKVg1XmKCQYrE4rEcjPEjkNrVIz1ZHN093b5TijdyGZ5y3Fbjus8oheJ0UhnyWQyjg7Q+4dAVFy50hgdsJGX8tE1noIIAiUvxyuk0aXw9HfdqnMQfJBvJLrsoH7Y6jx3eLzIoSWEj/WKCp7tyBDxKKdshiLNKKk1HQB7B+3gOKpsY/4EQQOQhKwtPb2VDSJti9v4qwQM4oRsQcCpmFTYi10GytkPzLfa17JLBqHJiJk0GqxXWf3mlBP3ihrrqhm5L8SL9A+3CSOYieeBFHR2J1PFqRg+CDnzIKguARgoNaEw82PlFUf53F4zQhcSHAj04N7D8KQUJ3BWsNefA9FHAkMEOPDty7GVCUPxYzpw5QxN8U82sfC2CBQiQQlo/QRFU9qEolYLUJ2gCfUdDO9V8AfAOcpdmkEe3O45hUmLQWcG+TRorKedCnsaGuklmkAGTpwGBBS5qMKXntgAYKdSQTlTMvk7azC7SFahCyR0fLUW1ENgEzZ/Q+wcwZnRXnnNZKZHPgyp/Yc1Y7pOxnwhu+xnt4+t1IKzpbZEeNOE5jQZ+T6c0UXuwpUg7aGBHJsrjZMUo2F6TTAOx5HG1Vi5QYDmaW3odIP3pynCadZ4fIX22noEcHXRIAP2cwZ0V99RrFfZhcHAXKBWAHFAD4UQavR9JS/0WSwhw6YG0CUCUGBVoocAFEzAF7qAiGnQBGtjSnfM5oE/6AiDXT+hRgRQksL9ScDmwesL/2oEgWU97cH/1nLw6RqiymSfVsWdH6SvNTynHRBkrtBtykW9U8MI90b0aNVV+RaX+yCFYHcYbFoh3R9ED0Gvd7243aq5o7n1+djKoKrs00kSCRkxBBb6wL+0gnF/GeZtFa+OFfR4nBysKCMjAngYHjM3Mk8KGSGREo6HwYhJppUBBFmzfigmded4Us8XDUMG4CFOVsEEd3EOzI5DhBId2hmif9h3Q1BhR1rPq6KQHP9PZj2hGu04DmAewcNEbqCbDiUiIDt6OdOd4ImuVhE6JPCQFxLcARv9EHuLBBpaWJ3hkyFJjrw4TR1VKNZ3t3xOlHDQN+OHtiuFRTt2kqIb0yEuWC6TZ0oIMEspETfA4Soilww3FGLBvbQQgEIZ72xaizVeTRcBUKYcCX8C7E1nFQrkSmIfC7klThPJ4vKcZnUyhE6sNRY7uRuef5Lml/Oe55ZSTS0YIZC5qZi5/u8euNeOvp3oYuSN192sVe+4thereYGRIzdmB14C3UxOmI4SghzglaDVwmXSyomWaKprg9gtDqci+x3t7uZtCAExzredfpNhrEDw15tNvnMA2GwUBjew+L1V1YIUPKia8qG+MU6aLQH8xaB4u4t4vTQouQ9gZ+QGZ/cQhYm/gajsKAvd9/Kn0BLcVz4h/nRO198sKPVxYawBQufhoxaU4v0t8dScBy7EAndjOCdZ8Wh35orOLodt82A+L122YAHoBpMQ0uXAGdhm6JZZLsc0RU1DhAHLxDFRN2wfRMUiLe8W4/4bRYl8kyOdnPhAWKQt3t7QTNU6TjBQRGPdHRkzjWggRJB7l2cB5WEGnz2hBxhIU+8aDC+ELecuwggVqp7uyQz55xBwn4v5cOf7kaXi6mdJFmptL00CJ/7WB1yDi6YYiuV6BNcxxR1VsbxmVEe217gUxUJlSeY6IyWc08G7wkkVYDjP3v4hJMcaBmJs5GHnBnCmxk9JEJsqeCT06GGKtuLcYAG1BbN3Yesp2qSgYYIz+hRm3j4aTvsDKxAQSH4rELQLaYZSfEfvbyjE4VFt7PGRQ4pMaq13BVX7vnTzDp0zwEBakAQTpCKLZK2UV+D2a93oaDmZo97DIwCUeTLqOhBp+imkOqCVuGk/ehf9Rq55ucKHBK6lEgdpbuMDJcVbCpoXBUUQYwmvewRU+iquxu0Vou1wruk+eizAagtKCtdmw4cTQ99b2+849bc1T13/XrmIrPFxTwQZuc+FQ5uns4b999+4U70WgIBc/XdNK9wBouzahJd6pwbKdJrrTNtgcNHvRjVurcJsRE9zaOxz+wreI4Jwlhr0EjEKesHfszb23kUgHT4hpixYqSFoGcINatYAgxU0DAuTWUHNG/G5pdpNku0S6crHipILybRuqKXU4DLPZMR1M00424Hga1aXjOheMnm6615nxwEIxF2HJjKehp8V/1C2/0Z6slMe3azPhUg+somjyy1V8hkM4XlZvhmI8TDCp8wQjeBGTncXFe6Sy5uFkcHh5KsHRU5kkNAdp+2notVCETsEp0gL2uy0jhIrLtE7fXAPZWCsWtJFic28uJ2/nLxTS24OHCKFvEtlVcFD7q+Gz/chKgxrXDhWDE5hFvpebIM0AWDj2WlT0E7SW2igMtSXIawM2FuKDyY47MTy2gsk8CTdbu7yAyWfqCF6ttSyZVvBIo+FXRNdXMiLTHEp6doFb2pxpdwGEoyldBr4gF0kPaopQ48WLRDbFAvumKUWJ/qqnXPPYR6fzctsRdr4h0fHH30sdw6mwcIlIx0Q2KyFwZQvaf/taM9DV07qJ65oqB9jUJc6GBIc82xvETQzMrNNI5qumHZISIyPm3ifdTAQ60dTLLedHqq8kyQVqSWjf3pxQPl7LZcFZak4Jch6jhIhYy+cZFtJ240B6OvvuXirNH4AJ8kDfcqBodasWRUIhsdCDHrnmA6AxzrYkrw+kdCT38Tkb12LVr+88pPosDavhWR96iCOdU4ac4PZXPTiiarqcHxQ4ijdROEYC1WjrDOnFHTAkH0mDZmZ84amXGrCOGMUeVEs9CFhGqs4J5GfG9HCCwaLS5zi7yjRa6qm+Ua5pUFxqA2IQ97xwqYLU8QONYIUfyXXMgxrebzakJasF/85f0oeBm0aIdBIqSXHIiLfXHPt0J3GU7phyXEQUnOM0RMw5FXDTUsAU9qkkCh+h4IWqQDTsXKpXSvQkLOBvO4xywgFJfayS0DfNAHz0tjq3sap7DsXl/A/J412tj8kD3bSw+Vm4zBjHINkoEsJFQZ7I9cX7YzSxcW8iWYYNv37LI1BAEQTsI7JTI8oVDdSCbDxYLZt4o5faTxcpR6MI3k+/21P3WWLGnqMuoRBQThliQh0uFu2FOsBqaylFcTEUuQFAnMOdZ+e57DAVcgANUXwhjHVVkhvicMJIwMOjDNpL6W2xndnMHyRH84vmFrNrf3kUS/vlcn9JA0aHamcP4DXkrxe2EQ6T/CUmTdH1rEMeVObr0bErCkxoKsOL55/Wo1H6b0yYZG7A6C2jMngwHh9CKMCCIjDXDGNM6TCxFXf5f7sqQgAAHfOyM5aE6glHQOGlBjQ095q3p42Kz7lbI993emrEP5rpAQ6oepzIUP0eJGWesB5KgRhTFIjeA2ykq+luboI1G4xsg5yfIyF2y3j9agT6/+UnJnranwIz0zfZogA0tpTNExZhEd+ct6fp/BKMNwTYdX0xrSn7hNdbOzc2REyajm37mIhyzDg3C9VePkOvdCQSyziEh9aI/2akF09aiiYgGaodM62TUpoRBteHyXlig/cOU6p7TuyUjXygIqWE741mGCJUIu6ADuAdSx4D96gTQCLQ8GMfxz1YO9NkinMbQeIto67rYosxRnfO6HDK3SYqDb8HshGdqREDHkcAQaAQK61pHTICwblJQQJksHgBHucf+wOY7gO1mRscBaLv9oxMDW+2nCxecdYsK9V9lpJ7CSw/jZciQMgtcjRsbGOnABZmUx2CIaXdWSQen4BKs+77g6Jf8IVNZRACK4t7iWh7iSuCgZIiflQoiXUMNdwAZhHqwQMlGnp7PYkhrPXmEQD3SWLfBy+wfz7p2JEc6WhDF/oFiH0iScGIpFtNAqU/u2jQItBHADTCyLnFkVsYujiV+C0bvjdoyQwshKRITcA6OLiTjhJnYoE2RmCaCwEdYbbDzzf0R5gs+2IELD8w3g5n8/+ebMGzD+IYATzjFqrJxbQDH6eB1Km09JQ/zUJo4tGotGwMVioZnKSC2NihWpbYop2yaIRIrXbBAuPdAWz+BKEfEkwLPmBe77j2ourc8JKYGrRA6jHuwM9QskU1RZsiopEhzFogUEp39q8hWN0hQayn1KY34ciiuG2XIbRQk31USJrw7r022IYTUoEmud2fEzbMVZ4D9DB5AzcA20Lb9PCjgjcmaJiarPfD74TNWYwt+H8M4dEEHxrM0ZihBxJMCWcq0E3u1mBZNGlMXtvL9m2aXDBQRqXqcZTtFW8yXP/hn2MRJ36rErjQ2ApYTE4S1zqZILXTaTCakl7uvzZcr0Wso6qDbR+LMAYVYBGWOz83JIELJeh0kmiTCg5C20Hg1B3aWFONEm6tEkfMkCmWY3LpbKc5lcgcqlFzvXDQgW2vHMjgFFkvC21AVg+EcGLQFwlequ0i5hts8uxfiM5W8OMTTfIELXhEdqTCtLOrnAKsbwXqYSp4fgmHnbmfF24pdri9VtoBKCZ18x3kll+utJS83OrzliQL2mskjdnQzYIpvABEUThQKmoTxqf53BJz7Ngpqw/721EwA+/MIrS/AhASqXrA0vhMfg7Cwft98TSarcacDUt807qxywySMLC2psiOSxRK5Urr/ECTaf0dlP1qk8oBR8TIeHeAwCyxdiCdxmiZhBRaEi7xDOO/KdxvYfnU2ESWjJwME8kvtY1ai3+vFSuLrCySAyCS+UOwE47aHCFhU7iJzD2dYitfc3QQFv1ld3/rIXvHtTQSsBJvUU4xM03rUJHOeI7RMixQqZP398jwlUC9RDCOVn0s6kpYtVfNLht3mLhnhoF48qxT+VY9Gxk4eJq++0ouys4ydbNdxoEwcabtfIbKkVPT3Vv1471TunnN3saoxzCCpfNPze545BaPGEpR7IVFqa4o9Q/nb1cAh7yENPoHKVydiEAT4gz+DVrOMCL1pPrtfHC+foAf38METgjj5ISZvmo/u/zcrNJ+SmH1u/nax9Gp2JObTzLvKHcUtoiUmamdquXo8LyE2SQqD2jbapD/NVFUid3Vm0fHX/Ad/KpnbIqper8WaV1Xe4jMZ6HdQRai7LQfGp3nhAkeNt70voiDGkVY12eKo6pp0UWtbbGei48LNy5RoHv1/kVKM2+NccwcoiNZ8+1HHfLuuI/kg/lAH9EWlco3w1xt+F964KiRp/HduyoC96UuTNgiIPvnrx+KBYE6CD0Ju1FgKrUcJsHeLtySWsL/IE5+vOscOTmZVwKXZndb9c62ktnpEYpHVpOPRW1os6q7dhHvBl70y3LqKP9HqOBOnYDn2ti5D/erBfa/6+K4htbpceH42fF9W+I75U09ilbMhKF5Kq3x0wEWED+Ubv7j5Md0py2tChJqHhaugu6vyxAQTYif82VI81d4vkxT8zutc8LIeJ4UpJmp9KWhjYiJ86kLrUUBJTtSiWQYfCH0KdNROkH9I05XAR4mTB8Zd61d6H0GKxmbzH0Swm/am+Xv1pUH78y/7ASM+Epmm+TPWCx+FdSpVqUlfUk0j8FLPMKOdMP1LnUvDag/jE58WQ9v3CNFEK+x/SbuCd85/YHBf+gJpIBAToeMoGF0YZWEFkwEopqZrnvJ2n+7r+v+2+Di+QqVUqgkYTyqjtQdpLpB9WUwN21OMSAM5rl23lrhjAdOsl1ouYKBWUNUWpq4N7hKGf7y+Ec1wiV/GkKBqxyZg81BXkWWUORXvevd34cx/P+P1njwDq8dP+3xNYId07NLvGIzb92ZSBMWxDnBISuK/pOM6COynwg67TdHcPZaNz7ticNui2W7RLehWZvnYy3FrxuBhF5cLPtyEcG3a4O8uGsLOuPDBaPDvGnbKWfcb+3Stqn1fqLiZmkjru/GNCyzVe+lu6f6+hXQtFqxcTm+hKPJFTf0fDSdGodjQAfWI69e/zE9PUeEYpg4dRHGqrOpO0BBeT2cbxMHHcJTrMTKwx96a4qSa/5i+8j4oQneXdBkn8iTSzZHG19LNWh8tNl1C2gKt9S6ILR4paYxoW8DhP5/kkhE1gaoZWHh+LdB5t7MYbAnAsf6R/kER5dMS6ellGtmQtAUU8fy+01F1cTC63D/udkOkjP/DP4E+ciuwOtqC3Aa2Ru78vG+kc8yf8Hf/8EGdUhD9z7dQc0I2RPKgxKMsoV7YJLnxmBPPiIjKVyuI6djOFtLwnWmhz01+3099oZSSBxzbf+uk0rkZUJLrBjyoa6Nei9ea4nFe3D7DzUUU87W12WFklYwSfanV5frihQqP6XFpDA9OJ5L/cIjpZcSnNXxpWEAzrn5H2ZnZP+yviw2po5Kz6XgGJ6DqdrX9DUNNBTDk+PLWtM2MIv/bj2VkQnkW6QQ9PS5Lhw7xvJGs6IlextNgrWshTxPrflbclahfr3790x7K9xvBdTGqsShtQU698Nz+19+535RCj8K/lxF1f3lH0rWNE8s84/cc16Tdz2ZgaN3xln/XcDSWYyzgjnwQKhOhLWubsXg9Gvkdh4pBhcXMeIM/qy0U4grqGluwoCWLjZ74PElI36IXpHEFyF6wWvvQEpiztzQpchv3uqTGBTFmmoQmBsIVZfTDjcwPqlm3IDvdrNaPH0Us9zst5GgOjROSm9AikbXiA0mqc8wR2ceCpF+wptE1PXnwL0D5ZQ5AdNbepA1IZerHp2/dlRZ4oq9f2rOmd2brzQ83TqobGTy9VS71eRdJbXOcj+DQhuI9IlgvW/bVRGfTxhT6PujXI21Cyj8u9vo47D4LwsfxWgFnOkeLQyHGbf3v47sbA2w3zFLNQvG3GF7kERiSKsgXY3WIoDFV14G1mdRpea4CSm6DkEJTPdEQPnofMmHpzXC304AO2ca2x8KEONhhNa7Rwhc4OZMFNhC7MQJ5Qbp0x0rxJSg5MIcnodXQdoUd7A/QS7x72ycsaNZJ2aLBxb7vvy35j0qPjm/pe+1osBVNwZFkaPpgELRhX6t4mc8NRLDc+WbcGm45GB5Odn8AoMXZpuI1fxztknLYV+Vj4Ng6mEADwbdKy2ykU4RgdsDg3Rj96Q6HHzPLMI7E1sVV6fyI7AAK6/FHAJcBHi1QkCJuibfmpthkt/PXdSJfTqia0rGWXuOD2P2Lc7qdT39n5e7awgo6m7YVEhei6tTWcfkEB2Lsjgjtsgqn9jFhxGI6co0NOW3RnkQ97qqECyWQ+P9svcLqMGpNVihs9+yNO482Lv/nG0ibjBkbw3BOA7/GHnD07cB4WrG7AsSPZSjkFszUV2IYOviz5VSe6v1AZYj9XLX2ZkSBtLD1xjWwYmBk4zDXpQXBiFTrF4RrSQ8p5276VizmMF509xKVpuUzQi2nhFCK2wUlWj3Du+A7qYZ0oIfWbWCmkHRthcZ7JNkE/kD04xYx89O1vjpVOjdjm8f9mPq+fL36ufUZMlhnC376z8nvgWJz1m0qE2hoy1dzW/E1kMuDXo6IMxzHp8s5HbPJa5XwhT+5bKyrYOPZvkujzngX20fnpnwDSu3aUgOsgYEXIGDqzUSGBgfin5VDbRXH9OJ8Ol+KHkiqpg3gmZauv8LXmGy3YE48f++o01+4JQJoncPZcN+uJFctHYipbLaym22XTB7UJdXr+xUmzP3S9UWQBJyYUhDf/ej+IQU1suQI8smUpLjQZUn0X9PQX03tfCgStx+/hgWZ/UuRiAmuKIDTg3yND6dYVN/T4qR3vcUInDFOSJq+sOrzZtrQPGa1nXENo1Ab8hAOoVjHNWJiThkhAu7oa9dztzN2TAWdwRSRbRB8KZYc42VpBbXQnRgciruCAPADWNo15O7XRKui11XLq2+rwCB4kzHV9bW+fC4u0TvvbKyP8c/6RZ7pKDvOj7Rk3DTiPXc3MJTSIKixPv7Eq6g8OnyJjAY8uRB/SlPYMJyDGJZYMfmoUMR93ov9mc95aeaQnoTZHp7eYBM7M55pNECE6vNp+N7pOYDs656supWBK9Bi+10Ty6CjTeMEakWhn9NulNehqAMI64mg/QTMcoLUJmV7Fp7x+QOJlf3SjUf4WPPae+fe43QB46f3C9gvV7AnG954CRd5GaaSh9fuCoIFW56mXINwNR6gTcJTOGd692gX+hpaYvVkKEZ6lP3M2GRu54l51AIjrwuZKJCE8zAPqNTrWEcXxv8ycGS9geyTOdpl/3BoeLkmrtcOZuLqHju2aY6ZeWUQo9VaH7oIhS25jGILCFz3uv7X0HTnHS6XtHNk89trAI1zAruV+WIXHMc6bGNZgI4DdZ/TwLY2eCB39lNzlY3cJnTIZBDkZQW63lYQIfEkLXJSTK0SU22FFRoo4cx9SSl93heU9ET8dt0d9G6GTiGs2L3tVElL+Kjq8Rd0LacCeFtLd9H/AbVDB7lExoC6bpSWYszafbuGflRqATo3wUbd6YqjVteDUw5Rx61E5Jgj5OWK/X3n/EeaWlVUYl8XMsVHoVl3mHE7BWn7qODRHDssFud31qgFFPkClOThrmkHKnwhgqUD304JMg6Fm6aIpYauJOns7EO8eWqHWFU6xYWHUlL0ugijD7whcNBfJpESEVv3N70m82k6f7YeKn1zdBZOnv8i6IBfu10P7aAwLm9d41jSGcO4yyhWQ/fRj8CEhKiv6wdYckm96/NAtOy5kGLo39/HHgUaECXkhHE8TWVeVbp6uAZzdoVLJh8zSULjLq/bBnfFjD3ULMp7BiTqZkvEuXpVdesyoz48OmhykbjWJMsPWT/YV3kV9cpjoZKV9W6kEPRUGFkeyVrbInhJ8vmCAPN7kMl+bLIl5JZqZlQtXIByOtppnJjfT2rWWkJkeTG8U+HS5O7tzgoD2fH2hMhI2zc3MrjqWrxcu5nmtQq4tCOwDGOq6hLUxcb0PBUUsLDOW9VrMlKa6Bv/BQiVxeVkUXcC2zGWSczQoENUZWcWKq/LKFWh9kxgTtjBmVA0aRZva2fy9dTqErxbrFpn53XMDbZr3AZ1XPWyLf7TpRUEEb7dtUguyxojJleLK3szonAd/cDeW0vfz/S0jBmaeYUu9oQrMxhUTqfrBe9Vrc1Yt/5p3HTFtNUvQ9GWBGZYtouByZTnvt/o3USgqBi3qdSs1FJG93D21B2tw4SHSbXEEO7Vj8erlmDFQguZGFOkAH2TXrBbTpHFlZVExzCyvOECWTSSKA6hSEGUewgdrB/41MwQapKantwgy1M+yVSQXWG+Gsjrxqjf/f5pRty8OPT8QYxhhTaUEw8VbYY2aSFCXEcdJvdkTRDxoTnzUVg6tQTmWm7nshRKrvg18ElQ55y7hmC7K1l/JAc8i7WHyguZVNbjlbzOHfgtMKb1D0mzddFTL+C8cQ+ao38XmHVjMCI0v1oL8AO4JY48ycMr7FqjBSZ3JLgyF0O/mOWf9guJZKXCGuoS8fKCOMPi3Ml1oKL4MtrR4FsjvN2zN6GCtM6HRzQ93h42gQWwocrlcMqstyGsoEBRiQ07GoVBaq28nBg2WpeMLFunBnsNm9xDIeVihdB8clxkOGiyiansFj97i4c19um4umE3SQ6hGfD7a9b9RVWDUOISMhIY2WMpWi6iIukBTY/Ep5thVxTNx9uZu037Lv1f7UYcdkQkPIzQAC3xRTPkSLp7v4eZrT+/6S2Wt7H2hFErvXs69tebEcflQYCLKKPk6NEr6q2+d8fdulE7ulW836zNk+Jb8vaXBZeK8jitjVYQ6J5qdJ1PX1wJbyMrSh/WZSVxKfGoaWGvrRJUnANSP7V0YjYpRoyFtWuL5/fphqJTBJLWIYIRgzXhThOvKy2ZAV++PZNHi/betb5Vgg7tQmAqTpGAHX1UUAlh/3ENXa3ImA+UJDlBwt+eL0AdcMIiRBz0LQm0U9qKJHWpo5NvkHMAc8kHqEcx2M715sYi3g0EBdaXTgiAAtcBzfqgd5MNrB0ulDUlpSHafrQLx4m1JfnH6MOxQKuoix4pmLjycl4nHQrt6dZAkgEraJc4D7NxPt040TcmOh1BDDCk02COSuzOUZhnRXJcxoaRtc49vSQY90mbzgFwUi7S9f5PR8oJb8K2oaPe64/xgHv5SBk/bI5frgvluNi/7+eFFuqlOej4DqI1usTk8jmWqNs7TIzKiex0zp3Wn/WkzojkkV3iE3mx0VRnePWzre+CHT5bGuV7HbiY24P0fAj5m0v/GcWAzcaQuAC1x0BtstcKfppMtVtQpwk4lyazsdtw01g5bnJNmhPIpd+gtDQyY5ULadSn4lioGSuBgd0MsQZqEicQe1qtnqJGDqiZK9beDLnKPgRFFzViqafJfJ0KQjyburfAsgFKt3wYN4u337JEdDOYNrdvsSDPC68nErgxgAWcwVe304iY3/rXniyNT7lzNcARmKPv6fJOQdf3zD2AK7ykHjZ3lHWip+sgLRyAtrXnaoiJmPXSfDib9i7Symi7E6rprI6H5YeQCVR1tZux5youfVH6/ImwuklPPKkWWO+RAgi71WUd5aIeeBftdwIDNl4ltydzRJqtNh0sLh0IWb2NieHzYEBiXjNqbbQrbIy8iFKsKolqRqYPHn5TxQcs0xHis4UmllssWLr7QmC2WsVFDzmsAGFnL+cclCPbCSQEiPzfORF/mNdJ0oK+uRkMNHRdtbIPXL0wi3bYMRZyFRsDBCOPUy4V1tkH+wY/Cc424ZVGQpeZkGaSNO6FyH5hWvdnlwTzhVCYQ0rN5rMnKESe3tq787RtqTsFIR/NFaCNQ5QGneVN2zMnFjZ7iBx6zW6BhbsuVsvMrWpFMAZ5E556BRGzZ7iEWYmFz+5pRgLhzr7vt8mydjjs3yJUVR+cx//woDbO6/tRW1EvRasxrv4uDrZfn4/1JZVX7N4u37W+ZFNyECkYN427nx12+SSgGLzbUs/VUHEy87emuF/NoRYzM66azvG2kuql9rN6M5xMkwyIKRm8o0GpUBZMK6yyVXmaFyVIBSHy8YSywoKzMEILeZ3p4GeSMl8AJfF6vMbOBeokS9ypoDRSdiaUutI6HOYUU1Li50GOEovFZxiHG0uxDmjRXLip0/YqBiiJhxgZSJj2kyPOLjZkHVJ7VA6CqA8Oh+MpAk7Ubw+Ui6Eg4O1zkpCr71fZQEifFRzSaIXJF/qTDsut2sMHX4gnXn2tCW9K3smEBLKn5GzGhWE1PHU8EPWWoqhUxQGC6G82RckNl9yGlMAsTOahtM6BMqVlvaYjvOkqOdbEh+uSdfCPZ71PFkafMsXj9agn0J0RRsirwai1EgJ+E7Lc2qStusNMUNDYULHFDrV0tb8QwOlQcTh7J7WqIWy4RpMsQmmJASet1b3WRI3YyIPCYJNRMz21kaHnZKUP78N+JEJWMUVvzDnRu5POlYo/vpKFNlBClhh9X0TGdXzTLW1lTilADwh2pWb4mDA4PtSDmmVwOgCTRzHqzYOizjmCe+DtqmUCXoPG72no09mI64oLXPs0N2sGwv/mozbVe6kSNwVBn3rRH1b66FaGNSEx1E4C8Tpl4b5bLBu43hiZKXStvC4L1QSyeUSuHhITrg02GdxaoOtjCQvxFApZeLY81qDz4HVazE1V3TXyTugJNo2smpftr5JkMWeMd/ktrRnIoMl2TIhK3scgxjjzTFi73lgbmg4dwtavJ5JDwt73ZuacqBo7MAQ8BPSCvH7RneCUDJoRy4e/x90M4T8DwdKFDNvkANQZFqAOtxVsRdiqkWeF/XlNIgi+StBxaIIvrQjjkJp8rthY+wCqWFq7XLhRmhzmOoLpn3OcwwZ3Uy0rmY+wcRXzlPU3xa1iTTTEfYaXtHTr3MJ/uuKf6A9IxDHdS7mkFOME2f7TdEtYnmmq6BtnoD8rX0kS2SVEvrhJTNNzshwmzw2tXNqurdDOa1/BTvtjoe0uyDLvL6D79B9X+j/YlWCOgqYprfU/UDTexVhpfDPNBgSdhZgj03ACP8YeoCerF/487EKKPezc7cSAUaipVYk9iDX296ceRwpZqXIhbRJkaqNMUZ+8o40il5m1a+5JxxCkEtOCBn7Va4h6vYa2movddA7rzTOK3ei0Zm4W+hHmKYF5fPPvWPNNtQR/RzKbrhl0tsqSC7e2/eis9qTUNpeN8g5UzL07YoZl8i3pFFzdsAHHUwtvKknl0pTxX5XZvBUZbFFjOKnS7rTl0FoQhos6xjBw7IWGY1b5BT94cHS9iJepy4uJ93jSL1Fzwvp1Iyd1lutEsSV/URz0y4j51tcwUAnpR2IYri7OSaXAPJ7ZubpBYOpcjsil9N7nfEIcAGhvBHbCGU4Ny1OJ6zFoMau7t1GoRxfAtYx7poaZXbR1B0dXPMAnqvNOnt+NzFpv9neLmLD6ba2/1C/zWU5fgDxxOs4KyYTm/b8A9OC+OKoRNOo2rZMZVbtEIzYIalyCjtOU41RL5983HuO4Mfg2U35qLU/mIo5uN6FIAhVh7ww7IggWfS70wgZXAmcdK3YN98Xt3K0MokD+II6nrKhrUYlwtv61ftXnovqEKUoEF+bT06MRDN8yB/1kBu55oKdkrIcks4qXWPpiMI6knb93RQrF4u+K6VfRV/FEg6PQ10izCKJ9nkT0KlD1Mkt1KE8vwFY6/JqbJKgnoSsQiL1vp7QvAMDHmb7PPOFwm8KvfT8qcV7bWnXss8smMXnZXZFaGzK8owFdDpXjGnz03ekdMSxyC0hY2m8tLphS6nIOrNN39uuzH2p/ykuSufGHQg9h9v3K2iGIitjvp/2PqLEqivS++5Ji5Ke/unWn7+VbenOqNyVdvDFPI/r0UnkVqgS1was5a+j2dSLi7C1KFpJMj+wU/8ELkpuvUJeIOl19Ep/+AFwAyPOE3WqmVCn4ikeLajgjKFrqHJ8h22xb47C+1rqKi/24sFncErVG4nS5M9YVnJ0t82fFmcBXExAXfnoqxDi5h/muCrG6EjxYIavvp8o2uPD5qgs3w2tF5xpw0XMHSxcCuQCYoEDLAKCSH6xsIskSLWdkMquSToL9UFsBLtjqVQpzkdK6tsefA1DvhYK7i0WlViHjU1l9RnKM/+OqVvBv7NedCZAUqsLdMriWSj7GkZXdu1oQlQJMvH+D8AhJ3D6QGSWXDpiQqpH6nTf0yA2uxYiCUNHsfDfNjVvUBcjsh/NdRH0SAyh01P5QjZZ76y/pxBPT2kUVDnzdSKsYj0GJcSW7uU3UnMTP0fiBPwvfJUcYGOXbxGFBjGk5E9rj+SGU1N21fw5pkk0b+7D2iMB7Kc5Ij9gBHM1Ymw9Eh6eQXcWxke+rwg5wId/NB68KKN7XHKrMykogMHvXyytYNybgTMPt02iyhfd6xm6vPP/r89SjWS0+3Ogg8YJ8mjb6bqpX+PAmwE6Y3LGp2dBAYSMKxf4WOTA4789KnQT6royDDp5daHnyIIpVFHy6IEslgUTKoPTiLvc6uCv0Jo/LW6H4wEXJvfkonosBGxVusNzbZ0aFEb67b0oyiqCJias2FBpYkWUKAZ/pnmawDf0H76zUIgJmEkiN6+T3ELwDeDYEVIii6H9bKGxptCCcQINdFlpe3U4d1GwzNKxBegGoBFM0dlm6w8gkDi9VppxT6rA0L9jrZG2HAplYlxtBsYIxiRA7YYtQ8ADGrpDLi8gEVgUBbv0btjcB76nNgAHqlgOmr7xQgELKD/nGh1ab8WNwcCBNCrCtiyeWxQkWtkaDGzcJWbta4LFnrLHvEkE3CH119OQrwMc+r95q8Oa1lOdS/ba+P1gIJEsAn+cSxcAtrQFBRPJEFYkot0KimsdeWjAL8DppVX997Gi9S0GbH5TmoQ1hxxzqZFAyVozZAEqtHb71jdn82PAIrJ08fowfemxej/IoJEmCAUHG6EREyiGHkQK+Bq+g7oqiIBC2FvsZlAuPINv4eAu8HOmqq7cNj2le9zQIMVWgwrIFYDsuBw8ln21Xx/Ha2O1vAMB/OXLseX+hMxkEkTDvn2HIqAKDWVO6orI4RbabqXyT2MoymHjaHgRla8HCAJBc5lufvnqjhJQW6ttfIWkAv4bA/eR8uhoJiGiTkhmk0wDpGC8F4qim08nTizSjmVdogGCTTLmT02LuYRDTcYq01KvdTXbKILBC7EfiEH7s5J3Xo6noOKW9gUmMI/v3aaZlAAPCmnP+maco+L0SSp1vNTPee6iP1K8DWcRFxjsNpiNobZR7/w5dUfn5ktR7WaSMjQ3a3p9No4tUnCxuaB1zJAqsSxZabbFqnvZspiAt+z7rOp4nixzHKgLKcHXjnWEEGCggkKzzNOmZbXea6jZSolRqZh8GY8M0HTNLPETyxQUL/phxNAnrt7IuFu+wIVpF6bDkX7EN1olFxf0I7muqRUNxByAx1YlL+lwd7AgogG6qyhSBiCLEFVWC03egEJRWhm8rhRHrKqfQ/B4Sv+d3+XxCPI/83X0BJ3DKhxNkV48p2pKA8ltag/x/dd1sQWpFYhNEbjU2U6kOICPZAhz1ISKZULBkgG3RfOOBVzzsUWsOhEg/iOrVK2/KYu7LDsTr+4AF9BckhTGlOc8/xfpiSyTesBojMy8odz+03h1gNswp6rtta75lY9p0S3UB0orpVNDopR8oTLJl8hRAK2ZLrYQKgAmmbvsrQchq2ZvhzdEDRQ4yZSFwTPAsZ8Q/z6r9UKr2Khv8pkUuOSoxFYEyU610YIv7OwdG/IV524k2g8GUtY+WaeT2qBcUvediMSOuYT1GpvDUFcKL3PRmc/dZsc0PxGXI9mFbGMm3gjht4FEdCgFfvksgpFRiono8/jytqiuBQS00lqruTQZ1quPP9yd14T6CcpCVx9GxXoegqu6hLYdIdDyMQVMvJhpgtpHgSSmK/LFw35fKHN0M52aDAmfKW8LjhXPaw0xiH+zX91tTkGHvy/XG7Bk7tMdwJdWGYVODtX9hFHjG7qqDwm3vbe+YoHjwuwoTPWDDhDHkRkTfZsMqjfAJtCCuSOmRylipd+Y2tI5EpoplO/E9tsAYqMuTMdfAxulNKXJ3k+O9GCqLIWqMWBuJwXHGddWIkP09W7CgZluLJMghMASvVFhLWJZyFptZl+j7UeieY9tWsBRqrfs2DIgCogHgSixKX4n5pZG6P0JLfANQUcx6AQRQJtH3jmkBByIr1Glk656nRmo3ElUxYeo6aCKksyzOEXC0m67TxoTbwA3nzrzuUXt5lIlyae/RktvDiUA2w+I/iNqcqV76NCsbnlE+uEPtbg/E05rMPka7WFCDCcO66RH/g5nDlKD2sIHE6gak3qLFD2aKqIGqFNRgQIGY8GNPfz4kijzn7YV40gq0h2dARTvDxo/86Tm7ECnE4puM5filRT/EprX8Nv7ZwYlRGwpDTKZp8ibfjIYpJteQ56pIJt2Mu+UvN73B+MhpaRWb2qQQm2qWomRZ3g1aXQdB4DyveVCa7pKkx+7gZ5t7s/fBLTHdb2iRQUqyUtB6eyeJNqEaeI7QE3xjZ7+4sPU7wr5XZ+m+86SorObiDnPw208c626f57+cvxTIMFsIIKe34xjmawjTHqbafFPhWAEs8PlESKDW2HxRaYHt3e11dawvI9S73lSbV7z3IyvfG+SQvMw/+dDYZiQKnPjUOINtxvbpGoT8OGSTO6JhdwCCNJd479lwWOR0TX1CQ4lNzrE8bh60pGl4135T72Ome40AEfUwQtLyz8DCAuOafDG6ea2HMvz3V91wPnW1b3ll08tSYAdWPuS/y+9nC4qKsCj5Y9GuBHlHHvuZn0uPDTPDu+DJT1pqHvVwYsDuvNuEAj7wz1oOZSv56NR6msS2LqUwjH2ncOGODEB8cCwyAlw7QYNshzW4K5zFZd1kPEAATSYIbRHQrpcO1hEW6wSIPcI2uolIezHWvd83pRN1zndjzPjQTkcl3G2vp4K97nnpUhl7Fy3X0k1nsANwnOZSwEqW636OnZXfzU1bYd+bYeOKN4633pmSBCUq4OLWw3FxZDdzDvtPI4BySLACUd27Y9rdFtdvgDITP4yIO+YVRiev29o9n4gR3gu1ar3yLGW0Sax2mrG+9EDL49Sb5QJESquRIMeC6MoKaoO9khvFelE/32y9wEck1Fo+J8Om/T7OgchzAuWHbatGIE1UJmkaOyX25/BAlm2/6H7vixABSmD07C8SIN3T2eKa6LgVRMLVPBeCpDfIITA51v0dp08lerDHUnAzhgQENdecGyxKAgxIKSrujE50OMP1RzbAMfI6KU/hkYlcrGX+gQXkWiP4Xl53DpTf8hq50cq52xbWlp24vbcQ+pRo6AW5GaV4fR5g2fON7jNtgkV/qOEQnJLhVsGYwQzZIQfhvYAvjiRyK2JRLDNC/bnMQIhOPCMUUym25prvXBwHxUYZQRWSpHgSd7HETUI7BWupn2IMzCIWCL1dfLyQ2+4FxJoHFCfZISBXko61pmHC80zEjWOBtjFd8BRjrGugE3Eo2TGccfqcp8q2nV2MnrNW4TJbxpSPtDoCCplEo9ySsW+8MgcO8zTUlPa3KzFtxiTR7ohJhG4oTyUxspkNTw2zW2bipVKQdQjsmDiC5tOkGSBz9QJL8v1EybiBr2zEuoC2JMRssMljrDk511BmhY6khjT+g6+Z39ySR8SLNlArlvIIQ4p7d1irOC76deOLKqYgZ3GkQFYAEwuLSj0HSfenZd/L579BP1YufKYMpOEhB2XW+6S9hzjS2sKEZpynTatoW5FgnDyLIBfV2VfYoSYEIPM6gIs+eTF2UlvtQ0tl/dSEaphwo3mFyhBfPrtx6fHPi2l24br805R/WHwjMDfa1KAWujIr+uTTzpBYi2HEdt+Z9Hl9MYgjy73/0n3Xv5gumY304NiP1UiSjqdfQvSOe7LV46j9+fncHD4suUKIJxPvv0ja6v2aKuptyTds9jcHmT7SYysuZ+IYop+TsMKy86DESqkM8HxBHTAJRG2k/tCyCDrele3rMMVQrMKwj59oG7un/RWeArANVxN/wx7CGwqHj0sSXNSH3xbLGBF2sZD/xH3jqyrtf00mCjO/i8zkZkSx1pHFDxupBfkdBvPWkWBgCvv3XAePiwPtMtL0BByNrK3ViheVze6/io0RRWVWyYqzLcPAbdRIM2Odgmjuy8VdppPHtPtEpqDmQbSceShZjTyARgFrJeT3fbyh7bF4ddpcGBl9savCS/MNMrG4topmWv/3QlyyvywVcO+pJ1k+G7NCqVjblK6w43BRBbRYnQ1GulLe3A9Nbb6Euht86KBdhqmpvqADGuHtNjaHrG1FT5RhDTWmekUnhGnL7vvz/VuRlqboysEOmzqd3ki7rEi8gri/mWTqgd02DBrjexrdv0/eq56WfRiW+sq+mmBjBOZCcM4NP9bDjS5gkPKR6a28qoea8HYhNDJfqWKLc3fx6JC33pDUFRK8WP0aEZba/k4WctryDCWzdapwGejBXJUN8+btDhoU28gCzaMClnsN0yjRG8+Ye9SbIjbppETcdqxbibktliYu9CaXnEQrgcKm13TDhbI+n/pOg/VEYWjkaSj0q7UiWwjFCsb05130O5Co5w6MImJ9e2l2ukFCC2cUZ+pOJUhGxPmpaOABu+hmwEq4NJBg0HQGEb32hOi72VrzQ94vaVrOfmFzZGygTcEzv5sfBKs7K4NKKyiAcwQ30TGvXGosvah+ICa7TSS8bXxELbGBfpXbSPJywfjLzrccg38xfAfF6pKQBJFAfAIzRbBdxj0eq0CpFtCwxLpmSY6uPwqwi9IIMYwBDfjfUWbLVBilYPEg/mL6djJ1l4aguDz42UjgzhGvBnhoWDGvHCKbQVwYSWsH2mSazoDt4VLoVWHpDChGD4Tf30BTnBTQNferAO+ZhzfHaT6R9ahaog22CZXblfLE0FzoO1NqZJK/pOLth5yEeS9AR+U5dz/MUyZwvaAtPquEeMdWlT7HIsfMMVSSaT3XvKxP+EMx/KGlPjiBVqoF1CyYB3FbCZd6gI8p9BGHewFGovd1rPyMnZrmKQtZVdV141/MMeeKq9uU4Cs8Zyc7/9OBmdX4jVyxyoPWO5xMZLX1ZGImB8uLBRfx4Gxy2IqLeFxj+uSy1vcOT37kwuFnSaKBAXExgoV6r55aIC1ujOZHxiA4y36TN95ydaXWM3qeGrxLrFioF8hDClYmxMAZQuwjemL5zkTlfNJtHtV2GMEqnMYm1actepyqdx57OF2k9U7QmowzwoDj0VtWsLo6AhJ1jhlSRj8VO2a7i2s2MQUACdvRldIwSUZrfM6LQPaAxgYEixEHhvcoM1U0UoNJ2QE9sug40O4zWxY1ab+gyOqiD3r4xzEInPTLQMTz1M9d0GYtp38OD8HUkBgI5t4ozsNygToPzRRDe7oj0KpB0aLz7TeRDtsLUW3Qlu6bOcVbm16HUNDyxaTZDwNU46Mxb2h/aVfITsZu9pFmc1ueR2VIUJ0y3ANR5unaWJHnfYwLqSoXzq8lL8adqKDddglztPR9Q5JhRbHPdY3mSpiXq95DFvI8nIDZOq3BHPzHWLD7XJMXMqa3lVmdYCkFrIF1WbmnW+jPtw8p1puTl7Y590ey8IntRGrBcAGknuZQy/kCPdpmhU3fJ+uX95b+lLfUb06bMZUrbtIJx4dtYAfYhhvWvCjxtAwJtlXmuzYaV69++77fRMrT9dfvTO5utCHk9iod1eZ76MOwJrGES2KazlgNIsZDs29EKgL09q779xD4wgxYhkVr7NLQs2y0PSzH4I9R8bPut3AzoGCcIrShgnMdgnAsvzYQbs3f5sultRqU53MCm8vCXG6ZVEaIg75WG8rhtvIehtXDB0QAkPQZckEX6Thgq6nNRSw21R6nQCCWy4h1WUjKzwnppYcbChcdJva58ec7mCWiAO6HnEmPjUmYDrt2dDsWll9dUi1TyHi5Zpymcx/e9nOhvQ5OLobeH+fTl56y1ZIRCkPpEQL5impXVbx5Ykjg3ZTF6ItkKF9y+d9AcN5G8o2cLJBbUY9Nff1NRZvX4dvIB5RgLg71aRIeEgoapcKIh+8pDvDTDjnS04KLFAehRblnBeHdGrqd1wvpdSWz5qTn2ERdjTO40PI92ppP2ME0uHvBN0GJIseVYPyDtXUQqcSma5h6bjwak7nSCGs9A7fm3zQN9eQ51rfGak4ZPk3NTLaQgt5YQFMfyxuieSpL0aFA3ifuACUxdf2wFpwbYuCVfNRclTbSXojOAhqBg7i+FiWhki91OcP9+6uhsjiqIu8/yRJxQso72gpB9sqf58GEk8X1vn9ZOmSRND06GOM+SH+bAV102HH1Gk0eD57AEXYTMAI7yqzmYzcpPAjhpyAKfj/G3PrAX5idkx7+zeK5sMYsZr8w2eC/wMzm8gtRD2X7C/PIMnyHbsx/AX7S4776ZDMDbYm7cdTdji6FLk1oTwSzot1Pz0TMdILbv2FqbLgXoh/T3Q9YbWzwQumJiDOXu9EVzrtnt7Jv0y3cwYn7cuqutp7Gl24E27t2gBvnV9/3+Sb/bAL0WeVW/FQa1icjQSv9dJY9ccTJRb+pZJs2Aq9HwXt3XTQ4EHh+cRGh1pLckjC3nZsIXhq9T0cS7e+GLmGuDWOrxFGNCLX88NeAtdvU4U9Ylv9Awt2m4BlzocnLcRlDluzM/otHQZ612E4VkwIbDusRzBjoi98JRqN6aqzmZClMKoW/TZhKSb+VCevSCqraKlwMtlXF5YgLP7IA03RDjBpce4sqvtBVqxTU26E5SHhYENXBL1c/h7ViQmOHpf0DSMS6pBLU21Ta0f8VMCVbFg+zZYwTjx7GnBMVkTBscOXb3jOwZkkkINtebgXwUldYxWT6bdkHGKPtY6gsk4wLkqkM31+yxslD4f4wWa+vocer1LOw5zNF9ihLVDdL9dOSu4T2cVMWOnr8mkGHgwDfALhgBw60a1cuhVkNMgl74NfwS6H4egkR1VwwklKZKjFDbCOvlnjiDlQInRSvycrj0A5tTIpRlhnXvZRWZSleT8+DzVnpsk4hvijl2qHwhGnC2fbRVdkl4V6w83BepqLUzmsaUcKRwj2fNNw3U3vBMgpKevFIOi3pxzC9Zf0SdqSLivDMF7ly36QHKOWRbCNrBCkStkWCxQXurxc/dnTBW/OUTBCqTU2lxJdLiMBIgXnBIog9rIsBzQ2SZ0Snm4vHpDieiTfKewTBheo3HTfoKA30txZ3EZ6UoktEHoyU9z7Ew4OnEKgzGnVXOMlyXvp9QBRsTbQZEvMxcpBjqrzDuJrzkvyzxwt1rrUBEhzvdcpy7etS29SKs7HwrVxAdNtAJeqbVXF4EF0rkVt/5sdnbMadd5daRynC75CthQti9kRHsOtxL0ZdVlcmPoqC+wLgOvVQE15LeG/FxNg4Fr6V60JLqn2q+KLeQrCzLtV5XVrR+A2tJrTXX6+lObAsg7JCHBZBmSbSY0nryqqMgZ0epLcAHH6BCIbHUJHdPWxpbsdE/LYGHGj+Da2in2CDAo9YEuH0+axeM67wDe8pYgLp2ESj6KzH3so7f1sY3FzfKmiBGPmYh+3Vt1v/QwIUjfXv0H58wxMdCcfxje/yckqx0y3og8faGRieBRk2lDJI8ix3e7IYbitWzcvYNL3WSf8TbaP2yowToj12ovNzZEMKJnZMeMsc6EH1Um3t5WeczREkSU0V+zYunaRktgTguJ2L8CGVHjdNxbmcqlaNebK4EoFJbj10WiwK66vPGYZ86J76VaLXAECVCB7pqyfUjCYNXcbGvb584wd/n1aekUEUtVYRlfSPvptQME6NF6F4OaV9vO3TVoKhZyxZFmjzDup+aAYFvSAEIU47EJGOhZjqL3aNvsvpcMHeFJvhiZGoB1Zch94VTnIEZnkH01ZlNq9AJBONAmYlbaR6NYtJlyQVQUXVjd8Wh2pVahgrmpXATTMxDIVoqMTcDJqb0PnigezmmTrnbFWnGSmRU6UNbUbkdDmhgcxiYdW90TgxeVWOWEZSfeiwMutNPYzRIWoY3r3Fx3YXhxmhxs0fKKAi2yb+JjpmPMgNQokqvGFIfUtVmWCRVgaXQ5SbosBawkAWFWdIyMIsZmPA2nqTMikF6GT6ZtQyKCf7FbtQVVYMtVBAtI5bQVuMRDKqy2b1kB6HIwyp6PdaCLzRLGOk3p4SWUysHmkKuGsaLq27bZMLV0890G6XeqEQF20Wq2ZYJYS5AW+LfR/pWn5MOTbIUyOldel1zKFR8Zu8UB158is+Sf0MP7kBBV0NIwPl4O51jyenOaiZW1dBbOrtYNVhOIcxtwKUZ1tZU2hCg3uqifqoGiTGndqxSd1UEvb5/K6z7AXqUpeXFOOfRwUU2XlYiBlRTMBepNwepliv4LmWg7uugR3KFHtWHNu6l8iQ3lCMPVTM08o3jC3XQd0tpMKrB7EXzLZ3Hiqp0o7axN33zMzi1j8pq38U0ceAKaXrVRVXOkI+lwZWJ8eq1YENwuf4Aw8XzgZIHswjdKPbFZaNL7RxYgCBuWrC/SLUWvHh+FLeBKElGLA3/23fDU3dml/8faLCZcMTsmhO3pUxAVjtoG6JoujUROTqVaXE20Zq+YN8phz2Bw+6b9HLCujaekvFqg5dc/2DmAMONBkTZZjXaGoXk9nuKrEfl+p61LJ1/pHjExdaNe0yHaoJLgvlVA/sVm1/q8dzKhKcWsSuGoCgGrr1aLg7frto3vUX8tEMDfdPUmZIWEd5mt/4W+n2uO7mYzWr2vpeKJmUc4o3IxwSB94rbMoNUNF5fIiYmF5QVFpTJUQOVuyS6HFa1YcZ4V4RmLpp2jHa2PoQEuzbJ8ljr50bylh6jh0a7vsaic6xbFBreZuU9aKvem5pW/DysOUM2/nq83z1IDFcoWWQjWzlp3DWTDP4t5ECDa7G6+UdgxzxMFctO5g2GbXvejLjcMpCguoTps082mhyJFsg1gQnm173J7AEyFqCw7eveeTmUyKH9Q+SpZMsnbQyklZGUiRLkSydjKWTsfQykV4m1D0K/mDwju2r/0F7TzADAzFCM+V1Y4vFdq2TFwtEJ8FRbkqG8E97vKRTucCqc04m0TeBp/E/ego8nCwEQ+5st+BZ6EYHDe9FtcArO/PrP5Nc0ukkmok+Hx+inzMTH+m44940PR9tN5z8pj5dh/bbnJhBzbMdBf0M8CCjKK7C2Ft6cqORIjtHEHiL4rKGsCOOXvhnSzr1NQXWawSp+k0QvgmYkUhMMo75SRSluw+XWWEvevPZ9FEflg4OKzMi7IPNgPBRmKsKG8iFHmGD2hKMgkAol3BR9xQhQd4UC4VYhXekE2+/84oEKG74gMpfllbV0Mn+jkpayxp1zVvjUvP6fcP3vchaTg+zZUQtv7HkKJAJaN4IxqrIU+WCGBegf+a79xvxKn2QFLqobkvdo4ftQnrJSfb0IVGNWr5Rg1Arzv02dU1k0PyN0sDuSf7eG7nVjf8PZhn9V64aOg3o/OUSMcAJEuAS+gMMmsB92C6kF5nGrychi1psrXOdhLAU5ip4GfEeHKgo0kDQrq9GydBiIdALWu8yv1M3B7lcz3KHnHQogUAoKb5g429Ek7RKJmub059O+28zBkAUnvG0YvzG2Pp9onBKcf3k8ykNFBx8S7DpiZUQSvMQqk/LQ8a1UxmUUAtDUZCacQccUP09oMMc/KC7YweUjMkE5Zwoze4SV7gPhdnrsPnb22mfJgqOn/HDY8WZ3qi6HYA0bUsxy3kNRZsb2oq5xqB7tXyxnm6pkg1mHzbAzVeVuec8cIWlN1ADsP1rc1K/CatOVgdh1kJ2J7SYVhLT6QbgDnLT0Hsa2HmgbX6DC8wK6nTy6/aGB+31+HDz03l5LhRQUNIJyPQSfdSIllpJPcEXiM11e+p41q0QkeX6w4Ys+tz5D6Q+P/q7jBFtreFgAkiznTW9WPuWGdrKscIjxB6JZGTzecd4g3MFN2iuHN899R8wlgk2ADpkaWPb9+KMITzRvztDUdlPEExcWDE3TcAF1wB3a6fb30bp1YVq5lEsYoka2GFU/dBnD9J8mpGqMrcSI7wA7LxKoPNOp/3+xvU1zmifsmgJi2SGW4luZle/gh8dNLVIoYktoLBpQtDHU5bLi6UpCS6ky5fIy5g6GhzvKYyTYX+ZVE5MCQPo5FJ9J1Bk0hIzSi+uFwqci1uJVo+q0+m3UX+ZimVjkgQdaq4vpmaiRUqCpTgpakacgJEihK05AgwJ4J3yVMeyPy5uCdfP5xQPLWDZW/8iylSSNaOXO4Ojc2eOX0hTeq1NRrDrlQoAO/IFfR66VN5idHJeW8+uoO6uS2DcylTz7gMvLEvOEkseAJICauTDmtp9/kTzfSVF+n/eUvhTMbLfumbKNDI1txKX2XEPCZOa3sb8fmtduQzEjw7DzOLCBU8EpUW835rgXl3arQYV/WqJlcQprTPlYmFAZn5w5ggeMxfwDYxluu33J+UP6hbtw20Quqxt+vhusSoyncnF8msI97byUeam0OG9G9ceWsLMnugxXF30ePG762/TO7cDsZ7Iib7ZWeWWNg/6O/5dMFURuyXpPhgiMOIWwToy+jgE+muREKBdOpz3qYn/gsFCLbbXghvn8XxS0uM93tSPy/QVG5OpxQLCqtToCIaVrT5V3Dq2/w42zsH3Yto17J0ug59t//NqnuKFuzZE1N05kNeA3qU2YNAXQb00ow6M3XD3iqlDWqxvOmUz4q+pRZq78GOS0Bh4L6b9azHtHZS6uMhJ7rnYe1V4MrrHuvNjKpKJ4WXTfSa/WzRNu2r6fRM86ddgFm+TPVqZ7lNh0M7ohj5pcZQOH7XwDiTQdxCuQbdCNwWlk4QiaENFS9VhksVjn1kLntrGkFmtfpPK4HRcnVzfIDzQ2NAG8RaZGa0PuPGEC17UGNOMGtUZd5g518QzcQQDd7xD7xN6nvDP4I/S53waG8tqcBCvlfUBNB62q/a8vdtV1NVvlgUC0Mmd7zYymIqKVjRnh+uLn4Tj0eITwoADu6b2gvDsrlg8+aKJF/zj/sec4dWlj+y9vCrG6knHD5Kf8dJFMqScSh3dh0xeSVVeMRTzgm2E8m6UStBJxUFrTT6wv2sDNS/ztCv48yb8MBqj/Jbex+ek/txZOtM7QMWdtXIOqJ6a2pOvC4yxJeXHBSuQnV4GWZ5fN4GKF9ur2Uxi0l+4d6SLjZ/vbbokqzA2Jin8u4xGK68Y/37sHphX2qKF0jQaWs8/2ticnz25aBwsUKch2NWe80r4+bIWeqV2xCtdoD59Vcda5Ke1I3Ihxn7gc9L48+a9IM7QF2ZyK1A155FTjfQNDrxDGcotOjve8DX23CN7RmfFLW9rDtMRNZKMASNH9D7hyCd84qdRZ9qvflZtTaZm7qaTdGg85E26210nraQZm2aR+o7FF8Z+hJuxrzruRZ4QBsyZ9kJFj7DmiQshvq7t/NTdluGNU8c/5Mnocm+t95JajAPtsew22MXDa1W6o1gB/dkZzxXzzSXeGAjBSNdk2pexLa2qLzjVYQfO1+eKyEITztNPJY0EiaPppFSBjHq2Pm5VJYhutcEoEYaKPD2nyEpwXEBrMRjm14q3KxrYzzvQywsodz9xlqxrek+Z1j4jIXew42wUiVju+3Pw/STy9VgFAvUJmEVvN74sAVNtnW9NB+mP/uilF6hPwCx66aWXXsBe9EIw9AJm0UsvvfRyBOTKlmXTLO7TC3hWBXhWBXhOBLgNueQo1kxubRrn7/OlFV/ay43oVqmS8NMibZbDIP4BgYdsYEAhxWnTX/Hf+00YB+xofh3MePg4wLF9qy8auHCWIDbDDzOuOmYczJ89C1PdC56ugpt22H/ryVsyih36Vqs4vhNpHv/Ayhh1m/CclIl2fQtp+gd67Jqut3jHd2h9wDOfMAzD8KKxoXLExAnFCxor7v0ekS5cbbuewk9CLTGjztUTNB52rOP917u9M0d045lDY0dUjg1OsWEbN7dTynTkIJwQNFdzzyJIMIZu4pp5Cq+/pGL8+L6R0eiUBn3GIKnuusPN9KRBcgNMpEBjYmuO7wvMmBcomvu6mHHngoZGGjLLg+2r+fbMk3nQOM5pbx5GYNE4UdnZ8XKPELm53ycMuXjI/1ika9J2QiiSBRnAYfJ6bV+XEc3khkdFa1gyVsIEuabSBZF72LNi1z4xl/iCgqFHQhTLTBKnYT5HRixtuD1vYxXQTmc2jPoS3NKUBxtPoGd8Z2zCTnbMFkMNLWJzaO2AQczuUFyaEDmfUm8Rb7lOFNmemLRMWhYP7Rkg4/NQUGtkQWuoymzNjMoeRgyxOkM4LQ7tXJlPzgtlBZTUyXFRHNt5MSU/F6d2/pqB34qLdu7MzAfUoR3MYapoBGT2pALX84RpFG4uxNjUiTY41zTWYf19jgQy3OEtR8WBsy/hLFWoi6m++qLdBCFGIEtgupEX4rGLUOnL3KgcuGpnDumU1vnQgPgC5FVvUVhqtM+oxIEHLHbosjS95myaVP6ssWSr6jzzsu5hBA4hp3mTNHXEiuMBc1Jc7EmUW0pcprxlqbIdgJMcpqc9pWGqHOQjHwTlOe0yhw4ISYH2Dft3RnL7Yft0mGKGczBg9CqXCwFfxmN92df9DcZK7qblD5LaAHGT551AsCO5ikBmKZ2FlOtqKHLY0wkXVX0F41vZbRmUFo5jsmVT4w6wB32DC4HSJSlEi4oJAHaQhxSHdq7MJxeFsgJK6uT4uTi282JKfitO7fw1Ax+Ki3buzIy9yVBBKrpy+Cib4hoZSStvjfSzAEthK/J862Kx7VPV7lM9qSfQWkv+GR13Jn7OULWNVhxL5HITQr0vhNngSfDCUgOGICsRxAJqQ1AHeouBbUX10AszZ0ze936zR3Sj2fA8TYszKMEtqSSFxQnSQYAHgT9XaTx1V8wIiRYrPacEs1plexFQ/Y+7D8wKsxEkUaej6Pj+c7L6VDp9kz6/4BVkCwvyD9Mtwx0cd88Wd4ItWytrEX49SZrY94/AmbdE0sJLbNbonBqVN+qNtczq7lPeHbcLGjHzADkDuhGjxHd0XVKA6NvLUA1QG3lOe94V5mAqY4ybM2Mv0lpVQFmCrcapuL6Kp08BnUxES1PM84JqCCJs1RSishk/ksF0qgtzuhQH4N/4W7sJlu33rc2Rjae0cRpld3FT978zgkXwhRODXr8s1kpok+bA0Cpng5KgqrNUYlT+aCXBRQay2y+3iiCnmNLfPLX8ANlGROhbzkBMZqp+L92oZQzi+dX1IZY0+9RVRdJ4yjJFuEgPsmqhKevRDL8QUqANDznxSV0qfA8BCAQhA/iQYxSHcSha7WTyqqEX8EDBDgTVyWeL2icSbtwgx7KQNjZynxNpyOiY80azL3hpB0UQs03uv0GcSmu9KvJisg64UFH0jJR+zgBHzqsBhVnb1RTOK7sZXvNWzl01KeoTFgJVrIWuG8ECESRvhsB8K9KSjQbzg5LLdPXDbdyEeWJTnaqTjDnpSXVg1ddNHZSAcz/M0MrVUnyvSayu2LxpEtr7wjYD0Q5bvUOBjS331HQP0BerRwVgtsFcGS0t7nmmAHwNcy/YCZ4COqCex1lJihg+sZeVoUcXGhHvU61FnYGPW3dNXTbZdMCv6sQ4aUaRD/cDEZCBeYzofB6NmFwKVSz0wb5T6FDoomA3h1H9ZYpJg9EuMKFMsX2X+I8dKT90PgSmFZGoGxG+g6aKymx9fCGoLKaRAzH9zKBerOGC1KOsp1Nf6ndhxuPlpVxYrc+2wBncdZXmbiQmPQWce4FMiqAJLfxsrR1bqsBlx+2CLLF0/LBNwX4odmsFzd6c6eAopL4nTHFBwdAtS19uwxK+5hMHxeDXkVQXRnmQ8Cil6UjAK9xcGUkovo5HnUrVMwbzvjdZEBjXlIlSO1fZysuAV4scwO2DQGQsX9GDOwPbXnqxJtEQq0q2GTICotXRTCuewo3JMuKwaFDJcSG92sSHHG9HDviApDotu6Ru3zlTyZlEyFn7ZKW1tc3Cy89ob5BIFdafLAGxaNF9RCxYavJFd0Ewi8hpgcCE9oWpC2VitnD0YeUt2celrNhZI3TevPFgA2PmMlGJBREWQYqRe1xkHnXweyhxEUjs7R4KXIikgbG8HEoXpbHi0mVHDuwhUSJLQy5MhsA+TaDV/QVaXHLUwntilCQO1vRb+XBy9dmhJWq/gUbigL0AhG8Pb95+bXBLYgqypi3Cg1FnxEKTNl2NgBb8n/61SyYH7EQYnM7mNhbT/WSqMUWYmgErox2GvR60+GpWV69zneWOVXsUSApnr0qN3VIrin8qT97LSY9OK0WBBxSwuGU0//BTqufjHGsAOwJ8IsqrdhCjj4djdctlpCCU8Twn2u9nWuBwSb8xxdYFRm5Ll6unodOt2BorTUIqc1yoOd51vxMZ/WeeBqm9mtfiOf94qOrd+xH6FgeikZNOtSFXsVDl5xJ+He7angXNf7v+13RL8fPI9XJUvf/JZ6/Jku6TXve8J5flam+R/x6u6nIraBLdjDJjO7PMSlwFCMyIrxcyI80KBPgknv+MiJATqHLIggzPfby4SMqas8hExTo/xUD55XY/gWxARE9TnJEkNPVeK7O0xHWCBMdPPwDKLv/ti8YBpxst/v2+jNjetfa4+u/f0/tNfz+oOPz+Fj63Mv9zdHX6v9qTs3jPFXnGIDLnNFM2ZJo/t9ytsKVfjK5GxAsORVIU27yzz2Dj9duShl+koNneQhnp0X6WruzCsfYemdWkiS4m3MPCWInTLiAeclBiEQOFfPp0O8KFO+9GuAZf3hpKgE1yWqhgtMH0YyUFy4BTE5ivP2RK7GdNMQBKSRNaVNkf0YP3BoW5aJFGz8FsC/MYbHBYQD0ae4GhaNYPSLcGExd1oZH80raauqOjuLAubp/kMCv8CYCCl3eiMFRYDblamPqol0C57ybDiAzQ3/aAm7+hMNFs3eIYqYjN2HlORWu0PvJZYf1eoID98XShe6AkPADn4NRXw3n6qPR5qsimqcdhuFhNl2tTwiRcvtkqiBgFl6obDFJCGTwzV2PziATab3rKx9a/JzY1PVL9G0qa9rulYwALqz3YXVlA3gozcYWP9YLSkTRMiMZDx0dt8LJhYsF5pMBBNhILJ9vBXgKVoyheRYKXWOrd9dQG+P7pQ2bRxB4ephvE54jtcw4VKyenaq1AsWeJOqaokhZnkMw49AJb/yKqJn65w4KQ7bmaBEmimDwgiJXBLtUiQeSlgo6u9UmfCXaJPBte1nupEE7FdaAYpflmgaED/fEbRCTPSNy7siqchC9mDHGakKqVp6vhkqG9V/Uq9ayTBe2qaMzM9054EzQA6qszpNd93eGN2zKit7RKtLkkEF5NmXy403DTQju//AVATcxoO6UdDheQtA6zmzDXHlpjs9G7Y0JaNzuyQkBmjKFsi+JS9049EpfEPo4pNNNTqfAPK1Cky+nsGqv2NxP7UWCLuAjgg90BvQA7RaJWRXuCx5ocJReCtIhurSZniQHsI1zWalB6FSRIYB+QcPLWxVIEcJ9F8S0Hn212wVrw+E3KFslIhN0v2cCmGqN2vpJQTh1fFn9+hcnCcG3ThMNFIv/WtHLcf+qhJ7Wm/3esWZKknQK0WTlLD+yQtppplzYOWF1ubvYlsiJdWSfnx2BrDX+vwxATLmJrn5QL0aCX/zUiqwhlIyAaH2v6YXCclxnQhhgv4gSOYQabcAbdoaygU+UwHlJYmDxYcoiFySMQptjS7/hcKKhEZGwNQHguOAfUlgvudSZS2K3LFjlOf4ISoBC8jLHzxYu6ZnTJ8nzbBDxB8eCB3HJnfipl0cO0vF/fbADGjJqQmsr/KbgZvISvb+aRVqe1BKI/ZuW+VZ9RR15yYp+MlfbuNm/LFjufRM0CCelnRKaXS16YYEgT3QncTVhiIiRzKSiKKuWhjG+TtRhzScSOwSE2OyX/xQd6qauSPgYH9Of0eYedO5Opdwcz7nwcmQP0yhKOBaUAHn7F5BPxN+KJxRz22gJjGqA0qD9u0ZmhnwgPE/OWRykavVTJSo81MQDV0hIdWjQvyPAe4ayo9f+R+slKwTMW5+3pHF2Coj1FibLJaR/8v3OKaB4nC3RTBZLXUE8HkaQ2Rp3d2ALhkpAYYLyb98NrI3OifAbFFyJkh0QEVLZz2O6K2OoQ2e3Tgm2SNnyy8Rj9f2islVIj7yKK3RB/uvwfkiTdxPRd7PowEw34Z93E555YFvY1GNeLcVxy680JYcoQ5pBKMjJb9xocqXx+9onJTiOZH6zqz/VYXMehBculYeIZa3u0mIM4vv2Wl/q+77BzvfQIT8sAmkCfwgCy61hlADCM1XI2KRHbOiHbotu+K2mNDUNAbhlmZkGexZxp/N/jKDKvk1I7kduoMFmMg9eSuUQZbUE/Q8tMmuGKNMzQ+I8YnahNFf8Me7+kJNz12GFkTQDnA5mdJaHecTJL4TShl7OhwaIcmjLa+TbZeZO9vvQEFUwzQipNVtLAmnD0PWv0myXoXekwN4QHHi/qRKsVgVaNv+/gu7GzX2uuleYn/KAmckqejSpW/nGI4APeKgWLuQak73qbSNF2LMhhthHrRj10s74YTzrD03TrmtHgTvWNG925HWriAu95nHHXzumVV8sQW/drI/rp9ysFNYah2rFvK0lUAox4cT3r8mVHcO5szJT9B4j87jQ3Lz+MJ5ztFCdMkr63wj6AtFbhPbcPynunCeVWhwXaJUb4wArjte8jhLSXTDUPrZ5ygmA4qXIb4H5nA1wiKVAUbiosm1/FGDYoZXt+sHEr5asUbk4vMUFMr6f0BJjC0lJSocEA6QtH9hsAU8IxPNnOXWGn30XHTSGCa3cwZrt3ylk7YWsVMjzvXTnG7MqryEAz9R4aTAEBwxVuD2p67IhhyCKSdoZ3BQ8bPaEnY5ERNv0eOCN4M/Ux/ndEP4ANuoe5sgWO5Ol6ZPvLzjbsUI0IeN9ix9OarwJXoUMqDzfKw3FKbxfwd4pF4Hyg8DNkq0aTGcDzT6yeSjVgYEhjA8Bt2Ja1DxdtA9Dyo6xTS+qwLggcGTfAXSYOhWoM/sdB9ceVcb0yR5Lfnkk7J0R4wg7ojhk30v0mVm/Z8OuqVEUyq3AGBG6a1EzMzcZAs+kqNM4DCgyxEv3CFNIRmr9ufyVwdPYSU5uR5CkoJDE/bBvyXgORRe6tYCVsWBUmeBlsngceK04BRpBoWazHIa2ewPwoNjfoW90HGaqARVhGJdiTPFyqLIGeAplZlbXyPROWh5g0LWEMAxtwKewRNpGLYAVMTkjFiOk4d+RO3azjsMyFxnfhH8CnMPMBZ7kfHEJYhQGom927fr3EtslAB0e5rtIEYS33Es8GPHt38sQElWGOg2gDTiBq58YLgAbZa3D3NiZzXwix5t46H0cqoqMvQrHm6ECMjUH6GBCLnKRzjwfx0X/62nhU9fzflnRzB7cOGEu0qMEYaBQXGeVAECyREHZAcbI5JUko1m6QYR0mvuU573TgqyMPpg6BWo1g75eRneNOe/eNJzSU5wgmt9pKZCZFy5IQVZsVO1IapTS7jOmmOXOvyw0tuWKp2mJmI9khHOsr3Z+u5lTzXaR7RdxqFlbYgfbKlPa6W4lPrM5lAH1EkX3e8jkQl+/EILVg/nvYWYddswlzj6JSqaNpp0dNo3YkoFTHVYh7dye4FIx0D5dxcnAntYKfhvKSzy0p6C7ZOeB7r4F4Ku4LgKqHkBJQPAGF5ET3Hb/PAbJBR0RkoGI29thvNGRHnJqNc8hZRp2EoKtE302X59myfA/L51SBok5ZQOTBngwtnHZjcPsx8tdJYdbsgHG6fTLaE3/gzj7/szld1boZTCDr059Xt8CALKhq1NJOD6NR3ksQU34DcIDEwu2kc38hbBjH0Nj1wVjRxsh1amaitcxtwlvBworhtTQiIdNDG/QuE77bsDmMwkkkML1GViER4Rcmev2mIoYj9wiIBqFyym9kuWRZgG6B0yLR67pFkdNE1LFO7IP3ruJNQZOZTObkXEXZnxT7m0mstBmXvY8btHa4si+rftZONUN5LQ4OISU69YFLE8yA+RU1cF3dsag/LwntQJcEgxzMXHacbau6j0w+dxd/9E4BzKJaVKWTM1wqKoXgKZoLrJS2show1npI/H/YhNYzNmaC4LnDDVnwZkxsWSenfvCHQOPj9Re571yRsWTPrhtU8ypG18jz1gLjZoWdst72Tkr9pirjbyt+jIqC6Uz9AV59SSBzxT+9EKlG/eRzHQmKF1GMIJSXoD1Ustpzv7i85kn3mJTyIih1ZDo2E/XZsOqqoFzJlkjQDQOnt1lINhpqBkaLpO4k2Ny/SXkqZvwJkXzL1kxk7tJF5zPSC9+hX2j8FSk57LTJ7ZRsZc2V6g7MaEBn7BzBOWDVDkDeNhjU3aiLuyCBmNMVxmH9dVWKtKqZb2mNTU7f2hIIP1PMx+mwCMOVcJfl8mt7NS3FukK68L1/eFcIFneGfShkMWy86KMOsdRZo/tQSChnBTbV+O5Xhu1HbgbT2gpCrCJNJuOwcN8WniZPQxBdf++c/biuEgv1yTMtQNaEYhJ762XVMlezR7O3+r2IwlnJhOMGSoyUuyj0Geu7Qo3FYIQPg+ENMzeDvo2o1QNA/8xLGctSrPZO1JFl0FAkvlaWeyQsR1NubSU4FrtKAndrfJN5TvDiLpjk4zoSTBUQMZTyiTotgYDm2P9MGrzaBjUAmPOhmcTwNyF2WtDkrItBoBhKVfFeGF7htmoRDNQ0rktFBWy4qHblWXmvCuG7sUaOr5j3xQckY40AUjVFFNpRHhQqmBJBwlyVrVNTprQN3tYxTyPGiYfJRvVYSOfkAidNvHHj/SJE2VqxEUHwF/Sde/pE9PkB53+I8XRSXiFmvhFfJk6cu4aJThDclACA5ygdi9SMr/K0+ue7RruovGA9F9hbhIIkbx31Ri6DNTDCSQlw5nfoFW5BdISAnGtk1AbGfxU2WqB9sk1oqv8jHcms1EeX+E4xTXLYoDwncCdLqR+rknN8YMUB4u6usHifyJoZ0NCI+0mRaEs4WNze9gWBzU4sJDBuxSxfEwGIHxOVd8pAQ3ZJpkqPai0ECDjGiruTm0bQBr0uV/aFJUnBkyDuLX4uFoepBI/j65QivbW0qNa0wyUHoC0B7hY2mLBX7hN8mXgCwxrId+lzsNe2zn1iYfKFBdUbF+pnezx1A1CCM4JXG5GNKarzqGPw9G34bSOnYbM+3xOwYj8BgR74QEYGjAEUVGbLCJ47geJveyj+nj0kmqtT8pAsbZzjlapCzPFC3PQJEGXJBRnjQOEpNwyAObhZiyYPuz4NY2/B1QDPR3J/M46G+KOKYbC+H7nzxUkWvwtZymasHgBhbMmRHYx1PA1QTx7UTWXWCKMYd3k3ttZvRBtmqOQ7YvyR+XyPq/8yA7+HQneva/aNBICvTHwxuUcutguxFu4WAfyAHCiogb6e9QLQQcvba1MaMd6Yni+SVT8vaecWCHY5FlLK/QUwXf7WDDJCLzGsr0HYBxo8plSI8M4PL/01olkvGMD0MVBYgM47gn/WI3of0kPm3tpXX9QdjtU0hNj+vi2/y81vNNo4OtPGxWTusBNVeaOg4jD5Djn/53/1SYc7TTeyrDo/pNeAbxSflqmo+MDnoE0iFanEhBhtfgEoUtG9p/GWK3IP7T4Mxo7VUdzp8VUcSWBb8bYCZZhXgViduB7jOxfIb/y7F6eBrBC6E4mW5oKfK41oLwIY14UUvlCtR/FedPUp1I8cFdVHFeowhzpXiekrAnvfqqnNG/7ll2JQgZsONE03bxr8U+u5xz/1dQmExRker060frT8Nv6MzjkwWVPet8Zq8hEfLaudPxssDmEJFO9OUYBfaCikDzj1pH7WQF+r56ntzP08lKSXrIetXTV+2zF4rM3WaNO1fjtoXQnHOrWbKQ8tVMcP/D1yBVC5lQn8Gf0xJvJk5MfONhidyxEg0TsrawtRzJ3i4euvjI22BJF8xlLQXdL/Ne0uH0xQn9vEIepYl92WXC0Wbb+Tp9Uo0ZXvy8n+Jsa6+i8yKelWTimma8h0dNObq8tjdgrhpoZKVLCzJybHwMgwvrfu0UHkmL2riZosFAg4fh0GoAL8dI8H5NHb+GP+s+FP3N5Xq28/ev9Qf+KT+y3N00jZXlC17MEk0bdeD3KQAEIjdoHtS7PFaZYCpvVgpOQWVOGEGpbC7srAjGktIMUNOQe8VhzJSHbBg0E4i3bI0bzOpFQpBaqHDXSBc9oTwZo+Y5dtGgoiNq1+rxnlRVW+T2riAwelrRi8B4/rUcp3Ez8MCSKfFB6TW20yvJ6tXjJ0LCledsT9WsIid7vAZxs0hy0YMmAc3H8vb6uMffMCfPQvLthdrRTnN1iZGcPhdxJnlpt9kwWA1U+6RchD4ygxGg7eKCDgmmteLbYAGZ3l5fP5D7Ym2rWkiONP6ePyxI450+IF7GDdePLYRXhV8omvnrKNgR+8ABJlQn7hKWKY7p0F7VLnkoXao+iXZEaWHaZm9nDYoSej4Kby4VDYI0vr1E6O3i3BzLO81b5T9KskUIg9/DE770BqFuccDJQCvF93yjtyhCA/0TcvQCdUwPRHeEBOFpSW57jCfminreRQfnAebthmxCPo8gGy9FoTu2J7jqwgYc0IIWggnEsDDdruEmWdz0FctECPtbUj0qsP2lgdQpNUFHBiFnfi7CmUqmlgFSybjtp7rFtiOEcsSZORCCaRmAsunB8VFZnIw/uTjI7KuUaEQ8O6c27n43vaH3qshhq/JJZEy9vxkEukbk4YdB1pSZNMaCAG98U847qyKFG3cGlFjWhnb5pBhBp8crOSpBNVqN3rufCcCoTCQBA/ecT9PeuxoPeeRtcc0OXZPTeY4YIePBCM+QCxUEN6qoG977y3P2fpR9hPjjPZ+bWZizaDTc7B/h2g8/LaKdpg1Eq3pG74nITMnb/Ljgdqv9fGfpKTz5II44g9SuL3LYyg0D/+IMhpjCSO83KL/0YK0owdojwkiCQXuBd9MtF+vyBDjT83s/n2ywk74FStjaUEu/8JmDEn8eTox4QE9Tuz8wh1m+G/CzhTHTjydy25OWHxHWc/OQaHUHwlGfRRcz8l/gPj05gQcQC/kD2ruwfUq6STC/8eMscXOcnUDuzXe3Jao7UvHQSVTpc8whXwhXp4sxQLLC0ZJWtkkH15aG573kJ5CQm1wuaoIAU2VUTiODcGIdb93jve8J8D29XQ15VyS21u80Gm7Z5li2t3Tkgmp0gHZaTDiCt85UH3X+/hcCTc+N/pw7Udrmu2yyhJSd7GLR+SNLR1h0A/XgvLuiAGZQqsPzvUNkMJNnb2thcUdNGYDnMRpT7iz1gGI72G9QQ7T3emenOuc2CmVR5LTG4eiHFbAl/bPEI2SJAiTBPp4RaNml1F2y8W/tvpn3eJrI5QNCu11bZFxjWE5bpo/uRaGIj1WaQdrNMZWfHAVy49euuwfG6YqUePP/L6J0e34Hxv9+5P9BKRwcqJOxL8QVqZsrImtvQugjLFdZvgdCXDNpJ6H+tpI+1NiCAefiRjPlxNh/jYGfsJ6bLHgtxFuyPG3UncUKTL6Ge4zyP2AFiFNSE4r3ivuNR6i0rZHR5nPGkIA4O9EzlnFzV2fgr6HdOKm1SFefsMx9Q6/MOZ0pN8YHcwKlhVM4ADzSXWIbDW9DbFTtjmolshfAHn1J3Z5XNlpEKPppSp54JOKSpyZHDZO0r6nkPl5d9o4LOPpPIjkxaYlAOg0pxNcXNSlT03w7n+I7a2YZZZHuOKdUJslnVypY592LJXRMUHrdE8kn94QjfBQFe+yuPm0NCGFI1JkqNU5LZii+tLpwnnbC2fcvVLEFieg30m4F7sCVRwsD71ModjfsYVcRGuvC5OjzNSu/UdXryT1XYS2BkDCDQDlFiSUBVADLlCICwhxz9kqR4p8T7UUn9rej2Hay6CFT/MKOOdPwiyNE0eiMjyi0/SLebZ9Vc5/wSt95dfJFhVygoriEpfVbZvMqCZmCrC+k2qyVCTYxRCeVC9DOCKH1QzNisO/CUjJeOurBxYcFzMbibOg06fq40GNcvaNmdUqVQ9S4N3F/ZMWOjUAqvclM9YwgjpR5A0aSJUlUKW5qjJYi5xUM/qrdhOnVlUxgzRY+mggwFGept707ZHXaVx9LT5kqtFsFulrK3ek/RYQpxN7fErT7/cJirOtyOGEDhtSDs3fnFvkn0ZlDsS9qopgcHJ/ngvrRZ+VP5eh84TqzHYCvRBeA5CGrZNC/KjMKwrfJYvUlBu0UHTrA7hg7yZduYRXd9HhTRHN5gtuNjLHpsbkBy714+jeZqmZF6ihkCy63dqdRdfKJVJzu4MjSP/afc+YZQaNv08bkyZ7b2ndG3VS8tHkT27vyHYoaB01QT0eG1okG9Q2G36Tg84vVf4w82FpIg7oy3Lan/tyO+sji51p6iU7UKOWjulqrQn8qM79/lWOylu5WzGru5o9Ky4Q4pkosZ9mK5ZyTcgrP88QFOXg+mv0wn3bjsWpi02o0/u+oD3o7MEauOunMAFGJVy/41T/B93NTvOfPurKbAekwrf1dUMWhH1NOHKRbEKjwe/8EkLHMH3Yy0MzLaLjeBOPueOpbZdeaVdy53XusvTuwrf3XW/0f9zHF/cWdDgECNXbb7bal/GeLA7dXwfKl+mWOVYsvU5UVnmQO+ciUNbhZrbo+EO9JH5fhG8FS+WEHR/PVqj1MNd2zlu2J7+ppLWlrzOl4Mbk+XKWPhWLgh02wjZhBilstr7LzLzlbc1C7q6Bd312vM1Fn5fXFJg5Te+WZLuZl2omH0r/HraBecMUBjVI5yit12QoKWGFhzkex0CCBQ4glqxTtYHP2E0WJjWn89U2d/jdC68ldtIDDhPVRomJ+VBEEsSV1pcfHjTqKbG/HtoNofR8WaJvbadyfduJZBKBdXw9SKujzrGFuwn1RpZxSdMs/ZZbzOICr+86w3E2KnXlxL+ZkgqjH1vqUhB1ZfUKr7zVKu491G7imGyIln0ISHkbi2xSxqzN8trq/+78VxDlcs4NYkBPmQoiNAeGi0OR8/Rf9sJmhJYji9pF+2QxhXALFn4IEGP6YudV27SvOD8hIh3hLHUKfy5pYMSKRuVUFQlH+8bD5lErhNgNmlD/kZeSJ6iwJHnOTNSiZ4nwzW17Zq5n2DEGTMVvsvry0Qc0+zwZdJ4VoGh1VvQfDWjIukkikpeWrMayTDOlZNeIn6C03QTdT5C7dyJ5aOpu2Tm5QSDZ2QVvrtL57RAez4uU19Fm7vubUIY4RrTUzjCEzAiR1VsQHXQZ49RGX+9UVVAQqrJG99e43zwe80Xs0OK7WrHn4dJqKA+oiN//Wg1GPmhQuf447c26Ynp8vZ+Q8+vIogvhPzh2I8qK7Y9uNxSp83DzByGY0Lwf9Oq70kmTm1CTrS+efkrFSGflNZKexahXk3nX2bNnL4fQx7kSK7lp3D5m9umrMMxP0kKIQLiiMmp/FdyrPl3gs386n9ZW4eHnCcKKL8btw16Eas6x3dehWeR1rvyAe7qVAEsjsKctzV47nJXGwCY2f2oBA0b+9ei2CGyBCJUJHMgT6snXOPIGdsIEOY5wfoZgW0C8iq6HpngmunhZAJMLE/YBmrdNdyzNsM3qHJwpOP8GoWFKNDShCYTvWz+KQuM39sbk22ThlUnUoHDN46iiwcRI6qxPKnHCl7DmHRu2YVnaxT89zvFPOjmsMU9fIleIu0q4w2CQWnwx1vz5yeihHfVMjIcYHQnQkn95OCiPtusK/Nn4HtQsgE5jCRCXNEz6MYzxhTp0c/n/QU22aOG7wUZ+USyHJHPZIMdhI6d0Hwn/0pokD000239GAKcnohyBz/wgJ+XU/mYHjdt6X9mvGQG2AUY3qUpVc8cIEBs0FKn9qhbI+eyJE5vGxflonbHGxFe8fio4GM2aaul+g9s6neYl3DPzIG0pkXpCyZWX7KG6CKxvrdIuof8w2C5nT0vreGrC5ibyOuSTz7SUGb/PI1WjqJIFI/qjs6PMtu5e2PcPNcn0nFuAs3jmdY/Q+56QR8Ag8Ih04PzFFAaAjvXyTJ1H4ZVyZLj4fDVYRJItG+alEyeXtpiyjT45p14FhQFCzLF8CvkoMNUG1dK57ylpI+9zDRWmMiuEUzf4EiiN0bSJWHlqnhGHLNvo8FOqnPw7BBaFGsbJo0s257qMQgvxPmZAKLBIzFs9wAVSknoMOwr0LvGRBGR7z3Bj3BJwAfb8zkxNACkccAFQgbo1OZK4J9mJDBdBLnZlN7X9ebfhfTm66UhqY1cqUkKVypSiKXCl2Iei13KCIYzqIwAQOwJQfsFiLyo9KcFJMyq0zHAw2kyFD39BpDDRAFuCfCMv1nAifwX4T0AY4k07sCgEGaIvpZsVgHFpr083gKw9+rr7nv8/qJyfzhWFws/XPbpLkZpZ5op9Y63Qd62KzeHb4YiOp7wqR98IrAeh4d5MMwmymAqlEhE29XceKEBSLqu7+8u/3w60y6fafE/rNoVTQWm4tCPdAE2aMwHMDpWcDiP0OpfKOFJ9/qvUPjI4S0+/D8Ja0IWPiWsc8Uq/GUKYRMRMdUfMwoylHdRou7rwzUqpqjZRIN4V7fXuGcKYxMtUrqxGumYaklm6PTd403RiQv2q4lqQqry5/5CQMvsrzeqaytDa//Y+qB579GVo0sn7/TeGhi48teQuVvAq6wvMmaKxmM0TP+xCPhPQUGpSiPN68sR5gRPbjsd+THfOsLfv6y6FBm4148emIIYw3EMh4WjDUcdEVVEaERkESHBcDAorH+paURdprS5e/5XX4lQfyRyMYpm6Fnnc76aXVG+0/5LR/MP9yFP6tLBjdrBkjqETK73qIRj/0cKzD+3cAxGZPBBHPj9Vyc69l8++J9fw6BzfDFPs3HwXz7wD2uW/s+WqTVTFz7eSwnOuj60MTwm/F8+2n8Uqqkc6w4USbJWUNG2JrlFJn9kMxB8xSM3E6HIVMjL5+8e1v2Q1LE2fUGMFOfZt4e6TE3r//KBcb3qmFpNWOBf7qmLf4WwOkjolbHlCIgwlpr1WLO2NdmxCWici0d7nmCBnDmmlY6sJ53rttY8xu91s5osOK/h+C/Ow+L1ZlTHv8aB9KMiHsEsMvMNjbv+XiHqW+5Wg+Nb0g2avaoTOO2yomXJV7pwSsf9kPfWVb6DwNt3QWca3/gYs8Y5Sdlw3yyywQ27IzZ6ZyBPFDSODN0mRB0LwPhzadR3JZ7FqOvjSPcYLuUklPIWf00C3uZzfctdJTkSM31bu05CeMHuAZvEOZkIN2AAqW/j17QEJaV164uBJX5chqEXre65X7JNUCKDUq/77VOFxexdfqWii4pJnzzBn3++7Kgcs4zUkggzHI6O0jhWqNWGVoH2oxUWKy2K1OuTt6v/DWtLtgSqDKvbn3nEfAj6xwtpqJg7VBCjAPwgSxiQCvhlR9omY92xPL/ux0jNJc+gDGQW64z0Zf+TSIpg2Y831FAEhWsMhblenoiRMBcVROuEDk3F/isNnQCAp8F2j9oygQ9AdspwddIsCtBXw/mD8kGFDS27wpxvvhLOjN44ffGg8wZ8HoKPc1U0iOhZ+NqaNv6pJ/w1jSw6f1fAsb9pHrNSNz0eHpkW7jxKr/UnwY0b1a4wd3lmDybRuI4jj7Iovuqals4bhERHkah061nh9dEje6/R60UaVt/IWMurmdfYq3amdFdIp6R0W9rq9pSn8j/6+jKgoW74e2UWcsEQ9FAOipltqfJmL0m7JJhL1hkQm138olzstJzR1NRJTPXJnhp1aq/AtWxcGYsxcD/xlH7KQMlYYhnmgNiJZRWK4NKo3RFr/tylcodVR8IXEuQ1cdtKTzOPp8q0KnfN9RwgxEE/1FUVbtyOx/dlvReOmxsRPZoQzyLq08lTAkPeNSqLN/j+LAg7+FE1+KjUSEdtrpA6V7hpoAT6zhMlFw3004XWAxSmEV2CcO6j6kCdqBlfWLsAxUTObX27+8XxHhN9Vj/zocvvrIS3lXRTtZdH5vIQmpTM7enIGPtj8jDtUmgO64XuqGAgCR9/0LrESg9sYjDYVoaGrwWDD7rhk0Bd5BB6UukTon+/NXPxETEpinfsIXasmO9CB4soO8qiqpnZUwCmuOl1kCwLs1vTuMhudTo4WbiTgkVNo3pLRNS7fjoKyuVkRFIuNZ8p+Bzqy50NMLBYQqG3BMLb5hXUex3USosl0ggLAVVWSZwsSol4bZ2gy72iQKjKo4BdK6VGPDGxTYJyTzV6CEUdO1QEftEmRJ87Jym6E3VguhqlwcsJF0e/AC+lIJCDdOf7aDjiWF2cOGcOwUSbLKtKu3HINuzX34wD/crZ2teKcWEv2NU28Wh1GPK1WoH7H+r/Zf6U2MxhuKcTuH6WKuTbvOTJWpJrLG6ndD3MMksziwKtLwCRP71JO8Trjn6tCBu5C8SqQ+J+v8zykBOgQTYeO4ooUzZ/9M18zUB9NRy8Hqw7DgufGUHFAF7UcMxsyUOBVadpzRkBcsC7/QGmABy+x73rjmfxGxCfvdIOjw5NWiZ+ToY6hyvDHQWcrUOS0cEhwX8LXzElhCvX3grDHYv2kNCh5OgHc6G93DRMpKc3wNyM0I5YRFSWG/+RUKXIm7xJFJ6exrlfhQgpUtD6kqBnbhr2lwNlfpikWc67qiNT97vGqd4tpzMbLdf27PHWNlIIOpsejzAD/waRrwQDSdHgsFKpyoG3VTq8feZk/UQvT92nKmR5a6njBdzIu4QdepHRluefkjHd+TLCNAOMeiW8w/cNlRyMHVai8j+O/fvUjHE+M0gmTubu4pH/QsDMENCyd7Er4O95fnAz1m7Vmn6zZA/ZRATJW6U5PU6//ywhD0LbSCgvktkWWvSXNPSl1n/0uFnwwrs01sVegunEzfJIwUEsC6rPbF5HRNZecXi5XozgoVQ93c6J7nN7sYUjTxXg0xbM/i7Ix/HA3pBHETvB+k5RLDXTQJhxr69M/np3Wlt3wYzr95mE1PNReplduGH4XLqJZZkOSjHnN+qMX/uORlSHu9l8SkGQJ631SeoJVv/WsAVHu1ZXRzDubOmdbxMrvvJGJugqVLrsSp5aBDt3lUJPCshk0qhHKWKYqvUxQ+khMD8I1MpSohoyx8ClnMoFFvsd6YPknGuH1MM7Z/z2Q4VWD6hch2Q/b1PrqJADJ4boeNuDF+opP6aDSMf49lumQhX9YIzGQ1kexkd5vwFRhLb2251Ez2sg3z8QtchIWlIOJ3eFGVTNw48j/vGH87CXpG4QZiqUz26MvDVsEHstQsu0eENQpCPXBXV5RHb4yvWeK0o9G+yHR6o7osGxTI4PadDnQYWnyAallMCP9XXa6Vbnqul+ZoBUJIrI0zxnNPfgaVkBxJCoT/wdmZtIFePEfDSUoYGHTZ3wwASXxHzncpG86N/fTV8pr2dit2jkciFFG6Kzx+DA6uY8sLpppvrKmDDgz9FRADgLtnnkjYIoYC3O0b2+hRvVTJ80wLQkrqtMyU1jxuKYWPvHqnBvKE137AqfePLEWE8AeHeklXQf+iLu2ZyBxvkvvRwSY9+PVlA3H3sen5TSrKyVl2d1eYlJ9f31lIbi/ADADrL9+2WsVOVxp71TVkfJElwDA2P2VMmnrdBxGK5QM2uL/n0KmH3mR6U265a7oMVkQC4lgOCfsZDaFEzbmaGMIieKelhcMf+ZnO1zXNs0qDZsOwmPz2ZdKfVP1udRaBCm6VniteQ57vSpf28kNb0qpm2CpJ9a0fwPWg2VzbSSO9ijlFOG4mSiEWld66x2TYk6gQGXqtKZZJhZqiwyNO7QqpGqforWGZ/oX0+tm5L79EsiMhp+/hEhtfhwFbvxHl90hTop85U8zdNPDoHhOj9t6qib9bG+FBOs7tS/6pNZl1/Qft7OQx5eCdJJI3RY0o89aYhFv0T4MKRh1Rbukp7VnUYNKuQWKuXyd5B3TrebDL/hyvyn9GiH2bmE2WgyavxFJq03VsOjFjXcHF/ztEt4fJlNKof8oze+BYKUd/JZQn7SX0MNZG06b1n4he+t4h9BIfOY9XdE7dCVoeYYdgV7x5qvdqyMaee1Zno4AcFRGhvTle7C7Ptd9eySGqWWYNeq9aj7HHrnN4iTUIs/N8rNeOV0NC65+POCm2XaFrrzJvSdhEEos9j5aTsSl5UdHRrlNfAHVDpukFjGwPJAJvPUG2a7SbRqi2s1EQ7TOHsoyVOdwVQNodot3mysUroZLFh6nS9udz100+c6oTb+iWBqr8678NZIXK8uX8eE2cw4XwChoYMteJCktq9kjfbYoLyHKMzusjUrjquNdV4ItQCku9ogwJqMTn4E3AgdXtRHrP1lmsShUjWbrf+n7C5sjcbVLWW/2VjviEdyQii/ovOA82oyZUOUeMZn13f25GbD6QzuJXeFnXrYcphq7HQ63A5ucLpc+hYJ6XPFWeyakA9G62vwHDLffFXJnWcFP4KCmTgv8Fr2Th7RoiHpZ5tjmXeCTyjsFGuImcVq/z5iF/C2rs9mlWnLZpBKrNBzU6Mg5KEXo1fNvue4f0zf26q5GzHln1Up4cUv7Z10L4ZwsVGx3jB9VmDpREZbyB5tD+d6obSATFO+wYtGkO4rjpMi0VEFnPZvStUhCVg2BFPX1gjTvmsjms9Ga+HCma4L7eb05rpWD4H0jEVzlYunJtq3v/8n2ZLjjFoEDUWcQAJUWrNziHuHd+X8T+UL55MdSU/g4CSWePim0MVoiM/GCGqHFJulknQBlYHJlGco3Q6FWKOhc0herQRrx9zXYMW1hkejo4SeZoUxPuJRKF3b9AwSTVeN5lu2a7zzIoLRlTnXTRnnbtCKmqZ+r7C0aTVXQtIG9rm10RQKZxlmrSzadjSGN0e4MIjFxwic9QMxUXaEDlu+u9STG0gRtAfea+TA0vpH2Djalia0raMpndvVJO6Z0TE8vgrXwyd22G5K4Rg4HLYWHf478/He5XIi7BjtmgV+ikrZfhJU6bDpsLpio8CbgFvLQeYg6uKglxmSyUwrGUgOAM+ivRxvFyowjTLkcc3q4BbDL0Ah+q4asrDUElQsdPLiW7EAaapgCG5nZl303RRmgi2xqyJ89do3NJDUeYv/qiRJnqI/3jzK1n4WAG6e/rTG25ylk4SjOvkHJapn7FXLtPFGx19yu7Qj0tm6G8n6DA/rGKXDpCcF+9HTO0Mzm3ZEm9pwZZlRHS+IKTOS6TPCJqaWVn7EB31yUpkvlY4qcB3uoVxtlUIr5v4uhobOZL7iV19kIfnaEjr+MPcgNu1zF8+ayirObcaftmbhp6Dfm0dx2Gdznh4FM0IuRQIDVgEvIlqtw4MgobzrICJ6ADIm/dTIvvBFcDPWavHWplaZjqGPNQe2wB5L7ODXOfTgRk7MBWMI5PVWQRAg65fu2vqgak6inOTofMBusgbnvbcn01oheQjmCYyJ3VA+5TSCJyZdVE/mEFkaJ2JwdwzGecZpkmNzqvOptDYk+s+XEt0V0A0Kf+FTJTPMnTm2omCfMmuXKxmLPMV/twt9S+6gI2Oo0n+TtaJxAZsX5xTg5ATdn7W4RY2Sm5UoHu/oC2MfNWqVCsWRPc8PD1I+tMEN1jYXxg52A4hghTLhN8Yh/yhJ+hEPggvx9KjYbsWGVHpiGscNR+Jg9nOkHS3HmaNUROb4swtMI2F3qHvN2V0xa8MymT/CaY5i5rY8vK2x1EuGlFd5cD1SrsNHR8Mv+ilqBZc9B6MQ7X9V8ZYm/iCDDkMbCiiGsIHbwc1ogKThobH+EYuMp2dslk5mIt99OBUaZFtx9uNr2XrbTqtePQuFZMYyJSvlDh2UsvyBo2SWS7mYT+3JY3GJD6eWMh393C9j1MVZFoTdbOVJ6Gv3+P7IGT6+0KWl0F851k0hfU2cWhmnUeRSRIVk26HWy82sen8qxqD6HdE96jQYgJQDNzRS91e5gFuwBlWXx3uIqzGyq24q38RUoysqPZPWnsKBuZv9NJkuWuv3X0HaL/pu7qsGbWsfgIA03Kq3Jc2p1HRCCfZ+RU0Lu8l07WlSh0GH3eLICmb94PF3SN5hfLKGtdBbpa6PNtQWGYPgKZ1xMnV4+2m08Ett+Wca1CBq+5M2uM38Asu/MjFNdmP0icqeBz98tgYGWbzdpEQk0zaGJwkYiuIykv2y1OMC7yndieAXdrtdOloS6/uUacGlnDTMrq5Oxs1kEknyprcJBKSa1tK2ZXc0HgZ0tKZ+x936M+6bbiIUO4rlFDgVMiVNI4tUOAqM2LQy6oD58b4PQNufxbHWeLs31n8QKT0sTpQxexiB+3f0bPpzmqiN6eW7C61KFExu+nmlGHXt9Yh7nH9dyoZt7diuYE0EmW1tK+yOXFHnRrGVyjEnpqbNsQmisz1jR50K+WdReiNuBSCKhwYLvJVDFzTGO11AgJz1K3l4s+eqHXei4FzkEyRTOvUNTDbCwyuZZB6Y3/b3Y8jdzLmAZN1D2U5u3XSTNX2wzjRQI0ewhH4BO0//0p76I+MM8G96aj2yPFTeQ+nxm9H8w4bJ1Rh1EvLv5GmeuqdCwSYbaT8uD0dLyD8lQtNnfEJRDkEYR6d/bQp/JufkcdZwdKjlw+UCjW7JM4XjlTH6+aq8oZOXcqPYzRQoFd6t3E9Njy9pPEzgFUXkMJkPXHtJ53JVlOmNFtl7KUQ5nrgmL96w2W+tMwZMDFoGLRUd4RBZaEPGxlUuKDvpeGGrzOj38KtyouxD79nl/L3X1k27tO7aMyS3dwqhfD5rc4P1b2ubsApZhiv/GJAdoWIXn10fj/NaiuBIA1XXaWRKGVXFma1VMjnU3fE6eLKM+Ks57OeVUMsfMKLIr10IIVQleZYphy/ZQA8B0yFG8HUNw52rHiEcEs02gWbmI29AaCIiQgeMjjpwR2qAaqibFlsROBMhXcVNKuY80MjB47WZnqw8mndEV9dogO/sVjGMU6glsvfzFSBged5ZMkv/LYo3l8xUjXjvhF7TSku+xEtSsGMF5MXpvQCWo2uO3hWl/OXpwCWRc6WWmoAP7tmUNvyg0pL6z8LEiNm52ImQkSqjPEErMBpOcEMxIqGxUJG73MU9QbQQy0eo54NqjicJBRNh4kpd7jkFYzAZkrY46XQCfJWa4nApxLvgVzxJIH38DtvryIbX+ydieDaakJXJXHDGyQt3R4IeeS6kjDn6TifH6CrvTdp473clu/Z/7ZXJrrD51LnE4KMKLRwbxR1/BXyLNCGuJqlwzq0+k+G05ijCT2/jcIVPx9u0bMN6/3Osr7eN4n9L0EKwtfbfhRZafP6ZirffX8Fj3lfbx/uv8G33HmA7rbHXGiz07Gz1uH3y669J7Zsl+Fjt0ubUnw/olxYeVlPkNBXZHyOpBLbdrPetORc3s63ngDIbKuRQSffXNyGDMWN206ld+fPSLHn7ECR+9Ywr8xVFrpRwfcFIdogq9g0mrjfXMw7xQ3MxqzfsLRVCq76JZNQykgmFgTStBDxtJBhpdSOTJD/LyCQDOqfIzN0swzGPZR6ys8P4RBmYTBmJGsvgwoGnOxD8BkfGL+1B7/D0o10iPtyBLCDeyeqGIgWnhQ1jXVtSrwQMSol8Mc3Y2bX0g8rofFXAyJ2ybqoKTRZlKAm4b+dmrn5NYl7NAtEzcfyhNFp6x1GkrSaCySVPd2aUbZFVSSx7WdTszWYTbL3d2HCVaQC5Lwz6kU/JUcn5/FzrugllT6SEFqkiu4HGFNWZamDVSIbEOzWQgCIRiXOoD/hUHR3kri+R9v/UnApAaGWqGX2WQxTaHj1mRa8FlF7urQWvPuLEmEyuI24CNzEMqUZRLg1XBxA+6y8dBc+bcPj3Dscfj1TSUNAzXkRbQIhnq3VMoyq+0z+j53spISmueX48dyYYW8PQsf1TJE8Mp6KaRjQC/C/niUZNiJGjvxsN46JSRUxJoyIX9mgpqhbqlBeQCY03Mn0Est1NiBaeR0kIHBtYeDN1YbgVPRpTfKylWgl5c6ahOOJ2tuP+ZjxTVNghgNY2v9BvCko2Fcv8bu+xDiU2i7etrrkZXIEhVPTAUPXv49LzORRTuagUYIDWmovn0b6SFadd5x8FPplpjgiNuweVEper3Aru3lDcIL5MuWMUGbnkPNxPE3M/eGzLokKOO7vcstYYfXfs7qhnPNHI19xXpcrLLrjDp31AOGGPtyIu7k05tgHthXFwNhQ6y2483Zrl9EQl98PcOEKv70FbwCSaX368Xo+j2VyWTNw3UevhcTnT3nCw8ZSjiIgO2NIwRB0mDeCdHAA9Hfc28LCI6ibQYuEmtgdkmX2tvv6wr3Kl9zHceRBvuU35bPX5gRQWhQfj2PmnQZUdnKioxqMrFbu4Cdh1NKNXb4G8CchSk4jizhNAneEX5oHnLERcU00Rkc2mSmUsnW/x3AVXbH44JU6wTYP8hCSY2w0vtz0v+JQeY6HtQw8jLsLyKyJm8lfC+yM/GrLRGpjTc28S8QrOna3lGTZw1MK7HW0fp9Ho54d2kysZ4U41jLRRwicLOp0sJK14p8dj81uDaDszdoVKilqiyTYitBeGSGm96hDvEFI/RkVQV0qtPTBn6UFMtow+THv4K+hDuxL6oK2tEAgRLtCANFW7FitP5FZTRDEdYkBU8GDGPRIyurzaKIUHUp8/oNhgY0VXhcJpxy+qKyMzpfoVwihsNAk6mqsB/Ix4flSw/hOzdetDMGqb0GZw8N/C7fNseL+OCh6pVv/Fy4lS/xCqfSqZs+pfxe7Pm0BIJgp5io2sxUZC8zn95O4mqpIW1fxF32NNRFj3JggdmyFvoKp49mchzwnbEwaKExV+4hovScQ85f21mFyRYJ3uis0pfe7vbr8kmUl8O2Xx89uCF3c5LD1ofZY9ekoxfbum7KsBgzpFJMMNGsrCo40ONaaJ/cbEcEf2JPbrh2JZJvDVlqiVfZVQ1se+u2K0jip407S4bmn2qUmqKQwDAeYtwdRY6S1pLznrgWJCzqzCXVbYl8oKAcKHyarp06cpQUOiQ5REIXWOk0GJsrN9KIe+LvVDlT4z9U7jiXjy2Enb4wSoM1p9SbGT4laksfgZ0td+fDqIdk2cMGirG5CUw3NUeJiMijEHw+NPsRXXxVos06BXl2PtyZ0csZQMW7uUNixTkAYOjsPfMblZIX3HOpVslSVPNMH1pNurmXZaH0TSaXScnHAispfGeWWZYBzJ/lntnLxi5gKdBd6DlrjKMH91iJALUsq3yhn0WNNHZZ3UKjRMinc0tKofDnBZAyo7JfODNx2+K4mnFST5taM1808j5kCmSmFc+G33SCyCpnf0TMYZlW2BxmjfITBhISPMyg+o1+tLccPzmDA3dLZKZNfKlNVkY8Ds0sXA+PJRr1zaUtQ+YvNgFaUH4OSEu505p2MfnOOyOqqXn+qp76GYTvzkuTFyphqXTcl5RpdmBzys23+1r3JhK0qJVkm0F0XhdFWlZra94qzoDCC/PK3ISJMp2e9gzTTYVELScULUDF8kIscgnWh9R1CE7nEA1ooEzZ8UREDPALmHo2mS2kDnXj9lrhyJCHhmpzZWp6AiqXqOd7daEdKF/nh8ocCfRW8eJrhD35zonIZT7YOPPmQj2/eMYvIsXACZUmbu3qSPPAPjGbkKKCK2RzO6AF5wMJjF9uO74fIut0sJwyndxbGCtMvT2US2/n/IPbclT/6fTbw5K8+KF9VfrKuVO4mdF2tCA5+qFSO7TvMAlSoVBot680ljUrCBSCGNM8/hh9Igbrr2X1qsy5Ry1RtAMsv6KZREODcu3QDPukEHtUNsa5x5uWP6nHfe27W0zeywNn1m2KAPNHmU+nnsVRB7tIbcyFbCBAtNw9LoaEGrojFpHePnLfbdRmtj0Jkps2HseS4UNGvzZwCwh7C2TfffYSsNQ0NWPOgZjDgyZt3sWpV42pO1KVCCQ9gUOQgIu+h478CcvqUBHgl51Wwd5U2rFm9HOmxwJV51mowcmoIvFHBcyLOWHiDVhJ0usaGnAqA/i3uRncaNyJqeHXoXUCJG9UwPY8hIzeVc1zr7xCLtSpES5mrGrP+dv96h0PEvmDEwIZSJmJNW8eCy+HaMDaDD1GnTGTW9/ie2rSphH17jolvfcnaZ+8wUwBQlQwKxpEJF1eJMtATINl29XBWRCJYywHtEnsQEpYTSszknixECpYpG7sHHfLEnV594EtWGUvPBYbfarH+QCnsUA8FbR/ZPuk54V6lGRMoMVHe6bGeQsWWQbdT65Mz7BX/UI2uei43xawjUbSRGcI0GrzLbQQ8CPKeV0vUpQNCg0hdVG22jvO3Q7kNwh41e+9ExJKfbuW9rJLTvCx1gldUMw00IhamTJ7UOicTYZtrr7WywsKTJ+sgrU6SdaO64wMhFBVIMbo4LpK6gf4lUDyakwlc9R6jw5lCzkrHrxWZkboTNodT2lyWZG18eQUKNZzffrDvQ7nGeXE/xuAv18rPaexF5RtZHKu/AcNVxKTK0zPqwGZMH17oHjdOQ6qY+C4Fq4gmxm37mcrColTxzWrizkhJp0GKPTUmRqOGiJr5AtUNUkEcQ9reCp4BB/TuFESOvtFfPlwu+v1RFJLI+rnMCBVE3fL7I10JHMXEe+0QBpn+w+aOXK+XWen3HRL4McYSjFA07xtIlhkxSIfgy28mvadwVzEWUGvl2x7AcjpO1rZ7/ADK0GkCZrAh8Z77QArpqhHeDtXcPVbwRlVNVDbLsGZyyJZrqHFiNV1I+3xkiJhjTnPWf/v6Oa4eM7SKxPZCpZ+Ouxc6Hy3xilPdSmqKq9fk4HpSdBlKrNKSBAb9eFbafGqHMUfyai5YlQi74Ufj97DvCv/f5+SLfBKPplzzchmDuVRaEUzS8bel3JcKA45VlcM8lIcaPXw8KhPA+NJnwKBAoChMRHhmHwpRd7nGmXHDrhzK77U/G9FXk84fzLlWdOQwFH60jTZWOP5rdniz/tH9920XKVjQQ65x+FGBCv5hwvJEVP7ojzVM/omNR1CaHHadmGAZz1VII0DTx3YdJYVEYfLneXoopBvZUIs/Yx6Tg3HaC3p4nZofJsnBKH3TddtQS1E3gv2AnFAX17PqSYIeLOG/BlohdkZrj8iY3rWbrMQDGQJMOhf48H/H6sk/ENA7S68Fp5dJim9y9PVhFknuAOqX2VOvlqer39J4WDI6LfRM0hrhZT+ytmerKYF4wCG3eJb0WqY68owilztDdY+kjRosL8j8Aoz3Ui4Z2I7WYuLKzfKh1L6DpzRHH3aOhnS1qAK3nkETBNqXluXx0bhO0Wb4ND+l4x47cRg054R9TzUW3B9A3CEW1u4bQLUcRJC9Z8hAhoTq5dLToST38aaqevoUnc7xeNuQ+8G0+/NjdMLT9heoFWSWyUDshAG1lc8N3PdK2jO/ByXnB2nagxzzw89VSaKFXVfYbhiMpg+E0nXbuxO53DrSTq7xbx2k3Lc4v69oYR6pEiGbvEWkl8uR7ihgG2Td5JEKhdgNtHmwVU5nICE6lstZ+Ye/6kEUL8xQ9SbxNEDh2H+e9GuwhwAzwtEdlCpFhbnPAPgbarR6LFBniLUE8r+qKSe1PLh03VhZdA4OpndXU7b5kpUpIGf04EOR0nS3g7u6czr041+6lQBvOh/ZN3YZ/NN2KIpuxKfA34COL6b3oYPBIrho1sogiEpaReLvmH5J6Pl8Xq2MhSwyvsg0Oqaq73w/rWGg5NQbpih1xWJHizC9K9rr0I7M3v5vSu7Ec+6stdKVgBSWC3J65OLRnzpfVJhBqHveKOjjEqg6V3N0rD9wKlw1q6sr+GbXTdsBxrH4AxgQRgv12P316z5p5jtwuon12S3lSJpKgDE38BEP55v0zkXRsj+IPCMNBhPD9lUuUUCQD9qJftJUq49JMedwIs82xTtgt0A760FtKN0L7k9SHbgTtOS3OedE7qBSQmBjR7k4EgKQ8I4wE+qAE6a6UbbQDDeBsttsZFjzFpFq6jQM15YO25adUnaR1RGksD8byTZQ2sGstb6KQcsLPNG89SxSLi9HXpVp8NBtSqUlwJ2zHkBiqcG9RuT/48/C2zcIEXaKf7iCqlGc6tOBMKlw2YCPE2IuGRcUP1s24ruRdB6whHuexi/ZIhLLi1DeBD8Wf91k6p/+LmptN0ujQl/zbppiy963pcsDaZHlwzGwfdZNAGNGeLIpmFcJBj9VyG8c6IKmIhMXm8Z2nhd/8hCQJXjqrvKuL4DISR+ay94/Bh4ft3ou9rHxnCJliHFmG+cu+j96f8nZV1I6h18Fn2iXemezvcLnXaV9AZvNisoHO4RHTJMUItskYSkA2AqolIBkk20uMcU/FiIXIJrKYpJIvDPmRz47Ak+VP/PCkcIEiJcrIpL2iMGgYKoXhJtTOynjT3HHip6pIZxfxiHLBpgYsJ1n2G3oMC2qNq39wU0N8GfnOMsOj+KB1YhW9vm0QK3lKsAIcb0D89CSaTDugntp2ltrH1SbJqqDAaGw6EmyLsKLkw3u0INX8ykHGCww0o1SSyVuXP5jJKA4GiYnvVjNk4fHxYbbFpXJUSt1Kat1F1Ldtqq4FjQDx26Y2Qe42KVlq3ErAEbmzGC5UUwMYyrxp/MdfccUfFqvaD7l17KJvS5VvEmHyySK88d847xOReoY+wDLh6QPsyt74DhEvuB2Lz8Ft2PbehACZglMo+mMz/e2nyNHEwGQ5QWYP+vKpXF10XD0Q9RecCcL9dTJdZyxC94yDUgkDbduqwv4ieFfZqXtvhHwcW3xyju/XhWhvEuY+9yFSWv+x1ov5HhSi3PS2wIYA3SnfLdTEloD1ukxWFoUgQ9mjEQfd8OgNQDBpuUjJywDBOGIPaOGUyzbzG5rXS3VM6T+F65w0WguerjljNSfwBhsANMrySokQWhSHS9vikmE0p4hDCm35FaSizT3lVOU59QSlBWU9NFmf7AgE/WYsfkBk6hsFJcZ0rJFvYMbP83ovXkANiVZKbdKaZCcgO7eWLobFPCoX0qtMOUmO9uBsWQcg8+I59YXGLvnz5gJ5q8QRvE1G44vEdeV+CbXOAdiSWeSHH21RTPLwKLXIp7viDw6OZFqyFYOyTSSQP/hTQ/iPmrDpUny4UKzmf2bCZQ5HRvOq9bjcGH+S0detLeFq4eEcLx3NUjY5pVj/60xatkTLwfqfqONmoWZuB1PiMwM//53/9i9vmZffhqE9qRBHSpoG/rEdNNVogxxYgkE9sSk9E7Eaf5gFNW9jPKcIi7qO6OjGJbmWZldqKKkbhbmMXdieXOY9zpNuzo5vVc0JHFtOfJaYrGh9LIXPl18HKb2B0PnAoOhwPipL/a5+dQv6ERiQcLbDzJIU0wRWTdnIuiV9QI7rw6CFx7opyRRTdeLka0XW6IUBTSY4J8mUIU7Czg3XowYqOa75PrMb85aPJnDbSMgVqKe0LcrSpeQs5Uxfkrm+82cFVPIGX9LkWQsb9R2uSvR10+ay19+LsVz3MG4fqo0X/nweoDlSozaDFqk3EJ7mkuUAfyMLs93WV8M7fjjJkK+HC82gQkeR8lptvZdriqv17rne8CmWuRzA8Mxofx14Q1YlZxnQZRFKznCz9Md1H4gPAxnYqe277m4z3TAbkTI9XKmZFNXrlt4JadEX8IhHFGRmQy7j/GTe0BDKG+S23R5+21KMtxSyubqiUhC1SZ25pw7l5lKPsX6yeWci2mQcmfIEf4ToZmiDlCfwPPIXxrRO4o0U7YLEuRzwYHrl1OybRY1NmxdRWChvIucM+p5q718ukFzYBcvn5VomXi1h6VTaJL4s8ol4KkuLpoKf+2pP/ul6/Kid+MahMIQ/GVOG/Du3MqHQ98x92lPGPTnByRUeRTnZ5Qe7WxgtjFVx+LcxQFi8sW0eZ06VxMaQIEv30taEsaQtkrqN+wj2Xv4w+8e/zBQT/z5d4zhW3zntAuv4tS43syR/buL07C31+GlfWFdofPGIvz8tVVuTErzRGL3Cohj8Em4wVVFBsOK32LK2t3lk7S8km/soa30ci9qb5e7BF2+AY61KnKIFAWsfL0kdK2PvNYx4EDCFxfP1RMdjZx1EjV0Q14DmbcHSoaeorNSMNCBzgQn0wIaJ3wt3PqjJcW5ScFr0tdXAyUzX7tf8UxS5InjSX1ejzf4CASIpiTNQ2AeecWEcY012GnTrrEdCiad2LkZUVbjDqO3zbh0vBYaf82NOdF/GplM/RJrQdbNcZ7GCCC+J1VB++JGRcU6lfiiL6IzH9o2ST5bx7i4aiW6KWqybSH3w1/OjGKYvLYgTH6F70O/6DpnVrDt5MW25LzQ4GcHt/6eBfAOQFxM8Px+4FyKjzPKlob2LP2QPKJCSipojue03fT7PQDHqE9MQOHnMjfplRFX6tucrBLXKQ2IJkTXImXiroZoSLDi3/Dxx6TBb7+IpwRrMpyAlcVGz8eEed15GJjRimj1iDa7Kl78SeW761jPzzw0WjaNNlKhrwwRenQXbBLuR2FblPPVjER1FjY9TXCsHbVPrvAaGH/Xx3AvzHZsCXsdZyALxlHzV35+IfPL/H/XXozW3N3hOfdZvh2y9O05piTlW98SqGxxTazt0xAQR8JtHRPjOGsEnvHkSqeZZoLUBNHjwB2W43fX6+G9RJI90o++9Wcvwhz7hkpd1ZODHMo+0Juf1ycjyGVDT4tqrJlqB18/fC9UWZuMU1v08ekABI5RVGcdvYUYBPcJie1UjlJ6oVT3O6GIIydsVc1DbCW3r+YYdJkFuKABJI/M69/0DoCgiEePhk5tTZ4OJGHly9JSGP8K90wecZvLQltKqYn9+K/aCd3HGyc/i7lCFV3pukXvX0yWbJ/mrhR6qi1Vut9am9r37TbdjLOw3vQWo3dulS89DNp/4+iSC4H015sve93zXERddUgaOAcLJR/5MV0tt6Zdc3tEpc9FDT3ZwUhi2Om2fwlaxVlgyC+Bx+lkQhdmm0daafz+dFVTizcDQ3hRCUQiSL8jeCv1HIEF8Sl3ZIuyc+GkMh8YF8bAzFt6yJuvpc6Dj758ycR5D8FWCIsHcKZJqm+vBVWfzOV3LvQoh3vXCDPiJrvXD1xPUGNQu9rBGyEF/MO/ssFtUagnCUGsm5FiDRZxfQUoC2KexT3IKqbDEtoIywnjGg8cSsWnTlHdNBbNFiTAKiPoYbaVzvyduuXQ0f9y5Qgpbz+kHktEJ4dEX4Op96XtIidAoA+dfNyu4aXA95S37mJbGISKZgeoGYWspuiBM6fOSyZz3gHgBsq5ArITzNcVcUunw5fqvg+BQjNzQoHOiiV4EvmQ9AIzHJx63zVNBct9LDOpv9+AtV/nVWGa2d+74NqHZOzgOLt8M/c6FYPeKmLE3QrZfsGMpJeidlHXWpQ8eHx0Z+8cNvWCU58tmjB0hY5SXej30e6cID7vhlLl6/N8lFiOdHBWuJxWRBJsalnGYZ5beOlZRy6oapVoQY7kZ2cMvr2j549TliM/pMUnTrVC5ZrRUNwbX9bSRIsxj4a9rLIs5lhtPJuj5zIECOOFdrCHUTrvMpE74erDQLTNmkbtnSiC3f1IBTBaUCslMX81KIFAy+BgiNfymZgPgTfUwaUJTll1WS90Ajkkr4O4I93CcQ8zyMtgjAZVRTF93l0SWQKcYouXT+yEealmpz4ER4eusFn/qg4USkd+xFCX2Tir7VeXD/Uaxx4pS7S+jGfYVZGs9RENOkElNsNj1asmNslKBQj++xEFu4zJAGAe0djRTdcZtAzOhIfZHNXTXpUN5s5UmJMAUw7GralnZH5Zh0/REO+beMP+FLV72EpriYumPNNBgi4M6hVpHz8QFl1ZbLT4FW+cqe2jCRFlOh6t7SoxCTS/mPKeqjy7jEcsOlJpJJw/HKDk0Uv0gY+N9gVBPiDchyBbNkQGTiatPAhAiiRbSNS5e25lCg6SKNiairKJ0LeQb/f8kzs5QZ3UdDUPUPdabzunn/+B7fA8gDeWb0gnTmC2sPuvqnmjDQj52OGQl7qkuRoqzFRab8oqxl4xK9QvWtt2pfeaZpZ7puaAQuud9VhHD+rSVPbBfwa5Et9PZmahke2NIrGTikr2+3bxgOfTd5lzT+rQbDFuqNPZ3g43OH5jfSiY11kI71WWlpxLK55TbdFL7v6Zz7DX0wtKxe9yceGCY2Kuu7rs+H7TTA5rLz6e4k99Cp0ac4FgplwE8+YIPqq+552+xBmpK34k29SByGm9CSaoETWYp9lxuCPSHCT2WV5LTbl7ZXu6vZ5tgdlUfdPf0hXlMeUAiSEg0XdLiDCBGqDvpv0Sb/ZjdS/ZwhyMDNYMNG+hafgnd8BgNvEQdqnN/TLRb9MVhSlb+K3kDtNMb/q4baVjy4T/y41RbNeWAoChyBEFMNtdVsVxDUkbKtFuPoOTxgAiGnHm3IgtL27bh8EVBe56iKsKVbhbGqo5Jm9BPslQ1TPVIBXcolcurrNY+9qICRUjkfbOpJqXkzlQrL34T1/wVlTRZPncAjtQHzGMc7iA0JQDBRijqUdEn/W1+Qe/OgJOULwzvgMY/KkagcvhoXfuGlPMbjhnw005FOPka7Q9ida7H44YO91Lie4LnF1e245E6Uy8/fNZjCba+vtFmqbNINcFEH2p6uv1XtmC35utNzAVn2JOIYEn1fZfeEpFTYZKWNuYFgwv4bd34EY5zlTgr0rwqTn4lkudIo0rppjkxMpy1U21EQX0ghSwhrcYeTGzdro2S6XECRzNivIToA50vn/yPMWdgohcsBT4JvuIRE2Up1Fg66ajdEs54eNGALwDF1aZ7rTci3GIT7n2DlsMG17IYOwyGPpbajM/2JMwvasx55uxZflzr5eMsLkYJWBgp8Hv6tH0VXyA/gsxITWeX28Mu5QvJbvHL2Z7+GUBXyif2ToGXAz2qF13Jt9WlYL71TbmXFCF42Ybm1f2AzFvYHN+TEhZ2HhQMv1snXICjUxIIHV3KnB3s7kkB8RzirZYNC6H0aiMqGBnes8p2IbHYSZ7LuYlKcKlOE5it6ixsUlQ8wTFhCU8bf39PKk0uhbtj+h3GUwtW8ZGGlEiltTGsvFs1p0CWRH1MBFnFJAek+DTj7rXnCK8SXLXWLNrjGYmTvN/6GKgVqjLiT9TuSMauIHgRtxMs+TatELHtpk8F0VBrcJD3SYZyYvw/dqxMBfXUoghzvtUSrrudQIrh4//7q1Le+KTDXSH/kSWzatDk+KkWY9Me9dkRwYl5Sidc99nQvEl89XMUzJJPj0UOAgtFi2cS0f2ZDl+Xx+kO7gH9lmGj3cEgd/gisI5oCFP2zRTvoiIzybflptnyPb7UG4J1GNh2eYuOrGq0TzDXFz4d1+kEJXMhdDGXTn6saIXgUSjBYxXozdhoeholAkGBmNfjJn9VLFuW3TW/fMg/eMyRmhuZNFWLWz9p/uTSP5PYK0YvNEaVcGC5mcr178AMDnv3hNx56wqbdd9whLm9wzumoju78cI/Yp8QLwvPRse0HnzVx38bf2U97mx4I9amYWLuRwWrPbC/FmWbB1MylqPqXDovipowpy/w4JIQzE/+O7/GA+SQF/WCzWOtThbmxjdZKCxU6/aMjvfzEwRe9NRsNmxU0WspD9YodTUeO2Io/4ff2RVcDNBZvOhsM0w9JC7FPW5/8NkKC67fZtyeTT+zFEfJ4R1+fmUKbpnwpK10RjCOAum4T4iYFyULUl+urZKABvrniA88F9CwcMWQz3TWSfwlTpLVMazbJDAno0k1dMGDl4Tq7ypBxzjZ8muhmROsvlYahuZ7/8HifzDD9oFdrnamszkth4jL8a2aJLL3GGM9PYPcXvE5xXDjvrGPxxipb3hOcLmFutsTK6p5Mrwsy9IzGfzMoRgLoMKt/V00KXIXZ+uvEY36+RCXbXLpVcTz6GZUkSHeWDkWxYjyEct86UqW0LCsESNCFgyPka9yoDZJTLKrn2nLijzvnRxQO5TwTKHRZ4ItFS33G9swxGbpVnT9FxTa3EE+PlcDhZ9E8r21FclAuASvx8jmlm4m49KKSudi8g5ROq/JAI9ZhMn51uGfctSnYW1oD0zkdzfpxcvcXhZKQZ2BjWwRO//O+VX7zjtOU1StrOIZl6l/MpUaL9kXJzp4mKzapt0EeD0CWFLRX524Koi03IDQKl4eyIwC4k6fLYxyTvPj89CwyJY/6CpTJN69YxobUw0tGheyIeaSw8XTO+klFtOV0Xo6zITjugWZcvcGbpjt0Vm54Vsk7GdqxM/X99fj44yYiFgOBjEw41QKxYYaVKMwJwukNC9i7gG1BztUqIJdUuNgupUaqbfh3dBsBjSlVjvDu9Ba3VaQWrAoEJX+u6lo/91z7mtaxTc1iAO8xMZwRdFHstZS8N3OU12qis4mSB6h9FbUVKnz25de3n+85j44+Rv9q5O4eEsd7tdrh1Q8XHT0RO9bSwe1bYzGd5FlsKp/M8BM/OUkzZZC8NAQmyQ2i1LzK0+ecD8SQKIRRd672RWFmY3mC5lWK66WMH+kafL3w6T4pXJWqCBi13QqIcoXzd3ZHCo4Rb4eIizqEo1gtK0vUfCObhFsCuIL7FwVLxNqJuZiWfg5CKxh6bQW3cyZ1YyfxkYSQUF2YXPMio0PYZk9h6/N+eNtyCgfy0xAeFH3qmpwPGMJ5bGjU46J8vO849ysa9ogPNDIEg2yZaWUUkpFSimlFIKQlJRSSrkS5q6dUbM8z3PD8qYnkoZlmOhlRhIENONYJ0AdYGVuai8oUiyefNHES6SYM7y69Epm9uq4NYwgvHhQpr9s6laBOGDmIKvibQdobfPQLc7Bb/8777ogKL5zdg1NBc9ylXeNPtSKB26GhoBQz8NyzOsj6yB8a6xs+vdofItpgKn+MXB04zwSxDHXnxDFPgzYQ0HWsicmUSDU7GJzkcRy0vR2FfgNIz+lnIpZZsCglTZdSFc7DVwd29nFlwy8ANi4kNGOpEx3BmjZMy4fk//vpcjbljLUuAPYmHkaTRhcHsMyM0eTWzrFDkDnG4cmQvrfYWXfxtuNLscxiARkIJIctbO6KtVYtQCbLXIk/CoO7MzwYoO9r0kRGckPov+G8YCfIVz1EGAN0KSaJNoYHzDK0x5ugVQugDJ/LvG82r2VLH/Ska0/F+tuhTq+GI8UPK3Q+UIEkX7/rDBpKvXl1PB8AbrQBYtHxxEF1tdwBkR+Q2+hI+qjhHTrd4ZxrMfn9lF/Uxmkzz1yT4uza+H7HYTtHpQNIxYMGcBsXr8vLjY6NI92sDS2+8N2jPyRnq0fbGmMeNAE7+8BhxYJq1zzROYxkCb1eOYQGzDWI5gR+6Za4I2HwA4bUXtKGQQ7cwrehS+8l7B8x0zrom4JcYAOaGkyOVuu9sWBJRgQVpFZB0P2XxkcgALrcBsOZQxOpNQq8mfJAWnHKsGmIq+H76WVk6i9doRqwt/HSLwvlXIgpvNbVMkrCgJKdBzZd+D3KqZqH5+NBIL81MLyXJwGC81px7EmL+No2m5ji+BsQkRdKtN8czxkifBGmAVByDWOzN5hShyndUaXdD7wHgwlN7pWw0Bm1wcFg21O32oafYKSbcmPMCooaXRIujKbyUGzIiZFPqCvIGf4C6yNaxqXB/RqSRpjU+gKzAcG5Zr1uPBZ5IksmfWdhmXbpjGe8scruI70w+FMLNy7/tjYB1kEFgMjjZi2MOoRlpRe7e+k7DVb5CT2e30HomX/M17/JHvyf1ZojxpOgqjt9/+Ah3cY7FDWOx8TknK8x2Eumz64GdksMooTdJWCQy/bypWfeodNMbCNVJ9/gh6Uj2GLzKoWHjFw2xVEQgRQ7m2NKOCCkT3ND7eQ80cEkEa2iYuiBEpxGex2bIybJKjLu3Yw8hT1hvc54f/09QT798IweEddJv59jhm2FWlvplkpJ52gnNVGc0P1Mj/mDVJaNLpxDKWfU/DJ6GMVRM/yGqPatUKXG6cWBIvVAzU9EPuSOOSwYxWQxfTq1nonrl4vyoPQM8N2G1Kq1qvAT1MoybGdDNPtpTFV+CzbfxJIPw7tUgHbxwltQunSEax03iLBSjqsvTOmck4mPaDMvOkrlvVMeSdOcRUzytAZvq1+mWSjBMcxBDeMJYYdFd2RZwQuoEBWaesMVFFndkAgjmwcWjJICj/4A2Lu7QlHQf7KoCEAoaNIiHikkJTZyoITvGV9wsmjCl9sCMMbhvgmcW2dqxaM4qX7pJqU6dBleaPqGKRiW8w9+Ytal1tzOk0ZM2LVe82tjjcxNG7cBObkqele/V+ckRPlcjd1qMp8HcltrDl7iVnVulKhbF6834bB+vGw/n0OB2Y1So7xNkAf3E7mkWQoIHMPVhPJMw65z2dpCVcX4mq5xZ/01wfJmXLlaHGY86RSuTlHTpmK9feGQhGRr/ux+qySdXWH316zPqGaJaD+p8aQc6akkU1KAkdLfOyEU6+zvC+TsrxQaudS2OEyGQcMKQmnlGbymAUuXS8bG4EiWupCg2DjAn30HR8iQ4p+nf03oQ5FINCR7A9yX2rf9r3UIkPf7dMnVVBz8Xx8cuQijH/feOh6bDPIdLHmq5mXvwX74Y3+7ecfG6jxyQYTNR0Tp21ZYnU6cx3ElF+9wPufEFRq4de+vOant1Kio0VMr4tppEunUwgd+n6Z6yN9DzugwtSv8L4n0pPTfAvyNIDGXj8X362a1E1sHS9F/Zg/X5y0dmTJZ/yEPFZfE7/ErdIMUOairpe0pfssVw0DQ/ktl1D1h0/xGXqLgqPFDQiL1jctMb6OPfyWt3t+9OojIDTAx1sLVMGFR+YObJ1tN5usEENbs+zLCWlTOlBqhg9K80OGXQdX6up6S5dfci/9CnT5iFl3/6IKhrQm3XKtsdD0mDZljqCxrsHUws3IBgpoZnvptKmhcMG11qWg9xo8pvcEsfoYuDNsmD9XNiwjT/JFyA+RGsQFFXrQkRx22uPkab+BzZ+9TkzPkJ6/QOtda5wr3XBSeefdyZlod9WmDO4ADvWP4UkO+lR4VBj4rmrnuinIV8NRCBFf+9f1kM8bpexUtfnmJpaF44xjWmayGRTq0laZhEKBMDYC5a3AfnYC01yP9f+EiBSlbQm+NGRQEJKS/euMH+yiFqJ4YUzcKgJHhOZv9bR4mIi126dx7l09XDgm/dYIuQw8UuXE2/nAtMPiiazD2OgblTlTamkplnkXXTI9TlFTlENT9Jf3fTc39+Zvu7kJYx8IuN7rj/dtbj5r/xK/jk8hjXkoi/wKsQGAeSZ9YoYD6JRFog63GuNVm3mohTcYX7PQMI3W6owrwxdZN8cQO+JQC1nPmMndnHBQmUvF26XsYJ2TLc8+dWChkyqOEHNgJCcFmHQBm6h8d7zC/dOkXQEFFOHUBaKTQv0Yi5s5EqdOfJAYvbR8JsM8UMcwTxM1VEojFe57vWI9Dr7UYZMnCU2CELzFkRYyjTIKk4BUiebxooP+Wi6vcBpVUu8tw50gBzyZiDlDikXCo01NnfJirrdAbJWfV1UXC/WglgVa7+QBz6Hr3qp4qaymBGaOAdtSUN65nA8+d0939y0YyCOPDPD0U3+hLUKYEogjWoHsaYQU96N2wxRBR7GMitKlAXL8EJHPJgO8tGE/MPabwR3H5B5R+dX4t1IwL7vvb689kuIcLyctD9FWW5HpE4fVzfc+0K+VWJP45UUV91QCwN9rr+mSDCnfY3A2U0pxN+u6OMw6PATzULT8YaQEe13K/DgTn+aurDEs5+bodpb14Xo8QJE2LdJ6NEARpnIRuENRKslssaZS9vE9Bz2yGkkhn7FWdwRzEbKb4InEXRYWngfsTL2dzokVyNE6U8ZYltMkbdzD+DeJUaMAxFI/0AKQEkFQwIYVRHh6LSJeMFYVkZVu1TVyBeJe5CKrAsb18WIe/xqO6/dN6NTiOlJxjX7xlna1a17ebFM2HMN+uBQKrREcegwm/q3rjyQp8GiasCU1Do42Q096s1jbVHtJAIn5yD+aCvCzXJSDJqY8Q+Vrr9T0Z7SqjaPRBpw7EY+nhwkqSHIQQ7bp2VTCQyP05daD0o845ysESLAtf0zkJOB6Nm26PFypQ1MJKT74efKG1HQonJymG5SMTw+Y5EU+WoFR3We3S81dgH8GrzesPSl62Kdivo8035y/68RRfMCXToFSciJVcvjCi+zayRa3QlHFPSZ5+p5L9TqHcabZ0W2OalWFrXTU5R6oDTWWO48640XOzQ58m5XR8kY2ZdBg7EFLh6aR2Bn1u6Bk1jltZqnDjHG1ak26xURHMaRBh136eNXUBiM0aBbCgFH+uXRiKn6cCQCRHZ6mD60Wvo3vEvaCKZyJYVSZguAg3BaGsCMmLJyQqWGYq+jUGBYE3qqinw34bBD88gqaTGNZJUsoZow0iAhXfIGn1/TunGk+42DxWvp9ybaX2ZRMRZZPr9hRig/5GbvE8i4sn8HFwbSf/yHnrU3GUQcp+xoxsUZKg6G5vZz5WWvG8ikUK1pPXULMuH9T0XWsAOzidXiJgR0o6VzfGrobOH7qKljKiYNgC0/OCPz+gFC6weX5NBfmTdhvQlNRGi2NAUXWqNUmh60JUMIVXo1AqhQu1jvCadRZDnBxFMmY3buGiW3jmlU2inn2XFyLygnakVb3/VjDYDrcrOBH94ylMvwUQklIWJy5MfJACzEpw2Yb1+L+8ZEOz4G+jxL4warcy03u1YYlKLE56fTS62Ad+NUgnVdl1PpxTpdgNN3ick46jTKZrD6HApCKQKHkwx6//6DJ/tVJp/z+Jk11xHVBsbd2Las9BwP2QrZ+ym054bvchBWXD6CB7XpsDqHlm9IrQSytFIeekpM/ii7P+fxBTwfuHk9c7U0Kf+LNHoNCvE3nbU6LuZCxhLko1eAmkdftyuJCbT9b9G3LN86YXxpIzQPZMRucJK1AlSulCLkuaeNoamJZJ/8AFDiBcXECs88dHTPAKI+iiMklec3HQm8SgNI6/13J8OV3PePkIL0WllxqUOVGm/p7w+bTTDyBOk1Z8Vr4LrONZZpc/bH8NI++zHbNZ11fgYb9biTcv8yu/PkLQ1wDtriZbbNzj8OZ+TD4Pq5rGc0MpWf9ylA+qa6h9bXtqBaMGnfVnPcvZZWPADy4idwJ3aT2Hh4dt1z1+IOlYb8mYVsfpvLvG4GyY2/ACvNR7Nn6THJfrso6qVLu0bJNYC8nqzd/5KONaLq1b96Qp5P9pFN5jKR/Aj7gSznxOh0NUC0Lr9BzkYgHv87Llvw/p6UTOBxU+5WsMn06PGz6snmX1aWL0LEuLGpH7ur3yvVW+1/LZYyAC0n3IbrK37II9NjLoLK5gvlyewmr9hI13c9FR2jSVNeCrFXQwiHLYKBJ6TEgzUYT1VrHLyL1oQV2Ntgpnzo5FvZFu6IDvVMu23ysMB9F18BOXETxGXjLknvCkz7twKjGBXFcqP1GWTHA7VA3COh4x96fymIlXdTsH6AyiXdBcU7w3TrkpkJKbGniweny1dcjTXk2jXkdtf9bzxhyP++855AZB6qsDcWbvIVpDKSb6oQOFlyWTX2eYL4OvfKejC1wWd/u2wqfQqihrS5HlHQGGUsulHbgFzaRuZPWyboQpH+rQ1+l7y8kU7d7RXk4aNZ1EZdFkdyIDGixTh9UyO5P6jKHIlMJXR5MvCd5Fjqfyq+xEVCyriad9jWyuGnelLBzH8RXcSGP8/7m4bfvP/aw++YD0uAgjMs0OzcL+/WjZK5f1iO3dHvqhp8A1XFcqmZt0YAU38c520UlguiDSPkRbfaHVG6we/sDfdEMvLEjwMNd69Et8vVujrr8ugeWd0jOBDZhEyFTlZjO4NqV3LJdtVOLSwXXQAw/bD3AswCPHTMaB8BX4utGNXtyM7hL20AEIh2JYHe5/ZXDPBn5Efy4QeTo+1Xt3hXKYzD1NDYh8ZAojHqfKZxDme3Eg3YGroVHgdH/yVOFgYFnQG4FKueZS1XLzAKhele8stKBnMWC5OK1438ZifspS51vF4OVVJR6ExH8zj3Ra0Grp5Dtt14W4dnQqwVi/XeTH5jhQ1pUAlIKTOJj5KUEgxjDbufhDyTAsCc4Vzk/adgIuoJyVSIHLWT59mFqDjgpngwPdGe4CX6XdgeF4I8gb0JaJ2S/vQ223VK//fl8+ubt/UksobUfuDxzjHHYhxHULhtT5hH2dnht6kkvSR06jtjdN6O8e2C+gOqi6/KjdMY7rnQTWhjLsh7GJlgE5AhuLAZcjVXBB/WkWnR5mowL+uvUjlAPLLej9r10w8kSSNdVpDrzvVZSMrgKbElMF9FwEYudM26lpxW0x1Cmif0ANTKZHCe9iwwaB549AbRnUwaOtNAwIv3rYhC7P6BZhI0dUipvXtAvyAp+DK/gQPIwcc6CM7t5Q2D1ADyYQ0P1VYHXfQXeK+aEDaES0wZs6hY6+Hi45BW6F4eInaDJpdh/pNPl3xpLFGrPvPGFYLjAhxOMtFN6Lazg8w+bW4cM1tnjyS+TjP6myhjVRnYUHpTyjxkmnjFWDVB69hQuyFRCQNKKWAwAS0Qx9/v7nejNSVFr/jWoGESsI2cgcj/SgczmNF2auR0XC8i1bxy3xyhniKK7nPmFJqMgywdgPT+KO0AVy0M0OH3diQR2ye4doRmuR0zz3xeAs6pYU4rSad9Mhf1m0QtVCiQtAf7Br9l+feO4KzlAU4qxV3oTYkWXZ+6NTvCizoknsaDaPr8+mb7qOH8+NEr+BRWTN/ECOyhO5fh62JRLlGkrPGUMURrm/1+pYB6AQdG+ZJ3foCH3ptXIkUkYnzlWeXDzs24QRvKTeJsFNi6LXQXuBtlxjqiBdjI7mYppU152YYTsyo7FXOseigCvhy3XYLa+Hkd5+MWNCRl9YfeHMMutgSeGStgdEkEpsSVdvtDTIYuXceuhugr6WaEb0cphXdLw9dfkg3Jx1P/ToXhOirTlXwdpIUumMhtrdvYXi/3dbVp3Xz4+XvynGt1ivoDxTmQ2s7Nygoylbliw9DeokgLkWO3kXgM/XHsTFtjJRc5Jc2mk+w6og0wZWg0hqwpVgWMUEHISwYkZ7uRZ+t3zxZBNB7eRAmbgugl2pndCvfvuT0rfqyg/7qFoeaX/+Gl2CFGfHPXDEluaRwZ2hH3ki4qN24i4wkKaAXOl1JDnnJqPeTqBnI95OoE8GiNVoAQi09ZARE9qMPrmSA7N1McoLoXhpc3V4xOD1rXXgXQXeYkrtLNOHPXkT6Q+uCaYVnXB9nX0s7TDUlIf8y6u2Z81p0jBh1UrDRxUSFFK5b+ZxYf9hi9u0cRlG17l7Az3Nr/ZX/bckERglKNIEvrFgdcEjfHS1NHQCdp1sjIo2tD8qyFapwdElTP86PkctBJSBUghlSiCtVXYnGRxWFATeltf+RKpVCtorHUzeFZ6t6VF521x75YimMT919IAmKBpxYuBBOBXvgsB7NW7lh9GpoqxyJ54sLOqOz7V5yE8LiRasKEOvoZ38lx01SetQD4xJ9NxsqnNcPvuCusqwDBJZFIkvGfh/nYRJfCLrcVv6Z0qcmWCrQhUptMJMlkb1wcDjqslduAnN162JXa3F6+T4S03fFFklWTWDoWW0mxGNG+yf4i/8F3QcKUs2brYyaQITA/TAvQSMweIOaLrEvCz9cAuv4NgG+vVSAOM/0EfqrGeVuO9sXTgLJq1cPjhjOIU5KIfydg2PIPVxj04E77fg5bmUMyqh5vUZhWdqbML1AG0dZPFhhZH9exCreUavQuYbYFkCgxSaMBBdE3/kszGPK3zH5Pyp6280wAb3kHguqRuP05ripDeUDJuqjOG8H9aTl+3GFlORAasgWEwG1USjEe3Y2lHOvEYcJ7ytvhcf35l/vyTUKBNskETDVD5agbzJ7vGkEQClbrJd9NfoF6ZS8Sw5vMmsGlRPWGfTHNtvmMg3ugs2kSzrhL/WpgWHVxHPm/P83rTn79NIwpOcEgV/5ejpe99kiwDiRsEqSXI5JoIwAyao8nzNJE/rZQDXnUDmlBE9jXz8Wj9t4us3XAIzfutBQQIM4KTitGG1RjhRlT7pRAQSsEZDqpVrfMVVfyaV+FVzedNvhkJOWKz0Xd2hs84f5dmnTrV1TsdiU4DzL25KSf596l0OoHA3ARRqKhHkisn6Fx5I1yMU0CmyCjlkyuMdmMjk0e6Px3nLyVfEHnZMFGmRiqheUjXCieFbZ8e5ULKRprDjIRArUwtSmw8xc35LHkeAg03PUuIlsmkZzI0qwrYQj/hizoWeI3OcuM84BuRaTGKZxvzQM7sHepdFcBVOmRV1Mhm4MgZXv31ELH6q6EvuMkgGOf/OrBXrP4sJYd4gfW6ki0Yfy4weFYyC0w5AWcYIHJMh7KI8/tRuvxWII/zzzHWpwz4z0zMbkcJtCSvRumk9PSOIEweIIE2kavWQKxP9MZML9YZVNWmV/l0L4zJxZ4J6rsxKh3/R409DO62VWZjvf5p+NdjdbHVT6VRE+rjnQF5/HTYGizJeC+QW9XlvFszciomvO8Y7ljEGivVTO572ueKRoRc0VKYeBIxIStFzp3YByP/GjWAetRaeUXRTXDnczfQaDJe5oldu83TkuGcB2BU1ULr8L4gS1K84ESwfhTdEGzwPDTq4/ESUHRjHURNsLhs8GP82BbFe8ZQS747vU1gsUBL4MN6DdM3Tw1RO6EQ7CCRlgFC5vJ7y8bFu1nMkojTVLs67R8AURc8BMl0fm3JCY5oIXEHcL/usuMQQ/OLmAm4G8hA3sQnOJt98RqGk6OH1FwJkl8tSBGGhWgiJ607LiyVSlxIISuP36akUxlKYq1j+iq5H3R0KaAlRe+vxUwKKzERB31oPepBlk8lgU6qMWqAz1z7tv7yXaQKg2+156MZhjigx/8yDywrwLqVnzIYkmowUiJlMTJUJOiYHPUoQCkpaSXFS9WoRNIMxrRPMgrBcG2Uv6uxdeRExvzt/HZoyDk/Bt3VmaK7bOIFmNc0uJzIKO/spBZxMaNElNfMEXMoJt7JYZWJJpv1vHWe0XsCM8inFr6w307BA9fSMioOVWfnD5Ci3v1373X4v2zQl+qEBydw/b/qHOvQ//hA/lq2T1fv5Bvwn7VXq1P+S0n5Jf+Iv3Ls/SMwx+D/MjcmMO00zRun/S8l4etCgdpnVq9cBL+hI6sy/FM+HjJkk9qYnj1YHhwqyJyxW38NLv8lT9gA0AT/7XmUwST7tbSe7yKpHPTbsYpyRiEddxQXY/SSTmityg4waV6VK3/Tv/UH5z/Ofm8yrIbyH61gtK6SO6l1QcJDE1QiBhKNrWcHtFqs0nsqPYFYPd/k/dyGzc72+s0eWe1XSTMrtp9wLVhhvyb0EMA5ozpSDu8X3hJh2jSPSNX+DCUPZ/jrZK63oHrqr3jRGm6p6fbrron23ChgF/l/d4qAoilEdSCVHx3qhqmzXMlfcpX2Y/WBzheYssAdzz6tJoESlVFofaj88EQJVrlPzRR+ktMw8XJC5yj76T2xKa6v0+JKGxm0ro9jqiy/02DFls83tUUrjcZAfyGWbMEUpK88cLw9VJL8O1b+i937FUXoenJ3/F6Tbdjv7i5/Hcv9xVTZunYOrotWFcVVLDyE/X+yFGiYL5YjAz3/Ciqq8fratk9u+3yIXB//JCMAeht6wyNFKZeU+8Tm2C3ezT58p/8cnLr7Fr8NVLbfpMjRa/m7uX0//y9FqGQm4NON9O6OW2MLerae8LAwR79VCbbRbsVeAiY5Ff/ll2+aum+ab4n4W4K6XRQvc2rP/Z7Y2Zpssi8veIQWqMRPKXK+657ZHKjm2JUn26DnX+BpPWmr88p/1tlaGXgo55Kye2umpHHKZ91/KQDbRPEp18/X9/fN9T3e/unfYfxHkzW4v0oSYO8LmpZG+Mbzmrmz+MKB/P+hxDx6YleZ5zW5R1TiT2m87efojrffFCpqTVGCPyk8h4EeUzoBhZMlXv2qe3sN2+w4yFVYl2QDB1+zoiUH1qwi5gJqL0KtxicFT9svAcwxfD/jY03NglAd1gSk5r89PUwSag7NXNA1k2ERGts0KuLJgNxPhFcPttoheT6XsV6+VoEuuz77fCjzTCRHLeEEemky4xnMCyqqI4CEhMfkCd1lOMQzF48gKdS90yUPUjuQ9U0fem9xI63ZujibjNoSl10hft+FQ/3pPrPihs+BcNWaaiJXqDQCDx8s6HkAZOrfQT8yUrxD45nzfm5jcwx1lR5F/TKJtvdfNYra5D83nkIaE9VSsIGORRhxt+f0zIaTEu0oHeoN7aggoalQq4f+3Xgk5p68ffkhd36y9GWqyZOrTyCONmaXDY981d48hb82HOgvtweR1ZRbHQviOrYxgsWmrd3GweXFcE5/JCuuA15Sq+UHZLJcL0hmJUTaX/PFZJGi9VheHE8RBLtqKOdeYcrly9g7N7P8XRDcv58r+lj3gvzR12LF1L8uk0m99n5x/BSz/lmFaMAbUcwcUHIiLQJ89okSB6QTUbzaxDAkfJYZ70zx2tH9kYYzEytbEl8BoxlhHakTeGGPBQP8I9hYoasT3YE4nmzPakx0TwHvrbBMC6RbUfzggEAtdhP7mIAKejj2tCKnktdBQw/QPv9d6po/66wPNoXHRD9et/wzLrvpff17+231PDwPv7dt9Zjaj7hbrx7Hb/Vxq7xP7/df+8vV5/T2b9zephu3ny3OXPnbj1hs0qf8PD4ua9rWL2+x+Fp99m+ZI5HkmRPRK8aZMK6UH8TMEj+JBUtnpotWxh865Vr5i66w5j3dxHrmkq5iY7whUlUC/YotqaXfs3XJ+hM7kyX9zI3Kpf6SSdowJNMsk6H30eSOwbhVuWeYuSM9Miy4c2kfLgU8TSif/n9/xTuLwj3pg8XEvadXFhWfLf1ixEHTF2PmgXTEOPDg6YJx5IulD4zOV00HkJ/2c3fJ+sSFNSfWvNfmN+sX/t+bF9aXfLDmlZXyr3Yr1nv+te4tm4FLaz6wGXnj5ZZr58Xiiave96/Y8SX6oM03m4lLbTZcTfxj8QaBB6r9znA0oz/M4nA7ox/M4EWemhoj0wWDGglj0oWRGgZj8oWuGhZj7IWFGh6jwAWB6jujzgWF6jCjzYWVGlJj1IWBGg1j2oWNGjJjzoWzGjVjyoWjGg5jxIWeGhpj9oWb6jYjz0WKmjhjz0WOmjDj4dg1oxr8w1g9Qxn86fACQyT8xFgrQzq83OkSQwa85qmtsgtM6qmD0jG94tkoIzTdwTCpsheM1KmgoivMwkUNwzAMw3CRwZSoLgkWua8ulw7pK0FyD7pbwUdjAkz9GHmVsfQ5v3kYKg8VUcZNZ87e+J3G2Ux0rYsA+yEYjgvljbODoBcl1XFPNrTvVduVkxNCXfqZdN0DGsHuWfrQi8V+A2dJztrMJp1DdY8dWP1qmqx2zAgBEj1Sghg0D+4w73Tmx7GXBWNOFvyDE/FhMYvzcsoD878yzLg6mAQmNF0wt8XEpgdwrnafc+bqRZ8MkH8HhvyJMYcFCsU2X+ZF5KPuRjwP4iUEY+JuI8rxx6YtpAMwrTutQnl/uE7hdVD2miPYvDecxnQKGwIf4vySag36kZRU/lGuL7XJ9sLt40NnumeOU74IO8s5kz8NtDabYMZ3l0Rv4QLw2WQjrgO1QXsYoekqizYQ4DB2vzXq2HYJf0kkH62g7sMnp5ZHqgpsLNkTLYp7hqhtzv6JIUWi37AddSEhO73k6gj5UztKM9YCD8YSkrNjYE2ocG3YvZxUp88U+qJlMgwn0sZ/bVpGGvwBALftMaBWkAdEyXDUAijPRbvsWtIajMeJHaEClPkkbeZ+do2rA/5p3rtSJ1UnpLcNMhsnK/ij7Bh/DD3adowUX0JU4YTONgic+jIORxKSwvyqmodLSFpi/jEqLGX4DLjt35A4OhLJVw6rsvbOoXsLTBWxnZtp4yCQ3p/FnVdnru+MolgYmWf/jS8Gtif8dGpvyY8yXG13SWul6OU5qxgRKhseh9h9y5/DyONb7iBLNK0ER1EWrqIglxrz3jDakWJyHXg+D/Le8nRyZiusfJMcO41liOjoh5RjIwtIzs4zO51X2d4BeDE7hI1ZdS7OL+xlioD1Vc84SRKWQxKoSEfWIfHLQudRvdruUvgcwrceddI2FVUkFJXxreUluweg92efZy47X7aG9Gw3PSy8ObEEK8g8ifB1WNLzZgFW3ov4PY1Sr5vt9258un8NNFGjealLsIYobzy8+1zk5Sac0lETG0aARe6ixlz0sarZyR1CtpvFCoLm6WUb0iN9PodDzsgqInkuVY+Jmuxj1sytdDY/d7SVbabC/hOLwMKZRRU/fBixGTZwdF3isrRLI0XSYi+EVy8LWhXzPuPxBMCh5uQaee4AOi3JufSAqrsfjdqroZf6dzOgCY/pqvO2JNm7hCpUstKMU9ona0Aw9oeUjo/OuDI4T5GdZXgHmDaYIaL4I09UWYq2WKTHl2XQPK717AZvRcKUEjUqTrzjB+XqlSea97iWndKFinuERImOQvxj0Q0aEAS1FVF10Tj4k6pM1ABssP9354j27LtmqNYfEFl/co5onhwxPHn8e2OMjh6Y0kOvz+t0kK2WFA4nIW05cuet9RXAkV7bNz8v0ZQYLejNdBDDMAzj9uecJi/yH7vmZ9MdVffpt6DTdXc4e5YwEKmA5XqE4ChE5j9mb0wYol1e9Ppu+7m/O6l7TqUOsENbqDSlZreESZazJNGKOs1GAuntoy+jERhRQb9O8fmY6onZNFJcuzANBSkhsYcOkWVp6L73r/ljYN05wimH8STOmmc6M6cDsquZ4SfYfskHGUIZ5qF3vWIgKixilKSJ4kRC7z15JcncggB1LAWmrNEsqMvSLPb8jmkKN+TI2UNgvqVJkOQC/p3IDLacCc2keX44VzMsXz4+eWE/TJlM2xG4QxiQ8OfEojoTl4QTxOPew7TxjF58m2dtQHj3hel5LsPuiEgSNx4zQy6fYS6D+xxELdidBloX40MtZKV6fjQ/kkC6TW8oO2vBBlj4vYYhI/WysEUGU9TC92vaEvMlHuYwaXb2fEO3zxA2xOm5UfSRwVEa0XXDTCvXzQsCryySQ6nZ4wVqSnT0jHpqOsjcvovzcNbA6QbhmKziI7oPBV76WZVcsqGkGOeOqLP3Vkn6rji+M4Rx2XtNHKXpG1/JvWrvx5T5N2pCSX2V8z5WYMatpHAvWxT5fZ067DSc4o0E+YRq1NO3xJv7UbxZsw3SnUek2nRPJOnRMWHuoH4gi7z1iJtuO0Lr3dH79RQwn5yE8ZZ5dJ6GkByS1bAc0LEW+D2SvLM8vpehonOr8MRa+ARcqsSMDBfe3mc0cJZ07LmELgAke6TNa7LRZ3f6qeFhlkOF5sVHRUm/ZMe6G196z6EWDfTkbaESf6X7NOuQS1QCgcyvKzYEDJ+9bkLeGV+UrWNPA/xn+0GTbE6zy/mb0NGhsvi4+dzBjZisFjzZEdH8uLJMRI+qL2MWkbBnrbenh0WSITKgM0liPIU9SplRC3TRuYd4KRe+Z35AIPJ27vRIXFp3KM3/HEQuyxLFRslEYLiwE+fxjkZ+uCg02g/1ByRGVI8kPZ4HXF7L0cleZzERbOTKCf0cEuTwdhqVyEBJNClVHYcvwCSBgXbf6TKnNfN3nK2HFkRgzFjV5nlZZBa9uP/sGf8mzz0IXPA0aHzX3p5tQWreWINAh23xeTSxAlNwgUpWyO+iPmCOQJoQIrJTQZEPatLJ0G3f4/hs5uXbjgjBTjoJQdYoN8NMUBR+Z35Yy392MHDOrtMTRPq7nbwj1zhDOmLQco7nuWrOTYsxfDXb/ek8vfTQgYt2uNLeRUL2903H1rlEb6PpEwvmgHPCB9eJuzQ2SHIhRVh6+WMLFuN73iWX52Y+eFWcm/+F92HGLs9kfRNIvzUEHRs8aXuCEVmF66L7NV8Rza1fCci2LdO0JIy6WW4S/NzQC11o+zFRyMc4aQ6qTYheLtwJs+l8JARnxJ8wDMMwYsdgZ/2yuwttSRotgGJm1kT0yQIIz13MwaXbwybKmaCiKcyjs5OLMXRMYLWlL69iPOBofxWJMxL8a1Y7z0I6reldBC8AP4qkhEWLOr+Y3U4ceq7o7vDMC84e8pv2X95LZzUxBQwoYnmpGwdfEbR3oAFvyDDMHAS2lHeiIROUizP5djpRVfgYokZTpibS8338BEnybSPXYUfGIELkqrirHqgSVI0lEuJGf38W2PunAyppQHYLidoAuZ5h7DnKAyqZQW6qln57qMqe1OWM98vs5zc8wqPzQZJtYiwBMpAHUkE9NCcSyBpBUPPBvVRXIWTDnlySjqZE5NVC5pmWXX9wAvzk1pYh1UZZibjFF6lhETcMk8QV/z3DJtunfyLvtbS6dvh6uFnQL/Swcg3iEEg9GRTXnEnc9wojVUqMD9bB0FpVY7V0pe2C3aYH7k8/5tKdeJs9EvOias5n4QuJWq0RcA16zcSEx1srD27ctSu+mAXIQdlmuc+a1H44ZVDa6mZkiJPl+2/OfFOP7p99JhHjiiaJTxrquOjQc+EenYS3H9xhTm2fQcdObuIw8c1G2Cp2j6Gt8Lf1tgxSzeNrfNb+c3sp3ne/REnwKjVP5h3sWub23Cu4XbQJV0hrN/Md5HsX1UH1Wcpd5yFK/YJDo/SyeKMaVWgvevWTdoMG/ukgrJRxYv/7mVytFYnHQ4EfZ4gXwBpOhMtDFCRLsHFDZiweqmW6oSqohiHg6MvjPYN+ZkvkUEPsRW7lDFH5C5lGl+l3jtofIbHjVU1TSCBqe39ZCN/k54R6VWeLrLjkhV2Dt8a0KOaEH4m5t4tUmtPbtZVlUfhXOmnQHlaOcmx8g3eN+VPoc7mfWdN+FrQ8LzAtIByCnVE3YzV6nmCr2Y08uQGd6fDDk/KcCc9mfNiJnQXE4kvaO6FDe79oyoJxN22NZXWLbQBXOuAn9D0LmGDsage6t5PEqVjOzfGxLrnixaWUW+ZzqvtaC8lBk2IpTLC2Lm4XTkxNZsdv/cUwUH9UvJPCHwcBD6caG9JDuWqX6oIXPsldqb1mPyh6vQWqOEpreV+t2ZhxznPz2hrsAE7Ln++YUDUYF38pk8ufmyaNsmJHlLP15OA3z3wf5qXyUeUwvXF+iu4CkyC08IC3UmTRr078GeBJ7CKJAoHHq3fkbVAPnWvOKP/j7DAF+pe+Snk4K/qahgqqKyxoSSy+xun1AwhLZm6LFA16gXio1NRfwFjbdveiNHZL4qT0Ap9m46EHo+MGtIa89xpgUtTBjPal81xjPYnbfhTXyBX9IMCdxIXO5y5oMS7KWOHrD/2wrO9TmdwvwCtsVu2+ldawrlWYaIiYcV5pM35yQkU2i2YWh2EYhm/PUb8b5A7YSC/ba5FgotFxRCZwJaJqBh+4jmx5DXdFAEoYsLPfJPDy2Y5BZ8UB999/4v47VzmlqBtqMElizbiAan+f9EDL7yQaLxbk5dDVmqKjYisxk2pqMTP/1/+ofoZdjY9GfJhsOblL0/DUcPko3FDQVLT6vnwA808MvZXiUrBEXfshXE2CKWbOP73JMY+R/MNPxyEC2Psy/aHEttTQjBXXnKYfiK4+XGqsQwKd8kTJjMC36RQi9sG3rx/w2FaDvSo2jHrLYcETfLgMCMZ+LKhHAk6mGDbI4/JUYYNSI6bw5ZqViG3dtfj6TitlCeQ1iGCWOleygWWmJWwKBSGaIq/DysijnOJ253TSrRiPpHBLmBx/W4JYeesj5K9QDTEzBedIMlA2BuOjody42Js6kpq8auwWzVBgWzUq7rlGdcpq+SZdcHOlW1rqmSTbFaj90n3AlPWm9pkYOYSaGeBH3zlzu143LIlicFyLMY471e7bqH7txjIFpXWTkVc+oHrrdVAgwqixXgl9B45kxD5OYngZOoROYICeK5BiKcsoHXU+Fqz5gITt/SikcXuN+yJZhAmQcp/Avj1OVlRGqVc3TyHU4wZv49m8Cuv9wWaeDYSHDjU11pd1FZc0wSGskhh76XhfWD6RL5/v3+XIVA4X+OatQ5LckmkMtgCbKt33iXWsQOD6HNix/z5dpXgfIpxaXNRYcYkXKz7cADA9fsNzG1/CBuvJ/b/H/PU7HPCOaVkfEVJoIUOJQAkidSI+hcV4db2lUyja+pz9aavziNPr8/hS9pFOhaQPK21H10tH1Os+tIlqCPFoaqjr1OaN9P3KyPwFrR+nWqhONHvjDv0DqwVlXoGBOvcb4khPbBIBMQHht4CwUabh0OGFHX1qyy3cDtPt9VqwkjqBhiBV2r+jVZIYvjUYa0+BURE3R7PQoINQXtmycE8+mlJMAgzVM7US1MF1nfwgClIW/ht3E9RcdjNVL5c5CpSLcGgW9ESfQDdVD2sEzRaeLH81QIrw1mEU3SeTG/qExNQTm5ydAKvZuygoydmmdhNno4dJv0OZ57Pw6r0CxJB6IHiJ6r7lp9GiAJ0zxdf5ZPimSse/ISAk+YnheGsHH8hFynbAFz0Nl9hvGqfKfoDmgt0RMBxEDgqgIefKBmQ0tcKHo/4P8pmEJr6+mE8yznLzfjcgj2g8n0uoLfXc2DUO0JgWusY5QUF8eDtDVS9cMhj6rS8bW6xsPuuPkNzV8ALjuIIQuExDf285ck1sBXauZK9vavwYpFheUVK8do6T7brbBLXX7Dz01sYb6LdqZDorDpHe8vUKzt0YlZZOLIXXRw6mw9CB+ejurAscibnqTY5qVWAYhmEc6ppaqnJs0xMifPX/r1AK7D/221HO35s99PMUFbcFKy9bPW2jkjqMdgm6PXQztguFzQKENcdUQQ4NTJfqdHTFH/donCO4COWBQtddXQOiyH/LGuxLDx8PPh+fv+7hQX4XFp3LzpVqL5z78up0W1SbiSLIJ96TOIw2bfehevmWj8ABJ1rtTKuBGV+tGILF7CzLEzORWxNHbHr9XrBSGfk/rkLEAOjJhCowLlkn4swu8l4GF6JyY5Pzj2KVqpM3UMFfiQ3ugSH/C+Ipqd085Se85pRjA7FlI6t+s2wkdx6wk850yE3Q2a84HAEr5Y8eYDtGpzW0V/ThufUmmQdpKZTivLowc/npeFMLniz4/uT8Dse6qltBU/2AnUphGd60MSO1Sn5sDSGyCbyK4l9WB64+K5cAge7mSCmUMBcmbKZEaNdMUjb96dnnBpl7d5SQl8JZl8PvRdQVAOUaJdxE0pB30cUW73aU/8QGoCtBugt4GshjYkzkx/k5+LfH5LFCIPz99OVpY5aRrNJ4mWqemD8ZRSM9rJAwUw5c70QDnEnoNPYh2PBCrFcd1+VzKq1tEJ1k282TtLsfX89TqYILioBSnhGFy4LipXtoPLhM8l9vtgaVdnMqdGKev/vUwT+bzOP2YeFYb3EnMV2RnnSVLTuoSDy5OR/NlRnXG0KWq9d7fdsZbqF1+Hry6XPEa5hJxVdTruj8i6UuFunPl8jKxStiPrSt83pFjVOok5J4cupHDiQyXlvq3lqAH8X4+QuDEznhdSS1UeeweHC5oAaiOQ7RdgIKeCrxatDQDrd75yj/4FTg6TZ+BX1njJbCtxesI8BaUOzvx9qA6mWSkN6Fe7hHUfg61w4z12TGTYNfGq1UoKrERGykAcsNeBLv3DPOnv5+FEnp4JgYIlHILGgdXEAZh82GJBMY5w5fajuDiW7qxTg2uhE2m+VC4CBxk2tcNH8w7HdKpI69zhlk6+spj77SXB8+S0FuWHvL2IfMHlPSNqUfinOBtM2effVBISj2Y59jJDwS8wDo3krokIMgbOZGleVS1gikGmdCWk1eTG+RRma1+ZPcWJ5gJyMcUTXfU/34BoboZI3ILVfnoGkTv8opTqfsuJpWohjw6GEXAnMGzD6RPxCyhLvDb9W5kgcr5Yhu3TgHv19OSiWVVxQNEeDT2ArUSkd/EnhPxknNKyuyYhpDirYU5w3lSJcpfFkvRCKymZftCtvjiDgx+14r08T1/0hQogMdKCZBpe9rvYaK8Idsus4LyTU73rqJB8hZv68Qg6ii8AtZZqnjTTNDTnl2t17HbvOP5sUhedrAJtQ0vpWahACfcwlIRXCP6dZyj9W7LJN+BqVllbbMfUn0KGSgolQdvIaKo030rSV+SwUVXRoQtSiWnKhDI/h1HOoEkdG4QbZyAq9o/I1s4QTdjMaIrDhBKmj8F1nnBFGj8RXZxgkEGs1kfRZ0AY3cyK6SIL2gcWFkKQniGo2pkV0ngd9ovJpsTILuC40wsvxCkM7R+G2ymAjiDxr3Jlu/ELhH49lkw0TQ3aOxbmTLiSCdoPEfI7MniCUaWyNbDQSe0fhussVA0L2jMRhZGQjSLzTeGVk3EMQPNB5MthkIrGk8may/IOguaSyN7GpBkP6h8cHI0oIgntC4M7LrBYH/QOOXycYFQXcADZUs94IkaMwqiyiIZzT2SrbuBbZonFQ2REG3QWOlZMsoSHs0LpXMiSBWaOyUbDUS+I7GD5UtRoLuA42FkpWRIG3R+EvJupEgfqLxRWWbkcCAxlFl/SToWjSKkl31gvSGxnslS70gbtH4qGTXvcA7NH6qbOwF3REanZLltwTpAo0/KouKIP6i8Vll67cEHtA4q2yoCLpHNDZKtqwI0hkab5QsZUK5oY6cXKFkCSo3ODHNsXCdCW1uqCMrp9BlCRq+ceLV+8KYCZVv6silU9hkCcoSJ8JjIb8SGtbUkZ1T6F8ltFnjxG/vCzETyt/UkR+ucDVLqHzixL33hfUroc0ndWThFNIsoeEBJ569LwwzofJAHfnLKVzPEsoHnFjPsbCcCQ2n1JEvrjDOEtqc4sR/3AoOhDJSR46ukA8SKh1ObD0WVoXQpqOOFKcQRULDb5z47n1hUQiV39SR905hfZBQ7nBi8FgohdBwRx356BSGIqHNHU6881joCqH8lzry0xWWRULlGCcevC9sCqHNMXWkcwouJWi4wokn7wv9JaFyRR354wqrWoLyCyeWHgtXNaHhP3Xksyssagna/MeJDx4LqSaUr9SRsyuUWoLKDifuPBaua0KbHXVk4xS6WoKGQzjxy/vCWBMqh+jIG6ewqSUoOFAxEkguDQd6RgYkZ8aBA0Y0kkvmwBVGFkZy9jhwi5HOSC4XOJAw0leSc8KBTxhJSnKZOHCNkVFJTodGc1m/IugaNPJMdpUJ0isaF06GpFRMAgPJSErPZMCAmaQcMNEYSElSrjBZGAP2JOUWk84YSAuSkjDpKwNOJOUTJkkZSL2kXGMyKgNWJOUGk3AG0kxSRkwGZ6BfyJdbnrIXWu4T0yA2LMTKmLw8PiZ9cjV0+Nux6fznPy/Df3GsOuZfHG8vGv3fmC3Wa39m1ZvG1146iW08ppv4r06D6G276T+2z8Pt2ufctfuCNT8QfgHbxWb8ufE83f/ieFj8O2tv9T+Y4M+sx3FbrWU//VeNT9bW4cnInYuwXWpfV8VJ3B7UbzVYuqbKh6WLHKDLPKALYyhd6UGgPSwdu9s6f2j4wOGROxjKg6HVzREd9feAM+rIOPoy35mxMzmL+eTWnCunO+bCqc5wLJlzcLITGsD6TnW4ucY/f9WYwUVZeewXAlVVG0En6w5crlxwrIVTK77jZsk39x67pFD0VA2ToL/YQI7o6lfGBpncvJf0o1Uzy5s7e6pSFPVO25NLpTpiUNkHUg0N3WmmtKftRz3CcutSudiZMcuw36Id9xsL6hZHnRd9RRzf77Xgzlt8d/m3eWcs0+yBm6gkLzhuk+CwSja14bpirqKxuIn9qWNN938cvPO1icUPnoOdU8vNHj+flzUIyc+sytLSvoxRsXeddmcqyeBUo39o8CaBDFn1WzonOimoXuCUFqEemWS+OBEn/Q3zkqeZjDEPXOL8VfdKp2xIUT9zR5oZnSdiZuV8oF8xzfLEmGkeT6wyF05QGcVOP+C43jL6FaAH2UGYmLlxMu8qAdmbGFSy1vfSBavJ8nzmMS6J/bdm/vvJJyJaqQiLqGkn6JNpn2ixo6qIxay69Po9O1JmwC3wkDxTHv3Ljj358oHBuCMVFtiTRhbKPWli4XwmOSMeSBWVhIXv2PbXG9Z0cDvZ1zg68gqioHc4R95DBPBsQ4LEsV0WN1V82C/DYV6oqbY3/Vw+AHwZTvn/QDurFMdYEUuDNkGZIWjwmJB3EDv0DhH5I4Qog76+Srk7d0Sn0CqUL2zFKxxH5AJxb2gR+QgRK5wnEmOAaB1aQXnHlI4yHGvkDcSj6Vu5Q/4MERyeF8gdRJrhmFEOoIpnHK+R+8bHcJ7p5/KEfDCiSThHKY7BEcuE9gLlA4KMx4BcDfGkeocO+dYQMsFzL2mnjugmaCcoR9jJPuP4B/nKEA+Kdo78aER8gXMlMYoi2gHaL72MG/nOOP5AvjZEcX0tV8ifDBEGeJ6RkyHSHo5LlFNU8RHHJ8ijIbbOwMMr8lcjmgWci5TGpSOWC2j/oPyH4AIeL5FvDLFzew4gTxUh0aAvjZTGzhFdRNujuKniExyfkXNF3Cc0QW5KxB7nFxKjGKIdoW1RRnMj3zOOP5HXFfGY9LVskO+VCCM8fyGHItIJjiuU2qjiiuMt8qDUQE5xLn8jPyjR9DifS3FsFLHs0d5Q/hjBhMcWeauIp4neISHfKUIqeL4nadfPiK6Cdobyw9jJvuD4F3mpiIcJ2gXykxLxLZxPJEZmRJuh3Uh9nt2NfGUcv5FXjiiDvpY18t4RIcPzO7IZkVZwbFB+GlW84PiAvHDEdmDgoUH+4kQzw/mXlMY4I5YztE+Uv0bwCo9r5J0jdoPeoUX+6AgpVBpS7rIjugLtGOXbbMVrHH8jF0fcL9A65KMT8QDnfyTGoIi2hrZD+W2m9CPD8RDyxhGPC30rn5E/OxFqeD6A3DkiXcLxCuXQpMkMjorcM0WX6Vv5inyAaMBZJMZgiCVohjIpATyCXCGeot5hiXwLIQbPGyl3lzOiM2gLlErZyj7iOEG+gniIaAn5ESI2OO8lRoFoFVov9fnCuZGvGccK+RqijPpaLpA/QQSF5w/kBJEqHCPKiVLFDceCPEJsRwYebpC/QjQO562UxtYRS4c2o/xTghkeM/INxG7UOzTIU0NIMujLq5S7NCO6hPaFsldb8RnHF8i5Ie57tIDcjIgZ5zeJURzRTtDuobypKVUZjifI64Z47PWt3CDfGxEmeD5CDkOkFzieo5wpVbzH8RfyYCKgn8sf5AcjmgHOF1IcG0csB2jvKJ9KsIfHJfLWEE+V3mGFfGcIWcDzo6Td4IhuAe0AyrGyk/2M4z/IS0M8VGiXyE9GxAs4ny0BiNXmQJ+bezRllOgrlV5puVs0ZZQx3TD6gXNyhaaMHvc+CoEJ0HvUct9QZluUKX1S+dhyz9A0o1Seorz1ouXelDlnnJw6sq84Kxs8FZw53TF72nI/cYprnNd0TOl15zGeapzif5yDXcvd4anGqdOO2v84l17hf2ytNyVSadV4I5to4X2KKQ6ifBKN/aC3QqpaJlU0s2BKHHVIlYPU2GLrC2lqVfuVhqgykRho3MkQU5z7T6S5tbVN0sJC+yTP/TAoD1Jbi6ZeslbNfbqJRqaUJQ2Nci81rlq7S/QGqEv0e7QLAN+wJ4wBrySssKJTAheobOhHO2WpmyiMbdxGF/iG3LsTF+Dwa/SVTXiO21jzuTgJp3U4Qoc1LLHfgH4bt/SL/WllmepMs0j2MY0uNVk3SnCowz+RdHJQCY8r+vHYjK1Wne6cchyir+1I8vG00KPXLv0GONVn9Z2OmDCw8eMDqMfGz6SzWsM4BLG63mFpxttT2sXzk9O/OlzsNMJjOk4XeldEqoPabLGs7U5ntzgTVTVv1Ge97kwutjXf4JX/TrFq4u/8R99dvJaL9TQErTbtxiT9vGIS/5lY1xrL7pD4K/L3BXns/yXf7sfdtpnD5ms/Dk31nb08pNN2ubkpVzs9uRz8wniz/7j6M3y9fqwO7Ph2vou5k/42PS7qZbdYXzRxv+02R48vZync1T/j7qLJ43l5meYhhWFazdWP7unXSvYf+bRfT980yXyVxWK63H260NfW63EUNXs3J8EUIKeAbKEwBFLueaEO64zA/Uf91nqNg9bLoN4cP/QmMoLvlEaSrJ4NPvk37L8sCnUEqRrVCTvWJUIfL2+qSzZRI7hYpDe+1wn8SqYhlagFXd7ml4jhA2TQ8w0KrJzian4D3mMbNRgLGS65S1pLoygDbJfyFU/mKErmsIr+/2QgXDldCyAQbb/+npQhGRPgY2jQi/fTDo0VMlxhja/d3XpU4g+mVvDwIYF0TDYnEKBOkm+U9j4wpOMzTvgnl7ePfyPD/bxOXhq2q+YbanqipRtby0l5kKh2LVR9b6vIHxSCDIQSPKWzFwaPL7pIYxtNS3GcZnnb3+d58iCBQBkygh/ayE5oFT0toq7iUe8jpKvvTnSLKcDv73OfRD2FqyYUNO2HqozXApUI50Z1iBfriR2t7rhJ6gVUYbiiFCu/ImF/+z88w83yrZ9ifBf/xpO6k8SHFrSTt2sYXYtCxgCIfqQbc1XOcThPhKyjVrNfK4/jz7hu/Jrq+IavUI/xGRc8I8fD9VIeY2drDOo8393UwGRoBBS9VpxPfUU2JbZf02zDFF6YEhhUStBLHWHi9+ISkQbJKaQSKchwav3VP+c6B86nZv8DKD/ayDZ+jbrtxX4tGa4lsB9O6nLxywlEDMfQwxyz0S19vXSd3L0WGDGLtz0jjumKT9DFFcog3NWy3oEX5bKcDXcrzR88j0gauZCbt8E+YDi5EQ/Pjic3BIKi8FOTDsXD3OomrqXTRcc+y+dWzVOFaMroVaukJJAQId5cPKRWD/NM7kDxcFIhgUA9diiPnjEIAYq3FqMzRfIjUYNsKGl1rb2W1C3I12WAtCQT+0QXU5LhvZGjlsDnwcPNtnThJVKsgrRHcCfvNKFG3Vyj0CbOoJIGQ+oFZUgqvUunVKESqTNQsuyqSSVqqbsQzrMHzG8rB+jHJFBJm4A0c0mF+isRqLMi72rYO6lZEYouE/Xdt9H8eGHCmh/Lk32W5fx4I1BXiV2VJc5E6JSpWuFEVLoWSVP40ahGVyLIYF6HQgZP6GZCD7Z6p8A9RpEeQTZVQLqL4ti+07HSosdPmIHOAQr1+/BK9S9N0b07rSUVu/JoqqLFoCcnXbcaf3eTr9OSDA+JdCac5Wi5eDxJx6B/CR4gzdgn/qjq9q83Ep1M+Lu4ZwP5oVo4udDdZJL+g0Re0HhFY+zqu78iB7TgMt38rUeRC42SSdSViP5LEnpBKfUpIFPsid3o87exlmxjAE2qsepK3MLibhiFBiqOo3AWvIrA3MersfLehEjRbBdpjaIZMvWxKdrexzVZ0vptZ+52CumYlx05Vgqp2g0nN5OTsbp72yehELdxP+/p1XYgp2yeXsKpPSa0xxPwk9olRrMw0hsByAf98ZYN1R82dV3zeuP+wGFZhmOcnOTaoG3UtLNcf2jnaVMtbpUuwm+wcugUvAPXBl35v/RwXe13F4k/9TX0/oX/VKPuroM6h7tYqQ+ho8765rc2ctFNOBqT7a9pxHp2MSpB0NCyBDnZ9cbXPjh3K0Dv9mgFPyyBt1NBmjeibL5YEKBMfMCFPju7/LGstqRPBPjcFIxtMlu7JA/U9BLL9MMJ1pxTq39AgrP77kxuQ4P9q5i6yH4e8jzK70jiZXBTPerpgnyBa1oMRzcCBbWkjuleTn/y64R/9tXvHm+3j0eopqSmoCVquGMFi6BlGQEfoXWzCDB70nDc9O5dYvMWm5NTfz4R0/2PfWuXRdC6FbMQr//Tv+zMGW0lCXHvCyX8GF/auZNLyZGdXH6WZvkVor8Zi9i0mGC5DB/AOHBneetJcl5BdSW6HSw01Kk1tU4O+91QijXnSoz0t8MOiQamt1aN4eamLWV8TdkaCp0wLVjOX4jsGqH4DcbiLq311fUtpDvIIzDwokRLyW55RygeQUGOjkBMYBL8P62Eyccbp+lqsAr6s7+CMvPIB6DMCForJYS85p8lsPSNxjhe1iixkLp6e4SfttoAXu8E+i7uUf8QjnCpCe+g6GZSZICFXHDzi1+eCg5u/Pir/E5PH4Rp+hlJ+bGkzjZR7cb9if+LK2t6Zjk6mJ84LUqlWFyABH+U6yjECy1RrsUZqeLHdv3+ZCB7HyB35Ha3tx10K2lVrKU4e2a10EtnhY48ZvGEsDjhVVXX6DHc0SdI1zRlz1TKSOzj8fexT3p8keP9y2Liy3F91vaK052T7BpuXcLibpCpq3YqjRfQ4CsNBvnoRBq0p7H/hNLgeADUzUtfLh/8lIl/0wm8ooVhD7PnSfdTByfP5Humb+3zepcCtrsno3h0xh6YApdVhGGiE1Tk9eebKvYPkIEL/ZeXkTH8eWNaDnjXXRK2PIffU+fffc6POGDpn0q2/oob6qpZml5XE+SJm0MQv67o1tXa/FFZaUe1UMLcD5sFqHiRP2RmRaql56BYo5hN58IMoVvmbBAWQRhRu7f+hk969spX76rXy6U0pG7GbAPLwR6f4ScO3uJLjOKaOFIjXvMZyYoBiBB0BBLKNYs7Iy7QeFFSnSjHU0DKuXNECIThIhfaJrtHN3HhtW25Dv5MB8TPlg8vHWKw0MzpX18xJTZa8oYEFo5lAPeHSfzav2pjgOWVTrSHmusR46LxGS/FRCNUqL7KYXUf5gbTooWzTZK9yu6MJdaQYz3G4VT8LqbqaTqZ0gqd+683DI/j0+Ef1V2BH1+lt2F4LkqOSEjrEkZ29fhbYRDmnIO0THxF+i8z2pYr/WNAhd5QYPWzqYwBl906tTcBwwTyWc/OUdbOnfvI685qU7H6ske5f1oIed3auW8fAG140BzltoT+p/QkKEcjXRp8Grc1HL4p1O+ULIrFUn7hWbQhX7nfP1Ku/ck40Z+/A/uJQWLMsF0w8/uKpv79dqhtjV/78/diWhZX+teIbYT7AeLf1J5KshUhjuX0QblxLnG31fMLA8oKwmWBctEvZnDGLBL7X9a8ylnIpipMlZfGhqLv0C+WGXXjl0F+XBkbn8efW/Fc1D8atzuX8UfDb1Nj9NgfX2bOfAU78FnljoPD5TFAmK5LT+LOLIYYaohDexGQrfA8HcA2K5v99BMdGojWlLFfAUDYezbeX18/hUdpcZ30avoe134PPc2Dn0uTtv86FpBJU7vyhQTz9In3ZW/SKbuURmKqU34AgpRzHwkAvnFqPbThYZlFlD4mh8flGLhtAcTl4tXrnrMlBEcAypuUYvbSay1MIIxMyoXCY7Rp0KE+uYl7Y0I+p4B23shmy0yKAM0FcaHslTY9f51xvpKFtYNybuC67s230qVjCk2GgubH3pTbE6rKaSZEXzEXubncWmfrcy7T7HJTEDWyvjR43E2KeHlvWft/LQ2dhsGg91biXEQnMlJzfdWOubZks8PyWjWHW+ZN5XpKmQOtDf2t2pgqtZe+sFvYHOwmq39pa6Q6X1Pu8rZ6435IzZ82JFU7LeaC5naxkDi9kiG/+T1sBTxVUE6InduHhlMXbJaaCXnVQWV01IVq8qGWUBsL+VccpZDFVnUcwxNWdSL88k/ZNEucYidCWOrsl695v5+7wGUvfR5fzofBf/mDH/u0t74f5q0r+VMzvKVXOpkJ+an75vvU9EgL4UefNT8TAtbbMMhvwBfyo5dJ/ypsgraP2Zsmy2/apeslSg5KUfwNwnXrf5vTf9Uw7Hl9MK/iXL2zbv2VvmC+Z9y2Md3m79YWwxi9jCIUV5HOHPRExrFzoTviJyAffGgl3lQoadaxv99aK71i30/rc6nNh/M6n116Cc74V0f+lT5j953kj6ZtUk3Ne9DdeCgFCXBPAgkkkFsLpBRh2a/rX8f40OJTmN06SloyojQX29GHnxO2Dd2qjuSJ0iUBB1DgR1XiboeKGBYchHPcm9Y+6zSQjR9tQ5vdKxlTlMT3gef8q42wBLh6Ap9vHMwH9M5nB4WTSxD4ump85W5hI7z6JZMDlL1kuFBktXC3bPmbXTBUvZAUouG9wQvwvkrlz2X3kDXeXL4+UboNfsPN+LjfFkzTYWa8VtYOhd0j5uYT8fXnV3zMTpQGSuci138VvfZLKSVF9JBLEt+bDVYQTRPK1yVnKcRVgeN73/NLnLkMfi6WglP4zgQlgbzPTJ/D05CxlQJlXQU3ez7H8TGLVR1r7NHngCZtv94rcH63DfBQyLW1JB6J9AdFEkgkt/2jTNRk7hCW4U5hfY7AEA8PzAJmrdDGCl4V9IRYQBKTNpH5fOOXqPtVnXFL1i5LZK4Vw7axXhsLRiD98GakVo70TiKy6R1xkGwdrwSusTpcGp28o8SAjykDIlcR4vuQrpMgUi0ATT22nT2icpa3g8GlT1w6hEzt+F5XJDpasq3etU8UOhQOWL9TwU1c0ejkSPoZXbdJRaqTETGc9x2GWpQ6IRC0Y5ORW6Q60ajlLVinqN2/3ndLvFQzEqmO0FfnpqpbKXWYieq8Seup1Q6xXzJZyzTj9XLHOEbkcol1vUWlI2jf1k1RH1vuGvrw1XMQxa2dhqYfpxz9onElfp8vUlkdSqlDZOcZTahTubWT+AL9UqB1abVjIDbF68C9l1Yxjgb8ulAkXeuplNp5t5QNaz3ThRKNFpFDIU2aertjXCtUGrwwonMO/pVeqa6vLdcRoJLIrtPkiNS5spjo1RElsc1EHf7Y8HQ0yR1yiAld3juFN0GyjTU/3a4vWDwUxFpneRdBPvzn92ISVVgkpw/YsloX4v43+a6AfSQBeBqEtA0Jc2YIPoGNi0/RNE5DQIUGMRkZQ+KB9AwMlhGrTVzMv2jZ6rVaKBVC9e0x84oAP2z/y6fsbSTwleQ0yPO+UzaPuvB/CWyobLVB5vnl1fbPCgwyet6NvFgP0OHuzWgkfRrGf9lvm4YV8mf5TtJiBUTeq6d5Ix45VWrkvzT6omLK1QN68hURG8AjvBpJBTfm1YXKsrE+oKEEyryiu33l8whYYi5dyMxu+GzENbMJF5zI3JE0PhyvnXBcETPuz3yYbxgyvEPfooE4h9vSnGb0VO6MwBYtQQq6mYsfvFiaOVhJlqQPAkYT+VEzmGL0u0fSearp/ocYD/ihwUxC+eHJsWngD45RPkagFwvFqxF3DKWFm1LgA/yLOCh4JRwIDZUME2EQIseGqUNAezNF5C9HLl4ecHFJA5MFnoCImLfyTtPqyaXS+eEm27k/T97VejSXp44XRjLCbLcYLQjygkoQGJsuoBb5vaxKneFe9Qtbta1nFfhnqS9UgA+fZbgvGQGyaaW19o0pFiRb19oCrk3zhNOVk8qXxBZcEzylLSIKvxmX/7g+K2WTjfl6iwwF/lvwd/KHOe9t0UGxLMo8dGrjfM8WShdayhcPdQiMqWeyLeje/4r3J+iJ5Qu+oJ1pJig3Nw1I7V219lEiZrnXCkfTkfALne0aCQhyzzJW1M9cdC84VSXnUn0YOXdz8RRA4bULJg+8Ld1bbsiSZdaT0cJq7oP2MwUx4lxB+1msMRDnHht3oLTonu+R5cIGAVoOzv2j/SZRQN8RKlp3IThENY+1RZfXOTlTsydI21sQ8Beg3IH2yQSdUE4Zn55KQxXfzJAak+CD1n4Jmos1/YBzT031cdsbn05rHpdn1DwBl+25dxRZmuei8NpyDNHDC/6mRpSfqmtS3uctAVSoE1GAPlSnVzk1MVh4paLednMce+HCPBQE0pAFw06kjn/NNwGb+15aOz8+HAlmhDCf/b2xxAmzLD1hH3qHIlmAVXI3XgcJXFaszSGYJ7WQr+TBz2UWExyAvgFA4KDI+lYGfgQe0CvW8jOZy15RCJl3CVIHcJRxbnrEAQ0acM13scEshB+dEEVKy+VdVqS/t+mLdVZm+ykq7A8o7MEVF0xMkPGxQ7EBt9cv7yoWGpDE1PQnUNoAAlHFWUPZAhwFOQYTf6CiRYzXTuKlL7Qg4AAS7+7+LZqbEswEdZ9IF7SlcQmTyhMg0AHjkEeEPTwWCzMr+0mXYDA7c3853ARWVMAA79UgJrK6OusHXgA1jtCtMhDkTchGDyQm2mzHegGO/bXBZtIOyKLHjcO9HO892GQy2PlbbIZk03JnNiCY02GYntKqYhRuFdh3318y/plw/Tt8jr6edbH6jLvOsUBTZCMWvvXhWK6+pAqqZHoJ9ggLGTl26luSH1egvbG3QHYEWeKfxjVMcIKFa9Yktjo8vucEVDGwB9UxcgwBYxF0cgszar7izZgrSzuZVLsXxrdnCxgJ+zyoWoAJRmo3f41ywOAAixMEM8hMHSfQiqyXGM70p9VU5f4lZti5L+olVGalHaU+dgklCe96VEzoiLCpBcxcZKWwMeSRnPMCIbzmRrxv2V5+m8G0iok0FEUv6836f6YIPkxe6Z50bv5B1YEuH5ZsgvQ7OKmGrsQfqWA9/IVBO+nMh7M64llJbzI6spBEzkn/6TRYv3kzfE/JUlN7BrkEIUeFJaVLdLGvGLIfPgSUKOD4XsmcmaMI1dOFa5QIpd3FOeCs/QByGtWYS127EFGo350/MmQleE2e+Jk8yACshFi6tj7ClmY0jYZOXDQRabHtRRPKawQ6gihuHIqniS0GM1gmRlUN3b4lIbF+LNhc2hE6856JULb+PdV7Sd2Gf57bVtOJX5We0Ltkg3uG2iV9EtFFP+PHQ7Dv9UPIznHCrA2G48GqI0vBlFUfwK/CWAz+84MA2JlTJZGG8Y6n11lDbFOha67t9OkYt/1oKQFJOmAkNiYmoK06L7gog8QC/uKEuIO+kC2APKtR8dzQnPuuJap5ZYnBXCnkYzhMbyRDRLUE7DJxEl1QTOAsJP5XhDaIQybEymbHJ7NaMAhiJd15mYBkIYVVFOkfgS4tYJ8DSeKmEqXeXCcUNQC+EMNgkSWNZbEqmaIDsFbA8IS3lMtBmhCPZwtyOQJiFWfZNI0g9s8V/UMe3KUn1FMj9wQ6VAJ52kerxy9BfiHwWY/fRjIH0LBBXaJVzBk6TBlTFsBTLuhzkKLTAqdJ2LEAyxYkdB/0jDYTuQJE5kF8Y1RcWEJ3USTbO+mcCZGZPVNHszTuOU2mmZ1WHYWM1Sbx4T4nUrQPDYFIi4q0zcOl5aBAwWNe57yc0XwJEoMBL1HQglKgMPH/rY/MkFO+L41iGYdVTQGgBag+oiyNAAuk4A6laNB2xYnh5hul9SqJ7Hkp8votIiINBk2ieClQnN9rJlDSEle6PONmby4hcmHe/I1R02UtFvg/nHxa/zrWmqOKcbVGtRnJ6cULJ0c3/puL/jG0cSprp6Wg4G+S+5q4Zy9GqSWZf47TWUKs1ohwkOQyOh+nWIWhZu6yTNeWGYQ4ZEzXk1dvoGMhUbdMFPZONE0xY/QmAxWAsYnxxqtIP6PG4NlNMXBpx44JRY//GrrzfsIxIkSzEb7LYNokgCt0Hh4diSD2I4HTFWMxwgd5yc1sMFSsORkhyvIciUWaj3DbgrMIhxMhicOQzbCs5aHZIUJjh8qqbxI3/Dx72OPhJC5RFybyDokUiwYgvXs7MHJAnD18NwzZ0OHTixcddIoHs2+zK28FrWlmDe314w0Zyqmon2MmpDZaqWVuHpMMps3wLZcrS3jTFAjA5qiRtjKZCvxFrlZc5XU1mMZuGoAKS+PHaNyQvEbkbNtoC4qxtAAuB5/pOayIwNxgoIi7+VHRUCQCa4Y308KVwyOvSqZ9RDC86Mtji6GavZUxA6fJ9/OQkfnfwp+i/J2V1c8EO+WGwpMeVxvWeWX104XqQkQe1CDgi/etLaEfDKoMC+bA4tAeqERCaGu40RBW7ZC3AXkY5m+epTEDXr/fkEquCYg1+IrgoUrEGSw2SnAn62WaQJ9IvaHN7JzCwq4V4XmAEwLPMWo1W4j/UcWJlENYpQ/4A1O//2be2HgtXXMinNF5fHc1HsiRyezmN5wCIHHyALCl32Qg/x4GSPZ3WmzXA6d+x2g96EwzmtjMOFQ9jN3UEARxlrP5H4JpzC6UEDR6NO0tAA2FRtfzEJH5uzmfaNHDYycKYifxNtPqFEka8mLzg7OUnKBOktA9o1l8EX+W7hUq5Y3n951FRYti93tPjJ7T/85m0RmiBScUP2zkQn8IPIldzt37/vDDvwCzHHwl2dkU6+PyjyiqQfvrO5eci66Hp8sSHNn54O84X0XyR0Co5PkwJG6Q8lYXpb2IzJCIBgMzo3hCO90uuCN9gMiZsxDEGRLAd+nZqPlyyI5Xxrun9uX9wh8yqN3wDknK8ufSrSg/4W+z2w2hQQEEyik79bfLRiRUzgHBzZtCiWmLHg3sVVwYVi8wawTbFT+jtfTnb1lACexlOAgJJvOSZwtFQuIn5zF2jDHyswmsNMyEYTbU4pFxNaEUBzMSzS94GPFQOHDY0OBJzwATOwc3iTPOfiBnF1aJLmAIzI4ABUSeFpj/4oNGhqH/QNQZV0A+asyxF9mgf4oFN9OtMsML2fScoSBPGV6AgnyYBOU2xksS+MNODLV7E+Q8RlgLR4+Gb3x7GNWfh1aAm1pFjWIXtqPBT9Yh4/9OtGh3tlv1H5Pg4LBhwS1ndVb1WPWb5FvVUK/6I93I4W+WXnXmXrWsV8EJpJYNHAmbeuBHhMuk1XWOlYtvhVecYWzON6ceK/GEP2ng/2NObzlGv6CWQtyQag0PVxNM/9DtbzRN0wFZ21Mwp31Vl8s91Y+fgRn3LptE/sjGQNaiGByuyXKvrYXT3WUuTMy9UbA03AVrw3Uwn3jUAH+Y1uUxcjJRY3KBxczh5fULSXIEmM5ov8AEYozQ/+bfbVroT4Xxh/oWz/PgxMH6KADu9++T+IL5rRjaE235J3GeYAhI8fw9y3YuhTJ6KZSzlu9GVb6+7L4EGYFpaaQKkbNo/UQ8T9pR97zWp3cgWpRcu9udmZo+kFG86OHLL175Jphh4fCD/+D1nqvf5gEkXVCmg/PDINP2GXFu4N7ClGbkrLhLkSBwBWolCTGicsHxPFGyxbJl2bkwVb6gFhajIDesQSmfqPQHcK9NC6tm/ADnOzGui/ZAgqUXm3M5ucWt/hRWn3ML3c/aHVy3xVx23efSjHRVhAd763LNF1YjpYkEYX35dSymjdyC86qXvHlzPTitThS9R77iJU0A3Q6BGd7AlrLgsshP5zsdA0UKdFUN3z9wyFaE+BluzPuN7xWbbymR6Z8FxhsSZTix4tMKRYtlEN2Cg+yxETsBuu/3dS5S4qcXjT4DsATXIbz3+IzxUQux2yLPsDgmj5PmOUsMQkYaVZ3GCPvxMGIEb47oLmGmi42Txu2IWffGHIt4tv/R4b7ysWGZJOnJxykaKQ4/aWxag2ZJVSSov42hxwK5HiqXiLIlsO0GLIwta2scsUsttnv4zKCBYS6FVHmM6UuY72NvWkLnHXWXSc+nBTwOuDsYu7qW5JtPcUTFlS0FUrZ2ALY4gIYAJKApaQSmGj8BNIwFGZYO6KV79pwame2xONGZecJyTQweAnYfjfGlloYlfhHZWEc2QY6Scw6Y/E3Jawr6ubaTH7Ibpq30cxPirDX6ZjLLhCimaZGPsjjC8CYr97vz85jK9grgUi2bM2SZlehRBO42IlmDA+DDtlkXYi+sndYKkfxeptmGCuxs2mfw0sk/ApuLkTLqnnL+jL033KK2N970inDuikN1X3E2X4ptd0mvSVRk8JkNHU/VqyU7k60ZTbbNjstxgUcpzLNptUjDriSubCe/z0gB1LvVqY2wrqu/twi/DJVhFc66jhWaolCr2TRFVwyUXJSRfYLGT8yO0ojEzcz7xmaGO2m4TWSnuHZPr6iRgUUvYTAV+hyrXU+T9PeGiC1xm4jVPo6/g5udg6H3JkuMTimV6Jdi9gbDyDcFq903LYIuKvLa7NQHbiP8+W0KQrF8maYfoajtvek0F2mDvgSjarG40n/0gcLP5CXU47NwEz3zTNEJhJSSYntQIk2np70Ut4U/58pjhMt5BYqeVnOHuFyX9Etr172ircnErTqi1Dl38e4/aPtP8RIBxGsHyebQd7HSWKozKzLfUsVaWss7oWhrQf+2NZ8wMmy8/ZNW+7x7BGV0Nc859xyOTm5UpuWmroj6i89cCA48wG3V0SfAIeMPNXMYqRCmUg5k6F+1ShuNkTGbXPm/5zm4tAqHL0B8GgWZxhFX4SU/usm08c1Ao9oKy2EyTAPSM1ZHy4SGUQDAjAzZMnxAsM0OoRVCErO2SnNxzZu0WqnCHox2n8OC4hnGxRz4guIy4oLF9thU26tfDn5/hItBQacxg7d3BljGZi2a66Cz+6zz7Sn87ufoF2f9bU6b9s2vwrYp7//+lZotfjhkZt4W8WKEMNykFRMgmJGiW0YeWJPKCXslpjFsrfQrcONotN6+1xy4MXIo6AnM2oXUHP0tVF293fJAdyE7EI1obdVjZWwlk8LkF9796b02nytZ9fMcdQObG58Q1Sa6EePigvfw/ZwVmTdyZlf6vQ1nhsuKlytNaXJOK9FRRDhqxcwUPCrkSA82+UlMKLBQLPFaT0dwBxLArwDGHA4RBz0c4orpnKF6z0aJeWTAWHfQbVPM8sriQl+cdrfuvUM74j1q1/P2zAG7LN7MexHYpc+6ppTvH9tCIW2Dr+JxtbZV/jlqh8yKxW30jCEe5LWwVRMyIn+WlD1aFP+8mzmrTK9EDyKTsEfceeOchVdZrqJohCwVIaxWYJPB58tkuYEDXVLjdUNvty0eP3Y4knRr3Jt1+EjBVBcqp0Y5J8r3b7j7s9LI+qu/cvcWw7u/dBBBDpfc0E/uiX+H2eNt0KMrtJp1H7txv3jFN2sVUYbmMCz8DM01f8zp99dU8t4+qiC+oqGAUV3X/aOEP69le5rfn5s5G7D8kqVZTqxM+VqOR3cyD/3UCKbQ8vqjSNN0E5XgRFgYSiwVnMviy01ePEvHYh6xS1VJyAg1KTAXgRYkFc5WtFlUvmxqcwbj3kUKNUjOqBUDFvdhlt+b0LfS78BGIa0ea89AV8FyJKSYhDv7i9kCAPKioVYcOW1o3CoDxUeo2I2gg8LGhTfmdZSCsx1VS1j1pn6r+qT0KszHmxwZM6ETSS25FNjm/greq39XtJkzoHD0rADl7Izm23WaT8VlYx8m3xsR7vb1c03Qz7Zz8L3AITsx00xnIje1TshB6QBIlUaxKVLwnkuXo0zSp9GVVYS9LkAHD759iEt4U54axMqPuePg80pB876omzqrgKBGktC/5i5MYmBa2pRWdYkJQIeNSRjLxnBP1GJQg7/Qvmlc/ur9cLJaWR+cA17IoPeFnE0Edx2eUE6br4BWNk01TnNqmpdIc0qaxWhOXdNKk9HVfA3BDb60Z4bbnoI2+78puCExWW+2jGGrLMY3xWwMkCQHpobByHDsHEyWTa7cJBP+DBQx8shk3x5Fhq2qsRyTRqN5hW3q+VPQcHTcOPKcrg8E826b+KWam7ydIO4f9odUWDYnpN06wzql+0mdFtY9LCoViIxojBwZ+Txjn8JmGkwjiqjqN7xBGati8sm6fRi0kY0PRk4vjxkZpxStPD6tQobrphfNFzjVbD2BfHluXWE0p3eZjyfWvv5Gt3tY+AUyzyajvFKOe3tkuAEVeHYrMmx3HeQflhfZ7UVA8rQUIOLHGR3DTZtDXg09QNqY/tbeoW5fBCKh4EqJ4FKurTTz+2FgjlQB5qtb9L3yC3x1vXiRbkriNtCgWlR8l8dNK6FNdXudfQU91nD4fLJergct5M2oXbZvFpvUp8b4cCuuWpf4gGBTm+zokshHqDo6k+I+YnS5W5SUrxbP7thrZACjWfkSlvxvNl3kEl0q52mkvyFWbGieeB7mbO7SMOTVaKF3F3Rbej0ObCwo0jxETzo6vuVuByU6foHiFO96ALKLZ+zvc27SDe9JsXj+WXtOSL62+2yRCBRlQ0zewIXfhXTB7bd1+ITlvOI32c54DzhiN3X5GP+p3f3o03GATk4B6m98DmdCmv5FpLQBXje1Bz8cPt47yjeIqHZijtpBHI5z0pQctjAFWLvBS/tFFF+VZSxP98XTZqswkSV/1RkcvqbLdiLpee224HXFbojP3zOsaDx+O21oPCEPnFGD2oWUwWvWw0fxRgjPjEnEY0MWv3hJM8TfiIB0o9XVQ61QGgd2C/JXLjuHDLZEKKLlHrKLq4GCx0g+VIMA4WE5FaklP25a2+0BdnGekfb7NPFJ+ZvCRwWKhzdaThBRK74/sH1fNuKOYYMJo6utlbinMwvSBCvDgWYI+JcTOMHUcnCIiRLuf3tpeHj02bT4SRQTbpTiIRom9hD2uAlT23ABLiy/DPDMOS0nnSujA7m4LnGjfqeqwy8GDptik1cbt2MVfu2aIE8OFcVHE5LUFsBFP0Q/wtFtdrjmQEMeuv3yOoCBVslSjOYKdzLiXmwQpKQPnX+WxKwztC4vPUecNwO+0ySgNq6voBS8Y+mYIF2R6k/wjKPrRX100I0T6sdN237PPXVfpWd7tGCaZyK7dvkdNmghOFr40agJUuhZFFNuymqJYkK4RnaB0pq+/7qQUea7rraCA4T/sLtXI5Vz8V5wc7ZR+JgEjECxdeezrCqoMQ4yCG/Lzg84nggVPaNZnBgYd7vDEWFIvJmbfhBrqdeDxTMdH+1R9VX8ocvR9v2TvsouYjCSWdRm0SGUb1+hAsXRApI5/lE4sYl269HXmQPsif4lGeqvrT0Tw3NpyL+rpR4jqTiu0w1JdDmSuDt361V96q6aGhGT2aVCFMXvip8eErgLqiio5g5mycdEEJJZNAKamlRgsEuuLisAH3yy1yXNlCLWlXvV6g8UgZxZNIjqmohmZyQFpG5E/CIUyFhF6GraLLRtf7i6xyWYiIN0d5NWyyE3ktbh1L6PShIL0dgkqtsROTEUcAI70nmiZB/f9EivsTwUBKspsEOWfn2EjnMpSvt40ihVNYSyHIlF+2AyAmZpH4VJWwagwLsWVGHbPiw7aZRTSLlOh2I9YQTKBU7O4TjrxrhzxtXHAqRbBWIyobtxMsyTW7aEoz5B/o0BrxE9guxthPju+p4DSqiODnQK468Ht6LNygqAQ0ct7NboO3gnPbRvXfd95zQEIZBI50jE/xhYu3KfLG6E8iDp8Qd8/PGyFWRKoCaOtCvjWijBsIc1+6Q7d37iwUGcH4UcsiGOYtc8h8gm6oB5dA+itMxZy87UIPaHyrC6AKYXIqkh7jeNIj2yhXv3+5VNZi1OcI5USbcVlHEAek+zFS0lESQTQ+k8cTCJUtSxQPMglV5NOiumdjCKsqETiXMPHVbNsDD8zhAlfpgrqdINyH1sn0p6aB2BF1lhEBLVk2Omw/4+MgadjImZDixDY79q94cYOgtY5KtcFDxomzyz3XFkMU4HWulPjZkfgCX2mJ3xcJtuKQAuqzPsrXotiDm7diMSDssLuxvE3FEYCHso+R45Rkac890hNh35Qk44EnrLcvJdkBATlUWXKcKSvQwPpe0Kb7zxSpbuS8L4xEs6P8GVlDDB8T8z7BjIkOkBUmHox4WqMkflQOvwALSAemO/QmCIPdmC8E4iz9xhs6Dc754rSYNWIpAVZbPVFaIvIdEbx6SPW3JoOBZTEwo3IhsEWpmQ5kMlijpov4p/cqJu4xJaVVJQ7IERmo/6Z1CLre1+HYxnoI2wosUL2o0LZ7riR6RH5j+A/gsDHZ38xKTMLQHTHfyTrTDEi2xCPecRJXI1FdJ4JUb+VA7yqWos2IbqzHPmpFjyeyTEowLavBztmqC1MJBDLMdenOdQx0Sc6Lfe6UqVN9QlIKUWDwDiUkfrQDuHqMFq4+apw/7on3XmvHZ1Ycu9eq8C4Ve17b9NgCBAonSslY94AzckF+HNWYz4LtEh6W+1FR2QVjBtU3wPC+H7p2O2mPE9C8QsfjslSz/ZrV9AGbOsPYgFTTcNUe6n8kuhFczdhWt2wXScWFsOPKrYUkxgPcDojQT3LDPefDve1+Mra6Ai9Ptun8/hKthQbm2XSboGzht+p6vp++PZY4hlCbB4KrXIhRN2f2Jh7oRE43tY3OmuZse/yOi7aIOtS34+iaMIA9o5MkvS0d7beKrtM/sRE9u/iIF41BkGpYfmBn5RNWvLt3AMlnN7ej9DrUaPx1VaJzVHuZHfoQsCbOUgs4A3CJpm7th0OamslMim00/IemtTYZ9LaLTvZwMdzmUslKSKnm5f1rs4mRVa/JZEURzKwURjC6Rg4gUcctJmxlIxm4Ku2xH0WcAuNU+9DkGIjsMOCCHEIdPI4XWgS6rvZx380K1KL+NyGNJeFDQfJCZnOdsmYnOfWQX1Uon6Qi+vsFT5UJL+6Ka+wd2EhG84fZeNvul/REpU24U21Z4Dd3I1iZGH78HCPoOn5G8XpB4XW+NJXekMFToVjoAQm06jpeS9LTTCT+YVU4TYaXX//HDz44fzwvn+eWPMDiW8y+y3KmglJuBSJbwPnoNEvAyDpSh1ODGmF4uhppyvCercTVIYHgOujT8/L4mDpN6OWF0WW8YwQpV0EQ5V8kWdMR7zzu8iNefCybqM5mbZg4xm2/OLBraNRbL8olZacFIpqq6/N6Gj6vmhkBl5UDIajaaqFlY8VqljEREjOF+L1hsdG8AC15WE9+hR9jFAMX2RqGR8AsnZtCxFMv6k0DPPVLxtXMXlf0DQQ5xZcDQxTOoSd/ZL1sUQyXp4hmnQQ2kBxB1F36iGKYyw++JJozMEHzewgcZxavy4VJ/O2YC/s092CPAX4I5Gy3KrEwJqcB8DkixBZXSJiDAFc4sqdG9Tmzblcp5gT82p8uZEmnMGB648peTIncRa9JQmkzmS0cNNScpQt2HnOkMzdXnqRpt5o0Den6Dnq0Yt5aEtZ2Ti9Tng2FYiwZBHtAlBOGp/0Pg8AsK4i2dDvkzAuor37QIFtoremjpVpE/1Bb2s+K6W0rZj2qkNQ9myJZkK9MWtEnKLYBYxYxgmRbYgurr0beUUGPSBaddGoHRMtQ0FeBvqo6WuNM/AKO+WZjat2SR2grICebUe79u1HnFKOv2ZOMMJkexBJYtKDwghYSpkdgM8a9SfoUcftntY0gZrPPzoLIRhHpikYAJHpxel7GhnYpnaNuRkdtrZycl/qUs4uxJIuNSsUxBkisHRpZcmFH9KYY5J/EDM2s+BmULvX4dcXr7eP+urQJa8R0c7nUcALp7Cx7Q8TCwrhyInRdQJWy9UUvuzSxS1En/h1sxDJm8wme5X/FjIeINIMdmBJryg/JnbTa1kDavGjYoY5Nt4PmbDDQ1ZyHCCGT2SZlh8Dk8q7VsacCLZcN/byr3GXCNCyMqzSOsY5lPoYHNL0uFGNVODK8onowsWaTN5RIFu1bNcKWSVpLqt/EPVkgI5GLYCrlfYIJ5Oh+yADonlGvbO2otGHfr8hCxWji94Al8jPsBnaQQ7Z9DDEgU8SOx1UgYy6JGikeoquECXvcExuS1yLuyGWWIk1u8sdcR25rdbOZJ9zqDMozCKBFxDFE62M5PjIgvaHDVOp9wv7rMu7dxWusBcOrB4vksVgKVJmnbrw9Y/9vi4vNVg+nuZTW7SyrObXyo38H5q8EJ2IDG4P6X0DG6VwPNWAaJDHKeHfKvMBnw6XMuC3Ad4M7HUfipx2LgGYIx8WONm7MlJTdciC081I5h4r0FipxzJ8VmkIUk4bAu9dNuAfTuA8ewdKXDBLY1wm8saYeRmdDWtZ3KBofV7PAjSCBmyMQ0KTsp+OxCMUbQ83RsR0RsUZKLc1db3ZiEUT/oetOHjP+rQY8wo9o5uEOcNTZQhyeVN3MQ/AwzfmxDnfc92cL7kS1i+9rrxhoNXl8+Z3d1WPEN+JINuHWcf2+dDS0tsI7U+jNk7SPAkNjLLW7QBEn63YUx/P7xMI2Op7ZgALkNtQPl4MjmN93fHkjkiHCF5hHLC1zDpAo7lDUOfvbCYzb5o6kuVaOBI0wto+p7Zj9PNxRC2oOBYpzV2mFoZun84U8MKeAxyRGOlmf3k4khosCJs/JZIcEjAAW6CcA8Eh29Ouf5g31iLL8fLhYA/sbUt6qmVnwvM738ZLRJlGbqp5T2iimtABsnIAC6tXEPdXs5FGDaDVjjywZkjbcHRB9LaIythIR3MgPQfDFyR1ySuwzP7icPhMH+xxLJCXL5b5RvZgfyNDVIzSNM/UPYTAcLEXyzyBdpOfkFyTFPUCdTUfjZxlC6tEk70FxUHWRDqGWXC37BclLIY2dLU8YPSm2onRRk20YUd6r2ZzDEmhAiP45vmTxznZ5GS3GapbJm+ticlQU/tZyzn/97o0hdSlGbCy5KIbuQ+CqKF04DTmrQwBwRBceWi7+AcGSgQaMSvLNSKT5rfVzFTaeXZ8UkugMPoykvIkoeVt7SiEW72/aLTzK18qOUz0Bxcep95kjbYPzhCJXglHvpXDgtqxUO6Yqp2MBQrF/+i8UDyPn1YV9uvPA0Ui4e4fNlJapvIdxnUoMnIXH7PzS0OBuHizfAfAgMbvGaU4GHFAPQfjw0OxmF/pVTUE8JKU9Oi1ffqSanafqVNNQylSxriDyf4h6DodAH38QRb9fkwVxtDc+WGm+4FjOmaXD9xxyAFjNVrdcLSiyME12Dof0dqTB46kakd8x/j802xszefa4FWRgmumizF1IibLs0cyIHXxne+w+p4aw6poad4pi81la+3naSE8mtllzet6fJrTFX4fzH8/uGntqoBrXEnHFH1MUkTHikrPStRAl6C4CqJm/6cMrAstx0vFUAHSjCItyDXAl+5iC0RSG3tv0DX5LDKGllEBiTBiHxDB8G1J6xhTC6E+z08dQg76/qt7vu9Wq2gE2hBhBsxIcuDp1uCoVUz0t4wpmeVGIqWnwmCQzaiw4JhjdgrhnTECNVor4RhM19V6HW0cFCqZnAEofHCzQKt4JsBb+yr8BSPEG0QwLWpsqIGuWDWUZSkGGMuZiApgynd8boaDYolChAurClWoH1CzValJeZqoZTz6yuet21lnhRIRy40XtNb3CGTsw+jZcQ/3hZDjpJarsvEMZSPBuEP9vG7RBJ1SecD/nzMcjx8VhRFLq4hqf6WiDZjRSQ0EoOgTZR+lZqCMAfhVeAJ1duXmMzlHcKAOnBh2x7HVdGTMTEvDqaXYoC93fVU41DqUqpeGE+2c2yoRm3C56U+WnKaDaxiq6S2AWwOC9GPGF0qxQzNSHYLCWTASAEB33Ef5rY9wpqp6oWMsENCG5To+y6GHDwoWf3IRm6AgWfxB2l7nj/O5p1BKLe3kwG0i+8jiAHqU5keal+fcgkxs48r9X67NBjk58Ksj6STOnkaIYMwTkRK9w3eae3hTEIIsAZIi3KuH59A5PqlRnYO+a1cuSdUC7voshGfKl77RSqu7+kfX7mqWsvA/PX2z3JRGMbognUPzZPak9TtV2xjKMGwUcZIT/hY9tzWNpo+tE7IL3Qd2T6s9J9vQRmLHePR86PHqD0T2ox/hzUhMqUO3FubecRMe3F/poGeInpPRUQshEiQN61C++UNMmZxLRwL0V3+KDfAsJC9nE97LSLJMaX1Bm4AeZqN5REDmMmBinpcIEBrskexv9PRUxIyWaEDZMlrYFYvxV+XdvTssmd04yq10gSThU5k/ymfwKk7hESyLL7eR2dtqUf5KzEkTFF3LB4Qk9Tvy6NXMYCEGAFoboaC7gcv8tpH3t6gsfIYJDdzv7x8quwWwJdf3lRgKDpvElwyLoNTrl7uR611FOS88CwIlgmr/Mr6ZvNBZHpBowDvBv84LO/P2qU0RENrlyokaK535uVdqkPqiR+11TsxhzEGk4iApT2J4U36rhID96H/D0x77fblzNroqo22i2zOsOB5t8GNJ0F1y9NMotoiaVZrgWFYf+/sWXCMMAWPi0e0l8xwfC7CL9m8CVigNDbBgUmVvlrhmJWYHtjBKZcLVBCwUJ2y8tFsnwqcSxyIGuxEB5pAOIAU4ypsoEGsfyYOuw1ZuN18u2RPBSWGdF9MN3P6WxxWYhXRPhhMLnD3oCIe1dcC09cl018Ko/+M/Z6oXSRHMjhqP74Xl8U7nwOHQMupiE07qEbc6BASvVvq4RzyN53iVaLEjTkYG3drgXLWKBIi/ZaBaZjvKd9cd914JN9oL8e24QTSig6+B6xeu65qG5HL6ujPPZBm4LfYqIEQmhswvxAQ2KnPrW6FIKzlOoDrfgwxjYxLqZ94dsrjLTEU2xjvnxrlqghyLDiquwwExOFU3YgfBqS3VBLJC+/uxGU32iuUHMOEnOqtrOg2Qbpr1dW/flsY0b3c9NDc3Q2mEfY16hHH1RvjdpGqI1RrLERo58ifvz3WRxvy9/zzTQ//x6ZYBJufFQSbqPLKYq/ZdZJtdBgq3JaGE6ogJl03XcjRov/nghNwuVTbaA9+hUfI5mR3L5vndGjfWxQUXQAITgtLuLWbEYY6FBMH3/WUWzrUeuxr9VoA/6fVkU1ewaq+3uoUn9SZmt5BpiBfleTPOpnik5jehm1w22053B87Tims3gyO2oxTTW3c1dzwGZpX8ftGlHnX4Ip4GAJ9MGFranAFOI3HCXpz5TmOhO/1Fn8vPauOOnijqCLB1NE4dS84dnOcWiv3jja11phKxPz5F8zFNtPshwmua2QUCEBOyZAoxkvIsp7tyRKrKGjChDZUccO6X13hfl6LtSxmtlTFrGtFTmQOFP/3wKadEelg76dQb1e47Yy7/ZpQwQeiRaDt+qJlffCR9KAIfhC9WAQ/OvV4FPwkemNe+1n0qAt+IT0YBL+69GgTbP3tBjqovfj2aslrLGrO2tImy8k0OFM0DhS1y+uXt7qIKLjKxejkFmpuPdtns/h3quPEVvTBjd0Jio/aIl5INLw4r30BDGUl9Ou1Tyb5i4gzpaOzOMUk5WnvVEtFzXdsqyHGjmtw/zWoqGlfRbh+0Q4ZDvyhkJcYBlxgtYSsnZuy5h0QAULMcAvKNS3k7NyoaQMA5SRK69PKtyImMga/VzE2SZgbnGA1zwqo4EhiPuTSS0+dLZN3GZnSMOYnYKuIL68oDdPALz8ACpLAnoXHVcoUhCREKfBYupshyvl+6a3IGhYUWU2B+I9qIcVyCVcGthfFCdBOE8an8A5l+GwIYznse/vWGWyyGW9qt9DMsQYR+thYtBjlLhByAt8reut7tXSqMIik5i3FLiVHQNTsdGK/c9pcuE5LwZtLnPkh5R1V8tWWpQJj/CkqKsogOgeYYs56u+vhN+6LG+Gs3dtj2PS/pij2nFWQHMRTalOWz9bVut2uY6vMLng+BzXluXC3KU7Vx43/Qbk+0y5lcD/uheQovpAHJcatrnmxeLdDSHX7E/pqS80mCRAeVK8wuJ1+Qrkjdr2npzrdVVr6g/yoqEYWG5UTBaWqIpkpCtKHFAwCd6vmP6FFRbWDcchKguohPJkkhOoJ2xRgQeGBXySd26WBgW+FqhmSARmAXDGk/qGSTXEHkxnVYu5/2BgDPs67ubdYxtDOmoylPbiDGLbJPnSqRQyNYrJK7/6oftYP1VyQ0icbfWT2r/H56ZD9h179ZWU1CDHAXnb3kVnzZ5a/3c7DzTln1wM4fXEFsjNIDJ/sbEPokCfQuakXDB4Uh5lTMrojLPYcHxm0xeQctkzLpMMwpfDoJud3zeQwrw7Mo3JyIDWJFBvDGi5H37H2Tr0HftGZUYih9qFEzABRrORIXsCbdF8eshRySOLLYxUWcI/1w0R+jyBHFUi9BFKlP3pPkCoBDokp+Io09g1+UMntzJGrit1FL6J3hAhs/rzjzx3KGI0mKmp8NC3FtJ+O02KSn/aKY1QGmL3QBsfPczndCp5OPZnq7vwW90/wRAovdfRFrbjWEBXBI5VWwGgioaMvCoXa2h+KhYOVdAXgUIT4r9OYMKRESaWTEFLC+cCML2I1DuALA2ve5oFofIehpv0FVhIXk6qT99ajkUU34zTBJqkmMrIzHJyGOYVzQ9WM3FG99YqwU51ZDRFzPn/udd8YyiplGbAimlvzFOilUcucRvotnOoSlP+wzN3fGZ35OVyjHf06PU0pdFM+a52X5P9UI3AfUoKqvtqXTjjMDRWQoFkLCruwABrvuz70c/CqBSUMML6It86R8eDAuQp9xAzT0NTW3p0OHW17z9AVxfsI0QGDQbeKctg+m4479n6Apfp3J9NzsgsoB458dhDQxjgUXQjwe1OY4YqXYYD5maFAu7THbaPmd1vfcYfpOtS2e56ZOmbbZi9sI28KujfPmFdrBMCcY/1zqdbjFwVuTVWgxZZJt/WOQyju5eSa1tVr+/0q73AHfhdGJi+s5O1D95J1uZgZRd/NAtwejn5v4+YJnaIWBUykvd7kBg+f80QC26zYSF72Xx6JgeaomSQG8HzlKswfrZvbd4qmEKV+oUiotB3twIFEeBUKRY3z15Zex3BV8XBgLrD/gsQKuJL/9rVmWgSMfaDnJRB3rooEFFZ6I3vfxf8NmY6Ba+0NZwNvll0PzL08U9fs3KtCEXbi5MRJiFwTyw1fYwt6afg+y6Qs48nXerzfiNSIe2005Rr4NNr7jkuW46SKbYFRnAN/gIqC101SClkXLtgj3P3kqzADHgnDLoOCAmBB+dt7muGnbtCzZ70esX8DTjXKWhkyr9/uh2VqzGAf1f7LRZEr+A3IH6Xh/zTapxB+mMA//CT1qB+TNjdGrfHx3lekjN6Sxof+7dyn6uYb6VAg2uYQUqwDTz5E1c8JMUcXl0GTmQpotXFwSdhS8v9GenbbIP0y1dZCTO3EZd9xK2c6je44GFWwT7Y/1ESE2TwWb3XJCx3TXSSOWEZEr7W8pRGBMxR89HHgIy6D8Runr1y2Ty4/y5odVUk09K/64rDU/w//kIpbqx7x6WyWVZcvK1acFq9gK/cx8ncUrzr027B29g+XKpDhMPpA0nR43xv27T9DBelCGmQfMrcogz//Yp9An/616kJ9PKQcHAUhOYWkZsVTMuxAQ2A8MFUFqrUjSg4TFxA8BnS5aDZmEAr6zLU04GiOqWKHqiq4TumZg74+qQxd/8I0BWQr6NvE3DCXMTmnrXHqLlDmU73pBPCAmrqjQ6cepMJWMyeNJ+c5zqAibN9z0qrP6/Gdg56Htkcvpe7aqTLFoJwAtDsE7AOHjiUk5nOKY0ijnb3CR9/Lk1g0CUaRIaZ5q4NM+Y9Q2cE7ljFJUQ1m9Fz+cHju5aRR8UKK2TJQ6WgDH7ouOM8pU5TEd+A2hHtvtOkum/Rw/dFpN0BFQ7FM83wmgiQ0iDdoRzNqD2mrlA/P1+KqLYTaD15B2Q+jmv1Lue8Knv+RoG3urqKV4qFyqwaxSINNcHFLQFrwY2Ob30Fh9Q9U//ELy6qzpmw7dK7vbHMnvQg2EYcySJ52Njkj0XD5IszqHH+vka5wUJcDaiJuTyNj04tbtKLpkuEmJzA/2V321kV+svyty1vNFSE/VBKT2/Q4P3jrbSnucWHltlLiuX21w+MSDOYnqxwTcevY843YgD+trdB2g8vmL2ESEwHkNfR2Gch5aTTMZPpMucr/pvivs5gcOF3fPFGJNq6iyH7by5MAlUz1HUctmPZjoKjBaVIQl4xbw7BpO37+YK5bCjy+fdOBSYOM8PNUL2BCg7SIwx0NdSDkvWew+mZTKWLoHOYKB2923Jt/r00E6F6dGbs3S6OHoQPDR1ReXrElG2ZRqK3+H7k2LEBIGwFCBt5QDemKThycmHIPyBgJkD2Bjg/0b7hVxJFbIBJ+EtqiMtKUPl6QHzuIJj2N9Z09DWPfaYMFEkWk+U+oBqVjNBOt1ig7BCmDHxe8FgOqhXDU5se/UHN++VgZYt1wiRcqQIEICkD85YJoJ2heczgusNH+TcrX2yuHZh1KptbZ4HnQWVMb5p8bEYgf9ImOVsfRCQDf6bygGsR4qhxiIu/pstrK9z7BSKeNuSR9xJnkzgcUQWh+OKl8w9Ghsrvm6Mh+L9D6nxU2xOqTVzO/pbaa0VRWYTk23bWxOrDf50beiQum8Pi5BVPDKWi/KRzApwyG4ZFWHah7CNECalOkejPrKpxJWWSztuBtt2XuxhAQe/4xZ4Ft2RN0YC9IP+wBp2YTwun4IHGKvie2J3A+hSKiu5bbV/ZKpJCpBT+1NFuUTZ6ALRI7+9RZFH1YS+N7TX+YSmt+KxU8sjWD2HTctpFOeJMx4enp0Se4lXRZ4s36lWTNhxDietteEAI8eY/c/9I5jKHpVISfwAqk3tAHEeK6IeoLYNMoROJ6jF86N9yUUw6MGj37DyKmqTATgLDHUWBClYLzsfD2TWb06eoHp52Nxi2wmCxshIYIrpMqsh5GqdfgQEcO2rPCpdcYAe6OArAUV/Ns99RgLy/Pm/qJqZNXn1JzpyqAFpCNap2kAQm51Akwf4r+IwQ49jxnShOaQsS7lYiI3DR/NdQ70g56UuOCREN+/y7lA+ITsfnnkXgiRjcuiafqeMhk55bfBra/yoLefUgvMobOOHv7Am6P4AK3hDTFW3GxthSvQLHcoM0EZ14mmojI/IMHqxc9FVD+o14GEAAopZ1lmVW9ow5j6Khzc2eh8IPQCbIDxXrhjx9yKUXOjGsU7M3OjBH4bfEqUrYldKJhJ9/JBLatwLf0nuju8TX/JBHYH/kVE0L5sA3UoAJkZDX7RwgfmqiWpJD0sY2h+lt3asOGx5O/QOyL3VqSDxIQDkQvB5yoyF4V9Lt1Ul4YJw+zET35xp5RQK+PofRKsvLPUpzGxyj+F5ozcguKLCp+qHN1djd5Co0drD97fzArDuTXqwsaqUmc33hIJg7wgExq67khoIutB0k6yg7o5hIwm8ugDKi07DlaeIXrjBRwTmoNcRW3an4pdxaQzfLA/pw3Acw+kvmVh9AMd9E7aBRip1dSyf3t1UBs9+M7voTWC2Lm49UFoagIekLmfMx1a9qbH+gXuoBmq+LINcKeGq13rjR8F5HG8Ll+HUd14DM4canu8DVU+KcKy0k6Y4yLXO5MqLigc/wddaMeJiW/ic1rUu9gUsoXOdBH94pevjqu0b1UzlzM9HNfJ0rM3cPL6m4LE86Z33AdxBQrov1jY6yRiBN0jAU21vBqrna/qwTzu0Tup43i8dyUMqoqlgXNLhTcHZJyWuMVAieyOtcFZ+d8YkMGDYX17hPCMlD2y5dnXQXMCIwnT1A7AqyvgnWKDKOfHQg64cdoKnxFg9Vh570sbpdbauVjATYPIXIfS0WXAc1vng1M0pVG/At7MLEf2K4DrnLxI01ZbVFvUX+vGA194ikffttt38sVpBb6YCsL3RgYM6DKJi/mfNr0JZ1SoItG7+Nvhtnpizs9LkvxkwWLnvpVFSp6C7xO80HM6K3zPnegk5W1ERXmg+jPSavJeRquQ3cdyKdSw3Rort0ErI+6o60Lsu9dAGHUQgfQP6v8axFXy65QL5QwFcfKSuBZKOfcJYyzajAWyXW8Uq3N3oZyKpF3Cl4HwNGYJW9X1kdOlTV0jsp6rpOFA3DTe5VuXiEwPlT0eBRfU1FeC9V3oRj+8RwBn44TwldRFjWJQp4hnAjEofrmMzf6zEqhb5MAEDeDo6xcl7PMhb1E+yoeznNcMdJqBR/gSvoAQXKNdEhnIgBF9fpWpxtIUGmv0hXIugEW51lpGLzJRdsWTp8g0W6RTAWRcB1dzVGQWByi7YbBMNBzyrVjPuj3eVtE4ax6Bmr0vZmbDlSkgG8XbksQgoWtJbDYGhYTHLOtdb44X2J72VEVMKSRi+2M57SNanM0gWN2SN0dLfJ57PoZiLb6zzFUInZsAchApqtk1Dm0sHEUbuscm3Ay7mEpQpNhvLgzGbRDWIrh/g7nDRHrUpWaKhc1XhHcTtOOFqG14yrsFF4iVDSOt2n+SkCo+QT2ViNo4Y+wzSl3ssBsA+2j7IhKOTR4LEAm1qArHnXoDHEGW+RNRFMAYNVg4y2MYxMtiGBd0bjMokKIQtu0gLHErEL2ySm8IHeGmSJrvmsznngKXABkUYM+gqp3OLWPh8Z/HOCqNzdeLzoDZPkQA5bbJz7Dt3qijmakv9U4cPgDRRe+KZMHiJuwJQWX3jcvss8TrasOt6T6bA1S6ptgJQq9NpdVQLmk9KPulHFy+20NvvL1fSORPlJBr/tKI5geKushVnGxZnqYEcWZZjdmyItn4/NkA4WrXmeAI5b8lDw+EVQppej3Eb+ErAXN2viAjXYYtzUDtkYL617Nf40vg6RpFLHiHw72zv7HISTfyXeGJTnJ+5tAehnL1jEnNLcUo2yL1P7W81IqlR82o9c9NuDNW86FiJghZqJHIfDqih6V76/pNfgajmF8tsrWwOEG2tfJwXKtr83VTZGvW/eu/MwGeETrXAibRSSIzUuNDBEgClzSmTslCMRckNi7Qo3p7yBKPnfwL/fqISAf+U7rpfCod8BBGxhIi3SJR753hpMPfQL9XZCc3uAqQGvt0TJrFmxYqBLRo3qIzgJe2RHEOBMvYKHy+4FN1kpBTSWEBqk/Py4UXpkIMch5mJQhQcwhJtkrEzHuDoEDwlx7uiPkv/wFfE8CtPu6tuHOZ5tFIG4w0gsKIBKfhOxfzLd5bjD3x1P6mEaj5ve+Uft3RYGkb9CB4QXSUBvli8jBIrN+WarerU0Kr7Z1eb1yswLIyDJrmVJVMTbPaJ8+/J8EXcb4DwBHobgKQy8z+ArIzSL7GpagknzB6hdL+0Tz8VLoxkw+czDTTZy0RBZls3ZuicHX5mxpSjs6sSyLdiYt1KKdifO3qK7kpVN0m3uJF6VxfkWrvPiLHpY8J4zu1DNLzB793ZLU8zmXFD69C4s0bbo0juDVLN/wtb1xmZtT2lZcvJacOKRnblEVtZv1uKshUiwX/6CuQrMX06aJ23xSNqd8zdu2RrUFideczknC5rSVlbM9Bjavy7cLdgjEKiA2aXEsxFVh9jvJvOd99cQz6fnXCPOsC1vruNaJPxsEi9sH0ItOMgXvpM1E7eDiHq7oDJu1LqpIp9P2mmIqMae0Q00Z1U2atnPq93xDMnpIIsai/JI67nZ/pvYdxm7s3+8drFEXbmmpsf8E0aYdElcwQNwarUAXLNhk1EBO0pWfuWoExbUNNLClStDZiRwV45CebHjU8AUvE0UhR6nlBHsUmWD0QHOQQyBatg6fjIhsAROUTtT9aLrY5W/BxYXP9vA2fgGHnXoXK6bb18TWrdwN+yDp17WgtWIQso6oLEMdyqHmb/p9Wb7yz9SOTWMykZxfkaTv14X7+eAsiTNfb0KI9e4Hwevgi+mxz4mamxsq+8kSlO39a2ogVXmeBlZAk5FAaUERHPCvHPDm0PEfifYD+znGFpkbytZ+7t9mJ/AcUtg35+iqT5jLBpbYAJur88CFGaKVWGiA4as+7161ZG18dTFgC/zuCux3SJV8bBfPjVptO8B+kXle7jgbVo8tS2njSfpaV7DqYCc5vAwYSJT0hroLDRqJ9wSagvfGNqBRZnLtyOE6JXqQ+129WuwOCqEKiCuJfWiFeN1BgFLBZVd4BXHreSc8+VwazaV0H/XFOqzeIzdpYC1/pL71QcC4a2NaY4qC0ik4m5dmVjfGUfRNNYPavC+XTDJxrLQ5PmNsE5uTfLIFrwnXPRAIIIKQG+RYGE0Xog+tFoR95Ix0vptSAbG7KECieh47kM9he8QdNB5BCY17mKOC3K/1RzGcF5JopS6Bif25BcL3Yykx0OFD1PhwvfPNABuvrorSMbo4NaRt+qqKm744F7PX4z4HKJvjNNoYZxCR9jlppVMzFFXDU3t1nFITpAWWQloith6bj4UWmPrhulfZZKj3BB7ZkR2p6rOebtJAwiximrcqH7ouwC+7UBi4AjDlVseFL2NHnqkpGuan1IC0hNeYipcAy9il1v183BXs3DD4AcX0r2JcX38yBzYNZb7VzrmFg0fawMOwPSiwBpGPFT3VOuA/B/iR0HljMXeqOZJZ9CqfZA3OG36ZtuAyhc0Fvl1G+8vAtv0Rlaho6o4YncG4uJTD6lzs72c3hfUyJbxM2bsOs0RnOaPcVBs7sy6FeqUZQBWvsb1ht/gdIjkAB647uyakoV0dqd2nGedQ6HgiJ5EE1V6XR/165PPaX0hJl6R7fiSpRzH0lFPNVZPhvmGSh2D6gDS/UC7UdwT3Xo82Qdc3na0TbBUfwT+8NGJlJR6giCeJISgfmda+Z/4xTtESeL7cpy5mTbU2WzVbop3+IHzNLp+TyXWYYCUQIUJS77SMpQwgLi145LpHdH5GqoDrsVW3kvo9m0Ur2IobNS2Y+KvOgR2fZ32Bh2FFZc5OBmEFoSqYzdwVFuiO2Y4v6JxdBm0Gez2eBfVYrjRNrK9szto4xcabff5Ek+dqHWTqG3G42Bx3JIzgzFKvGqfTN5Z3rqaRQTarlyu4/02lDYFPXL8pFG0pj9ZV5MQLGQLsr7oxVALgGi4ihMg9Oa+FQQ7EgLUIF3oPV2pBFzsIVW7efF9ntngJBp1AJpflfNbnHls9iQ91SFbeGlHKErIQI3i1O0LOYQPJKm75YA0oLPOX/1DIk8Wjj+AQXBEky2+AMZkbymYr6o1bg8R7DJ9h2Fu84fzU3Kg07kDMQs41X4URlxx9LZuOxNzigXzvIHAcWimeSKjKfVEc1hpGJ2tYH29FVwuhoIbDOch05mHmz54n5yZe+aRuFL/D+7olLSRJGcQHIltoJDpo17Kl0JAwo0aXZduacWbkXbgzPR/Kajdh2QiPJHyFx4Ge36GgoyAAPU1L8HMHmlYGZpoiCZpvsoMRKUmRape81sn+j/IdTp7i9tiQ+qLpcYItLKSG7KsQb/BmCexn6OVirIBlTvHW/hO0TP05d8YKZ5ipfYfCwVOqkUxR9Z9aW+jvn75q1nQuVKgy5Cw2v0uUl8fR3J99xo0BOn8xDB4xe2YmMGV4TGkInlmDOhV9HE0z/DMmXFsuxHm85/69oohhbGaAwiKFzuPeWBvE1E6DiorgE5dsa3+KGNBdgyUsg5Sa4ZJCiZMidQ/ept1lQ00RZsW1WniJRYhDwy/yS6yQN+KC8vpuIzzhyru04KmEyFIqA6A7AnDYgFuEmeuNLCBlRvBYhGU6NfhIiHjcQA9AxAgI3FPA2VAxABeiqoRiKzhFWDi9g6+xhOz3RzNno3mRpwFqR1sgq/ZoJvNjlUNKORwaPjmKMEa0N1O4j5uVW7/Q6wliSieQt8A3fofe0OWykocWl1sk4fcfZzFc39cYdWd9YAkm5SQBJJUIxzGw4+XNXbxLLxdqeBobObRyPklP9RETYyI6JMr3lDVAZZGN7PX4d9rudCZCxXrnQsNiOXyi05yNnqScOsYLITbPdqpCK8uS7zg+fEya5sbHPLx0e+0poa+4a9Z+K+5idYqzFWL/lR5u8jz15HT7oVZmuO2Ci0crQKPESBqBBnX8QFXyCjUOkZkUrBJHKxS36KPpESyABg5Rg4ccA6imp7jGp24ih00NpmCgJ2/wy0lw+wL9N5223rYgk9i5bEz7Ye8MbrpjMmcfONCQK3HTbwU0BKa3iAkJT5esWJQWibyxFKpay6XO7VxR0BuuWTXrQix6xp17Pgx7gavz/CQKFMoGmAHSNn15/Ur4eHg8UXymxACP0KB/dAAG9wvoGOPB66Hp9b0H8UvqnQ81GuZRs9g4NSar0Hp4uudM7x/9pDp8BjKHxDr50AmhYlyqRciEZdGV8OSCX5lPXsKsGAUVlXg3fQuo6ih61AMK9cgi58CusI+khxN5IwC8qtjQQyssuTudN1Llhw0HRAnwhQHIITkbUo/gIopEIXSMM3xkOfEgWWdCQDAzUGK/BvXmqT51cmATnJMEmdUsx94aBnUgJgFntAd++St5MdCpSZkGEtifRwFn1DBKuKEW1h3lmRi8jDJ14Y4orAUMt73O/z0EYCfM4HMWyh99w9taGPvzO9LFN7SF2j+XKC6tNlDp2zrTHxDyqbA6Q7ERMzWxP2i2HcU4e5YWOFbXp4EbSZoMPr9kXe6etDw6xwySniAB0y35C/cA2IwwxSRpuZGe0+HPUtqDChSj1VI+bMdzeTA6eFkcI5aAf3/nSlIyHTGw+SqINS3teR0K8t3p+ZHi+cek4PNEaOYTVfOiucU/m0Oczee28lxit5CxqhqIn7orgm3hy5xS3CWq+e4tIguSKhkYFHzYnb5G3buPUvfAmtAJzwUS3PaRJUrc0P2jZgSs4liWtZCKE5L8ial0stcEVvm4UQ2F6iJBUwkKJ7jctLkQ4yFil3DhZPCIEeSEhzH3sCmRR+cepD5Scu5iC05SAKH6n8luJDmuP+It0I45Eo1v/Js93QAnPkdjY/a8Vh/8UrfOkfyIdom2pMXhYNZ9Iv5zCLEgNPh81bDw7EjMkuJeeiJDT9pXu2pWgTyr2p4KLMA43p7Bq76hVc4YYRaflGXJd/9RB9hJT7pkzLLy7ynWoGqTYNtVb7ScZjSRcBuRAX4KYccKgE5EUWumg8/LxRErFYIrzrFFxS7OMyD4GV1Tlk96t9pesToZqsbsns8h9FKiDO+G5fse12nGyLqqBMcDZf7ThSe7Tk9zGlCUQO6VbkCCdBR3+Fvtj3MVDrR/PZ/7xO6b3scZ5LF2j4YK8AvnHyJ0adSQIwC6f0Pg+EVwQhegHwbmH9vdlQ2CBAJVhEsZuCeRM3soCuBS4GLGEdF0I0qf+AAEBP3O7xXH0uaLyPCy4y3j3QeuYrLxYSBZLoI7brDIi8IA3vWHV/fWtS8/ryxq+5Mo/nXEYaQARhkCyAIsAIABUT1fgh589PqHMuGIX49j1zy24MYEccqcPZLpehyJj5lqPvaF9x7NUrSRxmNo/4nn/RsDR0l2P3qMZ5vMWBAXHxqM8LqEK2oJYYtg/OVU1jeIGJVzjUpUIYsPeV1SyoCENcxGDa8tR+Dlq9SGDQw/GkK2D42kVx6SbB79jMkfpNW1SuS5v5QH+fofC8atOTfsoq28X/iPdslR/0+fQViLGGqArZT+W7b8Efxr7RNBmT3tHshcwuHKBRIYnBMnDIG4ozFkfly4DkP8ws53F9wXmhJCu9kouO6svqe0w4PTRu58lQ87KRTc4JrwnlUSEEnK7ONWRc7lv/QMvORqgWfK/Zx1OWWaAQ0QpB6rIOmFhRf/PkEjrdrjBlyWYK7IX2cvXmFkzImo1WRv5ZUAAkh0j9Khv92Vm/Q8QdDIVgPS5LcUbTJ2l6Nh0QZxfWbN16WctRc1soxYSnmoKnmfUEH4EaeG8/cafTJ1I4Ct0JZgn113KgJomkrN8t+ugzhhl9K/3HCpPK2zinW8XE2TCPe5vTOGXo6amGb6bYsMrJNLM+fyIdtTX1HR4716E+OC31D1Vz2Yz+3kEGmOMRV64OpSCuiBnDqGQ8rNIcx+pDvIgpm3eabOYZgMI581fQAzDppv5GHMiJc61MOXcsxJaE8P9PYoI7eUtl4HIE3qZGyZ8S/TiEm6hxzJivU5gHHyosEDgQv3p2gN3IaEmoGty80kBziX5619mkqh1PrR6sA4/4Tz1mVApIknkxTjOoKAIiugAZ1GPSCx0mD8DXUPBp2khjBBv22QPF7A3J+2DqRod2DVPvT+AAOkJX6+wQldfRVqkRgji9B/LH66VsvTuzqyD4YBRbeGwKHzQGw/+iTOMG2yopqMqLA4uAa723hn9/5JbV5hKHmtco/b8QJXUQImudu9GiN/6LOYo5CBEcmUhc63hn8+sOgWcsA7FXmTFSj6Q3X4mLjRtlGclTYduj4XBv2T3rFyr6W0mlZBxaTXDQQEohaUkUYcUKk0M4saD8Fko9WBXA0fG6mMjt223CWKeagJjiEFSf6Kx+bPdbX3o7uK2jTIrsPsY8ZpjVjIoOX6ngosRb2oPeCAiD7+KpvWVjWhmrrrXCOKb2y0l4V2hpdvq5dv7/ACVd9BgsvHfNowkq6LvyEZ2Sa2Z8n9+Sw8ajAZzaNvZeyf62TaAqiwJ+pMSvjAbggTYjg+PexKY4eoySweZx9jc53bKlL8nTKj0Y4I3W+7Hnw1WgwnO+cJLRp0AQVf6RouXgxWCUHWkKZ1RjKuqBeRd/tusGEzepQmcIn6Ca05dqXzowN9FTd8S2sgf2rDm/nG1OrZsqLSNepdubsp/+NkQTLewXnKxz4IdOTAoIFDazI3OYwQjWzUMGa4Vy9y4uFCC34WMxRQfGNCinFjF3aH6lLabedml0BZAodhMRMsMyrLOpYtIMYxeS41LR5gRqAWRL19Dcv8g5OTyfgQVa6hkinyAb3dhbM0bJpEx0KRssFmS7qEaaSZS0YKuia3MW7R+eKDRkLPLM0BuKPswJQgTe6CZu/bVv2QSx1d/f4VB6tCy5RPW3NZfv6vdbhVv9iPqB9BWmefVq0zJtNgzrNjXYBOhCj5AnvuVi0OvWMKzLIt8E0GMZH1Lhf5IIQBNFdlyBsiTANBWYGrBsGm4F4l5UyRnPlk9E3F1AlWdwuyzF3C1jDGLIMuL9FwPb8WntoR4mzqyCO4ihAlum8qhWS/87LEYaLRYkhgHwbSjjfqZRUCWqUdjBxYXeHXRLqjbE/3G34qFW89gD6XLeeCFilfEGHzWejZXOtT2EgAhxx0Kw4F+xni7iXiUdzDVTaYxqtR2Q/5A7QWgkqp7DE8AlB6xsR8kAgSOVURL5dHSwNBc6g5VLBp/+5iPDvclzmsxIDZU8efSv2pe/QMZYTROES7lDOdjjIPz66TW2dvOVfxE5WE3lWsS3U6UypHrdpX89liJb+v41AI3fLt+ys4aP7dfcQvXtHTfZ/XCTVvB1arZdAdO3zV6+vvqnx/8230VFj5b4gQ/+dZUHD0/SehYeB1/doqdZ0sPCKhEvifVYX8VLVxOz5HAH6CAGhBtcqJhkeiFb0fSp2LgY46l0zDAD88EUihgGSiC84Yc8tDBADusLoFk7g0dpSxcFHAXl0pSMPn8afxD0TOdBo/JqbeD8Ne6fM44YbF2PS0wy1wOcSUXlC8Seqx1C1ykVhQEw0+FajP9nrxMXFhJwXz2IZG2XLGkTmf+Ll2WIO8hiY7pXJDlVji8bVINrsaQoqLgkv4RFmR3Dpn8seDmWzMeGonHfa1ocMm5GDfhROsxhK9CuqCU34UD6Fu5RKdj4wqLtUT+xEYj0mVw8vQGVChpTYHd13NCxoHFf6WaweIYTpNAgabIOL/lsYelUDC+yDbaty+3I58YYeGTj08yGx/sJ395mM5CQZ5IJNzZCvklYu6Uc4dwYrhbYjry1+4lhFRFCMAPQXIpymtx3DH6wtj5pebZ/Jt+5yMi9WWa/IrHbFVwMs/pLCPHrNn8g9cZo+OqHXF4n16D8OzhlAuBAUR00Gtgw7cznKQ7+qWu/R+7IUuCJ3ZdWQqIiIMb2u+Zd9nB/SDTW1Y4KyiPiFqqje/2JwoMD5ymnP8frnCf9UN71ZSdY63/s5C/4iohhSUsZ2Q78zdYlBtnS/rQ67ROeqVIOi8UgrCzb3eEMazMagDp2aEmfob45XtPny/UE0Zz8PrAuuZwE3tYqaiV2U7pCQ1wHc4pXjswhrH4ZZqQ5smVcdOtmk64IBsfblwGF2eapLkfGEL6qjkXxWMKP3I8AFO3T9Mf5hpHqyOvd/yrMv0gFOF1Zi7qoIVuwKg11JTPOiHZSsMCZ2rbV+x9lfDFrmm+GyauEM8DFIpDR3FYmeIxtxvLy+J3xaQ2LV4iO3RMv76bWRGEYJetQ+eAI8CacPz0BbOUaohqvJxsTUNKQvmfGJvGbffg8XyvEFuUPRJ+L1l16Y9F9XCtYCKpv2Jw7FbRNXXgMjRba9I1CqZxKupJ+x5UH4oD5qduewd1fQ6Urz7UtYryK+IvszAo5I59kQualULXKq3mp8VS+Ecj+nvRBsiU8EXrg34lAZEwwgXh7/V5xb18Z+JcTCbzzrbhADhxzuT3wklVvlLta4T/eCejyxWvrGydgdjArNGWAf3jDL1SawYieMqP5EJ/gJ+P26geYB+12PV+jdVYiP381BCO/ffbXLRiCJT+448PHSXfXiOKLtyvVbcr8IU7p1lzvXM2P0D87mtZ/olU8QzZU0deo6ZF086CeUSNFKYzpdXDGcxz2DXrZSTf1JBQjDHUddu3WW2AUVGvc/ROsYZzej14e1Z7zEftk7hL7XlgNNqNttTMLJbllA04coA+6izvfGf3TRPUWvTvmIE99gh1Icos4T7f5x2tZUxWeDb3EJ29DwXDChPJ4Zh+DuyBZdNq4T58wkVGp9hAbniA2NnZ+P6wck5ZRlu9SQQZQVb1mEeR6zY8hy3T0JOZXZ9ROj9szrCrW1UCjvbqBJFVjF/IEUkzsnuKJBKUPp9q6+z1Ch/rfcOgJGs/SU6FRvfa6H7heUn7GlUIRHRYu38luMVPXDt0LJsqqDbd418Di3Yun1Sbw/dv8LYkxfz4/Vo3ddb74bPddQGi29NtybRsl2AKpPFBz1C32cRI66U99+w+kJC0gANCe4AC3k5dmX4dtmotzTK/VzG5Bq42VE49kTqN22hpmXJsbtXw0bGdgdblMVZfkvYH20s99Q91PwBPuk6DSx3JNzjDjgpYuKYoxNz79bk7HdW+IMrrbRzEtMzVBg4CxCJVVUz2TqCwL3JzBWYDOs50seRCq2YXD5Q/1bvSb/F/tF0JSezmOM2czri1osaoD35fUQi3UtZfn49rmE/e7l57RsP2+PzBEnAoC81wToWBeZLjYajJl/P+pFmtbb3n53dIBMVPOteyXlXbmIaW+K2hkU8eE2duUiGoWldlO+VxbHSCkO02VNeknXSQZi5vGOoItmnZzhm6Lv6OCflAsyEJ1kLQmBGchg2WY7EKDkTDgGqLjRFZAqHs1ZzJsZBTIwEUJymGnHuPGJ1QqJg3aOhP0qRCEJcu+/W4/vrHz/kx6vAugF7ZsI6lK2gVDxk8tjqUVS4ZEjdpgDBnVPb0tbDdBWK2k/3fukhQAsW1mVuxNyF3XxoKtu+PmXBbesQidi0GE7Ajwy0w3902f1vsaOP2qtXjw29PD+M/sxQC+AZPVRuGaCRGA29qN7T75qA2VYjGNl54iEw6lKN5RrZdKEAcgpg9vasZaaO2xCJUwkF21wDz/QDdZgLeqeZoUDj2bF3I+mvE6eXF6IkmmcqQEl3SPsYsBUdbfsY4WLK9Y8J3XM5kmJ75tDZiodTj5/MwC/JcROn4Zd9UI25G2F9U3dOe7gULWNRT+cd5U1/JQPK9FUs8l4FZBlcZBu7cMwpsLtSPF7TtepEMNnRtCAmQKurOaIwOC3xIWXsi2BE7wndGL9ZCgPsLAcp//w4aM0kBHLf3uIOPEP3eFuxii4Ao8EKSOlzbY+WQpfeVRTOnVsRw8bgW4BXg1jsaP2WmFObwqxCgovePjQ4XF2IZGHA7g9CqkJouGSsARuSZuhNNAwV9eqqvWETQkaN3LS2Alwe72ZyU4XNIncx0lRHU+1OKOpNEBRhSX3eoZQCncSAikGx85co70QpskU6xPXu0/haX1nCqnDTqwQVAv4yiz4wYhaO1jDl490M0/beILUjN/pMIpHymqfsOQqI4Ujdu4wKPE1Ro6AHbech5PO5pyhxBTurIJajQdBFC1/h6pk2dG/H2H2EXkPMBKAAJAZUOMaB4NX42wQ1WJwlPgLojAtaVPSIFmNi3ny2sqcGsEEfS7SFhJ1EVP89YW1UbDm+S8wBaFbrJCqo9AVPfE1YJY93TkgYotJ3Cc6HScowibq+lLL8vh89LUIHqiV7U6oRgZNrJvliAITVEI4iMUj3IdRRjorsgmwUKlrcnqP8XUq/XDETUR8DtotmGY4VZhtxLhHnCcYDm2LNhgBZh0lhxz0cKbPR1iug4g10jme95j7JNhxf6jrUAmK15XuHOlsgGdsE/rHySriDpwPL5yLdF3zV/RVYVxmwI91VtBKAdUYLAFa7QAi9tggnhKYgGBoCNtt5kkLNNLnGmQ2d4O71e382OZSzOAMPPK9B2KHujr/Gj6TqaPExTi25XdTLuehRYEIPcCnP6JfTw+kWuojjCqbyW6Dsv/+UTt8Q/nrPbCql789dH3DP+yuPFc6wlTN7RyC7Oy9v6Eth6TBEOfVEPys2zL26hfJkCEzxrWEXbF1N1CiVtt9vXakggtXRjoCW9w45g8OI7tU6KTQzK/MrXOV4dYMqs96lixXrLG4as9hcpiE0/S/3OIQ8t8EUxE4whT2uMsUgFUN0OZW+LPED3rt6/wUt6i6s7dRjqpV184DhwZfiqSqYTWya0Hwoq7g8mHTdiIV3utlAd925FMWWvKC9It+JmK/e+Do5SepknyQP8DSgu1HHhnXOLb81zXL9wjvqpDHerlM/HITMJl5UXxbAGWxkxSY8Y+ttLM9UpVtiV4ec4fsGnsn1vuLHxqk+Ek1o97clkqHpyH6CtrV+iW0esqZqrQDNuPdPTbJ6Q+BDI6ddMp9pKlfwbp2/zkunZLnwnOS54x4VVc1PmjZw32jJZc294N3vzEczEk0ea+ktRCO5cOeqoHSg+cTp27kb8t2a6Jl4SgakcfWJMuLeO0hlRuodJcfDnWM723J+D7lkSx0IhuD24Cn8tyt40iSF/DT03F3yCQkXHHcOQBJAfDniRA2kuQhNNkwFjk7z8FcTCtk2XQXTpXokWp+k0OurHidStDO+JrFVyzcKVukrG2fWcs3uKTbVcJJBj3xvKBIL3aDvdnMixNDN2IAHpcD9+mUmmNXhTWYe5oAx6TOfmm2XAdMV3P/nqzz47Lp3an4uXPYd9J16C9i/Pv89BlT/IHEc/XcO6mED2rN9sVr25Z7X+ZIyvlXzszDjv0IJQgzTX2NVOxrdqHlEiqeTsagRoJCXrt8b0JyEadRNCN9OqHgZAuSAgIuDpgmkkwcSkN20Kw8WhhSG2oxqJtMoTXemo3l+8w3rNbM7MW1iXUNYv66LN9/akEAlAfRdyfSg/gQpg1pPqh+JhDWlJopFzyWc6H6UmFIrGlxcYGZMgGRXJuhmia3JMuH3xrK0Oj4hwaI3TyIyQ2V45ydqI+M6LQJG+zgaZMj145Y+idKoX8n33WE6bqFgqCx0YPRbmrzdmS6UTKt7/aWJUn+anO5wq7CzVdKEb4jxSUnFXL8i68GVWQs7uYSH3twUp4go3V8lXfcW3lOnVoKo1uCUQno1tV7jnsZFJllpauvUmkzKKiu1VhcalOe62ybZVVl1UaF0QTiJ2XVyk0B8K5OhUoSB9kvFmV1aNbsjzgjAC0LcCZ62c7favizvvZLop/ILhWeLM9Njs0wYHsnvUz4dTYdyKSR+lcle6SCumkp1fAlLQfR0DPZTnAVuUiwvlGAtF+82YklI0Y6c46Qs32IqCOyCG4yjaDD0ajI4HUhpf+RWDa9HPlFjczDDuROVaywiSt9uRHIYXkphybr89dt2vTaXVKQPoVrFTWeWdjyca7Wi/jE5BQuxSDP2iIZ1zufqMnk5r9WlfelxUWmYF6bllvaqPkiYXc1NAbO22Iaej6mrE1L6PMmppFJC+4umxqlhXWohUzYWRl2h6KP8ChxA9hifPvQpX1pqIar57qAiaVuop6zkNnWI8ScW0eRMW6mEKS1qzpwGb7dp4+GAkCStjMW14rE28na3uTKI65SEqcrjjfqSRNIicmWORapTMW8h2zXDl32hOMlt3OHiWneDj5NsfGo5Clv3Wb9U9qhPkH+O3A4aTjKhp9Q6ehZivOUTQOFQ0WundUlwWNsWlFsckmdXWMm1/V66mR5DqcWt0jU92ScCMSPsnW62X1n+gxvbli0wx2gVk94UnxLO6cw7pBYqaUWTsc36aczZB6KaFyZ1Rk3u/CzaC9EMc55iI2Rp5KiinLtcPLBKnftM9Nm5Nl589UtnFXdvxwtk/stO8HCtXt247hU2ergVW6twjGUEms+4/7J7ZCOkJuFsyVod3assY4lxjN6OZj3EPZTpxdlIwdPgx1lhOma6qVhlGvh19x4v9eqbJZLVJMx09aMAaAesnouGnCU/dqUKkuh1lDPNBfItH1X2W3l9IVqd2pUcBap4vc64zn/RiVXQryMhN/F1IEboDJstO+5QmKYv+wkNQCPP0dm+4tA4Y4TZH72uzIztzaguvNhFcItDSYF7Dj9bKO72arvaE9a5ylaNUw31AzFS7TxSn0KstnjI97jHSrwhzxWDWe4q8x1eHbv79teDVbZJg7JNqCjZTWKLbO7Sc9lJRTkwOSKgvHcDep2Psn1jYL/vyWlvm3iX+bJ3ZDONHBU9FJvdhlZxe5Wu3AE9DNanFArMMbrHSq4NTZ/Og1xI+jNaypqmc+w+dCZ1XoXDNrHlJIx0yRwEjHqd3GuNyjO6/rUlPOYTWqSovY9nYWEJatq3djs5ccXEElUyTb+7MSDntCDfWzXn3xNcnzPMTRUSw8ttYz9Wfos6nx/+5cK8ErZ5/KamXfzBWT8lwv7pyZBJmb/9j6KMm2Mre81Cmr9Dul3I38WULtxMU62MDGDVwoTFvs9WotQqzOOiRspnd7fM7m6r724qlG2HXwdg7dYF3IE9/9aiWltByKi483o8+jt+G1BeRHejnLxa7IzdQ542oyeSazI6vJDDG/YQhHPckXOwVHjbYU29C0BnUga6YF8GnD9OMtQ8/0E3J7HKch66NjVgcM+ufkSlcEMXIguITOkDZ8uUAfH1zarU5+MONa+RzUPNYgn4zF08ksWEVI85lMyaEVidg7QHkPeAdXVTMAVPTmUL+4LArutl8Rei2PoBlyJoLBgCxXirXmDso0RHg1c404Ot7BZcxcxBZf0eO1E4cJzwBS5ECAoyA+BcbfgF7jZ9rcAAfsQWZUZYIM/C4df7aflRlOzv8t6E9rrropsowfNPQcH8Ofz4sPGT8SL5Qh2YNHcPNcj60DMaZpeVoOh9ymAGTqXqdtGUKLIg9NlOxRqNO74n1kfhbfSfIKfDJ4OrVOZmP/kExX2VhjzFECGx7FUaqOQuu0abqMO5kntiO1tn8RaUdTMaaVoBEfNJPlW+6VcW2vOY8GfdsfXg1FJFa0H7oQsj9RYf6RjMtuUTV2G+yblcaatHeR7q0bPKVoeCB+F4MWVBQHfSN2MIn7thmbSOYqq1TxZyXlawNeUq+FPeShGXaq/e4GavG+cEf+JInzZC34h1zta1al7Qh0DucBlZVATZUwQyiwEMmmlAUwgQbwCsFGyaNXDNVtY72ZS049ualMOhMCq6+hxwLVsjotCCUQjzgdfgUItNUoJJUtyEp3MoyRRGGNLZxFzX3V3zd8we1uy+4hZ4m0PMeeSdy993YNwVCi3nl+2rudFFuZp+ogrlCT6jnrHcfDNhnlc5f81xnp1BCDa5NrvlzOigrSNUnia6opwpLYKQY686xiidTAyxSl8SeoEJFUQFMA21l4C0nu/8KgZ58urD2npcPhp8F238DtsdtrxtLfENt0JTbheifcFg/BUg2y9Te5o+B4qcitSHF9k0u3zSBvOm9lhmSWHPgJwlk2WX+to7WArs2S37ow1qnBTM4RGO1KDP9YUfmPTysT51aantlzxJhbJpiYv0TB8PK+M1S5EFocpO1a2L+Ox/k6HudjfvRu1JACB+8bhXYVyBmyTPzULu1PFAsoJPjxkFm4Qp38dsKjS3BFF8MPoCONt3dwVJWT6Lpaavlwfl0VN5KSNjpFmEdYLpko534TsNqO6/DLBt9PtVMhat2Fwiq9Q0hs/BqLDCXuoA8ENHzJsf6+NiGzZ0t+E+q00oZR4YLyKkTurGMpTS70VmU/+HQ1leUX7XD67xn8W1ZgwJVprRGsP74ScSRa1Rtg+J7/pH0GP+yMOCu+IRO+VTBOnEjauu/MzkeJCo+ZQE4gW5S3lHcJcwzVrc1C0k0DqNOJUm+RBUP6+CHROhtYxwlCIhjEwIeOYi4trOKRsXiuKCIkeZwpr0r+GKlm5tXJFfxUlJPTQppKzH/aR/OHLluoLfGKeuhzLhwk5HdtbczFoh51OpuWNpbJd3TEeUwBbFMtgm7F/ndMvH1f9+gQMk5DD0gmFSt920ZDehEw5VRAswvMgnL7ka+irncnFgDeBzOqQ2DFsKEnYndVlao48bEyKj9BGMkGLA57NZGtdYrLCc8LPuLTwH5wyT8ykgg98Yk3ttBtqTy8HurppNiMWTFOKYrAhOAEUlOTI9QTZA4rtymyFmiPWcLand9bYCOfB/ug1SIwwQnjDgnh5lKdtjgky5RIyKo0pCAvI7XWxcNCpilAIjnTiTlJ9EVs7labivqjg+xQq2qYdkZUgVVKjq7/9ag+MmIheVL6WYGlbUV6DHpj2zfOsN/NU1qk6Jpp1xdLGM2SUcZIT29pZB5x3MbfwF/fLd18EvpFZi7kLeVocM7/1c3OXLLdwJty6o1jJA5iPTiC4feTSlSDs85V0wudwYGE7zTDWF6bwQyhS15kTBLL90gx+mSl5YfBi6M6TIDEM+kXAtGBFjVlcTsEpdATLsUXCK+7VWMN0yPEd9G73keW0sS43n6iIVkAyBPRyMEE9cErbfj+u+uLNyEKCSOkSrEgJ1v8oK+9VEkIHvUR26yqtNWhuLTdMZIVHYqV5pBpt15AD8A5VHRUvOPN29FSO+8ew4SA/DNddt8oG7XgP7WYnGYUUAVeKm2i9Q6zFH5Bpyqmdfw6sFQV2OpihI8PPxx5jqiqkN15jWKO7gg8L363Sr9jQB/nZpZdNzzQWycxOVNwbbuNgwrkk8vqMt4/g3SjcT3Z1kO1bI+MILxFrfNmHu3JjEHwUPxVKFD3+Yhwi0HB8bHMgWcTg1DAjp79UVQWEBEVtYqxqPZJhnrSfdeyyRW9FYe/Sp269H4nIJ+85225Qo14yQNJfOl3W47f8AGtry4/D3OiujuxJMUWhx9teW7v5Qgyu/e+l+LiudLN0jnKkJnAAEpovL/3piwoah5ckoBEq/15r/RhbonG/sj0aFLFp1857pQjzEYrVErvCu3XVLFDoBzmZW0q6rF8oygI7D6+z39WCUe5yMgDtE+uZa3N0nxuUZOJoOkNNHProiBAw5QZoF3oaOF+Aj70L7vn8MiZQ5eTOsIN/OxCR8eJXezKkQ56qqLkVKe3CLu+AdboSWaXp/iCWdcYP0Y462m3hbVI1BzIevHzp55ul0/q7D8fzBiwOA3EgCP534E6H1gDzLC1vZbwE0Vl5qcPMtCmQyGEU9BDmlVRtdjrU9CaXJw9RiK1WMVnSqtR8BO1CJg0OhBvttBAVeUbYnwl09NkjokELchjbZZV7atY5KGJxYUfNGS64LNsvBX0nG6UBhHB7Rj6lgc0NIovm5PJYiZHaEAzSFa8LBwoTU+PvJcDnTk1hQRd0Cp62/mwzcNG94e++Om5EJvUKNMPmPsXf/FU58fsvIlDgvnjFaRkRPMfVIdUrweWB88nQFaTe67rzJ9+EK2oSv725Gv309dDz2Pks52Mmqu214fJBrtPcmBxfTwJepCtrA8XNwwnAOub8ZjeSDV4ltSHBzxlRKUfWZbl35KYNNDbmP99onATfE9686N6zidx1sed9Gczy+Q+ZhgTcULUc6K2H3JyDuVCloPac09RPltr6JLSD22UFkR0Aj5bYX6NevIgpD5FsdbGqBooN+nlRrms580rOlFl4Teh+6IF8sQES+UYQ1EfA5tH3TO8zM7rI8lEJ0IyaM1x4BYoLWguVtv9tHTLDcNCk3fNh3eKjgkHYNOfC7PXFZw+2TEhDWGt2gM6mmDSUEraUDmiQcqm0cKikZGWx448Du3GxgokXAcrlBa5mBxIbDFikCUOPjh7n5kUwsXWzTXuKZ24SfbFCF9iTYNy2oLHfbC+h2Anqe4UkutRfWXdD9C3V3cmopBjc5UqZd/UZBbL2kk45hcE6Axw+/wneWAZ+NYobI5SLIAulEo1ICQXlrCUcnKS8iIOqyOnNrqDNjKgbg9DuVo3eC/KQlGHYzXgQSxYagtAF+/hH8BggsoEd5pWFjuABVVrgAoa1oETGHQtHaukBUh4sETwF8WcAUFBDBlwg4ECRNcqp26A4nAmPGwzbcnWknjIWbJ/os7LxbdltSEhmgC5NwAvDSwQjkCp/yF8l6mUH4TQm1LKpUWVGCgAoZMBE+58lHrih//Zv1ML8rxYO4NkE/Fu8Z/31XwU+cyDn2sZJNAp/k4W12bz3O4Nv41HnyAiyNezA76pU/JS/73eBuEPXX18LqPLp1t9weEcW4VmdNkx6b32eZXlX6YsmjT8x3A+yBUb3PpEdL8AVcB5Q77kcHip+GhH7XI7OkccRp+pmPGLEO+rClBNSOQPKAmqk3EnybUKU6B1VM1LLAiRDVdCYIuyWo/PLZObqTL99ogi6f8w/Zt+JAFgZSFW387WeqEM8p9GYlrcIyd82D0RMLeqwesdS7U98qUCoouJPlQdsbny6XsU5z7U7JayX135INNTzZCpTbjWP0QNh0G/3skJvN+cYv34bpM58zg/SZQzI5gnoxf2C4WovXcFlo4byite4FpF0/bz7zESslMfq4NsJ1gEGbwG3/8ay+/Wc4yOtz9x9xwHyQSqsGZY4GPWJ6XBfz/sNdaZR1lcxpjc3Ll2oC3/WJ+Xz6rmHxcdxZHpClKgqiWbmZEYBPnjRhytlL4kos67A6SfIUz6COPvWOS4hrSF8Wl/u19O54W+AkK56NnWmW5pmqY5TbHTgdClLDAg92AslKZcu4X3qsiluFx62lA5XZqgqDRo5YYWsqdyk9Vn0Y+5BFggcC5MZ4D5FEs0V4sEK8EA/wPcpDFlWMyvg8WKeNgWb7EbHbqR1d92dlSn0E8nRsdOo+z3J7tbSAC3f9e3SzDJB5xVXbt+Zq3ayiGJzf4KV4Mfkf","base64")).toString()),Jq)});var gs={};Vt(gs,{convertToZip:()=>MIt,convertToZipWorker:()=>Xq,extractArchiveTo:()=>KIe,getDefaultTaskPool:()=>YIe,getTaskPoolForConfiguration:()=>VIe,makeArchiveFromDirectory:()=>LIt});function NIt(t,e){switch(t){case"async":return new Kv(Xq,{poolSize:e});case"workers":return new Jv((0,Zq.getContent)(),{poolSize:e});default:throw new Error(`Assertion failed: Unknown value ${t} for taskPoolMode`)}}function YIe(){return typeof zq>"u"&&(zq=NIt("workers",ps.availableParallelism())),zq}function VIe(t){return typeof t>"u"?YIe():Vl(OIt,t,()=>{let e=t.get("taskPoolMode"),r=t.get("taskPoolConcurrency");switch(e){case"async":return new Kv(Xq,{poolSize:r});case"workers":return new Jv((0,Zq.getContent)(),{poolSize:r});default:throw new Error(`Assertion failed: Unknown value ${e} for taskPoolMode`)}})}async function Xq(t){let{tmpFile:e,tgz:r,compressionLevel:s,extractBufferOpts:a}=t,n=new hs(e,{create:!0,level:s,stats:el.makeDefaultStats()}),c=Buffer.from(r.buffer,r.byteOffset,r.byteLength);return await KIe(c,n,a),n.saveAndClose(),e}async function LIt(t,{baseFs:e=new Yn,prefixPath:r=vt.root,compressionLevel:s,inMemory:a=!1}={}){let n;if(a)n=new hs(null,{level:s});else{let f=await le.mktempPromise(),p=K.join(f,"archive.zip");n=new hs(p,{create:!0,level:s})}let c=K.resolve(vt.root,r);return await n.copyPromise(c,t,{baseFs:e,stableTime:!0,stableSort:!0}),n}async function MIt(t,e={}){let r=await le.mktempPromise(),s=K.join(r,"archive.zip"),a=e.compressionLevel??e.configuration?.get("compressionLevel")??"mixed",n={prefixPath:e.prefixPath,stripComponents:e.stripComponents};return await(e.taskPool??VIe(e.configuration)).run({tmpFile:s,tgz:t,compressionLevel:a,extractBufferOpts:n}),new hs(s,{level:e.compressionLevel})}async function*_It(t){let e=new WIe.default.Parse,r=new GIe.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});e.on("entry",s=>{r.write(s)}),e.on("error",s=>{r.destroy(s)}),e.on("close",()=>{r.destroyed||r.end()}),e.end(t);for await(let s of r){let a=s;yield a,a.resume()}}async function KIe(t,e,{stripComponents:r=0,prefixPath:s=vt.dot}={}){function a(n){if(n.path[0]==="/")return!0;let c=n.path.split(/\//g);return!!(c.some(f=>f==="..")||c.length<=r)}for await(let n of _It(t)){if(a(n))continue;let c=K.normalize(ue.toPortablePath(n.path)).replace(/\/$/,"").split(/\//g);if(c.length<=r)continue;let f=c.slice(r).join("/"),p=K.join(s,f),h=420;switch((n.type==="Directory"||(n.mode??0)&73)&&(h|=73),n.type){case"Directory":e.mkdirpSync(K.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.mkdirSync(p,{mode:h}),e.utimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break;case"OldFile":case"File":e.mkdirpSync(K.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.writeFileSync(p,await GE(n),{mode:h}),e.utimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break;case"SymbolicLink":e.mkdirpSync(K.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.symlinkSync(n.linkpath,p),e.lutimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break}}return e}var GIe,WIe,Zq,zq,OIt,JIe=Ct(()=>{Ve();bt();rA();GIe=Ie("stream"),WIe=et(_Ie());HIe();kc();Zq=et(qIe());OIt=new WeakMap});var ZIe=L(($q,zIe)=>{(function(t,e){typeof $q=="object"?zIe.exports=e():typeof define=="function"&&define.amd?define(e):t.treeify=e()})($q,function(){function t(a,n){var c=n?"\u2514":"\u251C";return a?c+="\u2500 ":c+="\u2500\u2500\u2510",c}function e(a,n){var c=[];for(var f in a)a.hasOwnProperty(f)&&(n&&typeof a[f]=="function"||c.push(f));return c}function r(a,n,c,f,p,h,E){var C="",S=0,P,I,R=f.slice(0);if(R.push([n,c])&&f.length>0&&(f.forEach(function(U,W){W>0&&(C+=(U[1]?" ":"\u2502")+" "),!I&&U[0]===n&&(I=!0)}),C+=t(a,c)+a,p&&(typeof n!="object"||n instanceof Date)&&(C+=": "+n),I&&(C+=" (circular ref.)"),E(C)),!I&&typeof n=="object"){var N=e(n,h);N.forEach(function(U){P=++S===N.length,r(U,n[U],P,R,p,h,E)})}}var s={};return s.asLines=function(a,n,c,f){var p=typeof c!="function"?c:!1;r(".",a,!1,[],n,p,f||c)},s.asTree=function(a,n,c){var f="";return r(".",a,!1,[],n,c,function(p){f+=p+` -`}),f},s})});var Qs={};Vt(Qs,{emitList:()=>UIt,emitTree:()=>tCe,treeNodeToJson:()=>eCe,treeNodeToTreeify:()=>$Ie});function $Ie(t,{configuration:e}){let r={},s=0,a=(n,c)=>{let f=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of f){if(!h)continue;let{label:E,value:C,children:S}=h,P=[];typeof E<"u"&&P.push(Kd(e,E,2)),typeof C<"u"&&P.push(Ut(e,C[0],C[1])),P.length===0&&P.push(Kd(e,`${p}`,2));let I=P.join(": ").trim(),R=`\0${s++}\0`,N=c[`${R}${I}`]={};typeof S<"u"&&a(S,N)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return a(t.children,r),r}function eCe(t){let e=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Jd(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,c]of s)c&&(a[HIt(n)]=e(c));return typeof r.value>"u"?a:{value:Jd(r.value[0],r.value[1]),children:a}};return e(t)}function UIt(t,{configuration:e,stdout:r,json:s}){let a=t.map(n=>({value:n}));tCe({children:a},{configuration:e,stdout:r,json:s})}function tCe(t,{configuration:e,stdout:r,json:s,separators:a=0}){if(s){let c=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let f of c)f&&r.write(`${JSON.stringify(eCe(f))} -`);return}let n=(0,XIe.asTree)($Ie(t,{configuration:e}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502 -$1`).replace(/^│\n/,"")),a>=2)for(let c=0;c<2;++c)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502 -$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function HIt(t){return typeof t=="string"?t.replace(/^\0[0-9]+\0/,""):t}var XIe,rCe=Ct(()=>{XIe=et(ZIe());Qc()});var LR,nCe=Ct(()=>{LR=class{constructor(e){this.releaseFunction=e;this.map=new Map}addOrCreate(e,r){let s=this.map.get(e);if(typeof s<"u"){if(s.refCount<=0)throw new Error(`Race condition in RefCountedMap. While adding a new key the refCount is: ${s.refCount} for ${JSON.stringify(e)}`);return s.refCount++,{value:s.value,release:()=>this.release(e)}}else{let a=r();return this.map.set(e,{refCount:1,value:a}),{value:a,release:()=>this.release(e)}}}release(e){let r=this.map.get(e);if(!r)throw new Error(`Unbalanced calls to release. No known instances of: ${JSON.stringify(e)}`);let s=r.refCount;if(s<=0)throw new Error(`Unbalanced calls to release. Too many release vs alloc refcount would become: ${s-1} of ${JSON.stringify(e)}`);s==1?(this.map.delete(e),this.releaseFunction(r.value)):r.refCount--}}});function zv(t){let e=t.match(jIt);if(!e?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var iCe,eG,tG,MR,Jr,jIt,rG=Ct(()=>{Ve();bt();bt();rA();iCe=Ie("crypto"),eG=et(Ie("fs"));nCe();Fc();E0();kc();Yo();tG=WE(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),MR=WE(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Jr=class t{constructor(e,{configuration:r,immutable:s=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.refCountedZipFsCache=new LR(e=>{e.discardAndClose()});this.cacheId=`-${(0,iCe.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=s,this.check=a;let{cacheSpec:n,cacheKey:c}=t.getCacheKey(r);this.cacheSpec=n,this.cacheKey=c}static async find(e,{immutable:r,check:s}={}){let a=new t(e.get("cacheFolder"),{configuration:e,immutable:r,check:s});return await a.setup(),a}static getCacheKey(e){let r=e.get("compressionLevel"),s=r!=="mixed"?`c${r}`:"";return{cacheKey:[MR,s].join(""),cacheSpec:s}}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${rI(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=zv(r).hash.slice(0,10);return`${rI(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:s}=zv(e);if(r===null||r{let pe=new hs,Be=K.join(vt.root,j8(e));return pe.mkdirSync(Be,{recursive:!0}),pe.writeJsonSync(K.join(Be,Er.manifest),{name:cn(e),mocked:!0}),pe},E=async(pe,{isColdHit:Be,controlPath:Ce=null})=>{if(Ce===null&&c.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!Be?zv(r).cacheKey:this.cacheKey,we=!c.skipIntegrityCheck||!r?`${g}/${await BQ(pe)}`:r;if(Ce!==null){let fe=!c.skipIntegrityCheck||!r?`${this.cacheKey}/${await BQ(Ce)}`:r;if(we!==fe)throw new Yt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let ye=null;switch(r!==null&&we!==r&&(this.check?ye="throw":zv(r).cacheKey!==zv(we).cacheKey?ye="update":ye=this.configuration.get("checksumBehavior")),ye){case null:case"update":return{isValid:!0,hash:we};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Yt(18,"The remote archive doesn't match the expected checksum")}},C=async pe=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Yr(this.configuration,e)}`);let Be=await n(),Ce=Be.getRealPath();Be.saveAndClose(),await le.chmodPromise(Ce,420);let g=await E(pe,{controlPath:Ce,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},S=async()=>{if(f===null||!await le.existsPromise(f)){let pe=await n(),Be=pe.getRealPath();return pe.saveAndClose(),{source:"loader",path:Be}}return{source:"mirror",path:f}},P=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Yr(this.configuration,e)}`);if(this.immutable)throw new Yt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}`);let{path:pe,source:Be}=await S(),{hash:Ce}=await E(pe,{isColdHit:!0}),g=this.getLocatorPath(e,Ce),we=[];Be!=="mirror"&&f!==null&&we.push(async()=>{let fe=`${f}${this.cacheId}`;await le.copyFilePromise(pe,fe,eG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(fe,420),await le.renamePromise(fe,f)}),(!c.mirrorWriteOnly||f===null)&&we.push(async()=>{let fe=`${g}${this.cacheId}`;await le.copyFilePromise(pe,fe,eG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(fe,420),await le.renamePromise(fe,g)});let ye=c.mirrorWriteOnly?f??g:g;return await Promise.all(we.map(fe=>fe())),[!1,ye,Ce]},I=async()=>{let Be=(async()=>{let Ce=c.unstablePackages?.has(e.locatorHash),g=Ce||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,we=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,ye=!!c.mockedPackages?.has(e.locatorHash)&&(!this.check||!we),fe=ye||we,se=fe?s:a;if(se&&se(),fe){let X=null,De=g;if(!ye)if(this.check)X=await C(De);else{let Re=await E(De,{isColdHit:!1});if(Re.isValid)X=Re.hash;else return P()}return[ye,De,X]}else{if(this.immutable&&Ce)throw new Yt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}; consider defining ${he.pretty(this.configuration,"supportedArchitectures",he.Type.CODE)} to cache packages for multiple systems`);return P()}})();this.mutexes.set(e.locatorHash,Be);try{return await Be}finally{this.mutexes.delete(e.locatorHash)}};for(let pe;pe=this.mutexes.get(e.locatorHash);)await pe;let[R,N,U]=await I();R||this.markedFiles.add(N);let W=()=>this.refCountedZipFsCache.addOrCreate(N,()=>R?h():new hs(N,{baseFs:p,readOnly:!0})),te,ie=new iE(()=>i3(()=>(te=W(),te.value),pe=>`Failed to open the cache entry for ${Yr(this.configuration,e)}: ${pe}`),K),Ae=new Hf(N,{baseFs:ie,pathUtils:K}),ce=()=>{te?.release()},me=c.unstablePackages?.has(e.locatorHash)?null:U;return[Ae,ce,me]}},jIt=/^(?:(?(?[0-9]+)(?.*))\/)?(?.*)$/});var _R,sCe=Ct(()=>{_R=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(_R||{})});var qIt,KI,nG=Ct(()=>{bt();Bc();Np();Yo();qIt=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,s)=>`${r}#commit=${s}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(t,e)=>PQ({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],KI=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let s=K.join(e.cwd,Er.lockfile);if(!le.existsSync(s))return;let a=await le.readFilePromise(s,"utf8"),n=cs(a);if(Object.hasOwn(n,"__metadata"))return;let c=this.resolutions=new Map;for(let f of Object.keys(n)){let p=JB(f);if(!p){r.reportWarning(14,`Failed to parse the string "${f}" into a proper descriptor`);continue}let h=ul(p.range)?On(p,`npm:${p.range}`):p,{version:E,resolved:C}=n[f];if(!C)continue;let S;for(let[I,R]of qIt){let N=C.match(I);if(N){S=R(E,...N);break}}if(!S){r.reportWarning(14,`${ni(e.configuration,h)}: Only some patterns can be imported from legacy lockfiles (not "${C}")`);continue}let P=h;try{let I=Xd(h.range),R=JB(I.selector,!0);R&&(P=R)}catch{}c.set(h.descriptorHash,Vs(P,S))}}supportsDescriptor(e,r){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");let a=this.resolutions.get(e.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");let n=M8(a),c=s.project.configuration.normalizeDependency(n);return await this.resolver.getCandidates(c,r,s)}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}});var uA,oCe=Ct(()=>{Fc();xv();Qc();uA=class extends ho{constructor({configuration:r,stdout:s,suggestInstall:a=!0}){super();this.errorCount=0;HB(this,{configuration:r}),this.configuration=r,this.stdout=s,this.suggestInstall=a}static async start(r,s){let a=new this(r);try{await s(a)}catch(n){a.reportExceptionOnce(n)}finally{await a.finalize()}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){}reportCacheMiss(r){}startSectionSync(r,s){return s()}async startSectionPromise(r,s){return await s()}startTimerSync(r,s,a){return(typeof s=="function"?s:a)()}async startTimerPromise(r,s,a){return await(typeof s=="function"?s:a)()}reportSeparator(){}reportInfo(r,s){}reportWarning(r,s){}reportError(r,s){this.errorCount+=1,this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} ${this.formatNameWithHyperlink(r)}: ${s} -`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,s){}async finalize(){this.errorCount>0&&(this.stdout.write(` -`),this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command. -`),this.suggestInstall&&this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help. -`))}formatNameWithHyperlink(r){return u6(r,{configuration:this.configuration,json:!1})}}});var JI,iG=Ct(()=>{Yo();JI=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(SQ(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){let a=s.project.storedResolutions.get(e.descriptorHash);if(a){let c=s.project.originalPackages.get(a);if(c)return[c]}let n=s.project.originalPackages.get(SQ(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.originalPackages.get(e.locatorHash);if(!s)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return s}}});function Zp(){}function GIt(t,e,r,s,a){for(var n=0,c=e.length,f=0,p=0;nP.length?R:P}),h.value=t.join(E)}else h.value=t.join(r.slice(f,f+h.count));f+=h.count,h.added||(p+=h.count)}}var S=e[c-1];return c>1&&typeof S.value=="string"&&(S.added||S.removed)&&t.equals("",S.value)&&(e[c-2].value+=S.value,e.pop()),e}function WIt(t){return{newPos:t.newPos,components:t.components.slice(0)}}function YIt(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function cCe(t,e,r){return r=YIt(r,{ignoreWhitespace:!0}),cG.diff(t,e,r)}function VIt(t,e,r){return uG.diff(t,e,r)}function UR(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?UR=function(e){return typeof e}:UR=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UR(t)}function sG(t){return zIt(t)||ZIt(t)||XIt(t)||$It()}function zIt(t){if(Array.isArray(t))return oG(t)}function ZIt(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function XIt(t,e){if(t){if(typeof t=="string")return oG(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oG(t,e)}}function oG(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r"u"&&(c.context=4);var f=VIt(r,s,c);if(!f)return;f.push({value:"",lines:[]});function p(U){return U.map(function(W){return" "+W})}for(var h=[],E=0,C=0,S=[],P=1,I=1,R=function(W){var te=f[W],ie=te.lines||te.value.replace(/\n$/,"").split(` -`);if(te.lines=ie,te.added||te.removed){var Ae;if(!E){var ce=f[W-1];E=P,C=I,ce&&(S=c.context>0?p(ce.lines.slice(-c.context)):[],E-=S.length,C-=S.length)}(Ae=S).push.apply(Ae,sG(ie.map(function(fe){return(te.added?"+":"-")+fe}))),te.added?I+=ie.length:P+=ie.length}else{if(E)if(ie.length<=c.context*2&&W=f.length-2&&ie.length<=c.context){var g=/\n$/.test(r),we=/\n$/.test(s),ye=ie.length==0&&S.length>Ce.oldLines;!g&&ye&&r.length>0&&S.splice(Ce.oldLines,0,"\\ No newline at end of file"),(!g&&!ye||!we)&&S.push("\\ No newline at end of file")}h.push(Ce),E=0,C=0,S=[]}P+=ie.length,I+=ie.length}},N=0;N{Zp.prototype={diff:function(e,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.callback;typeof s=="function"&&(a=s,s={}),this.options=s;var n=this;function c(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=e.length,h=1,E=f+p;s.maxEditLength&&(E=Math.min(E,s.maxEditLength));var C=[{newPos:-1,components:[]}],S=this.extractCommon(C[0],r,e,0);if(C[0].newPos+1>=f&&S+1>=p)return c([{value:this.join(r),count:r.length}]);function P(){for(var R=-1*h;R<=h;R+=2){var N=void 0,U=C[R-1],W=C[R+1],te=(W?W.newPos:0)-R;U&&(C[R-1]=void 0);var ie=U&&U.newPos+1=f&&te+1>=p)return c(GIt(n,N.components,r,e,n.useLongestToken));C[R]=N}h++}if(a)(function R(){setTimeout(function(){if(h>E)return a();P()||R()},0)})();else for(;h<=E;){var I=P();if(I)return I}},pushComponent:function(e,r,s){var a=e[e.length-1];a&&a.added===r&&a.removed===s?e[e.length-1]={count:a.count+1,added:r,removed:s}:e.push({count:1,added:r,removed:s})},extractCommon:function(e,r,s,a){for(var n=r.length,c=s.length,f=e.newPos,p=f-a,h=0;f+1"u"?r:c}:s;return typeof t=="string"?t:JSON.stringify(aG(t,null,null,a),a," ")};Zv.equals=function(t,e){return Zp.prototype.equals.call(Zv,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};lG=new Zp;lG.tokenize=function(t){return t.slice()};lG.join=lG.removeEmpty=function(t){return t}});var ACe=L((Ter,fCe)=>{var tCt=xc(),rCt=oI(),nCt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iCt=/^\w*$/;function sCt(t,e){if(tCt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||rCt(t)?!0:iCt.test(t)||!nCt.test(t)||e!=null&&t in Object(e)}fCe.exports=sCt});var gCe=L((Rer,hCe)=>{var pCe=bk(),oCt="Expected a function";function AG(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(oCt);var r=function(){var s=arguments,a=e?e.apply(this,s):s[0],n=r.cache;if(n.has(a))return n.get(a);var c=t.apply(this,s);return r.cache=n.set(a,c)||n,c};return r.cache=new(AG.Cache||pCe),r}AG.Cache=pCe;hCe.exports=AG});var mCe=L((Fer,dCe)=>{var aCt=gCe(),lCt=500;function cCt(t){var e=aCt(t,function(s){return r.size===lCt&&r.clear(),s}),r=e.cache;return e}dCe.exports=cCt});var pG=L((Ner,yCe)=>{var uCt=mCe(),fCt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ACt=/\\(\\)?/g,pCt=uCt(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(fCt,function(r,s,a,n){e.push(a?n.replace(ACt,"$1"):s||r)}),e});yCe.exports=pCt});var Im=L((Oer,ECe)=>{var hCt=xc(),gCt=ACe(),dCt=pG(),mCt=bv();function yCt(t,e){return hCt(t)?t:gCt(t,e)?[t]:dCt(mCt(t))}ECe.exports=yCt});var zI=L((Ler,ICe)=>{var ECt=oI(),ICt=1/0;function CCt(t){if(typeof t=="string"||ECt(t))return t;var e=t+"";return e=="0"&&1/t==-ICt?"-0":e}ICe.exports=CCt});var HR=L((Mer,CCe)=>{var wCt=Im(),BCt=zI();function vCt(t,e){e=wCt(e,t);for(var r=0,s=e.length;t!=null&&r{var SCt=qk(),DCt=Im(),bCt=kB(),wCe=Wl(),PCt=zI();function xCt(t,e,r,s){if(!wCe(t))return t;e=DCt(e,t);for(var a=-1,n=e.length,c=n-1,f=t;f!=null&&++a{var kCt=HR(),QCt=hG(),TCt=Im();function RCt(t,e,r){for(var s=-1,a=e.length,n={};++s{function FCt(t,e){return t!=null&&e in Object(t)}DCe.exports=FCt});var gG=L((jer,PCe)=>{var NCt=Im(),OCt=bB(),LCt=xc(),MCt=kB(),_Ct=Tk(),UCt=zI();function HCt(t,e,r){e=NCt(e,t);for(var s=-1,a=e.length,n=!1;++s{var jCt=bCe(),qCt=gG();function GCt(t,e){return t!=null&&qCt(t,e,jCt)}xCe.exports=GCt});var TCe=L((Ger,QCe)=>{var WCt=SCe(),YCt=kCe();function VCt(t,e){return WCt(t,e,function(r,s){return YCt(t,s)})}QCe.exports=VCt});var OCe=L((Wer,NCe)=>{var RCe=Gd(),KCt=bB(),JCt=xc(),FCe=RCe?RCe.isConcatSpreadable:void 0;function zCt(t){return JCt(t)||KCt(t)||!!(FCe&&t&&t[FCe])}NCe.exports=zCt});var _Ce=L((Yer,MCe)=>{var ZCt=kk(),XCt=OCe();function LCe(t,e,r,s,a){var n=-1,c=t.length;for(r||(r=XCt),a||(a=[]);++n0&&r(f)?e>1?LCe(f,e-1,r,s,a):ZCt(a,f):s||(a[a.length]=f)}return a}MCe.exports=LCe});var HCe=L((Ver,UCe)=>{var $Ct=_Ce();function ewt(t){var e=t==null?0:t.length;return e?$Ct(t,1):[]}UCe.exports=ewt});var dG=L((Ker,jCe)=>{var twt=HCe(),rwt=J4(),nwt=z4();function iwt(t){return nwt(rwt(t,void 0,twt),t+"")}jCe.exports=iwt});var mG=L((Jer,qCe)=>{var swt=TCe(),owt=dG(),awt=owt(function(t,e){return t==null?{}:swt(t,e)});qCe.exports=awt});var jR,GCe=Ct(()=>{Fc();jR=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return this.resolver.supportsDescriptor(e,r)}supportsLocator(e,r){return this.resolver.supportsLocator(e,r)}shouldPersistResolution(e,r){return this.resolver.shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.resolver.bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(e,r,s,a){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(e,r){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}}});var Yi,yG=Ct(()=>{Fc();Yi=class extends ho{reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,r){return r()}async startSectionPromise(e,r){return await r()}startTimerSync(e,r,s){return(typeof r=="function"?r:s)()}async startTimerPromise(e,r,s){return await(typeof r=="function"?r:s)()}reportSeparator(){}reportInfo(e,r){}reportWarning(e,r){}reportError(e,r){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(let{}of e);}),stop:()=>{}}}reportJson(e){}reportFold(e,r){}async finalize(){}}});var WCe,ZI,EG=Ct(()=>{bt();WCe=et(CQ());sI();$d();Qc();E0();Np();Yo();ZI=class{constructor(e,{project:r}){this.workspacesCwds=new Set;this.project=r,this.cwd=e}async setup(){this.manifest=await Ht.tryFind(this.cwd)??new Ht,this.relativeCwd=K.relative(this.project.cwd,this.cwd)||vt.dot;let e=this.manifest.name?this.manifest.name:ba(null,`${this.computeCandidateName()}-${fs(this.relativeCwd).substring(0,6)}`);this.anchoredDescriptor=On(e,`${Ei.protocol}${this.relativeCwd}`),this.anchoredLocator=Vs(e,`${Ei.protocol}${this.relativeCwd}`);let r=this.manifest.workspaceDefinitions.map(({pattern:a})=>a);if(r.length===0)return;let s=await(0,WCe.default)(r,{cwd:ue.fromPortablePath(this.cwd),onlyDirectories:!0,ignore:["**/node_modules","**/.git","**/.yarn"]});s.sort(),await s.reduce(async(a,n)=>{let c=K.resolve(this.cwd,ue.toPortablePath(n)),f=await le.existsPromise(K.join(c,"package.json"));await a,f&&this.workspacesCwds.add(c)},Promise.resolve())}get anchoredPackage(){let e=this.project.storedPackages.get(this.anchoredLocator.locatorHash);if(!e)throw new Error(`Assertion failed: Expected workspace ${ZB(this.project.configuration,this)} (${Ut(this.project.configuration,K.join(this.cwd,Er.manifest),pt.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);return e}accepts(e){let r=e.indexOf(":"),s=r!==-1?e.slice(0,r+1):null,a=r!==-1?e.slice(r+1):e;if(s===Ei.protocol&&K.normalize(a)===this.relativeCwd||s===Ei.protocol&&(a==="*"||a==="^"||a==="~"))return!0;let n=ul(a);return n?s===Ei.protocol?n.test(this.manifest.version??"0.0.0"):this.project.configuration.get("enableTransparentWorkspaces")&&this.manifest.version!==null?n.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":`${K.basename(this.cwd)}`||"unnamed-workspace"}getRecursiveWorkspaceDependencies({dependencies:e=Ht.hardDependencies}={}){let r=new Set,s=a=>{for(let n of e)for(let c of a.manifest[n].values()){let f=this.project.tryWorkspaceByDescriptor(c);f===null||r.has(f)||(r.add(f),s(f))}};return s(this),r}getRecursiveWorkspaceDependents({dependencies:e=Ht.hardDependencies}={}){let r=new Set,s=a=>{for(let n of this.project.workspaces)e.some(f=>[...n.manifest[f].values()].some(p=>{let h=this.project.tryWorkspaceByDescriptor(p);return h!==null&&KB(h.anchoredLocator,a.anchoredLocator)}))&&!r.has(n)&&(r.add(n),s(n))};return s(this),r}getRecursiveWorkspaceChildren(){let e=new Set([this]);for(let r of e)for(let s of r.workspacesCwds){let a=this.project.workspacesByCwd.get(s);a&&e.add(a)}return e.delete(this),Array.from(e)}async persistManifest(){let e={};this.manifest.exportTo(e);let r=K.join(this.cwd,Ht.fileName),s=`${JSON.stringify(e,null,this.manifest.indent)} -`;await le.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=e}}});function pwt({project:t,allDescriptors:e,allResolutions:r,allPackages:s,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:c=new Map,peerWarnings:f=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,C=[],S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=new Map(t.workspaces.map(ce=>{let me=ce.anchoredLocator.locatorHash,pe=s.get(me);if(typeof pe>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[me,WB(pe)]})),W=()=>{let ce=le.mktempSync(),me=K.join(ce,"stacktrace.log"),pe=String(C.length+1).length,Be=C.map((Ce,g)=>`${`${g+1}.`.padStart(pe," ")} ${cl(Ce)} -`).join("");throw le.writeFileSync(me,Be),le.detachTemp(ce),new Yt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${ue.fromPortablePath(me)}`)},te=ce=>{let me=r.get(ce.descriptorHash);if(typeof me>"u")throw new Error("Assertion failed: The resolution should have been registered");let pe=s.get(me);if(!pe)throw new Error("Assertion failed: The package could not be found");return pe},ie=(ce,me,pe,{top:Be,optional:Ce})=>{C.length>1e3&&W(),C.push(me);let g=Ae(ce,me,pe,{top:Be,optional:Ce});return C.pop(),g},Ae=(ce,me,pe,{top:Be,optional:Ce})=>{if(Ce||n.delete(me.locatorHash),a.has(me.locatorHash))return;a.add(me.locatorHash);let g=s.get(me.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${Yr(t.configuration,me)}) should have been registered`);let we=new Set,ye=new Map,fe=[],se=[],X=[],De=[];for(let Re of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Re.identHash)&&g.locatorHash!==Be)continue;if(Tp(Re))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");h.delete(Re.descriptorHash);let dt=Ce;if(!dt){let ke=g.dependenciesMeta.get(cn(Re));if(typeof ke<"u"){let it=ke.get(null);typeof it<"u"&&it.optional&&(dt=!0)}}let j=r.get(Re.descriptorHash);if(!j)throw new Error(`Assertion failed: The resolution (${ni(t.configuration,Re)}) should have been registered`);let rt=U.get(j)||s.get(j);if(!rt)throw new Error(`Assertion failed: The package (${j}, resolved from ${ni(t.configuration,Re)}) should have been registered`);if(rt.peerDependencies.size===0){ie(Re,rt,new Map,{top:Be,optional:dt});continue}let Fe,Ne,Pe=new Set,Ye=new Map;fe.push(()=>{Fe=U8(Re,me.locatorHash),Ne=H8(rt,me.locatorHash),g.dependencies.set(Re.identHash,Fe),r.set(Fe.descriptorHash,Ne.locatorHash),e.set(Fe.descriptorHash,Fe),s.set(Ne.locatorHash,Ne),xp(R,Ne.locatorHash).add(Fe.descriptorHash),we.add(Ne.locatorHash)}),se.push(()=>{N.set(Ne.locatorHash,Ye);for(let ke of Ne.peerDependencies.values()){let _e=Vl(ye,ke.identHash,()=>{let x=pe.get(ke.identHash)??null,w=g.dependencies.get(ke.identHash);return!w&&VB(me,ke)&&(ce.identHash===me.identHash?w=ce:(w=On(me,ce.range),e.set(w.descriptorHash,w),r.set(w.descriptorHash,me.locatorHash),h.delete(w.descriptorHash),x=null)),w||(w=On(ke,"missing:")),{subject:me,ident:ke,provided:w,root:!x,requests:new Map,hash:`p${fs(me.locatorHash,ke.identHash).slice(0,5)}`}}).provided;if(_e.range==="missing:"&&Ne.dependencies.has(ke.identHash)){Ne.peerDependencies.delete(ke.identHash);continue}if(Ye.set(ke.identHash,{requester:Ne,descriptor:ke,meta:Ne.peerDependenciesMeta.get(cn(ke)),children:new Map}),Ne.dependencies.set(ke.identHash,_e),Tp(_e)){let x=r.get(_e.descriptorHash);xp(I,x).add(Ne.locatorHash)}S.set(_e.identHash,_e),_e.range==="missing:"&&Pe.add(_e.identHash)}Ne.dependencies=new Map(Ys(Ne.dependencies,([ke,it])=>cn(it)))}),X.push(()=>{if(!s.has(Ne.locatorHash))return;let ke=E.get(rt.locatorHash);typeof ke=="number"&&ke>=2&&W();let it=E.get(rt.locatorHash),_e=typeof it<"u"?it+1:1;E.set(rt.locatorHash,_e),ie(Fe,Ne,Ye,{top:Be,optional:dt}),E.set(rt.locatorHash,_e-1)}),De.push(()=>{let ke=r.get(Fe.descriptorHash);if(typeof ke>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let it=N.get(ke);if(typeof it>"u")throw new Error("Assertion failed: Expected the peer requests to be registered");for(let _e of ye.values()){let x=it.get(_e.ident.identHash);x&&(_e.requests.set(Fe.descriptorHash,x),p.set(_e.hash,_e),_e.root||pe.get(_e.ident.identHash)?.children.set(Fe.descriptorHash,x))}if(s.has(Ne.locatorHash))for(let _e of Pe)Ne.dependencies.delete(_e)})}for(let Re of[...fe,...se])Re();for(let Re of we){we.delete(Re);let dt=s.get(Re),j=fs(tI(dt).locatorHash,...Array.from(dt.dependencies.values(),Pe=>{let Ye=Pe.range!=="missing:"?r.get(Pe.descriptorHash):"missing:";if(typeof Ye>"u")throw new Error(`Assertion failed: Expected the resolution for ${ni(t.configuration,Pe)} to have been registered`);return Ye===Be?`${Ye} (top)`:Ye})),rt=P.get(j);if(typeof rt>"u"){P.set(j,dt);continue}let Fe=xp(R,rt.locatorHash);for(let Pe of R.get(dt.locatorHash)??[])r.set(Pe,rt.locatorHash),Fe.add(Pe);s.delete(dt.locatorHash),a.delete(dt.locatorHash),we.delete(dt.locatorHash);let Ne=I.get(dt.locatorHash);if(Ne!==void 0){let Pe=xp(I,rt.locatorHash);for(let Ye of Ne)Pe.add(Ye),we.add(Ye)}}for(let Re of[...X,...De])Re()};for(let ce of t.workspaces){let me=ce.anchoredLocator;h.delete(ce.anchoredDescriptor.descriptorHash),ie(ce.anchoredDescriptor,me,new Map,{top:me.locatorHash,optional:!1})}for(let ce of p.values()){if(!ce.root)continue;let me=s.get(ce.subject.locatorHash);if(typeof me>"u")continue;for(let Be of ce.requests.values()){let Ce=`p${fs(ce.subject.locatorHash,cn(ce.ident),Be.requester.locatorHash).slice(0,5)}`;c.set(Ce,{subject:ce.subject.locatorHash,requested:ce.ident,rootRequester:Be.requester.locatorHash,allRequesters:Array.from(XB(Be),g=>g.requester.locatorHash)})}let pe=[...XB(ce)];if(ce.provided.range!=="missing:"){let Be=te(ce.provided),Ce=Be.version??"0.0.0",g=ye=>{if(ye.startsWith(Ei.protocol)){if(!t.tryWorkspaceByLocator(Be))return null;ye=ye.slice(Ei.protocol.length),(ye==="^"||ye==="~")&&(ye="*")}return ye},we=!0;for(let ye of pe){let fe=g(ye.descriptor.range);if(fe===null){we=!1;continue}if(!eA(Ce,fe)){we=!1;let se=`p${fs(ce.subject.locatorHash,cn(ce.ident),ye.requester.locatorHash).slice(0,5)}`;f.push({type:1,subject:me,requested:ce.ident,requester:ye.requester,version:Ce,hash:se,requirementCount:pe.length})}}if(!we){let ye=pe.map(fe=>g(fe.descriptor.range));f.push({type:3,node:ce,range:ye.includes(null)?null:G8(ye),hash:ce.hash})}}else{let Be=!0;for(let Ce of pe)if(!Ce.meta?.optional){Be=!1;let g=`p${fs(ce.subject.locatorHash,cn(ce.ident),Ce.requester.locatorHash).slice(0,5)}`;f.push({type:0,subject:me,requested:ce.ident,requester:Ce.requester,hash:g})}Be||f.push({type:2,node:ce,hash:ce.hash})}}}function*hwt(t){let e=new Map;if("children"in t)e.set(t,t);else for(let r of t.requests.values())e.set(r,r);for(let[r,s]of e){yield{request:r,root:s};for(let a of r.children.values())e.has(a)||e.set(a,s)}}function gwt(t,e){let r=[],s=[],a=!1;for(let n of t.peerWarnings)if(!(n.type===1||n.type===0)){if(!t.tryWorkspaceByLocator(n.node.subject)){a=!0;continue}if(n.type===3){let c=t.storedResolutions.get(n.node.provided.descriptorHash);if(typeof c>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let f=t.storedPackages.get(c);if(typeof f>"u")throw new Error("Assertion failed: Expected the package to be registered");let p=A0(hwt(n.node),({request:C,root:S})=>eA(f.version??"0.0.0",C.descriptor.range)?A0.skip:C===S?es(t.configuration,C.requester):`${es(t.configuration,C.requester)} (via ${es(t.configuration,S.requester)})`),h=[...XB(n.node)].length>1?"and other dependencies request":"requests",E=n.range?nI(t.configuration,n.range):Ut(t.configuration,"but they have non-overlapping ranges!","redBright");r.push(`${es(t.configuration,n.node.ident)} is listed by your project with version ${zB(t.configuration,f.version??"0.0.0")} (${Ut(t.configuration,n.hash,pt.CODE)}), which doesn't satisfy what ${p} ${h} (${E}).`)}if(n.type===2){let c=n.node.requests.size>1?" and other dependencies":"";s.push(`${Yr(t.configuration,n.node.subject)} doesn't provide ${es(t.configuration,n.node.ident)} (${Ut(t.configuration,n.hash,pt.CODE)}), requested by ${es(t.configuration,n.node.requests.values().next().value.requester)}${c}.`)}}e.startSectionSync({reportFooter:()=>{e.reportWarning(86,`Some peer dependencies are incorrectly met by your project; run ${Ut(t.configuration,"yarn explain peer-requirements ",pt.CODE)} for details, where ${Ut(t.configuration,"",pt.CODE)} is the six-letter p-prefixed code.`)},skipIfEmpty:!0},()=>{for(let n of Ys(r,c=>VE.default(c)))e.reportWarning(60,n);for(let n of Ys(s,c=>VE.default(c)))e.reportWarning(2,n)}),a&&e.reportWarning(86,`Some peer dependencies are incorrectly met by dependencies; run ${Ut(t.configuration,"yarn explain peer-requirements",pt.CODE)} for details.`)}var qR,GR,WR,KCe,wG,CG,BG,YR,lwt,cwt,YCe,uwt,fwt,Awt,ec,IG,VR,VCe,Tt,JCe=Ct(()=>{bt();bt();Bc();Wt();qR=Ie("crypto");fG();GR=et(mG()),WR=et(Od()),KCe=et(Ai()),wG=Ie("util"),CG=et(Ie("v8")),BG=et(Ie("zlib"));rG();dv();nG();iG();sI();J8();Fc();GCe();xv();yG();$d();EG();NQ();Qc();E0();kc();pT();g6();Np();Yo();YR=WE(process.env.YARN_LOCKFILE_VERSION_OVERRIDE??8),lwt=3,cwt=/ *, */g,YCe=/\/$/,uwt=32,fwt=(0,wG.promisify)(BG.default.gzip),Awt=(0,wG.promisify)(BG.default.gunzip),ec=(r=>(r.UpdateLockfile="update-lockfile",r.SkipBuild="skip-build",r))(ec||{}),IG={restoreLinkersCustomData:["linkersCustomData"],restoreResolutions:["accessibleLocators","conditionalLocators","disabledLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"],restoreBuildState:["skippedBuilds","storedBuildState"]},VR=(a=>(a[a.NotProvided=0]="NotProvided",a[a.NotCompatible=1]="NotCompatible",a[a.NodeNotProvided=2]="NodeNotProvided",a[a.NodeNotCompatible=3]="NodeNotCompatible",a))(VR||{}),VCe=t=>fs(`${lwt}`,t),Tt=class t{constructor(e,{configuration:r}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.skippedBuilds=new Set;this.lockfileLastVersion=null;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.peerWarnings=[];this.peerRequirementNodes=new Map;this.linkersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=e}static async find(e,r){if(!e.projectCwd)throw new nt(`No project found in ${r}`);let s=e.projectCwd,a=r,n=null;for(;n!==e.projectCwd;){if(n=a,le.existsSync(K.join(n,Er.manifest))){s=n;break}a=K.dirname(n)}let c=new t(e.projectCwd,{configuration:e});ze.telemetry?.reportProject(c.cwd),await c.setupResolutions(),await c.setupWorkspaces(),ze.telemetry?.reportWorkspaceCount(c.workspaces.length),ze.telemetry?.reportDependencyCount(c.workspaces.reduce((I,R)=>I+R.manifest.dependencies.size+R.manifest.devDependencies.size,0));let f=c.tryWorkspaceByCwd(s);if(f)return{project:c,workspace:f,locator:f.anchoredLocator};let p=await c.findLocatorForLocation(`${s}/`,{strict:!0});if(p)return{project:c,locator:p,workspace:null};let h=Ut(e,c.cwd,pt.PATH),E=Ut(e,K.relative(c.cwd,s),pt.PATH),C=`- If ${h} isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,S=`- If ${h} is intended to be a project, it might be that you forgot to list ${E} in its workspace configuration.`,P=`- Finally, if ${h} is fine and you intend ${E} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new nt(`The nearest package directory (${Ut(e,s,pt.PATH)}) doesn't seem to be part of the project declared in ${Ut(e,c.cwd,pt.PATH)}. - -${[C,S,P].join(` -`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=K.join(this.cwd,Er.lockfile),r=this.configuration.get("defaultLanguageName");if(le.existsSync(e)){let s=await le.readFilePromise(e,"utf8");this.lockFileChecksum=VCe(s);let a=cs(s);if(a.__metadata){let n=a.__metadata.version,c=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let h=Rp(p.resolution,!0),E=new Ht;E.load(p,{yamlCompatibilityMode:!0});let C=E.version,S=E.languageName||r,P=p.linkType.toUpperCase(),I=p.conditions??null,R=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,W=E.peerDependenciesMeta,te=E.bin;if(p.checksum!=null){let Ae=typeof c<"u"&&!p.checksum.includes("/")?`${c}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,Ae)}let ie={...h,version:C,languageName:S,linkType:P,conditions:I,dependencies:R,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:W,bin:te};this.originalPackages.set(ie.locatorHash,ie);for(let Ae of f.split(cwt)){let ce=I0(Ae);n<=6&&(ce=this.configuration.normalizeDependency(ce),ce=On(ce,ce.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ce.descriptorHash,ce),this.storedResolutions.set(ce.descriptorHash,h.locatorHash)}}}else s.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,WR.default)(4),s=async(a,n)=>{if(e.has(n))return a;e.add(n);let c=new ZI(n,{project:this});await r(()=>c.setup());let f=a.then(()=>{this.addWorkspace(c)});return Array.from(c.workspacesCwds).reduce(s,f)};await s(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${es(this.configuration,e.anchoredLocator)}: ${ue.fromPortablePath(e.cwd)} conflicts with ${ue.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){K.isAbsolute(e)||(e=K.resolve(this.cwd,e)),e=K.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let s of this.workspaces)K.relative(s.cwd,e).startsWith("../")||r&&r.cwd.length>=s.cwd.length||(r=s);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${es(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Ei.protocol)){let s=e.range.slice(Ei.protocol.length);if(s!=="^"&&s!=="~"&&s!=="*"&&!ul(s))return this.tryWorkspaceByCwd(s)}let r=this.tryWorkspaceByIdent(e);return r===null||(Tp(e)&&(e=YB(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${ni(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Gu(e)&&(e=tI(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${Yr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if("descriptorHash"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let s=new Set(this.storedResolutions.values());typeof r<"u"&&!s.has(r)&&this.deleteLocator(r)}if("locatorHash"in e){this.deleteLocator(e.locatorHash);for(let[r,s]of this.storedResolutions)s===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[s,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(s)}for(let s of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(s,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(s.locatorHash);let n=r.get(s.locatorHash);if(n){r.delete(s.locatorHash);for(let c of n)this.deleteDescriptor(c)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,s]of e.dependencies)Tp(s)&&e.dependencies.set(r,YB(s))}getDependencyMeta(e,r){let s={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(cn(e));if(!n)return s;let c=n.get(null);if(c&&Object.assign(s,c),r===null||!KCe.default.valid(r))return s;for(let[f,p]of n)f!==null&&f===r&&Object.assign(s,p);return s}async findLocatorForLocation(e,{strict:r=!1}={}){let s=new Yi,a=this.configuration.getLinkers(),n={project:this,report:s};for(let c of a){let f=await c.findPackageLocator(e,n);if(f){if(r&&(await c.findPackageLocation(f,n)).replace(YCe,"")!==e.replace(YCe,""))continue;return f}}return null}async loadUserConfig(){let e=K.join(this.cwd,".pnp.cjs");await le.existsPromise(e)&&kp(e).setup();let r=K.join(this.cwd,"yarn.config.cjs");return await le.existsPromise(r)?kp(r):null}async preparePackage(e,{resolver:r,resolveOptions:s}){let a=await this.configuration.getPackageExtensions(),n=this.configuration.normalizePackage(e,{packageExtensions:a});for(let[c,f]of n.dependencies){let p=await this.configuration.reduceHook(E=>E.reduceDependency,f,this,n,f,{resolver:r,resolveOptions:s});if(!VB(f,p))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");let h=r.bindDescriptor(p,n,s);n.dependencies.set(c,h)}return n}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions();let r=new Map(this.originalPackages),s=[];e.lockfileOnly||this.forgetTransientResolutions();let a=e.resolver||this.configuration.makeResolver(),n=new KI(a);await n.setup(this,{report:e.report});let c=e.lockfileOnly?[new jR(a)]:[n,a],f=new em([new JI(a),...c]),p=new em([...c]),h=this.configuration.makeFetcher(),E=e.lockfileOnly?{project:this,report:e.report,resolver:f}:{project:this,report:e.report,resolver:f,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:h,cacheOptions:{mirrorWriteOnly:!0}}},C=new Map,S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=this.topLevelWorkspace.anchoredLocator,W=new Set,te=[],ie=Sj(),Ae=this.configuration.getSupportedArchitectures();await e.report.startProgressPromise(ho.progressViaTitle(),async se=>{let X=async rt=>{let Fe=await qE(async()=>await f.resolve(rt,E),ke=>`${Yr(this.configuration,rt)}: ${ke}`);if(!KB(rt,Fe))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${Yr(this.configuration,rt)} to ${Yr(this.configuration,Fe)})`);I.set(Fe.locatorHash,Fe),!r.delete(Fe.locatorHash)&&!this.tryWorkspaceByLocator(Fe)&&s.push(Fe);let Pe=await this.preparePackage(Fe,{resolver:f,resolveOptions:E}),Ye=Uu([...Pe.dependencies.values()].map(ke=>j(ke)));return te.push(Ye),Ye.catch(()=>{}),S.set(Pe.locatorHash,Pe),Pe},De=async rt=>{let Fe=R.get(rt.locatorHash);if(typeof Fe<"u")return Fe;let Ne=Promise.resolve().then(()=>X(rt));return R.set(rt.locatorHash,Ne),Ne},Re=async(rt,Fe)=>{let Ne=await j(Fe);return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,Ne.locatorHash),Ne},dt=async rt=>{se.setTitle(ni(this.configuration,rt));let Fe=this.resolutionAliases.get(rt.descriptorHash);if(typeof Fe<"u")return Re(rt,this.storedDescriptors.get(Fe));let Ne=f.getResolutionDependencies(rt,E),Pe=Object.fromEntries(await Uu(Object.entries(Ne).map(async([it,_e])=>{let x=f.bindDescriptor(_e,U,E),w=await j(x);return W.add(w.locatorHash),[it,w]}))),ke=(await qE(async()=>await f.getCandidates(rt,Pe,E),it=>`${ni(this.configuration,rt)}: ${it}`))[0];if(typeof ke>"u")throw new Yt(82,`${ni(this.configuration,rt)}: No candidates found`);if(e.checkResolutions){let{locators:it}=await p.getSatisfying(rt,Pe,[ke],{...E,resolver:p});if(!it.find(_e=>_e.locatorHash===ke.locatorHash))throw new Yt(78,`Invalid resolution ${jB(this.configuration,rt,ke)}`)}return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,ke.locatorHash),De(ke)},j=rt=>{let Fe=N.get(rt.descriptorHash);if(typeof Fe<"u")return Fe;C.set(rt.descriptorHash,rt);let Ne=Promise.resolve().then(()=>dt(rt));return N.set(rt.descriptorHash,Ne),Ne};for(let rt of this.workspaces){let Fe=rt.anchoredDescriptor;te.push(j(Fe))}for(;te.length>0;){let rt=[...te];te.length=0,await Uu(rt)}});let ce=Yl(r.values(),se=>this.tryWorkspaceByLocator(se)?Yl.skip:se);if(s.length>0||ce.length>0){let se=new Set(this.workspaces.flatMap(rt=>{let Fe=S.get(rt.anchoredLocator.locatorHash);if(!Fe)throw new Error("Assertion failed: The workspace should have been resolved");return Array.from(Fe.dependencies.values(),Ne=>{let Pe=P.get(Ne.descriptorHash);if(!Pe)throw new Error("Assertion failed: The resolution should have been registered");return Pe})})),X=rt=>se.has(rt.locatorHash)?"0":"1",De=rt=>cl(rt),Re=Ys(s,[X,De]),dt=Ys(ce,[X,De]),j=e.report.getRecommendedLength();Re.length>0&&e.report.reportInfo(85,`${Ut(this.configuration,"+",pt.ADDED)} ${Zk(this.configuration,Re,j)}`),dt.length>0&&e.report.reportInfo(85,`${Ut(this.configuration,"-",pt.REMOVED)} ${Zk(this.configuration,dt,j)}`)}let me=new Set(this.resolutionAliases.values()),pe=new Set(S.keys()),Be=new Set,Ce=new Map,g=[],we=new Map;pwt({project:this,accessibleLocators:Be,volatileDescriptors:me,optionalBuilds:pe,peerRequirements:Ce,peerWarnings:g,peerRequirementNodes:we,allDescriptors:C,allResolutions:P,allPackages:S});for(let se of W)pe.delete(se);for(let se of me)C.delete(se),P.delete(se);let ye=new Set,fe=new Set;for(let se of S.values())se.conditions!=null&&pe.has(se.locatorHash)&&(kQ(se,Ae)||(kQ(se,ie)&&e.report.reportWarningOnce(77,`${Yr(this.configuration,se)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${Ut(this.configuration,"supportedArchitectures",pt.SETTING)} setting`),fe.add(se.locatorHash)),ye.add(se.locatorHash));this.storedResolutions=P,this.storedDescriptors=C,this.storedPackages=S,this.accessibleLocators=Be,this.conditionalLocators=ye,this.disabledLocators=fe,this.originalPackages=I,this.optionalBuilds=pe,this.peerRequirements=Ce,this.peerWarnings=g,this.peerRequirementNodes=we}async fetchEverything({cache:e,report:r,fetcher:s,mode:a,persistProject:n=!0}){let c={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},f=s||this.configuration.makeFetcher(),p={checksums:this.storedChecksums,project:this,cache:e,fetcher:f,report:r,cacheOptions:c},h=Array.from(new Set(Ys(this.storedResolutions.values(),[I=>{let R=this.storedPackages.get(I);if(!R)throw new Error("Assertion failed: The locator should have been registered");return cl(R)}])));a==="update-lockfile"&&(h=h.filter(I=>!this.storedChecksums.has(I)));let E=!1,C=ho.progressViaCounter(h.length);await r.reportProgress(C);let S=(0,WR.default)(uwt);if(await Uu(h.map(I=>S(async()=>{let R=this.storedPackages.get(I);if(!R)throw new Error("Assertion failed: The locator should have been registered");if(Gu(R))return;let N;try{N=await f.fetch(R,p)}catch(U){U.message=`${Yr(this.configuration,R)}: ${U.message}`,r.reportExceptionOnce(U),E=U;return}N.checksum!=null?this.storedChecksums.set(R.locatorHash,N.checksum):this.storedChecksums.delete(R.locatorHash),N.releaseFs&&N.releaseFs()}).finally(()=>{C.tick()}))),E)throw E;let P=n&&a!=="update-lockfile"?await this.cacheCleanup({cache:e,report:r}):null;if(r.cacheMisses.size>0||P){let R=(await Promise.all([...r.cacheMisses].map(async ce=>{let me=this.storedPackages.get(ce),pe=this.storedChecksums.get(ce)??null,Be=e.getLocatorPath(me,pe);return(await le.statPromise(Be)).size}))).reduce((ce,me)=>ce+me,0)-(P?.size??0),N=r.cacheMisses.size,U=P?.count??0,W=`${Gk(N,{zero:"No new packages",one:"A package was",more:`${Ut(this.configuration,N,pt.NUMBER)} packages were`})} added to the project`,te=`${Gk(U,{zero:"none were",one:"one was",more:`${Ut(this.configuration,U,pt.NUMBER)} were`})} removed`,ie=R!==0?` (${Ut(this.configuration,R,pt.SIZE_DIFF)})`:"",Ae=U>0?N>0?`${W}, and ${te}${ie}.`:`${W}, but ${te}${ie}.`:`${W}${ie}.`;r.reportInfo(13,Ae)}}async linkEverything({cache:e,report:r,fetcher:s,mode:a}){let n={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},c=s||this.configuration.makeFetcher(),f={checksums:this.storedChecksums,project:this,cache:e,fetcher:c,report:r,cacheOptions:n},p=this.configuration.getLinkers(),h={project:this,report:r},E=new Map(p.map(ye=>{let fe=ye.makeInstaller(h),se=ye.getCustomDataKey(),X=this.linkersCustomData.get(se);return typeof X<"u"&&fe.attachCustomData(X),[ye,fe]})),C=new Map,S=new Map,P=new Map,I=new Map(await Uu([...this.accessibleLocators].map(async ye=>{let fe=this.storedPackages.get(ye);if(!fe)throw new Error("Assertion failed: The locator should have been registered");return[ye,await c.fetch(fe,f)]}))),R=[],N=new Set,U=[];for(let ye of this.accessibleLocators){let fe=this.storedPackages.get(ye);if(typeof fe>"u")throw new Error("Assertion failed: The locator should have been registered");let se=I.get(fe.locatorHash);if(typeof se>"u")throw new Error("Assertion failed: The fetch result should have been registered");let X=[],De=dt=>{X.push(dt)},Re=this.tryWorkspaceByLocator(fe);if(Re!==null){let dt=[],{scripts:j}=Re.manifest;for(let Fe of["preinstall","install","postinstall"])j.has(Fe)&&dt.push({type:0,script:Fe});try{for(let[Fe,Ne]of E)if(Fe.supportsPackage(fe,h)&&(await Ne.installPackage(fe,se,{holdFetchResult:De})).buildRequest!==null)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}finally{X.length===0?se.releaseFs?.():R.push(Uu(X).catch(()=>{}).then(()=>{se.releaseFs?.()}))}let rt=K.join(se.packageFs.getRealPath(),se.prefixPath);S.set(fe.locatorHash,rt),!Gu(fe)&&dt.length>0&&P.set(fe.locatorHash,{buildDirectives:dt,buildLocations:[rt]})}else{let dt=p.find(Fe=>Fe.supportsPackage(fe,h));if(!dt)throw new Yt(12,`${Yr(this.configuration,fe)} isn't supported by any available linker`);let j=E.get(dt);if(!j)throw new Error("Assertion failed: The installer should have been registered");let rt;try{rt=await j.installPackage(fe,se,{holdFetchResult:De})}finally{X.length===0?se.releaseFs?.():R.push(Uu(X).then(()=>{}).then(()=>{se.releaseFs?.()}))}C.set(fe.locatorHash,dt),S.set(fe.locatorHash,rt.packageLocation),rt.buildRequest&&rt.packageLocation&&(rt.buildRequest.skipped?(N.add(fe.locatorHash),this.skippedBuilds.has(fe.locatorHash)||U.push([fe,rt.buildRequest.explain])):P.set(fe.locatorHash,{buildDirectives:rt.buildRequest.directives,buildLocations:[rt.packageLocation]}))}}let W=new Map;for(let ye of this.accessibleLocators){let fe=this.storedPackages.get(ye);if(!fe)throw new Error("Assertion failed: The locator should have been registered");let se=this.tryWorkspaceByLocator(fe)!==null,X=async(De,Re)=>{let dt=S.get(fe.locatorHash);if(typeof dt>"u")throw new Error(`Assertion failed: The package (${Yr(this.configuration,fe)}) should have been registered`);let j=[];for(let rt of fe.dependencies.values()){let Fe=this.storedResolutions.get(rt.descriptorHash);if(typeof Fe>"u")throw new Error(`Assertion failed: The resolution (${ni(this.configuration,rt)}, from ${Yr(this.configuration,fe)})should have been registered`);let Ne=this.storedPackages.get(Fe);if(typeof Ne>"u")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ni(this.configuration,rt)}) should have been registered`);let Pe=this.tryWorkspaceByLocator(Ne)===null?C.get(Fe):null;if(typeof Pe>"u")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ni(this.configuration,rt)}) should have been registered`);Pe===De||Pe===null?S.get(Ne.locatorHash)!==null&&j.push([rt,Ne]):!se&&dt!==null&&LB(W,Fe).push(dt)}dt!==null&&await Re.attachInternalDependencies(fe,j)};if(se)for(let[De,Re]of E)De.supportsPackage(fe,h)&&await X(De,Re);else{let De=C.get(fe.locatorHash);if(!De)throw new Error("Assertion failed: The linker should have been found");let Re=E.get(De);if(!Re)throw new Error("Assertion failed: The installer should have been registered");await X(De,Re)}}for(let[ye,fe]of W){let se=this.storedPackages.get(ye);if(!se)throw new Error("Assertion failed: The package should have been registered");let X=C.get(se.locatorHash);if(!X)throw new Error("Assertion failed: The linker should have been found");let De=E.get(X);if(!De)throw new Error("Assertion failed: The installer should have been registered");await De.attachExternalDependents(se,fe)}let te=new Map;for(let[ye,fe]of E){let se=await fe.finalizeInstall();for(let X of se?.records??[])X.buildRequest.skipped?(N.add(X.locator.locatorHash),this.skippedBuilds.has(X.locator.locatorHash)||U.push([X.locator,X.buildRequest.explain])):P.set(X.locator.locatorHash,{buildDirectives:X.buildRequest.directives,buildLocations:X.buildLocations});typeof se?.customData<"u"&&te.set(ye.getCustomDataKey(),se.customData)}if(this.linkersCustomData=te,await Uu(R),a==="skip-build")return;for(let[,ye]of Ys(U,([fe])=>cl(fe)))ye(r);let ie=new Set(P.keys()),Ae=(0,qR.createHash)("sha512");Ae.update(process.versions.node),await this.configuration.triggerHook(ye=>ye.globalHashGeneration,this,ye=>{Ae.update("\0"),Ae.update(ye)});let ce=Ae.digest("hex"),me=new Map,pe=ye=>{let fe=me.get(ye.locatorHash);if(typeof fe<"u")return fe;let se=this.storedPackages.get(ye.locatorHash);if(typeof se>"u")throw new Error("Assertion failed: The package should have been registered");let X=(0,qR.createHash)("sha512");X.update(ye.locatorHash),me.set(ye.locatorHash,"");for(let De of se.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(typeof Re>"u")throw new Error(`Assertion failed: The resolution (${ni(this.configuration,De)}) should have been registered`);let dt=this.storedPackages.get(Re);if(typeof dt>"u")throw new Error("Assertion failed: The package should have been registered");X.update(pe(dt))}return fe=X.digest("hex"),me.set(ye.locatorHash,fe),fe},Be=(ye,fe)=>{let se=(0,qR.createHash)("sha512");se.update(ce),se.update(pe(ye));for(let X of fe)se.update(X);return se.digest("hex")},Ce=new Map,g=!1,we=ye=>{let fe=new Set([ye.locatorHash]);for(let se of fe){let X=this.storedPackages.get(se);if(!X)throw new Error("Assertion failed: The package should have been registered");for(let De of X.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(!Re)throw new Error(`Assertion failed: The resolution (${ni(this.configuration,De)}) should have been registered`);if(Re!==ye.locatorHash&&ie.has(Re))return!1;let dt=this.storedPackages.get(Re);if(!dt)throw new Error("Assertion failed: The package should have been registered");let j=this.tryWorkspaceByLocator(dt);if(j){if(j.anchoredLocator.locatorHash!==ye.locatorHash&&ie.has(j.anchoredLocator.locatorHash))return!1;fe.add(j.anchoredLocator.locatorHash)}fe.add(Re)}}return!0};for(;ie.size>0;){let ye=ie.size,fe=[];for(let se of ie){let X=this.storedPackages.get(se);if(!X)throw new Error("Assertion failed: The package should have been registered");if(!we(X))continue;let De=P.get(X.locatorHash);if(!De)throw new Error("Assertion failed: The build directive should have been registered");let Re=Be(X,De.buildLocations);if(this.storedBuildState.get(X.locatorHash)===Re){Ce.set(X.locatorHash,Re),ie.delete(se);continue}g||(await this.persistInstallStateFile(),g=!0),this.storedBuildState.has(X.locatorHash)?r.reportInfo(8,`${Yr(this.configuration,X)} must be rebuilt because its dependency tree changed`):r.reportInfo(7,`${Yr(this.configuration,X)} must be built because it never has been before or the last one failed`);let dt=De.buildLocations.map(async j=>{if(!K.isAbsolute(j))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${j})`);for(let rt of De.buildDirectives){let Fe=`# This file contains the result of Yarn building a package (${cl(X)}) -`;switch(rt.type){case 0:Fe+=`# Script name: ${rt.script} -`;break;case 1:Fe+=`# Script code: ${rt.script} -`;break}let Ne=null;if(!await le.mktempPromise(async Ye=>{let ke=K.join(Ye,"build.log"),{stdout:it,stderr:_e}=this.configuration.getSubprocessStreams(ke,{header:Fe,prefix:Yr(this.configuration,X),report:r}),x;try{switch(rt.type){case 0:x=await OT(X,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:_e});break;case 1:x=await f6(X,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:_e});break}}catch(y){_e.write(y.stack),x=1}if(it.end(),_e.end(),x===0)return!0;le.detachTemp(Ye);let w=`${Yr(this.configuration,X)} couldn't be built successfully (exit code ${Ut(this.configuration,x,pt.NUMBER)}, logs can be found here: ${Ut(this.configuration,ke,pt.PATH)})`,b=this.optionalBuilds.has(X.locatorHash);return b?r.reportInfo(9,w):r.reportError(9,w),Wme&&r.reportFold(ue.fromPortablePath(ke),le.readFileSync(ke,"utf8")),b}))return!1}return!0});fe.push(...dt,Promise.allSettled(dt).then(j=>{ie.delete(se),j.every(rt=>rt.status==="fulfilled"&&rt.value===!0)&&Ce.set(X.locatorHash,Re)}))}if(await Uu(fe),ye===ie.size){let se=Array.from(ie).map(X=>{let De=this.storedPackages.get(X);if(!De)throw new Error("Assertion failed: The package should have been registered");return Yr(this.configuration,De)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${se})`);break}}this.storedBuildState=Ce,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Ot.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get("nodeLinker");ze.telemetry?.reportInstall(r);let s=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&e.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),s=!0}})}),s)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,C]of E)for(let S of C)S.status="inactive";let n=K.join(this.cwd,Er.lockfile),c=null;if(e.immutable)try{c=await le.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new Yt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{gwt(this,e.report);for(let[,E]of a)for(let[,C]of E)for(let S of C)if(S.userProvided){let P=Ut(this.configuration,S,pt.PACKAGE_EXTENSION);switch(S.status){case"inactive":e.report.reportWarning(68,`${P}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${P}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(c!==null){let E=yd(c,this.generateLockfile());if(E!==c){let C=uCe(n,n,c,E,void 0,void 0,{maxEditLength:100});if(C){e.report.reportSeparator();for(let S of C.hunks){e.report.reportInfo(null,`@@ -${S.oldStart},${S.oldLines} +${S.newStart},${S.newLines} @@`);for(let P of S.lines)P.startsWith("+")?e.report.reportError(28,Ut(this.configuration,P,pt.ADDED)):P.startsWith("-")?e.report.reportError(28,Ut(this.configuration,P,pt.REMOVED)):e.report.reportInfo(null,Ut(this.configuration,P,"grey"))}e.report.reportSeparator()}throw new Yt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,C]of E)for(let S of C)S.userProvided&&S.status==="active"&&ze.telemetry?.reportPackageExtension(Jd(S,pt.PACKAGE_EXTENSION));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e)});let f=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],p=await Promise.all(f.map(async E=>vQ(E,{cwd:this.cwd})));(typeof e.persistProject>"u"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode==="update-lockfile"){e.report.reportWarning(73,`Skipped due to ${Ut(this.configuration,"mode=update-lockfile",pt.CODE)}`);return}await this.linkEverything(e);let E=await Promise.all(f.map(async C=>vQ(C,{cwd:this.cwd})));for(let C=0;C{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),h=!0}})}),!h&&await this.configuration.triggerHook(E=>E.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[n,c]of this.storedResolutions.entries()){let f=e.get(c);f||e.set(c,f=new Set),f.add(n)}let r={},{cacheKey:s}=Jr.getCacheKey(this.configuration);r.__metadata={version:YR,cacheKey:s};for(let[n,c]of e.entries()){let f=this.originalPackages.get(n);if(!f)continue;let p=[];for(let C of c){let S=this.storedDescriptors.get(C);if(!S)throw new Error("Assertion failed: The descriptor should have been registered");p.push(S)}let h=p.map(C=>ll(C)).sort().join(", "),E=new Ht;E.version=f.linkType==="HARD"?f.version:"0.0.0-use.local",E.languageName=f.languageName,E.dependencies=new Map(f.dependencies),E.peerDependencies=new Map(f.peerDependencies),E.dependenciesMeta=new Map(f.dependenciesMeta),E.peerDependenciesMeta=new Map(f.peerDependenciesMeta),E.bin=new Map(f.bin),r[h]={...E.exportTo({},{compatibilityMode:!1}),linkType:f.linkType.toLowerCase(),resolution:cl(f),checksum:this.storedChecksums.get(f.locatorHash),conditions:f.conditions||void 0}}return`${[`# This file is generated by running "yarn install" inside your project. -`,`# Manual changes might be lost - proceed with caution! -`].join("")} -`+il(r)}async persistLockfile(){let e=K.join(this.cwd,Er.lockfile),r="";try{r=await le.readFilePromise(e,"utf8")}catch{}let s=this.generateLockfile(),a=yd(r,s);a!==r&&(await le.writeFilePromise(e,a),this.lockFileChecksum=VCe(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let c of Object.values(IG))e.push(...c);let r=(0,GR.default)(this,e),s=CG.default.serialize(r),a=fs(s);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await le.mkdirPromise(K.dirname(n),{recursive:!0}),await le.writeFilePromise(n,await fwt(s)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let c=await Awt(await le.readFilePromise(a));n=CG.default.deserialize(c),this.installStateChecksum=fs(c)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,(0,GR.default)(n,IG.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,GR.default)(n,IG.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Yi}),await this.persistInstallStateFile()}async persist(){let e=(0,WR.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let s=new Set([".gitignore"]);if(!sH(e.cwd,this.cwd)||!await le.existsPromise(e.cwd))return null;let a=[];for(let c of await le.readdirPromise(e.cwd)){if(s.has(c))continue;let f=K.resolve(e.cwd,c);e.markedFiles.has(f)||(e.immutable?r.reportError(56,`${Ut(this.configuration,K.basename(f),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(le.lstatPromise(f).then(async p=>(await le.removePromise(f),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((c,f)=>c+f,0)}}}});function dwt(t){let s=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),c=n+a,f=t.state.lastTips??s*864e5,p=f+864e5+8*36e5-t.timeZone,h=c<=t.timeNow,E=p<=t.timeNow,C=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(C={},C.lastUpdate=h?t.timeNow:n,C.lastTips=f,C.blocks=h?{}:t.state.blocks,C.displayedTips=t.state.displayedTips),{nextState:C,triggerUpdate:h,triggerTips:E,nextTips:E?s*864e5:f}}var XI,zCe=Ct(()=>{bt();Pv();E0();fT();kc();Np();XI=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let s=this.getRegistryPath();this.isNew=!le.existsSync(s),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),s=f=>f&&un?eA(un,f):!1,a=e.map((f,p)=>p).filter(f=>e[f]&&s(e[f]?.selector));if(a.length===0)return null;let n=a.filter(f=>!r.has(f));if(n.length===0){let f=Math.floor(a.length*.2);this.displayedTips=f>0?this.displayedTips.slice(-f):[],n=a.filter(p=>!r.has(p))}let c=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(c),this.commitTips(),e[c]}reportVersion(e){this.reportValue("version",e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue("commandName",e||"")}reportPluginName(e){this.reportValue("pluginName",e)}reportProject(e){this.reportEnumerator("projectCount",e)}reportInstall(e){this.reportHit("installCount",e)}reportPackageExtension(e){this.reportValue("packageExtension",e)}reportWorkspaceCount(e){this.reportValue("workspaceCount",String(e))}reportDependencyCount(e){this.reportValue("dependencyCount",String(e))}reportValue(e,r){xp(this.values,e).add(r)}reportEnumerator(e,r){xp(this.enumerators,e).add(fs(r))}reportHit(e,r="*"){let s=n3(this.hits,e),a=Vl(s,r,()=>0);s.set(r,a+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return K.join(e,"telemetry.json")}sendReport(e){let r=this.getRegistryPath(),s;try{s=le.readJsonSync(r)}catch{s={}}let{nextState:a,triggerUpdate:n,triggerTips:c,nextTips:f}=dwt({state:s,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get("telemetryInterval")});if(this.nextTips=f,this.displayedTips=s.displayedTips??[],a!==null)try{le.mkdirSync(K.dirname(r),{recursive:!0}),le.writeJsonSync(r,a)}catch{return!1}if(c&&this.configuration.get("enableTips")&&(this.shouldShowTips=!0),n){let p=s.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,E=C=>vj(h,C,{configuration:this.configuration}).catch(()=>{});for(let[C,S]of Object.entries(s.blocks??{})){if(Object.keys(S).length===0)continue;let P=S;P.userId=C,P.reportType="primary";for(let N of Object.keys(P.enumerators??{}))P.enumerators[N]=P.enumerators[N].length;E(P);let I=new Map,R=20;for(let[N,U]of Object.entries(P.values))U.length>0&&I.set(N,U.slice(0,R));for(;I.size>0;){let N={};N.userId=C,N.reportType="secondary",N.metrics={};for(let[U,W]of I)N.metrics[U]=W.shift(),W.length===0&&I.delete(U);E(N)}}}}return!0}applyChanges(){let e=this.getRegistryPath(),r;try{r=le.readJsonSync(e)}catch{r={}}let s=this.configuration.get("telemetryUserId")??"*",a=r.blocks=r.blocks??{},n=a[s]=a[s]??{};for(let c of this.hits.keys()){let f=n.hits=n.hits??{},p=f[c]=f[c]??{};for(let[h,E]of this.hits.get(c))p[h]=(p[h]??0)+E}for(let c of["values","enumerators"])for(let f of this[c].keys()){let p=n[c]=n[c]??{};p[f]=[...new Set([...p[f]??[],...this[c].get(f)??[]])]}this.shouldCommitTips&&(r.lastTips=this.nextTips,r.displayedTips=this.displayedTips),le.mkdirSync(K.dirname(e),{recursive:!0}),le.writeJsonSync(e,r)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch{}})}}});var Xv={};Vt(Xv,{BuildDirectiveType:()=>_R,CACHE_CHECKPOINT:()=>tG,CACHE_VERSION:()=>MR,Cache:()=>Jr,Configuration:()=>ze,DEFAULT_RC_FILENAME:()=>Qj,FormatType:()=>Dde,InstallMode:()=>ec,LEGACY_PLUGINS:()=>hv,LOCKFILE_VERSION:()=>YR,LegacyMigrationResolver:()=>KI,LightReport:()=>uA,LinkType:()=>YE,LockfileResolver:()=>JI,Manifest:()=>Ht,MessageName:()=>Dr,MultiFetcher:()=>aI,PackageExtensionStatus:()=>a3,PackageExtensionType:()=>o3,PeerWarningType:()=>VR,Project:()=>Tt,Report:()=>ho,ReportError:()=>Yt,SettingsType:()=>gv,StreamReport:()=>Ot,TAG_REGEXP:()=>Up,TelemetryManager:()=>XI,ThrowReport:()=>Yi,VirtualFetcher:()=>lI,WindowsLinkType:()=>yT,Workspace:()=>ZI,WorkspaceFetcher:()=>cI,WorkspaceResolver:()=>Ei,YarnVersion:()=>un,execUtils:()=>Gr,folderUtils:()=>FQ,formatUtils:()=>he,hashUtils:()=>Nn,httpUtils:()=>An,miscUtils:()=>je,nodeUtils:()=>ps,parseMessageName:()=>zx,reportOptionDeprecations:()=>vI,scriptUtils:()=>In,semverUtils:()=>Or,stringifyMessageName:()=>Vf,structUtils:()=>q,tgzUtils:()=>gs,treeUtils:()=>Qs});var Ve=Ct(()=>{hT();NQ();Qc();E0();fT();kc();pT();g6();Np();Yo();JIe();rCe();rG();dv();dv();sCe();nG();oCe();iG();sI();Zx();K8();JCe();Fc();xv();zCe();yG();z8();Z8();$d();EG();Pv();hAe()});var rwe=L((wrr,eS)=>{"use strict";var ywt=process.env.TERM_PROGRAM==="Hyper",Ewt=process.platform==="win32",$Ce=process.platform==="linux",vG={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},ewe=Object.assign({},vG,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),twe=Object.assign({},vG,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:$Ce?"\u25B8":"\u276F",pointerSmall:$Ce?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});eS.exports=Ewt&&!ywt?ewe:twe;Reflect.defineProperty(eS.exports,"common",{enumerable:!1,value:vG});Reflect.defineProperty(eS.exports,"windows",{enumerable:!1,value:ewe});Reflect.defineProperty(eS.exports,"other",{enumerable:!1,value:twe})});var Ju=L((Brr,SG)=>{"use strict";var Iwt=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Cwt=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,nwe=()=>{let t={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(t.enabled=process.env.FORCE_COLOR!=="0");let e=n=>{let c=n.open=`\x1B[${n.codes[0]}m`,f=n.close=`\x1B[${n.codes[1]}m`,p=n.regex=new RegExp(`\\u001b\\[${n.codes[1]}m`,"g");return n.wrap=(h,E)=>{h.includes(f)&&(h=h.replace(p,f+c));let C=c+h+f;return E?C.replace(/\r*\n/g,`${f}$&${c}`):C},n},r=(n,c,f)=>typeof n=="function"?n(c):n.wrap(c,f),s=(n,c)=>{if(n===""||n==null)return"";if(t.enabled===!1)return n;if(t.visible===!1)return"";let f=""+n,p=f.includes(` -`),h=c.length;for(h>0&&c.includes("unstyle")&&(c=[...new Set(["unstyle",...c])].reverse());h-- >0;)f=r(t.styles[c[h]],f,p);return f},a=(n,c,f)=>{t.styles[n]=e({name:n,codes:c}),(t.keys[f]||(t.keys[f]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>s(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=Cwt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,c)=>{let f=typeof c=="string"?t[c]:c;if(typeof f!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");f.stack||(Reflect.defineProperty(f,"name",{value:n}),t.styles[n]=f,f.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>s(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(f.stack):f.stack,p}})},t.theme=n=>{if(!Iwt(n))throw new TypeError("Expected theme to be an object");for(let c of Object.keys(n))t.alias(c,n[c]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=rwe(),t.define=a,t};SG.exports=nwe();SG.exports.create=nwe});var $o=L(pn=>{"use strict";var wwt=Object.prototype.toString,Gc=Ju(),iwe=!1,DG=[],swe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};pn.longest=(t,e)=>t.reduce((r,s)=>Math.max(r,e?s[e].length:s.length),0);pn.hasColor=t=>!!t&&Gc.hasColor(t);var JR=pn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);pn.nativeType=t=>wwt.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");pn.isAsyncFn=t=>pn.nativeType(t)==="asyncfunction";pn.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";pn.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;pn.scrollDown=(t=[])=>[...t.slice(1),t[0]];pn.scrollUp=(t=[])=>[t.pop(),...t];pn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,s)=>r.index>s.index?1:r.index{let s=t.length,a=r===s?0:r<0?s-1:r,n=t[e];t[e]=t[a],t[a]=n};pn.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};pn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};pn.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:s=` -`+r,width:a=80}=e,n=(s+r).match(/[^\S\n]/g)||[];a-=n.length;let c=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,f=t.trim(),p=new RegExp(c,"g"),h=f.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),e.padEnd&&(h=h.map(E=>E.padEnd(a," "))),e.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(s)};pn.unmute=t=>{let e=t.stack.find(s=>Gc.keys.color.includes(s));return e?Gc[e]:t.stack.find(s=>s.slice(2)==="bg")?Gc[e.slice(2)]:s=>s};pn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";pn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>Gc.keys.color.includes(s));if(e){let s=Gc["bg"+pn.pascal(e)];return s?s.black:t}let r=t.stack.find(s=>s.slice(0,2)==="bg");return r?Gc[r.slice(2).toLowerCase()]||t:Gc.none};pn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>Gc.keys.color.includes(s)),r=t.stack.find(s=>s.slice(0,2)==="bg");if(e&&!r)return Gc[swe[e]||e];if(r){let s=r.slice(2).toLowerCase(),a=swe[s];return a&&Gc["bg"+pn.pascal(a)]||t}return Gc.none};pn.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),s=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+s};pn.set=(t={},e="",r)=>e.split(".").reduce((s,a,n,c)=>{let f=c.length-1>n?s[a]||{}:r;return!pn.isObject(f)&&n{let s=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return s??r};pn.mixin=(t,e)=>{if(!JR(t))return e;if(!JR(e))return t;for(let r of Object.keys(e)){let s=Object.getOwnPropertyDescriptor(e,r);if(s.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&JR(s.value)){let a=Object.getOwnPropertyDescriptor(t,r);JR(a.value)?t[r]=pn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,s)}else Reflect.defineProperty(t,r,s);else Reflect.defineProperty(t,r,s)}return t};pn.merge=(...t)=>{let e={};for(let r of t)pn.mixin(e,r);return e};pn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let s of Object.keys(r)){let a=r[s];typeof a=="function"?pn.define(t,s,a.bind(e)):pn.define(t,s,a)}};pn.onExit=t=>{let e=(r,s)=>{iwe||(iwe=!0,DG.forEach(a=>a()),r===!0&&process.exit(128+s))};DG.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),DG.push(t)};pn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};pn.defineExport=(t,e,r)=>{let s;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){s=a},get(){return s?s():r()}})}});var owe=L(rC=>{"use strict";rC.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};rC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};rC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};rC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};rC.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var cwe=L((Drr,lwe)=>{"use strict";var awe=Ie("readline"),Bwt=owe(),vwt=/^(?:\x1b)([a-zA-Z0-9])$/,Swt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,Dwt={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function bwt(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function Pwt(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}var zR=(t="",e={})=>{let r,s={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=s.sequence||""),s.sequence=s.sequence||t||s.name,t==="\r")s.raw=void 0,s.name="return";else if(t===` -`)s.name="enter";else if(t===" ")s.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")s.name="backspace",s.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")s.name="escape",s.meta=t.length===2;else if(t===" "||t==="\x1B ")s.name="space",s.meta=t.length===2;else if(t<="")s.name=String.fromCharCode(t.charCodeAt(0)+97-1),s.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")s.name="number";else if(t.length===1&&t>="a"&&t<="z")s.name=t;else if(t.length===1&&t>="A"&&t<="Z")s.name=t.toLowerCase(),s.shift=!0;else if(r=vwt.exec(t))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=Swt.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),c=(r[3]||r[5]||1)-1;s.ctrl=!!(c&4),s.meta=!!(c&10),s.shift=!!(c&1),s.code=n,s.name=Dwt[n],s.shift=bwt(n)||s.shift,s.ctrl=Pwt(n)||s.ctrl}return s};zR.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let s=awe.createInterface({terminal:!0,input:r});awe.emitKeypressEvents(r,s);let a=(f,p)=>e(f,zR(f,p),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),s.pause(),s.close()}};zR.action=(t,e,r)=>{let s={...Bwt,...r};return e.ctrl?(e.action=s.ctrl[e.name],e):e.option&&s.option?(e.action=s.option[e.name],e):e.shift?(e.action=s.shift[e.name],e):(e.action=s.keys[e.name],e)};lwe.exports=zR});var fwe=L((brr,uwe)=>{"use strict";uwe.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(e)for(let r of Object.keys(e)){let s=e[r];typeof s=="number"&&(s={interval:s}),xwt(t,r,s)}};function xwt(t,e,r={}){let s=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,t.render()},a);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,"interval",{value:n}),t.once("close",()=>s.stop()),s.stop}});var pwe=L((Prr,Awe)=>{"use strict";var{define:kwt,width:Qwt}=$o(),bG=class{constructor(e){let r=e.options;kwt(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=Qwt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};Awe.exports=bG});var gwe=L((xrr,hwe)=>{"use strict";var PG=$o(),mo=Ju(),xG={default:mo.noop,noop:mo.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||PG.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||PG.complement(this.primary)},primary:mo.cyan,success:mo.green,danger:mo.magenta,strong:mo.bold,warning:mo.yellow,muted:mo.dim,disabled:mo.gray,dark:mo.dim.gray,underline:mo.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};xG.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(mo.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(mo.visible=t.styles.visible);let e=PG.merge({},xG,t.styles);delete e.merge;for(let r of Object.keys(mo))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>mo[r]});for(let r of Object.keys(mo.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>mo[r]});return e};hwe.exports=xG});var mwe=L((krr,dwe)=>{"use strict";var kG=process.platform==="win32",Xp=Ju(),Twt=$o(),QG={...Xp.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:Xp.symbols.check,leftAngle:"\u2039",mark:"\u203B",minus:"\u2212",multiplication:"\xD7",obelus:"\xF7",percent:"%",pilcrow:"\xB6",pilcrow2:"\u2761",pencilUpRight:"\u2710",pencilDownRight:"\u270E",pencilRight:"\u270F",plus:"+",plusMinus:"\xB1",pointRight:"\u261E",rightAngle:"\u203A",section:"\xA7",hexagon:{off:"\u2B21",on:"\u2B22",disabled:"\u2B22"},ballot:{on:"\u2611",off:"\u2610",disabled:"\u2612"},stars:{on:"\u2605",off:"\u2606",disabled:"\u2606"},folder:{on:"\u25BC",off:"\u25B6",disabled:"\u25B6"},prefix:{pending:Xp.symbols.question,submitted:Xp.symbols.check,cancelled:Xp.symbols.cross},separator:{pending:Xp.symbols.pointerSmall,submitted:Xp.symbols.middot,cancelled:Xp.symbols.middot},radio:{off:kG?"( )":"\u25EF",on:kG?"(*)":"\u25C9",disabled:kG?"(|)":"\u24BE"},numbers:["\u24EA","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325A","\u325B","\u325C","\u325D","\u325E","\u325F","\u32B1","\u32B2","\u32B3","\u32B4","\u32B5","\u32B6","\u32B7","\u32B8","\u32B9","\u32BA","\u32BB","\u32BC","\u32BD","\u32BE","\u32BF"]};QG.merge=t=>{let e=Twt.merge({},Xp.symbols,QG,t.symbols);return delete e.merge,e};dwe.exports=QG});var Ewe=L((Qrr,ywe)=>{"use strict";var Rwt=gwe(),Fwt=mwe(),Nwt=$o();ywe.exports=t=>{t.options=Nwt.merge({},t.options.theme,t.options),t.symbols=Fwt.merge(t.options),t.styles=Rwt.merge(t.options)}});var vwe=L((wwe,Bwe)=>{"use strict";var Iwe=process.env.TERM_PROGRAM==="Apple_Terminal",Owt=Ju(),TG=$o(),zu=Bwe.exports=wwe,Ui="\x1B[",Cwe="\x07",RG=!1,H0=zu.code={bell:Cwe,beep:Cwe,beginning:`${Ui}G`,down:`${Ui}J`,esc:Ui,getPosition:`${Ui}6n`,hide:`${Ui}?25l`,line:`${Ui}2K`,lineEnd:`${Ui}K`,lineStart:`${Ui}1K`,restorePosition:Ui+(Iwe?"8":"u"),savePosition:Ui+(Iwe?"7":"s"),screen:`${Ui}2J`,show:`${Ui}?25h`,up:`${Ui}1J`},Cm=zu.cursor={get hidden(){return RG},hide(){return RG=!0,H0.hide},show(){return RG=!1,H0.show},forward:(t=1)=>`${Ui}${t}C`,backward:(t=1)=>`${Ui}${t}D`,nextLine:(t=1)=>`${Ui}E`.repeat(t),prevLine:(t=1)=>`${Ui}F`.repeat(t),up:(t=1)=>t?`${Ui}${t}A`:"",down:(t=1)=>t?`${Ui}${t}B`:"",right:(t=1)=>t?`${Ui}${t}C`:"",left:(t=1)=>t?`${Ui}${t}D`:"",to(t,e){return e?`${Ui}${e+1};${t+1}H`:`${Ui}${t+1}G`},move(t=0,e=0){let r="";return r+=t<0?Cm.left(-t):t>0?Cm.right(t):"",r+=e<0?Cm.up(-e):e>0?Cm.down(e):"",r},restore(t={}){let{after:e,cursor:r,initial:s,input:a,prompt:n,size:c,value:f}=t;if(s=TG.isPrimitive(s)?String(s):"",a=TG.isPrimitive(a)?String(a):"",f=TG.isPrimitive(f)?String(f):"",c){let p=zu.cursor.up(c)+zu.cursor.to(n.length),h=a.length-r;return h>0&&(p+=zu.cursor.left(h)),p}if(f||e){let p=!a&&s?-s.length:-a.length+r;return e&&(p-=e.length),a===""&&s&&!n.includes(s)&&(p+=s.length),zu.cursor.move(p)}}},FG=zu.erase={screen:H0.screen,up:H0.up,down:H0.down,line:H0.line,lineEnd:H0.lineEnd,lineStart:H0.lineStart,lines(t){let e="";for(let r=0;r{if(!e)return FG.line+Cm.to(0);let r=n=>[...Owt.unstyle(n)].length,s=t.split(/\r?\n/),a=0;for(let n of s)a+=1+Math.floor(Math.max(r(n)-1,0)/e);return(FG.line+Cm.prevLine()).repeat(a-1)+FG.line+Cm.to(0)}});var nC=L((Trr,Dwe)=>{"use strict";var Lwt=Ie("events"),Swe=Ju(),NG=cwe(),Mwt=fwe(),_wt=pwe(),Uwt=Ewe(),hl=$o(),wm=vwe(),OG=class t extends Lwt{constructor(e={}){super(),this.name=e.name,this.type=e.type,this.options=e,Uwt(this),Mwt(this),this.state=new _wt(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=jwt(this.options.margin),this.setMaxListeners(0),Hwt(this)}async keypress(e,r={}){this.keypressed=!0;let s=NG.action(e,NG(e,r),this.options.actions);this.state.keypress=s,this.emit("keypress",e,s),this.emit("state",this.state.clone());let a=this.options[s.action]||this[s.action]||this.dispatch;if(typeof a=="function")return await a.call(this,e,s);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(wm.code.beep)}cursorHide(){this.stdout.write(wm.cursor.hide()),hl.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(wm.cursor.show())}write(e){e&&(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer="",!(!r&&!e||this.options.show===!1)&&this.stdout.write(wm.cursor.down(e)+wm.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:s}=this.sections(),{cursor:a,initial:n="",input:c="",value:f=""}=this,p=this.state.size=s.length,h={after:r,cursor:a,initial:n,input:c,prompt:e,size:p,value:f},E=wm.cursor.restore(h);E&&this.stdout.write(E)}sections(){let{buffer:e,input:r,prompt:s}=this.state;s=Swe.unstyle(s);let a=Swe.unstyle(e),n=a.indexOf(s),c=a.slice(0,n),p=a.slice(n).split(` -`),h=p[0],E=p[p.length-1],S=(s+(r?" "+r:"")).length,P=Se.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,s){let{options:a,state:n,symbols:c,timers:f}=this,p=f&&f[e];n.timer=p;let h=a[e]||n[e]||c[e],E=r&&r[e]!=null?r[e]:await h;if(E==="")return E;let C=await this.resolve(E,n,r,s);return!C&&r&&r[e]?this.resolve(h,n,r,s):C}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,hl.isObject(e)&&(e=e[s.status]||e.pending),hl.hasColor(e)?e:(this.styles[s.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return hl.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let a=e[s.status]||e.pending||s.separator,n=await this.resolve(a,s);return hl.isObject(n)&&(n=n[s.status]||n.pending),hl.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let s=await this.element("pointer",e,r);if(typeof s=="string"&&hl.hasColor(s))return s;if(s){let a=this.styles,n=this.index===r,c=n?a.primary:h=>h,f=await this.resolve(s[n?"on":"off"]||s,this.state),p=hl.hasColor(f)?f:c(f);return n?p:" ".repeat(f.length)}}async indicator(e,r){let s=await this.element("indicator",e,r);if(typeof s=="string"&&hl.hasColor(s))return s;if(s){let a=this.styles,n=e.enabled===!0,c=n?a.success:a.dark,f=s[n?"on":"off"]||s;return hl.hasColor(f)?f:c(f)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return hl.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return hl.resolve(this,e,...r)}get base(){return t.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||hl.height(this.stdout,25)}get width(){return this.options.columns||hl.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,s=[r,e].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return e=>new this(e).run()}};function Hwt(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],s=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n=="function"&&e(a)?s.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function jwt(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?` -`:" ",s=[];for(let a=0;a<4;a++){let n=r(a);e[a]?s.push(n.repeat(e[a])):s.push("")}return s}Dwe.exports=OG});var xwe=L((Rrr,Pwe)=>{"use strict";var qwt=$o(),bwe={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return bwe.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};Pwe.exports=(t,e={})=>{let r=qwt.merge({},bwe,e.roles);return r[t]||r.default}});var tS=L((Frr,Twe)=>{"use strict";var Gwt=Ju(),Wwt=nC(),Ywt=xwe(),ZR=$o(),{reorder:LG,scrollUp:Vwt,scrollDown:Kwt,isObject:kwe,swap:Jwt}=ZR,MG=class extends Wwt{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:s,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");kwe(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let s=[],a=0,n=async(c,f)=>{typeof c=="function"&&(c=await c.call(this)),c instanceof Promise&&(c=await c);for(let p=0;p(this.state.loadingChoices=!1,c))}async toChoice(e,r,s){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=Ywt(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,ZR.define(e,"parent",s),e.level=s?s.level+1:1,e.indent==null&&(e.indent=s?s.indent+" ":e.indent||""),e.path=s?s.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,Gwt.unstyle(e.message).length));let c={...e};return e.reset=(f=c.input,p=c.value)=>{for(let h of Object.keys(c))e[h]=c[h];e.input=f,e.value=p},a==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,s){let a=await this.toChoice(e,r,s);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,s){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelectedr.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(a=>this.toggle(a,r));let s=e.parent;for(;s;){let a=s.choices.filter(n=>this.isDisabled(n));s.enabled=a.every(n=>n.enabled===!0),s=s.parent}return Qwe(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=s=>{let a=Number(s);if(a>this.choices.length-1)return this.alert();let n=this.focused,c=this.choices.find(f=>a===f.index);if(!c.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(c)===-1){let f=LG(this.choices),p=f.indexOf(c);if(n.index>p){let h=f.slice(p,p+this.limit),E=f.filter(C=>!h.includes(C));this.choices=h.concat(E)}else{let h=p-this.limit+1;this.choices=f.slice(h).concat(f.slice(0,h))}}return this.index=this.choices.indexOf(c),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(s=>{let a=this.choices.length,n=this.num,c=(f=!1,p)=>{clearTimeout(this.numberTimeout),f&&(p=r(n)),this.num="",s(p)};if(n==="0"||n.length===1&&+(n+"0")>a)return c(!0);if(Number(n)>a)return c(!1,this.alert());this.numberTimeout=setTimeout(()=>c(!0),this.delay)})}home(){return this.choices=LG(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=LG(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===0?this.alert():e>r&&s===0?this.scrollUp():(this.index=(s-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===r-1?this.alert():e>r&&s===r-1?this.scrollDown():(this.index=(s+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=Vwt(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=Kwt(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){Jwt(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(s=>e[s]===!0)?!0:e&&e.role==="heading"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(s=>!this.isDisabled(s));return e.enabled&&r.every(s=>this.isEnabled(s))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r="value"){return[].concat(e||[]).reduce((s,a)=>(s[a]=this.find(a,r),s),{})}filter(e,r){let a=typeof e=="function"?e:(f,p)=>[f.name,p].includes(e),c=(this.options.multiple?this.state._choices:this.choices).filter(a);return r?c.map(f=>f[r]):c}find(e,r){if(kwe(e))return r?e[r]:e;let a=typeof e=="function"?e:(c,f)=>[c.name,f].includes(e),n=this.choices.find(a);if(n)return r?n[r]:n}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(c=>c.newChoice))return this.alert();let{reorder:r,sort:s}=this.options,a=this.multiple===!0,n=this.selected;return n===void 0?this.alert():(Array.isArray(n)&&r!==!1&&s!==!0&&(n=ZR.reorder(n)),this.value=a?n.map(c=>c.name):n.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(s=>s.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r=="string"||typeof r=="number"){let s=this.find(r);s&&(this.initial=s.index,this.focus(s,!0))}}}get choices(){return Qwe(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:s}=this,a=e.limit||this._limit||r.limit||s.length;return Math.min(a,this.height)}set value(e){super.value=e}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}};function Qwe(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(ZR.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let s=r.choices.filter(a=>!t.isDisabled(a));r.enabled=s.every(a=>a.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}Twe.exports=MG});var j0=L((Nrr,Rwe)=>{"use strict";var zwt=tS(),_G=$o(),UG=class extends zwt{constructor(e){super(e),this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):""}indicator(e,r){return this.multiple?super.indicator(e,r):""}choiceMessage(e,r){let s=this.resolve(e.message,this.state,e,r);return e.role==="heading"&&!_G.hasColor(s)&&(s=this.styles.strong(s)),this.resolve(s,this.state,e,r)}choiceSeparator(){return":"}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await this.indicator(e,r)+(e.pad||""),c=await this.resolve(e.hint,this.state,e,r);c&&!_G.hasColor(c)&&(c=this.styles.muted(c));let f=this.indent(e),p=await this.choiceMessage(e,r),h=()=>[this.margin[3],f+a+n,p,this.margin[1],c].filter(Boolean).join(" ");return e.role==="heading"?h():e.disabled?(_G.hasColor(p)||(p=this.styles.disabled(p)),h()):(s&&(p=this.styles.em(p)),h())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(n,c)=>await this.renderChoice(n,c)),r=await Promise.all(e);r.length||r.push(this.styles.danger("No matching choices"));let s=this.margin[0]+r.join(` -`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,s].filter(Boolean).join(` -`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,s="",a=await this.header(),n=await this.prefix(),c=await this.separator(),f=await this.message();this.options.promptLine!==!1&&(s=[n,f,c,""].join(" "),this.state.prompt=s);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();p&&(s+=p),h&&!s.includes(h)&&(s+=" "+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,s,E,C].filter(Boolean).join(` -`)),this.write(this.margin[2]),this.restore()}};Rwe.exports=UG});var Nwe=L((Orr,Fwe)=>{"use strict";var Zwt=j0(),Xwt=(t,e)=>{let r=t.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),c=e(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+c+s.slice(n+r.length):s}},HG=class extends Zwt{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+e+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let s=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(s))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=Xwt(this.input,e),s=this.choices;this.choices=s.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};Fwe.exports=HG});var qG=L((Lrr,Owe)=>{"use strict";var jG=$o();Owe.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:s="",pos:a,showCursor:n=!0,color:c}=e,f=c||t.styles.placeholder,p=jG.inverse(t.styles.primary),h=R=>p(t.styles.black(R)),E=r,C=" ",S=h(C);if(t.blink&&t.blink.off===!0&&(h=R=>R,S=""),n&&a===0&&s===""&&r==="")return h(C);if(n&&a===0&&(r===s||r===""))return h(s[0])+f(s.slice(1));s=jG.isPrimitive(s)?`${s}`:"",r=jG.isPrimitive(r)?`${r}`:"";let P=s&&s.startsWith(r)&&s!==r,I=P?h(s[r.length]):S;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),I=""),n===!1&&(I=""),P){let R=t.styles.unstyle(E+I);return E+I+f(s.slice(R.length))}return E+I}});var XR=L((Mrr,Lwe)=>{"use strict";var $wt=Ju(),e1t=j0(),t1t=qG(),GG=class extends e1t{constructor(e){super({...e,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:a}=r;return r.value=r.input=a.slice(0,s)+e+a.slice(s),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:s}=e;return e.value=e.input=s.slice(0,r-1)+s.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:s}=e;if(s[r]===void 0)return this.alert();let a=`${s}`.slice(0,r)+`${s}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:s}=e;return r&&r.startsWith(s)&&s!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let s=await this.resolve(e.separator,this.state,e,r)||":";return s?" "+this.styles.disabled(s):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:s,styles:a}=this,{cursor:n,initial:c="",name:f,hint:p,input:h=""}=e,{muted:E,submitted:C,primary:S,danger:P}=a,I=p,R=this.index===r,N=e.validate||(()=>!0),U=await this.choiceSeparator(e,r),W=e.message;this.align==="right"&&(W=W.padStart(this.longest+1," ")),this.align==="left"&&(W=W.padEnd(this.longest+1," "));let te=this.values[f]=h||c,ie=h?"success":"dark";await N.call(e,te,this.state)!==!0&&(ie="danger");let Ae=a[ie],ce=Ae(await this.indicator(e,r))+(e.pad||""),me=this.indent(e),pe=()=>[me,ce,W+U,h,I].filter(Boolean).join(" ");if(s.submitted)return W=$wt.unstyle(W),h=C(h),I="",pe();if(e.format)h=await e.format.call(this,h,e,r);else{let Be=this.styles.muted;h=t1t(this,{input:h,initial:c,pos:n,showCursor:R,color:Be})}return this.isValue(h)||(h=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[f]=await e.result.call(this,te,e,r)),R&&(W=S(W)),e.error?h+=(h?" ":"")+P(e.error.trim()):e.hint&&(h+=(h?" ":"")+E(e.hint.trim())),pe()}async submit(){return this.value=this.values,super.base.submit.call(this)}};Lwe.exports=GG});var WG=L((_rr,_we)=>{"use strict";var r1t=XR(),n1t=()=>{throw new Error("expected prompt to have a custom authenticate method")},Mwe=(t=n1t)=>{class e extends r1t{constructor(s){super(s)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(s){return Mwe(s)}}return e};_we.exports=Mwe()});var jwe=L((Urr,Hwe)=>{"use strict";var i1t=WG();function s1t(t,e){return t.username===this.options.username&&t.password===this.options.password}var Uwe=(t=s1t)=>{let e=[{name:"username",message:"username"},{name:"password",message:"password",format(s){return this.options.showPassword?s:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(s.length))}}];class r extends i1t.create(t){constructor(a){super({...a,choices:e})}static create(a){return Uwe(a)}}return r};Hwe.exports=Uwe()});var $R=L((Hrr,qwe)=>{"use strict";var o1t=nC(),{isPrimitive:a1t,hasColor:l1t}=$o(),YG=class extends o1t{constructor(e){super(e),this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:s}=this;return s.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return a1t(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status==="pending"){let e=await this.element("hint");return l1t(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=this.styles.muted(this.default),f=[s,n,c,a].filter(Boolean).join(" ");this.state.prompt=f;let p=await this.header(),h=this.value=this.cast(e),E=await this.format(h),C=await this.error()||await this.hint(),S=await this.footer();C&&!f.includes(C)&&(E+=" "+C),f+=" "+E,this.clear(r),this.write([p,f,S].filter(Boolean).join(` -`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};qwe.exports=YG});var Wwe=L((jrr,Gwe)=>{"use strict";var c1t=$R(),VG=class extends c1t{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};Gwe.exports=VG});var Vwe=L((qrr,Ywe)=>{"use strict";var u1t=j0(),f1t=XR(),iC=f1t.prototype,KG=class extends u1t{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let s=this.focused,a=s.parent||{};return!s.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():iC.dispatch.call(this,e,r)}append(e,r){return iC.append.call(this,e,r)}delete(e,r){return iC.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?iC.next.call(this):super.next()}prev(){return this.focused.editable?iC.prev.call(this):super.prev()}async indicator(e,r){let s=e.indicator||"",a=e.editable?s:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?iC.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(s=r.enabled===!0),e=await r.validate(s,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};Ywe.exports=KG});var Bm=L((Grr,Kwe)=>{"use strict";var A1t=nC(),p1t=qG(),{isPrimitive:h1t}=$o(),JG=class extends A1t{constructor(e){super(e),this.initial=h1t(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!s||s.name!=="return")?this.append(` -`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+e+`${s}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),s=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):p1t(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),s=await this.separator(),a=await this.message(),n=[r,a,s].filter(Boolean).join(" ");this.state.prompt=n;let c=await this.header(),f=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!f.includes(p)&&(f+=" "+p),n+=" "+f,this.clear(e),this.write([c,n,h].filter(Boolean).join(` -`)),this.restore()}};Kwe.exports=JG});var zwe=L((Wrr,Jwe)=>{"use strict";var g1t=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),eF=t=>g1t(t).filter(Boolean);Jwe.exports=(t,e={},r="")=>{let{past:s=[],present:a=""}=e,n,c;switch(t){case"prev":case"undo":return n=s.slice(0,s.length-1),c=s[s.length-1]||"",{past:eF([r,...n]),present:c};case"next":case"redo":return n=s.slice(1),c=s[0]||"",{past:eF([...n,r]),present:c};case"save":return{past:eF([...s,r]),present:""};case"remove":return c=eF(s.filter(f=>f!==r)),a="",c.length&&(a=c.pop()),{past:c,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var ZG=L((Yrr,Xwe)=>{"use strict";var d1t=Bm(),Zwe=zwe(),zG=class extends d1t{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=Zwe(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=Zwe("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};Xwe.exports=zG});var e1e=L((Vrr,$we)=>{"use strict";var m1t=Bm(),XG=class extends m1t{format(){return""}};$we.exports=XG});var r1e=L((Krr,t1e)=>{"use strict";var y1t=Bm(),$G=class extends y1t{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};t1e.exports=$G});var i1e=L((Jrr,n1e)=>{"use strict";var E1t=j0(),e5=class extends E1t{constructor(e){super({...e,multiple:!0})}};n1e.exports=e5});var r5=L((zrr,s1e)=>{"use strict";var I1t=Bm(),t5=class extends I1t{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(e){let r=e||this.minor,s=this.toNumber(this.input);return sthis.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};s1e.exports=t5});var a1e=L((Zrr,o1e)=>{o1e.exports=r5()});var c1e=L((Xrr,l1e)=>{"use strict";var C1t=Bm(),n5=class extends C1t{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};l1e.exports=n5});var A1e=L(($rr,f1e)=>{"use strict";var w1t=Ju(),B1t=tS(),u1e=$o(),i5=class extends B1t{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||` - `;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(s=>` ${s.name} - ${s.message}`)].map(s=>this.styles.muted(s)).join(` -`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let s=this.scaleLength-r.join("").length,a=Math.round(s/(r.length-1)),c=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),f=" ".repeat(this.widths[0]);return this.margin[3]+f+this.margin[1]+c}scaleIndicator(e,r,s){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,s);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let s=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return s.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!u1e.hasColor(n)&&(n=this.styles.muted(n));let c=I=>this.margin[3]+I.replace(/\s+$/,"").padEnd(this.widths[0]," "),f=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),C=this.margin[1]+this.margin[3];this.scaleLength=w1t.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-C.length);let P=u1e.wordWrap(h,{width:this.widths[0],newline:f}).split(` -`).map(I=>c(I)+this.margin[1]);return s&&(E=this.styles.info(E),P=P.map(I=>this.styles.info(I))),P[0]+=E,this.linebreak&&P.push(""),[p+a,P.join(` -`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(a=>a.join(" "))].join(` -`)}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c="";this.options.promptLine!==!1&&(c=[s,n,a,""].join(" "),this.state.prompt=c);let f=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),C=await this.renderChoices(),S=await this.footer(),P=this.emptyError;p&&(c+=p),E&&!c.includes(E)&&(c+=" "+E),e&&!p&&!C.trim()&&this.multiple&&P!=null&&(c+=this.styles.danger(P)),this.clear(r),this.write([f,c,h,C,S].filter(Boolean).join(` -`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};f1e.exports=i5});var g1e=L((enr,h1e)=>{"use strict";var p1e=Ju(),v1t=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",o5=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=v1t(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},S1t=async(t={},e={},r=s=>s)=>{let s=new Set,a=t.fields||[],n=t.template,c=[],f=[],p=[],h=1;typeof n=="function"&&(n=await n());let E=-1,C=()=>n[++E],S=()=>n[E+1],P=I=>{I.line=h,c.push(I)};for(P({type:"bos",value:""});Eie.name===U.key);U.field=a.find(ie=>ie.name===U.key),te||(te=new o5(U),f.push(te)),te.lines.push(U.line-1);continue}let R=c[c.length-1];R.type==="text"&&R.line===h?R.value+=I:P({type:"text",value:I})}return P({type:"eos",value:""}),{input:n,tabstops:c,unique:s,keys:p,items:f}};h1e.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),s={...e.values,...e.initial},{tabstops:a,items:n,keys:c}=await S1t(e,s),f=s5("result",t,e),p=s5("format",t,e),h=s5("validate",t,e,!0),E=t.isValue.bind(t);return async(C={},S=!1)=>{let P=0;C.required=r,C.items=n,C.keys=c,C.output="";let I=async(W,te,ie,Ae)=>{let ce=await h(W,te,ie,Ae);return ce===!1?"Invalid field "+ie.name:ce};for(let W of a){let te=W.value,ie=W.key;if(W.type!=="template"){te&&(C.output+=te);continue}if(W.type==="template"){let Ae=n.find(Ce=>Ce.name===ie);e.required===!0&&C.required.add(Ae.name);let ce=[Ae.input,C.values[Ae.value],Ae.value,te].find(E),pe=(Ae.field||{}).message||W.inner;if(S){let Ce=await I(C.values[ie],C,Ae,P);if(Ce&&typeof Ce=="string"||Ce===!1){C.invalid.set(ie,Ce);continue}C.invalid.delete(ie);let g=await f(C.values[ie],C,Ae,P);C.output+=p1e.unstyle(g);continue}Ae.placeholder=!1;let Be=te;te=await p(te,C,Ae,P),ce!==te?(C.values[ie]=ce,te=t.styles.typing(ce),C.missing.delete(pe)):(C.values[ie]=void 0,ce=`<${pe}>`,te=t.styles.primary(ce),Ae.placeholder=!0,C.required.has(ie)&&C.missing.add(pe)),C.missing.has(pe)&&C.validating&&(te=t.styles.warning(ce)),C.invalid.has(ie)&&C.validating&&(te=t.styles.danger(ce)),P===C.index&&(Be!==te?te=t.styles.underline(te):te=t.styles.heading(p1e.unstyle(te))),P++}te&&(C.output+=te)}let R=C.output.split(` -`).map(W=>" "+W),N=n.length,U=0;for(let W of n)C.invalid.has(W.name)&&W.lines.forEach(te=>{R[te][0]===" "&&(R[te]=C.styles.danger(C.symbols.bullet)+R[te].slice(1))}),t.isValue(C.values[W.name])&&U++;return C.completed=(U/N*100).toFixed(0),C.output=R.join(` -`),C.output}};function s5(t,e,r,s){return(a,n,c,f)=>typeof c.field[t]=="function"?c.field[t].call(e,a,n,c,f):[s,a].find(p=>e.isValue(p))}});var m1e=L((tnr,d1e)=>{"use strict";var D1t=Ju(),b1t=g1e(),P1t=nC(),a5=class extends P1t{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await b1t(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let s=this.getItem(),a=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),s=e.input.slice(0,this.cursor-1);this.input=e.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:s,size:a}=this.state,n=[this.options.newline,` -`].find(W=>W!=null),c=await this.prefix(),f=await this.separator(),p=await this.message(),h=[c,p,f].filter(Boolean).join(" ");this.state.prompt=h;let E=await this.header(),C=await this.error()||"",S=await this.hint()||"",P=s?"":await this.interpolate(this.state),I=this.state.key=r[e]||"",R=await this.format(I),N=await this.footer();R&&(h+=" "+R),S&&!R&&this.state.completed===0&&(h+=" "+S),this.clear(a);let U=[E,h,P,N,C.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:s,index:a}=this.state,n=r.find(c=>c.name===s[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:s,values:a}=this.state;if(e.size){let f="";for(let[p,h]of e)f+=`Invalid ${p}: ${h} -`;return this.state.error=f,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let c=D1t.unstyle(s).split(` -`).map(f=>f.slice(1)).join(` -`);return this.value={values:a,result:c},super.submit()}};d1e.exports=a5});var E1e=L((rnr,y1e)=>{"use strict";var x1t="(Use + to sort)",k1t=j0(),l5=class extends k1t{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,x1t].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let s=await super.renderChoice(e,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};y1e.exports=l5});var C1e=L((nnr,I1e)=>{"use strict";var Q1t=tS(),c5=class extends Q1t{constructor(e={}){if(super(e),this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(` - `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let s of r)s.scale=T1t(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],s=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!s,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=this.term==="Hyper",n=a?9:8,c=a?"":" ",f=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=te=>(te?this.styles.success("\u25C9"):"\u25EF")+c,E=r+1+".",C=s?this.styles.heading:this.styles.noop,S=await this.resolve(e.message,this.state,e,r),P=this.indent(e),I=P+e.scale.map((te,ie)=>h(ie===e.scaleIdx)).join(f),R=te=>te===e.scaleIdx?C(te):te,N=P+e.scale.map((te,ie)=>R(ie)).join(p),U=()=>[E,S].filter(Boolean).join(" "),W=()=>[U(),I,N," "].filter(Boolean).join(` -`);return s&&(I=this.styles.cyan(I),N=this.styles.cyan(N)),W()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(` -`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=[s,n,a].filter(Boolean).join(" ");this.state.prompt=c;let f=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();(p||!h)&&(c+=" "+p),h&&!c.includes(h)&&(c+=" "+h),e&&!p&&!E&&this.multiple&&this.type!=="form"&&(c+=this.styles.danger(this.emptyError)),this.clear(r),this.write([c,f,E,C].filter(Boolean).join(` -`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function T1t(t,e={}){if(Array.isArray(e.scale))return e.scale.map(s=>({...s}));let r=[];for(let s=1;s{w1e.exports=ZG()});var S1e=L((snr,v1e)=>{"use strict";var R1t=$R(),u5=class extends R1t{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=s=>this.styles.primary.underline(s);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),s=await this.prefix(),a=await this.separator(),n=await this.message(),c=await this.format(),f=await this.error()||await this.hint(),p=await this.footer(),h=[s,n,a,c].join(" ");this.state.prompt=h,f&&!h.includes(f)&&(h+=" "+f),this.clear(e),this.write([r,h,p].filter(Boolean).join(` -`)),this.write(this.margin[2]),this.restore()}};v1e.exports=u5});var b1e=L((onr,D1e)=>{"use strict";var F1t=j0(),f5=class extends F1t{constructor(e){if(super(e),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let s=await super.toChoices(e,r);if(s.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>s.length)throw new Error("Please specify the index of the correct answer from the list of choices");return s}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};D1e.exports=f5});var x1e=L(A5=>{"use strict";var P1e=$o(),Ts=(t,e)=>{P1e.defineExport(A5,t,e),P1e.defineExport(A5,t.toLowerCase(),e)};Ts("AutoComplete",()=>Nwe());Ts("BasicAuth",()=>jwe());Ts("Confirm",()=>Wwe());Ts("Editable",()=>Vwe());Ts("Form",()=>XR());Ts("Input",()=>ZG());Ts("Invisible",()=>e1e());Ts("List",()=>r1e());Ts("MultiSelect",()=>i1e());Ts("Numeral",()=>a1e());Ts("Password",()=>c1e());Ts("Scale",()=>A1e());Ts("Select",()=>j0());Ts("Snippet",()=>m1e());Ts("Sort",()=>E1e());Ts("Survey",()=>C1e());Ts("Text",()=>B1e());Ts("Toggle",()=>S1e());Ts("Quiz",()=>b1e())});var Q1e=L((lnr,k1e)=>{k1e.exports={ArrayPrompt:tS(),AuthPrompt:WG(),BooleanPrompt:$R(),NumberPrompt:r5(),StringPrompt:Bm()}});var nS=L((cnr,R1e)=>{"use strict";var T1e=Ie("assert"),h5=Ie("events"),q0=$o(),Zu=class extends h5{constructor(e,r){super(),this.options=q0.merge({},e),this.answers={...r}}register(e,r){if(q0.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}T1e.equal(typeof r,"function","expected a function");let s=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(q0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=q0.merge({},this.options,e),{type:s,name:a}=e,{set:n,get:c}=q0;if(typeof s=="function"&&(s=await s.call(this,e,this.answers)),!s)return this.answers[a];T1e(this.prompts[s],`Prompt "${s}" is not registered`);let f=new this.prompts[s](r),p=c(this.answers,a);f.state.answers=this.answers,f.enquirer=this,a&&f.on("submit",E=>{this.emit("answer",a,E,f),n(this.answers,a,E)});let h=f.emit.bind(f);return f.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",f,this),r.autofill&&p!=null?(f.value=f.input=p,r.autofill==="show"&&await f.submit()):p=f.value=await f.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||nC()}static get prompts(){return x1e()}static get types(){return Q1e()}static get prompt(){let e=(r,...s)=>{let a=new this(...s),n=a.emit.bind(a);return a.emit=(...c)=>(e.emit(...c),n(...c)),a.prompt(r)};return q0.mixinEmitter(e,new h5),e}};q0.mixinEmitter(Zu,new h5);var p5=Zu.prompts;for(let t of Object.keys(p5)){let e=t.toLowerCase(),r=s=>new p5[t](s).run();Zu.prompt[e]=r,Zu[e]=r,Zu[t]||Reflect.defineProperty(Zu,t,{get:()=>p5[t]})}var rS=t=>{q0.defineExport(Zu,t,()=>Zu.types[t])};rS("ArrayPrompt");rS("AuthPrompt");rS("BooleanPrompt");rS("NumberPrompt");rS("StringPrompt");R1e.exports=Zu});var aS=L((Wnr,U1e)=>{var H1t=HR();function j1t(t,e,r){var s=t==null?void 0:H1t(t,e);return s===void 0?r:s}U1e.exports=j1t});var q1e=L((Znr,j1e)=>{function q1t(t,e){for(var r=-1,s=t==null?0:t.length;++r{var G1t=Vd(),W1t=Lk();function Y1t(t,e){return t&&G1t(e,W1t(e),t)}G1e.exports=Y1t});var V1e=L(($nr,Y1e)=>{var V1t=Vd(),K1t=jE();function J1t(t,e){return t&&V1t(e,K1t(e),t)}Y1e.exports=J1t});var J1e=L((eir,K1e)=>{var z1t=Vd(),Z1t=Qk();function X1t(t,e){return z1t(t,Z1t(t),e)}K1e.exports=X1t});var I5=L((tir,z1e)=>{var $1t=kk(),e2t=jk(),t2t=Qk(),r2t=k4(),n2t=Object.getOwnPropertySymbols,i2t=n2t?function(t){for(var e=[];t;)$1t(e,t2t(t)),t=e2t(t);return e}:r2t;z1e.exports=i2t});var X1e=L((rir,Z1e)=>{var s2t=Vd(),o2t=I5();function a2t(t,e){return s2t(t,o2t(t),e)}Z1e.exports=a2t});var C5=L((nir,$1e)=>{var l2t=x4(),c2t=I5(),u2t=jE();function f2t(t){return l2t(t,u2t,c2t)}$1e.exports=f2t});var t2e=L((iir,e2e)=>{var A2t=Object.prototype,p2t=A2t.hasOwnProperty;function h2t(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&p2t.call(t,"index")&&(r.index=t.index,r.input=t.input),r}e2e.exports=h2t});var n2e=L((sir,r2e)=>{var g2t=Uk();function d2t(t,e){var r=e?g2t(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}r2e.exports=d2t});var s2e=L((oir,i2e)=>{var m2t=/\w*$/;function y2t(t){var e=new t.constructor(t.source,m2t.exec(t));return e.lastIndex=t.lastIndex,e}i2e.exports=y2t});var u2e=L((air,c2e)=>{var o2e=Gd(),a2e=o2e?o2e.prototype:void 0,l2e=a2e?a2e.valueOf:void 0;function E2t(t){return l2e?Object(l2e.call(t)):{}}c2e.exports=E2t});var A2e=L((lir,f2e)=>{var I2t=Uk(),C2t=n2e(),w2t=s2e(),B2t=u2e(),v2t=G4(),S2t="[object Boolean]",D2t="[object Date]",b2t="[object Map]",P2t="[object Number]",x2t="[object RegExp]",k2t="[object Set]",Q2t="[object String]",T2t="[object Symbol]",R2t="[object ArrayBuffer]",F2t="[object DataView]",N2t="[object Float32Array]",O2t="[object Float64Array]",L2t="[object Int8Array]",M2t="[object Int16Array]",_2t="[object Int32Array]",U2t="[object Uint8Array]",H2t="[object Uint8ClampedArray]",j2t="[object Uint16Array]",q2t="[object Uint32Array]";function G2t(t,e,r){var s=t.constructor;switch(e){case R2t:return I2t(t);case S2t:case D2t:return new s(+t);case F2t:return C2t(t,r);case N2t:case O2t:case L2t:case M2t:case _2t:case U2t:case H2t:case j2t:case q2t:return v2t(t,r);case b2t:return new s;case P2t:case Q2t:return new s(t);case x2t:return w2t(t);case k2t:return new s;case T2t:return B2t(t)}}f2e.exports=G2t});var h2e=L((cir,p2e)=>{var W2t=FB(),Y2t=zf(),V2t="[object Map]";function K2t(t){return Y2t(t)&&W2t(t)==V2t}p2e.exports=K2t});var y2e=L((uir,m2e)=>{var J2t=h2e(),z2t=Rk(),g2e=Fk(),d2e=g2e&&g2e.isMap,Z2t=d2e?z2t(d2e):J2t;m2e.exports=Z2t});var I2e=L((fir,E2e)=>{var X2t=FB(),$2t=zf(),eBt="[object Set]";function tBt(t){return $2t(t)&&X2t(t)==eBt}E2e.exports=tBt});var v2e=L((Air,B2e)=>{var rBt=I2e(),nBt=Rk(),C2e=Fk(),w2e=C2e&&C2e.isSet,iBt=w2e?nBt(w2e):rBt;B2e.exports=iBt});var w5=L((pir,P2e)=>{var sBt=Pk(),oBt=q1e(),aBt=qk(),lBt=W1e(),cBt=V1e(),uBt=q4(),fBt=Hk(),ABt=J1e(),pBt=X1e(),hBt=F4(),gBt=C5(),dBt=FB(),mBt=t2e(),yBt=A2e(),EBt=W4(),IBt=xc(),CBt=xB(),wBt=y2e(),BBt=Wl(),vBt=v2e(),SBt=Lk(),DBt=jE(),bBt=1,PBt=2,xBt=4,S2e="[object Arguments]",kBt="[object Array]",QBt="[object Boolean]",TBt="[object Date]",RBt="[object Error]",D2e="[object Function]",FBt="[object GeneratorFunction]",NBt="[object Map]",OBt="[object Number]",b2e="[object Object]",LBt="[object RegExp]",MBt="[object Set]",_Bt="[object String]",UBt="[object Symbol]",HBt="[object WeakMap]",jBt="[object ArrayBuffer]",qBt="[object DataView]",GBt="[object Float32Array]",WBt="[object Float64Array]",YBt="[object Int8Array]",VBt="[object Int16Array]",KBt="[object Int32Array]",JBt="[object Uint8Array]",zBt="[object Uint8ClampedArray]",ZBt="[object Uint16Array]",XBt="[object Uint32Array]",Ci={};Ci[S2e]=Ci[kBt]=Ci[jBt]=Ci[qBt]=Ci[QBt]=Ci[TBt]=Ci[GBt]=Ci[WBt]=Ci[YBt]=Ci[VBt]=Ci[KBt]=Ci[NBt]=Ci[OBt]=Ci[b2e]=Ci[LBt]=Ci[MBt]=Ci[_Bt]=Ci[UBt]=Ci[JBt]=Ci[zBt]=Ci[ZBt]=Ci[XBt]=!0;Ci[RBt]=Ci[D2e]=Ci[HBt]=!1;function rF(t,e,r,s,a,n){var c,f=e&bBt,p=e&PBt,h=e&xBt;if(r&&(c=a?r(t,s,a,n):r(t)),c!==void 0)return c;if(!BBt(t))return t;var E=IBt(t);if(E){if(c=mBt(t),!f)return fBt(t,c)}else{var C=dBt(t),S=C==D2e||C==FBt;if(CBt(t))return uBt(t,f);if(C==b2e||C==S2e||S&&!a){if(c=p||S?{}:EBt(t),!f)return p?pBt(t,cBt(c,t)):ABt(t,lBt(c,t))}else{if(!Ci[C])return a?t:{};c=yBt(t,C,f)}}n||(n=new sBt);var P=n.get(t);if(P)return P;n.set(t,c),vBt(t)?t.forEach(function(N){c.add(rF(N,e,r,N,t,n))}):wBt(t)&&t.forEach(function(N,U){c.set(U,rF(N,e,r,U,t,n))});var I=h?p?gBt:hBt:p?DBt:SBt,R=E?void 0:I(t);return oBt(R||t,function(N,U){R&&(U=N,N=t[U]),aBt(c,U,rF(N,e,r,U,t,n))}),c}P2e.exports=rF});var B5=L((hir,x2e)=>{var $Bt=w5(),evt=1,tvt=4;function rvt(t){return $Bt(t,evt|tvt)}x2e.exports=rvt});var v5=L((gir,k2e)=>{var nvt=hG();function ivt(t,e,r){return t==null?t:nvt(t,e,r)}k2e.exports=ivt});var N2e=L((Cir,F2e)=>{var svt=Object.prototype,ovt=svt.hasOwnProperty;function avt(t,e){return t!=null&&ovt.call(t,e)}F2e.exports=avt});var L2e=L((wir,O2e)=>{var lvt=N2e(),cvt=gG();function uvt(t,e){return t!=null&&cvt(t,e,lvt)}O2e.exports=uvt});var _2e=L((Bir,M2e)=>{function fvt(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}M2e.exports=fvt});var H2e=L((vir,U2e)=>{var Avt=HR(),pvt=s6();function hvt(t,e){return e.length<2?t:Avt(t,pvt(e,0,-1))}U2e.exports=hvt});var D5=L((Sir,j2e)=>{var gvt=Im(),dvt=_2e(),mvt=H2e(),yvt=zI();function Evt(t,e){return e=gvt(e,t),t=mvt(t,e),t==null||delete t[yvt(dvt(e))]}j2e.exports=Evt});var b5=L((Dir,q2e)=>{var Ivt=D5();function Cvt(t,e){return t==null?!0:Ivt(t,e)}q2e.exports=Cvt});var K2e=L((tsr,vvt)=>{vvt.exports={name:"@yarnpkg/cli",version:"4.9.2",license:"BSD-2-Clause",main:"./sources/index.ts",exports:{".":"./sources/index.ts","./polyfills":"./sources/polyfills.ts","./package.json":"./package.json"},dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-constraints":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-exec":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"workspace:^","@yarnpkg/plugin-interactive-tools":"workspace:^","@yarnpkg/plugin-jsr":"workspace:^","@yarnpkg/plugin-link":"workspace:^","@yarnpkg/plugin-nm":"workspace:^","@yarnpkg/plugin-npm":"workspace:^","@yarnpkg/plugin-npm-cli":"workspace:^","@yarnpkg/plugin-pack":"workspace:^","@yarnpkg/plugin-patch":"workspace:^","@yarnpkg/plugin-pnp":"workspace:^","@yarnpkg/plugin-pnpm":"workspace:^","@yarnpkg/plugin-stage":"workspace:^","@yarnpkg/plugin-typescript":"workspace:^","@yarnpkg/plugin-version":"workspace:^","@yarnpkg/plugin-workspace-tools":"workspace:^","@yarnpkg/shell":"workspace:^","ci-info":"^4.0.0",clipanion:"^4.0.0-rc.2",semver:"^7.1.2",tslib:"^2.4.0",typanion:"^3.14.0"},devDependencies:{"@types/semver":"^7.1.0","@yarnpkg/builder":"workspace:^","@yarnpkg/monorepo":"workspace:^","@yarnpkg/pnpify":"workspace:^"},peerDependencies:{"@yarnpkg/core":"workspace:^"},scripts:{postpack:"rm -rf lib",prepack:'run build:compile "$(pwd)"',"build:cli+hook":"run build:pnp:hook && builder build bundle","build:cli":"builder build bundle","run:cli":"builder run","update-local":"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/"},publishConfig:{main:"./lib/index.js",bin:null,exports:{".":"./lib/index.js","./package.json":"./package.json"}},files:["/lib/**/*","!/lib/pluginConfiguration.*","!/lib/cli.*"],"@yarnpkg/builder":{bundles:{standard:["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-jsr","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]}},repository:{type:"git",url:"git+https://github.com/yarnpkg/berry.git",directory:"packages/yarnpkg-cli"},engines:{node:">=18.12.0"}}});var O5=L((Flr,oBe)=>{"use strict";oBe.exports=function(e,r){r===!0&&(r=0);var s="";if(typeof e=="string")try{s=new URL(e).protocol}catch{}else e&&e.constructor===URL&&(s=e.protocol);var a=s.split(/\:|\+/).filter(Boolean);return typeof r=="number"?a[r]:a}});var lBe=L((Nlr,aBe)=>{"use strict";var Gvt=O5();function Wvt(t){var e={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:t,query:{},parse_failed:!1};try{var r=new URL(t);e.protocols=Gvt(r),e.protocol=e.protocols[0],e.port=r.port,e.resource=r.hostname,e.host=r.host,e.user=r.username||"",e.password=r.password||"",e.pathname=r.pathname,e.hash=r.hash.slice(1),e.search=r.search.slice(1),e.href=r.href,e.query=Object.fromEntries(r.searchParams)}catch{e.protocols=["file"],e.protocol=e.protocols[0],e.port="",e.resource="",e.user="",e.pathname="",e.hash="",e.search="",e.href=t,e.query={},e.parse_failed=!0}return e}aBe.exports=Wvt});var fBe=L((Olr,uBe)=>{"use strict";var Yvt=lBe();function Vvt(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Kvt=Vvt(Yvt),Jvt="text/plain",zvt="us-ascii",cBe=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Zvt=(t,{stripHash:e})=>{let r=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:s,data:a,hash:n}=r.groups,c=s.split(";");n=e?"":n;let f=!1;c[c.length-1]==="base64"&&(c.pop(),f=!0);let p=(c.shift()||"").toLowerCase(),E=[...c.map(C=>{let[S,P=""]=C.split("=").map(I=>I.trim());return S==="charset"&&(P=P.toLowerCase(),P===zvt)?"":`${S}${P?`=${P}`:""}`}).filter(Boolean)];return f&&E.push("base64"),(E.length>0||p&&p!==Jvt)&&E.unshift(p),`data:${E.join(";")},${f?a.trim():a}${n?`#${n}`:""}`};function Xvt(t,e){if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return Zvt(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let a=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),e.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),e.stripAuthentication&&(a.username="",a.password=""),e.stripHash?a.hash="":e.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,"")),a.pathname){let c=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,f=0,p="";for(;;){let E=c.exec(a.pathname);if(!E)break;let C=E[0],S=E.index,P=a.pathname.slice(f,S);p+=P.replace(/\/{2,}/g,"/"),p+=C,f=S+C.length}let h=a.pathname.slice(f,a.pathname.length);p+=h.replace(/\/{2,}/g,"/"),a.pathname=p}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let c=a.pathname.split("/"),f=c[c.length-1];cBe(f,e.removeDirectoryIndex)&&(c=c.slice(0,-1),a.pathname=c.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let c of[...a.searchParams.keys()])cBe(c,e.removeQueryParameters)&&a.searchParams.delete(c);if(e.removeQueryParameters===!0&&(a.search=""),e.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch{}}e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,""));let n=t;return t=a.toString(),!e.removeSingleSlash&&a.pathname==="/"&&!n.endsWith("/")&&a.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}var L5=(t,e=!1)=>{let r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:]([\~,\.\w,\-,\_,\/]+?(?:\.git|\/)?)$/,s=n=>{let c=new Error(n);throw c.subject_url=t,c};(typeof t!="string"||!t.trim())&&s("Invalid url."),t.length>L5.MAX_INPUT_LENGTH&&s("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),e&&(typeof e!="object"&&(e={stripHash:!1}),t=Xvt(t,e));let a=Kvt.default(t);if(a.parse_failed){let n=a.href.match(r);n?(a.protocols=["ssh"],a.protocol="ssh",a.resource=n[2],a.host=n[2],a.user=n[1],a.pathname=`/${n[3]}`,a.parse_failed=!1):s("URL parsing failed.")}return a};L5.MAX_INPUT_LENGTH=2048;uBe.exports=L5});var hBe=L((Llr,pBe)=>{"use strict";var $vt=O5();function ABe(t){if(Array.isArray(t))return t.indexOf("ssh")!==-1||t.indexOf("rsync")!==-1;if(typeof t!="string")return!1;var e=$vt(t);if(t=t.substring(t.indexOf("://")+3),ABe(e))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(r)&&t.indexOf("@"){"use strict";var eSt=fBe(),gBe=hBe();function tSt(t){var e=eSt(t);return e.token="",e.password==="x-oauth-basic"?e.token=e.user:e.user==="x-token-auth"&&(e.token=e.password),gBe(e.protocols)||e.protocols.length===0&&gBe(t)?e.protocol="ssh":e.protocols.length?e.protocol=e.protocols[0]:(e.protocol="file",e.protocols=["file"]),e.href=e.href.replace(/\/$/,""),e}dBe.exports=tSt});var EBe=L((_lr,yBe)=>{"use strict";var rSt=mBe();function M5(t){if(typeof t!="string")throw new Error("The url must be a string.");var e=/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i;e.test(t)&&(t="https://github.com/"+t);var r=rSt(t),s=r.resource.split("."),a=null;switch(r.toString=function(N){return M5.stringify(this,N)},r.source=s.length>2?s.slice(1-s.length).join("."):r.source=r.resource,r.git_suffix=/\.git$/.test(r.pathname),r.name=decodeURIComponent((r.pathname||r.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),r.owner=decodeURIComponent(r.user),r.source){case"git.cloudforge.com":r.owner=r.user,r.organization=s[0],r.source="cloudforge.com";break;case"visualstudio.com":if(r.resource==="vs-ssh.visualstudio.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3],r.full_name=a[2]+"/"+a[3]);break}else{a=r.name.split("/"),a.length===2?(r.owner=a[1],r.name=a[1],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name);break}case"dev.azure.com":case"azure.com":if(r.resource==="ssh.dev.azure.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3]);break}else{a=r.name.split("/"),a.length===5?(r.organization=a[0],r.owner=a[1],r.name=a[4],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name),r.query&&r.query.path&&(r.filepath=r.query.path.replace(/^\/+/g,"")),r.query&&r.query.version&&(r.ref=r.query.version.replace(/^GB/,""));break}default:a=r.name.split("/");var n=a.length-1;if(a.length>=2){var c=a.indexOf("-",2),f=a.indexOf("blob",2),p=a.indexOf("tree",2),h=a.indexOf("commit",2),E=a.indexOf("src",2),C=a.indexOf("raw",2),S=a.indexOf("edit",2);n=c>0?c-1:f>0?f-1:p>0?p-1:h>0?h-1:E>0?E-1:C>0?C-1:S>0?S-1:n,r.owner=a.slice(0,n).join("/"),r.name=a[n],h&&(r.commit=a[n+2])}r.ref="",r.filepathtype="",r.filepath="";var P=a.length>n&&a[n+1]==="-"?n+1:n;a.length>P+2&&["raw","src","blob","tree","edit"].indexOf(a[P+1])>=0&&(r.filepathtype=a[P+1],r.ref=a[P+2],a.length>P+3&&(r.filepath=a.slice(P+3).join("/"))),r.organization=r.owner;break}r.full_name||(r.full_name=r.owner,r.name&&(r.full_name&&(r.full_name+="/"),r.full_name+=r.name)),r.owner.startsWith("scm/")&&(r.source="bitbucket-server",r.owner=r.owner.replace("scm/",""),r.organization=r.owner,r.full_name=r.owner+"/"+r.name);var I=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/,R=I.exec(r.pathname);return R!=null&&(r.source="bitbucket-server",R[1]==="users"?r.owner="~"+R[2]:r.owner=R[2],r.organization=r.owner,r.name=R[3],a=R[4].split("/"),a.length>1&&(["raw","browse"].indexOf(a[1])>=0?(r.filepathtype=a[1],a.length>2&&(r.filepath=a.slice(2).join("/"))):a[1]==="commits"&&a.length>2&&(r.commit=a[2])),r.full_name=r.owner+"/"+r.name,r.query.at?r.ref=r.query.at:r.ref=""),r}M5.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join("+"):t.protocol);var r=t.port?":"+t.port:"",s=t.user||"git",a=t.git_suffix?".git":"";switch(e){case"ssh":return r?"ssh://"+s+"@"+t.resource+r+"/"+t.full_name+a:s+"@"+t.resource+":"+t.full_name+a;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return e+"://"+s+"@"+t.resource+r+"/"+t.full_name+a;case"http":case"https":var n=t.token?nSt(t):t.user&&(t.protocols.includes("http")||t.protocols.includes("https"))?t.user+"@":"";return e+"://"+n+t.resource+r+"/"+iSt(t)+a;default:return t.href}};function nSt(t){switch(t.source){case"bitbucket.org":return"x-token-auth:"+t.token+"@";default:return t.token+"@"}}function iSt(t){switch(t.source){case"bitbucket-server":return"scm/"+t.full_name;default:return""+t.full_name}}yBe.exports=M5});var NBe=L((yur,FBe)=>{var gSt=QT(),dSt=Hk(),mSt=xc(),ySt=oI(),ESt=pG(),ISt=zI(),CSt=bv();function wSt(t){return mSt(t)?gSt(t,ISt):ySt(t)?[t]:dSt(ESt(CSt(t)))}FBe.exports=wSt});function DSt(t,e){return e===1&&SSt.has(t[0])}function hS(t){let e=Array.isArray(t)?t:(0,MBe.default)(t);return e.map((s,a)=>BSt.test(s)?`[${s}]`:vSt.test(s)&&!DSt(e,a)?`.${s}`:`[${JSON.stringify(s)}]`).join("").replace(/^\./,"")}function bSt(t,e){let r=[];if(e.methodName!==null&&r.push(he.pretty(t,e.methodName,he.Type.CODE)),e.file!==null){let s=[];s.push(he.pretty(t,e.file,he.Type.PATH)),e.line!==null&&(s.push(he.pretty(t,e.line,he.Type.NUMBER)),e.column!==null&&s.push(he.pretty(t,e.column,he.Type.NUMBER))),r.push(`(${s.join(he.pretty(t,":","grey"))})`)}return r.join(" ")}function oF(t,{manifestUpdates:e,reportedErrors:r},{fix:s}={}){let a=new Map,n=new Map,c=[...r.keys()].map(f=>[f,new Map]);for(let[f,p]of[...c,...e]){let h=r.get(f)?.map(P=>({text:P,fixable:!1}))??[],E=!1,C=t.getWorkspaceByCwd(f),S=C.manifest.exportTo({});for(let[P,I]of p){if(I.size>1){let R=[...I].map(([N,U])=>{let W=he.pretty(t.configuration,N,he.Type.INSPECT),te=U.size>0?bSt(t.configuration,U.values().next().value):null;return te!==null?` -${W} at ${te}`:` -${W}`}).join("");h.push({text:`Conflict detected in constraint targeting ${he.pretty(t.configuration,P,he.Type.CODE)}; conflicting values are:${R}`,fixable:!1})}else{let[[R]]=I,N=(0,OBe.default)(S,P);if(JSON.stringify(N)===JSON.stringify(R))continue;if(!s){let U=typeof N>"u"?`Missing field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}`:typeof R>"u"?`Extraneous field ${he.pretty(t.configuration,P,he.Type.CODE)} currently set to ${he.pretty(t.configuration,N,he.Type.INSPECT)}`:`Invalid field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}, found ${he.pretty(t.configuration,N,he.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof R>"u"?(0,_Be.default)(S,P):(0,LBe.default)(S,P,R),E=!0}E&&a.set(C,S)}h.length>0&&n.set(C,h)}return{changedWorkspaces:a,remainingErrors:n}}function UBe(t,{configuration:e}){let r={children:[]};for(let[s,a]of t){let n=[];for(let f of a){let p=f.text.split(/\n/);f.fixable&&(p[0]=`${he.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:he.tuple(he.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:he.tuple(he.Type.NO_HINT,h)}))})}let c={value:he.tuple(he.Type.LOCATOR,s.anchoredLocator),children:je.sortMap(n,f=>f.value[1])};r.children.push(c)}return r.children=je.sortMap(r.children,s=>s.value[1]),r}var OBe,LBe,MBe,_Be,WC,BSt,vSt,SSt,gS=Ct(()=>{Ve();OBe=et(aS()),LBe=et(v5()),MBe=et(NBe()),_Be=et(b5()),WC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let s=Object.hasOwn(e,r)?e[r]:void 0;if(typeof s>"u")continue;je.getArrayWithDefault(this.indexes[r],s).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let s=[],a;for(let[c,f]of r){let p=c,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){s.push([p,f]);continue}let E=new Set(h.get(f)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let C of a)E.has(C)||a.delete(C);if(a.size===0)break}let n=[...a??[]];return s.length>0&&(n=n.filter(c=>{for(let[f,p]of s)if(!(typeof p<"u"?Object.hasOwn(c,f)&&c[f]===p:Object.hasOwn(c,f)===!1))return!1;return!0})),n}},BSt=/^[0-9]+$/,vSt=/^[a-zA-Z0-9_]+$/,SSt=new Set(["scripts",...Ht.allDependencies])});var HBe=L((kur,X5)=>{var PSt;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_")])]),null),new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")])]),new t.type.Term("member",[new t.type.Var("X"),new t.type.Var("Xs")]))],"permutation/2":[new t.type.Rule(new t.type.Term("permutation",[new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("permutation",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("permutation",[new t.type.Var("T"),new t.type.Var("P")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("P")]),new t.type.Term("append",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("Y")]),new t.type.Var("S")])])]))],"maplist/2":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("X")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("Xs")])]))],"maplist/3":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs")])]))],"maplist/4":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs")])]))],"maplist/5":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds")])]))],"maplist/6":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es")])]))],"maplist/7":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")]),new t.type.Term(".",[new t.type.Var("F"),new t.type.Var("Fs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E"),new t.type.Var("F")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es"),new t.type.Var("Fs")])]))],"maplist/8":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")]),new t.type.Term(".",[new t.type.Var("F"),new t.type.Var("Fs")]),new t.type.Term(".",[new t.type.Var("G"),new t.type.Var("Gs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E"),new t.type.Var("F"),new t.type.Var("G")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es"),new t.type.Var("Fs"),new t.type.Var("Gs")])]))],"include/3":[new t.type.Rule(new t.type.Term("include",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("include",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("A")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("A"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term("[]",[])]),new t.type.Var("B")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("F"),new t.type.Var("B")]),new t.type.Term(",",[new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("F")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("L"),new t.type.Var("S")])]),new t.type.Term("include",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("S")])])])])]))],"exclude/3":[new t.type.Rule(new t.type.Term("exclude",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("exclude",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("exclude",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("E")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term("[]",[])]),new t.type.Var("Q")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("R"),new t.type.Var("Q")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("R")]),new t.type.Term(",",[new t.type.Term("!",[]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("E")])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("E")])])])])])])]))],"foldl/4":[new t.type.Rule(new t.type.Term("foldl",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Var("I"),new t.type.Var("I")]),null),new t.type.Rule(new t.type.Term("foldl",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("I"),new t.type.Var("R")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("I"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])])])]),new t.type.Var("L2")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P2"),new t.type.Var("L2")]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P2")]),new t.type.Term("foldl",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("R")])])])])]))],"select/3":[new t.type.Rule(new t.type.Term("select",[new t.type.Var("E"),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Xs")]),new t.type.Var("Xs")]),null),new t.type.Rule(new t.type.Term("select",[new t.type.Var("E"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Ys")])]),new t.type.Term("select",[new t.type.Var("E"),new t.type.Var("Xs"),new t.type.Var("Ys")]))],"sum_list/2":[new t.type.Rule(new t.type.Term("sum_list",[new t.type.Term("[]",[]),new t.type.Num(0,!1)]),null),new t.type.Rule(new t.type.Term("sum_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("sum_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term("is",[new t.type.Var("S"),new t.type.Term("+",[new t.type.Var("X"),new t.type.Var("Y")])])]))],"max_list/2":[new t.type.Rule(new t.type.Term("max_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("max_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("max_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Var("Y")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("X")]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("Y")])])]))],"min_list/2":[new t.type.Rule(new t.type.Term("min_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("min_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("min_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("=<",[new t.type.Var("X"),new t.type.Var("Y")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("X")]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("Y")])])]))],"prod_list/2":[new t.type.Rule(new t.type.Term("prod_list",[new t.type.Term("[]",[]),new t.type.Num(1,!1)]),null),new t.type.Rule(new t.type.Term("prod_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("prod_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term("is",[new t.type.Var("S"),new t.type.Term("*",[new t.type.Var("X"),new t.type.Var("Y")])])]))],"last/2":[new t.type.Rule(new t.type.Term("last",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("last",[new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")]),new t.type.Var("X")]),new t.type.Term("last",[new t.type.Var("Xs"),new t.type.Var("X")]))],"prefix/2":[new t.type.Rule(new t.type.Term("prefix",[new t.type.Var("Part"),new t.type.Var("Whole")]),new t.type.Term("append",[new t.type.Var("Part"),new t.type.Var("_"),new t.type.Var("Whole")]))],"nth0/3":[new t.type.Rule(new t.type.Term("nth0",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")])]),new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")]),new t.type.Term("!",[])])])]))],"nth1/3":[new t.type.Rule(new t.type.Term("nth1",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")])]),new t.type.Term(",",[new t.type.Term(">",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")]),new t.type.Term("!",[])])])]))],"nth0/4":[new t.type.Rule(new t.type.Term("nth0",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")])]),new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term("!",[])])])]))],"nth1/4":[new t.type.Rule(new t.type.Term("nth1",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")])]),new t.type.Term(",",[new t.type.Term(">",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term("!",[])])])]))],"nth/5":[new t.type.Rule(new t.type.Term("nth",[new t.type.Var("N"),new t.type.Var("N"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("X"),new t.type.Var("Xs")]),null),new t.type.Rule(new t.type.Term("nth",[new t.type.Var("N"),new t.type.Var("O"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("Y"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Ys")])]),new t.type.Term(",",[new t.type.Term("is",[new t.type.Var("M"),new t.type.Term("+",[new t.type.Var("N"),new t.type.Num(1,!1)])]),new t.type.Term("nth",[new t.type.Var("M"),new t.type.Var("O"),new t.type.Var("Xs"),new t.type.Var("Y"),new t.type.Var("Ys")])]))],"length/2":function(s,a,n){var c=n.args[0],f=n.args[1];if(!t.type.is_variable(f)&&!t.type.is_integer(f))s.throw_error(t.error.type("integer",f,n.indicator));else if(t.type.is_integer(f)&&f.value<0)s.throw_error(t.error.domain("not_less_than_zero",f,n.indicator));else{var p=new t.type.Term("length",[c,new t.type.Num(0,!1),f]);t.type.is_integer(f)&&(p=new t.type.Term(",",[p,new t.type.Term("!",[])])),s.prepend([new t.type.State(a.goal.replace(p),a.substitution,a)])}},"length/3":[new t.type.Rule(new t.type.Term("length",[new t.type.Term("[]",[]),new t.type.Var("N"),new t.type.Var("N")]),null),new t.type.Rule(new t.type.Term("length",[new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("X")]),new t.type.Var("A"),new t.type.Var("N")]),new t.type.Term(",",[new t.type.Term("succ",[new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("length",[new t.type.Var("X"),new t.type.Var("B"),new t.type.Var("N")])]))],"replicate/3":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_integer(f))s.throw_error(t.error.type("integer",f,n.indicator));else if(f.value<0)s.throw_error(t.error.domain("not_less_than_zero",f,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type("list",p,n.indicator));else{for(var h=new t.type.Term("[]"),E=0;E0;C--)E[C].equals(E[C-1])&&E.splice(C,1);for(var S=new t.type.Term("[]"),C=E.length-1;C>=0;C--)S=new t.type.Term(".",[E[C],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[S,f])),a.substitution,a)])}}},"msort/2":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type("list",f,n.indicator));else{for(var p=[],h=c;h.indicator==="./2";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))s.throw_error(t.error.type("list",c,n.indicator));else{for(var E=p.sort(t.compare),C=new t.type.Term("[]"),S=E.length-1;S>=0;S--)C=new t.type.Term(".",[E[S],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[C,f])),a.substitution,a)])}}},"keysort/2":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type("list",f,n.indicator));else{for(var p=[],h,E=c;E.indicator==="./2";){if(h=E.args[0],t.type.is_variable(h)){s.throw_error(t.error.instantiation(n.indicator));return}else if(!t.type.is_term(h)||h.indicator!=="-/2"){s.throw_error(t.error.type("pair",h,n.indicator));return}h.args[0].pair=h.args[1],p.push(h.args[0]),E=E.args[1]}if(t.type.is_variable(E))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(E))s.throw_error(t.error.type("list",c,n.indicator));else{for(var C=p.sort(t.compare),S=new t.type.Term("[]"),P=C.length-1;P>=0;P--)S=new t.type.Term(".",[new t.type.Term("-",[C[P],C[P].pair]),S]),delete C[P].pair;s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[S,f])),a.substitution,a)])}}},"take/3":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type("list",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type("integer",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type("list",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator==="./2";)E.push(C.args[0]),C=C.args[1],h--;if(h===0){for(var S=new t.type.Term("[]"),h=E.length-1;h>=0;h--)S=new t.type.Term(".",[E[h],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[S,p])),a.substitution,a)])}}},"drop/3":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type("list",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type("integer",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type("list",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator==="./2";)E.push(C.args[0]),C=C.args[1],h--;h===0&&s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[C,p])),a.substitution,a)])}},"reverse/2":function(s,a,n){var c=n.args[0],f=n.args[1],p=t.type.is_instantiated_list(c),h=t.type.is_instantiated_list(f);if(t.type.is_variable(c)&&t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(c)&&!t.type.is_fully_list(c))s.throw_error(t.error.type("list",c,n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type("list",f,n.indicator));else if(!p&&!h)s.throw_error(t.error.instantiation(n.indicator));else{for(var E=p?c:f,C=new t.type.Term("[]",[]);E.indicator==="./2";)C=new t.type.Term(".",[E.args[0],C]),E=E.args[1];s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[C,p?f:c])),a.substitution,a)])}},"list_to_set/2":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else{for(var p=c,h=[];p.indicator==="./2";)h.push(p.args[0]),p=p.args[1];if(t.type.is_variable(p))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_term(p)||p.indicator!=="[]/0")s.throw_error(t.error.type("list",c,n.indicator));else{for(var E=[],C=new t.type.Term("[]",[]),S,P=0;P=0;P--)C=new t.type.Term(".",[E[P],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[f,C])),a.substitution,a)])}}}}},r=["append/2","append/3","member/2","permutation/2","maplist/2","maplist/3","maplist/4","maplist/5","maplist/6","maplist/7","maplist/8","include/3","exclude/3","foldl/4","sum_list/2","max_list/2","min_list/2","prod_list/2","last/2","prefix/2","nth0/3","nth1/3","nth0/4","nth1/4","length/2","replicate/3","select/3","sort/2","msort/2","keysort/2","take/3","drop/3","reverse/2","list_to_set/2"];typeof X5<"u"?X5.exports=function(s){t=s,new t.type.Module("lists",e(),r)}:new t.type.Module("lists",e(),r)})(PSt)});var rve=L($r=>{"use strict";var Dm=process.platform==="win32",$5="aes-256-cbc",xSt="sha256",GBe="The current environment doesn't support interactive reading from TTY.",si=Ie("fs"),jBe=process.binding("tty_wrap").TTY,t9=Ie("child_process"),Y0=Ie("path"),r9={prompt:"> ",hideEchoBack:!1,mask:"*",limit:[],limitMessage:"Input another, please.$<( [)limit(])>",defaultInput:"",trueValue:[],falseValue:[],caseSensitive:!1,keepWhitespace:!1,encoding:"utf8",bufferSize:1024,print:void 0,history:!0,cd:!1,phContent:void 0,preCheck:void 0},$p="none",$u,VC,qBe=!1,W0,lF,e9,kSt=0,a9="",Sm=[],cF,WBe=!1,n9=!1,dS=!1;function YBe(t){function e(r){return r.replace(/[^\w\u0080-\uFFFF]/g,function(s){return"#"+s.charCodeAt(0)+";"})}return lF.concat(function(r){var s=[];return Object.keys(r).forEach(function(a){r[a]==="boolean"?t[a]&&s.push("--"+a):r[a]==="string"&&t[a]&&s.push("--"+a,e(t[a]))}),s}({display:"string",displayOnly:"boolean",keyIn:"boolean",hideEchoBack:"boolean",mask:"string",limit:"string",caseSensitive:"boolean"}))}function QSt(t,e){function r(U){var W,te="",ie;for(e9=e9||Ie("os").tmpdir();;){W=Y0.join(e9,U+te);try{ie=si.openSync(W,"wx")}catch(Ae){if(Ae.code==="EEXIST"){te++;continue}else throw Ae}si.closeSync(ie);break}return W}var s,a,n,c={},f,p,h=r("readline-sync.stdout"),E=r("readline-sync.stderr"),C=r("readline-sync.exit"),S=r("readline-sync.done"),P=Ie("crypto"),I,R,N;I=P.createHash(xSt),I.update(""+process.pid+kSt+++Math.random()),N=I.digest("hex"),R=P.createDecipher($5,N),s=YBe(t),Dm?(a=process.env.ComSpec||"cmd.exe",process.env.Q='"',n=["/V:ON","/S","/C","(%Q%"+a+"%Q% /V:ON /S /C %Q%%Q%"+W0+"%Q%"+s.map(function(U){return" %Q%"+U+"%Q%"}).join("")+" & (echo !ERRORLEVEL!)>%Q%"+C+"%Q%%Q%) 2>%Q%"+E+"%Q% |%Q%"+process.execPath+"%Q% %Q%"+__dirname+"\\encrypt.js%Q% %Q%"+$5+"%Q% %Q%"+N+"%Q% >%Q%"+h+"%Q% & (echo 1)>%Q%"+S+"%Q%"]):(a="/bin/sh",n=["-c",'("'+W0+'"'+s.map(function(U){return" '"+U.replace(/'/g,"'\\''")+"'"}).join("")+'; echo $?>"'+C+'") 2>"'+E+'" |"'+process.execPath+'" "'+__dirname+'/encrypt.js" "'+$5+'" "'+N+'" >"'+h+'"; echo 1 >"'+S+'"']),dS&&dS("_execFileSync",s);try{t9.spawn(a,n,e)}catch(U){c.error=new Error(U.message),c.error.method="_execFileSync - spawn",c.error.program=a,c.error.args=n}for(;si.readFileSync(S,{encoding:t.encoding}).trim()!=="1";);return(f=si.readFileSync(C,{encoding:t.encoding}).trim())==="0"?c.input=R.update(si.readFileSync(h,{encoding:"binary"}),"hex",t.encoding)+R.final(t.encoding):(p=si.readFileSync(E,{encoding:t.encoding}).trim(),c.error=new Error(GBe+(p?` -`+p:"")),c.error.method="_execFileSync",c.error.program=a,c.error.args=n,c.error.extMessage=p,c.error.exitCode=+f),si.unlinkSync(h),si.unlinkSync(E),si.unlinkSync(C),si.unlinkSync(S),c}function TSt(t){var e,r={},s,a={env:process.env,encoding:t.encoding};if(W0||(Dm?process.env.PSModulePath?(W0="powershell.exe",lF=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(W0="cscript.exe",lF=["//nologo",__dirname+"\\read.cs.js"]):(W0="/bin/sh",lF=[__dirname+"/read.sh"])),Dm&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),t9.execFileSync){e=YBe(t),dS&&dS("execFileSync",e);try{r.input=t9.execFileSync(W0,e,a)}catch(n){s=n.stderr?(n.stderr+"").trim():"",r.error=new Error(GBe+(s?` -`+s:"")),r.error.method="execFileSync",r.error.program=W0,r.error.args=e,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=QSt(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function i9(t){var e="",r=t.display,s=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=TSt(t);if(n.error)throw n.error;return n.input}return n9&&n9(t),function(){var n,c,f;function p(){return n||(n=process.binding("fs"),c=process.binding("constants")),n}if(typeof $p=="string")if($p=null,Dm){if(f=function(h){var E=h.replace(/^\D+/,"").split("."),C=0;return(E[0]=+E[0])&&(C+=E[0]*1e4),(E[1]=+E[1])&&(C+=E[1]*100),(E[2]=+E[2])&&(C+=E[2]),C}(process.version),!(f>=20302&&f<40204||f>=5e4&&f<50100||f>=50600&&f<60200)&&process.stdin.isTTY)process.stdin.pause(),$p=process.stdin.fd,VC=process.stdin._handle;else try{$p=p().open("CONIN$",c.O_RDWR,parseInt("0666",8)),VC=new jBe($p,!0)}catch{}if(process.stdout.isTTY)$u=process.stdout.fd;else{try{$u=si.openSync("\\\\.\\CON","w")}catch{}if(typeof $u!="number")try{$u=p().open("CONOUT$",c.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{$p=si.openSync("/dev/tty","r"),VC=process.stdin._handle}catch{}}else try{$p=si.openSync("/dev/tty","r"),VC=new jBe($p,!1)}catch{}if(process.stdout.isTTY)$u=process.stdout.fd;else try{$u=si.openSync("/dev/tty","w")}catch{}}}(),function(){var n,c,f=!t.hideEchoBack&&!t.keyIn,p,h,E,C,S;cF="";function P(I){return I===qBe?!0:VC.setRawMode(I)!==0?!1:(qBe=I,!0)}if(WBe||!VC||typeof $u!="number"&&(t.display||!f)){e=a();return}if(t.display&&(si.writeSync($u,t.display),t.display=""),!t.displayOnly){if(!P(!f)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(c=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){E=0;try{E=si.readSync($p,p,0,h)}catch(I){if(I.code!=="EOF"){P(!1),e+=a();return}}if(E>0?(C=p.toString(t.encoding,0,E),cF+=C):(C=` -`,cF+="\0"),C&&typeof(S=(C.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(C=S,n=!0),C&&(C=C.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),C&&c&&(C=C.replace(c,"")),C&&(f||(t.hideEchoBack?t.mask&&si.writeSync($u,new Array(C.length+1).join(t.mask)):si.writeSync($u,C)),e+=C),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!f&&!s&&si.writeSync($u,` -`),P(!1)}}(),t.print&&!s&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+` -`),t.encoding),t.displayOnly?"":a9=t.keepWhitespace||t.keyIn?e:e.trim()}function RSt(t,e){var r=[];function s(a){a!=null&&(Array.isArray(a)?a.forEach(s):(!e||e(a))&&r.push(a))}return s(t),r}function l9(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function Js(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(r9),t.unshift(r9))),t.reduce(function(s,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var c;if(a.hasOwnProperty(n))switch(c=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":c=c!=null?c+"":"",c&&n!=="limitMessage"&&(c=c.replace(/[\r\n]/g,"")),s[n]=c;break;case"bufferSize":!isNaN(c=parseInt(c,10))&&typeof c=="number"&&(s[n]=c);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":s[n]=!!c;break;case"limit":case"trueValue":case"falseValue":s[n]=RSt(c,function(f){var p=typeof f;return p==="string"||p==="number"||p==="function"||f instanceof RegExp}).map(function(f){return typeof f=="string"?f.replace(/[\r\n]/g,""):f});break;case"print":case"phContent":case"preCheck":s[n]=typeof c=="function"?c:void 0;break;case"prompt":case"display":s[n]=c??"";break}})),s},{})}function s9(t,e,r){return e.some(function(s){var a=typeof s;return a==="string"?r?t===s:t.toLowerCase()===s.toLowerCase():a==="number"?parseFloat(t)===s:a==="function"?s(t):s instanceof RegExp?s.test(t):!1})}function c9(t,e){var r=Y0.normalize(Dm?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=Y0.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+l9(r)+"(?=\\/|\\\\|$)",Dm?"i":""),"~")}function KC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",s=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(c,f,p,h,E,C){var S;return f||typeof(S=e(E))!="string"?p:S?(h||"")+S+(C||""):""}return t.replace(s,n).replace(a,n)}function VBe(t,e,r){var s,a=[],n=-1,c=0,f="",p;function h(E,C){return C.length>3?(E.push(C[0]+"..."+C[C.length-1]),p=!0):C.length&&(E=E.concat(C)),E}return s=t.reduce(function(E,C){return E.concat((C+"").split(""))},[]).reduce(function(E,C){var S,P;return e||(C=C.toLowerCase()),S=/^\d$/.test(C)?1:/^[A-Z]$/.test(C)?2:/^[a-z]$/.test(C)?3:0,r&&S===0?f+=C:(P=C.charCodeAt(0),S&&S===n&&P===c+1?a.push(C):(E=h(E,a),a=[C],n=S),c=P),E},[]),s=h(s,a),f&&(s.push(f),p=!0),{values:s,suppressed:p}}function KBe(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function JBe(t,e){var r,s,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":s=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=VBe(s,e.caseSensitive),s=a.values):s=s.filter(function(c){var f=typeof c;return f==="string"||f==="number"}),r=KBe(s,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=a9;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=Y0.basename(r):t==="cwdHome"&&(r=c9(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(c){return c.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Sm[Sm.length-n]||"")}return r}function zBe(t){var e=/^(.)-(.)$/.exec(t),r="",s,a,n,c;if(!e)return null;for(s=e[1].charCodeAt(0),a=e[2].charCodeAt(0),c=s -And the length must be: $`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(P){return P==="charlist"?r.text:P==="length"?s+"..."+a:null}}),c,f,p,h,E,C,S;for(e=e||{},c=KC(e.charlist?e.charlist+"":"$",zBe),(isNaN(s=parseInt(e.min,10))||typeof s!="number")&&(s=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+l9(c)+"]{"+s+","+a+"}$"),r=VBe([c],n.caseSensitive,!0),r.text=KBe(r.values,r.suppressed),f=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",p=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),E=n.limitMessage;!S;)n.limit=h,n.limitMessage=E,C=$r.question(t,n),n.limit=[C,""],n.limitMessage=p,S=$r.question(f,n);return C};function $Be(t,e,r){var s;function a(n){return s=r(n),!isNaN(s)&&typeof s=="number"}return $r.question(t,Js({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),s}$r.questionInt=function(t,e){return $Be(t,e,function(r){return parseInt(r,10)})};$r.questionFloat=function(t,e){return $Be(t,e,parseFloat)};$r.questionPath=function(t,e){var r,s="",a=Js({hideEchoBack:!1,limitMessage:`$Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var c,f,p;n=c9(n,!0),s="";function h(E){E.split(/\/|\\/).reduce(function(C,S){var P=Y0.resolve(C+=S+Y0.sep);if(!si.existsSync(P))si.mkdirSync(P);else if(!si.statSync(P).isDirectory())throw new Error("Non directory already exists: "+P);return C},"")}try{if(c=si.existsSync(n),r=c?si.realpathSync(n):Y0.resolve(n),!e.hasOwnProperty("exists")&&!c||typeof e.exists=="boolean"&&e.exists!==c)return s=(c?"Already exists":"No such file or directory")+": "+r,!1;if(!c&&e.create&&(e.isDirectory?h(r):(h(Y0.dirname(r)),si.closeSync(si.openSync(r,"w"))),r=si.realpathSync(r)),c&&(e.min||e.max||e.isFile||e.isDirectory)){if(f=si.statSync(r),e.isFile&&!f.isFile())return s="Not file: "+r,!1;if(e.isDirectory&&!f.isDirectory())return s="Not directory: "+r,!1;if(e.min&&f.size<+e.min||e.max&&f.size>+e.max)return s="Size "+f.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(s=p),!1}catch(E){return s=E+"",!1}return!0},phContent:function(n){return n==="error"?s:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),$r.question(t,a),r};function eve(t,e){var r={},s={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(s[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=o9(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&s.hasOwnProperty(n)?s[n].apply(a,r.args.slice(1)):s.hasOwnProperty("_")?s._.apply(a,r.args):null,{res:a,forceNext:!1}},s.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),s.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=o9(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}$r.promptCL=function(t,e){var r=Js({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=eve(t,r);return r.limit=s.limit,r.preCheck=s.preCheck,$r.prompt(r),s.args};$r.promptLoop=function(t,e){for(var r=Js({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t($r.prompt(r)););};$r.promptCLLoop=function(t,e){var r=Js({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=eve(t,r);for(r.limit=s.limit,r.preCheck=s.preCheck;$r.prompt(r),!s.hRes;);};$r.promptSimShell=function(t){return $r.prompt(Js({hideEchoBack:!1,history:!0},t,{prompt:function(){return Dm?"$>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$$ "}()}))};function tve(t,e,r){var s;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),s=$r.keyIn(t,Js(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof s=="boolean"?s:""}$r.keyInYN=function(t,e){return tve(t,e)};$r.keyInYNStrict=function(t,e){return tve(t,e,"yn")};$r.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),$r.keyIn(t,Js({limit:null},e,{hideEchoBack:!0,mask:""}))};$r.keyInSelect=function(t,e,r){var s=Js({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?t.length+"":p==="firstItem"?(t[0]+"").trim():p==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},c=49,f=` -`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var E=String.fromCharCode(c);a+=E,n[E]=h,f+="["+E+"] "+(p+"").trim()+` -`,c=c===57?97:c+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,f+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+` -`),s.limit=a,f+=` -`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$]: "),f+=e),n[$r.keyIn(f,s).toLowerCase()]};$r.getRawInput=function(){return cF};function mS(t,e){var r;return e.length&&(r={},r[t]=e[0]),$r.setDefaultOptions(r)[t]}$r.setPrint=function(){return mS("print",arguments)};$r.setPrompt=function(){return mS("prompt",arguments)};$r.setEncoding=function(){return mS("encoding",arguments)};$r.setMask=function(){return mS("mask",arguments)};$r.setBufferSize=function(){return mS("bufferSize",arguments)}});var u9=L((Tur,tc)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(w,b,y){var F=tau_file_system.files[w];if(!F){if(y==="read")return null;F={path:w,text:"",type:b,get:function(z,Z){return Z===this.text.length||Z>this.text.length?"end_of_file":this.text.substring(Z,Z+z)},put:function(z,Z){return Z==="end_of_file"?(this.text+=z,!0):Z==="past_end_of_file"?null:(this.text=this.text.substring(0,Z)+z+this.text.substring(Z+z.length),!0)},get_byte:function(z){if(z==="end_of_stream")return-1;var Z=Math.floor(z/2);if(this.text.length<=Z)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,Z){var $=Z==="end_of_stream"?this.text.length:Math.floor(Z/2);if(this.text.length<$)return null;var oe=this.text.length===$?-1:n(this.text[Math.floor(Z/2)],0);return Z%2===0?(oe=oe/256>>>0,oe=(oe&255)<<8|z&255):(oe=oe&255,oe=(z&255)<<8|oe&255),this.text.length===$?this.text+=c(oe):this.text=this.text.substring(0,$)+c(oe)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[w]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(w,b){for(var y;tau_user_input.buffer.length\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function N(w,b){return w.get_flag("char_conversion").id==="on"?b.replace(/./g,function(y){return w.get_char_conversion(y)}):b}function U(w){this.thread=w,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var b,y=0,F=0,z=0,Z=[],$=!1;if(w){var oe=this.tokens[w-1];y=oe.len,b=N(this.thread,this.text.substr(oe.len)),F=oe.line,z=oe.start}else b=this.text;if(/^\s*$/.test(b))return null;for(;b!=="";){var xe=[],Te=!1;if(/^\n/.exec(b)!==null){F++,z=0,y++,b=b.replace(/\n/,""),$=!0;continue}for(var lt in R)if(R.hasOwnProperty(lt)){var It=R[lt].exec(b);It&&xe.push({value:It[0],name:lt,matches:It})}if(!xe.length)return this.set_last_tokens([{value:b,matches:[],name:"lexical",line:F,start:z}]);var oe=r(xe,function(Pr,Ir){return Pr.value.length>=Ir.value.length?Pr:Ir});switch(oe.start=z,oe.line=F,b=b.replace(oe.value,""),z+=oe.value.length,y+=oe.value.length,oe.name){case"atom":oe.raw=oe.value,oe.value.charAt(0)==="'"&&(oe.value=S(oe.value.substr(1,oe.value.length-2),"'"),oe.value===null&&(oe.name="lexical",oe.value="unknown escape sequence"));break;case"number":oe.float=oe.value.substring(0,2)!=="0x"&&oe.value.match(/[.eE]/)!==null&&oe.value!=="0'.",oe.value=I(oe.value),oe.blank=Te;break;case"string":var qt=oe.value.charAt(0);oe.value=S(oe.value.substr(1,oe.value.length-2),qt),oe.value===null&&(oe.name="lexical",oe.value="unknown escape sequence");break;case"whitespace":var ir=Z[Z.length-1];ir&&(ir.space=!0),Te=!0;continue;case"r_bracket":Z.length>0&&Z[Z.length-1].name==="l_bracket"&&(oe=Z.pop(),oe.name="atom",oe.value="{}",oe.raw="{}",oe.space=!1);break;case"r_brace":Z.length>0&&Z[Z.length-1].name==="l_brace"&&(oe=Z.pop(),oe.name="atom",oe.value="[]",oe.raw="[]",oe.space=!1);break}oe.len=y,Z.push(oe),Te=!1}var Pt=this.set_last_tokens(Z);return Pt.length===0?null:Pt};function W(w,b,y,F,z){if(!b[y])return{type:f,value:x.error.syntax(b[y-1],"expression expected",!0)};var Z;if(F==="0"){var $=b[y];switch($.name){case"number":return{type:p,len:y+1,value:new x.type.Num($.value,$.float)};case"variable":return{type:p,len:y+1,value:new x.type.Var($.value)};case"string":var oe;switch(w.get_flag("double_quotes").id){case"atom":oe=new j($.value,[]);break;case"codes":oe=new j("[]",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(".",[new x.type.Num(n($.value,xe),!1),oe]);break;case"chars":oe=new j("[]",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(".",[new x.type.Term($.value.charAt(xe),[]),oe]);break}return{type:p,len:y+1,value:oe};case"l_paren":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name==="r_paren"?(Pt.len++,Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],") or operator expected",!b[Pt.len])};case"l_bracket":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name==="r_bracket"?(Pt.len++,Pt.value=new j("{}",[Pt.value]),Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],"} or operator expected",!b[Pt.len])}}var Te=te(w,b,y,z);return Te.type===p||Te.derived||(Te=ie(w,b,y),Te.type===p||Te.derived)?Te:{type:f,derived:!1,value:x.error.syntax(b[y],"unexpected token")}}var lt=w.__get_max_priority(),It=w.__get_next_priority(F),qt=y;if(b[y].name==="atom"&&b[y+1]&&(b[y].space||b[y+1].name!=="l_paren")){var $=b[y++],ir=w.__lookup_operator_classes(F,$.value);if(ir&&ir.indexOf("fy")>-1){var Pt=W(w,b,y,F,z);if(Pt.type!==f)return $.value==="-"&&!$.space&&x.type.is_number(Pt.value)?{value:new x.type.Num(-Pt.value.value,Pt.value.is_float),len:Pt.len,type:p}:{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};Z=Pt}else if(ir&&ir.indexOf("fx")>-1){var Pt=W(w,b,y,It,z);if(Pt.type!==f)return{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};Z=Pt}}y=qt;var Pt=W(w,b,y,It,z);if(Pt.type===p){y=Pt.len;var $=b[y];if(b[y]&&(b[y].name==="atom"&&w.__lookup_operator_classes(F,$.value)||b[y].name==="bar"&&w.__lookup_operator_classes(F,"|"))){var gn=It,Pr=F,ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf("xf")>-1)return{value:new x.type.Term($.value,[Pt.value]),len:++Pt.len,type:p};if(ir.indexOf("xfx")>-1){var Ir=W(w,b,y+1,gn,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(ir.indexOf("xfy")>-1){var Ir=W(w,b,y+1,Pr,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(Pt.type!==f)for(;;){y=Pt.len;var $=b[y];if($&&$.name==="atom"&&w.__lookup_operator_classes(F,$.value)){var ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf("yf")>-1)Pt={value:new x.type.Term($.value,[Pt.value]),len:++y,type:p};else if(ir.indexOf("yfx")>-1){var Ir=W(w,b,++y,gn,z);if(Ir.type===f)return Ir.derived=!0,Ir;y=Ir.len,Pt={value:new x.type.Term($.value,[Pt.value,Ir.value]),len:y,type:p}}else break}else break}}else Z={type:f,value:x.error.syntax(b[Pt.len-1],"operator expected")};return Pt}return Pt}function te(w,b,y,F){if(!b[y]||b[y].name==="atom"&&b[y].raw==="."&&!F&&(b[y].space||!b[y+1]||b[y+1].name!=="l_paren"))return{type:f,derived:!1,value:x.error.syntax(b[y-1],"unfounded token")};var z=b[y],Z=[];if(b[y].name==="atom"&&b[y].raw!==","){if(y++,b[y-1].space)return{type:p,len:y,value:new x.type.Term(z.value,Z)};if(b[y]&&b[y].name==="l_paren"){if(b[y+1]&&b[y+1].name==="r_paren")return{type:f,derived:!0,value:x.error.syntax(b[y+1],"argument expected")};var $=W(w,b,++y,"999",!0);if($.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],"argument expected",!b[y])};for(Z.push($.value),y=$.len;b[y]&&b[y].name==="atom"&&b[y].value===",";){if($=W(w,b,y+1,"999",!0),$.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],"argument expected",!b[y+1])};Z.push($.value),y=$.len}if(b[y]&&b[y].name==="r_paren")y++;else return{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],", or ) expected",!b[y])}}return{type:p,len:y,value:new x.type.Term(z.value,Z)}}return{type:f,derived:!1,value:x.error.syntax(b[y],"term expected")}}function ie(w,b,y){if(!b[y])return{type:f,derived:!1,value:x.error.syntax(b[y-1],"[ expected")};if(b[y]&&b[y].name==="l_brace"){var F=W(w,b,++y,"999",!0),z=[F.value],Z=void 0;if(F.type===f)return b[y]&&b[y].name==="r_brace"?{type:p,len:y+1,value:new x.type.Term("[]",[])}:{type:f,derived:!0,value:x.error.syntax(b[y],"] expected")};for(y=F.len;b[y]&&b[y].name==="atom"&&b[y].value===",";){if(F=W(w,b,y+1,"999",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],"argument expected",!b[y+1])};z.push(F.value),y=F.len}var $=!1;if(b[y]&&b[y].name==="bar"){if($=!0,F=W(w,b,y+1,"999",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],"argument expected",!b[y+1])};Z=F.value,y=F.len}return b[y]&&b[y].name==="r_brace"?{type:p,len:y+1,value:g(z,Z)}:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],$?"] expected":", or | or ] expected",!b[y])}}return{type:f,derived:!1,value:x.error.syntax(b[y],"list expected")}}function Ae(w,b,y){var F=b[y].line,z=W(w,b,y,w.__get_max_priority(),!1),Z=null,$;if(z.type!==f)if(y=z.len,b[y]&&b[y].name==="atom"&&b[y].raw===".")if(y++,x.type.is_term(z.value)){if(z.value.indicator===":-/2"?(Z=new x.type.Rule(z.value.args[0],Ce(z.value.args[1])),$={value:Z,len:y,type:p}):z.value.indicator==="-->/2"?(Z=pe(new x.type.Rule(z.value.args[0],z.value.args[1]),w),Z.body=Ce(Z.body),$={value:Z,len:y,type:x.type.is_rule(Z)?p:f}):(Z=new x.type.Rule(z.value,null),$={value:Z,len:y,type:p}),Z){var oe=Z.singleton_variables();oe.length>0&&w.throw_warning(x.warning.singleton(oe,Z.head.indicator,F))}return $}else return{type:f,value:x.error.syntax(b[y],"callable expected")};else return{type:f,value:x.error.syntax(b[y]?b[y]:b[y-1],". or operator expected")};return z}function ce(w,b,y){y=y||{},y.from=y.from?y.from:"$tau-js",y.reconsult=y.reconsult!==void 0?y.reconsult:!0;var F=new U(w),z={},Z;F.new_text(b);var $=0,oe=F.get_tokens($);do{if(oe===null||!oe[$])break;var xe=Ae(w,oe,$);if(xe.type===f)return new j("throw",[xe.value]);if(xe.value.body===null&&xe.value.head.indicator==="?-/1"){var Te=new it(w.session);Te.add_goal(xe.value.head.args[0]),Te.answer(function(It){x.type.is_error(It)?w.throw_warning(It.args[0]):(It===!1||It===null)&&w.throw_warning(x.warning.failed_goal(xe.value.head.args[0],xe.len))}),$=xe.len;var lt=!0}else if(xe.value.body===null&&xe.value.head.indicator===":-/1"){var lt=w.run_directive(xe.value.head.args[0]);$=xe.len,xe.value.head.args[0].indicator==="char_conversion/2"&&(oe=F.get_tokens($),$=0)}else{Z=xe.value.head.indicator,y.reconsult!==!1&&z[Z]!==!0&&!w.is_multifile_predicate(Z)&&(w.session.rules[Z]=a(w.session.rules[Z]||[],function(qt){return qt.dynamic}),z[Z]=!0);var lt=w.add_rule(xe.value,y);$=xe.len}if(!lt)return lt}while(!0);return!0}function me(w,b){var y=new U(w);y.new_text(b);var F=0;do{var z=y.get_tokens(F);if(z===null)break;var Z=W(w,z,0,w.__get_max_priority(),!1);if(Z.type!==f){var $=Z.len,oe=$;if(z[$]&&z[$].name==="atom"&&z[$].raw===".")w.add_goal(Ce(Z.value));else{var xe=z[$];return new j("throw",[x.error.syntax(xe||z[$-1],". or operator expected",!xe)])}F=Z.len+1}else return new j("throw",[Z.value])}while(!0);return!0}function pe(w,b){w=w.rename(b);var y=b.next_free_variable(),F=Be(w.body,y,b);return F.error?F.value:(w.body=F.value,w.head.args=w.head.args.concat([y,F.variable]),w.head=new j(w.head.id,w.head.args),w)}function Be(w,b,y){var F;if(x.type.is_term(w)&&w.indicator==="!/0")return{value:w,variable:b,error:!1};if(x.type.is_term(w)&&w.indicator===",/2"){var z=Be(w.args[0],b,y);if(z.error)return z;var Z=Be(w.args[1],z.variable,y);return Z.error?Z:{value:new j(",",[z.value,Z.value]),variable:Z.variable,error:!1}}else{if(x.type.is_term(w)&&w.indicator==="{}/1")return{value:w.args[0],variable:b,error:!1};if(x.type.is_empty_list(w))return{value:new j("true",[]),variable:b,error:!1};if(x.type.is_list(w)){F=y.next_free_variable();for(var $=w,oe;$.indicator==="./2";)oe=$,$=$.args[1];return x.type.is_variable($)?{value:x.error.instantiation("DCG"),variable:b,error:!0}:x.type.is_empty_list($)?(oe.args[1]=F,{value:new j("=",[b,w]),variable:F,error:!1}):{value:x.error.type("list",w,"DCG"),variable:b,error:!0}}else return x.type.is_callable(w)?(F=y.next_free_variable(),w.args=w.args.concat([b,F]),w=new j(w.id,w.args),{value:w,variable:F,error:!1}):{value:x.error.type("callable",w,"DCG"),variable:b,error:!0}}}function Ce(w){return x.type.is_variable(w)?new j("call",[w]):x.type.is_term(w)&&[",/2",";/2","->/2"].indexOf(w.indicator)!==-1?new j(w.id,[Ce(w.args[0]),Ce(w.args[1])]):w}function g(w,b){for(var y=b||new x.type.Term("[]",[]),F=w.length-1;F>=0;F--)y=new x.type.Term(".",[w[F],y]);return y}function we(w,b){for(var y=w.length-1;y>=0;y--)w[y]===b&&w.splice(y,1)}function ye(w){for(var b={},y=[],F=0;F=0;b--)if(w.charAt(b)==="/")return new j("/",[new j(w.substring(0,b)),new Re(parseInt(w.substring(b+1)),!1)])}function De(w){this.id=w}function Re(w,b){this.is_float=b!==void 0?b:parseInt(w)!==w,this.value=this.is_float?w:parseInt(w)}var dt=0;function j(w,b,y){this.ref=y||++dt,this.id=w,this.args=b||[],this.indicator=w+"/"+this.args.length}var rt=0;function Fe(w,b,y,F,z,Z){this.id=rt++,this.stream=w,this.mode=b,this.alias=y,this.type=F!==void 0?F:"text",this.reposition=z!==void 0?z:!0,this.eof_action=Z!==void 0?Z:"eof_code",this.position=this.mode==="append"?"end_of_stream":0,this.output=this.mode==="write"||this.mode==="append",this.input=this.mode==="read"}function Ne(w){w=w||{},this.links=w}function Pe(w,b,y){b=b||new Ne,y=y||null,this.goal=w,this.substitution=b,this.parent=y}function Ye(w,b,y){this.head=w,this.body=b,this.dynamic=y||!1}function ke(w){w=w===void 0||w<=0?1e3:w,this.rules={},this.src_predicates={},this.rename=0,this.modules=[],this.thread=new it(this),this.total_threads=1,this.renamed_variables={},this.public_predicates={},this.multifile_predicates={},this.limit=w,this.streams={user_input:new Fe(typeof tc<"u"&&tc.exports?nodejs_user_input:tau_user_input,"read","user_input","text",!1,"reset"),user_output:new Fe(typeof tc<"u"&&tc.exports?nodejs_user_output:tau_user_output,"write","user_output","text",!1,"eof_code")},this.file_system=typeof tc<"u"&&tc.exports?nodejs_file_system:tau_file_system,this.standard_input=this.streams.user_input,this.standard_output=this.streams.user_output,this.current_input=this.streams.user_input,this.current_output=this.streams.user_output,this.format_success=function(b){return b.substitution},this.format_error=function(b){return b.goal},this.flag={bounded:x.flag.bounded.value,max_integer:x.flag.max_integer.value,min_integer:x.flag.min_integer.value,integer_rounding_function:x.flag.integer_rounding_function.value,char_conversion:x.flag.char_conversion.value,debug:x.flag.debug.value,max_arity:x.flag.max_arity.value,unknown:x.flag.unknown.value,double_quotes:x.flag.double_quotes.value,occurs_check:x.flag.occurs_check.value,dialect:x.flag.dialect.value,version_data:x.flag.version_data.value,nodejs:x.flag.nodejs.value},this.__loaded_modules=[],this.__char_conversion={},this.__operators={1200:{":-":["fx","xfx"],"-->":["xfx"],"?-":["fx"]},1100:{";":["xfy"]},1050:{"->":["xfy"]},1e3:{",":["xfy"]},900:{"\\+":["fy"]},700:{"=":["xfx"],"\\=":["xfx"],"==":["xfx"],"\\==":["xfx"],"@<":["xfx"],"@=<":["xfx"],"@>":["xfx"],"@>=":["xfx"],"=..":["xfx"],is:["xfx"],"=:=":["xfx"],"=\\=":["xfx"],"<":["xfx"],"=<":["xfx"],">":["xfx"],">=":["xfx"]},600:{":":["xfy"]},500:{"+":["yfx"],"-":["yfx"],"/\\":["yfx"],"\\/":["yfx"]},400:{"*":["yfx"],"/":["yfx"],"//":["yfx"],rem:["yfx"],mod:["yfx"],"<<":["yfx"],">>":["yfx"]},200:{"**":["xfx"],"^":["xfy"],"-":["fy"],"+":["fy"],"\\":["fy"]}}}function it(w){this.epoch=Date.now(),this.session=w,this.session.total_threads++,this.total_steps=0,this.cpu_time=0,this.cpu_time_last=0,this.points=[],this.debugger=!1,this.debugger_states=[],this.level="top_level/0",this.__calls=[],this.current_limit=this.session.limit,this.warnings=[]}function _e(w,b,y){this.id=w,this.rules=b,this.exports=y,x.module[w]=this}_e.prototype.exports_predicate=function(w){return this.exports.indexOf(w)!==-1},De.prototype.unify=function(w,b){if(b&&e(w.variables(),this.id)!==-1&&!x.type.is_variable(w))return null;var y={};return y[this.id]=w,new Ne(y)},Re.prototype.unify=function(w,b){return x.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float?new Ne:null},j.prototype.unify=function(w,b){if(x.type.is_term(w)&&this.indicator===w.indicator){for(var y=new Ne,F=0;F=0){var F=this.args[0].value,z=Math.floor(F/26),Z=F%26;return"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[Z]+(z!==0?z:"")}switch(this.indicator){case"[]/0":case"{}/0":case"!/0":return this.id;case"{}/1":return"{"+this.args[0].toString(w)+"}";case"./2":for(var $="["+this.args[0].toString(w),oe=this.args[1];oe.indicator==="./2";)$+=", "+oe.args[0].toString(w),oe=oe.args[1];return oe.indicator!=="[]/0"&&($+="|"+oe.toString(w)),$+="]",$;case",/2":return"("+this.args[0].toString(w)+", "+this.args[1].toString(w)+")";default:var xe=this.id,Te=w.session?w.session.lookup_operator(this.id,this.args.length):null;if(w.session===void 0||w.ignore_ops||Te===null)return w.quoted&&!/^(!|,|;|[a-z][0-9a-zA-Z_]*)$/.test(xe)&&xe!=="{}"&&xe!=="[]"&&(xe="'"+P(xe)+"'"),xe+(this.args.length?"("+s(this.args,function(ir){return ir.toString(w)}).join(", ")+")":"");var lt=Te.priority>b.priority||Te.priority===b.priority&&(Te.class==="xfy"&&this.indicator!==b.indicator||Te.class==="yfx"&&this.indicator!==b.indicator||this.indicator===b.indicator&&Te.class==="yfx"&&y==="right"||this.indicator===b.indicator&&Te.class==="xfy"&&y==="left");Te.indicator=this.indicator;var It=lt?"(":"",qt=lt?")":"";return this.args.length===0?"("+this.id+")":["fy","fx"].indexOf(Te.class)!==-1?It+xe+" "+this.args[0].toString(w,Te)+qt:["yf","xf"].indexOf(Te.class)!==-1?It+this.args[0].toString(w,Te)+" "+xe+qt:It+this.args[0].toString(w,Te,"left")+" "+this.id+" "+this.args[1].toString(w,Te,"right")+qt}},Fe.prototype.toString=function(w){return"("+this.id+")"},Ne.prototype.toString=function(w){var b="{";for(var y in this.links)this.links.hasOwnProperty(y)&&(b!=="{"&&(b+=", "),b+=y+"/"+this.links[y].toString(w));return b+="}",b},Pe.prototype.toString=function(w){return this.goal===null?"<"+this.substitution.toString(w)+">":"<"+this.goal.toString(w)+", "+this.substitution.toString(w)+">"},Ye.prototype.toString=function(w){return this.body?this.head.toString(w)+" :- "+this.body.toString(w)+".":this.head.toString(w)+"."},ke.prototype.toString=function(w){for(var b="",y=0;y=0;z--)F=new j(".",[b[z],F]);return F}return new j(this.id,s(this.args,function(Z){return Z.apply(w)}),this.ref)},Fe.prototype.apply=function(w){return this},Ye.prototype.apply=function(w){return new Ye(this.head.apply(w),this.body!==null?this.body.apply(w):null)},Ne.prototype.apply=function(w){var b,y={};for(b in this.links)this.links.hasOwnProperty(b)&&(y[b]=this.links[b].apply(w));return new Ne(y)},j.prototype.select=function(){for(var w=this;w.indicator===",/2";)w=w.args[0];return w},j.prototype.replace=function(w){return this.indicator===",/2"?this.args[0].indicator===",/2"?new j(",",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new j(",",[w,this.args[1]]):w},j.prototype.search=function(w){if(x.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var b=0;bb&&F0&&(b=this.head_point().substitution.domain());e(b,x.format_variable(this.session.rename))!==-1;)this.session.rename++;if(w.id==="_")return new De(x.format_variable(this.session.rename));this.session.renamed_variables[w.id]=x.format_variable(this.session.rename)}return new De(this.session.renamed_variables[w.id])},ke.prototype.next_free_variable=function(){return this.thread.next_free_variable()},it.prototype.next_free_variable=function(){this.session.rename++;var w=[];for(this.points.length>0&&(w=this.head_point().substitution.domain());e(w,x.format_variable(this.session.rename))!==-1;)this.session.rename++;return new De(x.format_variable(this.session.rename))},ke.prototype.is_public_predicate=function(w){return!this.public_predicates.hasOwnProperty(w)||this.public_predicates[w]===!0},it.prototype.is_public_predicate=function(w){return this.session.is_public_predicate(w)},ke.prototype.is_multifile_predicate=function(w){return this.multifile_predicates.hasOwnProperty(w)&&this.multifile_predicates[w]===!0},it.prototype.is_multifile_predicate=function(w){return this.session.is_multifile_predicate(w)},ke.prototype.prepend=function(w){return this.thread.prepend(w)},it.prototype.prepend=function(w){for(var b=w.length-1;b>=0;b--)this.points.push(w[b])},ke.prototype.success=function(w,b){return this.thread.success(w,b)},it.prototype.success=function(w,y){var y=typeof y>"u"?w:y;this.prepend([new Pe(w.goal.replace(null),w.substitution,y)])},ke.prototype.throw_error=function(w){return this.thread.throw_error(w)},it.prototype.throw_error=function(w){this.prepend([new Pe(new j("throw",[w]),new Ne,null,null)])},ke.prototype.step_rule=function(w,b){return this.thread.step_rule(w,b)},it.prototype.step_rule=function(w,b){var y=b.indicator;if(w==="user"&&(w=null),w===null&&this.session.rules.hasOwnProperty(y))return this.session.rules[y];for(var F=w===null?this.session.modules:e(this.session.modules,w)===-1?[]:[w],z=0;z1)&&this.again()},ke.prototype.answers=function(w,b,y){return this.thread.answers(w,b,y)},it.prototype.answers=function(w,b,y){var F=b||1e3,z=this;if(b<=0){y&&y();return}this.answer(function(Z){w(Z),Z!==!1?setTimeout(function(){z.answers(w,b-1,y)},1):y&&y()})},ke.prototype.again=function(w){return this.thread.again(w)},it.prototype.again=function(w){for(var b,y=Date.now();this.__calls.length>0;){for(this.warnings=[],w!==!1&&(this.current_limit=this.session.limit);this.current_limit>0&&this.points.length>0&&this.head_point().goal!==null&&!x.type.is_error(this.head_point().goal);)if(this.current_limit--,this.step()===!0)return;var F=Date.now();this.cpu_time_last=F-y,this.cpu_time+=this.cpu_time_last;var z=this.__calls.shift();this.current_limit<=0?z(null):this.points.length===0?z(!1):x.type.is_error(this.head_point().goal)?(b=this.session.format_error(this.points.pop()),this.points=[],z(b)):(this.debugger&&this.debugger_states.push(this.head_point()),b=this.session.format_success(this.points.pop()),z(b))}},ke.prototype.unfold=function(w){if(w.body===null)return!1;var b=w.head,y=w.body,F=y.select(),z=new it(this),Z=[];z.add_goal(F),z.step();for(var $=z.points.length-1;$>=0;$--){var oe=z.points[$],xe=b.apply(oe.substitution),Te=y.replace(oe.goal);Te!==null&&(Te=Te.apply(oe.substitution)),Z.push(new Ye(xe,Te))}var lt=this.rules[b.indicator],It=e(lt,w);return Z.length>0&&It!==-1?(lt.splice.apply(lt,[It,1].concat(Z)),!0):!1},it.prototype.unfold=function(w){return this.session.unfold(w)},De.prototype.interpret=function(w){return x.error.instantiation(w.level)},Re.prototype.interpret=function(w){return this},j.prototype.interpret=function(w){return x.type.is_unitary_list(this)?this.args[0].interpret(w):x.operate(w,this)},De.prototype.compare=function(w){return this.idw.id?1:0},Re.prototype.compare=function(w){if(this.value===w.value&&this.is_float===w.is_float)return 0;if(this.valuew.value)return 1},j.prototype.compare=function(w){if(this.args.lengthw.args.length||this.args.length===w.args.length&&this.id>w.id)return 1;for(var b=0;bF)return 1;if(w.constructor===Re){if(w.is_float&&b.is_float)return 0;if(w.is_float)return-1;if(b.is_float)return 1}return 0},is_substitution:function(w){return w instanceof Ne},is_state:function(w){return w instanceof Pe},is_rule:function(w){return w instanceof Ye},is_variable:function(w){return w instanceof De},is_stream:function(w){return w instanceof Fe},is_anonymous_var:function(w){return w instanceof De&&w.id==="_"},is_callable:function(w){return w instanceof j},is_number:function(w){return w instanceof Re},is_integer:function(w){return w instanceof Re&&!w.is_float},is_float:function(w){return w instanceof Re&&w.is_float},is_term:function(w){return w instanceof j},is_atom:function(w){return w instanceof j&&w.args.length===0},is_ground:function(w){if(w instanceof De)return!1;if(w instanceof j){for(var b=0;b0},is_list:function(w){return w instanceof j&&(w.indicator==="[]/0"||w.indicator==="./2")},is_empty_list:function(w){return w instanceof j&&w.indicator==="[]/0"},is_non_empty_list:function(w){return w instanceof j&&w.indicator==="./2"},is_fully_list:function(w){for(;w instanceof j&&w.indicator==="./2";)w=w.args[1];return w instanceof De||w instanceof j&&w.indicator==="[]/0"},is_instantiated_list:function(w){for(;w instanceof j&&w.indicator==="./2";)w=w.args[1];return w instanceof j&&w.indicator==="[]/0"},is_unitary_list:function(w){return w instanceof j&&w.indicator==="./2"&&w.args[1]instanceof j&&w.args[1].indicator==="[]/0"},is_character:function(w){return w instanceof j&&(w.id.length===1||w.id.length>0&&w.id.length<=2&&n(w.id,0)>=65536)},is_character_code:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=1114111},is_byte:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=255},is_operator:function(w){return w instanceof j&&x.arithmetic.evaluation[w.indicator]},is_directive:function(w){return w instanceof j&&x.directive[w.indicator]!==void 0},is_builtin:function(w){return w instanceof j&&x.predicate[w.indicator]!==void 0},is_error:function(w){return w instanceof j&&w.indicator==="throw/1"},is_predicate_indicator:function(w){return w instanceof j&&w.indicator==="//2"&&w.args[0]instanceof j&&w.args[0].args.length===0&&w.args[1]instanceof Re&&w.args[1].is_float===!1},is_flag:function(w){return w instanceof j&&w.args.length===0&&x.flag[w.id]!==void 0},is_value_flag:function(w,b){if(!x.type.is_flag(w))return!1;for(var y in x.flag[w.id].allowed)if(x.flag[w.id].allowed.hasOwnProperty(y)&&x.flag[w.id].allowed[y].equals(b))return!0;return!1},is_io_mode:function(w){return x.type.is_atom(w)&&["read","write","append"].indexOf(w.id)!==-1},is_stream_option:function(w){return x.type.is_term(w)&&(w.indicator==="alias/1"&&x.type.is_atom(w.args[0])||w.indicator==="reposition/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")||w.indicator==="type/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="text"||w.args[0].id==="binary")||w.indicator==="eof_action/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="error"||w.args[0].id==="eof_code"||w.args[0].id==="reset"))},is_stream_position:function(w){return x.type.is_integer(w)&&w.value>=0||x.type.is_atom(w)&&(w.id==="end_of_stream"||w.id==="past_end_of_stream")},is_stream_property:function(w){return x.type.is_term(w)&&(w.indicator==="input/0"||w.indicator==="output/0"||w.indicator==="alias/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator==="file_name/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator==="position/1"&&(x.type.is_variable(w.args[0])||x.type.is_stream_position(w.args[0]))||w.indicator==="reposition/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false"))||w.indicator==="type/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="text"||w.args[0].id==="binary"))||w.indicator==="mode/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="read"||w.args[0].id==="write"||w.args[0].id==="append"))||w.indicator==="eof_action/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="error"||w.args[0].id==="eof_code"||w.args[0].id==="reset"))||w.indicator==="end_of_stream/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="at"||w.args[0].id==="past"||w.args[0].id==="not")))},is_streamable:function(w){return w.__proto__.stream!==void 0},is_read_option:function(w){return x.type.is_term(w)&&["variables/1","variable_names/1","singletons/1"].indexOf(w.indicator)!==-1},is_write_option:function(w){return x.type.is_term(w)&&(w.indicator==="quoted/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")||w.indicator==="ignore_ops/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")||w.indicator==="numbervars/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false"))},is_close_option:function(w){return x.type.is_term(w)&&w.indicator==="force/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")},is_modifiable_flag:function(w){return x.type.is_flag(w)&&x.flag[w.id].changeable},is_module:function(w){return w instanceof j&&w.indicator==="library/1"&&w.args[0]instanceof j&&w.args[0].args.length===0&&x.module[w.args[0].id]!==void 0}},arithmetic:{evaluation:{"e/0":{type_args:null,type_result:!0,fn:function(w){return Math.E}},"pi/0":{type_args:null,type_result:!0,fn:function(w){return Math.PI}},"tau/0":{type_args:null,type_result:!0,fn:function(w){return 2*Math.PI}},"epsilon/0":{type_args:null,type_result:!0,fn:function(w){return Number.EPSILON}},"+/1":{type_args:null,type_result:null,fn:function(w,b){return w}},"-/1":{type_args:null,type_result:null,fn:function(w,b){return-w}},"\\/1":{type_args:!1,type_result:!1,fn:function(w,b){return~w}},"abs/1":{type_args:null,type_result:null,fn:function(w,b){return Math.abs(w)}},"sign/1":{type_args:null,type_result:null,fn:function(w,b){return Math.sign(w)}},"float_integer_part/1":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},"float_fractional_part/1":{type_args:!0,type_result:!0,fn:function(w,b){return w-parseInt(w)}},"float/1":{type_args:null,type_result:!0,fn:function(w,b){return parseFloat(w)}},"floor/1":{type_args:!0,type_result:!1,fn:function(w,b){return Math.floor(w)}},"truncate/1":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},"round/1":{type_args:!0,type_result:!1,fn:function(w,b){return Math.round(w)}},"ceiling/1":{type_args:!0,type_result:!1,fn:function(w,b){return Math.ceil(w)}},"sin/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.sin(w)}},"cos/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.cos(w)}},"tan/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.tan(w)}},"asin/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.asin(w)}},"acos/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.acos(w)}},"atan/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.atan(w)}},"atan2/2":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.atan2(w,b)}},"exp/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.exp(w)}},"sqrt/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.sqrt(w)}},"log/1":{type_args:null,type_result:!0,fn:function(w,b){return w>0?Math.log(w):x.error.evaluation("undefined",b.__call_indicator)}},"+/2":{type_args:null,type_result:null,fn:function(w,b,y){return w+b}},"-/2":{type_args:null,type_result:null,fn:function(w,b,y){return w-b}},"*/2":{type_args:null,type_result:null,fn:function(w,b,y){return w*b}},"//2":{type_args:null,type_result:!0,fn:function(w,b,y){return b?w/b:x.error.evaluation("zero_division",y.__call_indicator)}},"///2":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?parseInt(w/b):x.error.evaluation("zero_division",y.__call_indicator)}},"**/2":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.pow(w,b)}},"^/2":{type_args:null,type_result:null,fn:function(w,b,y){return Math.pow(w,b)}},"<>/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return w>>b}},"/\\/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return w&b}},"\\//2":{type_args:!1,type_result:!1,fn:function(w,b,y){return w|b}},"xor/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return w^b}},"rem/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w%b:x.error.evaluation("zero_division",y.__call_indicator)}},"mod/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w-parseInt(w/b)*b:x.error.evaluation("zero_division",y.__call_indicator)}},"max/2":{type_args:null,type_result:null,fn:function(w,b,y){return Math.max(w,b)}},"min/2":{type_args:null,type_result:null,fn:function(w,b,y){return Math.min(w,b)}}}},directive:{"dynamic/1":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_compound(y)||y.indicator!=="//2")w.throw_error(x.error.type("predicate_indicator",y,b.indicator));else if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type("atom",y.args[0],b.indicator));else if(!x.type.is_integer(y.args[1]))w.throw_error(x.error.type("integer",y.args[1],b.indicator));else{var F=b.args[0].args[0].id+"/"+b.args[0].args[1].value;w.session.public_predicates[F]=!0,w.session.rules[F]||(w.session.rules[F]=[])}},"multifile/1":function(w,b){var y=b.args[0];x.type.is_variable(y)?w.throw_error(x.error.instantiation(b.indicator)):!x.type.is_compound(y)||y.indicator!=="//2"?w.throw_error(x.error.type("predicate_indicator",y,b.indicator)):x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1])?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y.args[0])?x.type.is_integer(y.args[1])?w.session.multifile_predicates[b.args[0].args[0].id+"/"+b.args[0].args[1].value]=!0:w.throw_error(x.error.type("integer",y.args[1],b.indicator)):w.throw_error(x.error.type("atom",y.args[0],b.indicator))},"set_prolog_flag/2":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y)?x.type.is_flag(y)?x.type.is_value_flag(y,F)?x.type.is_modifiable_flag(y)?w.session.flag[y.id]=F:w.throw_error(x.error.permission("modify","flag",y)):w.throw_error(x.error.domain("flag_value",new j("+",[y,F]),b.indicator)):w.throw_error(x.error.domain("prolog_flag",y,b.indicator)):w.throw_error(x.error.type("atom",y,b.indicator))},"use_module/1":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_term(y))w.throw_error(x.error.type("term",y,b.indicator));else if(x.type.is_module(y)){var F=y.args[0].id;e(w.session.modules,F)===-1&&w.session.modules.push(F)}},"char_conversion/2":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_character(y)?x.type.is_character(F)?y.id===F.id?delete w.session.__char_conversion[y.id]:w.session.__char_conversion[y.id]=F.id:w.throw_error(x.error.type("character",F,b.indicator)):w.throw_error(x.error.type("character",y,b.indicator))},"op/3":function(w,b){var y=b.args[0],F=b.args[1],z=b.args[2];if(x.type.is_variable(y)||x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_integer(y))w.throw_error(x.error.type("integer",y,b.indicator));else if(!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,b.indicator));else if(!x.type.is_atom(z))w.throw_error(x.error.type("atom",z,b.indicator));else if(y.value<0||y.value>1200)w.throw_error(x.error.domain("operator_priority",y,b.indicator));else if(z.id===",")w.throw_error(x.error.permission("modify","operator",z,b.indicator));else if(z.id==="|"&&(y.value<1001||F.id.length!==3))w.throw_error(x.error.permission("modify","operator",z,b.indicator));else if(["fy","fx","yf","xf","xfx","yfx","xfy"].indexOf(F.id)===-1)w.throw_error(x.error.domain("operator_specifier",F,b.indicator));else{var Z={prefix:null,infix:null,postfix:null};for(var $ in w.session.__operators)if(w.session.__operators.hasOwnProperty($)){var oe=w.session.__operators[$][z.id];oe&&(e(oe,"fx")!==-1&&(Z.prefix={priority:$,type:"fx"}),e(oe,"fy")!==-1&&(Z.prefix={priority:$,type:"fy"}),e(oe,"xf")!==-1&&(Z.postfix={priority:$,type:"xf"}),e(oe,"yf")!==-1&&(Z.postfix={priority:$,type:"yf"}),e(oe,"xfx")!==-1&&(Z.infix={priority:$,type:"xfx"}),e(oe,"xfy")!==-1&&(Z.infix={priority:$,type:"xfy"}),e(oe,"yfx")!==-1&&(Z.infix={priority:$,type:"yfx"}))}var xe;switch(F.id){case"fy":case"fx":xe="prefix";break;case"yf":case"xf":xe="postfix";break;default:xe="infix";break}if(((Z.prefix&&xe==="prefix"||Z.postfix&&xe==="postfix"||Z.infix&&xe==="infix")&&Z[xe].type!==F.id||Z.infix&&xe==="postfix"||Z.postfix&&xe==="infix")&&y.value!==0)w.throw_error(x.error.permission("create","operator",z,b.indicator));else return Z[xe]&&(we(w.session.__operators[Z[xe].priority][z.id],F.id),w.session.__operators[Z[xe].priority][z.id].length===0&&delete w.session.__operators[Z[xe].priority][z.id]),y.value>0&&(w.session.__operators[y.value]||(w.session.__operators[y.value.toString()]={}),w.session.__operators[y.value][z.id]||(w.session.__operators[y.value][z.id]=[]),w.session.__operators[y.value][z.id].push(F.id)),!0}}},predicate:{"op/3":function(w,b,y){x.directive["op/3"](w,y)&&w.success(b)},"current_op/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2],$=[];for(var oe in w.session.__operators)for(var xe in w.session.__operators[oe])for(var Te=0;Te/2"){var F=w.points,z=w.session.format_success,Z=w.session.format_error;w.session.format_success=function(Te){return Te.substitution},w.session.format_error=function(Te){return Te.goal},w.points=[new Pe(y.args[0].args[0],b.substitution,b)];var $=function(Te){w.points=F,w.session.format_success=z,w.session.format_error=Z,Te===!1?w.prepend([new Pe(b.goal.replace(y.args[1]),b.substitution,b)]):x.type.is_error(Te)?w.throw_error(Te.args[0]):Te===null?(w.prepend([b]),w.__calls.shift()(null)):w.prepend([new Pe(b.goal.replace(y.args[0].args[1]).apply(Te),b.substitution.apply(Te),b)])};w.__calls.unshift($)}else{var oe=new Pe(b.goal.replace(y.args[0]),b.substitution,b),xe=new Pe(b.goal.replace(y.args[1]),b.substitution,b);w.prepend([oe,xe])}},"!/0":function(w,b,y){var F,z,Z=[];for(F=b,z=null;F.parent!==null&&F.parent.goal.search(y);)if(z=F,F=F.parent,F.goal!==null){var $=F.goal.select();if($&&$.id==="call"&&$.search(y)){F=z;break}}for(var oe=w.points.length-1;oe>=0;oe--){for(var xe=w.points[oe],Te=xe.parent;Te!==null&&Te!==F.parent;)Te=Te.parent;Te===null&&Te!==F.parent&&Z.push(xe)}w.points=Z.reverse(),w.success(b)},"\\+/1":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(w.level)):x.type.is_callable(F)?w.prepend([new Pe(b.goal.replace(new j(",",[new j(",",[new j("call",[F]),new j("!",[])]),new j("fail",[])])),b.substitution,b),new Pe(b.goal.replace(null),b.substitution,b)]):w.throw_error(x.error.type("callable",F,w.level))},"->/2":function(w,b,y){var F=b.goal.replace(new j(",",[y.args[0],new j(",",[new j("!"),y.args[1]])]));w.prepend([new Pe(F,b.substitution,b)])},"fail/0":function(w,b,y){},"false/0":function(w,b,y){},"true/0":function(w,b,y){w.success(b)},"call/1":se(1),"call/2":se(2),"call/3":se(3),"call/4":se(4),"call/5":se(5),"call/6":se(6),"call/7":se(7),"call/8":se(8),"once/1":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(",",[new j("call",[F]),new j("!",[])])),b.substitution,b)])},"forall/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("\\+",[new j(",",[new j("call",[F]),new j("\\+",[new j("call",[z])])])])),b.substitution,b)])},"repeat/0":function(w,b,y){w.prepend([new Pe(b.goal.replace(null),b.substitution,b),b])},"throw/1":function(w,b,y){x.type.is_variable(y.args[0])?w.throw_error(x.error.instantiation(w.level)):w.throw_error(y.args[0])},"catch/3":function(w,b,y){var F=w.points;w.points=[],w.prepend([new Pe(y.args[0],b.substitution,b)]);var z=w.session.format_success,Z=w.session.format_error;w.session.format_success=function(oe){return oe.substitution},w.session.format_error=function(oe){return oe.goal};var $=function(oe){var xe=w.points;if(w.points=F,w.session.format_success=z,w.session.format_error=Z,x.type.is_error(oe)){for(var Te=[],lt=w.points.length-1;lt>=0;lt--){for(var ir=w.points[lt],It=ir.parent;It!==null&&It!==b.parent;)It=It.parent;It===null&&It!==b.parent&&Te.push(ir)}w.points=Te;var qt=w.get_flag("occurs_check").indicator==="true/0",ir=new Pe,Pt=x.unify(oe.args[0],y.args[1],qt);Pt!==null?(ir.substitution=b.substitution.apply(Pt),ir.goal=b.goal.replace(y.args[2]).apply(Pt),ir.parent=b,w.prepend([ir])):w.throw_error(oe.args[0])}else if(oe!==!1){for(var gn=oe===null?[]:[new Pe(b.goal.apply(oe).replace(null),b.substitution.apply(oe),b)],Pr=[],lt=xe.length-1;lt>=0;lt--){Pr.push(xe[lt]);var Ir=xe[lt].goal!==null?xe[lt].goal.select():null;if(x.type.is_term(Ir)&&Ir.indicator==="!/0")break}var Nr=s(Pr,function(nn){return nn.goal===null&&(nn.goal=new j("true",[])),nn=new Pe(b.goal.replace(new j("catch",[nn.goal,y.args[1],y.args[2]])),b.substitution.apply(nn.substitution),nn.parent),nn.exclude=y.args[0].variables(),nn}).reverse();w.prepend(Nr),w.prepend(gn),oe===null&&(this.current_limit=0,w.__calls.shift()(null))}};w.__calls.unshift($)},"=/2":function(w,b,y){var F=w.get_flag("occurs_check").indicator==="true/0",z=new Pe,Z=x.unify(y.args[0],y.args[1],F);Z!==null&&(z.goal=b.goal.apply(Z).replace(null),z.substitution=b.substitution.apply(Z),z.parent=b,w.prepend([z]))},"unify_with_occurs_check/2":function(w,b,y){var F=new Pe,z=x.unify(y.args[0],y.args[1],!0);z!==null&&(F.goal=b.goal.apply(z).replace(null),F.substitution=b.substitution.apply(z),F.parent=b,w.prepend([F]))},"\\=/2":function(w,b,y){var F=w.get_flag("occurs_check").indicator==="true/0",z=x.unify(y.args[0],y.args[1],F);z===null&&w.success(b)},"subsumes_term/2":function(w,b,y){var F=w.get_flag("occurs_check").indicator==="true/0",z=x.unify(y.args[1],y.args[0],F);z!==null&&y.args[1].apply(z).equals(y.args[1])&&w.success(b)},"findall/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(z))w.throw_error(x.error.type("callable",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))w.throw_error(x.error.type("list",Z,y.indicator));else{var $=w.next_free_variable(),oe=new j(",",[z,new j("=",[$,F])]),xe=w.points,Te=w.session.limit,lt=w.session.format_success;w.session.format_success=function(ir){return ir.substitution},w.add_goal(oe,!0,b);var It=[],qt=function(ir){if(ir!==!1&&ir!==null&&!x.type.is_error(ir))w.__calls.unshift(qt),It.push(ir.links[$.id]),w.session.limit=w.current_limit;else if(w.points=xe,w.session.limit=Te,w.session.format_success=lt,x.type.is_error(ir))w.throw_error(ir.args[0]);else if(w.current_limit>0){for(var Pt=new j("[]"),gn=It.length-1;gn>=0;gn--)Pt=new j(".",[It[gn],Pt]);w.prepend([new Pe(b.goal.replace(new j("=",[Z,Pt])),b.substitution,b)])}};w.__calls.unshift(qt)}},"bagof/3":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2];if(x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(Z))w.throw_error(x.error.type("callable",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type("list",$,y.indicator));else{var oe=w.next_free_variable(),xe;Z.indicator==="^/2"?(xe=Z.args[0].variables(),Z=Z.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=Z.variables().filter(function(Nr){return e(xe,Nr)===-1}),lt=new j("[]"),It=Te.length-1;It>=0;It--)lt=new j(".",[new De(Te[It]),lt]);var qt=new j(",",[Z,new j("=",[oe,new j(",",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Nr){return Nr.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Nr){if(Nr!==!1&&Nr!==null&&!x.type.is_error(Nr)){w.__calls.unshift(Ir);var nn=!1,ai=Nr.links[oe.id].args[0],wo=Nr.links[oe.id].args[1];for(var ns in Pr)if(Pr.hasOwnProperty(ns)){var to=Pr[ns];if(to.variables.equals(ai)){to.answers.push(wo),nn=!0;break}}nn||Pr.push({variables:ai,answers:[wo]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Nr))w.throw_error(Nr.args[0]);else if(w.current_limit>0){for(var Bo=[],ji=0;ji=0;vo--)ro=new j(".",[Nr[vo],ro]);Bo.push(new Pe(b.goal.replace(new j(",",[new j("=",[lt,Pr[ji].variables]),new j("=",[$,ro])])),b.substitution,b))}w.prepend(Bo)}};w.__calls.unshift(Ir)}},"setof/3":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2];if(x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(Z))w.throw_error(x.error.type("callable",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type("list",$,y.indicator));else{var oe=w.next_free_variable(),xe;Z.indicator==="^/2"?(xe=Z.args[0].variables(),Z=Z.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=Z.variables().filter(function(Nr){return e(xe,Nr)===-1}),lt=new j("[]"),It=Te.length-1;It>=0;It--)lt=new j(".",[new De(Te[It]),lt]);var qt=new j(",",[Z,new j("=",[oe,new j(",",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Nr){return Nr.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Nr){if(Nr!==!1&&Nr!==null&&!x.type.is_error(Nr)){w.__calls.unshift(Ir);var nn=!1,ai=Nr.links[oe.id].args[0],wo=Nr.links[oe.id].args[1];for(var ns in Pr)if(Pr.hasOwnProperty(ns)){var to=Pr[ns];if(to.variables.equals(ai)){to.answers.push(wo),nn=!0;break}}nn||Pr.push({variables:ai,answers:[wo]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Nr))w.throw_error(Nr.args[0]);else if(w.current_limit>0){for(var Bo=[],ji=0;ji=0;vo--)ro=new j(".",[Nr[vo],ro]);Bo.push(new Pe(b.goal.replace(new j(",",[new j("=",[lt,Pr[ji].variables]),new j("=",[$,ro])])),b.substitution,b))}w.prepend(Bo)}};w.__calls.unshift(Ir)}},"functor/3":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2];if(x.type.is_variable(z)&&(x.type.is_variable(Z)||x.type.is_variable($)))w.throw_error(x.error.instantiation("functor/3"));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type("integer",y.args[2],"functor/3"));else if(!x.type.is_variable(Z)&&!x.type.is_atomic(Z))w.throw_error(x.error.type("atomic",y.args[1],"functor/3"));else if(x.type.is_integer(Z)&&x.type.is_integer($)&&$.value!==0)w.throw_error(x.error.type("atom",y.args[1],"functor/3"));else if(x.type.is_variable(z)){if(y.args[2].value>=0){for(var oe=[],xe=0;xe<$.value;xe++)oe.push(w.next_free_variable());var Te=x.type.is_integer(Z)?Z:new j(Z.id,oe);w.prepend([new Pe(b.goal.replace(new j("=",[z,Te])),b.substitution,b)])}}else{var lt=x.type.is_integer(z)?z:new j(z.id,[]),It=x.type.is_integer(z)?new Re(0,!1):new Re(z.args.length,!1),qt=new j(",",[new j("=",[lt,Z]),new j("=",[It,$])]);w.prepend([new Pe(b.goal.replace(qt),b.substitution,b)])}},"arg/3":function(w,b,y){if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(y.indicator));else if(y.args[0].value<0)w.throw_error(x.error.domain("not_less_than_zero",y.args[0],y.indicator));else if(!x.type.is_compound(y.args[1]))w.throw_error(x.error.type("compound",y.args[1],y.indicator));else{var F=y.args[0].value;if(F>0&&F<=y.args[1].args.length){var z=new j("=",[y.args[1].args[F-1],y.args[2]]);w.prepend([new Pe(b.goal.replace(z),b.substitution,b)])}}},"=../2":function(w,b,y){var F;if(x.type.is_variable(y.args[0])&&(x.type.is_variable(y.args[1])||x.type.is_non_empty_list(y.args[1])&&x.type.is_variable(y.args[1].args[0])))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_fully_list(y.args[1]))w.throw_error(x.error.type("list",y.args[1],y.indicator));else if(x.type.is_variable(y.args[0])){if(!x.type.is_variable(y.args[1])){var Z=[];for(F=y.args[1].args[1];F.indicator==="./2";)Z.push(F.args[0]),F=F.args[1];x.type.is_variable(y.args[0])&&x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):Z.length===0&&x.type.is_compound(y.args[1].args[0])?w.throw_error(x.error.type("atomic",y.args[1].args[0],y.indicator)):Z.length>0&&(x.type.is_compound(y.args[1].args[0])||x.type.is_number(y.args[1].args[0]))?w.throw_error(x.error.type("atom",y.args[1].args[0],y.indicator)):Z.length===0?w.prepend([new Pe(b.goal.replace(new j("=",[y.args[1].args[0],y.args[0]],b)),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j("=",[new j(y.args[1].args[0].id,Z),y.args[0]])),b.substitution,b)])}}else{if(x.type.is_atomic(y.args[0]))F=new j(".",[y.args[0],new j("[]")]);else{F=new j("[]");for(var z=y.args[0].args.length-1;z>=0;z--)F=new j(".",[y.args[0].args[z],F]);F=new j(".",[new j(y.args[0].id),F])}w.prepend([new Pe(b.goal.replace(new j("=",[F,y.args[1]])),b.substitution,b)])}},"copy_term/2":function(w,b,y){var F=y.args[0].rename(w);w.prepend([new Pe(b.goal.replace(new j("=",[F,y.args[1]])),b.substitution,b.parent)])},"term_variables/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_fully_list(z))w.throw_error(x.error.type("list",z,y.indicator));else{var Z=g(s(ye(F.variables()),function($){return new De($)}));w.prepend([new Pe(b.goal.replace(new j("=",[z,Z])),b.substitution,b)])}},"clause/2":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type("callable",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_callable(y.args[1]))w.throw_error(x.error.type("callable",y.args[1],y.indicator));else if(w.session.rules[y.args[0].indicator]!==void 0)if(w.is_public_predicate(y.args[0].indicator)){var F=[];for(var z in w.session.rules[y.args[0].indicator])if(w.session.rules[y.args[0].indicator].hasOwnProperty(z)){var Z=w.session.rules[y.args[0].indicator][z];w.session.renamed_variables={},Z=Z.rename(w),Z.body===null&&(Z.body=new j("true"));var $=new j(",",[new j("=",[Z.head,y.args[0]]),new j("=",[Z.body,y.args[1]])]);F.push(new Pe(b.goal.replace($),b.substitution,b))}w.prepend(F)}else w.throw_error(x.error.permission("access","private_procedure",y.args[0].indicator,y.indicator))},"current_predicate/1":function(w,b,y){var F=y.args[0];if(!x.type.is_variable(F)&&(!x.type.is_compound(F)||F.indicator!=="//2"))w.throw_error(x.error.type("predicate_indicator",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[0])&&!x.type.is_atom(F.args[0]))w.throw_error(x.error.type("atom",F.args[0],y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[1])&&!x.type.is_integer(F.args[1]))w.throw_error(x.error.type("integer",F.args[1],y.indicator));else{var z=[];for(var Z in w.session.rules)if(w.session.rules.hasOwnProperty(Z)){var $=Z.lastIndexOf("/"),oe=Z.substr(0,$),xe=parseInt(Z.substr($+1,Z.length-($+1))),Te=new j("/",[new j(oe),new Re(xe,!1)]),lt=new j("=",[Te,F]);z.push(new Pe(b.goal.replace(lt),b.substitution,b))}w.prepend(z)}},"asserta/1":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type("callable",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator]=[new Ye(F,z,!0)].concat(w.session.rules[F.indicator]),w.success(b)):w.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator)):w.throw_error(x.error.type("callable",F,y.indicator))}},"assertz/1":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type("callable",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator].push(new Ye(F,z,!0)),w.success(b)):w.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator)):w.throw_error(x.error.type("callable",F,y.indicator))}},"retract/1":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;if(y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=y.args[0].args[1]):(F=y.args[0],z=new j("true")),typeof b.retract>"u")if(w.is_public_predicate(F.indicator)){if(w.session.rules[F.indicator]!==void 0){for(var Z=[],$=0;$w.get_flag("max_arity").value)w.throw_error(x.error.representation("max_arity",y.indicator));else{var F=y.args[0].args[0].id+"/"+y.args[0].args[1].value;w.is_public_predicate(F)?(delete w.session.rules[F],w.success(b)):w.throw_error(x.error.permission("modify","static_procedure",F,y.indicator))}},"atom_length/2":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type("atom",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_integer(y.args[1]))w.throw_error(x.error.type("integer",y.args[1],y.indicator));else if(x.type.is_integer(y.args[1])&&y.args[1].value<0)w.throw_error(x.error.domain("not_less_than_zero",y.args[1],y.indicator));else{var F=new Re(y.args[0].id.length,!1);w.prepend([new Pe(b.goal.replace(new j("=",[F,y.args[1]])),b.substitution,b)])}},"atom_concat/3":function(w,b,y){var F,z,Z=y.args[0],$=y.args[1],oe=y.args[2];if(x.type.is_variable(oe)&&(x.type.is_variable(Z)||x.type.is_variable($)))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_atom(Z))w.throw_error(x.error.type("atom",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_atom($))w.throw_error(x.error.type("atom",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_atom(oe))w.throw_error(x.error.type("atom",oe,y.indicator));else{var xe=x.type.is_variable(Z),Te=x.type.is_variable($);if(!xe&&!Te)z=new j("=",[oe,new j(Z.id+$.id)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]);else if(xe&&!Te)F=oe.id.substr(0,oe.id.length-$.id.length),F+$.id===oe.id&&(z=new j("=",[Z,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else if(Te&&!xe)F=oe.id.substr(Z.id.length),Z.id+F===oe.id&&(z=new j("=",[$,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else{for(var lt=[],It=0;It<=oe.id.length;It++){var qt=new j(oe.id.substr(0,It)),ir=new j(oe.id.substr(It));z=new j(",",[new j("=",[qt,Z]),new j("=",[ir,$])]),lt.push(new Pe(b.goal.replace(z),b.substitution,b))}w.prepend(lt)}}},"sub_atom/5":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2],oe=y.args[3],xe=y.args[4];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_integer(Z))w.throw_error(x.error.type("integer",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type("integer",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_integer(oe))w.throw_error(x.error.type("integer",oe,y.indicator));else if(x.type.is_integer(Z)&&Z.value<0)w.throw_error(x.error.domain("not_less_than_zero",Z,y.indicator));else if(x.type.is_integer($)&&$.value<0)w.throw_error(x.error.domain("not_less_than_zero",$,y.indicator));else if(x.type.is_integer(oe)&&oe.value<0)w.throw_error(x.error.domain("not_less_than_zero",oe,y.indicator));else{var Te=[],lt=[],It=[];if(x.type.is_variable(Z))for(F=0;F<=z.id.length;F++)Te.push(F);else Te.push(Z.value);if(x.type.is_variable($))for(F=0;F<=z.id.length;F++)lt.push(F);else lt.push($.value);if(x.type.is_variable(oe))for(F=0;F<=z.id.length;F++)It.push(F);else It.push(oe.value);var qt=[];for(var ir in Te)if(Te.hasOwnProperty(ir)){F=Te[ir];for(var Pt in lt)if(lt.hasOwnProperty(Pt)){var gn=lt[Pt],Pr=z.id.length-F-gn;if(e(It,Pr)!==-1&&F+gn+Pr===z.id.length){var Ir=z.id.substr(F,gn);if(z.id===z.id.substr(0,F)+Ir+z.id.substr(F+gn,Pr)){var Nr=new j("=",[new j(Ir),xe]),nn=new j("=",[Z,new Re(F)]),ai=new j("=",[$,new Re(gn)]),wo=new j("=",[oe,new Re(Pr)]),ns=new j(",",[new j(",",[new j(",",[nn,ai]),wo]),Nr]);qt.push(new Pe(b.goal.replace(ns),b.substitution,b))}}}}w.prepend(qt)}},"atom_chars/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te="";oe.indicator==="./2";){if(x.type.is_character(oe.args[0]))Te+=oe.args[0].id;else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type("character",oe.args[0],y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type("list",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[new j(Te),F])),b.substitution,b)])}else{for(var Z=new j("[]"),$=F.id.length-1;$>=0;$--)Z=new j(".",[new j(F.id.charAt($)),Z]);w.prepend([new Pe(b.goal.replace(new j("=",[z,Z])),b.substitution,b)])}},"atom_codes/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te="";oe.indicator==="./2";){if(x.type.is_character_code(oe.args[0]))Te+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.representation("character_code",y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type("list",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[new j(Te),F])),b.substitution,b)])}else{for(var Z=new j("[]"),$=F.id.length-1;$>=0;$--)Z=new j(".",[new Re(n(F.id,$),!1),Z]);w.prepend([new Pe(b.goal.replace(new j("=",[z,Z])),b.substitution,b)])}},"char_code/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_character(F))w.throw_error(x.error.type("character",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type("integer",z,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character_code(z))w.throw_error(x.error.representation("character_code",y.indicator));else if(x.type.is_variable(z)){var Z=new Re(n(F.id,0),!1);w.prepend([new Pe(b.goal.replace(new j("=",[Z,z])),b.substitution,b)])}else{var $=new j(c(z.value));w.prepend([new Pe(b.goal.replace(new j("=",[$,F])),b.substitution,b)])}},"number_chars/2":function(w,b,y){var F,z=y.args[0],Z=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type("number",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))w.throw_error(x.error.type("list",Z,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(Z)){var oe=Z,xe=!0;for(F="";oe.indicator==="./2";){if(x.type.is_character(oe.args[0]))F+=oe.args[0].id;else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type("character",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type("list",Z,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate("parseable_number",y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var It=new j("[]"),qt=F.length-1;qt>=0;qt--)It=new j(".",[new j(F.charAt(qt)),It]);w.prepend([new Pe(b.goal.replace(new j("=",[Z,It])),b.substitution,b)])}}},"number_codes/2":function(w,b,y){var F,z=y.args[0],Z=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type("number",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))w.throw_error(x.error.type("list",Z,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(Z)){var oe=Z,xe=!0;for(F="";oe.indicator==="./2";){if(x.type.is_character_code(oe.args[0]))F+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type("character_code",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type("list",Z,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate("parseable_number",y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var It=new j("[]"),qt=F.length-1;qt>=0;qt--)It=new j(".",[new Re(n(F,qt),!1),It]);w.prepend([new Pe(b.goal.replace(new j("=",[Z,It])),b.substitution,b)])}}},"upcase_atom/2":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type("atom",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[z,new j(F.id.toUpperCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type("atom",F,y.indicator))},"downcase_atom/2":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type("atom",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[z,new j(F.id.toLowerCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type("atom",F,y.indicator))},"atomic_list_concat/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("atomic_list_concat",[F,new j("",[]),z])),b.substitution,b)])},"atomic_list_concat/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(x.type.is_variable(z)||x.type.is_variable(F)&&x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_list(F))w.throw_error(x.error.type("list",F,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_atom(Z))w.throw_error(x.error.type("atom",Z,y.indicator));else if(x.type.is_variable(Z)){for(var oe="",xe=F;x.type.is_term(xe)&&xe.indicator==="./2";){if(!x.type.is_atom(xe.args[0])&&!x.type.is_number(xe.args[0])){w.throw_error(x.error.type("atomic",xe.args[0],y.indicator));return}oe!==""&&(oe+=z.id),x.type.is_atom(xe.args[0])?oe+=xe.args[0].id:oe+=""+xe.args[0].value,xe=xe.args[1]}oe=new j(oe,[]),x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_term(xe)||xe.indicator!=="[]/0"?w.throw_error(x.error.type("list",F,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[oe,Z])),b.substitution,b)])}else{var $=g(s(Z.id.split(z.id),function(Te){return new j(Te,[])}));w.prepend([new Pe(b.goal.replace(new j("=",[$,F])),b.substitution,b)])}},"@=/2":function(w,b,y){x.compare(y.args[0],y.args[1])>0&&w.success(b)},"@>=/2":function(w,b,y){x.compare(y.args[0],y.args[1])>=0&&w.success(b)},"compare/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_atom(F)&&["<",">","="].indexOf(F.id)===-1)w.throw_error(x.type.domain("order",F,y.indicator));else{var $=x.compare(z,Z);$=$===0?"=":$===-1?"<":">",w.prepend([new Pe(b.goal.replace(new j("=",[F,new j($,[])])),b.substitution,b)])}},"is/2":function(w,b,y){var F=y.args[1].interpret(w);x.type.is_number(F)?w.prepend([new Pe(b.goal.replace(new j("=",[y.args[0],F],w.level)),b.substitution,b)]):w.throw_error(F)},"between/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_integer(F))w.throw_error(x.error.type("integer",F,y.indicator));else if(!x.type.is_integer(z))w.throw_error(x.error.type("integer",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_integer(Z))w.throw_error(x.error.type("integer",Z,y.indicator));else if(x.type.is_variable(Z)){var $=[new Pe(b.goal.replace(new j("=",[Z,F])),b.substitution,b)];F.value=Z.value&&w.success(b)},"succ/2":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)&&x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_integer(F)?w.throw_error(x.error.type("integer",F,y.indicator)):!x.type.is_variable(z)&&!x.type.is_integer(z)?w.throw_error(x.error.type("integer",z,y.indicator)):!x.type.is_variable(F)&&F.value<0?w.throw_error(x.error.domain("not_less_than_zero",F,y.indicator)):!x.type.is_variable(z)&&z.value<0?w.throw_error(x.error.domain("not_less_than_zero",z,y.indicator)):(x.type.is_variable(z)||z.value>0)&&(x.type.is_variable(F)?w.prepend([new Pe(b.goal.replace(new j("=",[F,new Re(z.value-1,!1)])),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j("=",[z,new Re(F.value+1,!1)])),b.substitution,b)]))},"=:=/2":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F===0&&w.success(b)},"=\\=/2":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F!==0&&w.success(b)},"/2":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>0&&w.success(b)},">=/2":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>=0&&w.success(b)},"var/1":function(w,b,y){x.type.is_variable(y.args[0])&&w.success(b)},"atom/1":function(w,b,y){x.type.is_atom(y.args[0])&&w.success(b)},"atomic/1":function(w,b,y){x.type.is_atomic(y.args[0])&&w.success(b)},"compound/1":function(w,b,y){x.type.is_compound(y.args[0])&&w.success(b)},"integer/1":function(w,b,y){x.type.is_integer(y.args[0])&&w.success(b)},"float/1":function(w,b,y){x.type.is_float(y.args[0])&&w.success(b)},"number/1":function(w,b,y){x.type.is_number(y.args[0])&&w.success(b)},"nonvar/1":function(w,b,y){x.type.is_variable(y.args[0])||w.success(b)},"ground/1":function(w,b,y){y.variables().length===0&&w.success(b)},"acyclic_term/1":function(w,b,y){for(var F=b.substitution.apply(b.substitution),z=y.args[0].variables(),Z=0;Z0?Pt[Pt.length-1]:null,Pt!==null&&(qt=W(w,Pt,0,w.__get_max_priority(),!1))}if(qt.type===p&&qt.len===Pt.length-1&&gn.value==="."){qt=qt.value.rename(w);var Pr=new j("=",[z,qt]);if(oe.variables){var Ir=g(s(ye(qt.variables()),function(Nr){return new De(Nr)}));Pr=new j(",",[Pr,new j("=",[oe.variables,Ir])])}if(oe.variable_names){var Ir=g(s(ye(qt.variables()),function(nn){var ai;for(ai in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(ai)&&w.session.renamed_variables[ai]===nn)break;return new j("=",[new j(ai,[]),new De(nn)])}));Pr=new j(",",[Pr,new j("=",[oe.variable_names,Ir])])}if(oe.singletons){var Ir=g(s(new Ye(qt,null).singleton_variables(),function(nn){var ai;for(ai in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(ai)&&w.session.renamed_variables[ai]===nn)break;return new j("=",[new j(ai,[]),new De(nn)])}));Pr=new j(",",[Pr,new j("=",[oe.singletons,Ir])])}w.prepend([new Pe(b.goal.replace(Pr),b.substitution,b)])}else qt.type===p?w.throw_error(x.error.syntax(Pt[qt.len],"unexpected token",!1)):w.throw_error(qt.value)}}},"write/1":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(",",[new j("current_output",[new De("S")]),new j("write",[new De("S"),F])])),b.substitution,b)])},"write/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("write_term",[F,z,new j(".",[new j("quoted",[new j("false",[])]),new j(".",[new j("ignore_ops",[new j("false")]),new j(".",[new j("numbervars",[new j("true")]),new j("[]",[])])])])])),b.substitution,b)])},"writeq/1":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(",",[new j("current_output",[new De("S")]),new j("writeq",[new De("S"),F])])),b.substitution,b)])},"writeq/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("write_term",[F,z,new j(".",[new j("quoted",[new j("true",[])]),new j(".",[new j("ignore_ops",[new j("false")]),new j(".",[new j("numbervars",[new j("true")]),new j("[]",[])])])])])),b.substitution,b)])},"write_canonical/1":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(",",[new j("current_output",[new De("S")]),new j("write_canonical",[new De("S"),F])])),b.substitution,b)])},"write_canonical/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("write_term",[F,z,new j(".",[new j("quoted",[new j("true",[])]),new j(".",[new j("ignore_ops",[new j("true")]),new j(".",[new j("numbervars",[new j("false")]),new j("[]",[])])])])])),b.substitution,b)])},"write_term/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(",",[new j("current_output",[new De("S")]),new j("write_term",[new De("S"),F,z])])),b.substitution,b)])},"write_term/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2],$=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(Z))w.throw_error(x.error.type("list",Z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)w.throw_error(x.error.existence("stream",F,y.indicator));else if($.input)w.throw_error(x.error.permission("output","stream",F,y.indicator));else if($.type==="binary")w.throw_error(x.error.permission("output","binary_stream",F,y.indicator));else if($.position==="past_end_of_stream"&&$.eof_action==="error")w.throw_error(x.error.permission("output","past_end_of_stream",F,y.indicator));else{for(var oe={},xe=Z,Te;x.type.is_term(xe)&&xe.indicator==="./2";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_write_option(Te)){w.throw_error(x.error.domain("write_option",Te,y.indicator));return}oe[Te.id]=Te.args[0].id==="true",xe=xe.args[1]}if(xe.indicator!=="[]/0"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type("list",Z,y.indicator));return}else{oe.session=w.session;var lt=z.toString(oe);$.stream.put(lt,$.position),typeof $.position=="number"&&($.position+=lt.length),w.success(b)}}},"halt/0":function(w,b,y){w.points=[]},"halt/1":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(F)?w.points=[]:w.throw_error(x.error.type("integer",F,y.indicator))},"current_prolog_flag/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_flag(F))w.throw_error(x.error.domain("prolog_flag",F,y.indicator));else{var Z=[];for(var $ in x.flag)if(x.flag.hasOwnProperty($)){var oe=new j(",",[new j("=",[new j($),F]),new j("=",[w.get_flag($),z])]);Z.push(new Pe(b.goal.replace(oe),b.substitution,b))}w.prepend(Z)}},"set_prolog_flag/2":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?x.type.is_flag(F)?x.type.is_value_flag(F,z)?x.type.is_modifiable_flag(F)?(w.session.flag[F.id]=z,w.success(b)):w.throw_error(x.error.permission("modify","flag",F)):w.throw_error(x.error.domain("flag_value",new j("+",[F,z]),y.indicator)):w.throw_error(x.error.domain("prolog_flag",F,y.indicator)):w.throw_error(x.error.type("atom",F,y.indicator))}},flag:{bounded:{allowed:[new j("true"),new j("false")],value:new j("true"),changeable:!1},max_integer:{allowed:[new Re(Number.MAX_SAFE_INTEGER)],value:new Re(Number.MAX_SAFE_INTEGER),changeable:!1},min_integer:{allowed:[new Re(Number.MIN_SAFE_INTEGER)],value:new Re(Number.MIN_SAFE_INTEGER),changeable:!1},integer_rounding_function:{allowed:[new j("down"),new j("toward_zero")],value:new j("toward_zero"),changeable:!1},char_conversion:{allowed:[new j("on"),new j("off")],value:new j("on"),changeable:!0},debug:{allowed:[new j("on"),new j("off")],value:new j("off"),changeable:!0},max_arity:{allowed:[new j("unbounded")],value:new j("unbounded"),changeable:!1},unknown:{allowed:[new j("error"),new j("fail"),new j("warning")],value:new j("error"),changeable:!0},double_quotes:{allowed:[new j("chars"),new j("codes"),new j("atom")],value:new j("codes"),changeable:!0},occurs_check:{allowed:[new j("false"),new j("true")],value:new j("false"),changeable:!0},dialect:{allowed:[new j("tau")],value:new j("tau"),changeable:!1},version_data:{allowed:[new j("tau",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)])],value:new j("tau",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)]),changeable:!1},nodejs:{allowed:[new j("yes"),new j("no")],value:new j(typeof tc<"u"&&tc.exports?"yes":"no"),changeable:!1}},unify:function(w,b,y){y=y===void 0?!1:y;for(var F=[{left:w,right:b}],z={};F.length!==0;){var Z=F.pop();if(w=Z.left,b=Z.right,x.type.is_term(w)&&x.type.is_term(b)){if(w.indicator!==b.indicator)return null;for(var $=0;$z.value?1:0:z}else return F},operate:function(w,b){if(x.type.is_operator(b)){for(var y=x.type.is_operator(b),F=[],z,Z=!1,$=0;$w.get_flag("max_integer").value||z0?w.start+w.matches[0].length:w.start,z=y?new j("token_not_found"):new j("found",[new j(w.value.toString())]),Z=new j(".",[new j("line",[new Re(w.line+1)]),new j(".",[new j("column",[new Re(F+1)]),new j(".",[z,new j("[]",[])])])]);return new j("error",[new j("syntax_error",[new j(b)]),Z])},syntax_by_predicate:function(w,b){return new j("error",[new j("syntax_error",[new j(w)]),X(b)])}},warning:{singleton:function(w,b,y){for(var F=new j("[]"),z=w.length-1;z>=0;z--)F=new j(".",[new De(w[z]),F]);return new j("warning",[new j("singleton_variables",[F,X(b)]),new j(".",[new j("line",[new Re(y,!1)]),new j("[]")])])},failed_goal:function(w,b){return new j("warning",[new j("failed_goal",[w]),new j(".",[new j("line",[new Re(b,!1)]),new j("[]")])])}},format_variable:function(w){return"_"+w},format_answer:function(w,b,F){b instanceof ke&&(b=b.thread);var F=F||{};if(F.session=b?b.session:void 0,x.type.is_error(w))return"uncaught exception: "+w.args[0].toString();if(w===!1)return"false.";if(w===null)return"limit exceeded ;";var z=0,Z="";if(x.type.is_substitution(w)){var $=w.domain(!0);w=w.filter(function(Te,lt){return!x.type.is_variable(lt)||$.indexOf(lt.id)!==-1&&Te!==lt.id})}for(var oe in w.links)w.links.hasOwnProperty(oe)&&(z++,Z!==""&&(Z+=", "),Z+=oe.toString(F)+" = "+w.links[oe].toString(F));var xe=typeof b>"u"||b.points.length>0?" ;":".";return z===0?"true"+xe:Z+xe},flatten_error:function(w){if(!x.type.is_error(w))return null;w=w.args[0];var b={};return b.type=w.args[0].id,b.thrown=b.type==="syntax_error"?null:w.args[1].id,b.expected=null,b.found=null,b.representation=null,b.existence=null,b.existence_type=null,b.line=null,b.column=null,b.permission_operation=null,b.permission_type=null,b.evaluation_type=null,b.type==="type_error"||b.type==="domain_error"?(b.expected=w.args[0].args[0].id,b.found=w.args[0].args[1].toString()):b.type==="syntax_error"?w.args[1].indicator==="./2"?(b.expected=w.args[0].args[0].id,b.found=w.args[1].args[1].args[1].args[0],b.found=b.found.id==="token_not_found"?b.found.id:b.found.args[0].id,b.line=w.args[1].args[0].args[0].value,b.column=w.args[1].args[1].args[0].args[0].value):b.thrown=w.args[1].id:b.type==="permission_error"?(b.found=w.args[0].args[2].toString(),b.permission_operation=w.args[0].args[0].id,b.permission_type=w.args[0].args[1].id):b.type==="evaluation_error"?b.evaluation_type=w.args[0].args[0].id:b.type==="representation_error"?b.representation=w.args[0].args[0].id:b.type==="existence_error"&&(b.existence=w.args[0].args[1].toString(),b.existence_type=w.args[0].args[0].id),b},create:function(w){return new x.type.Session(w)}};typeof tc<"u"?tc.exports=x:window.pl=x})()});function nve(t,e,r){t.prepend(r.map(s=>new gl.default.type.State(e.goal.replace(s),e.substitution,e)))}function f9(t){let e=sve.get(t.session);if(e==null)throw new Error("Assertion failed: A project should have been registered for the active session");return e}function ove(t,e){sve.set(t,e),t.consult(`:- use_module(library(${OSt.id})).`)}var A9,gl,ive,V0,FSt,NSt,sve,OSt,ave=Ct(()=>{Ve();A9=et(aS()),gl=et(u9()),ive=et(Ie("vm")),{is_atom:V0,is_variable:FSt,is_instantiated_list:NSt}=gl.default.type;sve=new WeakMap;OSt=new gl.default.type.Module("constraints",{"project_workspaces_by_descriptor/3":(t,e,r)=>{let[s,a,n]=r.args;if(!V0(s)||!V0(a)){t.throw_error(gl.default.error.instantiation(r.indicator));return}let c=q.parseIdent(s.id),f=q.makeDescriptor(c,a.id),h=f9(t).tryWorkspaceByDescriptor(f);FSt(n)&&h!==null&&nve(t,e,[new gl.default.type.Term("=",[n,new gl.default.type.Term(String(h.relativeCwd))])]),V0(n)&&h!==null&&h.relativeCwd===n.id&&t.success(e)},"workspace_field/3":(t,e,r)=>{let[s,a,n]=r.args;if(!V0(s)||!V0(a)){t.throw_error(gl.default.error.instantiation(r.indicator));return}let f=f9(t).tryWorkspaceByCwd(s.id);if(f==null)return;let p=(0,A9.default)(f.manifest.raw,a.id);typeof p>"u"||nve(t,e,[new gl.default.type.Term("=",[n,new gl.default.type.Term(typeof p=="object"?JSON.stringify(p):p)])])},"workspace_field_test/3":(t,e,r)=>{let[s,a,n]=r.args;t.prepend([new gl.default.type.State(e.goal.replace(new gl.default.type.Term("workspace_field_test",[s,a,n,new gl.default.type.Term("[]",[])])),e.substitution,e)])},"workspace_field_test/4":(t,e,r)=>{let[s,a,n,c]=r.args;if(!V0(s)||!V0(a)||!V0(n)||!NSt(c)){t.throw_error(gl.default.error.instantiation(r.indicator));return}let p=f9(t).tryWorkspaceByCwd(s.id);if(p==null)return;let h=(0,A9.default)(p.manifest.raw,a.id);if(typeof h>"u")return;let E={$$:h};for(let[S,P]of c.toJavaScript().entries())E[`$${S}`]=P;ive.default.runInNewContext(n.id,E)&&t.success(e)}},["project_workspaces_by_descriptor/3","workspace_field/3","workspace_field_test/3","workspace_field_test/4"])});var yS={};Vt(yS,{Constraints:()=>h9,DependencyType:()=>fve});function yo(t){if(t instanceof JC.default.type.Num)return t.value;if(t instanceof JC.default.type.Term)switch(t.indicator){case"throw/1":return yo(t.args[0]);case"error/1":return yo(t.args[0]);case"error/2":if(t.args[0]instanceof JC.default.type.Term&&t.args[0].indicator==="syntax_error/1")return Object.assign(yo(t.args[0]),...yo(t.args[1]));{let e=yo(t.args[0]);return e.message+=` (in ${yo(t.args[1])})`,e}case"syntax_error/1":return new Yt(43,`Syntax error: ${yo(t.args[0])}`);case"existence_error/2":return new Yt(44,`Existence error: ${yo(t.args[0])} ${yo(t.args[1])} not found`);case"instantiation_error/0":return new Yt(75,"Instantiation error: an argument is variable when an instantiated argument was expected");case"line/1":return{line:yo(t.args[0])};case"column/1":return{column:yo(t.args[0])};case"found/1":return{found:yo(t.args[0])};case"./2":return[yo(t.args[0])].concat(yo(t.args[1]));case"//2":return`${yo(t.args[0])}/${yo(t.args[1])}`;default:return t.id}throw`couldn't pretty print because of unsupported node ${t}`}function cve(t){let e;try{e=yo(t)}catch(r){throw typeof r=="string"?new Yt(42,`Unknown error: ${t} (note: ${r})`):r}return typeof e.line<"u"&&typeof e.column<"u"&&(e.message+=` at line ${e.line}, column ${e.column}`),e}function bm(t){return t.id==="null"?null:`${t.toJavaScript()}`}function LSt(t){if(t.id==="null")return null;{let e=t.toJavaScript();if(typeof e!="string")return JSON.stringify(e);try{return JSON.stringify(JSON.parse(e))}catch{return JSON.stringify(e)}}}function K0(t){return typeof t=="string"?`'${t}'`:"[]"}var uve,JC,fve,lve,p9,h9,ES=Ct(()=>{Ve();Ve();bt();uve=et(HBe()),JC=et(u9());gS();ave();(0,uve.default)(JC.default);fve=(s=>(s.Dependencies="dependencies",s.DevDependencies="devDependencies",s.PeerDependencies="peerDependencies",s))(fve||{}),lve=["dependencies","devDependencies","peerDependencies"];p9=class{constructor(e,r){let s=1e3*e.workspaces.length;this.session=JC.default.create(s),ove(this.session,e),this.session.consult(":- use_module(library(lists))."),this.session.consult(r)}fetchNextAnswer(){return new Promise(e=>{this.session.answer(r=>{e(r)})})}async*makeQuery(e){let r=this.session.query(e);if(r!==!0)throw cve(r);for(;;){let s=await this.fetchNextAnswer();if(s===null)throw new Yt(79,"Resolution limit exceeded");if(!s)break;if(s.id==="throw")throw cve(s);yield s}}};h9=class t{constructor(e){this.source="";this.project=e;let r=e.configuration.get("constraintsPath");le.existsSync(r)&&(this.source=le.readFileSync(r,"utf8"))}static async find(e){return new t(e)}getProjectDatabase(){let e="";for(let r of lve)e+=`dependency_type(${r}). -`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;e+=`workspace(${K0(s)}). -`,e+=`workspace_ident(${K0(s)}, ${K0(q.stringifyIdent(r.anchoredLocator))}). -`,e+=`workspace_version(${K0(s)}, ${K0(r.manifest.version)}). -`;for(let a of lve)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${K0(s)}, ${K0(q.stringifyIdent(n))}, ${K0(n.range)}, ${a}). -`}return e+=`workspace(_) :- false. -`,e+=`workspace_ident(_, _) :- false. -`,e+=`workspace_version(_, _) :- false. -`,e+=`workspace_has_dependency(_, _, _, _) :- false. -`,e}getDeclarations(){let e="";return e+=`gen_enforced_dependency(_, _, _, _) :- false. -`,e+=`gen_enforced_field(_, _, _) :- false. -`,e}get fullSource(){return`${this.getProjectDatabase()} -${this.source} -${this.getDeclarations()}`}createSession(){return new p9(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),s=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:c,dependencyType:f}of e){let p=hS([f,q.stringifyIdent(n)]),h=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(h,p).set(c??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:c}of r){let f=hS(n),p=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(p,f).set(JSON.parse(c)??void 0,new Set)}return{manifestUpdates:s,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=K.resolve(this.project.cwd,bm(s.links.WorkspaceCwd)),n=bm(s.links.DependencyIdent),c=bm(s.links.DependencyRange),f=bm(s.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=q.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:c,dependencyType:f})}return je.sortMap(r,[({dependencyRange:s})=>s!==null?"0":"1",({workspace:s})=>q.stringifyIdent(s.anchoredLocator),({dependencyIdent:s})=>q.stringifyIdent(s)])}async genEnforcedFields(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=K.resolve(this.project.cwd,bm(s.links.WorkspaceCwd)),n=bm(s.links.FieldPath),c=LSt(s.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let f=this.project.getWorkspaceByCwd(a);r.push({workspace:f,fieldPath:n,fieldValue:c})}return je.sortMap(r,[({workspace:s})=>q.stringifyIdent(s.anchoredLocator),({fieldPath:s})=>s])}async*query(e){let r=this.createSession();for await(let s of r.makeQuery(e)){let a={};for(let[n,c]of Object.entries(s.links))n!=="_"&&(a[n]=bm(c));yield a}}}});var Ive=L(pF=>{"use strict";Object.defineProperty(pF,"__esModule",{value:!0});function NS(t){let e=[...t.caches],r=e.shift();return r===void 0?Eve():{get(s,a,n={miss:()=>Promise.resolve()}){return r.get(s,a,n).catch(()=>NS({caches:e}).get(s,a,n))},set(s,a){return r.set(s,a).catch(()=>NS({caches:e}).set(s,a))},delete(s){return r.delete(s).catch(()=>NS({caches:e}).delete(s))},clear(){return r.clear().catch(()=>NS({caches:e}).clear())}}}function Eve(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}pF.createFallbackableCache=NS;pF.createNullCache=Eve});var wve=L((Apr,Cve)=>{Cve.exports=Ive()});var Bve=L(P9=>{"use strict";Object.defineProperty(P9,"__esModule",{value:!0});function rDt(t={serializable:!0}){let e={};return{get(r,s,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let c=s(),f=a&&a.miss||(()=>Promise.resolve());return c.then(p=>f(p)).then(()=>c)},set(r,s){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}P9.createInMemoryCache=rDt});var Sve=L((hpr,vve)=>{vve.exports=Bve()});var bve=L(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});function nDt(t,e,r){let s={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===x9.WithinHeaders?s:{}},queryParameters(){return t===x9.WithinQueryParameters?s:{}}}}function iDt(t){let e=0,r=()=>(e++,new Promise(s=>{setTimeout(()=>{s(t(r))},Math.min(100*e,1e3))}));return t(r)}function Dve(t,e=(r,s)=>Promise.resolve()){return Object.assign(t,{wait(r){return Dve(t.then(s=>Promise.all([e(s,r),s])).then(s=>s[1]))}})}function sDt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[r],t[r]=s}return t}function oDt(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function aDt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var lDt="4.22.1",cDt=t=>()=>t.transporter.requester.destroy(),x9={WithinQueryParameters:0,WithinHeaders:1};ef.AuthMode=x9;ef.addMethods=oDt;ef.createAuth=nDt;ef.createRetryablePromise=iDt;ef.createWaitablePromise=Dve;ef.destroy=cDt;ef.encode=aDt;ef.shuffle=sDt;ef.version=lDt});var OS=L((dpr,Pve)=>{Pve.exports=bve()});var xve=L(k9=>{"use strict";Object.defineProperty(k9,"__esModule",{value:!0});var uDt={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};k9.MethodEnum=uDt});var LS=L((ypr,kve)=>{kve.exports=xve()});var Wve=L(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var Tve=LS();function Q9(t,e){let r=t||{},s=r.data||{};return Object.keys(r).forEach(a=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(a)===-1&&(s[a]=r[a])}),{data:Object.entries(s).length>0?s:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var MS={Read:1,Write:2,Any:3},sw={Up:1,Down:2,Timeouted:3},Rve=2*60*1e3;function R9(t,e=sw.Up){return{...t,status:e,lastUpdate:Date.now()}}function Fve(t){return t.status===sw.Up||Date.now()-t.lastUpdate>Rve}function Nve(t){return t.status===sw.Timeouted&&Date.now()-t.lastUpdate<=Rve}function F9(t){return typeof t=="string"?{protocol:"https",url:t,accept:MS.Any}:{protocol:t.protocol||"https",url:t.url,accept:t.accept||MS.Any}}function fDt(t,e){return Promise.all(e.map(r=>t.get(r,()=>Promise.resolve(R9(r))))).then(r=>{let s=r.filter(f=>Fve(f)),a=r.filter(f=>Nve(f)),n=[...s,...a],c=n.length>0?n.map(f=>F9(f)):e;return{getTimeout(f,p){return(a.length===0&&f===0?1:a.length+3+f)*p},statelessHosts:c}})}var ADt=({isTimedOut:t,status:e})=>!t&&~~e===0,pDt=t=>{let e=t.status;return t.isTimedOut||ADt(t)||~~(e/100)!==2&&~~(e/100)!==4},hDt=({status:t})=>~~(t/100)===2,gDt=(t,e)=>pDt(t)?e.onRetry(t):hDt(t)?e.onSuccess(t):e.onFail(t);function Qve(t,e,r,s){let a=[],n=Uve(r,s),c=Hve(t,s),f=r.method,p=r.method!==Tve.MethodEnum.Get?{}:{...r.data,...s.data},h={"x-algolia-agent":t.userAgent.value,...t.queryParameters,...p,...s.queryParameters},E=0,C=(S,P)=>{let I=S.pop();if(I===void 0)throw Gve(T9(a));let R={data:n,headers:c,method:f,url:Mve(I,r.path,h),connectTimeout:P(E,t.timeouts.connect),responseTimeout:P(E,s.timeout)},N=W=>{let te={request:R,response:W,host:I,triesLeft:S.length};return a.push(te),te},U={onSuccess:W=>Ove(W),onRetry(W){let te=N(W);return W.isTimedOut&&E++,Promise.all([t.logger.info("Retryable failure",N9(te)),t.hostsCache.set(I,R9(I,W.isTimedOut?sw.Timeouted:sw.Down))]).then(()=>C(S,P))},onFail(W){throw N(W),Lve(W,T9(a))}};return t.requester.send(R).then(W=>gDt(W,U))};return fDt(t.hostsCache,e).then(S=>C([...S.statelessHosts].reverse(),S.getTimeout))}function dDt(t){let{hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,hosts:p,queryParameters:h,headers:E}=t,C={hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,headers:E,queryParameters:h,hosts:p.map(S=>F9(S)),read(S,P){let I=Q9(P,C.timeouts.read),R=()=>Qve(C,C.hosts.filter(W=>(W.accept&MS.Read)!==0),S,I);if((I.cacheable!==void 0?I.cacheable:S.cacheable)!==!0)return R();let U={request:S,mappedRequestOptions:I,transporter:{queryParameters:C.queryParameters,headers:C.headers}};return C.responsesCache.get(U,()=>C.requestsCache.get(U,()=>C.requestsCache.set(U,R()).then(W=>Promise.all([C.requestsCache.delete(U),W]),W=>Promise.all([C.requestsCache.delete(U),Promise.reject(W)])).then(([W,te])=>te)),{miss:W=>C.responsesCache.set(U,W)})},write(S,P){return Qve(C,C.hosts.filter(I=>(I.accept&MS.Write)!==0),S,Q9(P,C.timeouts.write))}};return C}function mDt(t){let e={value:`Algolia for JavaScript (${t})`,add(r){let s=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return e.value.indexOf(s)===-1&&(e.value=`${e.value}${s}`),e}};return e}function Ove(t){try{return JSON.parse(t.content)}catch(e){throw qve(e.message,t)}}function Lve({content:t,status:e},r){let s=t;try{s=JSON.parse(t).message}catch{}return jve(s,e,r)}function yDt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}function Mve(t,e,r){let s=_ve(r),a=`${t.protocol}://${t.url}/${e.charAt(0)==="/"?e.substr(1):e}`;return s.length&&(a+=`?${s}`),a}function _ve(t){let e=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(t).map(r=>yDt("%s=%s",r,e(t[r])?JSON.stringify(t[r]):t[r])).join("&")}function Uve(t,e){if(t.method===Tve.MethodEnum.Get||t.data===void 0&&e.data===void 0)return;let r=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(r)}function Hve(t,e){let r={...t.headers,...e.headers},s={};return Object.keys(r).forEach(a=>{let n=r[a];s[a.toLowerCase()]=n}),s}function T9(t){return t.map(e=>N9(e))}function N9(t){let e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function jve(t,e,r){return{name:"ApiError",message:t,status:e,transporterStackTrace:r}}function qve(t,e){return{name:"DeserializationError",message:t,response:e}}function Gve(t){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:t}}Vi.CallEnum=MS;Vi.HostStatusEnum=sw;Vi.createApiError=jve;Vi.createDeserializationError=qve;Vi.createMappedRequestOptions=Q9;Vi.createRetryError=Gve;Vi.createStatefulHost=R9;Vi.createStatelessHost=F9;Vi.createTransporter=dDt;Vi.createUserAgent=mDt;Vi.deserializeFailure=Lve;Vi.deserializeSuccess=Ove;Vi.isStatefulHostTimeouted=Nve;Vi.isStatefulHostUp=Fve;Vi.serializeData=Uve;Vi.serializeHeaders=Hve;Vi.serializeQueryParameters=_ve;Vi.serializeUrl=Mve;Vi.stackFrameWithoutCredentials=N9;Vi.stackTraceWithoutCredentials=T9});var _S=L((Ipr,Yve)=>{Yve.exports=Wve()});var Vve=L(z0=>{"use strict";Object.defineProperty(z0,"__esModule",{value:!0});var ow=OS(),EDt=_S(),US=LS(),IDt=t=>{let e=t.region||"us",r=ow.createAuth(ow.AuthMode.WithinHeaders,t.appId,t.apiKey),s=EDt.createTransporter({hosts:[{url:`analytics.${e}.algolia.com`}],...t,headers:{...r.headers(),"content-type":"application/json",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a=t.appId;return ow.addMethods({appId:a,transporter:s},t.methods)},CDt=t=>(e,r)=>t.transporter.write({method:US.MethodEnum.Post,path:"2/abtests",data:e},r),wDt=t=>(e,r)=>t.transporter.write({method:US.MethodEnum.Delete,path:ow.encode("2/abtests/%s",e)},r),BDt=t=>(e,r)=>t.transporter.read({method:US.MethodEnum.Get,path:ow.encode("2/abtests/%s",e)},r),vDt=t=>e=>t.transporter.read({method:US.MethodEnum.Get,path:"2/abtests"},e),SDt=t=>(e,r)=>t.transporter.write({method:US.MethodEnum.Post,path:ow.encode("2/abtests/%s/stop",e)},r);z0.addABTest=CDt;z0.createAnalyticsClient=IDt;z0.deleteABTest=wDt;z0.getABTest=BDt;z0.getABTests=vDt;z0.stopABTest=SDt});var Jve=L((wpr,Kve)=>{Kve.exports=Vve()});var Zve=L(HS=>{"use strict";Object.defineProperty(HS,"__esModule",{value:!0});var O9=OS(),DDt=_S(),zve=LS(),bDt=t=>{let e=t.region||"us",r=O9.createAuth(O9.AuthMode.WithinHeaders,t.appId,t.apiKey),s=DDt.createTransporter({hosts:[{url:`personalization.${e}.algolia.com`}],...t,headers:{...r.headers(),"content-type":"application/json",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}});return O9.addMethods({appId:t.appId,transporter:s},t.methods)},PDt=t=>e=>t.transporter.read({method:zve.MethodEnum.Get,path:"1/strategies/personalization"},e),xDt=t=>(e,r)=>t.transporter.write({method:zve.MethodEnum.Post,path:"1/strategies/personalization",data:e},r);HS.createPersonalizationClient=bDt;HS.getPersonalizationStrategy=PDt;HS.setPersonalizationStrategy=xDt});var $ve=L((vpr,Xve)=>{Xve.exports=Zve()});var pSe=L(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});var Kt=OS(),dl=_S(),br=LS(),kDt=Ie("crypto");function hF(t){let e=r=>t.request(r).then(s=>{if(t.batch!==void 0&&t.batch(s.hits),!t.shouldStop(s))return s.cursor?e({cursor:s.cursor}):e({page:(r.page||0)+1})});return e({})}var QDt=t=>{let e=t.appId,r=Kt.createAuth(t.authMode!==void 0?t.authMode:Kt.AuthMode.WithinHeaders,e,t.apiKey),s=dl.createTransporter({hosts:[{url:`${e}-dsn.algolia.net`,accept:dl.CallEnum.Read},{url:`${e}.algolia.net`,accept:dl.CallEnum.Write}].concat(Kt.shuffle([{url:`${e}-1.algolianet.com`},{url:`${e}-2.algolianet.com`},{url:`${e}-3.algolianet.com`}])),...t,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a={transporter:s,appId:e,addAlgoliaAgent(n,c){s.userAgent.add({segment:n,version:c})},clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})}};return Kt.addMethods(a,t.methods)};function eSe(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function tSe(){return{name:"ObjectNotFoundError",message:"Object not found."}}function rSe(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var TDt=t=>(e,r)=>{let{queryParameters:s,...a}=r||{},n={acl:e,...s!==void 0?{queryParameters:s}:{}},c=(f,p)=>Kt.createRetryablePromise(h=>jS(t)(f.key,p).catch(E=>{if(E.status!==404)throw E;return h()}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:"1/keys",data:n},a),c)},RDt=t=>(e,r,s)=>{let a=dl.createMappedRequestOptions(s);return a.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:br.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:r}},a)},FDt=t=>(e,r,s)=>t.transporter.write({method:br.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:e,cluster:r}},s),NDt=t=>(e,r)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},r),(s,a)=>aw(t)(s.taskID,a)),gF=t=>(e,r,s)=>{let a=(n,c)=>qS(t)(e,{methods:{waitTask:ds}}).waitTask(n.taskID,c);return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/operation",e),data:{operation:"copy",destination:r}},s),a)},ODt=t=>(e,r,s)=>gF(t)(e,r,{...s,scope:[mF.Rules]}),LDt=t=>(e,r,s)=>gF(t)(e,r,{...s,scope:[mF.Settings]}),MDt=t=>(e,r,s)=>gF(t)(e,r,{...s,scope:[mF.Synonyms]}),_Dt=t=>(e,r)=>e.method===br.MethodEnum.Get?t.transporter.read(e,r):t.transporter.write(e,r),UDt=t=>(e,r)=>{let s=(a,n)=>Kt.createRetryablePromise(c=>jS(t)(e,n).then(c).catch(f=>{if(f.status!==404)throw f}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode("1/keys/%s",e)},r),s)},HDt=t=>(e,r,s)=>{let a=r.map(n=>({action:"deleteEntry",body:{objectID:n}}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},jDt=()=>(t,e)=>{let r=dl.serializeQueryParameters(e),s=kDt.createHmac("sha256",t).update(r).digest("hex");return Buffer.from(s+r).toString("base64")},jS=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/keys/%s",e)},r),nSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/task/%s",e.toString())},r),qDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"/1/dictionaries/*/settings"},e),GDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/logs"},e),WDt=()=>t=>{let e=Buffer.from(t,"base64").toString("ascii"),r=/validUntil=(\d+)/,s=e.match(r);if(s===null)throw rSe();return parseInt(s[1],10)-Math.round(new Date().getTime()/1e3)},YDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/clusters/mapping/top"},e),VDt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/clusters/mapping/%s",e)},r),KDt=t=>e=>{let{retrieveMappings:r,...s}=e||{};return r===!0&&(s.getClusters=!0),t.transporter.read({method:br.MethodEnum.Get,path:"1/clusters/mapping/pending"},s)},qS=t=>(e,r={})=>{let s={transporter:t.transporter,appId:t.appId,indexName:e};return Kt.addMethods(s,r.methods)},JDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/keys"},e),zDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/clusters"},e),ZDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/indexes"},e),XDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/clusters/mapping"},e),$Dt=t=>(e,r,s)=>{let a=(n,c)=>qS(t)(e,{methods:{waitTask:ds}}).waitTask(n.taskID,c);return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/operation",e),data:{operation:"move",destination:r}},s),a)},ebt=t=>(e,r)=>{let s=(a,n)=>Promise.all(Object.keys(a.taskID).map(c=>qS(t)(c,{methods:{waitTask:ds}}).waitTask(a.taskID[c],n)));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:e}},r),s)},tbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:e}},r),rbt=t=>(e,r)=>{let s=e.map(a=>({...a,params:dl.serializeQueryParameters(a.params||{})}));return t.transporter.read({method:br.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:s},cacheable:!0},r)},nbt=t=>(e,r)=>Promise.all(e.map(s=>{let{facetName:a,facetQuery:n,...c}=s.params;return qS(t)(s.indexName,{methods:{searchForFacetValues:uSe}}).searchForFacetValues(a,n,{...r,...c})})),ibt=t=>(e,r)=>{let s=dl.createMappedRequestOptions(r);return s.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:br.MethodEnum.Delete,path:"1/clusters/mapping"},s)},sbt=t=>(e,r,s)=>{let a=r.map(n=>({action:"addEntry",body:n}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!0,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},obt=t=>(e,r)=>{let s=(a,n)=>Kt.createRetryablePromise(c=>jS(t)(e,n).catch(f=>{if(f.status!==404)throw f;return c()}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/keys/%s/restore",e)},r),s)},abt=t=>(e,r,s)=>{let a=r.map(n=>({action:"addEntry",body:n}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},lbt=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/search",e),data:{query:r},cacheable:!0},s),cbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:e}},r),ubt=t=>(e,r)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:"/1/dictionaries/*/settings",data:e},r),(s,a)=>aw(t)(s.taskID,a)),fbt=t=>(e,r)=>{let s=Object.assign({},r),{queryParameters:a,...n}=r||{},c=a?{queryParameters:a}:{},f=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],p=E=>Object.keys(s).filter(C=>f.indexOf(C)!==-1).every(C=>{if(Array.isArray(E[C])&&Array.isArray(s[C])){let S=E[C];return S.length===s[C].length&&S.every((P,I)=>P===s[C][I])}else return E[C]===s[C]}),h=(E,C)=>Kt.createRetryablePromise(S=>jS(t)(e,C).then(P=>p(P)?Promise.resolve():S()));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Kt.encode("1/keys/%s",e),data:c},n),h)},aw=t=>(e,r)=>Kt.createRetryablePromise(s=>nSe(t)(e,r).then(a=>a.status!=="published"?s():void 0)),iSe=t=>(e,r)=>{let s=(a,n)=>ds(t)(a.taskID,n);return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/batch",t.indexName),data:{requests:e}},r),s)},Abt=t=>e=>hF({shouldStop:r=>r.cursor===void 0,...e,request:r=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/browse",t.indexName),data:r},e)}),pbt=t=>e=>{let r={hitsPerPage:1e3,...e};return hF({shouldStop:s=>s.hits.length({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},hbt=t=>e=>{let r={hitsPerPage:1e3,...e};return hF({shouldStop:s=>s.hits.length({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},dF=t=>(e,r,s)=>{let{batchSize:a,...n}=s||{},c={taskIDs:[],objectIDs:[]},f=(p=0)=>{let h=[],E;for(E=p;E({action:r,body:C})),n).then(C=>(c.objectIDs=c.objectIDs.concat(C.objectIDs),c.taskIDs.push(C.taskID),E++,f(E)))};return Kt.createWaitablePromise(f(),(p,h)=>Promise.all(p.taskIDs.map(E=>ds(t)(E,h))))},gbt=t=>e=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/clear",t.indexName)},e),(r,s)=>ds(t)(r.taskID,s)),dbt=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=dl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/rules/clear",t.indexName)},a),(n,c)=>ds(t)(n.taskID,c))},mbt=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=dl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/synonyms/clear",t.indexName)},a),(n,c)=>ds(t)(n.taskID,c))},ybt=t=>(e,r)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/deleteByQuery",t.indexName),data:e},r),(s,a)=>ds(t)(s.taskID,a)),Ebt=t=>e=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode("1/indexes/%s",t.indexName)},e),(r,s)=>ds(t)(r.taskID,s)),Ibt=t=>(e,r)=>Kt.createWaitablePromise(sSe(t)([e],r).then(s=>({taskID:s.taskIDs[0]})),(s,a)=>ds(t)(s.taskID,a)),sSe=t=>(e,r)=>{let s=e.map(a=>({objectID:a}));return dF(t)(s,xm.DeleteObject,r)},Cbt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=dl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode("1/indexes/%s/rules/%s",t.indexName,e)},n),(c,f)=>ds(t)(c.taskID,f))},wbt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=dl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode("1/indexes/%s/synonyms/%s",t.indexName,e)},n),(c,f)=>ds(t)(c.taskID,f))},Bbt=t=>e=>oSe(t)(e).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),vbt=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/answers/%s/prediction",t.indexName),data:{query:e,queryLanguages:r},cacheable:!0},s),Sbt=t=>(e,r)=>{let{query:s,paginate:a,...n}=r||{},c=0,f=()=>cSe(t)(s||"",{...n,page:c}).then(p=>{for(let[h,E]of Object.entries(p.hits))if(e(E))return{object:E,position:parseInt(h,10),page:c};if(c++,a===!1||c>=p.nbPages)throw tSe();return f()});return f()},Dbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/%s",t.indexName,e)},r),bbt=()=>(t,e)=>{for(let[r,s]of Object.entries(t.hits))if(s.objectID===e)return parseInt(r,10);return-1},Pbt=t=>(e,r)=>{let{attributesToRetrieve:s,...a}=r||{},n=e.map(c=>({indexName:t.indexName,objectID:c,...s?{attributesToRetrieve:s}:{}}));return t.transporter.read({method:br.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:n}},a)},xbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/rules/%s",t.indexName,e)},r),oSe=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/settings",t.indexName),data:{getVersion:2}},e),kbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/synonyms/%s",t.indexName,e)},r),aSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/task/%s",t.indexName,e.toString())},r),Qbt=t=>(e,r)=>Kt.createWaitablePromise(lSe(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>ds(t)(s.taskID,a)),lSe=t=>(e,r)=>{let{createIfNotExists:s,...a}=r||{},n=s?xm.PartialUpdateObject:xm.PartialUpdateObjectNoCreate;return dF(t)(e,n,a)},Tbt=t=>(e,r)=>{let{safe:s,autoGenerateObjectIDIfNotExist:a,batchSize:n,...c}=r||{},f=(I,R,N,U)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/operation",I),data:{operation:N,destination:R}},U),(W,te)=>ds(t)(W.taskID,te)),p=Math.random().toString(36).substring(7),h=`${t.indexName}_tmp_${p}`,E=L9({appId:t.appId,transporter:t.transporter,indexName:h}),C=[],S=f(t.indexName,h,"copy",{...c,scope:["settings","synonyms","rules"]});C.push(S);let P=(s?S.wait(c):S).then(()=>{let I=E(e,{...c,autoGenerateObjectIDIfNotExist:a,batchSize:n});return C.push(I),s?I.wait(c):I}).then(()=>{let I=f(h,t.indexName,"move",c);return C.push(I),s?I.wait(c):I}).then(()=>Promise.all(C)).then(([I,R,N])=>({objectIDs:R.objectIDs,taskIDs:[I.taskID,...R.taskIDs,N.taskID]}));return Kt.createWaitablePromise(P,(I,R)=>Promise.all(C.map(N=>N.wait(R))))},Rbt=t=>(e,r)=>M9(t)(e,{...r,clearExistingRules:!0}),Fbt=t=>(e,r)=>_9(t)(e,{...r,clearExistingSynonyms:!0}),Nbt=t=>(e,r)=>Kt.createWaitablePromise(L9(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>ds(t)(s.taskID,a)),L9=t=>(e,r)=>{let{autoGenerateObjectIDIfNotExist:s,...a}=r||{},n=s?xm.AddObject:xm.UpdateObject;if(n===xm.UpdateObject){for(let c of e)if(c.objectID===void 0)return Kt.createWaitablePromise(Promise.reject(eSe()))}return dF(t)(e,n,a)},Obt=t=>(e,r)=>M9(t)([e],r),M9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingRules:a,...n}=r||{},c=dl.createMappedRequestOptions(n);return s&&(c.queryParameters.forwardToReplicas=1),a&&(c.queryParameters.clearExistingRules=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/rules/batch",t.indexName),data:e},c),(f,p)=>ds(t)(f.taskID,p))},Lbt=t=>(e,r)=>_9(t)([e],r),_9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingSynonyms:a,replaceExistingSynonyms:n,...c}=r||{},f=dl.createMappedRequestOptions(c);return s&&(f.queryParameters.forwardToReplicas=1),(n||a)&&(f.queryParameters.replaceExistingSynonyms=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/synonyms/batch",t.indexName),data:e},f),(p,h)=>ds(t)(p.taskID,h))},cSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/query",t.indexName),data:{query:e},cacheable:!0},r),uSe=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/facets/%s/query",t.indexName,e),data:{facetQuery:r},cacheable:!0},s),fSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/rules/search",t.indexName),data:{query:e}},r),ASe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/synonyms/search",t.indexName),data:{query:e}},r),Mbt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=dl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Kt.encode("1/indexes/%s/settings",t.indexName),data:e},n),(c,f)=>ds(t)(c.taskID,f))},ds=t=>(e,r)=>Kt.createRetryablePromise(s=>aSe(t)(e,r).then(a=>a.status!=="published"?s():void 0)),_bt={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",Inference:"inference",ListIndexes:"listIndexes",Logs:"logs",Personalization:"personalization",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},xm={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},mF={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},Ubt={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},Hbt={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};Ft.ApiKeyACLEnum=_bt;Ft.BatchActionEnum=xm;Ft.ScopeEnum=mF;Ft.StrategyEnum=Ubt;Ft.SynonymEnum=Hbt;Ft.addApiKey=TDt;Ft.assignUserID=RDt;Ft.assignUserIDs=FDt;Ft.batch=iSe;Ft.browseObjects=Abt;Ft.browseRules=pbt;Ft.browseSynonyms=hbt;Ft.chunkedBatch=dF;Ft.clearDictionaryEntries=NDt;Ft.clearObjects=gbt;Ft.clearRules=dbt;Ft.clearSynonyms=mbt;Ft.copyIndex=gF;Ft.copyRules=ODt;Ft.copySettings=LDt;Ft.copySynonyms=MDt;Ft.createBrowsablePromise=hF;Ft.createMissingObjectIDError=eSe;Ft.createObjectNotFoundError=tSe;Ft.createSearchClient=QDt;Ft.createValidUntilNotFoundError=rSe;Ft.customRequest=_Dt;Ft.deleteApiKey=UDt;Ft.deleteBy=ybt;Ft.deleteDictionaryEntries=HDt;Ft.deleteIndex=Ebt;Ft.deleteObject=Ibt;Ft.deleteObjects=sSe;Ft.deleteRule=Cbt;Ft.deleteSynonym=wbt;Ft.exists=Bbt;Ft.findAnswers=vbt;Ft.findObject=Sbt;Ft.generateSecuredApiKey=jDt;Ft.getApiKey=jS;Ft.getAppTask=nSe;Ft.getDictionarySettings=qDt;Ft.getLogs=GDt;Ft.getObject=Dbt;Ft.getObjectPosition=bbt;Ft.getObjects=Pbt;Ft.getRule=xbt;Ft.getSecuredApiKeyRemainingValidity=WDt;Ft.getSettings=oSe;Ft.getSynonym=kbt;Ft.getTask=aSe;Ft.getTopUserIDs=YDt;Ft.getUserID=VDt;Ft.hasPendingMappings=KDt;Ft.initIndex=qS;Ft.listApiKeys=JDt;Ft.listClusters=zDt;Ft.listIndices=ZDt;Ft.listUserIDs=XDt;Ft.moveIndex=$Dt;Ft.multipleBatch=ebt;Ft.multipleGetObjects=tbt;Ft.multipleQueries=rbt;Ft.multipleSearchForFacetValues=nbt;Ft.partialUpdateObject=Qbt;Ft.partialUpdateObjects=lSe;Ft.removeUserID=ibt;Ft.replaceAllObjects=Tbt;Ft.replaceAllRules=Rbt;Ft.replaceAllSynonyms=Fbt;Ft.replaceDictionaryEntries=sbt;Ft.restoreApiKey=obt;Ft.saveDictionaryEntries=abt;Ft.saveObject=Nbt;Ft.saveObjects=L9;Ft.saveRule=Obt;Ft.saveRules=M9;Ft.saveSynonym=Lbt;Ft.saveSynonyms=_9;Ft.search=cSe;Ft.searchDictionaryEntries=lbt;Ft.searchForFacetValues=uSe;Ft.searchRules=fSe;Ft.searchSynonyms=ASe;Ft.searchUserIDs=cbt;Ft.setDictionarySettings=ubt;Ft.setSettings=Mbt;Ft.updateApiKey=fbt;Ft.waitAppTask=aw;Ft.waitTask=ds});var gSe=L((Dpr,hSe)=>{hSe.exports=pSe()});var dSe=L(yF=>{"use strict";Object.defineProperty(yF,"__esModule",{value:!0});function jbt(){return{debug(t,e){return Promise.resolve()},info(t,e){return Promise.resolve()},error(t,e){return Promise.resolve()}}}var qbt={Debug:1,Info:2,Error:3};yF.LogLevelEnum=qbt;yF.createNullLogger=jbt});var ySe=L((Ppr,mSe)=>{mSe.exports=dSe()});var wSe=L(U9=>{"use strict";Object.defineProperty(U9,"__esModule",{value:!0});var ESe=Ie("http"),ISe=Ie("https"),Gbt=Ie("url"),CSe={keepAlive:!0},Wbt=new ESe.Agent(CSe),Ybt=new ISe.Agent(CSe);function Vbt({agent:t,httpAgent:e,httpsAgent:r,requesterOptions:s={}}={}){let a=e||t||Wbt,n=r||t||Ybt;return{send(c){return new Promise(f=>{let p=Gbt.parse(c.url),h=p.query===null?p.pathname:`${p.pathname}?${p.query}`,E={...s,agent:p.protocol==="https:"?n:a,hostname:p.hostname,path:h,method:c.method,headers:{...s&&s.headers?s.headers:{},...c.headers},...p.port!==void 0?{port:p.port||""}:{}},C=(p.protocol==="https:"?ISe:ESe).request(E,R=>{let N=[];R.on("data",U=>{N=N.concat(U)}),R.on("end",()=>{clearTimeout(P),clearTimeout(I),f({status:R.statusCode||0,content:Buffer.concat(N).toString(),isTimedOut:!1})})}),S=(R,N)=>setTimeout(()=>{C.abort(),f({status:0,content:N,isTimedOut:!0})},R*1e3),P=S(c.connectTimeout,"Connection timeout"),I;C.on("error",R=>{clearTimeout(P),clearTimeout(I),f({status:0,content:R.message,isTimedOut:!1})}),C.once("response",()=>{clearTimeout(P),I=S(c.responseTimeout,"Socket timeout")}),c.data!==void 0&&C.write(c.data),C.end()})},destroy(){return a.destroy(),n.destroy(),Promise.resolve()}}}U9.createNodeHttpRequester=Vbt});var vSe=L((kpr,BSe)=>{BSe.exports=wSe()});var PSe=L((Qpr,bSe)=>{"use strict";var SSe=wve(),Kbt=Sve(),lw=Jve(),j9=OS(),H9=$ve(),jt=gSe(),Jbt=ySe(),zbt=vSe(),Zbt=_S();function DSe(t,e,r){let s={appId:t,apiKey:e,timeouts:{connect:2,read:5,write:30},requester:zbt.createNodeHttpRequester(),logger:Jbt.createNullLogger(),responsesCache:SSe.createNullCache(),requestsCache:SSe.createNullCache(),hostsCache:Kbt.createInMemoryCache(),userAgent:Zbt.createUserAgent(j9.version).add({segment:"Node.js",version:process.versions.node})},a={...s,...r},n=()=>c=>H9.createPersonalizationClient({...s,...c,methods:{getPersonalizationStrategy:H9.getPersonalizationStrategy,setPersonalizationStrategy:H9.setPersonalizationStrategy}});return jt.createSearchClient({...a,methods:{search:jt.multipleQueries,searchForFacetValues:jt.multipleSearchForFacetValues,multipleBatch:jt.multipleBatch,multipleGetObjects:jt.multipleGetObjects,multipleQueries:jt.multipleQueries,copyIndex:jt.copyIndex,copySettings:jt.copySettings,copyRules:jt.copyRules,copySynonyms:jt.copySynonyms,moveIndex:jt.moveIndex,listIndices:jt.listIndices,getLogs:jt.getLogs,listClusters:jt.listClusters,multipleSearchForFacetValues:jt.multipleSearchForFacetValues,getApiKey:jt.getApiKey,addApiKey:jt.addApiKey,listApiKeys:jt.listApiKeys,updateApiKey:jt.updateApiKey,deleteApiKey:jt.deleteApiKey,restoreApiKey:jt.restoreApiKey,assignUserID:jt.assignUserID,assignUserIDs:jt.assignUserIDs,getUserID:jt.getUserID,searchUserIDs:jt.searchUserIDs,listUserIDs:jt.listUserIDs,getTopUserIDs:jt.getTopUserIDs,removeUserID:jt.removeUserID,hasPendingMappings:jt.hasPendingMappings,generateSecuredApiKey:jt.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:jt.getSecuredApiKeyRemainingValidity,destroy:j9.destroy,clearDictionaryEntries:jt.clearDictionaryEntries,deleteDictionaryEntries:jt.deleteDictionaryEntries,getDictionarySettings:jt.getDictionarySettings,getAppTask:jt.getAppTask,replaceDictionaryEntries:jt.replaceDictionaryEntries,saveDictionaryEntries:jt.saveDictionaryEntries,searchDictionaryEntries:jt.searchDictionaryEntries,setDictionarySettings:jt.setDictionarySettings,waitAppTask:jt.waitAppTask,customRequest:jt.customRequest,initIndex:c=>f=>jt.initIndex(c)(f,{methods:{batch:jt.batch,delete:jt.deleteIndex,findAnswers:jt.findAnswers,getObject:jt.getObject,getObjects:jt.getObjects,saveObject:jt.saveObject,saveObjects:jt.saveObjects,search:jt.search,searchForFacetValues:jt.searchForFacetValues,waitTask:jt.waitTask,setSettings:jt.setSettings,getSettings:jt.getSettings,partialUpdateObject:jt.partialUpdateObject,partialUpdateObjects:jt.partialUpdateObjects,deleteObject:jt.deleteObject,deleteObjects:jt.deleteObjects,deleteBy:jt.deleteBy,clearObjects:jt.clearObjects,browseObjects:jt.browseObjects,getObjectPosition:jt.getObjectPosition,findObject:jt.findObject,exists:jt.exists,saveSynonym:jt.saveSynonym,saveSynonyms:jt.saveSynonyms,getSynonym:jt.getSynonym,searchSynonyms:jt.searchSynonyms,browseSynonyms:jt.browseSynonyms,deleteSynonym:jt.deleteSynonym,clearSynonyms:jt.clearSynonyms,replaceAllObjects:jt.replaceAllObjects,replaceAllSynonyms:jt.replaceAllSynonyms,searchRules:jt.searchRules,getRule:jt.getRule,deleteRule:jt.deleteRule,saveRule:jt.saveRule,saveRules:jt.saveRules,replaceAllRules:jt.replaceAllRules,browseRules:jt.browseRules,clearRules:jt.clearRules}}),initAnalytics:()=>c=>lw.createAnalyticsClient({...s,...c,methods:{addABTest:lw.addABTest,getABTest:lw.getABTest,getABTests:lw.getABTests,stopABTest:lw.stopABTest,deleteABTest:lw.deleteABTest}}),initPersonalization:n,initRecommendation:()=>c=>(a.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),n()(c))}})}DSe.version=j9.version;bSe.exports=DSe});var G9=L((Tpr,q9)=>{var xSe=PSe();q9.exports=xSe;q9.exports.default=xSe});var V9=L((Fpr,TSe)=>{"use strict";var QSe=Object.getOwnPropertySymbols,$bt=Object.prototype.hasOwnProperty,ePt=Object.prototype.propertyIsEnumerable;function tPt(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function rPt(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var s=Object.getOwnPropertyNames(e).map(function(n){return e[n]});if(s.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(n){a[n]=n}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}TSe.exports=rPt()?Object.assign:function(t,e){for(var r,s=tPt(t),a,n=1;n{"use strict";var J9=V9(),cw=60103,NSe=60106;Dn.Fragment=60107;Dn.StrictMode=60108;Dn.Profiler=60114;var OSe=60109,LSe=60110,MSe=60112;Dn.Suspense=60113;var _Se=60115,USe=60116;typeof Symbol=="function"&&Symbol.for&&(Wc=Symbol.for,cw=Wc("react.element"),NSe=Wc("react.portal"),Dn.Fragment=Wc("react.fragment"),Dn.StrictMode=Wc("react.strict_mode"),Dn.Profiler=Wc("react.profiler"),OSe=Wc("react.provider"),LSe=Wc("react.context"),MSe=Wc("react.forward_ref"),Dn.Suspense=Wc("react.suspense"),_Se=Wc("react.memo"),USe=Wc("react.lazy"));var Wc,RSe=typeof Symbol=="function"&&Symbol.iterator;function nPt(t){return t===null||typeof t!="object"?null:(t=RSe&&t[RSe]||t["@@iterator"],typeof t=="function"?t:null)}function GS(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r{"use strict";JSe.exports=KSe()});var tW=L((Lpr,eW)=>{"use strict";var Cn=eW.exports;eW.exports.default=Cn;var Zn="\x1B[",WS="\x1B]",fw="\x07",CF=";",zSe=process.env.TERM_PROGRAM==="Apple_Terminal";Cn.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?Zn+(t+1)+"G":Zn+(e+1)+";"+(t+1)+"H"};Cn.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=Zn+-t+"D":t>0&&(r+=Zn+t+"C"),e<0?r+=Zn+-e+"A":e>0&&(r+=Zn+e+"B"),r};Cn.cursorUp=(t=1)=>Zn+t+"A";Cn.cursorDown=(t=1)=>Zn+t+"B";Cn.cursorForward=(t=1)=>Zn+t+"C";Cn.cursorBackward=(t=1)=>Zn+t+"D";Cn.cursorLeft=Zn+"G";Cn.cursorSavePosition=zSe?"\x1B7":Zn+"s";Cn.cursorRestorePosition=zSe?"\x1B8":Zn+"u";Cn.cursorGetPosition=Zn+"6n";Cn.cursorNextLine=Zn+"E";Cn.cursorPrevLine=Zn+"F";Cn.cursorHide=Zn+"?25l";Cn.cursorShow=Zn+"?25h";Cn.eraseLines=t=>{let e="";for(let r=0;r[WS,"8",CF,CF,e,fw,t,WS,"8",CF,CF,fw].join("");Cn.image=(t,e={})=>{let r=`${WS}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+fw};Cn.iTerm={setCwd:(t=process.cwd())=>`${WS}50;CurrentDir=${t}${fw}`,annotation:(t,e={})=>{let r=`${WS}1337;`,s=typeof e.x<"u",a=typeof e.y<"u";if((s||a)&&!(s&&a&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(s?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+fw}}});var XSe=L((Mpr,rW)=>{"use strict";var ZSe=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};rW.exports=ZSe;rW.exports.default=ZSe});var eDe=L((_pr,BF)=>{"use strict";var lPt=XSe(),wF=new WeakMap,$Se=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,s=0,a=t.displayName||t.name||"",n=function(...c){if(wF.set(n,++s),s===1)r=t.apply(this,c),t=null;else if(e.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return r};return lPt(n,t),wF.set(n,s),n};BF.exports=$Se;BF.exports.default=$Se;BF.exports.callCount=t=>{if(!wF.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return wF.get(t)}});var tDe=L((Upr,vF)=>{vF.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&vF.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&vF.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var sW=L((Hpr,hw)=>{var Ti=global.process,km=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};km(Ti)?(rDe=Ie("assert"),Aw=tDe(),nDe=/^win/i.test(Ti.platform),YS=Ie("events"),typeof YS!="function"&&(YS=YS.EventEmitter),Ti.__signal_exit_emitter__?zs=Ti.__signal_exit_emitter__:(zs=Ti.__signal_exit_emitter__=new YS,zs.count=0,zs.emitted={}),zs.infinite||(zs.setMaxListeners(1/0),zs.infinite=!0),hw.exports=function(t,e){if(!km(global.process))return function(){};rDe.equal(typeof t,"function","a callback must be provided for exit handler"),pw===!1&&nW();var r="exit";e&&e.alwaysLast&&(r="afterexit");var s=function(){zs.removeListener(r,t),zs.listeners("exit").length===0&&zs.listeners("afterexit").length===0&&SF()};return zs.on(r,t),s},SF=function(){!pw||!km(global.process)||(pw=!1,Aw.forEach(function(e){try{Ti.removeListener(e,DF[e])}catch{}}),Ti.emit=bF,Ti.reallyExit=iW,zs.count-=1)},hw.exports.unload=SF,Qm=function(e,r,s){zs.emitted[e]||(zs.emitted[e]=!0,zs.emit(e,r,s))},DF={},Aw.forEach(function(t){DF[t]=function(){if(km(global.process)){var r=Ti.listeners(t);r.length===zs.count&&(SF(),Qm("exit",null,t),Qm("afterexit",null,t),nDe&&t==="SIGHUP"&&(t="SIGINT"),Ti.kill(Ti.pid,t))}}}),hw.exports.signals=function(){return Aw},pw=!1,nW=function(){pw||!km(global.process)||(pw=!0,zs.count+=1,Aw=Aw.filter(function(e){try{return Ti.on(e,DF[e]),!0}catch{return!1}}),Ti.emit=sDe,Ti.reallyExit=iDe)},hw.exports.load=nW,iW=Ti.reallyExit,iDe=function(e){km(global.process)&&(Ti.exitCode=e||0,Qm("exit",Ti.exitCode,null),Qm("afterexit",Ti.exitCode,null),iW.call(Ti,Ti.exitCode))},bF=Ti.emit,sDe=function(e,r){if(e==="exit"&&km(global.process)){r!==void 0&&(Ti.exitCode=r);var s=bF.apply(this,arguments);return Qm("exit",Ti.exitCode,null),Qm("afterexit",Ti.exitCode,null),s}else return bF.apply(this,arguments)}):hw.exports=function(){return function(){}};var rDe,Aw,nDe,YS,zs,SF,Qm,DF,pw,nW,iW,iDe,bF,sDe});var aDe=L((jpr,oDe)=>{"use strict";var cPt=eDe(),uPt=sW();oDe.exports=cPt(()=>{uPt(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var oW=L(gw=>{"use strict";var fPt=aDe(),PF=!1;gw.show=(t=process.stderr)=>{t.isTTY&&(PF=!1,t.write("\x1B[?25h"))};gw.hide=(t=process.stderr)=>{t.isTTY&&(fPt(),PF=!0,t.write("\x1B[?25l"))};gw.toggle=(t,e)=>{t!==void 0&&(PF=t),PF?gw.show(e):gw.hide(e)}});var fDe=L(VS=>{"use strict";var uDe=VS&&VS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(VS,"__esModule",{value:!0});var lDe=uDe(tW()),cDe=uDe(oW()),APt=(t,{showCursor:e=!1}={})=>{let r=0,s="",a=!1,n=c=>{!e&&!a&&(cDe.default.hide(),a=!0);let f=c+` -`;f!==s&&(s=f,t.write(lDe.default.eraseLines(r)+f),r=f.split(` -`).length)};return n.clear=()=>{t.write(lDe.default.eraseLines(r)),s="",r=0},n.done=()=>{s="",r=0,e||(cDe.default.show(),a=!1)},n};VS.default={create:APt}});var ADe=L((Wpr,pPt)=>{pPt.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var gDe=L(rc=>{"use strict";var hDe=ADe(),AA=process.env;Object.defineProperty(rc,"_vendors",{value:hDe.map(function(t){return t.constant})});rc.name=null;rc.isPR=null;hDe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(s){return pDe(s)});if(rc[t.constant]=r,r)switch(rc.name=t.name,typeof t.pr){case"string":rc.isPR=!!AA[t.pr];break;case"object":"env"in t.pr?rc.isPR=t.pr.env in AA&&AA[t.pr.env]!==t.pr.ne:"any"in t.pr?rc.isPR=t.pr.any.some(function(s){return!!AA[s]}):rc.isPR=pDe(t.pr);break;default:rc.isPR=null}});rc.isCI=!!(AA.CI||AA.CONTINUOUS_INTEGRATION||AA.BUILD_NUMBER||AA.RUN_ID||rc.name);function pDe(t){return typeof t=="string"?!!AA[t]:Object.keys(t).every(function(e){return AA[e]===t[e]})}});var mDe=L((Vpr,dDe)=>{"use strict";dDe.exports=gDe().isCI});var EDe=L((Kpr,yDe)=>{"use strict";var hPt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};yDe.exports=(t,{include:e,exclude:r}={})=>{let s=a=>{let n=c=>typeof c=="string"?a===c:c.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of hPt(t.constructor.prototype)){if(n==="constructor"||!s(n))continue;let c=Reflect.getOwnPropertyDescriptor(a,n);c&&typeof c.value=="function"&&(t[n]=t[n].bind(t))}return t}});var SDe=L(Vn=>{"use strict";var mw,zS,TF,pW;typeof performance=="object"&&typeof performance.now=="function"?(IDe=performance,Vn.unstable_now=function(){return IDe.now()}):(aW=Date,CDe=aW.now(),Vn.unstable_now=function(){return aW.now()-CDe});var IDe,aW,CDe;typeof window>"u"||typeof MessageChannel!="function"?(dw=null,lW=null,cW=function(){if(dw!==null)try{var t=Vn.unstable_now();dw(!0,t),dw=null}catch(e){throw setTimeout(cW,0),e}},mw=function(t){dw!==null?setTimeout(mw,0,t):(dw=t,setTimeout(cW,0))},zS=function(t,e){lW=setTimeout(t,e)},TF=function(){clearTimeout(lW)},Vn.unstable_shouldYield=function(){return!1},pW=Vn.unstable_forceFrameRate=function(){}):(wDe=window.setTimeout,BDe=window.clearTimeout,typeof console<"u"&&(vDe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof vDe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),KS=!1,JS=null,xF=-1,uW=5,fW=0,Vn.unstable_shouldYield=function(){return Vn.unstable_now()>=fW},pW=function(){},Vn.unstable_forceFrameRate=function(t){0>t||125>>1,a=t[s];if(a!==void 0&&0QF(c,r))p!==void 0&&0>QF(p,c)?(t[s]=p,t[f]=r,s=f):(t[s]=c,t[n]=r,s=n);else if(p!==void 0&&0>QF(p,r))t[s]=p,t[f]=r,s=f;else break e}}return e}return null}function QF(t,e){var r=t.sortIndex-e.sortIndex;return r!==0?r:t.id-e.id}var pA=[],Z0=[],gPt=1,Yc=null,ea=3,FF=!1,Tm=!1,ZS=!1;function gW(t){for(var e=tf(Z0);e!==null;){if(e.callback===null)RF(Z0);else if(e.startTime<=t)RF(Z0),e.sortIndex=e.expirationTime,hW(pA,e);else break;e=tf(Z0)}}function dW(t){if(ZS=!1,gW(t),!Tm)if(tf(pA)!==null)Tm=!0,mw(mW);else{var e=tf(Z0);e!==null&&zS(dW,e.startTime-t)}}function mW(t,e){Tm=!1,ZS&&(ZS=!1,TF()),FF=!0;var r=ea;try{for(gW(e),Yc=tf(pA);Yc!==null&&(!(Yc.expirationTime>e)||t&&!Vn.unstable_shouldYield());){var s=Yc.callback;if(typeof s=="function"){Yc.callback=null,ea=Yc.priorityLevel;var a=s(Yc.expirationTime<=e);e=Vn.unstable_now(),typeof a=="function"?Yc.callback=a:Yc===tf(pA)&&RF(pA),gW(e)}else RF(pA);Yc=tf(pA)}if(Yc!==null)var n=!0;else{var c=tf(Z0);c!==null&&zS(dW,c.startTime-e),n=!1}return n}finally{Yc=null,ea=r,FF=!1}}var dPt=pW;Vn.unstable_IdlePriority=5;Vn.unstable_ImmediatePriority=1;Vn.unstable_LowPriority=4;Vn.unstable_NormalPriority=3;Vn.unstable_Profiling=null;Vn.unstable_UserBlockingPriority=2;Vn.unstable_cancelCallback=function(t){t.callback=null};Vn.unstable_continueExecution=function(){Tm||FF||(Tm=!0,mw(mW))};Vn.unstable_getCurrentPriorityLevel=function(){return ea};Vn.unstable_getFirstCallbackNode=function(){return tf(pA)};Vn.unstable_next=function(t){switch(ea){case 1:case 2:case 3:var e=3;break;default:e=ea}var r=ea;ea=e;try{return t()}finally{ea=r}};Vn.unstable_pauseExecution=function(){};Vn.unstable_requestPaint=dPt;Vn.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=ea;ea=t;try{return e()}finally{ea=r}};Vn.unstable_scheduleCallback=function(t,e,r){var s=Vn.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0s?(t.sortIndex=r,hW(Z0,t),tf(pA)===null&&t===tf(Z0)&&(ZS?TF():ZS=!0,zS(dW,r-s))):(t.sortIndex=a,hW(pA,t),Tm||FF||(Tm=!0,mw(mW))),t};Vn.unstable_wrapCallback=function(t){var e=ea;return function(){var r=ea;ea=e;try{return t.apply(this,arguments)}finally{ea=r}}}});var yW=L((zpr,DDe)=>{"use strict";DDe.exports=SDe()});var bDe=L((Zpr,XS)=>{XS.exports=function(e){var r={},s=V9(),a=hn(),n=yW();function c(v){for(var D="https://reactjs.org/docs/error-decoder.html?invariant="+v,Q=1;QUe||V[Se]!==ne[Ue])return` -`+V[Se].replace(" at new "," at ");while(1<=Se&&0<=Ue);break}}}finally{ve=!1,Error.prepareStackTrace=Q}return(v=v?v.displayName||v.name:"")?ac(v):""}var lc=[],Li=-1;function so(v){return{current:v}}function Rt(v){0>Li||(v.current=lc[Li],lc[Li]=null,Li--)}function xn(v,D){Li++,lc[Li]=v.current,v.current=D}var ca={},qi=so(ca),Mi=so(!1),Oa=ca;function dn(v,D){var Q=v.type.contextTypes;if(!Q)return ca;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===D)return H.__reactInternalMemoizedMaskedChildContext;var V={},ne;for(ne in Q)V[ne]=D[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=D,v.__reactInternalMemoizedMaskedChildContext=V),V}function Jn(v){return v=v.childContextTypes,v!=null}function hu(){Rt(Mi),Rt(qi)}function Ih(v,D,Q){if(qi.current!==ca)throw Error(c(168));xn(qi,D),xn(Mi,Q)}function La(v,D,Q){var H=v.stateNode;if(v=D.childContextTypes,typeof H.getChildContext!="function")return Q;H=H.getChildContext();for(var V in H)if(!(V in v))throw Error(c(108,g(D)||"Unknown",V));return s({},Q,H)}function Ma(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||ca,Oa=qi.current,xn(qi,v),xn(Mi,Mi.current),!0}function Ua(v,D,Q){var H=v.stateNode;if(!H)throw Error(c(169));Q?(v=La(v,D,Oa),H.__reactInternalMemoizedMergedChildContext=v,Rt(Mi),Rt(qi),xn(qi,v)):Rt(Mi),xn(Mi,Q)}var Xe=null,Ha=null,gf=n.unstable_now;gf();var cc=0,wn=8;function ua(v){if(1&v)return wn=15,1;if(2&v)return wn=14,2;if(4&v)return wn=13,4;var D=24&v;return D!==0?(wn=12,D):v&32?(wn=11,32):(D=192&v,D!==0?(wn=10,D):v&256?(wn=9,256):(D=3584&v,D!==0?(wn=8,D):v&4096?(wn=7,4096):(D=4186112&v,D!==0?(wn=6,D):(D=62914560&v,D!==0?(wn=5,D):v&67108864?(wn=4,67108864):v&134217728?(wn=3,134217728):(D=805306368&v,D!==0?(wn=2,D):1073741824&v?(wn=1,1073741824):(wn=8,v))))))}function _A(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function UA(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(c(358,v))}}function fa(v,D){var Q=v.pendingLanes;if(Q===0)return wn=0;var H=0,V=0,ne=v.expiredLanes,Se=v.suspendedLanes,Ue=v.pingedLanes;if(ne!==0)H=ne,V=wn=15;else if(ne=Q&134217727,ne!==0){var At=ne&~Se;At!==0?(H=ua(At),V=wn):(Ue&=ne,Ue!==0&&(H=ua(Ue),V=wn))}else ne=Q&~Se,ne!==0?(H=ua(ne),V=wn):Ue!==0&&(H=ua(Ue),V=wn);if(H===0)return 0;if(H=31-is(H),H=Q&((0>H?0:1<Q;Q++)D.push(v);return D}function ja(v,D,Q){v.pendingLanes|=D;var H=D-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,D=31-is(D),v[D]=Q}var is=Math.clz32?Math.clz32:fc,uc=Math.log,gu=Math.LN2;function fc(v){return v===0?32:31-(uc(v)/gu|0)|0}var qa=n.unstable_runWithPriority,_i=n.unstable_scheduleCallback,ws=n.unstable_cancelCallback,Sl=n.unstable_shouldYield,df=n.unstable_requestPaint,Ac=n.unstable_now,Bi=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,pc=n.unstable_UserBlockingPriority,Je=n.unstable_NormalPriority,st=n.unstable_LowPriority,St=n.unstable_IdlePriority,lr={},ee=df!==void 0?df:function(){},Ee=null,Oe=null,gt=!1,yt=Ac(),Dt=1e4>yt?Ac:function(){return Ac()-yt};function tr(){switch(Bi()){case Qn:return 99;case pc:return 98;case Je:return 97;case st:return 96;case St:return 95;default:throw Error(c(332))}}function fn(v){switch(v){case 99:return Qn;case 98:return pc;case 97:return Je;case 96:return st;case 95:return St;default:throw Error(c(332))}}function li(v,D){return v=fn(v),qa(v,D)}function Gi(v,D,Q){return v=fn(v),_i(v,D,Q)}function Tn(){if(Oe!==null){var v=Oe;Oe=null,ws(v)}Ga()}function Ga(){if(!gt&&Ee!==null){gt=!0;var v=0;try{var D=Ee;li(99,function(){for(;vRn?(Un=kr,kr=null):Un=kr.sibling;var zr=Xt($e,kr,ht[Rn],Zt);if(zr===null){kr===null&&(kr=Un);break}v&&kr&&zr.alternate===null&&D($e,kr),qe=ne(zr,qe,Rn),Xn===null?Sr=zr:Xn.sibling=zr,Xn=zr,kr=Un}if(Rn===ht.length)return Q($e,kr),Sr;if(kr===null){for(;RnRn?(Un=kr,kr=null):Un=kr.sibling;var ci=Xt($e,kr,zr.value,Zt);if(ci===null){kr===null&&(kr=Un);break}v&&kr&&ci.alternate===null&&D($e,kr),qe=ne(ci,qe,Rn),Xn===null?Sr=ci:Xn.sibling=ci,Xn=ci,kr=Un}if(zr.done)return Q($e,kr),Sr;if(kr===null){for(;!zr.done;Rn++,zr=ht.next())zr=Lr($e,zr.value,Zt),zr!==null&&(qe=ne(zr,qe,Rn),Xn===null?Sr=zr:Xn.sibling=zr,Xn=zr);return Sr}for(kr=H($e,kr);!zr.done;Rn++,zr=ht.next())zr=zn(kr,$e,Rn,zr.value,Zt),zr!==null&&(v&&zr.alternate!==null&&kr.delete(zr.key===null?Rn:zr.key),qe=ne(zr,qe,Rn),Xn===null?Sr=zr:Xn.sibling=zr,Xn=zr);return v&&kr.forEach(function(Pu){return D($e,Pu)}),Sr}return function($e,qe,ht,Zt){var Sr=typeof ht=="object"&&ht!==null&&ht.type===E&&ht.key===null;Sr&&(ht=ht.props.children);var Xn=typeof ht=="object"&&ht!==null;if(Xn)switch(ht.$$typeof){case p:e:{for(Xn=ht.key,Sr=qe;Sr!==null;){if(Sr.key===Xn){switch(Sr.tag){case 7:if(ht.type===E){Q($e,Sr.sibling),qe=V(Sr,ht.props.children),qe.return=$e,$e=qe;break e}break;default:if(Sr.elementType===ht.type){Q($e,Sr.sibling),qe=V(Sr,ht.props),qe.ref=mt($e,Sr,ht),qe.return=$e,$e=qe;break e}}Q($e,Sr);break}else D($e,Sr);Sr=Sr.sibling}ht.type===E?(qe=Qf(ht.props.children,$e.mode,Zt,ht.key),qe.return=$e,$e=qe):(Zt=id(ht.type,ht.key,ht.props,null,$e.mode,Zt),Zt.ref=mt($e,qe,ht),Zt.return=$e,$e=Zt)}return Se($e);case h:e:{for(Sr=ht.key;qe!==null;){if(qe.key===Sr)if(qe.tag===4&&qe.stateNode.containerInfo===ht.containerInfo&&qe.stateNode.implementation===ht.implementation){Q($e,qe.sibling),qe=V(qe,ht.children||[]),qe.return=$e,$e=qe;break e}else{Q($e,qe);break}else D($e,qe);qe=qe.sibling}qe=Ro(ht,$e.mode,Zt),qe.return=$e,$e=qe}return Se($e)}if(typeof ht=="string"||typeof ht=="number")return ht=""+ht,qe!==null&&qe.tag===6?(Q($e,qe.sibling),qe=V(qe,ht),qe.return=$e,$e=qe):(Q($e,qe),qe=b2(ht,$e.mode,Zt),qe.return=$e,$e=qe),Se($e);if(yf(ht))return yi($e,qe,ht,Zt);if(Ce(ht))return Za($e,qe,ht,Zt);if(Xn&&mu($e,ht),typeof ht>"u"&&!Sr)switch($e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(c(152,g($e.type)||"Component"))}return Q($e,qe)}}var Lg=Cy(!0),e2=Cy(!1),Dh={},ur=so(Dh),Zi=so(Dh),Ef=so(Dh);function Wa(v){if(v===Dh)throw Error(c(174));return v}function Mg(v,D){xn(Ef,D),xn(Zi,v),xn(ur,Dh),v=dt(D),Rt(ur),xn(ur,v)}function yu(){Rt(ur),Rt(Zi),Rt(Ef)}function If(v){var D=Wa(Ef.current),Q=Wa(ur.current);D=j(Q,v.type,D),Q!==D&&(xn(Zi,v),xn(ur,D))}function wt(v){Zi.current===v&&(Rt(ur),Rt(Zi))}var di=so(0);function WA(v){for(var D=v;D!==null;){if(D.tag===13){var Q=D.memoizedState;if(Q!==null&&(Q=Q.dehydrated,Q===null||gr(Q)||So(Q)))return D}else if(D.tag===19&&D.memoizedProps.revealOrder!==void 0){if(D.flags&64)return D}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===v)break;for(;D.sibling===null;){if(D.return===null||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}return null}var Ya=null,pa=null,Va=!1;function _g(v,D){var Q=za(5,null,null,0);Q.elementType="DELETED",Q.type="DELETED",Q.stateNode=D,Q.return=v,Q.flags=8,v.lastEffect!==null?(v.lastEffect.nextEffect=Q,v.lastEffect=Q):v.firstEffect=v.lastEffect=Q}function bh(v,D){switch(v.tag){case 5:return D=la(D,v.type,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 6:return D=OA(D,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 13:return!1;default:return!1}}function Ug(v){if(Va){var D=pa;if(D){var Q=D;if(!bh(v,D)){if(D=Me(Q),!D||!bh(v,D)){v.flags=v.flags&-1025|2,Va=!1,Ya=v;return}_g(Ya,Q)}Ya=v,pa=fu(D)}else v.flags=v.flags&-1025|2,Va=!1,Ya=v}}function wy(v){for(v=v.return;v!==null&&v.tag!==5&&v.tag!==3&&v.tag!==13;)v=v.return;Ya=v}function YA(v){if(!Z||v!==Ya)return!1;if(!Va)return wy(v),Va=!0,!1;var D=v.type;if(v.tag!==5||D!=="head"&&D!=="body"&&!it(D,v.memoizedProps))for(D=pa;D;)_g(v,D),D=Me(D);if(wy(v),v.tag===13){if(!Z)throw Error(c(316));if(v=v.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(c(317));pa=LA(v)}else pa=Ya?Me(v.stateNode):null;return!0}function Hg(){Z&&(pa=Ya=null,Va=!1)}var Eu=[];function Iu(){for(var v=0;vne))throw Error(c(301));ne+=1,ki=ss=null,D.updateQueue=null,Cf.current=re,v=Q(H,V)}while(wf)}if(Cf.current=kt,D=ss!==null&&ss.next!==null,Cu=0,ki=ss=qn=null,VA=!1,D)throw Error(c(300));return v}function os(){var v={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ki===null?qn.memoizedState=ki=v:ki=ki.next=v,ki}function xl(){if(ss===null){var v=qn.alternate;v=v!==null?v.memoizedState:null}else v=ss.next;var D=ki===null?qn.memoizedState:ki.next;if(D!==null)ki=D,ss=v;else{if(v===null)throw Error(c(310));ss=v,v={memoizedState:ss.memoizedState,baseState:ss.baseState,baseQueue:ss.baseQueue,queue:ss.queue,next:null},ki===null?qn.memoizedState=ki=v:ki=ki.next=v}return ki}function ko(v,D){return typeof D=="function"?D(v):D}function Bf(v){var D=xl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=ss,V=H.baseQueue,ne=Q.pending;if(ne!==null){if(V!==null){var Se=V.next;V.next=ne.next,ne.next=Se}H.baseQueue=V=ne,Q.pending=null}if(V!==null){V=V.next,H=H.baseState;var Ue=Se=ne=null,At=V;do{var Gt=At.lane;if((Cu&Gt)===Gt)Ue!==null&&(Ue=Ue.next={lane:0,action:At.action,eagerReducer:At.eagerReducer,eagerState:At.eagerState,next:null}),H=At.eagerReducer===v?At.eagerState:v(H,At.action);else{var vr={lane:Gt,action:At.action,eagerReducer:At.eagerReducer,eagerState:At.eagerState,next:null};Ue===null?(Se=Ue=vr,ne=H):Ue=Ue.next=vr,qn.lanes|=Gt,Zg|=Gt}At=At.next}while(At!==null&&At!==V);Ue===null?ne=H:Ue.next=Se,Do(H,D.memoizedState)||(Ke=!0),D.memoizedState=H,D.baseState=ne,D.baseQueue=Ue,Q.lastRenderedState=H}return[D.memoizedState,Q.dispatch]}function vf(v){var D=xl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=Q.dispatch,V=Q.pending,ne=D.memoizedState;if(V!==null){Q.pending=null;var Se=V=V.next;do ne=v(ne,Se.action),Se=Se.next;while(Se!==V);Do(ne,D.memoizedState)||(Ke=!0),D.memoizedState=ne,D.baseQueue===null&&(D.baseState=ne),Q.lastRenderedState=ne}return[ne,H]}function kl(v,D,Q){var H=D._getVersion;H=H(D._source);var V=y?D._workInProgressVersionPrimary:D._workInProgressVersionSecondary;if(V!==null?v=V===H:(v=v.mutableReadLanes,(v=(Cu&v)===v)&&(y?D._workInProgressVersionPrimary=H:D._workInProgressVersionSecondary=H,Eu.push(D))),v)return Q(D._source);throw Eu.push(D),Error(c(350))}function yn(v,D,Q,H){var V=ao;if(V===null)throw Error(c(349));var ne=D._getVersion,Se=ne(D._source),Ue=Cf.current,At=Ue.useState(function(){return kl(V,D,Q)}),Gt=At[1],vr=At[0];At=ki;var Lr=v.memoizedState,Xt=Lr.refs,zn=Xt.getSnapshot,yi=Lr.source;Lr=Lr.subscribe;var Za=qn;return v.memoizedState={refs:Xt,source:D,subscribe:H},Ue.useEffect(function(){Xt.getSnapshot=Q,Xt.setSnapshot=Gt;var $e=ne(D._source);if(!Do(Se,$e)){$e=Q(D._source),Do(vr,$e)||(Gt($e),$e=Ss(Za),V.mutableReadLanes|=$e&V.pendingLanes),$e=V.mutableReadLanes,V.entangledLanes|=$e;for(var qe=V.entanglements,ht=$e;0Q?98:Q,function(){v(!0)}),li(97m2&&(D.flags|=64,V=!0,$A(H,!1),D.lanes=33554432)}else{if(!V)if(v=WA(ne),v!==null){if(D.flags|=64,V=!0,v=v.updateQueue,v!==null&&(D.updateQueue=v,D.flags|=4),$A(H,!0),H.tail===null&&H.tailMode==="hidden"&&!ne.alternate&&!Va)return D=D.lastEffect=H.lastEffect,D!==null&&(D.nextEffect=null),null}else 2*Dt()-H.renderingStartTime>m2&&Q!==1073741824&&(D.flags|=64,V=!0,$A(H,!1),D.lanes=33554432);H.isBackwards?(ne.sibling=D.child,D.child=ne):(v=H.last,v!==null?v.sibling=ne:D.child=ne,H.last=ne)}return H.tail!==null?(v=H.tail,H.rendering=v,H.tail=v.sibling,H.lastEffect=D.lastEffect,H.renderingStartTime=Dt(),v.sibling=null,D=di.current,xn(di,V?D&1|2:D&1),v):null;case 23:case 24:return B2(),v!==null&&v.memoizedState!==null!=(D.memoizedState!==null)&&H.mode!=="unstable-defer-without-hiding"&&(D.flags|=4),null}throw Error(c(156,D.tag))}function YL(v){switch(v.tag){case 1:Jn(v.type)&&hu();var D=v.flags;return D&4096?(v.flags=D&-4097|64,v):null;case 3:if(yu(),Rt(Mi),Rt(qi),Iu(),D=v.flags,D&64)throw Error(c(285));return v.flags=D&-4097|64,v;case 5:return wt(v),null;case 13:return Rt(di),D=v.flags,D&4096?(v.flags=D&-4097|64,v):null;case 19:return Rt(di),null;case 4:return yu(),null;case 10:return Ng(v),null;case 23:case 24:return B2(),null;default:return null}}function Wg(v,D){try{var Q="",H=D;do Q+=$1(H),H=H.return;while(H);var V=Q}catch(ne){V=` -Error generating stack: `+ne.message+` -`+ne.stack}return{value:v,source:D,stack:V}}function Yg(v,D){try{console.error(D.value)}catch(Q){setTimeout(function(){throw Q})}}var VL=typeof WeakMap=="function"?WeakMap:Map;function i2(v,D,Q){Q=bl(-1,Q),Q.tag=3,Q.payload={element:null};var H=D.value;return Q.callback=function(){My||(My=!0,y2=H),Yg(v,D)},Q}function Vg(v,D,Q){Q=bl(-1,Q),Q.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H=="function"){var V=D.value;Q.payload=function(){return Yg(v,D),H(V)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(Q.callback=function(){typeof H!="function"&&(gc===null?gc=new Set([this]):gc.add(this),Yg(v,D));var Se=D.stack;this.componentDidCatch(D.value,{componentStack:Se!==null?Se:""})}),Q}var KL=typeof WeakSet=="function"?WeakSet:Set;function s2(v){var D=v.ref;if(D!==null)if(typeof D=="function")try{D(null)}catch(Q){kf(v,Q)}else D.current=null}function by(v,D){switch(D.tag){case 0:case 11:case 15:case 22:return;case 1:if(D.flags&256&&v!==null){var Q=v.memoizedProps,H=v.memoizedState;v=D.stateNode,D=v.getSnapshotBeforeUpdate(D.elementType===D.type?Q:bo(D.type,Q),H),v.__reactInternalSnapshotBeforeUpdate=D}return;case 3:F&&D.flags&256&&Fs(D.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(c(163))}function Fh(v,D){if(D=D.updateQueue,D=D!==null?D.lastEffect:null,D!==null){var Q=D=D.next;do{if((Q.tag&v)===v){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&H()}Q=Q.next}while(Q!==D)}}function yP(v,D,Q){switch(Q.tag){case 0:case 11:case 15:case 22:if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==D)}if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{var V=v;H=V.next,V=V.tag,V&4&&V&1&&(TP(Q,v),nM(Q,v)),v=H}while(v!==D)}return;case 1:v=Q.stateNode,Q.flags&4&&(D===null?v.componentDidMount():(H=Q.elementType===Q.type?D.memoizedProps:bo(Q.type,D.memoizedProps),v.componentDidUpdate(H,D.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),D=Q.updateQueue,D!==null&&Ey(Q,D,v);return;case 3:if(D=Q.updateQueue,D!==null){if(v=null,Q.child!==null)switch(Q.child.tag){case 5:v=Re(Q.child.stateNode);break;case 1:v=Q.child.stateNode}Ey(Q,D,v)}return;case 5:v=Q.stateNode,D===null&&Q.flags&4&&to(v,Q.type,Q.memoizedProps,Q);return;case 6:return;case 4:return;case 12:return;case 13:Z&&Q.memoizedState===null&&(Q=Q.alternate,Q!==null&&(Q=Q.memoizedState,Q!==null&&(Q=Q.dehydrated,Q!==null&&Au(Q))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(c(163))}function EP(v,D){if(F)for(var Q=v;;){if(Q.tag===5){var H=Q.stateNode;D?yh(H):no(Q.stateNode,Q.memoizedProps)}else if(Q.tag===6)H=Q.stateNode,D?Eh(H):jn(H,Q.memoizedProps);else if((Q.tag!==23&&Q.tag!==24||Q.memoizedState===null||Q===v)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===v)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===v)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}function Py(v,D){if(Ha&&typeof Ha.onCommitFiberUnmount=="function")try{Ha.onCommitFiberUnmount(Xe,D)}catch{}switch(D.tag){case 0:case 11:case 14:case 15:case 22:if(v=D.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var Q=v=v.next;do{var H=Q,V=H.destroy;if(H=H.tag,V!==void 0)if(H&4)TP(D,Q);else{H=D;try{V()}catch(ne){kf(H,ne)}}Q=Q.next}while(Q!==v)}break;case 1:if(s2(D),v=D.stateNode,typeof v.componentWillUnmount=="function")try{v.props=D.memoizedProps,v.state=D.memoizedState,v.componentWillUnmount()}catch(ne){kf(D,ne)}break;case 5:s2(D);break;case 4:F?BP(v,D):z&&z&&(D=D.stateNode.containerInfo,v=lu(D),FA(D,v))}}function IP(v,D){for(var Q=D;;)if(Py(v,Q),Q.child===null||F&&Q.tag===4){if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}else Q.child.return=Q,Q=Q.child}function xy(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function CP(v){return v.tag===5||v.tag===3||v.tag===4}function wP(v){if(F){e:{for(var D=v.return;D!==null;){if(CP(D))break e;D=D.return}throw Error(c(160))}var Q=D;switch(D=Q.stateNode,Q.tag){case 5:var H=!1;break;case 3:D=D.containerInfo,H=!0;break;case 4:D=D.containerInfo,H=!0;break;default:throw Error(c(161))}Q.flags&16&&(pf(D),Q.flags&=-17);e:t:for(Q=v;;){for(;Q.sibling===null;){if(Q.return===null||CP(Q.return)){Q=null;break e}Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;Q.tag!==5&&Q.tag!==6&&Q.tag!==18;){if(Q.flags&2||Q.child===null||Q.tag===4)continue t;Q.child.return=Q,Q=Q.child}if(!(Q.flags&2)){Q=Q.stateNode;break e}}H?o2(v,Q,D):a2(v,Q,D)}}function o2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?ro(Q,v,D):wo(Q,v);else if(H!==4&&(v=v.child,v!==null))for(o2(v,D,Q),v=v.sibling;v!==null;)o2(v,D,Q),v=v.sibling}function a2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?ji(Q,v,D):ai(Q,v);else if(H!==4&&(v=v.child,v!==null))for(a2(v,D,Q),v=v.sibling;v!==null;)a2(v,D,Q),v=v.sibling}function BP(v,D){for(var Q=D,H=!1,V,ne;;){if(!H){H=Q.return;e:for(;;){if(H===null)throw Error(c(160));switch(V=H.stateNode,H.tag){case 5:ne=!1;break e;case 3:V=V.containerInfo,ne=!0;break e;case 4:V=V.containerInfo,ne=!0;break e}H=H.return}H=!0}if(Q.tag===5||Q.tag===6)IP(v,Q),ne?RA(V,Q.stateNode):vo(V,Q.stateNode);else if(Q.tag===4){if(Q.child!==null){V=Q.stateNode.containerInfo,ne=!0,Q.child.return=Q,Q=Q.child;continue}}else if(Py(v,Q),Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return,Q.tag===4&&(H=!1)}Q.sibling.return=Q.return,Q=Q.sibling}}function l2(v,D){if(F){switch(D.tag){case 0:case 11:case 14:case 15:case 22:Fh(3,D);return;case 1:return;case 5:var Q=D.stateNode;if(Q!=null){var H=D.memoizedProps;v=v!==null?v.memoizedProps:H;var V=D.type,ne=D.updateQueue;D.updateQueue=null,ne!==null&&Bo(Q,ne,V,v,H,D)}return;case 6:if(D.stateNode===null)throw Error(c(162));Q=D.memoizedProps,ns(D.stateNode,v!==null?v.memoizedProps:Q,Q);return;case 3:Z&&(D=D.stateNode,D.hydrate&&(D.hydrate=!1,MA(D.containerInfo)));return;case 12:return;case 13:vP(D),Kg(D);return;case 19:Kg(D);return;case 17:return;case 23:case 24:EP(D,D.memoizedState!==null);return}throw Error(c(163))}switch(D.tag){case 0:case 11:case 14:case 15:case 22:Fh(3,D);return;case 12:return;case 13:vP(D),Kg(D);return;case 19:Kg(D);return;case 3:Z&&(Q=D.stateNode,Q.hydrate&&(Q.hydrate=!1,MA(Q.containerInfo)));break;case 23:case 24:return}e:if(z){switch(D.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:D=D.stateNode,FA(D.containerInfo,D.pendingChildren);break e}throw Error(c(163))}}function vP(v){v.memoizedState!==null&&(d2=Dt(),F&&EP(v.child,!0))}function Kg(v){var D=v.updateQueue;if(D!==null){v.updateQueue=null;var Q=v.stateNode;Q===null&&(Q=v.stateNode=new KL),D.forEach(function(H){var V=sM.bind(null,v,H);Q.has(H)||(Q.add(H),H.then(V,V))})}}function JL(v,D){return v!==null&&(v=v.memoizedState,v===null||v.dehydrated!==null)?(D=D.memoizedState,D!==null&&D.dehydrated===null):!1}var ky=0,Qy=1,Ty=2,Jg=3,Ry=4;if(typeof Symbol=="function"&&Symbol.for){var zg=Symbol.for;ky=zg("selector.component"),Qy=zg("selector.has_pseudo_class"),Ty=zg("selector.role"),Jg=zg("selector.test_id"),Ry=zg("selector.text")}function Fy(v){var D=$(v);if(D!=null){if(typeof D.memoizedProps["data-testname"]!="string")throw Error(c(364));return D}if(v=ir(v),v===null)throw Error(c(362));return v.stateNode.current}function Df(v,D){switch(D.$$typeof){case ky:if(v.type===D.value)return!0;break;case Qy:e:{D=D.value,v=[v,0];for(var Q=0;Q";case Qy:return":has("+(bf(v)||"")+")";case Ty:return'[role="'+v.value+'"]';case Ry:return'"'+v.value+'"';case Jg:return'[data-testname="'+v.value+'"]';default:throw Error(c(365,v))}}function c2(v,D){var Q=[];v=[v,0];for(var H=0;HV&&(V=Se),Q&=~ne}if(Q=V,Q=Dt()-Q,Q=(120>Q?120:480>Q?480:1080>Q?1080:1920>Q?1920:3e3>Q?3e3:4320>Q?4320:1960*ZL(Q/1960))-Q,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}vs!==5&&(vs=2),At=Wg(At,Ue),Xt=Se;do{switch(Xt.tag){case 3:ne=At,Xt.flags|=4096,D&=-D,Xt.lanes|=D;var Xn=i2(Xt,ne,D);yy(Xt,Xn);break e;case 1:ne=At;var kr=Xt.type,Rn=Xt.stateNode;if(!(Xt.flags&64)&&(typeof kr.getDerivedStateFromError=="function"||Rn!==null&&typeof Rn.componentDidCatch=="function"&&(gc===null||!gc.has(Rn)))){Xt.flags|=4096,D&=-D,Xt.lanes|=D;var Un=Vg(Xt,ne,D);yy(Xt,Un);break e}}Xt=Xt.return}while(Xt!==null)}QP(Q)}catch(zr){D=zr,Xi===Q&&Q!==null&&(Xi=Q=Q.return);continue}break}while(!0)}function xP(){var v=Oy.current;return Oy.current=kt,v===null?kt:v}function nd(v,D){var Q=xr;xr|=16;var H=xP();ao===v&&Ls===D||Mh(v,D);do try{$L();break}catch(V){PP(v,V)}while(!0);if(Rg(),xr=Q,Oy.current=H,Xi!==null)throw Error(c(261));return ao=null,Ls=0,vs}function $L(){for(;Xi!==null;)kP(Xi)}function eM(){for(;Xi!==null&&!Sl();)kP(Xi)}function kP(v){var D=NP(v.alternate,v,ep);v.memoizedProps=v.pendingProps,D===null?QP(v):Xi=D,f2.current=null}function QP(v){var D=v;do{var Q=D.alternate;if(v=D.return,D.flags&2048){if(Q=YL(D),Q!==null){Q.flags&=2047,Xi=Q;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(Q=WL(Q,D,ep),Q!==null){Xi=Q;return}if(Q=D,Q.tag!==24&&Q.tag!==23||Q.memoizedState===null||ep&1073741824||!(Q.mode&4)){for(var H=0,V=Q.child;V!==null;)H|=V.lanes|V.childLanes,V=V.sibling;Q.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=D.firstEffect),D.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=D.firstEffect),v.lastEffect=D.lastEffect),1Dt()-d2?Mh(v,0):h2|=Q),da(v,D)}function sM(v,D){var Q=v.stateNode;Q!==null&&Q.delete(D),D=0,D===0&&(D=v.mode,D&2?D&4?(Su===0&&(Su=Nh),D=kn(62914560&~Su),D===0&&(D=4194304)):D=tr()===99?1:2:D=1),Q=To(),v=Hy(v,D),v!==null&&(ja(v,D,Q),da(v,Q))}var NP;NP=function(v,D,Q){var H=D.lanes;if(v!==null)if(v.memoizedProps!==D.pendingProps||Mi.current)Ke=!0;else if(Q&H)Ke=!!(v.flags&16384);else{switch(Ke=!1,D.tag){case 3:Sy(D),Hg();break;case 5:If(D);break;case 1:Jn(D.type)&&Ma(D);break;case 4:Mg(D,D.stateNode.containerInfo);break;case 10:Fg(D,D.memoizedProps.value);break;case 13:if(D.memoizedState!==null)return Q&D.child.childLanes?r2(v,D,Q):(xn(di,di.current&1),D=Gn(v,D,Q),D!==null?D.sibling:null);xn(di,di.current&1);break;case 19:if(H=(Q&D.childLanes)!==0,v.flags&64){if(H)return mP(v,D,Q);D.flags|=64}var V=D.memoizedState;if(V!==null&&(V.rendering=null,V.tail=null,V.lastEffect=null),xn(di,di.current),H)break;return null;case 23:case 24:return D.lanes=0,mi(v,D,Q)}return Gn(v,D,Q)}else Ke=!1;switch(D.lanes=0,D.tag){case 2:if(H=D.type,v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,V=dn(D,qi.current),mf(D,Q),V=qg(null,D,H,v,V,Q),D.flags|=1,typeof V=="object"&&V!==null&&typeof V.render=="function"&&V.$$typeof===void 0){if(D.tag=1,D.memoizedState=null,D.updateQueue=null,Jn(H)){var ne=!0;Ma(D)}else ne=!1;D.memoizedState=V.state!==null&&V.state!==void 0?V.state:null,Sh(D);var Se=H.getDerivedStateFromProps;typeof Se=="function"&&jA(D,H,Se,v),V.updater=qA,D.stateNode=V,V._reactInternals=D,xo(D,H,v,Q),D=t2(null,D,H,!0,ne,Q)}else D.tag=0,ft(null,D,V,Q),D=D.child;return D;case 16:V=D.elementType;e:{switch(v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,ne=V._init,V=ne(V._payload),D.type=V,ne=D.tag=aM(V),v=bo(V,v),ne){case 0:D=zA(null,D,V,v,Q);break e;case 1:D=dP(null,D,V,v,Q);break e;case 11:D=dr(null,D,V,v,Q);break e;case 14:D=Br(null,D,V,bo(V.type,v),H,Q);break e}throw Error(c(306,V,""))}return D;case 0:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:bo(H,V),zA(v,D,H,V,Q);case 1:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:bo(H,V),dP(v,D,H,V,Q);case 3:if(Sy(D),H=D.updateQueue,v===null||H===null)throw Error(c(282));if(H=D.pendingProps,V=D.memoizedState,V=V!==null?V.element:null,Og(v,D),HA(D,H,null,Q),H=D.memoizedState.element,H===V)Hg(),D=Gn(v,D,Q);else{if(V=D.stateNode,(ne=V.hydrate)&&(Z?(pa=fu(D.stateNode.containerInfo),Ya=D,ne=Va=!0):ne=!1),ne){if(Z&&(v=V.mutableSourceEagerHydrationData,v!=null))for(V=0;V=Gt&&ne>=Lr&&V<=vr&&Se<=Xt){v.splice(D,1);break}else if(H!==Gt||Q.width!==At.width||XtSe){if(!(ne!==Lr||Q.height!==At.height||vrV)){Gt>H&&(At.width+=Gt-H,At.x=H),vrne&&(At.height+=Lr-ne,At.y=ne),XtQ&&(Q=Se)),Se ")+` - -No matching component was found for: - `)+v.join(" > ")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Re(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:f.ReactCurrentDispatcher,findHostInstanceByFiber:cM,findFiberByHostInstance:v.findFiberByHostInstance||uM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")v=!1;else{var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!D.isDisabled&&D.supportsFiber)try{Xe=D.inject(v),Ha=D}catch{}v=!0}return v},r.observeVisibleRects=function(v,D,Q,H){if(!qt)throw Error(c(363));v=u2(v,D);var V=nn(v,Q,H).disconnect;return{disconnect:function(){V()}}},r.registerMutableSourceForHydration=function(v,D){var Q=D._getVersion;Q=Q(D._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[D,Q]:v.mutableSourceEagerHydrationData.push(D,Q)},r.runWithPriority=function(v,D){var Q=cc;try{return cc=v,D()}finally{cc=Q}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,D){var Q=xr;xr&=-2,xr|=8;try{return v(D)}finally{xr=Q,xr===0&&(Pf(),Tn())}},r.updateContainer=function(v,D,Q,H){var V=D.current,ne=To(),Se=Ss(V);e:if(Q){Q=Q._reactInternals;t:{if(we(Q)!==Q||Q.tag!==1)throw Error(c(170));var Ue=Q;do{switch(Ue.tag){case 3:Ue=Ue.stateNode.context;break t;case 1:if(Jn(Ue.type)){Ue=Ue.stateNode.__reactInternalMemoizedMergedChildContext;break t}}Ue=Ue.return}while(Ue!==null);throw Error(c(171))}if(Q.tag===1){var At=Q.type;if(Jn(At)){Q=La(Q,At,Ue);break e}}Q=Ue}else Q=ca;return D.context===null?D.context=Q:D.pendingContext=Q,D=bl(ne,Se),D.payload={element:v},H=H===void 0?null:H,H!==null&&(D.callback=H),Pl(V,D),Rl(V,Se,ne),Se},r}});var xDe=L((Xpr,PDe)=>{"use strict";PDe.exports=bDe()});var QDe=L(($pr,kDe)=>{"use strict";var mPt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};kDe.exports=mPt});var NDe=L((ehr,FDe)=>{"use strict";var yPt=Object.assign||function(t){for(var e=1;e"}}]),t}(),TDe=function(){NF(t,null,[{key:"fromJS",value:function(r){var s=r.width,a=r.height;return new t(s,a)}}]);function t(e,r){IW(this,t),this.width=e,this.height=r}return NF(t,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toString",value:function(){return""}}]),t}(),RDe=function(){function t(e,r){IW(this,t),this.unit=e,this.value=r}return NF(t,[{key:"fromJS",value:function(r){r(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case rf.UNIT_POINT:return String(this.value);case rf.UNIT_PERCENT:return this.value+"%";case rf.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),t}();FDe.exports=function(t,e){function r(c,f,p){var h=c[f];c[f]=function(){for(var E=arguments.length,C=Array(E),S=0;S1?C-1:0),P=1;P1&&arguments[1]!==void 0?arguments[1]:NaN,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:rf.DIRECTION_LTR;return c.call(this,f,p,h)}),yPt({Config:e.Config,Node:e.Node,Layout:t("Layout",EPt),Size:t("Size",TDe),Value:t("Value",RDe),getInstanceCount:function(){return e.getInstanceCount.apply(e,arguments)}},rf)}});var ODe=L((exports,module)=>{(function(t,e){typeof define=="function"&&define.amd?define([],function(){return e}):typeof module=="object"&&module.exports?module.exports=e:(t.nbind=t.nbind||{}).init=e})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(t,e){return function(){t&&t.apply(this,arguments);try{Module.ccall("nbind_init")}catch(r){e(r);return}e(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof Ie=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(e,r){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),e=nodePath.normalize(e);var s=nodeFS.readFileSync(e);return r?s:s.toString()},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(e));var r=read(e,"binary");return assert(typeof r=="object"),r},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(t,e){quit(t)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),Module.readAsync=function(e,r,s){var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="arraybuffer",a.onload=function(){a.status==200||a.status==0&&a.response?r(a.response):s()},a.onerror=s,a.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(t){dump(t)}:function(t){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(t){document.title=t})}else throw"Unknown runtime environment. Where are we?";function globalEval(t){eval.call(null,t)}!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(t,e){throw e}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(t){return tempRet0=t,t},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(t){STACKTOP=t},getNativeTypeSize:function(t){switch(t){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(t[t.length-1]==="*")return Runtime.QUANTUM_SIZE;if(t[0]==="i"){var e=parseInt(t.substr(1));return assert(e%8===0),e/8}else return 0}}},getNativeFieldSize:function(t){return Math.max(Runtime.getNativeTypeSize(t),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(t,e){return e==="double"||e==="i64"?t&7&&(assert((t&7)===4),t+=4):assert((t&3)===0),t},getAlignSize:function(t,e,r){return!r&&(t=="i64"||t=="double")?8:t?Math.min(e||(t?Runtime.getNativeFieldSize(t):0),Runtime.QUANTUM_SIZE):Math.min(e,8)},dynCall:function(t,e,r){return r&&r.length?Module["dynCall_"+t].apply(null,[e].concat(r)):Module["dynCall_"+t].call(null,e)},functionPointers:[],addFunction:function(t){for(var e=0;e>2],r=(e+t+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=r,r>=TOTAL_MEMORY){var s=enlargeMemory();if(!s)return HEAP32[DYNAMICTOP_PTR>>2]=e,0}return e},alignMemory:function(t,e){var r=t=Math.ceil(t/(e||16))*(e||16);return r},makeBigInt:function(t,e,r){var s=r?+(t>>>0)+ +(e>>>0)*4294967296:+(t>>>0)+ +(e|0)*4294967296;return s},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(t,e){t||abort("Assertion failed: "+e)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(t){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(t){var e=Runtime.stackAlloc(t.length);return writeArrayToMemory(t,e),e},stringToC:function(t){var e=0;if(t!=null&&t!==0){var r=(t.length<<2)+1;e=Runtime.stackAlloc(r),stringToUTF8(t,e,r)}return e}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,s,a,n){var c=getCFunc(e),f=[],p=0;if(a)for(var h=0;h>0]=e;break;case"i8":HEAP8[t>>0]=e;break;case"i16":HEAP16[t>>1]=e;break;case"i32":HEAP32[t>>2]=e;break;case"i64":tempI64=[e>>>0,(tempDouble=e,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t>>2]=tempI64[0],HEAP32[t+4>>2]=tempI64[1];break;case"float":HEAPF32[t>>2]=e;break;case"double":HEAPF64[t>>3]=e;break;default:abort("invalid type for setValue: "+r)}}Module.setValue=setValue;function getValue(t,e,r){switch(e=e||"i8",e.charAt(e.length-1)==="*"&&(e="i32"),e){case"i1":return HEAP8[t>>0];case"i8":return HEAP8[t>>0];case"i16":return HEAP16[t>>1];case"i32":return HEAP32[t>>2];case"i64":return HEAP32[t>>2];case"float":return HEAPF32[t>>2];case"double":return HEAPF64[t>>3];default:abort("invalid type for setValue: "+e)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(t,e,r,s){var a,n;typeof t=="number"?(a=!0,n=t):(a=!1,n=t.length);var c=typeof e=="string"?e:null,f;if(r==ALLOC_NONE?f=s:f=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][r===void 0?ALLOC_STATIC:r](Math.max(n,c?1:e.length)),a){var s=f,p;for(assert((f&3)==0),p=f+(n&-4);s>2]=0;for(p=f+n;s>0]=0;return f}if(c==="i8")return t.subarray||t.slice?HEAPU8.set(t,f):HEAPU8.set(new Uint8Array(t),f),f;for(var h=0,E,C,S;h>0],r|=s,!(s==0&&!e||(a++,e&&a==e)););e||(e=a);var n="";if(r<128){for(var c=1024,f;e>0;)f=String.fromCharCode.apply(String,HEAPU8.subarray(t,t+Math.min(e,c))),n=n?n+f:f,t+=c,e-=c;return n}return Module.UTF8ToString(t)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(t){for(var e="";;){var r=HEAP8[t++>>0];if(!r)return e;e+=String.fromCharCode(r)}}Module.AsciiToString=AsciiToString;function stringToAscii(t,e){return writeAsciiToMemory(t,e,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(t,e){for(var r=e;t[r];)++r;if(r-e>16&&t.subarray&&UTF8Decoder)return UTF8Decoder.decode(t.subarray(e,r));for(var s,a,n,c,f,p,h="";;){if(s=t[e++],!s)return h;if(!(s&128)){h+=String.fromCharCode(s);continue}if(a=t[e++]&63,(s&224)==192){h+=String.fromCharCode((s&31)<<6|a);continue}if(n=t[e++]&63,(s&240)==224?s=(s&15)<<12|a<<6|n:(c=t[e++]&63,(s&248)==240?s=(s&7)<<18|a<<12|n<<6|c:(f=t[e++]&63,(s&252)==248?s=(s&3)<<24|a<<18|n<<12|c<<6|f:(p=t[e++]&63,s=(s&1)<<30|a<<24|n<<18|c<<12|f<<6|p))),s<65536)h+=String.fromCharCode(s);else{var E=s-65536;h+=String.fromCharCode(55296|E>>10,56320|E&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(t){return UTF8ArrayToString(HEAPU8,t)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(t,e,r,s){if(!(s>0))return 0;for(var a=r,n=r+s-1,c=0;c=55296&&f<=57343&&(f=65536+((f&1023)<<10)|t.charCodeAt(++c)&1023),f<=127){if(r>=n)break;e[r++]=f}else if(f<=2047){if(r+1>=n)break;e[r++]=192|f>>6,e[r++]=128|f&63}else if(f<=65535){if(r+2>=n)break;e[r++]=224|f>>12,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=2097151){if(r+3>=n)break;e[r++]=240|f>>18,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=67108863){if(r+4>=n)break;e[r++]=248|f>>24,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else{if(r+5>=n)break;e[r++]=252|f>>30,e[r++]=128|f>>24&63,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}}return e[r]=0,r-a}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(t,e,r){return stringToUTF8Array(t,HEAPU8,e,r)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(t){for(var e=0,r=0;r=55296&&s<=57343&&(s=65536+((s&1023)<<10)|t.charCodeAt(++r)&1023),s<=127?++e:s<=2047?e+=2:s<=65535?e+=3:s<=2097151?e+=4:s<=67108863?e+=5:e+=6}return e}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function demangle(t){var e=Module.___cxa_demangle||Module.__cxa_demangle;if(e){try{var r=t.substr(1),s=lengthBytesUTF8(r)+1,a=_malloc(s);stringToUTF8(r,a,s);var n=_malloc(4),c=e(a,0,0,n);if(getValue(n,"i32")===0&&c)return Pointer_stringify(c)}catch{}finally{a&&_free(a),n&&_free(n),c&&_free(c)}return t}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),t}function demangleAll(t){var e=/__Z[\w\d_]+/g;return t.replace(e,function(r){var s=demangle(r);return r===s?r:r+" ["+s+"]"})}function jsStackTrace(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function stackTrace(){var t=jsStackTrace();return Module.extraStackTrace&&(t+=` -`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var s=r>0?r:lengthBytesUTF8(t)+1,a=new Array(s),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r255&&(s&=255),e.push(String.fromCharCode(s))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var s,a;r&&(a=e+lengthBytesUTF8(t),s=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var s=0;s>0]=t.charCodeAt(s);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var s=e>>>16,a=e&65535,n=r>>>16,c=r&65535;return a*c+(s*c+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(t){return t}function addRunDependency(t){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(t){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(t,e,r,s,a,n,c,f){return _nbind.callbackSignatureList[t].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(t,e,r,s,a,n,c,f){return ASM_CONSTS[t](e,r,s,a,n,c,f)}function _emscripten_asm_const_iiiii(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiidddddd(t,e,r,s,a,n,c,f,p){return ASM_CONSTS[t](e,r,s,a,n,c,f,p)}function _emscripten_asm_const_iiididi(t,e,r,s,a,n,c){return ASM_CONSTS[t](e,r,s,a,n,c)}function _emscripten_asm_const_iiii(t,e,r,s){return ASM_CONSTS[t](e,r,s)}function _emscripten_asm_const_iiiid(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiiiii(t,e,r,s,a,n){return ASM_CONSTS[t](e,r,s,a,n)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(t,e){__ATEXIT__.unshift({func:t,arg:e})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(t,e,r,s){var a=arguments.length,n=a<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,s);else for(var f=t.length-1;f>=0;f--)(c=t[f])&&(n=(a<3?c(n):a>3?c(e,r,n):c(e,r))||n);return a>3&&n&&Object.defineProperty(e,r,n),n}function _defineHidden(t){return function(e,r){Object.defineProperty(e,r,{configurable:!1,enumerable:!1,value:t,writable:!0})}}var _nbind={};function __nbind_free_external(t){_nbind.externalList[t].dereference(t)}function __nbind_reference_external(t){_nbind.externalList[t].reference()}function _llvm_stackrestore(t){var e=_llvm_stacksave,r=e.LLVM_SAVEDSTACKS[t];e.LLVM_SAVEDSTACKS.splice(t,1),Runtime.stackRestore(r)}function __nbind_register_pool(t,e,r,s){_nbind.Pool.pageSize=t,_nbind.Pool.usedPtr=e/4,_nbind.Pool.rootPtr=r,_nbind.Pool.pagePtr=s/4,HEAP32[e/4]=16909060,HEAP8[e]==1&&(_nbind.bigEndian=!0),HEAP32[e/4]=0,_nbind.makeTypeKindTbl=(n={},n[1024]=_nbind.PrimitiveType,n[64]=_nbind.Int64Type,n[2048]=_nbind.BindClass,n[3072]=_nbind.BindClassPtr,n[4096]=_nbind.SharedClassPtr,n[5120]=_nbind.ArrayType,n[6144]=_nbind.ArrayType,n[7168]=_nbind.CStringType,n[9216]=_nbind.CallbackType,n[10240]=_nbind.BindType,n),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var a=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});a.proto=Module,_nbind.BindClass.list.push(a);var n}function _emscripten_set_main_loop_timing(t,e){if(Browser.mainLoop.timingMode=t,Browser.mainLoop.timingValue=e,!Browser.mainLoop.func)return 1;if(t==0)Browser.mainLoop.scheduler=function(){var c=Math.max(0,Browser.mainLoop.tickStartTime+e-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,c)},Browser.mainLoop.method="timeout";else if(t==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(t==2){if(!window.setImmediate){let n=function(c){c.source===window&&c.data===s&&(c.stopPropagation(),r.shift()())};var a=n,r=[],s="setimmediate";window.addEventListener("message",n,!0),window.setImmediate=function(f){r.push(f),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(f),window.postMessage({target:s})):window.postMessage(s,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(t,e,r,s,a){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=t,Browser.mainLoop.arg=s;var n;typeof s<"u"?n=function(){Module.dynCall_vi(t,s)}:n=function(){Module.dynCall_v(t)};var c=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var p=Date.now(),h=Browser.mainLoop.queue.shift();if(h.func(h.arg),Browser.mainLoop.remainingBlockers){var E=Browser.mainLoop.remainingBlockers,C=E%1==0?E-1:Math.floor(E);h.counted?Browser.mainLoop.remainingBlockers=C:(C=C+.5,Browser.mainLoop.remainingBlockers=(8*E+C)/9)}if(console.log('main loop blocker "'+h.name+'" took '+(Date.now()-p)+" ms"),Browser.mainLoop.updateStatus(),c1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(n),!(c0?_emscripten_set_main_loop_timing(0,1e3/e):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),r)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var t=Browser.mainLoop.timingMode,e=Browser.mainLoop.timingValue,r=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(r,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(t,e),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var t=Module.statusMessage||"Please wait...",e=Browser.mainLoop.remainingBlockers,r=Browser.mainLoop.expectedBlockers;e?e"u"&&(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),Module.noImageDecoding=!0);var t={};t.canHandle=function(n){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(n)},t.handle=function(n,c,f,p){var h=null;if(Browser.hasBlobConstructor)try{h=new Blob([n],{type:Browser.getMimetype(c)}),h.size!==n.length&&(h=new Blob([new Uint8Array(n).buffer],{type:Browser.getMimetype(c)}))}catch(P){Runtime.warnOnce("Blob constructor present but fails: "+P+"; falling back to blob builder")}if(!h){var E=new Browser.BlobBuilder;E.append(new Uint8Array(n).buffer),h=E.getBlob()}var C=Browser.URLObject.createObjectURL(h),S=new Image;S.onload=function(){assert(S.complete,"Image "+c+" could not be decoded");var I=document.createElement("canvas");I.width=S.width,I.height=S.height;var R=I.getContext("2d");R.drawImage(S,0,0),Module.preloadedImages[c]=I,Browser.URLObject.revokeObjectURL(C),f&&f(n)},S.onerror=function(I){console.log("Image "+C+" could not be decoded"),p&&p()},S.src=C},Module.preloadPlugins.push(t);var e={};e.canHandle=function(n){return!Module.noAudioDecoding&&n.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},e.handle=function(n,c,f,p){var h=!1;function E(R){h||(h=!0,Module.preloadedAudios[c]=R,f&&f(n))}function C(){h||(h=!0,Module.preloadedAudios[c]=new Audio,p&&p())}if(Browser.hasBlobConstructor){try{var S=new Blob([n],{type:Browser.getMimetype(c)})}catch{return C()}var P=Browser.URLObject.createObjectURL(S),I=new Audio;I.addEventListener("canplaythrough",function(){E(I)},!1),I.onerror=function(N){if(h)return;console.log("warning: browser could not fully decode audio "+c+", trying slower base64 approach");function U(W){for(var te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ie="=",Ae="",ce=0,me=0,pe=0;pe=6;){var Be=ce>>me-6&63;me-=6,Ae+=te[Be]}return me==2?(Ae+=te[(ce&3)<<4],Ae+=ie+ie):me==4&&(Ae+=te[(ce&15)<<2],Ae+=ie),Ae}I.src="data:audio/x-"+c.substr(-3)+";base64,"+U(n),E(I)},I.src=P,Browser.safeSetTimeout(function(){E(I)},1e4)}else return C()},Module.preloadPlugins.push(e);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var s=Module.canvas;s&&(s.requestPointerLock=s.requestPointerLock||s.mozRequestPointerLock||s.webkitRequestPointerLock||s.msRequestPointerLock||function(){},s.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},s.exitPointerLock=s.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",r,!1),document.addEventListener("mozpointerlockchange",r,!1),document.addEventListener("webkitpointerlockchange",r,!1),document.addEventListener("mspointerlockchange",r,!1),Module.elementPointerLock&&s.addEventListener("click",function(a){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext:function(t,e,r,s){if(e&&Module.ctx&&t==Module.canvas)return Module.ctx;var a,n;if(e){var c={antialias:!1,alpha:!1};if(s)for(var f in s)c[f]=s[f];n=GL.createContext(t,c),n&&(a=GL.getContext(n).GLctx)}else a=t.getContext("2d");return a?(r&&(e||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=a,e&&GL.makeContextCurrent(n),Module.useWebGL=e,Browser.moduleContextCreatedCallbacks.forEach(function(p){p()}),Browser.init()),a):null},destroyContext:function(t,e,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,e,r){Browser.lockPointer=t,Browser.resizeCanvas=e,Browser.vrDevice=r,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>"u"&&(Browser.vrDevice=null);var s=Module.canvas;function a(){Browser.isFullscreen=!1;var c=s.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===c?(s.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},s.exitFullscreen=s.exitFullscreen.bind(document),Browser.lockPointer&&s.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(c.parentNode.insertBefore(s,c),c.parentNode.removeChild(c),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(s)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",a,!1),document.addEventListener("mozfullscreenchange",a,!1),document.addEventListener("webkitfullscreenchange",a,!1),document.addEventListener("MSFullscreenChange",a,!1));var n=document.createElement("div");s.parentNode.insertBefore(n,s),n.appendChild(s),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?function(){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),r?n.requestFullscreen({vrDisplay:r}):n.requestFullscreen()},requestFullScreen:function(t,e,r){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(s,a,n){return Browser.requestFullscreen(s,a,n)},Browser.requestFullscreen(t,e,r)},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=e+1e3/60;else for(;e+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var r=Math.max(Browser.nextRAF-e,0);setTimeout(t,r)},requestAnimationFrame:function t(e){typeof window>"u"?Browser.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(t){return function(){if(!ABORT)return t.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var t=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],t.forEach(function(e){e()})}},safeRequestAnimationFrame:function(t){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))})},safeSetTimeout:function(t,e){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))},e)},safeSetInterval:function(t,e){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&t()},e)},getMimetype:function(t){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[t.substr(t.lastIndexOf(".")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case"DOMMouseScroll":e=t.detail;break;case"mousewheel":e=t.wheelDelta;break;case"wheel":e=t.deltaY;break;default:throw"unrecognized mouse wheel event: "+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Browser.pointerLock)t.type!="mousemove"&&"mozMovementX"in t?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(t),Browser.mouseMovementY=Browser.getMovementY(t)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var e=Module.canvas.getBoundingClientRect(),r=Module.canvas.width,s=Module.canvas.height,a=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,n=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset;if(t.type==="touchstart"||t.type==="touchend"||t.type==="touchmove"){var c=t.touch;if(c===void 0)return;var f=c.pageX-(a+e.left),p=c.pageY-(n+e.top);f=f*(r/e.width),p=p*(s/e.height);var h={x:f,y:p};if(t.type==="touchstart")Browser.lastTouches[c.identifier]=h,Browser.touches[c.identifier]=h;else if(t.type==="touchend"||t.type==="touchmove"){var E=Browser.touches[c.identifier];E||(E=h),Browser.lastTouches[c.identifier]=E,Browser.touches[c.identifier]=h}return}var C=t.pageX-(a+e.left),S=t.pageY-(n+e.top);C=C*(r/e.width),S=S*(s/e.height),Browser.mouseMovementX=C-Browser.mouseX,Browser.mouseMovementY=S-Browser.mouseY,Browser.mouseX=C,Browser.mouseY=S}},asyncLoad:function(t,e,r,s){var a=s?"":"al "+t;Module.readAsync(t,function(n){assert(n,'Loading data file "'+t+'" failed (no arrayBuffer).'),e(new Uint8Array(n)),a&&removeRunDependency(a)},function(n){if(r)r();else throw'Loading data file "'+t+'" failed.'}),a&&addRunDependency(a)},resizeListeners:[],updateResizeListeners:function(){var t=Module.canvas;Browser.resizeListeners.forEach(function(e){e(t.width,t.height)})},setCanvasSize:function(t,e,r){var s=Module.canvas;Browser.updateCanvasDimensions(s,t,e),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL<"u"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<"u"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},updateCanvasDimensions:function(t,e,r){e&&r?(t.widthNative=e,t.heightNative=r):(e=t.widthNative,r=t.heightNative);var s=e,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(s/a>2];return e},getStr:function(){var t=Pointer_stringify(SYSCALLS.get());return t},get64:function(){var t=SYSCALLS.get(),e=SYSCALLS.get();return t>=0?assert(e===0):assert(e===-1),t},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(s){return(typeof FS>"u"||!(s instanceof FS.ErrnoError))&&abort(s),-s.errno}}function ___syscall54(t,e){SYSCALLS.varargs=e;try{return 0}catch(r){return(typeof FS>"u"||!(r instanceof FS.ErrnoError))&&abort(r),-r.errno}}function _typeModule(t){var e=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr"],[640,1,"std::unique_ptr"],[5120,1,"std::vector"],[6144,2,"std::array"],[9216,-1,"std::function"]];function r(p,h,E,C,S,P){if(h==1){var I=C&896;(I==128||I==256||I==384)&&(p="X const")}var R;return P?R=E.replace("X",p).replace("Y",S):R=p.replace("X",E).replace("Y",S),R.replace(/([*&]) (?=[*&])/g,"$1")}function s(p,h,E,C,S){throw new Error(p+" type "+E.replace("X",h+"?")+(C?" with flag "+C:"")+" in "+S)}function a(p,h,E,C,S,P,I,R){P===void 0&&(P="X"),R===void 0&&(R=1);var N=E(p);if(N)return N;var U=C(p),W=U.placeholderFlag,te=e[W];I&&te&&(P=r(I[2],I[0],P,te[0],"?",!0));var ie;W==0&&(ie="Unbound"),W>=10&&(ie="Corrupt"),R>20&&(ie="Deeply nested"),ie&&s(ie,p,P,W,S||"?");var Ae=U.paramList[0],ce=a(Ae,h,E,C,S,P,te,R+1),me,pe={flags:te[0],id:p,name:"",paramList:[ce]},Be=[],Ce="?";switch(U.placeholderFlag){case 1:me=ce.spec;break;case 2:if((ce.flags&15360)==1024&&ce.spec.ptrSize==1){pe.flags=7168;break}case 3:case 6:case 5:me=ce.spec,ce.flags&15360;break;case 8:Ce=""+U.paramList[1],pe.paramList.push(U.paramList[1]);break;case 9:for(var g=0,we=U.paramList[1];g>2]=t),t}function _llvm_stacksave(){var t=_llvm_stacksave;return t.LLVM_SAVEDSTACKS||(t.LLVM_SAVEDSTACKS=[]),t.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),t.LLVM_SAVEDSTACKS.length-1}function ___syscall140(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=SYSCALLS.get(),c=SYSCALLS.get(),f=a;return FS.llseek(r,f,c),HEAP32[n>>2]=r.position,r.getdents&&f===0&&c===0&&(r.getdents=null),0}catch(p){return(typeof FS>"u"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall146(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.get(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(E,C){var S=___syscall146.buffers[E];assert(S),C===0||C===10?((E===1?Module.print:Module.printErr)(UTF8ArrayToString(S,0)),S.length=0):S.push(C)});for(var c=0;c>2],p=HEAP32[s+(c*8+4)>>2],h=0;h"u"||!(E instanceof FS.ErrnoError))&&abort(E),-E.errno}}function __nbind_finish(){for(var t=0,e=_nbind.BindClass.list;tt.pageSize/2||e>t.pageSize-r){var s=_nbind.typeNameTbl.NBind.proto;return s.lalloc(e)}else return HEAPU32[t.usedPtr]=r+e,t.rootPtr+r},t.lreset=function(e,r){var s=HEAPU32[t.pagePtr];if(s){var a=_nbind.typeNameTbl.NBind.proto;a.lreset(e,r)}else HEAPU32[t.usedPtr]=e},t}();_nbind.Pool=Pool;function constructType(t,e){var r=t==10240?_nbind.makeTypeNameTbl[e.name]||_nbind.BindType:_nbind.makeTypeKindTbl[t],s=new r(e);return typeIdTbl[e.id]=s,_nbind.typeNameTbl[e.name]=s,s}_nbind.constructType=constructType;function getType(t){return typeIdTbl[t]}_nbind.getType=getType;function queryType(t){var e=HEAPU8[t],r=_nbind.structureList[e][1];t/=4,r<0&&(++t,r=HEAPU32[t]+1);var s=Array.prototype.slice.call(HEAPU32.subarray(t+1,t+1+r));return e==9&&(s=[s[0],s.slice(1)]),{paramList:s,placeholderFlag:e}}_nbind.queryType=queryType;function getTypes(t,e){return t.map(function(r){return typeof r=="number"?_nbind.getComplexType(r,constructType,getType,queryType,e):_nbind.typeNameTbl[r]})}_nbind.getTypes=getTypes;function readTypeIdList(t,e){return Array.prototype.slice.call(HEAPU32,t/4,t/4+e)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(t){for(var e=t;HEAPU8[e++];);return String.fromCharCode.apply("",HEAPU8.subarray(t,e-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(t){var e={};if(t)for(;;){var r=HEAPU32[t/4];if(!r)break;e[readAsciiString(r)]=!0,t+=4}return e}_nbind.readPolicyList=readPolicyList;function getDynCall(t,e){var r={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},s=t.map(function(n){return r[n.name]||"i"}).join(""),a=Module["dynCall_"+s];if(!a)throw new Error("dynCall_"+s+" not found for "+e+"("+t.map(function(n){return n.name}).join(", ")+")");return a}_nbind.getDynCall=getDynCall;function addMethod(t,e,r,s){var a=t[e];t.hasOwnProperty(e)&&a?((a.arity||a.arity===0)&&(a=_nbind.makeOverloader(a,a.arity),t[e]=a),a.addMethod(r,s)):(r.arity=s,t[e]=r)}_nbind.addMethod=addMethod;function throwError(t){throw new Error(t)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.heap=HEAPU32,r.ptrSize=4,r}return e.prototype.needsWireRead=function(r){return!!this.wireRead||!!this.makeWireRead},e.prototype.needsWireWrite=function(r){return!!this.wireWrite||!!this.makeWireWrite},e}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this,a=r.flags&32?{32:HEAPF32,64:HEAPF64}:r.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return s.heap=a[r.ptrSize*8],s.ptrSize=r.ptrSize,s}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a=="number")return a;throw new Error("Type mismatch")}},e}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(t,e){if(t==null){if(e&&e.Nullable)return 0;throw new Error("Type mismatch")}if(e&&e.Strict){if(typeof t!="string")throw new Error("Type mismatch")}else t=t.toString();var r=Module.lengthBytesUTF8(t)+1,s=_nbind.Pool.lalloc(r);return Module.stringToUTF8Array(t,HEAPU8,s,r),s}_nbind.pushCString=pushCString;function popCString(t){return t===0?null:Module.Pointer_stringify(t)}_nbind.popCString=popCString;var CStringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popCString,r.wireWrite=pushCString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushCString(a,s)}},e}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=function(s){return!!s},r}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireRead=function(r){return"!!("+r+")"},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a=="boolean")return a;throw new Error("Type mismatch")}||r},e}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function t(){}return t.prototype.persist=function(){this.__nbindState|=1},t}();_nbind.Wrapper=Wrapper;function makeBound(t,e){var r=function(s){__extends(a,s);function a(n,c,f,p){var h=s.call(this)||this;if(!(h instanceof a))return new(Function.prototype.bind.apply(a,Array.prototype.concat.apply([null],arguments)));var E=c,C=f,S=p;if(n!==_nbind.ptrMarker){var P=h.__nbindConstructor.apply(h,arguments);E=4608,S=HEAPU32[P/4],C=HEAPU32[P/4+1]}var I={configurable:!0,enumerable:!1,value:null,writable:!1},R={__nbindFlags:E,__nbindPtr:C};S&&(R.__nbindShared=S,_nbind.mark(h));for(var N=0,U=Object.keys(R);N>=1;var r=_nbind.valueList[t];return _nbind.valueList[t]=firstFreeValue,firstFreeValue=t,r}else{if(e)return _nbind.popShared(t,e);throw new Error("Invalid value slot "+t)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(t){return typeof t=="number"?t:pushValue(t)*4096+valueBase}function pop64(t){return t=3?c=Buffer.from(n):c=new Buffer(n),c.copy(s)}else getBuffer(s).set(n)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var t=0,e=dirtyList;t>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(t,e,r,s,a,n){try{Module.dynCall_viiiii(t,e,r,s,a,n)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_vif(t,e,r){try{Module.dynCall_vif(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_vid(t,e,r){try{Module.dynCall_vid(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_fiff(t,e,r,s){try{return Module.dynCall_fiff(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_vi(t,e){try{Module.dynCall_vi(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_vii(t,e,r){try{Module.dynCall_vii(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_ii(t,e){try{return Module.dynCall_ii(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_viddi(t,e,r,s,a){try{Module.dynCall_viddi(t,e,r,s,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_vidd(t,e,r,s){try{Module.dynCall_vidd(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_iiii(t,e,r,s){try{return Module.dynCall_iiii(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_diii(t,e,r,s){try{return Module.dynCall_diii(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_di(t,e){try{return Module.dynCall_di(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_iid(t,e,r){try{return Module.dynCall_iid(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_iii(t,e,r){try{return Module.dynCall_iii(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_viiddi(t,e,r,s,a,n){try{Module.dynCall_viiddi(t,e,r,s,a,n)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_viiiiii(t,e,r,s,a,n,c){try{Module.dynCall_viiiiii(t,e,r,s,a,n,c)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_dii(t,e,r){try{return Module.dynCall_dii(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_i(t){try{return Module.dynCall_i(t)}catch(e){if(typeof e!="number"&&e!=="longjmp")throw e;Module.setThrew(1,0)}}function invoke_iiiiii(t,e,r,s,a,n){try{return Module.dynCall_iiiiii(t,e,r,s,a,n)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_viiid(t,e,r,s,a){try{Module.dynCall_viiid(t,e,r,s,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_viififi(t,e,r,s,a,n,c){try{Module.dynCall_viififi(t,e,r,s,a,n,c)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_viii(t,e,r,s){try{Module.dynCall_viii(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_v(t){try{Module.dynCall_v(t)}catch(e){if(typeof e!="number"&&e!=="longjmp")throw e;Module.setThrew(1,0)}}function invoke_viid(t,e,r,s){try{Module.dynCall_viid(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_idd(t,e,r){try{return Module.dynCall_idd(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_viiii(t,e,r,s,a){try{Module.dynCall_viiii(t,e,r,s,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(t,e,r){var s=new t.Int8Array(r),a=new t.Int16Array(r),n=new t.Int32Array(r),c=new t.Uint8Array(r),f=new t.Uint16Array(r),p=new t.Uint32Array(r),h=new t.Float32Array(r),E=new t.Float64Array(r),C=e.DYNAMICTOP_PTR|0,S=e.tempDoublePtr|0,P=e.ABORT|0,I=e.STACKTOP|0,R=e.STACK_MAX|0,N=e.cttz_i8|0,U=e.___dso_handle|0,W=0,te=0,ie=0,Ae=0,ce=t.NaN,me=t.Infinity,pe=0,Be=0,Ce=0,g=0,we=0,ye=0,fe=t.Math.floor,se=t.Math.abs,X=t.Math.sqrt,De=t.Math.pow,Re=t.Math.cos,dt=t.Math.sin,j=t.Math.tan,rt=t.Math.acos,Fe=t.Math.asin,Ne=t.Math.atan,Pe=t.Math.atan2,Ye=t.Math.exp,ke=t.Math.log,it=t.Math.ceil,_e=t.Math.imul,x=t.Math.min,w=t.Math.max,b=t.Math.clz32,y=t.Math.fround,F=e.abort,z=e.assert,Z=e.enlargeMemory,$=e.getTotalMemory,oe=e.abortOnCannotGrowMemory,xe=e.invoke_viiiii,Te=e.invoke_vif,lt=e.invoke_vid,It=e.invoke_fiff,qt=e.invoke_vi,ir=e.invoke_vii,Pt=e.invoke_ii,gn=e.invoke_viddi,Pr=e.invoke_vidd,Ir=e.invoke_iiii,Nr=e.invoke_diii,nn=e.invoke_di,ai=e.invoke_iid,wo=e.invoke_iii,ns=e.invoke_viiddi,to=e.invoke_viiiiii,Bo=e.invoke_dii,ji=e.invoke_i,ro=e.invoke_iiiiii,vo=e.invoke_viiid,RA=e.invoke_viififi,pf=e.invoke_viii,yh=e.invoke_v,Eh=e.invoke_viid,no=e.invoke_idd,jn=e.invoke_viiii,Fs=e._emscripten_asm_const_iiiii,io=e._emscripten_asm_const_iiidddddd,lu=e._emscripten_asm_const_iiiid,cu=e.__nbind_reference_external,uu=e._emscripten_asm_const_iiiiiiii,FA=e._removeAccessorPrefix,NA=e._typeModule,aa=e.__nbind_register_pool,la=e.__decorate,OA=e._llvm_stackrestore,gr=e.___cxa_atexit,So=e.__extends,Me=e.__nbind_get_value_object,fu=e.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Cr=e._emscripten_set_main_loop_timing,hf=e.__nbind_register_primitive,LA=e.__nbind_register_type,MA=e._emscripten_memcpy_big,Au=e.__nbind_register_function,pu=e.___setErrNo,ac=e.__nbind_register_class,ve=e.__nbind_finish,Nt=e._abort,lc=e._nbind_value,Li=e._llvm_stacksave,so=e.___syscall54,Rt=e._defineHidden,xn=e._emscripten_set_main_loop,ca=e._emscripten_get_now,qi=e.__nbind_register_callback_signature,Mi=e._emscripten_asm_const_iiiiii,Oa=e.__nbind_free_external,dn=e._emscripten_asm_const_iiii,Jn=e._emscripten_asm_const_iiididi,hu=e.___syscall6,Ih=e._atexit,La=e.___syscall140,Ma=e.___syscall146,Ua=y(0);let Xe=y(0);function Ha(o){o=o|0;var l=0;return l=I,I=I+o|0,I=I+15&-16,l|0}function gf(){return I|0}function cc(o){o=o|0,I=o}function wn(o,l){o=o|0,l=l|0,I=o,R=l}function ua(o,l){o=o|0,l=l|0,W||(W=o,te=l)}function _A(o){o=o|0,ye=o}function UA(){return ye|0}function fa(){var o=0,l=0;Qr(8104,8,400)|0,Qr(8504,408,540)|0,o=9044,l=o+44|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));s[9088]=0,s[9089]=1,n[2273]=0,n[2274]=948,n[2275]=948,gr(17,8104,U|0)|0}function vl(o){o=o|0,gt(o+948|0)}function Mt(o){return o=y(o),((EP(o)|0)&2147483647)>>>0>2139095040|0}function kn(o,l,u){o=o|0,l=l|0,u=u|0;e:do if(n[o+(l<<3)+4>>2]|0)o=o+(l<<3)|0;else{if((l|2|0)==3&&n[o+60>>2]|0){o=o+56|0;break}switch(l|0){case 0:case 2:case 4:case 5:{if(n[o+52>>2]|0){o=o+48|0;break e}break}default:}if(n[o+68>>2]|0){o=o+64|0;break}else{o=(l|1|0)==5?948:u;break}}while(!1);return o|0}function Aa(o){o=o|0;var l=0;return l=KP(1e3)|0,ja(o,(l|0)!=0,2456),n[2276]=(n[2276]|0)+1,Qr(l|0,8104,1e3)|0,s[o+2>>0]|0&&(n[l+4>>2]=2,n[l+12>>2]=4),n[l+976>>2]=o,l|0}function ja(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,Gg(o,5,3197,A)),I=d}function is(){return Aa(956)|0}function uc(o){o=o|0;var l=0;return l=Jt(1e3)|0,gu(l,o),ja(n[o+976>>2]|0,1,2456),n[2276]=(n[2276]|0)+1,n[l+944>>2]=0,l|0}function gu(o,l){o=o|0,l=l|0;var u=0;Qr(o|0,l|0,948)|0,vy(o+948|0,l+948|0),u=o+960|0,o=l+960|0,l=u+40|0;do n[u>>2]=n[o>>2],u=u+4|0,o=o+4|0;while((u|0)<(l|0))}function fc(o){o=o|0;var l=0,u=0,A=0,d=0;if(l=o+944|0,u=n[l>>2]|0,u|0&&(qa(u+948|0,o)|0,n[l>>2]=0),u=_i(o)|0,u|0){l=0;do n[(ws(o,l)|0)+944>>2]=0,l=l+1|0;while((l|0)!=(u|0))}u=o+948|0,A=n[u>>2]|0,d=o+952|0,l=n[d>>2]|0,(l|0)!=(A|0)&&(n[d>>2]=l+(~((l+-4-A|0)>>>2)<<2)),Sl(u),JP(o),n[2276]=(n[2276]|0)+-1}function qa(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0;A=n[o>>2]|0,k=o+4|0,u=n[k>>2]|0,m=u;e:do if((A|0)==(u|0))d=A,B=4;else for(o=A;;){if((n[o>>2]|0)==(l|0)){d=o,B=4;break e}if(o=o+4|0,(o|0)==(u|0)){o=0;break}}while(!1);return(B|0)==4&&((d|0)!=(u|0)?(A=d+4|0,o=m-A|0,l=o>>2,l&&(Q2(d|0,A|0,o|0)|0,u=n[k>>2]|0),o=d+(l<<2)|0,(u|0)==(o|0)||(n[k>>2]=u+(~((u+-4-o|0)>>>2)<<2)),o=1):o=0),o|0}function _i(o){return o=o|0,(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2|0}function ws(o,l){o=o|0,l=l|0;var u=0;return u=n[o+948>>2]|0,(n[o+952>>2]|0)-u>>2>>>0>l>>>0?o=n[u+(l<<2)>>2]|0:o=0,o|0}function Sl(o){o=o|0;var l=0,u=0,A=0,d=0;A=I,I=I+32|0,l=A,d=n[o>>2]|0,u=(n[o+4>>2]|0)-d|0,((n[o+8>>2]|0)-d|0)>>>0>u>>>0&&(d=u>>2,Py(l,d,d,o+8|0),IP(o,l),xy(l)),I=A}function df(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;_=_i(o)|0;do if(_|0){if((n[(ws(o,0)|0)+944>>2]|0)==(o|0)){if(!(qa(o+948|0,l)|0))break;Qr(l+400|0,8504,540)|0,n[l+944>>2]=0,Oe(o);break}B=n[(n[o+976>>2]|0)+12>>2]|0,k=o+948|0,T=(B|0)==0,u=0,m=0;do A=n[(n[k>>2]|0)+(m<<2)>>2]|0,(A|0)==(l|0)?Oe(o):(d=uc(A)|0,n[(n[k>>2]|0)+(u<<2)>>2]=d,n[d+944>>2]=o,T||y_[B&15](A,d,o,u),u=u+1|0),m=m+1|0;while((m|0)!=(_|0));if(u>>>0<_>>>0){T=o+948|0,k=o+952|0,B=u,u=n[k>>2]|0;do m=(n[T>>2]|0)+(B<<2)|0,A=m+4|0,d=u-A|0,l=d>>2,l&&(Q2(m|0,A|0,d|0)|0,u=n[k>>2]|0),d=u,A=m+(l<<2)|0,(d|0)!=(A|0)&&(u=d+(~((d+-4-A|0)>>>2)<<2)|0,n[k>>2]=u),B=B+1|0;while((B|0)!=(_|0))}}while(!1)}function Ac(o){o=o|0;var l=0,u=0,A=0,d=0;Bi(o,(_i(o)|0)==0,2491),Bi(o,(n[o+944>>2]|0)==0,2545),l=o+948|0,u=n[l>>2]|0,A=o+952|0,d=n[A>>2]|0,(d|0)!=(u|0)&&(n[A>>2]=d+(~((d+-4-u|0)>>>2)<<2)),Sl(l),l=o+976|0,u=n[l>>2]|0,Qr(o|0,8104,1e3)|0,s[u+2>>0]|0&&(n[o+4>>2]=2,n[o+12>>2]=4),n[l>>2]=u}function Bi(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,Qo(o,5,3197,A)),I=d}function Qn(){return n[2276]|0}function pc(){var o=0;return o=KP(20)|0,Je((o|0)!=0,2592),n[2277]=(n[2277]|0)+1,n[o>>2]=n[239],n[o+4>>2]=n[240],n[o+8>>2]=n[241],n[o+12>>2]=n[242],n[o+16>>2]=n[243],o|0}function Je(o,l){o=o|0,l=l|0;var u=0,A=0;A=I,I=I+16|0,u=A,o||(n[u>>2]=l,Qo(0,5,3197,u)),I=A}function st(o){o=o|0,JP(o),n[2277]=(n[2277]|0)+-1}function St(o,l){o=o|0,l=l|0;var u=0;l?(Bi(o,(_i(o)|0)==0,2629),u=1):(u=0,l=0),n[o+964>>2]=l,n[o+988>>2]=u}function lr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+8|0,d=A+4|0,B=A,n[d>>2]=l,Bi(o,(n[l+944>>2]|0)==0,2709),Bi(o,(n[o+964>>2]|0)==0,2763),ee(o),l=o+948|0,n[B>>2]=(n[l>>2]|0)+(u<<2),n[m>>2]=n[B>>2],Ee(l,m,d)|0,n[(n[d>>2]|0)+944>>2]=o,Oe(o),I=A}function ee(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;if(u=_i(o)|0,u|0&&(n[(ws(o,0)|0)+944>>2]|0)!=(o|0)){A=n[(n[o+976>>2]|0)+12>>2]|0,d=o+948|0,m=(A|0)==0,l=0;do B=n[(n[d>>2]|0)+(l<<2)>>2]|0,k=uc(B)|0,n[(n[d>>2]|0)+(l<<2)>>2]=k,n[k+944>>2]=o,m||y_[A&15](B,k,o,l),l=l+1|0;while((l|0)!=(u|0))}}function Ee(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0;tt=I,I=I+64|0,G=tt+52|0,k=tt+48|0,ae=tt+28|0,We=tt+24|0,Le=tt+20|0,Qe=tt,A=n[o>>2]|0,m=A,l=A+((n[l>>2]|0)-m>>2<<2)|0,A=o+4|0,d=n[A>>2]|0,B=o+8|0;do if(d>>>0<(n[B>>2]|0)>>>0){if((l|0)==(d|0)){n[l>>2]=n[u>>2],n[A>>2]=(n[A>>2]|0)+4;break}CP(o,l,d,l+4|0),l>>>0<=u>>>0&&(u=(n[A>>2]|0)>>>0>u>>>0?u+4|0:u),n[l>>2]=n[u>>2]}else{A=(d-m>>2)+1|0,d=O(o)|0,d>>>0>>0&&sn(o),M=n[o>>2]|0,_=(n[B>>2]|0)-M|0,m=_>>1,Py(Qe,_>>2>>>0>>1>>>0?m>>>0>>0?A:m:d,l-M>>2,o+8|0),M=Qe+8|0,A=n[M>>2]|0,m=Qe+12|0,_=n[m>>2]|0,B=_,T=A;do if((A|0)==(_|0)){if(_=Qe+4|0,A=n[_>>2]|0,Ze=n[Qe>>2]|0,d=Ze,A>>>0<=Ze>>>0){A=B-d>>1,A=A|0?A:1,Py(ae,A,A>>>2,n[Qe+16>>2]|0),n[We>>2]=n[_>>2],n[Le>>2]=n[M>>2],n[k>>2]=n[We>>2],n[G>>2]=n[Le>>2],o2(ae,k,G),A=n[Qe>>2]|0,n[Qe>>2]=n[ae>>2],n[ae>>2]=A,A=ae+4|0,Ze=n[_>>2]|0,n[_>>2]=n[A>>2],n[A>>2]=Ze,A=ae+8|0,Ze=n[M>>2]|0,n[M>>2]=n[A>>2],n[A>>2]=Ze,A=ae+12|0,Ze=n[m>>2]|0,n[m>>2]=n[A>>2],n[A>>2]=Ze,xy(ae),A=n[M>>2]|0;break}m=A,B=((m-d>>2)+1|0)/-2|0,k=A+(B<<2)|0,d=T-m|0,m=d>>2,m&&(Q2(k|0,A|0,d|0)|0,A=n[_>>2]|0),Ze=k+(m<<2)|0,n[M>>2]=Ze,n[_>>2]=A+(B<<2),A=Ze}while(!1);n[A>>2]=n[u>>2],n[M>>2]=(n[M>>2]|0)+4,l=wP(o,Qe,l)|0,xy(Qe)}while(!1);return I=tt,l|0}function Oe(o){o=o|0;var l=0;do{if(l=o+984|0,s[l>>0]|0)break;s[l>>0]=1,h[o+504>>2]=y(ce),o=n[o+944>>2]|0}while(o|0)}function gt(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),Et(u))}function yt(o){return o=o|0,n[o+944>>2]|0}function Dt(o){o=o|0,Bi(o,(n[o+964>>2]|0)!=0,2832),Oe(o)}function tr(o){return o=o|0,(s[o+984>>0]|0)!=0|0}function fn(o,l){o=o|0,l=l|0,EYe(o,l,400)|0&&(Qr(o|0,l|0,400)|0,Oe(o))}function li(o){o=o|0;var l=Xe;return l=y(h[o+44>>2]),o=Mt(l)|0,y(o?y(0):l)}function Gi(o){o=o|0;var l=Xe;return l=y(h[o+48>>2]),Mt(l)|0&&(l=s[(n[o+976>>2]|0)+2>>0]|0?y(1):y(0)),y(l)}function Tn(o,l){o=o|0,l=l|0,n[o+980>>2]=l}function Ga(o){return o=o|0,n[o+980>>2]|0}function gy(o,l){o=o|0,l=l|0;var u=0;u=o+4|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function X1(o){return o=o|0,n[o+4>>2]|0}function Do(o,l){o=o|0,l=l|0;var u=0;u=o+8|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function dy(o){return o=o|0,n[o+8>>2]|0}function Ch(o,l){o=o|0,l=l|0;var u=0;u=o+12|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function $1(o){return o=o|0,n[o+12>>2]|0}function bo(o,l){o=o|0,l=l|0;var u=0;u=o+16|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function wh(o){return o=o|0,n[o+16>>2]|0}function Bh(o,l){o=o|0,l=l|0;var u=0;u=o+20|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function du(o){return o=o|0,n[o+20>>2]|0}function vh(o,l){o=o|0,l=l|0;var u=0;u=o+24|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Rg(o){return o=o|0,n[o+24>>2]|0}function Fg(o,l){o=o|0,l=l|0;var u=0;u=o+28|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Ng(o){return o=o|0,n[o+28>>2]|0}function my(o,l){o=o|0,l=l|0;var u=0;u=o+32|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function mf(o){return o=o|0,n[o+32>>2]|0}function Po(o,l){o=o|0,l=l|0;var u=0;u=o+36|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Dl(o){return o=o|0,n[o+36>>2]|0}function Sh(o,l){o=o|0,l=y(l);var u=0;u=o+40|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Og(o,l){o=o|0,l=y(l);var u=0;u=o+44|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function bl(o,l){o=o|0,l=y(l);var u=0;u=o+48|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Pl(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+52|0,d=o+56|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function yy(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+52|0,u=o+56|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function HA(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+52|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Ey(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function Iy(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function jA(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+132+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function qA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function Y(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function xt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+60+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function GA(o,l){o=o|0,l=l|0;var u=0;u=o+60+(l<<3)+4|0,(n[u>>2]|0)!=3&&(h[o+60+(l<<3)>>2]=y(ce),n[u>>2]=3,Oe(o))}function xo(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function yf(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function mt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+204+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function mu(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+276+(l<<3)|0,l=o+276+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function Cy(o,l){return o=o|0,l=l|0,y(h[o+276+(l<<3)>>2])}function Lg(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+348|0,d=o+352|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function e2(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+348|0,u=o+352|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function Dh(o){o=o|0;var l=0;l=o+352|0,(n[l>>2]|0)!=3&&(h[o+348>>2]=y(ce),n[l>>2]=3,Oe(o))}function ur(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+348|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Zi(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+356|0,d=o+360|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ef(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+356|0,u=o+360|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function Wa(o){o=o|0;var l=0;l=o+360|0,(n[l>>2]|0)!=3&&(h[o+356>>2]=y(ce),n[l>>2]=3,Oe(o))}function Mg(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+356|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function yu(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function If(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function wt(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+364|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function di(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function WA(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ya(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+372|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function pa(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Va(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function _g(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+380|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function bh(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ug(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function wy(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+388|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function YA(o,l){o=o|0,l=y(l);var u=0;u=o+396|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Hg(o){return o=o|0,y(h[o+396>>2])}function Eu(o){return o=o|0,y(h[o+400>>2])}function Iu(o){return o=o|0,y(h[o+404>>2])}function Cf(o){return o=o|0,y(h[o+408>>2])}function Ns(o){return o=o|0,y(h[o+412>>2])}function Cu(o){return o=o|0,y(h[o+416>>2])}function qn(o){return o=o|0,y(h[o+420>>2])}function ss(o,l){switch(o=o|0,l=l|0,Bi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+424+(l<<2)>>2])}function ki(o,l){switch(o=o|0,l=l|0,Bi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+448+(l<<2)>>2])}function VA(o,l){switch(o=o|0,l=l|0,Bi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+472+(l<<2)>>2])}function wf(o,l){o=o|0,l=l|0;var u=0,A=Xe;return u=n[o+4>>2]|0,(u|0)==(n[l+4>>2]|0)?u?(A=y(h[o>>2]),o=y(se(y(A-y(h[l>>2]))))>2]=0,n[A+4>>2]=0,n[A+8>>2]=0,fu(A|0,o|0,l|0,0),Qo(o,3,(s[A+11>>0]|0)<0?n[A>>2]|0:A,u),jYe(A),I=u}function os(o,l,u,A){o=y(o),l=y(l),u=u|0,A=A|0;var d=Xe;o=y(o*l),d=y(A_(o,y(1)));do if(mn(d,y(0))|0)o=y(o-d);else{if(o=y(o-d),mn(d,y(1))|0){o=y(o+y(1));break}if(u){o=y(o+y(1));break}A||(d>y(.5)?d=y(1):(A=mn(d,y(.5))|0,d=y(A?1:0)),o=y(o+d))}while(!1);return y(o/l)}function xl(o,l,u,A,d,m,B,k,T,_,M,G,ae){o=o|0,l=y(l),u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,k=y(k),T=y(T),_=y(_),M=y(M),G=y(G),ae=ae|0;var We=0,Le=Xe,Qe=Xe,tt=Xe,Ze=Xe,ct=Xe,He=Xe;return T>2]),Le!=y(0))?(tt=y(os(l,Le,0,0)),Ze=y(os(A,Le,0,0)),Qe=y(os(m,Le,0,0)),Le=y(os(k,Le,0,0))):(Qe=m,tt=l,Le=k,Ze=A),(d|0)==(o|0)?We=mn(Qe,tt)|0:We=0,(B|0)==(u|0)?ae=mn(Le,Ze)|0:ae=0,!We&&(ct=y(l-M),!(ko(o,ct,T)|0))&&!(Bf(o,ct,d,T)|0)?We=vf(o,ct,d,m,T)|0:We=1,!ae&&(He=y(A-G),!(ko(u,He,_)|0))&&!(Bf(u,He,B,_)|0)?ae=vf(u,He,B,k,_)|0:ae=1,ae=We&ae),ae|0}function ko(o,l,u){return o=o|0,l=y(l),u=y(u),(o|0)==1?o=mn(l,u)|0:o=0,o|0}function Bf(o,l,u,A){return o=o|0,l=y(l),u=u|0,A=y(A),(o|0)==2&(u|0)==0?l>=A?o=1:o=mn(l,A)|0:o=0,o|0}function vf(o,l,u,A,d){return o=o|0,l=y(l),u=u|0,A=y(A),d=y(d),(o|0)==2&(u|0)==2&A>l?d<=l?o=1:o=mn(l,d)|0:o=0,o|0}function kl(o,l,u,A,d,m,B,k,T,_,M){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=m|0,B=y(B),k=y(k),T=T|0,_=_|0,M=M|0;var G=0,ae=0,We=0,Le=0,Qe=Xe,tt=Xe,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=Xe,Fo=Xe,No=Xe,Oo=0,$a=0;cr=I,I=I+160|0,$t=cr+152|0,fr=cr+120|0,qr=cr+104|0,He=cr+72|0,Le=cr+56|0,Lt=cr+8|0,ct=cr,Ge=(n[2279]|0)+1|0,n[2279]=Ge,Tr=o+984|0,s[Tr>>0]|0&&(n[o+512>>2]|0)!=(n[2278]|0)?Ze=4:(n[o+516>>2]|0)==(A|0)?Hr=0:Ze=4,(Ze|0)==4&&(n[o+520>>2]=0,n[o+924>>2]=-1,n[o+928>>2]=-1,h[o+932>>2]=y(-1),h[o+936>>2]=y(-1),Hr=1);e:do if(n[o+964>>2]|0)if(Qe=y(yn(o,2,B)),tt=y(yn(o,0,B)),G=o+916|0,No=y(h[G>>2]),Fo=y(h[o+920>>2]),Hn=y(h[o+932>>2]),xl(d,l,m,u,n[o+924>>2]|0,No,n[o+928>>2]|0,Fo,Hn,y(h[o+936>>2]),Qe,tt,M)|0)Ze=22;else if(We=n[o+520>>2]|0,!We)Ze=21;else for(ae=0;;){if(G=o+524+(ae*24|0)|0,Hn=y(h[G>>2]),Fo=y(h[o+524+(ae*24|0)+4>>2]),No=y(h[o+524+(ae*24|0)+16>>2]),xl(d,l,m,u,n[o+524+(ae*24|0)+8>>2]|0,Hn,n[o+524+(ae*24|0)+12>>2]|0,Fo,No,y(h[o+524+(ae*24|0)+20>>2]),Qe,tt,M)|0){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=We>>>0){Ze=21;break}}else{if(T){if(G=o+916|0,!(mn(y(h[G>>2]),l)|0)){Ze=21;break}if(!(mn(y(h[o+920>>2]),u)|0)){Ze=21;break}if((n[o+924>>2]|0)!=(d|0)){Ze=21;break}G=(n[o+928>>2]|0)==(m|0)?G:0,Ze=22;break}if(We=n[o+520>>2]|0,!We)Ze=21;else for(ae=0;;){if(G=o+524+(ae*24|0)|0,mn(y(h[G>>2]),l)|0&&mn(y(h[o+524+(ae*24|0)+4>>2]),u)|0&&(n[o+524+(ae*24|0)+8>>2]|0)==(d|0)&&(n[o+524+(ae*24|0)+12>>2]|0)==(m|0)){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=We>>>0){Ze=21;break}}}while(!1);do if((Ze|0)==21)s[11697]|0?(G=0,Ze=28):(G=0,Ze=31);else if((Ze|0)==22){if(ae=(s[11697]|0)!=0,!((G|0)!=0&(Hr^1)))if(ae){Ze=28;break}else{Ze=31;break}Le=G+16|0,n[o+908>>2]=n[Le>>2],We=G+20|0,n[o+912>>2]=n[We>>2],(s[11698]|0)==0|ae^1||(n[ct>>2]=wu(Ge)|0,n[ct+4>>2]=Ge,Qo(o,4,2972,ct),ae=n[o+972>>2]|0,ae|0&&op[ae&127](o),d=ha(d,T)|0,m=ha(m,T)|0,$a=+y(h[Le>>2]),Oo=+y(h[We>>2]),n[Lt>>2]=d,n[Lt+4>>2]=m,E[Lt+8>>3]=+l,E[Lt+16>>3]=+u,E[Lt+24>>3]=$a,E[Lt+32>>3]=Oo,n[Lt+40>>2]=_,Qo(o,4,2989,Lt))}while(!1);return(Ze|0)==28&&(ae=wu(Ge)|0,n[Le>>2]=ae,n[Le+4>>2]=Ge,n[Le+8>>2]=Hr?3047:11699,Qo(o,4,3038,Le),ae=n[o+972>>2]|0,ae|0&&op[ae&127](o),Lt=ha(d,T)|0,Ze=ha(m,T)|0,n[He>>2]=Lt,n[He+4>>2]=Ze,E[He+8>>3]=+l,E[He+16>>3]=+u,n[He+24>>2]=_,Qo(o,4,3049,He),Ze=31),(Ze|0)==31&&(Os(o,l,u,A,d,m,B,k,T,M),s[11697]|0&&(ae=n[2279]|0,Lt=wu(ae)|0,n[qr>>2]=Lt,n[qr+4>>2]=ae,n[qr+8>>2]=Hr?3047:11699,Qo(o,4,3083,qr),ae=n[o+972>>2]|0,ae|0&&op[ae&127](o),Lt=ha(d,T)|0,qr=ha(m,T)|0,Oo=+y(h[o+908>>2]),$a=+y(h[o+912>>2]),n[fr>>2]=Lt,n[fr+4>>2]=qr,E[fr+8>>3]=Oo,E[fr+16>>3]=$a,n[fr+24>>2]=_,Qo(o,4,3092,fr)),n[o+516>>2]=A,G||(ae=o+520|0,G=n[ae>>2]|0,(G|0)==16&&(s[11697]|0&&Qo(o,4,3124,$t),n[ae>>2]=0,G=0),T?G=o+916|0:(n[ae>>2]=G+1,G=o+524+(G*24|0)|0),h[G>>2]=l,h[G+4>>2]=u,n[G+8>>2]=d,n[G+12>>2]=m,n[G+16>>2]=n[o+908>>2],n[G+20>>2]=n[o+912>>2],G=0)),T&&(n[o+416>>2]=n[o+908>>2],n[o+420>>2]=n[o+912>>2],s[o+985>>0]=1,s[Tr>>0]=0),n[2279]=(n[2279]|0)+-1,n[o+512>>2]=n[2278],I=cr,Hr|(G|0)==0|0}function yn(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return A=y(J(o,l,u)),y(A+y(re(o,l,u)))}function Qo(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=I,I=I+16|0,d=m,n[d>>2]=A,o?A=n[o+976>>2]|0:A=0,kh(A,o,l,u,d),I=m}function wu(o){return o=o|0,(o>>>0>60?3201:3201+(60-o)|0)|0}function ha(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+32|0,u=d+12|0,A=d,n[u>>2]=n[254],n[u+4>>2]=n[255],n[u+8>>2]=n[256],n[A>>2]=n[257],n[A+4>>2]=n[258],n[A+8>>2]=n[259],(o|0)>2?o=11699:o=n[(l?A:u)+(o<<2)>>2]|0,I=d,o|0}function Os(o,l,u,A,d,m,B,k,T,_){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=m|0,B=y(B),k=y(k),T=T|0,_=_|0;var M=0,G=0,ae=0,We=0,Le=Xe,Qe=Xe,tt=Xe,Ze=Xe,ct=Xe,He=Xe,Ge=Xe,Lt=0,qr=0,fr=0,$t=Xe,Tr=Xe,Hr=0,cr=Xe,Hn=0,Fo=0,No=0,Oo=0,$a=0,Vh=0,Kh=0,dc=0,Jh=0,Ff=0,Nf=0,zh=0,Zh=0,Xh=0,on=0,mc=0,$h=0,ku=0,e0=Xe,t0=Xe,Of=Xe,Lf=Xe,Qu=Xe,lo=0,Ml=0,ya=0,yc=0,lp=0,cp=Xe,Mf=Xe,up=Xe,fp=Xe,co=Xe,Us=Xe,Ec=0,Wn=Xe,Ap=Xe,Lo=Xe,Tu=Xe,Mo=Xe,Ru=Xe,pp=0,hp=0,Fu=Xe,uo=Xe,Ic=0,gp=0,dp=0,mp=0,Fr=Xe,ui=0,Hs=0,_o=0,fo=0,Mr=0,Ar=0,Cc=0,zt=Xe,yp=0,vi=0;Cc=I,I=I+16|0,lo=Cc+12|0,Ml=Cc+8|0,ya=Cc+4|0,yc=Cc,Bi(o,(d|0)==0|(Mt(l)|0)^1,3326),Bi(o,(m|0)==0|(Mt(u)|0)^1,3406),Hs=ft(o,A)|0,n[o+496>>2]=Hs,Mr=dr(2,Hs)|0,Ar=dr(0,Hs)|0,h[o+440>>2]=y(J(o,Mr,B)),h[o+444>>2]=y(re(o,Mr,B)),h[o+428>>2]=y(J(o,Ar,B)),h[o+436>>2]=y(re(o,Ar,B)),h[o+464>>2]=y(Br(o,Mr)),h[o+468>>2]=y(_n(o,Mr)),h[o+452>>2]=y(Br(o,Ar)),h[o+460>>2]=y(_n(o,Ar)),h[o+488>>2]=y(mi(o,Mr,B)),h[o+492>>2]=y(Bs(o,Mr,B)),h[o+476>>2]=y(mi(o,Ar,B)),h[o+484>>2]=y(Bs(o,Ar,B));do if(n[o+964>>2]|0)zA(o,l,u,d,m,B,k);else{if(_o=o+948|0,fo=(n[o+952>>2]|0)-(n[_o>>2]|0)>>2,!fo){dP(o,l,u,d,m,B,k);break}if(!T&&t2(o,l,u,d,m,B,k)|0)break;ee(o),mc=o+508|0,s[mc>>0]=0,Mr=dr(n[o+4>>2]|0,Hs)|0,Ar=Sy(Mr,Hs)|0,ui=de(Mr)|0,$h=n[o+8>>2]|0,gp=o+28|0,ku=(n[gp>>2]|0)!=0,Mo=ui?B:k,Fu=ui?k:B,e0=y(Th(o,Mr,B)),t0=y(r2(o,Mr,B)),Le=y(Th(o,Ar,B)),Ru=y(Ka(o,Mr,B)),uo=y(Ka(o,Ar,B)),fr=ui?d:m,Ic=ui?m:d,Fr=ui?Ru:uo,ct=ui?uo:Ru,Tu=y(yn(o,2,B)),Ze=y(yn(o,0,B)),Qe=y(y(Xr(o+364|0,B))-Fr),tt=y(y(Xr(o+380|0,B))-Fr),He=y(y(Xr(o+372|0,k))-ct),Ge=y(y(Xr(o+388|0,k))-ct),Of=ui?Qe:He,Lf=ui?tt:Ge,Tu=y(l-Tu),l=y(Tu-Fr),Mt(l)|0?Fr=l:Fr=y($n(y(Ad(l,tt)),Qe)),Ap=y(u-Ze),l=y(Ap-ct),Mt(l)|0?Lo=l:Lo=y($n(y(Ad(l,Ge)),He)),Qe=ui?Fr:Lo,Wn=ui?Lo:Fr;e:do if((fr|0)==1)for(A=0,G=0;;){if(M=ws(o,G)|0,!A)y(ZA(M))>y(0)&&y(Rh(M))>y(0)?A=M:A=0;else if(n2(M)|0){We=0;break e}if(G=G+1|0,G>>>0>=fo>>>0){We=A;break}}else We=0;while(!1);Lt=We+500|0,qr=We+504|0,A=0,M=0,l=y(0),ae=0;do{if(G=n[(n[_o>>2]|0)+(ae<<2)>>2]|0,(n[G+36>>2]|0)==1)Dy(G),s[G+985>>0]=1,s[G+984>>0]=0;else{Sf(G),T&&xh(G,ft(G,Hs)|0,Qe,Wn,Fr);do if((n[G+24>>2]|0)!=1)if((G|0)==(We|0)){n[Lt>>2]=n[2278],h[qr>>2]=y(0);break}else{mP(o,G,Fr,d,Lo,Fr,Lo,m,Hs,_);break}else M|0&&(n[M+960>>2]=G),n[G+960>>2]=0,M=G,A=A|0?A:G;while(!1);Us=y(h[G+504>>2]),l=y(l+y(Us+y(yn(G,Mr,Fr))))}ae=ae+1|0}while((ae|0)!=(fo|0));for(No=l>Qe,Ec=ku&((fr|0)==2&No)?1:fr,Hn=(Ic|0)==1,$a=Hn&(T^1),Vh=(Ec|0)==1,Kh=(Ec|0)==2,dc=976+(Mr<<2)|0,Jh=(Ic|2|0)==2,Xh=Hn&(ku^1),Ff=1040+(Ar<<2)|0,Nf=1040+(Mr<<2)|0,zh=976+(Ar<<2)|0,Zh=(Ic|0)!=1,No=ku&((fr|0)!=0&No),Fo=o+976|0,Hn=Hn^1,l=Qe,Hr=0,Oo=0,Us=y(0),Qu=y(0);;){e:do if(Hr>>>0>>0)for(qr=n[_o>>2]|0,ae=0,Ge=y(0),He=y(0),tt=y(0),Qe=y(0),G=0,M=0,We=Hr;;){if(Lt=n[qr+(We<<2)>>2]|0,(n[Lt+36>>2]|0)!=1&&(n[Lt+940>>2]=Oo,(n[Lt+24>>2]|0)!=1)){if(Ze=y(yn(Lt,Mr,Fr)),on=n[dc>>2]|0,u=y(Xr(Lt+380+(on<<3)|0,Mo)),ct=y(h[Lt+504>>2]),u=y(Ad(u,ct)),u=y($n(y(Xr(Lt+364+(on<<3)|0,Mo)),u)),ku&(ae|0)!=0&y(Ze+y(He+u))>l){m=ae,Ze=Ge,fr=We;break e}Ze=y(Ze+u),u=y(He+Ze),Ze=y(Ge+Ze),n2(Lt)|0&&(tt=y(tt+y(ZA(Lt))),Qe=y(Qe-y(ct*y(Rh(Lt))))),M|0&&(n[M+960>>2]=Lt),n[Lt+960>>2]=0,ae=ae+1|0,M=Lt,G=G|0?G:Lt}else Ze=Ge,u=He;if(We=We+1|0,We>>>0>>0)Ge=Ze,He=u;else{m=ae,fr=We;break}}else m=0,Ze=y(0),tt=y(0),Qe=y(0),G=0,fr=Hr;while(!1);on=tt>y(0)&tty(0)&QeLf&((Mt(Lf)|0)^1))l=Lf,on=51;else if(s[(n[Fo>>2]|0)+3>>0]|0)on=51;else{if($t!=y(0)&&y(ZA(o))!=y(0)){on=53;break}l=Ze,on=53}while(!1);if((on|0)==51&&(on=0,Mt(l)|0?on=53:(Tr=y(l-Ze),cr=l)),(on|0)==53&&(on=0,Ze>2]|0,We=Try(0),He=y(Tr/$t),tt=y(0),Ze=y(0),l=y(0),M=G;do u=y(Xr(M+380+(ae<<3)|0,Mo)),Qe=y(Xr(M+364+(ae<<3)|0,Mo)),Qe=y(Ad(u,y($n(Qe,y(h[M+504>>2]))))),We?(u=y(Qe*y(Rh(M))),u!=y(-0)&&(zt=y(Qe-y(ct*u)),cp=y(Gn(M,Mr,zt,cr,Fr)),zt!=cp)&&(tt=y(tt-y(cp-Qe)),l=y(l+u))):Lt&&(Mf=y(ZA(M)),Mf!=y(0))&&(zt=y(Qe+y(He*Mf)),up=y(Gn(M,Mr,zt,cr,Fr)),zt!=up)&&(tt=y(tt-y(up-Qe)),Ze=y(Ze-Mf)),M=n[M+960>>2]|0;while(M|0);if(l=y(Ge+l),Qe=y(Tr+tt),lp)l=y(0);else{ct=y($t+Ze),We=n[dc>>2]|0,Lt=Qey(0),ct=y(Qe/ct),l=y(0);do{zt=y(Xr(G+380+(We<<3)|0,Mo)),tt=y(Xr(G+364+(We<<3)|0,Mo)),tt=y(Ad(zt,y($n(tt,y(h[G+504>>2]))))),Lt?(zt=y(tt*y(Rh(G))),Qe=y(-zt),zt!=y(-0)?(zt=y(He*Qe),Qe=y(Gn(G,Mr,y(tt+(qr?Qe:zt)),cr,Fr))):Qe=tt):ae&&(fp=y(ZA(G)),fp!=y(0))?Qe=y(Gn(G,Mr,y(tt+y(ct*fp)),cr,Fr)):Qe=tt,l=y(l-y(Qe-tt)),Ze=y(yn(G,Mr,Fr)),u=y(yn(G,Ar,Fr)),Qe=y(Qe+Ze),h[Ml>>2]=Qe,n[yc>>2]=1,tt=y(h[G+396>>2]);e:do if(Mt(tt)|0){M=Mt(Wn)|0;do if(!M){if(No|(oo(G,Ar,Wn)|0|Hn)||(as(o,G)|0)!=4||(n[(Ql(G,Ar)|0)+4>>2]|0)==3||(n[(Tl(G,Ar)|0)+4>>2]|0)==3)break;h[lo>>2]=Wn,n[ya>>2]=1;break e}while(!1);if(oo(G,Ar,Wn)|0){M=n[G+992+(n[zh>>2]<<2)>>2]|0,zt=y(u+y(Xr(M,Wn))),h[lo>>2]=zt,M=Zh&(n[M+4>>2]|0)==2,n[ya>>2]=((Mt(zt)|0|M)^1)&1;break}else{h[lo>>2]=Wn,n[ya>>2]=M?0:2;break}}else zt=y(Qe-Ze),$t=y(zt/tt),zt=y(tt*zt),n[ya>>2]=1,h[lo>>2]=y(u+(ui?$t:zt));while(!1);Bu(G,Mr,cr,Fr,yc,Ml),Bu(G,Ar,Wn,Fr,ya,lo);do if(!(oo(G,Ar,Wn)|0)&&(as(o,G)|0)==4){if((n[(Ql(G,Ar)|0)+4>>2]|0)==3){M=0;break}M=(n[(Tl(G,Ar)|0)+4>>2]|0)!=3}else M=0;while(!1);zt=y(h[Ml>>2]),$t=y(h[lo>>2]),yp=n[yc>>2]|0,vi=n[ya>>2]|0,kl(G,ui?zt:$t,ui?$t:zt,Hs,ui?yp:vi,ui?vi:yp,Fr,Lo,T&(M^1),3488,_)|0,s[mc>>0]=s[mc>>0]|s[G+508>>0],G=n[G+960>>2]|0}while(G|0)}}else l=y(0);if(l=y(Tr+l),vi=l>0]=vi|c[mc>>0],Kh&l>y(0)?(M=n[dc>>2]|0,n[o+364+(M<<3)+4>>2]|0&&(co=y(Xr(o+364+(M<<3)|0,Mo)),co>=y(0))?Qe=y($n(y(0),y(co-y(cr-l)))):Qe=y(0)):Qe=l,Lt=Hr>>>0>>0,Lt){We=n[_o>>2]|0,ae=Hr,M=0;do G=n[We+(ae<<2)>>2]|0,n[G+24>>2]|0||(M=((n[(Ql(G,Mr)|0)+4>>2]|0)==3&1)+M|0,M=M+((n[(Tl(G,Mr)|0)+4>>2]|0)==3&1)|0),ae=ae+1|0;while((ae|0)!=(fr|0));M?(Ze=y(0),u=y(0)):on=101}else on=101;e:do if((on|0)==101)switch(on=0,$h|0){case 1:{M=0,Ze=y(Qe*y(.5)),u=y(0);break e}case 2:{M=0,Ze=Qe,u=y(0);break e}case 3:{if(m>>>0<=1){M=0,Ze=y(0),u=y(0);break e}u=y((m+-1|0)>>>0),M=0,Ze=y(0),u=y(y($n(Qe,y(0)))/u);break e}case 5:{u=y(Qe/y((m+1|0)>>>0)),M=0,Ze=u;break e}case 4:{u=y(Qe/y(m>>>0)),M=0,Ze=y(u*y(.5));break e}default:{M=0,Ze=y(0),u=y(0);break e}}while(!1);if(l=y(e0+Ze),Lt){tt=y(Qe/y(M|0)),ae=n[_o>>2]|0,G=Hr,Qe=y(0);do{M=n[ae+(G<<2)>>2]|0;e:do if((n[M+36>>2]|0)!=1){switch(n[M+24>>2]|0){case 1:{if(ga(M,Mr)|0){if(!T)break e;zt=y(XA(M,Mr,cr)),zt=y(zt+y(Br(o,Mr))),zt=y(zt+y(J(M,Mr,Fr))),h[M+400+(n[Nf>>2]<<2)>>2]=zt;break e}break}case 0:if(vi=(n[(Ql(M,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=vi?zt:l,T&&(vi=M+400+(n[Nf>>2]<<2)|0,h[vi>>2]=y(l+y(h[vi>>2]))),vi=(n[(Tl(M,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=vi?zt:l,$a){zt=y(u+y(yn(M,Mr,Fr))),Qe=Wn,l=y(l+y(zt+y(h[M+504>>2])));break e}else{l=y(l+y(u+y($A(M,Mr,Fr)))),Qe=y($n(Qe,y($A(M,Ar,Fr))));break e}default:}T&&(zt=y(Ze+y(Br(o,Mr))),vi=M+400+(n[Nf>>2]<<2)|0,h[vi>>2]=y(zt+y(h[vi>>2])))}while(!1);G=G+1|0}while((G|0)!=(fr|0))}else Qe=y(0);if(u=y(t0+l),Jh?Ze=y(y(Gn(o,Ar,y(uo+Qe),Fu,B))-uo):Ze=Wn,tt=y(y(Gn(o,Ar,y(uo+(Xh?Wn:Qe)),Fu,B))-uo),Lt&T){G=Hr;do{ae=n[(n[_o>>2]|0)+(G<<2)>>2]|0;do if((n[ae+36>>2]|0)!=1){if((n[ae+24>>2]|0)==1){if(ga(ae,Ar)|0){if(zt=y(XA(ae,Ar,Wn)),zt=y(zt+y(Br(o,Ar))),zt=y(zt+y(J(ae,Ar,Fr))),M=n[Ff>>2]|0,h[ae+400+(M<<2)>>2]=zt,!(Mt(zt)|0))break}else M=n[Ff>>2]|0;zt=y(Br(o,Ar)),h[ae+400+(M<<2)>>2]=y(zt+y(J(ae,Ar,Fr)));break}M=as(o,ae)|0;do if((M|0)==4){if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){on=139;break}if((n[(Tl(ae,Ar)|0)+4>>2]|0)==3){on=139;break}if(oo(ae,Ar,Wn)|0){l=Le;break}yp=n[ae+908+(n[dc>>2]<<2)>>2]|0,n[lo>>2]=yp,l=y(h[ae+396>>2]),vi=Mt(l)|0,Qe=(n[S>>2]=yp,y(h[S>>2])),vi?l=tt:(Tr=y(yn(ae,Ar,Fr)),zt=y(Qe/l),l=y(l*Qe),l=y(Tr+(ui?zt:l))),h[Ml>>2]=l,h[lo>>2]=y(y(yn(ae,Mr,Fr))+Qe),n[ya>>2]=1,n[yc>>2]=1,Bu(ae,Mr,cr,Fr,ya,lo),Bu(ae,Ar,Wn,Fr,yc,Ml),l=y(h[lo>>2]),Tr=y(h[Ml>>2]),zt=ui?l:Tr,l=ui?Tr:l,vi=((Mt(zt)|0)^1)&1,kl(ae,zt,l,Hs,vi,((Mt(l)|0)^1)&1,Fr,Lo,1,3493,_)|0,l=Le}else on=139;while(!1);e:do if((on|0)==139){on=0,l=y(Ze-y($A(ae,Ar,Fr)));do if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){if((n[(Tl(ae,Ar)|0)+4>>2]|0)!=3)break;l=y(Le+y($n(y(0),y(l*y(.5)))));break e}while(!1);if((n[(Tl(ae,Ar)|0)+4>>2]|0)==3){l=Le;break}if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){l=y(Le+y($n(y(0),l)));break}switch(M|0){case 1:{l=Le;break e}case 2:{l=y(Le+y(l*y(.5)));break e}default:{l=y(Le+l);break e}}}while(!1);zt=y(Us+l),vi=ae+400+(n[Ff>>2]<<2)|0,h[vi>>2]=y(zt+y(h[vi>>2]))}while(!1);G=G+1|0}while((G|0)!=(fr|0))}if(Us=y(Us+tt),Qu=y($n(Qu,u)),m=Oo+1|0,fr>>>0>=fo>>>0)break;l=cr,Hr=fr,Oo=m}do if(T){if(M=m>>>0>1,!M&&!(WL(o)|0))break;if(!(Mt(Wn)|0)){l=y(Wn-Us);e:do switch(n[o+12>>2]|0){case 3:{Le=y(Le+l),He=y(0);break}case 2:{Le=y(Le+y(l*y(.5))),He=y(0);break}case 4:{Wn>Us?He=y(l/y(m>>>0)):He=y(0);break}case 7:if(Wn>Us){Le=y(Le+y(l/y(m<<1>>>0))),He=y(l/y(m>>>0)),He=M?He:y(0);break e}else{Le=y(Le+y(l*y(.5))),He=y(0);break e}case 6:{He=y(l/y(Oo>>>0)),He=Wn>Us&M?He:y(0);break}default:He=y(0)}while(!1);if(m|0)for(Lt=1040+(Ar<<2)|0,qr=976+(Ar<<2)|0,We=0,G=0;;){e:do if(G>>>0>>0)for(Qe=y(0),tt=y(0),l=y(0),ae=G;;){M=n[(n[_o>>2]|0)+(ae<<2)>>2]|0;do if((n[M+36>>2]|0)!=1&&!(n[M+24>>2]|0)){if((n[M+940>>2]|0)!=(We|0))break e;if(YL(M,Ar)|0&&(zt=y(h[M+908+(n[qr>>2]<<2)>>2]),l=y($n(l,y(zt+y(yn(M,Ar,Fr)))))),(as(o,M)|0)!=5)break;co=y(Wg(M)),co=y(co+y(J(M,0,Fr))),zt=y(h[M+912>>2]),zt=y(y(zt+y(yn(M,0,Fr)))-co),co=y($n(tt,co)),zt=y($n(Qe,zt)),Qe=zt,tt=co,l=y($n(l,y(co+zt)))}while(!1);if(M=ae+1|0,M>>>0>>0)ae=M;else{ae=M;break}}else tt=y(0),l=y(0),ae=G;while(!1);if(ct=y(He+l),u=Le,Le=y(Le+ct),G>>>0>>0){Ze=y(u+tt),M=G;do{G=n[(n[_o>>2]|0)+(M<<2)>>2]|0;e:do if((n[G+36>>2]|0)!=1&&!(n[G+24>>2]|0))switch(as(o,G)|0){case 1:{zt=y(u+y(J(G,Ar,Fr))),h[G+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 3:{zt=y(y(Le-y(re(G,Ar,Fr)))-y(h[G+908+(n[qr>>2]<<2)>>2])),h[G+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 2:{zt=y(u+y(y(ct-y(h[G+908+(n[qr>>2]<<2)>>2]))*y(.5))),h[G+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 4:{if(zt=y(u+y(J(G,Ar,Fr))),h[G+400+(n[Lt>>2]<<2)>>2]=zt,oo(G,Ar,Wn)|0||(ui?(Qe=y(h[G+908>>2]),l=y(Qe+y(yn(G,Mr,Fr))),tt=ct):(tt=y(h[G+912>>2]),tt=y(tt+y(yn(G,Ar,Fr))),l=ct,Qe=y(h[G+908>>2])),mn(l,Qe)|0&&mn(tt,y(h[G+912>>2]))|0))break e;kl(G,l,tt,Hs,1,1,Fr,Lo,1,3501,_)|0;break e}case 5:{h[G+404>>2]=y(y(Ze-y(Wg(G)))+y(XA(G,0,Wn)));break e}default:break e}while(!1);M=M+1|0}while((M|0)!=(ae|0))}if(We=We+1|0,(We|0)==(m|0))break;G=ae}}}while(!1);if(h[o+908>>2]=y(Gn(o,2,Tu,B,B)),h[o+912>>2]=y(Gn(o,0,Ap,k,B)),Ec|0&&(pp=n[o+32>>2]|0,hp=(Ec|0)==2,!(hp&(pp|0)!=2))?hp&(pp|0)==2&&(l=y(Ru+cr),l=y($n(y(Ad(l,y(Yg(o,Mr,Qu,Mo)))),Ru)),on=198):(l=y(Gn(o,Mr,Qu,Mo,B)),on=198),(on|0)==198&&(h[o+908+(n[976+(Mr<<2)>>2]<<2)>>2]=l),Ic|0&&(dp=n[o+32>>2]|0,mp=(Ic|0)==2,!(mp&(dp|0)!=2))?mp&(dp|0)==2&&(l=y(uo+Wn),l=y($n(y(Ad(l,y(Yg(o,Ar,y(uo+Us),Fu)))),uo)),on=204):(l=y(Gn(o,Ar,y(uo+Us),Fu,B)),on=204),(on|0)==204&&(h[o+908+(n[976+(Ar<<2)>>2]<<2)>>2]=l),T){if((n[gp>>2]|0)==2){G=976+(Ar<<2)|0,ae=1040+(Ar<<2)|0,M=0;do We=ws(o,M)|0,n[We+24>>2]|0||(yp=n[G>>2]|0,zt=y(h[o+908+(yp<<2)>>2]),vi=We+400+(n[ae>>2]<<2)|0,zt=y(zt-y(h[vi>>2])),h[vi>>2]=y(zt-y(h[We+908+(yp<<2)>>2]))),M=M+1|0;while((M|0)!=(fo|0))}if(A|0){M=ui?Ec:d;do VL(o,A,Fr,M,Lo,Hs,_),A=n[A+960>>2]|0;while(A|0)}if(M=(Mr|2|0)==3,G=(Ar|2|0)==3,M|G){A=0;do ae=n[(n[_o>>2]|0)+(A<<2)>>2]|0,(n[ae+36>>2]|0)!=1&&(M&&i2(o,ae,Mr),G&&i2(o,ae,Ar)),A=A+1|0;while((A|0)!=(fo|0))}}}while(!1);I=Cc}function Ph(o,l){o=o|0,l=y(l);var u=0;ja(o,l>=y(0),3147),u=l==y(0),h[o+4>>2]=u?y(0):l}function KA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=A|0;var d=Xe,m=Xe,B=0,k=0,T=0;n[2278]=(n[2278]|0)+1,Sf(o),oo(o,2,l)|0?(d=y(Xr(n[o+992>>2]|0,l)),T=1,d=y(d+y(yn(o,2,l)))):(d=y(Xr(o+380|0,l)),d>=y(0)?T=2:(T=((Mt(l)|0)^1)&1,d=l)),oo(o,0,u)|0?(m=y(Xr(n[o+996>>2]|0,u)),k=1,m=y(m+y(yn(o,0,l)))):(m=y(Xr(o+388|0,u)),m>=y(0)?k=2:(k=((Mt(u)|0)^1)&1,m=u)),B=o+976|0,kl(o,d,m,A,T,k,l,u,1,3189,n[B>>2]|0)|0&&(xh(o,n[o+496>>2]|0,l,u,l),JA(o,y(h[(n[B>>2]|0)+4>>2]),y(0),y(0)),s[11696]|0)&&jg(o,7)}function Sf(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;k=I,I=I+32|0,B=k+24|0,m=k+16|0,A=k+8|0,d=k,u=0;do l=o+380+(u<<3)|0,n[o+380+(u<<3)+4>>2]|0&&(T=l,_=n[T+4>>2]|0,M=A,n[M>>2]=n[T>>2],n[M+4>>2]=_,M=o+364+(u<<3)|0,_=n[M+4>>2]|0,T=d,n[T>>2]=n[M>>2],n[T+4>>2]=_,n[m>>2]=n[A>>2],n[m+4>>2]=n[A+4>>2],n[B>>2]=n[d>>2],n[B+4>>2]=n[d+4>>2],wf(m,B)|0)||(l=o+348+(u<<3)|0),n[o+992+(u<<2)>>2]=l,u=u+1|0;while((u|0)!=2);I=k}function oo(o,l,u){o=o|0,l=l|0,u=y(u);var A=0;switch(o=n[o+992+(n[976+(l<<2)>>2]<<2)>>2]|0,n[o+4>>2]|0){case 0:case 3:{o=0;break}case 1:{y(h[o>>2])>2])>2]|0){case 2:{l=y(y(y(h[o>>2])*l)/y(100));break}case 1:{l=y(h[o>>2]);break}default:l=y(ce)}return y(l)}function xh(o,l,u,A,d){o=o|0,l=l|0,u=y(u),A=y(A),d=y(d);var m=0,B=Xe;l=n[o+944>>2]|0?l:1,m=dr(n[o+4>>2]|0,l)|0,l=Sy(m,l)|0,u=y(yP(o,m,u)),A=y(yP(o,l,A)),B=y(u+y(J(o,m,d))),h[o+400+(n[1040+(m<<2)>>2]<<2)>>2]=B,u=y(u+y(re(o,m,d))),h[o+400+(n[1e3+(m<<2)>>2]<<2)>>2]=u,u=y(A+y(J(o,l,d))),h[o+400+(n[1040+(l<<2)>>2]<<2)>>2]=u,d=y(A+y(re(o,l,d))),h[o+400+(n[1e3+(l<<2)>>2]<<2)>>2]=d}function JA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=y(A);var d=0,m=0,B=Xe,k=Xe,T=0,_=0,M=Xe,G=0,ae=Xe,We=Xe,Le=Xe,Qe=Xe;if(l!=y(0)&&(d=o+400|0,Qe=y(h[d>>2]),m=o+404|0,Le=y(h[m>>2]),G=o+416|0,We=y(h[G>>2]),_=o+420|0,B=y(h[_>>2]),ae=y(Qe+u),M=y(Le+A),A=y(ae+We),k=y(M+B),T=(n[o+988>>2]|0)==1,h[d>>2]=y(os(Qe,l,0,T)),h[m>>2]=y(os(Le,l,0,T)),u=y(A_(y(We*l),y(1))),mn(u,y(0))|0?m=0:m=(mn(u,y(1))|0)^1,u=y(A_(y(B*l),y(1))),mn(u,y(0))|0?d=0:d=(mn(u,y(1))|0)^1,Qe=y(os(A,l,T&m,T&(m^1))),h[G>>2]=y(Qe-y(os(ae,l,0,T))),Qe=y(os(k,l,T&d,T&(d^1))),h[_>>2]=y(Qe-y(os(M,l,0,T))),m=(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2,m|0)){d=0;do JA(ws(o,d)|0,l,ae,M),d=d+1|0;while((d|0)!=(m|0))}}function By(o,l,u,A,d){switch(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,u|0){case 5:case 0:{o=WX(n[489]|0,A,d)|0;break}default:o=MYe(A,d)|0}return o|0}function Gg(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;d=I,I=I+16|0,m=d,n[m>>2]=A,kh(o,0,l,u,m),I=d}function kh(o,l,u,A,d){if(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,o=o|0?o:956,A$[n[o+8>>2]&1](o,l,u,A,d)|0,(u|0)==5)Nt();else return}function hc(o,l,u){o=o|0,l=l|0,u=u|0,s[o+l>>0]=u&1}function vy(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(Qh(o,A),kt(o,n[l>>2]|0,n[u>>2]|0,A))}function Qh(o,l){o=o|0,l=l|0;var u=0;if((O(o)|0)>>>0>>0&&sn(o),l>>>0>1073741823)Nt();else{u=Jt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function kt(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function O(o){return o=o|0,1073741823}function J(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+96>>2]|0?o=o+92|0:o=kn(o+60|0,n[1040+(l<<2)>>2]|0,992)|0,y(Ke(o,u))}function re(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+104>>2]|0?o=o+100|0:o=kn(o+60|0,n[1e3+(l<<2)>>2]|0,992)|0,y(Ke(o,u))}function de(o){return o=o|0,(o|1|0)==3|0}function Ke(o,l){return o=o|0,l=y(l),(n[o+4>>2]|0)==3?l=y(0):l=y(Xr(o,l)),y(l)}function ft(o,l){return o=o|0,l=l|0,o=n[o>>2]|0,(o|0?o:(l|0)>1?l:1)|0}function dr(o,l){o=o|0,l=l|0;var u=0;e:do if((l|0)==2){switch(o|0){case 2:{o=3;break e}case 3:break;default:{u=4;break e}}o=2}else u=4;while(!1);return o|0}function Br(o,l){o=o|0,l=l|0;var u=Xe;return de(l)|0&&n[o+312>>2]|0&&(u=y(h[o+308>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1040+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function _n(o,l){o=o|0,l=l|0;var u=Xe;return de(l)|0&&n[o+320>>2]|0&&(u=y(h[o+316>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1e3+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function mi(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return de(l)|0&&n[o+240>>2]|0&&(A=y(Xr(o+236|0,u)),A>=y(0))||(A=y($n(y(Xr(kn(o+204|0,n[1040+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function Bs(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return de(l)|0&&n[o+248>>2]|0&&(A=y(Xr(o+244|0,u)),A>=y(0))||(A=y($n(y(Xr(kn(o+204|0,n[1e3+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function zA(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=Xe,T=Xe,_=Xe,M=Xe,G=Xe,ae=Xe,We=0,Le=0,Qe=0;Qe=I,I=I+16|0,We=Qe,Le=o+964|0,Bi(o,(n[Le>>2]|0)!=0,3519),k=y(Ka(o,2,l)),T=y(Ka(o,0,l)),_=y(yn(o,2,l)),M=y(yn(o,0,l)),Mt(l)|0?G=l:G=y($n(y(0),y(y(l-_)-k))),Mt(u)|0?ae=u:ae=y($n(y(0),y(y(u-M)-T))),(A|0)==1&(d|0)==1?(h[o+908>>2]=y(Gn(o,2,y(l-_),m,m)),l=y(Gn(o,0,y(u-M),B,m))):(p$[n[Le>>2]&1](We,o,G,A,ae,d),G=y(k+y(h[We>>2])),ae=y(l-_),h[o+908>>2]=y(Gn(o,2,(A|2|0)==2?G:ae,m,m)),ae=y(T+y(h[We+4>>2])),l=y(u-M),l=y(Gn(o,0,(d|2|0)==2?ae:l,B,m))),h[o+912>>2]=l,I=Qe}function dP(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=Xe,T=Xe,_=Xe,M=Xe;_=y(Ka(o,2,m)),k=y(Ka(o,0,m)),M=y(yn(o,2,m)),T=y(yn(o,0,m)),l=y(l-M),h[o+908>>2]=y(Gn(o,2,(A|2|0)==2?_:l,m,m)),u=y(u-T),h[o+912>>2]=y(Gn(o,0,(d|2|0)==2?k:u,B,m))}function t2(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=0,T=Xe,_=Xe;return k=(A|0)==2,!(l<=y(0)&k)&&!(u<=y(0)&(d|0)==2)&&!((A|0)==1&(d|0)==1)?o=0:(T=y(yn(o,0,m)),_=y(yn(o,2,m)),k=l>2]=y(Gn(o,2,k?y(0):l,m,m)),l=y(u-T),k=u>2]=y(Gn(o,0,k?y(0):l,B,m)),o=1),o|0}function Sy(o,l){return o=o|0,l=l|0,Vg(o)|0?o=dr(2,l)|0:o=0,o|0}function Th(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(mi(o,l,u)),y(u+y(Br(o,l)))}function r2(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(Bs(o,l,u)),y(u+y(_n(o,l)))}function Ka(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return A=y(Th(o,l,u)),y(A+y(r2(o,l,u)))}function n2(o){return o=o|0,n[o+24>>2]|0?o=0:y(ZA(o))!=y(0)?o=1:o=y(Rh(o))!=y(0),o|0}function ZA(o){o=o|0;var l=Xe;if(n[o+944>>2]|0){if(l=y(h[o+44>>2]),Mt(l)|0)return l=y(h[o+40>>2]),o=l>y(0)&((Mt(l)|0)^1),y(o?l:y(0))}else l=y(0);return y(l)}function Rh(o){o=o|0;var l=Xe,u=0,A=Xe;do if(n[o+944>>2]|0){if(l=y(h[o+48>>2]),Mt(l)|0){if(u=s[(n[o+976>>2]|0)+2>>0]|0,!(u<<24>>24)&&(A=y(h[o+40>>2]),A>24?y(1):y(0)}}else l=y(0);while(!1);return y(l)}function Dy(o){o=o|0;var l=0,u=0;if(Xy(o+400|0,0,540)|0,s[o+985>>0]=1,ee(o),u=_i(o)|0,u|0){l=o+948|0,o=0;do Dy(n[(n[l>>2]|0)+(o<<2)>>2]|0),o=o+1|0;while((o|0)!=(u|0))}}function mP(o,l,u,A,d,m,B,k,T,_){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=y(m),B=y(B),k=k|0,T=T|0,_=_|0;var M=0,G=Xe,ae=0,We=0,Le=Xe,Qe=Xe,tt=0,Ze=Xe,ct=0,He=Xe,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0,Fo=0;Hn=I,I=I+16|0,qr=Hn+12|0,fr=Hn+8|0,$t=Hn+4|0,Tr=Hn,cr=dr(n[o+4>>2]|0,T)|0,Ge=de(cr)|0,G=y(Xr(KL(l)|0,Ge?m:B)),Lt=oo(l,2,m)|0,Hr=oo(l,0,B)|0;do if(!(Mt(G)|0)&&!(Mt(Ge?u:d)|0)){if(M=l+504|0,!(Mt(y(h[M>>2]))|0)&&(!(s2(n[l+976>>2]|0,0)|0)||(n[l+500>>2]|0)==(n[2278]|0)))break;h[M>>2]=y($n(G,y(Ka(l,cr,m))))}else ae=7;while(!1);do if((ae|0)==7){if(ct=Ge^1,!(ct|Lt^1)){B=y(Xr(n[l+992>>2]|0,m)),h[l+504>>2]=y($n(B,y(Ka(l,2,m))));break}if(!(Ge|Hr^1)){B=y(Xr(n[l+996>>2]|0,B)),h[l+504>>2]=y($n(B,y(Ka(l,0,m))));break}h[qr>>2]=y(ce),h[fr>>2]=y(ce),n[$t>>2]=0,n[Tr>>2]=0,Ze=y(yn(l,2,m)),He=y(yn(l,0,m)),Lt?(Le=y(Ze+y(Xr(n[l+992>>2]|0,m))),h[qr>>2]=Le,n[$t>>2]=1,We=1):(We=0,Le=y(ce)),Hr?(G=y(He+y(Xr(n[l+996>>2]|0,B))),h[fr>>2]=G,n[Tr>>2]=1,M=1):(M=0,G=y(ce)),ae=n[o+32>>2]|0,Ge&(ae|0)==2?ae=2:Mt(Le)|0&&!(Mt(u)|0)&&(h[qr>>2]=u,n[$t>>2]=2,We=2,Le=u),!((ae|0)==2&ct)&&Mt(G)|0&&!(Mt(d)|0)&&(h[fr>>2]=d,n[Tr>>2]=2,M=2,G=d),Qe=y(h[l+396>>2]),tt=Mt(Qe)|0;do if(tt)ae=We;else{if((We|0)==1&ct){h[fr>>2]=y(y(Le-Ze)/Qe),n[Tr>>2]=1,M=1,ae=1;break}Ge&(M|0)==1?(h[qr>>2]=y(Qe*y(G-He)),n[$t>>2]=1,M=1,ae=1):ae=We}while(!1);Fo=Mt(u)|0,We=(as(o,l)|0)!=4,!(Ge|Lt|((A|0)!=1|Fo)|(We|(ae|0)==1))&&(h[qr>>2]=u,n[$t>>2]=1,!tt)&&(h[fr>>2]=y(y(u-Ze)/Qe),n[Tr>>2]=1,M=1),!(Hr|ct|((k|0)!=1|(Mt(d)|0))|(We|(M|0)==1))&&(h[fr>>2]=d,n[Tr>>2]=1,!tt)&&(h[qr>>2]=y(Qe*y(d-He)),n[$t>>2]=1),Bu(l,2,m,m,$t,qr),Bu(l,0,B,m,Tr,fr),u=y(h[qr>>2]),d=y(h[fr>>2]),kl(l,u,d,T,n[$t>>2]|0,n[Tr>>2]|0,m,B,0,3565,_)|0,B=y(h[l+908+(n[976+(cr<<2)>>2]<<2)>>2]),h[l+504>>2]=y($n(B,y(Ka(l,cr,m))))}while(!1);n[l+500>>2]=n[2278],I=Hn}function Gn(o,l,u,A,d){return o=o|0,l=l|0,u=y(u),A=y(A),d=y(d),A=y(Yg(o,l,u,A)),y($n(A,y(Ka(o,l,d))))}function as(o,l){return o=o|0,l=l|0,l=l+20|0,l=n[(n[l>>2]|0?l:o+16|0)>>2]|0,(l|0)==5&&Vg(n[o+4>>2]|0)|0&&(l=1),l|0}function Ql(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+96>>2]|0?l=4:l=n[1040+(l<<2)>>2]|0,o+60+(l<<3)|0}function Tl(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+104>>2]|0?l=5:l=n[1e3+(l<<2)>>2]|0,o+60+(l<<3)|0}function Bu(o,l,u,A,d,m){switch(o=o|0,l=l|0,u=y(u),A=y(A),d=d|0,m=m|0,u=y(Xr(o+380+(n[976+(l<<2)>>2]<<3)|0,u)),u=y(u+y(yn(o,l,A))),n[d>>2]|0){case 2:case 1:{d=Mt(u)|0,A=y(h[m>>2]),h[m>>2]=d|A>2]=2,h[m>>2]=u);break}default:}}function ga(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,4,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1040+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function XA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,4,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1040+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Xr(A,u))),y(u)}function $A(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return A=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),A=y(A+y(J(o,l,u))),y(A+y(re(o,l,u)))}function WL(o){o=o|0;var l=0,u=0,A=0;e:do if(Vg(n[o+4>>2]|0)|0)l=0;else if((n[o+16>>2]|0)!=5)if(u=_i(o)|0,!u)l=0;else for(l=0;;){if(A=ws(o,l)|0,!(n[A+24>>2]|0)&&(n[A+20>>2]|0)==5){l=1;break e}if(l=l+1|0,l>>>0>=u>>>0){l=0;break}}else l=1;while(!1);return l|0}function YL(o,l){o=o|0,l=l|0;var u=Xe;return u=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),u>=y(0)&((Mt(u)|0)^1)|0}function Wg(o){o=o|0;var l=Xe,u=0,A=0,d=0,m=0,B=0,k=0,T=Xe;if(u=n[o+968>>2]|0,u)T=y(h[o+908>>2]),l=y(h[o+912>>2]),l=y(l$[u&0](o,T,l)),Bi(o,(Mt(l)|0)^1,3573);else{m=_i(o)|0;do if(m|0){for(u=0,d=0;;){if(A=ws(o,d)|0,n[A+940>>2]|0){B=8;break}if((n[A+24>>2]|0)!=1)if(k=(as(o,A)|0)==5,k){u=A;break}else u=u|0?u:A;if(d=d+1|0,d>>>0>=m>>>0){B=8;break}}if((B|0)==8&&!u)break;return l=y(Wg(u)),y(l+y(h[u+404>>2]))}while(!1);l=y(h[o+912>>2])}return y(l)}function Yg(o,l,u,A){o=o|0,l=l|0,u=y(u),A=y(A);var d=Xe,m=0;return Vg(l)|0?(l=1,m=3):de(l)|0?(l=0,m=3):(A=y(ce),d=y(ce)),(m|0)==3&&(d=y(Xr(o+364+(l<<3)|0,A)),A=y(Xr(o+380+(l<<3)|0,A))),m=A=y(0)&((Mt(A)|0)^1)),u=m?A:u,m=d>=y(0)&((Mt(d)|0)^1)&u>2]|0,m)|0,Le=Sy(tt,m)|0,Qe=de(tt)|0,G=y(yn(l,2,u)),ae=y(yn(l,0,u)),oo(l,2,u)|0?k=y(G+y(Xr(n[l+992>>2]|0,u))):ga(l,2)|0&&by(l,2)|0?(k=y(h[o+908>>2]),T=y(Br(o,2)),T=y(k-y(T+y(_n(o,2)))),k=y(XA(l,2,u)),k=y(Gn(l,2,y(T-y(k+y(Fh(l,2,u)))),u,u))):k=y(ce),oo(l,0,d)|0?T=y(ae+y(Xr(n[l+996>>2]|0,d))):ga(l,0)|0&&by(l,0)|0?(T=y(h[o+912>>2]),ct=y(Br(o,0)),ct=y(T-y(ct+y(_n(o,0)))),T=y(XA(l,0,d)),T=y(Gn(l,0,y(ct-y(T+y(Fh(l,0,d)))),d,u))):T=y(ce),_=Mt(k)|0,M=Mt(T)|0;do if(_^M&&(We=y(h[l+396>>2]),!(Mt(We)|0)))if(_){k=y(G+y(y(T-ae)*We));break}else{ct=y(ae+y(y(k-G)/We)),T=M?ct:T;break}while(!1);M=Mt(k)|0,_=Mt(T)|0,M|_&&(He=(M^1)&1,A=u>y(0)&((A|0)!=0&M),k=Qe?k:A?u:k,kl(l,k,T,m,Qe?He:A?2:He,M&(_^1)&1,k,T,0,3623,B)|0,k=y(h[l+908>>2]),k=y(k+y(yn(l,2,u))),T=y(h[l+912>>2]),T=y(T+y(yn(l,0,u)))),kl(l,k,T,m,1,1,k,T,1,3635,B)|0,by(l,tt)|0&&!(ga(l,tt)|0)?(He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(_n(o,tt))),ct=y(ct-y(re(l,tt,u))),ct=y(ct-y(Fh(l,tt,Qe?u:d))),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct):Ze=21;do if((Ze|0)==21){if(!(ga(l,tt)|0)&&(n[o+8>>2]|0)==1){He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct;break}!(ga(l,tt)|0)&&(n[o+8>>2]|0)==2&&(He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct)}while(!1);by(l,Le)|0&&!(ga(l,Le)|0)?(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(_n(o,Le))),ct=y(ct-y(re(l,Le,u))),ct=y(ct-y(Fh(l,Le,Qe?d:u))),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct):Ze=30;do if((Ze|0)==30&&!(ga(l,Le)|0)){if((as(o,l)|0)==2){He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct;break}He=(as(o,l)|0)==3,He^(n[o+28>>2]|0)==2&&(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct)}while(!1)}function i2(o,l,u){o=o|0,l=l|0,u=u|0;var A=Xe,d=0;d=n[976+(u<<2)>>2]|0,A=y(h[l+908+(d<<2)>>2]),A=y(y(h[o+908+(d<<2)>>2])-A),A=y(A-y(h[l+400+(n[1040+(u<<2)>>2]<<2)>>2])),h[l+400+(n[1e3+(u<<2)>>2]<<2)>>2]=A}function Vg(o){return o=o|0,(o|1|0)==1|0}function KL(o){o=o|0;var l=Xe;switch(n[o+56>>2]|0){case 0:case 3:{l=y(h[o+40>>2]),l>y(0)&((Mt(l)|0)^1)?o=s[(n[o+976>>2]|0)+2>>0]|0?1056:992:o=1056;break}default:o=o+52|0}return o|0}function s2(o,l){return o=o|0,l=l|0,(s[o+l>>0]|0)!=0|0}function by(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,5,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1e3+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function Fh(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,5,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1e3+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Xr(A,u))),y(u)}function yP(o,l,u){return o=o|0,l=l|0,u=y(u),ga(o,l)|0?u=y(XA(o,l,u)):u=y(-y(Fh(o,l,u))),y(u)}function EP(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function Py(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Jt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function IP(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function xy(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&Et(o)}function CP(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;if(B=o+4|0,k=n[B>>2]|0,d=k-A|0,m=d>>2,o=l+(m<<2)|0,o>>>0>>0){A=k;do n[A>>2]=n[o>>2],o=o+4|0,A=(n[B>>2]|0)+4|0,n[B>>2]=A;while(o>>>0>>0)}m|0&&Q2(k+(0-m<<2)|0,l|0,d|0)|0}function wP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0;return k=l+4|0,T=n[k>>2]|0,d=n[o>>2]|0,B=u,m=B-d|0,A=T+(0-(m>>2)<<2)|0,n[k>>2]=A,(m|0)>0&&Qr(A|0,d|0,m|0)|0,d=o+4|0,m=l+8|0,A=(n[d>>2]|0)-B|0,(A|0)>0&&(Qr(n[m>>2]|0,u|0,A|0)|0,n[m>>2]=(n[m>>2]|0)+(A>>>2<<2)),B=n[o>>2]|0,n[o>>2]=n[k>>2],n[k>>2]=B,B=n[d>>2]|0,n[d>>2]=n[m>>2],n[m>>2]=B,B=o+8|0,u=l+12|0,o=n[B>>2]|0,n[B>>2]=n[u>>2],n[u>>2]=o,n[l>>2]=n[k>>2],T|0}function o2(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;if(B=n[l>>2]|0,m=n[u>>2]|0,(B|0)!=(m|0)){d=o+8|0,u=((m+-4-B|0)>>>2)+1|0,o=B,A=n[d>>2]|0;do n[A>>2]=n[o>>2],A=(n[d>>2]|0)+4|0,n[d>>2]=A,o=o+4|0;while((o|0)!=(m|0));n[l>>2]=B+(u<<2)}}function a2(){fa()}function BP(){var o=0;return o=Jt(4)|0,l2(o),o|0}function l2(o){o=o|0,n[o>>2]=pc()|0}function vP(o){o=o|0,o|0&&(Kg(o),Et(o))}function Kg(o){o=o|0,st(n[o>>2]|0)}function JL(o,l,u){o=o|0,l=l|0,u=u|0,hc(n[o>>2]|0,l,u)}function ky(o,l){o=o|0,l=y(l),Ph(n[o>>2]|0,l)}function Qy(o,l){return o=o|0,l=l|0,s2(n[o>>2]|0,l)|0}function Ty(){var o=0;return o=Jt(8)|0,Jg(o,0),o|0}function Jg(o,l){o=o|0,l=l|0,l?l=Aa(n[l>>2]|0)|0:l=is()|0,n[o>>2]=l,n[o+4>>2]=0,Tn(l,o)}function Ry(o){o=o|0;var l=0;return l=Jt(8)|0,Jg(l,o),l|0}function zg(o){o=o|0,o|0&&(Fy(o),Et(o))}function Fy(o){o=o|0;var l=0;fc(n[o>>2]|0),l=o+4|0,o=n[l>>2]|0,n[l>>2]=0,o|0&&(Df(o),Et(o))}function Df(o){o=o|0,bf(o)}function bf(o){o=o|0,o=n[o>>2]|0,o|0&&Oa(o|0)}function c2(o){return o=o|0,Ga(o)|0}function u2(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Df(l),Et(l)),Ac(n[o>>2]|0)}function Ny(o,l){o=o|0,l=l|0,fn(n[o>>2]|0,n[l>>2]|0)}function zL(o,l){o=o|0,l=l|0,vh(n[o>>2]|0,l)}function ZL(o,l,u){o=o|0,l=l|0,u=+u,Ey(n[o>>2]|0,l,y(u))}function Oy(o,l,u){o=o|0,l=l|0,u=+u,Iy(n[o>>2]|0,l,y(u))}function f2(o,l){o=o|0,l=l|0,Ch(n[o>>2]|0,l)}function A2(o,l){o=o|0,l=l|0,bo(n[o>>2]|0,l)}function xr(o,l){o=o|0,l=l|0,Bh(n[o>>2]|0,l)}function ao(o,l){o=o|0,l=l|0,gy(n[o>>2]|0,l)}function Xi(o,l){o=o|0,l=l|0,Fg(n[o>>2]|0,l)}function Ls(o,l){o=o|0,l=l|0,Do(n[o>>2]|0,l)}function ep(o,l,u){o=o|0,l=l|0,u=+u,qA(n[o>>2]|0,l,y(u))}function p2(o,l,u){o=o|0,l=l|0,u=+u,Y(n[o>>2]|0,l,y(u))}function vs(o,l){o=o|0,l=l|0,GA(n[o>>2]|0,l)}function Ly(o,l){o=o|0,l=l|0,my(n[o>>2]|0,l)}function Nh(o,l){o=o|0,l=l|0,Po(n[o>>2]|0,l)}function Zg(o,l){o=o|0,l=+l,Sh(n[o>>2]|0,y(l))}function Oh(o,l){o=o|0,l=+l,Pl(n[o>>2]|0,y(l))}function h2(o,l){o=o|0,l=+l,yy(n[o>>2]|0,y(l))}function g2(o,l){o=o|0,l=+l,Og(n[o>>2]|0,y(l))}function d2(o,l){o=o|0,l=+l,bl(n[o>>2]|0,y(l))}function m2(o,l){o=o|0,l=+l,Lg(n[o>>2]|0,y(l))}function Pf(o,l){o=o|0,l=+l,e2(n[o>>2]|0,y(l))}function sr(o){o=o|0,Dh(n[o>>2]|0)}function My(o,l){o=o|0,l=+l,Zi(n[o>>2]|0,y(l))}function y2(o,l){o=o|0,l=+l,Ef(n[o>>2]|0,y(l))}function gc(o){o=o|0,Wa(n[o>>2]|0)}function xf(o,l){o=o|0,l=+l,yu(n[o>>2]|0,y(l))}function Xg(o,l){o=o|0,l=+l,If(n[o>>2]|0,y(l))}function $g(o,l){o=o|0,l=+l,di(n[o>>2]|0,y(l))}function E2(o,l){o=o|0,l=+l,WA(n[o>>2]|0,y(l))}function I2(o,l){o=o|0,l=+l,pa(n[o>>2]|0,y(l))}function vu(o,l){o=o|0,l=+l,Va(n[o>>2]|0,y(l))}function ed(o,l){o=o|0,l=+l,bh(n[o>>2]|0,y(l))}function C2(o,l){o=o|0,l=+l,Ug(n[o>>2]|0,y(l))}function _y(o,l){o=o|0,l=+l,YA(n[o>>2]|0,y(l))}function Su(o,l,u){o=o|0,l=l|0,u=+u,mu(n[o>>2]|0,l,y(u))}function Uy(o,l,u){o=o|0,l=l|0,u=+u,xo(n[o>>2]|0,l,y(u))}function td(o,l,u){o=o|0,l=l|0,u=+u,yf(n[o>>2]|0,l,y(u))}function rd(o){return o=o|0,Rg(n[o>>2]|0)|0}function To(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,jA(d,n[l>>2]|0,u),Ss(o,d),I=A}function Ss(o,l){o=o|0,l=l|0,Rl(o,n[l+4>>2]|0,+y(h[l>>2]))}function Rl(o,l,u){o=o|0,l=l|0,u=+u,n[o>>2]=l,E[o+8>>3]=u}function Hy(o){return o=o|0,$1(n[o>>2]|0)|0}function da(o){return o=o|0,wh(n[o>>2]|0)|0}function SP(o){return o=o|0,du(n[o>>2]|0)|0}function Lh(o){return o=o|0,X1(n[o>>2]|0)|0}function w2(o){return o=o|0,Ng(n[o>>2]|0)|0}function XL(o){return o=o|0,dy(n[o>>2]|0)|0}function DP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,xt(d,n[l>>2]|0,u),Ss(o,d),I=A}function bP(o){return o=o|0,mf(n[o>>2]|0)|0}function jy(o){return o=o|0,Dl(n[o>>2]|0)|0}function B2(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,HA(A,n[l>>2]|0),Ss(o,A),I=u}function Mh(o){return o=o|0,+ +y(li(n[o>>2]|0))}function PP(o){return o=o|0,+ +y(Gi(n[o>>2]|0))}function xP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,ur(A,n[l>>2]|0),Ss(o,A),I=u}function nd(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Mg(A,n[l>>2]|0),Ss(o,A),I=u}function $L(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,wt(A,n[l>>2]|0),Ss(o,A),I=u}function eM(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Ya(A,n[l>>2]|0),Ss(o,A),I=u}function kP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,_g(A,n[l>>2]|0),Ss(o,A),I=u}function QP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,wy(A,n[l>>2]|0),Ss(o,A),I=u}function tp(o){return o=o|0,+ +y(Hg(n[o>>2]|0))}function tM(o,l){return o=o|0,l=l|0,+ +y(Cy(n[o>>2]|0,l))}function rM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,mt(d,n[l>>2]|0,u),Ss(o,d),I=A}function Du(o,l,u){o=o|0,l=l|0,u=u|0,lr(n[o>>2]|0,n[l>>2]|0,u)}function nM(o,l){o=o|0,l=l|0,df(n[o>>2]|0,n[l>>2]|0)}function TP(o){return o=o|0,_i(n[o>>2]|0)|0}function iM(o){return o=o|0,o=yt(n[o>>2]|0)|0,o?o=c2(o)|0:o=0,o|0}function RP(o,l){return o=o|0,l=l|0,o=ws(n[o>>2]|0,l)|0,o?o=c2(o)|0:o=0,o|0}function kf(o,l){o=o|0,l=l|0;var u=0,A=0;A=Jt(4)|0,FP(A,l),u=o+4|0,l=n[u>>2]|0,n[u>>2]=A,l|0&&(Df(l),Et(l)),St(n[o>>2]|0,1)}function FP(o,l){o=o|0,l=l|0,lM(o,l)}function sM(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,NP(k,Ga(l)|0,+u,A,+d,m),h[o>>2]=y(+E[k>>3]),h[o+4>>2]=y(+E[k+8>>3]),I=B}function NP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0,k=0,T=0,_=0,M=0;B=I,I=I+32|0,M=B+8|0,_=B+20|0,T=B,k=B+16|0,E[M>>3]=u,n[_>>2]=A,E[T>>3]=d,n[k>>2]=m,qy(o,n[l+4>>2]|0,M,_,T,k),I=B}function qy(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,Nl(k),l=Ms(l)|0,OP(o,l,+E[u>>3],n[A>>2]|0,+E[d>>3],n[m>>2]|0),Ol(k),I=B}function Ms(o){return o=o|0,n[o>>2]|0}function OP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0;B=ma(v2()|0)|0,u=+Ja(u),A=Gy(A)|0,d=+Ja(d),oM(o,Jn(0,B|0,l|0,+u,A|0,+d,Gy(m)|0)|0)}function v2(){var o=0;return s[7608]|0||(D2(9120),o=7608,n[o>>2]=1,n[o+4>>2]=0),9120}function ma(o){return o=o|0,n[o+8>>2]|0}function Ja(o){return o=+o,+ +Qf(o)}function Gy(o){return o=o|0,id(o)|0}function oM(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=l,A&1?(za(u,0),Me(A|0,u|0)|0,S2(o,u),aM(u)):(n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]),I=d}function za(o,l){o=o|0,l=l|0,bu(o,l),n[o+8>>2]=0,s[o+24>>0]=0}function S2(o,l){o=o|0,l=l|0,l=l+8|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]}function aM(o){o=o|0,s[o+24>>0]=0}function bu(o,l){o=o|0,l=l|0,n[o>>2]=l}function id(o){return o=o|0,o|0}function Qf(o){return o=+o,+o}function D2(o){o=o|0,Ro(o,b2()|0,4)}function b2(){return 1064}function Ro(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=qi(l|0,u+1|0)|0}function lM(o,l){o=o|0,l=l|0,l=n[l>>2]|0,n[o>>2]=l,cu(l|0)}function LP(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Df(l),Et(l)),St(n[o>>2]|0,0)}function MP(o){o=o|0,Dt(n[o>>2]|0)}function Wy(o){return o=o|0,tr(n[o>>2]|0)|0}function cM(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,KA(n[o>>2]|0,y(l),y(u),A)}function uM(o){return o=o|0,+ +y(Eu(n[o>>2]|0))}function v(o){return o=o|0,+ +y(Cf(n[o>>2]|0))}function D(o){return o=o|0,+ +y(Iu(n[o>>2]|0))}function Q(o){return o=o|0,+ +y(Ns(n[o>>2]|0))}function H(o){return o=o|0,+ +y(Cu(n[o>>2]|0))}function V(o){return o=o|0,+ +y(qn(n[o>>2]|0))}function ne(o,l){o=o|0,l=l|0,E[o>>3]=+y(Eu(n[l>>2]|0)),E[o+8>>3]=+y(Cf(n[l>>2]|0)),E[o+16>>3]=+y(Iu(n[l>>2]|0)),E[o+24>>3]=+y(Ns(n[l>>2]|0)),E[o+32>>3]=+y(Cu(n[l>>2]|0)),E[o+40>>3]=+y(qn(n[l>>2]|0))}function Se(o,l){return o=o|0,l=l|0,+ +y(ss(n[o>>2]|0,l))}function Ue(o,l){return o=o|0,l=l|0,+ +y(ki(n[o>>2]|0,l))}function At(o,l){return o=o|0,l=l|0,+ +y(VA(n[o>>2]|0,l))}function Gt(){return Qn()|0}function vr(){Lr(),Xt(),zn(),yi(),Za(),$e()}function Lr(){vqe(11713,4938,1)}function Xt(){q6e(10448)}function zn(){v6e(10408)}function yi(){Vje(10324)}function Za(){tHe(10096)}function $e(){qe(9132)}function qe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0,Fo=0,No=0,Oo=0,$a=0,Vh=0,Kh=0,dc=0,Jh=0,Ff=0,Nf=0,zh=0,Zh=0,Xh=0,on=0,mc=0,$h=0,ku=0,e0=0,t0=0,Of=0,Lf=0,Qu=0,lo=0,Ml=0,ya=0,yc=0,lp=0,cp=0,Mf=0,up=0,fp=0,co=0,Us=0,Ec=0,Wn=0,Ap=0,Lo=0,Tu=0,Mo=0,Ru=0,pp=0,hp=0,Fu=0,uo=0,Ic=0,gp=0,dp=0,mp=0,Fr=0,ui=0,Hs=0,_o=0,fo=0,Mr=0,Ar=0,Cc=0;l=I,I=I+672|0,u=l+656|0,Cc=l+648|0,Ar=l+640|0,Mr=l+632|0,fo=l+624|0,_o=l+616|0,Hs=l+608|0,ui=l+600|0,Fr=l+592|0,mp=l+584|0,dp=l+576|0,gp=l+568|0,Ic=l+560|0,uo=l+552|0,Fu=l+544|0,hp=l+536|0,pp=l+528|0,Ru=l+520|0,Mo=l+512|0,Tu=l+504|0,Lo=l+496|0,Ap=l+488|0,Wn=l+480|0,Ec=l+472|0,Us=l+464|0,co=l+456|0,fp=l+448|0,up=l+440|0,Mf=l+432|0,cp=l+424|0,lp=l+416|0,yc=l+408|0,ya=l+400|0,Ml=l+392|0,lo=l+384|0,Qu=l+376|0,Lf=l+368|0,Of=l+360|0,t0=l+352|0,e0=l+344|0,ku=l+336|0,$h=l+328|0,mc=l+320|0,on=l+312|0,Xh=l+304|0,Zh=l+296|0,zh=l+288|0,Nf=l+280|0,Ff=l+272|0,Jh=l+264|0,dc=l+256|0,Kh=l+248|0,Vh=l+240|0,$a=l+232|0,Oo=l+224|0,No=l+216|0,Fo=l+208|0,Hn=l+200|0,cr=l+192|0,Hr=l+184|0,Tr=l+176|0,$t=l+168|0,fr=l+160|0,qr=l+152|0,Lt=l+144|0,Ge=l+136|0,He=l+128|0,ct=l+120|0,Ze=l+112|0,tt=l+104|0,Qe=l+96|0,Le=l+88|0,We=l+80|0,ae=l+72|0,G=l+64|0,M=l+56|0,_=l+48|0,T=l+40|0,k=l+32|0,B=l+24|0,m=l+16|0,d=l+8|0,A=l,ht(o,3646),Zt(o,3651,2)|0,Sr(o,3665,2)|0,Xn(o,3682,18)|0,n[Cc>>2]=19,n[Cc+4>>2]=0,n[u>>2]=n[Cc>>2],n[u+4>>2]=n[Cc+4>>2],kr(o,3690,u)|0,n[Ar>>2]=1,n[Ar+4>>2]=0,n[u>>2]=n[Ar>>2],n[u+4>>2]=n[Ar+4>>2],Rn(o,3696,u)|0,n[Mr>>2]=2,n[Mr+4>>2]=0,n[u>>2]=n[Mr>>2],n[u+4>>2]=n[Mr+4>>2],Un(o,3706,u)|0,n[fo>>2]=1,n[fo+4>>2]=0,n[u>>2]=n[fo>>2],n[u+4>>2]=n[fo+4>>2],zr(o,3722,u)|0,n[_o>>2]=2,n[_o+4>>2]=0,n[u>>2]=n[_o>>2],n[u+4>>2]=n[_o+4>>2],zr(o,3734,u)|0,n[Hs>>2]=3,n[Hs+4>>2]=0,n[u>>2]=n[Hs>>2],n[u+4>>2]=n[Hs+4>>2],Un(o,3753,u)|0,n[ui>>2]=4,n[ui+4>>2]=0,n[u>>2]=n[ui>>2],n[u+4>>2]=n[ui+4>>2],Un(o,3769,u)|0,n[Fr>>2]=5,n[Fr+4>>2]=0,n[u>>2]=n[Fr>>2],n[u+4>>2]=n[Fr+4>>2],Un(o,3783,u)|0,n[mp>>2]=6,n[mp+4>>2]=0,n[u>>2]=n[mp>>2],n[u+4>>2]=n[mp+4>>2],Un(o,3796,u)|0,n[dp>>2]=7,n[dp+4>>2]=0,n[u>>2]=n[dp>>2],n[u+4>>2]=n[dp+4>>2],Un(o,3813,u)|0,n[gp>>2]=8,n[gp+4>>2]=0,n[u>>2]=n[gp>>2],n[u+4>>2]=n[gp+4>>2],Un(o,3825,u)|0,n[Ic>>2]=3,n[Ic+4>>2]=0,n[u>>2]=n[Ic>>2],n[u+4>>2]=n[Ic+4>>2],zr(o,3843,u)|0,n[uo>>2]=4,n[uo+4>>2]=0,n[u>>2]=n[uo>>2],n[u+4>>2]=n[uo+4>>2],zr(o,3853,u)|0,n[Fu>>2]=9,n[Fu+4>>2]=0,n[u>>2]=n[Fu>>2],n[u+4>>2]=n[Fu+4>>2],Un(o,3870,u)|0,n[hp>>2]=10,n[hp+4>>2]=0,n[u>>2]=n[hp>>2],n[u+4>>2]=n[hp+4>>2],Un(o,3884,u)|0,n[pp>>2]=11,n[pp+4>>2]=0,n[u>>2]=n[pp>>2],n[u+4>>2]=n[pp+4>>2],Un(o,3896,u)|0,n[Ru>>2]=1,n[Ru+4>>2]=0,n[u>>2]=n[Ru>>2],n[u+4>>2]=n[Ru+4>>2],ci(o,3907,u)|0,n[Mo>>2]=2,n[Mo+4>>2]=0,n[u>>2]=n[Mo>>2],n[u+4>>2]=n[Mo+4>>2],ci(o,3915,u)|0,n[Tu>>2]=3,n[Tu+4>>2]=0,n[u>>2]=n[Tu>>2],n[u+4>>2]=n[Tu+4>>2],ci(o,3928,u)|0,n[Lo>>2]=4,n[Lo+4>>2]=0,n[u>>2]=n[Lo>>2],n[u+4>>2]=n[Lo+4>>2],ci(o,3948,u)|0,n[Ap>>2]=5,n[Ap+4>>2]=0,n[u>>2]=n[Ap>>2],n[u+4>>2]=n[Ap+4>>2],ci(o,3960,u)|0,n[Wn>>2]=6,n[Wn+4>>2]=0,n[u>>2]=n[Wn>>2],n[u+4>>2]=n[Wn+4>>2],ci(o,3974,u)|0,n[Ec>>2]=7,n[Ec+4>>2]=0,n[u>>2]=n[Ec>>2],n[u+4>>2]=n[Ec+4>>2],ci(o,3983,u)|0,n[Us>>2]=20,n[Us+4>>2]=0,n[u>>2]=n[Us>>2],n[u+4>>2]=n[Us+4>>2],kr(o,3999,u)|0,n[co>>2]=8,n[co+4>>2]=0,n[u>>2]=n[co>>2],n[u+4>>2]=n[co+4>>2],ci(o,4012,u)|0,n[fp>>2]=9,n[fp+4>>2]=0,n[u>>2]=n[fp>>2],n[u+4>>2]=n[fp+4>>2],ci(o,4022,u)|0,n[up>>2]=21,n[up+4>>2]=0,n[u>>2]=n[up>>2],n[u+4>>2]=n[up+4>>2],kr(o,4039,u)|0,n[Mf>>2]=10,n[Mf+4>>2]=0,n[u>>2]=n[Mf>>2],n[u+4>>2]=n[Mf+4>>2],ci(o,4053,u)|0,n[cp>>2]=11,n[cp+4>>2]=0,n[u>>2]=n[cp>>2],n[u+4>>2]=n[cp+4>>2],ci(o,4065,u)|0,n[lp>>2]=12,n[lp+4>>2]=0,n[u>>2]=n[lp>>2],n[u+4>>2]=n[lp+4>>2],ci(o,4084,u)|0,n[yc>>2]=13,n[yc+4>>2]=0,n[u>>2]=n[yc>>2],n[u+4>>2]=n[yc+4>>2],ci(o,4097,u)|0,n[ya>>2]=14,n[ya+4>>2]=0,n[u>>2]=n[ya>>2],n[u+4>>2]=n[ya+4>>2],ci(o,4117,u)|0,n[Ml>>2]=15,n[Ml+4>>2]=0,n[u>>2]=n[Ml>>2],n[u+4>>2]=n[Ml+4>>2],ci(o,4129,u)|0,n[lo>>2]=16,n[lo+4>>2]=0,n[u>>2]=n[lo>>2],n[u+4>>2]=n[lo+4>>2],ci(o,4148,u)|0,n[Qu>>2]=17,n[Qu+4>>2]=0,n[u>>2]=n[Qu>>2],n[u+4>>2]=n[Qu+4>>2],ci(o,4161,u)|0,n[Lf>>2]=18,n[Lf+4>>2]=0,n[u>>2]=n[Lf>>2],n[u+4>>2]=n[Lf+4>>2],ci(o,4181,u)|0,n[Of>>2]=5,n[Of+4>>2]=0,n[u>>2]=n[Of>>2],n[u+4>>2]=n[Of+4>>2],zr(o,4196,u)|0,n[t0>>2]=6,n[t0+4>>2]=0,n[u>>2]=n[t0>>2],n[u+4>>2]=n[t0+4>>2],zr(o,4206,u)|0,n[e0>>2]=7,n[e0+4>>2]=0,n[u>>2]=n[e0>>2],n[u+4>>2]=n[e0+4>>2],zr(o,4217,u)|0,n[ku>>2]=3,n[ku+4>>2]=0,n[u>>2]=n[ku>>2],n[u+4>>2]=n[ku+4>>2],Pu(o,4235,u)|0,n[$h>>2]=1,n[$h+4>>2]=0,n[u>>2]=n[$h>>2],n[u+4>>2]=n[$h+4>>2],fM(o,4251,u)|0,n[mc>>2]=4,n[mc+4>>2]=0,n[u>>2]=n[mc>>2],n[u+4>>2]=n[mc+4>>2],Pu(o,4263,u)|0,n[on>>2]=5,n[on+4>>2]=0,n[u>>2]=n[on>>2],n[u+4>>2]=n[on+4>>2],Pu(o,4279,u)|0,n[Xh>>2]=6,n[Xh+4>>2]=0,n[u>>2]=n[Xh>>2],n[u+4>>2]=n[Xh+4>>2],Pu(o,4293,u)|0,n[Zh>>2]=7,n[Zh+4>>2]=0,n[u>>2]=n[Zh>>2],n[u+4>>2]=n[Zh+4>>2],Pu(o,4306,u)|0,n[zh>>2]=8,n[zh+4>>2]=0,n[u>>2]=n[zh>>2],n[u+4>>2]=n[zh+4>>2],Pu(o,4323,u)|0,n[Nf>>2]=9,n[Nf+4>>2]=0,n[u>>2]=n[Nf>>2],n[u+4>>2]=n[Nf+4>>2],Pu(o,4335,u)|0,n[Ff>>2]=2,n[Ff+4>>2]=0,n[u>>2]=n[Ff>>2],n[u+4>>2]=n[Ff+4>>2],fM(o,4353,u)|0,n[Jh>>2]=12,n[Jh+4>>2]=0,n[u>>2]=n[Jh>>2],n[u+4>>2]=n[Jh+4>>2],sd(o,4363,u)|0,n[dc>>2]=1,n[dc+4>>2]=0,n[u>>2]=n[dc>>2],n[u+4>>2]=n[dc+4>>2],rp(o,4376,u)|0,n[Kh>>2]=2,n[Kh+4>>2]=0,n[u>>2]=n[Kh>>2],n[u+4>>2]=n[Kh+4>>2],rp(o,4388,u)|0,n[Vh>>2]=13,n[Vh+4>>2]=0,n[u>>2]=n[Vh>>2],n[u+4>>2]=n[Vh+4>>2],sd(o,4402,u)|0,n[$a>>2]=14,n[$a+4>>2]=0,n[u>>2]=n[$a>>2],n[u+4>>2]=n[$a+4>>2],sd(o,4411,u)|0,n[Oo>>2]=15,n[Oo+4>>2]=0,n[u>>2]=n[Oo>>2],n[u+4>>2]=n[Oo+4>>2],sd(o,4421,u)|0,n[No>>2]=16,n[No+4>>2]=0,n[u>>2]=n[No>>2],n[u+4>>2]=n[No+4>>2],sd(o,4433,u)|0,n[Fo>>2]=17,n[Fo+4>>2]=0,n[u>>2]=n[Fo>>2],n[u+4>>2]=n[Fo+4>>2],sd(o,4446,u)|0,n[Hn>>2]=18,n[Hn+4>>2]=0,n[u>>2]=n[Hn>>2],n[u+4>>2]=n[Hn+4>>2],sd(o,4458,u)|0,n[cr>>2]=3,n[cr+4>>2]=0,n[u>>2]=n[cr>>2],n[u+4>>2]=n[cr+4>>2],rp(o,4471,u)|0,n[Hr>>2]=1,n[Hr+4>>2]=0,n[u>>2]=n[Hr>>2],n[u+4>>2]=n[Hr+4>>2],_P(o,4486,u)|0,n[Tr>>2]=10,n[Tr+4>>2]=0,n[u>>2]=n[Tr>>2],n[u+4>>2]=n[Tr+4>>2],Pu(o,4496,u)|0,n[$t>>2]=11,n[$t+4>>2]=0,n[u>>2]=n[$t>>2],n[u+4>>2]=n[$t+4>>2],Pu(o,4508,u)|0,n[fr>>2]=3,n[fr+4>>2]=0,n[u>>2]=n[fr>>2],n[u+4>>2]=n[fr+4>>2],fM(o,4519,u)|0,n[qr>>2]=4,n[qr+4>>2]=0,n[u>>2]=n[qr>>2],n[u+4>>2]=n[qr+4>>2],TOe(o,4530,u)|0,n[Lt>>2]=19,n[Lt+4>>2]=0,n[u>>2]=n[Lt>>2],n[u+4>>2]=n[Lt+4>>2],ROe(o,4542,u)|0,n[Ge>>2]=12,n[Ge+4>>2]=0,n[u>>2]=n[Ge>>2],n[u+4>>2]=n[Ge+4>>2],FOe(o,4554,u)|0,n[He>>2]=13,n[He+4>>2]=0,n[u>>2]=n[He>>2],n[u+4>>2]=n[He+4>>2],NOe(o,4568,u)|0,n[ct>>2]=2,n[ct+4>>2]=0,n[u>>2]=n[ct>>2],n[u+4>>2]=n[ct+4>>2],OOe(o,4578,u)|0,n[Ze>>2]=20,n[Ze+4>>2]=0,n[u>>2]=n[Ze>>2],n[u+4>>2]=n[Ze+4>>2],LOe(o,4587,u)|0,n[tt>>2]=22,n[tt+4>>2]=0,n[u>>2]=n[tt>>2],n[u+4>>2]=n[tt+4>>2],kr(o,4602,u)|0,n[Qe>>2]=23,n[Qe+4>>2]=0,n[u>>2]=n[Qe>>2],n[u+4>>2]=n[Qe+4>>2],kr(o,4619,u)|0,n[Le>>2]=14,n[Le+4>>2]=0,n[u>>2]=n[Le>>2],n[u+4>>2]=n[Le+4>>2],MOe(o,4629,u)|0,n[We>>2]=1,n[We+4>>2]=0,n[u>>2]=n[We>>2],n[u+4>>2]=n[We+4>>2],_Oe(o,4637,u)|0,n[ae>>2]=4,n[ae+4>>2]=0,n[u>>2]=n[ae>>2],n[u+4>>2]=n[ae+4>>2],rp(o,4653,u)|0,n[G>>2]=5,n[G+4>>2]=0,n[u>>2]=n[G>>2],n[u+4>>2]=n[G+4>>2],rp(o,4669,u)|0,n[M>>2]=6,n[M+4>>2]=0,n[u>>2]=n[M>>2],n[u+4>>2]=n[M+4>>2],rp(o,4686,u)|0,n[_>>2]=7,n[_+4>>2]=0,n[u>>2]=n[_>>2],n[u+4>>2]=n[_+4>>2],rp(o,4701,u)|0,n[T>>2]=8,n[T+4>>2]=0,n[u>>2]=n[T>>2],n[u+4>>2]=n[T+4>>2],rp(o,4719,u)|0,n[k>>2]=9,n[k+4>>2]=0,n[u>>2]=n[k>>2],n[u+4>>2]=n[k+4>>2],rp(o,4736,u)|0,n[B>>2]=21,n[B+4>>2]=0,n[u>>2]=n[B>>2],n[u+4>>2]=n[B+4>>2],UOe(o,4754,u)|0,n[m>>2]=2,n[m+4>>2]=0,n[u>>2]=n[m>>2],n[u+4>>2]=n[m+4>>2],_P(o,4772,u)|0,n[d>>2]=3,n[d+4>>2]=0,n[u>>2]=n[d>>2],n[u+4>>2]=n[d+4>>2],_P(o,4790,u)|0,n[A>>2]=4,n[A+4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],_P(o,4808,u)|0,I=l}function ht(o,l){o=o|0,l=l|0;var u=0;u=Y8e()|0,n[o>>2]=u,V8e(u,l),Gh(n[o>>2]|0)}function Zt(o,l,u){return o=o|0,l=l|0,u=u|0,T8e(o,Bn(l)|0,u,0),o|0}function Sr(o,l,u){return o=o|0,l=l|0,u=u|0,d8e(o,Bn(l)|0,u,0),o|0}function Xn(o,l,u){return o=o|0,l=l|0,u=u|0,r8e(o,Bn(l)|0,u,0),o|0}function kr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],U3e(o,l,d),I=A,o|0}function Rn(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],C3e(o,l,d),I=A,o|0}function Un(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],s3e(o,l,d),I=A,o|0}function zr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],q4e(o,l,d),I=A,o|0}function ci(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],b4e(o,l,d),I=A,o|0}function Pu(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],f4e(o,l,d),I=A,o|0}function fM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],JUe(o,l,d),I=A,o|0}function sd(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],CUe(o,l,d),I=A,o|0}function rp(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],sUe(o,l,d),I=A,o|0}function _P(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],q_e(o,l,d),I=A,o|0}function TOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],b_e(o,l,d),I=A,o|0}function ROe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],f_e(o,l,d),I=A,o|0}function FOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],zMe(o,l,d),I=A,o|0}function NOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],NMe(o,l,d),I=A,o|0}function OOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],yMe(o,l,d),I=A,o|0}function LOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tMe(o,l,d),I=A,o|0}function MOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],_Le(o,l,d),I=A,o|0}function _Oe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],CLe(o,l,d),I=A,o|0}function UOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],HOe(o,l,d),I=A,o|0}function HOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],jOe(o,u,d,1),I=A}function Bn(o){return o=o|0,o|0}function jOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=AM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=qOe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,GOe(m,A)|0,A),I=d}function AM(){var o=0,l=0;if(s[7616]|0||(jz(9136),gr(24,9136,U|0)|0,l=7616,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9136)|0)){o=9136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));jz(9136)}return 9136}function qOe(o){return o=o|0,0}function GOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=AM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Hz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(VOe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function vn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0;B=I,I=I+32|0,ae=B+24|0,G=B+20|0,T=B+16|0,M=B+12|0,_=B+8|0,k=B+4|0,We=B,n[G>>2]=l,n[T>>2]=u,n[M>>2]=A,n[_>>2]=d,n[k>>2]=m,m=o+28|0,n[We>>2]=n[m>>2],n[ae>>2]=n[We>>2],WOe(o+24|0,ae,G,M,_,T,k)|0,n[m>>2]=n[n[m>>2]>>2],I=B}function WOe(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,o=YOe(l)|0,l=Jt(24)|0,Uz(l+4|0,n[u>>2]|0,n[A>>2]|0,n[d>>2]|0,n[m>>2]|0,n[B>>2]|0),n[l>>2]=n[o>>2],n[o>>2]=l,l|0}function YOe(o){return o=o|0,n[o>>2]|0}function Uz(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function yr(o,l){return o=o|0,l=l|0,l|o|0}function Hz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function VOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=KOe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,JOe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Hz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,zOe(o,k),ZOe(k),I=_;return}}function KOe(o){return o=o|0,357913941}function JOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function zOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ZOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function jz(o){o=o|0,eLe(o)}function XOe(o){o=o|0,$Oe(o+24|0)}function Ur(o){return o=o|0,n[o>>2]|0}function $Oe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function eLe(o){o=o|0;var l=0;l=en()|0,tn(o,2,3,l,tLe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function en(){return 9228}function tLe(){return 1140}function rLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=nLe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=iLe(l,A)|0,I=u,l|0}function tn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function nLe(o){return o=o|0,(n[(AM()|0)+24>>2]|0)+(o*12|0)|0}function iLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+48|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),ap[u&31](A,o),A=sLe(A)|0,I=d,A|0}function sLe(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=pM(qz()|0)|0,A?(hM(l,A),gM(u,l),oLe(o,u),o=dM(l)|0):o=aLe(o)|0,I=d,o|0}function qz(){var o=0;return s[7632]|0||(mLe(9184),gr(25,9184,U|0)|0,o=7632,n[o>>2]=1,n[o+4>>2]=0),9184}function pM(o){return o=o|0,n[o+36>>2]|0}function hM(o,l){o=o|0,l=l|0,n[o>>2]=l,n[o+4>>2]=o,n[o+8>>2]=0}function gM(o,l){o=o|0,l=l|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=0}function oLe(o,l){o=o|0,l=l|0,fLe(l,o,o+8|0,o+16|0,o+24|0,o+32|0,o+40|0)|0}function dM(o){return o=o|0,n[(n[o+4>>2]|0)+8>>2]|0}function aLe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;T=I,I=I+16|0,u=T+4|0,A=T,d=Fl(8)|0,m=d,B=Jt(48)|0,k=B,l=k+48|0;do n[k>>2]=n[o>>2],k=k+4|0,o=o+4|0;while((k|0)<(l|0));return l=m+4|0,n[l>>2]=B,k=Jt(8)|0,B=n[l>>2]|0,n[A>>2]=0,n[u>>2]=n[A>>2],Gz(k,B,u),n[d>>2]=k,I=T,m|0}function Gz(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1092,n[u+12>>2]=l,n[o+4>>2]=u}function lLe(o){o=o|0,Zy(o),Et(o)}function cLe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function uLe(o){o=o|0,Et(o)}function fLe(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,m=ALe(n[o>>2]|0,l,u,A,d,m,B)|0,B=o+4|0,n[(n[B>>2]|0)+8>>2]=m,n[(n[B>>2]|0)+8>>2]|0}function ALe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0;var k=0,T=0;return k=I,I=I+16|0,T=k,Nl(T),o=Ms(o)|0,B=pLe(o,+E[l>>3],+E[u>>3],+E[A>>3],+E[d>>3],+E[m>>3],+E[B>>3])|0,Ol(T),I=k,B|0}function pLe(o,l,u,A,d,m,B){o=o|0,l=+l,u=+u,A=+A,d=+d,m=+m,B=+B;var k=0;return k=ma(hLe()|0)|0,l=+Ja(l),u=+Ja(u),A=+Ja(A),d=+Ja(d),m=+Ja(m),io(0,k|0,o|0,+l,+u,+A,+d,+m,+ +Ja(B))|0}function hLe(){var o=0;return s[7624]|0||(gLe(9172),o=7624,n[o>>2]=1,n[o+4>>2]=0),9172}function gLe(o){o=o|0,Ro(o,dLe()|0,6)}function dLe(){return 1112}function mLe(o){o=o|0,_h(o)}function yLe(o){o=o|0,Wz(o+24|0),Yz(o+16|0)}function Wz(o){o=o|0,ILe(o)}function Yz(o){o=o|0,ELe(o)}function ELe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,Et(u);while(l|0);n[o>>2]=0}function ILe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,Et(u);while(l|0);n[o>>2]=0}function _h(o){o=o|0;var l=0;n[o+16>>2]=0,n[o+20>>2]=0,l=o+24|0,n[l>>2]=0,n[o+28>>2]=l,n[o+36>>2]=0,s[o+40>>0]=0,s[o+41>>0]=0}function CLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],wLe(o,u,d,0),I=A}function wLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=mM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=BLe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,vLe(m,A)|0,A),I=d}function mM(){var o=0,l=0;if(s[7640]|0||(Kz(9232),gr(26,9232,U|0)|0,l=7640,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9232)|0)){o=9232,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Kz(9232)}return 9232}function BLe(o){return o=o|0,0}function vLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=mM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Vz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(SLe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function Vz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function SLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=DLe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,bLe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Vz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,PLe(o,k),xLe(k),I=_;return}}function DLe(o){return o=o|0,357913941}function bLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function PLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function xLe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function Kz(o){o=o|0,TLe(o)}function kLe(o){o=o|0,QLe(o+24|0)}function QLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function TLe(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,RLe()|0,3),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function RLe(){return 1144}function FLe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,B=m+8|0,k=m,T=NLe(o)|0,o=n[T+4>>2]|0,n[k>>2]=n[T>>2],n[k+4>>2]=o,n[B>>2]=n[k>>2],n[B+4>>2]=n[k+4>>2],OLe(l,B,u,A,d),I=m}function NLe(o){return o=o|0,(n[(mM()|0)+24>>2]|0)+(o*12|0)|0}function OLe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0,_=0;_=I,I=I+16|0,B=_+2|0,k=_+1|0,T=_,m=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(m=n[(n[o>>2]|0)+m>>2]|0),Tf(B,u),u=+Rf(B,u),Tf(k,A),A=+Rf(k,A),np(T,d),T=ip(T,d)|0,c$[m&1](o,u,A,T),I=_}function Tf(o,l){o=o|0,l=+l}function Rf(o,l){return o=o|0,l=+l,+ +MLe(l)}function np(o,l){o=o|0,l=l|0}function ip(o,l){return o=o|0,l=l|0,LLe(l)|0}function LLe(o){return o=o|0,o|0}function MLe(o){return o=+o,+o}function _Le(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ULe(o,u,d,1),I=A}function ULe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=yM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=HLe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,jLe(m,A)|0,A),I=d}function yM(){var o=0,l=0;if(s[7648]|0||(zz(9268),gr(27,9268,U|0)|0,l=7648,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9268)|0)){o=9268,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));zz(9268)}return 9268}function HLe(o){return o=o|0,0}function jLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=yM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Jz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(qLe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function Jz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function qLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=GLe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,WLe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Jz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,YLe(o,k),VLe(k),I=_;return}}function GLe(o){return o=o|0,357913941}function WLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function YLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function VLe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function zz(o){o=o|0,zLe(o)}function KLe(o){o=o|0,JLe(o+24|0)}function JLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function zLe(o){o=o|0;var l=0;l=en()|0,tn(o,2,4,l,ZLe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function ZLe(){return 1160}function XLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=$Le(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=eMe(l,A)|0,I=u,l|0}function $Le(o){return o=o|0,(n[(yM()|0)+24>>2]|0)+(o*12|0)|0}function eMe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),Zz(hd[u&31](o)|0)|0}function Zz(o){return o=o|0,o&1|0}function tMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],rMe(o,u,d,0),I=A}function rMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=EM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=nMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,iMe(m,A)|0,A),I=d}function EM(){var o=0,l=0;if(s[7656]|0||($z(9304),gr(28,9304,U|0)|0,l=7656,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9304)|0)){o=9304,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));$z(9304)}return 9304}function nMe(o){return o=o|0,0}function iMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=EM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Xz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(sMe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function Xz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function sMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=oMe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,aMe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Xz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,lMe(o,k),cMe(k),I=_;return}}function oMe(o){return o=o|0,357913941}function aMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function lMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function cMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function $z(o){o=o|0,AMe(o)}function uMe(o){o=o|0,fMe(o+24|0)}function fMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function AMe(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,pMe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function pMe(){return 1164}function hMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=gMe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],dMe(l,d,u),I=A}function gMe(o){return o=o|0,(n[(EM()|0)+24>>2]|0)+(o*12|0)|0}function dMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Uh(d,u),u=Hh(d,u)|0,ap[A&31](o,u),jh(d),I=m}function Uh(o,l){o=o|0,l=l|0,mMe(o,l)}function Hh(o,l){return o=o|0,l=l|0,o|0}function jh(o){o=o|0,Df(o)}function mMe(o,l){o=o|0,l=l|0,IM(o,l)}function IM(o,l){o=o|0,l=l|0,n[o>>2]=l}function yMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],EMe(o,u,d,0),I=A}function EMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=CM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=IMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,CMe(m,A)|0,A),I=d}function CM(){var o=0,l=0;if(s[7664]|0||(tZ(9340),gr(29,9340,U|0)|0,l=7664,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9340)|0)){o=9340,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));tZ(9340)}return 9340}function IMe(o){return o=o|0,0}function CMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=CM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],eZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(wMe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function eZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function wMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=BMe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,vMe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],eZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,SMe(o,k),DMe(k),I=_;return}}function BMe(o){return o=o|0,357913941}function vMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function SMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function DMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function tZ(o){o=o|0,xMe(o)}function bMe(o){o=o|0,PMe(o+24|0)}function PMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function xMe(o){o=o|0;var l=0;l=en()|0,tn(o,2,4,l,kMe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function kMe(){return 1180}function QMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=TMe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=RMe(l,d,u)|0,I=A,u|0}function TMe(o){return o=o|0,(n[(CM()|0)+24>>2]|0)+(o*12|0)|0}function RMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),od(d,u),d=ad(d,u)|0,d=UP(m_[A&15](o,d)|0)|0,I=m,d|0}function od(o,l){o=o|0,l=l|0}function ad(o,l){return o=o|0,l=l|0,FMe(l)|0}function UP(o){return o=o|0,o|0}function FMe(o){return o=o|0,o|0}function NMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],OMe(o,u,d,0),I=A}function OMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=wM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=LMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,MMe(m,A)|0,A),I=d}function wM(){var o=0,l=0;if(s[7672]|0||(nZ(9376),gr(30,9376,U|0)|0,l=7672,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9376)|0)){o=9376,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));nZ(9376)}return 9376}function LMe(o){return o=o|0,0}function MMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=wM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],rZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(_Me(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function rZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function _Me(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=UMe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,HMe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],rZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,jMe(o,k),qMe(k),I=_;return}}function UMe(o){return o=o|0,357913941}function HMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function jMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function qMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function nZ(o){o=o|0,YMe(o)}function GMe(o){o=o|0,WMe(o+24|0)}function WMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function YMe(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,iZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function iZ(){return 1196}function VMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=KMe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=JMe(l,A)|0,I=u,l|0}function KMe(o){return o=o|0,(n[(wM()|0)+24>>2]|0)+(o*12|0)|0}function JMe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),UP(hd[u&31](o)|0)|0}function zMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ZMe(o,u,d,1),I=A}function ZMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=BM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=XMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,$Me(m,A)|0,A),I=d}function BM(){var o=0,l=0;if(s[7680]|0||(oZ(9412),gr(31,9412,U|0)|0,l=7680,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9412)|0)){o=9412,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));oZ(9412)}return 9412}function XMe(o){return o=o|0,0}function $Me(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=BM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],sZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(e_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function sZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function e_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=t_e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,r_e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],sZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,n_e(o,k),i_e(k),I=_;return}}function t_e(o){return o=o|0,357913941}function r_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function n_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function i_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function oZ(o){o=o|0,a_e(o)}function s_e(o){o=o|0,o_e(o+24|0)}function o_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function a_e(o){o=o|0;var l=0;l=en()|0,tn(o,2,6,l,aZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function aZ(){return 1200}function l_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=c_e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=u_e(l,A)|0,I=u,l|0}function c_e(o){return o=o|0,(n[(BM()|0)+24>>2]|0)+(o*12|0)|0}function u_e(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),HP(hd[u&31](o)|0)|0}function HP(o){return o=o|0,o|0}function f_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],A_e(o,u,d,0),I=A}function A_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=vM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=p_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,h_e(m,A)|0,A),I=d}function vM(){var o=0,l=0;if(s[7688]|0||(cZ(9448),gr(32,9448,U|0)|0,l=7688,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9448)|0)){o=9448,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));cZ(9448)}return 9448}function p_e(o){return o=o|0,0}function h_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=vM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],lZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(g_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function lZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function g_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=d_e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,m_e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],lZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,y_e(o,k),E_e(k),I=_;return}}function d_e(o){return o=o|0,357913941}function m_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function y_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function E_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function cZ(o){o=o|0,w_e(o)}function I_e(o){o=o|0,C_e(o+24|0)}function C_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function w_e(o){o=o|0;var l=0;l=en()|0,tn(o,2,6,l,uZ()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function uZ(){return 1204}function B_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=v_e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],S_e(l,d,u),I=A}function v_e(o){return o=o|0,(n[(vM()|0)+24>>2]|0)+(o*12|0)|0}function S_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),SM(d,u),d=DM(d,u)|0,ap[A&31](o,d),I=m}function SM(o,l){o=o|0,l=l|0}function DM(o,l){return o=o|0,l=l|0,D_e(l)|0}function D_e(o){return o=o|0,o|0}function b_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],P_e(o,u,d,0),I=A}function P_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=bM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=x_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,k_e(m,A)|0,A),I=d}function bM(){var o=0,l=0;if(s[7696]|0||(AZ(9484),gr(33,9484,U|0)|0,l=7696,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9484)|0)){o=9484,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));AZ(9484)}return 9484}function x_e(o){return o=o|0,0}function k_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=bM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],fZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(Q_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function fZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function Q_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=T_e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,R_e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],fZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,F_e(o,k),N_e(k),I=_;return}}function T_e(o){return o=o|0,357913941}function R_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function F_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function N_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function AZ(o){o=o|0,M_e(o)}function O_e(o){o=o|0,L_e(o+24|0)}function L_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function M_e(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,__e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function __e(){return 1212}function U_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=H_e(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],j_e(l,m,u,A),I=d}function H_e(o){return o=o|0,(n[(bM()|0)+24>>2]|0)+(o*12|0)|0}function j_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),SM(m,u),m=DM(m,u)|0,od(B,A),B=ad(B,A)|0,F2[d&15](o,m,B),I=k}function q_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],G_e(o,u,d,1),I=A}function G_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=PM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=W_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,Y_e(m,A)|0,A),I=d}function PM(){var o=0,l=0;if(s[7704]|0||(hZ(9520),gr(34,9520,U|0)|0,l=7704,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9520)|0)){o=9520,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));hZ(9520)}return 9520}function W_e(o){return o=o|0,0}function Y_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=PM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],pZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(V_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function pZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function V_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=K_e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,J_e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],pZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,z_e(o,k),Z_e(k),I=_;return}}function K_e(o){return o=o|0,357913941}function J_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function z_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function Z_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function hZ(o){o=o|0,eUe(o)}function X_e(o){o=o|0,$_e(o+24|0)}function $_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function eUe(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,tUe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function tUe(){return 1224}function rUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;return d=I,I=I+16|0,m=d+8|0,B=d,k=nUe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],A=+iUe(l,m,u),I=d,+A}function nUe(o){return o=o|0,(n[(PM()|0)+24>>2]|0)+(o*12|0)|0}function iUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(d,u),d=ip(d,u)|0,B=+Qf(+f$[A&7](o,d)),I=m,+B}function sUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],oUe(o,u,d,1),I=A}function oUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=xM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=aUe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,lUe(m,A)|0,A),I=d}function xM(){var o=0,l=0;if(s[7712]|0||(dZ(9556),gr(35,9556,U|0)|0,l=7712,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9556)|0)){o=9556,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));dZ(9556)}return 9556}function aUe(o){return o=o|0,0}function lUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=xM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],gZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(cUe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function gZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function cUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=uUe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,fUe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],gZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,AUe(o,k),pUe(k),I=_;return}}function uUe(o){return o=o|0,357913941}function fUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function AUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function pUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function dZ(o){o=o|0,dUe(o)}function hUe(o){o=o|0,gUe(o+24|0)}function gUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function dUe(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,mUe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function mUe(){return 1232}function yUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=EUe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=+IUe(l,d),I=A,+u}function EUe(o){return o=o|0,(n[(xM()|0)+24>>2]|0)+(o*12|0)|0}function IUe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),+ +Qf(+u$[u&15](o))}function CUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],wUe(o,u,d,1),I=A}function wUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=kM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=BUe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,vUe(m,A)|0,A),I=d}function kM(){var o=0,l=0;if(s[7720]|0||(yZ(9592),gr(36,9592,U|0)|0,l=7720,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9592)|0)){o=9592,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));yZ(9592)}return 9592}function BUe(o){return o=o|0,0}function vUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=kM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],mZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(SUe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function mZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function SUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=DUe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,bUe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],mZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,PUe(o,k),xUe(k),I=_;return}}function DUe(o){return o=o|0,357913941}function bUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function PUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function xUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function yZ(o){o=o|0,TUe(o)}function kUe(o){o=o|0,QUe(o+24|0)}function QUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function TUe(o){o=o|0;var l=0;l=en()|0,tn(o,2,7,l,RUe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function RUe(){return 1276}function FUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=NUe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=OUe(l,A)|0,I=u,l|0}function NUe(o){return o=o|0,(n[(kM()|0)+24>>2]|0)+(o*12|0)|0}function OUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+16|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),ap[u&31](A,o),A=EZ(A)|0,I=d,A|0}function EZ(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=pM(IZ()|0)|0,A?(hM(l,A),gM(u,l),LUe(o,u),o=dM(l)|0):o=MUe(o)|0,I=d,o|0}function IZ(){var o=0;return s[7736]|0||(KUe(9640),gr(25,9640,U|0)|0,o=7736,n[o>>2]=1,n[o+4>>2]=0),9640}function LUe(o,l){o=o|0,l=l|0,jUe(l,o,o+8|0)|0}function MUe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Fl(8)|0,l=A,k=Jt(16)|0,n[k>>2]=n[o>>2],n[k+4>>2]=n[o+4>>2],n[k+8>>2]=n[o+8>>2],n[k+12>>2]=n[o+12>>2],m=l+4|0,n[m>>2]=k,o=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],QM(o,m,d),n[A>>2]=o,I=u,l|0}function QM(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1244,n[u+12>>2]=l,n[o+4>>2]=u}function _Ue(o){o=o|0,Zy(o),Et(o)}function UUe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function HUe(o){o=o|0,Et(o)}function jUe(o,l,u){return o=o|0,l=l|0,u=u|0,l=qUe(n[o>>2]|0,l,u)|0,u=o+4|0,n[(n[u>>2]|0)+8>>2]=l,n[(n[u>>2]|0)+8>>2]|0}function qUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return A=I,I=I+16|0,d=A,Nl(d),o=Ms(o)|0,u=GUe(o,n[l>>2]|0,+E[u>>3])|0,Ol(d),I=A,u|0}function GUe(o,l,u){o=o|0,l=l|0,u=+u;var A=0;return A=ma(WUe()|0)|0,l=Gy(l)|0,lu(0,A|0,o|0,l|0,+ +Ja(u))|0}function WUe(){var o=0;return s[7728]|0||(YUe(9628),o=7728,n[o>>2]=1,n[o+4>>2]=0),9628}function YUe(o){o=o|0,Ro(o,VUe()|0,2)}function VUe(){return 1264}function KUe(o){o=o|0,_h(o)}function JUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],zUe(o,u,d,1),I=A}function zUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=TM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=ZUe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,XUe(m,A)|0,A),I=d}function TM(){var o=0,l=0;if(s[7744]|0||(wZ(9684),gr(37,9684,U|0)|0,l=7744,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9684)|0)){o=9684,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));wZ(9684)}return 9684}function ZUe(o){return o=o|0,0}function XUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=TM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],CZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):($Ue(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function CZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function $Ue(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=e4e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,t4e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],CZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,r4e(o,k),n4e(k),I=_;return}}function e4e(o){return o=o|0,357913941}function t4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function r4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function n4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function wZ(o){o=o|0,o4e(o)}function i4e(o){o=o|0,s4e(o+24|0)}function s4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function o4e(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,a4e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function a4e(){return 1280}function l4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=c4e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=u4e(l,d,u)|0,I=A,u|0}function c4e(o){return o=o|0,(n[(TM()|0)+24>>2]|0)+(o*12|0)|0}function u4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return B=I,I=I+32|0,d=B,m=B+16|0,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(m,u),m=ip(m,u)|0,F2[A&15](d,o,m),m=EZ(d)|0,I=B,m|0}function f4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],A4e(o,u,d,1),I=A}function A4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=RM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=p4e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,h4e(m,A)|0,A),I=d}function RM(){var o=0,l=0;if(s[7752]|0||(vZ(9720),gr(38,9720,U|0)|0,l=7752,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9720)|0)){o=9720,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));vZ(9720)}return 9720}function p4e(o){return o=o|0,0}function h4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=RM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],BZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(g4e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function BZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function g4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=d4e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,m4e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],BZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,y4e(o,k),E4e(k),I=_;return}}function d4e(o){return o=o|0,357913941}function m4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function y4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function E4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function vZ(o){o=o|0,w4e(o)}function I4e(o){o=o|0,C4e(o+24|0)}function C4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function w4e(o){o=o|0;var l=0;l=en()|0,tn(o,2,8,l,B4e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function B4e(){return 1288}function v4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=S4e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=D4e(l,A)|0,I=u,l|0}function S4e(o){return o=o|0,(n[(RM()|0)+24>>2]|0)+(o*12|0)|0}function D4e(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),id(hd[u&31](o)|0)|0}function b4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],P4e(o,u,d,0),I=A}function P4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=FM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=x4e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,k4e(m,A)|0,A),I=d}function FM(){var o=0,l=0;if(s[7760]|0||(DZ(9756),gr(39,9756,U|0)|0,l=7760,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9756)|0)){o=9756,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));DZ(9756)}return 9756}function x4e(o){return o=o|0,0}function k4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=FM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],SZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(Q4e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function SZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function Q4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=T4e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,R4e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],SZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,F4e(o,k),N4e(k),I=_;return}}function T4e(o){return o=o|0,357913941}function R4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function F4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function N4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function DZ(o){o=o|0,M4e(o)}function O4e(o){o=o|0,L4e(o+24|0)}function L4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function M4e(o){o=o|0;var l=0;l=en()|0,tn(o,2,8,l,_4e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function _4e(){return 1292}function U4e(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=H4e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],j4e(l,d,u),I=A}function H4e(o){return o=o|0,(n[(FM()|0)+24>>2]|0)+(o*12|0)|0}function j4e(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Tf(d,u),u=+Rf(d,u),a$[A&31](o,u),I=m}function q4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],G4e(o,u,d,0),I=A}function G4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=NM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=W4e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,Y4e(m,A)|0,A),I=d}function NM(){var o=0,l=0;if(s[7768]|0||(PZ(9792),gr(40,9792,U|0)|0,l=7768,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9792)|0)){o=9792,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));PZ(9792)}return 9792}function W4e(o){return o=o|0,0}function Y4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=NM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],bZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(V4e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function bZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function V4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=K4e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,J4e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],bZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,z4e(o,k),Z4e(k),I=_;return}}function K4e(o){return o=o|0,357913941}function J4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function z4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function Z4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function PZ(o){o=o|0,e3e(o)}function X4e(o){o=o|0,$4e(o+24|0)}function $4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function e3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,t3e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function t3e(){return 1300}function r3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=n3e(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],i3e(l,m,u,A),I=d}function n3e(o){return o=o|0,(n[(NM()|0)+24>>2]|0)+(o*12|0)|0}function i3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),np(m,u),m=ip(m,u)|0,Tf(B,A),A=+Rf(B,A),g$[d&15](o,m,A),I=k}function s3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],o3e(o,u,d,0),I=A}function o3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=OM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=a3e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,l3e(m,A)|0,A),I=d}function OM(){var o=0,l=0;if(s[7776]|0||(kZ(9828),gr(41,9828,U|0)|0,l=7776,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9828)|0)){o=9828,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));kZ(9828)}return 9828}function a3e(o){return o=o|0,0}function l3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=OM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],xZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(c3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function xZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function c3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=u3e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,f3e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],xZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,A3e(o,k),p3e(k),I=_;return}}function u3e(o){return o=o|0,357913941}function f3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function A3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function p3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function kZ(o){o=o|0,d3e(o)}function h3e(o){o=o|0,g3e(o+24|0)}function g3e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function d3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,7,l,m3e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function m3e(){return 1312}function y3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=E3e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],I3e(l,d,u),I=A}function E3e(o){return o=o|0,(n[(OM()|0)+24>>2]|0)+(o*12|0)|0}function I3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(d,u),d=ip(d,u)|0,ap[A&31](o,d),I=m}function C3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],w3e(o,u,d,0),I=A}function w3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=LM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=B3e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,v3e(m,A)|0,A),I=d}function LM(){var o=0,l=0;if(s[7784]|0||(TZ(9864),gr(42,9864,U|0)|0,l=7784,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9864)|0)){o=9864,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));TZ(9864)}return 9864}function B3e(o){return o=o|0,0}function v3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=LM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],QZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(S3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function QZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function S3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=D3e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,b3e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],QZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,P3e(o,k),x3e(k),I=_;return}}function D3e(o){return o=o|0,357913941}function b3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function P3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function x3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function TZ(o){o=o|0,T3e(o)}function k3e(o){o=o|0,Q3e(o+24|0)}function Q3e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function T3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,8,l,R3e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function R3e(){return 1320}function F3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=N3e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],O3e(l,d,u),I=A}function N3e(o){return o=o|0,(n[(LM()|0)+24>>2]|0)+(o*12|0)|0}function O3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),L3e(d,u),d=M3e(d,u)|0,ap[A&31](o,d),I=m}function L3e(o,l){o=o|0,l=l|0}function M3e(o,l){return o=o|0,l=l|0,_3e(l)|0}function _3e(o){return o=o|0,o|0}function U3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],H3e(o,u,d,0),I=A}function H3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=MM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=j3e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,q3e(m,A)|0,A),I=d}function MM(){var o=0,l=0;if(s[7792]|0||(FZ(9900),gr(43,9900,U|0)|0,l=7792,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9900)|0)){o=9900,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));FZ(9900)}return 9900}function j3e(o){return o=o|0,0}function q3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=MM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],RZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(G3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function RZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function G3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=W3e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,Y3e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],RZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,V3e(o,k),K3e(k),I=_;return}}function W3e(o){return o=o|0,357913941}function Y3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function V3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function K3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function FZ(o){o=o|0,Z3e(o)}function J3e(o){o=o|0,z3e(o+24|0)}function z3e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function Z3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,22,l,X3e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function X3e(){return 1344}function $3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;u=I,I=I+16|0,A=u+8|0,d=u,m=e8e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],t8e(l,A),I=u}function e8e(o){return o=o|0,(n[(MM()|0)+24>>2]|0)+(o*12|0)|0}function t8e(o,l){o=o|0,l=l|0;var u=0;u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),op[u&127](o)}function r8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=_M()|0,o=n8e(u)|0,vn(m,l,d,o,i8e(u,A)|0,A)}function _M(){var o=0,l=0;if(s[7800]|0||(OZ(9936),gr(44,9936,U|0)|0,l=7800,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9936)|0)){o=9936,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));OZ(9936)}return 9936}function n8e(o){return o=o|0,o|0}function i8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=_M()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(NZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(s8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function NZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function s8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=o8e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,a8e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,NZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,l8e(o,d),c8e(d),I=k;return}}function o8e(o){return o=o|0,536870911}function a8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function l8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function c8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function OZ(o){o=o|0,A8e(o)}function u8e(o){o=o|0,f8e(o+24|0)}function f8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function A8e(o){o=o|0;var l=0;l=en()|0,tn(o,1,23,l,uZ()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function p8e(o,l){o=o|0,l=l|0,g8e(n[(h8e(o)|0)>>2]|0,l)}function h8e(o){return o=o|0,(n[(_M()|0)+24>>2]|0)+(o<<3)|0}function g8e(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,SM(A,l),l=DM(A,l)|0,op[o&127](l),I=u}function d8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=UM()|0,o=m8e(u)|0,vn(m,l,d,o,y8e(u,A)|0,A)}function UM(){var o=0,l=0;if(s[7808]|0||(MZ(9972),gr(45,9972,U|0)|0,l=7808,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9972)|0)){o=9972,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));MZ(9972)}return 9972}function m8e(o){return o=o|0,o|0}function y8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=UM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(LZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(E8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function LZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function E8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=I8e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,C8e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,LZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,w8e(o,d),B8e(d),I=k;return}}function I8e(o){return o=o|0,536870911}function C8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function w8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function B8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function MZ(o){o=o|0,D8e(o)}function v8e(o){o=o|0,S8e(o+24|0)}function S8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function D8e(o){o=o|0;var l=0;l=en()|0,tn(o,1,9,l,b8e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function b8e(){return 1348}function P8e(o,l){return o=o|0,l=l|0,k8e(n[(x8e(o)|0)>>2]|0,l)|0}function x8e(o){return o=o|0,(n[(UM()|0)+24>>2]|0)+(o<<3)|0}function k8e(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,_Z(A,l),l=UZ(A,l)|0,l=UP(hd[o&31](l)|0)|0,I=u,l|0}function _Z(o,l){o=o|0,l=l|0}function UZ(o,l){return o=o|0,l=l|0,Q8e(l)|0}function Q8e(o){return o=o|0,o|0}function T8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=HM()|0,o=R8e(u)|0,vn(m,l,d,o,F8e(u,A)|0,A)}function HM(){var o=0,l=0;if(s[7816]|0||(jZ(10008),gr(46,10008,U|0)|0,l=7816,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10008)|0)){o=10008,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));jZ(10008)}return 10008}function R8e(o){return o=o|0,o|0}function F8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=HM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(HZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(N8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function HZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function N8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=O8e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,L8e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,HZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,M8e(o,d),_8e(d),I=k;return}}function O8e(o){return o=o|0,536870911}function L8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function M8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function jZ(o){o=o|0,j8e(o)}function U8e(o){o=o|0,H8e(o+24|0)}function H8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function j8e(o){o=o|0;var l=0;l=en()|0,tn(o,1,15,l,iZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function q8e(o){return o=o|0,W8e(n[(G8e(o)|0)>>2]|0)|0}function G8e(o){return o=o|0,(n[(HM()|0)+24>>2]|0)+(o<<3)|0}function W8e(o){return o=o|0,UP(tx[o&7]()|0)|0}function Y8e(){var o=0;return s[7832]|0||(eHe(10052),gr(25,10052,U|0)|0,o=7832,n[o>>2]=1,n[o+4>>2]=0),10052}function V8e(o,l){o=o|0,l=l|0,n[o>>2]=K8e()|0,n[o+4>>2]=J8e()|0,n[o+12>>2]=l,n[o+8>>2]=z8e()|0,n[o+32>>2]=2}function K8e(){return 11709}function J8e(){return 1188}function z8e(){return jP()|0}function Z8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(X8e(u),Et(u)):l|0&&(Fy(l),Et(l))}function qh(o,l){return o=o|0,l=l|0,l&o|0}function X8e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function jP(){var o=0;return s[7824]|0||(n[2511]=$8e()|0,n[2512]=0,o=7824,n[o>>2]=1,n[o+4>>2]=0),10044}function $8e(){return 0}function eHe(o){o=o|0,_h(o)}function tHe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0;l=I,I=I+32|0,u=l+24|0,m=l+16|0,d=l+8|0,A=l,rHe(o,4827),nHe(o,4834,3)|0,iHe(o,3682,47)|0,n[m>>2]=9,n[m+4>>2]=0,n[u>>2]=n[m>>2],n[u+4>>2]=n[m+4>>2],sHe(o,4841,u)|0,n[d>>2]=1,n[d+4>>2]=0,n[u>>2]=n[d>>2],n[u+4>>2]=n[d+4>>2],oHe(o,4871,u)|0,n[A>>2]=10,n[A+4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],aHe(o,4891,u)|0,I=l}function rHe(o,l){o=o|0,l=l|0;var u=0;u=_je()|0,n[o>>2]=u,Uje(u,l),Gh(n[o>>2]|0)}function nHe(o,l,u){return o=o|0,l=l|0,u=u|0,Bje(o,Bn(l)|0,u,0),o|0}function iHe(o,l,u){return o=o|0,l=l|0,u=u|0,lje(o,Bn(l)|0,u,0),o|0}function sHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],qHe(o,l,d),I=A,o|0}function oHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],vHe(o,l,d),I=A,o|0}function aHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],lHe(o,l,d),I=A,o|0}function lHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],cHe(o,u,d,1),I=A}function cHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=jM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=uHe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,fHe(m,A)|0,A),I=d}function jM(){var o=0,l=0;if(s[7840]|0||(GZ(10100),gr(48,10100,U|0)|0,l=7840,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10100)|0)){o=10100,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));GZ(10100)}return 10100}function uHe(o){return o=o|0,0}function fHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=jM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],qZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(AHe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function qZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function AHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=pHe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,hHe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],qZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,gHe(o,k),dHe(k),I=_;return}}function pHe(o){return o=o|0,357913941}function hHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function gHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function dHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function GZ(o){o=o|0,EHe(o)}function mHe(o){o=o|0,yHe(o+24|0)}function yHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function EHe(o){o=o|0;var l=0;l=en()|0,tn(o,2,6,l,IHe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function IHe(){return 1364}function CHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=wHe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=BHe(l,d,u)|0,I=A,u|0}function wHe(o){return o=o|0,(n[(jM()|0)+24>>2]|0)+(o*12|0)|0}function BHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(d,u),d=ip(d,u)|0,d=Zz(m_[A&15](o,d)|0)|0,I=m,d|0}function vHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],SHe(o,u,d,0),I=A}function SHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=qM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=DHe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,bHe(m,A)|0,A),I=d}function qM(){var o=0,l=0;if(s[7848]|0||(YZ(10136),gr(49,10136,U|0)|0,l=7848,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10136)|0)){o=10136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));YZ(10136)}return 10136}function DHe(o){return o=o|0,0}function bHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=qM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],WZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(PHe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function WZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function PHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=xHe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,kHe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],WZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,QHe(o,k),THe(k),I=_;return}}function xHe(o){return o=o|0,357913941}function kHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function QHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function THe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function YZ(o){o=o|0,NHe(o)}function RHe(o){o=o|0,FHe(o+24|0)}function FHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function NHe(o){o=o|0;var l=0;l=en()|0,tn(o,2,9,l,OHe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function OHe(){return 1372}function LHe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=MHe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],_He(l,d,u),I=A}function MHe(o){return o=o|0,(n[(qM()|0)+24>>2]|0)+(o*12|0)|0}function _He(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=Xe;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),UHe(d,u),B=y(HHe(d,u)),o$[A&1](o,B),I=m}function UHe(o,l){o=o|0,l=+l}function HHe(o,l){return o=o|0,l=+l,y(jHe(l))}function jHe(o){return o=+o,y(o)}function qHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],GHe(o,u,d,0),I=A}function GHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=GM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=WHe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,YHe(m,A)|0,A),I=d}function GM(){var o=0,l=0;if(s[7856]|0||(KZ(10172),gr(50,10172,U|0)|0,l=7856,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10172)|0)){o=10172,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));KZ(10172)}return 10172}function WHe(o){return o=o|0,0}function YHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=GM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],VZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(VHe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function VZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function VHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=KHe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,JHe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],VZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,zHe(o,k),ZHe(k),I=_;return}}function KHe(o){return o=o|0,357913941}function JHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function zHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ZHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function KZ(o){o=o|0,eje(o)}function XHe(o){o=o|0,$He(o+24|0)}function $He(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function eje(o){o=o|0;var l=0;l=en()|0,tn(o,2,3,l,tje()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function tje(){return 1380}function rje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=nje(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],ije(l,m,u,A),I=d}function nje(o){return o=o|0,(n[(GM()|0)+24>>2]|0)+(o*12|0)|0}function ije(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),np(m,u),m=ip(m,u)|0,sje(B,A),B=oje(B,A)|0,F2[d&15](o,m,B),I=k}function sje(o,l){o=o|0,l=l|0}function oje(o,l){return o=o|0,l=l|0,aje(l)|0}function aje(o){return o=o|0,(o|0)!=0|0}function lje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=WM()|0,o=cje(u)|0,vn(m,l,d,o,uje(u,A)|0,A)}function WM(){var o=0,l=0;if(s[7864]|0||(zZ(10208),gr(51,10208,U|0)|0,l=7864,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10208)|0)){o=10208,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));zZ(10208)}return 10208}function cje(o){return o=o|0,o|0}function uje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=WM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(JZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(fje(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function JZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function fje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=Aje(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,pje(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,JZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,hje(o,d),gje(d),I=k;return}}function Aje(o){return o=o|0,536870911}function pje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function hje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function gje(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function zZ(o){o=o|0,yje(o)}function dje(o){o=o|0,mje(o+24|0)}function mje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function yje(o){o=o|0;var l=0;l=en()|0,tn(o,1,24,l,Eje()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Eje(){return 1392}function Ije(o,l){o=o|0,l=l|0,wje(n[(Cje(o)|0)>>2]|0,l)}function Cje(o){return o=o|0,(n[(WM()|0)+24>>2]|0)+(o<<3)|0}function wje(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,_Z(A,l),l=UZ(A,l)|0,op[o&127](l),I=u}function Bje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=YM()|0,o=vje(u)|0,vn(m,l,d,o,Sje(u,A)|0,A)}function YM(){var o=0,l=0;if(s[7872]|0||(XZ(10244),gr(52,10244,U|0)|0,l=7872,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10244)|0)){o=10244,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));XZ(10244)}return 10244}function vje(o){return o=o|0,o|0}function Sje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=YM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(ZZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(Dje(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function ZZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function Dje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=bje(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,Pje(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,ZZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,xje(o,d),kje(d),I=k;return}}function bje(o){return o=o|0,536870911}function Pje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function xje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function kje(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function XZ(o){o=o|0,Rje(o)}function Qje(o){o=o|0,Tje(o+24|0)}function Tje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function Rje(o){o=o|0;var l=0;l=en()|0,tn(o,1,16,l,Fje()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Fje(){return 1400}function Nje(o){return o=o|0,Lje(n[(Oje(o)|0)>>2]|0)|0}function Oje(o){return o=o|0,(n[(YM()|0)+24>>2]|0)+(o<<3)|0}function Lje(o){return o=o|0,Mje(tx[o&7]()|0)|0}function Mje(o){return o=o|0,o|0}function _je(){var o=0;return s[7880]|0||(Yje(10280),gr(25,10280,U|0)|0,o=7880,n[o>>2]=1,n[o+4>>2]=0),10280}function Uje(o,l){o=o|0,l=l|0,n[o>>2]=Hje()|0,n[o+4>>2]=jje()|0,n[o+12>>2]=l,n[o+8>>2]=qje()|0,n[o+32>>2]=4}function Hje(){return 11711}function jje(){return 1356}function qje(){return jP()|0}function Gje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(Wje(u),Et(u)):l|0&&(Kg(l),Et(l))}function Wje(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function Yje(o){o=o|0,_h(o)}function Vje(o){o=o|0,Kje(o,4920),Jje(o)|0,zje(o)|0}function Kje(o,l){o=o|0,l=l|0;var u=0;u=IZ()|0,n[o>>2]=u,m6e(u,l),Gh(n[o>>2]|0)}function Jje(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,a6e()|0),o|0}function zje(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,Zje()|0),o|0}function Zje(){var o=0;return s[7888]|0||($Z(10328),gr(53,10328,U|0)|0,o=7888,n[o>>2]=1,n[o+4>>2]=0),Ur(10328)|0||$Z(10328),10328}function ld(o,l){o=o|0,l=l|0,vn(o,0,l,0,0,0)}function $Z(o){o=o|0,e6e(o),cd(o,10)}function Xje(o){o=o|0,$je(o+24|0)}function $je(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function e6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,1,l,i6e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function t6e(o,l,u){o=o|0,l=l|0,u=+u,r6e(o,l,u)}function cd(o,l){o=o|0,l=l|0,n[o+20>>2]=l}function r6e(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,m=A+8|0,k=A+13|0,d=A,B=A+12|0,np(k,l),n[m>>2]=ip(k,l)|0,Tf(B,u),E[d>>3]=+Rf(B,u),n6e(o,m,d),I=A}function n6e(o,l,u){o=o|0,l=l|0,u=u|0,Rl(o+8|0,n[l>>2]|0,+E[u>>3]),s[o+24>>0]=1}function i6e(){return 1404}function s6e(o,l){return o=o|0,l=+l,o6e(o,l)|0}function o6e(o,l){o=o|0,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,m=A+4|0,B=A+8|0,k=A,d=Fl(8)|0,u=d,T=Jt(16)|0,np(m,o),o=ip(m,o)|0,Tf(B,l),Rl(T,o,+Rf(B,l)),B=u+4|0,n[B>>2]=T,o=Jt(8)|0,B=n[B>>2]|0,n[k>>2]=0,n[m>>2]=n[k>>2],QM(o,B,m),n[d>>2]=o,I=A,u|0}function a6e(){var o=0;return s[7896]|0||(eX(10364),gr(54,10364,U|0)|0,o=7896,n[o>>2]=1,n[o+4>>2]=0),Ur(10364)|0||eX(10364),10364}function eX(o){o=o|0,u6e(o),cd(o,55)}function l6e(o){o=o|0,c6e(o+24|0)}function c6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function u6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,4,l,h6e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function f6e(o){o=o|0,A6e(o)}function A6e(o){o=o|0,p6e(o)}function p6e(o){o=o|0,tX(o+8|0),s[o+24>>0]=1}function tX(o){o=o|0,n[o>>2]=0,E[o+8>>3]=0}function h6e(){return 1424}function g6e(){return d6e()|0}function d6e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Fl(8)|0,o=u,A=Jt(16)|0,tX(A),m=o+4|0,n[m>>2]=A,A=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],QM(A,m,d),n[u>>2]=A,I=l,o|0}function m6e(o,l){o=o|0,l=l|0,n[o>>2]=y6e()|0,n[o+4>>2]=E6e()|0,n[o+12>>2]=l,n[o+8>>2]=I6e()|0,n[o+32>>2]=5}function y6e(){return 11710}function E6e(){return 1416}function I6e(){return qP()|0}function C6e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(w6e(u),Et(u)):l|0&&Et(l)}function w6e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function qP(){var o=0;return s[7904]|0||(n[2600]=B6e()|0,n[2601]=0,o=7904,n[o>>2]=1,n[o+4>>2]=0),10400}function B6e(){return n[357]|0}function v6e(o){o=o|0,S6e(o,4926),D6e(o)|0}function S6e(o,l){o=o|0,l=l|0;var u=0;u=qz()|0,n[o>>2]=u,L6e(u,l),Gh(n[o>>2]|0)}function D6e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,b6e()|0),o|0}function b6e(){var o=0;return s[7912]|0||(rX(10412),gr(56,10412,U|0)|0,o=7912,n[o>>2]=1,n[o+4>>2]=0),Ur(10412)|0||rX(10412),10412}function rX(o){o=o|0,k6e(o),cd(o,57)}function P6e(o){o=o|0,x6e(o+24|0)}function x6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function k6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,5,l,F6e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Q6e(o){o=o|0,T6e(o)}function T6e(o){o=o|0,R6e(o)}function R6e(o){o=o|0;var l=0,u=0;l=o+8|0,u=l+48|0;do n[l>>2]=0,l=l+4|0;while((l|0)<(u|0));s[o+56>>0]=1}function F6e(){return 1432}function N6e(){return O6e()|0}function O6e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0;B=I,I=I+16|0,o=B+4|0,l=B,u=Fl(8)|0,A=u,d=Jt(48)|0,m=d,k=m+48|0;do n[m>>2]=0,m=m+4|0;while((m|0)<(k|0));return m=A+4|0,n[m>>2]=d,k=Jt(8)|0,m=n[m>>2]|0,n[l>>2]=0,n[o>>2]=n[l>>2],Gz(k,m,o),n[u>>2]=k,I=B,A|0}function L6e(o,l){o=o|0,l=l|0,n[o>>2]=M6e()|0,n[o+4>>2]=_6e()|0,n[o+12>>2]=l,n[o+8>>2]=U6e()|0,n[o+32>>2]=6}function M6e(){return 11704}function _6e(){return 1436}function U6e(){return qP()|0}function H6e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(j6e(u),Et(u)):l|0&&Et(l)}function j6e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function q6e(o){o=o|0,G6e(o,4933),W6e(o)|0,Y6e(o)|0}function G6e(o,l){o=o|0,l=l|0;var u=0;u=dqe()|0,n[o>>2]=u,mqe(u,l),Gh(n[o>>2]|0)}function W6e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,oqe()|0),o|0}function Y6e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,V6e()|0),o|0}function V6e(){var o=0;return s[7920]|0||(nX(10452),gr(58,10452,U|0)|0,o=7920,n[o>>2]=1,n[o+4>>2]=0),Ur(10452)|0||nX(10452),10452}function nX(o){o=o|0,z6e(o),cd(o,1)}function K6e(o){o=o|0,J6e(o+24|0)}function J6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function z6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,1,l,eqe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Z6e(o,l,u){o=o|0,l=+l,u=+u,X6e(o,l,u)}function X6e(o,l,u){o=o|0,l=+l,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,m=A+8|0,k=A+17|0,d=A,B=A+16|0,Tf(k,l),E[m>>3]=+Rf(k,l),Tf(B,u),E[d>>3]=+Rf(B,u),$6e(o,m,d),I=A}function $6e(o,l,u){o=o|0,l=l|0,u=u|0,iX(o+8|0,+E[l>>3],+E[u>>3]),s[o+24>>0]=1}function iX(o,l,u){o=o|0,l=+l,u=+u,E[o>>3]=l,E[o+8>>3]=u}function eqe(){return 1472}function tqe(o,l){return o=+o,l=+l,rqe(o,l)|0}function rqe(o,l){o=+o,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,B=A+4|0,k=A+8|0,T=A,d=Fl(8)|0,u=d,m=Jt(16)|0,Tf(B,o),o=+Rf(B,o),Tf(k,l),iX(m,o,+Rf(k,l)),k=u+4|0,n[k>>2]=m,m=Jt(8)|0,k=n[k>>2]|0,n[T>>2]=0,n[B>>2]=n[T>>2],sX(m,k,B),n[d>>2]=m,I=A,u|0}function sX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1452,n[u+12>>2]=l,n[o+4>>2]=u}function nqe(o){o=o|0,Zy(o),Et(o)}function iqe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function sqe(o){o=o|0,Et(o)}function oqe(){var o=0;return s[7928]|0||(oX(10488),gr(59,10488,U|0)|0,o=7928,n[o>>2]=1,n[o+4>>2]=0),Ur(10488)|0||oX(10488),10488}function oX(o){o=o|0,cqe(o),cd(o,60)}function aqe(o){o=o|0,lqe(o+24|0)}function lqe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function cqe(o){o=o|0;var l=0;l=en()|0,tn(o,5,6,l,pqe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function uqe(o){o=o|0,fqe(o)}function fqe(o){o=o|0,Aqe(o)}function Aqe(o){o=o|0,aX(o+8|0),s[o+24>>0]=1}function aX(o){o=o|0,n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,n[o+12>>2]=0}function pqe(){return 1492}function hqe(){return gqe()|0}function gqe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Fl(8)|0,o=u,A=Jt(16)|0,aX(A),m=o+4|0,n[m>>2]=A,A=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],sX(A,m,d),n[u>>2]=A,I=l,o|0}function dqe(){var o=0;return s[7936]|0||(Bqe(10524),gr(25,10524,U|0)|0,o=7936,n[o>>2]=1,n[o+4>>2]=0),10524}function mqe(o,l){o=o|0,l=l|0,n[o>>2]=yqe()|0,n[o+4>>2]=Eqe()|0,n[o+12>>2]=l,n[o+8>>2]=Iqe()|0,n[o+32>>2]=7}function yqe(){return 11700}function Eqe(){return 1484}function Iqe(){return qP()|0}function Cqe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(wqe(u),Et(u)):l|0&&Et(l)}function wqe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function Bqe(o){o=o|0,_h(o)}function vqe(o,l,u){o=o|0,l=l|0,u=u|0,o=Bn(l)|0,l=Sqe(u)|0,u=Dqe(u,0)|0,rGe(o,l,u,VM()|0,0)}function Sqe(o){return o=o|0,o|0}function Dqe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=VM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(cX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(Rqe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function VM(){var o=0,l=0;if(s[7944]|0||(lX(10568),gr(61,10568,U|0)|0,l=7944,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10568)|0)){o=10568,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));lX(10568)}return 10568}function lX(o){o=o|0,xqe(o)}function bqe(o){o=o|0,Pqe(o+24|0)}function Pqe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function xqe(o){o=o|0;var l=0;l=en()|0,tn(o,1,17,l,aZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function kqe(o){return o=o|0,Tqe(n[(Qqe(o)|0)>>2]|0)|0}function Qqe(o){return o=o|0,(n[(VM()|0)+24>>2]|0)+(o<<3)|0}function Tqe(o){return o=o|0,HP(tx[o&7]()|0)|0}function cX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function Rqe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=Fqe(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,Nqe(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,cX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Oqe(o,d),Lqe(d),I=k;return}}function Fqe(o){return o=o|0,536870911}function Nqe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function Oqe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function Lqe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function Mqe(){_qe()}function _qe(){Uqe(10604)}function Uqe(o){o=o|0,Hqe(o,4955)}function Hqe(o,l){o=o|0,l=l|0;var u=0;u=jqe()|0,n[o>>2]=u,qqe(u,l),Gh(n[o>>2]|0)}function jqe(){var o=0;return s[7952]|0||(Xqe(10612),gr(25,10612,U|0)|0,o=7952,n[o>>2]=1,n[o+4>>2]=0),10612}function qqe(o,l){o=o|0,l=l|0,n[o>>2]=Vqe()|0,n[o+4>>2]=Kqe()|0,n[o+12>>2]=l,n[o+8>>2]=Jqe()|0,n[o+32>>2]=8}function Gh(o){o=o|0;var l=0,u=0;l=I,I=I+16|0,u=l,Yy()|0,n[u>>2]=o,Gqe(10608,u),I=l}function Yy(){return s[11714]|0||(n[2652]=0,gr(62,10608,U|0)|0,s[11714]=1),10608}function Gqe(o,l){o=o|0,l=l|0;var u=0;u=Jt(8)|0,n[u+4>>2]=n[l>>2],n[u>>2]=n[o>>2],n[o>>2]=u}function Wqe(o){o=o|0,Yqe(o)}function Yqe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,Et(u);while(l|0);n[o>>2]=0}function Vqe(){return 11715}function Kqe(){return 1496}function Jqe(){return jP()|0}function zqe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(Zqe(u),Et(u)):l|0&&Et(l)}function Zqe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function Xqe(o){o=o|0,_h(o)}function $qe(o,l){o=o|0,l=l|0;var u=0,A=0;Yy()|0,u=n[2652]|0;e:do if(u|0){for(;A=n[u+4>>2]|0,!(A|0&&!(GX(KM(A)|0,o)|0));)if(u=n[u>>2]|0,!u)break e;eGe(A,l)}while(!1)}function KM(o){return o=o|0,n[o+12>>2]|0}function eGe(o,l){o=o|0,l=l|0;var u=0;o=o+36|0,u=n[o>>2]|0,u|0&&(Df(u),Et(u)),u=Jt(4)|0,FP(u,l),n[o>>2]=u}function JM(){return s[11716]|0||(n[2664]=0,gr(63,10656,U|0)|0,s[11716]=1),10656}function uX(){var o=0;return s[11717]|0?o=n[2665]|0:(tGe(),n[2665]=1504,s[11717]=1,o=1504),o|0}function tGe(){s[11740]|0||(s[11718]=yr(yr(8,0)|0,0)|0,s[11719]=yr(yr(0,0)|0,0)|0,s[11720]=yr(yr(0,16)|0,0)|0,s[11721]=yr(yr(8,0)|0,0)|0,s[11722]=yr(yr(0,0)|0,0)|0,s[11723]=yr(yr(8,0)|0,0)|0,s[11724]=yr(yr(0,0)|0,0)|0,s[11725]=yr(yr(8,0)|0,0)|0,s[11726]=yr(yr(0,0)|0,0)|0,s[11727]=yr(yr(8,0)|0,0)|0,s[11728]=yr(yr(0,0)|0,0)|0,s[11729]=yr(yr(0,0)|0,32)|0,s[11730]=yr(yr(0,0)|0,32)|0,s[11740]=1)}function fX(){return 1572}function rGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0;m=I,I=I+32|0,M=m+16|0,_=m+12|0,T=m+8|0,k=m+4|0,B=m,n[M>>2]=o,n[_>>2]=l,n[T>>2]=u,n[k>>2]=A,n[B>>2]=d,JM()|0,nGe(10656,M,_,T,k,B),I=m}function nGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0;B=Jt(24)|0,Uz(B+4|0,n[l>>2]|0,n[u>>2]|0,n[A>>2]|0,n[d>>2]|0,n[m>>2]|0),n[B>>2]=n[o>>2],n[o>>2]=B}function AX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0;if(ct=I,I=I+32|0,Le=ct+20|0,Qe=ct+8|0,tt=ct+4|0,Ze=ct,l=n[l>>2]|0,l|0){We=Le+4|0,T=Le+8|0,_=Qe+4|0,M=Qe+8|0,G=Qe+8|0,ae=Le+8|0;do{if(B=l+4|0,k=zM(B)|0,k|0){if(d=P2(k)|0,n[Le>>2]=0,n[We>>2]=0,n[T>>2]=0,A=(x2(k)|0)+1|0,iGe(Le,A),A|0)for(;A=A+-1|0,xu(Qe,n[d>>2]|0),m=n[We>>2]|0,m>>>0<(n[ae>>2]|0)>>>0?(n[m>>2]=n[Qe>>2],n[We>>2]=(n[We>>2]|0)+4):ZM(Le,Qe),A;)d=d+4|0;A=k2(k)|0,n[Qe>>2]=0,n[_>>2]=0,n[M>>2]=0;e:do if(n[A>>2]|0)for(d=0,m=0;;){if((d|0)==(m|0)?sGe(Qe,A):(n[d>>2]=n[A>>2],n[_>>2]=(n[_>>2]|0)+4),A=A+4|0,!(n[A>>2]|0))break e;d=n[_>>2]|0,m=n[G>>2]|0}while(!1);n[tt>>2]=GP(B)|0,n[Ze>>2]=Ur(k)|0,oGe(u,o,tt,Ze,Le,Qe),XM(Qe),sp(Le)}l=n[l>>2]|0}while(l|0)}I=ct}function zM(o){return o=o|0,n[o+12>>2]|0}function P2(o){return o=o|0,n[o+12>>2]|0}function x2(o){return o=o|0,n[o+16>>2]|0}function iGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=n[o>>2]|0,(n[o+8>>2]|0)-A>>2>>>0>>0&&(IX(u,l,(n[o+4>>2]|0)-A>>2,o+8|0),CX(o,u),wX(u)),I=d}function ZM(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=EX(o)|0,m>>>0>>0)sn(o);else{k=n[o>>2]|0,_=(n[o+8>>2]|0)-k|0,T=_>>1,IX(u,_>>2>>>0>>1>>>0?T>>>0>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,CX(o,u),wX(u),I=B;return}}function k2(o){return o=o|0,n[o+8>>2]|0}function sGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=yX(o)|0,m>>>0>>0)sn(o);else{k=n[o>>2]|0,_=(n[o+8>>2]|0)-k|0,T=_>>1,SGe(u,_>>2>>>0>>1>>>0?T>>>0>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,DGe(o,u),bGe(u),I=B;return}}function GP(o){return o=o|0,n[o>>2]|0}function oGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,aGe(o,l,u,A,d,m)}function XM(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),Et(u))}function sp(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),Et(u))}function aGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0;B=I,I=I+48|0,M=B+40|0,k=B+32|0,G=B+24|0,T=B+12|0,_=B,Nl(k),o=Ms(o)|0,n[G>>2]=n[l>>2],u=n[u>>2]|0,A=n[A>>2]|0,$M(T,d),lGe(_,m),n[M>>2]=n[G>>2],cGe(o,M,u,A,T,_),XM(_),sp(T),Ol(k),I=B}function $M(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(BGe(o,A),vGe(o,n[l>>2]|0,n[u>>2]|0,A))}function lGe(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(CGe(o,A),wGe(o,n[l>>2]|0,n[u>>2]|0,A))}function cGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0;B=I,I=I+32|0,M=B+28|0,G=B+24|0,k=B+12|0,T=B,_=ma(uGe()|0)|0,n[G>>2]=n[l>>2],n[M>>2]=n[G>>2],l=ud(M)|0,u=pX(u)|0,A=e_(A)|0,n[k>>2]=n[d>>2],M=d+4|0,n[k+4>>2]=n[M>>2],G=d+8|0,n[k+8>>2]=n[G>>2],n[G>>2]=0,n[M>>2]=0,n[d>>2]=0,d=t_(k)|0,n[T>>2]=n[m>>2],M=m+4|0,n[T+4>>2]=n[M>>2],G=m+8|0,n[T+8>>2]=n[G>>2],n[G>>2]=0,n[M>>2]=0,n[m>>2]=0,uu(0,_|0,o|0,l|0,u|0,A|0,d|0,fGe(T)|0)|0,XM(T),sp(k),I=B}function uGe(){var o=0;return s[7968]|0||(EGe(10708),o=7968,n[o>>2]=1,n[o+4>>2]=0),10708}function ud(o){return o=o|0,gX(o)|0}function pX(o){return o=o|0,hX(o)|0}function e_(o){return o=o|0,HP(o)|0}function t_(o){return o=o|0,pGe(o)|0}function fGe(o){return o=o|0,AGe(o)|0}function AGe(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Fl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=hX(n[(n[o>>2]|0)+(l<<2)>>2]|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function hX(o){return o=o|0,o|0}function pGe(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Fl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=gX((n[o>>2]|0)+(l<<2)|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function gX(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=pM(dX()|0)|0,A?(hM(l,A),gM(u,l),JWe(o,u),o=dM(l)|0):o=hGe(o)|0,I=d,o|0}function dX(){var o=0;return s[7960]|0||(yGe(10664),gr(25,10664,U|0)|0,o=7960,n[o>>2]=1,n[o+4>>2]=0),10664}function hGe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Fl(8)|0,l=A,k=Jt(4)|0,n[k>>2]=n[o>>2],m=l+4|0,n[m>>2]=k,o=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],mX(o,m,d),n[A>>2]=o,I=u,l|0}function mX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1656,n[u+12>>2]=l,n[o+4>>2]=u}function gGe(o){o=o|0,Zy(o),Et(o)}function dGe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function mGe(o){o=o|0,Et(o)}function yGe(o){o=o|0,_h(o)}function EGe(o){o=o|0,Ro(o,IGe()|0,5)}function IGe(){return 1676}function CGe(o,l){o=o|0,l=l|0;var u=0;if((yX(o)|0)>>>0>>0&&sn(o),l>>>0>1073741823)Nt();else{u=Jt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function wGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function yX(o){return o=o|0,1073741823}function BGe(o,l){o=o|0,l=l|0;var u=0;if((EX(o)|0)>>>0>>0&&sn(o),l>>>0>1073741823)Nt();else{u=Jt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function vGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function EX(o){return o=o|0,1073741823}function SGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Jt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function DGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function bGe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&Et(o)}function IX(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Jt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function CX(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function wX(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&Et(o)}function PGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0;if(Qe=I,I=I+32|0,M=Qe+20|0,G=Qe+12|0,_=Qe+16|0,ae=Qe+4|0,We=Qe,Le=Qe+8|0,k=uX()|0,m=n[k>>2]|0,B=n[m>>2]|0,B|0)for(T=n[k+8>>2]|0,k=n[k+4>>2]|0;xu(M,B),xGe(o,M,k,T),m=m+4|0,B=n[m>>2]|0,B;)T=T+1|0,k=k+1|0;if(m=fX()|0,B=n[m>>2]|0,B|0)do xu(M,B),n[G>>2]=n[m+4>>2],kGe(l,M,G),m=m+8|0,B=n[m>>2]|0;while(B|0);if(m=n[(Yy()|0)>>2]|0,m|0)do l=n[m+4>>2]|0,xu(M,n[(Vy(l)|0)>>2]|0),n[G>>2]=KM(l)|0,QGe(u,M,G),m=n[m>>2]|0;while(m|0);if(xu(_,0),m=JM()|0,n[M>>2]=n[_>>2],AX(M,m,d),m=n[(Yy()|0)>>2]|0,m|0){o=M+4|0,l=M+8|0,u=M+8|0;do{if(T=n[m+4>>2]|0,xu(G,n[(Vy(T)|0)>>2]|0),TGe(ae,BX(T)|0),B=n[ae>>2]|0,B|0){n[M>>2]=0,n[o>>2]=0,n[l>>2]=0;do xu(We,n[(Vy(n[B+4>>2]|0)|0)>>2]|0),k=n[o>>2]|0,k>>>0<(n[u>>2]|0)>>>0?(n[k>>2]=n[We>>2],n[o>>2]=(n[o>>2]|0)+4):ZM(M,We),B=n[B>>2]|0;while(B|0);RGe(A,G,M),sp(M)}n[Le>>2]=n[G>>2],_=vX(T)|0,n[M>>2]=n[Le>>2],AX(M,_,d),Yz(ae),m=n[m>>2]|0}while(m|0)}I=Qe}function xGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,WGe(o,l,u,A)}function kGe(o,l,u){o=o|0,l=l|0,u=u|0,GGe(o,l,u)}function Vy(o){return o=o|0,o|0}function QGe(o,l,u){o=o|0,l=l|0,u=u|0,UGe(o,l,u)}function BX(o){return o=o|0,o+16|0}function TGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(m=I,I=I+16|0,d=m+8|0,u=m,n[o>>2]=0,A=n[l>>2]|0,n[d>>2]=A,n[u>>2]=o,u=_Ge(u)|0,A|0){if(A=Jt(12)|0,B=(SX(d)|0)+4|0,o=n[B+4>>2]|0,l=A+4|0,n[l>>2]=n[B>>2],n[l+4>>2]=o,l=n[n[d>>2]>>2]|0,n[d>>2]=l,!l)o=A;else for(l=A;o=Jt(12)|0,T=(SX(d)|0)+4|0,k=n[T+4>>2]|0,B=o+4|0,n[B>>2]=n[T>>2],n[B+4>>2]=k,n[l>>2]=o,B=n[n[d>>2]>>2]|0,n[d>>2]=B,B;)l=o;n[o>>2]=n[u>>2],n[u>>2]=A}I=m}function RGe(o,l,u){o=o|0,l=l|0,u=u|0,FGe(o,l,u)}function vX(o){return o=o|0,o+24|0}function FGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+24|0,d=A+16|0,k=A+12|0,m=A,Nl(d),o=Ms(o)|0,n[k>>2]=n[l>>2],$M(m,u),n[B>>2]=n[k>>2],NGe(o,B,m),sp(m),Ol(d),I=A}function NGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+16|0,k=A+12|0,d=A,m=ma(OGe()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=ud(B)|0,n[d>>2]=n[u>>2],B=u+4|0,n[d+4>>2]=n[B>>2],k=u+8|0,n[d+8>>2]=n[k>>2],n[k>>2]=0,n[B>>2]=0,n[u>>2]=0,Fs(0,m|0,o|0,l|0,t_(d)|0)|0,sp(d),I=A}function OGe(){var o=0;return s[7976]|0||(LGe(10720),o=7976,n[o>>2]=1,n[o+4>>2]=0),10720}function LGe(o){o=o|0,Ro(o,MGe()|0,2)}function MGe(){return 1732}function _Ge(o){return o=o|0,n[o>>2]|0}function SX(o){return o=o|0,n[o>>2]|0}function UGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Nl(d),o=Ms(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],DX(o,m,u),Ol(d),I=A}function DX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+4|0,B=A,d=ma(HGe()|0)|0,n[B>>2]=n[l>>2],n[m>>2]=n[B>>2],l=ud(m)|0,Fs(0,d|0,o|0,l|0,pX(u)|0)|0,I=A}function HGe(){var o=0;return s[7984]|0||(jGe(10732),o=7984,n[o>>2]=1,n[o+4>>2]=0),10732}function jGe(o){o=o|0,Ro(o,qGe()|0,2)}function qGe(){return 1744}function GGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Nl(d),o=Ms(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],DX(o,m,u),Ol(d),I=A}function WGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Nl(m),o=Ms(o)|0,n[k>>2]=n[l>>2],u=s[u>>0]|0,A=s[A>>0]|0,n[B>>2]=n[k>>2],YGe(o,B,u,A),Ol(m),I=d}function YGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,B=d+4|0,k=d,m=ma(VGe()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=ud(B)|0,u=Ky(u)|0,Mi(0,m|0,o|0,l|0,u|0,Ky(A)|0)|0,I=d}function VGe(){var o=0;return s[7992]|0||(JGe(10744),o=7992,n[o>>2]=1,n[o+4>>2]=0),10744}function Ky(o){return o=o|0,KGe(o)|0}function KGe(o){return o=o|0,o&255|0}function JGe(o){o=o|0,Ro(o,zGe()|0,3)}function zGe(){return 1756}function ZGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;switch(ae=I,I=I+32|0,k=ae+8|0,T=ae+4|0,_=ae+20|0,M=ae,IM(o,0),A=KWe(l)|0,n[k>>2]=0,G=k+4|0,n[G>>2]=0,n[k+8>>2]=0,A<<24>>24){case 0:{s[_>>0]=0,XGe(T,u,_),WP(o,T)|0,bf(T);break}case 8:{G=a_(l)|0,s[_>>0]=8,xu(M,n[G+4>>2]|0),$Ge(T,u,_,M,G+8|0),WP(o,T)|0,bf(T);break}case 9:{if(m=a_(l)|0,l=n[m+4>>2]|0,l|0)for(B=k+8|0,d=m+12|0;l=l+-1|0,xu(T,n[d>>2]|0),A=n[G>>2]|0,A>>>0<(n[B>>2]|0)>>>0?(n[A>>2]=n[T>>2],n[G>>2]=(n[G>>2]|0)+4):ZM(k,T),l;)d=d+4|0;s[_>>0]=9,xu(M,n[m+8>>2]|0),e5e(T,u,_,M,k),WP(o,T)|0,bf(T);break}default:G=a_(l)|0,s[_>>0]=A,xu(M,n[G+4>>2]|0),t5e(T,u,_,M),WP(o,T)|0,bf(T)}sp(k),I=ae}function XGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,Nl(d),l=Ms(l)|0,h5e(o,l,s[u>>0]|0),Ol(d),I=A}function WP(o,l){o=o|0,l=l|0;var u=0;return u=n[o>>2]|0,u|0&&Oa(u|0),n[o>>2]=n[l>>2],n[l>>2]=0,o|0}function $Ge(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+32|0,k=m+16|0,B=m+8|0,T=m,Nl(B),l=Ms(l)|0,u=s[u>>0]|0,n[T>>2]=n[A>>2],d=n[d>>2]|0,n[k>>2]=n[T>>2],u5e(o,l,u,k,d),Ol(B),I=m}function e5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0;m=I,I=I+32|0,T=m+24|0,B=m+16|0,_=m+12|0,k=m,Nl(B),l=Ms(l)|0,u=s[u>>0]|0,n[_>>2]=n[A>>2],$M(k,d),n[T>>2]=n[_>>2],o5e(o,l,u,T,k),sp(k),Ol(B),I=m}function t5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Nl(m),l=Ms(l)|0,u=s[u>>0]|0,n[k>>2]=n[A>>2],n[B>>2]=n[k>>2],r5e(o,l,u,B),Ol(m),I=d}function r5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+4|0,k=d,B=ma(n5e()|0)|0,u=Ky(u)|0,n[k>>2]=n[A>>2],n[m>>2]=n[k>>2],YP(o,Fs(0,B|0,l|0,u|0,ud(m)|0)|0),I=d}function n5e(){var o=0;return s[8e3]|0||(i5e(10756),o=8e3,n[o>>2]=1,n[o+4>>2]=0),10756}function YP(o,l){o=o|0,l=l|0,IM(o,l)}function i5e(o){o=o|0,Ro(o,s5e()|0,2)}function s5e(){return 1772}function o5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0;m=I,I=I+32|0,T=m+16|0,_=m+12|0,B=m,k=ma(a5e()|0)|0,u=Ky(u)|0,n[_>>2]=n[A>>2],n[T>>2]=n[_>>2],A=ud(T)|0,n[B>>2]=n[d>>2],T=d+4|0,n[B+4>>2]=n[T>>2],_=d+8|0,n[B+8>>2]=n[_>>2],n[_>>2]=0,n[T>>2]=0,n[d>>2]=0,YP(o,Mi(0,k|0,l|0,u|0,A|0,t_(B)|0)|0),sp(B),I=m}function a5e(){var o=0;return s[8008]|0||(l5e(10768),o=8008,n[o>>2]=1,n[o+4>>2]=0),10768}function l5e(o){o=o|0,Ro(o,c5e()|0,3)}function c5e(){return 1784}function u5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,k=m+4|0,T=m,B=ma(f5e()|0)|0,u=Ky(u)|0,n[T>>2]=n[A>>2],n[k>>2]=n[T>>2],A=ud(k)|0,YP(o,Mi(0,B|0,l|0,u|0,A|0,e_(d)|0)|0),I=m}function f5e(){var o=0;return s[8016]|0||(A5e(10780),o=8016,n[o>>2]=1,n[o+4>>2]=0),10780}function A5e(o){o=o|0,Ro(o,p5e()|0,3)}function p5e(){return 1800}function h5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=ma(g5e()|0)|0,YP(o,dn(0,A|0,l|0,Ky(u)|0)|0)}function g5e(){var o=0;return s[8024]|0||(d5e(10792),o=8024,n[o>>2]=1,n[o+4>>2]=0),10792}function d5e(o){o=o|0,Ro(o,m5e()|0,1)}function m5e(){return 1816}function y5e(){E5e(),I5e(),C5e()}function E5e(){n[2702]=e$(65536)|0}function I5e(){H5e(10856)}function C5e(){w5e(10816)}function w5e(o){o=o|0,B5e(o,5044),v5e(o)|0}function B5e(o,l){o=o|0,l=l|0;var u=0;u=dX()|0,n[o>>2]=u,N5e(u,l),Gh(n[o>>2]|0)}function v5e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,S5e()|0),o|0}function S5e(){var o=0;return s[8032]|0||(bX(10820),gr(64,10820,U|0)|0,o=8032,n[o>>2]=1,n[o+4>>2]=0),Ur(10820)|0||bX(10820),10820}function bX(o){o=o|0,P5e(o),cd(o,25)}function D5e(o){o=o|0,b5e(o+24|0)}function b5e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function P5e(o){o=o|0;var l=0;l=en()|0,tn(o,5,18,l,T5e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function x5e(o,l){o=o|0,l=l|0,k5e(o,l)}function k5e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;u=I,I=I+16|0,A=u,d=u+4|0,od(d,l),n[A>>2]=ad(d,l)|0,Q5e(o,A),I=u}function Q5e(o,l){o=o|0,l=l|0,PX(o+4|0,n[l>>2]|0),s[o+8>>0]=1}function PX(o,l){o=o|0,l=l|0,n[o>>2]=l}function T5e(){return 1824}function R5e(o){return o=o|0,F5e(o)|0}function F5e(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Fl(8)|0,l=A,k=Jt(4)|0,od(d,o),PX(k,ad(d,o)|0),m=l+4|0,n[m>>2]=k,o=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],mX(o,m,d),n[A>>2]=o,I=u,l|0}function Fl(o){o=o|0;var l=0,u=0;return o=o+7&-8,o>>>0<=32768&&(l=n[2701]|0,o>>>0<=(65536-l|0)>>>0)?(u=(n[2702]|0)+l|0,n[2701]=l+o,o=u):(o=e$(o+8|0)|0,n[o>>2]=n[2703],n[2703]=o,o=o+8|0),o|0}function N5e(o,l){o=o|0,l=l|0,n[o>>2]=O5e()|0,n[o+4>>2]=L5e()|0,n[o+12>>2]=l,n[o+8>>2]=M5e()|0,n[o+32>>2]=9}function O5e(){return 11744}function L5e(){return 1832}function M5e(){return qP()|0}function _5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(U5e(u),Et(u)):l|0&&Et(l)}function U5e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function H5e(o){o=o|0,j5e(o,5052),q5e(o)|0,G5e(o,5058,26)|0,W5e(o,5069,1)|0,Y5e(o,5077,10)|0,V5e(o,5087,19)|0,K5e(o,5094,27)|0}function j5e(o,l){o=o|0,l=l|0;var u=0;u=UWe()|0,n[o>>2]=u,HWe(u,l),Gh(n[o>>2]|0)}function q5e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,DWe()|0),o|0}function G5e(o,l,u){return o=o|0,l=l|0,u=u|0,lWe(o,Bn(l)|0,u,0),o|0}function W5e(o,l,u){return o=o|0,l=l|0,u=u|0,V9e(o,Bn(l)|0,u,0),o|0}function Y5e(o,l,u){return o=o|0,l=l|0,u=u|0,S9e(o,Bn(l)|0,u,0),o|0}function V5e(o,l,u){return o=o|0,l=l|0,u=u|0,u9e(o,Bn(l)|0,u,0),o|0}function xX(o,l){o=o|0,l=l|0;var u=0,A=0;e:for(;;){for(u=n[2703]|0;;){if((u|0)==(l|0))break e;if(A=n[u>>2]|0,n[2703]=A,!u)u=A;else break}Et(u)}n[2701]=o}function K5e(o,l,u){return o=o|0,l=l|0,u=u|0,J5e(o,Bn(l)|0,u,0),o|0}function J5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=r_()|0,o=z5e(u)|0,vn(m,l,d,o,Z5e(u,A)|0,A)}function r_(){var o=0,l=0;if(s[8040]|0||(QX(10860),gr(65,10860,U|0)|0,l=8040,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10860)|0)){o=10860,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));QX(10860)}return 10860}function z5e(o){return o=o|0,o|0}function Z5e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=r_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(kX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(X5e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function kX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function X5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=$5e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,e9e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,kX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,t9e(o,d),r9e(d),I=k;return}}function $5e(o){return o=o|0,536870911}function e9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function t9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function r9e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function QX(o){o=o|0,s9e(o)}function n9e(o){o=o|0,i9e(o+24|0)}function i9e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function s9e(o){o=o|0;var l=0;l=en()|0,tn(o,1,11,l,o9e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function o9e(){return 1840}function a9e(o,l,u){o=o|0,l=l|0,u=u|0,c9e(n[(l9e(o)|0)>>2]|0,l,u)}function l9e(o){return o=o|0,(n[(r_()|0)+24>>2]|0)+(o<<3)|0}function c9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+1|0,d=A,od(m,l),l=ad(m,l)|0,od(d,u),u=ad(d,u)|0,ap[o&31](l,u),I=A}function u9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=n_()|0,o=f9e(u)|0,vn(m,l,d,o,A9e(u,A)|0,A)}function n_(){var o=0,l=0;if(s[8048]|0||(RX(10896),gr(66,10896,U|0)|0,l=8048,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10896)|0)){o=10896,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));RX(10896)}return 10896}function f9e(o){return o=o|0,o|0}function A9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=n_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(TX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(p9e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function TX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function p9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=h9e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,g9e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,TX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,d9e(o,d),m9e(d),I=k;return}}function h9e(o){return o=o|0,536870911}function g9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function d9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function m9e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function RX(o){o=o|0,I9e(o)}function y9e(o){o=o|0,E9e(o+24|0)}function E9e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function I9e(o){o=o|0;var l=0;l=en()|0,tn(o,1,11,l,C9e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function C9e(){return 1852}function w9e(o,l){return o=o|0,l=l|0,v9e(n[(B9e(o)|0)>>2]|0,l)|0}function B9e(o){return o=o|0,(n[(n_()|0)+24>>2]|0)+(o<<3)|0}function v9e(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,od(A,l),l=ad(A,l)|0,l=HP(hd[o&31](l)|0)|0,I=u,l|0}function S9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=i_()|0,o=D9e(u)|0,vn(m,l,d,o,b9e(u,A)|0,A)}function i_(){var o=0,l=0;if(s[8056]|0||(NX(10932),gr(67,10932,U|0)|0,l=8056,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10932)|0)){o=10932,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));NX(10932)}return 10932}function D9e(o){return o=o|0,o|0}function b9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=i_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(FX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(P9e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function FX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function P9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=x9e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,k9e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,FX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Q9e(o,d),T9e(d),I=k;return}}function x9e(o){return o=o|0,536870911}function k9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function Q9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function T9e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function NX(o){o=o|0,N9e(o)}function R9e(o){o=o|0,F9e(o+24|0)}function F9e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function N9e(o){o=o|0;var l=0;l=en()|0,tn(o,1,7,l,O9e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function O9e(){return 1860}function L9e(o,l,u){return o=o|0,l=l|0,u=u|0,_9e(n[(M9e(o)|0)>>2]|0,l,u)|0}function M9e(o){return o=o|0,(n[(i_()|0)+24>>2]|0)+(o<<3)|0}function _9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+32|0,B=A+12|0,m=A+8|0,k=A,T=A+16|0,d=A+4|0,U9e(T,l),H9e(k,T,l),Uh(d,u),u=Hh(d,u)|0,n[B>>2]=n[k>>2],F2[o&15](m,B,u),u=j9e(m)|0,bf(m),jh(d),I=A,u|0}function U9e(o,l){o=o|0,l=l|0}function H9e(o,l,u){o=o|0,l=l|0,u=u|0,q9e(o,u)}function j9e(o){return o=o|0,Ms(o)|0}function q9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+16|0,u=d,A=l,A&1?(G9e(u,0),Me(A|0,u|0)|0,W9e(o,u),Y9e(u)):n[o>>2]=n[l>>2],I=d}function G9e(o,l){o=o|0,l=l|0,bu(o,l),n[o+4>>2]=0,s[o+8>>0]=0}function W9e(o,l){o=o|0,l=l|0,n[o>>2]=n[l+4>>2]}function Y9e(o){o=o|0,s[o+8>>0]=0}function V9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=s_()|0,o=K9e(u)|0,vn(m,l,d,o,J9e(u,A)|0,A)}function s_(){var o=0,l=0;if(s[8064]|0||(LX(10968),gr(68,10968,U|0)|0,l=8064,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10968)|0)){o=10968,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));LX(10968)}return 10968}function K9e(o){return o=o|0,o|0}function J9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=s_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(OX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(z9e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function OX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function z9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=Z9e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,X9e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,OX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,$9e(o,d),eWe(d),I=k;return}}function Z9e(o){return o=o|0,536870911}function X9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function $9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function eWe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function LX(o){o=o|0,nWe(o)}function tWe(o){o=o|0,rWe(o+24|0)}function rWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function nWe(o){o=o|0;var l=0;l=en()|0,tn(o,1,1,l,iWe()|0,5),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function iWe(){return 1872}function sWe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,aWe(n[(oWe(o)|0)>>2]|0,l,u,A,d,m)}function oWe(o){return o=o|0,(n[(s_()|0)+24>>2]|0)+(o<<3)|0}function aWe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0;B=I,I=I+32|0,k=B+16|0,T=B+12|0,_=B+8|0,M=B+4|0,G=B,Uh(k,l),l=Hh(k,l)|0,Uh(T,u),u=Hh(T,u)|0,Uh(_,A),A=Hh(_,A)|0,Uh(M,d),d=Hh(M,d)|0,Uh(G,m),m=Hh(G,m)|0,s$[o&1](l,u,A,d,m),jh(G),jh(M),jh(_),jh(T),jh(k),I=B}function lWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=o_()|0,o=cWe(u)|0,vn(m,l,d,o,uWe(u,A)|0,A)}function o_(){var o=0,l=0;if(s[8072]|0||(_X(11004),gr(69,11004,U|0)|0,l=8072,n[l>>2]=1,n[l+4>>2]=0),!(Ur(11004)|0)){o=11004,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));_X(11004)}return 11004}function cWe(o){return o=o|0,o|0}function uWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=o_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(MX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(fWe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function MX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function fWe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=AWe(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,pWe(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,MX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,hWe(o,d),gWe(d),I=k;return}}function AWe(o){return o=o|0,536870911}function pWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function hWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function gWe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function _X(o){o=o|0,yWe(o)}function dWe(o){o=o|0,mWe(o+24|0)}function mWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function yWe(o){o=o|0;var l=0;l=en()|0,tn(o,1,12,l,EWe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function EWe(){return 1896}function IWe(o,l,u){o=o|0,l=l|0,u=u|0,wWe(n[(CWe(o)|0)>>2]|0,l,u)}function CWe(o){return o=o|0,(n[(o_()|0)+24>>2]|0)+(o<<3)|0}function wWe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+4|0,d=A,BWe(m,l),l=vWe(m,l)|0,Uh(d,u),u=Hh(d,u)|0,ap[o&31](l,u),jh(d),I=A}function BWe(o,l){o=o|0,l=l|0}function vWe(o,l){return o=o|0,l=l|0,SWe(l)|0}function SWe(o){return o=o|0,o|0}function DWe(){var o=0;return s[8080]|0||(UX(11040),gr(70,11040,U|0)|0,o=8080,n[o>>2]=1,n[o+4>>2]=0),Ur(11040)|0||UX(11040),11040}function UX(o){o=o|0,xWe(o),cd(o,71)}function bWe(o){o=o|0,PWe(o+24|0)}function PWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function xWe(o){o=o|0;var l=0;l=en()|0,tn(o,5,7,l,RWe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function kWe(o){o=o|0,QWe(o)}function QWe(o){o=o|0,TWe(o)}function TWe(o){o=o|0,s[o+8>>0]=1}function RWe(){return 1936}function FWe(){return NWe()|0}function NWe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Fl(8)|0,o=u,m=o+4|0,n[m>>2]=Jt(1)|0,A=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],OWe(A,m,d),n[u>>2]=A,I=l,o|0}function OWe(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1916,n[u+12>>2]=l,n[o+4>>2]=u}function LWe(o){o=o|0,Zy(o),Et(o)}function MWe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function _We(o){o=o|0,Et(o)}function UWe(){var o=0;return s[8088]|0||(VWe(11076),gr(25,11076,U|0)|0,o=8088,n[o>>2]=1,n[o+4>>2]=0),11076}function HWe(o,l){o=o|0,l=l|0,n[o>>2]=jWe()|0,n[o+4>>2]=qWe()|0,n[o+12>>2]=l,n[o+8>>2]=GWe()|0,n[o+32>>2]=10}function jWe(){return 11745}function qWe(){return 1940}function GWe(){return jP()|0}function WWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(YWe(u),Et(u)):l|0&&Et(l)}function YWe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function VWe(o){o=o|0,_h(o)}function xu(o,l){o=o|0,l=l|0,n[o>>2]=l}function a_(o){return o=o|0,n[o>>2]|0}function KWe(o){return o=o|0,s[n[o>>2]>>0]|0}function JWe(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,n[A>>2]=n[o>>2],zWe(l,A)|0,I=u}function zWe(o,l){o=o|0,l=l|0;var u=0;return u=ZWe(n[o>>2]|0,l)|0,l=o+4|0,n[(n[l>>2]|0)+8>>2]=u,n[(n[l>>2]|0)+8>>2]|0}function ZWe(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,Nl(A),o=Ms(o)|0,l=XWe(o,n[l>>2]|0)|0,Ol(A),I=u,l|0}function Nl(o){o=o|0,n[o>>2]=n[2701],n[o+4>>2]=n[2703]}function XWe(o,l){o=o|0,l=l|0;var u=0;return u=ma($We()|0)|0,dn(0,u|0,o|0,e_(l)|0)|0}function Ol(o){o=o|0,xX(n[o>>2]|0,n[o+4>>2]|0)}function $We(){var o=0;return s[8096]|0||(eYe(11120),o=8096,n[o>>2]=1,n[o+4>>2]=0),11120}function eYe(o){o=o|0,Ro(o,tYe()|0,1)}function tYe(){return 1948}function rYe(){nYe()}function nYe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0;if(Le=I,I=I+16|0,M=Le+4|0,G=Le,aa(65536,10804,n[2702]|0,10812),u=uX()|0,l=n[u>>2]|0,o=n[l>>2]|0,o|0)for(A=n[u+8>>2]|0,u=n[u+4>>2]|0;hf(o|0,c[u>>0]|0|0,s[A>>0]|0),l=l+4|0,o=n[l>>2]|0,o;)A=A+1|0,u=u+1|0;if(o=fX()|0,l=n[o>>2]|0,l|0)do LA(l|0,n[o+4>>2]|0),o=o+8|0,l=n[o>>2]|0;while(l|0);LA(iYe()|0,5167),_=Yy()|0,o=n[_>>2]|0;e:do if(o|0){do sYe(n[o+4>>2]|0),o=n[o>>2]|0;while(o|0);if(o=n[_>>2]|0,o|0){T=_;do{for(;d=o,o=n[o>>2]|0,d=n[d+4>>2]|0,!!(oYe(d)|0);)if(n[G>>2]=T,n[M>>2]=n[G>>2],aYe(_,M)|0,!o)break e;if(lYe(d),T=n[T>>2]|0,l=HX(d)|0,m=Li()|0,B=I,I=I+((1*(l<<2)|0)+15&-16)|0,k=I,I=I+((1*(l<<2)|0)+15&-16)|0,l=n[(BX(d)|0)>>2]|0,l|0)for(u=B,A=k;n[u>>2]=n[(Vy(n[l+4>>2]|0)|0)>>2],n[A>>2]=n[l+8>>2],l=n[l>>2]|0,l;)u=u+4|0,A=A+4|0;Qe=Vy(d)|0,l=cYe(d)|0,u=HX(d)|0,A=uYe(d)|0,ac(Qe|0,l|0,B|0,k|0,u|0,A|0,KM(d)|0),OA(m|0)}while(o|0)}}while(!1);if(o=n[(JM()|0)>>2]|0,o|0)do Qe=o+4|0,_=zM(Qe)|0,d=k2(_)|0,m=P2(_)|0,B=(x2(_)|0)+1|0,k=VP(_)|0,T=jX(Qe)|0,_=Ur(_)|0,M=GP(Qe)|0,G=l_(Qe)|0,Au(0,d|0,m|0,B|0,k|0,T|0,_|0,M|0,G|0,c_(Qe)|0),o=n[o>>2]|0;while(o|0);o=n[(Yy()|0)>>2]|0;e:do if(o|0){t:for(;;){if(l=n[o+4>>2]|0,l|0&&(ae=n[(Vy(l)|0)>>2]|0,We=n[(vX(l)|0)>>2]|0,We|0)){u=We;do{l=u+4|0,A=zM(l)|0;r:do if(A|0)switch(Ur(A)|0){case 0:break t;case 4:case 3:case 2:{k=k2(A)|0,T=P2(A)|0,_=(x2(A)|0)+1|0,M=VP(A)|0,G=Ur(A)|0,Qe=GP(l)|0,Au(ae|0,k|0,T|0,_|0,M|0,0,G|0,Qe|0,l_(l)|0,c_(l)|0);break r}case 1:{B=k2(A)|0,k=P2(A)|0,T=(x2(A)|0)+1|0,_=VP(A)|0,M=jX(l)|0,G=Ur(A)|0,Qe=GP(l)|0,Au(ae|0,B|0,k|0,T|0,_|0,M|0,G|0,Qe|0,l_(l)|0,c_(l)|0);break r}case 5:{_=k2(A)|0,M=P2(A)|0,G=(x2(A)|0)+1|0,Qe=VP(A)|0,Au(ae|0,_|0,M|0,G|0,Qe|0,fYe(A)|0,Ur(A)|0,0,0,0);break r}default:break r}while(!1);u=n[u>>2]|0}while(u|0)}if(o=n[o>>2]|0,!o)break e}Nt()}while(!1);ve(),I=Le}function iYe(){return 11703}function sYe(o){o=o|0,s[o+40>>0]=0}function oYe(o){return o=o|0,(s[o+40>>0]|0)!=0|0}function aYe(o,l){return o=o|0,l=l|0,l=AYe(l)|0,o=n[l>>2]|0,n[l>>2]=n[o>>2],Et(o),n[l>>2]|0}function lYe(o){o=o|0,s[o+40>>0]=1}function HX(o){return o=o|0,n[o+20>>2]|0}function cYe(o){return o=o|0,n[o+8>>2]|0}function uYe(o){return o=o|0,n[o+32>>2]|0}function VP(o){return o=o|0,n[o+4>>2]|0}function jX(o){return o=o|0,n[o+4>>2]|0}function l_(o){return o=o|0,n[o+8>>2]|0}function c_(o){return o=o|0,n[o+16>>2]|0}function fYe(o){return o=o|0,n[o+20>>2]|0}function AYe(o){return o=o|0,n[o>>2]|0}function KP(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0;Lt=I,I=I+16|0,ae=Lt;do if(o>>>0<245){if(_=o>>>0<11?16:o+11&-8,o=_>>>3,G=n[2783]|0,u=G>>>o,u&3|0)return l=(u&1^1)+o|0,o=11172+(l<<1<<2)|0,u=o+8|0,A=n[u>>2]|0,d=A+8|0,m=n[d>>2]|0,(o|0)==(m|0)?n[2783]=G&~(1<>2]=o,n[u>>2]=m),Ge=l<<3,n[A+4>>2]=Ge|3,Ge=A+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1,Ge=d,I=Lt,Ge|0;if(M=n[2785]|0,_>>>0>M>>>0){if(u|0)return l=2<>>12&16,l=l>>>B,u=l>>>5&8,l=l>>>u,d=l>>>2&4,l=l>>>d,o=l>>>1&2,l=l>>>o,A=l>>>1&1,A=(u|B|d|o|A)+(l>>>A)|0,l=11172+(A<<1<<2)|0,o=l+8|0,d=n[o>>2]|0,B=d+8|0,u=n[B>>2]|0,(l|0)==(u|0)?(o=G&~(1<>2]=l,n[o>>2]=u,o=G),m=(A<<3)-_|0,n[d+4>>2]=_|3,A=d+_|0,n[A+4>>2]=m|1,n[A+m>>2]=m,M|0&&(d=n[2788]|0,l=M>>>3,u=11172+(l<<1<<2)|0,l=1<>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=d,n[l+12>>2]=d,n[d+8>>2]=l,n[d+12>>2]=u),n[2785]=m,n[2788]=A,Ge=B,I=Lt,Ge|0;if(k=n[2784]|0,k){if(u=(k&0-k)+-1|0,B=u>>>12&16,u=u>>>B,m=u>>>5&8,u=u>>>m,T=u>>>2&4,u=u>>>T,A=u>>>1&2,u=u>>>A,o=u>>>1&1,o=n[11436+((m|B|T|A|o)+(u>>>o)<<2)>>2]|0,u=(n[o+4>>2]&-8)-_|0,A=n[o+16+(((n[o+16>>2]|0)==0&1)<<2)>>2]|0,!A)T=o,m=u;else{do B=(n[A+4>>2]&-8)-_|0,T=B>>>0>>0,u=T?B:u,o=T?A:o,A=n[A+16+(((n[A+16>>2]|0)==0&1)<<2)>>2]|0;while(A|0);T=o,m=u}if(B=T+_|0,T>>>0>>0){d=n[T+24>>2]|0,l=n[T+12>>2]|0;do if((l|0)==(T|0)){if(o=T+20|0,l=n[o>>2]|0,!l&&(o=T+16|0,l=n[o>>2]|0,!l)){u=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0,u=l}else u=n[T+8>>2]|0,n[u+12>>2]=l,n[l+8>>2]=u,u=l;while(!1);do if(d|0){if(l=n[T+28>>2]|0,o=11436+(l<<2)|0,(T|0)==(n[o>>2]|0)){if(n[o>>2]=u,!u){n[2784]=k&~(1<>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=d,l=n[T+16>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),l=n[T+20>>2]|0,l|0&&(n[u+20>>2]=l,n[l+24>>2]=u)}while(!1);return m>>>0<16?(Ge=m+_|0,n[T+4>>2]=Ge|3,Ge=T+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1):(n[T+4>>2]=_|3,n[B+4>>2]=m|1,n[B+m>>2]=m,M|0&&(A=n[2788]|0,l=M>>>3,u=11172+(l<<1<<2)|0,l=1<>2]|0):(n[2783]=G|l,l=u,o=u+8|0),n[o>>2]=A,n[l+12>>2]=A,n[A+8>>2]=l,n[A+12>>2]=u),n[2785]=m,n[2788]=B),Ge=T+8|0,I=Lt,Ge|0}else G=_}else G=_}else G=_}else if(o>>>0<=4294967231)if(o=o+11|0,_=o&-8,T=n[2784]|0,T){A=0-_|0,o=o>>>8,o?_>>>0>16777215?k=31:(G=(o+1048320|0)>>>16&8,He=o<>>16&4,He=He<>>16&2,k=14-(M|G|k)+(He<>>15)|0,k=_>>>(k+7|0)&1|k<<1):k=0,u=n[11436+(k<<2)>>2]|0;e:do if(!u)u=0,o=0,He=57;else for(o=0,B=_<<((k|0)==31?0:25-(k>>>1)|0),m=0;;){if(d=(n[u+4>>2]&-8)-_|0,d>>>0>>0)if(d)o=u,A=d;else{o=u,A=0,d=u,He=61;break e}if(d=n[u+20>>2]|0,u=n[u+16+(B>>>31<<2)>>2]|0,m=(d|0)==0|(d|0)==(u|0)?m:d,d=(u|0)==0,d){u=m,He=57;break}else B=B<<((d^1)&1)}while(!1);if((He|0)==57){if((u|0)==0&(o|0)==0){if(o=2<>>12&16,G=G>>>B,m=G>>>5&8,G=G>>>m,k=G>>>2&4,G=G>>>k,M=G>>>1&2,G=G>>>M,u=G>>>1&1,o=0,u=n[11436+((m|B|k|M|u)+(G>>>u)<<2)>>2]|0}u?(d=u,He=61):(k=o,B=A)}if((He|0)==61)for(;;)if(He=0,u=(n[d+4>>2]&-8)-_|0,G=u>>>0>>0,u=G?u:A,o=G?d:o,d=n[d+16+(((n[d+16>>2]|0)==0&1)<<2)>>2]|0,d)A=u,He=61;else{k=o,B=u;break}if(k|0&&B>>>0<((n[2785]|0)-_|0)>>>0){if(m=k+_|0,k>>>0>=m>>>0)return Ge=0,I=Lt,Ge|0;d=n[k+24>>2]|0,l=n[k+12>>2]|0;do if((l|0)==(k|0)){if(o=k+20|0,l=n[o>>2]|0,!l&&(o=k+16|0,l=n[o>>2]|0,!l)){l=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0}else Ge=n[k+8>>2]|0,n[Ge+12>>2]=l,n[l+8>>2]=Ge;while(!1);do if(d){if(o=n[k+28>>2]|0,u=11436+(o<<2)|0,(k|0)==(n[u>>2]|0)){if(n[u>>2]=l,!l){A=T&~(1<>2]|0)!=(k|0)&1)<<2)>>2]=l,!l){A=T;break}n[l+24>>2]=d,o=n[k+16>>2]|0,o|0&&(n[l+16>>2]=o,n[o+24>>2]=l),o=n[k+20>>2]|0,o&&(n[l+20>>2]=o,n[o+24>>2]=l),A=T}else A=T;while(!1);do if(B>>>0>=16){if(n[k+4>>2]=_|3,n[m+4>>2]=B|1,n[m+B>>2]=B,l=B>>>3,B>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=m,n[l+12>>2]=m,n[m+8>>2]=l,n[m+12>>2]=u;break}if(l=B>>>8,l?B>>>0>16777215?l=31:(He=(l+1048320|0)>>>16&8,Ge=l<>>16&4,Ge=Ge<>>16&2,l=14-(ct|He|l)+(Ge<>>15)|0,l=B>>>(l+7|0)&1|l<<1):l=0,u=11436+(l<<2)|0,n[m+28>>2]=l,o=m+16|0,n[o+4>>2]=0,n[o>>2]=0,o=1<>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}for(o=B<<((l|0)==31?0:25-(l>>>1)|0),u=n[u>>2]|0;;){if((n[u+4>>2]&-8|0)==(B|0)){He=97;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=96;break}}if((He|0)==96){n[A>>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}else if((He|0)==97){He=u+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=m,n[He>>2]=m,n[m+8>>2]=Ge,n[m+12>>2]=u,n[m+24>>2]=0;break}}else Ge=B+_|0,n[k+4>>2]=Ge|3,Ge=k+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1;while(!1);return Ge=k+8|0,I=Lt,Ge|0}else G=_}else G=_;else G=-1;while(!1);if(u=n[2785]|0,u>>>0>=G>>>0)return l=u-G|0,o=n[2788]|0,l>>>0>15?(Ge=o+G|0,n[2788]=Ge,n[2785]=l,n[Ge+4>>2]=l|1,n[Ge+l>>2]=l,n[o+4>>2]=G|3):(n[2785]=0,n[2788]=0,n[o+4>>2]=u|3,Ge=o+u+4|0,n[Ge>>2]=n[Ge>>2]|1),Ge=o+8|0,I=Lt,Ge|0;if(B=n[2786]|0,B>>>0>G>>>0)return ct=B-G|0,n[2786]=ct,Ge=n[2789]|0,He=Ge+G|0,n[2789]=He,n[He+4>>2]=ct|1,n[Ge+4>>2]=G|3,Ge=Ge+8|0,I=Lt,Ge|0;if(n[2901]|0?o=n[2903]|0:(n[2903]=4096,n[2902]=4096,n[2904]=-1,n[2905]=-1,n[2906]=0,n[2894]=0,o=ae&-16^1431655768,n[ae>>2]=o,n[2901]=o,o=4096),k=G+48|0,T=G+47|0,m=o+T|0,d=0-o|0,_=m&d,_>>>0<=G>>>0||(o=n[2893]|0,o|0&&(M=n[2891]|0,ae=M+_|0,ae>>>0<=M>>>0|ae>>>0>o>>>0)))return Ge=0,I=Lt,Ge|0;e:do if(n[2894]&4)l=0,He=133;else{u=n[2789]|0;t:do if(u){for(A=11580;o=n[A>>2]|0,!(o>>>0<=u>>>0&&(Qe=A+4|0,(o+(n[Qe>>2]|0)|0)>>>0>u>>>0));)if(o=n[A+8>>2]|0,o)A=o;else{He=118;break t}if(l=m-B&d,l>>>0<2147483647)if(o=Yh(l|0)|0,(o|0)==((n[A>>2]|0)+(n[Qe>>2]|0)|0)){if((o|0)!=-1){B=l,m=o,He=135;break e}}else A=o,He=126;else l=0}else He=118;while(!1);do if((He|0)==118)if(u=Yh(0)|0,(u|0)!=-1&&(l=u,We=n[2902]|0,Le=We+-1|0,l=(Le&l|0?(Le+l&0-We)-l|0:0)+_|0,We=n[2891]|0,Le=l+We|0,l>>>0>G>>>0&l>>>0<2147483647)){if(Qe=n[2893]|0,Qe|0&&Le>>>0<=We>>>0|Le>>>0>Qe>>>0){l=0;break}if(o=Yh(l|0)|0,(o|0)==(u|0)){B=l,m=u,He=135;break e}else A=o,He=126}else l=0;while(!1);do if((He|0)==126){if(u=0-l|0,!(k>>>0>l>>>0&(l>>>0<2147483647&(A|0)!=-1)))if((A|0)==-1){l=0;break}else{B=l,m=A,He=135;break e}if(o=n[2903]|0,o=T-l+o&0-o,o>>>0>=2147483647){B=l,m=A,He=135;break e}if((Yh(o|0)|0)==-1){Yh(u|0)|0,l=0;break}else{B=o+l|0,m=A,He=135;break e}}while(!1);n[2894]=n[2894]|4,He=133}while(!1);if((He|0)==133&&_>>>0<2147483647&&(ct=Yh(_|0)|0,Qe=Yh(0)|0,tt=Qe-ct|0,Ze=tt>>>0>(G+40|0)>>>0,!((ct|0)==-1|Ze^1|ct>>>0>>0&((ct|0)!=-1&(Qe|0)!=-1)^1))&&(B=Ze?tt:l,m=ct,He=135),(He|0)==135){l=(n[2891]|0)+B|0,n[2891]=l,l>>>0>(n[2892]|0)>>>0&&(n[2892]=l),T=n[2789]|0;do if(T){for(l=11580;;){if(o=n[l>>2]|0,u=l+4|0,A=n[u>>2]|0,(m|0)==(o+A|0)){He=145;break}if(d=n[l+8>>2]|0,d)l=d;else break}if((He|0)==145&&!(n[l+12>>2]&8|0)&&T>>>0>>0&T>>>0>=o>>>0){n[u>>2]=A+B,Ge=T+8|0,Ge=Ge&7|0?0-Ge&7:0,He=T+Ge|0,Ge=(n[2786]|0)+(B-Ge)|0,n[2789]=He,n[2786]=Ge,n[He+4>>2]=Ge|1,n[He+Ge+4>>2]=40,n[2790]=n[2905];break}for(m>>>0<(n[2787]|0)>>>0&&(n[2787]=m),u=m+B|0,l=11580;;){if((n[l>>2]|0)==(u|0)){He=153;break}if(o=n[l+8>>2]|0,o)l=o;else break}if((He|0)==153&&!(n[l+12>>2]&8|0)){n[l>>2]=m,M=l+4|0,n[M>>2]=(n[M>>2]|0)+B,M=m+8|0,M=m+(M&7|0?0-M&7:0)|0,l=u+8|0,l=u+(l&7|0?0-l&7:0)|0,_=M+G|0,k=l-M-G|0,n[M+4>>2]=G|3;do if((l|0)!=(T|0)){if((l|0)==(n[2788]|0)){Ge=(n[2785]|0)+k|0,n[2785]=Ge,n[2788]=_,n[_+4>>2]=Ge|1,n[_+Ge>>2]=Ge;break}if(o=n[l+4>>2]|0,(o&3|0)==1){B=o&-8,A=o>>>3;e:do if(o>>>0<256)if(o=n[l+8>>2]|0,u=n[l+12>>2]|0,(u|0)==(o|0)){n[2783]=n[2783]&~(1<>2]=u,n[u+8>>2]=o;break}else{m=n[l+24>>2]|0,o=n[l+12>>2]|0;do if((o|0)==(l|0)){if(A=l+16|0,u=A+4|0,o=n[u>>2]|0,!o)if(o=n[A>>2]|0,o)u=A;else{o=0;break}for(;;){if(A=o+20|0,d=n[A>>2]|0,d|0){o=d,u=A;continue}if(A=o+16|0,d=n[A>>2]|0,d)o=d,u=A;else break}n[u>>2]=0}else Ge=n[l+8>>2]|0,n[Ge+12>>2]=o,n[o+8>>2]=Ge;while(!1);if(!m)break;u=n[l+28>>2]|0,A=11436+(u<<2)|0;do if((l|0)!=(n[A>>2]|0)){if(n[m+16+(((n[m+16>>2]|0)!=(l|0)&1)<<2)>>2]=o,!o)break e}else{if(n[A>>2]=o,o|0)break;n[2784]=n[2784]&~(1<>2]=m,u=l+16|0,A=n[u>>2]|0,A|0&&(n[o+16>>2]=A,n[A+24>>2]=o),u=n[u+4>>2]|0,!u)break;n[o+20>>2]=u,n[u+24>>2]=o}while(!1);l=l+B|0,d=B+k|0}else d=k;if(l=l+4|0,n[l>>2]=n[l>>2]&-2,n[_+4>>2]=d|1,n[_+d>>2]=d,l=d>>>3,d>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=_,n[l+12>>2]=_,n[_+8>>2]=l,n[_+12>>2]=u;break}l=d>>>8;do if(!l)l=0;else{if(d>>>0>16777215){l=31;break}He=(l+1048320|0)>>>16&8,Ge=l<>>16&4,Ge=Ge<>>16&2,l=14-(ct|He|l)+(Ge<>>15)|0,l=d>>>(l+7|0)&1|l<<1}while(!1);if(A=11436+(l<<2)|0,n[_+28>>2]=l,o=_+16|0,n[o+4>>2]=0,n[o>>2]=0,o=n[2784]|0,u=1<>2]=_,n[_+24>>2]=A,n[_+12>>2]=_,n[_+8>>2]=_;break}for(o=d<<((l|0)==31?0:25-(l>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){He=194;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=193;break}}if((He|0)==193){n[A>>2]=_,n[_+24>>2]=u,n[_+12>>2]=_,n[_+8>>2]=_;break}else if((He|0)==194){He=u+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=_,n[He>>2]=_,n[_+8>>2]=Ge,n[_+12>>2]=u,n[_+24>>2]=0;break}}else Ge=(n[2786]|0)+k|0,n[2786]=Ge,n[2789]=_,n[_+4>>2]=Ge|1;while(!1);return Ge=M+8|0,I=Lt,Ge|0}for(l=11580;o=n[l>>2]|0,!(o>>>0<=T>>>0&&(Ge=o+(n[l+4>>2]|0)|0,Ge>>>0>T>>>0));)l=n[l+8>>2]|0;d=Ge+-47|0,o=d+8|0,o=d+(o&7|0?0-o&7:0)|0,d=T+16|0,o=o>>>0>>0?T:o,l=o+8|0,u=m+8|0,u=u&7|0?0-u&7:0,He=m+u|0,u=B+-40-u|0,n[2789]=He,n[2786]=u,n[He+4>>2]=u|1,n[He+u+4>>2]=40,n[2790]=n[2905],u=o+4|0,n[u>>2]=27,n[l>>2]=n[2895],n[l+4>>2]=n[2896],n[l+8>>2]=n[2897],n[l+12>>2]=n[2898],n[2895]=m,n[2896]=B,n[2898]=0,n[2897]=l,l=o+24|0;do He=l,l=l+4|0,n[l>>2]=7;while((He+8|0)>>>0>>0);if((o|0)!=(T|0)){if(m=o-T|0,n[u>>2]=n[u>>2]&-2,n[T+4>>2]=m|1,n[o>>2]=m,l=m>>>3,m>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=T,n[l+12>>2]=T,n[T+8>>2]=l,n[T+12>>2]=u;break}if(l=m>>>8,l?m>>>0>16777215?u=31:(He=(l+1048320|0)>>>16&8,Ge=l<>>16&4,Ge=Ge<>>16&2,u=14-(ct|He|u)+(Ge<>>15)|0,u=m>>>(u+7|0)&1|u<<1):u=0,A=11436+(u<<2)|0,n[T+28>>2]=u,n[T+20>>2]=0,n[d>>2]=0,l=n[2784]|0,o=1<>2]=T,n[T+24>>2]=A,n[T+12>>2]=T,n[T+8>>2]=T;break}for(o=m<<((u|0)==31?0:25-(u>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(m|0)){He=216;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=215;break}}if((He|0)==215){n[A>>2]=T,n[T+24>>2]=u,n[T+12>>2]=T,n[T+8>>2]=T;break}else if((He|0)==216){He=u+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=T,n[He>>2]=T,n[T+8>>2]=Ge,n[T+12>>2]=u,n[T+24>>2]=0;break}}}else{Ge=n[2787]|0,(Ge|0)==0|m>>>0>>0&&(n[2787]=m),n[2895]=m,n[2896]=B,n[2898]=0,n[2792]=n[2901],n[2791]=-1,l=0;do Ge=11172+(l<<1<<2)|0,n[Ge+12>>2]=Ge,n[Ge+8>>2]=Ge,l=l+1|0;while((l|0)!=32);Ge=m+8|0,Ge=Ge&7|0?0-Ge&7:0,He=m+Ge|0,Ge=B+-40-Ge|0,n[2789]=He,n[2786]=Ge,n[He+4>>2]=Ge|1,n[He+Ge+4>>2]=40,n[2790]=n[2905]}while(!1);if(l=n[2786]|0,l>>>0>G>>>0)return ct=l-G|0,n[2786]=ct,Ge=n[2789]|0,He=Ge+G|0,n[2789]=He,n[He+4>>2]=ct|1,n[Ge+4>>2]=G|3,Ge=Ge+8|0,I=Lt,Ge|0}return n[(Jy()|0)>>2]=12,Ge=0,I=Lt,Ge|0}function JP(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(o){u=o+-8|0,d=n[2787]|0,o=n[o+-4>>2]|0,l=o&-8,T=u+l|0;do if(o&1)k=u,B=u;else{if(A=n[u>>2]|0,!(o&3)||(B=u+(0-A)|0,m=A+l|0,B>>>0>>0))return;if((B|0)==(n[2788]|0)){if(o=T+4|0,l=n[o>>2]|0,(l&3|0)!=3){k=B,l=m;break}n[2785]=m,n[o>>2]=l&-2,n[B+4>>2]=m|1,n[B+m>>2]=m;return}if(u=A>>>3,A>>>0<256)if(o=n[B+8>>2]|0,l=n[B+12>>2]|0,(l|0)==(o|0)){n[2783]=n[2783]&~(1<>2]=l,n[l+8>>2]=o,k=B,l=m;break}d=n[B+24>>2]|0,o=n[B+12>>2]|0;do if((o|0)==(B|0)){if(u=B+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{o=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0}else k=n[B+8>>2]|0,n[k+12>>2]=o,n[o+8>>2]=k;while(!1);if(d){if(l=n[B+28>>2]|0,u=11436+(l<<2)|0,(B|0)==(n[u>>2]|0)){if(n[u>>2]=o,!o){n[2784]=n[2784]&~(1<>2]|0)!=(B|0)&1)<<2)>>2]=o,!o){k=B,l=m;break}n[o+24>>2]=d,l=B+16|0,u=n[l>>2]|0,u|0&&(n[o+16>>2]=u,n[u+24>>2]=o),l=n[l+4>>2]|0,l?(n[o+20>>2]=l,n[l+24>>2]=o,k=B,l=m):(k=B,l=m)}else k=B,l=m}while(!1);if(!(B>>>0>=T>>>0)&&(o=T+4|0,A=n[o>>2]|0,!!(A&1))){if(A&2)n[o>>2]=A&-2,n[k+4>>2]=l|1,n[B+l>>2]=l,d=l;else{if(o=n[2788]|0,(T|0)==(n[2789]|0)){if(T=(n[2786]|0)+l|0,n[2786]=T,n[2789]=k,n[k+4>>2]=T|1,(k|0)!=(o|0))return;n[2788]=0,n[2785]=0;return}if((T|0)==(o|0)){T=(n[2785]|0)+l|0,n[2785]=T,n[2788]=B,n[k+4>>2]=T|1,n[B+T>>2]=T;return}d=(A&-8)+l|0,u=A>>>3;do if(A>>>0<256)if(l=n[T+8>>2]|0,o=n[T+12>>2]|0,(o|0)==(l|0)){n[2783]=n[2783]&~(1<>2]=o,n[o+8>>2]=l;break}else{m=n[T+24>>2]|0,o=n[T+12>>2]|0;do if((o|0)==(T|0)){if(u=T+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{u=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0,u=o}else u=n[T+8>>2]|0,n[u+12>>2]=o,n[o+8>>2]=u,u=o;while(!1);if(m|0){if(o=n[T+28>>2]|0,l=11436+(o<<2)|0,(T|0)==(n[l>>2]|0)){if(n[l>>2]=u,!u){n[2784]=n[2784]&~(1<>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=m,o=T+16|0,l=n[o>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),o=n[o+4>>2]|0,o|0&&(n[u+20>>2]=o,n[o+24>>2]=u)}}while(!1);if(n[k+4>>2]=d|1,n[B+d>>2]=d,(k|0)==(n[2788]|0)){n[2785]=d;return}}if(o=d>>>3,d>>>0<256){u=11172+(o<<1<<2)|0,l=n[2783]|0,o=1<>2]|0):(n[2783]=l|o,o=u,l=u+8|0),n[l>>2]=k,n[o+12>>2]=k,n[k+8>>2]=o,n[k+12>>2]=u;return}o=d>>>8,o?d>>>0>16777215?o=31:(B=(o+1048320|0)>>>16&8,T=o<>>16&4,T=T<>>16&2,o=14-(m|B|o)+(T<>>15)|0,o=d>>>(o+7|0)&1|o<<1):o=0,A=11436+(o<<2)|0,n[k+28>>2]=o,n[k+20>>2]=0,n[k+16>>2]=0,l=n[2784]|0,u=1<>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){o=73;break}if(A=u+16+(l>>>31<<2)|0,o=n[A>>2]|0,o)l=l<<1,u=o;else{o=72;break}}if((o|0)==72){n[A>>2]=k,n[k+24>>2]=u,n[k+12>>2]=k,n[k+8>>2]=k;break}else if((o|0)==73){B=u+8|0,T=n[B>>2]|0,n[T+12>>2]=k,n[B>>2]=k,n[k+8>>2]=T,n[k+12>>2]=u,n[k+24>>2]=0;break}}else n[2784]=l|u,n[A>>2]=k,n[k+24>>2]=A,n[k+12>>2]=k,n[k+8>>2]=k;while(!1);if(T=(n[2791]|0)+-1|0,n[2791]=T,!T)o=11588;else return;for(;o=n[o>>2]|0,o;)o=o+8|0;n[2791]=-1}}}function pYe(){return 11628}function hYe(o){o=o|0;var l=0,u=0;return l=I,I=I+16|0,u=l,n[u>>2]=mYe(n[o+60>>2]|0)|0,o=zP(hu(6,u|0)|0)|0,I=l,o|0}function qX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0;G=I,I=I+48|0,_=G+16|0,m=G,d=G+32|0,k=o+28|0,A=n[k>>2]|0,n[d>>2]=A,T=o+20|0,A=(n[T>>2]|0)-A|0,n[d+4>>2]=A,n[d+8>>2]=l,n[d+12>>2]=u,A=A+u|0,B=o+60|0,n[m>>2]=n[B>>2],n[m+4>>2]=d,n[m+8>>2]=2,m=zP(Ma(146,m|0)|0)|0;e:do if((A|0)!=(m|0)){for(l=2;!((m|0)<0);)if(A=A-m|0,We=n[d+4>>2]|0,ae=m>>>0>We>>>0,d=ae?d+8|0:d,l=(ae<<31>>31)+l|0,We=m-(ae?We:0)|0,n[d>>2]=(n[d>>2]|0)+We,ae=d+4|0,n[ae>>2]=(n[ae>>2]|0)-We,n[_>>2]=n[B>>2],n[_+4>>2]=d,n[_+8>>2]=l,m=zP(Ma(146,_|0)|0)|0,(A|0)==(m|0)){M=3;break e}n[o+16>>2]=0,n[k>>2]=0,n[T>>2]=0,n[o>>2]=n[o>>2]|32,(l|0)==2?u=0:u=u-(n[d+4>>2]|0)|0}else M=3;while(!1);return(M|0)==3&&(We=n[o+44>>2]|0,n[o+16>>2]=We+(n[o+48>>2]|0),n[k>>2]=We,n[T>>2]=We),I=G,u|0}function gYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return d=I,I=I+32|0,m=d,A=d+20|0,n[m>>2]=n[o+60>>2],n[m+4>>2]=0,n[m+8>>2]=l,n[m+12>>2]=A,n[m+16>>2]=u,(zP(La(140,m|0)|0)|0)<0?(n[A>>2]=-1,o=-1):o=n[A>>2]|0,I=d,o|0}function zP(o){return o=o|0,o>>>0>4294963200&&(n[(Jy()|0)>>2]=0-o,o=-1),o|0}function Jy(){return(dYe()|0)+64|0}function dYe(){return u_()|0}function u_(){return 2084}function mYe(o){return o=o|0,o|0}function yYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return d=I,I=I+32|0,A=d,n[o+36>>2]=1,!(n[o>>2]&64|0)&&(n[A>>2]=n[o+60>>2],n[A+4>>2]=21523,n[A+8>>2]=d+16,so(54,A|0)|0)&&(s[o+75>>0]=-1),A=qX(o,l,u)|0,I=d,A|0}function GX(o,l){o=o|0,l=l|0;var u=0,A=0;if(u=s[o>>0]|0,A=s[l>>0]|0,!(u<<24>>24)||u<<24>>24!=A<<24>>24)o=A;else{do o=o+1|0,l=l+1|0,u=s[o>>0]|0,A=s[l>>0]|0;while(!(!(u<<24>>24)||u<<24>>24!=A<<24>>24));o=A}return(u&255)-(o&255)|0}function EYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;e:do if(!u)o=0;else{for(;A=s[o>>0]|0,d=s[l>>0]|0,A<<24>>24==d<<24>>24;)if(u=u+-1|0,u)o=o+1|0,l=l+1|0;else{o=0;break e}o=(A&255)-(d&255)|0}while(!1);return o|0}function WX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0;Qe=I,I=I+224|0,M=Qe+120|0,G=Qe+80|0,We=Qe,Le=Qe+136|0,A=G,d=A+40|0;do n[A>>2]=0,A=A+4|0;while((A|0)<(d|0));return n[M>>2]=n[u>>2],(f_(0,l,M,We,G)|0)<0?u=-1:((n[o+76>>2]|0)>-1?ae=IYe(o)|0:ae=0,u=n[o>>2]|0,_=u&32,(s[o+74>>0]|0)<1&&(n[o>>2]=u&-33),A=o+48|0,n[A>>2]|0?u=f_(o,l,M,We,G)|0:(d=o+44|0,m=n[d>>2]|0,n[d>>2]=Le,B=o+28|0,n[B>>2]=Le,k=o+20|0,n[k>>2]=Le,n[A>>2]=80,T=o+16|0,n[T>>2]=Le+80,u=f_(o,l,M,We,G)|0,m&&(ex[n[o+36>>2]&7](o,0,0)|0,u=n[k>>2]|0?u:-1,n[d>>2]=m,n[A>>2]=0,n[T>>2]=0,n[B>>2]=0,n[k>>2]=0)),A=n[o>>2]|0,n[o>>2]=A|_,ae|0&&CYe(o),u=A&32|0?-1:u),I=Qe,u|0}function f_(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0;cr=I,I=I+64|0,fr=cr+16|0,$t=cr,Lt=cr+24|0,Tr=cr+8|0,Hr=cr+20|0,n[fr>>2]=l,ct=(o|0)!=0,He=Lt+40|0,Ge=He,Lt=Lt+39|0,qr=Tr+4|0,B=0,m=0,M=0;e:for(;;){do if((m|0)>-1)if((B|0)>(2147483647-m|0)){n[(Jy()|0)>>2]=75,m=-1;break}else{m=B+m|0;break}while(!1);if(B=s[l>>0]|0,B<<24>>24)k=l;else{Ze=87;break}t:for(;;){switch(B<<24>>24){case 37:{B=k,Ze=9;break t}case 0:{B=k;break t}default:}tt=k+1|0,n[fr>>2]=tt,B=s[tt>>0]|0,k=tt}t:do if((Ze|0)==9)for(;;){if(Ze=0,(s[k+1>>0]|0)!=37)break t;if(B=B+1|0,k=k+2|0,n[fr>>2]=k,(s[k>>0]|0)==37)Ze=9;else break}while(!1);if(B=B-l|0,ct&&Ds(o,l,B),B|0){l=k;continue}T=k+1|0,B=(s[T>>0]|0)+-48|0,B>>>0<10?(tt=(s[k+2>>0]|0)==36,Qe=tt?B:-1,M=tt?1:M,T=tt?k+3|0:T):Qe=-1,n[fr>>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0;t:do if(k>>>0<32)for(_=0,G=B;;){if(B=1<>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0,k>>>0>=32)break;G=B}else _=0;while(!1);if(B<<24>>24==42){if(k=T+1|0,B=(s[k>>0]|0)+-48|0,B>>>0<10&&(s[T+2>>0]|0)==36)n[d+(B<<2)>>2]=10,B=n[A+((s[k>>0]|0)+-48<<3)>>2]|0,M=1,T=T+3|0;else{if(M|0){m=-1;break}ct?(M=(n[u>>2]|0)+3&-4,B=n[M>>2]|0,n[u>>2]=M+4,M=0,T=k):(B=0,M=0,T=k)}n[fr>>2]=T,tt=(B|0)<0,B=tt?0-B|0:B,_=tt?_|8192:_}else{if(B=YX(fr)|0,(B|0)<0){m=-1;break}T=n[fr>>2]|0}do if((s[T>>0]|0)==46){if((s[T+1>>0]|0)!=42){n[fr>>2]=T+1,k=YX(fr)|0,T=n[fr>>2]|0;break}if(G=T+2|0,k=(s[G>>0]|0)+-48|0,k>>>0<10&&(s[T+3>>0]|0)==36){n[d+(k<<2)>>2]=10,k=n[A+((s[G>>0]|0)+-48<<3)>>2]|0,T=T+4|0,n[fr>>2]=T;break}if(M|0){m=-1;break e}ct?(tt=(n[u>>2]|0)+3&-4,k=n[tt>>2]|0,n[u>>2]=tt+4):k=0,n[fr>>2]=G,T=G}else k=-1;while(!1);for(Le=0;;){if(((s[T>>0]|0)+-65|0)>>>0>57){m=-1;break e}if(tt=T+1|0,n[fr>>2]=tt,G=s[(s[T>>0]|0)+-65+(5178+(Le*58|0))>>0]|0,ae=G&255,(ae+-1|0)>>>0<8)Le=ae,T=tt;else break}if(!(G<<24>>24)){m=-1;break}We=(Qe|0)>-1;do if(G<<24>>24==19)if(We){m=-1;break e}else Ze=49;else{if(We){n[d+(Qe<<2)>>2]=ae,We=A+(Qe<<3)|0,Qe=n[We+4>>2]|0,Ze=$t,n[Ze>>2]=n[We>>2],n[Ze+4>>2]=Qe,Ze=49;break}if(!ct){m=0;break e}VX($t,ae,u)}while(!1);if((Ze|0)==49&&(Ze=0,!ct)){B=0,l=tt;continue}T=s[T>>0]|0,T=(Le|0)!=0&(T&15|0)==3?T&-33:T,We=_&-65537,Qe=_&8192|0?We:_;t:do switch(T|0){case 110:switch((Le&255)<<24>>24){case 0:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 1:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 2:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}case 3:{a[n[$t>>2]>>1]=m,B=0,l=tt;continue e}case 4:{s[n[$t>>2]>>0]=m,B=0,l=tt;continue e}case 6:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 7:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}default:{B=0,l=tt;continue e}}case 112:{T=120,k=k>>>0>8?k:8,l=Qe|8,Ze=61;break}case 88:case 120:{l=Qe,Ze=61;break}case 111:{T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,ae=BYe(l,T,He)|0,We=Ge-ae|0,_=0,G=5642,k=(Qe&8|0)==0|(k|0)>(We|0)?k:We+1|0,We=Qe,Ze=67;break}case 105:case 100:if(T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,(T|0)<0){l=ZP(0,0,l|0,T|0)|0,T=ye,_=$t,n[_>>2]=l,n[_+4>>2]=T,_=1,G=5642,Ze=66;break t}else{_=(Qe&2049|0)!=0&1,G=Qe&2048|0?5643:Qe&1|0?5644:5642,Ze=66;break t}case 117:{T=$t,_=0,G=5642,l=n[T>>2]|0,T=n[T+4>>2]|0,Ze=66;break}case 99:{s[Lt>>0]=n[$t>>2],l=Lt,_=0,G=5642,ae=He,T=1,k=We;break}case 109:{T=vYe(n[(Jy()|0)>>2]|0)|0,Ze=71;break}case 115:{T=n[$t>>2]|0,T=T|0?T:5652,Ze=71;break}case 67:{n[Tr>>2]=n[$t>>2],n[qr>>2]=0,n[$t>>2]=Tr,ae=-1,T=Tr,Ze=75;break}case 83:{l=n[$t>>2]|0,k?(ae=k,T=l,Ze=75):(_s(o,32,B,0,Qe),l=0,Ze=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{B=DYe(o,+E[$t>>3],B,k,Qe,T)|0,l=tt;continue e}default:_=0,G=5642,ae=He,T=k,k=Qe}while(!1);t:do if((Ze|0)==61)Qe=$t,Le=n[Qe>>2]|0,Qe=n[Qe+4>>2]|0,ae=wYe(Le,Qe,He,T&32)|0,G=(l&8|0)==0|(Le|0)==0&(Qe|0)==0,_=G?0:2,G=G?5642:5642+(T>>4)|0,We=l,l=Le,T=Qe,Ze=67;else if((Ze|0)==66)ae=zy(l,T,He)|0,We=Qe,Ze=67;else if((Ze|0)==71)Ze=0,Qe=SYe(T,0,k)|0,Le=(Qe|0)==0,l=T,_=0,G=5642,ae=Le?T+k|0:Qe,T=Le?k:Qe-T|0,k=We;else if((Ze|0)==75){for(Ze=0,G=T,l=0,k=0;_=n[G>>2]|0,!(!_||(k=KX(Hr,_)|0,(k|0)<0|k>>>0>(ae-l|0)>>>0));)if(l=k+l|0,ae>>>0>l>>>0)G=G+4|0;else break;if((k|0)<0){m=-1;break e}if(_s(o,32,B,l,Qe),!l)l=0,Ze=84;else for(_=0;;){if(k=n[T>>2]|0,!k){Ze=84;break t}if(k=KX(Hr,k)|0,_=k+_|0,(_|0)>(l|0)){Ze=84;break t}if(Ds(o,Hr,k),_>>>0>=l>>>0){Ze=84;break}else T=T+4|0}}while(!1);if((Ze|0)==67)Ze=0,T=(l|0)!=0|(T|0)!=0,Qe=(k|0)!=0|T,T=((T^1)&1)+(Ge-ae)|0,l=Qe?ae:He,ae=He,T=Qe?(k|0)>(T|0)?k:T:k,k=(k|0)>-1?We&-65537:We;else if((Ze|0)==84){Ze=0,_s(o,32,B,l,Qe^8192),B=(B|0)>(l|0)?B:l,l=tt;continue}Le=ae-l|0,We=(T|0)<(Le|0)?Le:T,Qe=We+_|0,B=(B|0)<(Qe|0)?Qe:B,_s(o,32,B,Qe,k),Ds(o,G,_),_s(o,48,B,Qe,k^65536),_s(o,48,We,Le,0),Ds(o,l,Le),_s(o,32,B,Qe,k^8192),l=tt}e:do if((Ze|0)==87&&!o)if(!M)m=0;else{for(m=1;l=n[d+(m<<2)>>2]|0,!!l;)if(VX(A+(m<<3)|0,l,u),m=m+1|0,(m|0)>=10){m=1;break e}for(;;){if(n[d+(m<<2)>>2]|0){m=-1;break e}if(m=m+1|0,(m|0)>=10){m=1;break}}}while(!1);return I=cr,m|0}function IYe(o){return o=o|0,0}function CYe(o){o=o|0}function Ds(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]&32||NYe(l,u,o)|0}function YX(o){o=o|0;var l=0,u=0,A=0;if(u=n[o>>2]|0,A=(s[u>>0]|0)+-48|0,A>>>0<10){l=0;do l=A+(l*10|0)|0,u=u+1|0,n[o>>2]=u,A=(s[u>>0]|0)+-48|0;while(A>>>0<10)}else l=0;return l|0}function VX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;e:do if(l>>>0<=20)do switch(l|0){case 9:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,n[o>>2]=l;break e}case 10:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=((l|0)<0)<<31>>31;break e}case 11:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=0;break e}case 12:{A=(n[u>>2]|0)+7&-8,l=A,d=n[l>>2]|0,l=n[l+4>>2]|0,n[u>>2]=A+8,A=o,n[A>>2]=d,n[A+4>>2]=l;break e}case 13:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&65535)<<16>>16,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 14:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&65535,n[d+4>>2]=0;break e}case 15:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&255)<<24>>24,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 16:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&255,n[d+4>>2]=0;break e}case 17:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}case 18:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}default:break e}while(!1);while(!1)}function wYe(o,l,u,A){if(o=o|0,l=l|0,u=u|0,A=A|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=c[5694+(o&15)>>0]|0|A,o=XP(o|0,l|0,4)|0,l=ye;while(!((o|0)==0&(l|0)==0));return u|0}function BYe(o,l,u){if(o=o|0,l=l|0,u=u|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=o&7|48,o=XP(o|0,l|0,3)|0,l=ye;while(!((o|0)==0&(l|0)==0));return u|0}function zy(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if(l>>>0>0|(l|0)==0&o>>>0>4294967295){for(;A=g_(o|0,l|0,10,0)|0,u=u+-1|0,s[u>>0]=A&255|48,A=o,o=h_(o|0,l|0,10,0)|0,l>>>0>9|(l|0)==9&A>>>0>4294967295;)l=ye;l=o}else l=o;if(l)for(;u=u+-1|0,s[u>>0]=(l>>>0)%10|0|48,!(l>>>0<10);)l=(l>>>0)/10|0;return u|0}function vYe(o){return o=o|0,QYe(o,n[(kYe()|0)+188>>2]|0)|0}function SYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;m=l&255,A=(u|0)!=0;e:do if(A&(o&3|0)!=0)for(d=l&255;;){if((s[o>>0]|0)==d<<24>>24){B=6;break e}if(o=o+1|0,u=u+-1|0,A=(u|0)!=0,!(A&(o&3|0)!=0)){B=5;break}}else B=5;while(!1);(B|0)==5&&(A?B=6:u=0);e:do if((B|0)==6&&(d=l&255,(s[o>>0]|0)!=d<<24>>24)){A=_e(m,16843009)|0;t:do if(u>>>0>3){for(;m=n[o>>2]^A,!((m&-2139062144^-2139062144)&m+-16843009|0);)if(o=o+4|0,u=u+-4|0,u>>>0<=3){B=11;break t}}else B=11;while(!1);if((B|0)==11&&!u){u=0;break}for(;;){if((s[o>>0]|0)==d<<24>>24)break e;if(o=o+1|0,u=u+-1|0,!u){u=0;break}}}while(!1);return(u|0?o:0)|0}function _s(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0;if(B=I,I=I+256|0,m=B,(u|0)>(A|0)&(d&73728|0)==0){if(d=u-A|0,Xy(m|0,l|0,(d>>>0<256?d:256)|0)|0,d>>>0>255){l=u-A|0;do Ds(o,m,256),d=d+-256|0;while(d>>>0>255);d=l&255}Ds(o,m,d)}I=B}function KX(o,l){return o=o|0,l=l|0,o?o=PYe(o,l,0)|0:o=0,o|0}function DYe(o,l,u,A,d,m){o=o|0,l=+l,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0;Hn=I,I=I+560|0,T=Hn+8|0,tt=Hn,cr=Hn+524|0,Hr=cr,_=Hn+512|0,n[tt>>2]=0,Tr=_+12|0,JX(l)|0,(ye|0)<0?(l=-l,fr=1,qr=5659):(fr=(d&2049|0)!=0&1,qr=d&2048|0?5662:d&1|0?5665:5660),JX(l)|0,$t=ye&2146435072;do if($t>>>0<2146435072|($t|0)==2146435072&!1){if(We=+bYe(l,tt)*2,B=We!=0,B&&(n[tt>>2]=(n[tt>>2]|0)+-1),ct=m|32,(ct|0)==97){Le=m&32,ae=Le|0?qr+9|0:qr,G=fr|2,B=12-A|0;do if(A>>>0>11|(B|0)==0)l=We;else{l=8;do B=B+-1|0,l=l*16;while(B|0);if((s[ae>>0]|0)==45){l=-(l+(-We-l));break}else{l=We+l-l;break}}while(!1);k=n[tt>>2]|0,B=(k|0)<0?0-k|0:k,B=zy(B,((B|0)<0)<<31>>31,Tr)|0,(B|0)==(Tr|0)&&(B=_+11|0,s[B>>0]=48),s[B+-1>>0]=(k>>31&2)+43,M=B+-2|0,s[M>>0]=m+15,_=(A|0)<1,T=(d&8|0)==0,B=cr;do $t=~~l,k=B+1|0,s[B>>0]=c[5694+$t>>0]|Le,l=(l-+($t|0))*16,(k-Hr|0)==1&&!(T&(_&l==0))?(s[k>>0]=46,B=B+2|0):B=k;while(l!=0);$t=B-Hr|0,Hr=Tr-M|0,Tr=(A|0)!=0&($t+-2|0)<(A|0)?A+2|0:$t,B=Hr+G+Tr|0,_s(o,32,u,B,d),Ds(o,ae,G),_s(o,48,u,B,d^65536),Ds(o,cr,$t),_s(o,48,Tr-$t|0,0,0),Ds(o,M,Hr),_s(o,32,u,B,d^8192);break}k=(A|0)<0?6:A,B?(B=(n[tt>>2]|0)+-28|0,n[tt>>2]=B,l=We*268435456):(l=We,B=n[tt>>2]|0),$t=(B|0)<0?T:T+288|0,T=$t;do Ge=~~l>>>0,n[T>>2]=Ge,T=T+4|0,l=(l-+(Ge>>>0))*1e9;while(l!=0);if((B|0)>0)for(_=$t,G=T;;){if(M=(B|0)<29?B:29,B=G+-4|0,B>>>0>=_>>>0){T=0;do He=t$(n[B>>2]|0,0,M|0)|0,He=p_(He|0,ye|0,T|0,0)|0,Ge=ye,Ze=g_(He|0,Ge|0,1e9,0)|0,n[B>>2]=Ze,T=h_(He|0,Ge|0,1e9,0)|0,B=B+-4|0;while(B>>>0>=_>>>0);T&&(_=_+-4|0,n[_>>2]=T)}for(T=G;!(T>>>0<=_>>>0);)if(B=T+-4|0,!(n[B>>2]|0))T=B;else break;if(B=(n[tt>>2]|0)-M|0,n[tt>>2]=B,(B|0)>0)G=T;else break}else _=$t;if((B|0)<0){A=((k+25|0)/9|0)+1|0,Qe=(ct|0)==102;do{if(Le=0-B|0,Le=(Le|0)<9?Le:9,_>>>0>>0){M=(1<>>Le,ae=0,B=_;do Ge=n[B>>2]|0,n[B>>2]=(Ge>>>Le)+ae,ae=_e(Ge&M,G)|0,B=B+4|0;while(B>>>0>>0);B=n[_>>2]|0?_:_+4|0,ae?(n[T>>2]=ae,_=B,B=T+4|0):(_=B,B=T)}else _=n[_>>2]|0?_:_+4|0,B=T;T=Qe?$t:_,T=(B-T>>2|0)>(A|0)?T+(A<<2)|0:B,B=(n[tt>>2]|0)+Le|0,n[tt>>2]=B}while((B|0)<0);B=_,A=T}else B=_,A=T;if(Ge=$t,B>>>0>>0){if(T=(Ge-B>>2)*9|0,M=n[B>>2]|0,M>>>0>=10){_=10;do _=_*10|0,T=T+1|0;while(M>>>0>=_>>>0)}}else T=0;if(Qe=(ct|0)==103,Ze=(k|0)!=0,_=k-((ct|0)!=102?T:0)+((Ze&Qe)<<31>>31)|0,(_|0)<(((A-Ge>>2)*9|0)+-9|0)){if(_=_+9216|0,Le=$t+4+(((_|0)/9|0)+-1024<<2)|0,_=((_|0)%9|0)+1|0,(_|0)<9){M=10;do M=M*10|0,_=_+1|0;while((_|0)!=9)}else M=10;if(G=n[Le>>2]|0,ae=(G>>>0)%(M>>>0)|0,_=(Le+4|0)==(A|0),_&(ae|0)==0)_=Le;else if(We=((G>>>0)/(M>>>0)|0)&1|0?9007199254740994:9007199254740992,He=(M|0)/2|0,l=ae>>>0>>0?.5:_&(ae|0)==(He|0)?1:1.5,fr&&(He=(s[qr>>0]|0)==45,l=He?-l:l,We=He?-We:We),_=G-ae|0,n[Le>>2]=_,We+l!=We){if(He=_+M|0,n[Le>>2]=He,He>>>0>999999999)for(T=Le;_=T+-4|0,n[T>>2]=0,_>>>0>>0&&(B=B+-4|0,n[B>>2]=0),He=(n[_>>2]|0)+1|0,n[_>>2]=He,He>>>0>999999999;)T=_;else _=Le;if(T=(Ge-B>>2)*9|0,G=n[B>>2]|0,G>>>0>=10){M=10;do M=M*10|0,T=T+1|0;while(G>>>0>=M>>>0)}}else _=Le;_=_+4|0,_=A>>>0>_>>>0?_:A,He=B}else _=A,He=B;for(ct=_;;){if(ct>>>0<=He>>>0){tt=0;break}if(B=ct+-4|0,!(n[B>>2]|0))ct=B;else{tt=1;break}}A=0-T|0;do if(Qe)if(B=((Ze^1)&1)+k|0,(B|0)>(T|0)&(T|0)>-5?(M=m+-1|0,k=B+-1-T|0):(M=m+-2|0,k=B+-1|0),B=d&8,B)Le=B;else{if(tt&&(Lt=n[ct+-4>>2]|0,(Lt|0)!=0))if((Lt>>>0)%10|0)_=0;else{_=0,B=10;do B=B*10|0,_=_+1|0;while(!((Lt>>>0)%(B>>>0)|0|0))}else _=9;if(B=((ct-Ge>>2)*9|0)+-9|0,(M|32|0)==102){Le=B-_|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}else{Le=B+T-_|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}}else M=m,Le=d&8;while(!1);if(Qe=k|Le,G=(Qe|0)!=0&1,ae=(M|32|0)==102,ae)Ze=0,B=(T|0)>0?T:0;else{if(B=(T|0)<0?A:T,B=zy(B,((B|0)<0)<<31>>31,Tr)|0,_=Tr,(_-B|0)<2)do B=B+-1|0,s[B>>0]=48;while((_-B|0)<2);s[B+-1>>0]=(T>>31&2)+43,B=B+-2|0,s[B>>0]=M,Ze=B,B=_-B|0}if(B=fr+1+k+G+B|0,_s(o,32,u,B,d),Ds(o,qr,fr),_s(o,48,u,B,d^65536),ae){M=He>>>0>$t>>>0?$t:He,Le=cr+9|0,G=Le,ae=cr+8|0,_=M;do{if(T=zy(n[_>>2]|0,0,Le)|0,(_|0)==(M|0))(T|0)==(Le|0)&&(s[ae>>0]=48,T=ae);else if(T>>>0>cr>>>0){Xy(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}Ds(o,T,G-T|0),_=_+4|0}while(_>>>0<=$t>>>0);if(Qe|0&&Ds(o,5710,1),_>>>0>>0&(k|0)>0)for(;;){if(T=zy(n[_>>2]|0,0,Le)|0,T>>>0>cr>>>0){Xy(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}if(Ds(o,T,(k|0)<9?k:9),_=_+4|0,T=k+-9|0,_>>>0>>0&(k|0)>9)k=T;else{k=T;break}}_s(o,48,k+9|0,9,0)}else{if(Qe=tt?ct:He+4|0,(k|0)>-1){tt=cr+9|0,Le=(Le|0)==0,A=tt,G=0-Hr|0,ae=cr+8|0,M=He;do{T=zy(n[M>>2]|0,0,tt)|0,(T|0)==(tt|0)&&(s[ae>>0]=48,T=ae);do if((M|0)==(He|0)){if(_=T+1|0,Ds(o,T,1),Le&(k|0)<1){T=_;break}Ds(o,5710,1),T=_}else{if(T>>>0<=cr>>>0)break;Xy(cr|0,48,T+G|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}while(!1);Hr=A-T|0,Ds(o,T,(k|0)>(Hr|0)?Hr:k),k=k-Hr|0,M=M+4|0}while(M>>>0>>0&(k|0)>-1)}_s(o,48,k+18|0,18,0),Ds(o,Ze,Tr-Ze|0)}_s(o,32,u,B,d^8192)}else cr=(m&32|0)!=0,B=fr+3|0,_s(o,32,u,B,d&-65537),Ds(o,qr,fr),Ds(o,l!=l|!1?cr?5686:5690:cr?5678:5682,3),_s(o,32,u,B,d^8192);while(!1);return I=Hn,((B|0)<(u|0)?u:B)|0}function JX(o){o=+o;var l=0;return E[S>>3]=o,l=n[S>>2]|0,ye=n[S+4>>2]|0,l|0}function bYe(o,l){return o=+o,l=l|0,+ +zX(o,l)}function zX(o,l){o=+o,l=l|0;var u=0,A=0,d=0;switch(E[S>>3]=o,u=n[S>>2]|0,A=n[S+4>>2]|0,d=XP(u|0,A|0,52)|0,d&2047){case 0:{o!=0?(o=+zX(o*18446744073709552e3,l),u=(n[l>>2]|0)+-64|0):u=0,n[l>>2]=u;break}case 2047:break;default:n[l>>2]=(d&2047)+-1022,n[S>>2]=u,n[S+4>>2]=A&-2146435073|1071644672,o=+E[S>>3]}return+o}function PYe(o,l,u){o=o|0,l=l|0,u=u|0;do if(o){if(l>>>0<128){s[o>>0]=l,o=1;break}if(!(n[n[(xYe()|0)+188>>2]>>2]|0))if((l&-128|0)==57216){s[o>>0]=l,o=1;break}else{n[(Jy()|0)>>2]=84,o=-1;break}if(l>>>0<2048){s[o>>0]=l>>>6|192,s[o+1>>0]=l&63|128,o=2;break}if(l>>>0<55296|(l&-8192|0)==57344){s[o>>0]=l>>>12|224,s[o+1>>0]=l>>>6&63|128,s[o+2>>0]=l&63|128,o=3;break}if((l+-65536|0)>>>0<1048576){s[o>>0]=l>>>18|240,s[o+1>>0]=l>>>12&63|128,s[o+2>>0]=l>>>6&63|128,s[o+3>>0]=l&63|128,o=4;break}else{n[(Jy()|0)>>2]=84,o=-1;break}}else o=1;while(!1);return o|0}function xYe(){return u_()|0}function kYe(){return u_()|0}function QYe(o,l){o=o|0,l=l|0;var u=0,A=0;for(A=0;;){if((c[5712+A>>0]|0)==(o|0)){o=2;break}if(u=A+1|0,(u|0)==87){u=5800,A=87,o=5;break}else A=u}if((o|0)==2&&(A?(u=5800,o=5):u=5800),(o|0)==5)for(;;){do o=u,u=u+1|0;while(s[o>>0]|0);if(A=A+-1|0,A)o=5;else break}return TYe(u,n[l+20>>2]|0)|0}function TYe(o,l){return o=o|0,l=l|0,RYe(o,l)|0}function RYe(o,l){return o=o|0,l=l|0,l?l=FYe(n[l>>2]|0,n[l+4>>2]|0,o)|0:l=0,(l|0?l:o)|0}function FYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;ae=(n[o>>2]|0)+1794895138|0,m=fd(n[o+8>>2]|0,ae)|0,A=fd(n[o+12>>2]|0,ae)|0,d=fd(n[o+16>>2]|0,ae)|0;e:do if(m>>>0>>2>>>0&&(G=l-(m<<2)|0,A>>>0>>0&d>>>0>>0)&&!((d|A)&3|0)){for(G=A>>>2,M=d>>>2,_=0;;){if(k=m>>>1,T=_+k|0,B=T<<1,d=B+G|0,A=fd(n[o+(d<<2)>>2]|0,ae)|0,d=fd(n[o+(d+1<<2)>>2]|0,ae)|0,!(d>>>0>>0&A>>>0<(l-d|0)>>>0)){A=0;break e}if(s[o+(d+A)>>0]|0){A=0;break e}if(A=GX(u,o+d|0)|0,!A)break;if(A=(A|0)<0,(m|0)==1){A=0;break e}else _=A?_:T,m=A?k:m-k|0}A=B+M|0,d=fd(n[o+(A<<2)>>2]|0,ae)|0,A=fd(n[o+(A+1<<2)>>2]|0,ae)|0,A>>>0>>0&d>>>0<(l-A|0)>>>0?A=s[o+(A+d)>>0]|0?0:o+A|0:A=0}else A=0;while(!1);return A|0}function fd(o,l){o=o|0,l=l|0;var u=0;return u=i$(o|0)|0,(l|0?u:o)|0}function NYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=u+16|0,d=n[A>>2]|0,d?m=5:OYe(u)|0?A=0:(d=n[A>>2]|0,m=5);e:do if((m|0)==5){if(k=u+20|0,B=n[k>>2]|0,A=B,(d-B|0)>>>0>>0){A=ex[n[u+36>>2]&7](u,o,l)|0;break}t:do if((s[u+75>>0]|0)>-1){for(B=l;;){if(!B){m=0,d=o;break t}if(d=B+-1|0,(s[o+d>>0]|0)==10)break;B=d}if(A=ex[n[u+36>>2]&7](u,o,B)|0,A>>>0>>0)break e;m=B,d=o+B|0,l=l-B|0,A=n[k>>2]|0}else m=0,d=o;while(!1);Qr(A|0,d|0,l|0)|0,n[k>>2]=(n[k>>2]|0)+l,A=m+l|0}while(!1);return A|0}function OYe(o){o=o|0;var l=0,u=0;return l=o+74|0,u=s[l>>0]|0,s[l>>0]=u+255|u,l=n[o>>2]|0,l&8?(n[o>>2]=l|32,o=-1):(n[o+8>>2]=0,n[o+4>>2]=0,u=n[o+44>>2]|0,n[o+28>>2]=u,n[o+20>>2]=u,n[o+16>>2]=u+(n[o+48>>2]|0),o=0),o|0}function $n(o,l){o=y(o),l=y(l);var u=0,A=0;u=ZX(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=ZX(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?l:o;break}else{o=o>2]=o,n[S>>2]|0|0}function Ad(o,l){o=y(o),l=y(l);var u=0,A=0;u=XX(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=XX(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?o:l;break}else{o=o>2]=o,n[S>>2]|0|0}function A_(o,l){o=y(o),l=y(l);var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;m=(h[S>>2]=o,n[S>>2]|0),k=(h[S>>2]=l,n[S>>2]|0),u=m>>>23&255,B=k>>>23&255,T=m&-2147483648,d=k<<1;e:do if(d|0&&!((u|0)==255|((LYe(l)|0)&2147483647)>>>0>2139095040)){if(A=m<<1,A>>>0<=d>>>0)return l=y(o*y(0)),y((A|0)==(d|0)?l:o);if(u)A=m&8388607|8388608;else{if(u=m<<9,(u|0)>-1){A=u,u=0;do u=u+-1|0,A=A<<1;while((A|0)>-1)}else u=0;A=m<<1-u}if(B)k=k&8388607|8388608;else{if(m=k<<9,(m|0)>-1){d=0;do d=d+-1|0,m=m<<1;while((m|0)>-1)}else d=0;B=d,k=k<<1-d}d=A-k|0,m=(d|0)>-1;t:do if((u|0)>(B|0)){for(;;){if(m)if(d)A=d;else break;if(A=A<<1,u=u+-1|0,d=A-k|0,m=(d|0)>-1,(u|0)<=(B|0))break t}l=y(o*y(0));break e}while(!1);if(m)if(d)A=d;else{l=y(o*y(0));break}if(A>>>0<8388608)do A=A<<1,u=u+-1|0;while(A>>>0<8388608);(u|0)>0?u=A+-8388608|u<<23:u=A>>>(1-u|0),l=(n[S>>2]=u|T,y(h[S>>2]))}else _=3;while(!1);return(_|0)==3&&(l=y(o*l),l=y(l/l)),y(l)}function LYe(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function MYe(o,l){return o=o|0,l=l|0,WX(n[582]|0,o,l)|0}function sn(o){o=o|0,Nt()}function Zy(o){o=o|0}function _Ye(o,l){return o=o|0,l=l|0,0}function UYe(o){return o=o|0,($X(o+4|0)|0)==-1?(op[n[(n[o>>2]|0)+8>>2]&127](o),o=1):o=0,o|0}function $X(o){o=o|0;var l=0;return l=n[o>>2]|0,n[o>>2]=l+-1,l+-1|0}function Wh(o){o=o|0,UYe(o)|0&&HYe(o)}function HYe(o){o=o|0;var l=0;l=o+8|0,n[l>>2]|0&&($X(l)|0)!=-1||op[n[(n[o>>2]|0)+16>>2]&127](o)}function Jt(o){o=o|0;var l=0;for(l=o|0?o:1;o=KP(l)|0,!(o|0);){if(o=qYe()|0,!o){o=0;break}h$[o&0]()}return o|0}function e$(o){return o=o|0,Jt(o)|0}function Et(o){o=o|0,JP(o)}function jYe(o){o=o|0,(s[o+11>>0]|0)<0&&Et(n[o>>2]|0)}function qYe(){var o=0;return o=n[2923]|0,n[2923]=o+0,o|0}function GYe(){}function ZP(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,A=l-A-(u>>>0>o>>>0|0)>>>0,ye=A,o-u>>>0|0|0}function p_(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,u=o+u>>>0,ye=l+A+(u>>>0>>0|0)>>>0,u|0|0}function Xy(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;if(m=o+u|0,l=l&255,(u|0)>=67){for(;o&3;)s[o>>0]=l,o=o+1|0;for(A=m&-4|0,d=A-64|0,B=l|l<<8|l<<16|l<<24;(o|0)<=(d|0);)n[o>>2]=B,n[o+4>>2]=B,n[o+8>>2]=B,n[o+12>>2]=B,n[o+16>>2]=B,n[o+20>>2]=B,n[o+24>>2]=B,n[o+28>>2]=B,n[o+32>>2]=B,n[o+36>>2]=B,n[o+40>>2]=B,n[o+44>>2]=B,n[o+48>>2]=B,n[o+52>>2]=B,n[o+56>>2]=B,n[o+60>>2]=B,o=o+64|0;for(;(o|0)<(A|0);)n[o>>2]=B,o=o+4|0}for(;(o|0)<(m|0);)s[o>>0]=l,o=o+1|0;return m-u|0}function t$(o,l,u){return o=o|0,l=l|0,u=u|0,(u|0)<32?(ye=l<>>32-u,o<>>u,o>>>u|(l&(1<>>u-32|0)}function Qr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;if((u|0)>=8192)return MA(o|0,l|0,u|0)|0;if(m=o|0,d=o+u|0,(o&3)==(l&3)){for(;o&3;){if(!u)return m|0;s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0,u=u-1|0}for(u=d&-4|0,A=u-64|0;(o|0)<=(A|0);)n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2],n[o+16>>2]=n[l+16>>2],n[o+20>>2]=n[l+20>>2],n[o+24>>2]=n[l+24>>2],n[o+28>>2]=n[l+28>>2],n[o+32>>2]=n[l+32>>2],n[o+36>>2]=n[l+36>>2],n[o+40>>2]=n[l+40>>2],n[o+44>>2]=n[l+44>>2],n[o+48>>2]=n[l+48>>2],n[o+52>>2]=n[l+52>>2],n[o+56>>2]=n[l+56>>2],n[o+60>>2]=n[l+60>>2],o=o+64|0,l=l+64|0;for(;(o|0)<(u|0);)n[o>>2]=n[l>>2],o=o+4|0,l=l+4|0}else for(u=d-4|0;(o|0)<(u|0);)s[o>>0]=s[l>>0]|0,s[o+1>>0]=s[l+1>>0]|0,s[o+2>>0]=s[l+2>>0]|0,s[o+3>>0]=s[l+3>>0]|0,o=o+4|0,l=l+4|0;for(;(o|0)<(d|0);)s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0;return m|0}function r$(o){o=o|0;var l=0;return l=s[N+(o&255)>>0]|0,(l|0)<8?l|0:(l=s[N+(o>>8&255)>>0]|0,(l|0)<8?l+8|0:(l=s[N+(o>>16&255)>>0]|0,(l|0)<8?l+16|0:(s[N+(o>>>24)>>0]|0)+24|0))}function n$(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0;if(M=o,T=l,_=T,B=u,ae=A,k=ae,!_)return m=(d|0)!=0,k?m?(n[d>>2]=o|0,n[d+4>>2]=l&0,ae=0,d=0,ye=ae,d|0):(ae=0,d=0,ye=ae,d|0):(m&&(n[d>>2]=(M>>>0)%(B>>>0),n[d+4>>2]=0),ae=0,d=(M>>>0)/(B>>>0)>>>0,ye=ae,d|0);m=(k|0)==0;do if(B){if(!m){if(m=(b(k|0)|0)-(b(_|0)|0)|0,m>>>0<=31){G=m+1|0,k=31-m|0,l=m-31>>31,B=G,o=M>>>(G>>>0)&l|_<>>(G>>>0)&l,m=0,k=M<>2]=o|0,n[d+4>>2]=T|l&0,ae=0,d=0,ye=ae,d|0):(ae=0,d=0,ye=ae,d|0)}if(m=B-1|0,m&B|0){k=(b(B|0)|0)+33-(b(_|0)|0)|0,Le=64-k|0,G=32-k|0,T=G>>31,We=k-32|0,l=We>>31,B=k,o=G-1>>31&_>>>(We>>>0)|(_<>>(k>>>0))&l,l=l&_>>>(k>>>0),m=M<>>(We>>>0))&T|M<>31;break}return d|0&&(n[d>>2]=m&M,n[d+4>>2]=0),(B|0)==1?(We=T|l&0,Le=o|0|0,ye=We,Le|0):(Le=r$(B|0)|0,We=_>>>(Le>>>0)|0,Le=_<<32-Le|M>>>(Le>>>0)|0,ye=We,Le|0)}else{if(m)return d|0&&(n[d>>2]=(_>>>0)%(B>>>0),n[d+4>>2]=0),We=0,Le=(_>>>0)/(B>>>0)>>>0,ye=We,Le|0;if(!M)return d|0&&(n[d>>2]=0,n[d+4>>2]=(_>>>0)%(k>>>0)),We=0,Le=(_>>>0)/(k>>>0)>>>0,ye=We,Le|0;if(m=k-1|0,!(m&k))return d|0&&(n[d>>2]=o|0,n[d+4>>2]=m&_|l&0),We=0,Le=_>>>((r$(k|0)|0)>>>0),ye=We,Le|0;if(m=(b(k|0)|0)-(b(_|0)|0)|0,m>>>0<=30){l=m+1|0,k=31-m|0,B=l,o=_<>>(l>>>0),l=_>>>(l>>>0),m=0,k=M<>2]=o|0,n[d+4>>2]=T|l&0,We=0,Le=0,ye=We,Le|0):(We=0,Le=0,ye=We,Le|0)}while(!1);if(!B)_=k,T=0,k=0;else{G=u|0|0,M=ae|A&0,_=p_(G|0,M|0,-1,-1)|0,u=ye,T=k,k=0;do A=T,T=m>>>31|T<<1,m=k|m<<1,A=o<<1|A>>>31|0,ae=o>>>31|l<<1|0,ZP(_|0,u|0,A|0,ae|0)|0,Le=ye,We=Le>>31|((Le|0)<0?-1:0)<<1,k=We&1,o=ZP(A|0,ae|0,We&G|0,(((Le|0)<0?-1:0)>>31|((Le|0)<0?-1:0)<<1)&M|0)|0,l=ye,B=B-1|0;while(B|0);_=T,T=0}return B=0,d|0&&(n[d>>2]=o,n[d+4>>2]=l),We=(m|0)>>>31|(_|B)<<1|(B<<1|m>>>31)&0|T,Le=(m<<1|0)&-2|k,ye=We,Le|0}function h_(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,n$(o,l,u,A,0)|0}function Yh(o){o=o|0;var l=0,u=0;return u=o+15&-16|0,l=n[C>>2]|0,o=l+u|0,(u|0)>0&(o|0)<(l|0)|(o|0)<0?(oe()|0,pu(12),-1):(n[C>>2]=o,(o|0)>($()|0)&&!(Z()|0)?(n[C>>2]=l,pu(12),-1):l|0)}function Q2(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if((l|0)<(o|0)&(o|0)<(l+u|0)){for(A=o,l=l+u|0,o=o+u|0;(u|0)>0;)o=o-1|0,l=l-1|0,u=u-1|0,s[o>>0]=s[l>>0]|0;o=A}else Qr(o,l,u)|0;return o|0}function g_(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;return m=I,I=I+16|0,d=m|0,n$(o,l,u,A,d)|0,I=m,ye=n[d+4>>2]|0,n[d>>2]|0|0}function i$(o){return o=o|0,(o&255)<<24|(o>>8&255)<<16|(o>>16&255)<<8|o>>>24|0}function WYe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,s$[o&1](l|0,u|0,A|0,d|0,m|0)}function YYe(o,l,u){o=o|0,l=l|0,u=y(u),o$[o&1](l|0,y(u))}function VYe(o,l,u){o=o|0,l=l|0,u=+u,a$[o&31](l|0,+u)}function KYe(o,l,u,A){return o=o|0,l=l|0,u=y(u),A=y(A),y(l$[o&0](l|0,y(u),y(A)))}function JYe(o,l){o=o|0,l=l|0,op[o&127](l|0)}function zYe(o,l,u){o=o|0,l=l|0,u=u|0,ap[o&31](l|0,u|0)}function ZYe(o,l){return o=o|0,l=l|0,hd[o&31](l|0)|0}function XYe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,c$[o&1](l|0,+u,+A,d|0)}function $Ye(o,l,u,A){o=o|0,l=l|0,u=+u,A=+A,RVe[o&1](l|0,+u,+A)}function eVe(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,ex[o&7](l|0,u|0,A|0)|0}function tVe(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,+FVe[o&1](l|0,u|0,A|0)}function rVe(o,l){return o=o|0,l=l|0,+u$[o&15](l|0)}function nVe(o,l,u){return o=o|0,l=l|0,u=+u,NVe[o&1](l|0,+u)|0}function iVe(o,l,u){return o=o|0,l=l|0,u=u|0,m_[o&15](l|0,u|0)|0}function sVe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=+A,d=+d,m=m|0,OVe[o&1](l|0,u|0,+A,+d,m|0)}function oVe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,LVe[o&1](l|0,u|0,A|0,d|0,m|0,B|0)}function aVe(o,l,u){return o=o|0,l=l|0,u=u|0,+f$[o&7](l|0,u|0)}function lVe(o){return o=o|0,tx[o&7]()|0}function cVe(o,l,u,A,d,m){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,A$[o&1](l|0,u|0,A|0,d|0,m|0)|0}function uVe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=+d,MVe[o&1](l|0,u|0,A|0,+d)}function fVe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,p$[o&1](l|0,u|0,y(A),d|0,y(m),B|0)}function AVe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F2[o&15](l|0,u|0,A|0)}function pVe(o){o=o|0,h$[o&0]()}function hVe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,g$[o&15](l|0,u|0,+A)}function gVe(o,l,u){return o=o|0,l=+l,u=+u,_Ve[o&1](+l,+u)|0}function dVe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,y_[o&15](l|0,u|0,A|0,d|0)}function mVe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(0)}function yVe(o,l){o=o|0,l=y(l),F(1)}function Xa(o,l){o=o|0,l=+l,F(2)}function EVe(o,l,u){return o=o|0,l=y(l),u=y(u),F(3),Xe}function wr(o){o=o|0,F(4)}function T2(o,l){o=o|0,l=l|0,F(5)}function Ll(o){return o=o|0,F(6),0}function IVe(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,F(7)}function CVe(o,l,u){o=o|0,l=+l,u=+u,F(8)}function wVe(o,l,u){return o=o|0,l=l|0,u=u|0,F(9),0}function BVe(o,l,u){return o=o|0,l=l|0,u=u|0,F(10),0}function pd(o){return o=o|0,F(11),0}function vVe(o,l){return o=o|0,l=+l,F(12),0}function R2(o,l){return o=o|0,l=l|0,F(13),0}function SVe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,F(14)}function DVe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,F(15)}function d_(o,l){return o=o|0,l=l|0,F(16),0}function bVe(){return F(17),0}function PVe(o,l,u,A,d){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(18),0}function xVe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,F(19)}function kVe(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0,F(20)}function $P(o,l,u){o=o|0,l=l|0,u=u|0,F(21)}function QVe(){F(22)}function $y(o,l,u){o=o|0,l=l|0,u=+u,F(23)}function TVe(o,l){return o=+o,l=+l,F(24),0}function eE(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F(25)}var s$=[mVe,PGe],o$=[yVe,ky],a$=[Xa,Zg,Oh,h2,g2,d2,m2,Pf,My,y2,xf,Xg,$g,E2,I2,vu,ed,C2,_y,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa],l$=[EVe],op=[wr,Zy,lLe,cLe,uLe,_Ue,UUe,HUe,nqe,iqe,sqe,gGe,dGe,mGe,LWe,MWe,_We,vl,zg,u2,sr,gc,LP,MP,XOe,yLe,kLe,KLe,uMe,bMe,GMe,s_e,I_e,O_e,X_e,hUe,kUe,i4e,I4e,O4e,X4e,h3e,k3e,J3e,u8e,v8e,U8e,vP,mHe,RHe,XHe,dje,Qje,Xje,l6e,f6e,P6e,Q6e,K6e,aqe,uqe,bqe,Wqe,Wz,D5e,n9e,y9e,R9e,tWe,dWe,bWe,kWe,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr],ap=[T2,Ny,zL,f2,A2,xr,ao,Xi,Ls,vs,Ly,Nh,B2,xP,nd,$L,eM,kP,QP,nM,kf,ne,$3e,p8e,Ije,x5e,$qe,xX,T2,T2,T2,T2],hd=[Ll,hYe,Ry,rd,Hy,da,SP,Lh,w2,XL,bP,jy,TP,iM,Wy,q8e,Nje,kqe,R5e,Fl,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll],c$=[IVe,cM],RVe=[CVe,Z6e],ex=[wVe,qX,gYe,yYe,QMe,l4e,CHe,L9e],FVe=[BVe,rUe],u$=[pd,Mh,PP,tp,uM,v,D,Q,H,V,pd,pd,pd,pd,pd,pd],NVe=[vVe,s6e],m_=[R2,_Ye,RP,rLe,XLe,VMe,l_e,FUe,v4e,P8e,Qy,w9e,R2,R2,R2,R2],OVe=[SVe,FLe],LVe=[DVe,sWe],f$=[d_,tM,Se,Ue,At,yUe,d_,d_],tx=[bVe,Gt,Ty,BP,g6e,N6e,hqe,FWe],A$=[PVe,By],MVe=[xVe,r3e],p$=[kVe,sM],F2=[$P,To,DP,rM,Du,hMe,B_e,y3e,F3e,JL,ZGe,a9e,IWe,$P,$P,$P],h$=[QVe],g$=[$y,ZL,Oy,ep,p2,Su,Uy,td,U4e,LHe,t6e,$y,$y,$y,$y,$y],_Ve=[TVe,tqe],y_=[eE,U_e,Z8e,rje,Gje,C6e,H6e,Cqe,zqe,_5e,WWe,eE,eE,eE,eE,eE];return{_llvm_bswap_i32:i$,dynCall_idd:gVe,dynCall_i:lVe,_i64Subtract:ZP,___udivdi3:h_,dynCall_vif:YYe,setThrew:ua,dynCall_viii:AVe,_bitshift64Lshr:XP,_bitshift64Shl:t$,dynCall_vi:JYe,dynCall_viiddi:sVe,dynCall_diii:tVe,dynCall_iii:iVe,_memset:Xy,_sbrk:Yh,_memcpy:Qr,__GLOBAL__sub_I_Yoga_cpp:a2,dynCall_vii:zYe,___uremdi3:g_,dynCall_vid:VYe,stackAlloc:Ha,_nbind_init:rYe,getTempRet0:UA,dynCall_di:rVe,dynCall_iid:nVe,setTempRet0:_A,_i64Add:p_,dynCall_fiff:KYe,dynCall_iiii:eVe,_emscripten_get_global_libc:pYe,dynCall_viid:hVe,dynCall_viiid:uVe,dynCall_viififi:fVe,dynCall_ii:ZYe,__GLOBAL__sub_I_Binding_cc:y5e,dynCall_viiii:dVe,dynCall_iiiiii:cVe,stackSave:gf,dynCall_viiiii:WYe,__GLOBAL__sub_I_nbind_cc:vr,dynCall_vidd:$Ye,_free:JP,runPostSets:GYe,dynCall_viiiiii:oVe,establishStackSpace:wn,_memmove:Q2,stackRestore:cc,_malloc:KP,__GLOBAL__sub_I_common_cc:Mqe,dynCall_viddi:XYe,dynCall_dii:aVe,dynCall_v:pVe}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function t(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=t)},Module.callMain=Module.callMain=function t(e){e=e||[],ensureInitRuntime();var r=e.length+1;function s(){for(var p=0;p<3;p++)a.push(0)}var a=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];s();for(var n=0;n0||(preRun(),runDependencies>0)||Module.calledRun)return;function e(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(t),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),e()},1)):e()}Module.run=Module.run=run;function exit(t,e){e&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=t,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(t)),ENVIRONMENT_IS_NODE&&process.exit(t),Module.quit(t,new ExitStatus(t)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(t){Module.onAbort&&Module.onAbort(t),t!==void 0?(Module.print(t),Module.printErr(t),t=JSON.stringify(t)):t="",ABORT=!0,EXITSTATUS=1;var e=` -If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var Rm=L((rhr,LDe)=>{"use strict";var IPt=NDe(),CPt=ODe(),CW=!1,wW=null;CPt({},function(t,e){if(!CW){if(CW=!0,t)throw t;wW=e}});if(!CW)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");LDe.exports=IPt(wW.bind,wW.lib)});var vW=L((nhr,BW)=>{"use strict";var MDe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);BW.exports=MDe;BW.exports.default=MDe});var UDe=L((ihr,_De)=>{"use strict";_De.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var $S=L((shr,SW)=>{"use strict";var wPt=vk(),BPt=vW(),vPt=UDe(),HDe=t=>{if(typeof t!="string"||t.length===0||(t=wPt(t),t.length===0))return 0;t=t.replace(vPt()," ");let e=0;for(let r=0;r=127&&s<=159||s>=768&&s<=879||(s>65535&&r++,e+=BPt(s)?2:1)}return e};SW.exports=HDe;SW.exports.default=HDe});var bW=L((ohr,DW)=>{"use strict";var SPt=$S(),jDe=t=>{let e=0;for(let r of t.split(` -`))e=Math.max(e,SPt(r));return e};DW.exports=jDe;DW.exports.default=jDe});var qDe=L(eD=>{"use strict";var DPt=eD&&eD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(eD,"__esModule",{value:!0});var bPt=DPt(bW()),PW={};eD.default=t=>{if(t.length===0)return{width:0,height:0};if(PW[t])return PW[t];let e=bPt.default(t),r=t.split(` -`).length;return PW[t]={width:e,height:r},{width:e,height:r}}});var GDe=L(tD=>{"use strict";var PPt=tD&&tD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tD,"__esModule",{value:!0});var bn=PPt(Rm()),xPt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?bn.default.POSITION_TYPE_ABSOLUTE:bn.default.POSITION_TYPE_RELATIVE)},kPt=(t,e)=>{"marginLeft"in e&&t.setMargin(bn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(bn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(bn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(bn.default.EDGE_BOTTOM,e.marginBottom||0)},QPt=(t,e)=>{"paddingLeft"in e&&t.setPadding(bn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(bn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(bn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(bn.default.EDGE_BOTTOM,e.paddingBottom||0)},TPt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(bn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(bn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(bn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(bn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(bn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(bn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(bn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(bn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(bn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_AROUND))},RPt=(t,e)=>{var r,s;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((s=e.minHeight)!==null&&s!==void 0?s:0))},FPt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?bn.default.DISPLAY_FLEX:bn.default.DISPLAY_NONE)},NPt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(bn.default.EDGE_TOP,r),t.setBorder(bn.default.EDGE_BOTTOM,r),t.setBorder(bn.default.EDGE_LEFT,r),t.setBorder(bn.default.EDGE_RIGHT,r)}};tD.default=(t,e={})=>{xPt(t,e),kPt(t,e),QPt(t,e),TPt(t,e),RPt(t,e),FPt(t,e),NPt(t,e)}});var VDe=L((chr,YDe)=>{"use strict";var rD=$S(),OPt=vk(),LPt=pk(),kW=new Set(["\x1B","\x9B"]),MPt=39,WDe=t=>`${kW.values().next().value}[${t}m`,_Pt=t=>t.split(" ").map(e=>rD(e)),xW=(t,e,r)=>{let s=[...e],a=!1,n=rD(OPt(t[t.length-1]));for(let[c,f]of s.entries()){let p=rD(f);if(n+p<=r?t[t.length-1]+=f:(t.push(f),n=0),kW.has(f))a=!0;else if(a&&f==="m"){a=!1;continue}a||(n+=p,n===r&&c0&&t.length>1&&(t[t.length-2]+=t.pop())},UPt=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(rD(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},HPt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let s="",a="",n,c=_Pt(t),f=[""];for(let[p,h]of t.split(" ").entries()){r.trim!==!1&&(f[f.length-1]=f[f.length-1].trimLeft());let E=rD(f[f.length-1]);if(p!==0&&(E>=e&&(r.wordWrap===!1||r.trim===!1)&&(f.push(""),E=0),(E>0||r.trim===!1)&&(f[f.length-1]+=" ",E++)),r.hard&&c[p]>e){let C=e-E,S=1+Math.floor((c[p]-C-1)/e);Math.floor((c[p]-1)/e)e&&E>0&&c[p]>0){if(r.wordWrap===!1&&Ee&&r.wordWrap===!1){xW(f,h,e);continue}f[f.length-1]+=h}r.trim!==!1&&(f=f.map(UPt)),s=f.join(` -`);for(let[p,h]of[...s].entries()){if(a+=h,kW.has(h)){let C=parseFloat(/\d[^m]*/.exec(s.slice(p,p+4)));n=C===MPt?null:C}let E=LPt.codes.get(Number(n));n&&E&&(s[p+1]===` -`?a+=WDe(E):h===` -`&&(a+=WDe(n)))}return a};YDe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,` -`).split(` -`).map(s=>HPt(s,e,r)).join(` -`)});var zDe=L((uhr,JDe)=>{"use strict";var KDe="[\uD800-\uDBFF][\uDC00-\uDFFF]",jPt=t=>t&&t.exact?new RegExp(`^${KDe}$`):new RegExp(KDe,"g");JDe.exports=jPt});var QW=L((fhr,ebe)=>{"use strict";var qPt=vW(),GPt=zDe(),ZDe=pk(),$De=["\x1B","\x9B"],OF=t=>`${$De[0]}[${t}m`,XDe=(t,e,r)=>{let s=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let c=ZDe.codes.get(parseInt(a,10));if(c){let f=t.indexOf(c.toString());f>=0?t.splice(f,1):s.push(OF(e?c:n))}else if(e){s.push(OF(0));break}else s.push(OF(n))}if(e&&(s=s.filter((a,n)=>s.indexOf(a)===n),r!==void 0)){let a=OF(ZDe.codes.get(parseInt(r,10)));s=s.reduce((n,c)=>c===a?[c,...n]:[...n,c],[])}return s.join("")};ebe.exports=(t,e,r)=>{let s=[...t.normalize()],a=[];r=typeof r=="number"?r:s.length;let n=!1,c,f=0,p="";for(let[h,E]of s.entries()){let C=!1;if($De.includes(E)){let S=/\d[^m]*/.exec(t.slice(h,h+18));c=S&&S.length>0?S[0]:void 0,fe&&f<=r)p+=E;else if(f===e&&!n&&c!==void 0)p=XDe(a);else if(f>=r){p+=XDe(a,!0,c);break}}return p}});var rbe=L((Ahr,tbe)=>{"use strict";var X0=QW(),WPt=$S();function LF(t,e,r){if(t.charAt(e)===" ")return e;for(let s=1;s<=3;s++)if(r){if(t.charAt(e+s)===" ")return e+s}else if(t.charAt(e-s)===" ")return e-s;return e}tbe.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:s,space:a,preferTruncationOnSpace:n}=r,c="\u2026",f=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return c;let p=WPt(t);if(p<=e)return t;if(s==="start"){if(n){let h=LF(t,p-e+1,!0);return c+X0(t,h,p).trim()}return a===!0&&(c+=" ",f=2),c+X0(t,p-e+f,p)}if(s==="middle"){a===!0&&(c=" "+c+" ",f=3);let h=Math.floor(e/2);if(n){let E=LF(t,h),C=LF(t,p-(e-h)+1,!0);return X0(t,0,E)+c+X0(t,C,p).trim()}return X0(t,0,h)+c+X0(t,p-(e-h)+f,p)}if(s==="end"){if(n){let h=LF(t,e-1);return X0(t,0,h)+c}return a===!0&&(c=" "+c,f=2),X0(t,0,e-f)+c}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${s}`)}});var RW=L(nD=>{"use strict";var nbe=nD&&nD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nD,"__esModule",{value:!0});var YPt=nbe(VDe()),VPt=nbe(rbe()),TW={};nD.default=(t,e,r)=>{let s=t+String(e)+String(r);if(TW[s])return TW[s];let a=t;if(r==="wrap"&&(a=YPt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=VPt.default(t,e,{position:n})}return TW[s]=a,a}});var NW=L(FW=>{"use strict";Object.defineProperty(FW,"__esModule",{value:!0});var ibe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let s="";r.nodeName==="#text"?s=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(s=ibe(r)),s.length>0&&typeof r.internal_transform=="function"&&(s=r.internal_transform(s))),e+=s}return e};FW.default=ibe});var OW=L(xi=>{"use strict";var iD=xi&&xi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xi,"__esModule",{value:!0});xi.setTextNodeValue=xi.createTextNode=xi.setStyle=xi.setAttribute=xi.removeChildNode=xi.insertBeforeNode=xi.appendChildNode=xi.createNode=xi.TEXT_NAME=void 0;var KPt=iD(Rm()),sbe=iD(qDe()),JPt=iD(GDe()),zPt=iD(RW()),ZPt=iD(NW());xi.TEXT_NAME="#text";xi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:KPt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(XPt.bind(null,r))),r};xi.appendChildNode=(t,e)=>{var r;e.parentNode&&xi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&MF(t)};xi.insertBeforeNode=(t,e,r)=>{var s,a;e.parentNode&&xi.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((s=t.yogaNode)===null||s===void 0||s.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&MF(t)};xi.removeChildNode=(t,e)=>{var r,s;e.yogaNode&&((s=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||s===void 0||s.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&MF(t)};xi.setAttribute=(t,e,r)=>{t.attributes[e]=r};xi.setStyle=(t,e)=>{t.style=e,t.yogaNode&&JPt.default(t.yogaNode,e)};xi.createTextNode=t=>{let e={nodeName:"#text",nodeValue:t,yogaNode:void 0,parentNode:null,style:{}};return xi.setTextNodeValue(e,t),e};var XPt=function(t,e){var r,s;let a=t.nodeName==="#text"?t.nodeValue:ZPt.default(t),n=sbe.default(a);if(n.width<=e||n.width>=1&&e>0&&e<1)return n;let c=(s=(r=t.style)===null||r===void 0?void 0:r.textWrap)!==null&&s!==void 0?s:"wrap",f=zPt.default(a,e,c);return sbe.default(f)},obe=t=>{var e;if(!(!t||!t.parentNode))return(e=t.yogaNode)!==null&&e!==void 0?e:obe(t.parentNode)},MF=t=>{let e=obe(t);e?.markDirty()};xi.setTextNodeValue=(t,e)=>{typeof e!="string"&&(e=String(e)),t.nodeValue=e,MF(t)}});var fbe=L(sD=>{"use strict";var ube=sD&&sD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sD,"__esModule",{value:!0});var abe=yW(),$Pt=ube(xDe()),lbe=ube(Rm()),ta=OW(),cbe=t=>{t?.unsetMeasureFunc(),t?.freeRecursive()};sD.default=$Pt.default({schedulePassiveEffects:abe.unstable_scheduleCallback,cancelPassiveEffects:abe.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,shouldDeprioritizeSubtree:()=>!1,resetAfterCommit:t=>{if(t.isStaticDirty){t.isStaticDirty=!1,typeof t.onImmediateRender=="function"&&t.onImmediateRender();return}typeof t.onRender=="function"&&t.onRender()},getChildHostContext:(t,e)=>{let r=t.isInsideText,s=e==="ink-text"||e==="ink-virtual-text";return r===s?t:{isInsideText:s}},shouldSetTextContent:()=>!1,createInstance:(t,e,r,s)=>{if(s.isInsideText&&t==="ink-box")throw new Error(" can\u2019t be nested inside component");let a=t==="ink-text"&&s.isInsideText?"ink-virtual-text":t,n=ta.createNode(a);for(let[c,f]of Object.entries(e))c!=="children"&&(c==="style"?ta.setStyle(n,f):c==="internal_transform"?n.internal_transform=f:c==="internal_static"?n.internal_static=!0:ta.setAttribute(n,c,f));return n},createTextInstance:(t,e,r)=>{if(!r.isInsideText)throw new Error(`Text string "${t}" must be rendered inside component`);return ta.createTextNode(t)},resetTextContent:()=>{},hideTextInstance:t=>{ta.setTextNodeValue(t,"")},unhideTextInstance:(t,e)=>{ta.setTextNodeValue(t,e)},getPublicInstance:t=>t,hideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(lbe.default.DISPLAY_NONE)},unhideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(lbe.default.DISPLAY_FLEX)},appendInitialChild:ta.appendChildNode,appendChild:ta.appendChildNode,insertBefore:ta.insertBeforeNode,finalizeInitialChildren:(t,e,r,s)=>(t.internal_static&&(s.isStaticDirty=!0,s.staticNode=t),!1),supportsMutation:!0,appendChildToContainer:ta.appendChildNode,insertInContainerBefore:ta.insertBeforeNode,removeChildFromContainer:(t,e)=>{ta.removeChildNode(t,e),cbe(e.yogaNode)},prepareUpdate:(t,e,r,s,a)=>{t.internal_static&&(a.isStaticDirty=!0);let n={},c=Object.keys(s);for(let f of c)if(s[f]!==r[f]){if(f==="style"&&typeof s.style=="object"&&typeof r.style=="object"){let h=s.style,E=r.style,C=Object.keys(h);for(let S of C){if(S==="borderStyle"||S==="borderColor"){if(typeof n.style!="object"){let P={};n.style=P}n.style.borderStyle=h.borderStyle,n.style.borderColor=h.borderColor}if(h[S]!==E[S]){if(typeof n.style!="object"){let P={};n.style=P}n.style[S]=h[S]}}continue}n[f]=s[f]}return n},commitUpdate:(t,e)=>{for(let[r,s]of Object.entries(e))r!=="children"&&(r==="style"?ta.setStyle(t,s):r==="internal_transform"?t.internal_transform=s:r==="internal_static"?t.internal_static=!0:ta.setAttribute(t,r,s))},commitTextUpdate:(t,e,r)=>{ta.setTextNodeValue(t,r)},removeChild:(t,e)=>{ta.removeChildNode(t,e),cbe(e.yogaNode)}})});var pbe=L((mhr,Abe)=>{"use strict";Abe.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let s=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(s,r.indent.repeat(e))}});var hbe=L(oD=>{"use strict";var ext=oD&&oD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oD,"__esModule",{value:!0});var _F=ext(Rm());oD.default=t=>t.getComputedWidth()-t.getComputedPadding(_F.default.EDGE_LEFT)-t.getComputedPadding(_F.default.EDGE_RIGHT)-t.getComputedBorder(_F.default.EDGE_LEFT)-t.getComputedBorder(_F.default.EDGE_RIGHT)});var gbe=L((Ehr,txt)=>{txt.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var mbe=L((Ihr,LW)=>{"use strict";var dbe=gbe();LW.exports=dbe;LW.exports.default=dbe});var MW=L(lD=>{"use strict";var rxt=lD&&lD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lD,"__esModule",{value:!0});var aD=rxt(kE()),nxt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,ixt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,UF=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);lD.default=(t,e,r)=>{if(!e)return t;if(e in aD.default){let a=UF(e,r);return aD.default[a](t)}if(e.startsWith("#")){let a=UF("hex",r);return aD.default[a](e)(t)}if(e.startsWith("ansi")){let a=ixt.exec(e);if(!a)return t;let n=UF(a[1],r),c=Number(a[2]);return aD.default[n](c)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let a=nxt.exec(e);if(!a)return t;let n=UF(a[1],r),c=Number(a[2]),f=Number(a[3]),p=Number(a[4]);return aD.default[n](c,f,p)(t)}return t}});var Ebe=L(cD=>{"use strict";var ybe=cD&&cD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cD,"__esModule",{value:!0});var sxt=ybe(mbe()),_W=ybe(MW());cD.default=(t,e,r,s)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),c=r.style.borderColor,f=sxt.default[r.style.borderStyle],p=_W.default(f.topLeft+f.horizontal.repeat(a-2)+f.topRight,c,"foreground"),h=(_W.default(f.vertical,c,"foreground")+` -`).repeat(n-2),E=_W.default(f.bottomLeft+f.horizontal.repeat(a-2)+f.bottomRight,c,"foreground");s.write(t,e,p,{transformers:[]}),s.write(t,e+1,h,{transformers:[]}),s.write(t+a-1,e+1,h,{transformers:[]}),s.write(t,e+n-1,E,{transformers:[]})}}});var Cbe=L(uD=>{"use strict";var Fm=uD&&uD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uD,"__esModule",{value:!0});var oxt=Fm(Rm()),axt=Fm(bW()),lxt=Fm(pbe()),cxt=Fm(RW()),uxt=Fm(hbe()),fxt=Fm(NW()),Axt=Fm(Ebe()),pxt=(t,e)=>{var r;let s=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let a=s.getComputedLeft(),n=s.getComputedTop();e=` -`.repeat(n)+lxt.default(e,a)}return e},Ibe=(t,e,r)=>{var s;let{offsetX:a=0,offsetY:n=0,transformers:c=[],skipStaticElements:f}=r;if(f&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===oxt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),C=c;if(typeof t.internal_transform=="function"&&(C=[t.internal_transform,...c]),t.nodeName==="ink-text"){let S=fxt.default(t);if(S.length>0){let P=axt.default(S),I=uxt.default(p);if(P>I){let R=(s=t.style.textWrap)!==null&&s!==void 0?s:"wrap";S=cxt.default(S,I,R)}S=pxt(t,S),e.write(h,E,S,{transformers:C})}return}if(t.nodeName==="ink-box"&&Axt.default(h,E,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let S of t.childNodes)Ibe(S,e,{offsetX:h,offsetY:E,transformers:C,skipStaticElements:f})}};uD.default=Ibe});var vbe=L(fD=>{"use strict";var Bbe=fD&&fD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fD,"__esModule",{value:!0});var wbe=Bbe(QW()),hxt=Bbe($S()),UW=class{constructor(e){this.writes=[];let{width:r,height:s}=e;this.width=r,this.height=s}write(e,r,s,a){let{transformers:n}=a;s&&this.writes.push({x:e,y:r,text:s,transformers:n})}get(){let e=[];for(let s=0;ss.trimRight()).join(` -`),height:e.length}}};fD.default=UW});var bbe=L(AD=>{"use strict";var HW=AD&&AD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AD,"__esModule",{value:!0});var gxt=HW(Rm()),Sbe=HW(Cbe()),Dbe=HW(vbe());AD.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,gxt.default.DIRECTION_LTR);let s=new Dbe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});Sbe.default(t,s,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new Dbe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),Sbe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:c}=s.get();return{output:n,outputHeight:c,staticOutput:a?`${a.get().output} -`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var Qbe=L((Dhr,kbe)=>{"use strict";var Pbe=Ie("stream"),xbe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],jW={},dxt=t=>{let e=new Pbe.PassThrough,r=new Pbe.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let s=new console.Console(e,r);for(let a of xbe)jW[a]=console[a],console[a]=s[a];return()=>{for(let a of xbe)console[a]=jW[a];jW={}}};kbe.exports=dxt});var GW=L(qW=>{"use strict";Object.defineProperty(qW,"__esModule",{value:!0});qW.default=new WeakMap});var YW=L(WW=>{"use strict";Object.defineProperty(WW,"__esModule",{value:!0});var mxt=hn(),Tbe=mxt.createContext({exit:()=>{}});Tbe.displayName="InternalAppContext";WW.default=Tbe});var KW=L(VW=>{"use strict";Object.defineProperty(VW,"__esModule",{value:!0});var yxt=hn(),Rbe=yxt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});Rbe.displayName="InternalStdinContext";VW.default=Rbe});var zW=L(JW=>{"use strict";Object.defineProperty(JW,"__esModule",{value:!0});var Ext=hn(),Fbe=Ext.createContext({stdout:void 0,write:()=>{}});Fbe.displayName="InternalStdoutContext";JW.default=Fbe});var XW=L(ZW=>{"use strict";Object.defineProperty(ZW,"__esModule",{value:!0});var Ixt=hn(),Nbe=Ixt.createContext({stderr:void 0,write:()=>{}});Nbe.displayName="InternalStderrContext";ZW.default=Nbe});var HF=L($W=>{"use strict";Object.defineProperty($W,"__esModule",{value:!0});var Cxt=hn(),Obe=Cxt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});Obe.displayName="InternalFocusContext";$W.default=Obe});var Mbe=L((Rhr,Lbe)=>{"use strict";var wxt=/[|\\{}()[\]^$+*?.-]/g;Lbe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(wxt,"\\$&")}});var jbe=L((Fhr,Hbe)=>{"use strict";var Bxt=Mbe(),vxt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",Ube=[].concat(Ie("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));Ube.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var eY=class t{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=t.nodeInternals()),"cwd"in e||(e.cwd=vxt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,Sxt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...Ube]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(` -`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let s=!1,a=null,n=[];return e.forEach(c=>{if(c=c.replace(/\\/g,"/"),this._internals.some(p=>p.test(c)))return;let f=/^\s*at /.test(c);s?c=c.trimEnd().replace(/^(\s+)at /,"$1"):(c=c.trim(),f&&(c=c.slice(3))),c=c.replace(`${this._cwd}/`,""),c&&(f?(a&&(n.push(a),a=null),n.push(c)):(s=!0,a=c))}),n.map(c=>`${r}${c} -`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:s}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=s,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:s,stackTraceLimit:a}=Error;Error.prepareStackTrace=(f,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:c}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:a}),c}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};_be(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(s.type=a);let n=r.getFunctionName();n&&(s.function=n);let c=r.getMethodName();return c&&n!==c&&(s.method=c),s}parseLine(e){let r=e&&e.match(Dxt);if(!r)return null;let s=r[1]==="new",a=r[2],n=r[3],c=r[4],f=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],C=r[9],S=r[10]==="native",P=r[11]===")",I,R={};if(E&&(R.line=Number(E)),C&&(R.column=Number(C)),P&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")N++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(N--,N===-1&&h.charAt(U-1)===" ")){let W=h.slice(0,U-1);h=h.slice(U+1),a+=` (${W}`;break}}if(a){let N=a.match(bxt);N&&(a=N[1],I=N[2])}return _be(R,h,this._cwd),s&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=f,R.evalColumn=p,R.evalFile=c&&c.replace(/\\/g,"/")),S&&(R.native=!0),a&&(R.function=a),I&&a!==I&&(R.method=I),R}};function _be(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function Sxt(t){if(t.length===0)return[];let e=t.map(r=>Bxt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Dxt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),bxt=/^(.*?) \[as (.*?)\]$/;Hbe.exports=eY});var Gbe=L((Nhr,qbe)=>{"use strict";qbe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var Ybe=L((Ohr,Wbe)=>{"use strict";var Pxt=Gbe(),xxt=(t,e)=>{let r=[],s=t-e,a=t+e;for(let n=s;n<=a;n++)r.push(n);return r};Wbe.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=Pxt(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},xxt(e,r.around).filter(s=>t[s-1]!==void 0).map(s=>({line:s,value:t[s-1]}))}});var jF=L(nf=>{"use strict";var kxt=nf&&nf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Qxt=nf&&nf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Txt=nf&&nf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&kxt(e,t,r);return Qxt(e,t),e},Rxt=nf&&nf.__rest||function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(t);a{var{children:r}=t,s=Rxt(t,["children"]);let a=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop||s.paddingY||s.padding||0,paddingBottom:s.paddingBottom||s.paddingY||s.padding||0});return Vbe.default.createElement("ink-box",{ref:e,style:a},r)});tY.displayName="Box";tY.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};nf.default=tY});var iY=L(pD=>{"use strict";var rY=pD&&pD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pD,"__esModule",{value:!0});var Fxt=rY(hn()),yw=rY(kE()),Kbe=rY(MW()),nY=({color:t,backgroundColor:e,dimColor:r,bold:s,italic:a,underline:n,strikethrough:c,inverse:f,wrap:p,children:h})=>{if(h==null)return null;let E=C=>(r&&(C=yw.default.dim(C)),t&&(C=Kbe.default(C,t,"foreground")),e&&(C=Kbe.default(C,e,"background")),s&&(C=yw.default.bold(C)),a&&(C=yw.default.italic(C)),n&&(C=yw.default.underline(C)),c&&(C=yw.default.strikethrough(C)),f&&(C=yw.default.inverse(C)),C);return Fxt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:p},internal_transform:E},h)};nY.displayName="Text";nY.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};pD.default=nY});var Xbe=L(sf=>{"use strict";var Nxt=sf&&sf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Oxt=sf&&sf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Lxt=sf&&sf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Nxt(e,t,r);return Oxt(e,t),e},hD=sf&&sf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sf,"__esModule",{value:!0});var Jbe=Lxt(Ie("fs")),Rs=hD(hn()),zbe=hD(jbe()),Mxt=hD(Ybe()),th=hD(jF()),hA=hD(iY()),Zbe=new zbe.default({cwd:process.cwd(),internals:zbe.default.nodeInternals()}),_xt=({error:t})=>{let e=t.stack?t.stack.split(` -`).slice(1):void 0,r=e?Zbe.parseLine(e[0]):void 0,s,a=0;if(r?.file&&r?.line&&Jbe.existsSync(r.file)){let n=Jbe.readFileSync(r.file,"utf8");if(s=Mxt.default(n,r.line),s)for(let{line:c}of s)a=Math.max(a,String(c).length)}return Rs.default.createElement(th.default,{flexDirection:"column",padding:1},Rs.default.createElement(th.default,null,Rs.default.createElement(hA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Rs.default.createElement(hA.default,null," ",t.message)),r&&Rs.default.createElement(th.default,{marginTop:1},Rs.default.createElement(hA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&s&&Rs.default.createElement(th.default,{marginTop:1,flexDirection:"column"},s.map(({line:n,value:c})=>Rs.default.createElement(th.default,{key:n},Rs.default.createElement(th.default,{width:a+1},Rs.default.createElement(hA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),Rs.default.createElement(hA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+c)))),t.stack&&Rs.default.createElement(th.default,{marginTop:1,flexDirection:"column"},t.stack.split(` -`).slice(1).map(n=>{let c=Zbe.parseLine(n);return c?Rs.default.createElement(th.default,{key:n},Rs.default.createElement(hA.default,{dimColor:!0},"- "),Rs.default.createElement(hA.default,{dimColor:!0,bold:!0},c.function),Rs.default.createElement(hA.default,{dimColor:!0,color:"gray"}," ","(",c.file,":",c.line,":",c.column,")")):Rs.default.createElement(th.default,{key:n},Rs.default.createElement(hA.default,{dimColor:!0},"- "),Rs.default.createElement(hA.default,{dimColor:!0,bold:!0},n))})))};sf.default=_xt});var ePe=L(of=>{"use strict";var Uxt=of&&of.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Hxt=of&&of.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jxt=of&&of.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Uxt(e,t,r);return Hxt(e,t),e},Om=of&&of.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,"__esModule",{value:!0});var Nm=jxt(hn()),$be=Om(oW()),qxt=Om(YW()),Gxt=Om(KW()),Wxt=Om(zW()),Yxt=Om(XW()),Vxt=Om(HF()),Kxt=Om(Xbe()),Jxt=" ",zxt="\x1B[Z",Zxt="\x1B",qF=class extends Nm.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),e){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===Zxt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===Jxt&&this.focusNext(),e===zxt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=e=>{this.setState(r=>r.focusables.some(a=>a?.id===e)?{activeFocusId:e}:r)},this.focusNext=()=>{this.setState(e=>{var r;let s=(r=e.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(e)||s}})},this.focusPrevious=()=>{this.setState(e=>{var r;let s=(r=e.focusables[e.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(e)||s}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(s=>{let a=s.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...s.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s+1;a{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s-1;a>=0;a--)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return Nm.default.createElement(qxt.default.Provider,{value:{exit:this.handleExit}},Nm.default.createElement(Gxt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},Nm.default.createElement(Wxt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},Nm.default.createElement(Yxt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},Nm.default.createElement(Vxt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?Nm.default.createElement(Kxt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){$be.default.hide(this.props.stdout)}componentWillUnmount(){$be.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};of.default=qF;qF.displayName="InternalApp"});var nPe=L(af=>{"use strict";var Xxt=af&&af.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),$xt=af&&af.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ekt=af&&af.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Xxt(e,t,r);return $xt(e,t),e},lf=af&&af.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(af,"__esModule",{value:!0});var tkt=lf(hn()),tPe=V8(),rkt=lf(fDe()),nkt=lf(tW()),ikt=lf(mDe()),skt=lf(EDe()),sY=lf(fbe()),okt=lf(bbe()),akt=lf(sW()),lkt=lf(Qbe()),ckt=ekt(OW()),ukt=lf(GW()),fkt=lf(ePe()),Ew=process.env.CI==="false"?!1:ikt.default,rPe=()=>{},oY=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:s,staticOutput:a}=okt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==` -`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(Ew){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),s>=this.options.stdout.rows){this.options.stdout.write(nkt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},skt.default(this),this.options=e,this.rootNode=ckt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:tPe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=rkt.default.create(e.stdout),this.throttledLog=e.debug?this.log:tPe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=sY.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=akt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),Ew||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=tkt.default.createElement(fkt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);sY.default.updateContainer(r,this.container,null,rPe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(Ew){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(Ew){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),Ew?this.options.stdout.write(this.lastOutput+` -`):this.options.debug||this.log.done(),this.isUnmounted=!0,sY.default.updateContainer(null,this.container,null,rPe),ukt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!Ew&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=lkt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};af.default=oY});var sPe=L(gD=>{"use strict";var iPe=gD&&gD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gD,"__esModule",{value:!0});var Akt=iPe(nPe()),GF=iPe(GW()),pkt=Ie("stream"),hkt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},gkt(e)),s=dkt(r.stdout,()=>new Akt.default(r));return s.render(t),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>GF.default.delete(r.stdout),clear:s.clear}};gD.default=hkt;var gkt=(t={})=>t instanceof pkt.Stream?{stdout:t,stdin:process.stdin}:t,dkt=(t,e)=>{let r;return GF.default.has(t)?r=GF.default.get(t):(r=e(),GF.default.set(t,r)),r}});var aPe=L(rh=>{"use strict";var mkt=rh&&rh.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),ykt=rh&&rh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ekt=rh&&rh.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&mkt(e,t,r);return ykt(e,t),e};Object.defineProperty(rh,"__esModule",{value:!0});var dD=Ekt(hn()),oPe=t=>{let{items:e,children:r,style:s}=t,[a,n]=dD.useState(0),c=dD.useMemo(()=>e.slice(a),[e,a]);dD.useLayoutEffect(()=>{n(e.length)},[e.length]);let f=c.map((h,E)=>r(h,a+E)),p=dD.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},s),[s]);return dD.default.createElement("ink-box",{internal_static:!0,style:p},f)};oPe.displayName="Static";rh.default=oPe});var cPe=L(mD=>{"use strict";var Ikt=mD&&mD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mD,"__esModule",{value:!0});var Ckt=Ikt(hn()),lPe=({children:t,transform:e})=>t==null?null:Ckt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);lPe.displayName="Transform";mD.default=lPe});var fPe=L(yD=>{"use strict";var wkt=yD&&yD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yD,"__esModule",{value:!0});var Bkt=wkt(hn()),uPe=({count:t=1})=>Bkt.default.createElement("ink-text",null,` -`.repeat(t));uPe.displayName="Newline";yD.default=uPe});var hPe=L(ED=>{"use strict";var APe=ED&&ED.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ED,"__esModule",{value:!0});var vkt=APe(hn()),Skt=APe(jF()),pPe=()=>vkt.default.createElement(Skt.default,{flexGrow:1});pPe.displayName="Spacer";ED.default=pPe});var WF=L(ID=>{"use strict";var Dkt=ID&&ID.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ID,"__esModule",{value:!0});var bkt=hn(),Pkt=Dkt(KW()),xkt=()=>bkt.useContext(Pkt.default);ID.default=xkt});var dPe=L(CD=>{"use strict";var kkt=CD&&CD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(CD,"__esModule",{value:!0});var gPe=hn(),Qkt=kkt(WF()),Tkt=(t,e={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:a}=Qkt.default();gPe.useEffect(()=>{if(e.isActive!==!1)return s(!0),()=>{s(!1)}},[e.isActive,s]),gPe.useEffect(()=>{if(e.isActive===!1)return;let n=c=>{let f=String(c),p={upArrow:f==="\x1B[A",downArrow:f==="\x1B[B",leftArrow:f==="\x1B[D",rightArrow:f==="\x1B[C",pageDown:f==="\x1B[6~",pageUp:f==="\x1B[5~",return:f==="\r",escape:f==="\x1B",ctrl:!1,shift:!1,tab:f===" "||f==="\x1B[Z",backspace:f==="\b",delete:f==="\x7F"||f==="\x1B[3~",meta:!1};f<=""&&!p.return&&(f=String.fromCharCode(f.charCodeAt(0)+97-1),p.ctrl=!0),f.startsWith("\x1B")&&(f=f.slice(1),p.meta=!0);let h=f>="A"&&f<="Z",E=f>="\u0410"&&f<="\u042F";f.length===1&&(h||E)&&(p.shift=!0),p.tab&&f==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(f=""),(!(f==="c"&&p.ctrl)||!a)&&t(f,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[e.isActive,r,a,t])};CD.default=Tkt});var mPe=L(wD=>{"use strict";var Rkt=wD&&wD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wD,"__esModule",{value:!0});var Fkt=hn(),Nkt=Rkt(YW()),Okt=()=>Fkt.useContext(Nkt.default);wD.default=Okt});var yPe=L(BD=>{"use strict";var Lkt=BD&&BD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BD,"__esModule",{value:!0});var Mkt=hn(),_kt=Lkt(zW()),Ukt=()=>Mkt.useContext(_kt.default);BD.default=Ukt});var EPe=L(vD=>{"use strict";var Hkt=vD&&vD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vD,"__esModule",{value:!0});var jkt=hn(),qkt=Hkt(XW()),Gkt=()=>jkt.useContext(qkt.default);vD.default=Gkt});var CPe=L(DD=>{"use strict";var IPe=DD&&DD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(DD,"__esModule",{value:!0});var SD=hn(),Wkt=IPe(HF()),Ykt=IPe(WF()),Vkt=({isActive:t=!0,autoFocus:e=!1,id:r}={})=>{let{isRawModeSupported:s,setRawMode:a}=Ykt.default(),{activeId:n,add:c,remove:f,activate:p,deactivate:h,focus:E}=SD.useContext(Wkt.default),C=SD.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return SD.useEffect(()=>(c(C,{autoFocus:e}),()=>{f(C)}),[C,e]),SD.useEffect(()=>{t?p(C):h(C)},[t,C]),SD.useEffect(()=>{if(!(!s||!t))return a(!0),()=>{a(!1)}},[t]),{isFocused:!!C&&n===C,focus:E}};DD.default=Vkt});var wPe=L(bD=>{"use strict";var Kkt=bD&&bD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bD,"__esModule",{value:!0});var Jkt=hn(),zkt=Kkt(HF()),Zkt=()=>{let t=Jkt.useContext(zkt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious,focus:t.focus}};bD.default=Zkt});var BPe=L(aY=>{"use strict";Object.defineProperty(aY,"__esModule",{value:!0});aY.default=t=>{var e,r,s,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(s=t.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&a!==void 0?a:0}}});var Vc=L(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var Xkt=sPe();Object.defineProperty(Eo,"render",{enumerable:!0,get:function(){return Xkt.default}});var $kt=jF();Object.defineProperty(Eo,"Box",{enumerable:!0,get:function(){return $kt.default}});var eQt=iY();Object.defineProperty(Eo,"Text",{enumerable:!0,get:function(){return eQt.default}});var tQt=aPe();Object.defineProperty(Eo,"Static",{enumerable:!0,get:function(){return tQt.default}});var rQt=cPe();Object.defineProperty(Eo,"Transform",{enumerable:!0,get:function(){return rQt.default}});var nQt=fPe();Object.defineProperty(Eo,"Newline",{enumerable:!0,get:function(){return nQt.default}});var iQt=hPe();Object.defineProperty(Eo,"Spacer",{enumerable:!0,get:function(){return iQt.default}});var sQt=dPe();Object.defineProperty(Eo,"useInput",{enumerable:!0,get:function(){return sQt.default}});var oQt=mPe();Object.defineProperty(Eo,"useApp",{enumerable:!0,get:function(){return oQt.default}});var aQt=WF();Object.defineProperty(Eo,"useStdin",{enumerable:!0,get:function(){return aQt.default}});var lQt=yPe();Object.defineProperty(Eo,"useStdout",{enumerable:!0,get:function(){return lQt.default}});var cQt=EPe();Object.defineProperty(Eo,"useStderr",{enumerable:!0,get:function(){return cQt.default}});var uQt=CPe();Object.defineProperty(Eo,"useFocus",{enumerable:!0,get:function(){return uQt.default}});var fQt=wPe();Object.defineProperty(Eo,"useFocusManager",{enumerable:!0,get:function(){return fQt.default}});var AQt=BPe();Object.defineProperty(Eo,"measureElement",{enumerable:!0,get:function(){return AQt.default}})});var cY={};Vt(cY,{Gem:()=>lY});var vPe,Lm,lY,YF=Ct(()=>{vPe=et(Vc()),Lm=et(hn()),lY=(0,Lm.memo)(({active:t})=>{let e=(0,Lm.useMemo)(()=>t?"\u25C9":"\u25EF",[t]),r=(0,Lm.useMemo)(()=>t?"green":"yellow",[t]);return Lm.default.createElement(vPe.Text,{color:r},e)})});var DPe={};Vt(DPe,{useKeypress:()=>Mm});function Mm({active:t},e,r){let{stdin:s}=(0,SPe.useStdin)(),a=(0,VF.useCallback)((n,c)=>e(n,c),r);(0,VF.useEffect)(()=>{if(!(!t||!s))return s.on("keypress",a),()=>{s.off("keypress",a)}},[t,a,s])}var SPe,VF,PD=Ct(()=>{SPe=et(Vc()),VF=et(hn())});var PPe={};Vt(PPe,{FocusRequest:()=>bPe,useFocusRequest:()=>uY});var bPe,uY,fY=Ct(()=>{PD();bPe=(r=>(r.BEFORE="before",r.AFTER="after",r))(bPe||{}),uY=function({active:t},e,r){Mm({active:t},(s,a)=>{a.name==="tab"&&(a.shift?e("before"):e("after"))},r)}});var xPe={};Vt(xPe,{useListInput:()=>xD});var xD,KF=Ct(()=>{PD();xD=function(t,e,{active:r,minus:s,plus:a,set:n,loop:c=!0}){Mm({active:r},(f,p)=>{let h=e.indexOf(t);switch(p.name){case s:{let E=h-1;if(c){n(e[(e.length+E)%e.length]);return}if(E<0)return;n(e[E])}break;case a:{let E=h+1;if(c){n(e[E%e.length]);return}if(E>=e.length)return;n(e[E])}break}},[e,t,a,n,c])}});var JF={};Vt(JF,{ScrollableItems:()=>pQt});var $0,ml,pQt,zF=Ct(()=>{$0=et(Vc()),ml=et(hn());fY();KF();pQt=({active:t=!0,children:e=[],radius:r=10,size:s=1,loop:a=!0,onFocusRequest:n,willReachEnd:c})=>{let f=N=>{if(N.key===null)throw new Error("Expected all children to have a key");return N.key},p=ml.default.Children.map(e,N=>f(N)),h=p[0],[E,C]=(0,ml.useState)(h),S=p.indexOf(E);(0,ml.useEffect)(()=>{p.includes(E)||C(h)},[e]),(0,ml.useEffect)(()=>{c&&S>=p.length-2&&c()},[S]),uY({active:t&&!!n},N=>{n?.(N)},[n]),xD(E,p,{active:t,minus:"up",plus:"down",set:C,loop:a});let P=S-r,I=S+r;I>p.length&&(P-=I-p.length,I=p.length),P<0&&(I+=-P,P=0),I>=p.length&&(I=p.length-1);let R=[];for(let N=P;N<=I;++N){let U=p[N],W=t&&U===E;R.push(ml.default.createElement($0.Box,{key:U,height:s},ml.default.createElement($0.Box,{marginLeft:1,marginRight:1},ml.default.createElement($0.Text,null,W?ml.default.createElement($0.Text,{color:"cyan",bold:!0},">"):" ")),ml.default.createElement($0.Box,null,ml.default.cloneElement(e[N],{active:W}))))}return ml.default.createElement($0.Box,{flexDirection:"column",width:"100%"},R)}});var kPe,nh,QPe,AY,TPe,pY=Ct(()=>{kPe=et(Vc()),nh=et(hn()),QPe=Ie("readline"),AY=nh.default.createContext(null),TPe=({children:t})=>{let{stdin:e,setRawMode:r}=(0,kPe.useStdin)();(0,nh.useEffect)(()=>{r&&r(!0),e&&(0,QPe.emitKeypressEvents)(e)},[e,r]);let[s,a]=(0,nh.useState)(new Map),n=(0,nh.useMemo)(()=>({getAll:()=>s,get:c=>s.get(c),set:(c,f)=>a(new Map([...s,[c,f]]))}),[s,a]);return nh.default.createElement(AY.Provider,{value:n,children:t})}});var hY={};Vt(hY,{useMinistore:()=>hQt});function hQt(t,e){let r=(0,ZF.useContext)(AY);if(r===null)throw new Error("Expected this hook to run with a ministore context attached");if(typeof t>"u")return r.getAll();let s=(0,ZF.useCallback)(n=>{r.set(t,n)},[t,r.set]),a=r.get(t);return typeof a>"u"&&(a=e),[a,s]}var ZF,gY=Ct(()=>{ZF=et(hn());pY()});var $F={};Vt($F,{renderForm:()=>gQt});async function gQt(t,e,{stdin:r,stdout:s,stderr:a}){let n,c=p=>{let{exit:h}=(0,XF.useApp)();Mm({active:!0},(E,C)=>{C.name==="return"&&(n=p,h())},[h,p])},{waitUntilExit:f}=(0,XF.render)(dY.default.createElement(TPe,null,dY.default.createElement(t,{...e,useSubmit:c})),{stdin:r,stdout:s,stderr:a});return await f(),n}var XF,dY,eN=Ct(()=>{XF=et(Vc()),dY=et(hn());pY();PD()});var OPe=L(kD=>{"use strict";Object.defineProperty(kD,"__esModule",{value:!0});kD.UncontrolledTextInput=void 0;var FPe=hn(),mY=hn(),RPe=Vc(),_m=kE(),NPe=({value:t,placeholder:e="",focus:r=!0,mask:s,highlightPastedText:a=!1,showCursor:n=!0,onChange:c,onSubmit:f})=>{let[{cursorOffset:p,cursorWidth:h},E]=mY.useState({cursorOffset:(t||"").length,cursorWidth:0});mY.useEffect(()=>{E(R=>{if(!r||!n)return R;let N=t||"";return R.cursorOffset>N.length-1?{cursorOffset:N.length,cursorWidth:0}:R})},[t,r,n]);let C=a?h:0,S=s?s.repeat(t.length):t,P=S,I=e?_m.grey(e):void 0;if(n&&r){I=e.length>0?_m.inverse(e[0])+_m.grey(e.slice(1)):_m.inverse(" "),P=S.length>0?"":_m.inverse(" ");let R=0;for(let N of S)R>=p-C&&R<=p?P+=_m.inverse(N):P+=N,R++;S.length>0&&p===S.length&&(P+=_m.inverse(" "))}return RPe.useInput((R,N)=>{if(N.upArrow||N.downArrow||N.ctrl&&R==="c"||N.tab||N.shift&&N.tab)return;if(N.return){f&&f(t);return}let U=p,W=t,te=0;N.leftArrow?n&&U--:N.rightArrow?n&&U++:N.backspace||N.delete?p>0&&(W=t.slice(0,p-1)+t.slice(p,t.length),U--):(W=t.slice(0,p)+R+t.slice(p,t.length),U+=R.length,R.length>1&&(te=R.length)),p<0&&(U=0),p>t.length&&(U=t.length),E({cursorOffset:U,cursorWidth:te}),W!==t&&c(W)},{isActive:r}),FPe.createElement(RPe.Text,null,e?S.length>0?P:I:P)};kD.default=NPe;kD.UncontrolledTextInput=({initialValue:t="",...e})=>{let[r,s]=mY.useState(t);return FPe.createElement(NPe,Object.assign({},e,{value:r,onChange:s}))}});var _Pe={};Vt(_Pe,{Pad:()=>yY});var LPe,MPe,yY,EY=Ct(()=>{LPe=et(Vc()),MPe=et(hn()),yY=({length:t,active:e})=>{if(t===0)return null;let r=t>1?` ${"-".repeat(t-1)}`:" ";return MPe.default.createElement(LPe.Text,{dimColor:!e},r)}});var UPe={};Vt(UPe,{ItemOptions:()=>dQt});var TD,eg,dQt,HPe=Ct(()=>{TD=et(Vc()),eg=et(hn());KF();YF();EY();dQt=function({active:t,skewer:e,options:r,value:s,onChange:a,sizes:n=[]}){let c=r.filter(({label:p})=>!!p).map(({value:p})=>p),f=r.findIndex(p=>p.value===s&&p.label!="");return xD(s,c,{active:t,minus:"left",plus:"right",set:a}),eg.default.createElement(eg.default.Fragment,null,r.map(({label:p},h)=>{let E=h===f,C=n[h]-1||0,S=p.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),P=Math.max(0,C-S.length-2);return p?eg.default.createElement(TD.Box,{key:p,width:C,marginLeft:1},eg.default.createElement(TD.Text,{wrap:"truncate"},eg.default.createElement(lY,{active:E})," ",p),e?eg.default.createElement(yY,{active:t,length:P}):null):eg.default.createElement(TD.Box,{key:`spacer-${h}`,width:C,marginLeft:1})}))}});var rxe=L((Ugr,txe)=>{var kY;txe.exports=()=>(typeof kY>"u"&&(kY=Ie("zlib").brotliDecompressSync(Buffer.from("Wx6iVsM8y37oTpDqz9ttuZc9II7bU8Dm0eSoiEX5X+cI6oZJXQfiuc4xndBuXaAQQxqqqnlJZYxtR/YfQKWsqrIlDzhSaK0b0Sl4sGIivE3xwFR3yFnY7YHRO/xw5NmsXhLGMmIJnQ7RQOSgLL9ts5fdaYhcxoWHF7dahKcbL7xdpZna+sOZHQ3C9aU56oudzh85R5BU6q3+VceftEQSBD0HUBi3vlcAQxQJJXS6NubAera9xHt4WLyEj/DTf2xqnfHl9KwwY4nyvz1tK1taQwTRw0R2J01oLV0sv0ZNGpLrcMPW3wSK8dBkiX/hvpvN7J/Pa/EVRKpkyjCk+Hp9OUWGhcRbQBPgmnfO//bO/uubdIUpwz5xJof7RDxrN6HZUguxathf+nrP5eR02lnTdac+CEfPIPEQONnqWLfllz+tvn61uxegTmZDxpeYFBgfTArYbsME6aHr7jHYVfjZ8hXR0aFbef0186b7kBPUWMxO69JY0mkI2VZfSVctgoJx8qX7Vqpmr6ainSnTsfwYuhhPxJq81wGrwRFj82d0+nuz//58jdJ7jNXB6aX3NFIRgdBmnyiQq1SEbAqzxF0WECarcjoIWVuN5tNi+TBQMBscGC0P+rXm1/E6v5mwHsFaHk5AMy03wxY/9YTk6vvpdFwTbscrqwR29Td96Z4dLDi+AISU7/zj4f0CpCXvONrV2ktiQAFDzA0MiOJC2rpUgP/oXOPggHqNG99PQvnC4QcJwmaNBeV61L+1145XwNApR0mrG2akK1l51Fu/En0kzKoo+mGx+cdDD6bo99vjm8kkG2DBbIhIb0jrbIiIatsl+vGNreNhD1LZrh3ffAYcFOqBVHQzXD7kbpi4+6WB7eZoCBPwA+xHP5r/9Pmxu3uJmjzzeaq6uikG0AJ7lPmbMNeCoI43TILGjxpq/fGw+3+wrezIx/eqq6EQYDcKSuSbLE+qiTLBMkqQBh6xdP3x8NsAW49PsiYR3Ww/UmXh7clfY8DSTev96F0FZpBgFDz//6nqDwdJfunT/Q5B4UIVqrZnNmVfyF5k0rny/f/v/dSqqtqBoFwbYybT9hQAqr0dDHvN45979t3Ct2I4SAgArAKNVpKSciUpprH3mPu+DSgiQKkBSJWLpEqV3oza+uGoe9yDWc9GEWCbcmbW/39fqtX2vv8DgQAhUSDFtEHLmUk7exDTXZOrTm87AFC2phxm9TgvNuZ797539N97P9LxfwTKET8ClYgfwDEjQJ5kRAB9CID8PwDQAYhSg5IyG6TtPJTT2U3JzjrMcRJB6hxTlM8xRakGydmD7R7dw7hV1jBOq6pejWdfw9zjsKp973qz7/Wid71c1mrZi2X7/7/8d5bSJNKGeIpHCTJz9+zUqlkY/07d+X+Rge6aUfLOj3lx4D+/5qe99933zpvQZNum6ue3LFSFuW8yf4lUSZlN5v5ZCBQQJHCShfwiuOoq9FXASpDzlbJywbCTVyi8DXFpDl9lsMJzLsv+bIOILqZ/M0P3IBmn2n6SBpZgqcT/fxwsrXPhq74JKKSAEvCEaEV8zVotS7XhUZRHIoxh0yF8v1qJRX1nyWyPu/J3y3SFaNvAGXgquv2y/gRu1v+k28JesS/drYDHCIQgSQiWoFZaVALBPEBXngywzf4PFdg5ef5cgoGESoo2UUYhm5E4tPe3i977UUST2xXhY/MH7K/f9j/Hx84wiyzfr40FNgRURIy6pbfC25T9sv8eOHVhExcSQZ4KxEy8+O/6VmBhIVAIBAYKgcBAIFD4Agez0/9/0Jx38/2f4QyGmODBBCWYoMEQDR40GKpSUTQIKqgGF+5wofn8TF1f9Ne70uHfZ0BAQIOABg0CAqJTgHUKMAgwsJ4MDOpJBrZ08k8q/wNyd9f2gQcCAgwCDAIs1cCqDKzKwMBSFxgYLFiwYFQNiJ/bf/98p8+1z/1atNiixRZbIBAIMkEgSpBMCTJBIJgEUS8pUaLEErxPjZ0N/mZ+xd5RmXiDBygVtROd2c9/hKMk2faG0K3vD1fRE5Cra4OeAqQhJIQSaldpXUAsbd1X/u8Jmcy4OoSb9f/oFaixfWK7BQqFJEhCwAuFIMWkpYhIEqxU//f4PKlHlH8VSgf8q0a+G9cecRRLrDewqDXIr1HkZZwHWG83yHqVyUtb5cXAGmyCEiA/fKbWva8f37WBtBDNhd5ukA/tzc4CosZIjfHUL+E6vhZeA6tt7cdwv3VOu6Ad6hZsEj/dcyf8Koc+Ii/1E0m93QTEr8X7TPx6v0Hw4hgT0NsiBzi/Ojr+aAjNlK5T+VHQGly0ERkOwSh/vRliHz3BItngE8RENKNdGrxiiL5hBGi5rcwT0QlJFatE4bIbzXe0McICrXV/xde1yXPZyaRUs7gU+MpkzOHxhxVGu+jvWUOSpCNhdEBczkhaTU/m9qyaFOTubSWcVZ3SaKxWvsT9oA762PXd6Fpe/O8eGFtrbQv9H5jUkP9Xv4L9yt3GEuZDICzdqhhX6bybxUCiJdKJVt+IvaaA8pBXb9aP2spgL/w4jR8UmO3+smtT0A+0hFLC9wvrMrl8Dd1ndAnhiyfRVSXrzN4LHh9xAHkaO4/8Q8IS00EE3nPzHWfECG3QIQwbjoe0k5iOovmQMBsoifhgSMQWjU0QhkWqELzEYEh0etfEGCG/mT41Cqk+uWKIGR9a3uepyL+fhJbtKzj//RQZtS/ycolxB8RZCGjrzeaK78ojq5ky3j7HIZ76kpqV7qp3f9rsQ9ORRWkEdji+zm/K1QMX8IfIoXv44nD5BcFG3zGUklDKnUTbINPf0KuNprc9I8vRhHEWn6Mevc/kMldwancCJglrytG4wtx+QVKlcdFagd+ifV4h9mkojgAHI0Yutc+QzeZ72wAfQiWJPN6thWo1Fq51zEZ/abkgV1BxRLa/Y3VIyexOxU+B5OHvrXoqIFLo5R+9AjP55vc1dLSvIYxt8fPVD5Bt+aDn/+QUR4BSWphE0j5mFv7eCgkKlCQiFzPG3iehYMSoKF8d5bOx98JIJgq+4cvSv84ye+Uk6+9RW84h4skdf+pKOunpUvu6Yp6K/R+ezL63icRaPpzoIuS9jchG4DXTGeMtW4/ttHAWqEf/yIAM/8oyJoBvylHmB8Uu+9NTMWWMqf18uFrGXgE+VdvznXGVl/+bjv0G2xs0ZSjCu6SlnfQxnoCfh6xvafwQB4N+nJffQKB+vActlnzfHzFclcrXdZS16BjvPr8k4yr9pZZKeUCaO6y7o+zV9OhVKIGzqAQH7M4o+yb6k1JJ3BTl3Poiweyk450Mrjd624ba95IcB8lQRpsMl96/quD8W5Jx/swK6wG2+3Zeyhwu278j8jLzuv6O59ocMbP8JgciFip943CXFsBLWEIYhUW4wC1sb9pYS4kZ3UJ+C/kt5p+dPyctkvzTMs1dWCgvjamuDCDjTghl2ykbWi6TXXkLBmtQfwVxHyb9qAdwCenDxP8EHMA8HzD5+QBap16HHGr5tnstysVebx275eK9qqnLhKZemkf+faykRK0Ihgj/SC/y2JWYYzK4EKN/QFg5m4Le7WJ5Xj50NzPuiBbJpzxltmqmElpC2skoBl+8l6P5H2GtjcVMK4hohyPqSfJKkQMVW0W2u4is8mYeTzug8pSgrTFMRh/m5N4NotSL5IqK6dEWl6rw/KlpSBFVFMgstbby2bKSgMQ1ZcksZBcVYFw7Xoxb0oO3b7BJsD1Sednx5u3Lbm13GGPF1KCdSOkr6Qkzo5Qf/vMDzqrHIedVyZQxwnl9a5toMJGYfJEAbvcRQV8FQdxKJ9Z2T8O4kQ6vtyyesmVPstmSUH5MJ/o7OiWZtrS/QzGINI/IOm4Q8DDSxKI2nQSJ1U3U9vSkxvtdhNCpgwbu5PHRyQNAMA+wKyeCm32Ibd9JyMTIU9OeXynIz3k8q4ovMxbXTxG9nkZWst6eJoOtvXVdLIqO31LBlOrPyitw967ni5roPG92lTTvhNSJf4P4cuMN2pfZspUiBdxNUzHLj5y6qB/2ajpZ+ZP4VPZN+hCzacWYtNdfJF3VlDd78njhx36F7SVFBKm/94aeX/xfskxdBrotrbw6fNiCJaa/g3lksHQrS9/7KyTxkPKqEXv4KNyv5K5cwHthJI7K8vqeKVh3OYro8ESEJz+5TP3eExO6OWaHPEzjjd+Pfg/kqyCifid6BVdaUHgmVFDqT5VHoN47yMsrayq2foT9WaS1f2o1iQPeNdVyjB14t8OrllHUluJ0teDqrYTZFZm6HNQs2AyUei6/8sXt/kpheFe2/0reuhKFxWFRl3zaygGdsepcsjpRP+Fe8QGPnaF1bqISrSPlp4iK0Z6SAJzOQNtxFQb+EoL3EdEv/zNxzBt3scaovgp7S2NsdlRyxyrncjCF9PLQNFsjyZZe5cheSHRin3BouoVTLa4LJR0M+iSUaqh6P9hdewKtOKBjWvbjwcQcllujNcbVX//noV1zBJTM3s+F2McT517FoFbS+tTlS1JQI+OlflmRoIgltiF+3xHaICWpV84rYNfAwYWfU1BDYoyy4vMvy7qaggqZF4FtZQCSxmMMU6n4TVnOoeCKSlW0CaZoihUm0U3mhgL54Z+9YGwHN5raP+eBfJb9T15L60ZP26O7x2tG6sa4f0y/cmf4X9D8/j3lJWlWUyL16zlFF9kssyROJtTZPtVS31cFLDk2dj/+EnkPdwF/toVCQC1vwGL0ZGOKUbXAxxUOhe9UyDMUbHww4VKR2dxXMESDAKmsUCzp7F5h/ToMHVE/7S/A9K/Rb45BhY3HeVOvXRwahS2GUK83vRIT9JZmHhoBvIcW76djG2iljbkX9ZhD2jmIwHIURIz5CgqGGH01FbbPsyFVDcSniN1DJ1K4h1PUdbLNwaaLRYtnWz0sQ8y24JjrBbyPfO4Iwyq6S8Y/ksLC+qz99DNA8iyCJi4C3LsVz5fSubnZn+0pnbquH1uknY4eJivf7DSfl6JIVgSIImtIb1oJFKO2Lip6U+lEZ6ZMmnUG3zcGvX3edi4wrm/unSQdrkmRp/gFt4VwFJb/vJit59ztRLV3anmIDv1sXRcMYTyMXesZiomInUwGW2VX3GIXW3Zp636GGfjIkFTUlti9kHlvwBhdYBlHeg7G4PSwMjGzKw+3o5Y5sSdebUUmc0qwSMsaye19pXS34jpdU4KxVdnVord5RS6Q2Cm9HxTnjeWRQqpkR8vyMWLiFu+QyfzlqM+x+fz8nWyyLvrw/Uc/dlh8UyowXHd0xFZ6rC5uLkd/JHk/mV/k3lLp+ZDl6DddL6acmWlSs02APGrzqCIQexVzhQL7UiLOMzc/REYJCInpVNOsPboHnhYZmE2+yJZnSgZXaveqFjpFdwSU5/Jk9vjIUNaAJdbBABFpKitglNZT2NVltZJWqNp9w69Y3ugmnrEMKHCQZbRPQ8KZ1XrxWsWkM0ir2FD4SeLPPHRlujUVVW/LJ6ramdGe4OCTrX6+MHY2iEQl1fMmYmfiBhFtdCy1ZVc8b/T2Jfv4LppnO1iDd/wnvG3gMSb9aJ6QocuyTC0+NbCGt3A4i/EI2fW8zUmwclImssYsMFP0iSDLcuTlHzbYzSLSF7NohMIVU17BTIMZuJV/BgGFYUFpQjGRm1Y3cJxWaCtOtxfoWInTYU2tTYq6s3VqYSQJ9tRGx+5Yrgp5/BcnTOI9cZmLWpd57+UiuUJd58UbMnevtP2dOBJn1CWmXYxE7KA7Ml2ADIWQQI+RUV1vQoJqbJrEaeUnIhT2tWTGFHw+rlhTqnkMq/6TQmq+ViMg6CCUXmuKMiCk7GZpg8gZwloCUe1jW2EENhXtcq1QdgIN09RWJa7ZRmWInrcB5CwLIQilwfXswDMKSZ5ODv/vazs9+alib8qOJxa1MsrdY9kuwVSvT5Og1r+jNdBGEfEaMg1Nau4HLTiMxnd2pAMopIzdHelTJBPgxG5YqHrvF8jJ1Vosbo/orfJsB1AikDra51HOTEWuZO3aVGzAgzvxuWGZjLayta7CbBE2G1DQOEzOIqXgoeysfN3JTVujkzMZPbl1Gwb8SFF+g/IrX8YEnnNFh9ZAWxWt7ag4RJSGBzDeKLlFBAW/zPaGjubJuU77JFeg1R9hZoBkhkiaTMZd8m277Bm8667+Gw2cD5/8RRPei8999fGxLrFjJ5P7dXzqo+xkD6y4Y2eqcjKh2GWSLwRK34eG+/l6Y3bcAFoOVind+iYaD8sxprepmGEmK6+dpjwXksQqAVhZeBsnPbZp2LyMhxY/TqbKOpiP7fy4ddFygZTQ6s7ePKyN572xEkNh8SWTJ3rnERxUJsVca0FeJNzUUbvHYnEHvbvlJWELivnZLGZI2zENj5ziQAbo0rsewVn0u4huW/WbtXtG4pj1MeAOE3wHwEnpgbxQ8XW5BiTA7TDRv1oxAFgfc1XSr8drtXjrwToIO9HYtFZduXLaMC9jsb1VYBlVrJ//wrQlvuyuowSmEkESBjkA8zscLOUNJ3zsQl4yOA/7cAwz19YxkkH7qEvWIv3yi3hjbeIOTGMh0L6wZtZuzLYb6v/37SNDW0eiYzRst4meHITeTNFPLCdePw67pqhgc+S2vC7DuL99ri1kSwmdSgzEtUp0CjUgLp4XNdzWraF7TcuqZ4bEbqjbY+EyzVLRP9KwXFWmoBdtqEWZ9FW6sEatEBTR8qXrh8BGGOaoJQ1LNHbpui1zepTiw7eGbdBault5lh9bAFPI2NjjkRFhwnFjF7VFvcVpNc0kMLNa5ToGhQMbKdiJJ4riKNsge0PZQ5ZJd6vL2u2Yjt9/KuQybQrlWR4RPQ0BD4PrBUvbtvTZfruOfTwfpmeev+Mv+Q5nqfVif53YxrRRqxdodXLhK6MQ+ZntW4Bd63RVh52+BDn/qitocNnxWKya/N8Zlh9a79SroUbMkyOZ0flWajJAzwDrVJlkA4A9pnrQ1UmszDpPyDoY2CdRx5ck6M6gWToKRi7vXXrLLXwiV3wM0ih1Km+02Eq6pIHxVz0Ems47nJeTYx2hrWHXUOhp4hoDEX93uiM7razDcf6vS7gA+0etv78/cJmdcRv1EWPVSTLF/x6KqcRgc16Ek/PlupbY3gx/+P5HXbiGrh0U4GBqp+1vJHbzVBhe0MwmBcge+Xo9G/uait3PdVjMZtB5WNeeddq5k2KGB5SBOsgBFfpHr1zGB58UwCiNI1dL3NUfxaR2NBK3ZbNMMfPieYL05wtYOmCZADj+h0BKQIff3wMqk4q9u7GMnbzU72qLGMMNvD2MsUWOxqLU03CCiqzs6yagX2sqzcA2X9Q2MaBaQO3vlieqc6pFwCMelwaopCy6MJ3WHAtFjXKWNIRdeULJsc6IYNv57eYd7QJuhs8ywUslcNpjjv6ifH70F96L1eHXie5YeKm6CvsZVdzwP/tW2IxYUOaePGKuel8oSG/Caeiev3M9rFvqW1i5N8yrjN0m5AY++Fjr/nTH+z993cFbnTmxV3cXmIi/MTRQflSbSeVoWY5b+cCXbygn08nvdIVh3wmzGyB775MElntgRQYcTjCNDsZgZxFbhfZj9IWJBob7q3SldTS6M/rUiNApGxpI2m3eSY6MXqW4yRpdK2bBDUcMLXQ2nSyTF9qYQBEx2pzKT01pkT5ttdGNkeCLw9r4E66E3LJ1Mar7Foj829i9CRYY91Cl+hwKmrK+3I6baJIoGoyDBN/5W8rpOZCW+IFKNlMR+Dp4q6iCacF58vzn0bApoZ6r5n6YPympm36TQ7iPaZWjK/iH/hXT788VACV8akU5CjOZaGAYdsgzHaRbWoqcBCopZK2tmkOyqbibkBcNTpRZUyyOGNvrQGLDfJ2mZB1QdqFB8RejGifB2NlV0CKveMWhb5hP+pgxxnqZ7LVOKo6xV9t5D8tOEs1E02WGeXO6aGLJl10Hi0T1yGPhHOyEutgKA/HKRLf60dmM36ybxWtnVyThHL+2FVj+k3tMXHsdyQF9RfBEvUUOP/Elag3lNGRkUIAiqWSKIKSRlTGEGtKgYXC2pxtGG4gktjo0lY9A0HgyjGz7m5Q0F1AnjAvUkrPdjF+JK1TCC3N1IuWkBWcVs56kO9JUn6JX6kh9yIFXpWUt1xfYrUc9+BzpKf/WxX0g1OCkyqWSsk6uTU9GqK1ohho70LhA7OOf4F5NzIiu5jx3X80+kl6YmUeM5JgeHDLq20hcGi/tfPebpFKjFvvNYGrSdOnr4cp831HQthXiJdB8YKsDPyJ0XcTPFvRDYpqiCiUQsTajdyfUV6FeE/7tb0SEojHGQpQt8NLvNTK+aV0qPFTch4rZ+nlnshxQjpAWKQCqM5sBK3xYpXlWUWWXCwH1DIL9Rra//tDtx6SIsMv5kEE2GoBhA0dg4w2SMhbtON44lwSLvXCOcYtNLG9XERChQpptAbDJdd4aML9ma7PxO/cG/pxPa3lxl/JMc/HlnDnRyJ6UI/V6k/tCTeXVkM1P2QgGaow0c4KC4/ZY6Fur4XNqNWG0HqpGqSe1qkVuIIdUWE/GxD/tK4TeM1RV0OHeCxW2hROzET+ECrOxg9EqThvIDC/pKFvOPuk2v2bAzrT6HICV8AUgqRTKQ/RgbCas3lcPe501EOqFy6wWdPjIePkyjZl5M419WnoK2WFyW3OSgnMhVaE8OMAkDnvASBtF/NqhgqEPwaLa5mv9bui6f2YCXrkKt71ZmToxlPwBRU5hmV9MpCm/hQCnMTf5U0BE8+dAsGXXULGLDe8YgDxX03S0T97sW42K9N1OzSSxrPfnz31MBQWOZcMyRInVHtzhnepW9nxrfDsFbMdyzQpGvMHDrCPeYdkV4XtbmzToL+8jgJsyMbSDtey77kANqOi6HFe4cGelZw1Z4y+nNRd7z8STuWs/nY6s07KkGEOY/9ke1tdBZ8InkMUhNnIAAL/7V8Gj2lxQBhlI3YJD+JhP7HNCh6T+M14cNV5M6Q6F2P897hr2If+wvx4/Ws7Ply7zD4f5GVPDyPXxNJQ8lZtOfa71uSZoA+XKe5hHJIaL93CcWWolcUSkXXYjahCtYt/rAvH9QYJTRMzNLXC2oLCpv+KySWe00pbKjMpgaq41ns9MvklMOCmD/6KgDcuMfIO+9LsX+pr8xEuXjh/LWIJJ/dZUD+yS+3r11/84PsEgN+Q6w76Prw8Fo7NZsL5viwFmZHUI4Lh6C7BVj40GdldopvyldjrvzQLMwlluK9WzQyTaHOIOO63s3PoJc46Mrgv/SwuybizrXIuNjKKzaSb3UX7wLZY+/cQjgF0iZEcg6aqPqv8FgWc/SFc2H4sH2pNkTv7+mbBnqzTXhhbFLC11lW4GpSz+ZFYk8I3hxhPPi/fH3CawFiKFZZnSA89e0nrVcHUOOf5tSDNt7VPpP2d/AxTvULMRiMvEHLdj6Q5jWK36swSDXBvZAidsic35GQDK2s8ZnY3h1e78UIXktJ0OnBxqpwSCkzdYDpAVlrnNJKRMZ1ZcULw+0SN74EgbSobXlVFeisXm5YX+mn5hVgb82/X2xo2Te3mvLbOVf+CxfdwbtM8VceWu8tk5PhB/FKIhM9tKSWfw5ivvoV1fUDfQ2urTDPBmVMmbQB9nJes4x0XF8JkBdxBlUuJ7wJR003O1VVFJOVXIiuOTLzFk3D9ePaaVXlxAVNY6d+K0v8bBSFgCq5hgP9dt5nr0gL19PZo8BE0bDC8yHUXXpkCC7/99YgYpmzgApj8+KduQD7dYgtKEI0C9NKGdkbxY06fM2/HyR2xk76lJy5pu1bMg+EIdPOIciMCPL79ch+pSCCVghyiiUwYLD5HADUOkEmHwBYEGb6oMcYYoj5h5rEQulhavWIJ7pGqwhDGKpM3HKgbbpKrxA+QmqbBtmrsLnwqP8XYIsMNsVWITWbQ3CqSBIi7E+lD9XkqkdXnVPfofeOVH/NOPjOd4Q/fsJ9XWM/8fxNLKfBnyHPS1gX69T+bQfabHg/8sxYWoUAZLOLwFqliZd7jlJXW1KIB1Rdj7Eh6TAEYHFLlROlw0I0ucHv8xbYblQ6W8wuuEA0eDBLW8gj/rKm8G5q6W958oLN8qMgULG20cx0CIsjvr7WVcfZt8o5eUrTYFe4T9FYoSZZiHKk/nGJS2s1tbY56aTFlo3y174Mqq8bok1smdOIGXTlitgF5LXtXtYxErgmHKryKz1I577W30j+gax47TjLI6aNop4ZpRbU7UT7s6DBZ5ai/CeqlOHtAt9bnPDb/VbOgGIn4TedKnvx/p5wslnUcxZUD0GSAQWYGgHmRim6P3vPqZqWY1UDzCx9xCzR7joot9CJ6DOHzqcArrhMo8RChDPGaNlJbLhrUzhsc4282Hwjwl46jHwrA0CvpudIVHvNgbDJJKTGiaGlZe0bcbntBhu20bey3vZgGC9vLlHy49rve+lfZD5iknAv6BMbCf76rd6zLq8f8spuWZY2gDo3pl/BEQ0sMvVkqpABbhq+E5Ulcjof/ULuz2va2Ail6ddMoYP1mznysm0f1V+Ib/HLqFgnVy4MHIyEX6fTmxw2pptFa7A8pe9xK6RhK/Hy1k94LSnVtTdDvHtpTp8z904wMqqXh0pCaEtvifxZGzxmlbOUIKCeKE9HKC0T9ElAhabAfguvbp58Vj24AIPW3/EN9m2XYBoI22DTi6//+QL1Prl/DzSm0AzzWlr9DOPc1r1hPz1Xax+9I9g+ewec7vDwsWiL/sukd24e4cp8UvrZXNwL7R//qvEtuz7LxjhdcYVCbSnsmzNdyDSkGUyAZr81K8PF+75ucWTQcM2W2Yrubia7Ze0EYPCa/bmPexZV/1pK5TbSeIpLcbxcBsxmCUTWKZxPDzKDmpR39JIWaMumk5V24g78mYNKRiNUK3lZ7hjB+/cuRkyUQ89G6QSSeW1ChSdufCrr6z4GWFQ61s3JzTxixs8i7f9e7a4hoT7NciIBm693vPB5OkqV60UHzKsHo170G8Y0DvFMTTPy6ZMipyDk0wGG2u7aHULLcqVxhBf88iGNQVtVP6mGLWXx36w2EzaHWHdv+9luNCUb4YWxfw/HpMkgz6hcq4m0ZM5rKdaElTS3uUnEb+gQhPFaM9XzlcHG9cPiDOaOYdpK3wj7qBHtA81qUmRvYGKTYXOEe8gpmKfsqJPm3q3c+hbXA1xFyOHUH3lsj9k2iqLpnmle5JAVz/iqUn0Ft2fNhbYeWL+jQxtV0D0RgJNB6Aht90gVfzxhZsSihlItW9wHaHj0uMdRk89RNOsnU8dxfyho468xTdZ72hsAtfFxNRD5bCyHfv7YL8VWBim2M/4LNixrufrW5oFCqpQ5MMHbUnSwkQPrrSNU7GZ5KLdDRmVBTVwEFOifbnVkxqa1lrdKnwHuzOovBCsu0EO26WEooywCwzDASX+PUaIjGLaYTKQcyE8X6lJc204WMfzuTYGowPSQQg5lwLMyQVUv4aq1L+AEhweCchPh5AM5wStPC6+mLdL1P6ejN6UgN1KUaO7OEZ0KUVui/cpp0gi08dJZVBbqfXbWwGBNMj1hwFAXzW5d2wYgtbBSuFHTPEFvxWABSdUmnxp/klJgggFl2PwOB9+mQ5zjMWCTYiIh8F9UKJHhVL5/ex0zomCFm7+KZPFtz4VUKisNSuAr2Hw7pc9L6GjVBeonECuu1aJ47BlUNVRGgtpfEgRu4x3rYdFI2ZLB9qOB5u5/OQsMUCjbnT6I28ZZbIkvEhvz7MavtWFIz1+Ig6ChPX2Vi2wzCXPMWey6KhlNdHebHRIJAIUdzv75YucVIuCcVlaf9+70jZalSQmcWNzbqbob0s2tXQlqZL7dtuRZ4zhakxSaJMHRX1PLXKm4lCJQ6xx8eKtLDwSZoQvjF0/e150v133+rRMElBrvFqBq/OEBf3PLfKm4tCJQ57xMtKtbElwp/zybl/+P3gmvQi98emOZSONJi74b2XrObpxMkjuh52lO0lNi002Hz57iTd6l56pbbsxMp6BHtxM9B6ZKxi29WgTdHkzTuNa6ATEoTL/Jb+6TSsrGMB1VhF7Jd+PyCtZXoCKlSt3QWYqRP/4ktR/2FHgAHNGESCvSy3LCuK1U4WR74GwHmAt+4Ur333x7SYteEbnk36wpuvjaKgqBJ7N19S1Z/A0P4W7W+IC+qazvBYsgzMGmlh6cr9eU30gSXLwPmKdZbWXJvapPaoXaqZWLZP3Fk8EUjukUhZOxvgONTlAkpLCPz3NoQfPzTLE2nis52HT7eXbdszSg2y2ExTd8EBP8bHJoO5prF/rFgcWCagwyO4e7mVjf/OqeK7Hs+LyM2MZeJ7xOqwuVkU27+TFr+ScqgbqunWBS4UA2fc88OF7jfx/gfvdDj11kvQbGWCUR7FgmyfCLZwp6B2tkybzJlIjTZWlO4ijftEFq7ryLfowF06ZuPIbu7CWhlQqhtgpg6Ll+G/UFc65Nb7CtlGZOGUP4Nu49xKDp/KTCyaJ5zmoWc0Soy50pziMS5V6eOyJCts10RyV3hSZmEOECS+AROgaZW6mfHk4p6wf+0tMdnopfDXfu6oCb8C1fWzMuPgJqG4Hz+AXWocz0+Q7twA5ptvt4KmYrCxU9SatzVsRM1uEibfRGdtYerezLQQmAplnq+1BLOe2E4vs6CLU3Oobof3HTSUDMppgiwSg45GtlqCyipCNYIbHXgLvyvQk59J3X9sxyDeaX3U5mQSPNUi3dE2+6qMktMeEEZjxmbfQSVebl9vFxHjLiKKMr/divOd62GC1mW0Hcl2BD6yTvmFPdg9qsh18SXWHeN2A2knza771/ItrFw7dLsU2g5AxoZLaJ+yJMbZCF4g+23kYMh1ZxCVVRXEA7kxY4+lmD+gpfBWuRhBCeeWQhy1Lqt7KtsZEzM1tpHvyY0VG3C0/xf8z5rEhWXcZ2kK52t7pBH+qou1ZrLRU0lxJ8Jz7YAII93riii6FPiTavFYGNn0BVUUG+nuXFGBuIVqUUE+FEMxBCgLta2rWloVNn+UcX2rjZSUG/AfOdrsGRee6qkw9yhZ3Ky9SAbsQsINYFCZYeSXNuHRg2zhCiOceOVRYQzKwUA/VufjqGKfoUdEs4fOs9YD07/HfocciQYftQDKOUG2a1jNr1rzGVAc10YmCfAjpN9ze3ubSpY4YiClbBhRJ/jym1A9+m3+iqICVmtPkZP1jE0kvV//84IfNDjOWmgbDRWPr7RGwY2uHq0XW3RrSVP5mlaj9+oNn2vwQZ/Owxyboy9WD4KArO+CmD3tcBtCJe/acuW4SL81KkEqxhiKD+3GpBuwJf2DXF1Zoif5GMqwMeJ2I1UlKPZwLKTfrKajNafvDas4ZfWdbiVkLWyTTbt1ayluzbqVuNPercV2+w4ZOldDP51F52Vof0P5ZGD90WxIkaV931VPMAa/EPS1H0quTUQhqScvW4eyQ0ORxKwP1pCzTIohUk+MphN60AdjKLl2EoaonnTtO5YdNprka70++FJuIoI689LVqfZw1hO8CRYETosTvvUND/GUDneyhk3ObmsHcVI5/LEg8UmZZC5EUTnb1zoZb+0FEylmRZmTctVxlXo/7SR3FyIemEONk6ZgrLqs++JPV+Q+FENgMQ5Ggz8N3R8nTp95a9BhiDc5M3BdWDxtf5X0YHinxrDai+P5HvqD3mDRXyju4+eSWC+yRyrBnBJ1gIZgFqwHgnAVFnPElcs2m3qxij6I525oR4v2N1TPhtE336rPcmNoP59pYx3KhquecTP/jbSV/xAAMiPUZxTRI0lrHUk9jDqn2qNmVcniKf0eJnuIZwXmu3lQX6BlDYLKc8WCLX2zQzJjwAPzscdfxSHL7w5axS4DGw2c272jOHgpVhkY8zhLNOzm+CUxt+dD9OlOV7T7XH5Q0GTOi4OBISbjysgvp88FcLNpXKB0mbu2uKMCH9Wy1pfFtcsOBQ222LcVuY17sNfA1YlwNtTHlMTuIIUlCjkcYtLAI+IcdpOxeNfHrNbjH4em8nzudSL0hQZgqrWGClm7LsmG9JZCZMyy6fa5euwx9+V9XA/Wi9R7cQll4ls5C5kZdYhk9SMm4sFDBcBUFgRZlrqwb5CElb2t8RszOH2nsqESZHKqA0Y+iAhCU84OpS4GmLSQCPGRskRBCPqK6rNFCRZyHtqs0fywsKzrwpG7tMG6f+bIz3TqLyjJXU/wzn7cfYL3OXlsVv6BnLctgS6fFvkHZ0kz19fZKz9Qcue8TdlTqzDeErjhuqyt6/JL6cO9hBW6lXXQ7SdhD5LyCtu9RShtX0skEKUKW5/6QzSLfYsIPORl2a6sPn2jDxt+kPPxEK8U25XPjHKAWN2FWkGVwffv/AH9pqkgbBfftSE5O7q1md626NehsrKXGCUZsxVNicx7+3Fe2/PaVAqa47e4gRTZjeHJLLy1+XZFFvth8+YD+dvnSY0ypLYeY/aRk/tQ27DnxpvIc9asZB1m0muX0kvcddkbfFPWf0+tsumlMeUY+VJWAPCLIuTggqH3/vjNRkufLOy7HjdneULDh8QufdqwrfvxnY1FiQX1aBewYEg0apj+ok9bbTagi3YyfEfyeK4KmAgd2o6o89IaI8OhxCujrMFFn7barIeO+latBVHKrsE3PvjhQpt2cpI+tdosN5o3rRET+Pi8JprLnyegn5d/LLSf97K735MMzZIZCcndeI7AtBPf+BxS4dipmufZUlrK1oK/kjjEteIIHxG+MrldtKoiWEj72mU9ZgKrs6qeeFahu63KFoefa25AgpeuikfpxxxD/e07gIyXchDQ4nGyXaONoV+U8uORlE3Raib3gXcxdmHPROWSVZZVNTVoniQW23o5vLaVLU+AgC28EoVdCnQnD/2s9Sj6Ejodtwibt9gWzVSLXIaDCLyxBACyxcXhZfwJyByYjN0lXkwjRQ8pE6CilSXXS8ZJ0LNHwmoJa0RBIFh7h2cZkeHAvzfLjfdHHFqgPBaAPnj4VnQHDYAY2CIK6Oc0QWqwzAD5+sm7xCjunSR174up5j/xlw1lktL3u1/vwvRWm6nwEYVMbKV3PTjtBWPhaXK8fhAuC3wO1MNAyK6WxAFDPbeL3meK88Ac30tAWLu3wMCJ64bBg/A1qPuKgJ+BbDYcK51RyoLW1IFlxbdPWWd4HLXJmLzMdpCUwtYvODQ/l8oWKLJSgfTogRI2nTVgMhDR7HJwFECUTr6hLyB41kye9azmQ2mw4H0SKln+gK6jLDUNlj5rJ/L53ZKYJ3JPS0nDvXXhKXZzU1zIs2VxMObdte8EeWv8UgHg/7XHxrF+4hLB+4EEQOVLxlcL92CDyzrGjzTi5ZJDJ91PHAcu1DLcSEbeajCr1/JM0nO42H58Gde/tI3+st0XjS/Y632VH5Jgof9aWGqbePiAZJ18Tu1C3I5Fvr3kMox+qWKdY0cuhctf4BeJN7jGyICH25JnBfeOo03D/WVF7S2wqF7cKYtLBYl3Fsc6h82V22dyPl6dPYUDxNbGJ/FaTrOPNS6r/mag5SDOL4OkHwmGXnJ0sBbdemg2n9J3Wyysbz/IuAC+4vJe+rYMBDTdaanjqilWzdJ3acSsz1ueyhnNkmyuW+tgkBNajUnD25LqL9timcmv3lYXZLdarQ+jcP3tV/XNB5ZDEentaVJSC7OojjNpnKmhnQydn0XnYujNDNVX3dJrMdPk2vBApqEWVqu/w7BeI8+xwiedQGgSmnLdMz3E3HqIP1Im2GpYnzBN/83HoAKINu2s+uRs+jCRNG/ykDHs4YWKv/SkQbLq9pwxQDsX0Na7JTAdTAk8hIw0MYpeOJ4+Zklh18cusMgHaGZduJ4+lomx6GIaoE46USXML/ZngPuqOpoFawjkA0qOeJa3hcgZnpLnjHLny42S3ZlEkHbXE9PR8hvfogh0Ts4e5VkK/MLn9U2mAuzr2uXh/vT0rniumnnzOzZ25HX5WkaSR3dZ49sNEYLd7OTU+3jaZOMy4bzNBx9YksPhm6LJJZmY0FSkihULfAcorkggDkmHjkCdoSfPmEOGl7eSaOKFkZHpCJQKgafgE4EBdScrs3MPmraQMCV0pfCFdmsaUmfQrC1eDX3iF0D6KgJFtEAuCqMFKQ6X6X42fGXN++eAe4UNYEATNdgT30qTdMZ7xl9kjj5Cw0ng8vhtPc/ew1WV+8/wchlaxTTGbzwBHhxpVea6z0lrdHQxWfKWl6EMiI3shcU6z+Il9nXtUA+2CTfUVnc4TuLmVyeSbmcDrY07/MMThutzGJB9/ol7OM8GXAUq2KRXVg/pySLGdeP34iwhjCU4bTESB+BBLERcLMJdN3svm9M9SQ7xoQ0uNIwGQ5XUtCnRNdkncaN9Q5o358Iuz1iJVhED2CnMeISTTPtpzttvVuOukvkqz2D81AXkXYFKm6XAIXWljcmM6+ulEmKsy4oh1MR0gixCnj7UsgU1lVQZwLyx/3yJ/obUsoMivtfz69ez9g3Mohfy6cyYFVS+sGCjfN0UZ05OeQfW56n7bxdyHXCAwI2ZMSS7MWxMiyE2FQaLAJfXmtcPBZdV3/bgKKU/jiKzAOiVAIshaJfC13dfwQV9e1LOQshbX01f39ZJIVm3k6FeZUZBHXEQnL2h3Q2ds0XnZ2gXQ5I3I9D3gZhb3+0QqUfBraXmAnDogXbr8L9pYneCezaASB3WUnMBOPTwJeZ4FHVKtUWdTZ1DTaq6912opxzUOzLrgbxVk3wwp3uHBv9OcrWlU1KiDqf1bF3Fb/+gH7kFD+Stn2QECN4SQrVlZ6Uk3R9z+KB5Wwl9p6eF9cTngxVHsv52EvouTzGJiLVeqqvt8uOcTMXSs3T3RMu2wfxcEEko+8F8uSPcyoLoTDokqjrKTKPDulgHbayLNuzXd2BGWt+NPhMAYsUV//VtGkmIOtWazvlWf38B/TyDlNDkGp2QLVby6zIo6p+FTR9KK3M0os34Ii2N9Ds96LETuuy0EHex9Ke2BRYopRRSQfT08YNiIgLTs1TomQsMszI4xol4YJtecCDdoL74hQbwMVRsXuciKBWAESfDUTaJicGn9Cey2hTyVs6BwOIN262JCfjCjBBmYtxxfws329OdFdIQBJMfPw1yEdtm+bsftujauGixNN5nMwCO66WNFpHNkrCkCdrp2bFWn11IoHpDY5HhhePlNIrnK0T1qiZWaJxL3zbB7pJ783PBfy+R18Z+6nhnceuE0npit++RAs5yCNtFKVR0HI2aip50bzMW4wG3ZTPVSY54+CJsN8aKSom+IswS8anLJtOmodPKViSbEx6tqI14wayvcoGMaOqMbWjVwhLrHCSyQQpSQ+kqgHhCqKpzlYiMDiyJmWtky8U0bWdPoK9g+hrXFCTxDmbYVdKHzMU7rIiCtgO/FlqLPZYFs80cpVrMs5bEi1fSSSPaAC84LdVAG/XejH3KNw26h3jEAr5aa9pwpp1cbXGGPfdCboj4feUD95z2ssJay3lmczEWT+QCvt7XcSu9J+Sm+cgIaXTi0x26vRaVBZ5w0Tnj0EZibE0tLkOZCkUdbxKhC8pQif2kBERi6+xjbVQU+XlIHpDWTpJDn9ZYB1qYBKEurEpG/bllUSMwkihXS1h/hz2vSkCkYqW1PzrgBzqwT34v4Wtg1lDgU/3zSXYKaeRSxG/oXUtXkW+/5pk3ZMFvd0ub6pW2H8pCG7yqZ4zFtHDIPW/mtHBqtUFA+QMpiOwtL4liGXi2cFrFiLjqfWsNgPPWnsZr3jYGBuqO7MY6os7EV6yPT4F2ncO59Nt6WhMN0+xl/ix1J8ort4LE+K7kTntoKfjfrBjHzh7vOD1uHYtev+V4izcMHzGEzMMxfRuPdrBZibPn15WIhvW0gli1aZNH0xtG66p7bYsXoTIFr//6TjXIYvFt4Tc05cHEFmMhxbVti9dzxGTYQE9VAxA5Nui27WOKQxCVAlbdb/+U5+EFnX/2LhxQasOjAS2d0Sz7xUN6eWkQP2h14xdmmceJq2/5ecsi5L9IzythWlkIxRChjxVWBaXqto9YwTW2AF3ln9dp8NJtkPB99Hezc7tTITmyP8q5cyE7nam7QKdKzApzMeN6fu5IJcKsqjnYtlBqLHaYRWTnc0r6p632ZnvV3wewORq+XyXH6zfrPEU+/DmHje4AP5m8ZGnef9dcnOP71P3j7Bv/8E0iORz8/3QOK4pd43t25UNnqmbuRr11RukS30G9RyPYeylKB4nPie1I3v6wEezqg4UM/OGv09+49ClwqiNamwgIhWGieWFviPn8RMH0hcliQMZBKEa19GrPJTE3Xenk02P6kDWr6i9iv+J/AOVRg+GqaMqpMq8mGM6JqibJw4v4z8Q2pjwqPuqBOKJvVOWy69/LgCn66syey7biQai7vVTFm0Kr9Y0ueRyMLMw2aKqIDEegCLGL7HrcfSotRxPNfdhDolrOpzguRK1Ao1gQy40mqvyY6AHQtchA3DTGWWS2A0zuLbtAsE6Rkzhu2au6h5bqfU7TraoqQj0hRGu+rcRzLdGITa5GNSVU7m7ZNi1F8OdEcsNlakwW5S3A3SJdtNTnF+Wr2m7HEADo5YrkGhkzYUmr2pTJgNjZi+GX+qtXNh7TMkWgs2YWk1n8GZz0hJctOuqXAZByzNSFdQ7Z/GbLIjaYt+XSlXLFqThHReLDxGrjgeeRY2pPMNpjTtaw7LUbyzNGx0e+8uaSZh1/EV5/7gJl8N5PzGYAOOUosMG6AV07H8qwiJc+MSw9l+jzQOZXZwvRu119xhAZA4uYZqamMcdfiOZX2TipuscBNHHU4wG52iYo0Dim46vfETDChYltpfF3D1SB5RGm333Kuym8sf0KYSyitnNtF+eJve+bQq711V9FjLEpUsx6xXhyxJz4az6+I1lZNE51/B1n0Ex0PNNjiWpqLsJGrtdDXp55m/WnF1yfE6UBuU/n+20DZ7xe9wAyIMhdvVCF/bamswNaGCf1CyPsbP3zEZHbE69mUMG0VDh3imY7zkDHbPrLZ336W1wciynkxMcasQ9vN4+YoQ4X49TsEfqQ9c9XO5NfUWe/Dxc2wBMRL+epLY9y9NztlcsWz9OtO55T/qQW7xpUL9fZeW/LyX5+3/jcbuv5g2WL7jcm21dteJz7ipWlPTubLvQSoBxoWgI14pR9uG4hyuTH7DrYIGh5Upf6Xn3Cn00wOJ5ORRHv6BAuSSOB5WZZ92AN2XiB/if0FsIkcArUVk97yo/H850Iov9mvmf8WhwN3ecOgs6zB0HX6u4cesaA0eMiwp0WrZMLIBgBMoGLG0aMNvzUGWqJyj0nphdqg09fYgrIS0W0hWqWjoofwaNnObMOSr84PAhPi+XlnNj0jaGI6KBoDqAPzo8BkGoebfJXetIxCWScR1saBfVpZ7ezXSgWjoqgQAiwlEAP7P4SRx2e2jJvcZtpmZk1aJzG/nrW9XNEnGqBt74k6pibH88E1N/g2HxMs1SRiVTK7S1pHnbTWS0o56tXX5Sj1FPr4kOnkgbKRTuUjTS67lCOB9xLx2L8tMKFdixuuo6yZTlAN9MqXQa68S9G+4FizAeKlYPj7s+1aIIqifJwciGUVjgcGaWiKps8qJXWO4fFE/vNNzAGlJVuiu95dXyTcLqibSz1BAWxERN2nsv5Q8Xpn37FvJJ+t9eo+MheMC4Nmx05gXP1vvfIj3Tomy05z4UC3woYU0y20OPln1x8bKcAT185k4OV0HLHeYJdQ1OpNjp0tvJdxPndNE6C7AiVapL8+wKNgj4RoJoE88Y6N0A5GRp9q7oEXnjsc32k28p9kljcjqSohOr0nOrE1fZWiHvvrGBp/3PFKlVFe8b1Qcx47JmRhMlTYSdf3j8Xc2x/SmhrSiBZTgzN9aANlSYD/IrLYatITsSD00kwlBvZScTLPN13xMj85cdWs8qpzSMezmUs8Ndy8NdyUz8Ltb6b3CxzAqnft8Rgf0oqhvzHgnFYwB8ZJSG0G/cK2o9/VfoOELMHfuzPsrAiTDPJyRLTMIxhtoQcMZBcicfQR2CfzmLwslhKLCti2/1pqrhlkC2fKLdAxHRb/v5hAtk5Rl726elKquXzRxCJwk8ZcJ07O8LtelKHxhMqEea1SWn5IeGmeJaoahXSijBVBhXU9yq2xiMvl+NT5g7iqomC1zpuCRFf/qwyX5n8FA5uk+Uu6WscIF/6/JyX8OwE0dky9/cIXT5T0RiFS9ktuAgysSUPJ2N7xYIDWHmEkGT9U520odgFdUMsnDonTvQ50rbRtq45pzJr1qQ+Aw6o3aD++ukutRss06Gn8l3IKxdtjXUV0qXL1FDMiQLykjI23U6HKdNua4um3cVL9rTbLLgt96Iq0teUTaHs7NwjRUsd9tPAnlqPU1HlVHOJA6wWvzLOxnz+miZm6X9xz9501R4LgAHXx0iGWd4cpEHVIcCdHsVuJSKg07bLc2xsXd4A7J5mWvkhzTmqXxNlfA3qUzD3WvaR5gTQHhGk8PamyOgB1hy/4sxJ7Bttd310eIy82kV+9wX+HuMhcYP68RmTw2QA9r38YSIf9LHkwsjztsnXWYRu7w3+PD9u2dnf2rurfhC321asmLfpPjDJc5yebZ53L8Sg26k0anw7R31mU4/KNKl9pc2VADU5boRNHStLAPM9Z2Haeaaus0hdV+rjE/2gUAbbV3IpC/s0XSP0UTDygSAq3GIsP8dnGtWpXl0ViVBx/UnXukfwlrxlqeSoYsg8Nys6+bMxZgUL8y3MvrMoWnO+Qc+4EpHDVRkdCGD2rX8PLrN3wZ0Jk5b7qIEqxyxRObqD15anacuOvKsq/9EaAIsF6rZLiMOuvbDsWDMmkPItVd6j/e67AQIsAaNymBlqAetaZcRQ9yM6DpasI54Elj5wfDbhQW7mSKz0ObKppgOEOfsq5fByhRzjpLTBdmlFnH3txSL5p/knB8Fn+81xAapZhnktshady2+jAE8ElLeITxZucN/Wy19dKveBY6zIQ5ucY0xL7Mlsz6AEcwyTpzw/yV2T6IWPsggyyJ4x1Eq0mAxcXWoZ5ElzyP8ppcTNCY95JxxFdBb+AUFxuODyAk2eC44xJ0AhQ7zk93nsgCCgBKu0wOZIVYdnegHiql5gBr+HpMnC38o84ps3vUPsAxq9Re5/R4n59NnhqmgzW4mBoNl6kgxq/HQKy1hrxlaaGA7ufWoodjnLnPw9MdJoFu1n6fgcztiqEjYWvSBfOkUtUauQbfyBEauwx3UGR8WiGoXZHFTs4uQ37ZxuuO/mfstMtIzOkYNCLuU7ROigSoNAYQ+oNljYHH5dbIi4bA3qcj4NhXSo+1vLQVSdhoGdkdtWyeyX6erP4nwVvNZmNsXwDHCajVmDZticdVRDxthkXsDcfDeuUzz8mYQUDxJR6vKIDKeFjSLx8xNsSOtwbUg7IKFbfuayRKmR9oc5MqX8LkJx2mUFWw280XpX40ezjNU0x8ahgh0KiaiGwh6Iqji3FWbHF5iIPsz6v+5/G+LhYb3LzdAHFylqQNTsljnbnuOJ9kF/zZHuTlgsWW5HPGDvC8Ulws5Pf6eQbcdnerF050WurlJP5VUGki2hQzFKsISP7pdvnocPPW8b4bzdk7L8kU8xbOppBMRHcg0B4trGABIzgo5tXUjNFihXv0NFsueQfEFIaWtqqXgYTBsAGK1QT3r5Ow0GdSFYYHzjcd+s641fslfxm3JFp1nRgHS/XI+aK5kgu10rhks3mCnPFw7KlQe9uaUS/+BvypZFnEv7U3iy7NQBVkJsvmhGgSmegiYBwL9tLJOSTBpb7HHKMzlaPXiRaWkIYm/BHVcoDeYZL+MlMhr4EquOHVGM1zcHPNRzCiZjtyP15mZ8cF3T5khIu0cn/9RPNAud/WdDFDN/2xEVWyW+BNmrG5GtiuKmTppyM2F12GmGhjWUhgRD8yb/ZEk4KYs7DMNjRJx4+foDW6xinwvPpBBVblsU9MF6kGfhP1zOXcFf1o7zVTn1NwEB7ddEQfSuMg9rRuWgM2et7GExPEzvxAi0fmRyjN58pQClimifXt0izJOxcoOcZdadq/JET18Qn1bnNwNW+0KKfQ2CllLEx+A5/xTvWg0XEdRYlFRH0IEg2Bp0VReR0btu0Er8MVseFkXDq9XAelPgMbsRd6jbcEvnZlYOvhVm+/W3ES6tXCWNSzT4yA0ynkyW4hTj0HNznNKaXuoGHAQZpKoOgNuOdWQbYTZuSQPQyyvvc4V4kVPmHHVn6oylqSyXY6pl6mY4HaTVExoDj3u7ugeHCgxj82yT4gvofcMNGcAPbACaao75VfaKihf3n6z6eDtq3MIubU9nRHQ6uin75/+6jIJigbfaow3d+9B+3aWJ7j7PM209UBNI9yIJKr7HyXLJlD81k1i0OisIhTc51mg3zBfBrAMg1GPzQzCQkLZnV3ul02yglzgHsZwnkKvST41BSEP8BRcIxYgotkI4LtTkrhIgAufCYSBMo3dtVWwNL6zTlbfcXUMNd9y81Uq0rGG8qtGy2MliH1JPbu1QxlD1mCTurim870mImd7+9YT57zaTxScjr8EZpK4gWp9C8pNPantREL9Loabcvm7WqSF+glTqGXnWh9bXMJAgbsJjCAN8PLiIO0M6+mDuuSCNs+S8nuQvfVibczyB3xxbE8JMOK/mlds8LxUY+H0k3TM2pUy8bOJj9CixaJ5x4Okf/CLBggebQLsxrZMUehq7Yu0Xf0RS7WJJ3bkgFEzoxsi8wSi5D3RKTxFc0lVCUb7qLLSBma9vRF5CTGC00Sfg+gohLtTtpNoRPxXc7q2eClpv0X94BOvfuFn/g9nVb2JRAgPNwIbCxWomKsZIgZd0x3Gg25qrOqi4m4jFSZLKlYq/3GNdhmkPNZf1LKVOFIQWKtxwgutq/MGySsFPHCviUJ8nypLd0VSRiCEePVX6jIe0mDqVxQr4GMn4cbvi+5u83Yc8njJMYF/QxxROQniX11NKPFQi2j/XsijgjY5jR3ieHN82JQQphF9GxV2ncDCFfYWH4S+oYWPS+xjwprA2+HDXhTmarb6n/JnmYLmWBf5nipDs+SXK5kqsZfJH7lnPMurqVas30fn7YSOlHmuojQo1/eEFKMuNZ3lHqUat0GNIcUud6oICkUAmFL7ibPYqPdDTQeuBfzHQxijjB/jFBNkYLtBXsGBBwNeJz7+gH1ppcJV7tAVhS55Ovgix3GxZOdoo/dyT2MOZK8KWnOJEZVxYrC6bkcF7+TjWQslTNN6g/491/NMdN3kval+S9ga+OF6Bl1NZ2VWl0+/EoBUqDjW8VxrFOpoB6WTRTV5gIl4r+xcQfocsRyd15rsTyJyEjeLNACHHWe/IeXYaRuQTgmFGEpng4uZ71nZ1qw0bSnGqpdS/GMcWVzEBx1lblDKecYb8MGc4ErnaGYbSBLrFMvd6KCYnGJrdFORe1WcTaDTbUOotNj2zhYrzu8I87JdGdbdme6LcjWz6/CXRhE6DxI+Mbphd9f1Xi21u3WVIUIsyHgHU1lP5QynEaHPJbG1d1tT/Isae94K6pZX3zYmb9xHsQeHviCF2ggGh1Qj7alTAC30mv0J1h50LyWLdyBPDITr1rm0YWVgA7z6WSHIzctWo2tbm3LPNthIGEgEPgKHBSwUuDl+1ATCBJBHnSStuB2CTOuoZjfVnyVM5HFSu/2tmuYsg5Y8AXO3hFpnYG50hQX+vS247Cmvd5ES9NgKtigho7hpQSTyNbWUxDjrY2ssPPXE6nn9X6s9QUOBvrPKKBCUBwQ164UNUjnMNr9fwvZm42URHi8YPt9LvK7MPc/aKsXmEEc4YB7VHiosgmKYTGY2CTQpmNcQY4d4EjeKhL5IvjuwTXhH8LvmtL7Xx7P3A0hIcxKETbI3DD2R4No1gyHwPJe0oLhOs28UHgc2wJreGr4937zBdwPLnvOqRftCmtG33ZJukznJkp6TWptsx5piRj7xaQ43qNkYORhpz5jpVjuNVIas94slPj7Bq0sd8k6n08vuMSJwpejEjim+8lTs6JEVslG/kqda+wELe8vFBrDcx3nwSN+l/BymAnM0JiKEjj/EW8cAOoqqnyqvm0wFW/NlUlFlCuLrhRnHGnRP457S4338XJ8mb5yZBWvedabYHKQoNaO5dajhV3g9OURj661F/TCcoFFdl5q4u+xzqv0vDvknCA0iCfZfhsKRDPpfp32z8cgsuhuxSk80UwL8TiTvpApix0AlEX3xVYipBMU6fxQkUrUolc0hikwhjG2kSU0AqXrDavkv8yYhJ1VBxUBiHMUEKYyLJhFbtINQ4EZluhrC2USuOzjBxoxQ6dsjyEKIz9qBDdg0ssRJXwxV7Iz/ubO7z8GbbxVmg0BNYB5FlrclYdJkQ9iEKlnFJTF7VxvLm00ktw0axrfYMhX6SbfpzwD/NdbM6qfeDh+pYm2bbbZAcP/gINZ7TAMt41KZtfkxtSjoh4jVlNKUc6fdniIcKthJey/TUYvUG/SYblCeA71dcLH2LaWsr5Mctm3fMK7Xzztvm68CMv1hS7kOIixHNbDQ9p3qNnOzgOB5gcK/okP1zTvEv4RR/fRtVaVpZehDAfjDZJ5u2B4B2ylYDMA61kH2yf54L+2ddWNgQgv/uIFP7txSitee/D4nMhETlfbm45Obtf4KVai5YGocovRtdYkUslwswdCE0o6ZeJzlzUUozQcOwarSNwqaM3zUxxsdYxbK6SdB9Y2IrVx22pDD7gCAAnmhM36bmEan2wDCO1Dd1Bp3oJo2mjNoB/JxDuieSqDseDSBgYhoy/CmWlyPFT/oGtKZlBOmXUUUZNeRl1J2XKWBNL9dbGJRjmQ0MZ5qZwnjoCU3ARzQnIcqFS1sJfbFfTrdwVXROrGIG/rAgRt/Qe4z6CHRXMEqvOm33kuJurBP1ib6tVk9In1jQf/y7ZupweTf44YIaN5zAHG7sAjZ1rPkmBZzD7TAuwOj9qwXAfN/bRtKNqLHn+aVwMwIlNm4+YfLBIRyilD95UxtD6w1B6h8rbLbaPMX6y9e+/pRYL0WrklzMYyJZu9si1O4AvkaF5vqBaDgE1cWJgiKsKdaX1fpoIhgJNHkdmoPX19SByl8iwf5GG3zffa6elYql0/i3fS90HcHrSRUZrmTING/PZBKmXTiBY6rt2Rzz2BzPwo0Xpq4Dkf5FI8Qp8nIt/YqR79nPZ1bvYBkidPiZ32z2/NrsOyL5n5dVk7mNKIsLYyy/XUHpQ5+Nz84ugfyMpC5Ej7UYAKAg5NziI3i8Dmk/Be19FAw4eK2MAgCzf3r/4GYBLWzwpd0COUreLQ9OHZnHXkPaX1xDL1Ae9Z8cfnG4vo/gdwcOYYUctkbj3ARKxsyHtzBFmRGmb8B/d+oREDSHq3BnlnMAGjNPy5cRTAWgw1M8/CgqS7jHjKJgOVK+lcOyCfwJAMXSUivRAchfcHQMnBzA2THQOylc/j94Gv3ik14CIx2EakKTjOfiY6uuOm/Hgq2y0htRiScX9T4JrBOxuRBdZksSOnCvJRQEunHLTQwNEiLeXRbRVmLcp/clgrdCTTh7pCa8xuUCqvENVBGvCb7YaCwK1idSlzF6oBHTJNbnFHOPqxarLaY1QUpmiiEJlWR7ISbCVMQ1Fh8QqgrWqJkCW9CcTE8wTpJNgmlKvmdAd46pECi8KrGKBDPxKIGMVyWmKlaCxeo/4SgMJK9I4hM9RhSvV8Hn8i+XB82YoOyJTG4t/0TKT7JZuJ7xpnKH+oGU38xcuF7yI4Tugr8jJZh1wk7ZY2R0vkPKJznCznhzoXtLX7ByiM5yH+EbUpZ0LuwmbiH04CFhRegmoa+8YcSCmN5IVgrrQegHfofQNtIhViqbXugnfjFy4ekTKRs2VeiDH1O5tBRIOWO9EvoVfzDSk96QsmW9EK4qvzDSByuskaJcsTbhaqDzssOQa9IvpNyw3gtXe24utItcMJ3ITXgpT2Qr4eXkiWwpvJw+kS0k7VxQlUSZx+sRu5xOLhbYz/XJR+3Vx1vY3a60k83QRp3tmw26gS4St+g21LvYohM6+7hCZ+hVkgG7Db24pMdO6FmSPXagJ5dssfU0dckabU1TSVpsNzRxid2P9QOAU6JoqRJOShHKJ4wrfqcuxzizud4siy5uulV5n9Z5DCm7pYaCkphwiOhxmjWQSDpNKAo5Lo/bgGOawwJFFmqTgSIKrmMSUx0NdgOFevww7ehqUTZQ9IxogGM7NjAC29HQe4GMGh2I3Zo7llA0I+ojBSKLW/OecN3LnZns+37vUEdzsc6o9D3sfSvIKcqQM0rqRuT0oFdw9NhmR4EKb71BHMc9O2zCM+wGOpg1jg7B0IzoMpJHjQ5hA1V1U2waFzuQQa/g3sImiQ6BZfllamcURVBA0YqmMSkhYJNAEbBSDKlRwFGsM9hAlnxM5w0U6mkFBrGUL4vmSF6ETQJRG05EaBywOuuwgmVQNB7NpXPGZBal3+88HscU9gIZ1BxEIVdwKGJEvo+GnJaJJvCrYtXIkp4lRBih7C9n141ybuGzIyEV3napciPq2iNpQxm8jSZvTEgcbft05SlVyO3iowyZ6X+SZgntIKEMBez9puiB1hsU2ZHjj9bfOXEIBhI82RU8KRhhn6D1hhBmR4PbhQJ+oHZugYolvK0ShTOXeYqX7UVJvi2KobmFk4JFYSscexg4poOgebsItT/SZFd0KMpVhqs0I6W9V+G2MexlZs+JouMYQuHtMK+SWVWgYMOfjTzYnoMMXqBcoC/UHCLXl5slHEYXYxGlw03xeCr9AGdiy+ygpq3UnFygy+x16ewO1+DHhtYG9jdyJi/eacICZYpD04qdKKxedsZst6k+uuXg6GeK+Jfx/p8DncEf+DW5Tx4n2H3JeXkKfppuZrJD0bKrhYJNKUInM4H4el96K6HNPbNfBuBvtDSQLIK4EoVDSGVJDPtvgWrB963IeYo6Hjnw2JomWuJk+GrPa8FGnoEdVHlWNsDxtWfnwA12LY4GjHmoeQ23DctVRsHS4xoTFFIuFkFYXcMhErduWLpRE/94un2nlG/i1jqj3ldguNNXjsDruDDkCxxCDm+fcelKie/2Hgncjsj4zzyShQ4CKKIkL6f7xOR6POnhkMY1eCFYbrsqH7Q7Zo/vFpWJClhI/4qIy7p6Dz5IKNshiympY05GWQFAE3oGFG2Qn3ESiBwMleDp7WyoZB3t399E2CBnFCNiAYXMwl5I59DofCG71/ra9EhgMonMzMkgsrwe0juW8oUMdNWIbmPyYoUc7aNpZsB6rIY1Hamq4xfHDnICfL9RoE9YEBxUmni45b1l/e9ZPE4jEhcGfnRq4PC7ECR0NzAbyEPooYAjgRV6dODezYCi+rKYOzpAEb9TLK59LIEFCpGQmv8Cs2F1oCpV8FYn6BH+hIHtdV8AfAP+XMb3aQRV63FMqpffF/Dnqc1ionahhqKVrpJZpARk6cBgQydMx5S8dkALhTqSl6ED8/MmrcMLtIHqtEzDhi3ibEQ+gTMy+5jygoUdynNkWYl8Dl7xyT3y7Jjyn4lvcMP3LhSebo1Y09miOmrEcRob9kUiPedY8hRTA48ziMRZGZF0eUF6RuBQZXdLlpkoHKzM3wOp7zs5TpM+FBTwX2BL0KODTouAnxOYN6x57AbkPozPjgLVDFC4GQBeZCF7Gvsy/S+QYI4dsDYBqFMPBToocAFEzAE7qAiGrQEmfm7O+YLxevUDIraf1mcAExWwvIRlHO90tOu+SmwHimQx9h19dv+9FYdIXZXTqJy2zGp9xfq6cly0kFK7Be/TLVlE5pHuzWS/r2/I2J8tgukg4jBbthmDt0XPc2+/e8P2MU2gT6xORmcJ1xs1liChExl+v11L+5iTi8jPv9eL1qJDDxIFU4UNVWROAgPHI3Mk8KGSGREo6HwchPbToCCJ12+ipc687gtZ4uGkYdwGKKrZII6uwNiR8XGEAroFNk87END1GeDUCfNrpmx6vrcv045wnQZ4DyDxQC2pJWAf5xIZ5tvdmeMPo707bkOUKiYgrgU44jUcARc0MLUwYTxIhgITRJCgXzGZzDveEqcfeQz4nuxE4VI3u0lTGfKbj0S1MPaCHnSQQLvkRF+IhGhK6GCcQIumO8EEAhPJfzYetjgZFATuRDIMZkbIpdg6jsol0agEn04i4TxdrikmZ1MoRJrDSWO7pbrj+Taxv5Y2vU7FsuGSpmY0Nec/Xeefd+Ktp3sbFvF5oQ1U7LW/GqYPi7lHUkYBpgNvoGZOJwpHCXHO0DESmmRDTs20zZg1t6dG3Hd+LyjnvsnNoC2c4VTLRcfdcDBJNCTTbp/BJBjEFBrXMyxWF2IFDikjnjJtRFOoM0u/K2sdbCLgLk4HLUQwGEgCbvzLQ8DaxNdVFgbs/fFTFQrwqTolEnJc1N5HOfxkVckIRrj4KWPinV48fzqSgOXUgU7sZgTrPgWBLxtLHAXvq2eAvX71DMAjMCkmwYUroJPQ8ZhHyVInF9+onaiKOHg/iQmenPFgWiHe7u1hwrF8KNO71CMWwAJFETNccGdnaJ9iagwIjHrCpCeCrJkJpA9y9egkazbK+nWogGIW+FSGcuMrysueg/i6TzVnB374jDtIwP+zdPjLzfByNaWLmXumJpULJbaF1SGadNEQ3bpAG+aU0dnZeIxzBgZt9xwZ8YypPFdJqsdC5tkgJ5F0NDH2v5DzDrQEFfMibigDv1402MjomQmiMPOTkQFaq8vLMcBbqK0gO5v0ssqSm4xNMEZPbRqxL3Q4NrEBKAcS7QXwibGCwocr7eQZHYk93sptKbBDTZmvIayeLtAbW7lUkxIyUiYCuSTaxbjEzoyrYzaKzWDYqEYPu6gmQs2Q/t81eHgBWbSVk4mpR8gfSkilcWHQ3hL7pZ4Yqs6yIAKHmzI3FRRKys4AhvMm3tN9qMoXnLcWqwcWd8lzUeZDM99DW9/F0LGT6f7P9YN3vK4yqroxHPHJPm4p4IM2PfFQObndnHfvvvuCHttrCARfb+6ku8UGLs1on+5IOLbTKNc6atUDow1/z4qhq4SU5N5GjfzMtorTlCSEHaPGIE5ZOw4X3tnIJQFjeQ2xZqLCho1OYA9xMASrycDg3Bp67NK/G9ptzHz7De3k8a7bBeHdNFJX7AsZYLNnOZoCmk7nOhjUpuF19OP4vn3XSns+ioiwRmLs4tKwl8V/5s+8ya+rksT4a5ep9ze4lqIt4t36vED6UFRuhlM+jjCoDAVjeBOQnafZea2z5PLHIggCiuaOqhoywsfoz1qvhSpkAlaJDrDXhzImXES2Q+J2jGBvleFcSYbFub2c5ztxuZrGMaQwBLRCbFPHRRnsjkcMryUBato4XAhG3D/hrdQl8gwghmOHX5QDSO0ktoojrXOEGs3LC3FRFfISp9+/gPJVMTSY3V9mZLwKBU9V21RKJG4RFDOW0Q/WOhXyj2g8PEGt6s8VumiOgUhhCXtWzJB+PmPKRB/SGl0UCyicrBwmkqiKej3LFkKft4wu6OJLIkufLV77aFCdrUOIrCryA4hl6g4g93e8MRO+rpzboJnnRVP75oQ518KQbBsj+pGh9Qv1dLZr+udjCEO2YLWI91MBjvi1L8t51vLVUzNGukPGLu/PKR6uZTOFVnzjpJyHyOM8ZjL+zkW8WrRkDyefK0xY2hviAnyQ19qCEQwidSuOhHLHCAo4Cm7/2KZz2JNNXBpOH2BCxl/MqB67dm3/OeLHFPlcicudBItEHFeFnyz1RD48odx3PR8SO4jUUzvaAOJr4dLailtRepAp9ZfL+eGjViYvOkKRya4U2A9Z2KjWChZE5zs5QlBRe3OeXSgcLnVl4DBXNCk3NJqqXlj2YtQA09TWLLAXckg/NAea+kqzKTVB9/CP/Up+K3i/aNkOAkUlLj2R7vTHId0Z3GU7ppzmjIIznLzElEMe5w2LsQWe4dwEKuloaUrNBp0QFSr6HsECDofzNAUs2nG1FRJG62zINWStGlu5K0+H43OvAUW89o1nimCPbc5Cjt3lPMUk+6iRwEdBk8nvhYvDNlZB46FbwIfYfbCIc0iCYiNIbFtk74VTDRBbDIgH2HRB5+qzxdpR6Aw4TdDuqful1mJTYZhRmtAqDDAphyrB9X5BJBzUOF0WjbvCdgGMWpE5L+x336tQ9DCQidolhLFmMHgxXe5gJHJg8I4k3IXU3i7s5iWiKHjF60uY7O+vIQn/fNDnNIh9KHemMHpDugrx2utg2X9C0iQ+3BvEcW2OLjubkvBEjwKsfP56Oym13+ayTscGrM4CWm8Hw8EhtCIMkHJ5IypotQ6uJa/L/stcG6JgQJOPy7GsrEMYBmpKDDXd6hFvTW8ZG3W/Qq3r5t5MXZ1rAjWqZnRmfAEZiszTZ0FyGwGkJskM4Hayi95mV8QuDccHIGcnyFFg0vI/XIHe1n6l5H/QniIz4dvuiy1Y1Ek2Q5gsHuHt5Yq6/tNhsYtgy06vpjWl3z0VZifo5jiXeAxvu1nLVV5UORDaW34F3NydiCEtHrytVvbnnYphbPc0ElFT7ZBpywy7DDWoNvN8BDboCsVz3+nD1DZHBUFW6HweKc8UqQpxl3SE8CgamNBTJ0FGoufpqMm/rRzps0U4jaENFgFft8iSsoPqgte9IaOtkiX8ALMuz9WMhNaRwBRkJCobukAgQtp0KSykII8L4SjP2A3UPB7Bd/3RcST6rjc6OcBSoZUOhchZL8HS4S+01XfgRUNjCtyGFWAzXlkDo3vMlgmZEUam2VkKF/bDxd+sfsbJ9wQ7TCWMAOTFzUW4JOixwFGpbV5ez4m0DQ1cBK5SMgIWKHmbJ+fDGNL5HmWCoRYz4a7/4v+rs25EyZEWS5FEQgTh29LUoFiyxqgqtcmdnwamNgTmAwxtCmyb1XbnJ3xEDKP32xqbRzMiCSRjcPa3L0jlmHmxgZ8sEVbRCD7E8sPQ2J6NMN/A0Q8oGMD3wbj//31riDksvBjkBbewMm2eH8TfEZgO1W5PBc9Kubo4lrWenSdVygazNhJfWxSvWkvKLTb5iHoyC1ko3HCQa5K22ZyMRwLP8IybAj6tF7h3SKAWrRI5zMtwMNI8ibUpfTJqLdqCJaJFxPz/ON6th8jQ8KleVa3zlTK+Ts+YW8hMflYSXN41N162KZRk0JqyzzPiFdlLMEKPwVMwmviEXVdBAbuTTeWaPBatrsHrFWikxgr8PoZp6MwOjIdpzFEB0UcF2ivTuvZyOYVNGs5LjPP8O3GXDjRwsPJpom4/bTBdfY04yF4cl65S4uojI2DeO4FZfDbF04KrjeSFOHPttflyJXldCR24eybOHFGIpVkmCx1PBtGrBnsJNI2T4IFZU2i89oI3W1JMUlE4SGIXkOTKMHl8uybOxb0D5SqtdS5WyXjjVNSTYbYSvCkrGwy9oN9ChHequ5jawG3277nkjHVpiaSjh5JiomsojLXF/RTaq6lDD87k5hAMW3czKd5W7Jb6imkzqIlq3zsux3L1sPOP1xod3paRAnbM7REF3QwY8Q0gAcsRR04TMx5BfK7ARWijofHY352bCeBwydD6G3YrISoocEFwfDU+BmFjft59fYxX404HsK4p7y116OIwAtw23S2RLPbisdLdxyDh7tMue3FPSj+hF6/h0QFeLQLLFhYkTdMoTGABubZ3COd9+Z5icu3js7E4HSUVEFAydbBaET/X4UoU6m9gAJZxAUzFMgi6OcRAWLmO4nWcx9K85u7OLLzBViSdnjgofnoJASvKBvWUbUbHHu5zevISWhwjGgsOcbc8jxHU62jFkOnHk2ZS4FK2EDSst3zaCEf14pl0eFdOGtGeLEyOv5Jh2WGmTvbnacCNc+IlzSGvKyb9qqq/3zva3fPSfYtrDE8R1aFZ+3XPnIORiQXqOjhQZU1xbb/89OAV7yEtPoE6VGdiFAz4g9+DlnkxbzVs7nr24cUXlgfom/bwm04IeefhkTcNm7uefPj/XRXuOqS8eTjf9cvz7obV2bnmfDjzSLlbIawwUbvNPrMqHyTEfSITZm2VrLOvZqoqmms6s+j4z/QHvyuiKyKS11tDxZPsm30hjxlaqGM0C+eq8VleuMhR410fimiIScy6ET87qrp9uqi1LbYL0Wvp5kAlnAcHXqaU43qaau4BBckD377U6cxt15FcYL9wCfrKVB4l/PsGnzNvXRWSmPydmjJgb3zZpw0Gkg/+/LJ4IFiT4YOQGzWVks0oAfZu8YaiEu4v88Tnm85RwMmqCrg0W/Pdu/RzfAsnJBVqTSrtvqPFIgztNtwbvtxLw52weBO2ljNpMpcjb+siVLIOHXrVJ9cMqdXVwpsXw/fAwnPYzz2Z1c6GoHgpLfXogIsIH8o3fvHhy3SvLG8IEdo/zoyDrk3qxAQzUmfPjVI81T7MoxT8Nqg3eE1Pk8KIiVpfGV0iSoJPXbAZpTEqRMY0yuADqtdBR+0M+Yc0XRk8S5w8MO66EOu9gJR7m01/EDHhpD8av1Zf9oC/+Iz/YTITB0dHf9B64d2wjqUq7dOXeJMgFOwZFrUjp/tI59KwugfxaaaYoV2WEE7ch62vsJfwPvdnBvdVKJAGAikJeo2G0YVRlb5gOgDFNPikw7Lbp0u7/n8tfxxfw+CcNlhMPa6Mzh7oWSK7qpyaie9mxFsXgVrjuhukYwlj3kstF7DGOJAcMzu4S6d85XwTmeHSMOeQoGrHJmDzUONItDPleLu+14Qz//yC10fqDKwZP+3zDYEC6bioW4zy7r2ZFIE41gEOSWnyF7mIhMBeDjvsHxqc9Vfy+WUkRo8s9+uWuQd0K2f5le/yzhkn/Bzh6gG/3QkTH5x2wt8RGiZ2jpv40+GEf7MolCtD32JVs1Xte6hSEemk90Y/XORgL1fuhu7vu1HXsoelyzmJQtsXNNUA3Do2cuUaC8jJn6cSSU/Pkf/6DVOHHqI4VZbcGlrB6/ligzn4GE5ykyMDO+x8U5zI4sv0jfdRA/QvkS55JE8ifQyto+2fx9Dw0UI4jdgCne+FUIw5U9IY0baAyL+N5NJR8EIwp2/15lqg837nY7A7AI4IiEsI2pTPSpSnlymzIbEFFPH8sdesOjsYfRGedtvBVr66//DXQeJbgTXxBuTWsCi59fWxlV40f9j/+W8f6IiD9X+HhZpjsihKAKUyZQl46T7JbYBXfIuIaLeKBDNqd7qa7Fkbm5C68e+HqbdKmQTAsf23H1V6NwNKdj2E1Loy6g2B8RRPU3j7PLdXUcwfrMsLQ8tolChNcbfU326C5VV5XIbDg9Oz5D0UqvIyjsAovjCE0ASt34HWnu43+OtsQ+ak0mwcz+AoVO+6rv9CSU0FMOT46t60yz1F/ncYc2ZCdRbpDXt5XOYOPeJ5K1mxF3kZT4O1roU8jWx6TOQZjtiH1K/f4aF8vxNcF1mNRetKcQzCM4YfuXN/WBo9CgWdjMjd5QNM11FOLPI8ouO4T9r9GAgGI49v/HffOKzKMUK4XR+MqtRoo9rlk7wLDf9lMhb9qrO55+2II9pAya5A19hyEgxabJTFmyQjvsUvSOMeoB2D1cmPLYE1y0uDIreWr030XKCjaaOwD1U4q1N9TyPrA5kvDLLTH9HmyaMQ5n7HUA696OEJqQwFANb44gGMM3TEEdrvkKTbsKbR9bnv4F+AsstRE0Qv/FtlA+KYeg31/IK/R6OIfP2CgXi99sTSQ1w8rW+okJwrXerrGpLa5jQdwMEPNfuQCAg+tqsmOZsOR+P3nH+eaL3C/UNix8dh+1GgvgOvJXCxdbQ4FHQ02vtPw9sxwLaKlhgYmCcZ0vYwDEgnLKdidYig9cyuARs1rtP8UgbY3AQhGadaosGAdP5cCMt+KLydVDpgr91yEhMsYYvpuQHsfsEKPchErMsMZE0kTFetiS+B4sAa+gLL9maNAhYI6Dbv3g4JG9qHRLV4cLHPx29K/zmnR8f39Ll2NNiapmeeIVmymEMwdCvzVvEyncMXcpjrpxmZYd3dYHpo4IEI4DZnFc1r/n2wH0ytPz8fAye+gzHUEcK6tMkjPkIEwwMG78YSoPZw+DGhiNUoal9c5e4P0x1AbjN+L+AywKMN8hPoinhnbooHhGt/nSfy5YSyMSGL9Rofqd3vm9P9dPprUe5uLayUs2lbIXFhRkdrRxRgQFBFcYrRNjQ9rpBSRjFRS66xAdcK9iTpsSZKqIovI35XvcLqMGr7rFDY9jkYdx6tXPbXw5R1ypCNYAhX36+RDXa/GRhPS3Y3gBSAt0OOYV69pWi9CRRV5VSe6/0AzcIOR9fJtxkF4nS9pg2wYmsaEAx45xYCS6XinxCmE7sRdzt9KhaDWF10d2cVBfN5oVZIKqjMrYjDFi7wLnpF1TASdMemDbkpJF3XoVEKJRvB74z+vkNEf6DW1/sr56Zs07jf1ePeO1EK3eYgGaxzDe/4Mfo9UC7Puo1lAg2r+QXcxnwN5OKglSFxhjvw6WpGR/wo18VC7s9SND5ZEcsnC8/NOkW8YoX4NJLVdVe1FSNoQd8iCJjafgKlwSUioGOH2hLX5OJ8On9UgsCTNW0hnmkT9je4S8TvF8ppyOBb6vSX7FKE0Dr3kOm+UiWuXjqkpnzhynI2XTp5Y5vI60dZDM381E3RT5v2TsmPJS9uuV8p9SwZhPdNSPNLXZSi+5qG/mZq6QMT6G78Ghbi7X8YCZkCFhXidCBf48OTLKT4gDixpDcY33PGMUvTl1R93k6LmqdFbWdeg2jJDfoIh0CMdfVENKsMEUPu8GvPuyuZOqaC7mCC8VUw3o6lx3hV+YIsuTWDQyMvP4T4PmztSeTu18S6wt1y7eW3VbMf/MkI2Vvrq+fyEv3z2uZ6j/6sXeQ5ISXX+UJLxU1j3nN3F4jiKBHWWJcAzKxwRrw8AQ+wRqoGf1hTWjEhhYFFvrOptThEHOj1OFz4vMzNHMLLzaE/Zi9WNhZMBiil+s40fO/0HUCZt31ZdT1bN4VO7W81sQo62pRH0BAlP8bNKPc3Rw4gWf2iwH4EzsoXEf14GJ7x+QORVb3yVkd4uGnt/fOrOE4XMCDWgsN8A/uywbWfcJGVQZp7cO2wIJrx87PQ1QlXOwLaIDytpOYN7tAt+LqKBgcyEHs9rN6Ss3F8J0h51ClDr6cZKxAP6GHqQ9Z9bMILR9wLjqw3kL+ao131xLHhuzVxvXawUrYu82ObpMzMuoE5rVaKsBgY23IOZEsY2PP68K+hZehVLte0c+Knq5sQWkiFYCxljG1wHOvWpWUBeg3Je09SNjQmD+TqfmquFyO3XjlEHBhJZKC9toIImS+JxVkpXAVNtlW0UEcFd+7JWO713l7Jk+gK3R1UhsPAFowW2zcdKacJr1M9/oKu5VQAb2vpbmD+htqhA/JgtHsaD6OkjFVmV3S98KS7ZV8WCwFrokN92Y5a3eApkRXiWpREnHKMrLCC41cvvqSpJVGb/SnyMf+pQLPuMOO2BLEFtYMH8thhUWtGTy2gyBegkgB3TTtQGQoxLB0YcUuEBg6FPaadZK6hq9J0cvcB3ny1Q3SutJ/LABVP0msiHH+IKoYH3VUaU0TydW/NN46p4cLFeFR4zdLp6OTmV0EP/NrvemgHhWXz1k855nTG5NxFFLuh+wG7YEJC5OvDJjA5rdn2y0Byx7uAkuC/u489CrQl6ignSBJB5djKdPVxddbsDOfMPqY0SZh3Xmt6uGvU2EH7RXmXA7Gm0YkoXkms2xQZFNH+oNHlqWtFsnw77Ql766CiPhA2Ts+8rN1KadjLdGh7eN7aFMPLoLcJAszbh5nkycY7QY7J3CdrwYI4p6Udk9QAv6pZawmR5dXwToXL0tv3upUcZM2GvSJDXdfUyGDitfm55n6aP62AKzuGlkEixM5BXaxMx1MpEUv7vFK9Jk/K0hOO/wKEqvJytsitwbaKZRQztOgRSXVmoeo6Z6kKtWcBa0IBZ0K5T7N4WzsR9FKrK2ihrlrl8zzmJdt15AZNterVarynipUYIni7XRNXzAojIlDqla4OKVyHfwv+7SqfL/R0F8XDzTp6+l5wNZ0Gq91O2xveK7rNSF33NN53heDql81oSgLnWLaDEQOV777b6N1YpCgZr6rQ6mohx/dwluc7WjdKXCbRiX3I10/Gy1Zg5YKlTYxZrAB9g15QKFRoUbei6DSQLK51Sjo24nGcCEZyosQj4WKfFR3SZRM105qO3CLLE6ZoKphfCcwasdfF0bx7/gOMuHx26OU3MQkstI9zqkPFqqGLWshRXEsdZuHlCkOURRAvGSnMrVoCM52ruaqM0it+bn0U6NzzgkewbZlPxtMDkmPt7bzIB/+65AS8Th34LTAlCwBJs33REx+E5LgHzf2/Bqy6MZhIPL/QGPAjdIscWcyDKyxbvQPEOxSUzcXUz2b5p/0SqWSpgha1RXR5jTmD8szmGlAn+Rxwd/CNEd4e2ZvQVFol4ox9j3fHbeAjsIGazQmh6bUrWCnRmUrVUCRSolFpy2uJq4ZNpciydWqw11VTBCikWugISpTjAo+LxI1NRbf46XJPPeDTHaLfsBsnh9AI+P0VeXdRNSBUkQmaCQEu8xQtxbBMeaCpk326GXZ50XwUDt5t2rfl/2o/RmK7RMHDCA2Qks+aRwbTXek63mzz8U3vsRRG2rMALvWuf+SvNyKOS5ePYpgxd/jopEr9+3DcjZu13VvF+93aPCm+J3+/oYApL4/S2mgHga6rJtfp9MWV8La3rPJgX44lrixeFZb+vlICzTkgcSrWidmoGDEX1moXSfiBVuL9BKLOAcSIyRpzp4m1UieGwJOXNHqottdv+FYLenQLw85x8gRs96OCKgiH3zdQfb1STcAqOXSCJG4nClAPOWERIG77igTaUjZ2KLXa0dk3yDniZEDYX3kqOuxMOS1XRLy+xIG1pbMUQIXXPsm93zvKOtYuMuS04llDsPtYGe4UnS7x308XjgVaA88GpEh0eWVap5MoYVFXRpIOWEOn5LTRxnl146m+sWOnXUQBhvSMpLTpxwYgyrQiOY49xdhaZ17PCcbD4IZzQEDJ1bQ3/OmImiJO2BZ11Hv9sSNwzzuV+RML8kotV43L+/fDVDZI8mW47bwEpnUAj8o5hJhTtxJMFJdjutM6d1p/Uors6JYnfDq4jxcXm+oMr/60Td3fRWhzo/xXN88WfiO8DyD/CdN9RjFgszJ4vAC1zEFtstgqADVLsh1DnUbgeJbOxo7DTSPVuMzt05xBKt4+TkvGZnTOJRKp1+NUaD9WAgO7GWJ7aJ84g1jUcnUADh3iZiKtuRky0R6OFF1USIXSIMfcshEj2kSLRTTrY37Ll3FyvPqWFaKbwYlz8w4LsC69GUngvQnM4Qy+sJ0yIsbe1558Gp/xEyHgIjTfZQEYvCWodt2lB3CFl9TDpEfZJ+zvgXRwhLTxTusBVkStp+fD2bR3McnRVmdq5CmvR6UIH6II1k5mmzVXYdC84kxrzUufeiIdgvKhAgi6VUVatOC41MP95ogBly8R2JNBwlNb7U/CqqVDSlZrY2r6ZCAQea9z6rYpOvTL4cUwRWLxWM2IAInLa4m8xyodId4o7GO+x4Kluy8EZq0VtPCRgxoirO3nnKNyZWuFCT7A/ztn4hGzOk4s5StaQaGGrnrLueDq0izaoyCc5nMaChGMACScKqzTXVsGTwnONj2lRtrnWZBkiZv3XFSvMK5bq1OC+UwovUtKyPPhExQiT+/tnSdpXWpOiZF31xrQ1iFai972Ji2aE3PrHcQO5cJjsDHzIrXc4Mp1+GOjFHnki4iZpeliZgVO9P7GME8C4c4+H3cxYYmD/h2kTHadwP/wQCsnuT9sS+rzaDXH5e/ZxXbr86m+kqpMDm7jzvU2jeIgUipuGnc/OezyKeUcqzagOtHVOMdJSXCFuNfnq7CEI0u971neSiIvtZ/VG+JoGmVLTJXDO/SrM8qcscR6cFWcJrUEKSGpfHVC0TH/fDSCqtxjOviFaZknISVm9qIm2AvU6WDiaqVkMdWZUJ0s9eAwp5ilJV7e5jCxWfSEcbDlKdaFWigNl3Rsb8cB6pAHczKQIO3Eo5pdrEgPUntSboSoDy6HIFUKjsnfJpxdDIQjvC1Oh8j2HUTzYSDY6JDFOsbvwqO0VG7Vug+9EE+68FoT3s7y9iUkkE1V1mZcqyBEno/7cn6LQGpcfoDA9peaouATSrcoE7BKLnN/WueIaFGxd+kIb7pCj3Bqleu+OBXe6al3A4MYxiYyeT2eKLxVGGGyGsxtRxIm8DbygetdtKa7nAlKdxxVyZRb1IdXBwoB3D0abqg+nVeNCjuco1E2AW0xoOTbk69A1IyFHs4YMslRZ3p/I0M9rqEXt7AgKiUzHGNG3DLBKzmTJX4XRlTN15RM5fRWjhkTGefQMlM7J9VEF4TM6jaH7xEGYzdebsswuHsEdr0e8JGTKaonEbYD3qynmYANLH9fQ6+ejlQLTH8yO2sEwv8k8jpmtUFrcztD0Gc+eoOuD+94awMSV6cnvvidojH3ZssGphzBMYmuVNdZVU3ENmfk+mdSwrXJRpNbCXQF4IGheFSF1t1ocowFz2toar42SG6XeTXsBTZlVs2K+w9Lspgzlnl5bbQZ0kGTLRkThaCLQYpR9kzQXrnbhsZDh9bezURySNH39Vm5EKnHDgwJH3z6QdLglho9hNJv9ywbfqW7GcK/BoJli4PYmCNQykJhnXhjwdYpWzmqXNifNTwGEfcCTnJQxOdWgnFTWdGsiUi/j3Ox5OnlzI2SeJgbELOHIKidHq5aruqDPoyOy5iF1nuYcAFrogH6eV7S0j0sLfynM/7h/oBEHNP9YS6eFd+EBMJP0x1heSFh6bxJhNkn+aU0PXgJkIuXiDF7Rstx9N3QceV27Qa0DdqzgbU/ZlqGQZ4q3UL36Z+51v/BrgRrNLSLiR/+hgDpfYxjjW+miMCEu2BzkWs4gQCQB6Jv4cIfx31bvgedaxgbMDI1zbnEJsCN/PWpw5FWrM/lAlkPSdGjjFGXvKNlOTAztHPuSMcQpD5O83UAVmsg59cn0YaFWbUVhM/PmHixY6O8XxKQoMhSmCe3UBK0L6sl+DOSt+paw864qrR0bKuPzmoHpXbBZJbXSMbcu11mWKXQEqeO8lpNuHjEeFMZzJWTj7gr99O+QLFCjeGk+vROG454IRiKNYxh68gPDUZk2QV1HRpdryLRuvpiSXdwY0hkIVivizlrkPaIYku+mB/CF58rdwXC4OY5kp1sGKxfx6UmIMlTO5eLDEbncIps6tPYkerkCED3w7ATLnD0WJ7m7MXAclbXYuNRvXACRGe1Z1qa2QL2HJxc8RhAIdVr+X43Nivl5PFmMWF1q/TX+g6f2vx4nCdO12ErKqH96C8Add2ZxBWCAq9ik86o2g0bsn44j4vQ66hinOh0/n7ZMY4bga8y5YfW8mxOYvd2G8o0UhEOztZdgmHR50IvXHIpMPKqolj6TSWWC1ZRNMgfxPE0L2pbXCE8bbj3rvpcVB8wRpHgkvt09GgNw4vj0E+G4LoHeUrHekwyq/iJuT8MliVpz+DbIiWh/m0x/im4VZ1oIinhbVrsZpVqW3uS1yOqTlapD+X5DlhJh3+mJgnqS7AMArHz7Zz2BQjxhaxvMR862I3xGu9/fClKsrq4jn122nicPO+uSOsNGP7RIGEOlDvrf3DvwF4UFpkFJDHfTxUXKpl0yxL4nazbr73f3f60zEnm5e+gPLTa97K1mxAWseA/6H9EJiQmla+upBj56bEu3/G9fMNgTpTj4Nkb87SnP7jUQYVqAT2ifNQYuLvvjTh8g0qFjHiyrhGHrkhuPktMYU1yAXj89Bm4AJDnEbthTqkVfMWTRXpcEBSddK7PkHW2rXnobdjUcbHbGTKMKyIbJE2XujFmEEJbJOiYM4HLYxBnfmAqxLgU7j3M11SINbXgwRdy/j5XtsaFzzdduBmeNZ1rwEUvHSxbGHIBMEFNLQMTFTVhaR2DlkJ2hmZ8FfUWJIgKBrgguVcqvZLk9rU5/hxh9y417i4W6VwFjO18AWTLkQdQrWoh//ruoRMCPIkqcXcQzqW6H6PISvI9VrgqORh7f1h4hMRu7sk9JZO2mbhVQ80Hb+XROzgXcxWYsnbt+iQ/3LJmQHffk//E1EcRgUyH7XfXaLXz/ZVD8dS0klG1gJ6XKRerY1DXuJRd4EZqDuSnB6nJm/Ws00vo+9BXi+MsrEyr3WCU57tRSffQ/rq4UTbt8zu1xyMUTYGRRr1HGLwr1uYD0eFpxW7qYpnfXo0CBkO2nw4BF1CeX2OoMmMrvhja6z5g/hqagDNuuEezSTJe0sZuylID35sM2TEPfKh+tgMbGcT5wHdTvcaHNwF2wuSOh0YNLRQ2olDs72wHMs+7s1Ingb5KeUDC00ctS9JIsbSDDxRkrhIQTOlXetzlTgd3hd70srEzKppcFFyfD+PFGLBR4QYrgn12lRuh+p1T4kCMxiaumlDo7ZIsTLTgnmawFH2dd1axjIGZBKLnJv0+Bu8Ang3BLmRC9v+mMNxDo00IX4QG+7DQJmvuSzOhydq9aKzRs4mKhspuqA2oh7GQvHhLUcIC08ZzY6iV7ihvByKgWJcqo5ziuXg/DUHCPPYh7qZkLApfwJMYcP3fsG0DR9XeCgYsK93egOWrKAzAQCoOxSaGss35GhycSJdC7JvBE2T3Ag/fsOENTUM3oVE4eMY6+5kYGiKMNTBSrIQYJyx/aAgCtgLo6hmefIRwIJg8EWLekRgM3sqGkESmSFKZhAorJalFHKWE2QWvqzb5t2M7XuW72rl8SdoJbQkHRmiSScV4ceYDUdoG+My3s3wtXoltJM+v+WVrOZNqDSRNiglJ5hhERckpp1ECvyavpOFaoiISWI8egwoRkWQfD1vgvZFufG0sXB1ez2kQYalEA6sS4HZeEJ5Jpi3Xa73x7HoNIMSvQIEj9wqdyymoxLk3w5RLJSbzpqIoU0bVgGbbLsP5VhHMclh5DhCSwnpAAIKIETN84wzMg0oL/O3zkgbwawjcj86nm5GBRNaZeIP0jJCO8coQRzUdTw6v0ox4L9dCmJsozJ0Cj/OLMUjp2ASgZlAbT3YqP/iFgpLoRZior9Y6kabaxwn0DYxHOZzDP8g0D2BA/OaM/8xTNPzeE0qd71Azij7UMvVrWxZ4kSyeutLRbK1Xu1CCrpz56Urwez4ph+c/vAb2Z9PoYpqaFSGtPY6lBNoAQK22yDWJPpsJSXPup5XHTbLIcawioAxXRd4aRoCtAgFJq0+TWm0ba6r5TJBS4ZldGDwbGHXEzNUhijbOWfBG1OEofr+VkzH7gA2AJaXK4v+hbXBSLKbuxfC+QpZLFTGAyFRZFxG6Gti5oACslpWdBHQVISmpujhdB1mBsunQjVLpXesyp/sq2FOyEnbIuTiAdScgxxkhJ//m8R0ZqikJmEHMBmQBlB+aIKSmLTZG4hbifirNAmQon4FjRuhKViWau8DVaK1K81Vc9oQ2++JKH0L9GpTCsqL/eQfSE77Ngv3nJ4wxgTpPPyUIYywSf/g1RnjP9+IfWuvblEVzwvldtTXfF2NZE6a8wNaq0qlwpOd+oBDKlt0nH2gxyWoFVQBMEHar3whCVssLRsOj24rlpilHgZ4FT3uN4t9aUQBK2V6Bgx9f5NKjklJ5m6PV6hCscH+nwIg/ht5qkfVgMCr6ERtjF6WeUex1F8EZ1QZGMxSG+28QOuamF5zr74ykvi9Kg69QrIZs+TiYUwru1qM08OW7BLKVCuqq3pF8HCB5LDKotVelbuhJZp0i/Yn+rG4VSVAqsvQ4qtbzEHDVTRJ0CEV3xBh76uXEA6w2EjwpRZE/Zu/3Flijm+HcbFDgTLmiLXK1sprYzj+c8CtmWJsnp2avMXtGgRUZnqYKGTY0+PY/R45nQbAaaBX4XvWOCYrHEFcY6wGLRowhLyP8PolWbob3ogNxjR8+4ijHmq1321xHQiNm2UxDjyAYmer8YUw5kHh6JEXuLnG8F5tlsUm1ERsxscZTo1zWY2SNTzLMb/ytWTLkNhj8N2dYy92005lvZj2kH0Whe37edpAlU2sVuGGTyKc9AFxKDOsrsIdpZPZnsMI3ALWTWSvABeSD9L1qmsFB3BUkG0q7mzRI7VYiiQlTR6KxFZ1leA5NR7smnjZC3AbvsN4wEUhF87AbpdSe0YnbGRS+hMOqfxDROVP/WZ/4sh4YAYSrNO7mSDw9UP2P4a5qaMwJw8jpLv+DeYcpQSsiESkm7BN+K2S+PzuJGnaVMjbQpECr8KWnP78lmjwvu28WpCUcH+KBknaijRq9CYKUCD+KFQUO54S5Rd9F2Jq/jG/dPvHhusK4JpO0WZNth8MEk2lRd5Usu901hdjLy/EG45nTvC4StlFpxmyWsGRR3k1ajYPY4MTZtC0Nd0ngY3vws8312bfDrajDX2eZG5Uop6B19s6SrFd44HHBXqAdW4fFheXfLv57dZHucxnVLqu4uMscNfdTx4bw0/rX6y8Ed5hkBJB6sHkXsw2ESQ8TbbapFpzC7aAViJBBbW/zRW0lAryr6+pYX8VotvRU4SuK/nDyO4O8oi4cyLuNhSMR4uT9xolsM65QN2bID0H2siYZ4gMQuMEUd6QUh0VGu5sTGopu5e6ja95awqVpKGn/qvWJOnz1CNHuIRtJy/8GCwrsbPTFqOi1Xkr076/6IHuqqX3rLd0DnwcKsOJx+S/6rexQYRE/CkRnyeIXpNzzc3kxPTbMDO+CpzBqmXu4hxoDtufdNpQGBP0Ue0a5TrpaIfYywW1tSumx+63SrfYiAqoHxzFDk2s9xoEiWZ27Ql1sqJrSAT5QGT+shkE7Om2vo2F8IpG4d9mGNxYxGmNd6c4p7a1zththFc12ukphHWBPNEgC3b7Unr2L79bSjWewA3Cc5jJAThbrXsoOK26npi23680QuqLQ8co7o1igyBCnFh5OsyO7oXM0fto1Dkjyl2ZU++6Ytg5y/ShUufkxI8bMS4xqXrfTeyKJIpRytYp3OssoTTJr1GZVX3pTS3rVN5YLECWrxw49oiEqs5xaf4flhrE51jebrTd4RkLD6jndOO0jOduicoUAIFYtG4O0cfVSw9QJsr9IALJsh0V3u1CER6Bi+ho+QVuAuJOzxQei184QBVcTN/gJceCbYJbn7u41vZ4YwAFLw00OCQj0rjm3WJQgGJBCxNzJPtHhE65f2ADHyJtEnUKjid5YbGHDEHKlNbzm152D02/5lFxs5dyNGGvLatzeywh96mq8nOVKsCoWKFIA2HYeR/uF1tGMQFRwiB7RcKfmmAGPrNEHC/LW3xjJ5JbFvFhktHvzrL64OtUZYaBSsVPXeOfiuC02AglqmN4UT8+WGHOF0ZZgVggqhxGdVAXi4M4+Xsirl7eqLCInJ9oh2K4IHmt9i1ye5yNtnQq0S6RITEbWrgFSRPdRkgme0+deVcfNxcUgOq+KcJnNWRqCNTFQ2iQo5YoF+8Zrc9Nhmoa5YoS7FLOFjJNsj+IlxkXVqSRFR0fCE8ORLVPxXGXISIQgTTWG9tSQGXDnagUG5WOSdGSmOHmB/bmQJSF2JBY9woY6oDlyZEKVrEAa66+bzquXLRnxgg5UiiUsQUhPXxvWKo6Lft2GonqWkbPY1SArgImFxbRehMTdaT708vkv0JecC16oC256UEWZTaS085DEbHxgabL0tFkXBhbRkONPFrhaHX6NAo3AhzuvI4OxxRxxJFNT7beOSwiqCRMxoar1jPI2Tz69cfrT5Wq6uPBsfgfVHxbfBKwt9zWorVxZ1f6kj7WNYi2iUaz86sTnh6tBHFnuNZjuif9y+nQ24sGxH6tMsl6nXyFefi9+9RR68583c3P4sORKI51M9P8ssdWWk6q4t6VWSfAvjxb6mMdWlM7YMUQvDyKMZe1tqSplQMDNgjpgFkTaSP1xbSF0x0vb142qQnEOgz5p0373ftBf4RCAbSiP/QW7n24COnxSsYa8Pvg2y8ZQEMcSHlC1b/xkuQeo2MSjmU+TldyMaNY6svhxK40hv8NgXp1ABqaUgC929Lg40N5FmZ6Bo5i1DV7xsrL5x69mY0RRmVWy4izNxO1VZMzcszJh9RMkJXfd13BMuydtCngeRKvdB5bxyG1oMbA4Ib9H8ga2B9ib02bC0OiJZWWeG3CQscU1LvfTdqAT4pL99bCAy3YJWt6IWaFUPtiUrlFww3AKWuTOIk+6Ugruhwb3X8LsDdIOmmWYmgUw2qbRwF2l5pC1qx0UJVoDje+9oTPCtGP3+fnxvXgbmfTYaM88NCN7HqyjJybxBuL+dpSpB4pAjBDH1zW6ex+9J0/z4a4Y9439aYKNEVhLw7k/kdhDy85h4AdIppfzaiaK5e3i0nDM/BybnduLR4fe9aGbeowML0ZhPcYy31/OQk4bnaF0to6EyyA/zVXZMN8XrqJBsWUWiJNyWK43TFliMJ4x16mXRGxCpkjcYtZxUm4HRtaF3uSxo3gpxrDZo7rBQmCfPrpOg/XEcELM42boN3mF0hDKYxjT73cDbkNMfenAKA2LY3tpYt0ggYVPAc/UnCozWdicr8ciDyiimwGr4NJAhoHZDHL1mhNiILT1BAh0d6jxQHul1eHwIMuCF/5nfoSsrq4MqnxBA5x7uIxOeelSn4PFnLiI0G6SGAeOr1FLbKBv5faxJeJi/DX2zXfh90XooFhdEpIhCkhPYKUYtu26I2AVKc0Dmhizpot0IJR/GCGOUg9x9Qy04Lcym8fCqAyLB/FX0/ezJHDayGWjqfL5HvFqgIeGlfLSIbIZxIWR2DjQOmc2A7aDS6EnYdkMKEYPhN/tjFIdIAZ60v0qwPvcQ3I5chTKj7Kl6GCTULu4lIRDM6HrTKlR3fw5mrdpTszknwEtleel+3GawsK1gq75sBLinVrF+pih+CCCx2TodNe0rG2UFkNpS11wBq1xC2gIMvdjYEkcdh+JCl2k4V5gJWGpR5WfUeBpEltI46quG/1ihhmXX1+hAl/hvXaU9O8AVqanAipj1QueeDib6NfWkhdB2R9gzLmYtmeZw9ZcJuMpu/bppmzYOzyFzKNDrVGiwQeigRgzlX/uaAzSoWq0RxQH/gX4G7/1lstLlZ/B87jk9VqLuXohPJGctTExUJcQu0SeVL77olyidNvLTDtkZScd2Vr9aRkdN0Y0jD2cLmazNXRC46Aw4ITeAK2B9RtNiZrG3FYWmqrqlCWvOLWRESZI0I3KFDeK57TGuZ5FLawuCEEQHLFteH9oqhr3qr9bto1HP7oaaZ+1ZTGX5guKnC9M9fCOu+A78JdMEamrPyelrB/k9PduE4weSYECTkZ5HpYLDMXKjFa0RB6BFgyKzj5fDWgO6zczLmlF/8mcko1nsB0o5QCLl9PpAOX4KM7r7K8rC9gB2Y0+Zs7d/Dksg2bXKdHdz8480HiW5DmSsZTqauHCGvQiy1NgaFe8gzm5034D0mVJEek6R1Mm5Jkr+gk/5CaagNk6NmANIZFFENA1XuSwMphZniArGayZ65y8H2zBr28fUqwXKLe3OfcHsgiS7UQaw3ABZKbmMM/pgoO0yhc2fR+tP+Ar+tOyo357DseUrhmmYy6am0ABw02ErOlYio95SPDBMs+t0riZddvn4zamMuyP7ELu7rQV9HcXRxV+D3zY2ChWUErkqJO1BpFDouA3AhYBOveu+/cYuGgGa4Zga0HUwBfgaGlYjsH/8/+t1v4WfgwYWjAJhlQEt0MU5PJrEeHW/J1jTm/oobxckrk5L6xV0KQ0Ah70SDhUg930pRWrhxQRACR9NrqgC3XcsoXU5gIXmzrKyeCb7GqKMckakLyuFxrXFQ47jO0KTxke5CcKCNwLuBGRrZLAEOtWdWsOl12eVt+lFZO7tc9pOgUiA9C59sY/KRksPcmnHz4lrXlOyLwAHyGgtih31dQbJ4ZkvptqIH0FDfmdG4CLGM6BJM8cKDN+8XwQb3Xty4vWG2kwkqIEc3aoTaN4IoFgWeoueuKbygv8pEOG9HTkQsUVkoXNTclVloZuG/SbPekKaM1Ix7GJXGYeznV6nbbmEwoYo/ot3waKxE5rw/gHG99BpDabavBm4TE6k7vKGbSZA63725GhmQJic+NBd87x6RpwlqEqGIRWJ+atUEDdICVLBR2QzLkDFETYdcNacOFtBjrLu81JWVt3IXoZaMQgFCdsVhLqA0xd8rh3Xx6oBsRJUgSKzylYktcxGCL8V8roEa+OF9fH7mXukEXe6uBgjPub+hsPtNGj4Pk17KAyeAqPkFCgaAuK7io+dmIhjQgvNWLDRzHm6m//Xdk628PfI3jJbXAEs78r+eA/wRzJ9e9CM5Tt35VHtuFrdWv+dxJGPW2pbf8BYaCrcDfmuUOPyujShO5EsKriRISJmOkMt3/B6NlwbyRfpvv/YY1ngzfKPob8UDE0DpVDYeh5aJl5u7PD0GHIhv4Mceiaae7EF/lIph/qfFSHgvf+Tt/g7zCAZZybLCgUrfNI0Gm32Haijw4uKEegrQoFNqLhnWA1g5sCneIiQq0s+YDcHdoqE5GZCv2zkJ1N95unrK6+zxPIYUYbFdO/fEZvFcmjBK7fJuFuU/CMudHk5TjnkCWrs1+HR0OetdiOxKSmTS+CNwao8cvBaMlTY1mIT2FSKcN9wlRK+hMfWrPO7KqVwuVgWxKVIWe+awHGbC2KBt72ClV8oatXMKizR3uQ8HAkykM4sF5ujWNCK4m5BQTwmHXOLFDflLoxq2TF4mE25zhZ6UHMfeEgEcO2lye+B2H7JZKAjju1M8BLtLCMKfgb22+wS6vHUFlGGedcpiL8ftsaJw+F+8NoPV9XHq9Tz8Le0mRZypaw2R/Wz0puErrHTdno6PFrAj0OBnwD4IICHClxj10Ks6bRpOwDr+k5HYqv1xBRc4ORd1WwkqPEVdJ5qU6s0wqhI/QaLT1u7sBDUDHMwnPtS2lph/F8et5u6kxXswrwBZZrhsIhq0nw2ycm1SXh3lB4uMxjYWvrNY0oLULG3Uwa7vdTe8OSBZXEOJOOlXwZpnZCmAQpXZSEeZ/lsft9emjHXqItc06QQuFoJPhqgSn28seOLnhrDskEo8arqSh6uYaYGskwbTgGVQ+bgUAzA581pFPx1DEpThfiDfcmy+ESAJyOKjrMIgTXohziCRadIwkwpeQTAR6qEhKoMVrAK5jkQM/93iG6tiZGDYejjDwpMG8cV1PW5Z9dxhB/tw2gEvLOKXu259JE1abOUy3ruYDcm1FUl6zFFQtH59WI53rD35+xGXfeXbGJM4TvAscLHxDzTsdmm4HpKNAs6RW/BQX3fYCb1EODeEeED1ZMwo2plvVcUSfEnwxf7j6DPB4yKXfOpXOOn2gNoj1+vR6aY1YeBuXLiOODoNxJqBso7XAyqXSnt+ktgBkShB4DRYfX8XNzlxPp2zrlQPN3YLUEBeuXGYkFcU9vZnldcI1veE8RE4THMhpF73toV9L9TWHwgj3LohlS9GQ2CtazV/cmAYo2/rdjP75lFO0Kx+md7/JyTpHsFhJCGncGoWdGhkOllCZ5mLs5W1ytKpfNy9g0PaATAhRu4hXzorMSEdmxzi+hDe+QuCPRW+SIEap8b2UvP+NsiiAvVUjcV3HlLKWzvQIuFDoLH1PpcdP3qJ/99bIxzzFXFDHRrQeyVUURf/W4SEkfupd/pRgwAKgcRAq/WkJjauLmpaLcveUbP/jrfPaMbCOrNZ1URCA930TGuSYvB4qXc9rH+yFtZRh6xrF5FdW331CiERTUhDmEgvFAWDYSYuo/C+Lou752Fmwx3wyzRqQejHEd6MscPQnRaYdpqzJjjrajIYYFzCrcEHw1C7aLkoqromZH7fmhXFcYY0kXGLhhXoxJwVocMzOD5hL0oahi5Dw164wt68STHDwx3sAWRk6OFBgErRiuvPNSjk1y0qHKXqoPHc5mralPZHQIlybKrRCbLko7GWHOjR8okkVWTfxF9MoZIRcJFSbxwJC6lqRNiEmrkMsOys1gYLEw0EnJOSlkZhajGsR8JVtGpZA8mSwOWyrPyX7NXigrQ0MxCniw5dbQDcTBjKLZBBDpcUOCkAb/iKXBl01eRqJ9v8hi4wTrEl0QeQ4ujeC27Ye+VRX1XaJJ5Vw02azmsVII3AFvs30fM5ofUa56SL2e0oh6HvPkqOqbvMgdfvxVPUn9DD6pgvxujqFBdhCB3eO+aQ5qquIqiE309lckE1ws+stBid86NP1DlJB7YpH6BA6i6Y4rWaZuKgm7nj59tp1BXer8mmLy9aSAIjuPMzEjChbsRCr8Zooz85/n2Z94dRQYle0IOrYNnTCUXleMNMrnSeXhsWV6aNqFVAaAUNDBbOlzf0mlbsQT10+bqcWtf5nWP5DYF7cmVK5XkzzWEfK53ndCGVbr9u1NcafygccL+QGSTPQI3CR3iUX1BTayBhCYqybUZqHWLgCOt/MuCC3BgL2Fb/tuaGfX+MNfZzlcNLwgD6e0XikrQEzcb9aiZDouUtj1alrsbTG1/J96lh32KyN0y5LOKtU1fkvFJg9dvP5B7INvNYYTuaHXYLWz6WzrbkHJubrOOrrOX1xDxVErp123A43IJbccZyIIq+3P5dPlPXSdYlJXDMCvN68XDevjtyv2rr8IkNnQcF8Xs4YkZskP+o2vcMEXJ2861nzV5HuhgpJ7FckTDrEjaQub+gOUdN4hFCemDxWWttig5F19T5TwcTrXOxmhpkRMzZiRRpthH0AaPPtCj+wtU0MZyc5Vh7Z4vo8PoOdsALakmrI++GOe19o0vGyUzqDlWI891iFRuEJHaTZ8nJcMWiPN4CUjQxpcldfrB2LUicitliRGNaM0r/QaB1MnvLE2YVLn4cagI0YDcS5c3PSGosC8iffjz94LO5HbWVI9vL6qWTvN2mmrY211rEWrFq3a6UQ7nWivU+11Kt0V8AdDcGxf+wvdPcGKLIib0DK9qbbRwJvxybsLJCnJSe5KpvCXPV7SuXzDsnPOJtF3gafxP3IKPJwsDEPh/H6hs9APDhrei2qBnTrz7d9JL+l8Er2JPp82MUyZiY85brg3Tc8n2w0nv6jPN6H9Nhdl0P5oL0O/BB5kdMbNHfugg4eNLLfzJkiCi2VmzRBJvPGFfzo5VJ0Qf8MIPIRMvgnCNxdTiIlBzmSeoyiVnymzImJ0/myI1DOywRFnhp2/hRBuR7musYHcyiOsXBiUSIFpKKdp2fQUIVfelEcFjYX3pxPvvrdjEqD4yAdU3lF9gR6daXgB01rG1DUrx7n9m4+t5fcyazltZnNGLb+z0miQCWjbGIvJ8MNyRhUX5P9Md+9F9sqlECFdAbglahO7B9LLJClzuiTSE+cLG9zavLPt3s+J+O2fhT8wNsmfYtRx8b+Nmfd/ddXQM6ILFyAkYUIQJiEk9uczaAW1tNuVXnSavx5BFo3Zehc6TohxyK6gg0Ra2FdnpI5A4pejdWlxFLAJT3yObC1C+4VnT54Hdzv4CkMg6Q3GxhdZG7VKM2uV05/Oh29TFgArZfi0ZNxm7AxfKZxSXj95c0qDREffEWx6ZhhCYQ+B+rdp02h+qosC5mHoIZRnSIJtqt/bdODC5yxOHTC2eJFRxrHK7C92VWvwHu1LyfHb+/mQJoookmYQj5RnbFOz2wZZ3IpylssailXX2UrAxoDAWgqE1M3VtiHwQyG46aoO+JwArrDQQ2AAq7+2Z/XrVdV562BkXPAFBRbf5uh0KgLcgV8ayKdBpAfa8je4yKyUDpXv2Xk8skfy4eYdgjwXCijC1/Ep+BJ+1DktlUp6lLeIzXV76njWrZGIX+oPG/IXjsp7RPb2+O+cI3+3NRi8C9JoP01NJ78tDF3tcMEJjg8HM6Z+3j/e4VzRjRorp3f17iPGMsG2YPkq0EFt1zs0hgmK3u0ZRekw02CqhZV50wBcMhvg9uTp/pdRdhWiinkkDI2iOgrsqxdWLZOaDzBSWeZ1ikduAYVXCXTe67jd37q+Rp7OsTX4X0a6E8pEt/zVTfCjg5gLIU1cg7g7SfD7J1Xs8lRpSoYL6Q1MkxBS8SCcriuMk2F3GVVOZgml0PFgfa20yKgTNZVe3t4oci5uJF4+qU7nX0b9lRmLxkgxeajxcDUNFM1SGs0N46Lm0RYwMgjzv2xHgCG/9jtfnutYFpyhE1y/nFM8jIHl7s03ok1lQ1DoD+4Mjs4dR4gD3VTE2mQEBZxSAolHngyYhh6WbzSi3LP1siule+heMR5nqnj3ARmUpW8OxwsAjkNg8kEjKz9xovm+8iNP+oWbe0wNgf1Cm6nb0DTginZmyz0ksDW2V/n1vr5iFS0gPA68RcMzHgtKs3i/N9LlbJodo0qCxWKV2Eo9plwsHJOb+dzKMfzZTERFGIt0s/JX5Q/qFi1xH4wua5t+f7dYD5rs5sbyawj3fuW5SiCjwwchTz62hJk92j24vv7TxR9uv0z7+5gWP+GuvtFZ6lobR/0V/zxjqvL5WNJ9CEWIR1cY1swY4ibor4NCgG7ucD4kFv/2wYdarG4MN87T5QzTY40Xa6d5LFQ9U7DFIolVAekiHZaPe724dWz/7Wycgu/FuGnYO10GP9v+5828zAu27T3WtKdAXm913mkLBhUw2WuOzdQLtYHAbGwRy4c7sixH/Da1KDMRX5KMxsB7MW5fi3HrAOviMf8EqKAUvCocjO7hrv6UimRSeNl0381Pi6ZxU02/b4Mn/RrMx7vkn6xNj6kMaafQoVctjtLh4xbegQz6DsI1qMJ0WVA6SSijVZRYgYdRFn/+4IPgqWkM2djqNqk9HHeWhrUxItjDs01jhRnMNgbeMPECi4zRYWTS5NxxRs7Ec3EGwDvs2MfEARP/nv6Gfe5M43BZBkfxgbJugOXyTbXn3REfR7R+WScMwrB8Z7eV7bS8aMvnHM773JNwMlqsMxwQ4LrsFfE5XEGixLKLF/4T/gfO8RoyvHsHL6+LXM0dP0i+wy4yl0H1hSjdJZNXMpmVoZg3bBnwnU5Hg5CBX25DWxjEQwPtXy3jpuDP2/DDaIzye3rfoZL+1C3cwQPI4Qmq+ZZ5WqyWQqQY14IfkTV4T6cgy/PbNlBDrb1Z1ES8fNO9I11s/Pxo0zVZItyo/PDnGY2WXjH+/bhAMKt26KA05VBr9cnGBd14dNE4WKBOQ/A3e+5NZdDjPOiSK8FLXaDD6Yd1rEV+WDfmLojnDz0njT+aj4LIo70sbgmquZ4Ocz0na+MBO5aZVNjhfIMb7tEzR2aH8hbbzKETkYnlDBwR2cfEI858wOGmzuNfkwxuraaFbqOTDLFc+i7dzX74HMtClnZSUw8SS2c/4Wbsq+aDSJ3hAM7ZK1U9w/tIKJXEOtuG9t2W4w1Z4B85GF0erQteyov5VHuuNpccktl1MvrkPhrkf3KNNmw5Y8YxEIIjMmhqZXcxrto91aEA9zycDXMLnVCln8YKDK9j8ARBkLDn+oWywjQ6r4XBHEPKPa0oMhuGeAp65xgUe+mKdwyxVx2oOUK1/RJ8klh8pEtQN9oIwfqCnXbKJKz3k7nhLIk6MgcViDQmYoiFxTyRSi3PZ+ZFNjbGkMZEDDHGGOIohgEYYogxxgQiClVpW1pyWhFvVyHerkK8Q4R4A3KPk+TW97bJkxvIxftiKeMrj7kTWyxNF34iyvpuUOMfCDzmAwNKy9Aq//J/H7ZhHFDQATudEPGjLh7V8PgLD+66SFCc6YcbjzvsqDt/exaWphc8XQU37bD93pZnpB+HM3gdxx5eSSP5Bytj1G3Dc1Im6fU90vQX7FFU3i54jTXbGPiMM4dZ6GD28ExETkgsUdhDeR/3jPrg5ZabQfwIaokxdUc9g+XyYx0fvx7xN2afLh47Mg6JRWxpGlVtcYWH9VwzgnJK2IcGPUSJYl6FCTW4jdc/qRg/vm9lNDqlgSEcUVHGO9nhWZobJLfQROwV2+z53m6eeYGysWvKGXnOaKivIbfa3Z5u4KZpOPfryWeaMnckMGudqDzt4nBPEKnC3yYMOajT/0KkY9y2RkIp8zOEw+QZ27zOGRWlqodl61oyVscEOafSCKF74LPasL0yl4aChqFHQjTLvSRNHX2cjFh5cXvechXQbb2MkEJ2TvOyR1QfYc/irrGPtrNjNrtq9OduA+vbpxvTaxTlx4R7VGwv3F32iCLb0zYt9TQpiPYMkfFYGdQsmdEaxjJbk9v4y4hf/HObWYflik+LlAtJDznLjssLlc+dlr8MvnW53DJ7MIxpwXZnIRVVQDK1FKGRJ0z90FyYqbOTmX8u64U5tqtJZIIUtojLsDzs7RHQYkJpnPqHX7bbIKQIggmMjP5APEqMipXRYRy8amsN4/UEiwZkuAANK10wyUqOdnupYkN2YOUWXaJOT2mj0Z9sluRXnVae2B2MoGG117xEmjpxRTGB6WEx3aMot7K4SMXYQu09AEdNTE+rSt1U95BnPhiqc9rlDh8QEKH2dft3wnKbYGl//ZjhHAwYvcrVwuBLPtVXfdL/wL6S+9HuEFqNR2EKNNNZxaRPhQQyd/pZQDkeC5kOeknhoqxvcHwr6y3B0oIxPzhv9FwDNqF1ILjZQ1JcelAxEwDWL8KAHZYrPi1TLiQ95HzuuLxQ+dZp+cvgocvllvnpybUxBTF0TMJvYVPMkpH48lTC7ynwUNim8slNorEzT6ZbqbSUFCjohKExMO3oEnKNdUgtwSM1JIh/IaE1390sZcWIYSoxVMWGtKqwTvWCA2xGcU6OMzKn6E3W3xkwyIiZMN6JS/cIcJlV2VUTpIkAh4A/N6k/dTfUCCoXx3pNKfxaaXtRUbs+aj/rCrXhJ2WnRfR6/z1efSytfp8+P+AVZAUb8g/T3ZbbP62fsfaGRVvr5qLz69nim6D1z8CZt0TWAUxstunsz8qL9cY6ZRJ+isXpWtKaeQ+gM6CLMSqER9slRXhgdbVSA9TGXac9rwtHcSKLOJdmxk6ptWqCsgRcrWbmFisaQDl0/MFaHGSSB1U3ROCqKZVlk7+iwXTGC3M61B7Au5G4ZhMsX/HjzZHdp7h0Gt3wimXd+z4VLPwvezHY65fpWgpt2GwbWvOsXx4p66yXGNVA4mS4aEF2e+JWFriTKfxJVcsPkG2VhK7lAsR0rOr3/I36xiCeWF0fE12zS11V5ClpLlOiCy0hCz40ZUua4VtMcrSmTsedUpvK0EMFAkPQAK9mWCjEojPidjS5WdcLdkF+AYNqFbNFtgrvQbfIQXaVtY/YF0QZcjoWvMkcS9wxrERiutLdP1Ay63y7sjyVfAdcqGiQbkovF4FD5/nQA5eGrqxwPrSf4XWZLeQeAE31ERvBKk6GrhvD0sao4fbpKZesExx11gcz11zPCLwFE0aKTaUqT9LraCnVYbPeM3VQAtJ9J0OrWfMFyEqRwWL5wz6hXShsOWBtpzVbHNjIcoeVl5C+qno0AaarTMXRUueOZwrAxyC3g50AKsA+Jb2DFfWIwdMGszT0+EIjCn6ivsJq0IX4FLPJHb064Bd0Ypxso2InXg1GWfVNZUini7jPeDBUstAKW47hA6GR/O0oFgYwU5wahHeB8SaAYr9Nw+8NUR+aHyLTKknYkALA04sZm87WyktBVTlldsWkE7WZljLOSD1pezq1pn5XZ+RunlMmCvZWi5z+XWNprkds0lPQ8RfIpBiawFbf8capPee79rjakCVWTh8WKtgNxIYtoV2dU00chNT6hCrOKQi8ZenEbUnHN3zzbTH4dSTRiGEedDx81nRC4A1uroxklFx7pEYVLY3+vPLZUluO84Sot1Ohrdz2ecTkCMQPhJGRhoWX7gxse/3Fmk6Dm1X0ztjWcBGrbcc5j3fQYjlpWraoQtxVXn3CocD7EREOrkQ1W3pSXblzpkqzkBDu0x42YLPlQqZotD1QqequPw3iYZMW3sfigvQmT7hXCI4RPbP2NK3hZVsXyLTdEv0PSzlpn5TyjI8YgQsOjkMNTJlydTmPXDwIkoiuOdPJiI/QyPNBIKK9NbJ8IBIFixwnIXW4KZWhOjJjNsoclCzKUIGzyw8T7DGD1vdv0bI7LbtPESlKorUEVyxOqgBRWsL2G2ykGrFXgcT9neu3by/cnBgh2LTFeBDuDDfRaE9XfaAFAai/PZPRATslRgxocx+PJH801RgkJM+ApdsOQ98Fmn91RFf3uUnvj1WNFEwKR758XjTMLmX5z7Wj93KypONcUfABBS2OjeYfTKVaPs7eBhAV4JUor9tBjD4eTtUd76JEIZebnGg/X2iB+2v6hSm+LlFyK7qlOgwdN4prVWkexVxHRbrHh+7bYkv++8EcUnszzzIk+7ij6jrGkHylg8jQWafyIFksoP2cxq/jQ9uz4PmvtP823VESMnQzH8n7n2z+5izpTun1fvdJubnaWRbfx5u69HKaWDelTNlNLUckLgEMU+IhIVPSEQEhn7jrPygi5AQsntiEDM5ZXpQpJY6JpCKLUl9goBQzux9GPiCipzHWUBqY8tdkXVLNgDf6X/dA2RXfrbHuoA9sxP6/nYzYPrQ+4Nx//X7gftf8/UWKwzd38WdW8u+m6w/8L7WlTVZd1GgSmMwCjRUmJn+7LhNcHUXvI+r5x+JhlfEGmvtxWI/9VUnvPJlCaqd9lP0saf8sXdmtejvNydSTLVo6cWulLzL7wGeR7nQli30FfXr0gYSl2+BGuIZfXh4qgJ1yWuRg+IABSGYK0gInJjBPf7Op0J9nKAY1h2QLzavESJQAX790GM3S6NmcrVAegw0ODahHdy8olI3mJ9KFxtBFa2goP+2tpmnqMC78i6snOU4Kfwak4Jf/RGGoMD1yvfCOj3sJVIRuMoyO/V0/XBlP+g2lV856FsdIxWxWnZfncJbWRj6brD8CFPBAHih091SCB+AMnPomOA8clb5YFdk0JdkJF7/pfOOVUAkbd1z5EaXgUnmDS4opwWfauMY8AIV1x/k6m1g/G9vU3KbU/4YSnpaOdAxgY/qNXZcZ+Idhxq7x0WuonFi7DdG43N3HbfBYHdWC75J8h9lwODHctvcSrKii4sgzcbCl3h4XNsDZO66YxxN72Ew2sI8hv8U5nK2cAgt2DIqd0vQGjahTwpGxzNj5DCv/IpJpmB/QIKeRgEFp9FAQ00uEsRLcpVymmLxE4O4Nn/gssEvk2RCz8rbCOOXXvqKUppsFig70h24QkTwjsa/JJJyEL2YKctondRt07oRBcO9jBqN6mmaB66pwZ2Z7JzwCDYDmsRnU676ucc/tCNNbWD22vBIQXk2ZwGBn48apdmL5HwBDMeHtlH04WEDX2sluRF1LvMZNjd4dE2KDRMJKFRlRhny0UJjaa/VI+yRiOSbwTCRe1eUxKNLlQLuCZfvfKLai4Ji0jACE7QF7A3oKla0Se5FHthylGYLEJDdWlsPEAA4hLrPVL+0K4ie4D0gwef2qUkaAn1nzHZufVf6KjeHxU5jNiiehdr+kgxtqivJ5ikTROu6NP/+EycJg7dWE4yki/9a0dHwCVeIntabwJ+xZkqUtAVovnaUHdkgb5uzSgwNWl9u7Q4lqkU76J6dz8LYGv/cdUSVcFNcuqRZmUTv/YSKrCOUjIBmfavpicFzmCdBaFLeqCRzHDF7hFL5D+UEnimqEFggoAlJAEFBEIqBRXf/T50JBFaJia9abBgWcA5rHTRef6L2k0GTXky12mj78CqLgv/Sy80VGPml0yfL8wQl4gvLQQdzd3vw0ywqOaXH38HEDMGa0hVRU/k/VzeEleH1zkMSd1hIsGJml+9aAhk152ol9OlbaEW7ely3xbBruF1BIJyMqvVxSw0cG9LGrgbsRK0qCB13yy8wKuTOrd8nXWaQTmR1vBNg8lfQpLvG2rvN6CQ7Yn9PnAwp3JmfvGo7c6SR2CHSsDNoiqwTEw6uneSX+TjypmMOOLTCmAWaD2uMW6QzdJHiYmBc9fKa+t/rBwmNZDGC1OEkHFhX0M8CHOWuG/d9YP1greMbivDufo38kb4eRwmya2nP/d0kRFaQHfV1WgcgbWt5DJHFQWwqjjdhtI0pSiPF6Ygyu1cyYYg2yLyjKdogIrGzt0PVlMusQyXhN8E7iko9eHqP/l8ZKZQ34OiLZDfOny/+YqOtGxnfF6+NMNOBDdPsEtcW8cKjhuDLOHZLjN2eEKhNAh8RDQ7N13uBQ7fGry8wKjYK+v7E/sxcZthxaMGfsKBqztseLOajGt+8cE2d3HveuFx4BailIE+gFDGC79tQGAENoLWebULKti7IVuh26Eht0mIDkFmEbzUj6zEnK/0pHmQedlNqRXEuFyiIkfCwc6kjDze/HaFGJN1SUuhlaBonhUG3Q/DPw/bSScLdHgb41AZ4PZApfQq3X5JjCgSJuHwkNpuXAlNTaF1HhTQb62haYNY4JzjbejV1rVv0v/dHvYUw+lA5zVajrxYHNaLUo0KoR4Lme9XjazzWXy/A1f1Al6Vkcjype9nFAAARynoIV6fpk8eoVKT8gY1aOkpdYtwaiS/XVeNhFLGpo6o4Hd+TbfnTtmqihC7zpccydO6egeC0D6t+vjOgd8DsFNYahXrN1S2mcB4x4YElr8mUvcq5urJT/B0jC/jw6Nx5KQ852phMSSt9aYReEdqvgngsIpr7WkHLrnQZtFCM7wRIjgudtBN8x/tTcuXpKC4LRhxVxgFqeXHCRpMhUuKyw3P8qcliilPf5UOuWyo9REp1uM0GM13M6AEZYVlkqGXWRvu7JfhQwJRzDk/fcNaL9zjpuCyJcu4Y7210runak1ppkaOS7sofZlbvIQFPtJR5MQQGDFcQHNUDWRDGkMUlrA7z8n0s94ierIiNw+hm4IPCZuhj/OyITYBF3MFfVwZEsnY/sgVnbix3QiwF5xnY0sOnIcR04PCeRo9Qh+7H3S/gzxTKiHygEDXqrhdMMIBmK5VNpCPQNa/zyQBWg6CpROBdtRoJ406R/ak4dloRA0cUSuM7HA6Eyg/8hUP9yZVzPzaHkdWdpx4UET+gB3W3HjXSAiQWc9/h5NasKQauQBghvGmdu5mZjwNl45FonoQIDakZfmlZ0gvbT7c8Gks5e4mpzk1yAwkPmh3eDf9qA5aF7P1gBS1ZJCWAGm+TgkekUYAyLlkZ77ND6Cc4vFOc6fSqBkMAKIhPLuAR71ogLtS9QmpBps/JG5b+FsGJhkDQhFAO5cDH0DD+Sy2gFVE5AZZ/pOHr4HRtax445Ghpnub8pBATjF0FNtwIlhIwYgJrZv1vYC+yd9LV7FHkVhwjZued4NiDa25MnFrAM7TlQOoghhDVdfAHQIvMG1+9lMvfZ4OZczvRRpDza/SKUsEAPUmxbpJeAWOwsnXs8mGcG9blxv+r53xitc9u3DhqL0qiuGKQUZRouQSRYYiHsgOMkh0qUUM5ePwM7TLxPo97pwRdGHk0pgVrdYB+Vib/EnvTuyy6oK89RzFJvK9FJGM1LQjRuluwoa5TZbAMDTnPystENTbp8KdtibAvBg0jWN7o73cyRxTbmalFtNasrRKE9O/nddyvwmgy6BKEPKfbQW34TxMZpDJwP5j/HzjrwmpyYmxSXik2Na72wNWonBApNbIW5dwvGheCme7TUfYM7zhfxbagxeTwWA6+xOAd87xkJV3FLQFQlRopB7QowLCO6b/otjqANfElECixmY5tVkH2fHt8DPeQwo05C0PVjH6BDclvmH2HFqMpR1HsWBPZgU44XThIZ3H6E/O4oFXomAA+4V6M96QfW9vGf5HRT62awiKxNf96IgT75UGW/pWgPw3HWC1BUfhQ4QlLhdtg5PxE4LHrR2BlCaNHayM3zchutZXQj4goWVlyvhRELmexcvydNeO7CCiEOJ5LAEltsFiIRvmUi7zcRNRi5SkDcD5dTfOOkc1YF+BY4zZK8PozJc1rEOpYKWXgfKt4UNplK5ug4N1ZVkuIdbPTTpkh7nzSwcbiyL6t+1o7McV6zg0N4oqR69tIE89D8khq8ruZUDKCnhW6gS6NBE6Z9djXbxngfmHyv84nhOwUxC2sxlo5PcKXklIBP4Wggs7SV+SDi9ULi/+M21J/QMWMEzxwuqoJ7I2KLnMT60A+Bxu39t/TXV5SRdEfkDSx7GSM58oRvgXG5Es3SaztnFT/lyujbigLConA603yBl18SzFztoG5FqlE/+pwjQfEiihGGchvsoZLVnvvZ5XUZdY9KKS6iekumUzPJn0XLrg7UYsYigUuGGOB6EdroqukbMZSmmWBz/0bVqRjze0WyHfozUxSTvQS7ExLDcwOWev6MKQ49bXJN+cS872w1iEiqT3OsHcU5iMJtg9yvM6jBhTVuSQIpZ3OMQrvrqjLpaJuP2WDT1Fd2AsLPFIue2inCgCWxzlIJKjt6PlV1hSeD9/7yQyFY7Cl2gZDPsP6iT1bEQueP7kAhoRoXWFnjO0C5ts/cDMbGFwRZhZqcxkHhqik8jVxDEN2crZ3BKJeRhbLyTAvifYGYx+WMWbDK9cxplvNfRmXOSjIU21dxpAij0Kf87wo3VgXjziAo3iBzRfDMiGHdB/jPvOQyL+XyQKMOLAeHovi1NuFDYU0a02sqwdHYZTLAW/2bzKOCpnfOLBt7SDASEjGQUgo7zQOh5qyxjXCQ5fUbCDClhGOJAHBM7DSlka4rAkFFOBZG3jI8x21dJxiwclSakgrccFbt0iv80yqI8BZlcnzJvDWelY41AkrVMFHYR6lbMGt8DJJIV3k7NSWLC+EVnfKU0VPUUTYKSGo6JcCwz8QfbrxbhDBhK14iCN4yYO223ht/POvyNzEZUIoXYuZL8QaR4tQ4JHb8QFQCAF6kcirSKL7K0/Lv7zbtvGrJw1Rgb1FykuRM6oxdDtuzFY4qYG/+SnuFW5AcISbXKchA680wWGGtBdzHRwWm+p/pgGazPpLiW+U0ynGJkjRwJwsZk1VpOh7goghxfZdovFeyLgxoZcR9pSiyERx8bjf6glxhdWIhgXHBZn4bi0AUEKm8ywbstNNyUh7VWhAQcBUrzvdtGkHr8no3t5dWYqVOgrm3+DlVHKYyPI63/UR6b+mjXNMaFx2A2vg4nznEhL5yD/BlkiEMq29nhc/uPrl17hPbym8iq1rjwgBtj+/dABRAR5DlYfmIojyPUvqHM6P36zkNy/WJnoAV/Qnw9ZUP6GYQcYD8ut0yguiOoPhsDuXfC0eisTolFT6pjaP8RF1vajvjKopPgCRPL9gYBwpRuWgArIFozfZZ2M37MDYXZA3wRBT3d0HS4A6pZOiu70DuQ/Eui08jS7Ufqw0gjC058UdjjqcByuUR1qnULCEc4zrPRzb8MrRhiprnxOKH17K9mP8bDP4WGp3f1/zLCICenSfY5B4p4zbEWhAufDCBHCiwgb697QWgo7o3H0ypz2hpulkUX/24pp1bYLEvMJUSBBjAZPmrMsiIxBShXQ3CLtIbI0q5GB/8+NofQ5rmwQAmjz6BATqvCd6Zk8g/xMvklbU3/4b+cKqmAcT3dqPpbmZ+0HjtUJJMhg6NSOpSoUhdHSLkwp//8k2HPLVrbTb1BpFSi52jYrVsi0QILkKXxjS9RIZJe/4AcKTK+m6TRVdpPrj+EBxbkyrel/M1mIVgUZFYCC3meSDWpK7H+DEPr9X+3QptwC/VbiMRbaH69XtK2S8AkrxgwYYqPCr4ylr/wpGof1ehDnMovYpNPy+wC62a2rThj5+DQSVwyUGm8fSRITy3jnv801znYFgc5PH6ROtX7DfJxwOUBgk2xb81viwv+Gh548LFYMkKmIAxrxYN+IWGQvqCc0fqJw10snAZ295cTUOFesFybO2y+quOwWNttl46nesrRetsUOvUeqY4WsIg3/d31z2A2i1N4C/4jxGRpyM/1rb++FyKAkmhdi1BGm8qz8Xmz/+WqUkCmeXAglP7S/q3pn9YCiYY0G3aI+rEmt2UXC+mbbezp2WWSObbVfa3MTb1f9JM8rqcU4rZLDKd5JSjdX5cnGq4acASJRQexegUGBtGV9Y5HSSQkV+N8mSmQNDx8zBAFeCHe9omT3zjl/xnw6+4ua+W3770/mf9gVDu9mmexVSPQdnyS5OU31ozyKsEBDhiHei+5MY4uamAqReMlN5ALuxVw3yQsAxMOdd8Mt0gPeAt5khGEvQfXcJpvEOGpnUWpsosUDqsW8FKWpsiXNNT+KJNysBiw/JzvVWeJfX+UTEf5lD2iv6r8CiPnMJL+OeQQPJRGTC8k0w9yhtnHDcec4qXvXg/lzDN3d4PCfvt6xYMuTC27z4nuNWtfeMCfLSwmLLrmivOt79uZwzfuZo5s9wcmiwArX7aHcLun8SR0fDqjRyCmHWNq8UWIqOzxnwi/8HWK3exlUnyPXsi5GjHXKTxDAr4N54+iih3pR/i5gXbBAjCJZBoE1J8RacYfHHJgu5O55KF2pPyF+Wem3aYGtnDcY0ej4ab0oeDYXetfKd2duzdHbbzpHE17xT7eeIryB5+mz0/kCqGafuDrADvNcuSLx1B0E/43bPQCRYw/Us8oEAfSuw1LtEf2qUrUsq3z4OIbTIiQZcvsLm3mpSMLamsIEFdMEKwh3A8izSw5gVKPJv9OG2BcnNrR6xXF7T1dQiPUlHIiVmcs7M0KZWzyC/4kkbUfH1oReEcsRRORqKYJGSWXDg/Kooylof3pxmdnHM9ig4N/87xbYjvaYXosAZqehs3Jdruj4ZcIINzxKBjV580yYQGUuy/aNfYU5UVmhYwreQRru0N8xC1Rly7WenSEQnDey2XYa8CITcQJE+fuMKnOQt6xzU654AvT6+6/gwYlABBMNoJsIXq1P0NLM+y3v4cpy+wmxwXsgtrRxcuB8ucg/3bQUfmuVPE/riVdiXd8DkMaX/+ITsd5P1m6/1xTWHhaAhJLGWJtx9jBIf+yQdBTmMkcVzme/yXZUgjcYgaESPUXeCe7aOJ9uyWPGr8sZ3Nt1/O2AFH+loWUvT+KzDPnMyTky8TMjTv250z1G2G/67Ym+qwJ//Qkpsfzb+jDMbH4BCYzyWDVmrspsQfMP4gXkg0gG/xtdXcT5SsoMNLfO4wp1dNyTQU9vM90dZw9nMREWan057gCvgsP+Q4FVkW7rZK1gtCyeY5DjKAL5SVQFAurJAMVHBTJSbu4L1BmHXme8sb/nXceNX5ujRvqeVtOsjA3bQscs3OGWnlGG27jJL4t6GXwBa4+/MRjifCjf/GL9fWOM7ZDqNCJXob151I1MqGECGYvBa+dUYEy2ToPTvU1kMeNjb3qhcUdNb4pEiHldqI373pZ4kNmzF2Ac9N5XP2OLDSMpU5JTd3xagtgc9tHiUdyEiJprH0eCPcmm1F188+/ivpnw+JqlQoHJfa2ttC4zLCfF70jHItW4jeLNIN1lmNrHDwFalHbyjLx4eZeuL8Ie8fqW7++cruCVB4W2CDFY07NHwIaZnws0a2CiRB/hQzN8LpJohtFPYeImojNY5EoCC+kGc+XE2H+Ni7+xHrssnC3Fm3JsrdTVhVIZkF03CLJ/QBsAptQHCe8zLDxIwLK1sfniSfbYS+Ad9RoBNJjehPfr9mWiFKlZQX0GBM9RMflCxe8y/RIIQLVgX1QaE5zToE1UbuJzYUtj3wggkdwBl1Z3YZUhpp0sNBZZrRoNMzJTlucYkfxaXPoeL5LzTwjn0EP0MvdTApDfQroDNuJsDFPT7Duf4Vt3a/XSaNjIrWCnG/rBNQBtmybQrYNPXBbjSN5BCcsU4Q1JWO4nhYqGvDM/VRElUqdFu02fW10welbS2ljurO7Zijgy0m5J7tEVawvT63M90RKRqXySm46jo7PdRQbTe3ePFmVguKb28ZEFAzQIF1CVUEgSJXGIQ55PhLMNViyu4H69rc6lDY5rRmQqYf2iqLc28gZW6aPIiR+RcfpWHMC/lX0X/8lv/llQ8sLJr3AM1mX5W756kQjmIsClk4sSwDTZphCDlClUnAVXxh2cix2PcX3ZSEvLLyyoI7xOzm5NzuZF0tNqj5RWvnjOo5VdLCwO8SbRMUmjXHyi/FGosYIYUhRG2WqlWFkKg52bJon9ivbfVOccfmzKuqDLFk6aiJAcbam9rTti+7SiLpcflFsoW/nadkr96UtllEmp3t1VedfqlWmGFsHi0M4WkD2rzVF/dK2ZduuSphR2YCBqcr5PW0XoRF+XMdOi5WfbAV7AMRHYg1bBpLYVIYthbe4A8pKjfooWlWh/Hp0Q4K3z6G6wh/SGIWLjJbINnzNdsbmJwEoE6rX9rbDfMKZQSiZ79Vq3V8kVUm0d0JHIcMavc+YlQ2Nv3ScySb7T1XurLqZezjyNzuh4NCqEqPmaAebwkN8rDCbtl3BsDpeeGPtgqEmDvDuqXtv3bc8SyMLnVvquQjA412O2WstCcBpDsCfdxOiosmAluyu3B7ltxhRVKRq32YjiOShxE2/xygqUvD7I8DCfduNxKmFTaXD+76gPjDtwlU8r4c4QKES7n7xsn+j7s8Mk59+0/SYD0mdWddRyOwJvlpwpGJbBkcd8zwcYsc/vcXWxg4bmdbwx2Fzpr0tnXx0s5lzVt3eXJXd9Z33G30/9yBL+7Mb5GIoauX31VNKGMy2Nog34U6lCkxOhZsifLLu0H/zpk03Kfitn97NKxB7833q+CtWJIQuLu+XAMtcbOF43bi6W+qa62Ld469N7hxeaHM3TmZg4LctEJ2YRRpbOWPf8Tcn6KtW8jVGWiwt5YPu3NaDi20xztu9ii3212k3P428OutLnrTgISbmhFQcWI7KFErjS05Ks51CCRU8kjqZZ6Fz0TEaNEw8Z/PpPYv9zpL7+QmigLQU5aGyklwCKqSjEwrpp84rddT4wDeMZtD6chxYm+8Zyea/wCEpQJrnKTtFyJ6CV2wlRVsaGWfMB2xH/E2hag7GzseIMZO7T6X8HcBpULuektFCsa+qKGx57Fc1d6zfVWE8q5o0YdHIbdriSLZzN7DZG1rvy2QX8JiOUMnTSnfTkWFCe2g0fJw4o7+CSdoSmA5vaZdvEUa9wBmycIHCXpMX2yD8j7NG87PiLiLKEudAaBjHZRY2bCCqSr6+NhyZCK5SZDZqA35TOyG+CGF6HsaNUM162k4nFNXs6n7MUacMld31nncK+KYZgcvw0b6BQZWvqD5qkhJ0rsoSnmpz0IUj3G07AsSxTc4DjhWZyM0zh1bPp6mUaZejjF4SlV31nfo/DTQpo/DNEfe5m46mxVMcI3qyR0hVYzQURgbcB343WFUxn/e5SogIjKBmU+vkT6HI0z8YuYNzWqnn6+TUIFdJEf+/LJrONiWJ+HPhDX+6rCkJ6ZbdveHPH9lFF8I+cWxv6ss2fbgckNOuwwzcxiNKcH/Tcu+J5k4dR9you9bkL9SE/JBa0P6t1zp1XT+ZR5YMPT3kJ9yJLzjxDJFG5q7pioFm2cpQMAckUB9nmZq4r8TbObj/3m2Do6cVAYU88bt/F7JKs9xllXmSamVRzbAukY14OLzgso845Iw91gDBDO9IhVgY0OGLSoeLEdEBRZJvZIn3guukeSEbgQwkzRYL4OQV6D1+cs0b4MrpsfjBBhJozAN1rp+wGdlhh9S5kCloxTrhYUyEGtCm4xelv+ED8brd1w8uEoaVp1IDQ9fnEVnD6JIlGP1rh4riA1j+rllEs/KaPjvV4pF1NBBiyv4Yj0HW1fSiwwDZWDknfTnJ6KFvJrbhm2MhCKhq+8bXNR3U3VlDgR996uNQAZDCTFXGAK6+IIxRXlk+ny0wCar1OC9KsNfQjCH5LeywRZCy05ovpa/ExpkB814UTuGAKhHsdzC/3jAz2upQ0yPm7b0b2G8LAywCzC8S1O5nnqFAG6E5jr6J+sa0suiOL0vXZiOWh8vRnhF5KOJDzdKKy3jP7CpX2Nu45G5A7GRRRUKpr6+2hwKkkRvb1G4gwZEcLm1uZfWENY5zE3c7SIrH9cq3ABKm1aGwigyD0vP/3yE4qJ1+864DqmNpBe6MTROF1qGBr/rGX8A9EtKpgT05FDqBnuzk2X5Pgi/kiXq4eCVMgnEukcmJSPXS/u4/Ol/4yceBkXBgkwwcVLSYMWkpSthdV5Rye+tzLTNMApeI6i+/tHY3phQ56gVWfGgOGZfTYMdV+cgPRFaTGuLJo0q26oqtwi34sJEAMngURS2/QlVS1HtMMoWuO4GE0VErQ5U/RCZBLy9O78pBrsAbQ5iiqALOrG8IvynEQUsGUEuNaVnu176PZPuPaQMUeO5LzVp9spICrFQsimmsXimjKA4/doNAERcCFwxQPjbSn9VwKNpg7oIkkhNAqMn7wEyGCvArQDS/ZuGnPC/K7x7YCohkyb0i2iG6Gnd5kVQG7XXxhsA9l59PXyP/72q3B9O1beFL6+HdBensHfOFHrqrb8s3KWb4xmBER2PCNXnngisL8QTqRDQJszYViilCBeso/VWA5B0XT8+XP/+dKG9e5HFf6pq5zRmmYiFP801g1wa0wGUjhUkzhla/wslPFlfGYcOvvjKYI0TZOH3hI3cYMLnncuYsC0ipv17VpIp76pQd/twq2asYVuLeLfbW/eMGds6ZPWXIektjS7zoH3febv0ScL+magmRGqgt4VBr/zTH9IHa1c2/rL1p957jy4dvXPy1uCNkZFLv10xnyW8qoZl17ZoemlS+C8C/lVQVTrS2F6/R1gTPLkFdZjMHyf4+8nylNjInWEumRLGHMccPkeboymmLobF5MVYiqZgqUSlBhI2mrLnbvpfAaVE/bnIQTiagWdPwKQ+J+rZFSVw2n/paH+IisTWhYMjtYM5OoRkzg8ohmP/RwrMz2Uao4wknsOB33+R0bH/8sE/v5BBckI+T3Lo4L984IdkS/9ny+ibiYhP9lKZZ52/slbcI/xfProfZddUjM0S8iRaKwhp40nukMyf2zQFva448sEM4sEmagk79A8P66FRalgbauBSilLt2kFdpsp1f/nAuF6RptIIQvyN4i5+XpgOEnplbEsERBhLzTzWzLYmf2oCWueS0Z5H2CBnTqmvi8UnIrvt6j3Gz3Vj1uROHG+SJ8Cg+L0ZlfKf5ED8XUF3YRWZ+Y7WvX6VMPUdd6vB8T1JB81O2AmcdFrR0ulLXcDpuBvyHl8vD9jydl3QeY3PPGitcW5SNnxrFHnAJTkk1nvnzTzFVmPX0G1D5FgAxtvpke9KOosR2J8R5R70ZeomlPAXf3MC3heWWvNdLTkYLftWdp2E8IJiY51EaZl4YrAEROpWX9PSLCkpXZ8NbPHPMEPGF3H33M8JR6iQRKGX/naRsET9y89WBFbR4MeP+LMvGw5MYYtIY3FohsPu0VqnCrXGoxWh+egLC5fcjNTqs9es+w1rS36+rZIs736kUuVjRCF5r65iDlF+DATwAjVBQDzg1xxlk451p/L8dhiZupQ8g3KQt9jkwsfdB5EUwzIYbaigjKrnGLJzAz+K4a0uSoj6CR0qKyhYGMgAgOf+mo/KMoUUQLff43qft8iAF3UXjuIHdXdgSQxzvnwnnBm9cfxTFnTegs9D8DxVRYOInoWvLeFp6SD8NY1sOn9XwLG/bZ4WpW68sXNk6rrTqPzWnwYfHKnWZXWXZRqaRON1B/Iw8+Jd1zR33iJE240klXuYFF6Dj2y+RagVadb6Rlqbv595jr1wZ0J/lqRKSrqlrXRP+Sr/pteXAa10w58bs5CLhpv316CWs7Eqb2eTpFOCuVo8A6pmnzwqFns+p2Q1NTITfpKvRo3ai3CtqldGYvTdUzwhoTIQMxZ4F7NNDLOsRLHBtJDvsA19rlO8Q8Ij5jMJEgDX20pSM42n4sS1uy4l7bONg36gKyzcuh218Gt6Lxy3d2J6NCGdRdTHk0MCQ95lKrM/8PqZFHLxw4IQWGqoozyXSY1rXNZRwf5ObiZnDfS1iHgDhXJEV2Y4d1J1JFDUbGFYuQINkVzaErf3i+M9rPBa/ZkPXX4uSnhbSTcWfH5krmBoErtuKSUj6x+TG2qd2+agXkiPch64xxe/dT5gea1zJf1BuzIwXMwYvNkNY4G6yCDwJNRHm/6t1uTZ71BJVLwmjci1YrpbuViE+XE3qiqaxgGY4KaXQtJumBybRkXWK9UR7GLrUktBjaIXi5G+XioxyuRoROLONZ8peB3qq7kN0DdjtEOPBcIT51mUfG3XWo7F0hAzAVV6ScEuSox4bv1Wl+iizFCVTwE5V3KeyI1ikwzVrGoUhqKGAkWBXzgN4efakfLuWOObtEbJ8DJGGeIfgIzLCGQ7HcKPhiuO1e4puGYGZvJkxAJRLZGu2o/cPAf5lovVME5wIR3saqJ4vNoQ2Vr1wa0PNbjXnxKbOfFESgXOn6UQ2S4rWZKc5BzLLxP6DmWbpSlGgXoLQORPr9QO8DqnnyvuDt35otfBDX+3zPJYCIyDbAQeRTtTVIB0zXxNQIA1GPwerAPEwjtoQ0UmvELGMbVFHwUSniZlZ2iSA97db2O6JRrwSR86gBavaST0lWZ4dMjSUjEyMtC7XBnOKeBscy8aHWsk+GfhLaa24cq5t6RwyMJZJHJcZKNtLdnLZd2L0HoRzM0INamKiNBy8T+2UimLSi8ThadDnijLhEmegtbmBElzw7C7QMp8D0mzXPaF55CfZtTUbO/GMxvfre3Z451tpBXobHo6QRH8oyJfCQaSqMFRJVTlqrfSerx95mQ9qxen7s9XwVtWVhwv4EbBKWzHi4zaPO/8GNG9JzqmecvQL+H9fmio7GDkuGKV91G66i7zxjgj19g+nNwtqpl/74E3w63Y3sX2gV/5+uBmbNyy9frdIt5vHaNR3oLM6Wn887sIezDaxEZFmc62YNlf09CXcv/h4w0ML1ynsS58DUVMdjM/UgDFMkM+L/TaIrL2osMN+jGCB1IldWtHu9Pt2BaMxBUgvAWzu/YzIA/sjPgUkRus51hF+2ZsCpNn+9LkAdYnt3UXtHT9NpOQ+T5yObMLR4wxprtEZRmhUsz5mUL5te/2iArezWacAj+zrfWRailWD9egxZr2ZF2dwLjbTYlwU1V8XR2ZIK1QMdN9eWJhbK1rQrECUsnUm1EyGZSCvWQoPQTWB4NaVVkURGbou7gTOaNif4Z6P7nn2iH+4M4dv/lQo5MEKuchvtIrNBwVAjlRIHnlTlwoqXxJB5Fe8e2XTIUq9s0xHHdkeWgh5f8GhEGa7He7PT31guz+nsgyx/2Scjm5JsxD1Wy+HPHt+kOdZkvdIKxUip/dGHqr2sAFNguxsXyzoUgGrxmaHHHgoVeml84otXywX2qr9ogGt2hyfEBvfjFUeIIsUsoEfKO2TlvpaqdR5r4mTKlwM7L0GFg17ztzcwTYiIR9WuGhwgmFMU7MRkNJGvjY1AgPy+CCKPBczpOX/fu76Rvl9UIUs0atFrZtQ3QaGdG0urkPLDzsp/rimNDkL9JRBDgLdv/EWxGRr3Kc3Xu+rbZkzidGYExcdxUp/diYsVAmkf+RMFw2pumBVwjz5KmxYgB8ONZZzI99Effs3YFG9S8+HhB13/dVVO8/9jp+V2KzotbZpN7lNpPq+9s5DeV5A8AOsv37ZayE5dWevVtWS8kWnAN9v9xTeR+wRnfAUJEaWTtQ+AKwes0PS2XW7fxMdkkHRLBlaW8jITUpGlfeUGqRvWUzKM6YvzNn+8hrmwbVhm0n4fHZ61cK++82pJJrYF7THQ4Z23PcSVR/VSR6vS7GNUFSmFhjD/BbGZXNoyWRmMbKB2DITyaqkXpaZ7WbsagVGHApLKKSieQSuaGqcY16DdW1U7Tu+DgCdjRcV7pPYU5ERtXPbxSij49Xsevg8UVXKJVSYPGDnm5xCAqX+mlTSr3vIb2VmWF1t/4Fn866vIDuiwsPeXC1lY5aI7ik73/SEMt+DvJxSMOqzd4lPQs8japU0DGUU+Zt2j443WyTfPhUeis8amLWzuNIGI0a/4hlWmeshkeWZVwZX5dxk/D4wk8yjeyjbOEcgVM8/iwhP+0/Qxl4fzJ1Xv069Ja/EY28x6y/I2qHPhfFZYIY5B9rvmqyUsqdt5jX416IaKeRMX0AiJgIsS7aztFTygl2rixJLSyBPj8qTkJj/lItN6e+02JSafl2y/tlXAvdeRv2nYTBKPexC+PaFhtKEGGjZBW/U6XTFtG5FSwOsmlSwGG200Tc+LgRFImGGuUAJfqqkzlV3ahxjDcPeindNhcsJfnZ3bobb/JcIzTqPxZM49d5Dd4Zmev19Wur0EKzO1+ATsSS1tbNxPl9Nsu0yZrlGaYwzcvKrDjubaxzV6hEIO5VBgHceHT2w9dq6PCoNmLjMdMgDbWw2W48QOdwwdaqLNAWt9vbWO9E23LMqDirnECpNZTyIVB1xifYdfHkZrPU6U8nZ4lk3emXwGzkdjrYNq9/ern0lRLSF4mz2DUqQaN1NXgNuXe+KubafEE3QMGbyBniNe+dPdqLBsTPJic2zwWvKGyJNcTcx2p/P6IIeFuXaDlt2rE3SDGO0fO+RlLQR6+KPWX70nV/j743ycK1mfLQKlXw4+c7HvUv3sbFRtF63fRFhKXTQBoje9Q+HN8bZaXRNKbsv8gE8VvJgRUpXFXA6fCsUMMkiNwhmKa8Rpbt61ajebxtMS6cSbuE5hyfndcqDKRUFx2FTNw/0X7T+3/iDTvOUCdouMnx5ZaKbQqXuPd7V85/Q7Z0PsmVdC8ObqI9D17mutgeEhITDbpX2LwvSWZRGnSgkqrS1VCI7TX0LskLtWHtlvc/JrCyWMdkOwlfs1yOZzwaZQ82vZiJJguHHJcmjkSM8Edn5kw3YTyqfn1qkvqtwlKrhVwbWS3I69ZGZShcuKG10m2b0Rie7eLCIBXP0XTWC+hY1TI67Pj6dE9uIMVQGnzEyJHF9o6to2grmtC1jqYj3brYuGdGp/AY9KQ20Ol/15UPhRENYpvNw39nPj6Izl3hSqP9ftFQBUOabhJU6TDtkMBiscCbgFvdQQqKOj/oZZKoNGsrzyChfKtC4TnJeSjHNMyQR3VR0C2GHwEhes4c1LFUEpQwdPPCL2wB1lDB8KCZWbXbt1NYyXCJnBXh6xPad7SQBDfGvyqJlgv0/3efspM/XAA3z/+PjVd450nCUaD8XYo0M/bCZZx6w+OvnXsDPNtIW3Oj3T4ZiLWM0mGUlIL9xNmtoZ1NO5J143FtxWEdLYXGZjFQHxT2Ypr9yvf6wCdntQJTSal8l+IOFBqvsvLi7q9laOhcHmu8xiIPKTae1OHD3ZP4dK67SB8SniBiHvDWLDwV9HsFKRR6bU7T49YMbZdCgQorhxcWLUtxCGRUtB1ERBKA6qTPjezKUAQ3Y0Mf72xqlekY+oQFsAUOWKKAZ+fAgyM5Li/IioC/48oIgsl7id0SHkjvJCkGHV002SXW4Pz3Ni2jLZMsGLMERsPdQMY5DeHRURrVkTtEleqx6K+BME4wTqMA55Sn0/3agEhAbye6K6AbFP7CQyUzvD5z/DGCQyqevFzKWOTJA7hdENoBDzpUhyoJOOor6hewgnEO2AE7QfdoiyvUKLlZacyjOX1m7KNMrVQhOrJnDpFG5QObwcF1mgujgGL1W7YyNokrEQo9pDjyMx4NF+LpUbQdx4aUf2QaW060xfbsSNIOi3Gek7MiBYC2xDQSClj3irN7z6wJq6QACaYpkJlr88SXikoTNCT8yv0rqFxLj452xehlwCVcZh0RCEf/u8q35PAP0g8ObSCMMZj13RxuRhUkNhC29vdaZDw9Y7p0Mw7z7cdToWF3yy4dietuuq2pVb+emUJSZJmSmHKI9ktu3jAnny6TMjGbmpPH4hQfTO3YtPtzP+eos7MsCPPZrz5PRn/2pHC5wMdgOrc0+ruTdVNAf1inUsZJj1wKqdzbtqj18oGvPppaMQh/h+jrIO1ADubAdcZ0gOUh3Iy1KDwvXcdcjZG/6UPxG5hqEKO018G1o3Rg7fkf2emUDT//F6z7M4Obu6pBu8YLwCcZt6I3xzqRGs4otb4/Rq+Fu8kj2w+SOQwcNgvQClr8weMvk7zD+GgNG6O3Wl2fbGh8ZAyGFxfH8czh7Utp4Sf9/M80UCVq91gbVGt8hCU4O2FNdmT8LsSB9cETn/SBft7gLlMSsWkXn0QJaIz8KrRdx9S5i3eU7kTwI7ubMB0tiP59wjTjUrCGydnVyamiNEjijlNOAz4Jp7XUbt4dbRUDmm0UwN6vL6v2+24ilDhJDAdO3ZuQJpFZKp2YRlG5IhqT+ck+j0DXX8SpNnh7VNc/h5QeFpgyZmdI4P4VPnsJOrJqfXr97kSrovmTo35WMUyNvYLcCw5sUz6slbRtw5rIaDbe1ihAVxRyFOmpHO/EBOPsmcB62y/tkKyQfzalN9GOASJ7qKvAXzlwUXUkvgADuuuX8vBs01U+7kSmmdhjY82IuG/g+TCEr8RBc9t8RfEnkAlN6YCkHURJU25deZNWfpDU1Fc1h780/gK2nv6lHSiScgf4Y55aj2wPtfdQevxmNP+wYXI1Rp2E/Ds5TFP3VCjYy8N+v1oeT7qQ3y5G02d8QlF2QRhHp3+NiX8m5+Rp0nB0qO7D5RyNbskyPhGvlNrPU/YNnPyU68VumaBQ+LcSpRoeX1KLmLBaZJHu8prv8ktE5ipRRxxtu++5EO2IucbfviHF38nOGDH17UVQsOgK3uPVJmRsnOX8ikx3FLa6HP0WftW1KHnRS82ct5PbmmkX211LVXJzS8jY5zE/F1n/vrbJWiG95Mo+jkiMljPktevh64SWIgA1UKWdxCaUYVVrs5OVLA7NgiSJx8uIP5oNf0IJjb2BxzH5LQsTBKqDntWxw7OKrzBgOoTxv/ZiuHMph8LzRDQyJ9IlRZ2ChJIIhzpg4aoDdygIKIc6bZEegZJh0lbcpJLrgUagxyszPWJeMu82XW2TAb62W9FEqFxjob0jLEAQOUo0mbl/Fs2fixfLRvx3Qq8ByMibeE4KtrWAZKjOC2AF+grpIjPlMY+QS6ygYs01AR/rZ1Np8f1aTuo9k7MbYl5IhWjkByujq4I4MNq14KIiI6HVUaHD3Kk9QbIwX0rQTEcVl0cJ5TLCJMXaKFLBCIwbpRXOek6A91NTwku1vLPhojpJGPzoqaixI4te759F4dtoQmImr4NTbl5ifkTjI+lESlZH3+zsGF1HPkuq772ubh88YDttsmtszjynefi4RgfXRramC1+/iFGhUk3GIdctPIvHuddhkHe0cbjGp4svyd0NSf6PM19vGtH/iqCFYGvtX5nmWrztQsXbv0XBY97V2+/3X+H7/j3AtmywYwM2enZ+9bR98vTXNCyBoxJ8LIGZB9wfr4+DUnefpcjTHNwbbSlvbrpZ7+tzPK5n23CBUhwq26GCzrCPIINF0uSoU7nyx5uz6O+DRvELF1yb9yl0poSbJZnsEIXsi0x82F4vlogfm8tZvWpvrhA6AU4go5yRlChkShMn4GkqEcEWHmyS5GkZmiWBSEVm7mjZGJO6elXoYYQpAxPpc7G6ZF7YF98BDXBE23jVjuBTgX+0TpsPd0AdiMRWNxTMP3VtGGvaiYDFV7OU0GfljJ2dS59TRuerCIbfMfGGqhC7KFWJr9Q9esjUb07KC1kgiorjDfXhSgJSJPUmjNEpT/eKlFVRVcksf5zXbs6KE1F/+6DFTSoHqvJ8u/m9n9KjkgsputZ1E3IfywQxkUiwrzpFkVM1rWrLgHiqmhKQJyxRGrUBn8Kj7dxRU4z+/9acC0DobKoZ+7yAKLQ7esyKPUsovdxbN5boAMWJMZ1cR8sJnBN5WzmaeGmwhiC84U+OgudtOPx7h+OPJ4pp8ObzXkRbQEhnq700SpVCJ4FeEnGcSLYU5zzfOH4hGJPDwJECEyRLZFCFZQ1oNPHf0HdsN2ZGwL/rDWO3UplMSMPCQ3uhKyoX6pbnkxKNpjJ9NGW7lpAsgjBKQlizgQU3IxGDraBpVZJjOVVfyJqDrSQx1bQZ97cZVZTZAZitLX+hX5eSrutF84e9w9qYomI0cbXNzeAiDKCo5aGmsAjcD4liIueVHAwQb7R8bu+zWfTQIE37lW6mOSK07h5U7bkUw7mCBA7EVeLzVDi1I0OnnFYfNy5Z/yBwy6xCjndyuiW5sfDesQXYs8A08rT881PtZRc94NM+2DgJmsexlvfKHNua7QVJhA4l3GUXn+7NCnkaJ7cCd+zC60fQFjAL6FV/Bns9tmdjWSmtv3G8Hhw7NM4O2xtxjkKRkcBWqiEkGd8CiR0APQK+9YWLKG/DaMzc2LZBermv1dsfdmWtJT+GyQfxsttUzFai70xhUQZzHDv/1qk26EQ1bjy+UrRTm4Cikxk9g3MUTLAtNWlYXJsFFIpfUES+sxCXw7VBRGS6KUsVTheTPBHhrHGIUwoWWzbYT0iCOd5Qh9v0YqHSYWy0+UljYRlh9SEOZ/xPhnzjf+aQxdbAmp7picOXfyG3tjvwAEdtq7fd7eOcjb5+aDe5DiREVqO2Nmr7SVudq2Uh69SRZQTOjwfRjjfWZZcUtjQq22ijPTPEHO0VSSQMqRftItCVQqsRzFiyGaMdg4pJH39l/NCsjX6PrnEIZBjO0YA0FbwSa3/wq6KIhDpEJlH+oyJ3V8jo8mqjFB4H++xRbBxsLOqC0GrcrBjVK7VrSlAWwjBszAYtzfWABQ17eVzQ/+Ny6/LHKGtjaTO4+K/AwctseL+1iwBVq/3UBVPq16Pap5J3Vv2jKN4eASEbK+QJfmjDHnh7Nie/u7uxqqRNOP96PnNNIlgNBwGhNww+Sr1YeOPPjJmTdU8QKFRY+K3WeDVITFNBsdn0itTa6m54OKWQ+avdz0nmQb6ZqTiCm//qMCfy9xvV0uBTatm37rF9IWCgE0WSwUFdWVZpw0NFaSJgcVK4I/sSe82XWrSM4astSD27aqO8j9Q7a6MdFvGSaXad1OxTpVRlyBAEmCYFU8MlJ6XNBIsJObUPd1WhXyo7BAgfJ5PZ0/cJUV2iw5QUbOocxwNF0ut9qAa+bvYD2qiZuNb4QKo8odb7yDd/Fc68pNhJhUvS2vwM6FU3Ph0k206OKLTlDVjKwSWKPMyCi6F4RKvju/a60dRWAFHXqcux9uLOjphLHlvLlCYsJ0wDRRAT4B65OUZ8x+bJJ1a2POEE55N2r2bay30Elk691+SGE5L9NE4o2wTzSPLQauYUFDUX6CzEU2iJrgj0V4NIgUEKhbKcYI813VD2SXHJVRK9C1Or2uEIpzWgotNjegjGw9ck87SCpLB29Gd6r8cC2FQJlAuvXSAyht8kj9JonHDZZmSMHh4ASxY0wyz9gIC9tjQ3Pa8S5q5OdonkXJmwm6wPmJ26CBqff9UqV9YUld+x/SIhpYRwcsK1zpzLsQ/Ocd4f1cpP9dWXOKZjX8tUHzkTjvPB6D6jK8MDmtjr/yL6mS1JhQbaJ6E2CkPqKkxNKb6qWTEcQH5tWosnTabksIftp8GmEpKOIyJo+BtE5BgoFa3tCaLQTQ7CWhXC6HcJEtAxQO7nyThJqdBp3E8YLIcmLJ7S1VbUKapYWD3HvFatCOlCfzy9luFWZ6rqcYQNlYRE5zScah/daKMmYP2eEk3eCxdApqShu1z2oW9gdUbuA/KILNKMboFnHAxnsfr4brh8yN1cAnFygXF8TtrGpDbX92vARsWWvIR/PvHSrDyLXtSI0dNQe4vDF8lCfV+sTcBdYL+FVCrVmC5qzUeZSc4PWBiUOdMqfiBN46YfAQqLnZkSr8opJLWxn0CdMc6nWDC2wqIdOKidZONx4uWZ6fNeW7trRdHssDajZtBiFDRFpNol90KITdpGbmxrdoIFF2JJfDS/FdKYtJPx8lX13VZuYzCcKcNhMfYsNbQP5i8QYPdjbZoevgNXGgaHLHmQNBhxZUw72sW1edLK2hQswmHVGSkQCDnpyGvwzj7WAI8mqNVoHeUybszbuU50uYLuO01eIFyEzxRwYMgNSw+QesKOd9jQSxWER4v7Lb2QG5KTenbYO5MSMgpoOhRDLjSYc1188ZFt2tkqTJDrNbP+dwV7lZLjX3BjYEnIH2yOW+LBZfZtD3vAiwfSOy+o6fU/kb+pY/mPr3XxjSudXaVRMwExhQkhS8ypUNm4Yi1aAGYb729USMSCpSzwqSgghwXFpJLrOWdhIwRMV5i5+79XjB25/sBBhBtK0AfH9cqzfh0V9igGgrdO/D/tOhZcG6sjY2X6Kj2dtzPI3NLPVmpdcub9ijedifNiaopfQ6BuKzGGyzRon9kMPAj0nGZZe1OEwKiSGJUbraOkQrT9GD1gK7H9GBqi0/00utUT0vxCB1hQNY8JJ4AC1V1phutEYnwzaXtbGywscbQ/krUKtGPOtfcbmTgiThHMcYvUNuxfYuGDCenQfekKFdwe25ZP7Xq2GVkdiQ5R6EbMgqyON1YkpsYTnB7XHEh/nCXXY0waRGWOVscvLKCRHZLKndA49xuGgWXmO80zA3DxPWhciJQfmtMQsC2eEsUCNJP9WbAkDWphbSUtlKFVPTYxRUSP25ooA9UakUHOIOxuBE8Ribq3hIkit6RfT08I/RWpq9aJW14YCpJu+HyVr5muYuyy5xPA+L9u3ijnSrzVq++YyJdJDpGUwmFLWrxJoEkqDD0gS/mu1l3BKgbQKo0KvXLiqPim5fkPJEPcAEpmVcQPFgqtoqtGqNdffnd/xYOo7K8boG1P/7QtlaqmQQV5BaX01SFihjHNVf/pQ6y5e0hZLyLhfVl81m9b6D5cppPivBfSIlXt0EfxIC01sLxKRuob9OtjwvpTI5w5MmB10Urb+mLuDvw++o7w78Py8i3nCKNJmCRygz+PKzPGGR7eqvS9EmPA9coyvOeckOLda9RCgHjvGE2o5AsYhYkYj4REYYqee5QpE9zm/sxu+8sx/eT57OGES1VnEIMRhptAU7Pju+bAx1u+9F/fdTHVigyix/F3AZb0jVTjj9LyBnfEleoLOhVF4+W458wQw2C1WghBGma+/zoubApDIIsRgUzTt+cSSXMfkyJQ7/F7i54qOyyXmVMSofO2o5ygZgYPBjvhKKhP1+cEBW6LlYvoi2IwUqtcUnPjfrYWI6AMNORQ6PunS7q+HhIxJlF6PRAMMZab9PZ9Y4lENwF3SmlVa9WpGvn0vjQYwZMQHGWGQl2PBD7TVFfYxhmmoeVF4rVITRxcRTB9Au8eyR5FxGpB/k9guIOA0Yg+skesBUZ3+YDNOKDpcpfj/snQzRYZZIUmFT8Ge5WWz+LJ5/v0aX0Hx2Mm67tO3JoeOeEfb15S7O+PP2agMyjYN3cDIa5GkaAL5ED7SYK36/Tm7qIn9fDnqTp8Cx/m9KRoKD/7bT7+2D8yogATAgbeyfKAHRuAxtnc8FuL2dbyGZpcYK1VB3nMgz7fbIVmelW5v2Y4FmYNQE2nHT+x+56CreUs7zbVtJu25xu6O8KxqpPAs5fFtBJ9/D1FDKLgl3gkwaF2A6oPVorRJjKCWynvt3/Qdz1Qo418qkRRskkxONYf6yMa7GeQKSDlR0VZgcPc5IBdHGG5uiemIInchEi/6pJZ+48vnbZWtl19AyrdaiJAV7IiBSujGweBnG7rBaHfPeqZF+faveRoTTmh5tRt4s10e4p01qYA4IAPLab4soPBI7l61KgiiihYMvF21zs+avl8U7GWD1liDJWxf0hXPf8OWKdSmv1jEO/ZEYlVlDn1BxM+L/2f3XvWzfB6ZInd9Qa6UtCCIiP3aKoQas3pgVIDCdnjZhEIB1gFonx+96qmbkJmgwYHs9+ptmwHHMfqB2BKECHYX5nm2zMb5Tl6s4j2Gc4to3IxEczQJB8wFO8+/lyReHCPohAIAUIEcA3LaUoo0wF72yv8StRybqI8qcJse7BTjbsbybbFt7Quhu4rsY/dGrpzapT3rHdQOiA1MardnwkAlNwXRiK9OEH6q2Qf/SADOZ/9ts+Cl1gLl67kQPvqJdvqe92gok1ESWV+8Cy/WNY6itb2JgwpL3EHV66HiWJxMXo115hnwyGVHu9ohe0YEkdVTxwE8mdALvVW4KtaMVV2B1P1PNihA2VT0qoLGymOvcpYVAr+qo5rSy46oA3RTC8GaVlIqEpOoxP4QPxzi2V4+r+ohbdJWkn0pQRNI6YCeDZ4PmBtMt0+LoQfdpOCGKFWVjBnGUJDSWx+jWLjE1+Ewozz5C6Uhi5/WJYML50l9WoieCCKhwaz+8Ygf10o24vFLM8NIVekQ9swPfNHnxATrtqidgwvbAnUE69d8K91teOkLyBH8mKyic7OEdMyxQi6yQiKT1YCsi9gQZC75xTjoRxDFmKbCkaFKvjWkF7Z7Ag8W/1OL8mHMxSzWEaW7SWFScNAxQ6XoHG+lpfMnSaKqqZ0diFPOBdkbECckm4AQ69Bwa1x+ad3eZAyQ59pcsgyb7eOscLXdxWx4qgIKwDy+kRRydNo3AHNxLY23z6pNl5WVQUGYzOUYG+EFWYQ3KMPqQ5YDKIxMOCaUvEmKS+/Ky+jOBgoprheyJGFZ8iQHVqkclVKPIwabqPq215V04JmgOLXpl6BDjcJbqrfSUQTfidGnKmnBjKUqFP/hz8MK94N4lX+lxvRzvs2V4cmFY2/iIkX/x2XQyJ8T+AHolbi/AFyZq//B2EwuB1Jzv5d6ObehCCZ/HM4fGukP/0UvTwxePzioxg+6KuPYnXixf4By7/kQhDun6DxOqERsjNtPwuYapuWhAWG/y60U08fhHwHtuLDOX1UF6J7LFH3TbNjqIx46pdxn0EhyU9vq2wE0h1zXkH72BGwPuGPwxaF4BYLgGYc4pEssY8io5wLxbwEESzm7D59HPNZZX5H7/VSIFP4V8YeZy0bQ9Q1Z7TmCN6gAwCDLFeUDOJFUUhljatguzBNMamg0i8nNar3lFuVdOvxKxvKWthni5Ir0HksnkCukXcUVCxxjzlyjBm/0tMvfkCjEjOC8qRAshtQZp4xdXtieT+qHkiv+WmSlD9mDmkXIPPiO/Ulpi75i+cGea9EA2+S0XojUWu5XwI2eQBjmUXe6dU0xcQRj5OVPtAVf3rQJNWXrZiULSOD/MHvGubQ01RVuKF6vJKxpn8uRSfQmtoMr3KPDcb5y4x+Lu8EVzMVj77C0TBlmVPKh3+dieOg0NN+pd9Rx06DzVwJpsTnAgT9D/7Lv3whan41hm6fQhwpaCrirRk19WiF7Psk/WZpU3guxkL8YhbcvGvEc4qweIatMpqXZFqSYInJpGYUBjN2YX2ywaeUKz4+Mr2cLAQ0m0/DInFJ1PpECqU33goJyQHT6cCw6HDeLUvzrn55D/piGbBgtuPMohSzJBZMuZdNX3pWjg/HQQ4vWqcgi0w1jKO3Fdqj5wY0lOC0RGOGajJ2bzifBqrkDs13mr84b/RwArcNhUyBZkJboWx9Js6nnRpNUk/WvqOgSh7wRxo8ayHkitspJMvXba9LP/kIxnY9xrh9QD9jeHNPgKukeuMNXKTWQIiac1YDPI4sDHfjr4Z3BHHkIo+Fpd6gQkemkv221stNmcv17rO255MxM9mH6ZnhiO0HU1bFaSnYZRYKznSz8Nt5H4iOA+k7rG25GXBTAzGZkVKJqFlTaaqrFb0zYtkXAIm7lOLNrngX5w/zhodQ3KK86v74y5ZmqlRI5+uKSoM1Jg3nUiBKHaaWYP1us24i3GQmmfAMv5jodnKDjJbwNPfnxtQj8Ydt2y2Jc93mwfjKacg7C7ubNhestBDfhM419HXV3r98Q3NhF8135hubeL+AzVNh4/miyJ8nHmsT01TwdF/oKTzfzCCVE9/myA2rT8WUK/6dWplQ8n3hPu1QdM9OtG+JR1b2dcvG7rZGM7kqLv82BgmKd7fl48S5ktkYFmTu3rqmaMRrs6RuK0BM5cWfZd/+dVNM/PN8g+NYfee0D8zxa11uJ0nh0sTpxfvU46d9YVOjDcUT/v60VG9NWvCGs/QxFcUgmXAn0mU1BCuei7Fve7+SrPyBVDK/i9qURiI7s9w9hOIdciyuxclcEET7i5ucy8rc+yRGPAimhcXN9iLHU2cdRE1dMNeA5n3L0pKnuKoFjTglU5UR9sCGpd+tOx/p5TQ1KTiWfW0ZOVnp7t26/GRlpvSfJNjl6Nd/vkCRFMQdKNhHvnFBHOON94y6HuuRUCGqHY+x1DXysJD3yYd3VAbD3/YjzvS+lg3HMEQb40Mz3+QJYYTnxBqIP7w4lXFupV5oYfFBj+0bZhDdxdvnwkx0WWT50MQMEd7Fj2yYvLQoHvsI3AP/U98hs5p1Z8vGFfclo7MRHP+/FOQbgKyZ4Pt5z72RGCWXJ0PtOoUBe0QBp5XVFM1tv/yLeQqyUZ/IJqCTR9yoX+ZUJXG7WSGo1R6SSoh9g50pHtbJrMiMM8svEpcOM5a39xtWf74IKYiTmk2O97j6kpnQmjF/xBpB1TB7xYrM9FVn5l8UzRqHGytR2sZRvCkLVhmKTGyrmu7/sihcRY2Pld8oF23TSL36xhj20SIw89xEObyOsgBlJ+Wt/uHEEjL4K6P5+XIt/BOe03+X3xfYf7ecUsubs5obQRmBZRm/RV+cCTHw+bEUfWuNMpzY3UEiC4fMZgJoiuTKHV69Mnvdp/CkIrmoR9b7s2KMN3/CKT9rQcKPZh6zKdDjyQs2nAMptWwzrJSsAbU7e6PGh9lMxRqb5w8oYYQyJtvxSWZE0BEWFXRFcPFFNc1MI0B522IOaj1xunnJAjuMrFxXAJTGuATxIowKjCI0MR/etzl1Pp2wkZZHFzT8Zu+1voqFJk1uCbmqGNEvx87wztBi+TO7O1ThllxdZN71eNPmZf5CyUP1bZ/bbriv/fh+yW2OpQFMbwNqd5bpXPYEofd+fWKR/74f8+Te9fzQiZaDUgqQAcK+R/5INkxlGeZy1uE5c+GmL7h/EhnGHdvn0GWsTRbNAoCcbhZEYdZpvK3CuHdoOZWrrgeiQVwIZTWQwyA/Bj0+7xvpnLqixdbj4qccjo3z43FnxL6dmkbBdgl2x/unVKwnEJTljaFh9RRKtc6VgNXpnA40dq/CsI8f0YJNDFzr14eKatPJCnGrhQUSHmHy9LDLVGqJogm5GZM9LWZxfg06EWIfZz8+V0ClLbYVnBFCNO4/m7B1k6a87SwiY8ETRiFRn6ANf271TC+XDrPHtZsktwmUgy9Z7RUefgEu3FehB58wDXPQ/r5Zzk39Wyrr069JZRTC0imoHiG6lioZhAn7rKSyJy0QbUF6CsRaOGdTriaVFJ9HgC0Eh3LuhgadE030I/CkIiEwnlx05jaHqmS+FxTW3+7gWx7jn+4ytf/gTm+TOnIHx/41nGK/djXIwaLK2Jkh2y/osZgW7N0MpdaFDyrvHhm7xw29YZTnB2aMHyKjlBd6SfRHpghPvMG00PWOv5eiIskEsXodqYgkWNUQl8M8tfnWsZFiqxvUa0ZMOWdoB//IyiFwTJfBezYlFa1Ui4mVsFSP+rf2pBGjTGPhsWsskSmeG/cl6InMkQI64UNsIOWddJ5KnfAQWPChGTPJPFBZIDd/UgFN5pcmSS1g9YolkDfoICI1ASfWA+BN/TJpSaNlVaKldQB7pOWwvol7OE0hZn5VjIcilEYxfl1fIukiOuUAbaA+CvFQa4ujDowAX9e1+F4bfKgTeh5zYqreSXPfVf682yg2WWXK/XU+E6MFWlsP0KTj53zjL5a9WvLDzFSwwE8X1SC3sQkijIJaO5ypPOG4IbLBSfb7NPTXuUON083GxMciw7Fz0NpqqQy6H5up9Hz+uoUvhMECqJoSHQt/+AGnWzGtY7geehYttb7at+MF2Dpn2R0TprJldLB+qhgp0HRhzquq2ugyIxH3QKVZdtKELHgH56rvIjc+FAj3lHhjg3TlHOmznHjsiQUCJOYSJRsVr+1aoS5WRxwVIbsoXav5oP+e2cUZakw31BBI3RO9Hp7+jh9Cj28BpKt8eTqjUqarq8/SuqdaK5uPHI5pnrvQxfBxusmqRt0zdpJRk3+AbZud2meu6fJTiZaURve8zyxU2J/Giwf2LFgX85pO6N9MMW5MiRVXnLbj248XLMfR25zbWp/0wbDBZiOPN1jr/JUorrhSYze0VmuW9lJH/ppwk0xs67eU9ryuZGg6eI86FE4NYzuyfej6fJRP9+swfwflrXznOhpxgyOxXAry5O0fVF/T2B+rBulM34zWzSByqG5DVVjeOJ6l3FHNIYRHTOCxxhyhdivL5nJ3vVgFk7N6v+cHvvlHpN0nGVEUO4GPUxaQCLA7LsFYOvuxvucEwIOYG7AjLNpA1/KL7QbHiBA48EBd/Ytk22VfHMeE+d8pr4+eetFfdSucqPvgHw5yqq07s09YFK5DEKPNdV8cN4YhK2XcrUdY8uqAsAb3vbsgC1vXtgHqAc7lVGRVdCWdhbGsOXETRkriq7qpHstBQ0rp+satld9bYYIqSuhDxymnFe9O1Sg/fhN3/SWVVIlD14CONAfUY+7wIDQsAAGHJOzR1PvC/XJL786Ak5QvDO+ANjwp5qBi+Bhf+YS0ZNcU19ePtSpRfo3PHVPu9eLAoZ29lBQk63nle9vVTF2rFzefEKIOq17fZH2ns2gL7JQdP9+KEx+uBzrxjzHnnMFemETUVd8P6rGInKoTdbI2MOhfxa/u1k9wPDrsogonGzn6lYijQ8bN0s4KUWR5xE71EgX2wb8seSRu/cbE193uKJqeJng0I+ZLAn+g9eWT/zDr9E12ydLgoyAs7jJRlkJNpeePyg0hjjsXDQgDUD7W9DR+I8JDMuLeMsg5bHAuq6LAdOgh2CaEtqdhfnsWjLbxaU6/r871cuMILkaLMJMpAHz6pMCqXiDvjMxYntau8Jtd2kvJ3+OXs0f9TkBXyif2TpGXgzyqF4PJV9elYL6NTpnXRFHEAxs6WPsDMq/AOV5AxizoAyyY+I3PuAhJp2AgOrrkOjtY3qMI4kXMWy0bFkbZ1UZcMDS9J6HtTFKxlDyecxtX8FLL2shs6WJyhaX/wjombOJR9fcrU2lyKayP6c8IUc1fGUg05XzZsDGH5Z9XzRBIvKhPyQhiUaF9lvkA4+6ec4TX43Mz3xpGS6ohQ/FPXO8BxaEqY/6E3bbQYjDwXxluL0u2S4pEbKf2KSGaavUP9O2SobQY/Yc1m1OBPcUUYdrHneB64PGlIh7+3b9K5a1XOqxzxRev21WGdvyQxOXYuYd9ek5wElrUMdf7jHDlxL7qIhCflM6PFTQE5soWTyUSIaY6vDuPkx2cA3ouQ6vd0SBX+UNgzWgIi/ZTKdnGZe4lX7gQFH1fUqbWEOzDwDbLO/QFK0f/Heb6Qqk7dNpLSd0KXAymox8r2iHIMvKOkQp4OTKanuYJX3AgpvWk5i+LJcy8u+aLj/kHT0ssz8VMmhrGbZ42f9DpXuoVY/8ra4wq4aByM5YnX4sZHHbuSdDnvUtEzyecYO7x8C7S0Z3g4tZvtE+Il4Vno2PaDL4a5b+av7IZdX5wzdimJWPmRwmrRfC1H+qY8GBKxXISnnPxFczGzOlzPLrCROTI/16/RgO40rO6ZPNYq7ONeRAQBQqxVc9O0etuhSKgF6WgzQZVFV4Vlula8F1Fxw6d6AE739lVnQ3QWVzobDWMY6TYjEt6P/dshQXdrzjuLqaficoN8WCBoF+agmMmPGurnxGUI1+G7r0i5kXMIspfbHw3Qg10TxEfdS6wYcEekz6VtEnmATzMoTbbxkEGaRlOKqPzH/0k1IhXCjrL8bF/KzRzhtV/H0jDsP/eU/fQDuujulzvvc6mtBymWk7vDcXB5WuE9cAMcveK0gmSG/crRnkRJ/ELzxEu92B3m2JTNc6Gl41Zci0j7lA4QgMoaWeBF06K3UUZe6tNw5E+wEVRHkthSfXwJgvJBOJYMZYNIRVzlvkymMyhYdkmRtjMH15DX8Ugo6JETK+f6s2qgPKaq9QadTxYMv6IsKXKZX6JXgyJuXMsOv8PRNo0RD651lOFl4ga80wrvCEAE+SYkc4v2VFGpeVVzsXkMyzrtCYTPCKSSNCzIn/BUQ8T28AOmsjrPqZXXRb+YqYytBrY0Bbxsx+UY7nv/OM0mdXKPp6QmbonU6nxioDVRAcfkwV7aLcBYA8hllQCb0pa50RiNyClZS/35J4C4k5vFUb1BXOWL0bDIk0Bv2tOlkh/R6WsTzXkaFTNuphLUGyfPkgvsaLqIrEpwiC0dUuSrHdxQ9mjW0k4KGE3qOWf2/tre5woC1RErCvCGJi8mBKMg12qXpgXDKQwr2TmUcgP1mhSBbykZsJkPzXScoPbydkMeEpxO8M721pVLHA+WFQJ6/8Bqtx/95z7mZTisgLxJpncCK4xgaE8Xhq+W3qqm2XT9QRyJFRyT43NOr19Gee9p3fd+2dwsb91Yhi52aGRvXJMRcZZjx/4LV46qHVjmD+YluCq/liAefGXszRbGsFDQ9wncb8o7X8toyfczwWQcE5ZWfvZRGHeSvNWxr0VV0uYP9I0+vtxVATTnsWlIaLXvFhtJIVhcZlNoYJU5GkhxCIw0QiIin0OJJ7pDsMmJz7HzlX2MkZvbM6WmZ+DABsWzrvR5Zz7mvHT2EzCL9guFl6zYuOlbLPn9LU7f7wSGdVB5oUEi40+mBYnfUuo1o5OWRPl552Oc7eu9Y0RwV58zZYZXDHGGBIsxhhDEhfDENQqxhhjQkXz0PXpLe/kuWV5aUmtZZkmeelLghBzTiwTmgAU3GWvpFKBRIplFy+VCjjHa8juy7290nVrGEnico9k6RrJiPeYod4pzKZC4ITWeuV2pTP6c/x75vWcoPjOeXJ4kOBZYLX5bTSLTmQOfjA0hDXqs7ACcw+ZnyKOW3M1SSiNX2HMYz9TaIyprsVTtcgZX9uIjqg45TmK8gnRig3jQKptkvWxEpdXUr2Tur13EpIyRclMWNTXClcZYWnT3Y3tMsnPbPlCsOGlGrZvksLwtkSb/xx1oHE+YKqab2f5unHJcmPwhLReXrplMGOS0pVLljr7hsbh9Rgrb9jOd3HZwsApycK1ZLSlrmfNajWDlYUX9jdxy50BL5NI+8XZcREZaSY85BJk3OaXRdwdh0DHHsWSdKca79POkx4vg9QuWsz8M8Rzf5d9eXaJAus/Hut+hVK+HI8UPS/Rh0IMUb7/rMA2pfqKOeRsICbRGYvHqSMMLGETPBD63QYXetz8KFG6ddd68dk86S+Kg/R5TO7ocHYtvL/9oPAR3GHMhiEFmU07+NnFmgOCcAtbY7s7bsfIG37aMN3iLHHIDO8fvoZnSTS65pnMIyAtAvLUMTZgJEkwI/pNucSlxGCHNWukWEbAnTlFPIcvpE2YX7PSzqhdQhzAA2KmkxNm6y8uLFLsobvXpdlD9mDpHwSD6xAADkUMYqQEK/yPlIKizirCpkyvh9+5lbMov3YE20LvRkkOwdmyLWYrXCGUV2XwKdlRZHD/BAcvpmrfigSCfGFheTJOnY1WtaPYoJ9xOE3fGBOcnQjLl8g2294RMgd5EGYmEDKtI0fuMC2MFV/QpcMPfPhD3edU0QpCoGAXf7DO6VpNo09xsi15EoYFMY0OiZdmU4HQsAgLw79gX0LO8u+08dzgzNxnXIvSGDtD22AhkCjT9OLCZ5GngvFK4FwH6djcGE8lEPfETtILhYOxcO/6PWPvZyaYDYykM01jNHMsir2an0k5bsbkLI58XQeRu/5rxv4U9xL+rNAdNZwEke33/0CH91bYgqzo5PeEpBll+rSy6aObkQ0jwziBVylA9KKthfnCB2yigVVEPn8FPYofgxbZlW11yMAVVxAJMUS5VI4o6IKhHa4QV5ALJwSQTLaBi6IOSnTp73U2xi0T1IN1uxhJUb1RTSf8n66eYP9emgavKc0U/1MbRSQuxR8LrYSbjl9Oa8PVobqYHhcVKW4b3TiC0q0p+uTZj30QfvJ3GaXeCp1unIYRLJZHakoY+4K45JBrFZDFAuvyZmuufi/Kh1AaYrstilVrdeTnKRTk4E4C6papTDQ6zfa3AfH3rl0SsF2SynolXUqMldSbpaKZdmrvzKmcs8mOKDNvEot5PVOu2blaxcwzeIpv3M+jqEoAwV7gDRdJXJnlGo0XONeYSCTLtHEHKqmT2ycYRzIPLRgshe96g1gEOyAp8D85whQA8VF4G3vEsJjdsYUm+NjahLNPlbiwIRSpDMVl5Nq6V80YxUX7iUyrlPAB/6jqCKRkG9S9XbyBC9+cT1PWErPqIxa+jo9FeKG68b2bp6antb9xwU7kAW/iWJXpmgtc32j2E7OUu2K1bN6+X4HB/P24A34RB1Y1SY/xLkBf1FOmkbjIJ4MPEhTxMwek//yNTnB1Ja7me/xJf7yQ3OSrWBxbrlW9JHtylYdFIt6vCoUiIl8PY/VZKOvqGn89Z/1YRMDqlABVGHJqijLZqBLQlMy8mItKbcqamYTthRI8F4KOy2YksJK2Dj3tKI9ZANP1otrwFdNSlzIEG7fow+/oGBkU9evswQl1IEKBDmVvoPx0/23fSy0WSLw1+arws4ub8eDI5Sr+feex66Fo4M/ZRq+m2bxtx+oV377S848tBPlohSlkHWPntcypOt25tmPKsVZgDShEpVootiXv+vELp2l3E+N1No106XQRocPoz8tdxPewAy5M7QrvWpGOnOZ7kK8BtPbmM/+2ZlK3U1rEGvl7vv+NiY0TS17je+Wp/Jooxu6UbACzZ3Wtkk3JD3P1MDAU35a6EP6Jj+oZ+iJYR4sjkKhc1zTH+DqO8a/07ZG/e/UROAJEPvqpQDrGbz6ZaxD2SLsjyXNxZRui/VxC3JcOlFjjg+IKkYDXwZXAutbJ5Q+/F75ZuniE3926bIQBbUu3nGusNr4mSem6545e0r76caONRNBE+MJZraGQwbW2JqO88h9TfIpY3/DdKTZEobMbmrAn6TYUO4ge5AKr3e9QDjtpOWnhb2D1Z69L04PE8xdo5d36udIjJ+Ofvds3Ee2u4ZTJHcCRzjEc5KiH6qPIwHNmOzcNQ76akAIIA9u/zod04ihmqBqux7geYPY46JjmqWwKhTq3oRJbKBjGeqSsDOxmZzAWkqz/N0SkrPyO4HNDHgpCErO/2/RQF7UQxm/mxHEZOaI0fqmX7cNYbNwWrXvvwvHKMUm4hshl4KE6I1L3IVIPyqeC7cRG76jUqVJzS7Pcv+i06WmKmqIdm6K/fOu6vXs0f9fnRoxdMGCv1x8fu9ze0eGi+pqfwxrzUjb5JVITAPNc+LEZ9iFVZqk63mqE13mjoTp8zJkBFjKm4VqdcmX4NknnCGSHHSsrNj7zu4NMyXHiZv5uLjtY6mSr008dWEil8iPEDAjLSUEmLWEvKv+5XgkNaq3FcHDaLnwQ4Nirs4L9GIucOZQkznzgMJ1y9yIe82Atj3mWCqISMqng0FtWtGT/my32cpDwyAr+Wyy+R7oVR2EikErR+7zoaMTmARYfN23qv2V4GKSg+xIxZ1CxUHi+qaiTYpHvZZBa7elV1tlG3a+1gVaePSBduq6vipfKMhOwchzYFoL4zuVsmCcjSO++EgNZZJGCnr7wJ7pKBCkFOcI9yKZWlPx+2C6aIkqSL8OipGmADN9P5B4yIDc35AlGnjNC5xjdI4q/6v9WCigz/I722iMxynMjqUlMW+0rjd8ptN3XJy1hK7As8ecWEvdSAaDfaq/pJjcq32JwRhNKfnfETX444nA/zP3RssehCuy+lOlxKn6SvrzPMKebk+NZ2ovryQBR2qRIStIAeZjIeaAhRQkl0xWbSOnXtxz0Ssskmf2Mtb4lWMsVuxGgiN2lgeFpyk613IFCVMEc9ZgywTKfJ2mTMca7eRg1CxBo6ttagFJCEArYRBONFNpuRXRBWVXFLHXLwZGaUGgjZ5lEK7XIy3n6Yzjuv29DTx83Mc01gVO3tGvc/tXd7kmmY4CZg6zY1hgSvQjI/q3pj8Qr8GTa0AU1Dw63w1h6qVnbNHxBIInp0D9cDNAnD8uBkVHXqHT3jZr+jJbcO1p5wPET8Xh6mSCERBcxQTg9W0xIPEJPPnxQ+D/WiRoBEnDFbxM5CbilTZcyTVjq2FTEive/PuSkmgwnlqfJLsUt1D1e8sK/4sCoQ5DjpeZBwDt39BrWnogx9kLMd9Gm2/NvjTQyEPjCKViCUzhTdl74LcMfIvnZqYtUeI/kyfdUr/scRpmOjK5wVEsaYfGwy00QHGpseB53To2MOzJQABJHz+db0qTB2KOWdkyZ6Bm1u8CC1jSt16nASmvctH26g5zuGRGnHXLqo31TE4zQpYkNfcX5p/qxMf9xKgBYdniSfWAN+y1+l7AzTCFNDKVq5QcX4aYwhCBVwUIL/jQMdBWeGtMC3/tV+LWFn/WDZ15Ok9nbVvG6YDTCGkSMK7xFC2y8Pm66XHC0eC39XlZLDy7JLhyd12XFwxRf/M9lF1kuQtMpXBRQ+xUg6oJpOS6kkHy1IVN7pCQcmrvnvp/kZsShTEVT63FQqDLuL0u6jueDYLQTLyi0Ayae2cdD9wOun7oOmHDjQODCfTMCfdsmlLJ/+TzApZdL9kvQVMRGc2NAsTUqjZfCygQo4QqvZiBlCh1rHeE86jQNqEKq0CLDDw0Te8c5K3fk85Fzfs0re2mHOt2PZHWDSXHTrB/eK5rK4FMYxSNBcfJWkYfSIJlShDaxuJyA7YwYFOzbKIFfJMzdaIJvMix+hc6J55eeB0vBHwv8+ZiMXDtN6RQsjLeopuNOo1RQEqBDCUhEwXD8y55+/7QpwJuSTnn+jZvqiPOCjG/tblp+DgYsw8Y/5KZc8m00aUXnbWiBu56YY3ielp6N4uJeceA5Qf5b4oOj/ysNWHYPT2eudiaFP/FWyyAxb1O5m9N2LmBsYk5JDXifyO1KVXmhtp99+orlG2csbvYtzz2LY9Y/UdyDKmdKFjJd1CXx4sSyVP4eKLAX42IvZl80OmaAYR5GHqNT8km/FwYTE5SU+q+Lizc++IyKg+xclHexSxVbDvZ2W5tNU3Ev6iRVyWv222AvS3W62lP5aSC9wZ5Np12fha79YSQ8whxZ9XcsDHEN2Pz2SNu1xxzKzsOWb+EGl+HckH96l4bqidxF62vvUX1YyNxVh9664lY6BHD7OnYodJPSPjw+7rvq9adL135zwra+TKXglwFlzfGARObD2LSNmujAXJZNYoU8pqU7wWZOWB++0eFGuODasujKk0lWiCJPkIxQoNt8rql4gocDlKvSL/R4FNHBs3PDvP9PtwwDM4EcWfqJ0yfDo+Ybpl5ams5Cy7pVUbtyl19Xzrfa/5kvIwMwJDmK6MqB82LQgy/92uoK5o2OE1YtJirczQ2O4bKppgWJq8CFA5XpQJPYo0+q9SbSXscrbfWOBQor7IRXHdeGLdGz8EjvhNM2HSxMh9HVUYiTqPgEXrHUveCJTzoY1b0gqRZqf1F2DHA70E0DOj6z9+eyWElZyPa3SZXIh6A4J/lhHZemSQrsa2zj9Nn6IaQp36YRr8P2X/8ZQe7mbZAumdVA5baB+JiUmMaAuqlhaHvBadnUJwpm68Ab9dHcQmzsm31b4VUIDXTl+YSTTjBj8YVS7Nj5rvDyPt9JTwjSv71LX6nvb0VTt7sSHLHdrPOidmOGuWUa0HydPKiw7Z/UeQqHxhK6Opp4U/ItdD6VZ2M9oCJeRXquNrSkc16SULgX4l1c8NJ0uHt5XQayiR0475EGB2FUpiNzR2AfGiX1ZEOvzNLd40D8FKgP5FJta8supCg/ytk6mhFEH5iqFEvSM5M0R9jN/ZG+whC8vhUAxJ3ryTHyXW6Ounz3Q9R4QE4FNkGNkGpMkVL/9uXzpQdrp+ZXCrABSb7T94DPAjxxSupfp5gi8HVD5k9uBg9qi0hAwrkIthsdsVzF5cj34u9bRI3eX+XuXaQ8AlNLYyMSiUVh6H+mkA55pRUP2nl4LX3zK4YM2TdA8ATJrWDlpMFUucptEMrr8orEDugu5icnrzX/60jcTVlqfDObrCQi1ZqICFfvSV5LWT6v2H7ruRGeDV1ZYNZ/gDzBjB7TopLgdIhEXmKZSzBIMWy3AR5BDAR88gKQoZo0bIRdKbgji/wOk3cNDFNzxFnxZHqgO9NN8Ou0PMiFsIsEE2KTiv9rhG1vZlCKGU71WFVxuVhBZ0GwMYOMUdjHEeivW2PmIZU6XpvG0tMyh14jihBm5HgJ5wsoL7pBP8xmxONSN+GFETfrYXaChU+u4MaiwFWY7NiuZ+Giy5NksaU/T+0Qdd/y2+3QSzecLIF03UeqU98rlaTqlWMfxWwRUWxj4x5VlelJEe0elIkJQhWHJsvjaO9ik8a+p08A7cWYgaLNNIxY/7qYxG4NcBZmqw4pnfd06GdkBU+GN3AQe5g4V8Gp3aQSWDgAD96lofxK6HWPzddLNGFDqM3YhU3TR/sfEBe9Rn/hEBIUNLoUhxt4vvx7Yy7QoIEj2nfu96tx2ZbyWvqCn99jbh0y2GePpt9YaPQ4VeaoNrakkGDK32+UdMbYNUApLSpcoLGExbIwVDEBLFCZaeTf6lzijOR1z/3vhJ2L68hBiNwPdSBHcposTd2NigVkugfH7R7KQZL4NmP+LpNRou0DqJ5f+R2gjOUxGpSD6TiOG2X3AfEMexFj8f0KcVYWa0xROGnOVOivEL1is0DSEuTXfc326xvHfckBmlJM/NIbECsHPXNvdiJu65w8CkzPgPHhbPom5fw7oFHyLsAiA5Nssf3yXI6HYFNOUabt8ZQ5RGHYAbxTwWyAgVWFsfGrteIu40aOjcLo1LHSxq3Q2kEYyVPifRYIl9mmBHeEbDlH1GBrGZ5MxKQpK+swQ3ZtzYqe7H4WAV4rLrVhusWeRHn8xcUEGX9hY8cwH28FTwqWsD4sgkJqTTp/oZdjFjfw8P5c+vt1oRuv5VDmxNXbP6MXyqmR/8dd8ZKWz9i/jtJH5ow2m2u2dheL/fNVbLovH79f/qch3XK6gPKOBW1kZ6UFmktdtGBrUKdaqpBhpcs9B3659ggW2Ml5zskyaaj7WqgDjRnihpCFharKVRQwciLDiRzuJG39rvtiyMbBbUwADZw3wdL0ami2n/1Z6XMVOcg95C3P9ttn2SHEfXLSD0tsaR57sBPs4lBUatrFojUW0gyYq6yNpHtqNmZpL3I2Zmkv8nAMSagELKhtoIie1uBLeHQzaKQ+QYUxFG1uHjs5M6invQnCbfQ5rtGtO8W8x39n6qtr/Glf52+uhj8LOzQldSPr7IY8WjMqyvBxNZSBowoxUq0A3fjH/YYvbvHE+Sja56wN+Da93j2QjkgsEM5RaAn/YttbAse4PXU0dIbuIfkyKLqV+VdTtFYPiOQ03qC8DuKEVENScDayYG0jNkZZHLbUiN/WVb3EtHoPLdrdDL6VKsAJd7rZ4ullZTSK+y+mATBB1ipu+xaErug5RLBX12/zYyZMiYcWxf3dVd3xwrAMMVZmgQI21OnXqC7PRVt91ArlU+V0OlA2oQ63786wrgIMFwqNipiXNu7fJKIkr7xifk/v5UJnJtiwgLU6kCDjjedme8CBtUgQ8d1N5u0ORYDZm+SRdMMXVbCCrNuh4GaaDImmzTSI/IXXfkOWsmTtYkejIvB6WBgIPzFzBJnDkp0GfvY9UOS4HWxlvRBlgBFA8Gs54Xk18tLSkbPCsIViDGYcJz9XflfFtuUZTJ8P8Ezi2yb0NYeqqnq8yYlZJchhIvOFWMIusMVgaSdDlqHW0g2vlVOvL9kCg+QaxDR60v4lnY1ntc6DjK8gaeedhNiQR4HrqnxbcV5TiHSJCbmpphhi/FU5/Vxm4pdUTJ9tMAhyC6EEIdKtWd+hnj35nCv/YHymP7E0f/lRVJBl8oA2HqAaVgzmP2/XCBJJoHo3+G76B1TWukAkazxvAxsX1RJ2CTUezPckFI9aizbRLK2sOZkaeHQder3d5PWuP3+bMgrOcEhX/L9Hc5+HJGGCEjcIVEkQ9xoZQA5cpfGTmtCf9so+77sBs1BE6HeyfDxYm9npojiszPutDQQYkYISq6JbNWSIG2btltJAqFjHj5ottdNX5aKrrDKv2j5rsu1QyBAZjn6wC3zW2bsk8dS5rvJ8JDwPEOrfJXnBe0q9BCKTRJGVm5BEcjqR3XDRopAkEglJRJwQ3o2NZB7q/mqcfxSHiVO8MCMqlmmwSnAl0rbSWWndp0fO4NSh7DDFI05NiuGCmk9Rhz5MnodAwyXPEqJtsqHcAQ2rfLbRD/gybhRSt4sYMebAlmliRvlsZe7Lqb0De2cFcKUOmeU1fCA40gb3fx7974f6zdQX3HgwjNN/Hdqrqv7CJzt4gf264i4Yvx4YfER2BJhwAk6RgOUqHWrDzt9+5YobllQuUA5fMOA/QzG7mSf4B5pp5OcNerpGEBOOS7xeDLlusWkDRG/MeJuahWsaCn28y+dV0aLp+Rg1x/9R49Cq1x8JwzHdvwp/vbzFtedUOnTCnvHegevZp5L17L5VPQ5MWu+RyxhzoaJHx7A+/gZ2iY5y59MuU9Zj5Kbm5FRHESOyQqTd3l009K9RE6jHzebLi26CtccLEWaT1aNlJNh6cyVhrB8hjMpaSjt4qMqclS84E6wbZTcEG3wPjXp53AaKPvgOomZYXB7wYwZZFc17xtDwvjOhBxdizxBPH+8/Td99NVjjBE5YP6bmJoKXszvL7kX6LCJKqGmxXZ4OLwBrch78ZDx/cskJjrhH7E7BqK9z6GBD44t4Y3E3oIm8iR9wLu3v2N8/uXpw3hXA++UCH4nQEE2kpXXXhaDikKpa7NjjpykxlYaSXHBM+QmqYy4soC+F728VjQorRmEHfew/6oW2TwUBT2oymj2eYHe385fvIo3of28/jYgcZpue/us8ILcgvbgE0UE+qstwmpTNyEDhoT1y0pmFFJ/wGe1L46hkEiQWqe9jlIzhxiiFFxLfkWMa83f4W9d/kQWUBazrVNF1dvIZ2NQ5qKacVer0pJi4mFmi4NjkIXPIKPLssNJEo81S3gz+zssiQ0geNKQsuMnJEo3veMNAdXd+lpTN9r+Dr8P/ZYN+1DDcP4nz/1X3WIf+xwfyz7x9uPonX4R/rf1anfJfSqof/n/zV669fw7mGvxf5sYkJp0meeu0/6Uk/Cw1qH0s6pfL/+5v6NCqFAWVlwc32ig4xk8JzMOdBRk0tuvPweW/5gmZAJrovz+PMpkkz5b4+SGK0EG/HazIfQpKucO4mKXndELrV3YASpONrjxO//oquPD77Nc2wxoo/9Jazfuo+SlCHyzoCOADAV0ziGOu5Qqwk9RELd4jibf+etH3dW6KXW71izwlG3+XXHoX/zDuUYr9yM57JzytsGvoUZ/b6AlcFa0yimoB8EEC9qvY2UI7EDjonfLMRQfg24A/FWoMPXHv9vypqRPqLhF2RfH+8N0ccG251vyfkhVcmAegmuAuCeFwjMXT4GSDRdS4j1WtyqrQgoqRS8inODSLDBugIulvjESXFPbjOpZbidn5SVxTrreiSGnL1wtwViqO6cD/mPIUj6LmrFWia8qp5iOF/Tee5REQR0A7aDj8jqw7+NPd9O/7cNy7phzvVUCostRmlywn7sr7t5Wa+GbwbCX662PyZLoIe7fbd+3XHRT7fZXRCJib6FSmuuihuI+B7nNZDOuv6PauxxOey2I3hcvuEXVFdO6luzxZ/PBv+yWJ7tWZqOFwLezRX30knVKOo/xTGpRNdlL66wrHZUnx5149gtg8gpoj/T/RutLRZRgjr92trF2PrIv+3EplgCaC1zXLevNxKUeDHW0zkeKTvz6iFm8DXlmKQbrcySZxN0FjxXCzScSrxf2I/v1BtA3oR7pef55uk/0pT594i4tn4Ft6/5YEYR9rMRanY5Z+9VJ5nGmh/L+7oMrK2t9V+tWFcyJ4TVmum4HbbzqobFS+krf4KWFrpnBqgjUmDi2xlxF9ZcBuZYUIRey01eE+trK2+dGKVLPOEZxCAHRPpRr3EoWjDV6e97SNXCaHXaUtcOyfGM8GV3a0XAYL+1pHZgBtw9mMq0RKPZDefdxulpDeSOUv7r9U5xS20gH1nuKy22SsiQJf4krnlpJ2NeIl6NQoO9+5U8joaJzBYIndilUnCNxW1hsP/ZepM16ynVp2zs6BaTeKf7Gn3TzZd5nUqdGAo941AyUj4jT1O5n8tUGU5u/Xrc3qDGBN8/mrz43PmSWxWvRjvVfAl3iuULVJf/e4OcQxYKeET2SZ4fSxOzrP7xQX+HbZzQ1QKmewYQng8K/APlBFyvUnHrr6VRbqmkHZoSwEKM3sL0UQq1VuIsMvPwopdrHAt6JBskwuNueWw2zR3r/E8eK2MfQjdixUyFNz1WpF9Fbviii9K11wrCZRZqo+4jf7fZwptC5TlZejKab701fvev1U8yFvt9+igQ77QPkTb8RH1Do34mIX0cfq+wn7vxWCA+A/IQQbcNJVkGUC7iKDEy0gX8Vg9gzKUIE7CXDgBswt5J/i4JUaOm8gfSSgdQeStyCtAHtaaCjAmwDnPgJ5VSH/JQE8+wDdVEF+SMAXH4FNbUCuxOAnG5DARn9I70oAGIAC3PtBRY6l2yQDwN/2Irbh/+9g2J1nFUpoe1HIsr9zpodLce96vrSX9t45PqZuqpYZb8+9HDvwZQir3Ib8PeBNNTZdePfr1BUz33+puEy7/HA+1pKW4bFX8Z3Xvk+9FnhCVWpwRvWcOFeUMzN+omYy+I1asgk8WumcB9o4NQ7JIwV8Ie8pgpC84NwJUDCThHZskYIObEMqOlG5bNBgYXKGruiRLaXSh/SUniuXHcVpTG6JZpbIPdGSXYgTK4PLM7FxY/JCPLKCfhDvWQXNxAvunP6QwGjyQdJxDx3QDtwHLWkndk7HtMHe5C+oz+9bWHE28ex5ooAvll8p9rxG3lOsOPY8kxvvlk84G3j3sOB8YOX5mPOJIMI1pwEoB6dOmNX4vKsKO4M30Q/MB4SiS8wG/DkVYHD6hnpH5jGI+kb2g3PVVNzlPY71mRvTt0fbsK379m5Ltpt+WdkN25/eqLrmhfSZqjcs6OfK7tiGfXO0NTfnvjtaxxb9WtkrN67vlO3ZnvtG2Ypt3q+y/eLS9Vo1KbfSn1Qj3KL/kfkenGuP4oQw17+iDV5bfUHxiTfRyTGL8VbrWcWH9Nugq/icHnFKq/kTjDvOQJd+bxAfOajPKQbVOAAAVJPjn2yWqC4JFrmvLpcO6StBcg+6W8FHYwJM/Rh5lbH0Ob95GCoPFVHGTWfO3vidxtlMdK2LAPshGI4L5Y2zg6AXJdVxTza071XblZMTQl36mXTdAxrB7ln60IvFfgNnSc7azCadQ3WPHVj9apqsdswIARI9UoIYNA/uMO905sexlwVjThb8gxPxYTGL83LKA/O/Msy4OpgEJjRdMLfFxKYHcK52n3Pm6kWfDJB/B4b8iTGHBQrFNl/mReSj7kY8D+IlBGPibiPK8cemLaQDMK07rUJ5f7hO4XVQ9poj2Lw3nMZ0ChsCH+L8kmoN+pGUVP5Rri+1yfbC7eNDZ7pnjlO+CDvLOZM/DbQ2m2DGd5dEb+EC8NlkI64DtUF7GKHpKos2EOAwdr816th2CX9JJB+toO7DJ6eWR6oKbCzZEy2Ke4aobc7+iSFFot+wHXUhITu95OoI+VM7SjPWAg/GEpKzY2BNqHBt2L2cVKfPFPqiZTIMJ9LGf21aRhr8AQC37TGgVpAHRMlw1AIoz0W77FrSGozHiR2hApT5JG3mfnaNqwP+ad67UidVJ6S3DTIbJyv4o+wYfww92naMFF9CVOGEzjYInPoyDkcSksL8qpqHS0haYv4xKixl+Ay47d+QODoSyVcOq7L2zqF7C0wVsZ2baeMgkN6fxZ1XZ67vjKJYGJln/40vBrYn/HRqb8mPMlxtd0lrpejlOasYESobHofYfcufw8jjW+4gSzStBEdRFq6iIJca894w2pFich14Pg/y3vJ0cmYrrHyTHDuNZYjo6IeUYyMLSM7OMzudV9neAXgxO4SNWXUuzi/sZYqA9VXPOEkSlkMSqEhH1iHxy0LnUb3a7lL4HMK3HnXSNhVVJBSV8a3lJbsHoPdnn2cuO1+2hvRsNz0svDmxBCvIPInwdVjS82YBVt6L+D2NUq+b7fdufLp/DTRRo3mpS7CGKG88vPtc5OUmnNJRExtGgEXuosZc9LGq2ckdQrabxQqC7ullG9IjfT6HQ87IKiJ5LlWPiZrsY9bMrXQ2P3e0lW2mwv4Ti8DCmUUVP3wYsRk2cHRd4rK0SyNF0mIvhFcvC1oV8z7j8QTAr5qTa+S5A+i0JOfSA6rufjRqr4Ze6t/NgCY8pqvO25Jk7xKqUMlKM05pn6wBwdwfUjo+OuPK4DxFdpbhHWDaYIaI4o88UWUp2mKRHl+WQfO41rMbvBUJU0rUqDjxjh+Uq1eeaN7jWnZKFyruERIlOgrxj0U3aEAQ1FZE1UXj4E+qMlEDsMH+350j2rPvmqFaf0Bk/ck5onlyxPDk8e+NMTp6YEoPvT6v00G2WlI4nIS05cidt9ZXAEd6bd/8vERTYrSgN9NBDMMwjNufc5q8yH/smp9Nd1Tdp9+CTtfd4exZwkCkApbrEYKjEJn/mL0xYYh2edHru+3n/u6k7jmVOsAObaHSlJrdEiZZzpJEK+o0Gwmkt4++jEZgRAX9OsXnY6onZtNIce3CNBSkhMQeOkSWpaH73r/mj4F15winHMaTOGue6cycDsiuZoafYPslH2QIZZiH3vWKgaiwiFGSJooTCb335JUkcwsCwrEUmLJGs6AuS7PY8zumKdyQI2cPgfmWJkGSC/h3IjPYciY0k+b54VzNsHz5+OSF/TBlMm1H4A5hQMKfE4vqTFwSThCPew/TxjN68W2etQHh3Rem57kMuyMiSdx4zAy5fIa5DO5zELVgdxpoXYwPtZCV6vnR/EgC6Ta9oeysBRtg4fcahozUy8IWGUxRC9+vaUvMl3iYw6TZ2fMN3T5D2BCn50bRRwZHaUTXDTOtXDcvCLyySA6lZo8XqCnR0TPqqekgc/suzsNZA6cbhGOyio/oPhR46WdVcsmGkmKcO6LO3lsl6bvi+M4QxmXvNXGUpm98JfeqvR9T5t+oCSX1Vc77WIEZt5LCvWxR5Pd16rDTcIo3EuQTqlFP3xJv7kfxZs02SHcekWrTPZGkR8eEuYP6gSzy1iNuuu0IrXdH79dTwHxyEsZb5tF5GkJySFbDckDHWuD3SPLO8vhehorOrcITa+ETcKkSMzJceHuf0cBZ0rHnEroAkO+RNq/JRp/d6aeGh1kOFZoXHxUl/ZId62586T2HWjTQk7eFSvyV7tOsQy5RCQQyv67YEDB89roJeWd8UbaOPQ3wn+0HTbI5zS7nb0JHh8ri4+ZzBzdislrwZEdE8+PKMhE9qr6MWUTCnrXenh4WSYbIgM4kifEU9ihlRi3QRece4qVc+J75AYHI27nTI3Fp3aE0/3MQuSxLFBslE4Hhwk6cxzsa+eGi0Gg/1B+QGFE9kvR4HnB5LUcne53FRLCRKyf0c0iQw9tpVCIDJdGkVHUcvgCTBAbafafLnNbM33G2HloQgTFjVZvnZZFZ9OL+s2f8mzz3IHDB06DxXXt7tgWpeWMNAh22xefRxApMwQUqWSG/i/qAOQJpQojITgVFPqhJJ0O3fY/js5mXbzsiBDvpJARZo9wMM0FR+J35YS3/2cHAObtOTxDp73byjlzjDOmIQcs5nueqOTctxvDVbPen8/TSQwcu2uFKexcJ2d83HVvnEr2Npk8smAPOCR9cJ+7S2CDJhRRh6eWPLViM73mXXJ6b+eBVcW7+F96HGbs8k/VNIP3WEHRs8KTtCUZkFa6L7td8RTS3fiUg27ZM05Iw6ma5SfBzQy90oe3HRCEf46Q5qDYherlwJ8ym85EQnBF/wjAMw4gdg531y+4utCVptACKmVkT0ScLIDx3MQeXbg+bKGeCiqYwj85OLsbQMYHVlr68ivGAo/1VJM5I8K9Z7TwL6bSmdxG8APwokhIWLer8YnY7cei5orvDMy84e8hv2n95L53VxBQwoIjlpW4cfEXQ3oEGvCHDMHMQ2FLeiYZMUC7O5NvpRFXhY4gaTZmaSM/38RMkybeNXIcdGYMIkavirnqgSlA1lkiIG/39WWDvnw6opAHZLSRqA+R6hrHnKA+oZAa5qVr67aEqe1KXM94vs5/f8AiPzgdJtomxBMhAHkgF9dCcSCBrBEHNB/dSXYWQDXtySTqaEpFXC5lnWnb9wQnwk1tbhlQbZSXiFl+khkXcMEwSV/z3DJtsn/6JvNfS6trh6+FmQb/Qw8o1iEMg9WRQXHMmcd8rjFQpMT5YB0NrVY3V0pW2C3abHrg//ZhLd+Jt9kjMi6o5n4UvJGq1RsA16DUTEx5vrTy4cdeu+GIWIAdlm+U+a1L74ZRBaaubkSFOlu+/OfNNPbp/9plEjCuaJD5pqOOiQ8+Fe3QS3n5whzm1fQYdO7mJw8Q3G2Gr2D2GtsLf1tsySDWPr/FZ+8/tpXjf/RIlwavUPJl3sGuZ23Ov4HbRJlwhrd3Md5DvXVQH1Wcpd52HKPULDo3Sy+KNalShvejVT9oNGving7BSxon972dytVYkHg8FfpwhXgBrOBEuD1GQLMHGDZmxeKiW6YaqoBqGgKMvj/cM+pktkUMNsRe5lTNE5S9kGl2m3zlqf4TEjlc1TSGBqO39ZSF8k58T6lWdLbLikhd2Dd4a06KYE34k5t4uUmlOb9dWlkXhX+mkQXtYOcqx8Q3eNeZPoc/lfmZN+1nQ8rzAtIBwCHZG3YzV6HmCrWY38uQGdKbDD0/KcyY8m/FhJ3YWEIsvae+EDu39oikLxt20NZbVLbYBXOmAn9D3LGCCsasd6N5OEqdiOTfHx7rkiheXUm6Zz6nuay0kB02KpTDB2rq4XTgxNZkdv/UXw0D9UfFOCn8cBDycamxID+WqXaoLXvgkd6X2mv2g6PUWqOIoreV9tWZjxjnPzWtrsAM4LX++Y0LVYFz8pUwuf26aNMqKHVHO1pOD3zzzfZiXykeVw/TG+Sm6C0yC0MID3kqRRb868WeAJ7GLJAoEHq/ekbdBPXSuOaP8j7PDFOhf+irl4azoaxoqqK6woCWx+Bqn1w8gLJm5LVI06AXioVJTfwFjbdvdi9LYLYmT0gt8mo2HHoyOG9Aa8t5rgElRBzPal85zjfUkbvtRXCNX9IOAchIXOp+7oMW4KGOFrz/0w7K+T2VyvwCvsFm1+1Zaw7pWYaIhYsZ5pc34yQkV2SyaWRyGYRi+PUf9bpA7YCO9bK9FgolGxxGZwJWIqhl84Dqy5TXcFQEoYcDOfpPAy2c7Bp0VB9x//4n771zllKJuqMEkiTXjAqr9fdIDLb+TaLxYkJdDV2uKjoqtxEyqqcXM/F//o/oZdjU+GvFhsuXkLk3DU8Plo3BDQVPR6vvyAcw/MfRWikvBEnXth3A1CaaYOf/0Jsc8RvIPPx2HCGDvy/SHEttSQzNWXHOafiC6+nCpsQ4JdMoTJTMC36ZTiNgH375+wGNbDfaq2DDqLYcFT/DhMiAY+7GgHgk4mWLYII/LU4UNSo2YwpdrViK2ddfi6zutlCWQ1yCCWepcyQaWmZawKRSEaIq8Disjj3KK253TSbdiPJLCLWFy/G0JYuWtj5C/QjXEzBScI8lA2RiMj4Zy42Jv6khq8qqxWzRDgW3VqLjnGtUpq+WbdMHNlW5pqWeSbFeg9kv3AVPWm9pnYuQQamaAH33nzO163bAkisFxLcY47lS7b6P6tRvLFJTWTUZe+YDqrddBgQijxnol9B04khH7OInhZegQOoEBeq5AiqUso3TU+Viw5gMStvejkMbtNe6LZBEmQMp9Avv2OFlRGaVe3TyFUI8bvI1n8yqs9webeTYQHjrU1Fhf1lVc0gSHsEpi7KXjfWH5RL58vn+XI1M5XOCbtw5JckumMdgCbKp03yfWsQKB63Ngx/77dJXifYhwanFRY8UlXqz4cAPA9PgNz218CRusJ/f/HvPX73DAO6ZlfURIoYUMJQIliNSJ+BQW49X1lk6haOtz9qetziNOr8/jS9lHOhWSPqy0HV0vHVGv+9AmqiHEo6mhrlObN9L3KyPzF7R+nGqhOtHsjTv0D6wWlHkFBurcb4gjPbFJBMQEhN8CwkaZhkOHF3b0qS23cDtMt9drwUrqBBqCVGn/jlZJYvjWYKw9BUZF3BzNQoMOQnlly8I9+WhKMQkwVM/USlAH13XygyhIWfhv3E1Qc9nNVL1c5ihQLsKhWdATfQLdVD2sETRbeLL81QApwluHUXSfTG7oExJTT2xydgKsZu+ioCRnm9pNnI0eJv0OZZ7Pwqv3ChBD6oHgJar7lp9GiwJ0zhRf55Phmyod/4aAkOQnhuOtHXwgFynbAV/0NFxiv2mcKvsBmgt2R8BwEDkogIacKxuQ0dQKH476P8hnEpr4+mI+yTjLzfvdgDyi8XwuobbUc2PXOEBjWuga5wQF8eHtDFW9cMlg6Le+bGyxsvmsP0JyV8MLjOMKQuAyDf295cg1sRXYuZK9vqnxY5BieUVJ8do5TrbrbhPUXrPz0Fsbb6DfqpHprDhEesvXKzh3Y1RaOrEUXh85mA5DB+aju7MucCTmqjc5qlWBYRiGcahraqnKsU1PiPDV/79CKbD/2G9HOX9v9tDPU1TcFqy8bPW0jUrqMNol6PbQzdguFDYLENYcUwU5NDBdqtPRFX/co3GO4CKUBwpdd3UNiCL/LWuwLz18PPh8fP66hwf5XVh0LjtXqr1w7sur021RbSaKIJ94T+Iw2rTdh+rlWz4CB5xotTOtBmZ8tWIIFrOzLE/MRG5NHLHp9XvBSmXk/7gKEQOgJxOqwLhknYgzu8h7GVyIyo1Nzj+KVapO3kAFfyU2uAeG/C+Ip6R285Sf8JpTjg3Elo2s+s2ykdx5wE460yE3QWe/4nAErJQ/eoDtGJ3W0F7Rh+fWm2QepKVQivPqwszlp+NNLXiy4PuT8zsc66puBU31A3YqhWV408aM1Cr5sTWEyCbwKop/WR24+qxcAgS6myOlUMJcmLCZEqFdM0nZ9Kdnnxtk7t1RQl4KZ10OvxdRVwCUa5RwE0lD3kUXW7zbUf4TG4CuBOku4Gkgj4kxkR/n5+DfHpPHCoHw99OXp41ZRrJK42WqeWL+ZBSN9LBCwkw5cL0TDXAmodPYh2DDC7FedVyXz6m0tkF0km03T9Lufnw9T6UKLigCSnlGFC4LipfuofHgMsl/vdkaVNrNqdCJef7uUwf/bDKP24eFY73FncR0RXrSVbbsoCLx5OZ8NFdmXG8IWa5e7/VtZ7iF1uHryafPEa9hJhVfTbmi8y+WulikP18iKxeviPnQts7rFTVOoU5K4smpHzmQyHhtqXtrAX4U4+cvDE7khNeR1Eadw+LB5YIaiOY4RNsJKOCpxKtBQzvc7p2j/INTgafb+BX0nTFaCt9esI4Aa0Gxvx9rA6qXSUJ6F+7hHkXh61w7zFyTGTcNfmm0UoGqEhOxkQYsN+BJvHPPOHv6+1EkpYNjYohEIbOgdXABZRw2G5JMYJw7fKntDCa6qRfj2OhG2GyWC4GDxE2ucdH8wbDfKZE69jpnkK2vpzz6SnN9+CwFuWHtLWMfMntMSduUfijOBdI2e/bVB4Wg2I99jpHwSMwDoHsroUMOgrCZG1WWS1kjkGqcCWk1eTG9RRqZ1eZPcmN5gp2McETVfE/14xsYopM1IrdcnYOmTfwqpzidsuNqWoliwKOHXQjMGTD7RP5AyBLuDr9V50oerJQjunXjHPx+OSmVVF5RNESAT2MrUCsd/UngPRknNa+syIppDCnaUpw3lCNdpvBlvRCJyGZetitsjyPixOx7rUwT1/8jQYkOdKCYBJW+r/UaKsIfsuk6LyTX7HjrJh4gZ/2+QgyiisIvZJmljjfNDDnl2d16HbvNP5oXh+RpA5tQ0/hWahICfM4lIBXBPaZbyz1W77JM+hmUllXaMvclEdUSViyLHX5NweYnUxfyKgErdnWPrFbDFd9Yhyz442izIKRD84hyHQS/ovkF5SIIuxnNjLIEYYxo/knZBSErmi8od0EQNO3KVMIuoammXFZhfEPzr1JGFXKB5qkpN1XwJ5pfXZmrsPtAE6fUj4SxRvOnK9kT8hPNR1dufyT4iOboyn5P2N2iuW3K1Z4wvtJ8V4r3hDRo7p1yPRAc0fzkysVA2L2g2TtlGQjjGs3fS9kNhBzSvLpyNxDc0nx1ZfqXsDujuXLK5VIYb2j+W8pYCnlA884pN0vBdzR/uDIvhd1fNFZKTcIQNGdTokKe0Lw3yu0kuEfzzZS9CrstmmujXKkw3tH8LxTfCDlB82CU64ngJzQ/m3IxEXY/0FwYZZkI4wbNP0LZTYR8oflsyt1EsEezmTI9CbuCZjHKZS+M72j+HcrohVyheTbKTS/4O81vpsy9sDug2Rml/iaMUzT/NyULIb/RfDLl9m+CVzQnU/YLYXeP5s4oVwth/E/z1ygdWKQjGZfYxDnAnHSSTC5hog5lTjuS5UtsIg+Y3Emy9AkmfkKYtiOZfCITYcCcd5KMDUyoUKbOKEsbbKIKGJ0lWd7AxD2ESTPK+IVMfAWY9SzJ5BeYWIUwZzPK8i9kIg4YmSVZugMTlxCmzCiTO2RiGjCnsyTjGCaKUGYzoywdYxO7ANPOkiwfw8QohGFEGS02cQgwdZRk0sJEGcp0I8pyi01wwKRRkqVXMPEZwjQjyuQVmXgJmLNRkrGDiSiUORlRlnbYhA2YMkqyvIOJSSiTR5RxhE38BpjNKMnkCCa2Icz5iLJ8hE3ogGElydI5TJxCGF2RTM6xiUeA6VaSjD9gIgtl1iuSpT/IxDrANCtJlv+AibdQRlYk4xGZuAaYk5Ukk0cwsQxlTlcky4/IxDxg8kqSpf9g4j+EaVckk/+wiSDAnK8kGcCIQEsCCXEwYqClgAQejGxACw6FVBiZQUvjUNDCSAMt2aGQJYwQtKghwRmMdNAihoT0MPIBLa0hgQbHBVK0I5EzOGmQsu5IyDNwnoMUQAyDngQFcchQ6ClQICBjBD04EVIRYw09jRPBgBjX0JOdCFkihkCPGgUmyLiBHjEK0iPGKfS0RoEOMS6hJwURMkNGCz0liNBGPgLZMYPgnQp9ER8a8bGUGJ+TiW+wBv/8Nfhe+zue6xR/TzSZ+HticZrtf2O+PHv319bqPMe72wdhq091oe/WF7Grsu2vytNw/e4Ld+V95B7QH/g7uWm209fH0z77eyJP77OOyv/TCfhr677cLt6l3wKsRjcreorg5EZStskvVzGt2z/SP28wykh3fyZZpQAluxSgZNkfkDJNAwRsGFCyTgF/ZujCzhJ8DS8D0HklOiaWxASOTtDwfjo7Gad3mmkJss7ayXtYOqZLwHFndOqe5E78OpyBDZcX8PYbojwUgtwT36CoPNuE6lSdAZezFxzxtL/jh2ifPLf3nhVf+sTA0p6hHyiJMBKtrR3OTFfOK7T1RZBd5r2vb+hAktOmKp6qkX5F0JfgQJGr6e+dpq0dwOaGcYrR2rTTtLZqqnOrlmX3xLHCXiP2pNhqFoEt8HvmX/HAyWoUuyq7Xw5Mt5XEeCK+F1NYRyxSdp3n6a8cL8P/4+Ag3o0tD7k6F4GMlwP8fqqjnt05tbTxe2OOwOAG9mtK5MB+x9xf8YgE1UlRfemRdBwJk4H9uIL9R1dkPp1QX/tLAgM94iTgKGMNM9o4RxQNlshMEpxQM3nwhnb0Ic8kHR78TN6xDBSGOTva55re0vYMwON2BDAWLJyO+kwA71YMxu96FTml22cwXRFcuMbeAvV/nN+QlM5EaBS3LKDipoKrxkzENcVCFB24QDoKXAMISgIqwUigz/pAcZbISAwDMhEbt9CeOFhDQQL30AJDoNGhN7fye0OsjoFK3leMuNgCdQ0ZMTmsUe8hCRzdMFTb/9qWJavEgG1AXUBuMJ3HBfUZkh1OZuisK9I49B7LDKHhraIeII+YHBT1DBFjb8/PRteuA2kNeoHlA/cSC2wTaoHcOlpRG0RXOO0N5gQpAT1iecHTOBiwrVB3kHs39XihPkFSwHGJ2kHqGbYOy1+sEh22C9TUPKd1x3QeX9TBSa44qaFzCqSp6G9YfkAovCXU6siDmRxa1Isjsodjb1hrgbR76K9YDniQ9w7bT9SlI3eGXqPenOiPcFoYzGJIGaCvTQqP8tlhO0TdODKGaR3PUR8cSQMcZ9RwpL6HrcFyzCoxYXtAzY7cBHten1FfnOQlTqNR5yaQZol+w/IHwr/wdoZ6dOQxvOcA6mlFRO3tWzbq3AbSKvodS7hVYo/tCVUrclvRgmojOuH0zWAWR8oEfYNlco/yOWP7grpdkftqWsct6qORNMHxAxVD6jfYTrCsyiph2K5Qe2NN1NDz+KFejeQep7Whczak6dHfsfx0whPeCurekIe9yaGi3hkiCxxvDWv7M9Iu0P9jOSwP8j5i+426MuRujz5FfTWif8Ppq8HMGSkd9KXR1zk8ykeH7RN1Hcg4mNZxg3ofSOrg+IJyRuo1bBnLl7JKjNjuUBeB3Azsec2oz0HyDKdro856RpoZ+heW3074Fd42qIdAHgeTQ0E9ByIjK43RtV0g7Qh9hOXT3UussL2ilkBul+gWtQXRA5zeDOZkSFmhH7G8uqdxOGD7D3UXyP3S1OON+hQkrXD8C7ULpP4P2zmW/yqVCTZDTTyl7Zh6fFAHSAYnMZiTIw1ox7I3AryBWiEPanJoUC8QcThuja49OyOtQy+xLMK9vCu2PeoScqfoinqDaMPp3WAWSDHo3ujrX5NH+ZixLVA3kHEyreMp6gMkGRx/oAakrrAplq9hlXBsI2qG3Ezseb1EfYHkgNONUecSSBPQM5Y3I5zhrUM9Qh4nk0NGPTUi1d6+PRtdW89IW9EfWN7NvcSM7RuqGrnt0QnVTrRw+m4wSyBlD32L5bt5GosB21fUbSP3vanHA/XRSdrD8QAVR+qPsK2x/B9WiR7bNWrvIjCdxx/16iQPcDo1dM6BNAP0C5ZfRngPbw3q3pGHhcnhBPXOEVnieG9YOwTSLtF/YTkKD/I+Y3tDXTlyt0Cfob460X/h9DtpV4DwcN8CpenljMEh1HMIsfeUcsbgGMY3tHoMqZwxON+A+UUEPoAg+J5GjiORI5gdVHlPNGcODiiSA8q8J//5rOFhjMyo9zDiPVN4HBM7Iu9p9yjSPY5BFa/iUM9QHkW3R5F8T7VnKA9qalS3B5Xt+WOpwkPpBRkLppeyVZroSUWLGDdiqsWuBFkUekyso6EXnqxUYxRTV9czsi+YX8ugGD0IBWcpg4pG3yFzYetbsZHYepGnPhqMe7Hiil4RL1jXy6XS0ksntWTjVky74jtBKYC56o7SBPhI4N+CgeREMEPQQUc2EizBOEdbP4aNbZXklLpVRn4ivG1iJOfwJw1qnKcnLdW6tQQE0yYFSDZsgA0MW4CgM6UpYeLbmyBL5YeYR9Y6A06etB1YeUDQ/ESe6HW0oLzJYZInVHdH4o2GLV9zcLIG0efuBKoLxp4DnPEXGC1Djjlwo08jkD3J96WJCzHTUWaTb/lnjuqbKK3Mk33D33PwXMWtH9JKwpOVEI1HKytYVtm/eTs5A+Y5i2F8wWmP8bgL8bDZ/3IBuTb3/CGTj9PmuagjJeMyKh3Ry5wmG41loVRpH/zhKPdE7a+T7e1clfpHze+3JNLjR45hTecuKxebeSWvReQ/kCxun7NHu6+O4w0q9LPKpJrqJj0+S6Gfsw9t2i4pJ9ujILUMX0z1ofPzjI/DHJFqB/bjr+TU5HT7TM+3ou6F6GeeQj0PRXUiAnsX4budc3nLbFDU6GyR4jHRJIYq8vQG79DjNOVd6/VAIeSLZEG+40YswXXDGZ6sRJdDpP1torarBTslsj2c8gEs8wnr94bNDDiQ/O7RVFnTvEQl+Un9PBme9Z789dICxzaXbCS8XB/qRgXOywynHSm9p7M6A8ynqzuuMlBdVIcFkr8lho9tCho1iGa8vw1wYDzJvbNhXMqE2QVAIWll4SS9V0euxRKvSXaM+p1BrWM8syZAWuxmps747BSsRkHht61cv/61knJjmQJ2I6gZrX6i1TeWp1PcJ1fNgkPwR/qd5UuHwBSBK0WltSSaKGC0IY65Tc4B1XDT//49WliDSwJFDA7fvVZuAJtrzRKr6blvJwW3ngh6qgP8yXksi2oH42ZALcZszGUeayLAU6FdXQavrG3HcLhq7IQ/Cl01OsWxx0xaFIBgs0Lzl9Jlhqe+zUdzRNAPvaAZcj0TaXvUJlNA/SNpHoViRQk9FUpXpZVveZ5Er8wu/rrmu+ir7SkuBYPnVdTHU3qcX4+Z1gm1qGslk4FWouj0LuvhsxZtCvJdyeUsVEiiXDIopYgvNeCy8qlphiiup45zUYETqnD0bLR6bBfd+1mhWnOrbvxCewhn/cncxwZZJ8ADfP1cTjobS/KoKml+c+d3aNu73gSnR5frtkKQaeuHhV1ZKJIuWCnrIL2oosWy8Sjsd11lsC89aDfvw34qQRfOPLr06qBOg0AeXqbSEkPfeHSkYMrO+l1WxNF+qhZVTtFEpxWVFy2E6dKQD1Xar00vzyOGfjQpiK8nstaA9CiEoETx3vrbU2PyrFUDdSgCtPiTgz2cqvsD4Ll4a5/SJBrut51uwSBfm4iwjpNiwgGKpl3p7TvCBUACNKXAh6CBQ/Wb5nOaINgGT++KigjERqSSeW4GH1JcHQlCN55QHVKFgFPjZBla4IlOywhHOjHvC+urgx+klTUZfWnV0+rGAqOJMS++lLLdetXzGp0mVvPMqk9xFwHbZJXEQVNpe7CvpCB5eytChbkOlUnKzjtR9hB5TySE8xxMn8GsKUopJzGZPYLlcEXN03o6XxpZEllLYNn6TU9J+2d7zzDuNZSV1Ng09JOn2qeYT23Q+yotTqWAWJK2dMBMNZ/K92M/A+7W4b7LIl9znX2Lzognj/F/HfOJcjcvcb08EMLFb2eWgcRIHG0zL58j3gO0MhNUNyRxV3qUusb0LLx/bXI/h1m9BExGtahQ2mrjPSVLBcDn8WgAVZiv2JwlR9NKTkrQ4n8k/Pb1Pd3mbcO5isQhiil5vcxURje2Yw8Fvmrs3r1UC5XpczMN810LmaqYcb2+uY5HF5+NEQjJWcpNrV/NJsrSz8JkbBdWIiNdQS4Z3gMiUYJcUq83ZdO0f+dmj22d9wG+k+NMenrO2ZzNWfe4pvnA6v5QwabcnecO19LI2k/rA0AXgGwABwCnDsjjY1PvDNyTq/789k9VB6d3Dvecxu+sjjxeJGxOOzXsLmVstv+eVOh9KIZO6xAIuyfVJh2ETDaoofWxM2nomOuo5Qguq8qFzJPxKcJGxSZ9SRvr/uzJ87dD0uG6BOxsdH0kWRIfn0UxR3hcdcBy7lhXQ5W8IglDit8moBpFVqDLc66niddavBdaXyxaTkqSxhMBsQgmMyC+5Q8Cr9CRrJYrcVsd/rq49+i/o1vIwDDxdS0XI4fN3HU0ohgm8AUr35VBJEUcY2YyEM988P350OoSeXr25h11Y1Umja9MBFekufWfCmmzicW2pVpGmIQCVmhDf961T+9y1IKZyPHhTl02sMJHKLrUbq4ThvqsYiQRf8BwgQYGPrKt9WYStJzf2KaILMyF4l+ZVkBdMVZKiYrqWXHmn4r++cRjtlP110yg/ydxCgnsHWVlUBrVm202DlMjfQfJqYBVKpCe9+BxGGU3nCZwfSGAhlWxp3FQB/rejhWaAtG6cXgG6YAtc2Ke/BRmjG2YTy2og4tpYZKZI0alUKeZZASys26g4qyMcSnsWwGtjBGvmkaYCsWs9oloPxmn6KJgl+KcT6F8dJ7xZxNm0Pa1/YLw2h8l8oLzRh9xie8LcCkUnBrzbUJuESSLYJvESevXwp2mwKfwgw8Elv9FftNsEkX3QF6ouFkhKN8SyHbkrOFe9PlGUSuNU9LGWYBkXiJUNCjqpRcttj49nWuPje0YA552g4NTTz6kgWe79U0uSg1PqnzU+S/scs7Gna+U3YGNsEVLy1SKtySuO+p+UxJrkOGpLPELXN7LWhRWwxM4ghCPsvRubHeP8K5HnHXVH9Nq8bjAwWRl7GjHc8ynba6g61iDuZVLT04P66ZCi38lZKmBII1/+0r9l/vCGBku/G8jfYxCrtPh0/+yfsbAPVnEedGTlJPR4N4Nv+ihcToSo4B03rxcCyYxSSnnc6pATLBQGjrsKuBykQO1LZZKY+JXYw0ibPy4VTBhUHlLe2OZF5ZLtQwmalkb6hHyRLiVQHN1pr21u/gRg5RAr2kwF82dFmzhA50CRJFStW6QPxyUYhPxde7dqyGOnfsPp6/eRHlhTInTKkedYc4QfyUVOy1xfMmoIeosWBATcNnoT2ZaOuz++dT9DbidMoH7ThQySPyrtf2Tv5WyBMro/sT7IcSl84aI3EoUjo/uj/yL0SxcfiTcHS2nvlw8MLDf8m5Wx0ewin12eno0vjmIGVueNofvfnnq+sYWJGlP6CWkLOTdXaiu7uAETOxBfzh/S+AE4OfpL4zrC7/V2gZ2wO6zs0qKdR5XAC69138cpnoX9TgBwAUAOsPeVtjpn80PMxlCN+7lR4HZ7m8TK2Xy1+0+TO7jUemDE7CLjubG/xfQW/h6XHStDS4hMxlzTfri98WDNnpzkP6BwVGvvHAAyjQuto0dnNCZU30ZrjSODd8Dstf9whm+8PoMn+zXh6CIK7tPlka1/3HGuCFgl26/c/Od38JtvaXmEEjKo4BiffOAKWs6V8BB5QCkDCyO/1oNWoGGzSv134To1n3jM6ZB8/+AFksrDauJ79kz5qeNKaRtsVP77qJozK73UAC+8flUviS7NvZvDMXP8X/Wpzx0fdnZLv+VY8CGFPDyh25BtqPk2wGPSb0RFRiOTeYW6HawrPk/hTlC0aEO9yi/HLjZUtmZ1iVxPqvGF0g/CFtsdQ9ijev3E6NKLd/z7IoFhqp7F4WtJfZP7Bfu8R2XDcdz4X/gDM3hxxP0/f5L0pHB+LLJL+TKhs30fJZifHLpgp2ezbE24s13g1zOEGnAfqPklUT6lcsb85ALqwANErozYa8WYoBWNDPQSpzGeTknynGXC94vBwlv1nh8GmfKHDrm4q91oedZa/ofti3+5XoRlKT8ozTDO3VfFmHTUaUtWCAh8E5f+HhoFGmFy8VUaZ1KSh+5770pB6i+uDgXJZPBL7pcSWQtc6KhiJNWVmKq84+mBvxWwbTgGSCyJGIsndMOnL8z/loHObTcHRM+3aAXfPsDW1Qf8vIRRv8/R4J9Orr7MnqqLk71VTfe19TmMcFXGk5QuYzhPPFnBDDEbWqqIH8qxGYaYdgpQS6PvGuqBhiXFJs3EXtdZ6fnejrF2dH5MfVRb33lE7YVdN0L6d0V2fq5ntw4dFnpfMlhNtgP53bzZzQveIfKTdSMpuiZ+wTW1L93je+cpMJyk3Ta6eCfTdGv/bnEoyxjn7MsNtu03kXiDwGkt5d/G/n8v7/jFmirYC8u4s8WJ/NXxfXRfXjym+0P6ewWTUTzhh/CC5AUXBexHpbATDGp7W/d2KLgwlI50lGGs5StU8QX3o71w0JdJj57swTiQ80QyBuuPcpYfpfIkgSbLeZ3DVxwcC8SX8eFA0fI+uhmGMTP0ndSPOTPel94BSqgKud16T237KKn06zcQEuw0659NyglqFLXzFKB1bxUmYCedlss/ybHzwd8ncc3h9C2dx/K8i73P0c34jrdDAPnxEb5msrT/PonDbrrZ2EAmmnUy7f6N3+Sbi/HSuWbnxUtxGV0ctNn9TaHicaEfWP0cl7Gukcbw5flZARb6WX5J5pcJ24V5Uurth6nas3e0g2JAY35qULF5DNir/Gn/z+qQYSRyZvyRAcIM2rcXJQRGRm/Bf3Zyroi9zd/hafCNJmbLtF+b42wqr8iLN3YmN+8OxrQ7o3Wzv3s9XV3XVXrWedhCu+wLsXr3h2zytiOu/HGk31mhy9sch0A9onbz3bxdmO6fasG6gdXbg/svG0mLILG2I47TTvVeU3YedeJP2932NN9m4Gh2fGMqVvYl29QNRq7HcyeczupwY6HJveL16zvyMjOR73oVObmx1KR6cN9TWN087z0glxRoKTG9KYn0sHa1a2oojG586QRuFpg5pT/aU71vtSY33LhLZldSzNvUex8evbvusUi3PKZdGwTvuXzf9cFrrvppW7D3jhdu5rD5varXcRGobFy42t+DOFmCGoyN37gwxE3zGgTfukvJBu1gWF+Y37RdBonbqdtjgpt7iazTeFGB4DNXTiXeMH8dAGXlx1gxat2ydU3miroR3dHp3LBmUEicPvzp7sFkfFFjJe1hB0LdVyeBcCcOxZikKNua2Bxah2TNZg/F0hfSZMWx99Qw7KsB47wmmbEdA4daZRK9qGpGULKF4kZFlQwERwUYtFrzGyInnPzQ4eQzsGw2PDV1Zi+e9Whaoon9Y1NB7pFHgk4fMP5XlekeNTVvzvguR90NxgHOSPa7ZPPF77xLQrr1+lNjAFmKB9/tEXDLF6HZzzw8/uF6SE2WXqdUpigTk6KcowSwCgTPjj6hk7sSul1H3cBtwyuNAdt6ggaH2Ovrj+txN+s3jr0JNLQhH0hgr+QS+L1JlphqRcAv5FT/NPa5ihIH+Y2iRcp7NywA2CMc5GcXmRhx+Dxu5ZXDIQglRI+U0Z5/vnaG1C2i5QNi8nCnCnJ/L/Bbw9jE4fP1pNagZSVdLinggwJU32EipqliIfwDJoV9LNWEWsOSzI11T6DT8BTRE9PrgtVRJJqWnouLoFMADk9i6w9WGlUWUmHM0aQMCh0VtBhyMj3nBE+nRJId9KI5ScTEQ0F2cGfmvJ/QFFO77U20iYCTQpy1n9szkzfAqRnXIzwGYcX5XTpJomVhWgN0SmrD9pFQgqZZOSseb8ZJVRWqZles19aQeeoHp5zPyh3iphgSanG0d0Ja6IvAdLTZHB8OukjInqYPJa/8XFoUU4fqX/syoCPYJ2yekumXjje9j1ANYP3yKB6XR9EUUmXjDNEkz1kl2zNBpE7BFVUq5pJ16bDic4q+lmvcgL2NRRqFquLJb/9bJn2IJL8N8HmHdqD8S1fJ3bmwxMWgi09Nj85nuBp5+93J9nnV3v8zMyWaJnb9Jbzlguo2XdwzeNveIzf3Py3NuRU0RUL/m2o4skhsVJ3Bxi1dqqV80/rwpvRvN2cU3+aYp1wduxa6csY2QP1G4pkSyAWlaW5137SipezNcqYvm9OJNJ3QzShFS0H6q8yKWnItd3d2v+xkvVWzYuW0+R/FRLNUFNmyl70ypo2bwDhKNI9cQN9uCZzMc/1O6BCITthbZu8oC+qnZgbxA9P4Iir6BXcIA/vLJjs7+kb1Csut5/dZHmc3xfXoBPhAscrwGv1l1ZF6mX/U8BJYSukbslt+ZcCVMQ7I/eOwqXXBnc3KFFPeliBfSMvluyuL50hL9y4bt8otsF9l0wIh/bYP4vzjjb6pWXte2oJ75CiS3/C9IT5fX2bJnnFtPYxDWkt/vN/wIuZnvAO5UDazmiUE2JE+wct4VwxS4+YjKIVCLuhdf2/p3wrd0GeqZKrhDPs98HupGBbuv1CCmInxEwsGDWITLA2N8BwYLBowEveEOHhEIChIyIlsyCCHfYcCy4oTkeXOIj/qHjEkIsp2J5mn9bYA+2niXCrpQEwSg/m+LjrkrS9mymyD46TLiGTvCht+ClqxeKwBvoi3TuhF2Knix9Z5lPJ97T93pyB1ebiithkv1nKxAR2XLC0k+78DuJivdeQ9b/JPrFPvamIBNEntAh3A/L5EeTBJS8O3iM70/Yn+Pkvz74fbB4TjIYN772l2KJoWOB1PES0FOqU2AddP++W8QSzbNflJB5zkEpctrGnPmkvryxA+HYRSazxILJbZcQhiP7eHHFYNlkrpl0qinqoI3w+cTsA2JuCfWqlVKZJqumLzgAUNO3UpCFfPr53t6xhRycGkE6xxkYI75MXYoLpdzftyOpgEgQzBXqslINCOsbG8Iji3hPtMCcr8UksmC7ub1xZ3kyCYHa4yCNwDMMdiEnMjhhpzKfHDY2KqVpJM/LN2zgkB6tboLlY153oJyUlDdqUhrnTroSHotf/YEiox1FBfXp8lIqSqrpd/WZy7eH7zLVJ9opcFypEGq1INzEaAiNOzErz307iEg0CaLeDAdW0c86wN0L0mmqAoOS+px8KB9BobTU6IcAwyGGRn6dIM+lQdqLeivqKj7iFvFjCsJRgum4R7313Z0DRyXllRnUVVgvXMmIGVQ4q4MgRQD4JcYgv3G4S1nl0QbtDKGt0AVXZE+gtR9mME9nsKfDLjSKfLpzRQ2qHDssIZdP+5L+G7ZhEM2Wgd3FQwKFI2Wof26XtWz3dY6Y8btCjSe+uB4AgXi0TYsuZad2qQpLqVe/KkZBBvApPM7fMt2OJ4KDjWPFU+mdMCGOG9EHnnh1rcrejLkZwXTZ81Zqnqg4nMuM+U5Z+QqFyFG5FXMbDjUCdURiApENPDuBNIlAc8fI6tWVMXf+79BshOtuA18AiD4PNI8S7n52c99IwBff1HMNzo4rW1n7ROrybKWDnSn1YFJZBcl0HcbymKm5krFYx7MhAI51RERrC4NtUR7mhWH7gLbD0mN3LIQZvucJCBjAZtgxw8H/UvdnKvsBIyN7RMyY58awVezXbDKs+uRBVMvk4paB0HzDX1FNilGrWVSkeQqqUWDTbKYhGY8KUuSlTVF9WjF1sqRP1FExyF8LXirmQKpXr5K27s7jEWUC01XWHS9NxJIKZ3wUzFcTYm+wV/JdLO11/mgrAQ/+qGV8JncAjcRwCxRNYRpIJlZCtWHKVTEj9psUTb1sEy1RJFJ0v17qdy07kqOq5ZrkdDu2NtrZQ5zgauNswUGr6S6ziT1D4lTXO4eOlq9q1CtZi6aUQ9MDQ4PRgzyOqlIldFQoMJNmyV7/vg5sKy4Jq2VO5/uSR8TBGQwsKmMHy5diDUblx2NUkN5V1YES8y6JaXZO9JBqgdXJCJTJQXgnQTYn6NftBoQqQtWkeIdSpZDH0WXnGGIkVcrZkPM//tu2coaeLy0iI2XgDwN5cQx7uIoQiaemQ/7Hr6/JcYn9WMT3Sh5GBlq3F9Fc44iEJtlZNIeP58mH0s2w/o4dWDV58jJRJlr4o9PylFuih7pmtXrWamWIVXnJyTZKY3YkgdE9RGVl20rCLtNdEnBHEmh7S4UVNq+eoRhtpxcO6PFEstyIWbMrX5evpp3+zuuYROono4uYdxCNX2xkDW+spw3dQ5FqP1rlvpPJXCP2UV+9Cch5jLC4ObPTx6jsTBHN5zsLEhP/mqfhjwVYtRiRWFjQiNzAsVyxbyIM7rmDOKBAULUj8iHBskLOlBpKzqQZO8xT/iyDbAKn104rUblc2rFrbzEb70DqDVkJU25QWOe+MjD90lcxRZUw9cUlgSzrzYkxqTGV7jDWpD/SRshMb7iQKOxWdHpo0utx9+tSGVgiCNsxjwuA6AyxNwMmnUtS03gl4idhzVIopPy8iN0sOdv46k1znNd5Ff90nr/UuOOyl+b1RjZ4egRNLUJSzqFpHw+UsF+N+TQXPHeeiZNhwqzPH+NqLLGRRTllcmCDiWMDEkJYXoOOylWYfWQW3BI6NyJjp78bjj8fqiUOqvbgZWNRRw0prkjG5ShQWZR4ZCx7i9gn0S+ZAMRl6d/njrBbms+jmehNqhmBZFq+uTD42l4yF+G+qGBXiZa6p2dC8+jop7llbMyRMoa6jMB0Y1X5gQjtA3FIXNl2z7aj1CHCGTRy61pU/RdGWkkqF29Zk6YK3wTFxZOPOwG2nwW0KgqbpZqw657u9gfXiGWkvPoNuKrUAqU1STqgL63wNkKKVYc8U0ZdpRV4uSM6IDTNkPbOrLgoIvZrEJspzn6ish+GtS6JehSoWJA632aS/a1THMMutjplSng/adQD/mQKPk94UQG2YS2WLHXXrHl2BwvlMRahuogMThmtlyjVfpFyj9hSxChguS8HImC++tJWBJhdfHqSZsuPaomjCc9veZnMb41wlhYxdxmZ/xK3knY5uGbQQ/wKWaOhjSCZvOLqwMVjHrF9eZm3pGGGSCSHZMFYszyV+YjnAZdf1V+5cDq5OyVoWYD9wua7aZlXz79OYqjYRrVLeWJ1X9voH/u7y+RhXmJek9F3K7rHF0K9XYg5cDrd7Bgqp/jcBr1KLQmEjtYpaDXmd1eDbPbqjhw38rpgpytzQbz63FiRIX4c1laK1s06B6PWG7RPhaHVccffs95f6TCwsF2xuk2+TCJ2yHGbq8bR2idHUQznNXgI9znkJAlaGqdXDbbtBNYjY/GBZejIkG4v5W0shTMCMuzjMsSv45TrY4wHrisRKLNsU5qYzOTX6Z6Jq0JEwurSskY1KKpE0rEETWaL4DKfYbkHKWAVRA9HGOHwx/X5hRiKB/qG4cGsbqaeu6H2BX5kQBJGmaZvaGVZ0LHiWXifOC5Uq1QfarB72SNiVuTbJeeWGPVVmcT1fFoaN3KdQjWK6XhqNEtZqwt+JAbr7CTCYnZ0zH6BGlWgrPX4ECNjlajbHEAt2q0dJFYTbCE8OnBer5d8Nb4q9HcZkOX5SdAqUt1R3u2I0eXDBsUgjmL75t/vOa0ACMMaC3wFnLqORucCOvTCr1Z/ocxYMgcTgwXSVSFtBCz3MHrIA6GVLj4llY/bu5o6H7/gx7H7izZ+M67+MxIZi6uNQql1OVWaB9vCaQNvQYXqNjMExU2y61J8cC9+6XBBhdg6eGnjGq1rq8ogF6ibuQcf2MmhNXHVLxI37cD7C9QjapFqJCI6Mhi1tUJ1Nao1YsFwAIZKabGfR480HJB5n9K0JbiucX0PcwsioRQmm6PC8Oz7JIO9UUvsDxRN+eEhqnP1kZS+QY+/EQzProSQNTvI07mDLB06HyP6OJlc0dGHG13Fkh+HkO6hHVTtDzFfdFBVdqITV9DUre20mKOpLWo7MLbIGgYmgCLQudNAy9sVMHHXCmGD7xUM9LxgayzET/ULyr0d9L2PFEFTsS9OUMWVDGCmFbBLSG5tIKOIsQq+wpcNqTISrnwl75TSUdDK63eDTjFwZ8bbJLnNsAG5T5dqKpsl6RcHWuLJXv88ATxHkTUgT8ElP5BjQDorVNETH8qShLc4+/aKo7EkeMbhQtvgZYHL1FMnvYFJN2DPT2uzFrMkJVsmZbSSExRNE3RvbTvQh6QDT3UwblQ+mXKPNU4lt3SMtUAtiE6EoBKvJxYgAPdqrL1NHTFeZ0EHA4SpKYMcgudjApz1w40d+Ch5D2R33BpwMf1aBnXIyZxX057463leyaOz4cALE+QmBKiCOOuUeDZWs4ZfSUSGotVnKULb44ehKtIF6CEVSaYijoMynOzqdbKlN3SiQ8Rags70wDHCuG0SbpfuO5rtTWWr4SHEt6LqnH/eAGadtb/wUvYQRWssQQxuWPoa9NQBG1A65yh9U68dzm3Dn5WM9P6QCRi1zrJsYAaPgCy+N/e267txQEOVvzMPiZUduFvEDsbM79/xmaqxW7P3icOgCLtrzPY63bHssfbrF8doKqEMaCe5yBTEHq1rsgcX3zySd5MaWJgOGK3lrZuNBW0sxWCkkMpKLb6vReWxIWY2VVlUG7EIy7pSLpEK30lP0wURxiFq0igE4XYzWfqS0iFVkcVlIe2JUd314jXqCcsCX93YrD99aX9jvQgh5gNRYFOerHjJnnocDX5UU/dz5SCw90rxjaJVfL6TibaoOsr69eBEhIslXncgKF2JHEZMU2bZ9U5ZHFXlMtcwFtVQj9nmtRpBsdLmWnWytVwo+ZRzkQLbGeiZxu9EZjl08lgsCGFva0HZ/fKQlIuyoo7nxi9JIBgmbPnQKza5kt9sQk6KRCfFYCXDBPrZiZesjOJcEDO8uFRSiWEBgWjL0oQysFkxmSkisKJp/YjnFYidcTpAbsoZ+WMnNzVkowaN6P5X5yR0wtpNt9XaOmeJCNoQj0Xr4nvgto86pI1AhDJyB6rPxfn5ncD4uEx5T5XSsZxV/K+xu0VShWx6dURltNrnTylVDrhQLeC1+4qU3cddMTOqSa6eUq5I54q2T18oWGXcH0jYpMchWGAtXJqD0AePUuoC/wsqGHSveWFbKu3nZU8JskZJl0rJ18U8bmUHSb0IV9l+RJxg+K1vNVejDzlstO3y0zhDtRgP4zXRtzVsbWMTIe+fbqo0ghMRfm4i5/3eY8qVgLDNUsZI0gUkyYZTajCQZaviiCBqy9GuTExn1YkR7maMenhMFgHUV7KXH1yL7QAVfQ/uxDn8YmKtTqOn7wA668VC/LkHa7LY9AlYCGKLQqEr1TC+8btkJp1SftG5ZUrWhaUoUwYyyI3L2EGjQei9SzPjhFS9ptXVyuo+V8a4/zdrLQGtWBIfTOqM5WG5GJyAOUdl1uvKAP3Hu/5JP6cwdBt8JE18MtBr5rJ7v9c9Bn40360r57cJQSE6WsVw6eCqGaav4QqiPO2T6c74/0X1ex+0D9dwxM0APCeQi5F6ViFbGOS87aRxwZoSpczUaDzx5cDPYvPxM45KCgVHrBMQzOdKwANASyjliXsES+1vzKhNmV8NovXb4RCLDgkiL2vYEZCwsq6e4JckAdN3MP8ddP0JO+2eghUf0czJK5n+6B1M6Z3vSnLXgyr85qVdyvF2qipxm1xgYc+JXDCA/6bt5IpSYRL9ounaXANItsZKhE69vy4XegT+uByaHaVS9uBoG63Ou01s8ChU/dH7t36BhFHtyKq9E6XcA2mmJKARWPeOR2g1UwtEqFDpJGk1dlnPpyzp6kr65RQqrgwf2gZKSCfelpa8SXIcaY6g7C8HCpUhAdsZCxKVwpELCob8fS6GtGNyc4tsc7mUrjH1zbGiP23NdqnGCkNEqN3ZIYWlo9pLXPi+RrXyXxiVVfPTxYRiDMu06tFRf/qLLjdarLT2PrN/7E2yR+z1K29tme3+S2L2Ndg8+fRza+ZPG7jwau/cI7B4dK4Taev2JcRHGMNFibCfZvZEINDWVP/2n2XwKHth1lIrr2zKOFkrCohy3BqLPHczljL5mk3WjaHhn+txHuWP9hjc36lrNePd0LrBFNLXTgZfvb/HkkP5jcwuPJ4AFBwMXZG0SPO6ytk9R7Fxn85oS8H4H4al11TLihp27s71xccPlTbfcMlV+xvkIqWGasUCAO4yd8FB8CEksdP+3RF5iiE0gW5GmHqOqMMXcvJeQtZJB8zETAi2uxTBLQxaMCAVszGN8XYsRbyhEOSu/bdCDMyupUAhhG1jHAdI3s1LK7Z/MCJ7aKOXmPogntK4n5s2/fnp7TFqvzL0ObktBEaGWPrsRotkxqLKCsDnn5rlhIvHynuVndBw8YswBdsAsbn3uyOz9Th9N4eymy+dxYcHMFWfJ60NYsvxpJ6aueFijQLWg9HA1fb4m/8KtbYzO1CPC9aHcJkB2Xa+2rlFISgODy/ic+qNhx9SUWibwBFo1QP6kZXsRFa0fsxOSbEPIc+sx6llVAgYUkzwffVqtGofyRklLRjYrcdWilM44XRHmHpBsiMfTn5UGm22MtnYY0u6kcq4Sc6VCwdZhrztoa1VuN5YMXyBWaVTjC4qTTP/RPPAoDhBZtjy2xsBP/NZfo7eWSNuQvRQ+VBFxXl5DvmAzFHJNNwQ1nD/wWC+9HZEreXFIwUE4wdngdBKL1wo2l1CwJdrikjDWqLmze9kNG0sb0rBo+uePCvQPUcTX5bHs6saoyWI3P+MapF4ciydrhkKTlnGDdZN4nsTkSM11IZjChETsTEyBapwqFrvGXnsYPqWrbXnnpMNGhc0HWvE02jgpTjJ9CHxAvN6Mibxc7rLYkgTT6yc/AFnGGWn0zu/m4T5s2+aYwoBf3OqDSxeJl+5xIYDIZiUxcM1Up95JVwzJuE9G0ddFFO/7+xBpE6E+S8TudPl4WLJZHBer0caKwxgcXoSZkKNtUT9oJA+48WZpLESxkSU5wSN95sRRuG6aTy1dOTxqn7V39tmaoTxo9o1TKoPkps8wDYebRhtZBM88uCJ1q5w7MOvk3NR0yoRrrtxgZWPWala9U57zRnKui+EWQ4vlBp10qZJ3RLQSx9xsvsGkZ2mYWnyrtLu9vCFn61FaB9qgO2zIoBFZPTLuwtWclb0wPmM3PQEhHkHPXGJdzpYVGYhXDpYT5vKKBFaki5RaAV87j7vksqveNp3UOgpzHCMG7YALaYeszjUEwTMbs9c69cpv7gaE8tBA5ro0IZhevTOKxIacz6Z/JHzVVBQ0m0g+emAO/JJK7OC/XED0wmZr1Wz4LIdI1dEwjBeewfzYwWQkcgMgCnEujxEdc9/mQjqMCk5ldGQcsH/sIpgYwDh4lPRGDYJAUx5ILEhrdpsFxgFhM4sRdcIUTyDuC/HS/8jkM7hA8qLw2fPr6L715Wi2J1sG6YHcG8JP8jR+IzyU+4QqUIqtvioECOkCS0B2HzpJ+qIzCJYH+D4kWR1Q51sbcCZ2IeQZBOcJnGQdvEP1WxOzqxugp4Q+Ddcr0n8nkns/eibXaitNnVTbyKKeAHsdubloySWG911zX8OK+5biQS55yT63h1BxgvCPOcH/1yI0CD/qMYk34Yf3rF3M93wQVfn6xgUw/xiHUcImcgksUVP/0FnSN6Sf5cL3j/X6kQpI//TfmDU8Ev/EyuhP0rHVJdDYL4/47i0SS7WAjXL1hNzY0Ex3GMdk2MTiigbwNUMtWqbJOTPx1SXZCeumdtpOfHniXZbYYMwaZtp8h7ikMcrgQ0jxLVxc4hUfy67BtuD91YyOnrB47gk75EVsHrCcjNTSfm2pZ9W5vG2PTz00LuMZnupLUG18wtXetzcJBsfHntFFJbiGWa4Sjyk4u9w+9oaSkdp0Ca/Wg0reksqX9kCMxiQ/doz3KFE5Y7eIIV3WIybpkBeWiTDZ7AqKpX/6IV5hrwU4SDIn1rIhW54NaiCdr6qhJhKryfq/WiB9moIHlV37Zd9YaMELJxXn2AkiYfW2wlXFNW+z7uPknPfsUTNfTh93myY+ljiGYVSfc4Hkw/nyVsBDI7cQJyx+jI+OWMQ8snVhIoGjd8vRaFb7Mycd/gpXnYfw0XIvuuFVB5/NF4ocM2s0F2gaL0HDZX7hnVl9xwxmeGqQ50uCypdfmfXLqLQnmvfx+M64qm51z/sJdDRM07XS7RoZsA/ZhKD4+MWAMfw7R1Tofug62SINu/zRKUVNzNbCSFSi2z5IMg+DXQaz4PHqczbbfNxJcqn49rEwQXm9Xz1xKRXhXaDkY8H8yXZLCD6uY7KUcnDYdcISBwMtZwC8R1qy7SAj45HqNVTNaGO+tKXJkBQnfr9FJi21+Mx6KQ6N1Bla2aaunkePUz+9nyjDks8PlLKgerdZ6zRplY1hQdlIbXuLiYyFARtbimf4REfz8k1ptvojKL427L8sjJlQqmaqGXWoMpYJVkdWVfiHhaSjASNcSS5FZzFRZ/yEBUrAeykA7+i0Jqw/IezenzB2jyMXg4ZaaD8KWOcyuu4b8rwh5h/aj81UKT920U9p3xA/CgOHdqZZ50T2eEDDPhLbf3SL8m0ZmgipuIlX8LTWANNZZXRrbWp8shC9qWLtSGYZiAFHbKGgQGuo+FzwDm8kmTBXX9btH8Ieo5Djfmnsb9b5E/+GR3ak4iaOF7Smur640B+O/3ynGMPcWQwmWjvLZsf9yYCsUHdlNnlN8sIlRNUA90gSYi1puloNCdKRPuR0dzdx9h9kDi7ZwZU9uKoHl+HgCh4Me5DMdbGTnkJsH8zcOTnVn+oc3zxEJ+FutiEe34N5cC2zlFRF/355+GcUGTTGnPMVBh1zZERI4LBXEf1D1mNF6udRbHXAYgHEhHE9pF+GbWqkMS/7KrLHq/5mTdxsGY4np/fdYYpzyDjfP6unuDS67bCIfjJolUNO9vFv2qLCjw8oM/+2IKMtpwMn6ACicUHfL+T5hWnOda+PWrfUdM9sD6Ypw4V4EfV2HqCyFsrM/1UWRSyEJQfUEu6dzL3sLtLBOzqvzh0QLvemR9bLpRWIFO3VumKnBAYDE+pFDqaXBmiZwVlsiuwNuyrcXyxt9VgNUr6CupgWzvq/MKC6v7UYI0hM9FgO85Arl8Mj8qwl3vj+WMNohasmzczNdIR7uEK4ogcfDQY5+Mwmuq5SbfdNv89DLGKkHcFCBI3LqtZ8jLps5mKVtN4pSI8X/8e40nGoJU5p8jWPiO//AtSzjVeOmfeg1TV5h41JsjMlql6kcn+a2rTRy30Qs/ZO5ZHfjckP/skvt+i/74wvSHDoSM/lDEdTLlsP3BZlHDeXnxQM7U4MLydi7ABhvlAiuWGLouXrY72PXH7hHJ/8I0uyca8fLWbimgEGvWeFa68uabbSe1i1p2vcZi5vqIEGlsVijrOQuk900AZC9UMwwHOJGwrk4HlWD2VvlM/+VayRMmbiTUqGCgSlTw3dMETAMeJLbdVc/jZEy8bgSyuGWFRB3m2krfNbAH5mGz5Ci84fmdDGYsQRIybBx5HYykXU5YqO7KxUOlwW3EfRmFw6RsJiHh4CpIybvHdYPNYFFQQhIu3ltM5evE8bnCblGCktNM+BuwuQ9nbw611gQbBPGLOqAjNBYi/tiQGQROJz106WBx/6KlaMxwH7duqE6H5g+gPeM9refExvHxtP2opZwqFPWy9E97G2mtaCBPTb0KtAZTUSAcnC0/zO8tmhL7Fp0uxYmXM+PJ4/uLoT6PDx1lrYL9TAj52kGtqwF7n/jX2Ze5Mdc7JP/Pcn4QEAnDMCH+txtPfzLOdQAPNz7/3lRfVxsHyCBHO1Ec13Tz0RhDsu1H0p0VyjRfPgAgqwD/YaAPnVl8d026jxXysi9mr2N1xAdXvjPvuCeXbS1ibvdeWDcUxxm4WZPFMtCiXGSAnSKDV5saeVKwoVbrCcux9ZDMwrJA8yxl8TdnAqQpYzvpSwYVpoBqcl0YjUmeRQz19o0oRpYi58NRLpt8FzyT98eeJ82BW4wrXjbl9t581PerzgaGNp+14lkV2W1L2LSjD1yWXZtdJgr6fn63/18FcbDIUb6rJrmvekUuiZnN/4+PWv2OM6MywudjooCJgMHP5sxStoux6T+xNDf1bh7hmplJxkyJIkHYZitfvxvt1fBas8b+75anjduLoe02heY+Gab71vrhdfyY65qZXBz+NRGqJdMfQ59n4s7ew1Tl604hoxmZcyzcPz3hrnfjtWQPVSoD93cSicIgF85rcwzMgbrJrmNCDH+DjW+BWHoo/xVgDrg5huEJrp9B7MgwTtuo7EvkkR3qzK2I1WyvIvnsDweZbx0DbOpoxzjiAboTKu0BX3SjUDJO3akLSmPHe/yIdGXkpdj4mFTYuXxN8bbUD/ON9CFj5ZqUgVXo63LXMROM0Qoz57pxPjm0n8ulx46Qkj7mJfFKWdryLIRFVJ5+yX2+KjzYQk4L5S8xcMI2qixhvmqpniu2ZB1q+D79OrRGqfDyFri1w/t10SIwxpqKS3gJ3wL7wxAuQcrTgsIUARrCVXNpNbL51wg4Qejz5d2mXsM7oJPXvhB18CWvzQlJasmjvKP29knllWAf5a9Mkwtfk196UXiUc9vv/z6NI3fx0E19+cclRRnHZnvgEKCPYqxMdqDtApin+hDIYAO+pVm7Sd3ZP97ImzpMQ4F1uU9wdmrkPW6wcXMNKaOOTiSbFPQ3cjPJYeFipJETAab8j+FK1OjH9zWrZfDYWVP7B0Zy/Hq4bkJLB7mgfEvvMexhGz9vSlHUnaPBGklsaW05k+UUVCexvKotEN3Avn6v0JmFulR3gpnS5em/d2dSKJdiL+014g1a58yEZlyUUq8xWuUA0ZTVhQ6d6YJeDzoDLzJpU53e4zS9OlqY2A3ktTfvuDtf3PeZsfFJoUbtZLSpPM8EBSxj8EUf5IyqemduD8T9FDluMpci9rzc105TSbF+G4EOvlFgGlgjZLrYhDM+OS7KsN8+ivpYUor47v51qZWBCwGFE75QRMyKh6KMfZ0xk+Ly1DCPW1oi//up7Si0RYbJ17F/PNDdCdMhHKsXjojdaLzgQYPSTpp6+Fp+weWul+MlOgujhnvKZ6HSpM/LL1mftSN9pZlsfgkeN0aiGiPPym4yayiQiAEbGbyCVxENRmXOK2SbGuL1WZC/Zi+azKyNi2cu7kz21+FwrQqH07L3NCklutYFjHyubvWneN2XyUUQuxLws7T5kPqmhm5OD2xO6T9oXS/1Kx9B7V/md1jdtw4o0G/cd5DEyM80TLkVk8202w75WT+o+Gf7bwfl+W9XLO/ZTYh9Mo9zMH2pjO5YngvB/LaBXt2b7Vmh4AdnP5Zot4NfTITKvWjLPvOpVunck+y2XjJZU8I2brqHzsH34XYmPxaL/kD1P7cKIprg77PnF8gdFSuGmzDys+zmj/ReYxI3tkd4svsJMj8l0zYiFFi2mMP7luECkQerAwjYPW5cT3wb7d3/zxlO/iqOdfJbXN3j+xrQgbfz3OQIAnDUCZ0r2+gR3PeGb9uqO9bSzVPhMRKl1dWxC9S9oEU8ehoEyjYA3iQMEU2KDjOMqJg/YCIvl4wABEh7HJjziaPWs0O1vtnFBB+3OQWpQ0RgBmq7ezLzewmp+3If8uisifir4yWQ1k5S4bG9mNQLsc7HJ0ly9OgQ+RBfqqk6DsRT3PW7DC1ZFjB4wmY6D4kndxaHJlhABnkSoilbTvHWK4XScU+SrutEpWSwjqEITg0polFgb5Ju4M7GS6Cl79FXHXBVcXeARO+14/xWIxiyXzPj5qOD55/v2R1Jr7ONfO6wXYRr1v4w+7iyYfdbNor/nx40VPyrBJFvit6ASfbmTkBKsoevoRWVvw1gmlFi0WKNfQeXRH4uyISYaU1wVk2IUvWVgueJ3JqFZsiYZSVhICp/Xs2LZhsoArv24T5dnEZva5WvvPslaiGhQFbvO6QosoB/S4L76cEqGOQMKhcCeDh5u01c+uddJIuNIIh8YAL1//q/tNz9B719YmZGrJaxlCBb+WdeMwOuObDS36dxAicDNaDGLluOWLWCZJt0A775NfgRPjnO805HnRtjzorn25vjuh82p9RejWU6kHtYwDOP2uISTpnVx/kELLTHHvTnzHGaZo9cZ9fRQaIoiTqOnRE+02G4YhwmzGiaL+fh7cI+ESsbDWj0UybjcRork2oMgYyVe2eSKR6tGO4g2WLGThRYS5xNKaCIR4ASLe4mPW9kHDMm0Vajz4q3nxTCMOOdQ2D+MGz2MZMFdd0iftYe1x2HgjZWQl8q0xxsOm5Ly79Lb+VUGTd5z0gB2/KhV4+vjIuf78EDcMSKWsT3VnrMxWsFl1hnGO5AQof/GjNvGBsD0+cqx+xAAP7ApQR0DrYP24iU4SoBA2qOR9j133Aa+5f3PeZVrVMguJLWh/svVWJEbu7D0JMDXRaxMvawhj9dlYFVokJkSyxnv3pFCfiM5/0mnN1fVL5tY0rJ4k1GeeFnD1Z5ucaosjPaaVB6JIzZlqKgdmCTESOjTVrHnJsI4SiAWXDcBrGBbqU0yCKD98exOIcGFM9ISQn0Qbmv0eEpNZipNAhLOCPsvjlJQ0NZ+sgl1qilURRUiq+Z5+9h7bFzcu1y/j9xepJa39YiA9T77uiU/40GQ9SOl8+x2VjVbmjWQu27pUAL34H0zTGAZrACzbl2vomPAVT14tIscyzjygS3hMR+CW4HmzXpGyDyQ7CtY74SV+eX8KyyODptYKstVKGYnE2rKinPW8LR1KruGNDhraqsTN7xcGhEloLnlRuEXFVjWZOzlGHhu4JjAlobQ1jUoUCOPyTcxtA5mNpdYyZkbYrnY8nRsb0Ti58C1Bh+YuBGd90FFGuGCmOB5mPBt0DoA1WfRsqOjPrCWCgHqsldrpxc6XkmerBU/GYBRGG9CLr8CP/3O93MvTq8LBtl4KaIraoXp4KpJZmCwQB6VQLK4QNnaQ2WIMHn6WkzaDhQmOCSX50MlItKqI5q55NKZEFsRBXprJJd3UXfxbenEo/xYh5wJKEf78Mw5IIwPtrLKzEjBorYnj/HMYcTNWop9YnmtcTSouEyf0tJSL+u9ybfhSEVmrkCM82/6mlnQOHRyoSM1pZpIGr4oqeltxDmHi3CAhZyjIb8nHrb97drkLSzVRRffXZOuX4rWh2ua3cBZsoGxvH7/e323VaXH7L8QxUBYEXuoo0ooRGmcS/megWU8I2LbgPNvNpB9BGuwW1jj3Od8/uSsF2gSdfhSRDmxE2rBdZvL02PAg+AkUi9Iiaq9+rjGLFJHdOF/Z0ZgaKX8DQ+uZJsZEQd9oqVrNZ4yHtlJpSdPIcFTQRleEmrhjlkgs+453qbn4hxXZvZ93kcO5/0PdxOEcAuTE/EPSicn8188r+XYkj6MZBCcSFdaGYqlfInAbTg6EbKeht0oz8GPA1Nh6c6CCVNYLi83tToCN9mYRvzbqOc8Lor+qiYPSMIPTUmDie/lUGHyoH7vq3tz+k2DTQbkPBkCY+B7TIzmzteQTP9TB54NZwHNpQ8NjOw+qFdmWgtW5gnVDTm0UwGpeYGQC7c3y7MDEQsbounmmgwmn6d2NbUaRM+XOuOItEd3x+m0nPy21wzmrid5skrBu4MoeUqCf84Sm7UEi49yv/wA8+Z1fU1rtoPddbDZ9MBwDqB5POAFWifnftgfLUNZFmBBNPEeBuBvVsawbuT5KNW5Y+3SbuPg9tDSF40K0guI6r1FSdJxeBKU0QOh5E5Xm6qjR8RLGUKqgbDwv6t/AaJ5xWm3JZRG+vxAMhz5wobHnz3PE7GdZQ0h5RrfpEpf4rOH57F2HFQ4p8eIGuoLYHXU+35caQHu1G/tvDfGTaqBMu6bWGa565Iqauqh+Hq+H5KYagsrHCbs5g/tj5HJ1nqcw1H6zSJbRAO60jY9wrD0aoGDi1hDX+/51eu53YkbKiYhpOT4DoBVJu8a0qQm0nCsipsrZ++swTJ1OKMn11kNbyDCPra0grS2fQA0pYBXUo1jQ+/5cYtXJyH/8MNdna5VqQqHr6TNb6TsLOCHUirss4Ha0hUnj5zCq2diik6jKiLtsUp08abhwa/z0FGHCBAy33Kh0vB/ve6O3xkcNnFMRUWeud6En5w5wE84WItg37d6JSvraIw1eVMZ7C2LYWJtiGC8wMh3flU2tAyb0lULRyOKrzFPz+rNeQbXFXxUIwG+jsoga+LPeqpDIGuKGf2kCDNKBFQ4VDlzP54V1plPLqL1MbCr3dJnf0NpYrDTWy8WPssYUd8ibLO1JyrXtKflXaAhhQFMJ9ZQj8Qu1fs8hjWE3QBtEW78ROrwKnMRDs62ZpHulidOvtnJ59a6u9OFTi1OkbkkTkx86UY3t3mnLnP1RHgrpfP7c//L1HDSu7UIVtOfhv7WHrkW3mOCr4B/fnAMHdVxgNKDK/NWC6a2ngX5nphCZbYWc+IPeVCvt1APBF71cyc8f5i1gXEZKjujFqTSQD+YtQPca7Zuq9K1V3tlh0uTgN7su7RUJucgX6/YFXfvRXHZnRJ9Ks96qxBc2et4SfRsHsa3B1HQpTsJJMTgGE6YeeDpgwo9LR2n3EOTrpwYPcAt20qPGdjK2066OU5dreBcUQDdvEIjLVNE0phSZIqoojDxnjCoMfc4LKzou6YM0AhycV829FAWHq9MVrhsCBtG/V78Qm4AbrcGYRYNPpmnnfOppod+JyUszOwoO02+/KlP30el5B1ra32CFhjLfk6fia5VaoULN01WQRtbPGRWEKIRo+kp5JEEFYw/drIVwG2D7t3EXCPy5TcrXTU1jR9/NBICSEiGeHcrSOD5VPMK115Zg3AQvcEOLlgxg9h8a4BtPsWwt3I6NucoSQWjXyQ7oMAC03PUwwPuq24/QE96NMFkkBfSjHy8GdaDMeDbFpINsM2tNUTEAJwqYhYv9LXcaRtc6pocWi+8RNS07Trdg+0yKttJpjbz8VNC7dcnTJuP7ME9RIVp3fNZgJtLS630ljwaGRXTYcpfrYsmLdMlM7obl3w/Az1sSV+fo4yyZSBYyNhirD5toIPewY0Nne0Rcz6TEYYPfRAAMDr5+ul1p2pTVWWqfG5eiYLrBt0nh30bCj19MxSw2i8IsZU1ybN+Ct8X2fbvgh6WOoLhRkK1P2Ffyat27T0/EbBllNT9czB9+ZqGybj5KrHuWyMT/xgQLJrr7j8ilQ5LTO9jIF/UmlWKqZboOIsY+efT4txasFw07LV/YgfoVZjjLrGXuCcHRgNJ0bLF/QwGfkaH6lTfB772DuyvXmy8/NLgTbQD+sFoyQ3a/7us3L5HvhO+RHicAgYDalD27QntY2n0rSPoOL58WC8Vt9SZndeCgqM9bh77uro1eWfzsVj6xg6yJEn1qMTARWjxZrgVKyyN2aa91zT/izn/FkmdeFGzVNQAiWySBgbaTUwYNTT5LPKpEElbFbCZQswE0oiZaxV5Ipx4lqOi3OEY4Z+OPfNWw777OaBTL9jzxMcT0tK3dqCFZBdCuqY9UgBzGXhk9OzjKd3xww1TP4aaCMmV6prDhKA4sijjSoO2d65+0gjQGLQPIkKZFBxeBuHxtT4X+hfrbsJ99p2U7JbkCO4F7f713rNdQjQleoplIHT+4UqSi/hMTXLS62wCSpylj0iX/QAh9+oTrqthQgekVXxUbvSRQEnLgAWl0ExR0DEBe862HcGf8BJN6pea0rmpV83/ybCkNomvRD73/r2ZJxyDm4Sg9QqXCmO7WIZwH0f20lGb1P11uVs+tGj6ER3Sb9O6e1KyBwEaByT0KPHqvYrmFWTSkc4lLa0GaHw56SeOT8Ttv7dplV2WVV/7ENtovu3bVVq9nhj/YzPpIJyyZ4x/ETzuLBNO5ZKKcvz/AalTpx69CImPpOcPn1HBqH17DMk8RX0zzzRDP6NYpDIbypwRaSAR4n3P5rqVYKd2C0v1vuP5Fkd+buL4MSehOHK9t1TysQ723BCqc33Hs4fO6sbi2zt/Bcg94jJ/2gzkd0i+EOYgS9MKHxRspE8Mh5RBcgiWdDzWjm6e6S+Fd2rUa2YOtL66h4iLAGgS848YN2vUmoQVio4kv9qgBUx6FQQZPBgk4w1+/OodpY+xYjfcO8zZBPLHG6j3CT7wcma1jpmJh2MHOiWOB7yAHvP47EM4jb+SE2kd/T7Gay5W4QcJTTLx50b1brKitUHe0q7Gp8QEeJxeccQa8QbjOkl9SEkH/cTA9AtvcAY3HYqeF++DxS8iH4dnRDQjcJv8hEoYkJOW1uJp9wBZQ4qR8dDzeSIiFa+Yy0UVKMq0iEezKxsThQfC/I+PbgQoOVsuJlhcHJe8Z9sU1VvrKC8Vmq94spR+mxH/S1jF0LFZZVSWLjCiE5KARCZZa4pcb1DXBNzlcI81c3RsCuBBdwC9lhq5Pkapmdhfu157lKIROk7jgYPaFg5ImP0qRiA8u+ulPWjRpbUnSdKhECAXlHTiTZIzvJSm3FZy2U5DGZXPkRxUbPwCQMVyy6O0A+G6JMo3TtL3rZ8Y16I6OtTy2WYcL+pESLyJADQC1kt8W+wpJAQjT/GWZob/pi6SxgpqBOimnQu3xS7dtixSClzyqrMSvnQfa0NT2d7ssX52qxvlHZmUzpqZdcyPvuSSFNBF8ezM4CKBjlQ7dp131nxeYg4r2Ti0eR45H1YFvNAJCkFd3f4qL+eHG5HV1o43Oh/amAMkvXRB8wnl0cVsdIJRkrL4MAlWHTOK6Oj96G+YdqHz+ftI30YXZ5QGePQMwrS12scEZHsZ03KH1YcAzN5xWZvsssmXHtn4u01zmCE69WfMFLQy+XYyD+ZJCQjoXefRYIQS81CrYiGF+EPqEIhQ/Mr5EmkySj4uXNoRO9ljyM4ETUTwWZOtxwV91QmH29geNMttwGWpHPmFZYOEqM2lba/MD3DsYRGMAxxbmD4SPsONPh6bOPvODJS7BtgAvADJqKXskfAp1+i2jg3P9YqSUZjEtKFp03/nusOrYC6Q/7IS5AHdDPfWcDqiJhmwvLNXqVuOX4adetQ6UkmU31gcrqHBMCqyzgz3Mrf30f9z+9yLLJ4PxXMJl9Mrm8TNCX/gkvX5JI4KUXNWhVsbtC++aKjHT7bYRyT41qbU/HHpZXTr3TErn935ZB1JBHuMEhkcUNc7ZfNwTv3u3DocxbKzB4GSKbT940mm3ntLq818xZMPd3fPcGe7jSNXqNWCKdjORpP+ME9BI9IXJI3N6tl7ZlM3S3NfHel8f6319Pg8wrA6ZG3BPy11tnb7+QI2b3377FUMSZhfQIPK9YZpVGl0kZVIgB5HYJLsgriFlJcp1aeHYlWCUa1wPAmJw6qVREFgsRbZ+50+Y01WBZvzp4VRNvF184eWN+azUyPU/cI8oy/wRZWk8og2Kwe/t90m0tmgYHvluOTWCTjWil419bIyKIYWKVKzQu0jRslurW8Ss2G0PFusZ7LZyZ/HS6VY9RPjzBknDz0f9XmKZ81ND4AoxEG7clqfG4eOuDRPlQnUU0mDRg+lYGi2A0pcygiWt0+m5Q17Pi3J/jFWHS5qf4S0+dt+cZS+vi7fvMescG2J+p3despFxy05ON8e8y1t+fUuvrmnmZD+2Qfhl6wvWY2Of9Todcsjm8Cbh944RlL+HoVEH5Ys64uHqUnJG5WmlTyWAB0yIZYleIhebW4pGMhugEG8SJzBrA7EkyFmEp0mc0+I7c89fdTvjdpZkpgG7Axh5XdrbW3tNoXEDUyUqAegnJXuDOGyp1tUDZT0adPbGM/5Zm/Be/HoBMrFWBo1f+1scN5w410aEJ8cahbtTn/BalBQZTnjQpEqGIvqz+jBX592bmS0j3pj4S5U8eIUTjZ5rjhUVE5rfhAObjOKJ3mly38sUBPchl20NM0Eucq81P55h49Gv6cFRupgmpt4MZzixo3p/ggmB+T23e8KdHrWrLw1hMmC89spWhjRqOCYNJfrYETSBzYcozRSL3mHcGIPnw8V9sOl09jGykfmGyvaUKAHwctdvpv3HpwoHDTGn3oTZOmW6gwycKfPs5p08ILzM7YMQUSqrVaqdg7XCS9yn4O0a2Gb2hUBxZjV94JrhKq5KvRpmI6luLRkR11+Z5ut4tsuGgcpW8+LCNpr8OtUCNEdWGEzo1D+0zulapjFmao8SIDMVC7mVLW1tjYBvudYBAhCHFtfjBDp8NYeDBfTJM3Ef1gW43Wc4waEDM44WEF0Sl9GO7fcBSDp0GoQ0LbWs8ciNvWQMuhEWRpqNOHO+kUgaev5s3DY2AD7l5g6czXuY76haBkzY3ly6/t9iNqna8PAHHqwv3aRsQR/7nRKapsL4bM3uA5I8bxgM6SF27cUrBVoHbdnhWWIqXdIVJPNidp2HMyNNTXWwfrz0Pvb9EoJ4hhwC6e98TKexxaozAm8ADfiTB4w6cAN2vfDdvmzQcskEVixJ5OpMEh1uYFbXp56wvCRxOjisXB7GHJJ9n8blJSkCfTqeCwVhb3Fj84KeIiCe4wusbnplJmV2jFEoOt2E3mVPbGwexBEUd6/43Vrg8/1brD7SDoRXby6Tw4xubF6emch6gK5W3LZYHkFO4oa1sPzrOgJCAzbwVsAPCO5LFeVZf7YCkXxhfwv1S+qb1Jp0yNjCYmfTdKN28pL9p0PuhhcW7IRcR95XcYgO34ccNk4+7YwOxzfdrsGvRKkat+z9zL28JytNxZh/ZjvITSUFp7YZLLmabVzCwWg0P17exRr3wdIOdd6VwzBVH7ByQ38rkBIKpo2Heb6d4vKJ2Q1Xt7q6vjJQFbz1SAfLBuGBnDoqsNPtLIl1Ly78I26IxwGKvfRfbTUiIt7HJh4OWJr362P9bkb/mZYa9RaI2z9/ylfNV31ktD6Wcz6ZlDRx6cQ+LO58NYeB7f4NYfKWfjtXsQMd1MfiSpZN92El7MkXWU9v9Ua9NwMpiIKgLwJp9OSB+tFIBHsDD1v50+uW3M0/dHv+dAJfWagAMT9+d/c+UeRPwVR+wQFGx1/LrJLLomoFhm+xj24b7ee0IrL3ukiOpIIE26hi+rV51uD9MQpqFuYAtDCnE2IZQv/mhBp37QJg0KibmV8BigYJv4+gE84+tHts2wJCvUsfXaFwvLZZs8xaBTzkMbbcjtDZMbZjHq9L1tMzzTPJoY5PnOWHc4X9pfpJVNj36G6/Yzzc8jcPZJi9TA9qox0imm+s/foxH4n7VgvCBSFV1d8NqkiHW68Km2GcqsICyjRDV3aFuLRqVa8Wm2lO45Dzz9OTOkDeNzaS1LwLivs76idq0XGnjTU6jsefWB1HSMJ3xAF9G4pdlolDXp+4oRh3nb1/ITrNGJu4sTE+YSObeXl4heG3Q8SFN5lK5+PRtHpL1UzJE60CD8TtBogwWCvwdPj60fIn8bLQ7W8hjM7QBIHbnYmoJ0vyTA5bpGM/HglSBs7j5FYzpPfUusNlCdZguiut/pZynAKYqINLYRsJhRnZeD0rjk3SMrK3eHA4ZGujRHy7tGYIcXksSpETXaMySesUb33gl+wmF28yOalTEzjThmKyEAYlPEtgOsO//sizjFg7sVg3aR5hJ9sVxVEiXkBPQUw3lzYf9sXp2okL4/8/veTr7rK8ixso/zz7XmfLKs9agbgTVVehHiLO9fpxcrWXLDALldGOTICwJmZgfgtLeY4P26DGhbEriuOhmwWdhDXrQSZzKSNcHJmpX5op6h7vc7MfM+OBw4UavBawxMx41HDq6Gye2Xkv5w7zHiE2pp0VLzmG3HEKO0060JNkpbtxCNc6br+jVggJeDG6nO3IoE+hw4WWbC3OGTfuBxjxWw3WK0ubKd4owukGIf/zoMSDtTAeG00iQwzcqBQkMlwfrm91Ynn9OZEub0AX68PQCDXAlMElcpacT/4xrKMkEK62e5R3kpbkKsXyjJE4db+jRCD9xbV8y43dqMx3wnu8987U8K1kL+y7Vx1OVuRqhY1n3FzG0Rgm3A93w341xc5u7LdP+8k4WiuL//SMBhztEtUw45/X4im36m7/CpB/B8+4fceF68GbLTzj7QrgB0EwgYeuxTkqzIQc8xjx4ldNdgaPUQcjZ884su+jk3p62Aqpmf5EzPOWgfwKt7gXvPXDcYDZKF99nflUrsgOSW5rsRErTIYcb9Eg3Pj4ONQjujiu3G17Qin1noSzSfqZugNLcsT6NiLHwWp+UMvD9VFt3gJS0GQavP9pMTcVnBhLPvD26wV1NfyheR1S7wy4eZ8t6sPqbd/Pzk6Ff51ADdhRvsrFkMOW3KV2065RIw4scnXwqKMXqRPKFXZzjCgHDNbSr+1f6lorLxR5P7QFb1VFLnJFo23r+aOJ05VtPsu4MxMIovumLqSbLdR0CVsq9P4wC4tOnpq+Xo+OVJTuMaXL6Y82Ktqrq9imor2hlQgiyHgK7cTpvzEktIexwJhv8U3cE9gBoQa3NobG/lF7BNAMKUmJzNWn7YUiBATYRgiUBKGdr6zYUNJ00SR/a30Vt8AZZdatGV7V6C6OhkMwd/N+n65EZ3ECsK3rrSN+3M+cIMzt9HniqXJTl9h8TJf0Tgqtbdd+KV8JDKTgorX8/cT/ReMT2scJPDykTPB+JhUprzrsaMpebDoz0fXemZ7RPGo3KrnZo+oh2GIGuND/UcVl2YqS/AymXSZ+eh2ywfThCt4EwlQmcn+a0HW1aag/lY5ZheHzmwh234Hkev5g0P2/+nQcLwwR8cB4+hcMBgfZyyJRpiQlEBCdepbwbCfEq4xAEztqF5FhVsbZzosHSNoUB1TiKuUR0cJySA3bhQXv38+4NVheQOCLbgYlKhVySyvP3vlJrJru4FxH3YlMmyHOfBjXIZbG3xq0impPDmiFPBf0WUMHaMG9amECQBT+KzhCK53F7AH9RJXCCLc9ZMLmCfUSTCIMsKtQMBBMEOi07tMk0cnFTi4mWvebwcewGqflz4v375QrOeFhTHkB9my0+P03nd1z4hKjtzkNndvhoHXl++1wKrKwr4XvaLfrhRhTiwkSsIF+7YfR3DHPZjs/DJkRvIgx+9lAAoM6bEPlk2NzKxy/f5Kx0/X9kcRq4UHor3JLEiZBw7VmH1O2ZjR6ZitWGCpe9Rx7lHCq41YC42qOhp/VVRryUJIxCBGdUdKp2pt8IbWQ6EuWIfD0/nlp5YYguc2ey3llbyZnKgYXBSxbJwmU5zZIrHgOYGud2r/CdXDbXOFEd+BDdVKqY5x7hfG4xsf0Dnksx6vInCY0elnocJyqE6sQUGAKrt9Ex+MT/hAcBk5qv5vwIJ5Wmkqq8K/S1HyEwac2q+ChLqZz9L7Tc5DhyiwF+hhohPD0qBkmTdcoU2IIid8GOdihTRdGRpJNoeECaqcyC5CA2LBSyhosWvVtotnK5ktTraH6qRz+O6/Tj3U7lZckTabbmj8dh5xHU3yY51DhL0BMJeXaxKny26Md+vlHA9RvxRMavbWQozsm13wA3arkB2ital+IxLP+Jb0TxF2FTMAc+hxCUcg1+j8kxKuZuQ4ASUapFzw6choL59LNR+B8mA6JdK+suDLEpuRS1OCJidLpEGrCSl9Q/XAQxyPB5oM/gnOnahZ/RhPcuJOZPfJR5dx7y26jWrKQ6d8i7gPoU17dKzxDQUQHZeJsMPcXzFIZr9hlIpALoGGNZDXnPsKvIj7ngCqUg+mS6ebXsJERFOlRgkGzeIOWFrFCwqtH0DJJKEe9/GvcNBFHIdQbVDg0cXRf9hNRiaXR5a726bhKIIVHZXbJEAtIJtliU4N3waf23KoXNq/8t4lXIG/guuHf+qZenHLqojichFD0KHoBRobSbJEehRz8IFDM4yRE7J9ZRCgGCrQMnv8vspH4LD42SOaDCKVIAGhAGogNaAMQWnagksBvooeFXBS2+OhdJdVKydLgo4sH/BWu6ISgshUYGSoMSpWfwz/shS04DVWx8CJ/M4FdIYF1WtDIKCPZ9H4ow4x553bP0MLZklJ+AdiqHrFSOUnbDISjkYj8BTps7PGj9K06kQtD+FmOpqWU3HAYsVIDQmezhI4i9QYWBTGoBEwpgbII/g1tBSgNnpXDCEsLff1ttOMqC64HT5wS0D6TBJ/jIwTL1VbUpX4p+bRsjp8JDFhH+H+mSQW43nYSOuBbMQOOf88jvCFlyz/SwBrxqQXJI9sIOtZiOYy+S6jKKsa08G+lsNEEQTtbgGHLSBxFgJPsf18H7DsWJg6FeJb25q984raAAWsBlFYx+d4WCApZwZhAgTq5EnFa/1nabbCLBJuIMnFmAVhwFVyyIi8CivVgiy7FF/98WhHrD4H/jXFyLEF4gn/oTkoFrnCIpVoRW6ziZAic2YnAbESXVrkH9iGJdrnxalOEL2DT+o8Qz4pSdF6gfvhgEvE8T7oGtr56yvnAtqjKtM+qad1RiDWtbt4uknGZbLccYKftfmphKXRUkNq1sTfvX0/tEyJNJTKKVGe261kVM/6rMm5f8Rb6QDLv5IBXDY9PqJMdRO/2PP/7DYJVz9AO1F8yVTNvtcbn2jSRw1rBhmyhW29/jjh6QKuRRSjWVsN86bC8AtXvphl7hHq5OTI80uNZ1aiu0Vgm23PgPf2vMO0qhfQpgOds4ZUuR8KawfZ+/aUWS8GPVFqigdXGGSksyixcCBm0Ei6DM8ba3eg4rWd8XY/Q1ZjuMIS3N+o6XeH7UO/QIWHRgU3AhhzRORpDDVaGuZmIVktW4LkKhgzdeOpR+II/B1oPOzR4e6zQvLaUisHQJs3FDJ6khSoyHJcizWzsPZzLW1U4E3x0/N29378x3Tm3FpDvYvgKVD5t/3SHKSZHiWX5gPKHnUZmvRqL3412w4S1PIOYfhagRSvoS6C3hG7pG2ZINJj7MOfFn5uq5EKuZHCEd74HDhoOjicADU/JqylCBAc10b/a5EWSwM/Ogo3uV5jzudi3igsP6Vp+5xHrttSnRJuqvH7C2YSL7bvsGgobPWLvjXEDbhnYODaQF1FuUNZjSUIt4t5L33qcOG25JEhISP/pSMekReLES5ZfNdbuHYgp10kV1uATsfLZnnKMruIXY6Q/ycB3z7S6Zt0yNf7qZqU12axrBgbFHKzlAzhOGsFBJv3DSxBUDYFkluhhm4PmuhYfBmnPjrRKgp0FpxNw9HJEueiI0SopQceZkY41U29lqvIGvX9fg6j7tphihLFdte8pA3Z0l/4rEwtv7F87mjEuw1GOKAQvjEH36NNoAvX7g2OHW6XvYiur8wn1Dbg+pXnHc7H/sctlY823KLKfAknH6FgNiQHQtUaSnHj+KKjZJO3eEZtVmtUeXFEk2HTXU31SPXDKXXamXzx2+FUrLgw1NL5i2i2L67/PXRVCEeyKMJrebpingC1gl9tOApKkqrTqhUuR/1yV/OJ2YKRUlkx2yxppW8J/hn74/eH+oeuXf4x/+WBabzyJ340R6jAu5sfl98123KEAK6XR238UNl/5pRwrgv3uevqUEnTkkM2DuZBbRlTz9u7HlM8sdGe+X6lwCXk5qz6tT7B+FN1EgGSoMpX7ZZq6YuQBW+cZ3ZAfDbKEMW8xFqHD7hP5pW8Bdl+aUzLH/EmqNG7MwkOeE2sfrltqEJ9w7WOORTp0RD+O935+VfmtwJrcj+02z8ewm5TnIMmbtQL5f1qaD8+vcaB+Kqc8RDG71JSwvLD54zTfw47dwdxDSIGJgozGJE9+bB3n2GaPe5d0po2fIhxUncdk44/YxCUXd+md0pR+GUX6TPjH1tBUUdKw+1oYm6KPM5CmVVc2cRcsqZ7hiUBUzhYp4PsDJIk7+hihaCEQMiyVTg20hYHmzdYep2E0momR/E3vUT4hWa2IUrmP80QTuevLo27fGd4zhg+gU8L78m7V/7oGw2hCR4ckPm1OF8gU4YLqpNvRNN727hHEcF2YLTUNwRVMDMmXCRSVqs3mB4+VE4LlpKRu9yzajAIV1u0Skq9AJyWFIlh7VSpVpG9iC0obZxjjPZRAomHuVPj29QNCyhb+epaBP9D3HE3oexnPtMRncZsCb3YmS4JsS82BdktBcaC1wSjCVOoPoruZ/wwRUC1wCF3n05jg8n94DFJqwOCjh4zQKVi4v4615uY/9BepifQqWde4TvCOUQs1OHTKSSUZ0GrEVurRDCnvs7AsgdmgnHLJjKhbcSJls8ByRBcbV8aNrOfGuwr5Chv12qMgSWUsNSO1RWLj1lrEqsffvAjwZHBdalSXBhUg1xWN36y63k2+7dn3cG00ahwW8sKkXUNVfJmECcJSIj6fiEyIJvsVSia0sJcZDkWRARDsN8tfGZwbf6mGvQNqhIy73FiU5Epm3LjE5Ga8myHN0VjBMWNG5ZHlSOwAmSuOdFGOd86C5XA5rMs/8BWPCNorIrsModEzF+CJAQAp8Wy6pDBmp6fW1ffKpVvhpDyiC/r4gCsUUazwolshY3+2E+5qCjSC3MwR8VCObWoAYIYSCkuQ/tLq5AxuwUxqXEfBIyxn8px5SmrbIyLbIZE9JuoH4jEhTOn6OGdnMHDT8erdxW5K+kNqjsZh2sVZ0KjRstFFnm2Kplb38ZorEZ6TX3D62AgWQ6bN5TZFW5YBItEkQXGWSopCsqpGIk+tBKla0cvit4kE9WRBAoNIRh6+77Pb88BwnllIy3WJ3hEntbZBjiZb1tsVm+6bFJ3aidzht/FksQNmCNmiR5hzmRwjPwc8j4l/w9kEUXnpjdgffy0gIsX8pI8opH3Dt4OFayyOrsUWvhYk4p4p8RhjUn6TJ36LRW8MoAO66G3KK6nMzgRqj6Kwxcf2ic9OEUrX4KtKbuHi3V5JC2TELnK1KBZbpPY+JgpJnu6ogsGqj562+2Pf8j0vpyRhK2DeT8NHunCDOFqcZvwtMvSLRlgftiGo83p4ZbcyJD6/1BjTZ8jNvPkyqs3JSvHDUAIGw3bzkUrnrXvrYBQZbhVKDKG5yuznFFSyo5gokMQpW0a0Gybz3jAoZHqbfdaAQe/l0GLau9HCVCkLOF8kFFBdpTIeg1e7KcFmm6NRpYpAQhnWZyhftqEqrD6xFQt2549hecRWnlRyJfz3GU1YeYtj26J0r8YZzmxaT6tdbS3JgOxxHnau1M6W9uhf3zg0Sjr57Zh8sxW8M9HagjeqH0OxbftCQCv36fyKx7BJsuuyNvnmG3lZ4xhDCp9Eu6o7M3CLDeiQDjzCkwHrD021D6VXyimdhy6cIZeOWQwmoXrtHZ6xu/AONvcBOA0fFqGNCmE/ngw+eXp5KItwJV6ektB928XKYBMkLaLot5BuGI8weRIhLyUzBmIKzbRvs+o1cvlA1hCSu+UVrnXohJhGq+m/EuDjbrEyzuBbTOIIoCKMR6ipMR7eeu2MhA0MYor3CoAUlmrroykJysqkByGCUHr61jB+VG5zfrsayZGwgUX0OgZ98DnZzDSdeEZtTnqwOLiWyVkb2Dlm3O5B+NcINbgM45E4LnIdG0VzCtqUBjr8KzS7jWj5alXq9qJcaKylyEd8rQ1KXjGV/hmZFne4ObYgtkk2gYohPKQKhMoADbeJSiPzF65VN/Y1CzVJwNZG1C/E0SJ2Mrq4qK7qGi/0YuVGn4JkHmZLQU+wsstSx8nodDVfnAcdiri/VmwcU2f/ehU2zPeUYsRqdfspV0ylNEl78lpcODtJrrUlu4N4WwimiTrhmaPK173jsOgBbUVVXaoATPPbEpBrNLqaOB0v6Q+u3lqB7d7yfteyLC77xJZEitmQk4z9IanGovHGV7qPOUd65WfJsNopChsIDinXumctS427GKdGs5kb8chIM3s7z/UguiHWE7KbwFIZKdt3zdQWDz6HZp/73+jycqqFJIeQy3JG+VztZVyVT+NZW+lX3ft8aDtk8ebdr0FvdCVTDY5YfPaUNX9uBYDIqrDrAJ3COzpeUYdrpSUHseb6VaZTaojNCRQyUg1DzQHUNJgurE68zqqEITZZGQdIuYdqsKkBaa1w3UEenTzpxj3Pf7ijadJ4DKCZg0YbKHpv7AX3TRHB09taRzU6bapedbnsXSi1EUxJVYIsiFrj7sjOlFP91U7xtyBx6UruJEPYKqP9mcStW+wTMM0fchnVYmrSGy69fmcjQMQC8TQDly14+v+J5At3pRPR2RuKYZEHIY1w1li4qqi3FBMbgGMqPH0eIuhWzZXG2iMRGzKlLcaq+4If9vZADahxMvrcDWbPWMP4yoqD7p/VB7dFhdVTxA9vm39EMyw2lSWKzX2TTfRSLS+Rdc7FFJXFpmQRQXGiSO7UAhVB1BhkDwpCCPFIKmKmPjt8sOcueYLwHSf+zBn4boYVqFc5B3FBj1JyRTlhWumlsMqxZsE0IF56gvLJVp7sI/Jb4MIEBmoQPtrxN+bBditNA6WDU0Pbsl/GW5Jl9rWHeaavC3k/n1uPQ16syCuutmL5CiqogOKiLElkeAhzmV8iSkZCipZ3vetU5xIrA4gw/u+C7BX9qwA0LedySASXr/4T7j0hT+L25zuOM9NVIv1Y8cMNv4NUlzlEaxYMjqu6aVbnhRPRjCUcfmauXArCY5vwOkofTC/jPJm/8wmpf7Wnvq3IiOkBLPYLLKQdbRv8G2fhHSPHbryyY7UUyr1ftZLWmuXXr9HunmnGvrZDwSe6Z/+oMNiPly9Mkx9fgMWF6Q4vHYSwXEvnBTsD882hY1t0l0VgmUGWOKUiqqbwYYUDn/3rODwTDc+Ckon70BpH9aswnWJqSu9hxu6aQO+PefIkGjk8jm6xf0eX3Cxj98N1lXZq7WU9IF6HN6igIr0pUQ667E/SMvJw8IcXX1vXE4W+ckbmsGHeU0cRET6tmEwpggcJ76Z1Tzj+9rsPgMoELDhcHwjPXoRiICSodwuWKIV725V++zOKUaBWyuHp16n+WWwclh4kXqZSyo5ZO6k525Liav8eOUSQZcuKfcqexROlg1lM19lVKCW4xVcbIvNPJ7Y1ZRb6tuRGnc2lLCrH+QMSq2cJeD3THB5sacuMCZqaScx55fC/UYlAsrn2N2AI2RQANCJvQTRl0y7q4BGgGPVi0NZnpx8P7L/Z5tq+8nH9gx6i8enqB2nf0za+NTAlnQzmhbHgC4yOG1RejRIUQIpR7PX2KtlnikTUE/xo2Kp4S6Q6DnN4iJFijFyu0nrJZsUvsNyoEzx5eirGaqP0lM//iPKqVxfn/2md+/ExX55aXCoubMWk2rGeZthWIkIbusQ2+CPt7sqQV8sstVVhOKSPJZo6GpBqcSTR0aufSe0qU8r4WE8z86BqpGJf8+dZEd5PrS8Aa6Ei9W1UCJoAuq53gfYRSONWH38kMhQMLb7wzdn3sJ3DKpH+lE0pjl+kvMzKOCO61CE4vvq4RcSxj/zl6SEhe/nZT39mw0jx/E/911VY60hI/4yk/7tkkChFdnPxce76eZpsMW+8hBaUZP0ud2pjRkaEMw6JrgH2tHPI0C8yvoFF7mwnXz3u4uyPycCI9jp9UmaeuutDK4MhIsFferTsO/Nnah9x6JMetWZK04g3Y7mQ/m6hpjE13tRE8r28Q+H2oUG4cqlDD0PHqzHMBKOR1vLppvjoJLQf0OLSd4RoCbkLEjqHR3YaspM/vcBrjI+Nd+m6H7YHRXDQX9uXYvVTFxVg8UEviTN5afx+FQrCfKyQY6L/rnYponhmkQOW1YxFAA+MaoSqzNsOS1hPJ9KZLHuJpa/JJJgxgudeIr78slNWFhBhZ48Ua7iG9P4gC8RmAGlvDzat/AkwYFcYr0tbHnoAMzliy+8MFU1JEfdrpqLOidL0Ml3y/FhwTzveABPlZLoDp3stbuxtDR9bwgxfxHnh09g0uKjX0y2EcAxw3rWn9PcrcJqdZmIdS8rmd9hjeDVgNI9B8B7vvXB6OeaDaf2Cin4/oCLt8fkDxRJFVBHzRnYXsK0O92MceW7Q03vd0+shbYCnBlly3BsuNrJ6rH9Fz13KTGkRfLOJAMOs9HfNvHyRg0A8bvjq4TWYJKnYGAz68C+Jp7fnp1hpvzOhhAIsPwVrSYP4+ONirfzVhBdcprAM0gLOE71RheL963zG/K+MBIR0ge9FVnrWMGRlSkhN3qhr/+HP3MN5E3hEKRkZyY+jAYH3MGrsPl578IFR05nijU8MlPmaTLMIn00Al2PVBLkfUXyikFqtaLasZOzbRKlN7wL8G5fk/Hrzei/uX1w8TNudD93lCTNkvNUybU2xv7kvVEfPgNhZFjHbfG8pK0n7pL179T3ZiL5W6pNx0S7WrGox9dkOpIXkpIVFmO1QupOVxPQ1ggpoALijDkSWGnmWxXrylpkBlu+bqXVbtBi1vKgFLp/04WDg/iaSvlXxFCQZCZ7G+N9Wgwq1QwqkXIj4NLH7A2CcFnFS/K18+aDrf/ejtCnV6IYQ/hQyRBGL97KiS6uIn4I73Ht4tz42v6Kp3dfRHGDqM+79hgGATruuWz2gm/7nHXEETuKYvJU+S9ihsdwlnpvzle9hjdDlDY75p9cOEwdSq9dpAubpsu/VKVSREaJMzT3oGgcolgwY853bjvNDvdHXo6eAbDZQYAZ15QchBpSnpmiOsRtwh71wiaklh51QMqDjZqo8Z+Xym2TquSecmD7sNTX+1Z91l/Z29gjtFXLjEv+Qk1meFyxi05UmRMXFZYtzOB41owTVXJo9XFghFDRA8mN7JiJU+L6AEExbuZf5WNAT/vnCY0ql/SNxifOQEc6W6qOhwSamOxNzHuIcnj0NqgmWMyaZBNE3JDj/5Bq9OPsTbIUjfO3AiclRyYkXQPurusIcWCweiXsBqny95XjCQC3qf1LGA3RcYmZfi6msGbPEupM7xB6x++YTBuNE90U6P4FtCG4xs3Y7ldhKpAn3Tu2b1thj22us48sOxWZlX/egazrCtnCkH3lOg1ZlcLDPOynzo0njHCl5CDyakPgOEBpmGywWpMnsb9zbSROneitpDOdp42fMZW3oBpj25NlWLrtRc5ofjL6Q0QQye+UdXvOD0VaaHfyqyxh+Cp6/BgZdG7Tvz93bZIpe61fXugiotqJFZoK8jTjB6dpivbZw5jN1XJkvI55jrWtBMoVTlyLzFHbAlEQXM9QCcqs4pV0ozLofdVvfiSt4FmplgHAmrNFBqmqIMEzaoLqHyQzcMnWOD/QWU/zWJIsUnCxtso+NchlCMWKLretyfK1FYFRRrZv/dU+JLNIZF+UU0RqtjLP0FbU8Ujzxx3dmEnl9ouptS5BDvqOsNsabaVfwAM1TWyZfEsNnhmFQtHmoeHbk/uCVZ2WPLeTqF+uUdyg8hZ/bW1k/Zv0Ff9fUuZCHrmFx2HcJNT1vCIh4PkeDDwsKvttTk8hs0hFN8eLo70w+7CQv4ZDbvOvUmD6mJxyKchFx1y1+HVv8Y5BHyxDBFaad42Fi49ADSNuTJKU+n2AaaJH71lSpZREvAxCb7+BozHgnB3sMrQq/2TkpJ/Z0Qw6Tq/bwpf8o5U6Q4cu+eo5QjUod9MEJkkGoSBHU9gOlqZ9sWUsbyV483wiD3Te/3SatV0g27Ew6QSgGiV0Ip2OObppjp+oGhHGCa6vdKUw7HxQ+aKhWt4m3gDtzahwHF0FEE7D/SzxCVeNCQ9oofV+FGUB03PfZu+ewgZ2uOh0+jbsT0/Y7FZwx1uJWC1yd6b50xPlfTkoSF1B0JjNvK37ZCmGx19l8TW9Y5o2xe4C81avPJhSipY2oM/QYhvrv2KVKShxfI03bGQSdKRumdgaMIFQb/JqVRswrbzAxXi5cq+1MgYQRf/SJqhM42Li5Oyzn3+K3sfF1j6Bxcwc2EUp7rvutceMgG+vOp1ZZnhdI1J3l4dotJeMwS/lpgC3XDTvIefdrGZqTZROsyisMK63SUe9vED7MPaEuWRdASsQ93cl1YKxs3YtxAsuJNMXI4gB3tstyFwABBDbwfa2EDTFAh1cVzLHTH5WTDWLKx3ITx7Pj1HIAuh8/x0eywFynJSWQYqhJvT6Y3Xy9Img8c5uwn3l+H4nuV09h8LT9FAGzg4nftTZqPoTXZspbwjW4zs1UH9u+s3zdO2t9f+MNV+Fs9/tp0wXsXK3xvHqEdry2gUtUfH/3e5WE+ygNttMKL506itoMGp2Qij9ZnLJ9Tj1dwAEVLPjJyysPYSMuvNyBl9lwxOX0Tfw1vTVYGcda72RoCc+CCzIxIjCMNzAR9Gw6ngYmUzlyMQI0w+InvXp/WORH5u6Mja8QyQFxRCEAZmnCMueiuoqsdTdaSJOnL/SjyNTQYBSz3xORk34c7Sg59iamEKQCQ5DEp+Q7kB12k92bJYmfpaQdnFt8jsJYNVRbn3w/aywofiHPc/rF5SETX0K+1NyK953vhc7Nvj7Z2YQGd+4kvqdBPuPX9FDhuT3p7ry6kOZ001UjuAiaSuOc7qWpDPzSXhTno6weipSGgR1oEVpXKuCDParIsae/OaUVvU6moeXbPYC8rJKN/2r2eNaNGsu0ptiqMefcKcN2l9DesMXX/DtRYIkVPyfWZPVqVvjINse4QBu7MRBW+E86hONeQBEWehqzvaNxuNBQYTH/5hxivD/tTOPsvaxq4va10Lf1ysFRb7bPk6zqat9C1XHiLQrRAcLlitIHyf8ug0DkSokbbiVcH92Dh6GoHJ3YP5Ysou2Gu4g2pbNvnwMwJz0Yir5AIWQRRs5herU3wM966wbmTfRxF3IeageJS5YuuAOfpFb677W4SX1xbn1YGVz1GsbAjfXE8CTOufqojf73s9YcVB7oNZKbTUISvfWw2Ur6UrXj6X1xTxDzcEvTcX04tmMJtwb6VkYHSfIijz6OR8Dzn9Hgf9yTSm5MFA5WLX8u3KTQEN92J3vfSRHkyZtNpPxQjp5g2apCnJDgwlSqmwSArGBO6VJkRQ6Wwt6f6J374G8tr/DSFUVP+ugS0KEg1UhmTLnWoWGEDSoHr89BESvGZjUG/RD1ymekYP/L5wB7RiOTM4w8NFDKHYlLNcj95Fv+dMqqai9OQZJONP2v29iZ5CwsJEmpo1BjU+IaujxbsSIcJyS7KXStVYqSe8IkMYlQqtr3CNcOPQglGBH0ylrJ8jjZSjWnY++wyYR3vT4/qN4KYivVnzCbMmdO/numbF8UrNPqFLkPrtOU9oAmfBTpRlsqDJoH1b7+HFEnvY2aKOr6Et3chpk5YrjpT+iFrq3yM0BGWRUSKjESJpwHNN4YVJNJQjFO8g7+q3+xfy/HBnNzaNzXmFwkQ3WxaWuF9z4P8Ia70u9x50A+l/433Rg3u/MBA/w+ZcFgbbcoGOvdpslKRwtxrMeW5pilmvvukQ0DrtwYAEXCt7NhgfDQxLzmSik6EjbZRgBKrzU0bg6NC2gXIrzYchht4iq/uZh4OJ0oLearGNgdfTN7Fls3DwUd0fRa/5Zu2/RRq4hjewIl+WECNF5zf1OG9YZyoe3W2i3wQfdsKAfPecPhYvKj+uxoE95J+RQ3c1oMxdqRYSwym3mU8tTwdfSnDHMw0D6ywLV/fYFmZ+5x7yPO5LOPIc+2XF3r8VrDHldYr+TQna25H9ZL/n495daMRGq5YmXLwU9RcrJMvs6CZVMQ71itmojZo6XeN2NxrWPA6VhldgCj1ZiiNuUs7pGJAlrdezcru7ounYRSYuByb/jIU5xSs2kFneAZ2uZXm+1EugmuCYff7X4zN/om1/1flEWToOyPAw==","base64")).toString()),kY)});var Bxe=L((fdr,wxe)=>{var _Y=Symbol("arg flag"),Kc=class t extends Error{constructor(e,r){super(e),this.name="ArgError",this.code=r,Object.setPrototypeOf(this,t.prototype)}};function JD(t,{argv:e=process.argv.slice(2),permissive:r=!1,stopAtPositional:s=!1}={}){if(!t)throw new Kc("argument specification object is required","ARG_CONFIG_NO_SPEC");let a={_:[]},n={},c={};for(let f of Object.keys(t)){if(!f)throw new Kc("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(f[0]!=="-")throw new Kc(`argument key must start with '-' but found: '${f}'`,"ARG_CONFIG_NONOPT_KEY");if(f.length===1)throw new Kc(`argument key must have a name; singular '-' keys are not allowed: ${f}`,"ARG_CONFIG_NONAME_KEY");if(typeof t[f]=="string"){n[f]=t[f];continue}let p=t[f],h=!1;if(Array.isArray(p)&&p.length===1&&typeof p[0]=="function"){let[E]=p;p=(C,S,P=[])=>(P.push(E(C,S,P[P.length-1])),P),h=E===Boolean||E[_Y]===!0}else if(typeof p=="function")h=p===Boolean||p[_Y]===!0;else throw new Kc(`type missing or not a function or valid array type: ${f}`,"ARG_CONFIG_VAD_TYPE");if(f[1]!=="-"&&f.length>2)throw new Kc(`short argument keys (with a single hyphen) must have only one character: ${f}`,"ARG_CONFIG_SHORTOPT_TOOLONG");c[f]=[p,h]}for(let f=0,p=e.length;f0){a._=a._.concat(e.slice(f));break}if(h==="--"){a._=a._.concat(e.slice(f+1));break}if(h.length>1&&h[0]==="-"){let E=h[1]==="-"||h.length===2?[h]:h.slice(1).split("").map(C=>`-${C}`);for(let C=0;C1&&e[f+1][0]==="-"&&!(e[f+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(N===Number||typeof BigInt<"u"&&N===BigInt))){let W=P===R?"":` (alias for ${R})`;throw new Kc(`option requires argument: ${P}${W}`,"ARG_MISSING_REQUIRED_LONGARG")}a[R]=N(e[f+1],R,a[R]),++f}else a[R]=N(I,R,a[R])}}else a._.push(h)}return a}JD.flag=t=>(t[_Y]=!0,t);JD.COUNT=JD.flag((t,e,r)=>(r||0)+1);JD.ArgError=Kc;wxe.exports=JD});var Qxe=L((Hdr,kxe)=>{var qY;kxe.exports=()=>(typeof qY>"u"&&(qY=Ie("zlib").brotliDecompressSync(Buffer.from("W6UZIYpg4+ABk/1MjAzU09E6CFgW2IZIP1r7kmgpa8Jywxvv1VQ2S2cjN4L44wxwJ0ckpPdNVX/XMr0ojMLnAkSreT6m18l0jOSXUkD5tVfz3z9fL06DyVpOqXJ6cUr1aCJOrHzECBgW586Z4H+qc2eZsNJkc6iYLopIG7Zs8pHnSjV8WpoIPJ9uVdXkgvjWDI9/YtVVpoE1yVoFMUm3aW3xio3wUyXg+Zofuqpu6vV6LlBKtKqVXecY9Nk9itr5C62+ps1FnN+/b1puJAHimiBVpqMkXuMYy4WKoumq++oetp1Bw4gGB+PI9eRY86rq/Y/uRi8PQFJH5JAzfn0k5yLvsniCeMMIQ9kkVBDL6pe9AkCEExcC0r2+beWIVCL8JvUo7lfItpmLR0IMKHtrZ5A5NkqwzcwSOO2P6ffsdfzV9oYmAcIUECF6+zLNf1nQphkd4KFlWZbNXeD/+7H0/w9ttFnx/Z+GWRhWcUCT2z9HRyjFu1AWWw38yUi0WSrmP2XxOepke9ZIaQ2nZYtXw6lcXC0Y9uVlW0bej848wojBuZV/Riwq+r70JT6/7CiOyME5+5uClWXyT0ceBpJ8JkP/dbp8SCUCHnuXxBd3urs0kenohxq1csBG52upT7XnAjYYVVEoe2QpAJgxkOmsJXeRKusQ8hP5C9CNrN3fNQCrMCdM+JcBfgbkGEsLapMGYP99RuA05PNbAk29VLa3CR0Wj7M6QxZMNdjZ2Sc1KYo7hZXSn90MJxbgGtMHNyDzzynoCxIXW3TxZ1Pwx4VrdhRL48Qlmm9ZkbyDMGo8YOJFmymPNO5AHyVUFM3uN0L48JGoK4BbAEFbZCHShYYKhUBl10ntO8JKaD7hT8lurrhkCvuPUcKgP+qETi6+nwonTVqPDlBjAdibBWC+6E3uT/lanBfquMf8EvWtcw4AGIjw4FH3j9ViVeVWSoSaX+Iv4RxobRXxhcZE4ggNbHjmJr2KENniVUQfF04aEZTw15MpoOwyL7GvEbgKNG2ADdhqzKgAxSZVr47ndpeYSJfvTnXONQ+nnGHqTmzhSMFW3IQ77479pQn2VmTXPET/q8c4J0/+PZCP0aWL/48W7dCKiEFRPtALh0B7YtGiMZHNnczxaT3szj5alWrFvPgrDMrdUcTyaQ5PTep88/C7p9y+6Pb9ngssgI5jd1C/cr3ErD9GEadZ0j+pVovDuksCqskeGUZwFErfqZ29wY12ZR5CeW0HJxYr+CAstCG/NQYDNoBeibtqOnMOVT2A/buK1b9eVN+Q2iNL6pH3t3KKd2jWUTlThmpErmBLMaKCazH64isjJHdKaH6/Ag2eQP0+WW32uef3LjmJlI6WZ6YV3S8XsSznNCzv5ABVbUTpbvVbyplvSoWnatOKHcpNb2n7WPkTqi05xdEteIxesLAu5qXVoHU1LMCFdW0Di1AueBY6RmEVJc07eyypdMYGljyA8KbciskpLeEpRwG8Mqh+Mwn0dw2rKO96J2DZxWbLfxdLRtv2NfI76fC/IF9t/J57bvUio8PsOUWGNOALM2BglbpoO9FOIuUjmyq4DnUzndKET3IGIHlKCFAncslm9u+9E65bd/co5XahR/pFPob1Xx+DM0V03gi3lBdTCThraWyx3HIkccFIPScE/aqXYgrFHY6EHpECsj1n2lmXU9Qmkg44ad74h1jzo+sOjp3g8Lutw3+WKgfXXk3JK6otEqFuQGQjZ7aXkhA7AeWCmOJLBF0qnP0Cr7r1RvlegIBI9+MZ7HCePoIGtQjAGWpRYVMIdb4xfhGL5zWTSYpHoq3M0hylN69bFJPS0p1S/ZcgF6XsCYqJX0CxHQiu6l4Zvg3cWnD3NYxpaBkBAOTRKp8sT6e1eNTwWLVdfAOyCI74YSQgZhlLo72OedA42eHpeTgLNkM7ZIoUjwNBHz33SfTNxJBFGVdr8MBhNGzKfBHA4MV1VvhIs78XVDT8feeBr+G85QZHSy8IDerEBfQRf5uUzlqgy/6kjE4qXz04lAd4eLuyxYMtjvDbo3NOCXFz3VFpzdpiaWqhEXxtm7n5A0nj69482O5N1sv2aLrV2m+qx60ikJNFtvMLUSV4RJD5Ayl7Cw+qf81LV1TXPPKXTb84JSCLYBg8hHB/BDXV2FdEWTW2TLpFdG8oLaIGKnpiihXmvLSdoOQCkCnPQICeKjZFwUXr+8TqoeG4PH/kOXREblZtSwuWVENO9V/MjAh7aROpA9lVayhkCBno9xHBU3zTLY6EOPuPmAoFbinHP+n9skGHwNcMSKcugeLVVZd0fTmR+QrUU7bDEZzdKgaH0GLKHWXeA+0kwVWHeyBQu+wDo/YJFycstwqYnLl4b3nsw2Ms5lP3pmRdiThnwMAEXSyfows6b3Sw8x6L14BUugPY0gRV+HfklpekWTVXSo9SYuVIXwDRy57SKSDDWHP7K5W4W4VYt8o+2DsSxvhYm06yXTmI4O1f3e6xYCMfP40CXeberfe25pj0mXh2A44jdFlNomIdY5GShDnlmedr6NX0rMQ3YMDml0dh6pew+ipCD3Cc5N/nKKZ0QevD2JxRQY6H05yfFyiWeIDgh1vJ0MK8+M0ZQ+SjoO9PENOobhohNHq14jKtPW4XZD8BzYLNRid3S/TZ8OPYXDkKxDtMZEzyD0XX2FAqa/ManeF18yKBQfulvw8IDvW0Lpi803w+50XJzI4n1fZQO/JWWT7Fh9Uulo6OsybmIp1Kn8JTFIlBAHscrlUpTPGiykfZ2nXDV0yQNTdQalq8Ws6itSufZUN2LJm+3mFK/QX367CKvpW+vBv6PKPLQrTXI8DUDowWX4OvRO6LjST8uJQjXPeRaFDQHlVtt5Y3Kb6Orq6XtX47vhDviVn/e2znPQCB1j3R9dmN5b+ggFyaBf5FLkScllfQaKY2Qp7B2YrYeyfiSw9jpac6YRNUXFGOArUXXBkbgO/h5CqQmGc/pUSI9GFBeaHpFdY0pQuvP7hz2/GUze1zPOczsfUWkYy8KQpkKZCrmLIrKwt7sFpCEnlnlXsfXOEHxXy4CF1r7yzrhEY7pwMXydjjy/B7Dwm2em0w19Qxz1Dq17xxdm9HmxY8JWoB8xIkvfB8OzSFZeyLXWuFmtrVLFI27i+3P1FXxb+aAVG5Y1wPjeVXpeNscUeLTswWiTBGkDKHjVb3CZnnd7ZXmmcpv2F6oU5ubp/E89lxFMSVdlY7oDfdh5nw5YU8bxNx5pxruawC6kpFL2IuoPNn6b9hDvZeOAFE7iHK36x4/IICFLJqtLOaizkdOdkvpsrMQjKTj9oyjEQDWfcvDySz1/GtxjocHvcHt8z91+lSz9c0rcqwrggPg9i3lQfom+R9M4KQ92kfA3aE01abmz7omXFVmyxoOScs+0v+yijyYbG9JNRfHmbISKZdbiiOJFWBdPxpmZLSWPJHs40hnnZvdvz8M7TMTmJwwPtBzGqlFTsd287XCRAdhAElnpq84fAlm7Hm1E/yDWWOebgtzUrfhmtcO00pQZ8y7AAXd9xRH//93XV1PSK1ROZ8yYIk9KDUUdM712jRwEAr69twDrQ1Dj0CsZ/RJ0xXcfzEXNHCpZk4cde9esMZCEMSNffIp7NDlNpNoW3AuJbLuy2/cvkpmGd9Ypjy6Td3cOwtbMOSspJ63wQB/5iD2/vfUDvScoOppb0MtQ8S3MV3oNkaYApPuXlZ8AnH9O83gn7ESon52e54H3Zl33X/Gs6N8T4OX4OYkQ+CdPUrkDTZRnOR0fQzhRRD//2eC9pDYfnExgJqZRH2mQqQSJf9uFRZgvP7iRpAQkflrgJPFCochjCX+Imiw0SQHld/r5x9jEVBKsoFaf9F1m1ZisJbPu22Ll82oVDdoaGbQlQ3i+YlJLDdhiQY9rH/Rm7Yum6sdrU2p5+4BC73hAREluIdC4Cu6agHfHtvFmc+luP5Z1gS11RK/C++oGlaTW2E9aQ/EjOJcriKqUu3SNgh4rFE+p5nkTay4ft8L2ufg79RE6pnR8vG97ugvsfvqyuXS2O0s2a+P60zTX7gRiPHc66f8b4eFFlzbb75tZCHUb4rk/5nzncnH3q/vaDGlmk45FQ5G1oTTl7lT731UfnIm3/8FyTQJLQHAMDExTZsdK6iEwTgA3w+hKG09lk663KJdO+zL05Zt6x/FCSrSBMEIVn7KVC11JN0CbaOpwia62CMGfUn9XZMaDxoxNZp4hwhrPshB8CoORtuaviTR+KGNTuwONrGoD3890H9fyNs28IEEblKfzuGE15ltrJ53og3r8DN3qEPjJW/KpT7x/1R0zecs1DcvuoaVgs3bMBSN+icqPIuSK+DzsG8JgXhe8+22hslrYtlT62J3078WY2QuALJc5EG1WGNWWWfV2toWai7yMzJK1HlGhGUKJuEC6cxVn1JtmPj0z3dEckFw0j63hzK56qFOzUkAYYsp+7c1lShbed/C1W4NhUY30IRpxg4QhYg7vY/T2yV8gH2HyhbJ3iKoHfrUk+A7PATOZO34u/Lxryd/iTNcr2pq07VlDjx+p7Fo3uk9Z2rXXErDn8vyU8av1m+tKqz2pDomXr2QN4zCdYcs1wcW46diI0dt/JQchoC/YuhrdFKeALwuvbqW/LhHLkCSPg8wjfida52Agtz69RQW8ls2Q8C+WVVNHzk1dcYGRmyH0pYf9NV582YaddzY9i4QPGbq6N1qSNE4Z2ZcwmFY0NFF6qawlljxTyWd77F2wtatBPfiJ6bdLiktt3DvvPER8zjGPLKnzQVNhm2ievd2SD6TAh90s4dS6Tfjhfyz92Wmt1OnegnP6T+MO5et65WRvlE33XUoDwmG92/WOvPl3NxaCusWtdS+m4TtjwzVmB7D7MkC8vSYrnt5MlEQSRjM4AdEgFIEym/QtkFm+z1qNPsfdqVESiPp80JNpRN0FZ7E6Wafuk8bhqjkHkLezisqjIuf0dfBW+VVqEpFKzZum25QZpv9m4aH9qFPPPD/V98zyc7qu8mul8TmLT+CAl+lfH2kVrcF3f2JIOM2T0GcSt70MKx+BwlUp6apywszaEGQEyx5wCJ8ORBg0Bhzn2qUyfoHKZtRUSbEj+tydFHL9A7jakwL2/bE1+7APM0x2rwoaa9WDT38SSXS9+Bd8kA3SYGHRzhKrnEtXCdGH2mdbdgJtDeG5Uv1xGVp5iWX4V5LK7JAkoJX7F3rrtumMb/sn7WLhcnEUIcts2r/6EU8vrk4XoeMcMp2dpoerjYcG5+ZU1hBAZdLRzUhSoVwLE+QdhYuUMayni3lOi3TevwS1j1lePA+c4QT1Rz9M7ULh7vRXnkt45kmsC4vb91dtXZ7kdskrNdqSw7Kv0J8yOu0Y9LmDXTx9H2zbUaPRJBygqHYREJnD2PnCWKpNc6CfnornzuNT5OjraLYsZRsxYAJXKF4M/m6faGtO4z16tAGYHqVzVTXrtsVvOB195cl4uVYgyfk+O2MN/ucxyYQ97gyDTjbln6ztfSdH+2l8PFgs+dTHqOtGCGyB6edP7c6K8z0C44rIn1p+GiId3erhZXEp3mhfSWESNcXnXjQbl0Ib70KNZ4fIOXfdJsucKEA++qPtFz7GL8ac1bw7zlxqRVWXtcQ8hlAlHqxyJX0HYpkpBAy2ja59L+Z4C7AO1UmX3HoUz/0WdaCGW2e+Xro+8bhJRGTX8b0jDDJn4/Re26dhtpg+n+mQIllZgcPNdlVUli0ig9gAkdqxZEvqKHpq/QkW0I93TZrK7ZO6uQsfvUSbVNuV5O5kesddcpIgCGhOXPTneUE1Qj0MMdNEo4OO7HyryfgKt4ZZY9IXhfPG9XmJ23KDT6FVLLba6ekfvvsH3m/QRyXeykKrjKPrptcLSi7IoRkZ3uq3+YZ3UIYYxMSbxUn/4wMy7Pgv0wvnUhmVfoyv6xduCgjM73Olm+Pyifl286dppjVm7qGCxt684E2ud02Y8AO/6Q4C7yvS+Et/e+jnK1fJ+BmgyE9zMczJFjrVSDQWTYwI8F168HA02f/J6vJtoIzrbiJpF5ee5GuKtfsqEWKZNlkmqI9ZimyrKkQd7/1LENTKFUjtDxVS9dKGrlQheDKFsoTdMpCFOEKbBoLMjwXJhM2hxBXNmSQmyw5nD+Jc6KakwK4Fb2k6/N3L19edgo9Xqd1yHtBbO0+rXKwQGGbC9rRKQoaEiJPRECVHfr/eS09koblSdlYzDbey7BQBYxeSJKvQnEEvOIiJ/ejeB8axvFYpVZ8IkDXmkhAVe/92LW1nWJPnxkvM2YZRRxj7lAGlKk5GmHPLxSt8mYIMT1klTDEYvEljsAQ2aJ8p8rc1nRVajbdlc1xros8MNqEwQ5pyAs0yQq9X+MSO5tRAJvhScb1TzXjEzjNTBCFD4s3NBy6Ppbxh4mKLOCLA8+2MEgU+8WZAePYeD1CI8jnRBOhNPfmPdc8OESs95KERVZgya+sfQiRWSzurLWQIdUrM+wTTt7J27rOrjx61BjI4+STrMWe6gAvlqBSoDoEZelAOK1ToQwisWs5xQjLCFiGk7M5CqGAHW+zLV8v4Xp9HGVnWIY4r06clBG5wPQrujFuZqf1vLTqn5alHN5O93ayC4DxBt1I8oIIwiPR3t6PTrxFMvWo0IGJMj5nbY0p8ST8FtfnSVLVw4mAUkBzii1OuIYyuPZnl6fTjzF8o6okRkZkYTcc35xNhk+OXi7Xrt91fUXwOIbsJxd3isDK6kfbJgTEQWM1lpl0GDAgUtrJavL63W0HwsoXlw8hjTRRjwNMpf1ZBUz2WbXxBKQdFrIyXwQlGnlqyxHAYLh4utR3kVFi5I8EAE8JCcN6Lr117o6vE149RVGfYXtuXo927LE4LpYS8S9ZniNjeXTbdW14x2nyVhYf3Fwka5pcxWSA2Dd0n9Hsp6OwE/r+2l9P7EjnahuR5CyGXeFwVVkPt1h4v145ek45em45kl2Fp01Z9XZ5CnL/iKLNYBkTkREtXoAsx8daYDpLf3tDYKCd0mIZk6kkh1scxpuIrQdu16I3PcuDTsacKd0hv8WNRupyFAuUeqdF14Km6vTyaiOvpxilvO+EG3dYanvnhELiIQ9J+yz9c+dkE7x0s01eQGku0rMsRXJieHuVPw/6sENbv7jayGu7haJO1P/sP3ZdthA0K2eTFz8ctoZ/REDWF+2r4IQ974eAOnlgWtvD+uCc3jNukDT3cB5/wbQ3c2vd8r7MJgS1255x9ugQqCYCpAYJQOBXzoTIES7ZeOOgbmlA6G2LzbsOFa6Is1haHUXx2L8D5qSbILbku0mX+XFsmNje8uXo8Xe0cf5UZzsPz/OnE4NzOjo/wcMieftyhTdn2rGTu7Dz9q5cd8xTwpvmH2mlG3HG9tNeNid9KdZ226aC6nbd1Fz4aQ9PK+E8iX+86O9UeHyMrEvj56edgCcUK05xgtaNAWbHnUmHufySHtcXFTI3Jh2AZbZSv/njqdodX4ydaBJvxFq9fNB7/DKDwEqUQpaDJWS6LDCc0RVRDEcTtW5qyaI872Mmz7WTYnO3JkzXByGfkirtu8OeUeK1FOPhCFHNqJht5qhtgfXEnZ3fKiFMSmLnb3rnpArmHbO+tdB6V9mPiUrwlgJjo4j8YKd1kVR9iRa5hGHQrRHciU05SBeiGemYHzfdNl7tR54oyiEPKWgMWUbCMv+xd1CuAsEmj7eT7ymH7vlAaLf+jdfL0bCPiPtdTRBVq+ZH8Lh7kLauHdXHqKH7xWIDTeFDZNOERrErrMBhyc7hUb/cz7ncz5zbpx7U56S4gNTO8FzOwyL/yNo9zmiaKW7ysuEVMLd8IpEzIwjG+cFTGBpH7yE5QaJOJAonu/i6KvuF6WxPaMPRJWyVOxXPCKrz5n1xHyJ6HPq/1PSN4PfOg0QTWvaMoSBddzEdZ9YeY0E9Ia5/Y7KPpe3KmOZsgKqY1gi8ft0FxJVHbf5GSRhe5OrwrVFiAV9ujD/VL5GF1audjTtDQzHq1QAWJDUdfJiVK7viCHvw6qOXl3gOUEDafq+YKEYVAp5IGVNhpxYMa8/noFEiS/ZV1n50Q+EinSKioTNRbrB5Epqp+hG1qus7bd5RclQCHFoEUFFGrYYbkS6oEvrZE4fCQZZ0usPbou7LWCtVqn6YVHEgVgHj4Pr/7VOrv8jP/1X/XR0fvpv+Wl9P+W1fvvLMdAgcn2BVdckBtVG0+9rnHIh0SWLupay4SQfJ/Tayv1SAh1LQCYTtQY0qPebfinglAwdvWy02tWWo0p80WtZ9z9AJcPeoiedcTG40cuxrslNY4ye227N7n6BL2RTD7CRXawWtkz63drj1h8wXX7p1yZXBwr3hnRJ3mPivgWFm45Na1y1MaVeOTvw1XOKNH3WVTvT0+y61VXuJ5O0P8czGYu/o2pfD75X00PM/GmIu/DU/FeSnPFK/Fu/Wj/3X4FOfI17dfSXdkDev4a4Tu0xYumnyyh9z5FuyYBU1ljaSjnVe6XETGXF1d0tpV96/3U/rein9f1U7/PSL7bxmKVJaL3an8ZykpVTvV/N/E1og+o2DOyMpt5xiLy0BNKWzps5z3nWnCtneTep/pwlW7ST8DTNBvquWFhoOnnWd83qFjdo5RbQNkf1d38cVD/Q6KVbpBnVhkK9k1K8GMi5fKPvXbP9NTBf5yFaZyf78iDLd/6ZzFdx+Bs2Mt6LwnD2wp+/f6bZ/+oPDDocD6iPY9fV1Z0xxxvoMe7CYO6oZFzmh8U6fLb37f732Omw2xnhnZpRw5R8W2Q0VI/JMRuoa3YzXU9E8b7aheT7qwugUN4O2hWj63M2gUuqj3FMTSvl9lONo10+qPvpp/a31Yg/bsPZYc/4APr0Y5MqeOCtxQBD1ij7UrbLezFJM4jKhC7tp+lxk5eRvr9ms6QWKkQvl0m9DygfrYaYrEnIdjt9QWlp+hns7xNKY02ON9s3NB8fLLHRZ+QWqaV4dcbxOq+mLwlnf/bqPW5BACZ5rKn4O6cwh8X7Ewu1WHeXjqF3/4eGYZz9bkw02plb6HJclKMceJqEEg6N/PH/1ep8pt0nIyBoUGLT06fMi3Txms6YL+t5g9vM7h+SyF8gE/phM8/w4TNjihEqzE97IwIG2KfUDUYunEI/X+EFDiZbw6sAanAK0Iw+7LoTl1jtQQ9OAZT6AAox1t3Cas/fknG3lqOdY6R+3MWAP+0nY3qO6WEWlve8K0rcbqEwH2+vo2usOsMMmZ7oYewj4V1vjS3irRb92D6fbQLmfGoOPl4PKwMsxrsXBbMcBQO/us26LEOVs4O3I4TeAajKcQTYof7iRw+x3A7EgzNeuWGNA6HeCzo72rgbd7XRPREhBvB3pnOaIezqZfaZq4KJBxeggMsa6Pa997HKxIARRuIohl2VAhWOj9oT9Z3qPHpeGZ2R/m0J95eyanMEwkHydtELri8NFc8ubDodB/G4a6/THdnzgGdIA3xDe0JAXy8ruzegDHbG9UPCfgK5Fw7F3fA4QgrSyjTjEY5V3eOhOwnJpbv8GmO2pf3b0zH0/eEnnEkmMPXhnRAEJLOplXagMapY6xbpTwk/K4a+K3y1E2xN3ehVv7sK98mS7y6DlRuC44nR6Lfvp6Hahz6144S4t0tnvM6OOORQMtDluL9gODtVw19nYoZXKjEF3aFmurlKRBUdovpFVhtDvE12RQozC9EgN2U+SgrO9El1nCscKUc99dusxKksDoZ2GD7rAZnv0cQPSfH+NhaN/Tquz7HAw4Ldcb1AlPRIY0OuKHQOMJSNkxHsNLGqvednQG25SiYrkcshWj7KyE+xn8ymxvg0njFBTJEu92+jGtCvDvZyEJ4K8qOvkYyrCIjuGVNKXIIgX2fEN5XXRDsHKIzZ14gmemetsgcfQv7hE5xMIENILHwE4Yk/linQwNfR0M0uzLlAPbaCTl8C8Usl/uK9q5ear3x8lOHstw1O4pARhGj+QHA/l+kLRIQ5nO69Rl99KmCSLx/jfBJZgMzIcS3aXdIbleO0Lo0jGB1VHEIu417ZY3a3iaPZM0WeFXp06rXfStbNPfqGPzfG8pmTyabE3P1GQldDRcY634Fw6kfk8hFRluzaGMc20qyHgR3SXQCkw2LXVSLKdShL+KpX+gcIrsKwut3x7xEbfBDpyR6xsZ0gGTrJEiysVDlACtq1LhQv3BCGs54JWFNMS31GC7AvHZK3ldQ6c9GS8xFPj2osLu01Xe4cJmqYD+GH6K/wf3HfOI/H2ScQkLJcj/UcE4DfhNLo3USze73pfgdXVOVTpMGdFw5porBLaJdP+fAJc36uz6Fc/2pvgHemcqAZKyWB6neSmO/2sL2nPriHRvX7QLSg3BlAB9QqkmG/dC65MxENT03NBrDduzC847n7EzqKC9hvAaJW3n3k8ux5WVXOf8f4snjVas9ywkgIk0OxVyWXNZ+crgjJdeDqRFDX0+3B8F+/0X+p/0g/81Xjf5+80PsT4nz5HGPWGKSz5+VvI9MtzROgX530w+EU3XOIQSNFZTTvbcaudqPtVEM+QisLn5PoVBflKLwzhHqf3RYE756xTH0OCuBAG9nChUJdpPyIXuzdXDID425iQ7XAuWhWEHWFa+RMT7G5AO5e8LXmhHJ99c6So2rQ9Keso7HnenXNXrB2ZeQl6O6ujNzW+ZIBexIECcS2IFbmTh/IaFI5PMTtRPvDWKrQQflZugoZ891uGCZCw4GqD78x8PGgUMUDAO5fW6CCq9oWvIULgLskhYIS2KIOjvdlNaZfdjk8+HEOcn+ScwaClL2W7MH3XrynqeITnHQs20MrMsMDpd2w89qOFMqJ1GkfpogSY6h0s9X6Yp6mXNgTT7m3qmzO3cU17aWdMKKoLORD7lzpsQ7W82YgYOKqCojZp2VyXvGwuf5glkVEgP5DCEm/X9bfqvZE+4EAVqM7EZ0+GWerH6xKrj83UF633a0r7Cc71+we5/C3WXWap6TAh44oJo6IwwNllQpE0Jw+i6MMo0ZGoLeCMdV0KVqiXtvWi/NiXYYHFrji70MtxE98OQ1PlSsYzQ9JDezqVzVv1xRvEzjT3d7BmDUqWfSJcAQtSHvjzDZbEtwwbN+B7cLXrUqVbKSJ+QZ5HUlPEb8MW4NbrAOa0IFCz1/JX7fBrO3G3coKnyaM4Zi33Ajod/3MbzRr95wXXD6chKuO6o9DvDliCxBQ4Bigb39pBPolAI9Hf+gXRp5RiFJmQMvHSCJl0PphKkEaNT/JY71J+jCUPgFaT+d4ki6fLU90HKcMT9qU2BJT0qL5bbxBsxqOo07UosDVD1MNNlGZoaxdikK/WEou8M4g5QkV8G6ebECHn/3E/eplqode3v3Traj38u5Pjevo6NOOu05mub1Mb8ln7+5vlXh35+B2+lCAOI2qvNiM/M4kYOcCDU09Hgdr1XVWENovQ9QqxxhOJHlRdt9fzlbTaQnj94KN4mQrRCacTkHhyzOFEGneCoWqnMUrRcig43cWmcpf/bJZ6FU4Vdf5v1LhmmDcvS5t6EQSK5czucZi58ssc5yu9avhy3fQAHpEHX/TTImfYT+TzBBEBliBD8fVMflfpbHECClIqoUzBvKstWAbizQZHrCa/kUIkmdl9jIAlmuODLpOXhRcYOmlbWnXHzpUPqzmYDprNnNcmogZc1k5zv6aB5E9vyXhYXuglGHNaPgp0mREdRTwaQfEshnD5ifv8bTNNgm7QmZwb9/7e1yNBMakZgUj+jEyLR2nvE3zT44kP7qyCadwdcsHUmr5/Wt5NaXehuVc8MUSI680q34Xar7+t3a42KjLDMDV5fvrBYERy1PvgMhaFPs7PtQCqBPoSAovKINMegA5s7uJktm4jDQQCg6mT9YUfezqwcHvYxHOuZDS0u6gtDDWO/M+XMBucH4K+Dhpx+pvqHiTL6tCtmgMS3LT7WrnhRCF8iPBLua+p35oPwrHAKEzKgao2K7/f6F9y4e6yQ14n65eB6fAzucKSGVi8MkoqTFoyFgjHzUvkF9ezhG18FmUka89ac5asxqd0SiEYFElfPcdS8Ma6u/9SGYA/2PFFpAjzFer6yIlAJGOvkzyndRDsYeP1aDjlDJ/cJA0qrv6WoW7bbPuPHN74t5peqb9On/ObVKzrsf/OicdPAFxqnUbsx1x+jrmWazQlyTLnSpMmcYlXoTwlIo7YHxoTsKVCNzgechUZj/gQrVlvUeJMlOJCHvePOj1TowkfX2SwogbAb0EChhg/OM5A7MeXBW4Pk0lHFiHtTIhFKGUYVPYAjloU0UJ+5JUUDghP2nIxFxlUwmeQvCTblrkuq4TM0LUT8gqwsh3g0frjZonPUvHkujccCuPKdixha6tXTF01LeqJFO7jsJTpSoC6wt6U9TAD2FKQ8sXingHQ8WPm+rJR2CBYne4T3tKj4iLI+IbNpJ7fzhTnVKT5aLJpTuZp1TYOpynZ/+WVO0kaX/ffAZ0nluTgMHooBl81qzG79CwfJraKZrkRN80pcCqRW3MDma8EM/WhZ+EiKc6yeWarNIOLxyJ+RIfKxtfSu70hEvTCbFw6OPVtuIKcxExMbhRS4nDOS/4vKYTJ34zAYgLwZ1RfhYHUuWIOJ4V334mvaZT2LPn+mIQiqNbUgUdl/hrxd+Dvss7mC3tl4X54BgFCpW339mluHIRCooiDfLREUdCsKoebHHdrFTp3TGwoQEBkKwj/WftXbtq+Lh2QxqRVglQ4Iv0Lcu81o5orvfagg+gKT3xwKFRT8c47a+NnA3AmOCI2Mro8BaFd3DnnER9CmjyME2c8YWQsfPurRCs3kqvT/2mNBV3PsVTPOVTPLWXeAdin4WfN9SwaOzsv4/l6HbFjg+S0A1cYOXcxQGDslElmwrWjYKOc5WcJZKFgpTV3l/XDaBxjK5oU4w/jyTeVue/x+jZjvo7RDleE6OEJnBSmA9nbpA8R0C7/xrK2oYsKQ7kE2xz/gm2Oa8Ov8OtaxdetFlI+HY3TnkAMDyABv4tKILsPVIRBbV8W07SsjQzu9OUNbD3d9CKoIsj3sECxjiSg8E+G9MJpj7avosMxyL+XVp/CUVzpw8e/UqoZwDyxomU6YUdZQsAsKFsH6H9HP9OQMZFLaUWZeSJ3DaM9d8fzjXu9cXJ/zecdTz0zXFj3Cw2r29c3yw3b2zc2Pg8F8BmvWnXstE2rpu1Ged2mc1heUjs3BnavPbYNegI3tUaqO/cCmVnV4nDO8pI37QYrWr0wgaG2w8SF4OaG5TUlPJygljtz2oljiVBmH4qgpMgdiWOKzZOt8dz6DfOdtl2fDYWE4DZy8PM7K4+vQ0Gs8WelpyA3j0NufUSoc6v7CnOSEYmoyJs+Px3VkyQUNWXzvjNH7puqQ4B0kgVDEGTh9+A2Fi3vnQaLikZJHPwufa4qckOzMpdpMvDj4znIYg690+VXLDlkvWxQkFl+gEaJu39ImtHsZaplO1pgj0ce18bjw3pZPFg1HERTcPYkCuBm3UzE+ha1BwMvu/nf5emlFdFZ5hqgmagrLsSgpT/lOa4JgXhYMj4ktPSCWs43Y0lbUnRANE9N7uQaY8SX8BbQw+ORbHrq7yToDpKJUTIOXXi/ErAKpnASipjOrBPH+Ju1Stdt6P3G+6da3mFlTJaHevm1Zik8cLx6VhmiWw37ctuWbRQ733QUsCT16ErFeHj2rQEKhzrrxrNLTrviiE6rfW7BnWmUmxFzQBouob44QQkGAqoYBERcsaiXNxwnaKkfCXrDQFFlR7gbFzppG6ti6Y2j8cLAqQ9AMwifHJGKDm+CBMWsDsA2RUi4xje5TVzEOwWgMwwRk5i/KxB4pqQb428CzmVcstzzC2vBJG/sk9L6YwGz4cfApSrb11ZDfJfk7UFINKtH3VyZR325ybLzzMh6U3wyXdPQwWvFWEKZnP6lGL/DndCMUqd8Ms5Xg/YfA7Bu64xopUsnIfUYqQGvkcB4+ecgdpbx1z7jDmuGBi7v26NnryKealauNhLz6OOWo7QhR031ctugKUJsD3q4gWCcMqoJCuVo7aX9sdvtXzLuMOYeEiWAfeMbwKAm+zIdFFOid6LM78vqL+uOsaX/k7lPv+87kgsLKEsmiyD+fZJzXbzOg160SbIOZO7U0IXlhF3/w0fcvb/iI1N8hQnsm3WYLbxYkNNx7lKE8L1esp1aHG/dPYHNcJvOTwCyr+2tHsI0sMpGUG9cQpNa/PxWWRfkH25TO2QOpo1RJkeXZlDfsHjTz3iNTVRckn1m6lqfJCp/DPVWwVpSP5i30sjd2HOqcgWs/xnexv7cjg1pEvthiVgx+DSvyzGmLOLIKxxrVLpD9B9bbVHVm7FCzNd4kzoFSzzmd6AhaxVrUOOGLCfnGPBYg2+NFvSFXtHvrKtbKWlgDGv+WF268kEhVyR0uEWDxE6S3RccwB1gXSAUZZVJVeYSeW71rsxNFQCYC5bWvvbLPxMcjojrqKp4ea61C08MVdzBKQ5lmKZl00oyT6c+CkfDEMeLXVtMnLDX0XLUkYafg9MieUlisGzr8RiYWT57jU91C1N5EqaO0csg19UT8dmfxl5Aaw4w8awCTRyd9CUiQgdnFRDv4salU46N57KS+qDcgYKrKIYy5u1Cn4ZAyhT61qx7UFspBn1p0lSgc4GVejQaINcG7e2oNUAwxkk5MoynCzyh1IQutomlhE1tUd+ev0kEI6fq3IWlWURXmQp69fhdsDSaKrUZ1hSkiEWMeBP+g8fOz5cQrPZBloguMiHmnkwmb/zBx89Pbo/vO3kmyPm9QHob7KqAFqdQDsP/mFcsOuQHiUHxKqw0CyCtA8Wzsx0qfAiIY8VCGGhBLy/kWbiYpp99Q1Tb3ICfzpECoXULIC+AKUnNoXO7ahPlreKtSN3Ge0u7tk1KQs8wSVFl3UjpZtPE6/o1OYbt2to9FEOi+pDm73pvKXIUf76PVl0FEVUm3jcXYh8sS5/4i2rVwg/cA3QtOkLbo7Y8h21rUGUpjYvonu3O9cE/SUfwR1dY5HWRZEWhatgomKKWJU3Ei+JcmguLEdqSsDXVW+oRrVquKpNKELtkn1SHedU1GTe47JFebUcCFGidam1HuEDU7HUtcmi4rY4oiiTW6z+MFyzb4snsk1L5e6TPoFCTq4K94h1a/OyCBkV9WB3duHw0MC7VcJE+dZCwsUi0Ts4nTCU2TvX66LFGhvdBmiwJ8WTz/bW7h6iYETWpSimiYSab43GvftRmE0fGewbA/hrrpp2cK499PAnm+IdFvVG+BhNjRSUW1Uw1zIE2MFZbe1EHLb5F3HPG43wdfH2emjerUKrxAGu4N9ULTKthADHALKksRwTufCY9sCwX8CNYLVGpEjaFCtUBHLGVM7JAoWLsJmzJyAA5ISNL7+qrQF6h+3aQJNT7quhymEGrTUzKLC/0bCiYwlS0iqNJVYRonkKhAwQY2uhnIzbOyYfZGrc6Iu0MKXhF921w1R31Yp5gYVb0E3kAhT4BtgON3HLYhNATZq5l7/Er0Fk5Bcc22LagPDJqhtfGp+VLWGQ3HFIsb4tK+JGq8zlRYphEzqN3XjHK7UpwWb1/hkFRM1JQxQvMkHJVEeZHzKz2U0CtyXW5XzX1rkc+sPx5hBOnMin0gyZLRRZWNSlHN5LhBUS1bHgzfjhWn/Ydp2hOyWQ6ggdsao4wCFSTU/vsQ6Y5JlBSgoZbVonVg/RIAPosE2RGDhNZ1nYA/5jimN6mFKeS+HmL2c2Zb7YCV77xvkY3vWKXYPjMHMNS9PoiHhFUD0PgSgzVq3A9o+N3PWf3mQMwfHOWivzAT4JL2oVnqEvpq0AhO9O7XaoPlqbknSp0iIilrrdzDL3XQqvhakWDZif3wX4TKz/el/LeFuGuozpTGN5SKrw3/BWbmBGTZafEyRItMm+882t6xCCpkPQcgGRHfrhsmIB7jbvoOCpH8eMcRwkLnb7ouDYNqDSyHug3RdqKtBYdxD4xItP/khh/psvnZSlGFSeuvh9lfN0qcgzlk/JLV9LxWV41smMF3JMGS12du5VUPFqQVc8OgvotlqBKGIEDMSiVxMUBeYtfh3TXZDaZRQLZHxogWgTAmPLUsoglq0JeAe59tVb+NAudFS/5lfnTAf94/n5KsbFz04KulZbm9wE0sP5ONBXDujpi2VTQLnVKTJNoH1WuCD8WIdbhVbuxQULuItmr6nKItAd8tqoFQmASabahH2QEpJZhYvYJ/gBBAxF61lfQzD5mmLPvPfRlJtegWjRwY1BTUYrfhQt0j7OZN+6D+X0+657Z+9nsV0nK/2bPvI7cf8+H7AvG5tQVKAwxWvxgb3ufgAceVi4eot0VvXZ1GeVn0WushXLEQkQI2MDy9wX85H7Z/qxDq9qm2qKt6VaPbacIhH7zoi/yoLxLAE3R/9itUQJHgA=","base64")).toString()),qY)});var Oxe=L((JY,zY)=>{(function(t){JY&&typeof JY=="object"&&typeof zY<"u"?zY.exports=t():typeof define=="function"&&define.amd?define([],t):typeof window<"u"?window.isWindows=t():typeof global<"u"?global.isWindows=t():typeof self<"u"?self.isWindows=t():this.isWindows=t()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var Uxe=L((_mr,_xe)=>{"use strict";ZY.ifExists=mTt;var Dw=Ie("util"),Jc=Ie("path"),Lxe=Oxe(),hTt=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,gTt={createPwshFile:!0,createCmdFile:Lxe(),fs:Ie("fs")},dTt=new Map([[".js","node"],[".cjs","node"],[".mjs","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function Mxe(t){let e={...gTt,...t},r=e.fs;return e.fs_={chmod:r.chmod?Dw.promisify(r.chmod):async()=>{},mkdir:Dw.promisify(r.mkdir),readFile:Dw.promisify(r.readFile),stat:Dw.promisify(r.stat),unlink:Dw.promisify(r.unlink),writeFile:Dw.promisify(r.writeFile)},e}async function ZY(t,e,r){let s=Mxe(r);await s.fs_.stat(t),await ETt(t,e,s)}function mTt(t,e,r){return ZY(t,e,r).catch(()=>{})}function yTt(t,e){return e.fs_.unlink(t).catch(()=>{})}async function ETt(t,e,r){let s=await vTt(t,r);return await ITt(e,r),CTt(t,e,s,r)}function ITt(t,e){return e.fs_.mkdir(Jc.dirname(t),{recursive:!0})}function CTt(t,e,r,s){let a=Mxe(s),n=[{generator:bTt,extension:""}];return a.createCmdFile&&n.push({generator:DTt,extension:".cmd"}),a.createPwshFile&&n.push({generator:PTt,extension:".ps1"}),Promise.all(n.map(c=>STt(t,e+c.extension,r,c.generator,a)))}function wTt(t,e){return yTt(t,e)}function BTt(t,e){return xTt(t,e)}async function vTt(t,e){let a=(await e.fs_.readFile(t,"utf8")).trim().split(/\r*\n/)[0].match(hTt);if(!a){let n=Jc.extname(t).toLowerCase();return{program:dTt.get(n)||null,additionalArgs:""}}return{program:a[1],additionalArgs:a[2]}}async function STt(t,e,r,s,a){let n=a.preserveSymlinks?"--preserve-symlinks":"",c=[r.additionalArgs,n].filter(f=>f).join(" ");return a=Object.assign({},a,{prog:r.program,args:c}),await wTt(e,a),await a.fs_.writeFile(e,s(t,e,a),"utf8"),BTt(e,a)}function DTt(t,e,r){let a=Jc.relative(Jc.dirname(e),t).split("/").join("\\"),n=Jc.isAbsolute(a)?`"${a}"`:`"%~dp0\\${a}"`,c,f=r.prog,p=r.args||"",h=XY(r.nodePath).win32;f?(c=`"%~dp0\\${f}.exe"`,a=n):(f=n,p="",a="");let E=r.progArgs?`${r.progArgs.join(" ")} `:"",C=h?`@SET NODE_PATH=${h}\r -`:"";return c?C+=`@IF EXIST ${c} (\r - ${c} ${p} ${a} ${E}%*\r -) ELSE (\r - @SETLOCAL\r - @SET PATHEXT=%PATHEXT:;.JS;=;%\r - ${f} ${p} ${a} ${E}%*\r -)\r -`:C+=`@${f} ${p} ${a} ${E}%*\r -`,C}function bTt(t,e,r){let s=Jc.relative(Jc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;s=s.split("\\").join("/");let c=Jc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,f=r.args||"",p=XY(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,s=c):(a=c,f="",s="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",E=`#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") - -case \`uname\` in - *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; -esac - -`,C=r.nodePath?`export NODE_PATH="${p}" -`:"";return n?E+=`${C}if [ -x ${n} ]; then - exec ${n} ${f} ${s} ${h}"$@" -else - exec ${a} ${f} ${s} ${h}"$@" -fi -`:E+=`${C}${a} ${f} ${s} ${h}"$@" -exit $? -`,E}function PTt(t,e,r){let s=Jc.relative(Jc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,c;s=s.split("\\").join("/");let f=Jc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,p=r.args||"",h=XY(r.nodePath),E=h.win32,C=h.posix;n?(c=`"$basedir/${r.prog}$exe"`,s=f):(n=f,p="",s="");let S=r.progArgs?`${r.progArgs.join(" ")} `:"",P=`#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -${r.nodePath?`$env_node_path=$env:NODE_PATH -$env:NODE_PATH="${E}" -`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -}`;return r.nodePath&&(P+=` else { - $env:NODE_PATH="${C}" -}`),c?P+=` -$ret=0 -if (Test-Path ${c}) { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & ${c} ${p} ${s} ${S}$args - } else { - & ${c} ${p} ${s} ${S}$args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & ${n} ${p} ${s} ${S}$args - } else { - & ${n} ${p} ${s} ${S}$args - } - $ret=$LASTEXITCODE -} -${r.nodePath?`$env:NODE_PATH=$env_node_path -`:""}exit $ret -`:P+=` -# Support pipeline input -if ($MyInvocation.ExpectingInput) { - $input | & ${n} ${p} ${s} ${S}$args -} else { - & ${n} ${p} ${s} ${S}$args -} -${r.nodePath?`$env:NODE_PATH=$env_node_path -`:""}exit $LASTEXITCODE -`,P}function xTt(t,e){return e.fs_.chmod(t,493)}function XY(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(Jc.delimiter):Array.from(t),r={};for(let s=0;s`/mnt/${f.toLowerCase()}`):e[s];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:a,posix:n}}return r}_xe.exports=ZY});var AV=L((oEr,oke)=>{oke.exports=Ie("stream")});var uke=L((aEr,cke)=>{"use strict";function ake(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function sRt(t){for(var e=1;e0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:"unshift",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var s=this.head,a=""+s.data;s=s.next;)a+=r+s.data;return a}},{key:"concat",value:function(r){if(this.length===0)return hN.alloc(0);for(var s=hN.allocUnsafe(r>>>0),a=this.head,n=0;a;)ARt(a.data,s,n),n+=a.data.length,a=a.next;return s}},{key:"consume",value:function(r,s){var a;return rc.length?c.length:r;if(f===c.length?n+=c:n+=c.slice(0,r),r-=f,r===0){f===c.length?(++a,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=c.slice(f));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var s=hN.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(s),r-=a.data.length;a=a.next;){var c=a.data,f=r>c.length?c.length:r;if(c.copy(s,s.length-r,0,f),r-=f,r===0){f===c.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=c.slice(f));break}++n}return this.length-=n,s}},{key:fRt,value:function(r,s){return pV(this,sRt({},s,{depth:0,customInspect:!1}))}}]),t}()});var gV=L((lEr,Ake)=>{"use strict";function pRt(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(hV,this,t)):process.nextTick(hV,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(gN,r):(r._writableState.errorEmitted=!0,process.nextTick(fke,r,n)):process.nextTick(fke,r,n):e?(process.nextTick(gN,r),e(n)):process.nextTick(gN,r)}),this)}function fke(t,e){hV(t,e),gN(t)}function gN(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function hRt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function hV(t,e){t.emit("error",e)}function gRt(t,e){var r=t._readableState,s=t._writableState;r&&r.autoDestroy||s&&s.autoDestroy?t.destroy(e):t.emit("error",e)}Ake.exports={destroy:pRt,undestroy:hRt,errorOrDestroy:gRt}});var ag=L((cEr,gke)=>{"use strict";var hke={};function Zc(t,e,r){r||(r=Error);function s(n,c,f){return typeof e=="string"?e:e(n,c,f)}class a extends r{constructor(c,f,p){super(s(c,f,p))}}a.prototype.name=r.name,a.prototype.code=t,hke[t]=a}function pke(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(s=>String(s)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function dRt(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function mRt(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function yRt(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Zc("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Zc("ERR_INVALID_ARG_TYPE",function(t,e,r){let s;typeof e=="string"&&dRt(e,"not ")?(s="must not be",e=e.replace(/^not /,"")):s="must be";let a;if(mRt(t," argument"))a=`The ${t} ${s} ${pke(e,"type")}`;else{let n=yRt(t,".")?"property":"argument";a=`The "${t}" ${n} ${s} ${pke(e,"type")}`}return a+=`. Received type ${typeof r}`,a},TypeError);Zc("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Zc("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Zc("ERR_STREAM_PREMATURE_CLOSE","Premature close");Zc("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Zc("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Zc("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Zc("ERR_STREAM_WRITE_AFTER_END","write after end");Zc("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Zc("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Zc("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");gke.exports.codes=hke});var dV=L((uEr,dke)=>{"use strict";var ERt=ag().codes.ERR_INVALID_OPT_VALUE;function IRt(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function CRt(t,e,r,s){var a=IRt(e,s,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=s?r:"highWaterMark";throw new ERt(n,a)}return Math.floor(a)}return t.objectMode?16:16*1024}dke.exports={getHighWaterMark:CRt}});var mke=L((fEr,mV)=>{typeof Object.create=="function"?mV.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:mV.exports=function(e,r){if(r){e.super_=r;var s=function(){};s.prototype=r.prototype,e.prototype=new s,e.prototype.constructor=e}}});var lg=L((AEr,EV)=>{try{if(yV=Ie("util"),typeof yV.inherits!="function")throw"";EV.exports=yV.inherits}catch{EV.exports=mke()}var yV});var Eke=L((pEr,yke)=>{yke.exports=Ie("util").deprecate});var wV=L((hEr,Ske)=>{"use strict";Ske.exports=Ki;function Cke(t){var e=this;this.next=null,this.entry=null,this.finish=function(){KRt(e,t)}}var Qw;Ki.WritableState=ab;var wRt={deprecate:Eke()},wke=AV(),mN=Ie("buffer").Buffer,BRt=global.Uint8Array||function(){};function vRt(t){return mN.from(t)}function SRt(t){return mN.isBuffer(t)||t instanceof BRt}var CV=gV(),DRt=dV(),bRt=DRt.getHighWaterMark,cg=ag().codes,PRt=cg.ERR_INVALID_ARG_TYPE,xRt=cg.ERR_METHOD_NOT_IMPLEMENTED,kRt=cg.ERR_MULTIPLE_CALLBACK,QRt=cg.ERR_STREAM_CANNOT_PIPE,TRt=cg.ERR_STREAM_DESTROYED,RRt=cg.ERR_STREAM_NULL_VALUES,FRt=cg.ERR_STREAM_WRITE_AFTER_END,NRt=cg.ERR_UNKNOWN_ENCODING,Tw=CV.errorOrDestroy;lg()(Ki,wke);function ORt(){}function ab(t,e,r){Qw=Qw||Wm(),t=t||{},typeof r!="boolean"&&(r=e instanceof Qw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=bRt(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){qRt(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Cke(this)}ab.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ab.prototype,"buffer",{get:wRt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var dN;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(dN=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ki,Symbol.hasInstance,{value:function(e){return dN.call(this,e)?!0:this!==Ki?!1:e&&e._writableState instanceof ab}})):dN=function(e){return e instanceof this};function Ki(t){Qw=Qw||Wm();var e=this instanceof Qw;if(!e&&!dN.call(Ki,this))return new Ki(t);this._writableState=new ab(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),wke.call(this)}Ki.prototype.pipe=function(){Tw(this,new QRt)};function LRt(t,e){var r=new FRt;Tw(t,r),process.nextTick(e,r)}function MRt(t,e,r,s){var a;return r===null?a=new RRt:typeof r!="string"&&!e.objectMode&&(a=new PRt("chunk",["string","Buffer"],r)),a?(Tw(t,a),process.nextTick(s,a),!1):!0}Ki.prototype.write=function(t,e,r){var s=this._writableState,a=!1,n=!s.objectMode&&SRt(t);return n&&!mN.isBuffer(t)&&(t=vRt(t)),typeof e=="function"&&(r=e,e=null),n?e="buffer":e||(e=s.defaultEncoding),typeof r!="function"&&(r=ORt),s.ending?LRt(this,r):(n||MRt(this,s,t,r))&&(s.pendingcb++,a=URt(this,s,n,t,e,r)),a};Ki.prototype.cork=function(){this._writableState.corked++};Ki.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Bke(this,t))};Ki.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new NRt(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Ki.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function _Rt(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=mN.from(e,r)),e}Object.defineProperty(Ki.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function URt(t,e,r,s,a,n){if(!r){var c=_Rt(e,s,a);s!==c&&(r=!0,a="buffer",s=c)}var f=e.objectMode?1:s.length;e.length+=f;var p=e.length{"use strict";var JRt=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};bke.exports=yA;var Dke=SV(),vV=wV();lg()(yA,Dke);for(BV=JRt(vV.prototype),yN=0;yN{var IN=Ie("buffer"),ch=IN.Buffer;function Pke(t,e){for(var r in t)e[r]=t[r]}ch.from&&ch.alloc&&ch.allocUnsafe&&ch.allocUnsafeSlow?xke.exports=IN:(Pke(IN,DV),DV.Buffer=Rw);function Rw(t,e,r){return ch(t,e,r)}Pke(ch,Rw);Rw.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ch(t,e,r)};Rw.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var s=ch(t);return e!==void 0?typeof r=="string"?s.fill(e,r):s.fill(e):s.fill(0),s};Rw.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ch(t)};Rw.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return IN.SlowBuffer(t)}});var xV=L(Tke=>{"use strict";var PV=kke().Buffer,Qke=PV.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function XRt(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function $Rt(t){var e=XRt(t);if(typeof e!="string"&&(PV.isEncoding===Qke||!Qke(t)))throw new Error("Unknown encoding: "+t);return e||t}Tke.StringDecoder=lb;function lb(t){this.encoding=$Rt(t);var e;switch(this.encoding){case"utf16le":this.text=sFt,this.end=oFt,e=4;break;case"utf8":this.fillLast=rFt,e=4;break;case"base64":this.text=aFt,this.end=lFt,e=3;break;default:this.write=cFt,this.end=uFt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=PV.allocUnsafe(e)}lb.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function eFt(t,e,r){var s=e.length-1;if(s=0?(a>0&&(t.lastNeed=a-1),a):--s=0?(a>0&&(t.lastNeed=a-2),a):--s=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function tFt(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function rFt(t){var e=this.lastTotal-this.lastNeed,r=tFt(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function nFt(t,e){var r=eFt(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var s=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,s),t.toString("utf8",e,s)}function iFt(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function sFt(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var s=r.charCodeAt(r.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function oFt(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function aFt(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function lFt(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function cFt(t){return t.toString(this.encoding)}function uFt(t){return t&&t.length?this.write(t):""}});var CN=L((mEr,Nke)=>{"use strict";var Rke=ag().codes.ERR_STREAM_PREMATURE_CLOSE;function fFt(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,s=new Array(r),a=0;a{"use strict";var wN;function ug(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var hFt=CN(),fg=Symbol("lastResolve"),Ym=Symbol("lastReject"),ub=Symbol("error"),BN=Symbol("ended"),Vm=Symbol("lastPromise"),kV=Symbol("handlePromise"),Km=Symbol("stream");function Ag(t,e){return{value:t,done:e}}function gFt(t){var e=t[fg];if(e!==null){var r=t[Km].read();r!==null&&(t[Vm]=null,t[fg]=null,t[Ym]=null,e(Ag(r,!1)))}}function dFt(t){process.nextTick(gFt,t)}function mFt(t,e){return function(r,s){t.then(function(){if(e[BN]){r(Ag(void 0,!0));return}e[kV](r,s)},s)}}var yFt=Object.getPrototypeOf(function(){}),EFt=Object.setPrototypeOf((wN={get stream(){return this[Km]},next:function(){var e=this,r=this[ub];if(r!==null)return Promise.reject(r);if(this[BN])return Promise.resolve(Ag(void 0,!0));if(this[Km].destroyed)return new Promise(function(c,f){process.nextTick(function(){e[ub]?f(e[ub]):c(Ag(void 0,!0))})});var s=this[Vm],a;if(s)a=new Promise(mFt(s,this));else{var n=this[Km].read();if(n!==null)return Promise.resolve(Ag(n,!1));a=new Promise(this[kV])}return this[Vm]=a,a}},ug(wN,Symbol.asyncIterator,function(){return this}),ug(wN,"return",function(){var e=this;return new Promise(function(r,s){e[Km].destroy(null,function(a){if(a){s(a);return}r(Ag(void 0,!0))})})}),wN),yFt),IFt=function(e){var r,s=Object.create(EFt,(r={},ug(r,Km,{value:e,writable:!0}),ug(r,fg,{value:null,writable:!0}),ug(r,Ym,{value:null,writable:!0}),ug(r,ub,{value:null,writable:!0}),ug(r,BN,{value:e._readableState.endEmitted,writable:!0}),ug(r,kV,{value:function(n,c){var f=s[Km].read();f?(s[Vm]=null,s[fg]=null,s[Ym]=null,n(Ag(f,!1))):(s[fg]=n,s[Ym]=c)},writable:!0}),r));return s[Vm]=null,hFt(e,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=s[Ym];n!==null&&(s[Vm]=null,s[fg]=null,s[Ym]=null,n(a)),s[ub]=a;return}var c=s[fg];c!==null&&(s[Vm]=null,s[fg]=null,s[Ym]=null,c(Ag(void 0,!0))),s[BN]=!0}),e.on("readable",dFt.bind(null,s)),s};Oke.exports=IFt});var Hke=L((EEr,Uke)=>{"use strict";function Mke(t,e,r,s,a,n,c){try{var f=t[n](c),p=f.value}catch(h){r(h);return}f.done?e(p):Promise.resolve(p).then(s,a)}function CFt(t){return function(){var e=this,r=arguments;return new Promise(function(s,a){var n=t.apply(e,r);function c(p){Mke(n,s,a,c,f,"next",p)}function f(p){Mke(n,s,a,c,f,"throw",p)}c(void 0)})}}function _ke(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function wFt(t){for(var e=1;e{"use strict";Zke.exports=Pn;var Fw;Pn.ReadableState=Wke;var IEr=Ie("events").EventEmitter,Gke=function(e,r){return e.listeners(r).length},Ab=AV(),vN=Ie("buffer").Buffer,DFt=global.Uint8Array||function(){};function bFt(t){return vN.from(t)}function PFt(t){return vN.isBuffer(t)||t instanceof DFt}var QV=Ie("util"),ln;QV&&QV.debuglog?ln=QV.debuglog("stream"):ln=function(){};var xFt=uke(),MV=gV(),kFt=dV(),QFt=kFt.getHighWaterMark,SN=ag().codes,TFt=SN.ERR_INVALID_ARG_TYPE,RFt=SN.ERR_STREAM_PUSH_AFTER_EOF,FFt=SN.ERR_METHOD_NOT_IMPLEMENTED,NFt=SN.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Nw,TV,RV;lg()(Pn,Ab);var fb=MV.errorOrDestroy,FV=["error","close","destroy","pause","resume"];function OFt(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Wke(t,e,r){Fw=Fw||Wm(),t=t||{},typeof r!="boolean"&&(r=e instanceof Fw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=QFt(this,t,"readableHighWaterMark",r),this.buffer=new xFt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Nw||(Nw=xV().StringDecoder),this.decoder=new Nw(t.encoding),this.encoding=t.encoding)}function Pn(t){if(Fw=Fw||Wm(),!(this instanceof Pn))return new Pn(t);var e=this instanceof Fw;this._readableState=new Wke(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Ab.call(this)}Object.defineProperty(Pn.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Pn.prototype.destroy=MV.destroy;Pn.prototype._undestroy=MV.undestroy;Pn.prototype._destroy=function(t,e){e(t)};Pn.prototype.push=function(t,e){var r=this._readableState,s;return r.objectMode?s=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=vN.from(t,e),e=""),s=!0),Yke(this,t,e,!1,s)};Pn.prototype.unshift=function(t){return Yke(this,t,null,!0,!1)};function Yke(t,e,r,s,a){ln("readableAddChunk",e);var n=t._readableState;if(e===null)n.reading=!1,_Ft(t,n);else{var c;if(a||(c=LFt(n,e)),c)fb(t,c);else if(n.objectMode||e&&e.length>0)if(typeof e!="string"&&!n.objectMode&&Object.getPrototypeOf(e)!==vN.prototype&&(e=bFt(e)),s)n.endEmitted?fb(t,new NFt):NV(t,n,e,!0);else if(n.ended)fb(t,new RFt);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?NV(t,n,e,!1):LV(t,n)):NV(t,n,e,!1)}else s||(n.reading=!1,LV(t,n))}return!n.ended&&(n.length=jke?t=jke:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function qke(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=MFt(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Pn.prototype.read=function(t){ln("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return ln("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?OV(this):DN(this),null;if(t=qke(t,e),t===0&&e.ended)return e.length===0&&OV(this),null;var s=e.needReadable;ln("need readable",s),(e.length===0||e.length-t0?a=Jke(t,e):a=null,a===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&OV(this)),a!==null&&this.emit("data",a),a};function _Ft(t,e){if(ln("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?DN(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Vke(t)))}}function DN(t){var e=t._readableState;ln("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(ln("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Vke,t))}function Vke(t){var e=t._readableState;ln("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,_V(t)}function LV(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(UFt,t,e))}function UFt(t,e){for(;!e.reading&&!e.ended&&(e.length1&&zke(s.pipes,t)!==-1)&&!h&&(ln("false write response, pause",s.awaitDrain),s.awaitDrain++),r.pause())}function S(N){ln("onerror",N),R(),t.removeListener("error",S),Gke(t,"error")===0&&fb(t,N)}OFt(t,"error",S);function P(){t.removeListener("finish",I),R()}t.once("close",P);function I(){ln("onfinish"),t.removeListener("close",P),R()}t.once("finish",I);function R(){ln("unpipe"),r.unpipe(t)}return t.emit("pipe",r),s.flowing||(ln("pipe resume"),r.resume()),t};function HFt(t){return function(){var r=t._readableState;ln("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Gke(t,"data")&&(r.flowing=!0,_V(t))}}Pn.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var s=e.pipes,a=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n0,s.flowing!==!1&&this.resume()):t==="readable"&&!s.endEmitted&&!s.readableListening&&(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,ln("on readable",s.length,s.reading),s.length?DN(this):s.reading||process.nextTick(jFt,this)),r};Pn.prototype.addListener=Pn.prototype.on;Pn.prototype.removeListener=function(t,e){var r=Ab.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Kke,this),r};Pn.prototype.removeAllListeners=function(t){var e=Ab.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Kke,this),e};function Kke(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function jFt(t){ln("readable nexttick read 0"),t.read(0)}Pn.prototype.resume=function(){var t=this._readableState;return t.flowing||(ln("resume"),t.flowing=!t.readableListening,qFt(this,t)),t.paused=!1,this};function qFt(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(GFt,t,e))}function GFt(t,e){ln("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),_V(t),e.flowing&&!e.reading&&t.read(0)}Pn.prototype.pause=function(){return ln("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ln("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function _V(t){var e=t._readableState;for(ln("flow",e.flowing);e.flowing&&t.read()!==null;);}Pn.prototype.wrap=function(t){var e=this,r=this._readableState,s=!1;t.on("end",function(){if(ln("wrapped end"),r.decoder&&!r.ended){var c=r.decoder.end();c&&c.length&&e.push(c)}e.push(null)}),t.on("data",function(c){if(ln("wrapped data"),r.decoder&&(c=r.decoder.write(c)),!(r.objectMode&&c==null)&&!(!r.objectMode&&(!c||!c.length))){var f=e.push(c);f||(s=!0,t.pause())}});for(var a in t)this[a]===void 0&&typeof t[a]=="function"&&(this[a]=function(f){return function(){return t[f].apply(t,arguments)}}(a));for(var n=0;n=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function OV(t){var e=t._readableState;ln("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(WFt,e,t))}function WFt(t,e){if(ln("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Pn.from=function(t,e){return RV===void 0&&(RV=Hke()),RV(Pn,t,e)});function zke(t,e){for(var r=0,s=t.length;r{"use strict";$ke.exports=uh;var bN=ag().codes,YFt=bN.ERR_METHOD_NOT_IMPLEMENTED,VFt=bN.ERR_MULTIPLE_CALLBACK,KFt=bN.ERR_TRANSFORM_ALREADY_TRANSFORMING,JFt=bN.ERR_TRANSFORM_WITH_LENGTH_0,PN=Wm();lg()(uh,PN);function zFt(t,e){var r=this._transformState;r.transforming=!1;var s=r.writecb;if(s===null)return this.emit("error",new VFt);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),s(t);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{"use strict";tQe.exports=pb;var eQe=UV();lg()(pb,eQe);function pb(t){if(!(this instanceof pb))return new pb(t);eQe.call(this,t)}pb.prototype._transform=function(t,e,r){r(null,t)}});var aQe=L((vEr,oQe)=>{"use strict";var HV;function XFt(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var sQe=ag().codes,$Ft=sQe.ERR_MISSING_ARGS,eNt=sQe.ERR_STREAM_DESTROYED;function nQe(t){if(t)throw t}function tNt(t){return t.setHeader&&typeof t.abort=="function"}function rNt(t,e,r,s){s=XFt(s);var a=!1;t.on("close",function(){a=!0}),HV===void 0&&(HV=CN()),HV(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,tNt(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();s(c||new eNt("pipe"))}}}function iQe(t){t()}function nNt(t,e){return t.pipe(e)}function iNt(t){return!t.length||typeof t[t.length-1]!="function"?nQe:t.pop()}function sNt(){for(var t=arguments.length,e=new Array(t),r=0;r0;return rNt(c,p,h,function(E){a||(a=E),E&&n.forEach(iQe),!p&&(n.forEach(iQe),s(a))})});return e.reduce(nNt)}oQe.exports=sNt});var Ow=L((Xc,gb)=>{var hb=Ie("stream");process.env.READABLE_STREAM==="disable"&&hb?(gb.exports=hb.Readable,Object.assign(gb.exports,hb),gb.exports.Stream=hb):(Xc=gb.exports=SV(),Xc.Stream=hb||Xc,Xc.Readable=Xc,Xc.Writable=wV(),Xc.Duplex=Wm(),Xc.Transform=UV(),Xc.PassThrough=rQe(),Xc.finished=CN(),Xc.pipeline=aQe())});var uQe=L((SEr,cQe)=>{"use strict";var{Buffer:uf}=Ie("buffer"),lQe=Symbol.for("BufferList");function wi(t){if(!(this instanceof wi))return new wi(t);wi._init.call(this,t)}wi._init=function(e){Object.defineProperty(this,lQe,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};wi.prototype._new=function(e){return new wi(e)};wi.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let s=0;sthis.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};wi.prototype.slice=function(e,r){return typeof e=="number"&&e<0&&(e+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};wi.prototype.copy=function(e,r,s,a){if((typeof s!="number"||s<0)&&(s=0),(typeof a!="number"||a>this.length)&&(a=this.length),s>=this.length||a<=0)return e||uf.alloc(0);let n=!!e,c=this._offset(s),f=a-s,p=f,h=n&&r||0,E=c[1];if(s===0&&a===this.length){if(!n)return this._bufs.length===1?this._bufs[0]:uf.concat(this._bufs,this.length);for(let C=0;CS)this._bufs[C].copy(e,h,E),h+=S;else{this._bufs[C].copy(e,h,E,E+p),h+=S;break}p-=S,E&&(E=0)}return e.length>h?e.slice(0,h):e};wi.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!="number"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let s=this._offset(e),a=this._offset(r),n=this._bufs.slice(s[0],a[0]+1);return a[1]===0?n.pop():n[n.length-1]=n[n.length-1].slice(0,a[1]),s[1]!==0&&(n[0]=n[0].slice(s[1])),this._new(n)};wi.prototype.toString=function(e,r,s){return this.slice(r,s).toString(e)};wi.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};wi.prototype.duplicate=function(){let e=this._new();for(let r=0;rthis.length?this.length:e;let s=this._offset(e),a=s[0],n=s[1];for(;a=t.length){let p=c.indexOf(t,n);if(p!==-1)return this._reverseOffset([a,p]);n=c.length-t.length+1}else{let p=this._reverseOffset([a,n]);if(this._match(p,t))return p;n++}n=0}return-1};wi.prototype._match=function(t,e){if(this.length-t{"use strict";var jV=Ow().Duplex,oNt=lg(),db=uQe();function na(t){if(!(this instanceof na))return new na(t);if(typeof t=="function"){this._callback=t;let e=function(s){this._callback&&(this._callback(s),this._callback=null)}.bind(this);this.on("pipe",function(s){s.on("error",e)}),this.on("unpipe",function(s){s.removeListener("error",e)}),t=null}db._init.call(this,t),jV.call(this)}oNt(na,jV);Object.assign(na.prototype,db.prototype);na.prototype._new=function(e){return new na(e)};na.prototype._write=function(e,r,s){this._appendBuffer(e),typeof s=="function"&&s()};na.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};na.prototype.end=function(e){jV.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};na.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};na.prototype._isBufferList=function(e){return e instanceof na||e instanceof db||na.isBufferList(e)};na.isBufferList=db.isBufferList;xN.exports=na;xN.exports.BufferListStream=na;xN.exports.BufferList=db});var WV=L(Mw=>{var aNt=Buffer.alloc,lNt="0000000000000000000",cNt="7777777777777777777",AQe=48,pQe=Buffer.from("ustar\0","binary"),uNt=Buffer.from("00","binary"),fNt=Buffer.from("ustar ","binary"),ANt=Buffer.from(" \0","binary"),pNt=parseInt("7777",8),mb=257,GV=263,hNt=function(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)},gNt=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},dNt=function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},hQe=function(t,e,r,s){for(;re?cNt.slice(0,e)+" ":lNt.slice(0,e-t.length)+t+" "};function mNt(t){var e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;for(var r=[],s=t.length-1;s>0;s--){var a=t[s];e?r.push(a):r.push(255-a)}var n=0,c=r.length;for(s=0;s=Math.pow(10,r)&&r++,e+r+t};Mw.decodeLongPath=function(t,e){return Lw(t,0,t.length,e)};Mw.encodePax=function(t){var e="";t.name&&(e+=qV(" path="+t.name+` -`)),t.linkname&&(e+=qV(" linkpath="+t.linkname+` -`));var r=t.pax;if(r)for(var s in r)e+=qV(" "+s+"="+r[s]+` -`);return Buffer.from(e)};Mw.decodePax=function(t){for(var e={};t.length;){for(var r=0;r100;){var a=r.indexOf("/");if(a===-1)return null;s+=s?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(pg(t.mode&pNt,6),100),e.write(pg(t.uid,6),108),e.write(pg(t.gid,6),116),e.write(pg(t.size,11),124),e.write(pg(t.mtime.getTime()/1e3|0,11),136),e[156]=AQe+dNt(t.type),t.linkname&&e.write(t.linkname,157),pQe.copy(e,mb),uNt.copy(e,GV),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(pg(t.devmajor||0,6),329),e.write(pg(t.devminor||0,6),337),s&&e.write(s,345),e.write(pg(gQe(e),6),148),e)};Mw.decode=function(t,e,r){var s=t[156]===0?0:t[156]-AQe,a=Lw(t,0,100,e),n=hg(t,100,8),c=hg(t,108,8),f=hg(t,116,8),p=hg(t,124,12),h=hg(t,136,12),E=gNt(s),C=t[157]===0?null:Lw(t,157,100,e),S=Lw(t,265,32),P=Lw(t,297,32),I=hg(t,329,8),R=hg(t,337,8),N=gQe(t);if(N===8*32)return null;if(N!==hg(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(pQe.compare(t,mb,mb+6)===0)t[345]&&(a=Lw(t,345,155,e)+"/"+a);else if(!(fNt.compare(t,mb,mb+6)===0&&ANt.compare(t,GV,GV+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return s===0&&a&&a[a.length-1]==="/"&&(s=5),{name:a,mode:n,uid:c,gid:f,size:p,mtime:new Date(1e3*h),type:E,linkname:C,uname:S,gname:P,devmajor:I,devminor:R}}});var wQe=L((PEr,CQe)=>{var mQe=Ie("util"),yNt=fQe(),yb=WV(),yQe=Ow().Writable,EQe=Ow().PassThrough,IQe=function(){},dQe=function(t){return t&=511,t&&512-t},ENt=function(t,e){var r=new kN(t,e);return r.end(),r},INt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},kN=function(t,e){this._parent=t,this.offset=e,EQe.call(this,{autoDestroy:!1})};mQe.inherits(kN,EQe);kN.prototype.destroy=function(t){this._parent.destroy(t)};var fh=function(t){if(!(this instanceof fh))return new fh(t);yQe.call(this,t),t=t||{},this._offset=0,this._buffer=yNt(),this._missing=0,this._partial=!1,this._onparse=IQe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,s=function(){e._continue()},a=function(S){if(e._locked=!1,S)return e.destroy(S);e._stream||s()},n=function(){e._stream=null;var S=dQe(e._header.size);S?e._parse(S,c):e._parse(512,C),e._locked||s()},c=function(){e._buffer.consume(dQe(e._header.size)),e._parse(512,C),s()},f=function(){var S=e._header.size;e._paxGlobal=yb.decodePax(r.slice(0,S)),r.consume(S),n()},p=function(){var S=e._header.size;e._pax=yb.decodePax(r.slice(0,S)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(S),n()},h=function(){var S=e._header.size;this._gnuLongPath=yb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},E=function(){var S=e._header.size;this._gnuLongLinkPath=yb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},C=function(){var S=e._offset,P;try{P=e._header=yb.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(I){e.emit("error",I)}if(r.consume(512),!P){e._parse(512,C),s();return}if(P.type==="gnu-long-path"){e._parse(P.size,h),s();return}if(P.type==="gnu-long-link-path"){e._parse(P.size,E),s();return}if(P.type==="pax-global-header"){e._parse(P.size,f),s();return}if(P.type==="pax-header"){e._parse(P.size,p),s();return}if(e._gnuLongPath&&(P.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(P.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=P=INt(P,e._pax),e._pax=null),e._locked=!0,!P.size||P.type==="directory"){e._parse(512,C),e.emit("entry",P,ENt(e,S),a);return}e._stream=new kN(e,S),e.emit("entry",P,e._stream,a),e._parse(P.size,n),s()};this._onheader=C,this._parse(512,C)};mQe.inherits(fh,yQe);fh.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};fh.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};fh.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=IQe,this._overflow?this._write(this._overflow,void 0,t):t()}};fh.prototype._write=function(t,e,r){if(!this._destroyed){var s=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.lengthn&&(c=t.slice(n),t=t.slice(0,n)),s?s.end(t):a.append(t),this._overflow=c,this._onparse()}};fh.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()};CQe.exports=fh});var vQe=L((xEr,BQe)=>{BQe.exports=Ie("fs").constants||Ie("constants")});var xQe=L((kEr,PQe)=>{var _w=vQe(),SQe=vH(),TN=lg(),CNt=Buffer.alloc,DQe=Ow().Readable,Uw=Ow().Writable,wNt=Ie("string_decoder").StringDecoder,QN=WV(),BNt=parseInt("755",8),vNt=parseInt("644",8),bQe=CNt(1024),VV=function(){},YV=function(t,e){e&=511,e&&t.push(bQe.slice(0,512-e))};function SNt(t){switch(t&_w.S_IFMT){case _w.S_IFBLK:return"block-device";case _w.S_IFCHR:return"character-device";case _w.S_IFDIR:return"directory";case _w.S_IFIFO:return"fifo";case _w.S_IFLNK:return"symlink"}return"file"}var RN=function(t){Uw.call(this),this.written=0,this._to=t,this._destroyed=!1};TN(RN,Uw);RN.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r};RN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var FN=function(){Uw.call(this),this.linkname="",this._decoder=new wNt("utf-8"),this._destroyed=!1};TN(FN,Uw);FN.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()};FN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Eb=function(){Uw.call(this),this._destroyed=!1};TN(Eb,Uw);Eb.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))};Eb.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var EA=function(t){if(!(this instanceof EA))return new EA(t);DQe.call(this,t),this._drain=VV,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};TN(EA,DQe);EA.prototype.entry=function(t,e,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof e=="function"&&(r=e,e=null),r||(r=VV);var s=this;if((!t.size||t.type==="symlink")&&(t.size=0),t.type||(t.type=SNt(t.mode)),t.mode||(t.mode=t.type==="directory"?BNt:vNt),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),typeof e=="string"&&(e=Buffer.from(e)),Buffer.isBuffer(e)){t.size=e.length,this._encode(t);var a=this.push(e);return YV(s,t.size),a?process.nextTick(r):this._drain=r,new Eb}if(t.type==="symlink"&&!t.linkname){var n=new FN;return SQe(n,function(f){if(f)return s.destroy(),r(f);t.linkname=n.linkname,s._encode(t),r()}),n}if(this._encode(t),t.type!=="file"&&t.type!=="contiguous-file")return process.nextTick(r),new Eb;var c=new RN(this);return this._stream=c,SQe(c,function(f){if(s._stream=null,f)return s.destroy(),r(f);if(c.written!==t.size)return s.destroy(),r(new Error("size mismatch"));YV(s,t.size),s._finalizing&&s.finalize(),r()}),c}};EA.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(bQe),this.push(null))};EA.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};EA.prototype._encode=function(t){if(!t.pax){var e=QN.encode(t);if(e){this.push(e);return}}this._encodePax(t)};EA.prototype._encodePax=function(t){var e=QN.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(QN.encode(r)),this.push(e),YV(this,e.length),r.size=t.size,r.type=t.type,this.push(QN.encode(r))};EA.prototype._read=function(t){var e=this._drain;this._drain=VV,e()};PQe.exports=EA});var kQe=L(KV=>{KV.extract=wQe();KV.pack=xQe()});var qQe=L(Ra=>{"use strict";var MNt=Ra&&Ra.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ra,"__esModule",{value:!0});Ra.Minipass=Ra.isWritable=Ra.isReadable=Ra.isStream=void 0;var MQe=typeof process=="object"&&process?process:{stdout:null,stderr:null},o7=Ie("node:events"),jQe=MNt(Ie("node:stream")),_Nt=Ie("node:string_decoder"),UNt=t=>!!t&&typeof t=="object"&&(t instanceof qN||t instanceof jQe.default||(0,Ra.isReadable)(t)||(0,Ra.isWritable)(t));Ra.isStream=UNt;var HNt=t=>!!t&&typeof t=="object"&&t instanceof o7.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==jQe.default.Writable.prototype.pipe;Ra.isReadable=HNt;var jNt=t=>!!t&&typeof t=="object"&&t instanceof o7.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function";Ra.isWritable=jNt;var Ah=Symbol("EOF"),ph=Symbol("maybeEmitEnd"),gg=Symbol("emittedEnd"),LN=Symbol("emittingEnd"),Ib=Symbol("emittedError"),MN=Symbol("closed"),_Qe=Symbol("read"),_N=Symbol("flush"),UQe=Symbol("flushChunk"),ff=Symbol("encoding"),jw=Symbol("decoder"),Zs=Symbol("flowing"),Cb=Symbol("paused"),qw=Symbol("resume"),Xs=Symbol("buffer"),Ta=Symbol("pipes"),$s=Symbol("bufferLength"),e7=Symbol("bufferPush"),UN=Symbol("bufferShift"),ia=Symbol("objectMode"),rs=Symbol("destroyed"),t7=Symbol("error"),r7=Symbol("emitData"),HQe=Symbol("emitEnd"),n7=Symbol("emitEnd2"),CA=Symbol("async"),i7=Symbol("abort"),HN=Symbol("aborted"),wb=Symbol("signal"),Jm=Symbol("dataListeners"),nc=Symbol("discarded"),Bb=t=>Promise.resolve().then(t),qNt=t=>t(),GNt=t=>t==="end"||t==="finish"||t==="prefinish",WNt=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,YNt=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),jN=class{src;dest;opts;ondrain;constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[qw](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},s7=class extends jN{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit("error",a),e.on("error",this.proxyErrors)}},VNt=t=>!!t.objectMode,KNt=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",qN=class extends o7.EventEmitter{[Zs]=!1;[Cb]=!1;[Ta]=[];[Xs]=[];[ia];[ff];[CA];[jw];[Ah]=!1;[gg]=!1;[LN]=!1;[MN]=!1;[Ib]=null;[$s]=0;[rs]=!1;[wb];[HN]=!1;[Jm]=0;[nc]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");VNt(r)?(this[ia]=!0,this[ff]=null):KNt(r)?(this[ff]=r.encoding,this[ia]=!1):(this[ia]=!1,this[ff]=null),this[CA]=!!r.async,this[jw]=this[ff]?new _Nt.StringDecoder(this[ff]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[Xs]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Ta]});let{signal:s}=r;s&&(this[wb]=s,s.aborted?this[i7]():s.addEventListener("abort",()=>this[i7]()))}get bufferLength(){return this[$s]}get encoding(){return this[ff]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ia]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[CA]}set async(e){this[CA]=this[CA]||!!e}[i7](){this[HN]=!0,this.emit("abort",this[wb]?.reason),this.destroy(this[wb]?.reason)}get aborted(){return this[HN]}set aborted(e){}write(e,r,s){if(this[HN])return!1;if(this[Ah])throw new Error("write after end");if(this[rs])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(s=r,r="utf8"),r||(r="utf8");let a=this[CA]?Bb:qNt;if(!this[ia]&&!Buffer.isBuffer(e)){if(YNt(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(WNt(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ia]?(this[Zs]&&this[$s]!==0&&this[_N](!0),this[Zs]?this.emit("data",e):this[e7](e),this[$s]!==0&&this.emit("readable"),s&&a(s),this[Zs]):e.length?(typeof e=="string"&&!(r===this[ff]&&!this[jw]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[ff]&&(e=this[jw].write(e)),this[Zs]&&this[$s]!==0&&this[_N](!0),this[Zs]?this.emit("data",e):this[e7](e),this[$s]!==0&&this.emit("readable"),s&&a(s),this[Zs]):(this[$s]!==0&&this.emit("readable"),s&&a(s),this[Zs])}read(e){if(this[rs])return null;if(this[nc]=!1,this[$s]===0||e===0||e&&e>this[$s])return this[ph](),null;this[ia]&&(e=null),this[Xs].length>1&&!this[ia]&&(this[Xs]=[this[ff]?this[Xs].join(""):Buffer.concat(this[Xs],this[$s])]);let r=this[_Qe](e||null,this[Xs][0]);return this[ph](),r}[_Qe](e,r){if(this[ia])this[UN]();else{let s=r;e===s.length||e===null?this[UN]():typeof s=="string"?(this[Xs][0]=s.slice(e),r=s.slice(0,e),this[$s]-=e):(this[Xs][0]=s.subarray(e),r=s.subarray(0,e),this[$s]-=e)}return this.emit("data",r),!this[Xs].length&&!this[Ah]&&this.emit("drain"),r}end(e,r,s){return typeof e=="function"&&(s=e,e=void 0),typeof r=="function"&&(s=r,r="utf8"),e!==void 0&&this.write(e,r),s&&this.once("end",s),this[Ah]=!0,this.writable=!1,(this[Zs]||!this[Cb])&&this[ph](),this}[qw](){this[rs]||(!this[Jm]&&!this[Ta].length&&(this[nc]=!0),this[Cb]=!1,this[Zs]=!0,this.emit("resume"),this[Xs].length?this[_N]():this[Ah]?this[ph]():this.emit("drain"))}resume(){return this[qw]()}pause(){this[Zs]=!1,this[Cb]=!0,this[nc]=!1}get destroyed(){return this[rs]}get flowing(){return this[Zs]}get paused(){return this[Cb]}[e7](e){this[ia]?this[$s]+=1:this[$s]+=e.length,this[Xs].push(e)}[UN](){return this[ia]?this[$s]-=1:this[$s]-=this[Xs][0].length,this[Xs].shift()}[_N](e=!1){do;while(this[UQe](this[UN]())&&this[Xs].length);!e&&!this[Xs].length&&!this[Ah]&&this.emit("drain")}[UQe](e){return this.emit("data",e),this[Zs]}pipe(e,r){if(this[rs])return e;this[nc]=!1;let s=this[gg];return r=r||{},e===MQe.stdout||e===MQe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this[Ta].push(r.proxyErrors?new s7(this,e,r):new jN(this,e,r)),this[CA]?Bb(()=>this[qw]()):this[qw]()),e}unpipe(e){let r=this[Ta].find(s=>s.dest===e);r&&(this[Ta].length===1?(this[Zs]&&this[Jm]===0&&(this[Zs]=!1),this[Ta]=[]):this[Ta].splice(this[Ta].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);if(e==="data")this[nc]=!1,this[Jm]++,!this[Ta].length&&!this[Zs]&&this[qw]();else if(e==="readable"&&this[$s]!==0)super.emit("readable");else if(GNt(e)&&this[gg])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Ib]){let a=r;this[CA]?Bb(()=>a.call(this,this[Ib])):a.call(this,this[Ib])}return s}removeListener(e,r){return this.off(e,r)}off(e,r){let s=super.off(e,r);return e==="data"&&(this[Jm]=this.listeners("data").length,this[Jm]===0&&!this[nc]&&!this[Ta].length&&(this[Zs]=!1)),s}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Jm]=0,!this[nc]&&!this[Ta].length&&(this[Zs]=!1)),r}get emittedEnd(){return this[gg]}[ph](){!this[LN]&&!this[gg]&&!this[rs]&&this[Xs].length===0&&this[Ah]&&(this[LN]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[MN]&&this.emit("close"),this[LN]=!1)}emit(e,...r){let s=r[0];if(e!=="error"&&e!=="close"&&e!==rs&&this[rs])return!1;if(e==="data")return!this[ia]&&!s?!1:this[CA]?(Bb(()=>this[r7](s)),!0):this[r7](s);if(e==="end")return this[HQe]();if(e==="close"){if(this[MN]=!0,!this[gg]&&!this[rs])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Ib]=s,super.emit(t7,s);let n=!this[wb]||this.listeners("error").length?super.emit("error",s):!1;return this[ph](),n}else if(e==="resume"){let n=super.emit("resume");return this[ph](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,...r);return this[ph](),a}[r7](e){for(let s of this[Ta])s.dest.write(e)===!1&&this.pause();let r=this[nc]?!1:super.emit("data",e);return this[ph](),r}[HQe](){return this[gg]?!1:(this[gg]=!0,this.readable=!1,this[CA]?(Bb(()=>this[n7]()),!0):this[n7]())}[n7](){if(this[jw]){let r=this[jw].end();if(r){for(let s of this[Ta])s.dest.write(r);this[nc]||super.emit("data",r)}}for(let r of this[Ta])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ia]||(e.dataLength=0);let r=this.promise();return this.on("data",s=>{e.push(s),this[ia]||(e.dataLength+=s.length)}),await r,e}async concat(){if(this[ia])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[ff]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(rs,()=>r(new Error("stream destroyed"))),this.on("error",s=>r(s)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[nc]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let a=this.read();if(a!==null)return Promise.resolve({done:!1,value:a});if(this[Ah])return r();let n,c,f=C=>{this.off("data",p),this.off("end",h),this.off(rs,E),r(),c(C)},p=C=>{this.off("error",f),this.off("end",h),this.off(rs,E),this.pause(),n({value:C,done:!!this[Ah]})},h=()=>{this.off("error",f),this.off("data",p),this.off(rs,E),r(),n({done:!0,value:void 0})},E=()=>f(new Error("stream destroyed"));return new Promise((C,S)=>{c=S,n=C,this.once(rs,E),this.once("error",f),this.once("end",h),this.once("data",p)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[nc]=!1;let e=!1,r=()=>(this.pause(),this.off(t7,r),this.off(rs,r),this.off("end",r),e=!0,{done:!0,value:void 0}),s=()=>{if(e)return r();let a=this.read();return a===null?r():{done:!1,value:a}};return this.once("end",r),this.once(t7,r),this.once(rs,r),{next:s,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[rs])return e?this.emit("error",e):this.emit(rs),this;this[rs]=!0,this[nc]=!0,this[Xs].length=0,this[$s]=0;let r=this;return typeof r.close=="function"&&!this[MN]&&r.close(),e?this.emit("error",e):this.emit(rs),this}static get isStream(){return Ra.isStream}};Ra.Minipass=qN});var YQe=L((ZEr,wA)=>{"use strict";var Sb=Ie("crypto"),{Minipass:JNt}=qQe(),l7=["sha512","sha384","sha256"],u7=["sha512"],zNt=/^[a-z0-9+/]+(?:=?=?)$/i,ZNt=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/,XNt=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,$Nt=/^[\x21-\x7E]+$/,Db=t=>t?.length?`?${t.join("?")}`:"",c7=class extends JNt{#t;#r;#i;constructor(e){super(),this.size=0,this.opts=e,this.#e(),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...u7],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(Sb.createHash)}#e(){this.sri=this.opts?.integrity?ic(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=Db(this.opts?.options)}on(e,r){return e==="size"&&this.#r?r(this.#r):e==="integrity"&&this.#t?r(this.#t):e==="verified"&&this.#i?r(this.#i):super.on(e,r)}emit(e,r){return e==="end"&&this.#n(),super.emit(e,r)}write(e){return this.size+=e.length,this.hashes.forEach(r=>r.update(e)),super.write(e)}#n(){this.goodSri||this.#e();let e=ic(this.hashes.map((s,a)=>`${this.algorithms[a]}-${s.digest("base64")}${this.optString}`).join(" "),this.opts),r=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize=="number"&&this.size!==this.expectedSize){let s=new Error(`stream size mismatch when checking ${this.sri}. - Wanted: ${this.expectedSize} - Found: ${this.size}`);s.code="EBADSIZE",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit("error",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);s.code="EINTEGRITY",s.found=e,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit("error",s)}else this.#r=this.size,this.emit("size",this.size),this.#t=e,this.emit("integrity",e),r&&(this.#i=r,this.emit("verified",r))}},hh=class{get isHash(){return!0}constructor(e,r){let s=r?.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let a=this.source.match(s?XNt:ZNt);if(!a||s&&!l7.includes(a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];n&&(this.options=n.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(e,r){let s=ic(e,r);if(!s)return!1;if(s.isIntegrity){let a=s.pickAlgorithm(r,[this.algorithm]);if(!a)return!1;let n=s[a].find(c=>c.digest===this.digest);return n||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(l7.includes(this.algorithm)&&this.digest.match(zNt)&&this.options.every(r=>r.match($Nt)))?"":`${this.algorithm}-${this.digest}${Db(this.options)}`}};function GQe(t,e,r,s){let a=t!=="",n=!1,c="",f=s.length-1;for(let h=0;hs[a].find(c=>n.digest===c.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[a]=s[a]}match(e,r){let s=ic(e,r);if(!s)return!1;let a=s.pickAlgorithm(r,Object.keys(this));return!!a&&this[a]&&s[a]&&this[a].find(n=>s[a].find(c=>n.digest===c.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||aOt,a=Object.keys(this).filter(n=>r?.length?r.includes(n):!0);return a.length?a.reduce((n,c)=>s(n,c)||n):null}};wA.exports.parse=ic;function ic(t,e){if(!t)return null;if(typeof t=="string")return a7(t,e);if(t.algorithm&&t.digest){let r=new zm;return r[t.algorithm]=[t],a7(vb(r,e),e)}else return a7(vb(t,e),e)}function a7(t,e){if(e?.single)return new hh(t,e);let r=t.trim().split(/\s+/).reduce((s,a)=>{let n=new hh(a,e);if(n.algorithm&&n.digest){let c=n.algorithm;s[c]||(s[c]=[]),s[c].push(n)}return s},new zm);return r.isEmpty()?null:r}wA.exports.stringify=vb;function vb(t,e){return t.algorithm&&t.digest?hh.prototype.toString.call(t,e):typeof t=="string"?vb(ic(t,e),e):zm.prototype.toString.call(t,e)}wA.exports.fromHex=eOt;function eOt(t,e,r){let s=Db(r?.options);return ic(`${e}-${Buffer.from(t,"hex").toString("base64")}${s}`,r)}wA.exports.fromData=tOt;function tOt(t,e){let r=e?.algorithms||[...u7],s=Db(e?.options);return r.reduce((a,n)=>{let c=Sb.createHash(n).update(t).digest("base64"),f=new hh(`${n}-${c}${s}`,e);if(f.algorithm&&f.digest){let p=f.algorithm;a[p]||(a[p]=[]),a[p].push(f)}return a},new zm)}wA.exports.fromStream=rOt;function rOt(t,e){let r=f7(e);return new Promise((s,a)=>{t.pipe(r),t.on("error",a),r.on("error",a);let n;r.on("integrity",c=>{n=c}),r.on("end",()=>s(n)),r.resume()})}wA.exports.checkData=nOt;function nOt(t,e,r){if(e=ic(e,r),!e||!Object.keys(e).length){if(r?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let s=e.pickAlgorithm(r),a=Sb.createHash(s).update(t).digest("base64"),n=ic({algorithm:s,digest:a}),c=n.match(e,r);if(r=r||{},c||!r.error)return c;if(typeof r.size=="number"&&t.length!==r.size){let f=new Error(`data size mismatch when checking ${e}. - Wanted: ${r.size} - Found: ${t.length}`);throw f.code="EBADSIZE",f.found=t.length,f.expected=r.size,f.sri=e,f}else{let f=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw f.code="EINTEGRITY",f.found=n,f.expected=e,f.algorithm=s,f.sri=e,f}}wA.exports.checkStream=iOt;function iOt(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=ic(e,r),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let s=f7(r);return new Promise((a,n)=>{t.pipe(s),t.on("error",n),s.on("error",n);let c;s.on("verified",f=>{c=f}),s.on("end",()=>a(c)),s.resume()})}wA.exports.integrityStream=f7;function f7(t=Object.create(null)){return new c7(t)}wA.exports.create=sOt;function sOt(t){let e=t?.algorithms||[...u7],r=Db(t?.options),s=e.map(Sb.createHash);return{update:function(a,n){return s.forEach(c=>c.update(a,n)),this},digest:function(){return e.reduce((n,c)=>{let f=s.shift().digest("base64"),p=new hh(`${c}-${f}${r}`,t);if(p.algorithm&&p.digest){let h=p.algorithm;n[h]||(n[h]=[]),n[h].push(p)}return n},new zm)}}}var oOt=Sb.getHashes(),WQe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>oOt.includes(t));function aOt(t,e){return WQe.indexOf(t.toLowerCase())>=WQe.indexOf(e.toLowerCase())?t:e}});var A7=L(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});dg.Signature=dg.Envelope=void 0;dg.Envelope={fromJSON(t){return{payload:GN(t.payload)?Buffer.from(VQe(t.payload)):Buffer.alloc(0),payloadType:GN(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>dg.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=KQe(t.payload)),t.payloadType!==""&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>dg.Signature.toJSON(r))),e}};dg.Signature={fromJSON(t){return{sig:GN(t.sig)?Buffer.from(VQe(t.sig)):Buffer.alloc(0),keyid:GN(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=KQe(t.sig)),t.keyid!==""&&(e.keyid=t.keyid),e}};function VQe(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function KQe(t){return globalThis.Buffer.from(t).toString("base64")}function GN(t){return t!=null}});var zQe=L(WN=>{"use strict";Object.defineProperty(WN,"__esModule",{value:!0});WN.Timestamp=void 0;WN.Timestamp={fromJSON(t){return{seconds:JQe(t.seconds)?globalThis.String(t.seconds):"0",nanos:JQe(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!=="0"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function JQe(t){return t!=null}});var Gw=L(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.TimeRange=_r.X509CertificateChain=_r.SubjectAlternativeName=_r.X509Certificate=_r.DistinguishedName=_r.ObjectIdentifierValuePair=_r.ObjectIdentifier=_r.PublicKeyIdentifier=_r.PublicKey=_r.RFC3161SignedTimestamp=_r.LogId=_r.MessageSignature=_r.HashOutput=_r.SubjectAlternativeNameType=_r.PublicKeyDetails=_r.HashAlgorithm=void 0;_r.hashAlgorithmFromJSON=XQe;_r.hashAlgorithmToJSON=$Qe;_r.publicKeyDetailsFromJSON=eTe;_r.publicKeyDetailsToJSON=tTe;_r.subjectAlternativeNameTypeFromJSON=rTe;_r.subjectAlternativeNameTypeToJSON=nTe;var lOt=zQe(),El;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",t[t.SHA2_256=1]="SHA2_256",t[t.SHA2_384=2]="SHA2_384",t[t.SHA2_512=3]="SHA2_512",t[t.SHA3_256=4]="SHA3_256",t[t.SHA3_384=5]="SHA3_384"})(El||(_r.HashAlgorithm=El={}));function XQe(t){switch(t){case 0:case"HASH_ALGORITHM_UNSPECIFIED":return El.HASH_ALGORITHM_UNSPECIFIED;case 1:case"SHA2_256":return El.SHA2_256;case 2:case"SHA2_384":return El.SHA2_384;case 3:case"SHA2_512":return El.SHA2_512;case 4:case"SHA3_256":return El.SHA3_256;case 5:case"SHA3_384":return El.SHA3_384;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum HashAlgorithm")}}function $Qe(t){switch(t){case El.HASH_ALGORITHM_UNSPECIFIED:return"HASH_ALGORITHM_UNSPECIFIED";case El.SHA2_256:return"SHA2_256";case El.SHA2_384:return"SHA2_384";case El.SHA2_512:return"SHA2_512";case El.SHA3_256:return"SHA3_256";case El.SHA3_384:return"SHA3_384";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum HashAlgorithm")}}var rn;(function(t){t[t.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]="PUBLIC_KEY_DETAILS_UNSPECIFIED",t[t.PKCS1_RSA_PKCS1V5=1]="PKCS1_RSA_PKCS1V5",t[t.PKCS1_RSA_PSS=2]="PKCS1_RSA_PSS",t[t.PKIX_RSA_PKCS1V5=3]="PKIX_RSA_PKCS1V5",t[t.PKIX_RSA_PSS=4]="PKIX_RSA_PSS",t[t.PKIX_RSA_PKCS1V15_2048_SHA256=9]="PKIX_RSA_PKCS1V15_2048_SHA256",t[t.PKIX_RSA_PKCS1V15_3072_SHA256=10]="PKIX_RSA_PKCS1V15_3072_SHA256",t[t.PKIX_RSA_PKCS1V15_4096_SHA256=11]="PKIX_RSA_PKCS1V15_4096_SHA256",t[t.PKIX_RSA_PSS_2048_SHA256=16]="PKIX_RSA_PSS_2048_SHA256",t[t.PKIX_RSA_PSS_3072_SHA256=17]="PKIX_RSA_PSS_3072_SHA256",t[t.PKIX_RSA_PSS_4096_SHA256=18]="PKIX_RSA_PSS_4096_SHA256",t[t.PKIX_ECDSA_P256_HMAC_SHA_256=6]="PKIX_ECDSA_P256_HMAC_SHA_256",t[t.PKIX_ECDSA_P256_SHA_256=5]="PKIX_ECDSA_P256_SHA_256",t[t.PKIX_ECDSA_P384_SHA_384=12]="PKIX_ECDSA_P384_SHA_384",t[t.PKIX_ECDSA_P521_SHA_512=13]="PKIX_ECDSA_P521_SHA_512",t[t.PKIX_ED25519=7]="PKIX_ED25519",t[t.PKIX_ED25519_PH=8]="PKIX_ED25519_PH",t[t.LMS_SHA256=14]="LMS_SHA256",t[t.LMOTS_SHA256=15]="LMOTS_SHA256"})(rn||(_r.PublicKeyDetails=rn={}));function eTe(t){switch(t){case 0:case"PUBLIC_KEY_DETAILS_UNSPECIFIED":return rn.PUBLIC_KEY_DETAILS_UNSPECIFIED;case 1:case"PKCS1_RSA_PKCS1V5":return rn.PKCS1_RSA_PKCS1V5;case 2:case"PKCS1_RSA_PSS":return rn.PKCS1_RSA_PSS;case 3:case"PKIX_RSA_PKCS1V5":return rn.PKIX_RSA_PKCS1V5;case 4:case"PKIX_RSA_PSS":return rn.PKIX_RSA_PSS;case 9:case"PKIX_RSA_PKCS1V15_2048_SHA256":return rn.PKIX_RSA_PKCS1V15_2048_SHA256;case 10:case"PKIX_RSA_PKCS1V15_3072_SHA256":return rn.PKIX_RSA_PKCS1V15_3072_SHA256;case 11:case"PKIX_RSA_PKCS1V15_4096_SHA256":return rn.PKIX_RSA_PKCS1V15_4096_SHA256;case 16:case"PKIX_RSA_PSS_2048_SHA256":return rn.PKIX_RSA_PSS_2048_SHA256;case 17:case"PKIX_RSA_PSS_3072_SHA256":return rn.PKIX_RSA_PSS_3072_SHA256;case 18:case"PKIX_RSA_PSS_4096_SHA256":return rn.PKIX_RSA_PSS_4096_SHA256;case 6:case"PKIX_ECDSA_P256_HMAC_SHA_256":return rn.PKIX_ECDSA_P256_HMAC_SHA_256;case 5:case"PKIX_ECDSA_P256_SHA_256":return rn.PKIX_ECDSA_P256_SHA_256;case 12:case"PKIX_ECDSA_P384_SHA_384":return rn.PKIX_ECDSA_P384_SHA_384;case 13:case"PKIX_ECDSA_P521_SHA_512":return rn.PKIX_ECDSA_P521_SHA_512;case 7:case"PKIX_ED25519":return rn.PKIX_ED25519;case 8:case"PKIX_ED25519_PH":return rn.PKIX_ED25519_PH;case 14:case"LMS_SHA256":return rn.LMS_SHA256;case 15:case"LMOTS_SHA256":return rn.LMOTS_SHA256;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum PublicKeyDetails")}}function tTe(t){switch(t){case rn.PUBLIC_KEY_DETAILS_UNSPECIFIED:return"PUBLIC_KEY_DETAILS_UNSPECIFIED";case rn.PKCS1_RSA_PKCS1V5:return"PKCS1_RSA_PKCS1V5";case rn.PKCS1_RSA_PSS:return"PKCS1_RSA_PSS";case rn.PKIX_RSA_PKCS1V5:return"PKIX_RSA_PKCS1V5";case rn.PKIX_RSA_PSS:return"PKIX_RSA_PSS";case rn.PKIX_RSA_PKCS1V15_2048_SHA256:return"PKIX_RSA_PKCS1V15_2048_SHA256";case rn.PKIX_RSA_PKCS1V15_3072_SHA256:return"PKIX_RSA_PKCS1V15_3072_SHA256";case rn.PKIX_RSA_PKCS1V15_4096_SHA256:return"PKIX_RSA_PKCS1V15_4096_SHA256";case rn.PKIX_RSA_PSS_2048_SHA256:return"PKIX_RSA_PSS_2048_SHA256";case rn.PKIX_RSA_PSS_3072_SHA256:return"PKIX_RSA_PSS_3072_SHA256";case rn.PKIX_RSA_PSS_4096_SHA256:return"PKIX_RSA_PSS_4096_SHA256";case rn.PKIX_ECDSA_P256_HMAC_SHA_256:return"PKIX_ECDSA_P256_HMAC_SHA_256";case rn.PKIX_ECDSA_P256_SHA_256:return"PKIX_ECDSA_P256_SHA_256";case rn.PKIX_ECDSA_P384_SHA_384:return"PKIX_ECDSA_P384_SHA_384";case rn.PKIX_ECDSA_P521_SHA_512:return"PKIX_ECDSA_P521_SHA_512";case rn.PKIX_ED25519:return"PKIX_ED25519";case rn.PKIX_ED25519_PH:return"PKIX_ED25519_PH";case rn.LMS_SHA256:return"LMS_SHA256";case rn.LMOTS_SHA256:return"LMOTS_SHA256";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum PublicKeyDetails")}}var BA;(function(t){t[t.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED=0]="SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED",t[t.EMAIL=1]="EMAIL",t[t.URI=2]="URI",t[t.OTHER_NAME=3]="OTHER_NAME"})(BA||(_r.SubjectAlternativeNameType=BA={}));function rTe(t){switch(t){case 0:case"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED":return BA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED;case 1:case"EMAIL":return BA.EMAIL;case 2:case"URI":return BA.URI;case 3:case"OTHER_NAME":return BA.OTHER_NAME;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum SubjectAlternativeNameType")}}function nTe(t){switch(t){case BA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED:return"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED";case BA.EMAIL:return"EMAIL";case BA.URI:return"URI";case BA.OTHER_NAME:return"OTHER_NAME";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum SubjectAlternativeNameType")}}_r.HashOutput={fromJSON(t){return{algorithm:ys(t.algorithm)?XQe(t.algorithm):0,digest:ys(t.digest)?Buffer.from(Zm(t.digest)):Buffer.alloc(0)}},toJSON(t){let e={};return t.algorithm!==0&&(e.algorithm=$Qe(t.algorithm)),t.digest.length!==0&&(e.digest=Xm(t.digest)),e}};_r.MessageSignature={fromJSON(t){return{messageDigest:ys(t.messageDigest)?_r.HashOutput.fromJSON(t.messageDigest):void 0,signature:ys(t.signature)?Buffer.from(Zm(t.signature)):Buffer.alloc(0)}},toJSON(t){let e={};return t.messageDigest!==void 0&&(e.messageDigest=_r.HashOutput.toJSON(t.messageDigest)),t.signature.length!==0&&(e.signature=Xm(t.signature)),e}};_r.LogId={fromJSON(t){return{keyId:ys(t.keyId)?Buffer.from(Zm(t.keyId)):Buffer.alloc(0)}},toJSON(t){let e={};return t.keyId.length!==0&&(e.keyId=Xm(t.keyId)),e}};_r.RFC3161SignedTimestamp={fromJSON(t){return{signedTimestamp:ys(t.signedTimestamp)?Buffer.from(Zm(t.signedTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedTimestamp.length!==0&&(e.signedTimestamp=Xm(t.signedTimestamp)),e}};_r.PublicKey={fromJSON(t){return{rawBytes:ys(t.rawBytes)?Buffer.from(Zm(t.rawBytes)):void 0,keyDetails:ys(t.keyDetails)?eTe(t.keyDetails):0,validFor:ys(t.validFor)?_r.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.rawBytes!==void 0&&(e.rawBytes=Xm(t.rawBytes)),t.keyDetails!==0&&(e.keyDetails=tTe(t.keyDetails)),t.validFor!==void 0&&(e.validFor=_r.TimeRange.toJSON(t.validFor)),e}};_r.PublicKeyIdentifier={fromJSON(t){return{hint:ys(t.hint)?globalThis.String(t.hint):""}},toJSON(t){let e={};return t.hint!==""&&(e.hint=t.hint),e}};_r.ObjectIdentifier={fromJSON(t){return{id:globalThis.Array.isArray(t?.id)?t.id.map(e=>globalThis.Number(e)):[]}},toJSON(t){let e={};return t.id?.length&&(e.id=t.id.map(r=>Math.round(r))),e}};_r.ObjectIdentifierValuePair={fromJSON(t){return{oid:ys(t.oid)?_r.ObjectIdentifier.fromJSON(t.oid):void 0,value:ys(t.value)?Buffer.from(Zm(t.value)):Buffer.alloc(0)}},toJSON(t){let e={};return t.oid!==void 0&&(e.oid=_r.ObjectIdentifier.toJSON(t.oid)),t.value.length!==0&&(e.value=Xm(t.value)),e}};_r.DistinguishedName={fromJSON(t){return{organization:ys(t.organization)?globalThis.String(t.organization):"",commonName:ys(t.commonName)?globalThis.String(t.commonName):""}},toJSON(t){let e={};return t.organization!==""&&(e.organization=t.organization),t.commonName!==""&&(e.commonName=t.commonName),e}};_r.X509Certificate={fromJSON(t){return{rawBytes:ys(t.rawBytes)?Buffer.from(Zm(t.rawBytes)):Buffer.alloc(0)}},toJSON(t){let e={};return t.rawBytes.length!==0&&(e.rawBytes=Xm(t.rawBytes)),e}};_r.SubjectAlternativeName={fromJSON(t){return{type:ys(t.type)?rTe(t.type):0,identity:ys(t.regexp)?{$case:"regexp",regexp:globalThis.String(t.regexp)}:ys(t.value)?{$case:"value",value:globalThis.String(t.value)}:void 0}},toJSON(t){let e={};return t.type!==0&&(e.type=nTe(t.type)),t.identity?.$case==="regexp"?e.regexp=t.identity.regexp:t.identity?.$case==="value"&&(e.value=t.identity.value),e}};_r.X509CertificateChain={fromJSON(t){return{certificates:globalThis.Array.isArray(t?.certificates)?t.certificates.map(e=>_r.X509Certificate.fromJSON(e)):[]}},toJSON(t){let e={};return t.certificates?.length&&(e.certificates=t.certificates.map(r=>_r.X509Certificate.toJSON(r))),e}};_r.TimeRange={fromJSON(t){return{start:ys(t.start)?ZQe(t.start):void 0,end:ys(t.end)?ZQe(t.end):void 0}},toJSON(t){let e={};return t.start!==void 0&&(e.start=t.start.toISOString()),t.end!==void 0&&(e.end=t.end.toISOString()),e}};function Zm(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function Xm(t){return globalThis.Buffer.from(t).toString("base64")}function cOt(t){let e=(globalThis.Number(t.seconds)||0)*1e3;return e+=(t.nanos||0)/1e6,new globalThis.Date(e)}function ZQe(t){return t instanceof globalThis.Date?t:typeof t=="string"?new globalThis.Date(t):cOt(lOt.Timestamp.fromJSON(t))}function ys(t){return t!=null}});var p7=L(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.TransparencyLogEntry=Es.InclusionPromise=Es.InclusionProof=Es.Checkpoint=Es.KindVersion=void 0;var iTe=Gw();Es.KindVersion={fromJSON(t){return{kind:Fa(t.kind)?globalThis.String(t.kind):"",version:Fa(t.version)?globalThis.String(t.version):""}},toJSON(t){let e={};return t.kind!==""&&(e.kind=t.kind),t.version!==""&&(e.version=t.version),e}};Es.Checkpoint={fromJSON(t){return{envelope:Fa(t.envelope)?globalThis.String(t.envelope):""}},toJSON(t){let e={};return t.envelope!==""&&(e.envelope=t.envelope),e}};Es.InclusionProof={fromJSON(t){return{logIndex:Fa(t.logIndex)?globalThis.String(t.logIndex):"0",rootHash:Fa(t.rootHash)?Buffer.from(YN(t.rootHash)):Buffer.alloc(0),treeSize:Fa(t.treeSize)?globalThis.String(t.treeSize):"0",hashes:globalThis.Array.isArray(t?.hashes)?t.hashes.map(e=>Buffer.from(YN(e))):[],checkpoint:Fa(t.checkpoint)?Es.Checkpoint.fromJSON(t.checkpoint):void 0}},toJSON(t){let e={};return t.logIndex!=="0"&&(e.logIndex=t.logIndex),t.rootHash.length!==0&&(e.rootHash=VN(t.rootHash)),t.treeSize!=="0"&&(e.treeSize=t.treeSize),t.hashes?.length&&(e.hashes=t.hashes.map(r=>VN(r))),t.checkpoint!==void 0&&(e.checkpoint=Es.Checkpoint.toJSON(t.checkpoint)),e}};Es.InclusionPromise={fromJSON(t){return{signedEntryTimestamp:Fa(t.signedEntryTimestamp)?Buffer.from(YN(t.signedEntryTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedEntryTimestamp.length!==0&&(e.signedEntryTimestamp=VN(t.signedEntryTimestamp)),e}};Es.TransparencyLogEntry={fromJSON(t){return{logIndex:Fa(t.logIndex)?globalThis.String(t.logIndex):"0",logId:Fa(t.logId)?iTe.LogId.fromJSON(t.logId):void 0,kindVersion:Fa(t.kindVersion)?Es.KindVersion.fromJSON(t.kindVersion):void 0,integratedTime:Fa(t.integratedTime)?globalThis.String(t.integratedTime):"0",inclusionPromise:Fa(t.inclusionPromise)?Es.InclusionPromise.fromJSON(t.inclusionPromise):void 0,inclusionProof:Fa(t.inclusionProof)?Es.InclusionProof.fromJSON(t.inclusionProof):void 0,canonicalizedBody:Fa(t.canonicalizedBody)?Buffer.from(YN(t.canonicalizedBody)):Buffer.alloc(0)}},toJSON(t){let e={};return t.logIndex!=="0"&&(e.logIndex=t.logIndex),t.logId!==void 0&&(e.logId=iTe.LogId.toJSON(t.logId)),t.kindVersion!==void 0&&(e.kindVersion=Es.KindVersion.toJSON(t.kindVersion)),t.integratedTime!=="0"&&(e.integratedTime=t.integratedTime),t.inclusionPromise!==void 0&&(e.inclusionPromise=Es.InclusionPromise.toJSON(t.inclusionPromise)),t.inclusionProof!==void 0&&(e.inclusionProof=Es.InclusionProof.toJSON(t.inclusionProof)),t.canonicalizedBody.length!==0&&(e.canonicalizedBody=VN(t.canonicalizedBody)),e}};function YN(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function VN(t){return globalThis.Buffer.from(t).toString("base64")}function Fa(t){return t!=null}});var h7=L($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.Bundle=$c.VerificationMaterial=$c.TimestampVerificationData=void 0;var sTe=A7(),vA=Gw(),oTe=p7();$c.TimestampVerificationData={fromJSON(t){return{rfc3161Timestamps:globalThis.Array.isArray(t?.rfc3161Timestamps)?t.rfc3161Timestamps.map(e=>vA.RFC3161SignedTimestamp.fromJSON(e)):[]}},toJSON(t){let e={};return t.rfc3161Timestamps?.length&&(e.rfc3161Timestamps=t.rfc3161Timestamps.map(r=>vA.RFC3161SignedTimestamp.toJSON(r))),e}};$c.VerificationMaterial={fromJSON(t){return{content:mg(t.publicKey)?{$case:"publicKey",publicKey:vA.PublicKeyIdentifier.fromJSON(t.publicKey)}:mg(t.x509CertificateChain)?{$case:"x509CertificateChain",x509CertificateChain:vA.X509CertificateChain.fromJSON(t.x509CertificateChain)}:mg(t.certificate)?{$case:"certificate",certificate:vA.X509Certificate.fromJSON(t.certificate)}:void 0,tlogEntries:globalThis.Array.isArray(t?.tlogEntries)?t.tlogEntries.map(e=>oTe.TransparencyLogEntry.fromJSON(e)):[],timestampVerificationData:mg(t.timestampVerificationData)?$c.TimestampVerificationData.fromJSON(t.timestampVerificationData):void 0}},toJSON(t){let e={};return t.content?.$case==="publicKey"?e.publicKey=vA.PublicKeyIdentifier.toJSON(t.content.publicKey):t.content?.$case==="x509CertificateChain"?e.x509CertificateChain=vA.X509CertificateChain.toJSON(t.content.x509CertificateChain):t.content?.$case==="certificate"&&(e.certificate=vA.X509Certificate.toJSON(t.content.certificate)),t.tlogEntries?.length&&(e.tlogEntries=t.tlogEntries.map(r=>oTe.TransparencyLogEntry.toJSON(r))),t.timestampVerificationData!==void 0&&(e.timestampVerificationData=$c.TimestampVerificationData.toJSON(t.timestampVerificationData)),e}};$c.Bundle={fromJSON(t){return{mediaType:mg(t.mediaType)?globalThis.String(t.mediaType):"",verificationMaterial:mg(t.verificationMaterial)?$c.VerificationMaterial.fromJSON(t.verificationMaterial):void 0,content:mg(t.messageSignature)?{$case:"messageSignature",messageSignature:vA.MessageSignature.fromJSON(t.messageSignature)}:mg(t.dsseEnvelope)?{$case:"dsseEnvelope",dsseEnvelope:sTe.Envelope.fromJSON(t.dsseEnvelope)}:void 0}},toJSON(t){let e={};return t.mediaType!==""&&(e.mediaType=t.mediaType),t.verificationMaterial!==void 0&&(e.verificationMaterial=$c.VerificationMaterial.toJSON(t.verificationMaterial)),t.content?.$case==="messageSignature"?e.messageSignature=vA.MessageSignature.toJSON(t.content.messageSignature):t.content?.$case==="dsseEnvelope"&&(e.dsseEnvelope=sTe.Envelope.toJSON(t.content.dsseEnvelope)),e}};function mg(t){return t!=null}});var g7=L(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.ClientTrustConfig=Fi.SigningConfig=Fi.TrustedRoot=Fi.CertificateAuthority=Fi.TransparencyLogInstance=void 0;var Il=Gw();Fi.TransparencyLogInstance={fromJSON(t){return{baseUrl:sa(t.baseUrl)?globalThis.String(t.baseUrl):"",hashAlgorithm:sa(t.hashAlgorithm)?(0,Il.hashAlgorithmFromJSON)(t.hashAlgorithm):0,publicKey:sa(t.publicKey)?Il.PublicKey.fromJSON(t.publicKey):void 0,logId:sa(t.logId)?Il.LogId.fromJSON(t.logId):void 0,checkpointKeyId:sa(t.checkpointKeyId)?Il.LogId.fromJSON(t.checkpointKeyId):void 0}},toJSON(t){let e={};return t.baseUrl!==""&&(e.baseUrl=t.baseUrl),t.hashAlgorithm!==0&&(e.hashAlgorithm=(0,Il.hashAlgorithmToJSON)(t.hashAlgorithm)),t.publicKey!==void 0&&(e.publicKey=Il.PublicKey.toJSON(t.publicKey)),t.logId!==void 0&&(e.logId=Il.LogId.toJSON(t.logId)),t.checkpointKeyId!==void 0&&(e.checkpointKeyId=Il.LogId.toJSON(t.checkpointKeyId)),e}};Fi.CertificateAuthority={fromJSON(t){return{subject:sa(t.subject)?Il.DistinguishedName.fromJSON(t.subject):void 0,uri:sa(t.uri)?globalThis.String(t.uri):"",certChain:sa(t.certChain)?Il.X509CertificateChain.fromJSON(t.certChain):void 0,validFor:sa(t.validFor)?Il.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.subject!==void 0&&(e.subject=Il.DistinguishedName.toJSON(t.subject)),t.uri!==""&&(e.uri=t.uri),t.certChain!==void 0&&(e.certChain=Il.X509CertificateChain.toJSON(t.certChain)),t.validFor!==void 0&&(e.validFor=Il.TimeRange.toJSON(t.validFor)),e}};Fi.TrustedRoot={fromJSON(t){return{mediaType:sa(t.mediaType)?globalThis.String(t.mediaType):"",tlogs:globalThis.Array.isArray(t?.tlogs)?t.tlogs.map(e=>Fi.TransparencyLogInstance.fromJSON(e)):[],certificateAuthorities:globalThis.Array.isArray(t?.certificateAuthorities)?t.certificateAuthorities.map(e=>Fi.CertificateAuthority.fromJSON(e)):[],ctlogs:globalThis.Array.isArray(t?.ctlogs)?t.ctlogs.map(e=>Fi.TransparencyLogInstance.fromJSON(e)):[],timestampAuthorities:globalThis.Array.isArray(t?.timestampAuthorities)?t.timestampAuthorities.map(e=>Fi.CertificateAuthority.fromJSON(e)):[]}},toJSON(t){let e={};return t.mediaType!==""&&(e.mediaType=t.mediaType),t.tlogs?.length&&(e.tlogs=t.tlogs.map(r=>Fi.TransparencyLogInstance.toJSON(r))),t.certificateAuthorities?.length&&(e.certificateAuthorities=t.certificateAuthorities.map(r=>Fi.CertificateAuthority.toJSON(r))),t.ctlogs?.length&&(e.ctlogs=t.ctlogs.map(r=>Fi.TransparencyLogInstance.toJSON(r))),t.timestampAuthorities?.length&&(e.timestampAuthorities=t.timestampAuthorities.map(r=>Fi.CertificateAuthority.toJSON(r))),e}};Fi.SigningConfig={fromJSON(t){return{mediaType:sa(t.mediaType)?globalThis.String(t.mediaType):"",caUrl:sa(t.caUrl)?globalThis.String(t.caUrl):"",oidcUrl:sa(t.oidcUrl)?globalThis.String(t.oidcUrl):"",tlogUrls:globalThis.Array.isArray(t?.tlogUrls)?t.tlogUrls.map(e=>globalThis.String(e)):[],tsaUrls:globalThis.Array.isArray(t?.tsaUrls)?t.tsaUrls.map(e=>globalThis.String(e)):[]}},toJSON(t){let e={};return t.mediaType!==""&&(e.mediaType=t.mediaType),t.caUrl!==""&&(e.caUrl=t.caUrl),t.oidcUrl!==""&&(e.oidcUrl=t.oidcUrl),t.tlogUrls?.length&&(e.tlogUrls=t.tlogUrls),t.tsaUrls?.length&&(e.tsaUrls=t.tsaUrls),e}};Fi.ClientTrustConfig={fromJSON(t){return{mediaType:sa(t.mediaType)?globalThis.String(t.mediaType):"",trustedRoot:sa(t.trustedRoot)?Fi.TrustedRoot.fromJSON(t.trustedRoot):void 0,signingConfig:sa(t.signingConfig)?Fi.SigningConfig.fromJSON(t.signingConfig):void 0}},toJSON(t){let e={};return t.mediaType!==""&&(e.mediaType=t.mediaType),t.trustedRoot!==void 0&&(e.trustedRoot=Fi.TrustedRoot.toJSON(t.trustedRoot)),t.signingConfig!==void 0&&(e.signingConfig=Fi.SigningConfig.toJSON(t.signingConfig)),e}};function sa(t){return t!=null}});var cTe=L(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.Input=Vr.Artifact=Vr.ArtifactVerificationOptions_ObserverTimestampOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions=Vr.ArtifactVerificationOptions_CtlogOptions=Vr.ArtifactVerificationOptions_TlogOptions=Vr.ArtifactVerificationOptions=Vr.PublicKeyIdentities=Vr.CertificateIdentities=Vr.CertificateIdentity=void 0;var aTe=h7(),yg=Gw(),lTe=g7();Vr.CertificateIdentity={fromJSON(t){return{issuer:gi(t.issuer)?globalThis.String(t.issuer):"",san:gi(t.san)?yg.SubjectAlternativeName.fromJSON(t.san):void 0,oids:globalThis.Array.isArray(t?.oids)?t.oids.map(e=>yg.ObjectIdentifierValuePair.fromJSON(e)):[]}},toJSON(t){let e={};return t.issuer!==""&&(e.issuer=t.issuer),t.san!==void 0&&(e.san=yg.SubjectAlternativeName.toJSON(t.san)),t.oids?.length&&(e.oids=t.oids.map(r=>yg.ObjectIdentifierValuePair.toJSON(r))),e}};Vr.CertificateIdentities={fromJSON(t){return{identities:globalThis.Array.isArray(t?.identities)?t.identities.map(e=>Vr.CertificateIdentity.fromJSON(e)):[]}},toJSON(t){let e={};return t.identities?.length&&(e.identities=t.identities.map(r=>Vr.CertificateIdentity.toJSON(r))),e}};Vr.PublicKeyIdentities={fromJSON(t){return{publicKeys:globalThis.Array.isArray(t?.publicKeys)?t.publicKeys.map(e=>yg.PublicKey.fromJSON(e)):[]}},toJSON(t){let e={};return t.publicKeys?.length&&(e.publicKeys=t.publicKeys.map(r=>yg.PublicKey.toJSON(r))),e}};Vr.ArtifactVerificationOptions={fromJSON(t){return{signers:gi(t.certificateIdentities)?{$case:"certificateIdentities",certificateIdentities:Vr.CertificateIdentities.fromJSON(t.certificateIdentities)}:gi(t.publicKeys)?{$case:"publicKeys",publicKeys:Vr.PublicKeyIdentities.fromJSON(t.publicKeys)}:void 0,tlogOptions:gi(t.tlogOptions)?Vr.ArtifactVerificationOptions_TlogOptions.fromJSON(t.tlogOptions):void 0,ctlogOptions:gi(t.ctlogOptions)?Vr.ArtifactVerificationOptions_CtlogOptions.fromJSON(t.ctlogOptions):void 0,tsaOptions:gi(t.tsaOptions)?Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(t.tsaOptions):void 0,integratedTsOptions:gi(t.integratedTsOptions)?Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.fromJSON(t.integratedTsOptions):void 0,observerOptions:gi(t.observerOptions)?Vr.ArtifactVerificationOptions_ObserverTimestampOptions.fromJSON(t.observerOptions):void 0}},toJSON(t){let e={};return t.signers?.$case==="certificateIdentities"?e.certificateIdentities=Vr.CertificateIdentities.toJSON(t.signers.certificateIdentities):t.signers?.$case==="publicKeys"&&(e.publicKeys=Vr.PublicKeyIdentities.toJSON(t.signers.publicKeys)),t.tlogOptions!==void 0&&(e.tlogOptions=Vr.ArtifactVerificationOptions_TlogOptions.toJSON(t.tlogOptions)),t.ctlogOptions!==void 0&&(e.ctlogOptions=Vr.ArtifactVerificationOptions_CtlogOptions.toJSON(t.ctlogOptions)),t.tsaOptions!==void 0&&(e.tsaOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(t.tsaOptions)),t.integratedTsOptions!==void 0&&(e.integratedTsOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(t.integratedTsOptions)),t.observerOptions!==void 0&&(e.observerOptions=Vr.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(t.observerOptions)),e}};Vr.ArtifactVerificationOptions_TlogOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,performOnlineVerification:gi(t.performOnlineVerification)?globalThis.Boolean(t.performOnlineVerification):!1,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.performOnlineVerification!==!1&&(e.performOnlineVerification=t.performOnlineVerification),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_CtlogOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TimestampAuthorityOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_ObserverTimestampOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.Artifact={fromJSON(t){return{data:gi(t.artifactUri)?{$case:"artifactUri",artifactUri:globalThis.String(t.artifactUri)}:gi(t.artifact)?{$case:"artifact",artifact:Buffer.from(uOt(t.artifact))}:gi(t.artifactDigest)?{$case:"artifactDigest",artifactDigest:yg.HashOutput.fromJSON(t.artifactDigest)}:void 0}},toJSON(t){let e={};return t.data?.$case==="artifactUri"?e.artifactUri=t.data.artifactUri:t.data?.$case==="artifact"?e.artifact=fOt(t.data.artifact):t.data?.$case==="artifactDigest"&&(e.artifactDigest=yg.HashOutput.toJSON(t.data.artifactDigest)),e}};Vr.Input={fromJSON(t){return{artifactTrustRoot:gi(t.artifactTrustRoot)?lTe.TrustedRoot.fromJSON(t.artifactTrustRoot):void 0,artifactVerificationOptions:gi(t.artifactVerificationOptions)?Vr.ArtifactVerificationOptions.fromJSON(t.artifactVerificationOptions):void 0,bundle:gi(t.bundle)?aTe.Bundle.fromJSON(t.bundle):void 0,artifact:gi(t.artifact)?Vr.Artifact.fromJSON(t.artifact):void 0}},toJSON(t){let e={};return t.artifactTrustRoot!==void 0&&(e.artifactTrustRoot=lTe.TrustedRoot.toJSON(t.artifactTrustRoot)),t.artifactVerificationOptions!==void 0&&(e.artifactVerificationOptions=Vr.ArtifactVerificationOptions.toJSON(t.artifactVerificationOptions)),t.bundle!==void 0&&(e.bundle=aTe.Bundle.toJSON(t.bundle)),t.artifact!==void 0&&(e.artifact=Vr.Artifact.toJSON(t.artifact)),e}};function uOt(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function fOt(t){return globalThis.Buffer.from(t).toString("base64")}function gi(t){return t!=null}});var bb=L(eu=>{"use strict";var AOt=eu&&eu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Ww=eu&&eu.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&AOt(e,t,r)};Object.defineProperty(eu,"__esModule",{value:!0});Ww(A7(),eu);Ww(h7(),eu);Ww(Gw(),eu);Ww(p7(),eu);Ww(g7(),eu);Ww(cTe(),eu)});var KN=L(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.BUNDLE_V03_MEDIA_TYPE=Cl.BUNDLE_V03_LEGACY_MEDIA_TYPE=Cl.BUNDLE_V02_MEDIA_TYPE=Cl.BUNDLE_V01_MEDIA_TYPE=void 0;Cl.isBundleWithCertificateChain=pOt;Cl.isBundleWithPublicKey=hOt;Cl.isBundleWithMessageSignature=gOt;Cl.isBundleWithDsseEnvelope=dOt;Cl.BUNDLE_V01_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.1";Cl.BUNDLE_V02_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.2";Cl.BUNDLE_V03_LEGACY_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.3";Cl.BUNDLE_V03_MEDIA_TYPE="application/vnd.dev.sigstore.bundle.v0.3+json";function pOt(t){return t.verificationMaterial.content.$case==="x509CertificateChain"}function hOt(t){return t.verificationMaterial.content.$case==="publicKey"}function gOt(t){return t.content.$case==="messageSignature"}function dOt(t){return t.content.$case==="dsseEnvelope"}});var fTe=L(zN=>{"use strict";Object.defineProperty(zN,"__esModule",{value:!0});zN.toMessageSignatureBundle=yOt;zN.toDSSEBundle=EOt;var mOt=bb(),JN=KN();function yOt(t){return{mediaType:t.certificateChain?JN.BUNDLE_V02_MEDIA_TYPE:JN.BUNDLE_V03_MEDIA_TYPE,content:{$case:"messageSignature",messageSignature:{messageDigest:{algorithm:mOt.HashAlgorithm.SHA2_256,digest:t.digest},signature:t.signature}},verificationMaterial:uTe(t)}}function EOt(t){return{mediaType:t.certificateChain?JN.BUNDLE_V02_MEDIA_TYPE:JN.BUNDLE_V03_MEDIA_TYPE,content:{$case:"dsseEnvelope",dsseEnvelope:IOt(t)},verificationMaterial:uTe(t)}}function IOt(t){return{payloadType:t.artifactType,payload:t.artifact,signatures:[COt(t)]}}function COt(t){return{keyid:t.keyHint||"",sig:t.signature}}function uTe(t){return{content:wOt(t),tlogEntries:[],timestampVerificationData:{rfc3161Timestamps:[]}}}function wOt(t){return t.certificate?t.certificateChain?{$case:"x509CertificateChain",x509CertificateChain:{certificates:[{rawBytes:t.certificate}]}}:{$case:"certificate",certificate:{rawBytes:t.certificate}}:{$case:"publicKey",publicKey:{hint:t.keyHint||""}}}});var m7=L(ZN=>{"use strict";Object.defineProperty(ZN,"__esModule",{value:!0});ZN.ValidationError=void 0;var d7=class extends Error{constructor(e,r){super(e),this.fields=r}};ZN.ValidationError=d7});var y7=L($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.assertBundle=BOt;$m.assertBundleV01=ATe;$m.isBundleV01=vOt;$m.assertBundleV02=SOt;$m.assertBundleLatest=DOt;var XN=m7();function BOt(t){let e=$N(t);if(e.length>0)throw new XN.ValidationError("invalid bundle",e)}function ATe(t){let e=[];if(e.push(...$N(t)),e.push(...bOt(t)),e.length>0)throw new XN.ValidationError("invalid v0.1 bundle",e)}function vOt(t){try{return ATe(t),!0}catch{return!1}}function SOt(t){let e=[];if(e.push(...$N(t)),e.push(...pTe(t)),e.length>0)throw new XN.ValidationError("invalid v0.2 bundle",e)}function DOt(t){let e=[];if(e.push(...$N(t)),e.push(...pTe(t)),e.push(...POt(t)),e.length>0)throw new XN.ValidationError("invalid bundle",e)}function $N(t){let e=[];if((t.mediaType===void 0||!t.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\+json;version=\d\.\d/)&&!t.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\.v\d\.\d\+json/))&&e.push("mediaType"),t.content===void 0)e.push("content");else switch(t.content.$case){case"messageSignature":t.content.messageSignature.messageDigest===void 0?e.push("content.messageSignature.messageDigest"):t.content.messageSignature.messageDigest.digest.length===0&&e.push("content.messageSignature.messageDigest.digest"),t.content.messageSignature.signature.length===0&&e.push("content.messageSignature.signature");break;case"dsseEnvelope":t.content.dsseEnvelope.payload.length===0&&e.push("content.dsseEnvelope.payload"),t.content.dsseEnvelope.signatures.length!==1?e.push("content.dsseEnvelope.signatures"):t.content.dsseEnvelope.signatures[0].sig.length===0&&e.push("content.dsseEnvelope.signatures[0].sig");break}if(t.verificationMaterial===void 0)e.push("verificationMaterial");else{if(t.verificationMaterial.content===void 0)e.push("verificationMaterial.content");else switch(t.verificationMaterial.content.$case){case"x509CertificateChain":t.verificationMaterial.content.x509CertificateChain.certificates.length===0&&e.push("verificationMaterial.content.x509CertificateChain.certificates"),t.verificationMaterial.content.x509CertificateChain.certificates.forEach((r,s)=>{r.rawBytes.length===0&&e.push(`verificationMaterial.content.x509CertificateChain.certificates[${s}].rawBytes`)});break;case"certificate":t.verificationMaterial.content.certificate.rawBytes.length===0&&e.push("verificationMaterial.content.certificate.rawBytes");break}t.verificationMaterial.tlogEntries===void 0?e.push("verificationMaterial.tlogEntries"):t.verificationMaterial.tlogEntries.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.logId===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].logId`),r.kindVersion===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].kindVersion`)})}return e}function bOt(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionPromise===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionPromise`)}),e}function pTe(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionProof===void 0?e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof`):r.inclusionProof.checkpoint===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof.checkpoint`)}),e}function POt(t){let e=[];return t.verificationMaterial?.content?.$case==="x509CertificateChain"&&e.push("verificationMaterial.content.$case"),e}});var gTe=L(SA=>{"use strict";Object.defineProperty(SA,"__esModule",{value:!0});SA.envelopeToJSON=SA.envelopeFromJSON=SA.bundleToJSON=SA.bundleFromJSON=void 0;var eO=bb(),hTe=KN(),E7=y7(),xOt=t=>{let e=eO.Bundle.fromJSON(t);switch(e.mediaType){case hTe.BUNDLE_V01_MEDIA_TYPE:(0,E7.assertBundleV01)(e);break;case hTe.BUNDLE_V02_MEDIA_TYPE:(0,E7.assertBundleV02)(e);break;default:(0,E7.assertBundleLatest)(e);break}return e};SA.bundleFromJSON=xOt;var kOt=t=>eO.Bundle.toJSON(t);SA.bundleToJSON=kOt;var QOt=t=>eO.Envelope.fromJSON(t);SA.envelopeFromJSON=QOt;var TOt=t=>eO.Envelope.toJSON(t);SA.envelopeToJSON=TOt});var xb=L(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.isBundleV01=Zr.assertBundleV02=Zr.assertBundleV01=Zr.assertBundleLatest=Zr.assertBundle=Zr.envelopeToJSON=Zr.envelopeFromJSON=Zr.bundleToJSON=Zr.bundleFromJSON=Zr.ValidationError=Zr.isBundleWithPublicKey=Zr.isBundleWithMessageSignature=Zr.isBundleWithDsseEnvelope=Zr.isBundleWithCertificateChain=Zr.BUNDLE_V03_MEDIA_TYPE=Zr.BUNDLE_V03_LEGACY_MEDIA_TYPE=Zr.BUNDLE_V02_MEDIA_TYPE=Zr.BUNDLE_V01_MEDIA_TYPE=Zr.toMessageSignatureBundle=Zr.toDSSEBundle=void 0;var dTe=fTe();Object.defineProperty(Zr,"toDSSEBundle",{enumerable:!0,get:function(){return dTe.toDSSEBundle}});Object.defineProperty(Zr,"toMessageSignatureBundle",{enumerable:!0,get:function(){return dTe.toMessageSignatureBundle}});var Eg=KN();Object.defineProperty(Zr,"BUNDLE_V01_MEDIA_TYPE",{enumerable:!0,get:function(){return Eg.BUNDLE_V01_MEDIA_TYPE}});Object.defineProperty(Zr,"BUNDLE_V02_MEDIA_TYPE",{enumerable:!0,get:function(){return Eg.BUNDLE_V02_MEDIA_TYPE}});Object.defineProperty(Zr,"BUNDLE_V03_LEGACY_MEDIA_TYPE",{enumerable:!0,get:function(){return Eg.BUNDLE_V03_LEGACY_MEDIA_TYPE}});Object.defineProperty(Zr,"BUNDLE_V03_MEDIA_TYPE",{enumerable:!0,get:function(){return Eg.BUNDLE_V03_MEDIA_TYPE}});Object.defineProperty(Zr,"isBundleWithCertificateChain",{enumerable:!0,get:function(){return Eg.isBundleWithCertificateChain}});Object.defineProperty(Zr,"isBundleWithDsseEnvelope",{enumerable:!0,get:function(){return Eg.isBundleWithDsseEnvelope}});Object.defineProperty(Zr,"isBundleWithMessageSignature",{enumerable:!0,get:function(){return Eg.isBundleWithMessageSignature}});Object.defineProperty(Zr,"isBundleWithPublicKey",{enumerable:!0,get:function(){return Eg.isBundleWithPublicKey}});var ROt=m7();Object.defineProperty(Zr,"ValidationError",{enumerable:!0,get:function(){return ROt.ValidationError}});var tO=gTe();Object.defineProperty(Zr,"bundleFromJSON",{enumerable:!0,get:function(){return tO.bundleFromJSON}});Object.defineProperty(Zr,"bundleToJSON",{enumerable:!0,get:function(){return tO.bundleToJSON}});Object.defineProperty(Zr,"envelopeFromJSON",{enumerable:!0,get:function(){return tO.envelopeFromJSON}});Object.defineProperty(Zr,"envelopeToJSON",{enumerable:!0,get:function(){return tO.envelopeToJSON}});var Pb=y7();Object.defineProperty(Zr,"assertBundle",{enumerable:!0,get:function(){return Pb.assertBundle}});Object.defineProperty(Zr,"assertBundleLatest",{enumerable:!0,get:function(){return Pb.assertBundleLatest}});Object.defineProperty(Zr,"assertBundleV01",{enumerable:!0,get:function(){return Pb.assertBundleV01}});Object.defineProperty(Zr,"assertBundleV02",{enumerable:!0,get:function(){return Pb.assertBundleV02}});Object.defineProperty(Zr,"isBundleV01",{enumerable:!0,get:function(){return Pb.isBundleV01}})});var kb=L(nO=>{"use strict";Object.defineProperty(nO,"__esModule",{value:!0});nO.ByteStream=void 0;var I7=class extends Error{},rO=class t{constructor(e){this.start=0,e?(this.buf=e,this.view=Buffer.from(e)):(this.buf=new ArrayBuffer(0),this.view=Buffer.from(this.buf))}get buffer(){return this.view.subarray(0,this.start)}get length(){return this.view.byteLength}get position(){return this.start}seek(e){this.start=e}slice(e,r){let s=e+r;if(s>this.length)throw new I7("request past end of buffer");return this.view.subarray(e,s)}appendChar(e){this.ensureCapacity(1),this.view[this.start]=e,this.start+=1}appendUint16(e){this.ensureCapacity(2);let r=new Uint16Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[1],this.view[this.start+1]=s[0],this.start+=2}appendUint24(e){this.ensureCapacity(3);let r=new Uint32Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[2],this.view[this.start+1]=s[1],this.view[this.start+2]=s[0],this.start+=3}appendView(e){this.ensureCapacity(e.length),this.view.set(e,this.start),this.start+=e.length}getBlock(e){if(e<=0)return Buffer.alloc(0);if(this.start+e>this.view.length)throw new Error("request past end of buffer");let r=this.view.subarray(this.start,this.start+e);return this.start+=e,r}getUint8(){return this.getBlock(1)[0]}getUint16(){let e=this.getBlock(2);return e[0]<<8|e[1]}ensureCapacity(e){if(this.start+e>this.view.byteLength){let r=t.BLOCK_SIZE+(e>t.BLOCK_SIZE?e:0);this.realloc(this.view.byteLength+r)}}realloc(e){let r=new ArrayBuffer(e),s=Buffer.from(r);s.set(this.view),this.buf=r,this.view=s}};nO.ByteStream=rO;rO.BLOCK_SIZE=1024});var iO=L(Yw=>{"use strict";Object.defineProperty(Yw,"__esModule",{value:!0});Yw.ASN1TypeError=Yw.ASN1ParseError=void 0;var C7=class extends Error{};Yw.ASN1ParseError=C7;var w7=class extends Error{};Yw.ASN1TypeError=w7});var yTe=L(sO=>{"use strict";Object.defineProperty(sO,"__esModule",{value:!0});sO.decodeLength=FOt;sO.encodeLength=NOt;var mTe=iO();function FOt(t){let e=t.getUint8();if(!(e&128))return e;let r=e&127;if(r>6)throw new mTe.ASN1ParseError("length exceeds 6 byte limit");let s=0;for(let a=0;a0n;)r.unshift(Number(e&255n)),e=e>>8n;return Buffer.from([128|r.length,...r])}});var ITe=L(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});Ig.parseInteger=MOt;Ig.parseStringASCII=ETe;Ig.parseTime=_Ot;Ig.parseOID=UOt;Ig.parseBoolean=HOt;Ig.parseBitString=jOt;var OOt=/^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/,LOt=/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/;function MOt(t){let e=0,r=t.length,s=t[e],a=s>127,n=a?255:0;for(;s==n&&++e=50?1900:2e3,s[1]=a.toString()}return new Date(`${s[1]}-${s[2]}-${s[3]}T${s[4]}:${s[5]}:${s[6]}Z`)}function UOt(t){let e=0,r=t.length,s=t[e++],a=Math.floor(s/40),n=s%40,c=`${a}.${n}`,f=0;for(;e=f;--p)a.push(c>>p&1)}return a}});var wTe=L(oO=>{"use strict";Object.defineProperty(oO,"__esModule",{value:!0});oO.ASN1Tag=void 0;var CTe=iO(),ey={BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,OBJECT_IDENTIFIER:6,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,UTC_TIME:23,GENERALIZED_TIME:24},B7={UNIVERSAL:0,APPLICATION:1,CONTEXT_SPECIFIC:2,PRIVATE:3},v7=class{constructor(e){if(this.number=e&31,this.constructed=(e&32)===32,this.class=e>>6,this.number===31)throw new CTe.ASN1ParseError("long form tags not supported");if(this.class===B7.UNIVERSAL&&this.number===0)throw new CTe.ASN1ParseError("unsupported tag 0x00")}isUniversal(){return this.class===B7.UNIVERSAL}isContextSpecific(e){let r=this.class===B7.CONTEXT_SPECIFIC;return e!==void 0?r&&this.number===e:r}isBoolean(){return this.isUniversal()&&this.number===ey.BOOLEAN}isInteger(){return this.isUniversal()&&this.number===ey.INTEGER}isBitString(){return this.isUniversal()&&this.number===ey.BIT_STRING}isOctetString(){return this.isUniversal()&&this.number===ey.OCTET_STRING}isOID(){return this.isUniversal()&&this.number===ey.OBJECT_IDENTIFIER}isUTCTime(){return this.isUniversal()&&this.number===ey.UTC_TIME}isGeneralizedTime(){return this.isUniversal()&&this.number===ey.GENERALIZED_TIME}toDER(){return this.number|(this.constructed?32:0)|this.class<<6}};oO.ASN1Tag=v7});var DTe=L(lO=>{"use strict";Object.defineProperty(lO,"__esModule",{value:!0});lO.ASN1Obj=void 0;var S7=kb(),ty=iO(),vTe=yTe(),Vw=ITe(),qOt=wTe(),aO=class{constructor(e,r,s){this.tag=e,this.value=r,this.subs=s}static parseBuffer(e){return STe(new S7.ByteStream(e))}toDER(){let e=new S7.ByteStream;if(this.subs.length>0)for(let a of this.subs)e.appendView(a.toDER());else e.appendView(this.value);let r=e.buffer,s=new S7.ByteStream;return s.appendChar(this.tag.toDER()),s.appendView((0,vTe.encodeLength)(r.length)),s.appendView(r),s.buffer}toBoolean(){if(!this.tag.isBoolean())throw new ty.ASN1TypeError("not a boolean");return(0,Vw.parseBoolean)(this.value)}toInteger(){if(!this.tag.isInteger())throw new ty.ASN1TypeError("not an integer");return(0,Vw.parseInteger)(this.value)}toOID(){if(!this.tag.isOID())throw new ty.ASN1TypeError("not an OID");return(0,Vw.parseOID)(this.value)}toDate(){switch(!0){case this.tag.isUTCTime():return(0,Vw.parseTime)(this.value,!0);case this.tag.isGeneralizedTime():return(0,Vw.parseTime)(this.value,!1);default:throw new ty.ASN1TypeError("not a date")}}toBitString(){if(!this.tag.isBitString())throw new ty.ASN1TypeError("not a bit string");return(0,Vw.parseBitString)(this.value)}};lO.ASN1Obj=aO;function STe(t){let e=new qOt.ASN1Tag(t.getUint8()),r=(0,vTe.decodeLength)(t),s=t.slice(t.position,r),a=t.position,n=[];if(e.constructed)n=BTe(t,r);else if(e.isOctetString())try{n=BTe(t,r)}catch{}return n.length===0&&t.seek(a+r),new aO(e,s,n)}function BTe(t,e){let r=t.position+e;if(r>t.length)throw new ty.ASN1ParseError("invalid length");let s=[];for(;t.position{"use strict";Object.defineProperty(cO,"__esModule",{value:!0});cO.ASN1Obj=void 0;var GOt=DTe();Object.defineProperty(cO,"ASN1Obj",{enumerable:!0,get:function(){return GOt.ASN1Obj}})});var Kw=L(Cg=>{"use strict";var WOt=Cg&&Cg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Cg,"__esModule",{value:!0});Cg.createPublicKey=YOt;Cg.digest=VOt;Cg.verify=KOt;Cg.bufferEqual=JOt;var Qb=WOt(Ie("crypto"));function YOt(t,e="spki"){return typeof t=="string"?Qb.default.createPublicKey(t):Qb.default.createPublicKey({key:t,format:"der",type:e})}function VOt(t,...e){let r=Qb.default.createHash(t);for(let s of e)r.update(s);return r.digest()}function KOt(t,e,r,s){try{return Qb.default.verify(s,t,e,r)}catch{return!1}}function JOt(t,e){try{return Qb.default.timingSafeEqual(t,e)}catch{return!1}}});var bTe=L(D7=>{"use strict";Object.defineProperty(D7,"__esModule",{value:!0});D7.preAuthEncoding=ZOt;var zOt="DSSEv1";function ZOt(t,e){let r=[zOt,t.length,t,e.length,""].join(" ");return Buffer.concat([Buffer.from(r,"ascii"),e])}});var kTe=L(fO=>{"use strict";Object.defineProperty(fO,"__esModule",{value:!0});fO.base64Encode=XOt;fO.base64Decode=$Ot;var PTe="base64",xTe="utf-8";function XOt(t){return Buffer.from(t,xTe).toString(PTe)}function $Ot(t){return Buffer.from(t,PTe).toString(xTe)}});var QTe=L(P7=>{"use strict";Object.defineProperty(P7,"__esModule",{value:!0});P7.canonicalize=b7;function b7(t){let e="";if(t===null||typeof t!="object"||t.toJSON!=null)e+=JSON.stringify(t);else if(Array.isArray(t)){e+="[";let r=!0;t.forEach(s=>{r||(e+=","),r=!1,e+=b7(s)}),e+="]"}else{e+="{";let r=!0;Object.keys(t).sort().forEach(s=>{r||(e+=","),r=!1,e+=JSON.stringify(s),e+=":",e+=b7(t[s])}),e+="}"}return e}});var x7=L(AO=>{"use strict";Object.defineProperty(AO,"__esModule",{value:!0});AO.toDER=rLt;AO.fromDER=nLt;var eLt=/-----BEGIN (.*)-----/,tLt=/-----END (.*)-----/;function rLt(t){let e="";return t.split(` -`).forEach(r=>{r.match(eLt)||r.match(tLt)||(e+=r)}),Buffer.from(e,"base64")}function nLt(t,e="CERTIFICATE"){let s=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(` -`).concat(` -`)}});var pO=L(Jw=>{"use strict";Object.defineProperty(Jw,"__esModule",{value:!0});Jw.SHA2_HASH_ALGOS=Jw.ECDSA_SIGNATURE_ALGOS=void 0;Jw.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};Jw.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var Q7=L(hO=>{"use strict";Object.defineProperty(hO,"__esModule",{value:!0});hO.RFC3161TimestampVerificationError=void 0;var k7=class extends Error{};hO.RFC3161TimestampVerificationError=k7});var RTe=L(DA=>{"use strict";var iLt=DA&&DA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),sLt=DA&&DA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oLt=DA&&DA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&iLt(e,t,r);return sLt(e,t),e};Object.defineProperty(DA,"__esModule",{value:!0});DA.TSTInfo=void 0;var TTe=oLt(Kw()),aLt=pO(),lLt=Q7(),T7=class{constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return aLt.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=TTe.digest(this.messageImprintHashAlgorithm,e);if(!TTe.bufferEqual(r,this.messageImprintHashedMessage))throw new lLt.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};DA.TSTInfo=T7});var NTe=L(bA=>{"use strict";var cLt=bA&&bA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),uLt=bA&&bA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),fLt=bA&&bA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&cLt(e,t,r);return uLt(e,t),e};Object.defineProperty(bA,"__esModule",{value:!0});bA.RFC3161Timestamp=void 0;var ALt=uO(),R7=fLt(Kw()),FTe=pO(),Tb=Q7(),pLt=RTe(),hLt="1.2.840.113549.1.7.2",gLt="1.2.840.113549.1.9.16.1.4",dLt="1.2.840.113549.1.9.4",F7=class t{constructor(e){this.root=e}static parse(e){let r=ALt.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return FTe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return FTe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new pLt.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new Tb.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==hLt)throw new Tb.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==gLt)throw new Tb.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=R7.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!R7.bufferEqual(e,r))throw new Tb.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(e){let r=this.signedAttrsObj.toDER();if(r[0]=49,!R7.verify(r,e,this.signatureValue,this.signatureAlgorithm))throw new Tb.RFC3161TimestampVerificationError("signature verification failed")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(r=>r.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let e=this.signedDataObj;return e.subs[e.subs.length-1]}get signerInfoObj(){return this.signerInfosObj.subs[0]}get eContentTypeObj(){return this.encapContentInfoObj.subs[0]}get eContentObj(){return this.encapContentInfoObj.subs[1]}get signedAttrsObj(){return this.signerInfoObj.subs.find(r=>r.tag.isContextSpecific(0))}get messageDigestAttributeObj(){return this.signedAttrsObj.subs.find(r=>r.subs[0].tag.isOID()&&r.subs[0].toOID()===dLt)}get signerSidObj(){return this.signerInfoObj.subs[1]}get signerDigestAlgorithmObj(){return this.signerInfoObj.subs[2]}get signatureAlgorithmObj(){return this.signerInfoObj.subs[4]}get signatureValueObj(){return this.signerInfoObj.subs[5]}};bA.RFC3161Timestamp=F7});var OTe=L(gO=>{"use strict";Object.defineProperty(gO,"__esModule",{value:!0});gO.RFC3161Timestamp=void 0;var mLt=NTe();Object.defineProperty(gO,"RFC3161Timestamp",{enumerable:!0,get:function(){return mLt.RFC3161Timestamp}})});var MTe=L(PA=>{"use strict";var yLt=PA&&PA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),ELt=PA&&PA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ILt=PA&&PA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&yLt(e,t,r);return ELt(e,t),e};Object.defineProperty(PA,"__esModule",{value:!0});PA.SignedCertificateTimestamp=void 0;var CLt=ILt(Kw()),LTe=kb(),N7=class t{constructor(e){this.version=e.version,this.logID=e.logID,this.timestamp=e.timestamp,this.extensions=e.extensions,this.hashAlgorithm=e.hashAlgorithm,this.signatureAlgorithm=e.signatureAlgorithm,this.signature=e.signature}get datetime(){return new Date(Number(this.timestamp.readBigInt64BE()))}get algorithm(){switch(this.hashAlgorithm){case 0:return"none";case 1:return"md5";case 2:return"sha1";case 3:return"sha224";case 4:return"sha256";case 5:return"sha384";case 6:return"sha512";default:return"unknown"}}verify(e,r){let s=new LTe.ByteStream;return s.appendChar(this.version),s.appendChar(0),s.appendView(this.timestamp),s.appendUint16(1),s.appendView(e),s.appendUint16(this.extensions.byteLength),this.extensions.byteLength>0&&s.appendView(this.extensions),CLt.verify(s.buffer,r,this.signature,this.algorithm)}static parse(e){let r=new LTe.ByteStream(e),s=r.getUint8(),a=r.getBlock(32),n=r.getBlock(8),c=r.getUint16(),f=r.getBlock(c),p=r.getUint8(),h=r.getUint8(),E=r.getUint16(),C=r.getBlock(E);if(r.position!==e.length)throw new Error("SCT buffer length mismatch");return new t({version:s,logID:a,timestamp:n,extensions:f,hashAlgorithm:p,signatureAlgorithm:h,signature:C})}};PA.SignedCertificateTimestamp=N7});var j7=L(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.X509SCTExtension=oa.X509SubjectKeyIDExtension=oa.X509AuthorityKeyIDExtension=oa.X509SubjectAlternativeNameExtension=oa.X509KeyUsageExtension=oa.X509BasicConstraintsExtension=oa.X509Extension=void 0;var wLt=kb(),BLt=MTe(),gh=class{constructor(e){this.root=e}get oid(){return this.root.subs[0].toOID()}get critical(){return this.root.subs.length===3?this.root.subs[1].toBoolean():!1}get value(){return this.extnValueObj.value}get valueObj(){return this.extnValueObj}get extnValueObj(){return this.root.subs[this.root.subs.length-1]}};oa.X509Extension=gh;var O7=class extends gh{get isCA(){return this.sequence.subs[0]?.toBoolean()??!1}get pathLenConstraint(){return this.sequence.subs.length>1?this.sequence.subs[1].toInteger():void 0}get sequence(){return this.extnValueObj.subs[0]}};oa.X509BasicConstraintsExtension=O7;var L7=class extends gh{get digitalSignature(){return this.bitString[0]===1}get keyCertSign(){return this.bitString[5]===1}get crlSign(){return this.bitString[6]===1}get bitString(){return this.extnValueObj.subs[0].toBitString()}};oa.X509KeyUsageExtension=L7;var M7=class extends gh{get rfc822Name(){return this.findGeneralName(1)?.value.toString("ascii")}get uri(){return this.findGeneralName(6)?.value.toString("ascii")}otherName(e){let r=this.findGeneralName(0);return r===void 0||r.subs[0].toOID()!==e?void 0:r.subs[1].subs[0].value.toString("ascii")}findGeneralName(e){return this.generalNames.find(r=>r.tag.isContextSpecific(e))}get generalNames(){return this.extnValueObj.subs[0].subs}};oa.X509SubjectAlternativeNameExtension=M7;var _7=class extends gh{get keyIdentifier(){return this.findSequenceMember(0)?.value}findSequenceMember(e){return this.sequence.subs.find(r=>r.tag.isContextSpecific(e))}get sequence(){return this.extnValueObj.subs[0]}};oa.X509AuthorityKeyIDExtension=_7;var U7=class extends gh{get keyIdentifier(){return this.extnValueObj.subs[0].value}};oa.X509SubjectKeyIDExtension=U7;var H7=class extends gh{constructor(e){super(e)}get signedCertificateTimestamps(){let e=this.extnValueObj.subs[0].value,r=new wLt.ByteStream(e),s=r.getUint16()+2,a=[];for(;r.position{"use strict";var vLt=sc&&sc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),SLt=sc&&sc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),UTe=sc&&sc.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&vLt(e,t,r);return SLt(e,t),e};Object.defineProperty(sc,"__esModule",{value:!0});sc.X509Certificate=sc.EXTENSION_OID_SCT=void 0;var DLt=uO(),_Te=UTe(Kw()),bLt=pO(),PLt=UTe(x7()),ry=j7(),xLt="2.5.29.14",kLt="2.5.29.15",QLt="2.5.29.17",TLt="2.5.29.19",RLt="2.5.29.35";sc.EXTENSION_OID_SCT="1.3.6.1.4.1.11129.2.4.2";var q7=class t{constructor(e){this.root=e}static parse(e){let r=typeof e=="string"?PLt.toDER(e):e,s=DLt.ASN1Obj.parseBuffer(r);return new t(s)}get tbsCertificate(){return this.tbsCertificateObj}get version(){return`v${(this.versionObj.subs[0].toInteger()+BigInt(1)).toString()}`}get serialNumber(){return this.serialNumberObj.value}get notBefore(){return this.validityObj.subs[0].toDate()}get notAfter(){return this.validityObj.subs[1].toDate()}get issuer(){return this.issuerObj.value}get subject(){return this.subjectObj.value}get publicKey(){return this.subjectPublicKeyInfoObj.toDER()}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return bLt.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value.subarray(1)}get subjectAltName(){let e=this.extSubjectAltName;return e?.uri||e?.rfc822Name}get extensions(){return this.extensionsObj?.subs[0]?.subs||[]}get extKeyUsage(){let e=this.findExtension(kLt);return e?new ry.X509KeyUsageExtension(e):void 0}get extBasicConstraints(){let e=this.findExtension(TLt);return e?new ry.X509BasicConstraintsExtension(e):void 0}get extSubjectAltName(){let e=this.findExtension(QLt);return e?new ry.X509SubjectAlternativeNameExtension(e):void 0}get extAuthorityKeyID(){let e=this.findExtension(RLt);return e?new ry.X509AuthorityKeyIDExtension(e):void 0}get extSubjectKeyID(){let e=this.findExtension(xLt);return e?new ry.X509SubjectKeyIDExtension(e):void 0}get extSCT(){let e=this.findExtension(sc.EXTENSION_OID_SCT);return e?new ry.X509SCTExtension(e):void 0}get isCA(){let e=this.extBasicConstraints?.isCA||!1;return this.extKeyUsage?e&&this.extKeyUsage.keyCertSign:e}extension(e){let r=this.findExtension(e);return r?new ry.X509Extension(r):void 0}verify(e){let r=e?.publicKey||this.publicKey,s=_Te.createPublicKey(r);return _Te.verify(this.tbsCertificate.toDER(),s,this.signatureValue,this.signatureAlgorithm)}validForDate(e){return this.notBefore<=e&&e<=this.notAfter}equals(e){return this.root.toDER().equals(e.root.toDER())}clone(){let e=this.root.toDER(),r=Buffer.alloc(e.length);return e.copy(r),t.parse(r)}findExtension(e){return this.extensions.find(r=>r.subs[0].toOID()===e)}get tbsCertificateObj(){return this.root.subs[0]}get signatureAlgorithmObj(){return this.root.subs[1]}get signatureValueObj(){return this.root.subs[2]}get versionObj(){return this.tbsCertificateObj.subs[0]}get serialNumberObj(){return this.tbsCertificateObj.subs[1]}get issuerObj(){return this.tbsCertificateObj.subs[3]}get validityObj(){return this.tbsCertificateObj.subs[4]}get subjectObj(){return this.tbsCertificateObj.subs[5]}get subjectPublicKeyInfoObj(){return this.tbsCertificateObj.subs[6]}get extensionsObj(){return this.tbsCertificateObj.subs.find(e=>e.tag.isContextSpecific(3))}};sc.X509Certificate=q7});var qTe=L(wg=>{"use strict";Object.defineProperty(wg,"__esModule",{value:!0});wg.X509SCTExtension=wg.X509Certificate=wg.EXTENSION_OID_SCT=void 0;var jTe=HTe();Object.defineProperty(wg,"EXTENSION_OID_SCT",{enumerable:!0,get:function(){return jTe.EXTENSION_OID_SCT}});Object.defineProperty(wg,"X509Certificate",{enumerable:!0,get:function(){return jTe.X509Certificate}});var FLt=j7();Object.defineProperty(wg,"X509SCTExtension",{enumerable:!0,get:function(){return FLt.X509SCTExtension}})});var wl=L(Kn=>{"use strict";var NLt=Kn&&Kn.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),OLt=Kn&&Kn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rb=Kn&&Kn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&NLt(e,t,r);return OLt(e,t),e};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.X509SCTExtension=Kn.X509Certificate=Kn.EXTENSION_OID_SCT=Kn.ByteStream=Kn.RFC3161Timestamp=Kn.pem=Kn.json=Kn.encoding=Kn.dsse=Kn.crypto=Kn.ASN1Obj=void 0;var LLt=uO();Object.defineProperty(Kn,"ASN1Obj",{enumerable:!0,get:function(){return LLt.ASN1Obj}});Kn.crypto=Rb(Kw());Kn.dsse=Rb(bTe());Kn.encoding=Rb(kTe());Kn.json=Rb(QTe());Kn.pem=Rb(x7());var MLt=OTe();Object.defineProperty(Kn,"RFC3161Timestamp",{enumerable:!0,get:function(){return MLt.RFC3161Timestamp}});var _Lt=kb();Object.defineProperty(Kn,"ByteStream",{enumerable:!0,get:function(){return _Lt.ByteStream}});var G7=qTe();Object.defineProperty(Kn,"EXTENSION_OID_SCT",{enumerable:!0,get:function(){return G7.EXTENSION_OID_SCT}});Object.defineProperty(Kn,"X509Certificate",{enumerable:!0,get:function(){return G7.X509Certificate}});Object.defineProperty(Kn,"X509SCTExtension",{enumerable:!0,get:function(){return G7.X509SCTExtension}})});var GTe=L(W7=>{"use strict";Object.defineProperty(W7,"__esModule",{value:!0});W7.extractJWTSubject=HLt;var ULt=wl();function HLt(t){let e=t.split(".",3),r=JSON.parse(ULt.encoding.base64Decode(e[1]));switch(r.iss){case"https://accounts.google.com":case"https://oauth2.sigstore.dev/auth":return r.email;default:return r.sub}}});var WTe=L((NIr,jLt)=>{jLt.exports={name:"@sigstore/sign",version:"3.1.0",description:"Sigstore signing library",main:"dist/index.js",types:"dist/index.d.ts",scripts:{clean:"shx rm -rf dist *.tsbuildinfo",build:"tsc --build",test:"jest"},files:["dist"],author:"bdehamer@github.com",license:"Apache-2.0",repository:{type:"git",url:"git+https://github.com/sigstore/sigstore-js.git"},bugs:{url:"https://github.com/sigstore/sigstore-js/issues"},homepage:"https://github.com/sigstore/sigstore-js/tree/main/packages/sign#readme",publishConfig:{provenance:!0},devDependencies:{"@sigstore/jest":"^0.0.0","@sigstore/mock":"^0.10.0","@sigstore/rekor-types":"^3.0.0","@types/make-fetch-happen":"^10.0.4","@types/promise-retry":"^1.1.6"},dependencies:{"@sigstore/bundle":"^3.1.0","@sigstore/core":"^2.0.0","@sigstore/protobuf-specs":"^0.4.0","make-fetch-happen":"^14.0.2","proc-log":"^5.0.0","promise-retry":"^2.0.1"},engines:{node:"^18.17.0 || >=20.5.0"}}});var VTe=L(zw=>{"use strict";var qLt=zw&&zw.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zw,"__esModule",{value:!0});zw.getUserAgent=void 0;var YTe=qLt(Ie("os")),GLt=()=>{let t=WTe().version,e=process.version,r=YTe.default.platform(),s=YTe.default.arch();return`sigstore-js/${t} (Node ${e}) (${r}/${s})`};zw.getUserAgent=GLt});var Bg=L(Ji=>{"use strict";var WLt=Ji&&Ji.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),YLt=Ji&&Ji.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KTe=Ji&&Ji.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a{"use strict";Object.defineProperty(dO,"__esModule",{value:!0});dO.BaseBundleBuilder=void 0;var Y7=class{constructor(e){this.signer=e.signer,this.witnesses=e.witnesses}async create(e){let r=await this.prepare(e).then(f=>this.signer.sign(f)),s=await this.package(e,r),a=await Promise.all(this.witnesses.map(f=>f.testify(s.content,VLt(r.key)))),n=[],c=[];return a.forEach(({tlogEntries:f,rfc3161Timestamps:p})=>{n.push(...f??[]),c.push(...p??[])}),s.verificationMaterial.tlogEntries=n,s.verificationMaterial.timestampVerificationData={rfc3161Timestamps:c},s}async prepare(e){return e.data}};dO.BaseBundleBuilder=Y7;function VLt(t){switch(t.$case){case"publicKey":return t.publicKey;case"x509Certificate":return t.certificate}}});var J7=L(xA=>{"use strict";var KLt=xA&&xA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),JLt=xA&&xA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zLt=xA&&xA.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a{"use strict";Object.defineProperty(mO,"__esModule",{value:!0});mO.DSSEBundleBuilder=void 0;var $Lt=Bg(),eMt=V7(),tMt=J7(),z7=class extends eMt.BaseBundleBuilder{constructor(e){super(e),this.certificateChain=e.certificateChain??!1}async prepare(e){let r=zTe(e);return $Lt.dsse.preAuthEncoding(r.type,r.data)}async package(e,r){return(0,tMt.toDSSEBundle)(zTe(e),r,this.certificateChain)}};mO.DSSEBundleBuilder=z7;function zTe(t){return{...t,type:t.type??""}}});var XTe=L(yO=>{"use strict";Object.defineProperty(yO,"__esModule",{value:!0});yO.MessageSignatureBundleBuilder=void 0;var rMt=V7(),nMt=J7(),Z7=class extends rMt.BaseBundleBuilder{constructor(e){super(e)}async package(e,r){return(0,nMt.toMessageSignatureBundle)(e,r)}};yO.MessageSignatureBundleBuilder=Z7});var $Te=L(Zw=>{"use strict";Object.defineProperty(Zw,"__esModule",{value:!0});Zw.MessageSignatureBundleBuilder=Zw.DSSEBundleBuilder=void 0;var iMt=ZTe();Object.defineProperty(Zw,"DSSEBundleBuilder",{enumerable:!0,get:function(){return iMt.DSSEBundleBuilder}});var sMt=XTe();Object.defineProperty(Zw,"MessageSignatureBundleBuilder",{enumerable:!0,get:function(){return sMt.MessageSignatureBundleBuilder}})});var IO=L(EO=>{"use strict";Object.defineProperty(EO,"__esModule",{value:!0});EO.HTTPError=void 0;var X7=class extends Error{constructor({status:e,message:r,location:s}){super(`(${e}) ${r}`),this.statusCode=e,this.location=s}};EO.HTTPError=X7});var Xw=L(Nb=>{"use strict";Object.defineProperty(Nb,"__esModule",{value:!0});Nb.InternalError=void 0;Nb.internalError=aMt;var oMt=IO(),CO=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.name=this.constructor.name,this.cause=s,this.code=e}};Nb.InternalError=CO;function aMt(t,e,r){throw t instanceof oMt.HTTPError&&(r+=` - ${t.message}`),new CO({code:e,message:r,cause:t})}});var wO=L((WIr,eRe)=>{eRe.exports=fetch});var tRe=L($w=>{"use strict";var lMt=$w&&$w.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($w,"__esModule",{value:!0});$w.CIContextProvider=void 0;var cMt=lMt(wO()),uMt=[fMt,AMt],$7=class{constructor(e="sigstore"){this.audience=e}async getToken(){return Promise.any(uMt.map(e=>e(this.audience))).catch(()=>Promise.reject("CI: no tokens available"))}};$w.CIContextProvider=$7;async function fMt(t){if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL||!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)return Promise.reject("no token available");let e=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);return e.searchParams.append("audience",t),(await(0,cMt.default)(e.href,{retry:2,headers:{Accept:"application/json",Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).json().then(s=>s.value)}async function AMt(){return process.env.SIGSTORE_ID_TOKEN?process.env.SIGSTORE_ID_TOKEN:Promise.reject("no token available")}});var rRe=L(BO=>{"use strict";Object.defineProperty(BO,"__esModule",{value:!0});BO.CIContextProvider=void 0;var pMt=tRe();Object.defineProperty(BO,"CIContextProvider",{enumerable:!0,get:function(){return pMt.CIContextProvider}})});var iRe=L((KIr,nRe)=>{var hMt=Symbol("proc-log.meta");nRe.exports={META:hMt,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:function(...t){return process.emit("output","standard",...t)},error:function(...t){return process.emit("output","error",...t)},buffer:function(...t){return process.emit("output","buffer",...t)},flush:function(...t){return process.emit("output","flush",...t)}},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:function(...t){return process.emit("log","error",...t)},notice:function(...t){return process.emit("log","notice",...t)},warn:function(...t){return process.emit("log","warn",...t)},info:function(...t){return process.emit("log","info",...t)},verbose:function(...t){return process.emit("log","verbose",...t)},http:function(...t){return process.emit("log","http",...t)},silly:function(...t){return process.emit("log","silly",...t)},timing:function(...t){return process.emit("log","timing",...t)},pause:function(){return process.emit("log","pause")},resume:function(){return process.emit("log","resume")}},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:function(t,e){process.emit("time","start",t);function r(){return process.emit("time","end",t)}if(typeof e=="function"){let s=e();return s&&s.finally?s.finally(r):(r(),s)}return r},end:function(t){return process.emit("time","end",t)}},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:function(t){process.emit("input","start");function e(){return process.emit("input","end")}if(typeof t=="function"){let r=t();return r&&r.finally?r.finally(e):(e(),r)}return e},end:function(){return process.emit("input","end")},read:function(...t){let e,r,s=new Promise((a,n)=>{e=a,r=n});return process.emit("input","read",e,r,...t),s}}}});var aRe=L((JIr,oRe)=>{"use strict";function sRe(t,e){for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!0,configurable:!0});return t}function gMt(t,e,r){if(!t||typeof t=="string")throw new TypeError("Please pass an Error to err-code");r||(r={}),typeof e=="object"&&(r=e,e=void 0),e!=null&&(r.code=e);try{return sRe(t,r)}catch{r.message=t.message,r.stack=t.stack;let a=function(){};return a.prototype=Object.create(Object.getPrototypeOf(t)),sRe(new a,r)}}oRe.exports=gMt});var cRe=L((zIr,lRe)=>{function tu(t,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}lRe.exports=tu;tu.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};tu.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};tu.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var s=this,a=setTimeout(function(){s._attempts++,s._operationTimeoutCb&&(s._timeout=setTimeout(function(){s._operationTimeoutCb(s._attempts)},s._operationTimeout),s._options.unref&&s._timeout.unref()),s._fn(s._attempts)},r);return this._options.unref&&a.unref(),!0};tu.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};tu.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};tu.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};tu.prototype.start=tu.prototype.try;tu.prototype.errors=function(){return this._errors};tu.prototype.attempts=function(){return this._attempts};tu.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,r=0,s=0;s=r&&(e=a,r=c)}return e}});var uRe=L(ny=>{var dMt=cRe();ny.operation=function(t){var e=ny.timeouts(t);return new dMt(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};ny.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var s=[],a=0;a{fRe.exports=uRe()});var gRe=L(($Ir,hRe)=>{"use strict";var mMt=aRe(),yMt=ARe(),EMt=Object.prototype.hasOwnProperty;function pRe(t){return t&&t.code==="EPROMISERETRY"&&EMt.call(t,"retried")}function IMt(t,e){var r,s;return typeof t=="object"&&typeof e=="function"&&(r=e,e=t,t=r),s=yMt.operation(e),new Promise(function(a,n){s.attempt(function(c){Promise.resolve().then(function(){return t(function(f){throw pRe(f)&&(f=f.retried),mMt(new Error("Retrying"),"EPROMISERETRY",{retried:f})},c)}).then(a,function(f){pRe(f)&&(f=f.retried,s.retry(f||new Error))||n(f)})})})}hRe.exports=IMt});var vO=L(Ob=>{"use strict";var mRe=Ob&&Ob.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ob,"__esModule",{value:!0});Ob.fetchWithRetry=TMt;var CMt=Ie("http2"),wMt=mRe(wO()),dRe=iRe(),BMt=mRe(gRe()),vMt=Bg(),SMt=IO(),{HTTP2_HEADER_LOCATION:DMt,HTTP2_HEADER_CONTENT_TYPE:bMt,HTTP2_HEADER_USER_AGENT:PMt,HTTP_STATUS_INTERNAL_SERVER_ERROR:xMt,HTTP_STATUS_TOO_MANY_REQUESTS:kMt,HTTP_STATUS_REQUEST_TIMEOUT:QMt}=CMt.constants;async function TMt(t,e){return(0,BMt.default)(async(r,s)=>{let a=e.method||"POST",n={[PMt]:vMt.ua.getUserAgent(),...e.headers},c=await(0,wMt.default)(t,{method:a,headers:n,body:e.body,timeout:e.timeout,retry:!1}).catch(f=>(dRe.log.http("fetch",`${a} ${t} attempt ${s} failed with ${f}`),r(f)));if(c.ok)return c;{let f=await RMt(c);if(dRe.log.http("fetch",`${a} ${t} attempt ${s} failed with ${c.status}`),FMt(c.status))return r(f);throw f}},NMt(e.retry))}var RMt=async t=>{let e=t.statusText,r=t.headers.get(DMt)||void 0;if(t.headers.get(bMt)?.includes("application/json"))try{e=(await t.json()).message||e}catch{}return new SMt.HTTPError({status:t.status,message:e,location:r})},FMt=t=>[QMt,kMt].includes(t)||t>=xMt,NMt=t=>typeof t=="boolean"?{retries:t?1:0}:typeof t=="number"?{retries:t}:{retries:0,...t}});var yRe=L(SO=>{"use strict";Object.defineProperty(SO,"__esModule",{value:!0});SO.Fulcio=void 0;var OMt=vO(),eK=class{constructor(e){this.options=e}async createSigningCertificate(e){let{baseURL:r,retry:s,timeout:a}=this.options,n=`${r}/api/v2/signingCert`;return(await(0,OMt.fetchWithRetry)(n,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),timeout:a,retry:s})).json()}};SO.Fulcio=eK});var ERe=L(DO=>{"use strict";Object.defineProperty(DO,"__esModule",{value:!0});DO.CAClient=void 0;var LMt=Xw(),MMt=yRe(),tK=class{constructor(e){this.fulcio=new MMt.Fulcio({baseURL:e.fulcioBaseURL,retry:e.retry,timeout:e.timeout})}async createSigningCertificate(e,r,s){let a=_Mt(e,r,s);try{let n=await this.fulcio.createSigningCertificate(a);return(n.signedCertificateEmbeddedSct?n.signedCertificateEmbeddedSct:n.signedCertificateDetachedSct).chain.certificates}catch(n){(0,LMt.internalError)(n,"CA_CREATE_SIGNING_CERTIFICATE_ERROR","error creating signing certificate")}}};DO.CAClient=tK;function _Mt(t,e,r){return{credentials:{oidcIdentityToken:t},publicKeyRequest:{publicKey:{algorithm:"ECDSA",content:e},proofOfPossession:r.toString("base64")}}}});var CRe=L(e1=>{"use strict";var UMt=e1&&e1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e1,"__esModule",{value:!0});e1.EphemeralSigner=void 0;var IRe=UMt(Ie("crypto")),HMt="ec",jMt="P-256",rK=class{constructor(){this.keypair=IRe.default.generateKeyPairSync(HMt,{namedCurve:jMt})}async sign(e){let r=IRe.default.sign(null,e,this.keypair.privateKey),s=this.keypair.publicKey.export({format:"pem",type:"spki"}).toString("ascii");return{signature:r,key:{$case:"publicKey",publicKey:s}}}};e1.EphemeralSigner=rK});var wRe=L(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.FulcioSigner=iy.DEFAULT_FULCIO_URL=void 0;var nK=Xw(),qMt=Bg(),GMt=ERe(),WMt=CRe();iy.DEFAULT_FULCIO_URL="https://fulcio.sigstore.dev";var iK=class{constructor(e){this.ca=new GMt.CAClient({...e,fulcioBaseURL:e.fulcioBaseURL||iy.DEFAULT_FULCIO_URL}),this.identityProvider=e.identityProvider,this.keyHolder=e.keyHolder||new WMt.EphemeralSigner}async sign(e){let r=await this.getIdentityToken(),s;try{s=qMt.oidc.extractJWTSubject(r)}catch(f){throw new nK.InternalError({code:"IDENTITY_TOKEN_PARSE_ERROR",message:`invalid identity token: ${r}`,cause:f})}let a=await this.keyHolder.sign(Buffer.from(s));if(a.key.$case!=="publicKey")throw new nK.InternalError({code:"CA_CREATE_SIGNING_CERTIFICATE_ERROR",message:"unexpected format for signing key"});let n=await this.ca.createSigningCertificate(r,a.key.publicKey,a.signature);return{signature:(await this.keyHolder.sign(e)).signature,key:{$case:"x509Certificate",certificate:n[0]}}}async getIdentityToken(){try{return await this.identityProvider.getToken()}catch(e){throw new nK.InternalError({code:"IDENTITY_TOKEN_READ_ERROR",message:"error retrieving identity token",cause:e})}}};iy.FulcioSigner=iK});var vRe=L(t1=>{"use strict";Object.defineProperty(t1,"__esModule",{value:!0});t1.FulcioSigner=t1.DEFAULT_FULCIO_URL=void 0;var BRe=wRe();Object.defineProperty(t1,"DEFAULT_FULCIO_URL",{enumerable:!0,get:function(){return BRe.DEFAULT_FULCIO_URL}});Object.defineProperty(t1,"FulcioSigner",{enumerable:!0,get:function(){return BRe.FulcioSigner}})});var bRe=L(bO=>{"use strict";Object.defineProperty(bO,"__esModule",{value:!0});bO.Rekor=void 0;var SRe=vO(),sK=class{constructor(e){this.options=e}async createEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries`,f=await(await(0,SRe.fetchWithRetry)(n,{headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e),timeout:s,retry:a})).json();return DRe(f)}async getEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries/${e}`,f=await(await(0,SRe.fetchWithRetry)(n,{method:"GET",headers:{Accept:"application/json"},timeout:s,retry:a})).json();return DRe(f)}};bO.Rekor=sK;function DRe(t){let e=Object.entries(t);if(e.length!=1)throw new Error("Received multiple entries in Rekor response");let[r,s]=e[0];return{...s,uuid:r}}});var xRe=L(PO=>{"use strict";Object.defineProperty(PO,"__esModule",{value:!0});PO.TLogClient=void 0;var PRe=Xw(),YMt=IO(),VMt=bRe(),oK=class{constructor(e){this.fetchOnConflict=e.fetchOnConflict??!1,this.rekor=new VMt.Rekor({baseURL:e.rekorBaseURL,retry:e.retry,timeout:e.timeout})}async createEntry(e){let r;try{r=await this.rekor.createEntry(e)}catch(s){if(KMt(s)&&this.fetchOnConflict){let a=s.location.split("/").pop()||"";try{r=await this.rekor.getEntry(a)}catch(n){(0,PRe.internalError)(n,"TLOG_FETCH_ENTRY_ERROR","error fetching tlog entry")}}else(0,PRe.internalError)(s,"TLOG_CREATE_ENTRY_ERROR","error creating tlog entry")}return r}};PO.TLogClient=oK;function KMt(t){return t instanceof YMt.HTTPError&&t.statusCode===409&&t.location!==void 0}});var kRe=L(aK=>{"use strict";Object.defineProperty(aK,"__esModule",{value:!0});aK.toProposedEntry=zMt;var JMt=xb(),vg=Bg(),Lb="sha256";function zMt(t,e,r="dsse"){switch(t.$case){case"dsseEnvelope":return r==="intoto"?$Mt(t.dsseEnvelope,e):XMt(t.dsseEnvelope,e);case"messageSignature":return ZMt(t.messageSignature,e)}}function ZMt(t,e){let r=t.messageDigest.digest.toString("hex"),s=t.signature.toString("base64"),a=vg.encoding.base64Encode(e);return{apiVersion:"0.0.1",kind:"hashedrekord",spec:{data:{hash:{algorithm:Lb,value:r}},signature:{content:s,publicKey:{content:a}}}}}function XMt(t,e){let r=JSON.stringify((0,JMt.envelopeToJSON)(t)),s=vg.encoding.base64Encode(e);return{apiVersion:"0.0.1",kind:"dsse",spec:{proposedContent:{envelope:r,verifiers:[s]}}}}function $Mt(t,e){let r=vg.crypto.digest(Lb,t.payload).toString("hex"),s=e_t(t,e),a=vg.encoding.base64Encode(t.payload.toString("base64")),n=vg.encoding.base64Encode(t.signatures[0].sig.toString("base64")),c=t.signatures[0].keyid,f=vg.encoding.base64Encode(e),p={payloadType:t.payloadType,payload:a,signatures:[{sig:n,publicKey:f}]};return c.length>0&&(p.signatures[0].keyid=c),{apiVersion:"0.0.2",kind:"intoto",spec:{content:{envelope:p,hash:{algorithm:Lb,value:s},payloadHash:{algorithm:Lb,value:r}}}}}function e_t(t,e){let r={payloadType:t.payloadType,payload:t.payload.toString("base64"),signatures:[{sig:t.signatures[0].sig.toString("base64"),publicKey:e}]};return t.signatures[0].keyid.length>0&&(r.signatures[0].keyid=t.signatures[0].keyid),vg.crypto.digest(Lb,vg.json.canonicalize(r)).toString("hex")}});var QRe=L(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});sy.RekorWitness=sy.DEFAULT_REKOR_URL=void 0;var t_t=Bg(),r_t=xRe(),n_t=kRe();sy.DEFAULT_REKOR_URL="https://rekor.sigstore.dev";var lK=class{constructor(e){this.entryType=e.entryType,this.tlog=new r_t.TLogClient({...e,rekorBaseURL:e.rekorBaseURL||sy.DEFAULT_REKOR_URL})}async testify(e,r){let s=(0,n_t.toProposedEntry)(e,r,this.entryType),a=await this.tlog.createEntry(s);return i_t(a)}};sy.RekorWitness=lK;function i_t(t){let e=Buffer.from(t.logID,"hex"),r=t_t.encoding.base64Decode(t.body),s=JSON.parse(r),a=t?.verification?.signedEntryTimestamp?s_t(t.verification.signedEntryTimestamp):void 0,n=t?.verification?.inclusionProof?o_t(t.verification.inclusionProof):void 0;return{tlogEntries:[{logIndex:t.logIndex.toString(),logId:{keyId:e},integratedTime:t.integratedTime.toString(),kindVersion:{kind:s.kind,version:s.apiVersion},inclusionPromise:a,inclusionProof:n,canonicalizedBody:Buffer.from(t.body,"base64")}]}}function s_t(t){return{signedEntryTimestamp:Buffer.from(t,"base64")}}function o_t(t){return{logIndex:t.logIndex.toString(),treeSize:t.treeSize.toString(),rootHash:Buffer.from(t.rootHash,"hex"),hashes:t.hashes.map(e=>Buffer.from(e,"hex")),checkpoint:{envelope:t.checkpoint}}}});var TRe=L(xO=>{"use strict";Object.defineProperty(xO,"__esModule",{value:!0});xO.TimestampAuthority=void 0;var a_t=vO(),cK=class{constructor(e){this.options=e}async createTimestamp(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/timestamp`;return(await(0,a_t.fetchWithRetry)(n,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),timeout:s,retry:a})).buffer()}};xO.TimestampAuthority=cK});var FRe=L(kO=>{"use strict";Object.defineProperty(kO,"__esModule",{value:!0});kO.TSAClient=void 0;var l_t=Xw(),c_t=TRe(),u_t=Bg(),RRe="sha256",uK=class{constructor(e){this.tsa=new c_t.TimestampAuthority({baseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async createTimestamp(e){let r={artifactHash:u_t.crypto.digest(RRe,e).toString("base64"),hashAlgorithm:RRe};try{return await this.tsa.createTimestamp(r)}catch(s){(0,l_t.internalError)(s,"TSA_CREATE_TIMESTAMP_ERROR","error creating timestamp")}}};kO.TSAClient=uK});var NRe=L(QO=>{"use strict";Object.defineProperty(QO,"__esModule",{value:!0});QO.TSAWitness=void 0;var f_t=FRe(),fK=class{constructor(e){this.tsa=new f_t.TSAClient({tsaBaseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async testify(e){let r=A_t(e);return{rfc3161Timestamps:[{signedTimestamp:await this.tsa.createTimestamp(r)}]}}};QO.TSAWitness=fK;function A_t(t){switch(t.$case){case"dsseEnvelope":return t.dsseEnvelope.signatures[0].sig;case"messageSignature":return t.messageSignature.signature}}});var LRe=L(Sg=>{"use strict";Object.defineProperty(Sg,"__esModule",{value:!0});Sg.TSAWitness=Sg.RekorWitness=Sg.DEFAULT_REKOR_URL=void 0;var ORe=QRe();Object.defineProperty(Sg,"DEFAULT_REKOR_URL",{enumerable:!0,get:function(){return ORe.DEFAULT_REKOR_URL}});Object.defineProperty(Sg,"RekorWitness",{enumerable:!0,get:function(){return ORe.RekorWitness}});var p_t=NRe();Object.defineProperty(Sg,"TSAWitness",{enumerable:!0,get:function(){return p_t.TSAWitness}})});var pK=L(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.TSAWitness=Is.RekorWitness=Is.DEFAULT_REKOR_URL=Is.FulcioSigner=Is.DEFAULT_FULCIO_URL=Is.CIContextProvider=Is.InternalError=Is.MessageSignatureBundleBuilder=Is.DSSEBundleBuilder=void 0;var MRe=$Te();Object.defineProperty(Is,"DSSEBundleBuilder",{enumerable:!0,get:function(){return MRe.DSSEBundleBuilder}});Object.defineProperty(Is,"MessageSignatureBundleBuilder",{enumerable:!0,get:function(){return MRe.MessageSignatureBundleBuilder}});var h_t=Xw();Object.defineProperty(Is,"InternalError",{enumerable:!0,get:function(){return h_t.InternalError}});var g_t=rRe();Object.defineProperty(Is,"CIContextProvider",{enumerable:!0,get:function(){return g_t.CIContextProvider}});var _Re=vRe();Object.defineProperty(Is,"DEFAULT_FULCIO_URL",{enumerable:!0,get:function(){return _Re.DEFAULT_FULCIO_URL}});Object.defineProperty(Is,"FulcioSigner",{enumerable:!0,get:function(){return _Re.FulcioSigner}});var AK=LRe();Object.defineProperty(Is,"DEFAULT_REKOR_URL",{enumerable:!0,get:function(){return AK.DEFAULT_REKOR_URL}});Object.defineProperty(Is,"RekorWitness",{enumerable:!0,get:function(){return AK.RekorWitness}});Object.defineProperty(Is,"TSAWitness",{enumerable:!0,get:function(){return AK.TSAWitness}})});var HRe=L(Mb=>{"use strict";var URe=Mb&&Mb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mb,"__esModule",{value:!0});Mb.appDataPath=m_t;var d_t=URe(Ie("os")),r1=URe(Ie("path"));function m_t(t){let e=d_t.default.homedir();switch(process.platform){case"darwin":{let r=r1.default.join(e,"Library","Application Support");return r1.default.join(r,t)}case"win32":{let r=process.env.LOCALAPPDATA||r1.default.join(e,"AppData","Local");return r1.default.join(r,t,"Data")}default:{let r=process.env.XDG_DATA_HOME||r1.default.join(e,".local","share");return r1.default.join(r,t)}}}});var kA=L(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.UnsupportedAlgorithmError=Bl.CryptoError=Bl.LengthOrHashMismatchError=Bl.UnsignedMetadataError=Bl.RepositoryError=Bl.ValueError=void 0;var hK=class extends Error{};Bl.ValueError=hK;var _b=class extends Error{};Bl.RepositoryError=_b;var gK=class extends _b{};Bl.UnsignedMetadataError=gK;var dK=class extends _b{};Bl.LengthOrHashMismatchError=dK;var TO=class extends Error{};Bl.CryptoError=TO;var mK=class extends TO{};Bl.UnsupportedAlgorithmError=mK});var qRe=L(Dg=>{"use strict";Object.defineProperty(Dg,"__esModule",{value:!0});Dg.isDefined=y_t;Dg.isObject=jRe;Dg.isStringArray=E_t;Dg.isObjectArray=I_t;Dg.isStringRecord=C_t;Dg.isObjectRecord=w_t;function y_t(t){return t!==void 0}function jRe(t){return typeof t=="object"&&t!==null}function E_t(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")}function I_t(t){return Array.isArray(t)&&t.every(jRe)}function C_t(t){return typeof t=="object"&&t!==null&&Object.keys(t).every(e=>typeof e=="string")&&Object.values(t).every(e=>typeof e=="string")}function w_t(t){return typeof t=="object"&&t!==null&&Object.keys(t).every(e=>typeof e=="string")&&Object.values(t).every(e=>typeof e=="object"&&e!==null)}});var EK=L((yCr,YRe)=>{var GRe=",",B_t=":",v_t="[",S_t="]",D_t="{",b_t="}";function yK(t){let e=[];if(typeof t=="string")e.push(WRe(t));else if(typeof t=="boolean")e.push(JSON.stringify(t));else if(Number.isInteger(t))e.push(JSON.stringify(t));else if(t===null)e.push(JSON.stringify(t));else if(Array.isArray(t)){e.push(v_t);let r=!0;t.forEach(s=>{r||e.push(GRe),r=!1,e.push(yK(s))}),e.push(S_t)}else if(typeof t=="object"){e.push(D_t);let r=!0;Object.keys(t).sort().forEach(s=>{r||e.push(GRe),r=!1,e.push(WRe(s)),e.push(B_t),e.push(yK(t[s]))}),e.push(b_t)}else throw new TypeError("cannot encode "+t.toString());return e.join("")}function WRe(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}YRe.exports={canonicalize:yK}});var VRe=L(n1=>{"use strict";var P_t=n1&&n1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n1,"__esModule",{value:!0});n1.verifySignature=void 0;var x_t=EK(),k_t=P_t(Ie("crypto")),Q_t=(t,e,r)=>{let s=Buffer.from((0,x_t.canonicalize)(t));return k_t.default.verify(void 0,s,e,Buffer.from(r,"hex"))};n1.verifySignature=Q_t});var Af=L(ru=>{"use strict";var T_t=ru&&ru.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),R_t=ru&&ru.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KRe=ru&&ru.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&T_t(e,t,r);return R_t(e,t),e};Object.defineProperty(ru,"__esModule",{value:!0});ru.crypto=ru.guard=void 0;ru.guard=KRe(qRe());ru.crypto=KRe(VRe())});var oy=L(dh=>{"use strict";var F_t=dh&&dh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dh,"__esModule",{value:!0});dh.Signed=dh.MetadataKind=void 0;dh.isMetadataKind=O_t;var N_t=F_t(Ie("util")),Ub=kA(),IK=Af(),JRe=["1","0","31"],CK;(function(t){t.Root="root",t.Timestamp="timestamp",t.Snapshot="snapshot",t.Targets="targets"})(CK||(dh.MetadataKind=CK={}));function O_t(t){return typeof t=="string"&&Object.values(CK).includes(t)}var wK=class t{constructor(e){this.specVersion=e.specVersion||JRe.join(".");let r=this.specVersion.split(".");if(!(r.length===2||r.length===3)||!r.every(s=>L_t(s)))throw new Ub.ValueError("Failed to parse specVersion");if(r[0]!=JRe[0])throw new Ub.ValueError("Unsupported specVersion");this.expires=e.expires,this.version=e.version,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.specVersion===e.specVersion&&this.expires===e.expires&&this.version===e.version&&N_t.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}isExpired(e){return e||(e=new Date),e>=new Date(this.expires)}static commonFieldsFromJSON(e){let{spec_version:r,expires:s,version:a,...n}=e;if(IK.guard.isDefined(r)){if(typeof r!="string")throw new TypeError("spec_version must be a string")}else throw new Ub.ValueError("spec_version is not defined");if(IK.guard.isDefined(s)){if(typeof s!="string")throw new TypeError("expires must be a string")}else throw new Ub.ValueError("expires is not defined");if(IK.guard.isDefined(a)){if(typeof a!="number")throw new TypeError("version must be a number")}else throw new Ub.ValueError("version is not defined");return{specVersion:r,expires:s,version:a,unrecognizedFields:n}}};dh.Signed=wK;function L_t(t){return!isNaN(Number(t))}});var Hb=L(Pg=>{"use strict";var zRe=Pg&&Pg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pg,"__esModule",{value:!0});Pg.TargetFile=Pg.MetaFile=void 0;var ZRe=zRe(Ie("crypto")),FO=zRe(Ie("util")),bg=kA(),RO=Af(),BK=class t{constructor(e){if(e.version<=0)throw new bg.ValueError("Metafile version must be at least 1");e.length!==void 0&&XRe(e.length),this.version=e.version,this.length=e.length,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.version===e.version&&this.length===e.length&&FO.default.isDeepStrictEqual(this.hashes,e.hashes)&&FO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}verify(e){if(this.length!==void 0&&e.length!==this.length)throw new bg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${e.length}`);this.hashes&&Object.entries(this.hashes).forEach(([r,s])=>{let a;try{a=ZRe.default.createHash(r)}catch{throw new bg.LengthOrHashMismatchError(`Hash algorithm ${r} not supported`)}let n=a.update(e).digest("hex");if(n!==s)throw new bg.LengthOrHashMismatchError(`Expected hash ${s} but got ${n}`)})}toJSON(){let e={version:this.version,...this.unrecognizedFields};return this.length!==void 0&&(e.length=this.length),this.hashes&&(e.hashes=this.hashes),e}static fromJSON(e){let{version:r,length:s,hashes:a,...n}=e;if(typeof r!="number")throw new TypeError("version must be a number");if(RO.guard.isDefined(s)&&typeof s!="number")throw new TypeError("length must be a number");if(RO.guard.isDefined(a)&&!RO.guard.isStringRecord(a))throw new TypeError("hashes must be string keys and values");return new t({version:r,length:s,hashes:a,unrecognizedFields:n})}};Pg.MetaFile=BK;var vK=class t{constructor(e){XRe(e.length),this.length=e.length,this.path=e.path,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}get custom(){let e=this.unrecognizedFields.custom;return!e||Array.isArray(e)||typeof e!="object"?{}:e}equals(e){return e instanceof t?this.length===e.length&&this.path===e.path&&FO.default.isDeepStrictEqual(this.hashes,e.hashes)&&FO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}async verify(e){let r=0,s=Object.keys(this.hashes).reduce((a,n)=>{try{a[n]=ZRe.default.createHash(n)}catch{throw new bg.LengthOrHashMismatchError(`Hash algorithm ${n} not supported`)}return a},{});for await(let a of e)r+=a.length,Object.values(s).forEach(n=>{n.update(a)});if(r!==this.length)throw new bg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${r}`);Object.entries(s).forEach(([a,n])=>{let c=this.hashes[a],f=n.digest("hex");if(f!==c)throw new bg.LengthOrHashMismatchError(`Expected hash ${c} but got ${f}`)})}toJSON(){return{length:this.length,hashes:this.hashes,...this.unrecognizedFields}}static fromJSON(e,r){let{length:s,hashes:a,...n}=r;if(typeof s!="number")throw new TypeError("length must be a number");if(!RO.guard.isStringRecord(a))throw new TypeError("hashes must have string keys and values");return new t({length:s,path:e,hashes:a,unrecognizedFields:n})}};Pg.TargetFile=vK;function XRe(t){if(t<0)throw new bg.ValueError("Length must be at least 0")}});var $Re=L(SK=>{"use strict";Object.defineProperty(SK,"__esModule",{value:!0});SK.encodeOIDString=__t;var M_t=6;function __t(t){let e=t.split("."),r=parseInt(e[0],10)*40+parseInt(e[1],10),s=[];e.slice(2).forEach(n=>{let c=U_t(parseInt(n,10));s.push(...c)});let a=Buffer.from([r,...s]);return Buffer.from([M_t,a.length,...a])}function U_t(t){let e=[],r=0;for(;t>0;)e.unshift(t&127|r),t>>=7,r=128;return e}});var nFe=L(qb=>{"use strict";var H_t=qb&&qb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qb,"__esModule",{value:!0});qb.getPublicKey=W_t;var i1=H_t(Ie("crypto")),jb=kA(),DK=$Re(),NO=48,eFe=3,tFe=0,j_t="1.3.101.112",q_t="1.2.840.10045.2.1",G_t="1.2.840.10045.3.1.7",bK="-----BEGIN PUBLIC KEY-----";function W_t(t){switch(t.keyType){case"rsa":return Y_t(t);case"ed25519":return V_t(t);case"ecdsa":case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":return K_t(t);default:throw new jb.UnsupportedAlgorithmError(`Unsupported key type: ${t.keyType}`)}}function Y_t(t){if(!t.keyVal.startsWith(bK))throw new jb.CryptoError("Invalid key format");let e=i1.default.createPublicKey(t.keyVal);switch(t.scheme){case"rsassa-pss-sha256":return{key:e,padding:i1.default.constants.RSA_PKCS1_PSS_PADDING};default:throw new jb.UnsupportedAlgorithmError(`Unsupported RSA scheme: ${t.scheme}`)}}function V_t(t){let e;if(t.keyVal.startsWith(bK))e=i1.default.createPublicKey(t.keyVal);else{if(!rFe(t.keyVal))throw new jb.CryptoError("Invalid key format");e=i1.default.createPublicKey({key:J_t.hexToDER(t.keyVal),format:"der",type:"spki"})}return{key:e}}function K_t(t){let e;if(t.keyVal.startsWith(bK))e=i1.default.createPublicKey(t.keyVal);else{if(!rFe(t.keyVal))throw new jb.CryptoError("Invalid key format");e=i1.default.createPublicKey({key:z_t.hexToDER(t.keyVal),format:"der",type:"spki"})}return{key:e}}var J_t={hexToDER:t=>{let e=Buffer.from(t,"hex"),r=(0,DK.encodeOIDString)(j_t),s=Buffer.concat([Buffer.concat([Buffer.from([NO]),Buffer.from([r.length]),r]),Buffer.concat([Buffer.from([eFe]),Buffer.from([e.length+1]),Buffer.from([tFe]),e])]);return Buffer.concat([Buffer.from([NO]),Buffer.from([s.length]),s])}},z_t={hexToDER:t=>{let e=Buffer.from(t,"hex"),r=Buffer.concat([Buffer.from([eFe]),Buffer.from([e.length+1]),Buffer.from([tFe]),e]),s=Buffer.concat([(0,DK.encodeOIDString)(q_t),(0,DK.encodeOIDString)(G_t)]),a=Buffer.concat([Buffer.from([NO]),Buffer.from([s.length]),s]);return Buffer.concat([Buffer.from([NO]),Buffer.from([a.length+r.length]),a,r])}},rFe=t=>/^[0-9a-fA-F]+$/.test(t)});var OO=L(s1=>{"use strict";var Z_t=s1&&s1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(s1,"__esModule",{value:!0});s1.Key=void 0;var iFe=Z_t(Ie("util")),Gb=kA(),sFe=Af(),X_t=nFe(),PK=class t{constructor(e){let{keyID:r,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c}=e;this.keyID=r,this.keyType=s,this.scheme=a,this.keyVal=n,this.unrecognizedFields=c||{}}verifySignature(e){let r=e.signatures[this.keyID];if(!r)throw new Gb.UnsignedMetadataError("no signature for key found in metadata");if(!this.keyVal.public)throw new Gb.UnsignedMetadataError("no public key found");let s=(0,X_t.getPublicKey)({keyType:this.keyType,scheme:this.scheme,keyVal:this.keyVal.public}),a=e.signed.toJSON();try{if(!sFe.crypto.verifySignature(a,s,r.sig))throw new Gb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}catch(n){throw n instanceof Gb.UnsignedMetadataError?n:new Gb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}equals(e){return e instanceof t?this.keyID===e.keyID&&this.keyType===e.keyType&&this.scheme===e.scheme&&iFe.default.isDeepStrictEqual(this.keyVal,e.keyVal)&&iFe.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keytype:this.keyType,scheme:this.scheme,keyval:this.keyVal,...this.unrecognizedFields}}static fromJSON(e,r){let{keytype:s,scheme:a,keyval:n,...c}=r;if(typeof s!="string")throw new TypeError("keytype must be a string");if(typeof a!="string")throw new TypeError("scheme must be a string");if(!sFe.guard.isStringRecord(n))throw new TypeError("keyval must be a string record");return new t({keyID:e,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c})}};s1.Key=PK});var uFe=L((DCr,cFe)=>{"use strict";cFe.exports=aFe;function aFe(t,e,r){t instanceof RegExp&&(t=oFe(t,r)),e instanceof RegExp&&(e=oFe(e,r));var s=lFe(t,e,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+t.length,s[1]),post:r.slice(s[1]+e.length)}}function oFe(t,e){var r=e.match(t);return r?r[0]:null}aFe.range=lFe;function lFe(t,e,r){var s,a,n,c,f,p=r.indexOf(t),h=r.indexOf(e,p+1),E=p;if(p>=0&&h>0){for(s=[],n=r.length;E>=0&&!f;)E==p?(s.push(E),p=r.indexOf(t,E+1)):s.length==1?f=[s.pop(),h]:(a=s.pop(),a=0?p:h;s.length&&(f=[n,c])}return f}});var yFe=L((bCr,mFe)=>{var fFe=uFe();mFe.exports=tUt;var AFe="\0SLASH"+Math.random()+"\0",pFe="\0OPEN"+Math.random()+"\0",kK="\0CLOSE"+Math.random()+"\0",hFe="\0COMMA"+Math.random()+"\0",gFe="\0PERIOD"+Math.random()+"\0";function xK(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function $_t(t){return t.split("\\\\").join(AFe).split("\\{").join(pFe).split("\\}").join(kK).split("\\,").join(hFe).split("\\.").join(gFe)}function eUt(t){return t.split(AFe).join("\\").split(pFe).join("{").split(kK).join("}").split(hFe).join(",").split(gFe).join(".")}function dFe(t){if(!t)return[""];var e=[],r=fFe("{","}",t);if(!r)return t.split(",");var s=r.pre,a=r.body,n=r.post,c=s.split(",");c[c.length-1]+="{"+a+"}";var f=dFe(n);return n.length&&(c[c.length-1]+=f.shift(),c.push.apply(c,f)),e.push.apply(e,c),e}function tUt(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),Wb($_t(t),!0).map(eUt)):[]}function rUt(t){return"{"+t+"}"}function nUt(t){return/^-?0\d/.test(t)}function iUt(t,e){return t<=e}function sUt(t,e){return t>=e}function Wb(t,e){var r=[],s=fFe("{","}",t);if(!s)return[t];var a=s.pre,n=s.post.length?Wb(s.post,!1):[""];if(/\$$/.test(s.pre))for(var c=0;c=0;if(!E&&!C)return s.post.match(/,.*\}/)?(t=s.pre+"{"+s.body+kK+s.post,Wb(t)):[t];var S;if(E)S=s.body.split(/\.\./);else if(S=dFe(s.body),S.length===1&&(S=Wb(S[0],!1).map(rUt),S.length===1))return n.map(function(Ce){return s.pre+S[0]+Ce});var P;if(E){var I=xK(S[0]),R=xK(S[1]),N=Math.max(S[0].length,S[1].length),U=S.length==3?Math.abs(xK(S[2])):1,W=iUt,te=R0){var pe=new Array(me+1).join("0");Ae<0?ce="-"+pe+ce.slice(1):ce=pe+ce}}P.push(ce)}}else{P=[];for(var Be=0;Be{"use strict";Object.defineProperty(LO,"__esModule",{value:!0});LO.assertValidPattern=void 0;var oUt=1024*64,aUt=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>oUt)throw new TypeError("pattern is too long")};LO.assertValidPattern=aUt});var CFe=L(MO=>{"use strict";Object.defineProperty(MO,"__esModule",{value:!0});MO.parseClass=void 0;var lUt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Yb=t=>t.replace(/[[\]\\-]/g,"\\$&"),cUt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),IFe=t=>t.join(""),uUt=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let s=[],a=[],n=r+1,c=!1,f=!1,p=!1,h=!1,E=r,C="";e:for(;nC?s.push(Yb(C)+"-"+Yb(R)):R===C&&s.push(Yb(R)),C="",n++;continue}if(t.startsWith("-]",n+1)){s.push(Yb(R+"-")),n+=2;continue}if(t.startsWith("-",n+1)){C=R,n+=2;continue}s.push(Yb(R)),n++}if(E{"use strict";Object.defineProperty(_O,"__esModule",{value:!0});_O.unescape=void 0;var fUt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");_O.unescape=fUt});var RK=L(qO=>{"use strict";Object.defineProperty(qO,"__esModule",{value:!0});qO.AST=void 0;var AUt=CFe(),HO=UO(),pUt=new Set(["!","?","+","*","@"]),wFe=t=>pUt.has(t),hUt="(?!(?:^|/)\\.\\.?(?:$|/))",jO="(?!\\.)",gUt=new Set(["[","."]),dUt=new Set(["..","."]),mUt=new Set("().*{}+?[]^$\\!"),yUt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),TK="[^/]",BFe=TK+"*?",vFe=TK+"+?",QK=class t{type;#t;#r;#i=!1;#e=[];#n;#o;#l;#a=!1;#s;#c;#f=!1;constructor(e,r,s={}){this.type=e,e&&(this.#r=!0),this.#n=r,this.#t=this.#n?this.#n.#t:this,this.#s=this.#t===this?s:this.#t.#s,this.#l=this.#t===this?[]:this.#t.#l,e==="!"&&!this.#t.#a&&this.#l.push(this),this.#o=this.#n?this.#n.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#c=this.#e.map(e=>String(e)).join("")}#p(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let e;for(;e=this.#l.pop();){if(e.type!=="!")continue;let r=e,s=r.#n;for(;s;){for(let a=r.#o+1;!s.type&&atypeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&this.#n?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(this.#o===0)return!0;let e=this.#n;for(let r=0;r{let[I,R,N,U]=typeof P=="string"?t.#h(P,this.#r,p):P.toRegExpSource(e);return this.#r=this.#r||N,this.#i=this.#i||U,I}).join(""),E="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&dUt.has(this.#e[0]))){let I=gUt,R=r&&I.has(h.charAt(0))||h.startsWith("\\.")&&I.has(h.charAt(2))||h.startsWith("\\.\\.")&&I.has(h.charAt(4)),N=!r&&!e&&I.has(h.charAt(0));E=R?hUt:N?jO:""}let C="";return this.isEnd()&&this.#t.#a&&this.#n?.type==="!"&&(C="(?:$|\\/)"),[E+h+C,(0,HO.unescape)(h),this.#r=!!this.#r,this.#i]}let s=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#A(r);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let p=this.toString();return this.#e=[p],this.type=null,this.#r=void 0,[p,(0,HO.unescape)(this.toString()),!1,!1]}let c=!s||e||r||!jO?"":this.#A(!0);c===n&&(c=""),c&&(n=`(?:${n})(?:${c})*?`);let f="";if(this.type==="!"&&this.#f)f=(this.isStart()&&!r?jO:"")+vFe;else{let p=this.type==="!"?"))"+(this.isStart()&&!r&&!e?jO:"")+BFe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`;f=a+n+p}return[f,(0,HO.unescape)(n),this.#r=!!this.#r,this.#i]}#A(e){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[s,a,n,c]=r.toRegExpSource(e);return this.#i=this.#i||c,s}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#h(e,r,s=!1){let a=!1,n="",c=!1;for(let f=0;f{"use strict";Object.defineProperty(GO,"__esModule",{value:!0});GO.escape=void 0;var EUt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");GO.escape=EUt});var QFe=L(pr=>{"use strict";var IUt=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pr,"__esModule",{value:!0});pr.unescape=pr.escape=pr.AST=pr.Minimatch=pr.match=pr.makeRe=pr.braceExpand=pr.defaults=pr.filter=pr.GLOBSTAR=pr.sep=pr.minimatch=void 0;var CUt=IUt(yFe()),WO=EFe(),bFe=RK(),wUt=FK(),BUt=UO(),vUt=(t,e,r={})=>((0,WO.assertValidPattern)(e),!r.nocomment&&e.charAt(0)==="#"?!1:new ay(e,r).match(t));pr.minimatch=vUt;var SUt=/^\*+([^+@!?\*\[\(]*)$/,DUt=t=>e=>!e.startsWith(".")&&e.endsWith(t),bUt=t=>e=>e.endsWith(t),PUt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),xUt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),kUt=/^\*+\.\*+$/,QUt=t=>!t.startsWith(".")&&t.includes("."),TUt=t=>t!=="."&&t!==".."&&t.includes("."),RUt=/^\.\*+$/,FUt=t=>t!=="."&&t!==".."&&t.startsWith("."),NUt=/^\*+$/,OUt=t=>t.length!==0&&!t.startsWith("."),LUt=t=>t.length!==0&&t!=="."&&t!=="..",MUt=/^\?+([^+@!?\*\[\(]*)?$/,_Ut=([t,e=""])=>{let r=PFe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},UUt=([t,e=""])=>{let r=xFe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},HUt=([t,e=""])=>{let r=xFe([t]);return e?s=>r(s)&&s.endsWith(e):r},jUt=([t,e=""])=>{let r=PFe([t]);return e?s=>r(s)&&s.endsWith(e):r},PFe=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},xFe=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},kFe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",SFe={win32:{sep:"\\"},posix:{sep:"/"}};pr.sep=kFe==="win32"?SFe.win32.sep:SFe.posix.sep;pr.minimatch.sep=pr.sep;pr.GLOBSTAR=Symbol("globstar **");pr.minimatch.GLOBSTAR=pr.GLOBSTAR;var qUt="[^/]",GUt=qUt+"*?",WUt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",YUt="(?:(?!(?:\\/|^)\\.).)*?",VUt=(t,e={})=>r=>(0,pr.minimatch)(r,t,e);pr.filter=VUt;pr.minimatch.filter=pr.filter;var nu=(t,e={})=>Object.assign({},t,e),KUt=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return pr.minimatch;let e=pr.minimatch;return Object.assign((s,a,n={})=>e(s,a,nu(t,n)),{Minimatch:class extends e.Minimatch{constructor(a,n={}){super(a,nu(t,n))}static defaults(a){return e.defaults(nu(t,a)).Minimatch}},AST:class extends e.AST{constructor(a,n,c={}){super(a,n,nu(t,c))}static fromGlob(a,n={}){return e.AST.fromGlob(a,nu(t,n))}},unescape:(s,a={})=>e.unescape(s,nu(t,a)),escape:(s,a={})=>e.escape(s,nu(t,a)),filter:(s,a={})=>e.filter(s,nu(t,a)),defaults:s=>e.defaults(nu(t,s)),makeRe:(s,a={})=>e.makeRe(s,nu(t,a)),braceExpand:(s,a={})=>e.braceExpand(s,nu(t,a)),match:(s,a,n={})=>e.match(s,a,nu(t,n)),sep:e.sep,GLOBSTAR:pr.GLOBSTAR})};pr.defaults=KUt;pr.minimatch.defaults=pr.defaults;var JUt=(t,e={})=>((0,WO.assertValidPattern)(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,CUt.default)(t));pr.braceExpand=JUt;pr.minimatch.braceExpand=pr.braceExpand;var zUt=(t,e={})=>new ay(t,e).makeRe();pr.makeRe=zUt;pr.minimatch.makeRe=pr.makeRe;var ZUt=(t,e,r={})=>{let s=new ay(e,r);return t=t.filter(a=>s.match(a)),s.options.nonull&&!t.length&&t.push(e),t};pr.match=ZUt;pr.minimatch.match=pr.match;var DFe=/[?*]|[+@!]\(.*?\)|\[|\]/,XUt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ay=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){(0,WO.assertValidPattern)(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||kFe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let a=this.globParts.map((n,c,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){let p=n[0]===""&&n[1]===""&&(n[2]==="?"||!DFe.test(n[2]))&&!DFe.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(p)return[...n.slice(0,4),...n.slice(4).map(E=>this.parse(E))];if(h)return[n[0],...n.slice(1).map(E=>this.parse(E))]}return n.map(p=>this.parse(p))});if(this.debug(this.pattern,a),this.set=a.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let s=-1;for(;(s=r.indexOf("**",s+1))!==-1;){let a=s;for(;r[a+1]==="**";)a++;a!==s&&r.splice(s,a-s)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((s,a)=>{let n=s[s.length-1];return a==="**"&&n==="**"?s:a===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(s.pop(),s):(s.push(a),s)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let a=1;aa&&s.splice(a+1,c-a);let f=s[a+1],p=s[a+2],h=s[a+3];if(f!==".."||!p||p==="."||p===".."||!h||h==="."||h==="..")continue;r=!0,s.splice(a,1);let E=s.slice(0);E[a]="**",e.push(E),a--}if(!this.preserveMultipleSlashes){for(let c=1;cr.length)}partsMatch(e,r,s=!1){let a=0,n=0,c=[],f="";for(;ate?r=r.slice(ie):te>ie&&(e=e.slice(te)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var c=0,f=0,p=e.length,h=r.length;c>> no match, partial?`,e,S,r,P),S===p))}let R;if(typeof E=="string"?(R=C===E,this.debug("string match",E,C,R)):(R=E.test(C),this.debug("pattern match",E,C,R)),!R)return!1}if(c===p&&f===h)return!0;if(c===p)return s;if(f===h)return c===p-1&&e[c]==="";throw new Error("wtf?")}braceExpand(){return(0,pr.braceExpand)(this.pattern,this.options)}parse(e){(0,WO.assertValidPattern)(e);let r=this.options;if(e==="**")return pr.GLOBSTAR;if(e==="")return"";let s,a=null;(s=e.match(NUt))?a=r.dot?LUt:OUt:(s=e.match(SUt))?a=(r.nocase?r.dot?xUt:PUt:r.dot?bUt:DUt)(s[1]):(s=e.match(MUt))?a=(r.nocase?r.dot?UUt:_Ut:r.dot?HUt:jUt)(s):(s=e.match(kUt))?a=r.dot?TUt:QUt:(s=e.match(RUt))&&(a=FUt);let n=bFe.AST.fromGlob(e,this.options).toMMPattern();return a&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:a}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,s=r.noglobstar?GUt:r.dot?WUt:YUt,a=new Set(r.nocase?["i"]:[]),n=e.map(p=>{let h=p.map(E=>{if(E instanceof RegExp)for(let C of E.flags.split(""))a.add(C);return typeof E=="string"?XUt(E):E===pr.GLOBSTAR?pr.GLOBSTAR:E._src});return h.forEach((E,C)=>{let S=h[C+1],P=h[C-1];E!==pr.GLOBSTAR||P===pr.GLOBSTAR||(P===void 0?S!==void 0&&S!==pr.GLOBSTAR?h[C+1]="(?:\\/|"+s+"\\/)?"+S:h[C]=s:S===void 0?h[C-1]=P+"(?:\\/|"+s+")?":S!==pr.GLOBSTAR&&(h[C-1]=P+"(?:\\/|\\/"+s+"\\/)"+S,h[C+1]=pr.GLOBSTAR))}),h.filter(E=>E!==pr.GLOBSTAR).join("/")}).join("|"),[c,f]=e.length>1?["(?:",")"]:["",""];n="^"+c+n+f+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let s=this.options;this.isWindows&&(e=e.split("\\").join("/"));let a=this.slashSplit(e);this.debug(this.pattern,"split",a);let n=this.set;this.debug(this.pattern,"set",n);let c=a[a.length-1];if(!c)for(let f=a.length-2;!c&&f>=0;f--)c=a[f];for(let f=0;f{"use strict";var TFe=iu&&iu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iu,"__esModule",{value:!0});iu.SuccinctRoles=iu.DelegatedRole=iu.Role=iu.TOP_LEVEL_ROLE_NAMES=void 0;var RFe=TFe(Ie("crypto")),r4t=QFe(),YO=TFe(Ie("util")),VO=kA(),ly=Af();iu.TOP_LEVEL_ROLE_NAMES=["root","targets","snapshot","timestamp"];var Vb=class t{constructor(e){let{keyIDs:r,threshold:s,unrecognizedFields:a}=e;if(n4t(r))throw new VO.ValueError("duplicate key IDs found");if(s<1)throw new VO.ValueError("threshold must be at least 1");this.keyIDs=r,this.threshold=s,this.unrecognizedFields=a||{}}equals(e){return e instanceof t?this.threshold===e.threshold&&YO.default.isDeepStrictEqual(this.keyIDs,e.keyIDs)&&YO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(e){let{keyids:r,threshold:s,...a}=e;if(!ly.guard.isStringArray(r))throw new TypeError("keyids must be an array");if(typeof s!="number")throw new TypeError("threshold must be a number");return new t({keyIDs:r,threshold:s,unrecognizedFields:a})}};iu.Role=Vb;function n4t(t){return new Set(t).size!==t.length}var NK=class t extends Vb{constructor(e){super(e);let{name:r,terminating:s,paths:a,pathHashPrefixes:n}=e;if(this.name=r,this.terminating=s,e.paths&&e.pathHashPrefixes)throw new VO.ValueError("paths and pathHashPrefixes are mutually exclusive");this.paths=a,this.pathHashPrefixes=n}equals(e){return e instanceof t?super.equals(e)&&this.name===e.name&&this.terminating===e.terminating&&YO.default.isDeepStrictEqual(this.paths,e.paths)&&YO.default.isDeepStrictEqual(this.pathHashPrefixes,e.pathHashPrefixes):!1}isDelegatedPath(e){if(this.paths)return this.paths.some(r=>s4t(e,r));if(this.pathHashPrefixes){let s=RFe.default.createHash("sha256").update(e).digest("hex");return this.pathHashPrefixes.some(a=>s.startsWith(a))}return!1}toJSON(){let e={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(e.paths=this.paths),this.pathHashPrefixes&&(e.path_hash_prefixes=this.pathHashPrefixes),e}static fromJSON(e){let{keyids:r,threshold:s,name:a,terminating:n,paths:c,path_hash_prefixes:f,...p}=e;if(!ly.guard.isStringArray(r))throw new TypeError("keyids must be an array of strings");if(typeof s!="number")throw new TypeError("threshold must be a number");if(typeof a!="string")throw new TypeError("name must be a string");if(typeof n!="boolean")throw new TypeError("terminating must be a boolean");if(ly.guard.isDefined(c)&&!ly.guard.isStringArray(c))throw new TypeError("paths must be an array of strings");if(ly.guard.isDefined(f)&&!ly.guard.isStringArray(f))throw new TypeError("path_hash_prefixes must be an array of strings");return new t({keyIDs:r,threshold:s,name:a,terminating:n,paths:c,pathHashPrefixes:f,unrecognizedFields:p})}};iu.DelegatedRole=NK;var i4t=(t,e)=>t.map((r,s)=>[r,e[s]]);function s4t(t,e){let r=t.split("/"),s=e.split("/");return s.length!=r.length?!1:i4t(r,s).every(([a,n])=>(0,r4t.minimatch)(a,n))}var OK=class t extends Vb{constructor(e){super(e);let{bitLength:r,namePrefix:s}=e;if(r<=0||r>32)throw new VO.ValueError("bitLength must be between 1 and 32");this.bitLength=r,this.namePrefix=s,this.numberOfBins=Math.pow(2,r),this.suffixLen=(this.numberOfBins-1).toString(16).length}equals(e){return e instanceof t?super.equals(e)&&this.bitLength===e.bitLength&&this.namePrefix===e.namePrefix:!1}getRoleForTarget(e){let a=RFe.default.createHash("sha256").update(e).digest().subarray(0,4),n=32-this.bitLength,f=(a.readUInt32BE()>>>n).toString(16).padStart(this.suffixLen,"0");return`${this.namePrefix}-${f}`}*getRoles(){for(let e=0;e{"use strict";var o4t=o1&&o1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(o1,"__esModule",{value:!0});o1.Root=void 0;var FFe=o4t(Ie("util")),MK=oy(),NFe=kA(),a4t=OO(),KO=LK(),JO=Af(),_K=class t extends MK.Signed{constructor(e){if(super(e),this.type=MK.MetadataKind.Root,this.keys=e.keys||{},this.consistentSnapshot=e.consistentSnapshot??!0,!e.roles)this.roles=KO.TOP_LEVEL_ROLE_NAMES.reduce((r,s)=>({...r,[s]:new KO.Role({keyIDs:[],threshold:1})}),{});else{let r=new Set(Object.keys(e.roles));if(!KO.TOP_LEVEL_ROLE_NAMES.every(s=>r.has(s)))throw new NFe.ValueError("missing top-level role");this.roles=e.roles}}addKey(e,r){if(!this.roles[r])throw new NFe.ValueError(`role ${r} does not exist`);this.roles[r].keyIDs.includes(e.keyID)||this.roles[r].keyIDs.push(e.keyID),this.keys[e.keyID]=e}equals(e){return e instanceof t?super.equals(e)&&this.consistentSnapshot===e.consistentSnapshot&&FFe.default.isDeepStrictEqual(this.keys,e.keys)&&FFe.default.isDeepStrictEqual(this.roles,e.roles):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,keys:l4t(this.keys),roles:c4t(this.roles),consistent_snapshot:this.consistentSnapshot,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=MK.Signed.commonFieldsFromJSON(e),{keys:a,roles:n,consistent_snapshot:c,...f}=r;if(typeof c!="boolean")throw new TypeError("consistent_snapshot must be a boolean");return new t({...s,keys:u4t(a),roles:f4t(n),consistentSnapshot:c,unrecognizedFields:f})}};o1.Root=_K;function l4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function c4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function u4t(t){let e;if(JO.guard.isDefined(t)){if(!JO.guard.isObjectRecord(t))throw new TypeError("keys must be an object");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:a4t.Key.fromJSON(s,a)}),{})}return e}function f4t(t){let e;if(JO.guard.isDefined(t)){if(!JO.guard.isObjectRecord(t))throw new TypeError("roles must be an object");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:KO.Role.fromJSON(a)}),{})}return e}});var jK=L(zO=>{"use strict";Object.defineProperty(zO,"__esModule",{value:!0});zO.Signature=void 0;var HK=class t{constructor(e){let{keyID:r,sig:s}=e;this.keyID=r,this.sig=s}toJSON(){return{keyid:this.keyID,sig:this.sig}}static fromJSON(e){let{keyid:r,sig:s}=e;if(typeof r!="string")throw new TypeError("keyid must be a string");if(typeof s!="string")throw new TypeError("sig must be a string");return new t({keyID:r,sig:s})}};zO.Signature=HK});var WK=L(a1=>{"use strict";var A4t=a1&&a1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(a1,"__esModule",{value:!0});a1.Snapshot=void 0;var p4t=A4t(Ie("util")),qK=oy(),LFe=Hb(),OFe=Af(),GK=class t extends qK.Signed{constructor(e){super(e),this.type=qK.MetadataKind.Snapshot,this.meta=e.meta||{"targets.json":new LFe.MetaFile({version:1})}}equals(e){return e instanceof t?super.equals(e)&&p4t.default.isDeepStrictEqual(this.meta,e.meta):!1}toJSON(){return{_type:this.type,meta:h4t(this.meta),spec_version:this.specVersion,version:this.version,expires:this.expires,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=qK.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,meta:g4t(a),unrecognizedFields:n})}};a1.Snapshot=GK;function h4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function g4t(t){let e;if(OFe.guard.isDefined(t))if(OFe.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:LFe.MetaFile.fromJSON(a)}),{});else throw new TypeError("meta field is malformed");return e}});var MFe=L(l1=>{"use strict";var d4t=l1&&l1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(l1,"__esModule",{value:!0});l1.Delegations=void 0;var ZO=d4t(Ie("util")),m4t=kA(),y4t=OO(),YK=LK(),XO=Af(),VK=class t{constructor(e){if(this.keys=e.keys,this.unrecognizedFields=e.unrecognizedFields||{},e.roles&&Object.keys(e.roles).some(r=>YK.TOP_LEVEL_ROLE_NAMES.includes(r)))throw new m4t.ValueError("Delegated role name conflicts with top-level role name");this.succinctRoles=e.succinctRoles,this.roles=e.roles}equals(e){return e instanceof t?ZO.default.isDeepStrictEqual(this.keys,e.keys)&&ZO.default.isDeepStrictEqual(this.roles,e.roles)&&ZO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields)&&ZO.default.isDeepStrictEqual(this.succinctRoles,e.succinctRoles):!1}*rolesForTarget(e){if(this.roles)for(let r of Object.values(this.roles))r.isDelegatedPath(e)&&(yield{role:r.name,terminating:r.terminating});else this.succinctRoles&&(yield{role:this.succinctRoles.getRoleForTarget(e),terminating:!0})}toJSON(){let e={keys:E4t(this.keys),...this.unrecognizedFields};return this.roles?e.roles=I4t(this.roles):this.succinctRoles&&(e.succinct_roles=this.succinctRoles.toJSON()),e}static fromJSON(e){let{keys:r,roles:s,succinct_roles:a,...n}=e,c;return XO.guard.isObject(a)&&(c=YK.SuccinctRoles.fromJSON(a)),new t({keys:C4t(r),roles:w4t(s),unrecognizedFields:n,succinctRoles:c})}};l1.Delegations=VK;function E4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function I4t(t){return Object.values(t).map(e=>e.toJSON())}function C4t(t){if(!XO.guard.isObjectRecord(t))throw new TypeError("keys is malformed");return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:y4t.Key.fromJSON(r,s)}),{})}function w4t(t){let e;if(XO.guard.isDefined(t)){if(!XO.guard.isObjectArray(t))throw new TypeError("roles is malformed");e=t.reduce((r,s)=>{let a=YK.DelegatedRole.fromJSON(s);return{...r,[a.name]:a}},{})}return e}});var zK=L(c1=>{"use strict";var B4t=c1&&c1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c1,"__esModule",{value:!0});c1.Targets=void 0;var _Fe=B4t(Ie("util")),KK=oy(),v4t=MFe(),S4t=Hb(),$O=Af(),JK=class t extends KK.Signed{constructor(e){super(e),this.type=KK.MetadataKind.Targets,this.targets=e.targets||{},this.delegations=e.delegations}addTarget(e){this.targets[e.path]=e}equals(e){return e instanceof t?super.equals(e)&&_Fe.default.isDeepStrictEqual(this.targets,e.targets)&&_Fe.default.isDeepStrictEqual(this.delegations,e.delegations):!1}toJSON(){let e={_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,targets:D4t(this.targets),...this.unrecognizedFields};return this.delegations&&(e.delegations=this.delegations.toJSON()),e}static fromJSON(e){let{unrecognizedFields:r,...s}=KK.Signed.commonFieldsFromJSON(e),{targets:a,delegations:n,...c}=r;return new t({...s,targets:b4t(a),delegations:P4t(n),unrecognizedFields:c})}};c1.Targets=JK;function D4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function b4t(t){let e;if($O.guard.isDefined(t))if($O.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:S4t.TargetFile.fromJSON(s,a)}),{});else throw new TypeError("targets must be an object");return e}function P4t(t){let e;if($O.guard.isDefined(t))if($O.guard.isObject(t))e=v4t.Delegations.fromJSON(t);else throw new TypeError("delegations must be an object");return e}});var eJ=L(eL=>{"use strict";Object.defineProperty(eL,"__esModule",{value:!0});eL.Timestamp=void 0;var ZK=oy(),UFe=Hb(),XK=Af(),$K=class t extends ZK.Signed{constructor(e){super(e),this.type=ZK.MetadataKind.Timestamp,this.snapshotMeta=e.snapshotMeta||new UFe.MetaFile({version:1})}equals(e){return e instanceof t?super.equals(e)&&this.snapshotMeta.equals(e.snapshotMeta):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,meta:{"snapshot.json":this.snapshotMeta.toJSON()},...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=ZK.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,snapshotMeta:x4t(a),unrecognizedFields:n})}};eL.Timestamp=$K;function x4t(t){let e;if(XK.guard.isDefined(t)){let r=t["snapshot.json"];if(!XK.guard.isDefined(r)||!XK.guard.isObject(r))throw new TypeError("missing snapshot.json in meta");e=UFe.MetaFile.fromJSON(r)}return e}});var jFe=L(f1=>{"use strict";var k4t=f1&&f1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(f1,"__esModule",{value:!0});f1.Metadata=void 0;var Q4t=EK(),HFe=k4t(Ie("util")),u1=oy(),Kb=kA(),T4t=UK(),R4t=jK(),F4t=WK(),N4t=zK(),O4t=eJ(),tJ=Af(),rJ=class t{constructor(e,r,s){this.signed=e,this.signatures=r||{},this.unrecognizedFields=s||{}}sign(e,r=!0){let s=Buffer.from((0,Q4t.canonicalize)(this.signed.toJSON())),a=e(s);r||(this.signatures={}),this.signatures[a.keyID]=a}verifyDelegate(e,r){let s,a={};switch(this.signed.type){case u1.MetadataKind.Root:a=this.signed.keys,s=this.signed.roles[e];break;case u1.MetadataKind.Targets:if(!this.signed.delegations)throw new Kb.ValueError(`No delegations found for ${e}`);a=this.signed.delegations.keys,this.signed.delegations.roles?s=this.signed.delegations.roles[e]:this.signed.delegations.succinctRoles&&this.signed.delegations.succinctRoles.isDelegatedRole(e)&&(s=this.signed.delegations.succinctRoles);break;default:throw new TypeError("invalid metadata type")}if(!s)throw new Kb.ValueError(`no delegation found for ${e}`);let n=new Set;if(s.keyIDs.forEach(c=>{let f=a[c];if(f)try{f.verifySignature(r),n.add(f.keyID)}catch{}}),n.sizer.toJSON()),signed:this.signed.toJSON(),...this.unrecognizedFields}}static fromJSON(e,r){let{signed:s,signatures:a,...n}=r;if(!tJ.guard.isDefined(s)||!tJ.guard.isObject(s))throw new TypeError("signed is not defined");if(e!==s._type)throw new Kb.ValueError(`expected '${e}', got ${s._type}`);if(!tJ.guard.isObjectArray(a))throw new TypeError("signatures is not an array");let c;switch(e){case u1.MetadataKind.Root:c=T4t.Root.fromJSON(s);break;case u1.MetadataKind.Timestamp:c=O4t.Timestamp.fromJSON(s);break;case u1.MetadataKind.Snapshot:c=F4t.Snapshot.fromJSON(s);break;case u1.MetadataKind.Targets:c=N4t.Targets.fromJSON(s);break;default:throw new TypeError("invalid metadata type")}let f={};return a.forEach(p=>{let h=R4t.Signature.fromJSON(p);if(f[h.keyID])throw new Kb.ValueError(`multiple signatures found for keyid: ${h.keyID}`);f[h.keyID]=h}),new t(c,f,n)}};f1.Metadata=rJ});var tL=L(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.Timestamp=Ni.Targets=Ni.Snapshot=Ni.Signature=Ni.Root=Ni.Metadata=Ni.Key=Ni.TargetFile=Ni.MetaFile=Ni.ValueError=Ni.MetadataKind=void 0;var L4t=oy();Object.defineProperty(Ni,"MetadataKind",{enumerable:!0,get:function(){return L4t.MetadataKind}});var M4t=kA();Object.defineProperty(Ni,"ValueError",{enumerable:!0,get:function(){return M4t.ValueError}});var qFe=Hb();Object.defineProperty(Ni,"MetaFile",{enumerable:!0,get:function(){return qFe.MetaFile}});Object.defineProperty(Ni,"TargetFile",{enumerable:!0,get:function(){return qFe.TargetFile}});var _4t=OO();Object.defineProperty(Ni,"Key",{enumerable:!0,get:function(){return _4t.Key}});var U4t=jFe();Object.defineProperty(Ni,"Metadata",{enumerable:!0,get:function(){return U4t.Metadata}});var H4t=UK();Object.defineProperty(Ni,"Root",{enumerable:!0,get:function(){return H4t.Root}});var j4t=jK();Object.defineProperty(Ni,"Signature",{enumerable:!0,get:function(){return j4t.Signature}});var q4t=WK();Object.defineProperty(Ni,"Snapshot",{enumerable:!0,get:function(){return q4t.Snapshot}});var G4t=zK();Object.defineProperty(Ni,"Targets",{enumerable:!0,get:function(){return G4t.Targets}});var W4t=eJ();Object.defineProperty(Ni,"Timestamp",{enumerable:!0,get:function(){return W4t.Timestamp}})});var WFe=L((WCr,GFe)=>{var A1=1e3,p1=A1*60,h1=p1*60,cy=h1*24,Y4t=cy*7,V4t=cy*365.25;GFe.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return K4t(t);if(r==="number"&&isFinite(t))return e.long?z4t(t):J4t(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function K4t(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return r*V4t;case"weeks":case"week":case"w":return r*Y4t;case"days":case"day":case"d":return r*cy;case"hours":case"hour":case"hrs":case"hr":case"h":return r*h1;case"minutes":case"minute":case"mins":case"min":case"m":return r*p1;case"seconds":case"second":case"secs":case"sec":case"s":return r*A1;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function J4t(t){var e=Math.abs(t);return e>=cy?Math.round(t/cy)+"d":e>=h1?Math.round(t/h1)+"h":e>=p1?Math.round(t/p1)+"m":e>=A1?Math.round(t/A1)+"s":t+"ms"}function z4t(t){var e=Math.abs(t);return e>=cy?rL(t,e,cy,"day"):e>=h1?rL(t,e,h1,"hour"):e>=p1?rL(t,e,p1,"minute"):e>=A1?rL(t,e,A1,"second"):t+" ms"}function rL(t,e,r,s){var a=e>=r*1.5;return Math.round(t/r)+" "+s+(a?"s":"")}});var nJ=L((YCr,YFe)=>{function Z4t(t){r.debug=r,r.default=r,r.coerce=p,r.disable=c,r.enable=a,r.enabled=f,r.humanize=WFe(),r.destroy=h,Object.keys(t).forEach(E=>{r[E]=t[E]}),r.names=[],r.skips=[],r.formatters={};function e(E){let C=0;for(let S=0;S{if(ce==="%%")return"%";ie++;let pe=r.formatters[me];if(typeof pe=="function"){let Be=N[ie];ce=pe.call(U,Be),N.splice(ie,1),ie--}return ce}),r.formatArgs.call(U,N),(U.log||r.log).apply(U,N)}return R.namespace=E,R.useColors=r.useColors(),R.color=r.selectColor(E),R.extend=s,R.destroy=r.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(P!==r.namespaces&&(P=r.namespaces,I=r.enabled(E)),I),set:N=>{S=N}}),typeof r.init=="function"&&r.init(R),R}function s(E,C){let S=r(this.namespace+(typeof C>"u"?":":C)+E);return S.log=this.log,S}function a(E){r.save(E),r.namespaces=E,r.names=[],r.skips=[];let C=(typeof E=="string"?E:"").trim().replace(" ",",").split(",").filter(Boolean);for(let S of C)S[0]==="-"?r.skips.push(S.slice(1)):r.names.push(S)}function n(E,C){let S=0,P=0,I=-1,R=0;for(;S"-"+C)].join(",");return r.enable(""),E}function f(E){for(let C of r.skips)if(n(E,C))return!1;for(let C of r.names)if(n(E,C))return!0;return!1}function p(E){return E instanceof Error?E.stack||E.message:E}function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}YFe.exports=Z4t});var VFe=L((oc,nL)=>{oc.formatArgs=$4t;oc.save=e3t;oc.load=t3t;oc.useColors=X4t;oc.storage=r3t();oc.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();oc.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function X4t(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function $4t(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+nL.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(r++,a==="%c"&&(s=r))}),t.splice(s,0,e)}oc.log=console.debug||console.log||(()=>{});function e3t(t){try{t?oc.storage.setItem("debug",t):oc.storage.removeItem("debug")}catch{}}function t3t(){let t;try{t=oc.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function r3t(){try{return localStorage}catch{}}nL.exports=nJ()(oc);var{formatters:n3t}=nL.exports;n3t.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var JFe=L((eo,sL)=>{var i3t=Ie("tty"),iL=Ie("util");eo.init=f3t;eo.log=l3t;eo.formatArgs=o3t;eo.save=c3t;eo.load=u3t;eo.useColors=s3t;eo.destroy=iL.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");eo.colors=[6,2,3,4,5,1];try{let t=Ie("supports-color");t&&(t.stderr||t).level>=2&&(eo.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}eo.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(a,n)=>n.toUpperCase()),s=process.env[e];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s==="null"?s=null:s=Number(s),t[r]=s,t},{});function s3t(){return"colors"in eo.inspectOpts?!!eo.inspectOpts.colors:i3t.isatty(process.stderr.fd)}function o3t(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,a="\x1B[3"+(s<8?s:"8;5;"+s),n=` ${a};1m${e} \x1B[0m`;t[0]=n+t[0].split(` -`).join(` -`+n),t.push(a+"m+"+sL.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=a3t()+e+" "+t[0]}function a3t(){return eo.inspectOpts.hideDate?"":new Date().toISOString()+" "}function l3t(...t){return process.stderr.write(iL.formatWithOptions(eo.inspectOpts,...t)+` -`)}function c3t(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function u3t(){return process.env.DEBUG}function f3t(t){t.inspectOpts={};let e=Object.keys(eo.inspectOpts);for(let r=0;re.trim()).join(" ")};KFe.O=function(t){return this.inspectOpts.colors=this.useColors,iL.inspect(t,this.inspectOpts)}});var sJ=L((VCr,iJ)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?iJ.exports=VFe():iJ.exports=JFe()});var aL=L(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.DownloadHTTPError=zi.DownloadLengthMismatchError=zi.DownloadError=zi.ExpiredMetadataError=zi.EqualVersionError=zi.BadVersionError=zi.RepositoryError=zi.PersistError=zi.RuntimeError=zi.ValueError=void 0;var oJ=class extends Error{};zi.ValueError=oJ;var aJ=class extends Error{};zi.RuntimeError=aJ;var lJ=class extends Error{};zi.PersistError=lJ;var Jb=class extends Error{};zi.RepositoryError=Jb;var oL=class extends Jb{};zi.BadVersionError=oL;var cJ=class extends oL{};zi.EqualVersionError=cJ;var uJ=class extends Jb{};zi.ExpiredMetadataError=uJ;var zb=class extends Error{};zi.DownloadError=zb;var fJ=class extends zb{};zi.DownloadLengthMismatchError=fJ;var AJ=class extends zb{constructor(e,r){super(e),this.statusCode=r}};zi.DownloadHTTPError=AJ});var ZFe=L(g1=>{"use strict";var hJ=g1&&g1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(g1,"__esModule",{value:!0});g1.withTempFile=void 0;var pJ=hJ(Ie("fs/promises")),A3t=hJ(Ie("os")),zFe=hJ(Ie("path")),p3t=async t=>h3t(async e=>t(zFe.default.join(e,"tempfile")));g1.withTempFile=p3t;var h3t=async t=>{let e=await pJ.default.realpath(A3t.default.tmpdir()),r=await pJ.default.mkdtemp(e+zFe.default.sep);try{return await t(r)}finally{await pJ.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}}});var dJ=L(xg=>{"use strict";var cL=xg&&xg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xg,"__esModule",{value:!0});xg.DefaultFetcher=xg.BaseFetcher=void 0;var g3t=cL(sJ()),XFe=cL(Ie("fs")),d3t=cL(wO()),m3t=cL(Ie("util")),$Fe=aL(),y3t=ZFe(),E3t=(0,g3t.default)("tuf:fetch"),lL=class{async downloadFile(e,r,s){return(0,y3t.withTempFile)(async a=>{let n=await this.fetch(e),c=0,f=XFe.default.createWriteStream(a);try{for await(let p of n){let h=Buffer.from(p);if(c+=h.length,c>r)throw new $Fe.DownloadLengthMismatchError("Max length reached");await I3t(f,h)}}finally{await m3t.default.promisify(f.close).bind(f)()}return s(a)})}async downloadBytes(e,r){return this.downloadFile(e,r,async s=>{let a=XFe.default.createReadStream(s),n=[];for await(let c of a)n.push(c);return Buffer.concat(n)})}};xg.BaseFetcher=lL;var gJ=class extends lL{constructor(e={}){super(),this.timeout=e.timeout,this.retry=e.retry}async fetch(e){E3t("GET %s",e);let r=await(0,d3t.default)(e,{timeout:this.timeout,retry:this.retry});if(!r.ok||!r?.body)throw new $Fe.DownloadHTTPError("Failed to download",r.status);return r.body}};xg.DefaultFetcher=gJ;var I3t=async(t,e)=>new Promise((r,s)=>{t.write(e,a=>{a&&s(a),r(!0)})})});var eNe=L(uL=>{"use strict";Object.defineProperty(uL,"__esModule",{value:!0});uL.defaultConfig=void 0;uL.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}});var tNe=L(fL=>{"use strict";Object.defineProperty(fL,"__esModule",{value:!0});fL.TrustedMetadataStore=void 0;var Cs=tL(),Hi=aL(),mJ=class{constructor(e){this.trustedSet={},this.referenceTime=new Date,this.loadTrustedRoot(e)}get root(){if(!this.trustedSet.root)throw new ReferenceError("No trusted root metadata");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(e){return this.trustedSet[e]}updateRoot(e){let r=JSON.parse(e.toString("utf8")),s=Cs.Metadata.fromJSON(Cs.MetadataKind.Root,r);if(s.signed.type!=Cs.MetadataKind.Root)throw new Hi.RepositoryError(`Expected 'root', got ${s.signed.type}`);if(this.root.verifyDelegate(Cs.MetadataKind.Root,s),s.signed.version!=this.root.signed.version+1)throw new Hi.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${s.signed.version}`);return s.verifyDelegate(Cs.MetadataKind.Root,s),this.trustedSet.root=s,s}updateTimestamp(e){if(this.snapshot)throw new Hi.RuntimeError("Cannot update timestamp after snapshot");if(this.root.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError("Final root.json is expired");let r=JSON.parse(e.toString("utf8")),s=Cs.Metadata.fromJSON(Cs.MetadataKind.Timestamp,r);if(s.signed.type!=Cs.MetadataKind.Timestamp)throw new Hi.RepositoryError(`Expected 'timestamp', got ${s.signed.type}`);if(this.root.verifyDelegate(Cs.MetadataKind.Timestamp,s),this.timestamp){if(s.signed.version{let p=n.signed.meta[c];if(!p)throw new Hi.RepositoryError(`Missing file ${c} in new snapshot`);if(p.version{"use strict";Object.defineProperty(yJ,"__esModule",{value:!0});yJ.join=w3t;var C3t=Ie("url");function w3t(t,e){return new C3t.URL(B3t(t)+v3t(e)).toString()}function B3t(t){return t.endsWith("/")?t:t+"/"}function v3t(t){return t.startsWith("/")?t.slice(1):t}});var nNe=L(su=>{"use strict";var S3t=su&&su.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),D3t=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CJ=su&&su.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&S3t(e,t,r);return D3t(e,t),e},b3t=su&&su.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(su,"__esModule",{value:!0});su.Updater=void 0;var QA=tL(),P3t=b3t(sJ()),d1=CJ(Ie("fs")),AL=CJ(Ie("path")),x3t=eNe(),uy=aL(),k3t=dJ(),Q3t=tNe(),Zb=CJ(rNe()),EJ=(0,P3t.default)("tuf:cache"),IJ=class{constructor(e){let{metadataDir:r,metadataBaseUrl:s,targetDir:a,targetBaseUrl:n,fetcher:c,config:f}=e;this.dir=r,this.metadataBaseUrl=s,this.targetDir=a,this.targetBaseUrl=n,this.forceCache=e.forceCache??!1;let p=this.loadLocalMetadata(QA.MetadataKind.Root);this.trustedSet=new Q3t.TrustedMetadataStore(p),this.config={...x3t.defaultConfig,...f},this.fetcher=c||new k3t.DefaultFetcher({timeout:this.config.fetchTimeout,retry:this.config.fetchRetries??this.config.fetchRetry})}async refresh(){if(this.forceCache)try{await this.loadTimestamp({checkRemote:!1})}catch{await this.loadRoot(),await this.loadTimestamp()}else await this.loadRoot(),await this.loadTimestamp();await this.loadSnapshot(),await this.loadTargets(QA.MetadataKind.Targets,QA.MetadataKind.Root)}async getTargetInfo(e){return this.trustedSet.targets||await this.refresh(),this.preorderDepthFirstWalk(e)}async downloadTarget(e,r,s){let a=r||this.generateTargetPath(e);if(!s){if(!this.targetBaseUrl)throw new uy.ValueError("Target base URL not set");s=this.targetBaseUrl}let n=e.path;if(this.trustedSet.root.signed.consistentSnapshot&&this.config.prefixTargetsWithHash){let p=Object.values(e.hashes),{dir:h,base:E}=AL.parse(n),C=`${p[0]}.${E}`;n=h?`${h}/${C}`:C}let f=Zb.join(s,n);return await this.fetcher.downloadFile(f,e.length,async p=>{await e.verify(d1.createReadStream(p)),EJ("WRITE %s",a),d1.copyFileSync(p,a)}),a}async findCachedTarget(e,r){r||(r=this.generateTargetPath(e));try{if(d1.existsSync(r))return await e.verify(d1.createReadStream(r)),r}catch{return}}loadLocalMetadata(e){let r=AL.join(this.dir,`${e}.json`);return EJ("READ %s",r),d1.readFileSync(r)}async loadRoot(){let r=this.trustedSet.root.signed.version+1,s=r+this.config.maxRootRotations;for(let a=r;a0;){let{roleName:a,parentRoleName:n}=r.pop();if(s.has(a))continue;let c=(await this.loadTargets(a,n))?.signed;if(!c)continue;let f=c.targets?.[e];if(f)return f;if(s.add(a),c.delegations){let p=[],h=c.delegations.rolesForTarget(e);for(let{role:E,terminating:C}of h)if(p.push({roleName:E,parentRoleName:a}),C){r.splice(0);break}p.reverse(),r.push(...p)}}}generateTargetPath(e){if(!this.targetDir)throw new uy.ValueError("Target directory not set");let r=encodeURIComponent(e.path);return AL.join(this.targetDir,r)}persistMetadata(e,r){let s=encodeURIComponent(e);try{let a=AL.join(this.dir,`${s}.json`);EJ("WRITE %s",a),d1.writeFileSync(a,r.toString("utf8"))}catch(a){throw new uy.PersistError(`Failed to persist metadata ${s} error: ${a}`)}}};su.Updater=IJ});var iNe=L(kg=>{"use strict";Object.defineProperty(kg,"__esModule",{value:!0});kg.Updater=kg.BaseFetcher=kg.TargetFile=void 0;var T3t=tL();Object.defineProperty(kg,"TargetFile",{enumerable:!0,get:function(){return T3t.TargetFile}});var R3t=dJ();Object.defineProperty(kg,"BaseFetcher",{enumerable:!0,get:function(){return R3t.BaseFetcher}});var F3t=nNe();Object.defineProperty(kg,"Updater",{enumerable:!0,get:function(){return F3t.Updater}})});var BJ=L(pL=>{"use strict";Object.defineProperty(pL,"__esModule",{value:!0});pL.TUFError=void 0;var wJ=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}};pL.TUFError=wJ});var sNe=L(Xb=>{"use strict";var N3t=Xb&&Xb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xb,"__esModule",{value:!0});Xb.readTarget=L3t;var O3t=N3t(Ie("fs")),hL=BJ();async function L3t(t,e){let r=await M3t(t,e);return new Promise((s,a)=>{O3t.default.readFile(r,"utf-8",(n,c)=>{n?a(new hL.TUFError({code:"TUF_READ_TARGET_ERROR",message:`error reading target ${r}`,cause:n})):s(c)})})}async function M3t(t,e){let r;try{r=await t.getTargetInfo(e)}catch(a){throw new hL.TUFError({code:"TUF_REFRESH_METADATA_ERROR",message:"error refreshing TUF metadata",cause:a})}if(!r)throw new hL.TUFError({code:"TUF_FIND_TARGET_ERROR",message:`target ${e} not found`});let s=await t.findCachedTarget(r);if(!s)try{s=await t.downloadTarget(r)}catch(a){throw new hL.TUFError({code:"TUF_DOWNLOAD_TARGET_ERROR",message:`error downloading target ${s}`,cause:a})}return s}});var oNe=L((iwr,_3t)=>{_3t.exports={"https://tuf-repo-cdn.sigstore.dev":{"root.json":"ewogInNpZ25hdHVyZXMiOiBbCiAgewogICAia2V5aWQiOiAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICJzaWciOiAiMzA0NjAyMjEwMDhhYjFmNmYxN2Q0ZjllNmQ3ZGNmMWM4ODkxMmI2YjUzY2MxMDM4ODY0NGFlMWYwOWJjMzdhMDgyY2QwNjAwM2UwMjIxMDBlMTQ1ZWY0YzdiNzgyZDRlODEwN2I1MzQzN2U2NjlkMDQ3Njg5MmNlOTk5OTAzYWUzM2QxNDQ0ODM2Njk5NmU3IgogIH0sCiAgewogICAia2V5aWQiOiAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICJzaWciOiAiMzA0NTAyMjEwMGM3NjhiMmY4NmRhOTk1NjkwMTljMTYwYTA4MWRhNTRhZTM2YzM0YzBhMzEyMGQzY2I2OWI1M2I3ZDExMzc1OGUwMjIwNGY2NzE1MThmNjE3YjIwZDQ2NTM3ZmFlNmMzYjYzYmFlODkxM2Y0ZjE5NjIxNTYxMDVjYzRmMDE5YWMzNWM2YSIKICB9LAogIHsKICAgImtleWlkIjogIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAic2lnIjogIjMwNDUwMjIxMDBiNDQzNGU2OTk1ZDM2OGQyM2U3NDc1OWFjZDBjYjkwMTNjODNhNWQzNTExZjBmOTk3ZWM1NGM0NTZhZTQzNTBhMDIyMDE1YjBlMjY1ZDE4MmQyYjYxZGM3NGUxNTVkOThiM2MzZmJlNTY0YmEwNTI4NmFhMTRjOGRmMDJjOWI3NTY1MTYiCiAgfSwKICB7CiAgICJrZXlpZCI6ICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgInNpZyI6ICIzMDQ1MDIyMTAwODJjNTg0MTFkOTg5ZWI5Zjg2MTQxMDg1N2Q0MjM4MTU5MGVjOTQyNGRiZGFhNTFlNzhlZDEzNTE1NDMxOTA0ZTAyMjAxMTgxODVkYTZhNmMyOTQ3MTMxYzE3Nzk3ZTJiYjc2MjBjZTI2ZTVmMzAxZDFjZWFjNWYyYTdlNThmOWRjZjJlIgogIH0sCiAgewogICAia2V5aWQiOiAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIsCiAgICJzaWciOiAiMzA0NjAyMjEwMGM3ODUxMzg1NGNhZTljMzJlYWE2Yjg4ZTE4OTEyZjQ4MDA2YzI3NTdhMjU4ZjkxNzMxMmNhYmE3NTk0OGViOWUwMjIxMDBkOWUxYjRjZTBhZGZlOWZkMmUyMTQ4ZDdmYTI3YTJmNDBiYTExMjJiZDY5ZGE3NjEyZDhkMTc3NmIwMTNjOTFkIgogIH0sCiAgewogICAia2V5aWQiOiAiZmRmYTgzYTA3YjVhODM1ODliODdkZWQ0MWY3N2YzOWQyMzJhZDkxZjdjY2U1Mjg2OGRhY2QwNmJhMDg5ODQ5ZiIsCiAgICJzaWciOiAiMzA0NTAyMjA1NjQ4M2EyZDVkOWVhOWNlYzZlMTFlYWRmYjMzYzQ4NGI2MTQyOThmYWNhMTVhY2YxYzQzMWIxMWVkN2Y3MzRjMDIyMTAwZDBjMWQ3MjZhZjkyYTg3ZTRlNjY0NTljYTVhZGYzOGEwNWI0NGUxZjk0MzE4NDIzZjk1NGJhZThiY2E1YmIyZSIKICB9LAogIHsKICAgImtleWlkIjogImUyZjU5YWNiOTQ4ODUxOTQwN2UxOGNiZmM5MzI5NTEwYmUwM2MwNGFjYTk5MjlkMmYwMzAxMzQzZmVjODU1MjMiLAogICAic2lnIjogIjMwNDYwMjIxMDBkMDA0ZGU4ODAyNGMzMmRjNTY1M2E5ZjQ4NDNjZmM1MjE1NDI3MDQ4YWQ5NjAwZDJjZjljOTY5ZTZlZGZmM2QyMDIyMTAwZDllYmI3OThmNWZjNjZhZjEwODk5ZGVjZTAxNGE4NjI4Y2NmM2M1NDAyY2Q0YTQyNzAyMDc0NzJmOGY2ZTcxMiIKICB9LAogIHsKICAgImtleWlkIjogIjNjMzQ0YWEwNjhmZDRjYzRlODdkYzUwYjYxMmMwMjQzMWZiYzc3MWU5NTAwMzk5MzY4M2EyYjBiZjI2MGNmMGUiLAogICAic2lnIjogIjMwNDYwMjIxMDBiN2IwOTk5NmM0NWNhMmQ0YjA1NjAzZTU2YmFlZmEyOTcxOGEwYjcxMTQ3Y2Y4YzZlNjYzNDliYWE2MTQ3N2RmMDIyMTAwYzRkYTgwYzcxN2I0ZmE3YmJhMGZkNWM3MmRhOGEwNDk5MzU4YjAxMzU4YjIzMDlmNDFkMTQ1NmVhMWU3ZTFkOSIKICB9LAogIHsKICAgImtleWlkIjogImVjODE2Njk3MzRlMDE3OTk2YzViODVmM2QwMmMzZGUxZGQ0NjM3YTE1MjAxOWZlMWFmMTI1ZDJmOTM2OGI5NWUiLAogICAic2lnIjogIjMwNDYwMjIxMDBiZTk3ODJjMzA3NDRlNDExYTgyZmE4NWI1MTM4ZDYwMWNlMTQ4YmMxOTI1OGFlYzY0ZTdlYzI0NDc4ZjM4ODEyMDIyMTAwY2FlZjYzZGNhZjFhNGI5YTUwMGQzYmQwZTNmMTY0ZWMxOGYxYjYzZDdhOTQ2MGQ5YWNhYjEwNjZkYjBmMDE2ZCIKICB9LAogIHsKICAgImtleWlkIjogIjFlMWQ2NWNlOThiMTBhZGRhZDQ3NjRmZWJmN2RkYTJkMDQzNmIzZDNhMzg5MzU3OWMwZGRkYWVhMjBlNTQ4NDkiLAogICAic2lnIjogIjMwNDUwMjIwNzQ2ZWMzZjg1MzRjZTU1NTMxZDBkMDFmZjY0OTY0ZWY0NDBkMWU3ZDJjNGMxNDI0MDliOGU5NzY5ZjFhZGE2ZjAyMjEwMGUzYjkyOWZjZDkzZWExOGZlYWEwODI1ODg3YTcyMTA0ODk4NzlhNjY3ODBjMDdhODNmNGJkNDZlMmYwOWFiM2IiCiAgfQogXSwKICJzaWduZWQiOiB7CiAgIl90eXBlIjogInJvb3QiLAogICJjb25zaXN0ZW50X3NuYXBzaG90IjogdHJ1ZSwKICAiZXhwaXJlcyI6ICIyMDI1LTAyLTE5VDA4OjA0OjMyWiIsCiAgImtleXMiOiB7CiAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFekJ6Vk9tSENQb2pNVkxTSTM2NFdpaVY4TlByRFxuNklnUnhWbGlza3ovdit5M0pFUjVtY1ZHY09ObGlEY1dNQzVKMmxmSG1qUE5QaGI0SDd4bThMemZTQT09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBzYW50aWFnb3RvcnJlcyIKICAgfSwKICAgIjYxNjQzODM4MTI1YjQ0MGI0MGRiNjk0MmY1Y2I1YTMxYzBkYzA0MzY4MzE2ZWIyYWFhNThiOTU5MDRhNTgyMjIiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVpbmlrU3NBUW1Za05lSDVlWXEvQ25JekxhYWNPXG54bFNhYXdRRE93cUt5L3RDcXhxNXh4UFNKYzIxSzRXSWhzOUd5T2tLZnp1ZVkzR0lMemNNSlo0Y1d3PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGJvYmNhbGxhd2F5IgogICB9LAogICAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXk4WEtzbWhCWURJOEpjMEd3ekJ4ZUtheDBjbTVcblNUS0VVNjVIUEZ1blVuNDFzVDhwaTBGak00SWtIei9ZVW13bUxVTzBXdDdseGhqNkJrTElLNHFZQXc9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAZGxvcmVuYyIKICAgfSwKICAgIjcyNDdmMGRiYWQ4NWIxNDdlMTg2M2JhZGU3NjEyNDNjYzc4NWRjYjdhYTQxMGU3MTA1ZGQzZDJiNjFhMzZkMmMiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVXUmlHcjUraiszSjVTc0grWnRyNW5FMkgyd083XG5CVituTzNzOTNnTGNhMThxVE96SFkxb1d5QUdEeWtNU3NHVFVCU3Q5RCtBbjBLZktzRDJtZlNNNDJRPT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2ktb25saW5lLXVyaSI6ICJnY3BrbXM6Ly9wcm9qZWN0cy9zaWdzdG9yZS1yb290LXNpZ25pbmcvbG9jYXRpb25zL2dsb2JhbC9rZXlSaW5ncy9yb290L2NyeXB0b0tleXMvdGltZXN0YW1wIgogICB9LAogICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTBnaHJoOTJMdzFZcjNpZEdWNVdxQ3RNREI4Q3hcbitEOGhkQzR3MlpMTklwbFZSb1ZHTHNrWWEzZ2hlTXlPamlKOGtQaTE1YVEyLy83UCtvajdVdkpQR3c9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAam9zaHVhZ2wiCiAgIH0sCiAgICJlNzFhNTRkNTQzODM1YmE4NmFkYWQ5NDYwMzc5Yzc2NDFmYjg3MjZkMTY0ZWE3NjY4MDFhMWM1MjJhYmE3ZWEyIjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFRVhzejNTWlhGYjhqTVY0Mmo2cEpseWpialI4S1xuTjNCd29jZXhxNkxNSWI1cXNXS09RdkxOMTZOVWVmTGM0SHN3T291bVJzVlZhYWpTcFFTNmZvYmtSdz09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBtbm02NzgiCiAgIH0KICB9LAogICJyb2xlcyI6IHsKICAgInJvb3QiOiB7CiAgICAia2V5aWRzIjogWwogICAgICI2ZjI2MDA4OWQ1OTIzZGFmMjAxNjZjYTY1N2M1NDNhZjYxODM0NmFiOTcxODg0YTk5OTYyYjAxOTg4YmJlMGMzIiwKICAgICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICAgIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIKICAgIF0sCiAgICAidGhyZXNob2xkIjogMwogICB9LAogICAic25hcHNob3QiOiB7CiAgICAia2V5aWRzIjogWwogICAgICI3MjQ3ZjBkYmFkODViMTQ3ZTE4NjNiYWRlNzYxMjQzY2M3ODVkY2I3YWE0MTBlNzEwNWRkM2QyYjYxYTM2ZDJjIgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAxLAogICAgIngtdHVmLW9uLWNpLWV4cGlyeS1wZXJpb2QiOiAzNjUwLAogICAgIngtdHVmLW9uLWNpLXNpZ25pbmctcGVyaW9kIjogMzY1CiAgIH0sCiAgICJ0YXJnZXRzIjogewogICAgImtleWlkcyI6IFsKICAgICAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICAgImU3MWE1NGQ1NDM4MzViYTg2YWRhZDk0NjAzNzljNzY0MWZiODcyNmQxNjRlYTc2NjgwMWExYzUyMmFiYTdlYTIiLAogICAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IiwKICAgICAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDMKICAgfSwKICAgInRpbWVzdGFtcCI6IHsKICAgICJrZXlpZHMiOiBbCiAgICAgIjcyNDdmMGRiYWQ4NWIxNDdlMTg2M2JhZGU3NjEyNDNjYzc4NWRjYjdhYTQxMGU3MTA1ZGQzZDJiNjFhMzZkMmMiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDEsCiAgICAieC10dWYtb24tY2ktZXhwaXJ5LXBlcmlvZCI6IDcsCiAgICAieC10dWYtb24tY2ktc2lnbmluZy1wZXJpb2QiOiA0CiAgIH0KICB9LAogICJzcGVjX3ZlcnNpb24iOiAiMS4wIiwKICAidmVyc2lvbiI6IDEwLAogICJ4LXR1Zi1vbi1jaS1leHBpcnktcGVyaW9kIjogMTgyLAogICJ4LXR1Zi1vbi1jaS1zaWduaW5nLXBlcmlvZCI6IDMxCiB9Cn0=",targets:{"trusted_root.json":"ewogICJtZWRpYVR5cGUiOiAiYXBwbGljYXRpb24vdm5kLmRldi5zaWdzdG9yZS50cnVzdGVkcm9vdCtqc29uO3ZlcnNpb249MC4xIiwKICAidGxvZ3MiOiBbCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vcmVrb3Iuc2lnc3RvcmUuZGV2IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUyRzJZKzJ0YWJkVFY1QmNHaUJJeDBhOWZBRndya0JibUxTR3RrczRMM3FYNnlZWTB6dWZCbmhDOFVyL2l5NTVHaFdQLzlBL2JZMkxoQzMwTTkrUll0dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDEtMTJUMTE6NTM6MjcuMDAwWiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAid05JOWF0UUdseitWV2ZPNkxSeWdINFFVZlkvOFc0UkZ3aVQ1aTVXUmdCMD0iCiAgICAgIH0KICAgIH0KICBdLAogICJjZXJ0aWZpY2F0ZUF1dGhvcml0aWVzIjogWwogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly9mdWxjaW8uc2lnc3RvcmUuZGV2IiwKICAgICAgImNlcnRDaGFpbiI6IHsKICAgICAgICAiY2VydGlmaWNhdGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQitEQ0NBWDZnQXdJQkFnSVROVmtEWm9DaW9mUERzeTdkZm02Z2VMYnVoekFLQmdncWhrak9QUVFEQXpBcU1SVXdFd1lEVlFRS0V3eHphV2R6ZEc5eVpTNWtaWFl4RVRBUEJnTlZCQU1UQ0hOcFozTjBiM0psTUI0WERUSXhNRE13TnpBek1qQXlPVm9YRFRNeE1ESXlNekF6TWpBeU9Wb3dLakVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1SRXdEd1lEVlFRREV3aHphV2R6ZEc5eVpUQjJNQkFHQnlxR1NNNDlBZ0VHQlN1QkJBQWlBMklBQkxTeUE3SWk1aytwTk84WkVXWTB5bGVtV0Rvd09rTmEza0wrR1pFNVo1R1dlaEw5L0E5YlJOQTNSYnJzWjVpMEpjYXN0YVJMN1NwNWZwL2pENWR4cWMvVWRUVm5sdlMxNmFuKzJZZnN3ZS9RdUxvbFJVQ3JjT0UyKzJpQTUrdHpkNk5tTUdRd0RnWURWUjBQQVFIL0JBUURBZ0VHTUJJR0ExVWRFd0VCL3dRSU1BWUJBZjhDQVFFd0hRWURWUjBPQkJZRUZNakZIUUJCbWlRcE1sRWs2dzJ1U3UxS0J0UHNNQjhHQTFVZEl3UVlNQmFBRk1qRkhRQkJtaVFwTWxFazZ3MnVTdTFLQnRQc01Bb0dDQ3FHU000OUJBTURBMmdBTUdVQ01IOGxpV0pmTXVpNnZYWEJoakRnWTRNd3NsbU4vVEp4VmUvODNXckZvbXdtTmYwNTZ5MVg0OEY5YzRtM2Ezb3pYQUl4QUtqUmF5NS9hai9qc0tLR0lrbVFhdGpJOHV1cEhyLytDeEZ2YUpXbXBZcU5rTERHUlUrOW9yemg1aEkyUnJjdWFRPT0iCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMDdUMDM6MjA6MjkuMDAwWiIsCiAgICAgICAgImVuZCI6ICIyMDIyLTEyLTMxVDIzOjU5OjU5Ljk5OVoiCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAic2lnc3RvcmUuZGV2IiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJzaWdzdG9yZSIKICAgICAgfSwKICAgICAgInVyaSI6ICJodHRwczovL2Z1bGNpby5zaWdzdG9yZS5kZXYiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlDR2pDQ0FhR2dBd0lCQWdJVUFMblZpVmZuVTBickphc21Sa0hybi9VbmZhUXdDZ1lJS29aSXpqMEVBd013S2pFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNUkV3RHdZRFZRUURFd2h6YVdkemRHOXlaVEFlRncweU1qQTBNVE15TURBMk1UVmFGdzB6TVRFd01EVXhNelUyTlRoYU1EY3hGVEFUQmdOVkJBb1RESE5wWjNOMGIzSmxMbVJsZGpFZU1Cd0dBMVVFQXhNVmMybG5jM1J2Y21VdGFXNTBaWEp0WldScFlYUmxNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRThSVlMveXNIK05PdnVEWnlQSVp0aWxnVUY5TmxhcllwQWQ5SFAxdkJCSDFVNUNWNzdMU1M3czBaaUg0bkU3SHY3cHRTNkx2dlIvU1RrNzk4TFZnTXpMbEo0SGVJZkYzdEhTYWV4TGNZcFNBU3Ixa1MwTi9SZ0JKei85aldDaVhubzNzd2VUQU9CZ05WSFE4QkFmOEVCQU1DQVFZd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3TXdFZ1lEVlIwVEFRSC9CQWd3QmdFQi93SUJBREFkQmdOVkhRNEVGZ1FVMzlQcHoxWWtFWmI1cU5qcEtGV2l4aTRZWkQ4d0h3WURWUjBqQkJnd0ZvQVVXTUFlWDVGRnBXYXBlc3lRb1pNaTBDckZ4Zm93Q2dZSUtvWkl6ajBFQXdNRFp3QXdaQUl3UENzUUs0RFlpWllEUElhRGk1SEZLbmZ4WHg2QVNTVm1FUmZzeW5ZQmlYMlg2U0pSblpVODQvOURaZG5GdnZ4bUFqQk90NlFwQmxjNEovMER4dmtUQ3FwY2x2emlMNkJDQ1BuamRsSUIzUHUzQnhzUG15Z1VZN0lpMnpiZENkbGlpb3c9IgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUI5ekNDQVh5Z0F3SUJBZ0lVQUxaTkFQRmR4SFB3amVEbG9Ed3lZQ2hBTy80d0NnWUlLb1pJemowRUF3TXdLakVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1SRXdEd1lEVlFRREV3aHphV2R6ZEc5eVpUQWVGdzB5TVRFd01EY3hNelUyTlRsYUZ3MHpNVEV3TURVeE16VTJOVGhhTUNveEZUQVRCZ05WQkFvVERITnBaM04wYjNKbExtUmxkakVSTUE4R0ExVUVBeE1JYzJsbmMzUnZjbVV3ZGpBUUJnY3Foa2pPUFFJQkJnVXJnUVFBSWdOaUFBVDdYZUZUNHJiM1BRR3dTNElhanRMazMvT2xucGdhbmdhQmNsWXBzWUJyNWkrNHluQjA3Y2ViM0xQME9JT1pkeGV4WDY5YzVpVnV5SlJRK0h6MDV5aStVRjN1QldBbEhwaVM1c2gwK0gyR0hFN1NYcmsxRUM1bTFUcjE5TDlnZzkyall6QmhNQTRHQTFVZER3RUIvd1FFQXdJQkJqQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01CMEdBMVVkRGdRV0JCUll3QjVma1VXbFpxbDZ6SkNoa3lMUUtzWEYrakFmQmdOVkhTTUVHREFXZ0JSWXdCNWZrVVdsWnFsNnpKQ2hreUxRS3NYRitqQUtCZ2dxaGtqT1BRUURBd05wQURCbUFqRUFqMW5IZVhacCsxM05XQk5hK0VEc0RQOEcxV1dnMXRDTVdQL1dIUHFwYVZvMGpoc3dlTkZaZ1NzMGVFN3dZSTRxQWpFQTJXQjlvdDk4c0lrb0YzdlpZZGQzL1Z0V0I1YjlUTk1lYTdJeC9zdEo1VGZjTExlQUJMRTRCTkpPc1E0dm5CSEoiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjItMDQtMTNUMjA6MDY6MTUuMDAwWiIKICAgICAgfQogICAgfQogIF0sCiAgImN0bG9ncyI6IFsKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi90ZXN0IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUViZndSK1JKdWRYc2NnUkJScEtYMVhGRHkzUHl1ZER4ei9TZm5SaTFmVDhla3BmQmQyTzF1b3o3anIzWjhuS3p4QTY5RVVRK2VGQ0ZJM3pldWJQV1U3dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMTRUMDA6MDA6MDAuMDAwWiIsCiAgICAgICAgICAiZW5kIjogIjIwMjItMTAtMzFUMjM6NTk6NTkuOTk5WiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAiQ0dDUzhDaFMvMmhGMGRGcko0U2NSV2NZckJZOXd6alNiZWE4SWdZMmIzST0iCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vY3RmZS5zaWdzdG9yZS5kZXYvMjAyMiIsCiAgICAgICJoYXNoQWxnb3JpdGhtIjogIlNIQTJfMjU2IiwKICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAicmF3Qnl0ZXMiOiAiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFaVBTbEZpMENtRlRmRWpDVXFGOUh1Q0VjWVhOS0FhWWFsSUptQlo4eXllelBqVHFoeHJLQnBNbmFvY1Z0TEpCSTFlTTN1WG5RelFHQUpkSjRnczlGeXc9PSIsCiAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICJzdGFydCI6ICIyMDIyLTEwLTIwVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgfQogICAgICB9LAogICAgICAibG9nSWQiOiB7CiAgICAgICAgImtleUlkIjogIjNUMHdhc2JIRVRKakdSNGNtV2MzQXFKS1hyamVQSzMvaDRweWdDOHA3bzQ9IgogICAgICB9CiAgICB9CiAgXSwKICAidGltZXN0YW1wQXV0aG9yaXRpZXMiOiBbCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAiR2l0SHViLCBJbmMuIiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJJbnRlcm5hbCBTZXJ2aWNlcyBSb290IgogICAgICB9LAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCM0RDQ0FXS2dBd0lCQWdJVWNoa05zSDM2WGEwNGIxTHFJYytxcjlEVmVjTXdDZ1lJS29aSXpqMEVBd013TWpFVk1CTUdBMVVFQ2hNTVIybDBTSFZpTENCSmJtTXVNUmt3RndZRFZRUURFeEJVVTBFZ2FXNTBaWEp0WldScFlYUmxNQjRYRFRJek1EUXhOREF3TURBd01Gb1hEVEkwTURReE16QXdNREF3TUZvd01qRVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVJrd0Z3WURWUVFERXhCVVUwRWdWR2x0WlhOMFlXMXdhVzVuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFVUQ1Wk5iU3FZTWQ2cjhxcE9PRVg5aWJHblpUOUdzdVhPaHIvZjhVOUZKdWdCR0V4S1lwNDBPVUxTMGVyalpXN3hWOXhWNTJObkpmNU9lRHE0ZTVaS3FOV01GUXdEZ1lEVlIwUEFRSC9CQVFEQWdlQU1CTUdBMVVkSlFRTU1Bb0dDQ3NHQVFVRkJ3TUlNQXdHQTFVZEV3RUIvd1FDTUFBd0h3WURWUjBqQkJnd0ZvQVVhVzFSdWRPZ1Z0MGxlcVkwV0tZYnVQcjQ3d0F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl3YlVIOUh2RDRlakNaSk9XUW5xQWxrcVVSbGx2dTlNOCtWcUxiaVJLK3pTZlpDWndzaWxqUm44TVFRUlNrWEVFNUFqRUFnK1Z4cXRvamZWZnU4RGh6emhDeDlHS0VUYkpIYjE5aVY3Mm1NS1ViREFGbXpaNmJROGI1NFpiOHRpZHk1YVdlIgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUNFRENDQVpXZ0F3SUJBZ0lVWDhaTzVRWFA3dk40ZE1RNWU5c1UzbnViOE9nd0NnWUlLb1pJemowRUF3TXdPREVWTUJNR0ExVUVDaE1NUjJsMFNIVmlMQ0JKYm1NdU1SOHdIUVlEVlFRREV4WkpiblJsY201aGJDQlRaWEoyYVdObGN5QlNiMjkwTUI0WERUSXpNRFF4TkRBd01EQXdNRm9YRFRJNE1EUXhNakF3TURBd01Gb3dNakVWTUJNR0ExVUVDaE1NUjJsMFNIVmlMQ0JKYm1NdU1Sa3dGd1lEVlFRREV4QlVVMEVnYVc1MFpYSnRaV1JwWVhSbE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFdk1MWS9kVFZidklKWUFOQXVzekV3Sm5RRTFsbGZ0eW55TUtJTWhoNDhIbXFiVnI1eWd5YnpzTFJMVktiQldPZFoyMWFlSnorZ1ppeXRaZXRxY3lGOVdsRVI1TkVNZjZKVjdaTm9qUXB4SHE0UkhHb0dTY2VRdi9xdlRpWnhFREtvMll3WkRBT0JnTlZIUThCQWY4RUJBTUNBUVl3RWdZRFZSMFRBUUgvQkFnd0JnRUIvd0lCQURBZEJnTlZIUTRFRmdRVWFXMVJ1ZE9nVnQwbGVxWTBXS1lidVByNDd3QXdId1lEVlIwakJCZ3dGb0FVOU5ZWWxvYm5BRzRjMC9xanh5SC9scS93eitRd0NnWUlLb1pJemowRUF3TURhUUF3WmdJeEFLMUIxODV5Z0NySVlGbElzM0dqc3dqbndTTUc2TFk4d29MVmRha0tEWnhWYThmOGNxTXMxRGhjeEowKzA5dzk1UUl4QU8rdEJ6Wms3dmpVSjlpSmdENFI2WldUeFFXS3FObTc0ak85OW8rbzlzdjRGSS9TWlRaVEZ5TW4wSUpFSGRObXlBPT0iCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQjlEQ0NBWHFnQXdJQkFnSVVhL0pBa2RVaks0SlV3c3F0YWlSSkdXaHFMU293Q2dZSUtvWkl6ajBFQXdNd09ERVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVI4d0hRWURWUVFERXhaSmJuUmxjbTVoYkNCVFpYSjJhV05sY3lCU2IyOTBNQjRYRFRJek1EUXhOREF3TURBd01Gb1hEVE16TURReE1UQXdNREF3TUZvd09ERVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVI4d0hRWURWUVFERXhaSmJuUmxjbTVoYkNCVFpYSjJhV05sY3lCU2IyOTBNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRWY5akZBWHh6NGt4NjhBSFJNT2tGQmhmbERjTVR2emFYejR4L0ZDY1hqSi8xcUVLb24vcVBJR25hVVJza0R0eU5iTkRPcGVKVERERnF0NDhpTVBybnpweDZJWndxZW1mVUpONHhCRVpmemErcFl0L2l5b2QrOXRacjIwUlJXU3YvbzBVd1F6QU9CZ05WSFE4QkFmOEVCQU1DQVFZd0VnWURWUjBUQVFIL0JBZ3dCZ0VCL3dJQkFqQWRCZ05WSFE0RUZnUVU5TllZbG9ibkFHNGMwL3FqeHlIL2xxL3d6K1F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl4QUxaTFo4QmdSWHpLeExNTU45VklsTytlNGhyQm5OQmdGN3R6N0hucm93djJOZXRaRXJJQUNLRnltQmx2V0R2dE1BSXdaTytraTZzc1ExYnNabzk4TzhtRUFmMk5aN2lpQ2dERFUwVndqZWNvNnp5ZWgwekJUczkvN2dWNkFITlE1M3hEIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIzLTA0LTE0VDAwOjAwOjAwLjAwMFoiCiAgICAgIH0KICAgIH0KICBdCn0K","registry.npmjs.org%2Fkeys.json":"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAgICAgICAgICJlbmQiOiAiMjAyNS0wMS0yOVQwMDowMDowMC4wMDBaIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJrZXlJZCI6ICJTSEEyNTY6amwzYndzd3U4MFBqam9rQ2doMG8ydzVjMlU0TGhRQUU1N2dqOWN6MWt6QSIsCiAgICAgICAgICAgICJrZXlVc2FnZSI6ICJucG06YXR0ZXN0YXRpb25zIiwKICAgICAgICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUxT2xiM3pNQUZGeFhLSGlJa1FPNWNKM1lobDVpNlVQcCtJaHV0ZUJKYnVIY0E1VW9nS28wRVd0bFd3VzZLU2FLb1RORVlMN0psQ1FpVm5raEJrdFVnZz09IiwKICAgICAgICAgICAgICAgICJrZXlEZXRhaWxzIjogIlBLSVhfRUNEU0FfUDI1Nl9TSEFfMjU2IiwKICAgICAgICAgICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICAgICAgICAgICAic3RhcnQiOiAiMjAyMi0xMi0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgICAgICAgICAgICAgICAiZW5kIjogIjIwMjUtMDEtMjlUMDA6MDA6MDAuMDAwWiIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OkRoUTh3UjVBUEJ2RkhMRi8rVGMrQVl2UE9kVHBjSURxT2h4c0JIUndDN1UiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpEaFE4d1I1QVBCdkZITEYvK1RjK0FZdlBPZFRwY0lEcU9oeHNCSFJ3QzdVIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K"}}}});var lNe=L(m1=>{"use strict";var aNe=m1&&m1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(m1,"__esModule",{value:!0});m1.TUFClient=void 0;var Qg=aNe(Ie("fs")),$b=aNe(Ie("path")),U3t=iNe(),H3t=gL(),j3t=sNe(),SJ="targets",vJ=class{constructor(e){let r=new URL(e.mirrorURL),s=encodeURIComponent(r.host+r.pathname.replace(/\/$/,"")),a=$b.default.join(e.cachePath,s);q3t(a),G3t({cachePath:a,mirrorURL:e.mirrorURL,tufRootPath:e.rootPath,forceInit:e.forceInit}),this.updater=W3t({mirrorURL:e.mirrorURL,cachePath:a,forceCache:e.forceCache,retry:e.retry,timeout:e.timeout})}async refresh(){return this.updater.refresh()}getTarget(e){return(0,j3t.readTarget)(this.updater,e)}};m1.TUFClient=vJ;function q3t(t){let e=$b.default.join(t,SJ);Qg.default.existsSync(t)||Qg.default.mkdirSync(t,{recursive:!0}),Qg.default.existsSync(e)||Qg.default.mkdirSync(e)}function G3t({cachePath:t,mirrorURL:e,tufRootPath:r,forceInit:s}){let a=$b.default.join(t,"root.json");if(!Qg.default.existsSync(a)||s)if(r)Qg.default.copyFileSync(r,a);else{let c=oNe()[e];if(!c)throw new H3t.TUFError({code:"TUF_INIT_CACHE_ERROR",message:`No root.json found for mirror: ${e}`});Qg.default.writeFileSync(a,Buffer.from(c["root.json"],"base64")),Object.entries(c.targets).forEach(([f,p])=>{Qg.default.writeFileSync($b.default.join(t,SJ,f),Buffer.from(p,"base64"))})}}function W3t(t){let e={fetchTimeout:t.timeout,fetchRetry:t.retry};return new U3t.Updater({metadataBaseUrl:t.mirrorURL,targetBaseUrl:`${t.mirrorURL}/targets`,metadataDir:t.cachePath,targetDir:$b.default.join(t.cachePath,SJ),forceCache:t.forceCache,config:e})}});var gL=L(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});mh.TUFError=mh.DEFAULT_MIRROR_URL=void 0;mh.getTrustedRoot=$3t;mh.initTUF=e8t;var Y3t=bb(),V3t=HRe(),K3t=lNe();mh.DEFAULT_MIRROR_URL="https://tuf-repo-cdn.sigstore.dev";var J3t="sigstore-js",z3t={retries:2},Z3t=5e3,X3t="trusted_root.json";async function $3t(t={}){let r=await cNe(t).getTarget(X3t);return Y3t.TrustedRoot.fromJSON(JSON.parse(r))}async function e8t(t={}){let e=cNe(t);return e.refresh().then(()=>e)}function cNe(t){return new K3t.TUFClient({cachePath:t.cachePath||(0,V3t.appDataPath)(J3t),rootPath:t.rootPath,mirrorURL:t.mirrorURL||mh.DEFAULT_MIRROR_URL,retry:t.retry??z3t,timeout:t.timeout??Z3t,forceCache:t.forceCache??!1,forceInit:t.forceInit??t.force??!1})}var t8t=BJ();Object.defineProperty(mh,"TUFError",{enumerable:!0,get:function(){return t8t.TUFError}})});var uNe=L(dL=>{"use strict";Object.defineProperty(dL,"__esModule",{value:!0});dL.DSSESignatureContent=void 0;var eP=wl(),DJ=class{constructor(e){this.env=e}compareDigest(e){return eP.crypto.bufferEqual(e,eP.crypto.digest("sha256",this.env.payload))}compareSignature(e){return eP.crypto.bufferEqual(e,this.signature)}verifySignature(e){return eP.crypto.verify(this.preAuthEncoding,e,this.signature)}get signature(){return this.env.signatures.length>0?this.env.signatures[0].sig:Buffer.from("")}get preAuthEncoding(){return eP.dsse.preAuthEncoding(this.env.payloadType,this.env.payload)}};dL.DSSESignatureContent=DJ});var fNe=L(mL=>{"use strict";Object.defineProperty(mL,"__esModule",{value:!0});mL.MessageSignatureContent=void 0;var bJ=wl(),PJ=class{constructor(e,r){this.signature=e.signature,this.messageDigest=e.messageDigest.digest,this.artifact=r}compareSignature(e){return bJ.crypto.bufferEqual(e,this.signature)}compareDigest(e){return bJ.crypto.bufferEqual(e,this.messageDigest)}verifySignature(e){return bJ.crypto.verify(this.artifact,e,this.signature)}};mL.MessageSignatureContent=PJ});var pNe=L(yL=>{"use strict";Object.defineProperty(yL,"__esModule",{value:!0});yL.toSignedEntity=i8t;yL.signatureContent=ANe;var xJ=wl(),r8t=uNe(),n8t=fNe();function i8t(t,e){let{tlogEntries:r,timestampVerificationData:s}=t.verificationMaterial,a=[];for(let n of r)a.push({$case:"transparency-log",tlogEntry:n});for(let n of s?.rfc3161Timestamps??[])a.push({$case:"timestamp-authority",timestamp:xJ.RFC3161Timestamp.parse(n.signedTimestamp)});return{signature:ANe(t,e),key:s8t(t),tlogEntries:r,timestamps:a}}function ANe(t,e){switch(t.content.$case){case"dsseEnvelope":return new r8t.DSSESignatureContent(t.content.dsseEnvelope);case"messageSignature":return new n8t.MessageSignatureContent(t.content.messageSignature,e)}}function s8t(t){switch(t.verificationMaterial.content.$case){case"publicKey":return{$case:"public-key",hint:t.verificationMaterial.content.publicKey.hint};case"x509CertificateChain":return{$case:"certificate",certificate:xJ.X509Certificate.parse(t.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes)};case"certificate":return{$case:"certificate",certificate:xJ.X509Certificate.parse(t.verificationMaterial.content.certificate.rawBytes)}}}});var Co=L(y1=>{"use strict";Object.defineProperty(y1,"__esModule",{value:!0});y1.PolicyError=y1.VerificationError=void 0;var EL=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}},kJ=class extends EL{};y1.VerificationError=kJ;var QJ=class extends EL{};y1.PolicyError=QJ});var hNe=L(IL=>{"use strict";Object.defineProperty(IL,"__esModule",{value:!0});IL.filterCertAuthorities=o8t;IL.filterTLogAuthorities=a8t;function o8t(t,e){return t.filter(r=>r.validFor.start<=e.start&&r.validFor.end>=e.end)}function a8t(t,e){return t.filter(r=>e.logID&&!r.logID.equals(e.logID)?!1:r.validFor.start<=e.targetDate&&e.targetDate<=r.validFor.end)}});var Ay=L(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.filterTLogAuthorities=fy.filterCertAuthorities=void 0;fy.toTrustMaterial=c8t;var TJ=wl(),tP=bb(),l8t=Co(),RJ=new Date(0),FJ=new Date(864e13),mNe=hNe();Object.defineProperty(fy,"filterCertAuthorities",{enumerable:!0,get:function(){return mNe.filterCertAuthorities}});Object.defineProperty(fy,"filterTLogAuthorities",{enumerable:!0,get:function(){return mNe.filterTLogAuthorities}});function c8t(t,e){let r=typeof e=="function"?e:u8t(e);return{certificateAuthorities:t.certificateAuthorities.map(dNe),timestampAuthorities:t.timestampAuthorities.map(dNe),tlogs:t.tlogs.map(gNe),ctlogs:t.ctlogs.map(gNe),publicKey:r}}function gNe(t){let e=t.publicKey.keyDetails,r=e===tP.PublicKeyDetails.PKCS1_RSA_PKCS1V5||e===tP.PublicKeyDetails.PKIX_RSA_PKCS1V5||e===tP.PublicKeyDetails.PKIX_RSA_PKCS1V15_2048_SHA256||e===tP.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256||e===tP.PublicKeyDetails.PKIX_RSA_PKCS1V15_4096_SHA256?"pkcs1":"spki";return{logID:t.logId.keyId,publicKey:TJ.crypto.createPublicKey(t.publicKey.rawBytes,r),validFor:{start:t.publicKey.validFor?.start||RJ,end:t.publicKey.validFor?.end||FJ}}}function dNe(t){return{certChain:t.certChain.certificates.map(e=>TJ.X509Certificate.parse(e.rawBytes)),validFor:{start:t.validFor?.start||RJ,end:t.validFor?.end||FJ}}}function u8t(t){return e=>{let r=(t||{})[e];if(!r)throw new l8t.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${e}`});return{publicKey:TJ.crypto.createPublicKey(r.rawBytes),validFor:s=>(r.validFor?.start||RJ)<=s&&(r.validFor?.end||FJ)>=s}}}});var NJ=L(rP=>{"use strict";Object.defineProperty(rP,"__esModule",{value:!0});rP.CertificateChainVerifier=void 0;rP.verifyCertificateChain=A8t;var py=Co(),f8t=Ay();function A8t(t,e){let r=(0,f8t.filterCertAuthorities)(e,{start:t.notBefore,end:t.notAfter}),s;for(let a of r)try{return new CL({trustedCerts:a.certChain,untrustedCert:t}).verify()}catch(n){s=n}throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"Failed to verify certificate chain",cause:s})}var CL=class{constructor(e){this.untrustedCert=e.untrustedCert,this.trustedCerts=e.trustedCerts,this.localCerts=p8t([...e.trustedCerts,e.untrustedCert])}verify(){let e=this.sort();return this.checkPath(e),e}sort(){let e=this.untrustedCert,r=this.buildPaths(e);if(r=r.filter(a=>a.some(n=>this.trustedCerts.includes(n))),r.length===0)throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"no trusted certificate path found"});let s=r.reduce((a,n)=>a.length{if(s&&a.extSubjectKeyID){a.extSubjectKeyID.keyIdentifier.equals(s)&&r.push(a);return}a.subject.equals(e.issuer)&&r.push(a)}),r=r.filter(a=>{try{return e.verify(a)}catch{return!1}}),r)}checkPath(e){if(e.length<1)throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate chain must contain at least one certificate"});if(!e.slice(1).every(s=>s.isCA))throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"intermediate certificate is not a CA"});for(let s=e.length-2;s>=0;s--)if(!e[s].issuer.equals(e[s+1].subject))throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"incorrect certificate name chaining"});for(let s=0;s{"use strict";Object.defineProperty(OJ,"__esModule",{value:!0});OJ.verifySCTs=d8t;var wL=wl(),h8t=Co(),g8t=Ay();function d8t(t,e,r){let s,a=t.clone();for(let p=0;p{if(!(0,g8t.filterTLogAuthorities)(r,{logID:p.logID,targetDate:p.datetime}).some(C=>p.verify(n.buffer,C.publicKey)))throw new h8t.VerificationError({code:"CERTIFICATE_ERROR",message:"SCT verification failed"});return p.logID})}});var INe=L(BL=>{"use strict";Object.defineProperty(BL,"__esModule",{value:!0});BL.verifyPublicKey=w8t;BL.verifyCertificate=B8t;var m8t=wl(),ENe=Co(),y8t=NJ(),E8t=yNe(),I8t="1.3.6.1.4.1.57264.1.1",C8t="1.3.6.1.4.1.57264.1.8";function w8t(t,e,r){let s=r.publicKey(t);return e.forEach(a=>{if(!s.validFor(a))throw new ENe.VerificationError({code:"PUBLIC_KEY_ERROR",message:`Public key is not valid for timestamp: ${a.toISOString()}`})}),{key:s.publicKey}}function B8t(t,e,r){let s=(0,y8t.verifyCertificateChain)(t,r.certificateAuthorities);if(!e.every(n=>s.every(c=>c.validForDate(n))))throw new ENe.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate is not valid or expired at the specified date"});return{scts:(0,E8t.verifySCTs)(s[0],s[1],r.ctlogs),signer:v8t(s[0])}}function v8t(t){let e,r=t.extension(C8t);r?e=r.valueObj.subs?.[0]?.value.toString("ascii"):e=t.extension(I8t)?.value.toString("ascii");let s={extensions:{issuer:e},subjectAlternativeName:t.subjectAltName};return{key:m8t.crypto.createPublicKey(t.publicKey),identity:s}}});var wNe=L(vL=>{"use strict";Object.defineProperty(vL,"__esModule",{value:!0});vL.verifySubjectAlternativeName=S8t;vL.verifyExtensions=D8t;var CNe=Co();function S8t(t,e){if(e===void 0||!e.match(t))throw new CNe.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`certificate identity error - expected ${t}, got ${e}`})}function D8t(t,e={}){let r;for(r in t)if(e[r]!==t[r])throw new CNe.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`invalid certificate extension - expected ${r}=${t[r]}, got ${r}=${e[r]}`})}});var BNe=L(HJ=>{"use strict";Object.defineProperty(HJ,"__esModule",{value:!0});HJ.verifyCheckpoint=x8t;var MJ=wl(),E1=Co(),b8t=Ay(),LJ=` - -`,P8t=/\u2014 (\S+) (\S+)\n/g;function x8t(t,e){let r=(0,b8t.filterTLogAuthorities)(e,{targetDate:new Date(Number(t.integratedTime)*1e3)}),s=t.inclusionProof,a=_J.fromString(s.checkpoint.envelope),n=UJ.fromString(a.note);if(!k8t(a,r))throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});if(!MJ.crypto.bufferEqual(n.logHash,s.rootHash))throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"root hash mismatch"})}function k8t(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.every(s=>{let a=e.find(n=>MJ.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint));return a?MJ.crypto.verify(r,a.publicKey,s.signature):!1})}var _J=class t{constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(LJ))throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(LJ),s=e.slice(0,r+1),n=e.slice(r+LJ.length).matchAll(P8t),c=Array.from(n,f=>{let[,p,h]=f,E=Buffer.from(h,"base64");if(E.length<5)throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:p,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(c.length===0)throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,c)}},UJ=class t{constructor(e,r,s,a){this.origin=e,this.logSize=r,this.logHash=s,this.rest=a}static fromString(e){let r=e.trimEnd().split(` -`);if(r.length<3)throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],a=BigInt(r[1]),n=Buffer.from(r[2],"base64"),c=r.slice(3);return new t(s,a,n,c)}}});var vNe=L(WJ=>{"use strict";Object.defineProperty(WJ,"__esModule",{value:!0});WJ.verifyMerkleInclusion=R8t;var GJ=wl(),jJ=Co(),Q8t=Buffer.from([0]),T8t=Buffer.from([1]);function R8t(t){let e=t.inclusionProof,r=BigInt(e.logIndex),s=BigInt(e.treeSize);if(r<0n||r>=s)throw new jJ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${r}`});let{inner:a,border:n}=F8t(r,s);if(e.hashes.length!==a+n)throw new jJ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=e.hashes.slice(0,a),f=e.hashes.slice(a),p=U8t(t.canonicalizedBody),h=O8t(N8t(p,c,r),f);if(!GJ.crypto.bufferEqual(h,e.rootHash))throw new jJ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function F8t(t,e){let r=L8t(t,e),s=M8t(t>>BigInt(r));return{inner:r,border:s}}function N8t(t,e,r){return e.reduce((s,a,n)=>r>>BigInt(n)&BigInt(1)?qJ(a,s):qJ(s,a),t)}function O8t(t,e){return e.reduce((r,s)=>qJ(s,r),t)}function L8t(t,e){return _8t(t^e-BigInt(1))}function M8t(t){return t.toString(2).split("1").length-1}function _8t(t){return t===0n?0:t.toString(2).length}function qJ(t,e){return GJ.crypto.digest("sha256",T8t,t,e)}function U8t(t){return GJ.crypto.digest("sha256",Q8t,t)}});var DNe=L(YJ=>{"use strict";Object.defineProperty(YJ,"__esModule",{value:!0});YJ.verifyTLogSET=q8t;var SNe=wl(),H8t=Co(),j8t=Ay();function q8t(t,e){if(!(0,j8t.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(a=>{let n=G8t(t),c=Buffer.from(SNe.json.canonicalize(n),"utf8"),f=t.inclusionPromise.signedEntryTimestamp;return SNe.crypto.verify(c,a.publicKey,f)}))throw new H8t.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function G8t(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:a}=t;return{body:a.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var bNe=L(JJ=>{"use strict";Object.defineProperty(JJ,"__esModule",{value:!0});JJ.verifyRFC3161Timestamp=V8t;var VJ=wl(),KJ=Co(),W8t=NJ(),Y8t=Ay();function V8t(t,e,r){let s=t.signingTime;if(r=(0,Y8t.filterCertAuthorities)(r,{start:s,end:s}),r=J8t(r,{serialNumber:t.signerSerialNumber,issuer:t.signerIssuer}),!r.some(n=>{try{return K8t(t,e,n),!0}catch{return!1}}))throw new KJ.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp could not be verified"})}function K8t(t,e,r){let[s,...a]=r.certChain,n=VJ.crypto.createPublicKey(s.publicKey),c=t.signingTime;try{new W8t.CertificateChainVerifier({untrustedCert:s,trustedCerts:a}).verify()}catch{throw new KJ.VerificationError({code:"TIMESTAMP_ERROR",message:"invalid certificate chain"})}if(!r.certChain.every(p=>p.validForDate(c)))throw new KJ.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp was signed with an expired certificate"});t.verify(e,n)}function J8t(t,e){return t.filter(r=>r.certChain.length>0&&VJ.crypto.bufferEqual(r.certChain[0].serialNumber,e.serialNumber)&&VJ.crypto.bufferEqual(r.certChain[0].issuer,e.issuer))}});var PNe=L(SL=>{"use strict";Object.defineProperty(SL,"__esModule",{value:!0});SL.verifyTSATimestamp=tHt;SL.verifyTLogTimestamp=rHt;var z8t=Co(),Z8t=BNe(),X8t=vNe(),$8t=DNe(),eHt=bNe();function tHt(t,e,r){return(0,eHt.verifyRFC3161Timestamp)(t,e,r),{type:"timestamp-authority",logID:t.signerSerialNumber,timestamp:t.signingTime}}function rHt(t,e){let r=!1;if(nHt(t)&&((0,$8t.verifyTLogSET)(t,e),r=!0),iHt(t)&&((0,X8t.verifyMerkleInclusion)(t),(0,Z8t.verifyCheckpoint)(t,e),r=!0),!r)throw new z8t.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"});return{type:"transparency-log",logID:t.logId.keyId,timestamp:new Date(Number(t.integratedTime)*1e3)}}function nHt(t){return t.inclusionPromise!==void 0}function iHt(t){return t.inclusionProof!==void 0}});var xNe=L(zJ=>{"use strict";Object.defineProperty(zJ,"__esModule",{value:!0});zJ.verifyDSSETLogBody=sHt;var DL=Co();function sHt(t,e){switch(t.apiVersion){case"0.0.1":return oHt(t,e);default:throw new DL.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported dsse version: ${t.apiVersion}`})}}function oHt(t,e){if(t.spec.signatures?.length!==1)throw new DL.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let r=t.spec.signatures[0].signature;if(!e.compareSignature(Buffer.from(r,"base64")))throw new DL.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let s=t.spec.payloadHash?.value||"";if(!e.compareDigest(Buffer.from(s,"hex")))throw new DL.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}});var kNe=L(XJ=>{"use strict";Object.defineProperty(XJ,"__esModule",{value:!0});XJ.verifyHashedRekordTLogBody=aHt;var ZJ=Co();function aHt(t,e){switch(t.apiVersion){case"0.0.1":return lHt(t,e);default:throw new ZJ.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported hashedrekord version: ${t.apiVersion}`})}}function lHt(t,e){let r=t.spec.signature.content||"";if(!e.compareSignature(Buffer.from(r,"base64")))throw new ZJ.VerificationError({code:"TLOG_BODY_ERROR",message:"signature mismatch"});let s=t.spec.data.hash?.value||"";if(!e.compareDigest(Buffer.from(s,"hex")))throw new ZJ.VerificationError({code:"TLOG_BODY_ERROR",message:"digest mismatch"})}});var QNe=L($J=>{"use strict";Object.defineProperty($J,"__esModule",{value:!0});$J.verifyIntotoTLogBody=cHt;var bL=Co();function cHt(t,e){switch(t.apiVersion){case"0.0.2":return uHt(t,e);default:throw new bL.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported intoto version: ${t.apiVersion}`})}}function uHt(t,e){if(t.spec.content.envelope.signatures?.length!==1)throw new bL.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let r=fHt(t.spec.content.envelope.signatures[0].sig);if(!e.compareSignature(Buffer.from(r,"base64")))throw new bL.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let s=t.spec.content.payloadHash?.value||"";if(!e.compareDigest(Buffer.from(s,"hex")))throw new bL.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}function fHt(t){return Buffer.from(t,"base64").toString("utf-8")}});var RNe=L(ez=>{"use strict";Object.defineProperty(ez,"__esModule",{value:!0});ez.verifyTLogBody=gHt;var TNe=Co(),AHt=xNe(),pHt=kNe(),hHt=QNe();function gHt(t,e){let{kind:r,version:s}=t.kindVersion,a=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==a.kind||s!==a.apiVersion)throw new TNe.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${s}, received: ${a.kind}/${a.apiVersion}`});switch(a.kind){case"dsse":return(0,AHt.verifyDSSETLogBody)(a,e);case"intoto":return(0,hHt.verifyIntotoTLogBody)(a,e);case"hashedrekord":return(0,pHt.verifyHashedRekordTLogBody)(a,e);default:throw new TNe.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}});var MNe=L(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});PL.Verifier=void 0;var dHt=Ie("util"),I1=Co(),FNe=INe(),NNe=wNe(),ONe=PNe(),mHt=RNe(),tz=class{constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,tsaThreshold:r.tsaThreshold??0}}verify(e,r){let s=this.verifyTimestamps(e),a=this.verifySigningKey(e,s);return this.verifyTLogs(e),this.verifySignature(e,a),r&&this.verifyPolicy(r,a.identity||{}),a}verifyTimestamps(e){let r=0,s=0,a=e.timestamps.map(n=>{switch(n.$case){case"timestamp-authority":return s++,(0,ONe.verifyTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities);case"transparency-log":return r++,(0,ONe.verifyTLogTimestamp)(n.tlogEntry,this.trustMaterial.tlogs)}});if(LNe(a))throw new I1.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(rn.timestamp)}verifySigningKey({key:e},r){switch(e.$case){case"public-key":return(0,FNe.verifyPublicKey)(e.hint,r,this.trustMaterial);case"certificate":{let s=(0,FNe.verifyCertificate)(e.certificate,r,this.trustMaterial);if(LNe(s.scts))throw new I1.VerificationError({code:"CERTIFICATE_ERROR",message:"duplicate SCT"});if(s.scts.length(0,mHt.verifyTLogBody)(s,e))}verifySignature(e,r){if(!e.signature.verifySignature(r.key))throw new I1.VerificationError({code:"SIGNATURE_ERROR",message:"signature verification failed"})}verifyPolicy(e,r){e.subjectAlternativeName&&(0,NNe.verifySubjectAlternativeName)(e.subjectAlternativeName,r.subjectAlternativeName),e.extensions&&(0,NNe.verifyExtensions)(e.extensions,r.extensions)}};PL.Verifier=tz;function LNe(t){for(let e=0;e{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.Verifier=ou.toTrustMaterial=ou.VerificationError=ou.PolicyError=ou.toSignedEntity=void 0;var yHt=pNe();Object.defineProperty(ou,"toSignedEntity",{enumerable:!0,get:function(){return yHt.toSignedEntity}});var _Ne=Co();Object.defineProperty(ou,"PolicyError",{enumerable:!0,get:function(){return _Ne.PolicyError}});Object.defineProperty(ou,"VerificationError",{enumerable:!0,get:function(){return _Ne.VerificationError}});var EHt=Ay();Object.defineProperty(ou,"toTrustMaterial",{enumerable:!0,get:function(){return EHt.toTrustMaterial}});var IHt=MNe();Object.defineProperty(ou,"Verifier",{enumerable:!0,get:function(){return IHt.Verifier}})});var UNe=L(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.DEFAULT_TIMEOUT=Na.DEFAULT_RETRY=void 0;Na.createBundleBuilder=BHt;Na.createKeyFinder=vHt;Na.createVerificationPolicy=SHt;var CHt=wl(),C1=pK(),wHt=xL();Na.DEFAULT_RETRY={retries:2};Na.DEFAULT_TIMEOUT=5e3;function BHt(t,e){let r={signer:DHt(e),witnesses:PHt(e)};switch(t){case"messageSignature":return new C1.MessageSignatureBundleBuilder(r);case"dsseEnvelope":return new C1.DSSEBundleBuilder({...r,certificateChain:e.legacyCompatibility})}}function vHt(t){return e=>{let r=t(e);if(!r)throw new wHt.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${e}`});return{publicKey:CHt.crypto.createPublicKey(r),validFor:()=>!0}}}function SHt(t){let e={},r=t.certificateIdentityEmail||t.certificateIdentityURI;return r&&(e.subjectAlternativeName=r),t.certificateIssuer&&(e.extensions={issuer:t.certificateIssuer}),e}function DHt(t){return new C1.FulcioSigner({fulcioBaseURL:t.fulcioURL,identityProvider:t.identityProvider||bHt(t),retry:t.retry??Na.DEFAULT_RETRY,timeout:t.timeout??Na.DEFAULT_TIMEOUT})}function bHt(t){let e=t.identityToken;return e?{getToken:()=>Promise.resolve(e)}:new C1.CIContextProvider("sigstore")}function PHt(t){let e=[];return xHt(t)&&e.push(new C1.RekorWitness({rekorBaseURL:t.rekorURL,entryType:t.legacyCompatibility?"intoto":"dsse",fetchOnConflict:!1,retry:t.retry??Na.DEFAULT_RETRY,timeout:t.timeout??Na.DEFAULT_TIMEOUT})),kHt(t)&&e.push(new C1.TSAWitness({tsaBaseURL:t.tsaServerURL,retry:t.retry??Na.DEFAULT_RETRY,timeout:t.timeout??Na.DEFAULT_TIMEOUT})),e}function xHt(t){return t.tlogUpload!==!1}function kHt(t){return t.tsaServerURL!==void 0}});var qNe=L(au=>{"use strict";var QHt=au&&au.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),THt=au&&au.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HNe=au&&au.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;aa.verify(t,s))}async function jNe(t={}){let e=await RHt.getTrustedRoot({mirrorURL:t.tufMirrorURL,rootPath:t.tufRootPath,cachePath:t.tufCachePath,forceCache:t.tufForceCache,retry:t.retry??w1.DEFAULT_RETRY,timeout:t.timeout??w1.DEFAULT_TIMEOUT}),r=t.keySelector?w1.createKeyFinder(t.keySelector):void 0,s=(0,rz.toTrustMaterial)(e,r),a={ctlogThreshold:t.ctLogThreshold,tlogThreshold:t.tlogThreshold},n=new rz.Verifier(s,a),c=w1.createVerificationPolicy(t);return{verify:(f,p)=>{let h=(0,nz.bundleFromJSON)(f),E=(0,rz.toSignedEntity)(h,p);n.verify(E,c)}}}});var WNe=L(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.verify=Oi.sign=Oi.createVerifier=Oi.attest=Oi.VerificationError=Oi.PolicyError=Oi.TUFError=Oi.InternalError=Oi.DEFAULT_REKOR_URL=Oi.DEFAULT_FULCIO_URL=Oi.ValidationError=void 0;var LHt=xb();Object.defineProperty(Oi,"ValidationError",{enumerable:!0,get:function(){return LHt.ValidationError}});var iz=pK();Object.defineProperty(Oi,"DEFAULT_FULCIO_URL",{enumerable:!0,get:function(){return iz.DEFAULT_FULCIO_URL}});Object.defineProperty(Oi,"DEFAULT_REKOR_URL",{enumerable:!0,get:function(){return iz.DEFAULT_REKOR_URL}});Object.defineProperty(Oi,"InternalError",{enumerable:!0,get:function(){return iz.InternalError}});var MHt=gL();Object.defineProperty(Oi,"TUFError",{enumerable:!0,get:function(){return MHt.TUFError}});var GNe=xL();Object.defineProperty(Oi,"PolicyError",{enumerable:!0,get:function(){return GNe.PolicyError}});Object.defineProperty(Oi,"VerificationError",{enumerable:!0,get:function(){return GNe.VerificationError}});var kL=qNe();Object.defineProperty(Oi,"attest",{enumerable:!0,get:function(){return kL.attest}});Object.defineProperty(Oi,"createVerifier",{enumerable:!0,get:function(){return kL.createVerifier}});Object.defineProperty(Oi,"sign",{enumerable:!0,get:function(){return kL.sign}});Object.defineProperty(Oi,"verify",{enumerable:!0,get:function(){return kL.verify}})});var IOe=L((Fvr,EOe)=>{var Kjt=Y4();function Jjt(t){return Kjt(t)?void 0:t}EOe.exports=Jjt});var wOe=L((Nvr,COe)=>{var zjt=QT(),Zjt=w5(),Xjt=D5(),$jt=Im(),e6t=Vd(),t6t=IOe(),r6t=dG(),n6t=C5(),i6t=1,s6t=2,o6t=4,a6t=r6t(function(t,e){var r={};if(t==null)return r;var s=!1;e=zjt(e,function(n){return n=$jt(n,t),s||(s=n.length>1),n}),e6t(t,n6t(t),r),s&&(r=Zjt(r,i6t|s6t|o6t,t6t));for(var a=e.length;a--;)Xjt(r,e[a]);return r});COe.exports=a6t});bt();Ve();bt();var bOe=Ie("child_process"),POe=et(Rd());Wt();var $I=new Map([]);var $v={};Vt($v,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>ar,getCli:()=>XCe,getDynamicLibs:()=>ZCe,getPluginConfiguration:()=>tC,openWorkspace:()=>eC,pluginCommands:()=>$I,runExit:()=>KR});Wt();var ut=class extends ot{constructor(){super(...arguments);this.cwd=ge.String("--cwd",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<"u")throw new nt("The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path");return super.validateAndExecute()}};Ve();bt();Wt();var ar=class extends nt{constructor(e,r){let s=K.relative(e,r),a=K.join(e,Ht.fileName);super(`This command can only be run from within a workspace of your project (${s} isn't a workspace of ${a}).`)}};Ve();bt();rA();Bc();wv();Wt();var mwt=et(Ai());Ul();var ZCe=()=>new Map([["@yarnpkg/cli",$v],["@yarnpkg/core",Xv],["@yarnpkg/fslib",U2],["@yarnpkg/libzip",Iv],["@yarnpkg/parsers",K2],["@yarnpkg/shell",Dv],["clipanion",oB],["semver",mwt],["typanion",Ia]]);Ve();async function eC(t,e){let{project:r,workspace:s}=await Tt.find(t,e);if(!s)throw new ar(r.cwd,e);return s}Ve();bt();rA();Bc();wv();Wt();var d6t=et(Ai());Ul();var Y5={};Vt(Y5,{AddCommand:()=>sC,BinCommand:()=>oC,CacheCleanCommand:()=>aC,ClipanionCommand:()=>pC,ConfigCommand:()=>fC,ConfigGetCommand:()=>lC,ConfigSetCommand:()=>cC,ConfigUnsetCommand:()=>uC,DedupeCommand:()=>AC,EntryCommand:()=>gC,ExecCommand:()=>mC,ExplainCommand:()=>IC,ExplainPeerRequirementsCommand:()=>yC,HelpCommand:()=>hC,InfoCommand:()=>CC,LinkCommand:()=>BC,NodeCommand:()=>vC,PluginCheckCommand:()=>SC,PluginImportCommand:()=>PC,PluginImportSourcesCommand:()=>xC,PluginListCommand:()=>DC,PluginRemoveCommand:()=>kC,PluginRuntimeCommand:()=>QC,RebuildCommand:()=>TC,RemoveCommand:()=>RC,RunCommand:()=>NC,RunIndexCommand:()=>FC,SetResolutionCommand:()=>OC,SetVersionCommand:()=>EC,SetVersionSourcesCommand:()=>bC,UnlinkCommand:()=>LC,UpCommand:()=>MC,VersionCommand:()=>dC,WhyCommand:()=>_C,WorkspaceCommand:()=>GC,WorkspacesListCommand:()=>qC,YarnCommand:()=>wC,dedupeUtils:()=>iF,default:()=>ASt,suggestUtils:()=>Xu});var xBe=et(Rd());Ve();Ve();Ve();Wt();var _1e=et(nS());Ul();var Xu={};Vt(Xu,{Modifier:()=>d5,Strategy:()=>tF,Target:()=>iS,WorkspaceModifier:()=>F1e,applyModifier:()=>L1t,extractDescriptorFromPath:()=>m5,extractRangeModifier:()=>N1e,fetchDescriptorFrom:()=>y5,findProjectDescriptors:()=>M1e,getModifier:()=>sS,getSuggestedDescriptors:()=>oS,makeWorkspaceDescriptor:()=>L1e,toWorkspaceModifier:()=>O1e});Ve();Ve();bt();var g5=et(Ai()),N1t="workspace:",iS=(s=>(s.REGULAR="dependencies",s.DEVELOPMENT="devDependencies",s.PEER="peerDependencies",s))(iS||{}),d5=(s=>(s.CARET="^",s.TILDE="~",s.EXACT="",s))(d5||{}),F1e=(s=>(s.CARET="^",s.TILDE="~",s.EXACT="*",s))(F1e||{}),tF=(n=>(n.KEEP="keep",n.REUSE="reuse",n.PROJECT="project",n.LATEST="latest",n.CACHE="cache",n))(tF||{});function sS(t,e){return t.exact?"":t.caret?"^":t.tilde?"~":e.configuration.get("defaultSemverRangePrefix")}var O1t=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function N1e(t,{project:e}){let r=t.match(O1t);return r?r[1]:e.configuration.get("defaultSemverRangePrefix")}function L1t(t,e){let{protocol:r,source:s,params:a,selector:n}=q.parseRange(t.range);return g5.default.valid(n)&&(n=`${e}${t.range}`),q.makeDescriptor(t,q.makeRange({protocol:r,source:s,params:a,selector:n}))}function O1e(t){switch(t){case"^":return"^";case"~":return"~";case"":return"*";default:throw new Error(`Assertion failed: Unknown modifier: "${t}"`)}}function L1e(t,e){return q.makeDescriptor(t.anchoredDescriptor,`${N1t}${O1e(e)}`)}async function M1e(t,{project:e,target:r}){let s=new Map,a=n=>{let c=s.get(n.descriptorHash);return c||s.set(n.descriptorHash,c={descriptor:n,locators:[]}),c};for(let n of e.workspaces)if(r==="peerDependencies"){let c=n.manifest.peerDependencies.get(t.identHash);c!==void 0&&a(c).locators.push(n.anchoredLocator)}else{let c=n.manifest.dependencies.get(t.identHash),f=n.manifest.devDependencies.get(t.identHash);r==="devDependencies"?f!==void 0?a(f).locators.push(n.anchoredLocator):c!==void 0&&a(c).locators.push(n.anchoredLocator):c!==void 0?a(c).locators.push(n.anchoredLocator):f!==void 0&&a(f).locators.push(n.anchoredLocator)}return s}async function m5(t,{cwd:e,workspace:r}){return await _1t(async s=>{K.isAbsolute(t)||(t=K.relative(r.cwd,K.resolve(e,t)),t.match(/^\.{0,2}\//)||(t=`./${t}`));let{project:a}=r,n=await y5(q.makeIdent(null,"archive"),t,{project:r.project,cache:s,workspace:r});if(!n)throw new Error("Assertion failed: The descriptor should have been found");let c=new Yi,f=a.configuration.makeResolver(),p=a.configuration.makeFetcher(),h={checksums:a.storedChecksums,project:a,cache:s,fetcher:p,report:c,resolver:f},E=f.bindDescriptor(n,r.anchoredLocator,h),C=q.convertDescriptorToLocator(E),S=await p.fetch(C,h),P=await Ht.find(S.prefixPath,{baseFs:S.packageFs});if(!P.name)throw new Error("Target path doesn't have a name");return q.makeDescriptor(P.name,t)})}function M1t(t){if(t.range==="unknown")return{type:"resolve",range:"latest"};if(Or.validRange(t.range))return{type:"fixed",range:t.range};if(Up.test(t.range))return{type:"resolve",range:t.range};let e=t.range.match(/^(?:jsr:|npm:)(.*)/);if(!e)return{type:"fixed",range:t.range};let[,r]=e,s=`${q.stringifyIdent(t)}@`;return r.startsWith(s)&&(r=r.slice(s.length)),Or.validRange(r)?{type:"fixed",range:t.range}:Up.test(r)?{type:"resolve",range:t.range}:{type:"fixed",range:t.range}}async function oS(t,{project:e,workspace:r,cache:s,target:a,fixed:n,modifier:c,strategies:f,maxResults:p=1/0}){if(!(p>=0))throw new Error(`Invalid maxResults (${p})`);let h=!n||t.range==="unknown"?M1t(t):{type:"fixed",range:t.range};if(h.type==="fixed")return{suggestions:[{descriptor:t,name:`Use ${q.prettyDescriptor(e.configuration,t)}`,reason:"(unambiguous explicit request)"}],rejections:[]};let E=typeof r<"u"&&r!==null&&r.manifest[a].get(t.identHash)||null,C=[],S=[],P=async I=>{try{await I()}catch(R){S.push(R)}};for(let I of f){if(C.length>=p)break;switch(I){case"keep":await P(async()=>{E&&C.push({descriptor:E,name:`Keep ${q.prettyDescriptor(e.configuration,E)}`,reason:"(no changes)"})});break;case"reuse":await P(async()=>{for(let{descriptor:R,locators:N}of(await M1e(t,{project:e,target:a})).values()){if(N.length===1&&N[0].locatorHash===r.anchoredLocator.locatorHash&&f.includes("keep"))continue;let U=`(originally used by ${q.prettyLocator(e.configuration,N[0])}`;U+=N.length>1?` and ${N.length-1} other${N.length>2?"s":""})`:")",C.push({descriptor:R,name:`Reuse ${q.prettyDescriptor(e.configuration,R)}`,reason:U})}});break;case"cache":await P(async()=>{for(let R of e.storedDescriptors.values())R.identHash===t.identHash&&C.push({descriptor:R,name:`Reuse ${q.prettyDescriptor(e.configuration,R)}`,reason:"(already used somewhere in the lockfile)"})});break;case"project":await P(async()=>{if(r.manifest.name!==null&&t.identHash===r.manifest.name.identHash)return;let R=e.tryWorkspaceByIdent(t);if(R===null)return;let N=L1e(R,c);C.push({descriptor:N,name:`Attach ${q.prettyDescriptor(e.configuration,N)}`,reason:`(local workspace at ${he.pretty(e.configuration,R.relativeCwd,he.Type.PATH)})`})});break;case"latest":{let R=e.configuration.get("enableNetwork"),N=e.configuration.get("enableOfflineMode");await P(async()=>{if(a==="peerDependencies")C.push({descriptor:q.makeDescriptor(t,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(!R&&!N)C.push({descriptor:null,name:"Resolve from latest",reason:he.pretty(e.configuration,"(unavailable because enableNetwork is toggled off)","grey")});else{let U=await y5(t,h.range,{project:e,cache:s,workspace:r,modifier:c});U&&C.push({descriptor:U,name:`Use ${q.prettyDescriptor(e.configuration,U)}`,reason:`(resolved from ${N?"the cache":"latest"})`})}})}break}}return{suggestions:C.slice(0,p),rejections:S.slice(0,p)}}async function y5(t,e,{project:r,cache:s,workspace:a,preserveModifier:n=!0,modifier:c}){let f=r.configuration.normalizeDependency(q.makeDescriptor(t,e)),p=new Yi,h=r.configuration.makeFetcher(),E=r.configuration.makeResolver(),C={project:r,fetcher:h,cache:s,checksums:r.storedChecksums,report:p,cacheOptions:{skipIntegrityCheck:!0}},S={...C,resolver:E,fetchOptions:C},P=E.bindDescriptor(f,a.anchoredLocator,S),I=await E.getCandidates(P,{},S);if(I.length===0)return null;let R=I[0],{protocol:N,source:U,params:W,selector:te}=q.parseRange(q.convertToManifestRange(R.reference));if(N===r.configuration.get("defaultProtocol")&&(N=null),g5.default.valid(te)){let ie=te;if(typeof c<"u")te=c+te;else if(n!==!1){let me=typeof n=="string"?n:f.range;te=N1e(me,{project:r})+te}let Ae=q.makeDescriptor(R,q.makeRange({protocol:N,source:U,params:W,selector:te}));(await E.getCandidates(r.configuration.normalizeDependency(Ae),{},S)).length!==1&&(te=ie)}return q.makeDescriptor(R,q.makeRange({protocol:N,source:U,params:W,selector:te}))}async function _1t(t){return await le.mktempPromise(async e=>{let r=ze.create(e);return r.useWithSource(e,{enableMirror:!1,compressionLevel:0},e,{overwrite:!0}),await t(new Jr(e,{configuration:r,check:!1,immutable:!1}))})}var sC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.dev=ge.Boolean("-D,--dev",!1,{description:"Add a package as a dev dependency"});this.peer=ge.Boolean("-P,--peer",!1,{description:"Add a package as a peer dependency"});this.optional=ge.Boolean("-O,--optional",!1,{description:"Add / upgrade a package to an optional regular / peer dependency"});this.preferDev=ge.Boolean("--prefer-dev",!1,{description:"Add / upgrade a package to a dev dependency"});this.interactive=ge.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"});this.cached=ge.Boolean("--cached",!1,{description:"Reuse the highest version already used somewhere within the project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.silent=ge.Boolean("--silent",{hidden:!0});this.packages=ge.Rest()}static{this.paths=[["add"]]}static{this.usage=ot.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"],["Add a local package (gzipped tarball format) to the current workspace","$0 add local-package-name@file:../path/to/local-package-name-v0.1.2.tgz"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=f||r.get("preferReuse"),h=sS(this,s),E=[p?"reuse":void 0,"project",this.cached?"cache":void 0,"latest"].filter(W=>typeof W<"u"),C=f?1/0:1,S=W=>{let te=q.tryParseDescriptor(W.slice(4));return te?te.range==="unknown"?q.makeDescriptor(te,`jsr:${q.stringifyIdent(te)}@latest`):q.makeDescriptor(te,`jsr:${te.range}`):null},P=await Promise.all(this.packages.map(async W=>{let te=W.match(/^\.{0,2}\//)?await m5(W,{cwd:this.context.cwd,workspace:a}):W.startsWith("jsr:")?S(W):q.tryParseDescriptor(W),ie=W.match(/^(https?:|git@github)/);if(ie)throw new nt(`It seems you are trying to add a package using a ${he.pretty(r,`${ie[0]}...`,he.Type.RANGE)} url; we now require package names to be explicitly specified. -Try running the command again with the package name prefixed: ${he.pretty(r,"yarn add",he.Type.CODE)} ${he.pretty(r,q.makeDescriptor(q.makeIdent(null,"my-package"),`${ie[0]}...`),he.Type.DESCRIPTOR)}`);if(!te)throw new nt(`The ${he.pretty(r,W,he.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let Ae=U1t(a,te,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(Ae.map(async me=>{let pe=await oS(te,{project:s,workspace:a,cache:n,fixed:c,target:me,modifier:h,strategies:E,maxResults:C});return{request:te,suggestedDescriptors:pe,target:me}}))})).then(W=>W.flat()),I=await uA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async W=>{for(let{request:te,suggestedDescriptors:{suggestions:ie,rejections:Ae}}of P)if(ie.filter(me=>me.descriptor!==null).length===0){let[me]=Ae;if(typeof me>"u")throw new Error("Assertion failed: Expected an error to have been set");s.configuration.get("enableNetwork")?W.reportError(27,`${q.prettyDescriptor(r,te)} can't be resolved to a satisfying range`):W.reportError(27,`${q.prettyDescriptor(r,te)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),W.reportSeparator(),W.reportExceptionOnce(me)}});if(I.hasErrors())return I.exitCode();let R=!1,N=[],U=[];for(let{suggestedDescriptors:{suggestions:W},target:te}of P){let ie,Ae=W.filter(Be=>Be.descriptor!==null),ce=Ae[0].descriptor,me=Ae.every(Be=>q.areDescriptorsEqual(Be.descriptor,ce));Ae.length===1||me?ie=ce:(R=!0,{answer:ie}=await(0,_1e.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:W.map(({descriptor:Be,name:Ce,reason:g})=>Be?{name:Ce,hint:g,descriptor:Be}:{name:Ce,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(Be){return this.find(Be,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let pe=a.manifest[te].get(ie.identHash);(typeof pe>"u"||pe.descriptorHash!==ie.descriptorHash)&&(a.manifest[te].set(ie.identHash,ie),this.optional&&(te==="dependencies"?a.manifest.ensureDependencyMeta({...ie,range:"unknown"}).optional=!0:te==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...ie,range:"unknown"}).optional=!0)),typeof pe>"u"?N.push([a,te,ie,E]):U.push([a,te,pe,ie]))}return await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyAddition,N),await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyReplacement,U),R&&this.context.stdout.write(` -`),await s.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function U1t(t,e,{dev:r,peer:s,preferDev:a,optional:n}){let c=t.manifest.dependencies.has(e.identHash),f=t.manifest.devDependencies.has(e.identHash),p=t.manifest.peerDependencies.has(e.identHash);if((r||s)&&c)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!s&&p)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&f)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!s&&p)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return s&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:f?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}Ve();Ve();Wt();var oC=class extends ut{constructor(){super(...arguments);this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=ge.String({required:!1})}static{this.paths=[["bin"]]}static{this.usage=ot.Usage({description:"get the path to a binary script",details:` - When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary. - - When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive. - `,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);if(await s.restoreInstallState(),this.name){let f=(await In.getPackageAccessibleBinaries(a,{project:s})).get(this.name);if(!f)throw new nt(`Couldn't find a binary named "${this.name}" for package "${q.prettyLocator(r,a)}"`);let[,p]=f;return this.context.stdout.write(`${p} -`),0}return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async c=>{let f=await In.getPackageAccessibleBinaries(a,{project:s}),h=Array.from(f.keys()).reduce((E,C)=>Math.max(E,C.length),0);for(let[E,[C,S]]of f)c.reportJson({name:E,source:q.stringifyIdent(C),path:S});if(this.verbose)for(let[E,[C]]of f)c.reportInfo(null,`${E.padEnd(h," ")} ${q.prettyLocator(r,C)}`);else for(let E of f.keys())c.reportInfo(null,E)})).exitCode()}};Ve();bt();Wt();var aC=class extends ut{constructor(){super(...arguments);this.mirror=ge.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=ge.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}static{this.paths=[["cache","clean"],["cache","clear"]]}static{this.usage=ot.Usage({description:"remove the shared cache files",details:` - This command will remove all the files from the cache. - `,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(!r.get("enableCacheClean"))throw new nt("Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.");let s=await Jr.find(r);return(await Ot.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&s.mirrorCwd!==null,c=!this.mirror;n&&(await le.removePromise(s.mirrorCwd),await r.triggerHook(f=>f.cleanGlobalArtifacts,r)),c&&await le.removePromise(s.cwd)})).exitCode()}};Ve();Wt();var H1e=et(aS()),E5=Ie("util"),lC=class extends ut{constructor(){super(...arguments);this.why=ge.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=ge.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=ge.String()}static{this.paths=[["config","get"]]}static{this.usage=ot.Usage({description:"read a configuration settings",details:` - This command will print a configuration setting. - - Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value. - `,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(s)>"u")throw new nt(`Couldn't find a configuration settings named "${s}"`);let c=r.getSpecial(s,{hideSecrets:!this.unsafe,getNativePaths:!0}),f=je.convertMapsToIndexableObjects(c),p=a?(0,H1e.default)(f,a):f,h=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p} -`),h.exitCode();E5.inspect.styles.name="cyan",this.context.stdout.write(`${(0,E5.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})} -`)}return h.exitCode()}};Ve();Wt();var Q2e=et(B5()),T2e=et(aS()),R2e=et(v5()),S5=Ie("util"),cC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String();this.value=ge.String()}static{this.paths=[["config","set"]]}static{this.usage=ot.Usage({description:"change a configuration settings",details:` - This command will set a configuration setting. - - When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean). - - When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects. - `,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new nt(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new nt("This setting only affects the file it's in, and thus cannot be set from the CLI");let f=this.json?JSON.parse(this.value):this.value;await(this.home?I=>ze.updateHomeConfiguration(I):I=>ze.updateConfiguration(s(),I))(I=>{if(n){let R=(0,Q2e.default)(I);return(0,R2e.default)(R,this.name,f),R}else return{...I,[a]:f}});let E=(await ze.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),C=je.convertMapsToIndexableObjects(E),S=n?(0,T2e.default)(C,n):C;return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async I=>{S5.inspect.styles.name="cyan",I.reportInfo(0,`Successfully set ${this.name} to ${(0,S5.inspect)(S,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Ve();Wt();var G2e=et(B5()),W2e=et(L2e()),Y2e=et(b5()),uC=class extends ut{constructor(){super(...arguments);this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String()}static{this.paths=[["config","unset"]]}static{this.usage=ot.Usage({description:"unset a configuration setting",details:` - This command will unset a configuration setting. - `,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new nt(`Couldn't find a configuration settings named "${a}"`);let f=this.home?h=>ze.updateHomeConfiguration(h):h=>ze.updateConfiguration(s(),h);return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await f(C=>{if(!(0,W2e.default)(C,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,C;let S=n?(0,G2e.default)(C):{...C};return(0,Y2e.default)(S,this.name),S}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Ve();bt();Wt();var nF=Ie("util"),fC=class extends ut{constructor(){super(...arguments);this.noDefaults=ge.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=ge.Boolean("-v,--verbose",{hidden:!0});this.why=ge.Boolean("--why",{hidden:!0});this.names=ge.Rest()}static{this.paths=[["config"]]}static{this.usage=ot.Usage({description:"display the current configuration",details:` - This command prints the current active configuration settings. - `,examples:[["Print the active configuration settings","$0 config"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins,{strict:!1}),s=await vI({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(s!==null)return s;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async f=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)f.reportError(34,`Invalid configuration key "${p}" in ${h}`);f.reportSeparator()}if(this.json)for(let p of a){if(this.noDefaults&&!r.sources.has(p))continue;let h=r.settings.get(p);typeof h>"u"&&f.reportError(34,`No configuration key named "${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),C=r.sources.get(p)??"",S=C&&C[0]!=="<"?ue.fromPortablePath(C):C;f.reportJson({key:p,effective:E,source:S,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let C of a){if(this.noDefaults&&!r.sources.has(C))continue;let S=r.settings.get(C),P=r.sources.get(C)??"",I=r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),R={Description:{label:"Description",value:he.tuple(he.Type.MARKDOWN,{text:S.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:he.tuple(P[0]==="<"?he.Type.CODE:he.Type.PATH,P)}};h[C]={value:he.tuple(he.Type.CODE,C),children:R};let N=(U,W)=>{for(let[te,ie]of W)if(ie instanceof Map){let Ae={};U[te]={children:Ae},N(Ae,ie)}else U[te]={label:te,value:he.tuple(he.Type.NO_HINT,(0,nF.inspect)(ie,p))}};I instanceof Map?N(R,I):R.Value={label:"Value",value:he.tuple(he.Type.NO_HINT,(0,nF.inspect)(I,p))}}a.length!==1&&(n=void 0),Qs.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let f=a[0],p=(0,nF.inspect)(r.getSpecial(f,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(` -`),this.context.stdout.write(`${p} -`)}return c.exitCode()}};Ve();Wt();Ul();var iF={};Vt(iF,{Strategy:()=>lS,acceptedStrategies:()=>wvt,dedupe:()=>P5});Ve();Ve();var V2e=et(Sa()),lS=(e=>(e.HIGHEST="highest",e))(lS||{}),wvt=new Set(Object.values(lS)),Bvt={highest:async(t,e,{resolver:r,fetcher:s,resolveOptions:a,fetchOptions:n})=>{let c=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);je.getSetWithDefault(c,E.identHash).add(h)}let f=new Map(je.mapAndFilter(t.storedDescriptors.values(),p=>q.isVirtualDescriptor(p)?je.mapAndFilter.skip:[p.descriptorHash,je.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=f.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let C=t.originalPackages.get(E);if(typeof C>"u")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let S=r.getResolutionDependencies(p,a),P=Object.fromEntries(await je.allSettledSafe(Object.entries(S).map(async([te,ie])=>{let Ae=f.get(ie.descriptorHash);if(typeof Ae>"u")throw new Error(`Assertion failed: The descriptor (${ie.descriptorHash}) should have been registered`);let ce=await Ae.promise;if(!ce)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[te,ce.updatedPackage]})));if(e.length&&!V2e.default.isMatch(q.stringifyIdent(p),e)||!r.shouldPersistResolution(C,a))return C;let I=c.get(p.identHash);if(typeof I>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(I.size===1)return C;let R=[...I].map(te=>{let ie=t.originalPackages.get(te);if(typeof ie>"u")throw new Error(`Assertion failed: The package (${te}) should have been registered`);return ie}),N=await r.getSatisfying(p,P,R,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return C;let W=t.originalPackages.get(U.locatorHash);if(typeof W>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return W}).then(async S=>{let P=await t.preparePackage(S,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:C,updatedPackage:S,resolvedPackage:P})}).catch(S=>{h.reject(S)})}return[...f.values()].map(p=>p.promise)}};async function P5(t,{strategy:e,patterns:r,cache:s,report:a}){let{configuration:n}=t,c=new Yi,f=n.makeResolver(),p=n.makeFetcher(),h={cache:s,checksums:t.storedChecksums,fetcher:p,project:t,report:c,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:f,report:c,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let C=Bvt[e],S=await C(t,r,{resolver:f,resolveOptions:E,fetcher:p,fetchOptions:h}),P=ho.progressViaCounter(S.length);await a.reportProgress(P);let I=0;await Promise.all(S.map(U=>U.then(W=>{if(W===null||W.currentPackage.locatorHash===W.updatedPackage.locatorHash)return;I++;let{descriptor:te,currentPackage:ie,updatedPackage:Ae}=W;a.reportInfo(0,`${q.prettyDescriptor(n,te)} can be deduped from ${q.prettyLocator(n,ie)} to ${q.prettyLocator(n,Ae)}`),a.reportJson({descriptor:q.stringifyDescriptor(te),currentResolution:q.stringifyLocator(ie),updatedResolution:q.stringifyLocator(Ae)}),t.storedResolutions.set(te.descriptorHash,Ae.locatorHash)}).finally(()=>P.tick())));let R;switch(I){case 0:R="No packages";break;case 1:R="One package";break;default:R=`${I} packages`}let N=he.pretty(n,e,he.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${N} strategy`),I})}var AC=class extends ut{constructor(){super(...arguments);this.strategy=ge.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:po(lS)});this.check=ge.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.patterns=ge.Rest()}static{this.paths=[["dedupe"]]}static{this.usage=ot.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=await Jr.find(r);await s.restoreInstallState({restoreResolutions:!1});let n=0,c=await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout,json:this.json},async f=>{n=await P5(s,{strategy:this.strategy,patterns:this.patterns,cache:a,report:f})});return c.hasErrors()?c.exitCode():this.check?n?1:0:await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:a,mode:this.mode})}};Ve();Wt();var pC=class extends ut{static{this.paths=[["--clipanion=definitions"]]}async execute(){let{plugins:e}=await ze.find(this.context.cwd,this.context.plugins),r=[];for(let c of e){let{commands:f}=c[1];if(f){let h=wa.from(f).definitions();r.push([c[0],h])}}let s=this.cli.definitions(),a=(c,f)=>c.split(" ").slice(1).join()===f.split(" ").slice(1).join(),n=K2e()["@yarnpkg/builder"].bundles.standard;for(let c of r){let f=c[1];for(let p of f)s.find(h=>a(h.path,p.path)).plugin={name:c[0],isDefault:n.includes(c[0])}}this.context.stdout.write(`${JSON.stringify(s,null,2)} -`)}};var hC=class extends ut{static{this.paths=[["help"],["--help"],["-h"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};Ve();bt();Wt();var gC=class extends ut{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!q.tryParseIdent(this.leadingArgument)){let r=K.resolve(this.context.cwd,ue.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ve();var dC=class extends ut{static{this.paths=[["-v"],["--version"]]}async execute(){this.context.stdout.write(`${un||""} -`)}};Ve();Ve();Wt();var mC=class extends ut{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[["exec"]]}static{this.usage=ot.Usage({description:"execute a shell script",details:` - This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell. - - It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment). - `,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState(),await In.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:s})}};Ve();Wt();Ul();var yC=class extends ut{constructor(){super(...arguments);this.hash=ge.String({required:!1,validator:qx(IE(),[X2(/^p[0-9a-f]{5}$/)])})}static{this.paths=[["explain","peer-requirements"]]}static{this.usage=ot.Usage({description:"explain a set of peer requirements",details:` - A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters. - - When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not. - - When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement. - - **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`). - `,examples:[["Explain the corresponding peer requirement for a hash","$0 explain peer-requirements p1a4ed"],["List all peer requirements","$0 explain peer-requirements"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState({restoreResolutions:!1}),await s.applyLightResolution(),typeof this.hash<"u"?await Svt(this.hash,s,{stdout:this.context.stdout}):await Dvt(s,{stdout:this.context.stdout})}};async function Svt(t,e,r){let s=e.peerRequirementNodes.get(t);if(typeof s>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:he.tuple(he.Type.NO_HINT,"...")}]:[]}:(a.add(p.requester.locatorHash),{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[q.stringifyLocator(h.requester),n(h)]))}),c=e.peerWarnings.find(p=>p.hash===t);return(await Ot.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=he.mark(e.configuration),E=c?h.Cross:h.Check;if(p.reportInfo(0,`Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} is requested to provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,he.pretty(e.configuration,s.subject,he.Type.LOCATOR)),Qs.emitTree({children:Object.fromEntries(Array.from(s.requests.values(),C=>[q.stringifyLocator(C.requester),n(C)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),s.provided.range==="missing:"){let C=c?"":" , but all peer requests are optional";p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} does not provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)}${C}.`)}else{let C=e.storedResolutions.get(s.provided.descriptorHash);if(!C)throw new Error("Assertion failed: Expected the descriptor to be registered");let S=e.storedPackages.get(C);if(!S)throw new Error("Assertion failed: Expected the package to be registered");p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} provides ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} with version ${q.prettyReference(e.configuration,S.version??"0.0.0")}, ${c?"which does not satisfy all requests.":"which satisfies all requests"}`),c?.type===3&&(c.range?p.reportInfo(0,` The combined requested range is ${he.pretty(e.configuration,c.range,he.Type.RANGE)}`):p.reportInfo(0," Unfortunately, the requested ranges have no overlap"))}})).exitCode()}async function Dvt(t,e){return(await Ot.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async s=>{let a=he.mark(t.configuration),n=je.sortMap(t.peerRequirementNodes,[([,c])=>q.stringifyLocator(c.subject),([,c])=>q.stringifyIdent(c.ident)]);for(let[,c]of n.values()){if(!c.root)continue;let f=t.peerWarnings.find(E=>E.hash===c.hash),p=[...q.allPeerRequests(c)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=" and 1 other dependency":h="",c.provided.range!=="missing:"){let E=t.storedResolutions.get(c.provided.descriptorHash);if(!E)throw new Error("Assertion failed: Expected the resolution to have been registered");let C=t.storedPackages.get(E);if(!C)throw new Error("Assertion failed: Expected the provided package to have been registered");let S=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${q.prettyLocator(t.configuration,c.subject)} provides ${q.prettyLocator(t.configuration,C)} to ${q.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,S):s.reportInfo(0,S)}else{let E=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${q.prettyLocator(t.configuration,c.subject)} doesn't provide ${q.prettyIdent(t.configuration,c.ident)} to ${q.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,E):s.reportInfo(0,E)}}})).exitCode()}Ve();Wt();Ul();Ve();Ve();bt();Wt();var J2e=et(Ai()),EC=class extends ut{constructor(){super(...arguments);this.useYarnPath=ge.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=ge.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=ge.String()}static{this.paths=[["set","version"]]}static{this.usage=ot.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set the `--yarn-path` command line flag, then the release will also be downloaded from the Yarn GitHub repository, stored inside your project, and referenced via the `yarnPath` settings from your project `.yarnrc.yml` file.\n\n A very good use case for this command is to enforce the version of Yarn used by any single member of your team inside the same project - by doing this you ensure that you have control over Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting different behavior.\n\n The version specifier can be:\n\n - a tag:\n - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\n - `canary` -> the most recent canary (release candidate) berry (`>=2.0.0`) release\n - `classic` -> the most recent classic (`^0.x || ^1.x`) release\n\n - a semver range (e.g. `2.x`) -> the most recent version satisfying the range (limited to berry releases)\n\n - a semver version (e.g. `2.4.1`, `1.22.1`)\n\n - a local file referenced through either a relative or absolute path\n\n - `self` -> the version used to invoke the command\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest canary release from the Yarn repository","$0 set version canary"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download the most recent Yarn 3 build","$0 set version 3.x"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"],["Use a release from the local filesystem","$0 set version ./yarn.cjs"],["Use a release from a URL","$0 set version https://repo.yarnpkg.com/3.1.0/packages/yarnpkg-cli/bin/yarn.js"],["Download the version used to invoke the command","$0 set version self"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get("yarnPath")){let f=r.sources.get("yarnPath");if(!f)throw new Error("Assertion failed: Expected 'yarnPath' to have a source");let p=r.projectCwd??r.startingCwd;if(K.contains(p,f))return 0}let s=()=>{if(typeof un>"u")throw new nt("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},a,n=(f,p)=>({version:p,url:f.replace(/\{\}/g,p)});if(this.version==="self")a={url:s(),version:un??"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await cS(r,"stable"));else if(this.version==="canary")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await cS(r,"canary"));else if(this.version==="classic")a={url:"https://classic.yarnpkg.com/latest.js",version:"classic"};else if(this.version.match(/^https?:/))a={url:this.version,version:"remote"};else if(this.version.match(/^\.{0,2}[\\/]/)||ue.isAbsolute(this.version))a={url:`file://${K.resolve(ue.toPortablePath(this.version))}`,version:"file"};else if(Or.satisfiesWithPrereleases(this.version,">=2.0.0"))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",this.version);else if(Or.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))a=n("https://github.com/yarnpkg/yarn/releases/download/v{}/yarn-{}.js",this.version);else if(Or.validRange(this.version))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await bvt(r,this.version));else throw new nt(`Invalid version descriptor "${this.version}"`);return(await Ot.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async f=>{let p=async()=>{let h="file://";return a.url.startsWith(h)?(f.reportInfo(0,`Retrieving ${he.pretty(r,a.url,he.Type.PATH)}`),await le.readFilePromise(a.url.slice(h.length))):(f.reportInfo(0,`Downloading ${he.pretty(r,a.url,he.Type.URL)}`),await An.get(a.url,{configuration:r}))};await x5(r,a.version,p,{report:f,useYarnPath:this.useYarnPath})})).exitCode()}};async function bvt(t,e){let s=(await An.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0})).tags.filter(a=>Or.satisfiesWithPrereleases(a,e));if(s.length===0)throw new nt(`No matching release found for range ${he.pretty(t,e,he.Type.RANGE)}.`);return s[0]}async function cS(t,e){let r=await An.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0});if(!r.latest[e])throw new nt(`Tag ${he.pretty(t,e,he.Type.RANGE)} not found`);return r.latest[e]}async function x5(t,e,r,{report:s,useYarnPath:a}){let n,c=async()=>(typeof n>"u"&&(n=await r()),n);if(e===null){let te=await c();await le.mktempPromise(async ie=>{let Ae=K.join(ie,"yarn.cjs");await le.writeFilePromise(Ae,te);let{stdout:ce}=await Gr.execvp(process.execPath,[ue.fromPortablePath(Ae),"--version"],{cwd:ie,env:{...t.env,YARN_IGNORE_PATH:"1"}});if(e=ce.trim(),!J2e.default.valid(e))throw new Error(`Invalid semver version. ${he.pretty(t,"yarn --version",he.Type.CODE)} returned: -${e}`)})}let f=t.projectCwd??t.startingCwd,p=K.resolve(f,".yarn/releases"),h=K.resolve(p,`yarn-${e}.cjs`),E=K.relative(t.startingCwd,h),C=je.isTaggedYarnVersion(e),S=t.get("yarnPath"),P=!C,I=P||!!S||!!a;if(a===!1){if(P)throw new Yt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");I=!1}else!I&&!process.env.COREPACK_ROOT&&(s.reportWarning(0,`You don't seem to have ${he.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${he.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),I=!0);if(I){let te=await c();s.reportInfo(0,`Saving the new release in ${he.pretty(t,E,"magenta")}`),await le.removePromise(K.dirname(h)),await le.mkdirPromise(K.dirname(h),{recursive:!0}),await le.writeFilePromise(h,te,{mode:493}),await ze.updateConfiguration(f,{yarnPath:K.relative(f,h)})}else await le.removePromise(K.dirname(h)),await ze.updateConfiguration(f,{yarnPath:ze.deleteProperty});let R=await Ht.tryFind(f)||new Ht;R.packageManager=`yarn@${C?e:await cS(t,"stable")}`;let N={};R.exportTo(N);let U=K.join(f,Ht.fileName),W=`${JSON.stringify(N,null,R.indent)} -`;return await le.changeFilePromise(U,W,{automaticNewlines:!0}),{bundleVersion:e}}function z2e(t){return Dr[zx(t)]}var Pvt=/## (?YN[0-9]{4}) - `(?[A-Z_]+)`\n\n(?

(?:.(?!##))+)/gs;async function xvt(t){let r=`https://repo.yarnpkg.com/${je.isTaggedYarnVersion(un)?un:await cS(t,"canary")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,s=await An.get(r,{configuration:t});return new Map(Array.from(s.toString().matchAll(Pvt),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=z2e(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var IC=class extends ut{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:$2(IE(),[X2(/^YN[0-9]{4}$/)])});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["explain"]]}static{this.usage=ot.Usage({description:"explain an error code",details:` - When the code argument is specified, this command prints its name and its details. - - When used without arguments, this command lists all error codes and their names. - `,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let s=z2e(this.code),a=he.pretty(r,s,he.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),f=(await xvt(r)).get(this.code),p=typeof f<"u"?he.jsonOrPretty(this.json,r,he.tuple(he.Type.MARKDOWN,{text:f,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description. - -You can help us by editing this page on GitHub \u{1F642}: -${he.jsonOrPretty(this.json,r,he.tuple(he.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx"))} -`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:s,details:p})} -`):this.context.stdout.write(`${n} - -${p} -`)}else{let s={children:je.mapAndFilter(Object.entries(Dr),([a,n])=>Number.isNaN(Number(a))?je.mapAndFilter.skip:{label:Vf(Number(a)),value:he.tuple(he.Type.CODE,n)})};Qs.emitTree(s,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Ve();bt();Wt();var Z2e=et(Sa()),CC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=ge.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=ge.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=ge.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=ge.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=ge.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=ge.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}static{this.paths=[["info"]]}static{this.usage=ot.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a&&!this.all)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=new Set(this.extra);this.cache&&c.add("cache"),this.dependents&&c.add("dependents"),this.manifest&&c.add("manifest");let f=(ie,{recursive:Ae})=>{let ce=ie.anchoredLocator.locatorHash,me=new Map,pe=[ce];for(;pe.length>0;){let Be=pe.shift();if(me.has(Be))continue;let Ce=s.storedPackages.get(Be);if(typeof Ce>"u")throw new Error("Assertion failed: Expected the package to be registered");if(me.set(Be,Ce),q.isVirtualLocator(Ce)&&pe.push(q.devirtualizeLocator(Ce).locatorHash),!(!Ae&&Be!==ce))for(let g of Ce.dependencies.values()){let we=s.storedResolutions.get(g.descriptorHash);if(typeof we>"u")throw new Error("Assertion failed: Expected the resolution to be registered");pe.push(we)}}return me.values()},p=({recursive:ie})=>{let Ae=new Map;for(let ce of s.workspaces)for(let me of f(ce,{recursive:ie}))Ae.set(me.locatorHash,me);return Ae.values()},h=({all:ie,recursive:Ae})=>ie&&Ae?s.storedPackages.values():ie?p({recursive:Ae}):f(a,{recursive:Ae}),E=({all:ie,recursive:Ae})=>{let ce=h({all:ie,recursive:Ae}),me=this.patterns.map(Ce=>{let g=q.parseLocator(Ce),we=Z2e.default.makeRe(q.stringifyIdent(g)),ye=q.isVirtualLocator(g),fe=ye?q.devirtualizeLocator(g):g;return se=>{let X=q.stringifyIdent(se);if(!we.test(X))return!1;if(g.reference==="unknown")return!0;let De=q.isVirtualLocator(se),Re=De?q.devirtualizeLocator(se):se;return!(ye&&De&&g.reference!==se.reference||fe.reference!==Re.reference)}}),pe=je.sortMap([...ce],Ce=>q.stringifyLocator(Ce));return{selection:pe.filter(Ce=>me.length===0||me.some(g=>g(Ce))),sortedLookup:pe}},{selection:C,sortedLookup:S}=E({all:this.all,recursive:this.recursive});if(C.length===0)throw new nt("No package matched your request");let P=new Map;if(this.dependents)for(let ie of S)for(let Ae of ie.dependencies.values()){let ce=s.storedResolutions.get(Ae.descriptorHash);if(typeof ce>"u")throw new Error("Assertion failed: Expected the resolution to be registered");je.getArrayWithDefault(P,ce).push(ie)}let I=new Map;for(let ie of S){if(!q.isVirtualLocator(ie))continue;let Ae=q.devirtualizeLocator(ie);je.getArrayWithDefault(I,Ae.locatorHash).push(ie)}let R={},N={children:R},U=r.makeFetcher(),W={project:s,fetcher:U,cache:n,checksums:s.storedChecksums,report:new Yi,cacheOptions:{skipIntegrityCheck:!0}},te=[async(ie,Ae,ce)=>{if(!Ae.has("manifest"))return;let me=await U.fetch(ie,W),pe;try{pe=await Ht.find(me.prefixPath,{baseFs:me.packageFs})}finally{me.releaseFs?.()}ce("Manifest",{License:he.tuple(he.Type.NO_HINT,pe.license),Homepage:he.tuple(he.Type.URL,pe.raw.homepage??null)})},async(ie,Ae,ce)=>{if(!Ae.has("cache"))return;let me=s.storedChecksums.get(ie.locatorHash)??null,pe=n.getLocatorPath(ie,me),Be;if(pe!==null)try{Be=await le.statPromise(pe)}catch{}let Ce=typeof Be<"u"?[Be.size,he.Type.SIZE]:void 0;ce("Cache",{Checksum:he.tuple(he.Type.NO_HINT,me),Path:he.tuple(he.Type.PATH,pe),Size:Ce})}];for(let ie of C){let Ae=q.isVirtualLocator(ie);if(!this.virtuals&&Ae)continue;let ce={},me={value:[ie,he.Type.LOCATOR],children:ce};if(R[q.stringifyLocator(ie)]=me,this.nameOnly){delete me.children;continue}let pe=I.get(ie.locatorHash);typeof pe<"u"&&(ce.Instances={label:"Instances",value:he.tuple(he.Type.NUMBER,pe.length)}),ce.Version={label:"Version",value:he.tuple(he.Type.NO_HINT,ie.version)};let Be=(g,we)=>{let ye={};if(ce[g]=ye,Array.isArray(we))ye.children=we.map(fe=>({value:fe}));else{let fe={};ye.children=fe;for(let[se,X]of Object.entries(we))typeof X>"u"||(fe[se]={label:se,value:X})}};if(!Ae){for(let g of te)await g(ie,c,Be);await r.triggerHook(g=>g.fetchPackageInfo,ie,c,Be)}ie.bin.size>0&&!Ae&&Be("Exported Binaries",[...ie.bin.keys()].map(g=>he.tuple(he.Type.PATH,g)));let Ce=P.get(ie.locatorHash);typeof Ce<"u"&&Ce.length>0&&Be("Dependents",Ce.map(g=>he.tuple(he.Type.LOCATOR,g))),ie.dependencies.size>0&&!Ae&&Be("Dependencies",[...ie.dependencies.values()].map(g=>{let we=s.storedResolutions.get(g.descriptorHash),ye=typeof we<"u"?s.storedPackages.get(we)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:ye})})),ie.peerDependencies.size>0&&Ae&&Be("Peer dependencies",[...ie.peerDependencies.values()].map(g=>{let we=ie.dependencies.get(g.identHash),ye=typeof we<"u"?s.storedResolutions.get(we.descriptorHash)??null:null,fe=ye!==null?s.storedPackages.get(ye)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:fe})}))}Qs.emitTree(N,{configuration:r,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};Ve();bt();Bc();var sF=et(Rd());Wt();var k5=et(Ai());Ul();var kvt=[{selector:t=>t===-1,name:"nodeLinker",value:"node-modules"},{selector:t=>t!==-1&&t<8,name:"enableGlobalCache",value:!1},{selector:t=>t!==-1&&t<8,name:"compressionLevel",value:"mixed"}],wC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.immutable=ge.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"});this.immutableCache=ge.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"});this.refreshLockfile=ge.Boolean("--refresh-lockfile",{description:"Refresh the package metadata stored in the lockfile"});this.checkCache=ge.Boolean("--check-cache",{description:"Always refetch the packages and ensure that their checksums are consistent"});this.checkResolutions=ge.Boolean("--check-resolutions",{description:"Validates that the package resolutions are coherent"});this.inlineBuilds=ge.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.cacheFolder=ge.String("--cache-folder",{hidden:!0});this.frozenLockfile=ge.Boolean("--frozen-lockfile",{hidden:!0});this.ignoreEngines=ge.Boolean("--ignore-engines",{hidden:!0});this.nonInteractive=ge.Boolean("--non-interactive",{hidden:!0});this.preferOffline=ge.Boolean("--prefer-offline",{hidden:!0});this.production=ge.Boolean("--production",{hidden:!0});this.registry=ge.String("--registry",{hidden:!0});this.silent=ge.Boolean("--silent",{hidden:!0});this.networkTimeout=ge.String("--network-timeout",{hidden:!0})}static{this.paths=[["install"],ot.Default]}static{this.usage=ot.Usage({description:"install the project dependencies",details:"\n This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where the cache files are stored).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked with writing them on the disk in some form (for example by generating the `.pnp.cjs` file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another. See https://yarnpkg.com/advanced/lifecycle-scripts for detail.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your `.pnp.cjs` file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePatterns` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\n\n If the `--refresh-lockfile` option is set, Yarn will keep the same resolution for the packages currently in the lockfile but will refresh their metadata. If used together with `--immutable`, it can validate that the lockfile information are consistent. This flag is enabled by default when Yarn detects it runs within a pull request context.\n\n If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\n\n If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n ",examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds<"u"&&r.useWithSource("",{enableInlineBuilds:this.inlineBuilds},r.startingCwd,{overwrite:!0});let s=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=await vI({configuration:r,stdout:this.context.stdout},[{option:this.ignoreEngines,message:"The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",error:!sF.default.VERCEL},{option:this.registry,message:"The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file"},{option:this.preferOffline,message:"The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",error:!sF.default.VERCEL},{option:this.production,message:"The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",error:!0},{option:this.nonInteractive,message:"The --non-interactive option is deprecated",error:!s},{option:this.frozenLockfile,message:"The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",callback:()=>this.immutable=this.frozenLockfile},{option:this.cacheFolder,message:"The cache-folder option has been deprecated; use rc settings instead",error:!sF.default.NETLIFY}]);if(a!==null)return a;let n=this.mode==="update-lockfile";if(n&&(this.immutable||this.immutableCache))throw new nt(`${he.pretty(r,"--immutable",he.Type.CODE)} and ${he.pretty(r,"--immutable-cache",he.Type.CODE)} cannot be used with ${he.pretty(r,"--mode=update-lockfile",he.Type.CODE)}`);let c=(this.immutable??r.get("enableImmutableInstalls"))&&!n,f=this.immutableCache&&!n;if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U=!1;await Rvt(r,c)&&(N.reportInfo(48,"Automatically removed core plugins that are now builtins \u{1F44D}"),U=!0),await Tvt(r,c)&&(N.reportInfo(48,"Automatically fixed merge conflicts \u{1F44D}"),U=!0),U&&N.reportSeparator()});if(R.hasErrors())return R.exitCode()}if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{if(ze.telemetry?.isNew)ze.telemetry.commitTips(),N.reportInfo(65,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),N.reportInfo(65,`Run ${he.pretty(r,"yarn config set --home enableTelemetry 0",he.Type.CODE)} to disable`),N.reportSeparator();else if(ze.telemetry?.shouldShowTips){let U=await An.get("https://repo.yarnpkg.com/tags",{configuration:r,jsonResponse:!0}).catch(()=>null);if(U!==null){let W=null;if(un!==null){let ie=k5.default.prerelease(un)?"canary":"stable",Ae=U.latest[ie];k5.default.gt(Ae,un)&&(W=[ie,Ae])}if(W)ze.telemetry.commitTips(),N.reportInfo(88,`${he.applyStyle(r,`A new ${W[0]} version of Yarn is available:`,he.Style.BOLD)} ${q.prettyReference(r,W[1])}!`),N.reportInfo(88,`Upgrade now by running ${he.pretty(r,`yarn set version ${W[1]}`,he.Type.CODE)}`),N.reportSeparator();else{let te=ze.telemetry.selectTip(U.tips);te&&(N.reportInfo(89,he.pretty(r,te.message,he.Type.MARKDOWN_INLINE)),te.url&&N.reportInfo(89,`Learn more at ${te.url}`),N.reportSeparator())}}}});if(R.hasErrors())return R.exitCode()}let{project:p,workspace:h}=await Tt.find(r,this.context.cwd),E=p.lockfileLastVersion;if(E!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U={};for(let W of kvt)W.selector(E)&&typeof r.sources.get(W.name)>"u"&&(r.use("",{[W.name]:W.value},p.cwd,{overwrite:!0}),U[W.name]=W.value);Object.keys(U).length>0&&(await ze.updateConfiguration(p.cwd,U),N.reportInfo(87,"Migrated your project to the latest Yarn version \u{1F680}"),N.reportSeparator())});if(R.hasErrors())return R.exitCode()}let C=await Jr.find(r,{immutable:f,check:this.checkCache});if(!h)throw new ar(p.cwd,this.context.cwd);await p.restoreInstallState({restoreResolutions:!1});let S=r.get("enableHardenedMode");S&&typeof r.sources.get("enableHardenedMode")>"u"&&await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{R.reportWarning(0,"Yarn detected that the current workflow is executed from a public pull request. For safety the hardened mode has been enabled."),R.reportWarning(0,`It will prevent malicious lockfile manipulations, in exchange for a slower install time. You can opt-out if necessary; check our ${he.applyHyperlink(r,"documentation","https://yarnpkg.com/features/security#hardened-mode")} for more details.`),R.reportSeparator()}),(this.refreshLockfile??S)&&(p.lockfileNeedsRefresh=!0);let P=this.checkResolutions??S;return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,forceSectionAlignment:!0,includeLogs:!0,includeVersion:!0},async R=>{await p.install({cache:C,report:R,immutable:c,checkResolutions:P,mode:this.mode})})).exitCode()}},Qvt="<<<<<<<";async function Tvt(t,e){if(!t.projectCwd)return!1;let r=K.join(t.projectCwd,Er.lockfile);if(!await le.existsPromise(r)||!(await le.readFilePromise(r,"utf8")).includes(Qvt))return!1;if(e)throw new Yt(47,"Cannot autofix a lockfile when running an immutable install");let a=await Gr.execvp("git",["rev-parse","MERGE_HEAD","HEAD"],{cwd:t.projectCwd});if(a.code!==0&&(a=await Gr.execvp("git",["rev-parse","REBASE_HEAD","HEAD"],{cwd:t.projectCwd})),a.code!==0&&(a=await Gr.execvp("git",["rev-parse","CHERRY_PICK_HEAD","HEAD"],{cwd:t.projectCwd})),a.code!==0)throw new Yt(83,"Git returned an error when trying to find the commits pertaining to the conflict");let n=await Promise.all(a.stdout.trim().split(/\n/).map(async f=>{let p=await Gr.execvp("git",["show",`${f}:./${Er.lockfile}`],{cwd:t.projectCwd});if(p.code!==0)throw new Yt(83,`Git returned an error when trying to access the lockfile content in ${f}`);try{return cs(p.stdout)}catch{throw new Yt(46,"A variant of the conflicting lockfile failed to parse")}}));n=n.filter(f=>!!f.__metadata);for(let f of n){if(f.__metadata.version<7)for(let p of Object.keys(f)){if(p==="__metadata")continue;let h=q.parseDescriptor(p,!0),E=t.normalizeDependency(h),C=q.stringifyDescriptor(E);C!==p&&(f[C]=f[p],delete f[p])}for(let p of Object.keys(f)){if(p==="__metadata")continue;let h=f[p].checksum;typeof h>"u"||h.includes("/")||(f[p].checksum=`${f.__metadata.cacheKey}/${h}`)}}let c=Object.assign({},...n);c.__metadata.version=`${Math.min(...n.map(f=>parseInt(f.__metadata.version??0)))}`,c.__metadata.cacheKey="merged";for(let[f,p]of Object.entries(c))typeof p=="string"&&delete c[f];return await le.changeFilePromise(r,il(c),{automaticNewlines:!0}),!0}async function Rvt(t,e){if(!t.projectCwd)return!1;let r=[],s=K.join(t.projectCwd,".yarn/plugins/@yarnpkg");return await ze.updateConfiguration(t.projectCwd,{plugins:n=>{if(!Array.isArray(n))return n;let c=n.filter(f=>{if(!f.path)return!0;let p=K.resolve(t.projectCwd,f.path),h=hv.has(f.spec)&&K.contains(s,p);return h&&r.push(p),!h});return c.length===0?ze.deleteProperty:c.length===n.length?n:c}},{immutable:e})?(await Promise.all(r.map(async n=>{await le.removePromise(n)})),!0):!1}Ve();bt();Wt();var BC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target projects to the current one"});this.private=ge.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target projects to the current one"});this.relative=ge.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destinations=ge.Rest()}static{this.paths=[["link"]]}static{this.usage=ot.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register one or more remote workspaces for use in the current project","$0 link ~/ts-loader ~/jest"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=s.topLevelWorkspace,f=[];for(let p of this.destinations){let h=K.resolve(this.context.cwd,ue.toPortablePath(p)),E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(s.cwd===C.cwd)throw new nt(`Invalid destination '${p}'; Can't link the project to itself`);if(!S)throw new ar(C.cwd,h);if(this.all){let P=!1;for(let I of C.workspaces)I.manifest.name&&(!I.manifest.private||this.private)&&(f.push(I),P=!0);if(!P)throw new nt(`No workspace found to be linked in the target project: ${p}`)}else{if(!S.manifest.name)throw new nt(`The target workspace at '${p}' doesn't have a name and thus cannot be linked`);if(S.manifest.private&&!this.private)throw new nt(`The target workspace at '${p}' is marked private - use the --private flag to link it anyway`);f.push(S)}}for(let p of f){let h=q.stringifyIdent(p.anchoredLocator),E=this.relative?K.relative(s.cwd,p.cwd):p.cwd;c.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${E}`})}return await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Wt();var vC=class extends ut{constructor(){super(...arguments);this.args=ge.Proxy()}static{this.paths=[["node"]]}static{this.usage=ot.Usage({description:"run node with the hook already setup",details:` - This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment). - - The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version. - `,examples:[["Run a Node script","$0 node ./my-script.js"]]})}async execute(){return this.cli.run(["exec","node",...this.args])}};Ve();Wt();var SC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","check"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:` - Check only the plugins from https. - - If this command detects any plugin differences in the CI environment, it will throw an error. - `,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await ze.findRcFiles(this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let c of s)if(c.data?.plugins)for(let f of c.data.plugins){if(!f.checksum||!f.spec.match(/^https?:/))continue;let p=await An.get(f.spec,{configuration:r}),h=Nn.makeHash(p);if(f.checksum===h)continue;let E=he.pretty(r,f.path,he.Type.PATH),C=he.pretty(r,f.spec,he.Type.URL),S=`${E} is different from the file provided by ${C}`;n.reportJson({...f,newChecksum:h}),n.reportError(0,S)}})).exitCode()}};Ve();Ve();bt();Wt();var rBe=Ie("os");Ve();bt();Wt();var X2e=Ie("os");Ve();Bc();Wt();var Fvt="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function vm(t,e){let r=await An.get(Fvt,{configuration:t}),s=cs(r.toString());return Object.fromEntries(Object.entries(s).filter(([a,n])=>!e||Or.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var DC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","list"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await vm(r,un);for(let[c,{experimental:f,...p}]of Object.entries(n)){let h=c;f&&(h+=" [experimental]"),a.reportJson({name:c,experimental:f,...p}),a.reportInfo(null,h)}})).exitCode()}};var Nvt=/^[0-9]+$/,Ovt=process.platform==="win32";function $2e(t){return Nvt.test(t)?`pull/${t}/head`:t}var Lvt=({repository:t,branch:e},r)=>[["git","init",ue.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",$2e(e)],["git","reset","--hard","FETCH_HEAD"]],Mvt=({branch:t})=>[["git","fetch","origin","--depth=1",$2e(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],_vt=({plugins:t,noMinify:e},r,s)=>[["yarn","build:cli",...new Array().concat(...t.map(a=>["--plugin",K.resolve(s,a)])),...e?["--no-minify"]:[],"|"],[Ovt?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",ue.fromPortablePath(r),"|"]],bC=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=ge.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=ge.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}static{this.paths=[["set","version","from","sources"]]}static{this.usage=ot.Usage({description:"build Yarn from master",details:` - This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project. - - By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag. - `,examples:[["Build Yarn from master","$0 set version from sources"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.installPath<"u"?K.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):K.resolve(ue.toPortablePath((0,X2e.tmpdir)()),"yarnpkg-sources",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{await Q5(this,{configuration:r,report:c,target:a}),c.reportSeparator(),c.reportInfo(0,"Building a fresh bundle"),c.reportSeparator();let f=await Gr.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=K.join(a,`packages/yarnpkg-cli/bundles/yarn-${f.stdout.trim()}.js`);le.existsSync(p)||(await uS(_vt(this,p,a),{configuration:r,context:this.context,target:a}),c.reportSeparator());let h=await le.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await x5(r,null,async()=>h,{report:c});this.skipPlugins||await Uvt(this,E,{project:s,report:c,target:a})}})).exitCode()}};async function uS(t,{configuration:e,context:r,target:s}){for(let[a,...n]of t){let c=n[n.length-1]==="|";if(c&&n.pop(),c)await Gr.pipevp(a,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${he.pretty(e,` $ ${[a,...n].join(" ")}`,"grey")} -`);try{await Gr.execvp(a,n,{cwd:s,strict:!0})}catch(f){throw r.stdout.write(f.stdout||f.stack),f}}}}async function Q5(t,{configuration:e,report:r,target:s}){let a=!1;if(!t.force&&le.existsSync(K.join(s,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await uS(Mvt(t),{configuration:e,context:t.context,target:s}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await le.removePromise(s),await le.mkdirPromise(s,{recursive:!0}),await uS(Lvt(t,s),{configuration:e,context:t.context,target:s}))}async function Uvt(t,e,{project:r,report:s,target:a}){let n=await vm(r.configuration,e),c=new Set(Object.keys(n));for(let f of r.configuration.plugins.keys())c.has(f)&&await T5(f,t,{project:r,report:s,target:a})}Ve();Ve();bt();Wt();var eBe=et(Ai()),tBe=Ie("vm");var PC=class extends ut{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}static{this.paths=[["plugin","import"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"download a plugin",details:` - This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations. - - Three types of plugin references are accepted: - - - If the plugin is stored within the Yarn repository, it can be referenced by name. - - Third-party plugins can be referenced directly through their public urls. - - Local plugins can be referenced by their path on the disk. - - If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified. - - Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package). - `,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Tt.find(r,this.context.cwd),c,f;if(this.name.match(/^\.{0,2}[\\/]/)||ue.isAbsolute(this.name)){let p=K.resolve(this.context.cwd,ue.toPortablePath(this.name));a.reportInfo(0,`Reading ${he.pretty(r,p,he.Type.PATH)}`),c=K.relative(n.cwd,p),f=await le.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Yt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}c=this.name,p=this.name}else{let h=q.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!eBe.default.valid(h.reference))throw new Yt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=q.stringifyIdent(h),C=await vm(r,un);if(!Object.hasOwn(C,E)){let S=`Couldn't find a plugin named ${q.prettyIdent(r,h)} on the remote registry. -`;throw r.plugins.has(E)?S+=`A plugin named ${q.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:S+=`Note that only the plugins referenced on our website (${he.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",he.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${he.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",he.Type.URL)}).`,new Yt(51,S)}c=E,p=C[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):un!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${un}/`))}a.reportInfo(0,`Downloading ${he.pretty(r,p,"green")}`),f=await An.get(p,{configuration:r})}await R5(c,f,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function R5(t,e,{checksum:r=!0,project:s,report:a}){let{configuration:n}=s,c={},f={exports:c};(0,tBe.runInNewContext)(e.toString(),{module:f,exports:c});let h=`.yarn/plugins/${f.exports.name}.cjs`,E=K.resolve(s.cwd,h);a.reportInfo(0,`Saving the new plugin in ${he.pretty(n,h,"magenta")}`),await le.mkdirPromise(K.dirname(E),{recursive:!0}),await le.writeFilePromise(E,e);let C={path:h,spec:t};r&&(C.checksum=Nn.makeHash(e)),await ze.addPlugin(s.cwd,[C])}var Hvt=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],xC=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=ge.String()}static{this.paths=[["plugin","import","from","sources"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:` - This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations. - - The plugins can be referenced by their short name if sourced from the official Yarn repository. - `,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.installPath<"u"?K.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):K.resolve(ue.toPortablePath((0,rBe.tmpdir)()),"yarnpkg-sources",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:c}=await Tt.find(r,this.context.cwd),f=q.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=q.stringifyIdent(f),h=await vm(r,un);if(!Object.hasOwn(h,p))throw new Yt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await Q5(this,{configuration:r,report:n,target:s}),await T5(E,this,{project:c,report:n,target:s})})).exitCode()}};async function T5(t,{context:e,noMinify:r},{project:s,report:a,target:n}){let c=t.replace(/@yarnpkg\//,""),{configuration:f}=s;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${c}`),a.reportSeparator(),await uS(Hvt({pluginName:c,noMinify:r},n),{configuration:f,context:e,target:n}),a.reportSeparator();let p=K.resolve(n,`packages/${c}/bundles/${t}.js`),h=await le.readFilePromise(p);await R5(t,h,{project:s,report:a})}Ve();bt();Wt();var kC=class extends ut{constructor(){super(...arguments);this.name=ge.String()}static{this.paths=[["plugin","remove"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"remove a plugin",details:` - This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration. - - **Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed. - `,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c=this.name,f=q.parseIdent(c);if(!r.plugins.has(c))throw new nt(`${q.prettyIdent(r,f)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${c}.cjs`,h=K.resolve(s.cwd,p);le.existsSync(h)&&(n.reportInfo(0,`Removing ${he.pretty(r,p,he.Type.PATH)}...`),await le.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await ze.updateConfiguration(s.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let C=E.filter(S=>S.path!==p);return C.length===0?ze.deleteProperty:C.length===E.length?E:C}})})).exitCode()}};Ve();Wt();var QC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","runtime"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"list the active plugins",details:` - This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins. - `,examples:[["List the currently active plugins","$0 plugin runtime"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let c=this.context.plugins.plugins.has(n),f=n;c&&(f+=" [builtin]"),a.reportJson({name:n,builtin:c}),a.reportInfo(null,`${f}`)}})).exitCode()}};Ve();Ve();Wt();var TC=class extends ut{constructor(){super(...arguments);this.idents=ge.Rest()}static{this.paths=[["rebuild"]]}static{this.usage=ot.Usage({description:"rebuild the project's native packages",details:` - This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again. - - Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future). - - By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory. - `,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=new Set;for(let f of this.idents)c.add(q.parseIdent(f).identHash);if(await s.restoreInstallState({restoreResolutions:!1}),await s.resolveEverything({cache:n,report:new Yi}),c.size>0)for(let f of s.storedPackages.values())c.has(f.identHash)&&(s.storedBuildState.delete(f.locatorHash),s.skippedBuilds.delete(f.locatorHash));else s.storedBuildState.clear(),s.skippedBuilds.clear();return await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Wt();var F5=et(Sa());Ul();var RC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.patterns=ge.Rest()}static{this.paths=[["remove"]]}static{this.usage=ot.Usage({description:"remove dependencies from the project",details:` - This command will remove the packages matching the specified patterns from the current workspace. - - If the \`--mode=\` option is set, Yarn will change which artifacts are generated. The modes currently supported are: - - - \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run. - - - \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost. - - This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. - `,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.all?s.workspaces:[a],f=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let I of this.patterns){let R=!1,N=q.parseIdent(I);for(let U of c){let W=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,F5.default)(W,I))U.manifest.peerDependenciesMeta.delete(te),h=!0,R=!0;for(let te of f){let ie=U.manifest.getForScope(te),Ae=[...ie.values()].map(ce=>q.stringifyIdent(ce));for(let ce of(0,F5.default)(Ae,q.stringifyIdent(N))){let{identHash:me}=q.parseIdent(ce),pe=ie.get(me);if(typeof pe>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[te].delete(me),E.push([U,te,pe]),h=!0,R=!0}}}R||p.push(I)}let C=p.length>1?"Patterns":"Pattern",S=p.length>1?"don't":"doesn't",P=this.all?"any":"this";if(p.length>0)throw new nt(`${C} ${he.prettyList(r,p,he.Type.CODE)} ${S} match any packages referenced by ${P} workspace`);return h?(await r.triggerMultipleHooks(I=>I.afterWorkspaceDependencyRemoval,E),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};Ve();Ve();Wt();var nBe=Ie("util"),FC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["run"]]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async c=>{let f=a.manifest.scripts,p=je.sortMap(f.keys(),C=>C),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((C,S)=>Math.max(C,S.length),0);for(let[C,S]of f.entries())c.reportInfo(null,`${C.padEnd(E," ")} ${(0,nBe.inspect)(S,h)}`),c.reportJson({name:C,script:S})})).exitCode()}};Ve();Ve();Wt();var NC=class extends ut{constructor(){super(...arguments);this.inspect=ge.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=ge.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=ge.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=ge.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=ge.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=ge.Boolean("--silent",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}static{this.paths=[["run"]]}static{this.usage=ot.Usage({description:"run a script defined in the package.json",details:` - This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace: - - - If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed. - - - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed. - - - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed. - - Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax). - `,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a,locator:n}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let c=this.topLevel?s.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await In.hasPackageScript(c,this.scriptName,{project:s}))return await In.executePackageScript(c,this.scriptName,this.args,{project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let f=await In.getPackageAccessibleBinaries(c,{project:s});if(f.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await In.executePackageAccessibleBinary(c,this.scriptName,this.args,{cwd:this.context.cwd,project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:f})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(s.workspaces.map(async C=>C.manifest.scripts.has(this.scriptName)?C:null))).filter(C=>C!==null);if(E.length===1)return await In.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new nt(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${q.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new nt(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${q.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new nt("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[E,C]of $I)for(let S of C)if(h.length>=S.length&&JSON.stringify(h.slice(0,S.length))===JSON.stringify(S))throw new nt(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${E} plugin. You can install it with "yarn plugin import ${E}".`);throw new nt(`Couldn't find a script named "${this.scriptName}".`)}}};Ve();Ve();Wt();var OC=class extends ut{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}static{this.paths=[["set","resolution"]]}static{this.usage=ot.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 npm:1.5.0"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(await s.restoreInstallState({restoreResolutions:!1}),!a)throw new ar(s.cwd,this.context.cwd);let c=q.parseDescriptor(this.descriptor,!0),f=q.makeDescriptor(c,this.resolution);return s.storedDescriptors.set(c.descriptorHash,c),s.storedDescriptors.set(f.descriptorHash,f),s.resolutionAliases.set(c.descriptorHash,f.descriptorHash),await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Ve();bt();Wt();var iBe=et(Sa()),LC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=ge.Rest()}static{this.paths=[["unlink"]]}static{this.usage=ot.Usage({description:"disconnect the local project from another one",details:` - This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments. - `,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=s.topLevelWorkspace,f=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of c.manifest.resolutions)h.startsWith("portal:")&&f.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=K.resolve(this.context.cwd,ue.toPortablePath(p));if(je.isPathLike(p)){let E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(!S)throw new ar(C.cwd,h);if(this.all){for(let P of C.workspaces)P.manifest.name&&f.add(q.stringifyIdent(P.anchoredLocator));if(f.size===0)throw new nt("No workspace found to be unlinked in the target project")}else{if(!S.manifest.name)throw new nt("The target workspace doesn't have a name and thus cannot be unlinked");f.add(q.stringifyIdent(S.anchoredLocator))}}else{let E=[...c.manifest.resolutions.map(({pattern:C})=>C.descriptor.fullName)];for(let C of(0,iBe.default)(E,p))f.add(C)}}return c.manifest.resolutions=c.manifest.resolutions.filter(({pattern:p})=>!f.has(p.descriptor.fullName)),await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Wt();var sBe=et(nS()),N5=et(Sa());Ul();var MC=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.patterns=ge.Rest()}static{this.paths=[["up"]]}static{this.usage=ot.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]})}static{this.schema=[tB("recursive",Wf.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})]}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=[...s.storedDescriptors.values()],f=c.map(E=>q.stringifyIdent(E)),p=new Set;for(let E of this.patterns){if(q.parseDescriptor(E).range!=="unknown")throw new nt("Ranges aren't allowed when using --recursive");for(let C of(0,N5.default)(f,E)){let S=q.parseIdent(C);p.add(S.identHash)}}let h=c.filter(E=>p.has(E.identHash));for(let E of h)s.storedDescriptors.delete(E.descriptorHash),s.storedResolutions.delete(E.descriptorHash);return await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}async executeUpClassic(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=sS(this,s),h=f?["keep","reuse","project","latest"]:["project","latest"],E=[],C=[];for(let N of this.patterns){let U=!1,W=q.parseDescriptor(N),te=q.stringifyIdent(W);for(let ie of s.workspaces)for(let Ae of["dependencies","devDependencies"]){let me=[...ie.manifest.getForScope(Ae).values()].map(Be=>q.stringifyIdent(Be)),pe=te==="*"?me:(0,N5.default)(me,te);for(let Be of pe){let Ce=q.parseIdent(Be),g=ie.manifest[Ae].get(Ce.identHash);if(typeof g>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let we=q.makeDescriptor(Ce,W.range);E.push(Promise.resolve().then(async()=>[ie,Ae,g,await oS(we,{project:s,workspace:ie,cache:n,target:Ae,fixed:c,modifier:p,strategies:h})])),U=!0}}U||C.push(N)}if(C.length>1)throw new nt(`Patterns ${he.prettyList(r,C,he.Type.CODE)} don't match any packages referenced by any workspace`);if(C.length>0)throw new nt(`Pattern ${he.prettyList(r,C,he.Type.CODE)} doesn't match any packages referenced by any workspace`);let S=await Promise.all(E),P=await uA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:W,rejections:te}]of S){let ie=W.filter(Ae=>Ae.descriptor!==null);if(ie.length===0){let[Ae]=te;if(typeof Ae>"u")throw new Error("Assertion failed: Expected an error to have been set");let ce=this.cli.error(Ae);s.configuration.get("enableNetwork")?N.reportError(27,`${q.prettyDescriptor(r,U)} can't be resolved to a satisfying range - -${ce}`):N.reportError(27,`${q.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled) - -${ce}`)}else ie.length>1&&!f&&N.reportError(27,`${q.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(P.hasErrors())return P.exitCode();let I=!1,R=[];for(let[N,U,,{suggestions:W}]of S){let te,ie=W.filter(pe=>pe.descriptor!==null),Ae=ie[0].descriptor,ce=ie.every(pe=>q.areDescriptorsEqual(pe.descriptor,Ae));ie.length===1||ce?te=Ae:(I=!0,{answer:te}=await(0,sBe.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${q.prettyWorkspace(r,N)} \u276F ${U}?`,choices:W.map(({descriptor:pe,name:Be,reason:Ce})=>pe?{name:Be,hint:Ce,descriptor:pe}:{name:Be,hint:Ce,disabled:!0}),onCancel:()=>process.exit(130),result(pe){return this.find(pe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=N.manifest[U].get(te.identHash);if(typeof me>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(me.descriptorHash!==te.descriptorHash)N.manifest[U].set(te.identHash,te),R.push([N,U,me,te]);else{let pe=r.makeResolver(),Be={project:s,resolver:pe},Ce=r.normalizeDependency(me),g=pe.bindDescriptor(Ce,N.anchoredLocator,Be);s.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,R),I&&this.context.stdout.write(` -`),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Ve();Ve();Ve();Wt();var _C=class extends ut{constructor(){super(...arguments);this.recursive=ge.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=ge.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=ge.String()}static{this.paths=[["why"]]}static{this.usage=ot.Usage({description:"display the reason why a package is needed",details:` - This command prints the exact reasons why a package appears in the dependency tree. - - If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree. - `,examples:[["Explain why lodash is used in your project","$0 why lodash"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=q.parseIdent(this.package).identHash,c=this.recursive?qvt(s,n,{configuration:r,peers:this.peers}):jvt(s,n,{configuration:r,peers:this.peers});Qs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function jvt(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.storedPackages.values(),f=>q.stringifyLocator(f)),n={},c={children:n};for(let f of a){let p={};for(let E of f.dependencies.values()){if(!s&&f.peerDependencies.has(E.identHash))continue;let C=t.storedResolutions.get(E.descriptorHash);if(!C)throw new Error("Assertion failed: The resolution should have been registered");let S=t.storedPackages.get(C);if(!S)throw new Error("Assertion failed: The package should have been registered");if(S.identHash!==e)continue;{let I=q.stringifyLocator(f);n[I]={value:[f,he.Type.LOCATOR],children:p}}let P=q.stringifyLocator(S);p[P]={value:[{descriptor:E,locator:S},he.Type.DEPENDENT]}}}return c}function qvt(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.workspaces,S=>q.stringifyLocator(S.anchoredLocator)),n=new Set,c=new Set,f=S=>{if(n.has(S.locatorHash))return c.has(S.locatorHash);if(n.add(S.locatorHash),S.identHash===e)return c.add(S.locatorHash),!0;let P=!1;S.identHash===e&&(P=!0);for(let I of S.dependencies.values()){if(!s&&S.peerDependencies.has(I.identHash))continue;let R=t.storedResolutions.get(I.descriptorHash);if(!R)throw new Error("Assertion failed: The resolution should have been registered");let N=t.storedPackages.get(R);if(!N)throw new Error("Assertion failed: The package should have been registered");f(N)&&(P=!0)}return P&&c.add(S.locatorHash),P};for(let S of a)f(S.anchoredPackage);let p=new Set,h={},E={children:h},C=(S,P,I)=>{if(!c.has(S.locatorHash))return;let R=I!==null?he.tuple(he.Type.DEPENDENT,{locator:S,descriptor:I}):he.tuple(he.Type.LOCATOR,S),N={},U={value:R,children:N},W=q.stringifyLocator(S);if(P[W]=U,!(I!==null&&t.tryWorkspaceByLocator(S))&&!p.has(S.locatorHash)){p.add(S.locatorHash);for(let te of S.dependencies.values()){if(!s&&S.peerDependencies.has(te.identHash))continue;let ie=t.storedResolutions.get(te.descriptorHash);if(!ie)throw new Error("Assertion failed: The resolution should have been registered");let Ae=t.storedPackages.get(ie);if(!Ae)throw new Error("Assertion failed: The package should have been registered");C(Ae,N,te)}}};for(let S of a)C(S.anchoredPackage,h,null);return E}Ve();var W5={};Vt(W5,{GitFetcher:()=>AS,GitResolver:()=>pS,default:()=>uSt,gitUtils:()=>Qa});Ve();bt();var Qa={};Vt(Qa,{TreeishProtocols:()=>fS,clone:()=>G5,fetchBase:()=>bBe,fetchChangedFiles:()=>PBe,fetchChangedWorkspaces:()=>lSt,fetchRoot:()=>DBe,isGitUrl:()=>jC,lsRemote:()=>SBe,normalizeLocator:()=>aSt,normalizeRepoUrl:()=>UC,resolveUrl:()=>q5,splitRepoUrl:()=>G0,validateRepoUrl:()=>j5});Ve();bt();Wt();var wBe=et(EBe()),BBe=et(c6()),HC=et(Ie("querystring")),U5=et(Ai());function _5(t,e,r){let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)}function IBe(t){try{return new URL(t)}catch{return}}function sSt(t){let e=_5(t,"@","#"),r=_5(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),_5(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function CBe(t){return IBe(t)||IBe(sSt(t))}function UC(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),t=t.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){let r=CBe(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function vBe(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var oSt=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],fS=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(fS||{});function jC(t){return t?oSt.some(e=>!!t.match(e)):!1}function G0(t){t=UC(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=t.slice(0,e),s=t.slice(e+1);if(s.match(/^[a-z]+=/)){let a=HC.default.parse(s);for(let[p,h]of Object.entries(a))if(typeof h!="string")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(fS).find(p=>Object.hasOwn(a,p)),[c,f]=typeof n<"u"?[n,a[n]]:["head","HEAD"];for(let p of Object.values(fS))delete a[p];return{repo:r,treeish:{protocol:c,request:f},extra:a}}else{let a=s.indexOf(":"),[n,c]=a===-1?[null,s]:[s.slice(0,a),s.slice(a+1)];return{repo:r,treeish:{protocol:n,request:c},extra:{}}}}function aSt(t){return q.makeLocator(t,UC(t.reference))}function j5(t,{configuration:e}){let r=UC(t,{git:!0});if(!An.getNetworkSettings(`https://${(0,wBe.default)(r).resource}`,{configuration:e}).enableNetwork)throw new Yt(80,`Request to '${r}' has been blocked because of your configuration settings`);return r}async function SBe(t,e){let r=j5(t,{configuration:e}),s=await H5("listing refs",["ls-remote",r],{cwd:e.startingCwd,env:vBe()},{configuration:e,normalizedRepoUrl:r}),a=new Map,n=/^([a-f0-9]{40})\t([^\n]+)/gm,c;for(;(c=n.exec(s.stdout))!==null;)a.set(c[2],c[1]);return a}async function q5(t,e){let{repo:r,treeish:{protocol:s,request:a},extra:n}=G0(t),c=await SBe(r,e),f=(h,E)=>{switch(h){case"commit":{if(!E.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return HC.default.stringify({...n,commit:E})}case"head":{let C=c.get(E==="HEAD"?E:`refs/heads/${E}`);if(typeof C>"u")throw new Error(`Unknown head ("${E}")`);return HC.default.stringify({...n,commit:C})}case"tag":{let C=c.get(`refs/tags/${E}`);if(typeof C>"u")throw new Error(`Unknown tag ("${E}")`);return HC.default.stringify({...n,commit:C})}case"semver":{let C=Or.validRange(E);if(!C)throw new Error(`Invalid range ("${E}")`);let S=new Map([...c.entries()].filter(([I])=>I.startsWith("refs/tags/")).map(([I,R])=>[U5.default.parse(I.slice(10)),R]).filter(I=>I[0]!==null)),P=U5.default.maxSatisfying([...S.keys()],C);if(P===null)throw new Error(`No matching range ("${E}")`);return HC.default.stringify({...n,commit:S.get(P)})}case null:{let C;if((C=p("commit",E))!==null||(C=p("tag",E))!==null||(C=p("head",E))!==null)return C;throw E.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${E}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${E}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${h}")`)}},p=(h,E)=>{try{return f(h,E)}catch{return null}};return UC(`${r}#${f(s,a)}`)}async function G5(t,e){return await e.getLimit("cloneConcurrency")(async()=>{let{repo:r,treeish:{protocol:s,request:a}}=G0(t);if(s!=="commit")throw new Error("Invalid treeish protocol when cloning");let n=j5(r,{configuration:e}),c=await le.mktempPromise(),f={cwd:c,env:vBe()};return await H5("cloning the repository",["clone","-c core.autocrlf=false",n,ue.fromPortablePath(c)],f,{configuration:e,normalizedRepoUrl:n}),await H5("switching branch",["checkout",`${a}`],f,{configuration:e,normalizedRepoUrl:n}),c})}async function DBe(t){let e,r=t;do{if(e=r,await le.existsPromise(K.join(e,".git")))return e;r=K.dirname(e)}while(r!==e);return null}async function bBe(t,{baseRefs:e}){if(e.length===0)throw new nt("Can't run this command with zero base refs specified.");let r=[];for(let f of e){let{code:p}=await Gr.execvp("git",["merge-base",f,"HEAD"],{cwd:t});p===0&&r.push(f)}if(r.length===0)throw new nt(`No ancestor could be found between any of HEAD and ${e.join(", ")}`);let{stdout:s}=await Gr.execvp("git",["merge-base","HEAD",...r],{cwd:t,strict:!0}),a=s.trim(),{stdout:n}=await Gr.execvp("git",["show","--quiet","--pretty=format:%s",a],{cwd:t,strict:!0}),c=n.trim();return{hash:a,title:c}}async function PBe(t,{base:e,project:r}){let s=je.buildIgnorePattern(r.configuration.get("changesetIgnorePatterns")),{stdout:a}=await Gr.execvp("git",["diff","--name-only",`${e}`],{cwd:t,strict:!0}),n=a.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>K.resolve(t,ue.toPortablePath(h))),{stdout:c}=await Gr.execvp("git",["ls-files","--others","--exclude-standard"],{cwd:t,strict:!0}),f=c.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>K.resolve(t,ue.toPortablePath(h))),p=[...new Set([...n,...f].sort())];return s?p.filter(h=>!K.relative(r.cwd,h).match(s)):p}async function lSt({ref:t,project:e}){if(e.configuration.projectCwd===null)throw new nt("This command can only be run from within a Yarn project");let r=[K.resolve(e.cwd,Er.lockfile),K.resolve(e.cwd,e.configuration.get("cacheFolder")),K.resolve(e.cwd,e.configuration.get("installStatePath")),K.resolve(e.cwd,e.configuration.get("virtualFolder"))];await e.configuration.triggerHook(c=>c.populateYarnPaths,e,c=>{c!=null&&r.push(c)});let s=await DBe(e.configuration.projectCwd);if(s==null)throw new nt("This command can only be run on Git repositories");let a=await bBe(s,{baseRefs:typeof t=="string"?[t]:e.configuration.get("changesetBaseRefs")}),n=await PBe(s,{base:a.hash,project:e});return new Set(je.mapAndFilter(n,c=>{let f=e.tryWorkspaceByFilePath(c);return f===null?je.mapAndFilter.skip:r.some(p=>c.startsWith(p))?je.mapAndFilter.skip:f}))}async function H5(t,e,r,{configuration:s,normalizedRepoUrl:a}){try{return await Gr.execvp("git",e,{...r,strict:!0})}catch(n){if(!(n instanceof Gr.ExecError))throw n;let c=n.reportExtra,f=n.stderr.toString();throw new Yt(1,`Failed ${t}`,p=>{p.reportError(1,` ${he.prettyField(s,{label:"Repository URL",value:he.tuple(he.Type.URL,a)})}`);for(let h of f.matchAll(/^(.+?): (.*)$/gm)){let[,E,C]=h;E=E.toLowerCase();let S=E==="error"?"Error":`${(0,BBe.default)(E)} Error`;p.reportError(1,` ${he.prettyField(s,{label:S,value:he.tuple(he.Type.NO_HINT,C)})}`)}c?.(p)})}}var AS=class{supports(e,r){return jC(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,a=new Map(r.checksums);a.set(e.locatorHash,s);let n={...r,checksums:a},c=await this.downloadHosted(e,n);if(c!==null)return c;let[f,p,h]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(e,n),...r.cacheOptions});return{packageFs:f,releaseFs:p,prefixPath:q.getIdentVendorPath(e),checksum:h}}async downloadHosted(e,r){return r.project.configuration.reduceHook(s=>s.fetchHostedRepository,null,e,r)}async cloneFromRemote(e,r){let s=G0(e.reference),a=await G5(e.reference,r.project.configuration),n=K.resolve(a,s.extra.cwd??vt.dot),c=K.join(n,"package.tgz");await In.prepareExternalProject(n,c,{configuration:r.project.configuration,report:r.report,workspace:s.extra.workspace,locator:e});let f=await le.readFilePromise(c);return await je.releaseAfterUseAsync(async()=>await gs.convertToZip(f,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1}))}};Ve();Ve();var pS=class{supportsDescriptor(e,r){return jC(e.range)}supportsLocator(e,r){return jC(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=await q5(e.range,s.project.configuration);return[q.makeLocator(e,a)]}async getSatisfying(e,r,s,a){let n=G0(e.range);return{locators:s.filter(f=>{if(f.identHash!==e.identHash)return!1;let p=G0(f.reference);return!(n.repo!==p.repo||n.treeish.protocol==="commit"&&n.treeish.request!==p.treeish.request)}),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var cSt={configuration:{changesetBaseRefs:{description:"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.",type:"STRING",isArray:!0,isNullable:!1,default:["master","origin/master","upstream/master","main","origin/main","upstream/main"]},changesetIgnorePatterns:{description:"Array of glob patterns; files matching them will be ignored when fetching the changed files",type:"STRING",default:[],isArray:!0},cloneConcurrency:{description:"Maximal number of concurrent clones",type:"NUMBER",default:2}},fetchers:[AS],resolvers:[pS]};var uSt=cSt;Wt();var qC=class extends ut{constructor(){super(...arguments);this.since=ge.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.noPrivate=ge.Boolean("--no-private",{description:"Exclude workspaces that have the private field set to true"});this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Also return the cross-dependencies between workspaces"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["workspaces","list"]]}static{this.usage=ot.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project.\n\n - If `--since` is set, Yarn will only list workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--no-private` is set, Yarn will not list any workspaces that have the `private` field set to `true`.\n\n - If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{let c=this.since?await Qa.fetchChangedWorkspaces({ref:this.since,project:s}):s.workspaces,f=new Set(c);if(this.recursive)for(let p of[...c].map(h=>h.getRecursiveWorkspaceDependents()))for(let h of p)f.add(h);for(let p of f){let{manifest:h}=p;if(h.private&&this.noPrivate)continue;let E;if(this.verbose){let C=new Set,S=new Set;for(let P of Ht.hardDependencies)for(let[I,R]of h.getForScope(P)){let N=s.tryWorkspaceByDescriptor(R);N===null?s.workspacesByIdent.has(I)&&S.add(R):C.add(N)}E={workspaceDependencies:Array.from(C).map(P=>P.relativeCwd),mismatchedWorkspaceDependencies:Array.from(S).map(P=>q.stringifyDescriptor(P))}}n.reportInfo(null,`${p.relativeCwd}`),n.reportJson({location:p.relativeCwd,name:h.name?q.stringifyIdent(h.name):null,...E})}})).exitCode()}};Ve();Ve();Wt();var GC=class extends ut{constructor(){super(...arguments);this.workspaceName=ge.String();this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[["workspace"]]}static{this.usage=ot.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:` - This command will run a given sub-command on a single workspace. - `,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=s.workspaces,c=new Map(n.map(p=>[q.stringifyIdent(p.anchoredLocator),p])),f=c.get(this.workspaceName);if(f===void 0){let p=Array.from(c.keys()).sort();throw new nt(`Workspace '${this.workspaceName}' not found. Did you mean any of the following: - - ${p.join(` - - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:f.cwd})}};var fSt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:xBe.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[aC,lC,cC,uC,OC,bC,EC,qC,pC,hC,gC,dC,sC,oC,fC,AC,mC,yC,IC,CC,wC,BC,LC,vC,SC,xC,PC,kC,DC,QC,TC,RC,FC,NC,MC,_C,GC]},ASt=fSt;var Z5={};Vt(Z5,{default:()=>hSt});Ve();var Qt={optional:!0},V5=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":Qt}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":Qt,"postcss-jsx":Qt,"postcss-less":Qt,"postcss-markdown":Qt,"postcss-scss":Qt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Qt}}],["snowpack@>=3.3.0",{dependencies:{"node-gyp":"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Qt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Qt,"vue-template-compiler":Qt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:Qt,"utf-8-validate":Qt}}],["react-portal@<4.2.2",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{"babel-polyfill":"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{"cross-spawn":"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",{peerDependencies:{webpack:"*"}}],["gatsby-plugin-sharp@<=4.6.0-next.3",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@<=5.6.0-next.0",{dependencies:{"prop-types":"^15.7.2"}}],["@rebass/forms@*",{dependencies:{"@styled-system/should-forward-prop":"^5.0.0"},peerDependencies:{react:"^16.8.6"}}],["rebass@*",{peerDependencies:{react:"^16.8.6"}}],["@ant-design/react-slick@<=0.28.3",{peerDependencies:{react:">=16.0.0"}}],["mqtt@<4.2.7",{dependencies:{duplexify:"^4.1.1"}}],["vue-cli-plugin-vuetify@<=2.0.3",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt,"vuetify-loader":Qt}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["vue-cli-plugin-vuetify@>=2.4.3",{peerDependencies:{vue:"*"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt}}],["@vue/cli-plugin-typescript@<=5.0.0-alpha.0",{dependencies:{"babel-loader":"^8.1.0"}}],["@vue/cli-plugin-typescript@<=5.0.0-beta.0",{dependencies:{"@babel/core":"^7.12.16"},peerDependencies:{"vue-template-compiler":"^2.0.0"},peerDependenciesMeta:{"vue-template-compiler":Qt}}],["cordova-ios@<=6.3.0",{dependencies:{underscore:"^1.9.2"}}],["cordova-lib@<=10.0.1",{dependencies:{underscore:"^1.9.2"}}],["git-node-fs@*",{peerDependencies:{"js-git":"^0.7.8"},peerDependenciesMeta:{"js-git":Qt}}],["consolidate@<0.16.0",{peerDependencies:{mustache:"^3.0.0"},peerDependenciesMeta:{mustache:Qt}}],["consolidate@<=0.16.0",{peerDependencies:{velocityjs:"^2.0.1",tinyliquid:"^0.2.34","liquid-node":"^3.0.1",jade:"^1.11.0","then-jade":"*",dust:"^0.3.0","dustjs-helpers":"^1.7.4","dustjs-linkedin":"^2.7.5",swig:"^1.4.2","swig-templates":"^2.0.3","razor-tmpl":"^1.3.1",atpl:">=0.7.6",liquor:"^0.0.5",twig:"^1.15.2",ejs:"^3.1.5",eco:"^1.1.0-rc-3",jazz:"^0.0.18",jqtpl:"~1.1.0",hamljs:"^0.6.2",hamlet:"^0.3.3",whiskers:"^0.4.0","haml-coffee":"^1.14.1","hogan.js":"^3.0.2",templayed:">=0.2.3",handlebars:"^4.7.6",underscore:"^1.11.0",lodash:"^4.17.20",pug:"^3.0.0","then-pug":"*",qejs:"^3.0.5",walrus:"^0.10.1",mustache:"^4.0.1",just:"^0.1.8",ect:"^0.5.9",mote:"^0.2.0",toffee:"^0.3.6",dot:"^1.1.3","bracket-template":"^1.1.5",ractive:"^1.3.12",nunjucks:"^3.2.2",htmling:"^0.0.8","babel-core":"^6.26.3",plates:"~0.4.11","react-dom":"^16.13.1",react:"^16.13.1","arc-templates":"^0.5.3",vash:"^0.13.0",slm:"^2.0.0",marko:"^3.14.4",teacup:"^2.0.0","coffee-script":"^1.12.7",squirrelly:"^5.1.0",twing:"^5.0.2"},peerDependenciesMeta:{velocityjs:Qt,tinyliquid:Qt,"liquid-node":Qt,jade:Qt,"then-jade":Qt,dust:Qt,"dustjs-helpers":Qt,"dustjs-linkedin":Qt,swig:Qt,"swig-templates":Qt,"razor-tmpl":Qt,atpl:Qt,liquor:Qt,twig:Qt,ejs:Qt,eco:Qt,jazz:Qt,jqtpl:Qt,hamljs:Qt,hamlet:Qt,whiskers:Qt,"haml-coffee":Qt,"hogan.js":Qt,templayed:Qt,handlebars:Qt,underscore:Qt,lodash:Qt,pug:Qt,"then-pug":Qt,qejs:Qt,walrus:Qt,mustache:Qt,just:Qt,ect:Qt,mote:Qt,toffee:Qt,dot:Qt,"bracket-template":Qt,ractive:Qt,nunjucks:Qt,htmling:Qt,"babel-core":Qt,plates:Qt,"react-dom":Qt,react:Qt,"arc-templates":Qt,vash:Qt,slm:Qt,marko:Qt,teacup:Qt,"coffee-script":Qt,squirrelly:Qt,twing:Qt}}],["vue-loader@<=16.3.3",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",webpack:"^4.1.0 || ^5.0.0-0"},peerDependenciesMeta:{"@vue/compiler-sfc":Qt}}],["vue-loader@^16.7.0",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",vue:"^3.2.13"},peerDependenciesMeta:{"@vue/compiler-sfc":Qt,vue:Qt}}],["scss-parser@<=1.0.5",{dependencies:{lodash:"^4.17.21"}}],["query-ast@<1.0.5",{dependencies:{lodash:"^4.17.21"}}],["redux-thunk@<=2.3.0",{peerDependencies:{redux:"^4.0.0"}}],["skypack@<=0.3.2",{dependencies:{tar:"^6.1.0"}}],["@npmcli/metavuln-calculator@<2.0.0",{dependencies:{"json-parse-even-better-errors":"^2.3.1"}}],["bin-links@<2.3.0",{dependencies:{"mkdirp-infer-owner":"^1.0.2"}}],["rollup-plugin-polyfill-node@<=0.8.0",{peerDependencies:{rollup:"^1.20.0 || ^2.0.0"}}],["snowpack@<3.8.6",{dependencies:{"magic-string":"^0.25.7"}}],["elm-webpack-loader@*",{dependencies:{temp:"^0.9.4"}}],["winston-transport@<=4.4.0",{dependencies:{logform:"^2.2.0"}}],["jest-vue-preprocessor@*",{dependencies:{"@babel/core":"7.8.7","@babel/template":"7.8.6"},peerDependencies:{pug:"^2.0.4"},peerDependenciesMeta:{pug:Qt}}],["redux-persist@*",{peerDependencies:{react:">=16"},peerDependenciesMeta:{react:Qt}}],["sodium@>=3",{dependencies:{"node-gyp":"^3.8.0"}}],["babel-plugin-graphql-tag@<=3.1.0",{peerDependencies:{graphql:"^14.0.0 || ^15.0.0"}}],["@playwright/test@<=1.14.1",{dependencies:{"jest-matcher-utils":"^26.4.2"}}],...["babel-plugin-remove-graphql-queries@<3.14.0-next.1","babel-preset-gatsby-package@<1.14.0-next.1","create-gatsby@<1.14.0-next.1","gatsby-admin@<0.24.0-next.1","gatsby-cli@<3.14.0-next.1","gatsby-core-utils@<2.14.0-next.1","gatsby-design-tokens@<3.14.0-next.1","gatsby-legacy-polyfills@<1.14.0-next.1","gatsby-plugin-benchmark-reporting@<1.14.0-next.1","gatsby-plugin-graphql-config@<0.23.0-next.1","gatsby-plugin-image@<1.14.0-next.1","gatsby-plugin-mdx@<2.14.0-next.1","gatsby-plugin-netlify-cms@<5.14.0-next.1","gatsby-plugin-no-sourcemaps@<3.14.0-next.1","gatsby-plugin-page-creator@<3.14.0-next.1","gatsby-plugin-preact@<5.14.0-next.1","gatsby-plugin-preload-fonts@<2.14.0-next.1","gatsby-plugin-schema-snapshot@<2.14.0-next.1","gatsby-plugin-styletron@<6.14.0-next.1","gatsby-plugin-subfont@<3.14.0-next.1","gatsby-plugin-utils@<1.14.0-next.1","gatsby-recipes@<0.25.0-next.1","gatsby-source-shopify@<5.6.0-next.1","gatsby-source-wikipedia@<3.14.0-next.1","gatsby-transformer-screenshot@<3.14.0-next.1","gatsby-worker@<0.5.0-next.1"].map(t=>[t,{dependencies:{"@babel/runtime":"^7.14.8"}}]),["gatsby-core-utils@<2.14.0-next.1",{dependencies:{got:"8.3.2"}}],["gatsby-plugin-gatsby-cloud@<=3.1.0-next.0",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["gatsby-plugin-gatsby-cloud@<=3.2.0-next.1",{peerDependencies:{webpack:"*"}}],["babel-plugin-remove-graphql-queries@<=3.14.0-next.1",{dependencies:{"gatsby-core-utils":"^2.8.0-next.1"}}],["gatsby-plugin-netlify@3.13.0-next.1",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["clipanion-v3-codemod@<=0.2.0",{peerDependencies:{jscodeshift:"^0.11.0"}}],["react-live@*",{peerDependencies:{"react-dom":"*",react:"*"}}],["webpack@<4.44.1",{peerDependenciesMeta:{"webpack-cli":Qt,"webpack-command":Qt}}],["webpack@<5.0.0-beta.23",{peerDependenciesMeta:{"webpack-cli":Qt}}],["webpack-dev-server@<3.10.2",{peerDependenciesMeta:{"webpack-cli":Qt}}],["@docusaurus/responsive-loader@<1.5.0",{peerDependenciesMeta:{sharp:Qt,jimp:Qt}}],["eslint-module-utils@*",{peerDependenciesMeta:{"eslint-import-resolver-node":Qt,"eslint-import-resolver-typescript":Qt,"eslint-import-resolver-webpack":Qt,"@typescript-eslint/parser":Qt}}],["eslint-plugin-import@*",{peerDependenciesMeta:{"@typescript-eslint/parser":Qt}}],["critters-webpack-plugin@<3.0.2",{peerDependenciesMeta:{"html-webpack-plugin":Qt}}],["terser@<=5.10.0",{dependencies:{acorn:"^8.5.0"}}],["babel-preset-react-app@10.0.x <10.0.2",{dependencies:{"@babel/plugin-proposal-private-property-in-object":"^7.16.7"}}],["eslint-config-react-app@*",{peerDependenciesMeta:{typescript:Qt}}],["@vue/eslint-config-typescript@<11.0.0",{peerDependenciesMeta:{typescript:Qt}}],["unplugin-vue2-script-setup@<0.9.1",{peerDependencies:{"@vue/composition-api":"^1.4.3","@vue/runtime-dom":"^3.2.26"}}],["@cypress/snapshot@*",{dependencies:{debug:"^3.2.7"}}],["auto-relay@<=0.14.0",{peerDependencies:{"reflect-metadata":"^0.1.13"}}],["vue-template-babel-compiler@<1.2.0",{peerDependencies:{"vue-template-compiler":"^2.6.0"}}],["@parcel/transformer-image@<2.5.0",{peerDependencies:{"@parcel/core":"*"}}],["@parcel/transformer-js@<2.5.0",{peerDependencies:{"@parcel/core":"*"}}],["parcel@*",{peerDependenciesMeta:{"@parcel/core":Qt}}],["react-scripts@*",{peerDependencies:{eslint:"*"}}],["focus-trap-react@^8.0.0",{dependencies:{tabbable:"^5.3.2"}}],["react-rnd@<10.3.7",{peerDependencies:{react:">=16.3.0","react-dom":">=16.3.0"}}],["connect-mongo@<5.0.0",{peerDependencies:{"express-session":"^1.17.1"}}],["vue-i18n@<9",{peerDependencies:{vue:"^2"}}],["vue-router@<4",{peerDependencies:{vue:"^2"}}],["unified@<10",{dependencies:{"@types/unist":"^2.0.0"}}],["react-github-btn@<=1.3.0",{peerDependencies:{react:">=16.3.0"}}],["react-dev-utils@*",{peerDependencies:{typescript:">=2.7",webpack:">=4"},peerDependenciesMeta:{typescript:Qt}}],["@asyncapi/react-component@<=1.0.0-next.39",{peerDependencies:{react:">=16.8.0","react-dom":">=16.8.0"}}],["xo@*",{peerDependencies:{webpack:">=1.11.0"},peerDependenciesMeta:{webpack:Qt}}],["babel-plugin-remove-graphql-queries@<=4.20.0-next.0",{dependencies:{"@babel/types":"^7.15.4"}}],["gatsby-plugin-page-creator@<=4.20.0-next.1",{dependencies:{"fs-extra":"^10.1.0"}}],["gatsby-plugin-utils@<=3.14.0-next.1",{dependencies:{fastq:"^1.13.0"},peerDependencies:{graphql:"^15.0.0"}}],["gatsby-plugin-mdx@<3.1.0-next.1",{dependencies:{mkdirp:"^1.0.4"}}],["gatsby-plugin-mdx@^2",{peerDependencies:{gatsby:"^3.0.0-next"}}],["fdir@<=5.2.0",{peerDependencies:{picomatch:"2.x"},peerDependenciesMeta:{picomatch:Qt}}],["babel-plugin-transform-typescript-metadata@<=0.3.2",{peerDependencies:{"@babel/core":"^7","@babel/traverse":"^7"},peerDependenciesMeta:{"@babel/traverse":Qt}}],["graphql-compose@>=9.0.10",{peerDependencies:{graphql:"^14.2.0 || ^15.0.0 || ^16.0.0"}}],["vite-plugin-vuetify@<=1.0.2",{peerDependencies:{vue:"^3.0.0"}}],["webpack-plugin-vuetify@<=2.0.1",{peerDependencies:{vue:"^3.2.6"}}],["eslint-import-resolver-vite@<2.0.1",{dependencies:{debug:"^4.3.4",resolve:"^1.22.8"}}],["notistack@^3.0.0",{dependencies:{csstype:"^3.0.10"}}],["@fastify/type-provider-typebox@^5.0.0",{peerDependencies:{fastify:"^5.0.0"}}],["@fastify/type-provider-typebox@^4.0.0",{peerDependencies:{fastify:"^4.0.0"}}]];var K5;function kBe(){return typeof K5>"u"&&(K5=Ie("zlib").brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),K5}var J5;function QBe(){return typeof J5>"u"&&(J5=Ie("zlib").brotliDecompressSync(Buffer.from("G8MSIIzURnVBnObTcvb3XE6v2S9Qgc2K801Oa5otNKEtK8BINZNcaQHy+9/vf/WXBimwutXC33P2DPc64pps5rz7NGGWaOKNSPL4Y2KRE8twut2lFOIN+OXPtRmPMRhMTILib2bEQx43az2I5d3YS8Roa5UZpF/ujHb3Djd3GDvYUfvFYSUQ39vb2cmifp/rgB4J/65JK3wRBTvMBoNBmn3mbXC63/gbBkW/2IRPri0O8bcsRBsmarF328pAln04nyJFkwUAvNu934supAqLtyerZZpJ8I8suJHhf/ocMV+scKwa8NOiDKIPXw6Ex/EEZD6TEGaW8N5zvNHYF10l6Lfooj7D5W2k3dgvQSbp2Wv8TGOayS978gxlOLVjTGXs66ozewbrjwElLtyrYNnWTfzzdEutgROUFPVMhnMoy8EjJLLlWwIEoySxliim9kYW30JUHiPVyjt0iAw/ZpPmCbUCltYPnq6ZNblIKhTNhqS/oqC9iya5sGKZTOVsTEg34n92uZTf2iPpcZih8rPW8CzA+adIGmyCPcKdLMsBLShd+zuEbTrqpwuh+DLmracZcjPC5Sdf5odDAhKpFuOsQS67RT+1VgWWygSv3YwxDnylc04/PYuaMeIzhBkLrvs7e/OUzRTF56MmfY6rI63QtEjEQzq637zQqJ39nNhu3NmoRRhW/086bHGBUtx0PE0j3aEGvkdh9WJC8y8j8mqqke9/dQ5la+Q3ba4RlhvTbnfQhPDDab3tUifkjKuOsp13mXEmO00Mu88F/M67R7LXfoFDFLNtgCSWjWX+3Jn1371pJTK9xPBiMJafvDjtFyAzu8rxeQ0TKMQXNPs5xxiBOd+BRJP8KP88XPtJIbZKh/cdW8KvBUkpqKpGoiIaA32c3/JnQr4efXt85mXvidOvn/eU3Pase1typLYBalJ14mCso9h79nuMOuCa/kZAOkJHmTjP5RM2WNoPasZUAnT1TAE/NH25hUxcQv6hQWR/m1PKk4ooXMcM4SR1iYU3fUohvqk4RY2hbmTVVIXv6TvqO+0doOjgeVFAcom+RlwJQmOVH7pr1Q9LoJT6n1DeQEB+NHygsATbIwTcOKZlJsY8G4+suX1uQLjUWwLjjs0mvSvZcLTpIGAekeR7GCgl8eo3ndAqEe2XCav4huliHjdbIPBsGJuPX7lrO9HX1UbXRH5opOe1x6JsOSgHZR+EaxuXVhpLLxm6jk1LJtZfHSc6BKPun3CpYYVMJGwEUyk8MTGG0XL5MfEwaXpnc9TKnBmlGn6nHiGREc3ysn47XIBDzA+YvFdjZzVIEDcKGpS6PbUJehFRjEne8D0lVU1XuRtlgszq6pTNlQ/3MzNOEgCWPyTct22V2mEi2krizn5VDo9B19/X2DB3hCGRMM7ONbtnAcIx/OWB1u5uPbW1gsH8irXxT/IzG0PoXWYjhbMsH3KTuoOl5o17PulcgvsfTSnKFM354GWI8luqZnrswWjiXy3G+Vbyo1KMopFmmvBwNELgaS8z8dNZchx/Cl/xjddxhMcyqtzFyONb2Zdu90NkI8pAeufe7YlXrp53v8Dj/l8vWeVspRKBGXScBBPI/HinSTGmLDOGGOCIyH0JFdOZx0gWsacNlQLJMIrBhqRxXxHF/5pseWwejlAAvZ3klZSDSYY8mkToaWejXhgNomeGtx1DTLEUFMRkgF5yFB22WYdJnaWN14r1YJj81hGi45+jrADS5nYRhCiSlCJJ1nL8pYX+HDSMhdTEWyRcgHVp/IsUIZYMfT+YYncUQPgcxNGCHfZ88vDdrcUuaGIl6zhAsiaq7R5dfqrqXH/JcBhfjT8D0azayIyEz75Nxp6YkcyDxlJq3EXnJUpqDohJJOysL1t1uNiHESlvsxPb5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=","base64")).toString()),J5}var z5;function TBe(){return typeof z5>"u"&&(z5=Ie("zlib").brotliDecompressSync(Buffer.from("m9XmPqMRsZ7bFo1U5CxexdgYepcdMsrcAbbqv7/rCXGM7SZhmJ2jPScITf1tA+qxuDFE8KC9mQaCs84ftss/pB0UrlDfSS52Q7rXyYIcHbrGG2egYMqC8FFfnNfZVLU+4ZieJEVLu1qxY0MYkbD8opX7TYstjKzqxwBObq8HUIQwogljOgs72xyCrxj0q79cf/hN2Ys/0fU6gkRgxFedikACuQLS4lvO/N5NpZ85m+BdO3c5VplDLMcfEDt6umRCbfM16uxnqUKPvPFg/qtuzzId3SjAxZFoZRqK3pdtWt/C+VU6+zuX09NsoBs3MwobpU1yyoXZnzA1EmiMRS5GfJeLxV51/jSXrfgTWr1af9hwKvqCfSVHiQuk+uO/N16Cror2c1QlthM7WkS/86azhK3b47PG6f5TAJVtrK7g+zlR2boyKBV+QkdOXcfBDrI8yCciS3LktLb+d3gopE3R1QYFN1QWdQtrso2qK3+OTVYpTdPAfICTe9//3y/1+6mixIob4kfOI1WT3DxyD2ZuR06a6RPOPlftc/bZeqWqUtoqSetJlgP0AOBsOOeWqkpKJDtgP25CmIz+ZAo8+zwb3wI5ZD/0a7Qb7Q8Ag8HkWzhVQqzLFksA/nKSsR6hEu4tymzAQcZUDV4D2f17NbNSreHMVG0D1Knfa5n//prG6IzFVH7GSdEZn+1eEohVH5hmz6wxnj0biDxnMlq0fHQ2v7ogu8tEBnHaJICmVgLINf+jr4b/AVtDfPSZWelMen+u+pT60nu+9LrK0z0L/oyvC+kDtsi13AdC/i6pd29uB/1alOsA0Kc6N0wICwzbHkBQGJ94pBZ5TyKj7lzzUQ5CYn3Xp/cLhrJ2GpBakWmkymfeKcX2Vy2QEDcIxnju2369rf+l+H7E96GzyVs0gyDzUD0ipfKdmd7LN80sxjSiau/0PX2e7EMt4hNqThHEad9B1L44EDU1ZyFL+QJ0n1v7McxqupfO9zYGEBGJ0XxHdZmWuNKcV+0WJmzGd4y1qu3RfbunEBAQgZyBUWwjoXAwxk2XVRjBAy1jWcGsnb/Tu2oRKUbqGxHjFxUihoreyXW2M2ZnxkQYPfCorcVYq7rnrfuUV1ZYBNakboTPj+b+PLaIyFVsA5nmcP8ZS23WpTvTnSog5wfhixjwbRCqUZs5CmhOL9EgGmgj/26ysZ0jCMvtwDK2F7UktN2QnwoB1S1oLmpPmOrFf/CT8ITb/UkMLLqMjdVY/y/EH/MtrH9VkMaxM7mf8v/TkuD1ov5CqEgw9xvc/+8UXQ/+Idb2isH35w98+skf/i3b72L4ElozP8Dyc9wbdJcY70N/9F9PVz4uSI/nhcrSt21q/fpyf6UbWyso4Ds08/rSPGAcAJs8sBMCYualxyZxlLqfQnp9jYxdy/TQVs6vYmnTgEERAfmtB2No5xf8eqN4yCWgmnR91NQZQ4CmYCqijiU983mMTgUPedf8L8/XiCu9jbsDMIARuL0a0MZlq7lU2nxB8T+N/F7EFutvEuWhxf3XFlS0KcKMiAbpPy3gv/6r+NIQcVkdlqicBgiYOnzr6FjwJVz+QQxpM+uMAIW4F13oWQzNh95KZlI9LOFocgrLUo8g+i+ZNTor6ypk+7O/PlsJ9WsFhRgnLuNv5P2Isk25gqT6i2tMopOL1+RQcnRBuKZ06E8Ri4/BOrY/bQ4GAZPE+LXKsS5jTYjEl5jHNgnm+kjV9trqJ4C9pcDVxTWux8uovsXQUEYh9BP+NR07OqmcjOsakIEI/xofJioScCLW09tzJAVwZwgbQtVnkX3x8H1sI2y8Hs4AiQYfXRNklTmb9mn9RgbJl2yf19aSzCGZqFq79dXW791Na6an1ydMUb/LNp5HdEZkkmTAdP7EPMC563MSh6zxa+Bz5hMDuNq43JYIRJRIWCuNWvM1xTjf8XaHnVPKElBLyFDMJyWiSAElJ0FJVA++8CIBc8ItAWrxhecW+tOoGq4yReF6Dcz615ifhRWLpIOaf8WTs3zUcjEBS1JEXbIByQhm6+oAoTb3QPkok35qz9L2c/mp5WEuCJgerL5QCxMXUWHBJ80t+LevvZ65pBkFa72ITFw4oGQ05TynQJyDjU1AqBylBAdTE9uIflWo0b+xSUCJ9Ty3GlCggfasdT0PX/ue3w16GUfU+QVQddTm9XiY2Bckz2tKt2il7oUIGBRa7Ft5qJfrRIK3mVs9QsDo9higyTz0N9jmILeRhROdecjV44DDZzYnJNryISvfdIq2x4c2/8e2UXrlRm303TE6kxkQ/0kylxgtsQimZ/nb6jUaggIXXN+F2vyIqMGIuJXQR8yzdFIHknqeWFDgsdvcftmkZyWojcZc+ZFY4rua8nU3XuMNchfTDpBbrjMXsJGonJ+vKX0sZbNcoakrr9c9i+bj6uf6f4yNDdaiXLRhJrlh5zmfbkOGQkosfTqWYgpEKdYx2Kxfb+ZDz4Ufteybj63LzVc7oklSvXHh5Nab4+b8DeoXZihVLRZRCBJuj0J6zk3PtbkjaEH3sD3j6hHhwmufk+pBoGYd9qCJEFL21AmLzzHHktN9jW7GSpe1p91X10Bm5/Dhxo3BNex+EtiAFD3dTK0NcvT58F0IFIQIhgLP6s1MX8wofvtnPX1PQ/bLAwNP+ulKiokjXruRYKzTErNjFrvX5n6QD7oiRbOs3OQUswDgOxzcd+WwGZH1ONZJLEKk2T4VGPrrdkN9ncxP/oQ8UFvRbI7zGVrpNjlniCHT6nYmp7SlDcZ1XmS7tm9CXTMumh89LnaNuF3/wPVa/NLSE195Ntstwz1V2ZLc/sULMGaL4gdF3src9sR1Fh33/xiS3qOrJQlLpy2luR0/y+0q0RnVBBBe4yi4ueiNOdNAq/pR8JehYiEiu7YVJJcGBNBHlCOREQviO39dwxTxdulwW+UOO+OrXOskQ/csaLPIKxUOUHktlUtch/SkuaV5QD2G4vweAaCoSxMZ8k9jagIRR/irArsMUBBkvwQBZj1NYclQ1WtdeoYsd38CObL/DJksETohDEy6ZCixViSEPvNKiV1SSCwIiVk0dPGwTZxeNwPoA0BDhYNc4tIkej3DcTHVTS8W1vYFlURRUS4k2naQ5xI0fseTRBHJQ3WJ6Tn45afc9k9VffnLeTH+Kdd9X9Rnont4E39i8pr21YM+umrbIBTB8Ex2jNapeDYMPaeXACP6jpZnFy8NEyG2AF+Ega5vkvKIWjidXnkItArCkmeU63Fx+eg8KiP95JfLbUQus2hJTKPeGTz9b9A0TJtnTVcdJW15L/+3ZIOQ3jeoFsEuB9IGzxFY52ntO1vJvNdPQMJhXkvTNcRYz7Qz6l09rNUNGbfVNOW7tQgzdp42/0sZtnFW0+64nFJ127Niq3QLT8vwHYw3kOplK43u3yllVjU+RYv76vu3JMghXWGsSB0u3ESlir8CjF5ZIflzQoMn0xbP3qWknhPYHTAfu11TcndM/gV+npAK5/yKkwjnzWs5UXGXJHwAFo1FU99jtfiDBlqk9Xmq1YKsy7YkB5nOmw6dy9mjCqYT72Nz9S4+BsTCObdH/e/YZR3MzUt/j/sjQMujqJNOqABq9wAJCDwn/vwSbELgikVGYviA89VqCQjLBkWsMBf7qNjRT3hPXMbT+DM+fsTUEgPlFV5oq2qzdgZ6uAb0yK/szd/zKqTdSC0GlgQ//otU9TAFEtm4moY7QTBAIb2YdPBQAqhW1LevpeqAvf9tku0fT+IfpA8fDsqAOAQxGbPa0YLgAOIZRFlh3WHrFyBDcFLdrSJP+9Ikfv1V16ukcQt9i8sBbU/+m0SAUsjdTq6mtQfoeI7xPWpsP+1vTo73Rz8VnYLmgxaDWgOuNmD8+vxzpyCIC1upRk0+Wd7Z0smljU7G9IdJYlY5vyGTyzRkkN88RMEm9OKFJ4IHwBxzcQtMNeMUwwUATphdaafYwiPK8NptzFLY0dUIAFj2UVoHzUBmmTP1mWCmKvvesqnrG3hj+FHkfjO3nN+MaWXgorgAAA6K9IXTUD1+uwaqHXsEALRgD82K6GVuzjQznaC89QI2B34wNf1dPIwydDO38xCsAKCdf19/ePn1xejxPZgLmzLlTLvloYWMde1luC66/CFwUdwGF5iJ4QIAM5jvbl94r6EYr52H2W12SlcjAHBSzoVjusrp7UZh18Z/J+vwjQccSS/JBNE2b1adygAAyNgJ5P+bqz5+CPu24bqx6Gjcz84IAtVx2VEyBJTqrocOCI9I7r4vD7cz9L3AGZ6DBzEu36w6fQsAkN2IsmzCZWMxqbMTE75ymnyFiK09l327D2K9sywTANigkEkmLwTn4RqDiPxpy5HKA4aeYqbSoi0AUAKsGA5go3ZXjR0qpUsAoMWolyNxzyiIPZ+qsEM7QDgbHW9WJWwBADq5800tDEPPiPa6ialFj0uNAEDJEC4am4A/oPGPxmDmXdikl4cLKa8CgG7265rxY/wjtmbutfwJ6M9Mer8dKHyeZkalbAEA49jkE8MATNz+qKwsMOlGAEC+lkvGJh0ds/j5uNtg3tilTY+NTe/JnqF4N6uSDACAHKQP1Lht8vSzU7iEyzPjut2EPs/Y38IspIepXm+8s+bS2w8QPd+8ONuavlmV3gIAJLA8T+O2x6fBKOJyYweNq/YsVtd2SjETADgxiwkX4POo7fsmuHnc8rCP05hqlnABgBq023MivCisNnZRtK+sru0oXAIAK+fRHim5pkf85kL/YfPLQ/xReQkXAChjtR0XhfDJaiOHaB9ZXctR2AQARsyesDkUv0deoTWmffvT4f6SYAUA6+xXzrX3Smi6X8zthH22b/w19LM0XlWqr0rjAgAWs1Wq4T6AhPsAVGoEAAa5PpwVKjiHWlfJ2TZJf63FjF8SUG6KBOOL9A4PW3qOHE295pQyfVPIvxcJeU+CKduBk6Q+a2BAVtKhf4QnHrHLFpj6sNDUDvhCfNPmtn4pdDSUkHE1wPPrF1UvkQS/L1S52Zv0Sb/r9YK+jx51oWU+i39Owb1p4MDw3LcwvjpMvtDXPEWBlLcw4DNpOOC8f11nKez61/hc4txssbudIo5lL+aszAI1EiiSfkCetqOyBs4trCbou3jqJZ4diL4zvDnDBRgP+086X66Tvj3JOY1rJwmj/sJrubDrVb32PWhOs6BN+sJXQ+6nOZJTgPRg4PWz8sp/wWI3wsGBQoSU6tr0dWOkrwhDNCN5mfGAM5vfnawcoCdm2CdzIN0r72XbbDWqjom1cMjYh229sPnvzWLZAaSiQR3bSL1XjCwFH1wa4ZmmLeiaD4xutxAZfzu0FwMUkXTsvb7SX7TLM4zwjGg+HbjiaRWI92lgwaxTyKgiXbnThL9j7uBDihzuMULvXXes0e9x7PwRK+6mBLGD9z7PAt7b7va1J2EHu/zZfZ6JPoQVd849MZCk3RJOxd5Nsxi+O0lUD4Pochlk5+4naG1j6yiVRKBPobLOad//hDECeD1ORiB9M37JsSxMC6yAkKEdy7S1aRmXRGrLECneqByM8iQ8x6d71F1uhkYUi3WEjh/A9Yw//HCidh7pl7XD8vEkuN/f7XQ3+fhmSfR/9fHkNcRp4qCD13IGIBIAsQXtoDUnASJc+5H5f7YWufNDdZ3SiHJqVvKw8K1RNB/4mJi3YzQP47nmN2cw2BH4yKk+zk7wcLx2bVzeS773YW/7nMg8DMlWZGeYPJ8lYLzOnN4o/0fk9Fb9upq1yXbRyN7iDSRnOnj+kn3vLjHbn3NmA2tRwcfVd/KHGxPybUwcg9e742hY/XBtEgCQYe9Qh8t8fte6aEo1Lt7a9rryutsDxLxo0o9/lhdL/GMs9n3cCxZiuv3as0lchJm9dQGckDBOT/R+y2ft/W/eswB4NFnsqcrBTerQmx0BTPclttiZPF+ctHerFc2RW9MJzpuGOShqyTLCNsCjhPV3EtMF8nVQf2TL6GzI6EphQEjQgG6JrtMu/0zWg2e97o/uoTIf4ipUvVVM0KYey+VkMCWrFynVZh/hpTTXcm3+EV7yX7W6Ehrz8KON4P9MrENJx2msYomlnUT80OrH6Y1+KEfOWn8KyenbZuHQkjBZcDAx5+J64Aj6TSooLJw3anwLeZGOQeSSPXLe6dVY7MF7HhAl2HU9fwES3l2dLETAm5btht91AwjpdUoQghLn7RhAIRWFRVWJa2Jtc0Tm+dHRGiAvx6wG/OCGa7BsWuJ6U3LwfOzSY5qNsj3Qpt6+JyEhflEfl2YZ7jhjJ3y+3ehNh4IBG4eEmVuhYdlx/EQQvnVDqC5Lodj7NWEXjMFyT14tjF768alhticUJrdl3w6P7cKsF4rhxIKWxOSELDHpzaBPR0EgNZlKdZrSiJfPGaWK++nvRxwoo0gt4maZU1CAx33oq3e+NirCq8K514FHpLc0jbti5KzNlr3ttdqoSeYKrOsq+jS0w4q5Z2AMeYnbAgCra8oCHFF0wJ/PTdXUMVyIdTRhS8cJZVr5dTMliVhKm9/TZduaYLTA346l+ILCTo1es+CVq/f+2MU+XuX47AuupenBsoFCNMV/2ywHjCr2flEAWipfnI46tqmjq81ytF7IWoydKyHCSI4ew+k4+ATvUzq2buldaR6SAI4VKAMyMT7zkBkAMB00NLbwmtJqj2k7NAGAqHKufA41DAksWEk7A33esJTuBprShiAOZCMOdd72+E7b1umdzQCSOsdaB3BxZgCAIhUUSdbxYbW7MfnSRjQBAOeidlz5FgodFOhlNAn2jcFu6KmERUygbnHGMpnfdLZ+KTEVgF9WExaIcJy8hr/tp7Y+ofIvp0nKjrUMZqLMAMAsmaCWuxWW9dpVpoxoAgBXKtOVhyhPGCAhWFJty3Ija39F5udrAvbBC+QD+d2Qpx5Dhfh+FqLgzUW10AwAWChUQzuhruPOnJ3rUZXMdgmhZDvzdRCfX1UCN4/l/wPrk1X0qHN3KbpjTKBihdxy04nZgZFKr7EcDqvvSSpivzg7QGxmssgfLo5KZRV1TZtdbR+k3S/kYjTNfDUZyWrcFtxkiVhetaWfvcxumYBgVeSozNkvIgSbt+L/2Cl6TuiPToNFUi3gzvnWRxo0ES1a/Wjq0Zc47dikmBBXXE4/cj/BEnTUGU8vsXsssBsmrEbCzB27QqDQGPdcgFpmIb3VQSk9zfTyXFlADILp0V5qUnuHn2SAu8QszfXheW/UnD34sJXHTECWUYQhLc5QozwqlP1qnYO/j2pQmGU03C06s3d2EjlIdLNuy+Z0X9GIUUWCXDpwtAPYI/zXrF26ADyEpyyj5o5bn4GKoyNdkhskDGYenTTQ+fRqo0EL0yIqcAfyVOvo2jq3CjCRKOLgRzv8NZ30rd0sMLzpKrIwt866C8KrAes6AeYvDWFOdG2WjV8dNiG2wUyaYIU3T/cDo3COPFw8EPEFcIZAcCNE6BpH0CBPxefguDvpbTKPZF5TYE+uaLtxvaIUB3bIQI6/yK34JNzrQt1az5ucZEtXCMlBED4lW3rAfndm6l/kCGLzwMc1jaGqJo9VNR0VIO4dMQMAo+m4cpFwrKQXPzW3czk7Vehrc4bS6j+UCQBQhrljlDaOxR/+L+5R2jt6Tz+GWNGIJbKP1cd9mk9gzEk9hjdUxnNNvHTW4dOvtRS4MRoQDFpUwYuR+pe67JmTNfNtDqx7LG4zNLjh8a/7i6F+adgW4ci+DW1Ilf9ok+1zg/3+lfN6pK5X6QelSexeWGj2JnH1ym6sQa173zvfno297vUcHC6hAoTC/3enX+ej+9JNHu5RQubQD4++jHOK2fiK8Df3A4QC1LZSDmK46S0VdPvZ8VSJnWHbWlJDsshRGb3dyRkMr3d8VnqqBEcrMSKUyBqMsk6yUayfov2tM+rgwqxlrsiFu4pvawUNfFtcuWrc8FmGXzmz8Vn5LxfzeQoLfUX/JWNR9xC9tZZamjtBesX5eUAqtw7rpFfDcdbgXsMcsICLg6iqrNnoDTf4umgefPn5ZdXLAEaKmKr9K2jWq3EjfHsxMwBg48Ul4dwopQnV1GzvwQsXaQIAGfxz3b1L+LfNKAGAuxiMqmZyB+AYNU1XTRJXly88AYU39jt8cP2yet2jRRzcU6scgDEiEryUmuE0/9XcsZcfId18ZowZMT1Pn3IAxpBI9rrhhqfOkyl7L398ZNuIPH7ElH1o1LGcrV7PCOR1IzMAwAuoc0mYU0VR8SZmewtvuEATAGjx8Jyr7ndZRRabBAAakrqa1eFyutex5al/HR9+Pg/51BPSD406ljMQA8pRvJ9nBgCMQyre6J1RTDLuzPw1pAsbjcEeOqQ1rdTmu87PE3XTX6L5Gyznwp9PhH9fPkpGQ8UNREgtj619rgZb/3wPFNQVbHc/a4jvwl/8oBKYjqAA6N6ujHBoGb4ATrvhNBnDILjc0CJKnveWTCZsDPoCAtX87ot1zaqQIOzniFoY5+YhQw5B2c/phhnSAZA9ApFkx0IJ7sCLThlPpxnHyv9oR13WpgPR4gUqXIl2N4nXnTkJrp58Eu4njBlKzTOEZg8IxnUq8+sqOnQo9N2SE6jdRZ1z/fsQ3CJqNvCck7DRQdc3RveF/dc5mlOPI8T4uL+oz+Z8sJ9wZo/NELlDNct9N677yFvr2oYCQ3/83EfWnj06lnR27o268AYQhVTPo3RYYPpkhgyVUD50TQGcbIPBCGxagjGtFBjceJbYSX958r3v5q3JbgoA8LXamYl9ce+UOusgjorz1/LGw/LsWuxIqVZLUflBNNzqe8wfBnngUekITgge65Xj6xD8Ero1H/HAEgzxiww6j8ZB7I9hA4PQLxy2xTCSF3tJ/60ye1nRAiEhHZjEwgdaaD7HdmaDiTG4HD0ArtUhToud4pjcKlanIcEUD7j13JTtBA9u040VgeqfcMoXejWyk7YDcHR0TNJsYM2cyGylQEg654jKROckKeaXtByXo7DqAQhhd+e41CpRPIm6zoUBBU30L6veKGoHUvVujt12wrswKY0GCX7BAJ1ePs85euedVbtDdCFD6u6HVpjhIAJuyalS4D2EoUBc+OfKne64AHj8o92ql+v1XqI15bZv54pNU+xgh2zxoFup3vOQ40Jgk6wnrxfKqgVYJ8SCL5iRzYqxfYJEKQ6I4V7umobUg1tBdDZCI6wYso5GIsPj5aztuwBIib7SFoG3neHuUIkB0omw3HgYMqAVKWPKX3j0zEOeXOXa53uihs/cCwK2zTUdWfmdaBXGvP2ca3oubeEUEhTjUTjLD469sBTbSoNat4Q6NAHDoLn1d7TVHjJAmwfrggxygS3ojqv4siKiccTvzqizQ/sT37uxiPOJBH54kEryjipahqC4WYQ3Ztrduw39FZkaL80/Kl1M7mFa0VRxRoxS2hASYUpIdRLxT54CSsaACskZURcD6T7DueOjXevevtHYqtG2ZT+lHHVdNiMYIjJ4fu/nmbJp1zaOCONKPSKaP8J95Ije8V4Dnzyb3018HkdmaFbKBJDZMrXEB/VBy2mXVnq8WJSTK8CQuWPax3x8N3IdHtP+nKkRuXSj644Hnl38rAj9tk+2VVRuWRjNa1nsrvymeydN2VmUP4vo65rVvUozV8g+vFK0Pl3TTFjraGzjnpqnYj8fEn7y8xRGCb8o0PpJFDvkn5OOcISVLmQL98k0v89Y4snCvN8eEeM3lT34MjVzW2tBDx823AnRhLHF+wMcfn1USCfNH/y2+Nkmud//9f0xIbj11Zu5Zj4+4VjnVY/3brOKzwL+ejBmAOA47WPUljHF/2vcrorTjC9qauGcdjWqnl4Xqn61TABAfHiRvtpVT/BXt6udWv7G98iwegCujaC1eL1yhl59ATcUPRL3AaIOA+I5uupJcT1P8HWp2/hzT0Sgulz3jhhpRAGwRce+/k0LmNKMTfgx0HDnnYCoD4hwwcoVOwxDBCUhRKsQoCSRhCue2/9c9F4/djN/iU8vqQQAu2W7NleXuELigy7hrrH0ugYBzkBDFOm6hLH5gmTFDrY922J2jrjyFiDRWEKvovHJtvocMB+GdcfEc26nXAIxds31Zvyjgg9jDEkcu356cP45FQyWQ/2Xr9D3uuWTcP5rnCe2ZJ0E+rAzmSuB7q8l5kKexhJKIEgrqufzwt4z0Ma+6Z2Tc87Mxal5/108FsEkt5OMAUkkyPVYQvnEFI//BZi8mLGfYTCJKmKnPSOjj6PKKtrk9r4yTzXtIoLNfgCFXbO64O3y2dHOc0mB/cn4z5fkuA4VivPPReLcHVz8e0Cn05dLt14MyJdAU5yPV1oQSPcU194ylCH1I3Xt+oTMx7XGZgDuxpWddWvXNDuvgrl5OdL1SFnrVEM9U/0qfyz+6vo/VODmhzpDG/dFXZtJ7jTriHeSCKPhhLO5/uYBuSfw1POp6E8u60XdpKOROkyUcoWjqimnNyHhPDDdV1/7ND2Bh/7aiuxpFbYlYhwZNrk3v2ylTvyNsFmfuRontBwiqKx329Zob7jLYDIb9PrG+AWk4nN4QAF3naK32CroJjFK0dzBGBdbhqGvOwlO4Bqc2B+K8vMn9SgTYKOTXQpGthMF0aJQHsdrTiN+fG+eK6bKky6CiukeqBgoB0KYhl0ngc3MWhYQhR6ULDmmmrqvURCguRGH+xUW59GyJPI78e38CbKxEQpOnYlmZUheRl8+5Orw0KnDEZXpMdVzYEcr8V95gf54U3cS7adnQVQm9yAR5pkyblumE52RaVLbIouY4WxcNzoLJraAqsbN7CUaEyQRtqm83YVxgTXFBNPk2z9SfS/2mTSulgEfWUOYmQEfiAaWnX+P0ezKFz1BzO/T9SX4B8Sm7NUmDnbHI74izpe3Dq/k2jqvsxNBX7keI1eux798aA+Ee3pag6xpPDa7uIun6dXBDb9xrdpAFa1TYvlj/3iacVrXUYInG3OQv5lASKQr6Ok3CWTOFrkE3Ab4lFR8hbY0DZsgpiXw3Ic8YccFXomJeuZ+zNjq4CmlxYhcXQnrgtpWb2S+JXEp5JHh9APA4IjKN4hdm0qnHRzhSFfJCcOkg/RinGMzwtgNDahb4H/uNWjrIexsVRC9uYlMT3CCWCLeq12rSi3BlAQrnIAdFhL2INatBUy7ruc1TE+6eZ2XkZ/C6d6+CJrwouvF0ghjWDogxPbgxotmr56iGJoKnuwNF/VWHb037trPU+K8a9PCmGGWrqdiVkSOISAAc7D91xXG8Svq43DBvltxo/jeFylAbMWcCDXDm0rM6DbyRvFtLzAazwd/SPi1x5/NHyxHgX5VESDDn1tRHXzSlbjz2ulMvtv9Dp+Ic6KQZ3edNwa+9iZsx7kIwYF4aRfPuiAwhoYbkgvhVzlgwfF3Z5tX5KgmwkDs6AQdqyuZv1U3sFzdM7UxaJQ6JM5ELO+d+/k6PEylnYrwSOBlurpS2rECSHSp8S5Sbrm9jweZ44BxmkOBY4P5BmhH1PRRkCRcXYG91K0JRzOD/B1vQCcHf//8atBI/HuWuilLAbut+HwOMwBwqaIhe73RUkx4vCmUs4j6ALwz2cUa21NgLwszAYDj7hk5AvfEbG4HnKsavV0z2HZTPwBwNCiFQ3kIus/yxQ2assWZAi2zvyzAEU2C3XdnMwLHq7+vztaFd9UtqeZAqkKXkjoBs2vNdgByZS2cA1XNs70DCmO/0wQp1xWZZFWF8W3oy6uDaQnLF/YRxHk4rtJAAui5f4zymPhhpt+bgyGzSZdePfx3cSoXJIAuErW2pSJav7eSO0FL2bOd0eNgTenDatV0qcMQm4q085gBgJZgp6OlHCwNuT4pJjv46ZFji8t1ho8XaAIABIPsmTYL/HWV3harXQv7AQAWvtqIyuK3dJ+Cj9PGMb7K/JvB5xoGYzzTeucCQeXKMYa5Jh9EzhnyD3aGdQvU/FS1qMnjkPpyqtBQbX+HZgCANU1TteXcz9EMPZ0a78Xu1gxoX41fMf9Gx5SxOfgyF43WlePpTPS7KysCZeKjhxfH8OR2QZTGU8btjQNsDjEviJ5zZ659N/5Cs3tCTKjmg9XhwU2AieBC2CpJAc9MszqjvkvHbiHW4L7rMM9qMRXNBirYkwJvjoctYaKk80gNWxIUK2xDd1rykGGMhRq2glXBCIanrVbE4ctMSCncz7rDmN8J8+7xEr+37HpwPbbLV7DuIoUNODXiuNOYAYAdqqXg3NFSErZEqkops7NsF4dEt0pzJgBg3t6nyOT+ujWUO3o/HWboODheW/ZPjzH7Y2vJl5Vf1yz6cJxee134g1HHKtqNR06Yb1afnVoMAHh1fMz7KJmMuovLqpY/VRzDP+iqbrVar9VPSZxLCflzMZyzGDZ8juE3iuEfdIFWywg4UAxhvkt7H3Vz2Nmijfg10C3pDCGbW5HkGR033VTgXud+mVEqiPa0FRwBokdONicFMVWtN2cDyUBXkaaL5B06Dqt35stna5O88Hr68+Z+0vHQeOL7mZXCPby/RztHkz1eoTOcHLwcfGzDjP9lqtKlou5FzABAt+Kmy07cqDp8+QpF+lRyz702fCBvwQM5RRMAiMkiog3HhpH3/YCarpVzwsDVzQUBQNA83tWEAQVHZpGCKOs9UgWB0sS0CoJt+jEqKJxR4KigJF3udZC6mslAYLpqlIKwZZRLawYKHLe1OAacLM8+C5yT/b4tcDp1RVdidcVxOsa8Vfh2fiRZ4tPLrNuhQJAAyu8f42gdo2Z48/uSo/P29+J71n4oGiSAghLF0zoExPPe086JT6uNadoIQf+UfWOXtuWPNasWv/o8ZgCguhluxCuXg+UWd3uW2hGf5Yq3s0gTAMDia0wbFX5SKZfmYVwWGgQAHXyMEWXhV+k+Ar+tjd34iPkX4kOGQRqfp70XJHXkjm/sJ/ruOb4mSeuYnTfjCWFvoEcG4BwfnEtpFvRelrlGIum4+DYYBA7AtEQyHmxHxTHP/CVxmr/Sp7QXobUx4qP+rGJRXehvjg/uZD3fs2M5+cf7E5+fOPC8KOzGyYE0ZYwhuF0MBVh+MePAVk05a3djJn7kqrUyvLsOroqbM46Z+nM6JvdaGsEjVfwqoN2SfHc135EyJUq88XZEIX8I5nbsDEklYj4fVQqmNM/LjlmbbOv7O+qij/N1bqYrmUIugDHNlrEKYJjRKVYXlHSPdfyGYRC+RPqs64u/jo2ougiKUNbbpI+Db/x2xXsz0rs6VPAcqFgWBi/RYfXDhM5Ens0FyhIjELEM6DiViir7E6DJ9dNP4HqWVSnodz119e7ebZ8KbVAEGh++0g/ApiYn5VRNSkMFBkNiOgyUXPxXrPkCEEh32BdBNi3O8TCdjh1Kx36Mgtx2wdrve3T5Tblwg3Dy+gFH1Y8bEJ4Y8CpF3f2ifCSfFN4eSp3qgkZwRVzRWFGKT6KmfJbumRyGcIXhjcutiG3UCPipFIo5tES/QJQ4o5fA1zjdnptOZ6UTfGNOqVAk55iL3/7V9vAJgEzoLJTAOcpesyuSLJ9+IW+7q3ToWSR3w5Y1jIGVKSSunuyIIgcV81NlP/hsnTQRh8qFuSJCUR//D4NH89aIdvtqj5KNjOeCsW9jtsu+p9no9a8geJI1GJXPffb0anRpeUfz4mHRTMBWKl2PDpgKGxjEFyPzEZovmYVbBJqzI/RTaIuAbGwW7lIsDnvF2tLp7Hu1b3qfcsk+/G3PLnDBtaF3JHFxcZZjXgxceGu9ILgKdVl711k70N7xjW3vWAcAGE3Dl1+jmMZYWowjir3aY4c8NRZirPY0Ev1+E7PCsPpUUrFDWx5UL3Rodd/wKDQrtaeR5aVhbA3ILyE3ZJhjvRLYnEuAOyGwKzeB1SZsOJCWaGuT/p5rkM+b8QSzB+lVCEqxH0kxZyEM08yz5OVyjGpfkg0zhcnqroQ1mRg3mTReLxNIU9elAcNGtsPJ5lXSDFeEIunTdwmY2MhZ8LoROcH35TLh3OplkQ6JJnwA1CB9d6SN0ThG3scVgT6N+LHBf3cmMBRjqZn7XbXIGemgb/Xk8bt/mx5VZe42eAID680ptynUQBNR9Rf8HbSWhuPaSJA7qG83SvHE4ZU8OEZqIpGXZ2GlaMKbIbq4uiDYovInRvGODQYcpAO4zgeB4dnzqV7jSqHt230tB5CUBEsE9/4cJkpF0SBAh3k35zXTHvCenvz1Ud2TezFEu6rBNFZnsbQrAZqU7ErkypRSf6XKqPZigpk+a+0vsVaED2D3JhRNwxIY2pE+dvJNX6SJNv8AiFzDxFryAUsX4o48r+31f43Yzj4WI6eSDCeJu+GPFvJDu133wd1RnUutlzOH90ntQT/X7R/amKrLW7A0s7jEKi1VMJ5La3AvXzgwxMrp+bww7wFh1HKN3Xhvv+lKLFWQ4sUEOD0zd8CG7eucPfHjJI21YN1vyB1iSH3wVqtyGD321FZKYMEewOQgYKGh26SN3RxAK4uhux5ehCjaQ3GjyCMS4cIeECSG9Ami/Bv5lzzDc4SKixDRO7muxtyUi7xbSGtZIACJ1BYtKuVj8nKICZEkv6tAB0p5TtJpK/9/XVrKVqIC5Gn5Gl+0A2Rp6qk+LbeXn8lN20x2VCwnMxjORdqIQiITNmlKN5I4thKV3Ze3OPhGP46gumAIlPrjldf1dBKZVqhtblr7/oNQt+T9uE7exCNrEZu9oghu1pbzbmo/SpgGJQZbzXpocaLCH1LDy+GH68PkYGdP4CubBJyQ1g6E90ERC3NTSp0QBu/GHRqDgqyK3V2j9dxCEcVLFpXzSIB7on3SnT1kN8WtZr7ekIrjZi5f0VjZ7TRFA2LXcUfw+v714j3uPV07vb6V+Guqzup7wTfa5UOr6bDQ1T3NbY5CGPvUfib/szeX2BjA7h6u+ioHp1/cw2IrfMVok9S9Z7yhpsnxkOmq8Xo0MV1RmRf8bpBvDNH6cgLW961Vv5SeD4Jpn5HEoPWpbBq9Bpna680qtL7lTEt5D8J1k+uhkho8aCcB6XQ2X8v3eZNlMhvyPqR7PLF2hJCMfG8uj+rFeMWAK3akFPtO/o/VbnP2iGtkR7/rWe7ck92lDvk8q6oXiA3cZktHYFYSaLq/Wd2Evot7Yw3RHQToOu7B9UKkrATgIggmR6iaaXml2a1gHX2n548XA7GA0NQHEl1jZVE8ujv65YK5p+tg0LLvdzacpN/toxn+ebxUhZ9WrxYP/6fr9Dd/3jKT9qPcwb0ZHjwa/vmHOeZ72aED+8NvjT7aj4YMnL9DKEMLCLsQsf5EarQaDzcmTWgys8xKOyFBrbcOon9JCV+wNpa53kzxvzJ5O7bVGIgO402v5IAgHbO+6RUbSNbEWEGK5hXuh+Ctu9QahUtfNk/FnItXny1lltmcqOehqOIVT1blWCfzlpMrYeA2qZwB3KGKD+QmDdOALt20yVYVTB5tTj2+GmMDy7xkk08/ezZRHkiu8F0SYN6kOz01gIVGhx4PnxMBNNZ19oSmZ0G7FbhqlOWIIN2tq4hR3nQRsLN+eWFM6eCpGpYrQ5lDB1p4wKcLgCNRIbYX1syQAvEl1a7llGiQmb6ECq/7/nV3Xt89iAoMLWoQN9mTtC42bTObuALCdRI0FV310Ea36gJCuyQ4X4E50iOCXlEIKYZ45eU7UrnNCS17WqO8MCAmY/Yand6v9O4d4kmT7ZC6qk2ekv8GIkgTdUVpWwTWFjLkaZ6q9fkiCDJsYM825A3DCEUh5hZUZGJFNwjUOTlKo3HuGa4aRV7sQlx3cjhkPGRIchPPtePHjmm8Ip2DZR/q5o86FVBaF5Sk9XumrXpwRZPTIQ8bJxNId0kTDy1nEIPjmvYo3kUVH3D7CVqAmawsvm8JH2Z8KLO8/ycLE/DBQ4WvxhWo0Pph5K98UQLfVWZ/UytitHvuWl11gNnpSwBMZijoDMvuarjMIyi2buz2w3nFt2lpdsU17X3m7DfPdSAU9ozBqxNBx8mWf4WzrW5IfaqvHR+vH+6YsTi6rz0tLf4aYgt3gu05+/SiYYq5pqhILfws18fN2XL7xjVL8jw9EWjAFXcAuix8blRIvBCOgrr//dB0izhF6Q4oWfD+aK30NB7cqT/Opn3kXl2QFB4JyrpPrPt0JPzeIdIfbzbr/hE9plcxZZnOkVdFV/zSp8FxdslyWpjEPNJJXZ1ePgtW8Q+fbzcSjnd79KdsHHypr2ZwICYguSrAJJFHlydIA6Ttjc067yPgP6S3LV3rdJuwzy3VURPPHcEuBE9RKTDdFVjDOea4iMrycYG+WNjo2W4TIQg4t+3bQ0kjB2yZ4EE1MQaEyWQTd7kBeL8RFGoyLWXUR5C3g+NeYxfCxVsIvZVoBp9HFHTUJCbXacDeU4pAR7s52EfaGGusTdyg4bF2zu/jkG6jO2B4phg6J6GFn4PPaNgei5xBroUV92Oj5wuQfwYpJO3/plgv5Y0r80XSsnGEXuAWiWmZmY1lsQ8US4K1dYzPRcTy5Jlxw4fYlmKuVWTRbRMYKmuw1I33DmDEq1P8VP92Od4QKQnw9hFYWJPYbHR0xKSftb2WMjZ8tBAxQRPsko2tgFd8fyI6MCWnUbiNYeCpRs+YHAIoP5A+IMw7ilfD67stGzBQbPe0rkPkdzvafekGuhsTZkCc1If+8DSkV43eb9zvJrl1ePyIq5kn1iSK48mmVI5s6WKnHAb87PJYKWmHAK/LiVmO1GT1IDxFSZpp6kLIrQ7z8uqWdiM1+HzjCOwrqHqwKVQCrrOeaQZV3Cn2NWhvzqwXdibTusuLztkgAGUlBxHXhPHbYl7s4t/uGwwBytV2qw66lXlF+tFiQG8sAr/l2+r8X+oPmPxVda9IVEtMFPehuoD+szcvsVuBjanjPfYXvZ1sY08gp19W6SxEGa5MH9kyBEfRetwvbGSqFojHD2jSJn5jmQ3OFTtWNPaj6WgL4LGDmfRvLGMwm5o3lTJkx2kAkCf27T4iS0PfW7p0PeQeHjoPZ90eKsPWr9dxgOSg7PKMbAB5+v0/X3SUGA8BZjFKz+g1kLfK4vgHtHa9G7ODeBAEKJ7NZ+pZtitnlTsDdSbUu3PeQvYjt8EhRO0QBPg22kUkFv+JRStiXAXYTTqYAjjf+cCyqr7UJcxbMM371xP4jigI4Kub0l4rz7G2iqZkzSvv47XPVqmV/l/qyRaVUsyrWGaB8Foer1e7OepmcSpQxfAbod3dnOIX4z27UQXtQgJobSIkWYTYZkjCAP37uo9WcCNqL9w4NRW40ADhRMYBmRub96mtPmEO9KOezoayE3UFzDVvk8YxLZha/Bzt9LXEfY5sF/FVyV4e+iHBKpbaCoIB/I7Ntfnf+qFO6ZQlYjH5ecDmKYSk61/ngM7IN9BaZKepxqwDSNsMK7eQ/gnoyGTVPFcPQgoPz7GMBocsvBftsYYjogrg5iLJtK+2TCKSnAt8VEF6h8ypqi4A7HaAjqhK8eQZOfi9fjaw35vff2n6/3Hy5fs4iRuaT43Vwu+NN/BLTk6tyTyTsd6o3OFwet5g6ojRzhtMnS3peiBHGEcGtg2GVTrJWp2gIFIs5KPyrAophV8Onw+qo/HH+YrmB6vkPieGt7VPry2xQCKnJ+lVCQrgZd0AQMCqvBgQp+mYcCLJzoVtart15zDIVzi0momismLW61a7tTrqbvnlGgR2GxHMECE3111MlUkwFXYtx1vcYe3fbYFXXPoPAKAoMCf2s2xwctbtusDZ1cPHEXsrhg3/zviTN7gbp4AtQqyGI8COwAUt782BS/OxOwDrfsN2AABVtfQvvN+Hai79m45zarWdRnmo7b48HqADqqPphAJOcVWmE6TrpjEPAGAPOIiNuy1QkZ2ZPlALnj0c0LW8YUJQOzVQI7Hs7nij+oX37OGikkz/Wu24Xl39/yx0G2C/WP7edwTWwENB1ZgUIXWF4/F+Hr/JnytTZk0+iu+3VNsAqsF0OLj5/sh79nCxF2bkfPhkWvtMijpO7Xf5R9kf4nyPCXtlFsb3H7YCf10Rc171fYX4MvixfNsA9tosnsxd4BIi9GaGT9iv+W53tfpIK2XugXoVRKRQcdx53QCAj68BNFTUdcqnmZ0LqS3ukg5q5isckmNHUVkxdEhOiVRJXISuGBHtETFhrrvIs0ngCmrX4y0mW/s3YzC3S/8BgF4cqD32EwR0ZN2mDHppiwcL+sT+RgXMwSnAcSFsTduP80FQBb4rDv49Ge9DKs6aW2psI90rV4gcAt7Eced1AQDnKIrYj0f8uwKmfu8wMr+ex/at+DweCrbC59l7ZD2HUL4oysJnurkIaug40ygE01hSAAAwASJFtvhpiPUHId5mMwgZ6lpROiDZvVwHAFBCCGOLuZhnvWQqIkz3JdKaxm5xUzevRXZkZY2929k7imOvtveTwVj3lH3OvBEvfIB4tw9/pcogEIS51MV2nLx6pta2ufndi5N/XyuzHOp4tX07VU0OQJPa84WmSZDrrfWbtTcfv/T39LPko+c1rF7YEz9rM6U1rF96M59g9cktVllRpsCqYhx3PjcAsAqrGUXBMKXcZPANOTGTJeUMraxbO2swl+LlKxzaRURxdsUEzquwS5GzJE5olHIeIgAQaVnLCVY9BRMda0k5d/1pC0gNvOwfANA6kA2xHyfxZ0FOob30iIXKxTmcqD8XxRNkr+jI0nuOA5Q5l/Jq2URemRf4ru8IkTdlT1JNaolgiwm6GXecj6Cx55gVt7BVgStP9CpJzZzxZDKMpraMBPF149VfuDk5W+JGpq7KhshgFoHBMTY8t4SruiUqOBuCgtuPmODsnl5BFd3SdTQ73pZ8fnYEBJfWAo1wYJhoYDrBwFRigU2n1YOJBAYIBC6Vl740850tyXxjgoDL/nFsp8JEAHMIANYhIQCe+XZ6Ki4wtj9z4s37J596qh8oJuSRpUTYdqvLqsl1IUNgMbGRMMVQqerjwIoOBIvhvCkAwLkOnN3usRMeBy7stGOP+bpL3ptAVFwl49CpoGt7WR4AcBwjboIWbqo65luDaW/ux0yvmj+YTumfhIntczgdVuwSmAxrg0FquqAGm9CpGElDj+MzoaBJj1s1e8vq2PD8Ub2HA5/0xTXL6K5pu/r9MM/tLnWJod96/hO400WAK2z3904HZ8b1HBMZXTWZkKNVzTR4IrD65o26AQALhQp4AbG8mTGwc8Xd5VXAeQsBSI0FsgDUVRK44G+FVjUhAgAtQ+sCJ9jUbPh1vDfcvcq/u15rNNB14z8A4DLk6XV+vLY4F6t5HHCxBfFN67IRXJ6mvw0U11QrpXisIL3DrfdWpyz1CcoU42Cq6+fWA06z7mHXSHJldz1Bkhc25j3eTjWa2gGAlJE0ZPmG5u00UW83EtQFOSsNCaSuMQ8AcA48R8Oh45ZVgdmyMih2uCIF5pZlo6wCC7EG1KjAVndAsbwg4+KWFd314aQ4TlpwPkNrbKkHhuodKaKYFRv6GbIfc/DTIS/9MrZTgbEBVOVonNhbndOIfBT6ofxW+ho/Rk89QuxZWDnKVkL8bABfj2PvaSj90uinomMD2POweJQ+Be/a1Cs42xFUIjL6yvFiE2NViUHkDnHced0AwLTOPzTImzsFZKTtprPxkryFUOjqikroqCpQTJVErdB9TYgAQEPQ4oYTrGru8jzeG2ZV+zfX4LSW/gMAWhl0k/3EBfraag4BBtTFkzBTRYeW3rOkWslLmQW+pPdhq706C5QyfZhgboceEvIzWO9lEqQ/ZO9xT/HNeinsY643vp+BGEBexdfzbQAABp/qaNw2vRWCquO3vPmnlM4CUVXQ3ZaB1pHCzA0IZ/H5u0IIma4MsYIQth1nEYuQ0CoWEwAA0w7bVYgUzJcJKp0cm5hka1dmMgCz4uQadgCA2UKsWExpLWFdNnMDYE1LvDGwFmySEogbcIxKHHj06/lwe8wpUMf+TymTqZT6cQlfVbGD4QS7nmACn+6OoP3enWfJG24ruwwvWxvb68HL+c16gt2TNasMXmaRIQBw0wgS+ynUJluos5PourUM3SwnJ0+i6Jh8vnMBH/+0qCq7K1ACAtXukEDFAHoaEAEAAARd7lPLiAJJU3vVf9PRNLE6vfgfABhAc5D5sxXKqv6W3tzG39LG2/hb36bb5EtKrTsBavpEC4MXLK+L+eAi1n/VrN8H+SC7f/79K/05bxVuEMRc/u+Ca6A8krSyN+q8ZhSj3vrcZL3BMXZZjEh+4pkDr12cFHsL/559wPd/sIUbHivH/4Z5/tj48SgOcLjTe8v3zOSy2/2M/gD9GkMWsVtTdyTVvg+3W6uwXhxk1FmId6QMP/uZeku8OJb5sRrrttOGRRDG+lpD88P7L10woNhld50dJssC2L3OGDzF47ApDuFpTp8CAII2lRzF8nnl43Csejuv2TTXrZuiCoipt3LVOC0PABikV4MhsqosnJsXcqNaGTOB3Fwn21xB7shpsLqgtLcrKqoQbBdOMXxwF9rGKrzKaemo3h+DlyEn+EL3F9zk7rf19d/HjKBNRb3EHooiBcy33plc/Tq+s+a6zu92p3tcZQgAjDX4ErKRamcBDryZOGA15vzu1LqhQJ9MYfDu3aUOAXV1EvABnDIihDlXeK67OE1OtL0glpV/vEGwZDDsxn8AYCRou9f8WQRwqr+tN5f4C228xF9cW+ZKN5RiEvjuRGUEldYn6Vt6kYQpp0tCIGG2M1CioNRuuxtMQ+kqZyxYIdOdZe0AQFgFBdiWL2IhA6bbLuIhJbK0klBFVWCVpjwAgOXhVVVBBTZuakC27IxTIAme7VmQXt6QEkijCio1Ltwj4zaUKHzkPcM5RXxjvU0t/cBQqSFFqKKiiIIb/jhTMe8lrqmdy2oNoAJD4wToKYbsWyW9Ofg7we/ImDz9CLE/XaFI8Oi10pejA7vfHCY/l9oawP52tWFpigZrOPMgp/nE2huTszl7klaVCKxzoloEDgCk2x8faoc3NwRE0HbZXL8sZyH17dVYFBuoUp1EWUDHRgR6xv+f6y66tlSUkduLpmZr/6Z3ZEMdTFfjPwAwIDTXNH+2QtTUn9Ob2/hb2ngbf+vadq70glDzAu6AcGy/akkqsE1/TKEItTbUb1F8oT/nBx9PzPQmWmTCtfG1dm8LcVdwF5g4UxQft+VK5Nvoj208DiQ8dQu3/atIawDmRPJ43jNDVrWAFTJ0OAJEYJGQzpeDGKkybTYd5mukPmldavVcjb4/dyfi/gLd/Ozoq0tIKBWjJy2eLim1ITyuoX2Edm7GMqOichceVrfRhypP98e5uOAaIt1SMlMZ2IhIq6e3SphC+I/h0nbG27Ai2dMU2mYYBoNsoANzwdjT0gvkUj0hNRpsDGuJBYmO1C7D5OPki6qP4mLe/obk8oiOTLSuUWjYBtLtYyCHeyA5Tw3tYSJItv1hitwsHaSGHT2dNhvkLxqYUw9Hu7C9CIQD18omTNkPwc1IQXEGbuS07nkzR6JsqXjCoNSB/tnqWkLsaDcUAmA8z86JiEM/Ni+SODFvBxi1gEAWZHLIlnoB1VkBkOBrf239cXXlpVD8c2NFej6ddl8uARiyiGrmQ9Hka+APe1xY9NRUTfwzLfv6FcD5A6WEtXxtbID+ymrVY9/J4iwNREZjukGdhjkX8hGsswGUWk7vnC9l7ibCX6ASP04eueRlIMD4qCzdpyeVoe+2oS3Uyi7xW4CtNYNLneV35GHLjDUvqWAwFviZPsYXKd3Uqh3A9GlyAfPGM0WbZ5+eTm8XiG9bTN+ULlK8BXWhTt9eX0xw6fmhzbNPz7XywsmFvyOUfKx3j5Wv9QMd33Kp0ouJJv36ePfA/bGqXGotwjghbiLn9s4bFtrzcNYh5vdx9wS8PmsHjblJ8rX0ORBx4SCS1KvrdExAQ9xPWeNmlEJnwqBsif2jfm+PyTxBNaN3rYpFkTQK+0rrGNAOxWV/wBCJ0kwgxiXHwLVoG8NTIrrxMiIcUDX6olm6hzE3XbRZFf1Psjqff6ujR29sTcPei1pgfGRzvgAqIHDToyngNbDbYTzaHmDsZMwrhVALcC6VHdMmJNirZ+h4+Aqx1qof3sHNn848n6ekkUKtk4gQdIA2AD2rUSVwMTGA95YBHeotFyOYhipzN3srWpDN6Iflf14z5Ob9ObbbRt2rWegh7JrzO+k0WiiO3AYhqgJrXDZ2t8iMcJNlDZRCMV8DndlBfACGGHAiLJcZtnQk7PVJE6jP8ceelv9dOzC53kfXG+wBAH1T9CXY8UBfmYmhWLzTo5rAMblPkTRKEaBgtZkotQhQ7LLEKNFqfgwbPtog3XsLUMN2ClDrVbGAADVaNwDlEhNsrXS6Fh2BW9tuLbBiz44n5lsQyCo5cbubMgQ5d85YKiOkr0f5k9PV5zqcONcoRMnJkGJoUL1q4RSvmp3aVQeS0lXTQxLDB3tHSL1gYmoFOfhhlYFVoBnIPzXLs4M6sfAJNaRCERBjfr4x17J5b7xCQllj2FP/auE0VrHLhG4qKin4El9AiQ9IcW4M8pntZMUtXK5iTkRlzvjn7m0nwtCCXVkoqCIlK6MULVW0ja07CkDffd/ZVrm6DRDZeDQv+PL2Pp6XH5qd5BLchhHXRrowk70ZsWolmlycHZeoRNFvkmOKUHKbe+0bYAslGi3kgZycD86ZfTZmRG4vKBRMphUh1Fh9Fyxz3n5RsXa4Fg9wYMTpDx4t5qxHiwKc9GSKY51QEz8zu/ENXOaQh+f8YjWU34kzjdUuErVYbcqaQkD6BQqcfSpwev9ejYSyePgOtL5aFtgex6x8BCSSdarUMGq9tUM+h7pXYPAnPvxK/trfumJ1bVjGnipf9E19v5hwCkD6GkwAgIDA0KbHTMcJyqIElfmfNAhW0nXG7kKw5twCNhvBunaR2DIAlxHBWm6unYoAAIgDcKLFgUb0ddjaX3MDHDhqAAgAcgPyiv0YByqrMdO9MjKCLhXFyfWXFHSblSYEBzYKdrKXAAVHZQbsqWAE3rVVYFw1hFuLXOXsbizkapuNJcPbVzcNEAFAlmDqdN/2OGovNz01d7tgMgPJVU6FTCfNhAAAF8As2rgpAgylZ3bHfVXaGDx7r5hsZmUQhwMzqBE7mFVjglV1DsU4rHmlNPXnfG4FjY7fKtQNoFpGYwS66swnSb8lOekLqzlu++bV36rWDWBfvdqocZ33hBvhXyZ3r8G/Gvvp1d8mlzydVnUtBMW2bB4ObwAT5g2gVoMJAKBewCzTwzOGq2ZRAqr4HwQm2HQoY1SflfFGpgGCtzGSVHhyqa2mhdv52no9+aJxO0zx0cU1B1GL+QH6viaAAEAH/LX5A+GHWrPCAHcFsZJY9ojfZZZ68VGlgozuYRGP1v5ZE1vnlIRkfUa71ybJ9dO1uT3X5/5+4usJ2R6uGEEGCTDhlSIelpNdDXBgDfkhCBXLMqgScP45B8E35l8YsGcK4Fw7QxJghRXQANhjyxkDshs+AACXENSWw0JPISL192ZMEJPWDZvfcaNoUgUWr8my5pPkuicgZwfXzWjenE2FgLkUZ0UjcwqkCxvDOpLUmfI84zmoYq4lrtJtYlvE0Rg2OJGLBAwb6zDa3AKN0xtp9MFLGD3+0V35Odcp3O5aBh7+rXbNUcL9weBlnWkPdwtovF19Mk3c9umJgmBvNLbXy/I4RKcX1VEid0n29ti6Wru6riQeoFgn7W2ZsDdAig0mAEBqgOnh6eMB1GUAyrXvEuyg9owogT3MgADAXpZECI9aJAoAqCAKw4hoGqCovAslO1ssU2z+xIvrKK6WagMAKHdsYcxmqYUBGtQ1dLmFHLASXdRstJktG2pqLXHrVu9Km2j6dKTaNSRecmGA9qR1RQ8ybuAEjYHGvy5OlEYDp5devkvTF9419AjUSoOS5RqG+RsheEFXiOU99MAgRldcPnYA8spa/hAAHFTSddLyHYfI69FHjjvfTtr1GStXaUzA5sw2rd/bwkxqm3uXVrj2bTNHsIXt+zFbJgi2cKeKY9tlsEVYYQ+eGGyzT6kR88DR5/KUvrhw0VS4vVLkuHwZmhvWJcb9+vDTWxjn+VWHK/kX/SoUq3XqR0HBGTPh2QLmpsEEANhq4LoN9XPvOoKU+F8UBOnUn1Glx5gGAh7XSBLxrEWiAIAPYtCMiINxvTWehk9Wqi4xuspxDTzbEA8ATDcorOHi3J3Pg4quWM3oQAuaOJv+nCho05SaGjfypyDOlHa9bu2tZMVZa/9jA26ti1vDuy4Gt11HeEMwHM276IdGeBEfuyWDSxogAoBbgzdj++6Wwc3W3N0ddJriKpdNi1hptqqGbxb5nHT+/YIBNdzO2JKvoMZaZqCCOhrZIxV0H4OYKdDNGrFJoAbFpivYPtPh8zIXnWTb4NoMHX9Ry20AdRga5LxjHugH46M3mZujv7QGO7LVx3JrfbcB7NhWfIaTEPDHbemR6f1aLg16p7axgc96WnvDbFfX3mDZOmlPyYQ9BnxoMAEAfAGmwtNHAXhn/kkD4OGGbFt7xj6AHWZANMAelkQQj1wkCgDwIKrDiGiM3q4BivTrJaIktTL/gMNFewCAKzU3zCRFgIYLM84tHjj8KvxqvSnhc7TxCk/L23TBjwvXHiotEtbfKvw5+lkkFSKsNf9Thf0xxbdyL0dmfhsdeZV96q/qm31cL/cESbWfcYgVSXcZmWQwLWX/OcrSNJ3jpCS+0D1+A3c9q/MHX0J4ghoN41Frez4G87xwUEUa3SS4QtPiGQjKX3b3V3oW8PrArxQTyNmt9IIQV8IZNPPN+xiDR7jOYBlumI9m+ndavwQK8ml2TBDE7KrwJRJLIrn933ZRANS++RXGPp5aMdhSrynKLZVl246VVuF28T/3Hn5NBXZYO3PdwK5YwbGAq7bkp0NM8ZZ8AABTuwjFcFc0An8wqrLx71lPM8Nb7ER+vOdplI0sAMBin1K76Ch1eqH2yGZ2Lu3EDKrTZYurZ3nk8Y3q4OOG8SVdqLdVwHYO1puo1IsrUjqt6k1Phhu+CwaMh00+Km9c85JuEr71c6VVc6coTDYFApkwkL5KBMBGkf7cdn4lfi756Ou6Iy5S8+ndlkiwa9w/tg7BPXed8XgIXq2t5KXgpeNnDGFXYCAtFKodFqHWisX+NAQAQNKCjEjHjDI6QG/rdRLRB9bgS/YaTXsAQN9mECdZpIQpcB+s8gqBTWC2tJk4uAlsR0uMy9xNswksRi6FG5OXWJJ+ZU+6uIlKLJ8pQMyjuLRZO127IrQ5dg/uumPEImCZvK/Lml4CluX7+axh4z38jDODyjDNmCHlRwt7m+xaULzsS+/TFP+b2XbHspvwWjdkEDxXhn/+BvDZ6YmXQQ6sjdKFuQiUIcsugueudKltySz0EOPMn0RzN0l5hU0iIj7H5H1Gz+NIo14fqzygBDhyqr6EhzVel9pnCR4A5ye8oyUn4drLXgFM3DSeijXfhN5+ndLoizM2fjpdAmKqvn+Snqv+DW0Rk5GiKkcF03T2GfKlFk7koDmkTRmuCo6N/+zDxA9a0gLghsGHa3f7GzHXnwufk7RCTgAGCjS113fL3VyubGSz8C9VH+J/TK/wlYbHe0XiOoCssAqQhVkOS85pjRk2/zek1zm94jq4saDT5fWk/ic7uyhNxQaIu7LyxeJbA2YtXN1P8V+fA+oqF+5lf1IrZOQoEtY1WkB4fxbUSPoEY/6uc8T/1/ZhckpcKWjvprk6wVs6sg3IUODu0ZONHFcd5ZLmswfUJMfvlsiykJf3jDY0f+sAYIYjjho0sQ2dX8JZIXw89IAQsCMyZnx3zb0lYgpPOEjADm2GTHmEMGSyRfXChbWO2QPb1UZmJNavM3IH52+cZz5oByzl+TwmeeBoGVT4zh2AHcEd2CTOq5zP2JnU9ZIhEU3pEacXOubXNmPYT9Iyrz2PkZDbaY4WD/ht8sKMY9q9r4QvYas9aWviMNFJ7+q9aTPy/dt0kK9cnAfMlygmIvIQnsU/inaR6Tqd2tTz6bImJEJrFGYCwef/j8G584jsg7cSkZ1JF7UcWR22TCVpWf993SKBcqVNaP6vE2h0aYGTARq0Jjksjoe12bjEw032fDSJyPo4Bj9xi9L9O1yaT3PfAikuJrNzdXzglixr6TVyW9QzWhZk588b3VhVCbcC4xJTFxmnmDpX3GLqAY5jTDVTGFTkj1k0gaF7sdGOfOKJtC34HbEThv/ggIetpwlCFx6rmTp37GbqgujyqYuM7QyKgtJjP1OXKRb0zm/d6pY/XjR1aeJHUxcST5o6pzcy2PGmqQ5+/GnqIRKPmmph8ampSxavyhWCsQWKjmflDxIyLTn48a5yuvCMFxofIbGbU486JeA8t6yE1FZkNQufzUtrjxxFUZqkrRb2bTiFNhiUFOkCkzvjRVs3+aQn9s+dK3UXPLHo6UEST47bcLYJGx5JyYXpCWpTCk4rYnqgJwpNKUPiECRAmoNrbKSqfJtl4GbRdC1ZtfiNNVsnc5QVV2ZQiC+Z7KDjcoTZG7RxejediCl9yz/pDuqIWIO7v8c6o26FgDWcOKdW2qUNpk5wVqZ7ptFicadaSggAbPUME2/Blh11ariFwULd92UWmY1TY4TgZCMXELL7gAFASrd5nTm20qrowm2O0CZ0+fa8hEMp+VDfYeNfM73HtRrCU936vdKrvZ2nniDHEYbSlRIGzTajAABaAClphug+jeeCBFabf1QPM439WLly2aO58otQF1wCtUUMYVdgIk0EbBsR5Jmiu9MQAADJ1WMSuftRfQBU7eskAt2jRClNewAAeuaMqUxS2Iv5w5rVDXyc3mTjs7QxG59lTLGZgghu8cozqD3JijALFJ0U7Ukv0uFieJ16c5d/rCI8scluSbvbRFbhssluR6vflGlG6h44PE0v1L1aehIANKeQjcJSuwGgBUFNleVrp+PcBWxq45x6tt0YTNtUh6kya7DVlNJMCAAwAcZVyHWi8K1gynpm50IIyLOxByE6BoFriBHrxHhNcgY6eZNjNMYb9XN/jvYv8QwfriF/EQKegg4B6o66JycYhQ3/gt8TNnbp1ww6pQJB/iMzP1UdAlQoyG9/mDg3Ka+NJbtD+ZDoVVWZIP+3VeaOqpnlsf2PBdz2cZHwYETZAuOijAIAzNGsbHlXe4jpul6Isq3L6V9z+S53FV57s2dYur2pDXToHok04xKlpSclUQCAWtQQRD3ZgTpUnE1s0KhLewDAZF57QdJ1rqUPcxgOh3Kc2TpUDsTnTYZ6SZ26LYJIdt3145JnScv+tSRc8pb7FhtjgQf6vRj++ubchl+5sg5v9gEyLz1kYmWXk62IXeBlOdlNA7fTXAIA3BXC3dAN7g4qlnMQpmH+jUrIe5qxR/047jpiuT7FOGsrJx0bGcfNGL68lS4nhNEu+gAA5vImDjGNuCyDjgTaXTWQggSvl7IAAHABIkrMhex5e3g6EjGxmeQN2beiyFIsMcXT9hZ3iuyPG+xLwkZ0je1mWAbOHxQNfKQpTmx6utzIWX3CX3kE3jpVnVXcTXJZCUe/tcVqnzf82BTL1RHGinX5gk01owAAG7FypjoLb2AATgBlas80DSjLDDQENMWSNAH2VG67rHZ9nrYUejhRlKgUI1qpTGTGF3BJr5fDAwCcXlAK+1EKkkWrqewEvULy2BZrcEF5WZuGkObGuuqUfsEkKmkb9kSXnAomtUSlWMAa3PdzsXaHIWs4UdUo7dmdYd2c+PANkUj5mKNI0finPMZ+7Q5msZJbXywQAmte7Cnnh4AIx+4TS5oJIjFCTBcDy+MV4BASLz0JALBuJLJcajcA4MoQFrF8LJ1nmNgilrLejmU3h9yVoTCYvedGEsw0EgIAmCQ5IpvLtrRwFBa7UcG6ui3NGr1awncZ2ga+y4QwofRV11jkIzgc831wRyDcOfZ9wuF8ujaslSif6D1qlWhvh0erDpx815boU9Cr1KLjboNFyIRZ7GvDwHIUp6MAAAr20U0nSOBQBuBlksIR2mzXma6B0G67BToSoavmSDqPxezCtWtGuM/7f56GAACIsTlRYnxOZSIXyZlr1AYAeD1DEM6oqJj9aA7ScNpM7RakydliXc/yg6hZLqUDyUu6a/3qPrPClqjkqmgU9+kSttRiwKbAu9ie6H6RzVoltjmJKhJMBLfdpUCIcDlsFAMRicNDGRAxu/QkAKAiJHFZajcA0L1Iiqf7kq4xPKBUc8cMpKp2VgRSHNZiQgDg4oTUauPSAlHOYKZRT5Qgo9K2IKOGsPluuPIquJia7Nufg4G3vbzgle+an/rvjhIrkkdV8vSiyY9lgfZxkXAaK9ey5KKIAgDcpWVv9UHkSpghSn0tAS+jlbvU2vmzK/RObXBA79VIJ85ccydtbi5QRKe03cTCKVGigz/+PQ67vqfziSqw0toAQFIrt7eSTrjssPD1jSVsyFzDbt8UKhDfeknToq27Ma/VLILrCknIq1vdzfGkfZYf9ZBRkydeukarr4LTHYTj3U7fmBxSsz48bCRP1SNCuQWUAMCm2Vm6GwDqgOI+9x4Jq+Fm7uL3eAcFCoZBm/3YTPOXj3u/dodfCq9c7Sr9478LSSSCQ4BKAPnt8RFmePFS/GQXvScfH5UKAPnP/GhWjT2uNvJPhw2292QYi3DRA5VSAAABI9UbVTFgYAs7yjNoOSDSoKFslJSKOlgwcduCqmxaW6QsEoh8IsEsxgMAOUAVkBcEcwY0HxcY4dbg8Ddo5thf+Or2EaYtZpAaF1cr2j59eY/k8Naz34seqeGRQSO5bhwydxXC3YniHBMA4ASoiwakl6g5B2F5DHDHQOZqZ6YHyJWuHE6sOcdQmIotHwvYqf/lXd/fFAn/IrGkC+jKzMsKG72neWn9SgIMsZb0gFdVW3Mn8JjlLAAAywXOwHDZ61tZUxJXozMvs129AjtniVWVBoJQcfffVak6ZognkNVP0rE+MijVuHUtoVZ7UQkaA41/VZxg8FE/kVvCOfkeIhEmfDpSQocNvw/f8R4uGSfp859wPXeh6nPW+BNxc6zfmDBuANxFcVoKAOAKDfUecH0lwJr9vJReqfpsVeMvb9s02OAtTaQ9wIUHXWM8bJOTKS9s3l1+DE6Zs0mUO5/eFUA99zqJEK7rFSaF3oZ4AEB0V1IlN8J+jBxRODTKapqeY73IUFli805CgE9geLP0VnmSFnsYwPK13nD62MBJa2QKhKCqeZcDUHUPeuq1xJBt7MI8D3lu+yBlRJuYz75QuY4eDVN/v/mwJRiiwrOMep/u1Qw7Boqcn6jpOpjfhm/FvzwPNuLtrWabFcXgVWG9nBXG/FP3N5slV1GFVP2BcohbSVCoXrdT3gNr7w3KIMOut9BvxuXNTe3gami2d2hgW7A8QabjNRuaaAkZkGmRFSH76GMMtFKFF6VJ4Uk/YIv/iZQooCIDM7pFPSQzdF2/py+WDSQo9rU0Q+FWmX3+t1DKAxY3EyLKkl0CC6AJmtF4eRiEqgChrTDnsh09afuxJ9csBnUPYVk35msPV7WwyOp94BCpCvT7TvyTaqY33Lgq5XAIY5butFhBbjePXBgoRYpxNObIQbCz3csteRS/Y0EWHXc/4gp8MA6BCw/mcqvz8y4kSiAYbIJFhjzwzQ5mXg7Fgl1oFHSKB1FRQ8hxY/qFJ8RHJz0PfDInOMJNxcuVPWiQ7nfORkOaaKIRaKEL8U5h3cf9ad3HCa378I+OqNf707oPi3wrHIAew+4tfQMpqChw+0EvGZ7pow/ub0BNi5yLvx78hDIKKaXMOUxKEKYekUoU7gfrPoYWiBUR9j45q3jGPQsjh1z+aRO6Bjnjwzj8El9kRqyraAuDfhWNNQ5YuDmIVjteui6G2rVJChUNWOnidyteR21FVirTNPBOzlnqOQjmclsbhdH3SMKeoktqZ2QQN9OLakubJS8mIGcB6ZArqOPhJXwgFqOiuycvMyMcatrFJ2bLsKAkuMb6VQkBgNzKzcTMqga1eAGOsqz4cJdkgqKo+DSXZQdoUfENL38INKIyXfvk4erResTmPg3OhDBdBdj6neA1KyFTSxVNuut6XZv8wHE1H3xq5dEiRPGueZJ5Rcc973b8I5quLGvS5D43j6or2+R3nrqKnGvVGOqyeEDPD+BhmkwoL3CfTRF7Xy7xm3cRKhw82Kq1Pj/QfJWv0EPRiRbc7pTb4/FqWa1QYWdkMWH25IuiwN7lKAAA+xirKBDL0plFqEz+p7pvwFjp323tmUvrTwFczQxcAVxkSa7FQzfvAgAYCrfHiaZu5oNNxKFVidrrH3hHarggHgCwJBNl/lh7wezEKrysprWgqMLYkiX7du5JjKm9txJqr4mT1QxYuElUS9aFnrwhZ5MowM5E9BI4tkOgBoAT9bA6MclJo376/N/FYJSFy3Vtq9Pg7S4nEwDUZ0hNt6dijFSLjECcqns/By5c2VhxF0+UCkZbvbdr/l1EouPM7GRskga1MrxBptUsW21kOsMgpAZZyLlWnmwdqBH3a7xpiG2Or1z4XkcTYqL/hS6wEvOvVTF07bUi4dtd3LLXvdMoAIAd2XU6zZlKsiLAHY7bzur25s9ce/WXdtUGLrSrSnJxZtT9L14AwIgCS8SKibYoXIui2cQJTTG5BwBUkFlhUuoWP76pxp15Fmfyxt44BDPx6BBTS+2gpaP33O0xtsjH/u0dqSy6UrDhOtScTxxBQE3QhCgWxrJtPUglqWpkgJrdNmjmlsoEgA2EHFMdGkoQpICMiMBd70UycRc2MGvGYVenseu8jVaekEL8m87+AEIM8TtT5989vD9lOjZNbhqj8EIG707iqQ6t03YLLYYNTCkFABigpbpRrAF3odnps31ZQGus2EALOkrSgirxAgAGpi7aBZ1NHG7oS+4BAJ2y1DAplvwRTS9zEkQoPjdccYBcT79lBR7BfaDZv/E1qef/onV5e7KR/4/t5Pf0CzxQ+7+qPP1X9c3e17palAmNWjQBAEBUmGFzFJrYQS3VgFvoNTviIgDHfqowrVLB+DuZ89x+zu953TiSprj7L+uPO6uJPq+ykAMAwGhd3JJaGW1w8H+vYfXZpBdaAIAx+qZyuU4FDIaSBpx5o+tY6ysxMbXW16qJ1Ky7ir2RUMZ/T91WKEiT+YGjqL2fzz/hHILfaDlBfarPwwjhnUJLzm0XUgCAKtpWcUMPQxQHvSiOAIvWO0s3smfOL+MtDQuD0SJZ9hxfazCqOwGEaWJ5FwDYwWhcnFF0nEtLProykWAVXhQPAHDxO2UX1g2yB9WH9CYXH6ONBXysKSXi6/R3hO8yBBKo1cO62lMDdm6yBduZ2N4ApBwCGgaoOGw0l0/T/10MRq3AQdc2HYG8Xk4mANC3EM1tTzlZJK0wAs60sUxy4AJruYqsxlS0gppaSAgATGX59QrWroVjGumTixk0g3y31hdazoZb69vzNuQgxIbqyVTFeM7P+6EhF+CDRh6WG1wf8aE4lFQvVYwDFc3u36vTOeHtZ1Txj6ejAAAqHpVTX52cnsoEVDNxVTzzzJl/fWTlSgZjZOWMpmPYogCkcRcAwDY0BXKiaaaBlhOpxqpE9wPu/46kuCAeAPBKpmW6WJ08zIO+UIzW9O52o2RlLbHTzeQlNag5JhUWmJ3idbsKocmKUyj+t1EQOpJQLMML/fhSJRT3GnpuonCa23qVCFY4nxVWO+eES6PG/5PwV5JjFG7dsa2eQapKy8kEAKEbUrvbU3EbqfZ1DYpXwKHZijtb5BQxUUMhAMCrZcrpY3WczSBNPaNmkLaZLTJIrwkhk/HEninzMcz0nzcDTo/z2RgbWqo9Z7SJof1NQSycOWQ6SokUAEDreTj+aCM/Bim1SwLejgZ1eTeyo9Kb1chc3cWVuZ8pf51qVt20ijFR9yzwAgADdCsuygvaOvGcqcSH6r7VcArxAMBokSx+dgOFsgjDmpOoZFrk4+IqZD0cqFoKDc2yK2ooeL9eyzEOKIvgHULLrn0MflgNbjpRfbQkAbSgwnAK0XaYCiUZ/UPfWNntSHdWoUwAKC0SGHV0sLKDq762BIrdk9PYYeP5CxDvGAte8KL06EJC/1ygT2p9ANGGeH50zxuWpP5ojzHlEiqVIw0J+tOCHkYMZ4pvPTVWKQUAWBXij8Z7YJBSqQbcheYyaARKHBiAcBqgS7wAQICKizJDn4fqM59YXMdiPAAQQBUQFgRzBjQfFxgx1eCE77oT8aG1hn+95Xg+xvMXOaKLqezwhuK7lqc/qjx4YZa9HELc2NV1mT1F6MFFEwDAQMRt0IMacEC98/td9tQ8eRs4/GBSFZlDFMve1d00hqHsblKeWYuQ8FFBMdFaXny6/Jou6idliJ+l3XXWcr3WLGpPXXl5UI4NLWx4V8qNCa14+0nhSQkOEAKyd3GFiuo18uLGPC+8MGFqQrFj3kmpv67078hXk0stMi2+frECpzezP5xLzKqmaqr+BIwIAHlx0mWje/pBvMGCHABgKMRMgbHMHJOxRSGZoLLmvMLsI3mdZhYAQEVB8pTposztl6cjSUFspm4WH/1BKVsPVEEcQaWYe6LeHZzl1vpL29NBmCA2NVDrsLRGsA60Uofd2c0BR4OG3DvDvOoIWsBXqc8/KWXy6td56555jDWs9IKBNcgXZK0vttHbZw6L7aiJj0RqozCEw6v8WHSlmhJqSqRATNPjaCEl9KYqiKQ73l9EeRL00EAN3JG8B59DKynocr5jPTlSDj6WNkLiMEHZhGxGciDWQnd3go42qClbafoELdPTDKM+/PrHeW+Iw/tdlTu5vqxiVkqanOxXrlg9QVTfbdZysCRR6mYUAEAaARNohgUb1yYPJIVYNgHFLe4B1Ecxhi+XUo0zYqzdTqFdJCR8VF0j2qqN9Ezkg8Mkz2lYRF/L5PHRJp2uINr+hcNcT/RitpEddkKCh4aWVF3zLjXuXw4XTpe/KzfMNa6xwnwF58PaMBxDV0J+hKulnP6E252B+GxGD6U1Ert8FwDQhkHX8iPOnlG09fitJ2NRl2heeaMiTXRDPABgubJ8pQA2f8ICOpHC7tuRaXaYWygUb0dWXCARUGjejnK7Rt8MEGfsNzI1hCLFC0MgQ0BY5XgRU5MCyrcqE6eQko8PxIWUprVwkrL/pFCltM0XM0RKN3Xb2WPgTkOZADAgmNCi7pFBpg2Cqw3NMP+tdLTGyu48xidts5kQAHA53Y0gi23jPAUNdu3MONCwwrPHCw0JBjEpaJXpMtsRJaPsxNklyHI7eR6H+EyAFr+Wu1tt+t7CSZCs/r/ONq6YFQWqy4bqrYWpLdVSUwspAADFht6u04NaSe5T0RpQ5HuGETJrbi5gZQYBsMQLACyomOgGejrYU4n1xIuDldwDAJr07YFSVPQzFfQdrKC5A146CsG4RnTvQch3ggndi56+BzucCEwxwnndLnYfcElnIhsD7AwjcGUO7aN2GZtrQe0xRteBuq7ddhf+saFMAHALdK1FNZuBa+sGTUCphKGE9aQzzU53X4hSIQDQYIW4+iXXwQkyPbSiHrDIHnuw4wd7MHkyMNDhKrwhI9zDMe6C+OWIeUU66f88q+/5bW7dywGKJYYbYCkFACAwoaGjCxYFSTgRSEC5uQUnMwggJV4AoFF7WjR34OQTl+u6GA8ACGwBZLCYUyD5eAHV7zrQDF7gSAHQnu60i91p7NkG57E7n9gb3yRlBYFnVZ0DJdhGB0owrpauzG3XaTVwoUwAoBYNGLV0sHKDraU9FQquNhPfk9rG91ypqz/kOwT2Ff2wRbbifQr3p/RAgEhX/K4dAJNcD2hetJu2v4D6iES54v9LDbPOdVxpeGK4AJRSAAAAkeoFrAgEwNzcgMkMNuASLwBQ4ERFj2Z9C5NPHLAW4wEAESz5Ixpc0Gxo9DqIUKyDlO8LiF/T1n/2LCb8d+qfvfXzbgzq18A/vhj2xwCb7fLg95bz4BvVQeTDRAPfs50lK1CV+dDjBRMAYJZ2qrlhmsbZkYMtCwKQBbuE1bV75mcPPbrSByhaGu+r6q74MPzus25ffqCBnb4/swfE/1X++1BdqH41n57m2UV39mbKtBUa2mmbMo3pijBXLQnXETtN1rJbid0/qYtdNeobpJrXZAEACO6JN86opJvmSq6FXDqt6U59KTfLta0uNqRy3fe3l9E7xFJQxtJ6l5XlmwRl3FqUsjiR5/hA8mtVILxavKcfPQIzjR8zj6aU0NEUTq9YsFYCk4oaMWHNAbo0owAArgLCMdMz3fQbIcYmoPTE498wUXHN1csxAqmtFVQVYBekfFwGOzu1EwAIaI62uZxooaSCmmx1baLjCXe16l0UDwBM42vzP+c+S4rv0ZvT+KnCeCoMky8lrfE+wV/o7xv8lSlwh7fNvHCDt6hPxC3ekBPogDfibDrhjTmjzngztdu6sDq3oEwAqGKgk0bt4WGdKgd7GXRPCcU3pWykNMvNhACAJeBgC5e+hhWkArOyM1uuUIZptsCztwaaxTKI7YL2wm6yA8/1mfYPU3HjUuX1KQBnOHmBh/jMaqX+RvfOlLzGFyswVv/5nL+qwNpM09lQw1qYyv3LNLWUAgBQtGHq9EzXU+FMjE4ApdqfxL9n9oXJmpsjaq4W5B2kK+oCAAInIjqQ2unBmkoswqGsG+YS8QBAffvuICOXfWTvG9vkQmal8dMDHYybhpAOtnwH6OB6noLlW6xwckiCBU4vEsHwLvLqlxUipK5Eqiy5bXfAVCB3xgqbPjjaSZ3GT5erYy7mJPexY9tc83aj0UwmAKgPafrsqfd4u5kxCHwVTEoOXDSdkWJlivj2HlSaEAB4pvs7qADXNEPvQYaZdI7HwY6zdXAiCB3E1JznlOvllt0FxUOllxDdpDdXOB5bcZf9EyOGg9qlFABAB0CqB+UqkAd0bs4AZwZ5KC3qAgA+ELKIIPOJAqcUDwBMt+3DwhFADSZsdgrqHsYnHwss+W6wGTwghcCyITCnXeRuq6UdwSsTyWPjVv6TwOTENNl4g/AptNhBapOVjAWtZrcn3FAslgkABRanFo1XEGybnj8GlxCBkjV2ui/HdD9v/xrmsdqFjZTKBItmxfcSFEjigQDRrfhdewJmzdTXA9cuZRLtdCWyFf/LTuD5Jbfu9VpBi2EDU0oBABboSL3ZSWiBYsAdK8CCys0JRGZwARZ1AYAFOyrqvcdZiHwiwSzGAwA5MAKoAB85c+CyMWl88l1gMbhBsP/ga70JnBvwnJXpxVHhNbLd7ylG7fI9tRH4kDISAKY4gQate1Cx0nMYOyWmaQiB4cRZeURPolI7P5cY/UImFqe7Ptx3/mWSDm4C7Hlb3c4bwRCm6nPMAqbyj/fYoyx8Pw9W77Z5aBpW6sERWsYBCUkKeAXWLb65e3yvxWCRRWniEIzl7Qhf+rFTQr83mCUQtK1DrWnuwj82gX2cp0vK7f0a1a075sa4iCnp6FqsoRcVp9w98OxdpKHRn9KNK15VN3oEIzK7mIWuGWyVGuwGfH58x4KvDEIVM0FsFm8AgAZKzNwfK7L4dlFptgaVQf58X62yzAIAREdJlnTZznr7jw+6Pg3I4MydDgg9ICaG9wtI+lDr5R2brvFXBIEa4LFH1uJN5c04CEpJNg2d7DKdYo6NJnEgQMyzHVxKb9MEHa7ZW3tum9WxwijycNI0itQ3Tseox9mncAd3S9gKAAvg4Bnm8X2a85Vj852EwM6fX+PDqV2BaNC+L6ymBfnXy8rqC87WjZkp7GZJFwDoQGpBlNOxqx5QLjFd5xYHWdoDAHgoTxQohRMl2pWp/K6jBeWweQh21aMmGNsDM+swNzJw/yeYg+Hu8zVkjX+fYAocLnMQbIvFSa/aQg4ul2NGsexGKwqOblKi7ehmSjQe3Wzy20e35cUyAcDF5RmyattdanbQoEvjVCWcnnK8G+okCgGAnj2LpRmWQ8kVbNGZZfbQjsahpsg+HeLVEBA0midLc2eZLlBPJYeBwipvDhNL8B2sGeN2zkTsBPCbzBUA3k8zd8L5lf4BFAVeedXP+pya8zsaJwb9TGdSFwCQVIIoH5oY6ANyKjFlvHYQyT0A4BhVOFAKG5d0tLP8igqaDUJ5BxOGj1YfboqJfR5AB4FPSAB/fLBY0OHfW24JjfDS9pawJex8oti6E0lAtu5ZyUa27l3JSLZGKbstXjTAYpkAIDpOsWpYczY/GMiSKPMIuL37Qk/vHbvJxvCCOa4rQwAHxDJztFHfg4iyvb9wI4iMts1BTpQ5UHo49E7S3c/QD0Annn/AwVGYJm4FgAUF8Qzz+J76M3cZZcEisIDOzQVkZrAAFXUBgAIpiwwyn2ium2I8AABwRA/B8CZofHxssLIPARG8979uBxVQPFzcElzhpa13YUso+USxdXskAdm6c5KNbN1zkpFs3efsNnnRaBXLBADRMc2qYc1cfjCQKVFmF57dD83ptfkYPWNU0zVv76h7ErsCwMKnSJNzAFH4eD4jhDIktZVbYwT3W+YdReCT0BUAFmjG08zt698j/RelKpAHVG7OAGYGeSgu6gIAPhCySCDyieK6FOMBgAYjegA6bDb5hixcNhaNL/tgsMPrkauPZ5Hh/xTVx9cy8jhHMpzD47/4Fx99uptiNG6wG0M4Wxt16Kmzte735N/vgqq3BxDt4vuLXcuP+m5O/KrHNQOEt3e3r3MTR7zVhdiXtWt+OywrmazPDUA93Fd82qtWXlzDyREPXF0sFF2rpHiSRAqkm9O0vnks6JXW0auyN3kfrYqZzW01yFo6JSEMGEDoBHISrfXXnaGBn2PjjPi+NnGstVVr1s/TIu6iYgQ+YbAPYGN56wZnTGXU89pAVxIAAudXACJYLd7u5Hvn3hQsXE/1FcZ4gX0WQHXr/hQ/PRI6rf9AIZYYkUnwuCN2bL5AhOglScUiRHdVXGRT9J9hTa0H+dZKTgIfURn9ZCuJxD1q+feF48pEzVHxf6ZtDotC6aiPBpTXnYNmibyhxiWQ16hJGk2TTk5j49pcHznrISXLcPjoXjyL7qO12v4raIhVQOLpe8qCLLNZZPeMTX6tkvcoY1N+3Lg+clEl6S7CRFWURYeLjv0yT9uU/urrwkbNt+Ms+ysCjcAKz7N1tc6uFqHVQYvQoX32t/je8bVtNyQQP6rWCrvAa/vDNeWZ7nnOsDUxfEVIgQxzPmSaC5kFfrecfUoKW/lHUhGY0xBayFMsQBzRTW9d/5m3qdcTVj9/h9BZWAf9ScJkpocTjamoWmXZOJMEhuMGgWpWHGmUyE9msihjgijVMayAsVUeG8zpC7L6YqEHGeBIIiJpAW808RWYRE6HofNLAmKkXFs70Nxl/70AMe1jfUm+wKJJxLalbtlCU+ABmc2IWeVjgVYyuIh+SrLeyQ9DXUScL8SpKUA+bTEtCIgKOa3jvWSVu0B/3AqoqHepvrEA3nB0LSQxy3dMX8RpZJ5BSUMAqYumdWepHnuI/XQewBJXXw2mrjhzjlCehsGI6MSKvXqaNFQvncKU+fAmGIGsBHNDlRBk1eaU+3Gvu/yN+g7BRp1z0FUQkPXkZRjxEzE3VLJZQcFsxoJ5aAtb/zLKbBpk6aQYjInSGrQlnrnzuvOfOYV5qjQtT0XJd5oq+pYJmV39gxMgLlB9uLT9vNhCMpk7A9PJeasWPBbOUlxIJEBqorrIesY35MkdxrFj9WrFDCDCkeyg7Je92OW05tDhKwiEnIWGwKkRpXURVNugtDIoMtm/XAKxpYZnzkT0YYnwxifqwmBJbqW0PtTNZvDU3te/d6b0Pt0X6kNuuKGHIxKDnyDu2Nq9Y3DYcPzDEtHiWZFDck++iCdgE9esQsy40FLokvtZ61HRKCrLTUIfBssNEEmHqbqfik6yMHX2w3v8hqGXdqyQjp0LDb8qhT7G/2Nvu73a78QS+5pYL6H5r9inSqjp8DJNqLnqoP7NvdlQMYSs0W3lopkwOX8O678qIepfbHXEH+ZGCq6yLd6yUA98mJLRse4/6Keyoa+zBb+bnzYhVeddHdxu6zBFhgxX6d63qeoJ6K4wu/seG7C+x49C6HWkkMTli+C1RBMSUdnmAiFYPRAPDHtUHqLPeReao6lgFEeI3EhzfReP1gjC8KlrdklHZoSX7Bj1W0Jnj7Ymv5tnADH3FDh+nVIytDyo1grvA0Do1k1IpVgE7nU8bFBDGRZD69nFSy3UvJf1OWwFrIhmWt90NtqgBDvj0fNHycyDc9QRRGvvgGUshqGtX42vAsO4tSt1DvJQ6UkBEIc+aXWOTVa99+WbOxDhMwRyYCZY7zYk3oihjI4Bj3kL7zfJ+BKQWzHwKH3DpQTdqeg7ED9yoRnQNJDCf7jcillJGhJxBYjYAdKwAaBsJ18S6D9nXmo4/0Lh+nPA8d9ZmIKPXeTN3dBwYB9C0UZp3KYoqKdEXz9k9zMNeD/9a0DyAwKKOmik5CAYeynb8raKJhY0Hc1g6fuEgWwmDO1mktqcDtBQXN5nqXnccYk8F1vfqQz7LE8mGKhHfkgsgwrUyHhBBdQO9F0QmHPB9MQU/YoUL/aNBXi5wPbup2Oa7DLrnACEWxzoLQ9QcTySOhYFZXvgQXcG8zE6q7xukivOOz8H44YT7rJJikywt0kwt1viT6vxy5oDz83yTouI78Z9Ux4EDbiWewhiI0fXSWVKSd+nUSdo2ZnBazv9m/rI9l1cH06KAswFolWytH4qZgmUJoE+lawZcgBlmXclXECDeU123a198j4H7Sq6GWUOTmj6tmqPJxGlopoSbbSo04Ci+jsTiUrROSNhs29ox7p2O98gnnrWh0S6UopfF8fRVZG6/o0nMEt8YpJH0iYKH3oXtdURpgo+zZI0pOnsWBZ5ha+gCftYn2KLHKSbUFQMC49QBm31FifBBwFENHeL0iTllYE5hRs57GbQ0LCI/z+gc5v+qZGBUY9HHYBU100FmUDfBVpn2QrLNamEbNhNWA+ynkyYvoLkZw1HdlmJ0dBB4ZhdmB/+DXVx3/Te3NZymCwMGM4MACcAvRGom6bwE2eKhIqHYVOtV2TgmoQDYw3qHl2HwrD+tM2+1ULm12r5nr4QjRzihyLnP4/edfJtsQWxdvD9YyfJxv/OeGDXhlF0x59Xv+UVvZm9XWFedVoyfQH2I0ztSxo20r1ZKcNmYXJC6PmIRwpNZp9S6lYVLsiUe5jR7JE35OFk1Ozsgojavt1k1ER7IohaZnd7lG8tmreZuYf2C43UlDQOfKx3WICBfv2VmUMjfcmdMTRyJOZ+KZGQ1eolpSWsOZ4qVm/qTnxP/6pP528flWdyglLkU5m6vnxPWUUFAptK2lE3ulEYfoiUlKlzR2TZ4EbuZDYDZwBYRfpZzvraIWXfTgZGt9t5YGE4435gov8/AwAC69pNBjLaXTJwe7sSckCDL15JSOvAiswKkb8HZr4YSLFd4EOchsPx6SL4efP+zAj6uIh2tqyebeyKLeqWraPrvGNyalt0n0tqRy99JfD5NOIPi4QCuTSTZyCZN0z+k9JewzvYJKhG7Kvkb+C/VPzjt3To9L7d5CPHfeXJembyomMU6pqBrBpcPgBncB8GdHkXgBPdZwEt7v4AnFtN0Hgz+wBM4RpYtPUuANO+Bhal2K0/DeT3zp9CPzGBb5MOCQhmi0oUuC4oHJzeUqkCV1gI22uNUzTGm2htZcG/r5QHAIYtTE5JBObnIiy/e4LVSVwaKCltZzKRuLu3rqBNp/eIkDZylGZ5iKMqoI01UReLUOSCj7DIgoEucKMXV4qKb6PKqT8HAj1Djqx/H3a5Fs8Gi2FZ+QVnERFZbSKHHHUN4TdjKApEeG9djAnBN8VfZPXMWsKxZZFvEb/SfJZOfvylx66TqaA2UjxdEG3TyEsSoUQtvZGkAxmzSov9x5toHtyz8+LXAiW68vpsbSnysrUogBb735H6ym8QdV5goZgU/qlQSMj3zjAIVzuFlfZP67IzcKUqA9hWiySaQiksO6PW6oZFO+vkQXcTKJX+asdnsYO7k2364jUgyVxH4jyuT3jl4jOFaOd4PCYixU28cAzA9kxmxEccZ5W+vgP7GIguiEjJc8x5CBsyX2gGQXvtHjQN7C3qAzjYxrKe0y+8RXAt7c4qEQixhKmPGUrUVqHR1/z8iMlni/EVOA29I+fINkuIQEDH59HwqBSfmitPhR/PM0RfBOLM/nyc0Nog1BON5D3QWzrGkMLaEbEkwqTR+V8f3y5gv+n0zn5M850OGBtfAApiQVsVfwwXEJVCH4WQTAl/5dvKHUF8UwJeSWeMRFdgUTnArtnOOdusnXNyWne2c153bnJid8ad2TK4GVI/a0jjrGKyxNhJQC/g6u+U5vLvFLv+O8c+gM7ufQGdYZ+ANyA0BBLy/OULODoFRJg6VoJwIUpx1Q5ZlDeqYRIVFgcTza1wmBQ7Iff+Oo6b7nq0qyjgQSqJSbUwnrDfOQaHtLm1/1GHd/PueSO0kCCUiSxb2Meps4Bad7mIfw39a1lJi0VlI765sx+ESHyMMyLHtuOD0QTK2yLayTMT3spDbUne9K0rp5iUA6XTrEpMk0tzs16wkk8oZzMhe8OHHoWA0sJIJsVXdjWnatsyay3IZRzCeqwY671Eza1dvLGVDCRJOfQDe0TMcB+sHoNJQemqQa2jjXaNyVlbGbtDQ4rfXSh8VfcN6N4xFR1rcp5Z4Jn9OCXcM9NGjSWbZIrBesmF1/iN86BGWmtvuQKJcpVGyYqbTdqAscRuR7cAD1d0p9z5TtnBGAYDRwqt+9ySNJvONDrn2TsDj3pWzmhQWN9R2oF27vxz1ZstYWeyUfI8qFMm5r4MDo+Ctsr+87qX0hum3GVWMnQlG4XCKSnql5PcV/e1RK0sW6K3/viVL6QqwJZkrPRasrNa1YLJxCg+GZMCM0dGRTYrUwDWo88FEaDCcG70apOyr8mXjNXqk7Fa3i6NKI7DKxNmJAwVrMlqh+XWSFHUOrAlVO+1ZGKWliI9qia9ymoJ2UHZqqmWJNZPLdFzQEZDk2Q45f4dufuyS8o1FRlzScWW+ZMeT7YpV1TIuaDiCIr7ur3KycRbtD+jTZyQbYnxmJKzKZThW4vzhdl9lTFufS6uqRIakE5ZNJACeJEQBS5xGgvljbLLN12Dk46bL0dx8TVwgfyy8XfXztmllhRfw7TpInvu/If6SrqmIuEr9krZsr8Ejc0Ts7hEvkwtsUEfGUterwtS5J98OfW5N1wzR8RbUgdCYq9GpuZvp5gHNEM5lZAFJCgJXbElXuiGByUFsMUl/yzkL4nILR4EgzmP4SVD9vyBVOu+ppTAacGj+v65MAWLr55QTV9kMTCfw+GiTCPM25vmGY/4E9+yD9T4hx4XX8pG/iT80Mx8Svng1YFTYKHgtXYqFz4CoTLA647tVU4I7tyfqyMsZX3XHfbFqSVtvZbbn9Hy/ORLoKNYofGbgo28BLeJapnGfgPig6vMrYu9okWpg2IzOyG3fiXpFeW834Q9yuNjJRF0nRjE0fZ7vv05MmviuhRP1dQP13cpQY3Ikf2AJU6UujIlOM5LzEXAi7QYN+iv1OL4Jgwau3Tresb39peHUu+2w591fvm9jY/Ivs5d2VHqqf694D4e9Hb1JnH3/Sx7XOag75knrm9oEFkEfZOChrCJy6RxVY+mUo/OKE6M34npq4GyF8enXlZf1ZBQSj4p8X1PA7hdkMREmnEgCa4iE8CU/Bp4oVCI5sKRaYp+tlQKweAJoJHwJpU7fHwOEQmhk/ntgyLZIGJB6ASXF5aWA6pT76qitdCeKT2QTYcFbffZ1s/7pqnywq3rWziqIKyvGnWIqlexPNQ1nJ+UP3vNTEIzjQksk/Lvy7DvKzGlLMBK/bC2AFjt2Ce+g0kg8gXdVfVW2wk7bstlfOjQAniWAA5wENiA6eLHcmubmEzvObFM+m6z77tB2qlNNcF/EKZWYU4Ty5gjOB0uBgt0GiGcofPoxOJgI0rc4oZRvCWB88saKH8wK6IFCRf4WgmuKMa9kg85JXjvEFKptgC+bQC2ADkDIISw06Li6lgbBlzSOcTlSitaDvhmAdyg0eFisQYARUSlXyPXgqGZdImceg/s3rWzr6sweDPYfqBVDKbaAvh6ACJtg0lTqSZk3mJbZmQmr1qDjAD2hwMGW7fRK77mUitexpHlc1msfthDomF11HS+hC7iq4IvNJhUmg+ONqc8l5R0QmPL89cKWUdTS3zxP8T6bgBB/DPok2JZOob4BOVxrENbnShM98RMysmfaXwqnbBlKYEO54w9X4wABB1OY8eOc3zWgkCodEEh5HqSqJ+aWLVmE//JKkBVrlqdjiJD+Wp9ukD451E7eM/As1ZCpOO7NaSZ13mh8fqGkFptLBwQ5uZ/4mXwf+K7Z8hvL8UmOHxZ0xWokU6fXq0BbuFfC/Lcxv2btgYYUW/YWLekvdmoKxN6qXV8qmEZdfj9d+CAzJudUy91O1bu4og01lJkTOTFHFHRO9frAEkHTzydVJwAQFDCC5wh2TOK6+enMTnXwVNK5RvCOWAFB5I94RgXL4ALTyk1CHLVgmKpIH301fWB8ibto2hKqRhhxQbECESYwtmTffMwaPV5lDDippaKi6GcQVjSBboYG0AODD2g5xXgTQWzKvPV/4IUDNQtRxdMrVYCNU3lT7ZZT3nzCBBAYK8F8DEFjD3RHvLw3sIdSE0GBuhXAELBWbdzUzbxq1A+aYWnYEt7PIxyZgF61g81yJa18fRK+hEl8ifpxh+Piz/xC5QFTuGaOZJsaXYINUAved54PjbeFwUHS5w8kc28cYfGno4OJizliCkGweF0sazgAkhMF/MPxIfj6tWUe+Ve4CTZW2Azf+zx2dM5o8ufVzqdYIoJazr/+HB8sFhuUAJCZw7nm388giN/2eLT4QIzfDocTofzD0ekw8VwASqIMQUxBZ+gEsJMUTv36ivJg5fgcdKsCT6/7IFI7IlGfM7ZE0JF1ndZeh1c50uDytl1k5Gj+UagknbzWfiVteODp9prGD3Fgtek4I65leMugso978cunBIfI8221n9WdL51XyAVAoOdDcc23YDZPt2muhvoS+NhdIbUuylyusTq9HIafR4dP/1zwFurCzmnm6r14eC5Z5cyFG3Icp8oOmLk9xGiQ7ePyOWRv+CFxXxKHhWR9JXwYAj7aqzQy2HtFX4CAKDzUwop3Kj9nAr+BK8I6QgKQipCA4GIAB9BB09owkQtPHUtCgy3wfSvtCzG6sABoxRV4mtaLOZW1Nyhj+Xady2aLyn/yRJcP86JBX2JRXWvHh5fH0N0QTujs5anK1eD9TgfRhJQi3zDL8/hC/kPvW/l0yvzFWOuT7dGZWE4gdFVMT1mTkbBjApPlBihJORJxsYKbxSo6b8r2Ow9WrA3aoEFmxxLGinRqEjEp+FR0ClQN39bcNyzsT3m73wUWguBiACg+/yVXFrBKv9tCbcXUq5bz8Dppkjpq75IvmROd0fGWVSgyQXYJlmjUdOIYIfAQnCCHm64d9LUPqk6KO1NlLGPsiaBGjNqkikJxKGnpx6dEHNlRT7MBRZL1psDk4eR2gN+RXt4M6hZye2qt1iP3xyAkHb6qv2eABhSnUVPIfAUM0JHPAIAFsrs8V0BTIRzxLwph/SN1g9OfWku8e3rCXY36mYvCj41ooH7Y57cpc0s10f4Oc2+Fox36Xv2+QVnCiQEv17N4zMZZAhE/Z2259iqT2baI2Y86YwnA5225+mCdNl5YZKJpQNe8P2HzwAAL1Yz46XcICq45KiUaLaHEzNHIPyZX5f0fY21m899lfmKUfwwUbdx8cGO0E3mvTfUPUOIkNO9FDKA0ViJSQCz4h5bhvuCY2foju96LsPldrCrolih55QtV4rMRHaruo43hCnaOeKBljBczeXNkUm4E7CsEIgnWTyJHry2askAXIS+mt0TV/xV0QAA3W6/ay9u9c1uGkW+QTRnPMqcZXmIyAVr+mn7Ka8ERWFD/moxtAiEQoBTP4OmsArmMYz1Dmmyrt2cwUc0XF2mzHWHC8EeB12GF6FpolsFosagKaJ7Kz2/GlVi3QJxYC+R9Wslt/w6S03FSVwT7eXXXUpy9k0sEZAwcQZXhNsDTWX0SRffyIprm1dJhFynuhD2ObfW3jn50W86OT0J/r4XmCHpKqLHyQLjhhIcnVySdhY7Xv75xrapwWY/MFfwPTn1wjSgsSxdUgmDk7C9WAeMI8kjil2onrJLbrrkSXrasCGQ8p422/I3YfAiXoqnYd6LptEZDxLPS808G7YlzW3RG9ETZ50DN7Z7uevubJaamvpOn0qjdovkBBN3hkq8pcTk+Gv4L82LZQ6aETE7bBQJEB1takIqYVyKUPYZpkT/pbNOZ19smJMNSmTURiiK77wKlZvYu8LmXmQFWP7zwaDaHbgNzBdgNBa+vHgA4TtnwO9I5N2RXI7etwscg7GFisbJi5v6o+68k5pPCiuvaIPwvkjbzOn1smMR7lzRyUKHhGFpzmdRTfOTpKiTOng3ehoHW/5UFM2LkgUg2wgnbcjAmsh+y0zQJj03oA8HJVNColAPYW9cVszdrRntOO2c5OBNqqitHOD1ZP0TiiX+noPLDLTMsx+7FtpmpgUFUsK6clkVK5bnQTn0Dv1WRcoj5qmhf4DN6jPP0xBt/Kk2X5KxA7NmWjs+MBe/zQNFbF+2jvwy0QdG5m6jmaIAHigFhb5LobPU1/My/2TeurS61yasvwNNbVkdM8AgMPSx4oL0yRm1DPqYaWP63AR9vGtb+myCPnW3eX0OQV96Wre+GYK+EK1p3xzJm08RJniX4vz88O5aiH5EegRIWr1q7VMNjO4zY8TcR51Wb8Qp2sQwKeNCUcCG4X1Am0kK0Tfqpw5vLMnjBpLS7ZRUhu7wds3dlAu2/vlaiS6Q/s06h11CjxfxcaoUKzCcx45U9M900Flq4HaXoAEArBWC8LFJcl1vnB1BVAxuZnq9EbNEZ97cDDQ71cG+pUPMXnXtbE1DyZ3rkt0yPYWECgcR1x/UAEKmjYFkAgh3bQukI4DY3eZBLgLIPa0bNEUAmWhNoQH1On103C3+/K2r3vy17GFlcQub/XBW/focHAPICc6nUOAtQ3c/c2JLbrAERGZM0Lpy5F5igG4U8Nm8JoFojvsJL5M/y/zJAHjAg30e2srcWH5yx7VFylr1i2/ZzhZZkrIYSUIDZXLX2ofdKejVbE8P4SFaX9/O4HZ1/5+JuqXnUwfAtqGpuWHvC5xKQ0eqsoJAsLsJ5iBBYXlCAABvQdDJPcQYEAE6/9QOxDm1HaptpH1tL3YO6dAW+UAo1ji6WQ7UFbV/zRmoMWnr20fCpvF1ydcO72AMXxTviK93PFn74/M6cGg8L/4SUpNwwwPRWhMu4PzSBYGIvWfrCpnu+n43ONzQ3Zk/fJxmIOd9zufJ6nSP42x+nd7qB5jucv+YfcTQ3eHW2gCAuvGwtluFwQ2NkS/Ma2h+IvCbm8DcRuNyNZM9JfrMp/dmxbB/MPpW/vz0ri5dSwg03CgdFRnOih9cfEaCwD2nghM13EJ79R6hw220qMI4jTskJhIFOD6fLOn4CFxLB6rZBCJOikDM14zAhHtkDEHA73ediZn8qdYFg0kQ4veVe19nci5/dxNv9XfesugnyIdnOfOolbWxdO+x8K1Vh8mlxMtx05pL1G4i/gr+QYsdFK67TfrGLgV42nwEXlFA9qYaxEUB7WxqQTYU0N2mPOSWHqb8u92V6GFQv9ceTMFqXm4COKQ+yKsinh6LwZ/fAazWf6039dGtZH7/MZKprOkc4TOTLuBLVfOmjzX1OmDHkiQ/OfIHQN0bgVLX+JCYnHC/XhKS89DfbylLpxaALXq63RR6Hdaro05eyxyGixAO65PR7mY9V0iC3Lq3+x/10KBo9f65U0d+L020uPWOAMCdZaK9f9zrNROd+W3UJ4r16UbfnQqvELGaJe3VUPbXoL435ou+fzNxmkn96ZH3j6aQDix1jykaDGOGvv77oexh4UAmz9433Levmf0wG8+yc6l+DfW6db9XyeWvUveUTUiElu5dbconDnSvsKUKocJjqNTjN758m/v0EXl8NLp4fXpIEAHEFMfGE7oDWrlkQZ/Po2J1VRArAoi/nWy42Rbc8Y4AYEqLTvX3eoct7H7EEQV4rpTn0+DYhyu9ubVjWDPvhLU93kHs9bVwewDDhEv3POHt7LGDRL1L0ACARGKYBOcEJ1mFAcHdW6wN66vDMP3M9kxypRPQQ2XF95PTbu1g7aAt3TVPpRVEdmvJtLx081zfBkemU3w0Uyg7mi4hTVzCFr/uzbuyorQR+sOJaNI07YfeeCT+kO2QLDmbIkdBEaZZpTRxoZ2VJSZ8ixPahjMTfYjn1Bi4QxzlmOtyJo7SQ0nOqP2mKz8K6wO0v+3Pr9NmPctarUhmuybxustm3pwRt4U3XZ23xYB1Z4R598GfZWqGGhJXuTMCJ81CrgIuYGVuQH+t+y6oquVLm7wRNB5Kfw1Vg79mfCcKSFEWhPkO/nnQUa02yaStZCVle9twrJ0Qn4Dhxto9COnri5l3buRlSuCV5bDJScQkAbjcNSmWWj3oYJk0yZQvJT2/YoagJNO8d/cqfIpqvRSPdPTw/q0DPyDbIx0/oj8ryM9Ds/3se5JEONLqIfNfN39k/Sck41nltNPfT0eoWWoPvei5O1J3JG98l5d9XQGUrR9v8skdAU7/eDAwfzoVp5zDWL2qlHR4aw0o8xu4LBIWahVb3xrdY3U/rMBWW4UtkX/t2SJneC67unXOuL+WoV1QW2HXVnhQhqqJjdg0x5CoNpEtDZYzkGCh3XN2HcRyloIBAGyjZyaQbK+kpmKBskLNjj9sMKQJt9Nfk5iD6/O2BpoLa9i3hZhb1u5sB5recV6G2WOcbhayR3AGVuZ84Jasy52B7bR5rhq+5EIHY66O0WTgohNr0IytX6Pzn82lO5Pj4DZsqvvqF8pX1zgFiy92MTHTzFutXSjP6x5yRUiLdglda9JV3UKRebjnO3O8mtGEpg/3+tEWO3VSNBow98QxxFRb6m20rTF2V87GETJu/3C7EHanrSdKhGFw6Drh8Lpt5O4VoHiq6lPWdtQeZNdK5Fq7t2Ta/Onm3XzLZJhmXUetz7pM473r3/Ngxg6mfyDu6tqBuzn/46ZaAFIxCGd9OcrrmQYTWPdQ6dPvOO9Q0t6ah/IO7L8LxFEuvNyh4ui4VjpUqozjPGlAi/csEW1L4/ItJQ2VKu2Mg8B8bHLA9tT+XQ5Yu4vapWamWn/HXTGuEHKBdyV0gx7Y/UkDu+2QsKaBE1obNge4UevCHgK3afPYa77EvisIsP0oeZ21jY99atCOjxomXbp0CP+OIWojqOah3Fc7Ptw/Z3ucENRt/oTu7V+vrfvwL12zwA83rNQMBY2qkXr/G3dWIWGVfxfTxztWnIgF3Qx0hVxWDgrycMt53Ic8bV9QpwxBN51OGAAJdzqUMDFzgus1jJCss4fjQBjzMsTCEmx1+J/glnge3v0i/ZfWfw4TOuUAQxzSbfWEESzdc7GSf3e/tP7kMmE8lx2Wl1djmpDsuaxofeylk6uRUn3P1RV5tNF2FWgLuwcrvA3FcqgXDhDeeYIVIwH0q+sBcAQQNh+zntA1UIklhWbD7yHBWap9aHcHnhhGrEhHADAHFh6fG2SEI2Depj46r1hfr1+DC9+b5DUeRxlWorgfhYRAMTaueIhzxT0/o6CzeikYAHAO09k6zM1ce5VbOtGX6elmfqFunYzSZhGXeP2rvM5fp0VfMhH8iM/q++1T7zMjvNLGq77GtxUk5DTfShc7jXcuFq6k43LugpTtTrRgek3BNL21eW56lasMjDrLYDU3SbC9jPVqgJY4HGSATI2eZLxRHbt76J1qdswjQLGsioHIpQDFrGJh3KvDTkap6ncWW5yMUvOqdmYgRz8fz2wcR7ggYxe/Mf8ezLRz5+feSh19zQ78H1WkPNGOi6anWzbV9/zsswMAk1/Q/VF98LP7ICi2MyMGYfjyXAhXD6sz6vCuonwvt542Mj555mIAAMChF1qextCbMMFWgUSZzEe8Rfl8ggcp2D2LwQAAtBRQO8uqF+1sWr0zizuC3k5tXhPILbh+HSVoS67dAQIq5C6RIMNwQSwKMts2xq4d2cJ1mBrbYpPrMFPugu3u/kzaGVfH40XaSyfWs8XIu7wHu/IWsyVMufQn27tMau6ga1x301FEXmuXIwQAxw10rHIPz16kU2L9m4XS43t+FHCiNbi5tmKRgbbA9njZDVzi6B4ciK5t/7hoiNNs61UswkRfkbzRjkI6qg6T6MnT0woyu9LDg+E04AAAo1L/lBYm1eFtXpcwhQVRMKu36Z/L0e6S8NcLzQCAHbxFVOf2qLdiZIvlbZPOPxcWvFYdelcBR9XHNIC3+x1pAqzc6qcoJNXHR1LHgFptk2FAt3aZRtKY3+kgU4v3PT4YH5zcB2nkYFbzITgYih0dyWBcLPhsSKW+xwgmdCR40FllwEcX+NJyK6u/Ny4Pq3uUDxmwakvVBZUl0ar0jg1OPT748z/OHsb/N/QQW9nIqaS3xGeLozO2Yyn+Ox4zRMoVSJtBkrPcc41GIJFzgg0JpPWYdqUkl/Dk6MYxkbRJ0R49xencyZ+rwXV7A2EPl5nuLHAKByZQnnzpVkSyLpUMC0mLF52VOIkbmrJGjkDz7L1zUEh1VSRcHkOHXeXRrfZg8Kqu/FXXmgdU9+F5BFDfAGg8oRRQiSWFvsZNz7EX3MH5QnUv0RfGkhhx4yYBwA648h99YCxDF+aPC+EPPYOfz7YgOd5X0PveM+rnVYeeYebN0cFxLgYo0g1OKQwAOGhLxAazAn7dt/Vi8HdjwvO58/2vN28eex/g8+Ojzpg247mlzEXvHnkO6L1a8EQ7mfp8u5/bWN0WlsEAgI39HLsAKop0yqZxASEmnDHa2W0gvVbnDSTEqcfGHDMkZFK1s3iyid4ZXRAUAPWp2hjUFdQ3aFvQCNS3dhfQPCT66OqAGiRQ5y6DOcKBipTffBT4V5EN8S5pI0F7K92zQnQrUZwLAACcQMfuCAUwxwRFAmky5mwAzjB0xaAaDWEAgGuB6dJXy3HhN4tWbBccuAUPWpzq88QDSdSwuxugUbdjErpyuS4HNpTVcZApjmzAm8g1tDJT1zcCMSfrMk0o53EXprXK6ZjtDN0tnOX0No8dDiMJiZwlbBZib0wpsucGBtOlUcUMkHY8pLbtZ85Ff0GLW/5oYkm7Pl3J69NPs3ToB6fyNeec9ryRFkyjVxU/1ESapHn/HPpfIC3o6n9ga0B8t9HjaA9if1aBk/pt4n+TiT735J/uB3VtBZPBIkgcUvRt0pdw6AhxfiTbW7rS6i0Fccd6MLiqtSpbzKHBdWEVpsteyZ60f949yLPd1qduuSEK6fUajgI732mg7x6Rp2bP0XQOkKoGHAAg1WDQ+gULBjAKcXgas9qGGoCZze6MgYOGF5oBADS+XdmTpX9ZZ8zdYMOdsu6PDaT7tgadK8jorY1RBeDgbuQUNALs/qQlV4WRuG8Oc0NX2hojAt3VtphVkLvlLpjNTZoAO7LR7wUGJnmwLdDBXcYrNlgHnSB2E2KjLytsEcnWsp6eAjtzQe09gimCqhiCtU5lH5p5rUk+7voUhTcSAACmfN3EglP5WnlOf27UCaZ0UsUcJ2xFwWDKc8rFcC3HRzHQ67vA9PmIDZJumwMbnsrj0q1kxpdKJ4bs7Uusd8EMVYbh4AeBcP2f1BeHe7wGrdFkwRHt/Qx55GI5gxWbgWpnOx/NFqHnzk+1WF51H55HAHUGAMcKsjtgicWFdsHqgYvOLvrqAhXcYFQIPP99BACpoF3nP86CkwxzmD/qgrRs07u/vQ323ixbI/agZ9BkHWPhszOz3saCo5WDCphmCX3yYwMFR3umwTg3yf5t+GKKnbBsVgwbwAunu6/dLAk6eI2PfesKE3IlhU6A6alZGhR4mEJn2spewVO9EtdXbbp+gK4Z+3EXxK0rn2diuop4UpXBlfOT7Mm/h6Cq0fCpGuuCMNbAF7p/jYPNjVNqtzTO9tehdaLuTGqKWI/mxerjx3dlUfrb5k8odZ1dOCA31SR72qON0BuV4sZAXYnwU4lz9CbIK8JUKrKxzJD+YO7Oky2gbI0QVFciRHRbGSAg2tYFLCboQMbADgNOGTuGA3AZMyzCwdv87k1rgz9fVet7FU8S37rZz0jeHI13tRAAADiCauidCSjYENwrDie6eznGPAIgwzy3Ik4l4u+cDwYArJHeLoO/ZsFXM9MXCsX2ksMtMR6I0nKmQs/QV1ex+/DEyp00dHCZL6fjXiinUkYIFPIPNA1amWFD07Z1GQqaznCGoV3lmDsOqzyj1gvshC+x9kJUtSvFNERh640iMJCmOSAAyBpMkR9uGtracfuXbjBpy3JaUBlrMTbobns8d6AspjsSlGq2fyGCDHptvWnCvR+8hVdHMfZe4B/tXTon74qzugFIVLmic3EAANPLWhhy6W39XtL1Kk7XkgFdwRCzThHvaGbvgMQ2mQEAYoHB/g7Gl+D9uTjpH85JOXCH0iWXx3YEFZ0YPCv/rkHMVGspCbhJJq93UxmzBuS+K4UHptfubw2IJiNREcTE2mgaZK11cQ1IFGNwHwNj2dFgGFjiwaMDlr7HpDTIbhYPoggKubBEAXNb6rnxXRTZi0SnUHGq6qIOZjB9TR8BwGWBHRuP3d2sEKfuYjkNJiTjBSYNpHlXi5IJMMvLZWoJ3F07FVYBW26NtmuA1bX3225gDrUVVzd8jD6GKqe/rwqbW/B0BaH6A/X5+EICqPQAZE/IC9RiSaOn6fdQ4CJWFGgHo1SMqOhHALAEVzePfb1wB+OrgtQR8jmSTztL6bmcWLsArN9kc/XJY/fymgogbeUQAcMxz8eHnEnBGSwGAwDmfDqppmw9FWflwCmGc1X0volr9L5s5epn8vDVXuXB7Wm1jhZvVbGz5oM7/7t41favd++//fife+PD3MryGqE8eqfrGCrC1vDB7aZ/Jj9PVR/kUeB2m8EAgJRUAHv1BZwFvDTisim1C8yoPm+X4DZq2M8WlqjduRnQFAvJHOgbHTN6omAI7TLbDu+ESIwBc0iswXZYhcRmeSwLJG8Y8JXWufUDI4SzT0KlhiRtLyp+0u0OgVAdPDHMSMk4Q9tKq2OnGdr2uYJ2wIa93fI3DnPv6nAqeikTPYcfLgoDAIb0jrULqgA4l+I0rJTSalOfFzZoqCJsKjkXzc4FS7U7A1/8jPmyBi0YIQNxUlZm5phMVFqXZYMxGMOK4KacnS03uBOHdmuIJKcuHB6x6+9g/D+JsaX5lBZm/39/j/8BVLxy5pQarOp6I7QZFKo5IACAF+yJgSgmmpY0t2GFC5O2vOonjfFUSzB+8x6dl2D0ridY/z1EBbpiPJESKuiKNp4zHpeJV1HaBb6qAHTmZ6n4siYOSKIZD8NOmtL85JCj6wOtrwr2ybvCwo5Ar5pOAIDeYV/7mU784ZCoHIV+GR/CRFAPL9QOkByvHi0ghWdbBWq7yQwA8BKc7Zq2awCd4mMsAXTX/rkIcq8O3WNAdbUxvgEc3o3GDW2l7f7CeVOm7zgk3l1x0tbmHHAu1uXOwNa6C6kaZKrjGgVtZIpwggMOGOKuExMM5m64Kva/S+2MIbeM2f/f7xOhDQ/hwMsKWoSAas4DIeP62yK48qKaWhA5E0E3ypPl7xxgd6EAAGAO5GTzF3oa4lWVIJureE1ZSKJ9gdE10jjWongKGO9lJOVl/K7j/0W2bPvn+3Drf/Zg87cglrtXhSH+2u/j0eUE7tWHMJcWaev2ACFeKY0v4G8qGK5IOHMcvGEE309e79B28qscVtOAbHFUaAOitQzRWqgzcreZh7mtc89zi6zkIcitFNX5YABAHCa1VsHVm7mfqbPScKjh5fSCJH6tof9L+vv6uPWpryoJez6948M7VDedwe7TOwHYhCk4RqbQefQ028JPLQoDANJshCnrC6QDEhlxk46XAWtX6F3y8EFvrx6bRWbI/jU5A8tPcj0p92AAXOiEgF35XByxkDaGPYFYaetC9OB0RKwhYyAwVztJYvvdSNHjYmFPSMd/1inf0e94n36o999UHX7hvMxf+DFpaAZJ3DixlIcp9LeMkGwUlMDanPg3KPO7yidJvXHRM51hTgHm9AInwyWcx+nMtBcqprbQmQJxFAy6LLhGeoPfhZO3f3drbiY7O0+F6cwFJCihz3gfqmBuzgkDAManVVXL1tXYpdNM9sAMYNaEc5WLtbH2WZ03Ja1vath3ho1Nj5U2c1LV4B8WnIWoF+VQRBDGQbpSlMZe4NcU9Pwkb6gkkW/4w626ZtNJwsEQdJ2MuILsWTAF+mmyLvkD+FT+CcF6KjzIcWIF5ilc6IJsyy2DtpA2ZtGEttJty8KAtobuwiJCLrYdoNWgy7Wfs07s6sR67kNHNlTFkhFVIa+nUsRxKatAcw2McVFk5JJyeDqwp7p/rgAy8tsj+Dacpol4U+wY6DLrnxx0Pb68nYJ8ncLtWIvG1B0GdtEiNxu4Ga4L5IueC4oTC5idcW0bZsYWTy0ryP5e2hp2cR5588OvEuHeENRY/wd+gaeeWYu7vt+IW9mpx3H7/vE7nuFhh6dJ+hk2kGmcJwG+Yk+Lvxl6ssISfPkkku8QOKj9bMCC7cFvaZVAmUU44kCP7Tdfq9qV891AIPcirduHo/6FQM3C2UuI4Qe31FqOBmirjr3x0zsV+kUTqjOZFwuDbuIKErqcOddRgcA6615enHLHxd9maKDSF+uQPaWw02DtBsA17AAAIOxl9IuZQF9ANG5hrBOGxau3Ds9laKfwrYVmAEDEYKWKtjEI0hybAQVV/k1ABbXo0dJb2PNMkRdq8FUIc1daCFT4O4pxSx8/pYAf4JsBfOwui/DSrWrz4QlTBfEuVG+mVeWU7jNJwikAyk/rmxAKeqxL1NmGIQZwGCLsNhDndxRmvD/xE9jxX0Em4e73sSWhh7P/UEamG5x4W2wVR7nLnBdCOY4OkEOCxoXFAzAs1rNuYJuXVRYH2Bo3o4sgxzUGvOEiSxYAgK4x+f3x3g1u4To23FBX5jLZFCCOdYlRsSBvuwsldYCCrctVvNUSqzKuu+huF3KJtkUBkcvY2ieDPHbXY6TNDx+1z2YeTbjH/MG3u/tP3t5A/wy4kmwmZlNnR2+6fL7RrqjgVRaDAQAHFWxtaf0arm1WDEsK+X08a/PeNZbeF5+plr2+qoPbC3VOiNj21DhtJ3xTgatiR1OHtQK8YYNSXQBn85waBY0UJGsxGADAU4HwKgwG4Zvav9S7h5W2GH/Wx6FtviD4bl9sWIfRqM0p3N+B4TXUzU8Tvn9uHpmlQtxcqqJUtOIL5K16mGwnjg2HwpsiPhLsuo/p1Gmy5zIOKmiKih501YqKtFY9Zks2r674l5Mza8zV7P863Tf9qtocqqPvE6lvjPrvCS1CMmE85aWQGrogSERZGWnwxbZFrsMXGYOMKVxaynMOkIZspgcpn3msxvlWVvKtohruZL0wb4X8xZvQnmjBHQnbn27dMz0hEymQuGkAAEgWuJLWucyEOwpcDxe8bQQ65z4DAv3L8HOVd6+0qapgMxgAoDoVj11e10Hum0khZx63RBlVYu9UoXc9FWP4V/rqwNxExZVhNBwmZ4xMXmr2uQPtqhZKpcMMCzk5YuzpqLIyZ0DHsXU5BzruMIbzIM93DtDNlfLSdmhvG5CbxYlMRh0qOZYj5Y0h9smmUJVcsr1kdH1xdH1BdH0F0/X9dM02mim1eKOrJJrWiHLGyPaS0vUZdE3+c+J5S7f30zWf0lipRTpdicw5hwyG4EoTp/9qFFmowXUrqi5sIiXctrUgMitgEAtqjckGxMs5boKPauDcUn0a/JfNhvXuDr4Hth6qifu+cVjpsFpX6iP3w9nvMn6kutByExbVhJ/SNdOO1gJeZW7Ipz1W63zQxB3qwdoy9QaEqu1fHYVp/Gri/e6KOHn7adnAtAi3ntbhfA55EzzG5r6tk7c3peumADcvDO4wx//BTx/GbV8WDUzICZdkaFU7CrP6JMwdz94juFSDGQBwDIQWOtqAIWCtRslNnxn72RjpHylrpqZuJwPkxJqzqbCayr+75zVt6F1bMjW7qUSonjXO4tTpGIfMuaAslMgqbJIlP2Bm969s0afumU7bAed16vPQ6SSm8SMlNftvpt+Mmw2nHGGvCborDTRX6dNlr4W9nW1iVBqhGcmkU4A2Gq3amskcNO6zLjO9ch6iMdtdmGFtckZ0mOYE5IzPCZ6LoC0XLYITAySH69ALMfFlhbuGeCLrUadDt5NafUkVYwhKMQ1kR7Cb/NYmobmmBQAAg9HqJrcvITR7xNXIdIMYXChxB3mqLjG+CTQzXYuypekkgxbM5WrNbLSKL7k7CcEVq+4TXaVAcEXxfv1VZIJr7Kpivz64q731t+j/Fxo6l8QIL0AqRH8oQycvx+/ti+LoD5fGF//K4BOdT1Yb8CgTLB5c9sU2rQo9fS9Zv5v0uBAGAKS1WgHVuqarUe6NRjxCD9nr4mDgFzx87jRotXJwk1ITO8lV8B6phnXYS26ttapiQR29G6EPQ7wOgYkwAMBeAjIGjbaqORvgdN6Yw+tAsxWdUlS1ZPAoxBvmXbMYhSy9IR2dHGXcIZnaSWWxi+2kFg1KnaO+r8BbDTTHOuoT5q3GgHmUd57xSvpd47IX3BH6VLs8AABMo+bIMw2h5KDQgxg6JFMtVfJcSzSkn8s7O2XgdJK6JNZxbPf2VNhIrowqR00+TzroSXgd8Ow9j0LFHxkENkjCCHH3c37FPxcyK55oXS4AT2IMF3LnYmkCraLRXlmdKsfGsf7aJNoDp86UOoRHKpFVj9CtMhGNV41v1z/Inrll6QkVUakZbHOlPsi+t8gW2cecWnZ+LXuP9xKXaWc20ZiarTdyKmqGIQ4Npo737xDE9oXNWSS7bS1UBDtljaVFqqtMN96CufIkFnfH/qEKeZWz79wQNuQeUjkaBevufHF3x8nbKxaCFaypYbP3sUqpw3upuIfcR6oMd7uS83UAgOOKihhxJWXDcGXL1sMKctqZjvBq77lmAMCh+HRlW8IKTLYNV3r+X9/993aUoiTOkxT3rkDf3vyf+XuFrwKNetwKyrpbi5mL37uyfI+gu584vL2CPe/n9g+p6/ZK8lvvL3EGM65h3/n1lmjHmG0isu15X9ayVBOu+jMGSQa0yt4MjT/WLyP8nRLDJohSyuqdyXQLbtsN3kKBXbnbsBcUwXUig4O+uJwa787kARZ0EhHv5qIqNOjMg3MoFZH9V8Zg/DBPs/CTuGHgzR/VuAAADLa3/89oo68mV82D8cMcdAYuGgxG4o/DGhMACMt6j7LLU24G1vG294qtNL7OfjOxwkKXmXQVeJVKlN78UIqW05eszbSYwoX3iqAYXTQcCwAU1La2n53dhxUUOnr9O4hC1cNOsw+D3wAYL3TwmZFby4HQKCDI5I42+6Nm1egSFC+FAQA76O4ZhAAT9Gf3tufFyMuWvCbCx9+TPLq9NFjpDvZQvyLUayethS3ExXjkYr+CDltjn14/3tf6LDEPuU4fn5X2XBW3C81zF0yq4vZsDN4xtBZ0z60dAmu9qhaDAQAHh3ZnugtsGKG037Oa3r3Pll+Um9J8FkLXqs9zIUE7JZ1hrVzH3ESFbkDuvmPK9p+Z9uwH3aN7PJsq7vVNr12XGsSZ3Lp8MJNv/FXyVLkgXg3kCdsYXxvy3OoXX850St4uxuDLZMcoU4ADlJ7dZIrLY4PKISiTN6zw7qa+92GMz65grmcc0HEk+/cx+B5Jn4K/N4xmuXFldyOqsWn6kHCt0FcFP9XBzfcT+/kBXXUCnGLACoHI1sX/zqsV63KPoYQG1g3964Dbhv7VEmevBynsEMJs6aIH+A3YOQBjKIwXewqwhifIscrtDAY/vx2l+b0oHJ5DMsSJtRjMVe8PXU/djVB7XIFAzhYMeDSyuV3urD1142583+I32Z2NWc03BJI4Oo3ew1QLpql0kLYoFInsqzpYe/No6WJL4Dn5wZcML+kXj4sOt7LX9Ql5wU7+r0+eDSRPhFs9+kwzH0bC+4Q/pBCV/N9j99bG99MjXrah7FP888CcJRPL5hfHSwJBMXaHLgSlY4N0IzjVaoznicLGGehOWry0qR25IAwAcBzqHb7OglNVikjl5MVzhY6KDK8zL7uBMjNd8DkvInPTuZHbgrBoZ4BVas3fgLW0C8KuDiXagLW3bQy7loB1pH5h53pMxDpdY+cXvM5ujwPEprnO7qFLy+ZA27RDtFRDm6MjtVeBMuxHcppXmih/rS/rLcCctbfx7yMZ15v9SO74SiPnMQEAa8bfNMjlhDct5Rrvgenh+qeDXJqkLpj94kBMsHnaGi9trhsow2krprBQZvO9NzVDoivLjG2I855042Qv6qQGo5Mhh5/5ML3dtLnZge3OzGyH0JQryQo0I7gZxjW+LYQ5bWI52VmIp0k+Fmsz5PMLxRNdcW9QX9qJWIyVee04ez8dcvZGUVGVvkcKMONiZ7PfKgVm1xRcRheGApmY50MVnO7FYADAjApUp76gawCRPM8MvUGNnpbApPWVbtlHOz/R/mwbDbp1IG1Gf58TPI8RcnXELe94+9Qy08Ba1iXV6/hQ8iYuQwrQHxlA4H66IqtX5VibvGGOfThx5zD6y/G3a2GBG7kie5xiOfR6yhlFqJxXonHYV6G/PExfYCdvz6UDXYQ76syf6CFdhsdA9dW/5O0PcpEcBK+0WAEAKAHI6R1yhaEkiIUzSGr1TAM6BRAwz9VrsGQF6akykJ2bZD9B3YJnA0JEpG8MvbBYURHtVuglUAxXw2cQsVxJkYFwfS4Bu3CvEnywDFItJBPx10XMrDpvIz6qaOmFgXLEJ0wGmFVVHqhfDkdWnZysI+WchhO1CRrFpYYEtq/TaYqODxGZ5eqjqZUd7umoAICUu/DDgfPwtM0T27J+eeck+c1z4by4mQ3luluLQfW9RMBL2We4wPOaxnCciCR2ktU8FNj8Er/D/o/SH4be//bMaS23l3LG1IsVvXbULkuH3GzimLOp7o4iiFRRyXgWYAgi1VFKg+lm6J+s7cfOJnpd4D9SHW5RGABQBzTowDdhpnLYEjyPoZfC056d5+5GrnjrSvjmcHgxcZWt3DCg+GSGZM59b1DisTPZymsJIQfrklWuU38nU/qHYCyk1MgTCcO92bNlGD2Ewz/FffCn4E7Y9xMfuroecun6/G5w9+qUsx7/BdRn/2A/gOe49gdftOrTCi8BqAHSb1fOQydWHq5SsmL5ejYbTp5uaGQG1FxuBAYw5SccEFU98jfgGwcWPaqaSnh8TDp6BK7k+eWFeP++s3kQ6PK7sSSwZOMFX1iH5+gSOPi9XH+6b3Y/cBe/Njjxd3h9Lub2VIfg7m/Wkp+fFaehNuqdqY7ORDGO8ewz/p9h5vPT4qo55YurCjzaLX8STLKf3ya4xZamKR30krko8TSYZDFNOu0u7rmLOqZigLFAU5AvYd9lS8pn7Ic+RzyBW5/D3K5n5gsjJ6Lt2NBHfV5KuWVZWr71XOmHmOFbXqFzXlvpmWjWXY6UoLYL+SJh09cnt+Q3hubO8COP6War8uqA+M9XqMh1l2+vFpfL4TU4H7gWB1cBfE7g+UFteZ7vI05o+u3xUsP9UZK3bgCNNCoAAI0D6NY76sWwwgYZaQyKByN1wjQ1oHfxTuXzPe7tCgq3GAwAMFRgKBN+05NcZkfAmOepBTipzpueqSzvJEXPhN9wHt9IQGs3tlLAJ5EEH6A72McDtjmqTJBB2bEBO1WKjpk1YIdWdMvCgB2NYi6sDNhrt25EiT9gb/afYgEQx7Vvp94/l4lQs3y6CpjUYRYL6FszcVtDtcmxChhMZolEADDXAGfpIG4dgHO/+42ekjghnfPv9q0OWvv8q/5UZR8eYx/f3Bvb+L6w7/pON2u7fbO85b0+3MlVn3053tMWO4O5xmTC1TofFrnRPXjqV+QxerGjYvs5jkrsR0f07/RUYf0w5vURO62d6WOAT+g4YLNWNuULi6qrWhCPU+jskS+PeK7S4LlRhzWPfrpIJ9ILzzZo5yfpZcvwbpisaQijY3lrQK64Oq/nkHdP3AUr4aEYG/qyG18xuJYrb+j2zYsdi1sFzZjG586pDdm9b/ZVu28Ca8fKT3aktXL+4rMD4H4jsyPodkZvG7OjPnfMKFeh/TmbB1kgnkauWMd0NbZUxN/JXs5nzij+XXnBF2UTNX/7m3YL63UvByhLwwXhxY7E6cOb7J8rx/4V9POIDU/l+xnxOsT4TbQn6svnbM8VFhiirzobqG7CMllCe++j7cI3F2l9Fnpwe67vKl14wWIFACDG2yl0vCDbVVBV5mBCT8efBwLEyqMvkagiXnxaGABgxJsqw98xPJ0dgTkzzxVnlhvJ2jP0dummQxlAX+Xm2ef5idunR18xMJThcjCJIR0Cbqf687AUB0F1F29XYG9sDGpV4AjbgoYKnMQX0HSLaEPrRhmJjq0BI2ANl+jKA/LuN0k3zNWcDWcUnDBQ+h7AOTO5krUrz+cekJFCPLOL/0THPo/AKTDmixuvK0vq9Ulp3dBwnWkOLa/4R9nkfs4U+aMIo00vYzBL1SeYrb3XoZplSZPq1Mvt2iUSAcDShVxM8UOzkFaK9Q8CpveiHw20NW0tlmkafNyGfV41X7yO/PcUnp3XZ+c1DM43ifNdG/8MbPHaM7ctvH7Bfe58+qy89rq+m+ziscCOY86oWkGDYscthaWA1uVBK5rxV1p9XuVEpti6T79c8Tg7i9Gl/YPz9uvXa4xrQ7a9TcBvPdn3rNsxnjiOveaCMABAc/iioafZem8NEzrTrSm8MECeZ+JARW/YPKvz4gUe8cSeqK0GiQz5/ETRF6Y8InJsl0NmmKSmSUfPzGTmhZOJe7MtW4OchAbDdjJnvzG7bfu2xQH21EJsOTxPXp8nr2ExvnyIdPR26W1/eH5x+D6ensGb1zDs4OA6HwX4qryTBV9CT8HeStOs6KvOZqiL3kwhONHhH+b156T7iGeuqDX6s9CDb73cd5M5wHONCgCAF8CWip1N5zMV2J7S4Pq0qkRnTa1mH8XLjT6SpoF5dvCLXtcnl02dqpxH8t42gwEAvps8UZ92+ka2PkQKETOT9WOHRTjexQxntaCiMg97QDODWT2nPlXwjN+Y1fcVA0N5UfojCuMOSN76sUtoaYQkcZ5DsGRjMJweBbcIz226ZcYtwteaC7MqsHXtG6sALNASsNAEKkiqDCJpMGIJVNt96k6qusBNfp1x5rVkx2sHMvorxoZ/qfU/87VzW1T9Hqi2arYe58Xt4n/WAYCthkgunYswtQKy/iD02p+bEGyVpIofsiQOxfsnBW7rgr8iQaruFF3BbUh3SrUU7SwapCkq//ZDm2P8bd+VPw8n6NvuWj/1sZt6S3d2UOFzb/eMqosIfIhLKXYsxK2UBuOkVa1BZePpFoUBAO4YpoHRVhcsm4VdjefJ6W2KNzo7b6NS9I7T7Znw9o7D1lSeBafbBFm3W5CCM9Ayh2ZhH8yWdrkwmG2D4Qbcon3bPnDLNmLRzKJzqCt5Ps+lYuchzZfhu/7UP+Hl9g2YZmXOe1PfTU4BaSxWAADSzb7uLTXPFd7aGLxG8e7Ka2P60duYUxPgqIYwAGCKfdsWB6xcYPA2Rt4dkd5MZR4xM4ArA7QKq0uxr+YniqC4snpAsQ2CdBewJYTHQbA4DzigBqeqmNkYj/Ex+gWHh1HKDCfiYt/YBnFjC9iDgqriRCmDN7KbvaEhH7bV4/9o8iqpt0UijZeK23fqXPbwbLEu9l5qH4qOLfxsXPvOyZqOi7ptV29mkEylzceyh1rHKduSdPqEVtt98zl85h7vsomK8+M9/w++WIvOoaq8J3yCf7UYvCR8OKm+lE/yGH2CB+m5Dv6JidLoIU/mh/hiOQXtjzhatQ85YkdsD7v/8VPmJEog7ZUKj2jCxvO6LsXNCcLK7+niPQryHDEdafxurmo3xH/8VbK/jwV5rg03y/tvC9T1Rd8JKI2usEZSQgV1ss8+gJtjtpcD","base64")).toString()),z5}var RBe=new Map([[q.makeIdent(null,"fsevents").identHash,kBe],[q.makeIdent(null,"resolve").identHash,QBe],[q.makeIdent(null,"typescript").identHash,TBe]]),pSt={hooks:{registerPackageExtensions:async(t,e)=>{for(let[r,s]of V5)e(q.parseDescriptor(r,!0),s)},getBuiltinPatch:async(t,e)=>{let r="compat/";if(!e.startsWith(r))return;let s=q.parseIdent(e.slice(r.length)),a=RBe.get(s.identHash)?.();return typeof a<"u"?a:null},reduceDependency:async(t,e,r,s)=>typeof RBe.get(t.identHash)>"u"?t:q.makeDescriptor(t,q.makeRange({protocol:"patch:",source:q.stringifyDescriptor(t),selector:`optional!builtin`,params:null}))}},hSt=pSt;var g9={};Vt(g9,{ConstraintsCheckCommand:()=>XC,ConstraintsQueryCommand:()=>zC,ConstraintsSourceCommand:()=>ZC,default:()=>HSt});Ve();Ve();gS();var YC=class{constructor(e){this.project=e}createEnvironment(){let e=new WC(["cwd","ident"]),r=new WC(["workspace","type","ident"]),s=new WC(["ident"]),a={manifestUpdates:new Map,reportedErrors:new Map},n=new Map,c=new Map;for(let f of this.project.storedPackages.values()){let p=Array.from(f.peerDependencies.values(),h=>[q.stringifyIdent(h),h.range]);n.set(f.locatorHash,{workspace:null,ident:q.stringifyIdent(f),version:f.version,dependencies:new Map,peerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional!==!0)),optionalPeerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional===!0))})}for(let f of this.project.storedPackages.values()){let p=n.get(f.locatorHash);p.dependencies=new Map(Array.from(f.dependencies.values(),h=>{let E=this.project.storedResolutions.get(h.descriptorHash);if(typeof E>"u")throw new Error("Assertion failed: The resolution should have been registered");let C=n.get(E);if(typeof C>"u")throw new Error("Assertion failed: The package should have been registered");return[q.stringifyIdent(h),C]})),p.dependencies.delete(p.ident)}for(let f of this.project.workspaces){let p=q.stringifyIdent(f.anchoredLocator),h=f.manifest.exportTo({}),E=n.get(f.anchoredLocator.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");let C=(R,N,{caller:U=ps.getCaller()}={})=>{let W=hS(R),te=je.getMapWithDefault(a.manifestUpdates,f.cwd),ie=je.getMapWithDefault(te,W),Ae=je.getSetWithDefault(ie,N);U!==null&&Ae.add(U)},S=R=>C(R,void 0,{caller:ps.getCaller()}),P=R=>{je.getArrayWithDefault(a.reportedErrors,f.cwd).push(R)},I=e.insert({cwd:f.relativeCwd,ident:p,manifest:h,pkg:E,set:C,unset:S,error:P});c.set(f,I);for(let R of Ht.allDependencies)for(let N of f.manifest[R].values()){let U=q.stringifyIdent(N),W=()=>{C([R,U],void 0,{caller:ps.getCaller()})},te=Ae=>{C([R,U],Ae,{caller:ps.getCaller()})},ie=null;if(R!=="peerDependencies"&&(R!=="dependencies"||!f.manifest.devDependencies.has(N.identHash))){let Ae=f.anchoredPackage.dependencies.get(N.identHash);if(Ae){if(typeof Ae>"u")throw new Error("Assertion failed: The dependency should have been registered");let ce=this.project.storedResolutions.get(Ae.descriptorHash);if(typeof ce>"u")throw new Error("Assertion failed: The resolution should have been registered");let me=n.get(ce);if(typeof me>"u")throw new Error("Assertion failed: The package should have been registered");ie=me}}r.insert({workspace:I,ident:U,range:N.range,type:R,resolution:ie,update:te,delete:W,error:P})}}for(let f of this.project.storedPackages.values()){let p=this.project.tryWorkspaceByLocator(f);if(!p)continue;let h=c.get(p);if(typeof h>"u")throw new Error("Assertion failed: The workspace should have been registered");let E=n.get(f.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");E.workspace=h}return{workspaces:e,dependencies:r,packages:s,result:a}}async process(){let e=this.createEnvironment(),r={Yarn:{workspace:a=>e.workspaces.find(a)[0]??null,workspaces:a=>e.workspaces.find(a),dependency:a=>e.dependencies.find(a)[0]??null,dependencies:a=>e.dependencies.find(a),package:a=>e.packages.find(a)[0]??null,packages:a=>e.packages.find(a)}},s=await this.project.loadUserConfig();return s?.constraints?(await s.constraints(r),e.result):null}};Ve();Ve();Wt();var zC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.query=ge.String()}static{this.paths=[["constraints","query"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"query the constraints fact database",details:` - This command will output all matches to the given prolog query. - `,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(ES(),yS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a),c=this.query;return c.endsWith(".")||(c=`${c}.`),(await Ot.start({configuration:s,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(c)){let E=Array.from(Object.entries(h)),C=E.length,S=E.reduce((P,[I])=>Math.max(P,I.length),0);for(let P=0;P(ES(),yS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ve();Ve();Wt();gS();var XC=class extends ut{constructor(){super(...arguments);this.fix=ge.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["constraints"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:` - This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code. - - If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution. - - For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints. - `,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let a=await s.loadUserConfig(),n;if(a?.constraints)n=new YC(s);else{let{Constraints:h}=await Promise.resolve().then(()=>(ES(),yS));n=await h.find(s)}let c,f=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:C,remainingErrors:S}=oF(s,E,{fix:this.fix}),P=[];for(let[I,R]of C){let N=I.manifest.indent;I.manifest=new Ht,I.manifest.indent=N,I.manifest.load(R),P.push(I.persistManifest())}if(await Promise.all(P),!(C.size>0&&h>1)){c=UBe(S,{configuration:r}),f=!1,p=!0;for(let[,I]of S)for(let R of I)R.fixable?f=!0:p=!1}}if(c.children.length===0)return 0;if(f){let h=p?`Those errors can all be fixed by running ${he.pretty(r,"yarn constraints --fix",he.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${he.pretty(r,"yarn constraints --fix",he.Type.CODE)}`;await Ot.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return c.children=je.sortMap(c.children,h=>h.value[1]),Qs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};gS();var USt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[zC,ZC,XC],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),s;if(r?.constraints)s=new YC(t);else{let{Constraints:c}=await Promise.resolve().then(()=>(ES(),yS));s=await c.find(t)}let a=await s.process();if(!a)return;let{remainingErrors:n}=oF(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[c,f]of n)for(let p of f)e(84,`${he.pretty(t.configuration,c.anchoredLocator,he.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${he.pretty(t.configuration,"yarn constraints",he.Type.CODE)} for more details`)}}},HSt=USt;var d9={};Vt(d9,{CreateCommand:()=>$C,DlxCommand:()=>ew,default:()=>qSt});Ve();Wt();var $C=class extends ut{constructor(){super(...arguments);this.pkg=ge.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[["create"]]}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let s=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=q.parseDescriptor(s),n=a.name.match(/^create(-|$)/)?a:a.scope?q.makeIdent(a.scope,`create-${a.name}`):q.makeIdent(null,`create-${a.name}`),c=q.stringifyIdent(n);return a.range!=="unknown"&&(c+=`@${a.range}`),this.cli.run(["dlx",...r,c,...this.args])}};Ve();Ve();bt();Wt();var ew=class extends ut{constructor(){super(...arguments);this.packages=ge.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[["dlx"]]}static{this.usage=ot.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-vite to scaffold a new Vite project","yarn dlx create-vite"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]})}async execute(){return ze.telemetry=null,await le.mktempPromise(async r=>{let s=K.join(r,`dlx-${process.pid}`);await le.mkdirPromise(s),await le.writeFilePromise(K.join(s,"package.json"),`{} -`),await le.writeFilePromise(K.join(s,"yarn.lock"),"");let a=K.join(s,".yarnrc.yml"),n=await ze.findProjectCwd(this.context.cwd),f={enableGlobalCache:!(await ze.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Vf(68),level:he.LogLevel.Discard}]},p=n!==null?K.join(n,".yarnrc.yml"):null;p!==null&&le.existsSync(p)?(await le.copyFilePromise(p,a),await ze.updateConfiguration(s,N=>{let U=je.toMerged(N,f);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(W=>{let te=typeof W=="string"?W:W.path,ie=ue.isAbsolute(te)?te:ue.resolve(ue.fromPortablePath(n),te);return typeof W=="string"?ie:{path:ie,spec:W.spec}})),U})):await le.writeJsonPromise(a,f);let h=this.packages??[this.command],E=q.parseDescriptor(this.command).name,C=await this.cli.run(["add","--fixed","--",...h],{cwd:s,quiet:this.quiet});if(C!==0)return C;this.quiet||this.context.stdout.write(` -`);let S=await ze.find(s,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,s);if(I===null)throw new ar(P.cwd,s);await P.restoreInstallState();let R=await In.getWorkspaceAccessibleBinaries(I);return R.has(E)===!1&&R.size===1&&typeof this.packages>"u"&&(E=Array.from(R)[0][0]),await In.executeWorkspaceAccessibleBinary(I,E,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var jSt={commands:[$C,ew]},qSt=jSt;var E9={};Vt(E9,{ExecFetcher:()=>CS,ExecResolver:()=>wS,default:()=>YSt,execUtils:()=>uF});Ve();Ve();bt();var fA="exec:";var uF={};Vt(uF,{loadGeneratorFile:()=>IS,makeLocator:()=>y9,makeSpec:()=>Ave,parseSpec:()=>m9});Ve();bt();function m9(t){let{params:e,selector:r}=q.parseRange(t),s=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?q.parseLocator(e.locator):null,path:s}}function Ave({parentLocator:t,path:e,generatorHash:r,protocol:s}){let a=t!==null?{locator:q.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return q.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function y9(t,{parentLocator:e,path:r,generatorHash:s,protocol:a}){return q.makeLocator(t,Ave({parentLocator:e,path:r,generatorHash:s,protocol:a}))}async function IS(t,e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(t,{protocol:e}),n=K.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,n.localPath)}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.join(c.prefixPath,a);return await f.readFilePromise(p,"utf8")}var CS=class{supports(e,r){return!!e.reference.startsWith(fA)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:fA});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){let s=await IS(e.reference,fA,r);return le.mktempPromise(async a=>{let n=K.join(a,"generator.js");return await le.writeFilePromise(n,s),le.mktempPromise(async c=>{if(await this.generatePackage(c,e,n,r),!le.existsSync(K.join(c,"build")))throw new Error("The script should have generated a build directory");return await gs.makeArchiveFromDirectory(K.join(c,"build"),{prefixPath:q.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,s,a){return await le.mktempPromise(async n=>{let c=await In.makeScriptEnv({project:a.project,binFolder:n}),f=K.join(e,"runtime.js");return await le.mktempPromise(async p=>{let h=K.join(p,"buildfile.log"),E=K.join(e,"generator"),C=K.join(e,"build");await le.mkdirPromise(E),await le.mkdirPromise(C);let S={tempDir:ue.fromPortablePath(E),buildDir:ue.fromPortablePath(C),locator:q.stringifyLocator(r)};await le.writeFilePromise(f,` - // Expose 'Module' as a global variable - Object.defineProperty(global, 'Module', { - get: () => require('module'), - configurable: true, - enumerable: false, - }); - - // Expose non-hidden built-in modules as global variables - for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) { - Object.defineProperty(global, name, { - get: () => require(name), - configurable: true, - enumerable: false, - }); - } - - // Expose the 'execEnv' global variable - Object.defineProperty(global, 'execEnv', { - value: { - ...${JSON.stringify(S)}, - }, - enumerable: true, - }); - `);let P=c.NODE_OPTIONS||"",I=/\s*--require\s+\S*\.pnp\.c?js\s*/g;P=P.replace(I," ").trim(),c.NODE_OPTIONS=P;let{stdout:R,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${q.stringifyLocator(r)}) -`,prefix:q.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Gr.pipevp(process.execPath,["--require",ue.fromPortablePath(f),ue.fromPortablePath(s),q.stringifyIdent(r)],{cwd:e,env:c,stdin:null,stdout:R,stderr:N});if(U!==0)throw le.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${he.pretty(a.project.configuration,h,he.Type.PATH)})`)})})}};Ve();Ve();var GSt=2,wS=class{supportsDescriptor(e,r){return!!e.range.startsWith(fA)}supportsLocator(e,r){return!!e.reference.startsWith(fA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=m9(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=await IS(q.makeRange({protocol:fA,source:a,selector:a,params:{locator:q.stringifyLocator(n)}}),fA,s.fetchOptions),f=Nn.makeHash(`${GSt}`,c).slice(0,6);return[y9(e,{parentLocator:n,path:a,generatorHash:f,protocol:fA})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var WSt={fetchers:[CS],resolvers:[wS]},YSt=WSt;var C9={};Vt(C9,{FileFetcher:()=>DS,FileResolver:()=>bS,TarballFileFetcher:()=>PS,TarballFileResolver:()=>xS,default:()=>JSt,fileUtils:()=>Pm});Ve();bt();var tw=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,BS=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,ts="file:";var Pm={};Vt(Pm,{fetchArchiveFromLocator:()=>SS,makeArchiveFromLocator:()=>fF,makeBufferFromLocator:()=>I9,makeLocator:()=>rw,makeSpec:()=>pve,parseSpec:()=>vS});Ve();bt();function vS(t){let{params:e,selector:r}=q.parseRange(t),s=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?q.parseLocator(e.locator):null,path:s}}function pve({parentLocator:t,path:e,hash:r,protocol:s}){let a=t!==null?{locator:q.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return q.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function rw(t,{parentLocator:e,path:r,hash:s,protocol:a}){return q.makeLocator(t,pve({parentLocator:e,path:r,hash:s,protocol:a}))}async function SS(t,e){let{parentLocator:r,path:s}=q.parseFileStyleRange(t.reference,{protocol:ts}),a=K.isAbsolute(s)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let c=n.packageFs,f=K.join(n.prefixPath,s);return await je.releaseAfterUseAsync(async()=>await c.readFilePromise(f),n.releaseFs)}async function fF(t,{protocol:e,fetchOptions:r,inMemory:s=!1}){let{parentLocator:a,path:n}=q.parseFileStyleRange(t.reference,{protocol:e}),c=K.isAbsolute(n)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(a,r),f=c.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,c.localPath)}:c;c!==f&&c.releaseFs&&c.releaseFs();let p=f.packageFs,h=K.join(f.prefixPath,n);return await je.releaseAfterUseAsync(async()=>await gs.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:q.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:s}),f.releaseFs)}async function I9(t,{protocol:e,fetchOptions:r}){return(await fF(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var DS=class{supports(e,r){return!!e.reference.startsWith(ts)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:ts});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){return fF(e,{protocol:ts,fetchOptions:r})}};Ve();Ve();var VSt=2,bS=class{supportsDescriptor(e,r){return e.range.match(tw)?!0:!!e.range.startsWith(ts)}supportsLocator(e,r){return!!e.reference.startsWith(ts)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return tw.test(e.range)&&(e=q.makeDescriptor(e,`${ts}${e.range}`)),q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=vS(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=await I9(q.makeLocator(e,q.makeRange({protocol:ts,source:a,selector:a,params:{locator:q.stringifyLocator(n)}})),{protocol:ts,fetchOptions:s.fetchOptions}),f=Nn.makeHash(`${VSt}`,c).slice(0,6);return[rw(e,{parentLocator:n,path:a,hash:f,protocol:ts})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};Ve();var PS=class{supports(e,r){return BS.test(e.reference)?!!e.reference.startsWith(ts):!1}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromDisk(e,r){let s=await SS(e,r);return await gs.convertToZip(s,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}};Ve();Ve();Ve();var xS=class{supportsDescriptor(e,r){return BS.test(e.range)?!!(e.range.startsWith(ts)||tw.test(e.range)):!1}supportsLocator(e,r){return BS.test(e.reference)?!!e.reference.startsWith(ts):!1}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return tw.test(e.range)&&(e=q.makeDescriptor(e,`${ts}${e.range}`)),q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=vS(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=rw(e,{parentLocator:n,path:a,hash:"",protocol:ts}),f=await SS(c,s.fetchOptions),p=Nn.makeHash(f).slice(0,6);return[rw(e,{parentLocator:n,path:a,hash:p,protocol:ts})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var KSt={fetchers:[PS,DS],resolvers:[xS,bS]},JSt=KSt;var v9={};Vt(v9,{GithubFetcher:()=>kS,default:()=>ZSt,githubUtils:()=>AF});Ve();bt();var AF={};Vt(AF,{invalidGithubUrlMessage:()=>dve,isGithubUrl:()=>w9,parseGithubUrl:()=>B9});var hve=et(Ie("querystring")),gve=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];function w9(t){return t?gve.some(e=>!!t.match(e)):!1}function B9(t){let e;for(let f of gve)if(e=t.match(f),e)break;if(!e)throw new Error(dve(t));let[,r,s,a,n="master"]=e,{commit:c}=hve.default.parse(n);return n=c||n.replace(/[^:]*:/,""),{auth:r,username:s,reponame:a,treeish:n}}function dve(t){return`Input cannot be parsed as a valid GitHub URL ('${t}').`}var kS=class{supports(e,r){return!!w9(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await An.get(this.getLocatorUrl(e,r),{configuration:r.project.configuration});return await le.mktempPromise(async a=>{let n=new Sn(a);await gs.extractArchiveTo(s,n,{stripComponents:1});let c=Qa.splitRepoUrl(e.reference),f=K.join(a,"package.tgz");await In.prepareExternalProject(a,f,{configuration:r.project.configuration,report:r.report,workspace:c.extra.workspace,locator:e});let p=await le.readFilePromise(f);return await gs.convertToZip(p,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,r){let{auth:s,username:a,reponame:n,treeish:c}=B9(e.reference);return`https://${s?`${s}@`:""}github.com/${a}/${n}/archive/${c}.tar.gz`}};var zSt={hooks:{async fetchHostedRepository(t,e,r){if(t!==null)return t;let s=new kS;if(!s.supports(e,r))return null;try{return await s.fetch(e,r)}catch{return null}}}},ZSt=zSt;var S9={};Vt(S9,{TarballHttpFetcher:()=>TS,TarballHttpResolver:()=>RS,default:()=>$St});Ve();function QS(t){let e;try{e=new URL(t)}catch{return!1}return!(e.protocol!=="http:"&&e.protocol!=="https:"||!e.pathname.match(/(\.tar\.gz|\.tgz|\/[^.]+)$/))}var TS=class{supports(e,r){return QS(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await An.get(e.reference,{configuration:r.project.configuration});return await gs.convertToZip(s,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}};Ve();Ve();var RS=class{supportsDescriptor(e,r){return QS(e.range)}supportsLocator(e,r){return QS(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[q.convertDescriptorToLocator(e)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var XSt={fetchers:[TS],resolvers:[RS]},$St=XSt;var D9={};Vt(D9,{InitCommand:()=>J0,InitInitializerCommand:()=>nw,default:()=>tDt});Wt();Ve();Ve();bt();Wt();var J0=class extends ut{constructor(){super(...arguments);this.private=ge.Boolean("-p,--private",!1,{description:"Initialize a private package"});this.workspace=ge.Boolean("-w,--workspace",!1,{description:"Initialize a workspace root with a `packages/` directory"});this.install=ge.String("-i,--install",!1,{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"});this.name=ge.String("-n,--name",{description:"Initialize a package with the given name"});this.usev2=ge.Boolean("-2",!1,{hidden:!0});this.yes=ge.Boolean("-y,--yes",{hidden:!0})}static{this.paths=[["init"]]}static{this.usage=ot.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.install=="string"?this.install:this.usev2||this.install===!0?"latest":null;return s!==null?await this.executeProxy(r,s):await this.executeRegular(r)}async executeProxy(r,s){if(r.projectCwd!==null&&r.projectCwd!==this.context.cwd)throw new nt("Cannot use the --install flag from within a project subdirectory");le.existsSync(this.context.cwd)||await le.mkdirPromise(this.context.cwd,{recursive:!0});let a=K.join(this.context.cwd,Er.lockfile);le.existsSync(a)||await le.writeFilePromise(a,"");let n=await this.cli.run(["set","version",s],{quiet:!0});if(n!==0)return n;let c=[];return this.private&&c.push("-p"),this.workspace&&c.push("-w"),this.name&&c.push(`-n=${this.name}`),this.yes&&c.push("-y"),await le.mktempPromise(async f=>{let{code:p}=await Gr.pipevp("yarn",["init",...c],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await In.makeScriptEnv({binFolder:f})});return p})}async initialize(){}async executeRegular(r){let s=null;try{s=(await Tt.find(r,this.context.cwd)).project}catch{s=null}le.existsSync(this.context.cwd)||await le.mkdirPromise(this.context.cwd,{recursive:!0});let a=await Ht.tryFind(this.context.cwd),n=a??new Ht,c=Object.fromEntries(r.get("initFields").entries());n.load(c),n.name=n.name??q.makeIdent(r.get("initScope"),this.name??K.basename(this.context.cwd)),n.packageManager=un&&je.isTaggedYarnVersion(un)?`yarn@${un}`:null,(!a&&this.workspace||this.private)&&(n.private=!0),this.workspace&&n.workspaceDefinitions.length===0&&(await le.mkdirPromise(K.join(this.context.cwd,"packages"),{recursive:!0}),n.workspaceDefinitions=[{pattern:"packages/*"}]);let f={};n.exportTo(f);let p=K.join(this.context.cwd,Ht.fileName);await le.changeFilePromise(p,`${JSON.stringify(f,null,2)} -`,{automaticNewlines:!0});let h=[p],E=K.join(this.context.cwd,"README.md");if(le.existsSync(E)||(await le.writeFilePromise(E,`# ${q.stringifyIdent(n.name)} -`),h.push(E)),!s||s.cwd===this.context.cwd){let C=K.join(this.context.cwd,Er.lockfile);le.existsSync(C)||(await le.writeFilePromise(C,""),h.push(C));let P=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Whether you use PnP or not, the node_modules folder is often used to store","# build artifacts that should be gitignored","node_modules","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(Ae=>`${Ae} -`).join(""),I=K.join(this.context.cwd,".gitignore");le.existsSync(I)||(await le.writeFilePromise(I,P),h.push(I));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(Ae=>`${Ae} -`).join(""),U=K.join(this.context.cwd,".gitattributes");le.existsSync(U)||(await le.writeFilePromise(U,N),h.push(U));let W={"*":{charset:"utf-8",endOfLine:"lf",indentSize:2,indentStyle:"space",insertFinalNewline:!0}};je.mergeIntoTarget(W,r.get("initEditorConfig"));let te=`root = true -`;for(let[Ae,ce]of Object.entries(W)){te+=` -[${Ae}] -`;for(let[me,pe]of Object.entries(ce)){let Be=me.replace(/[A-Z]/g,Ce=>`_${Ce.toLowerCase()}`);te+=`${Be} = ${pe} -`}}let ie=K.join(this.context.cwd,".editorconfig");le.existsSync(ie)||(await le.writeFilePromise(ie,te),h.push(ie)),await this.cli.run(["install"],{quiet:!0}),await this.initialize(),le.existsSync(K.join(this.context.cwd,".git"))||(await Gr.execvp("git",["init"],{cwd:this.context.cwd}),await Gr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Gr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};var nw=class extends J0{constructor(){super(...arguments);this.initializer=ge.String();this.argv=ge.Proxy()}static{this.paths=[["init"]]}async initialize(){this.context.stdout.write(` -`),await this.cli.run(["dlx",this.initializer,...this.argv],{quiet:!0})}};var eDt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[J0,nw]},tDt=eDt;var IY={};Vt(IY,{SearchCommand:()=>Iw,UpgradeInteractiveCommand:()=>Cw,default:()=>yQt});Ve();var yve=et(Ie("os"));function iw({stdout:t}){if(yve.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}Wt();var kSe=et(G9()),W9={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Xbt=(0,kSe.default)(W9.appId,W9.apiKey).initIndex(W9.indexName),Y9=async(t,e=0)=>await Xbt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var QD=["regular","dev","peer"],Iw=class extends ut{static{this.paths=[["search"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open the search interface",details:` - This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry. - `,examples:[["Open the search window","yarn search"]]})}async execute(){iw(this.context);let{Gem:e}=await Promise.resolve().then(()=>(YF(),cY)),{ScrollableItems:r}=await Promise.resolve().then(()=>(zF(),JF)),{useKeypress:s}=await Promise.resolve().then(()=>(PD(),DPe)),{useMinistore:a}=await Promise.resolve().then(()=>(gY(),hY)),{renderForm:n}=await Promise.resolve().then(()=>(eN(),$F)),{default:c}=await Promise.resolve().then(()=>et(OPe())),{Box:f,Text:p}=await Promise.resolve().then(()=>et(Vc())),{default:h,useEffect:E,useState:C}=await Promise.resolve().then(()=>et(hn())),S=await ze.find(this.context.cwd,this.context.plugins),P=()=>h.createElement(f,{flexDirection:"row"},h.createElement(f,{flexDirection:"column",width:48},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},""),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to move between packages.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to select a package.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," again to change the target."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to install the selected packages.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to abort.")))),I=()=>h.createElement(h.Fragment,null,h.createElement(f,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(f,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(f,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),R=()=>h.createElement(f,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),N=({hit:pe,active:Be})=>{let[Ce,g]=a(pe.name,null);s({active:Be},(fe,se)=>{if(se.name!=="space")return;if(!Ce){g(QD[0]);return}let X=QD.indexOf(Ce)+1;X===QD.length?g(null):g(QD[X])},[Ce,g]);let we=q.parseIdent(pe.name),ye=q.prettyIdent(S,we);return h.createElement(f,null,h.createElement(f,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},ye)),h.createElement(f,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},pe.owner.name)),h.createElement(f,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},pe.version)),h.createElement(f,{width:16,marginLeft:1},h.createElement(p,null,pe.humanDownloadsLast30Days)))},U=({name:pe,active:Be})=>{let[Ce]=a(pe,null),g=q.parseIdent(pe);return h.createElement(f,null,h.createElement(f,{width:47},h.createElement(p,{bold:!0}," - ",q.prettyIdent(S,g))),QD.map(we=>h.createElement(f,{key:we,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(e,{active:Ce===we})," ",h.createElement(p,{bold:!0},we)))))},W=()=>h.createElement(f,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),ie=await n(({useSubmit:pe})=>{let Be=a();pe(Be);let Ce=Array.from(Be.keys()).filter(j=>Be.get(j)!==null),[g,we]=C(""),[ye,fe]=C(0),[se,X]=C([]),De=j=>{j.match(/\t| /)||we(j)},Re=async()=>{fe(0);let j=await Y9(g);j.query===g&&X(j.hits)},dt=async()=>{let j=await Y9(g,ye+1);j.query===g&&j.page-1===ye&&(fe(j.page),X([...se,...j.hits]))};return E(()=>{g?Re():X([])},[g]),h.createElement(f,{flexDirection:"column"},h.createElement(P,null),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(f,{width:41},h.createElement(c,{value:g,onChange:De,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(I,null)),se.length?h.createElement(r,{radius:2,loop:!1,children:se.map(j=>h.createElement(N,{key:j.name,hit:j,active:!1})),willReachEnd:dt}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(f,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(R,null)),Ce.length?Ce.map(j=>h.createElement(U,{key:j,name:j,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(W,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ie>"u")return 1;let Ae=Array.from(ie.keys()).filter(pe=>ie.get(pe)==="regular"),ce=Array.from(ie.keys()).filter(pe=>ie.get(pe)==="dev"),me=Array.from(ie.keys()).filter(pe=>ie.get(pe)==="peer");return Ae.length&&await this.cli.run(["add",...Ae]),ce.length&&await this.cli.run(["add","--dev",...ce]),me&&await this.cli.run(["add","--peer",...me]),0}};Ve();Wt();fG();var qPe=et(Ai()),jPe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/;function GPe(t,e){return t.length>0?[t.slice(0,e)].concat(GPe(t.slice(e),e)):[]}var Cw=class extends ut{static{this.paths=[["upgrade-interactive"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open the upgrade interface",details:` - This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade. - `,examples:[["Open the upgrade window","yarn upgrade-interactive"]]})}async execute(){iw(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(HPe(),UPe)),{Pad:r}=await Promise.resolve().then(()=>(EY(),_Pe)),{ScrollableItems:s}=await Promise.resolve().then(()=>(zF(),JF)),{useMinistore:a}=await Promise.resolve().then(()=>(gY(),hY)),{renderForm:n}=await Promise.resolve().then(()=>(eN(),$F)),{Box:c,Text:f}=await Promise.resolve().then(()=>et(Vc())),{default:p,useEffect:h,useRef:E,useState:C}=await Promise.resolve().then(()=>et(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd),R=await Jr.find(S);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(we,ye)=>{let fe=cCe(we,ye),se="";for(let X of fe)X.added?se+=he.pretty(S,X.value,"green"):X.removed||(se+=X.value);return se},W=(we,ye)=>{if(we===ye)return ye;let fe=q.parseRange(we),se=q.parseRange(ye),X=fe.selector.match(jPe),De=se.selector.match(jPe);if(!X||!De)return U(we,ye);let Re=["gray","red","yellow","green","magenta"],dt=null,j="";for(let rt=1;rt{let se=await Xu.fetchDescriptorFrom(we,fe,{project:P,cache:R,preserveModifier:ye,workspace:I});return se!==null?se.range:we.range},ie=async we=>{let ye=qPe.default.valid(we.range)?`^${we.range}`:we.range,[fe,se]=await Promise.all([te(we,we.range,ye).catch(()=>null),te(we,we.range,"latest").catch(()=>null)]),X=[{value:null,label:we.range}];return fe&&fe!==we.range?X.push({value:fe,label:W(we.range,fe)}):X.push({value:null,label:""}),se&&se!==fe&&se!==we.range?X.push({value:se,label:W(we.range,se)}):X.push({value:null,label:""}),X},Ae=()=>p.createElement(c,{flexDirection:"row"},p.createElement(c,{flexDirection:"column",width:49},p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},""),"/",p.createElement(f,{bold:!0,color:"cyanBright"},"")," to select packages.")),p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},""),"/",p.createElement(f,{bold:!0,color:"cyanBright"},"")," to select versions."))),p.createElement(c,{flexDirection:"column"},p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},"")," to install.")),p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},"")," to abort.")))),ce=()=>p.createElement(c,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(c,{width:50},p.createElement(f,{bold:!0},p.createElement(f,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:"gray"},"Latest"))),me=({active:we,descriptor:ye,suggestions:fe})=>{let[se,X]=a(ye.descriptorHash,null),De=q.stringifyIdent(ye),Re=Math.max(0,45-De.length);return p.createElement(p.Fragment,null,p.createElement(c,null,p.createElement(c,{width:45},p.createElement(f,{bold:!0},q.prettyIdent(S,ye)),p.createElement(r,{active:we,length:Re})),p.createElement(e,{active:we,options:fe,value:se,skewer:!0,onChange:X,sizes:[17,17,17]})))},pe=({dependencies:we})=>{let[ye,fe]=C(we.map(()=>null)),se=E(!0),X=async De=>{let Re=await ie(De);return Re.filter(dt=>dt.label!=="").length<=1?null:{descriptor:De,suggestions:Re}};return h(()=>()=>{se.current=!1},[]),h(()=>{let De=Math.trunc(N*1.75),Re=we.slice(0,De),dt=we.slice(De),j=GPe(dt,N),rt=Re.map(X).reduce(async(Fe,Ne)=>{await Fe;let Pe=await Ne;Pe!==null&&se.current&&fe(Ye=>{let ke=Ye.findIndex(_e=>_e===null),it=[...Ye];return it[ke]=Pe,it})},Promise.resolve());j.reduce((Fe,Ne)=>Promise.all(Ne.map(Pe=>Promise.resolve().then(()=>X(Pe)))).then(async Pe=>{Pe=Pe.filter(Ye=>Ye!==null),await Fe,se.current&&fe(Ye=>{let ke=Ye.findIndex(it=>it===null);return Ye.slice(0,ke).concat(Pe).concat(Ye.slice(ke+Pe.length))})}),rt).then(()=>{se.current&&fe(Fe=>Fe.filter(Ne=>Ne!==null))})},[]),ye.length?p.createElement(s,{radius:N>>1,children:ye.map((De,Re)=>De!==null?p.createElement(me,{key:Re,active:!1,descriptor:De.descriptor,suggestions:De.suggestions}):p.createElement(f,{key:Re},"Loading..."))}):p.createElement(f,null,"No upgrades found")},Ce=await n(({useSubmit:we})=>{we(a());let ye=new Map;for(let se of P.workspaces)for(let X of["dependencies","devDependencies"])for(let De of se.manifest[X].values())P.tryWorkspaceByDescriptor(De)===null&&(De.range.startsWith("link:")||ye.set(De.descriptorHash,De));let fe=je.sortMap(ye.values(),se=>q.stringifyDescriptor(se));return p.createElement(c,{flexDirection:"column"},p.createElement(Ae,null),p.createElement(ce,null),p.createElement(pe,{dependencies:fe}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof Ce>"u")return 1;let g=!1;for(let we of P.workspaces)for(let ye of["dependencies","devDependencies"]){let fe=we.manifest[ye];for(let se of fe.values()){let X=Ce.get(se.descriptorHash);typeof X<"u"&&X!==null&&(fe.set(se.identHash,q.makeDescriptor(se,X)),g=!0)}}return g?await P.installWithNewReport({quiet:this.context.quiet,stdout:this.context.stdout},{cache:R}):0}};var mQt={commands:[Iw,Cw]},yQt=mQt;var wY={};Vt(wY,{default:()=>wQt});Ve();var RD="jsr:";Ve();Ve();function ww(t){let e=t.range.slice(4);if(Or.validRange(e))return q.makeDescriptor(t,`npm:${q.stringifyIdent(q.wrapIdentIntoScope(t,"jsr"))}@${e}`);let r=q.tryParseDescriptor(e,!0);if(r!==null)return q.makeDescriptor(t,`npm:${q.stringifyIdent(q.wrapIdentIntoScope(r,"jsr"))}@${r.range}`);throw new Error(`Invalid range: ${t.range}`)}function Bw(t){return q.makeLocator(q.wrapIdentIntoScope(t,"jsr"),`npm:${t.reference.slice(4)}`)}function CY(t){return q.makeLocator(q.unwrapIdentFromScope(t,"jsr"),`jsr:${t.reference.slice(4)}`)}var tN=class{supports(e,r){return e.reference.startsWith(RD)}getLocalPath(e,r){let s=Bw(e);return r.fetcher.getLocalPath(s,r)}fetch(e,r){let s=Bw(e);return r.fetcher.fetch(s,r)}};var rN=class{supportsDescriptor(e,r){return!!e.range.startsWith(RD)}supportsLocator(e,r){return!!e.reference.startsWith(RD)}shouldPersistResolution(e,r){let s=Bw(e);return r.resolver.shouldPersistResolution(s,r)}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{inner:ww(e)}}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(ww(e));return(await s.resolver.getCandidates(a,r,s)).map(c=>CY(c))}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(ww(e));return a.resolver.getSatisfying(n,r,s,a)}async resolve(e,r){let s=Bw(e),a=await r.resolver.resolve(s,r);return{...a,...CY(a)}}};var EQt=["dependencies","devDependencies","peerDependencies"];function IQt(t,e){for(let r of EQt)for(let s of t.manifest.getForScope(r).values()){if(!s.range.startsWith("jsr:"))continue;let a=ww(s),n=r==="dependencies"?q.makeDescriptor(s,"unknown"):null,c=n!==null&&t.manifest.ensureDependencyMeta(n).optional?"optionalDependencies":r;e[c][q.stringifyIdent(s)]=a.range}}var CQt={hooks:{beforeWorkspacePacking:IQt},resolvers:[rN],fetchers:[tN]},wQt=CQt;var BY={};Vt(BY,{LinkFetcher:()=>FD,LinkResolver:()=>ND,PortalFetcher:()=>OD,PortalResolver:()=>LD,default:()=>vQt});Ve();bt();var ih="portal:",sh="link:";var FD=class{supports(e,r){return!!e.reference.startsWith(sh)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:sh});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:sh}),n=K.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new jf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0}}};Ve();bt();var ND=class{supportsDescriptor(e,r){return!!e.range.startsWith(sh)}supportsLocator(e,r){return!!e.reference.startsWith(sh)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(sh.length);return[q.makeLocator(e,`${sh}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return{...e,version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ve();bt();var OD=class{supports(e,r){return!!e.reference.startsWith(ih)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:ih});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:ih}),n=K.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,localPath:p}:{packageFs:new jf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot}}};Ve();Ve();bt();var LD=class{supportsDescriptor(e,r){return!!e.range.startsWith(ih)}supportsLocator(e,r){return!!e.reference.startsWith(ih)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(ih.length);return[q.makeLocator(e,`${ih}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var BQt={fetchers:[FD,OD],resolvers:[ND,LD]},vQt=BQt;var oV={};Vt(oV,{NodeModulesLinker:()=>XD,NodeModulesMode:()=>rV,PnpLooseLinker:()=>$D,default:()=>HTt});bt();Ve();bt();bt();var SY=(t,e)=>`${t}@${e}`,WPe=(t,e)=>{let r=e.indexOf("#"),s=r>=0?e.substring(r+1):e;return SY(t,s)};var VPe=(t,e={})=>{let r=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),s=e.check||r>=9,a=e.hoistingLimits||new Map,n={check:s,debugLevel:r,hoistingLimits:a,fastLookupPossible:!0},c;n.debugLevel>=0&&(c=Date.now());let f=QQt(t,n),p=!1,h=0;do{let E=DY(f,[f],new Set([f.locator]),new Map,n);p=E.anotherRoundNeeded||E.isGraphChanged,n.fastLookupPossible=!1,h++}while(p);if(n.debugLevel>=0&&console.log(`hoist time: ${Date.now()-c}ms, rounds: ${h}`),n.debugLevel>=1){let E=MD(f);if(DY(f,[f],new Set([f.locator]),new Map,n).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree: -${E}, next tree: -${MD(f)}`);let S=KPe(f);if(S)throw new Error(`${S}, after hoisting finished: -${MD(f)}`)}return n.debugLevel>=2&&console.log(MD(f)),TQt(f)},SQt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=n=>{if(!s.has(n)){s.add(n);for(let c of n.hoistedDependencies.values())r.set(c.name,c);for(let c of n.dependencies.values())n.peerNames.has(c.name)||a(c)}};return a(e),r},DQt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=new Set,n=(c,f)=>{if(s.has(c))return;s.add(c);for(let h of c.hoistedDependencies.values())if(!f.has(h.name)){let E;for(let C of t)E=C.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of c.dependencies.values())p.add(h.name);for(let h of c.dependencies.values())c.peerNames.has(h.name)||n(h,p)};return n(e,a),r},YPe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:s,ident:a,locator:n,dependencies:c,originalDependencies:f,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:I,hoistedTo:R}=e,N={name:r,references:new Set(s),ident:a,locator:n,dependencies:new Map(c),originalDependencies:new Map(f),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:new Map(I),hoistedTo:new Map(R)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},bQt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let s=Array.from(e.keys());s.sort((a,n)=>{let c=e.get(a),f=e.get(n);if(f.hoistPriority!==c.hoistPriority)return f.hoistPriority-c.hoistPriority;{let p=c.dependents.size+c.peerDependents.size;return f.dependents.size+f.peerDependents.size-p}});for(let a of s){let n=a.substring(0,a.indexOf("@",1)),c=a.substring(n.length+1);if(!t.peerNames.has(n)){let f=r.get(n);f||(f=[],r.set(n,f)),f.indexOf(c)<0&&f.push(c)}}return r},vY=t=>{let e=new Set,r=(s,a=new Set)=>{if(!a.has(s)){a.add(s);for(let n of s.peerNames)if(!t.peerNames.has(n)){let c=t.dependencies.get(n);c&&!e.has(c)&&r(c,a)}e.add(s)}};for(let s of t.dependencies.values())t.peerNames.has(s.name)||r(s);return e},DY=(t,e,r,s,a,n=new Set)=>{let c=e[e.length-1];if(n.has(c))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(c);let f=RQt(c),p=bQt(c,f),h=t==c?new Map:a.fastLookupPossible?SQt(e):DQt(e),E,C=!1,S=!1,P=new Map(Array.from(p.entries()).map(([R,N])=>[R,N[0]])),I=new Map;do{let R=kQt(t,e,r,h,P,p,s,I,a);R.isGraphChanged&&(S=!0),R.anotherRoundNeeded&&(C=!0),E=!1;for(let[N,U]of p)U.length>1&&!c.dependencies.has(N)&&(P.delete(N),U.shift(),P.set(N,U[0]),E=!0)}while(E);for(let R of c.dependencies.values())if(!c.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let N=DY(t,[...e,R],r,I,a);N.isGraphChanged&&(S=!0),N.anotherRoundNeeded&&(C=!0),r.delete(R.locator)}return{anotherRoundNeeded:C,isGraphChanged:S}},PQt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},xQt=(t,e,r,s,a,n,c,f,{outputReason:p,fastLookupPossible:h})=>{let E,C=null,S=new Set;p&&(E=`${Array.from(e).map(N=>Io(N)).join("\u2192")}`);let P=r[r.length-1],R=!(s.ident===P.ident);if(p&&!R&&(C="- self-reference"),R&&(R=s.dependencyKind!==1,p&&!R&&(C="- workspace")),R&&s.dependencyKind===2&&(R=!PQt(s),p&&!R&&(C="- external soft link with unhoisted dependencies")),R&&(R=!t.peerNames.has(s.name),p&&!R&&(C=`- cannot shadow peer: ${Io(t.originalDependencies.get(s.name).locator)} at ${E}`)),R){let N=!1,U=a.get(s.name);if(N=!U||U.ident===s.ident,p&&!N&&(C=`- filled by: ${Io(U.locator)} at ${E}`),N)for(let W=r.length-1;W>=1;W--){let ie=r[W].dependencies.get(s.name);if(ie&&ie.ident!==s.ident){N=!1;let Ae=f.get(P);Ae||(Ae=new Set,f.set(P,Ae)),Ae.add(s.name),p&&(C=`- filled by ${Io(ie.locator)} at ${r.slice(0,W).map(ce=>Io(ce.locator)).join("\u2192")}`);break}}R=N}if(R&&(R=n.get(s.name)===s.ident,p&&!R&&(C=`- filled by: ${Io(c.get(s.name)[0])} at ${E}`)),R){let N=!0,U=new Set(s.peerNames);for(let W=r.length-1;W>=1;W--){let te=r[W];for(let ie of U){if(te.peerNames.has(ie)&&te.originalDependencies.has(ie))continue;let Ae=te.dependencies.get(ie);Ae&&t.dependencies.get(ie)!==Ae&&(W===r.length-1?S.add(Ae):(S=null,N=!1,p&&(C=`- peer dependency ${Io(Ae.locator)} from parent ${Io(te.locator)} was not hoisted to ${E}`))),U.delete(ie)}if(!N)break}R=N}if(R&&!h)for(let N of s.hoistedDependencies.values()){let U=a.get(N.name)||t.dependencies.get(N.name);if(!U||N.ident!==U.ident){R=!1,p&&(C=`- previously hoisted dependency mismatch, needed: ${Io(N.locator)}, available: ${Io(U?.locator)}`);break}}return S!==null&&S.size>0?{isHoistable:2,dependsOn:S,reason:C}:{isHoistable:R?0:1,reason:C}},nN=t=>`${t.name}@${t.locator}`,kQt=(t,e,r,s,a,n,c,f,p)=>{let h=e[e.length-1],E=new Set,C=!1,S=!1,P=(U,W,te,ie,Ae)=>{if(E.has(ie))return;let ce=[...W,nN(ie)],me=[...te,nN(ie)],pe=new Map,Be=new Map;for(let fe of vY(ie)){let se=xQt(h,r,[h,...U,ie],fe,s,a,n,f,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Be.set(fe,se),se.isHoistable===2)for(let X of se.dependsOn){let De=pe.get(X.name)||new Set;De.add(fe.name),pe.set(X.name,De)}}let Ce=new Set,g=(fe,se,X)=>{if(!Ce.has(fe)){Ce.add(fe),Be.set(fe,{isHoistable:1,reason:X});for(let De of pe.get(fe.name)||[])g(ie.dependencies.get(De),se,p.debugLevel>=2?`- peer dependency ${Io(fe.locator)} from parent ${Io(ie.locator)} was not hoisted`:"")}};for(let[fe,se]of Be)se.isHoistable===1&&g(fe,se,se.reason);let we=!1;for(let fe of Be.keys())if(!Ce.has(fe)){S=!0;let se=c.get(ie);se&&se.has(fe.name)&&(C=!0),we=!0,ie.dependencies.delete(fe.name),ie.hoistedDependencies.set(fe.name,fe),ie.reasons.delete(fe.name);let X=h.dependencies.get(fe.name);if(p.debugLevel>=2){let De=Array.from(W).concat([ie.locator]).map(dt=>Io(dt)).join("\u2192"),Re=h.hoistedFrom.get(fe.name);Re||(Re=[],h.hoistedFrom.set(fe.name,Re)),Re.push(De),ie.hoistedTo.set(fe.name,Array.from(e).map(dt=>Io(dt.locator)).join("\u2192"))}if(!X)h.ident!==fe.ident&&(h.dependencies.set(fe.name,fe),Ae.add(fe));else for(let De of fe.references)X.references.add(De)}if(ie.dependencyKind===2&&we&&(C=!0),p.check){let fe=KPe(t);if(fe)throw new Error(`${fe}, after hoisting dependencies of ${[h,...U,ie].map(se=>Io(se.locator)).join("\u2192")}: -${MD(t)}`)}let ye=vY(ie);for(let fe of ye)if(Ce.has(fe)){let se=Be.get(fe);if((a.get(fe.name)===fe.ident||!ie.reasons.has(fe.name))&&se.isHoistable!==0&&ie.reasons.set(fe.name,se.reason),!fe.isHoistBorder&&me.indexOf(nN(fe))<0){E.add(ie);let De=YPe(ie,fe);P([...U,ie],ce,me,De,R),E.delete(ie)}}},I,R=new Set(vY(h)),N=Array.from(e).map(U=>nN(U));do{I=R,R=new Set;for(let U of I){if(U.locator===h.locator||U.isHoistBorder)continue;let W=YPe(h,U);P([],Array.from(r),N,W,R)}}while(R.size>0);return{anotherRoundNeeded:C,isGraphChanged:S}},KPe=t=>{let e=[],r=new Set,s=new Set,a=(n,c,f)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let p=new Map(c);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),C=()=>`${Array.from(s).concat([n]).map(S=>Io(S.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let S=c.get(h.name);(S!==E||!S||S.ident!==h.ident)&&e.push(`${C()} - broken peer promise: expected ${h.ident} but found ${S&&S.ident}`)}else{let S=f.hoistedFrom.get(n.name),P=n.hoistedTo.get(h.name),I=`${S?` hoisted from ${S.join(", ")}`:""}`,R=`${P?` hoisted to ${P}`:""}`,N=`${C()}${I}`;E?E.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${R} found`)}}s.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);s.delete(n)};return a(t,t.dependencies,t),e.join(` -`)},QQt=(t,e)=>{let{identName:r,name:s,reference:a,peerNames:n}=t,c={name:s,references:new Set([a]),locator:SY(r,a),ident:WPe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},f=new Map([[t,c]]),p=(h,E)=>{let C=f.get(h),S=!!C;if(!C){let{name:P,identName:I,reference:R,peerNames:N,hoistPriority:U,dependencyKind:W}=h,te=e.hoistingLimits.get(E.locator);C={name:P,references:new Set([R]),locator:SY(I,R),ident:WPe(I,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(P):!1,hoistPriority:U||0,dependencyKind:W||0,hoistedFrom:new Map,hoistedTo:new Map},f.set(h,C)}if(E.dependencies.set(h.name,C),E.originalDependencies.set(h.name,C),S){let P=new Set,I=R=>{if(!P.has(R)){P.add(R),R.decoupled=!1;for(let N of R.dependencies.values())R.peerNames.has(N.name)||I(N)}};I(C)}else for(let P of h.dependencies)p(P,C)};for(let h of t.dependencies)p(h,c);return c},bY=t=>t.substring(0,t.indexOf("@",1)),TQt=t=>{let e={name:t.name,identName:bY(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),s=(a,n,c)=>{let f=r.has(a),p;if(n===a)p=c;else{let{name:h,references:E,locator:C}=a;p={name:h,identName:bY(C),references:E,dependencies:new Set}}if(c.dependencies.add(p),!f){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||s(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())s(a,t,e);return e},RQt=t=>{let e=new Map,r=new Set([t]),s=c=>`${c.name}@${c.ident}`,a=c=>{let f=s(c),p=e.get(f);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(f,p)),p},n=(c,f)=>{let p=!!r.has(f);if(a(f).dependents.add(c.ident),!p){r.add(f);for(let E of f.dependencies.values()){let C=a(E);C.hoistPriority=Math.max(C.hoistPriority,E.hoistPriority),f.peerNames.has(E.name)?C.peerDependents.add(f.ident):n(f,E)}}};for(let c of t.dependencies.values())t.peerNames.has(c.name)||n(t,c);return e},Io=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let s=t.substring(e+1);if(s==="workspace:.")return".";if(s){let a=(s.indexOf("#")>0?s.split("#")[1]:s).replace("npm:","");return s.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`};var MD=t=>{let e=0,r=(a,n,c="")=>{if(e>5e4||n.has(a))return"";e++;let f=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h":"")+(S!==E.name?`a:${E.name}:`:"")+Io(E.locator)+(C?` ${C}`:"")} -`,p+=r(E,n,`${c}${h5e4?` -Tree is too large, part of the tree has been dunped -`:"")};var _D=(s=>(s.WORKSPACES="workspaces",s.DEPENDENCIES="dependencies",s.NONE="none",s))(_D||{}),JPe="node_modules",tg="$wsroot$";var UD=(t,e)=>{let{packageTree:r,hoistingLimits:s,errors:a,preserveSymlinksRequired:n}=NQt(t,e),c=null;if(a.length===0){let f=VPe(r,{hoistingLimits:s});c=LQt(t,f,e)}return{tree:c,errors:a,preserveSymlinksRequired:n}},gA=t=>`${t.name}@${t.reference}`,xY=t=>{let e=new Map;for(let[r,s]of t.entries())if(!s.dirList){let a=e.get(s.locator);a||(a={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},e.set(s.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((s,a)=>{let n=s.split(K.delimiter).length,c=a.split(K.delimiter).length;return a===s?0:n!==c?c-n:a>s?1:-1});return e},zPe=(t,e)=>{let r=q.isVirtualLocator(t)?q.devirtualizeLocator(t):t,s=q.isVirtualLocator(e)?q.devirtualizeLocator(e):e;return q.areLocatorsEqual(r,s)},PY=(t,e,r,s)=>{if(t.linkType!=="SOFT")return!1;let a=ue.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return K.contains(s,a)===null},FQt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let s=ue.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},c=t.getDependencyTreeRoots(),f=new Map,p=new Set,h=(S,P)=>{let I=gA(S);if(p.has(I))return;p.add(I);let R=t.getPackageInformation(S);if(R){let N=P?gA(P):"";if(gA(S)!==N&&R.linkType==="SOFT"&&!S.reference.startsWith("link:")&&!PY(R,S,t,s)){let U=ZPe(R,S,t);(!f.get(U)||S.reference.startsWith("workspace:"))&&f.set(U,S)}for(let[U,W]of R.packageDependencies)W!==null&&(R.packagePeers.has(U)||h(t.getLocator(U,W),S))}};for(let S of c)h(S,null);let E=s.split(K.sep);for(let S of f.values()){let P=t.getPackageInformation(S),R=ue.toPortablePath(P.packageLocation.slice(0,-1)).split(K.sep).slice(E.length),N=n;for(let U of R){let W=N.children.get(U);W||(W={children:new Map},N.children.set(U,W)),N=W}N.workspaceLocator=S}let C=(S,P)=>{if(S.workspaceLocator){let I=gA(P),R=a.get(I);R||(R=new Set,a.set(I,R)),R.add(S.workspaceLocator)}for(let I of S.children.values())C(I,S.workspaceLocator||P)};for(let S of n.children.values())C(S,n.workspaceLocator);return a},NQt=(t,e)=>{let r=[],s=!1,a=new Map,n=FQt(t),c=t.getPackageInformation(t.topLevel);if(c===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let f=t.findPackageLocator(c.packageLocation);if(f===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=ue.toPortablePath(c.packageLocation.slice(0,-1)),h={name:f.name,identName:f.name,reference:f.reference,peerNames:c.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,C=(P,I)=>`${gA(I)}:${P}`,S=(P,I,R,N,U,W,te,ie)=>{let Ae=C(P,R),ce=E.get(Ae),me=!!ce;!me&&R.name===f.name&&R.reference===f.reference&&(ce=h,E.set(Ae,h));let pe=PY(I,R,t,p);if(!ce){let fe=0;pe?fe=2:I.linkType==="SOFT"&&R.name.endsWith(tg)&&(fe=1),ce={name:P,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:fe===1?new Set:I.packagePeers,dependencyKind:fe},E.set(Ae,ce)}let Be;if(pe?Be=2:U.linkType==="SOFT"?Be=1:Be=0,ce.hoistPriority=Math.max(ce.hoistPriority||0,Be),ie&&!pe){let fe=gA({name:N.identName,reference:N.reference}),se=a.get(fe)||new Set;a.set(fe,se),se.add(ce.name)}let Ce=new Map(I.packageDependencies);if(e.project){let fe=e.project.workspacesByCwd.get(ue.toPortablePath(I.packageLocation.slice(0,-1)));if(fe){let se=new Set([...Array.from(fe.manifest.peerDependencies.values(),X=>q.stringifyIdent(X)),...Array.from(fe.manifest.peerDependenciesMeta.keys())]);for(let X of se)Ce.has(X)||(Ce.set(X,W.get(X)||null),ce.peerNames.add(X))}}let g=gA({name:R.name.replace(tg,""),reference:R.reference}),we=n.get(g);if(we)for(let fe of we)Ce.set(`${fe.name}${tg}`,fe.reference);(I!==U||I.linkType!=="SOFT"||!pe&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(te)))&&N.dependencies.add(ce);let ye=R!==f&&I.linkType==="SOFT"&&!R.name.endsWith(tg)&&!pe;if(!me&&!ye){let fe=new Map;for(let[se,X]of Ce)if(X!==null){let De=t.getLocator(se,X),Re=t.getLocator(se.replace(tg,""),X),dt=t.getPackageInformation(Re);if(dt===null)throw new Error("Assertion failed: Expected the package to have been registered");let j=PY(dt,De,t,p);if(e.validateExternalSoftLinks&&e.project&&j){dt.packageDependencies.size>0&&(s=!0);for(let[Ye,ke]of dt.packageDependencies)if(ke!==null){let it=q.parseLocator(Array.isArray(ke)?`${ke[0]}@${ke[1]}`:`${Ye}@${ke}`);if(gA(it)!==gA(De)){let _e=Ce.get(Ye);if(_e){let x=q.parseLocator(Array.isArray(_e)?`${_e[0]}@${_e[1]}`:`${Ye}@${_e}`);zPe(x,it)||r.push({messageName:71,text:`Cannot link ${q.prettyIdent(e.project.configuration,q.parseIdent(De.name))} into ${q.prettyLocator(e.project.configuration,q.parseLocator(`${R.name}@${R.reference}`))} dependency ${q.prettyLocator(e.project.configuration,it)} conflicts with parent dependency ${q.prettyLocator(e.project.configuration,x)}`})}else{let x=fe.get(Ye);if(x){let w=x.target,b=q.parseLocator(Array.isArray(w)?`${w[0]}@${w[1]}`:`${Ye}@${w}`);zPe(b,it)||r.push({messageName:71,text:`Cannot link ${q.prettyIdent(e.project.configuration,q.parseIdent(De.name))} into ${q.prettyLocator(e.project.configuration,q.parseLocator(`${R.name}@${R.reference}`))} dependency ${q.prettyLocator(e.project.configuration,it)} conflicts with dependency ${q.prettyLocator(e.project.configuration,b)} from sibling portal ${q.prettyIdent(e.project.configuration,q.parseIdent(x.portal.name))}`})}else fe.set(Ye,{target:it.reference,portal:De})}}}}let rt=e.hoistingLimitsByCwd?.get(te),Fe=j?te:K.relative(p,ue.toPortablePath(dt.packageLocation))||vt.dot,Ne=e.hoistingLimitsByCwd?.get(Fe);S(se,dt,De,ce,I,Ce,Fe,rt==="dependencies"||Ne==="dependencies"||Ne==="workspaces")}}};return S(f.name,c,f,h,c,c.packageDependencies,vt.dot,!1),{packageTree:h,hoistingLimits:a,errors:r,preserveSymlinksRequired:s}};function ZPe(t,e,r){let s=r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation;return ue.toPortablePath(s||t.packageLocation)}function OQt(t,e,r){let s=e.getLocator(t.name.replace(tg,""),t.reference),a=e.getPackageInformation(s);if(a===null)throw new Error("Assertion failed: Expected the package to be registered");return r.pnpifyFs?{linkType:"SOFT",target:ue.toPortablePath(a.packageLocation)}:{linkType:a.linkType,target:ZPe(a,t,e)}}var LQt=(t,e,r)=>{let s=new Map,a=(E,C,S)=>{let{linkType:P,target:I}=OQt(E,t,r);return{locator:gA(E),nodePath:C,target:I,linkType:P,aliases:S}},n=E=>{let[C,S]=E.split("/");return S?{scope:C,name:S}:{scope:null,name:C}},c=new Set,f=(E,C,S)=>{if(c.has(E))return;c.add(E);let P=Array.from(E.references).sort().join("#");for(let I of E.dependencies){let R=Array.from(I.references).sort().join("#");if(I.identName===E.identName.replace(tg,"")&&R===P)continue;let N=Array.from(I.references).sort(),U={name:I.identName,reference:N[0]},{name:W,scope:te}=n(I.name),ie=te?[te,W]:[W],Ae=K.join(C,JPe),ce=K.join(Ae,...ie),me=`${S}/${U.name}`,pe=a(U,S,N.slice(1)),Be=!1;if(pe.linkType==="SOFT"&&r.project){let Ce=r.project.workspacesByCwd.get(pe.target.slice(0,-1));Be=!!(Ce&&!Ce.manifest.name)}if(!I.name.endsWith(tg)&&!Be){let Ce=s.get(ce);if(Ce){if(Ce.dirList)throw new Error(`Assertion failed: ${ce} cannot merge dir node with leaf node`);{let ye=q.parseLocator(Ce.locator),fe=q.parseLocator(pe.locator);if(Ce.linkType!==pe.linkType)throw new Error(`Assertion failed: ${ce} cannot merge nodes with different link types ${Ce.nodePath}/${q.stringifyLocator(ye)} and ${S}/${q.stringifyLocator(fe)}`);if(ye.identHash!==fe.identHash)throw new Error(`Assertion failed: ${ce} cannot merge nodes with different idents ${Ce.nodePath}/${q.stringifyLocator(ye)} and ${S}/s${q.stringifyLocator(fe)}`);pe.aliases=[...pe.aliases,...Ce.aliases,q.parseLocator(Ce.locator).reference]}}s.set(ce,pe);let g=ce.split("/"),we=g.indexOf(JPe);for(let ye=g.length-1;we>=0&&ye>we;ye--){let fe=ue.toPortablePath(g.slice(0,ye).join(K.sep)),se=g[ye],X=s.get(fe);if(!X)s.set(fe,{dirList:new Set([se])});else if(X.dirList){if(X.dirList.has(se))break;X.dirList.add(se)}}}f(I,pe.linkType==="SOFT"?pe.target:ce,me)}},p=a({name:e.name,reference:Array.from(e.references)[0]},"",[]),h=p.target;return s.set(h,p),f(e,h,""),s};Ve();Ve();bt();bt();rA();Bc();var KY={};Vt(KY,{PnpInstaller:()=>jm,PnpLinker:()=>ig,UnplugCommand:()=>Sw,default:()=>pTt,getPnpPath:()=>sg,jsInstallUtils:()=>mA,pnpUtils:()=>ZD,quotePathIfNeeded:()=>Nxe});bt();var Fxe=Ie("url");Ve();Ve();bt();bt();var XPe={DEFAULT:{collapsed:!1,next:{"*":"DEFAULT"}},TOP_LEVEL:{collapsed:!1,next:{fallbackExclusionList:"FALLBACK_EXCLUSION_LIST",packageRegistryData:"PACKAGE_REGISTRY_DATA","*":"DEFAULT"}},FALLBACK_EXCLUSION_LIST:{collapsed:!1,next:{"*":"FALLBACK_EXCLUSION_ENTRIES"}},FALLBACK_EXCLUSION_ENTRIES:{collapsed:!0,next:{"*":"FALLBACK_EXCLUSION_DATA"}},FALLBACK_EXCLUSION_DATA:{collapsed:!0,next:{"*":"DEFAULT"}},PACKAGE_REGISTRY_DATA:{collapsed:!1,next:{"*":"PACKAGE_REGISTRY_ENTRIES"}},PACKAGE_REGISTRY_ENTRIES:{collapsed:!0,next:{"*":"PACKAGE_STORE_DATA"}},PACKAGE_STORE_DATA:{collapsed:!1,next:{"*":"PACKAGE_STORE_ENTRIES"}},PACKAGE_STORE_ENTRIES:{collapsed:!0,next:{"*":"PACKAGE_INFORMATION_DATA"}},PACKAGE_INFORMATION_DATA:{collapsed:!1,next:{packageDependencies:"PACKAGE_DEPENDENCIES","*":"DEFAULT"}},PACKAGE_DEPENDENCIES:{collapsed:!1,next:{"*":"PACKAGE_DEPENDENCY"}},PACKAGE_DEPENDENCY:{collapsed:!0,next:{"*":"DEFAULT"}}};function MQt(t,e,r){let s="";s+="[";for(let a=0,n=t.length;a"u"||(f!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=iN(p,h,e,r).replace(/^ +/g,""),f+=1)}return a+="}",a}function HQt(t,e,r){let s=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{ -`;let c=0;for(let f=0,p=s.length;f"u"||(c!==0&&(n+=",",n+=` -`),n+=a,n+=JSON.stringify(h),n+=": ",n+=iN(h,E,e,a).replace(/^ +/g,""),c+=1)}return c!==0&&(n+=` -`),n+=r,n+="}",n}function iN(t,e,r,s){let{next:a}=XPe[r],n=a[t]||a["*"];return $Pe(e,n,s)}function $Pe(t,e,r){let{collapsed:s}=XPe[e];return Array.isArray(t)?s?MQt(t,e,r):_Qt(t,e,r):typeof t=="object"&&t!==null?s?UQt(t,e,r):HQt(t,e,r):JSON.stringify(t)}function exe(t){return $Pe(t,"TOP_LEVEL","")}function HD(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function jQt(t){let e=new Map,r=HD(t.fallbackExclusionList||[],[({name:s,reference:a})=>s,({name:s,reference:a})=>a]);for(let{name:s,reference:a}of r){let n=e.get(s);typeof n>"u"&&e.set(s,n=new Set),n.add(a)}return Array.from(e).map(([s,a])=>[s,Array.from(a)])}function qQt(t){return HD(t.fallbackPool||[],([e])=>e)}function GQt(t){let e=[],r=t.dependencyTreeRoots.find(s=>t.packageRegistry.get(s.name)?.get(s.reference)?.packageLocation==="./");for(let[s,a]of HD(t.packageRegistry,([n])=>n===null?"0":`1${n}`)){if(s===null)continue;let n=[];e.push([s,n]);for(let[c,{packageLocation:f,packageDependencies:p,packagePeers:h,linkType:E,discardFromLookup:C}]of HD(a,([S])=>S===null?"0":`1${S}`)){if(c===null)continue;let S=[];s!==null&&c!==null&&!p.has(s)&&S.push([s,c]);for(let[U,W]of p)S.push([U,W]);let P=HD(S,([U])=>U),I=h&&h.size>0?Array.from(h):void 0,N={packageLocation:f,packageDependencies:P,packagePeers:I,linkType:E,discardFromLookup:C||void 0};n.push([c,N]),r&&s===r.name&&c===r.reference&&e.unshift([null,[[null,N]]])}}return e}function jD(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,pnpZipBackend:t.pnpZipBackend,fallbackExclusionList:jQt(t),fallbackPool:qQt(t),packageRegistryData:GQt(t)}}var nxe=et(rxe());function ixe(t,e){return[t?`${t} -`:"",`/* eslint-disable */ -`,`// @ts-nocheck -`,`"use strict"; -`,` -`,e,` -`,(0,nxe.default)()].join("")}function WQt(t){return JSON.stringify(t,null,2)}function YQt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\ -`)}'`}function VQt(t){return[`const RAW_RUNTIME_STATE = -`,`${YQt(exe(t))}; - -`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) { -`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname}); -`,`} -`].join("")}function KQt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) { -`,` const fs = require('fs'); -`,` const path = require('path'); -`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(Er.pnpData)}); -`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname}); -`,`} -`].join("")}function sxe(t){let e=jD(t),r=VQt(e);return ixe(t.shebang,r)}function oxe(t){let e=jD(t),r=KQt(),s=ixe(t.shebang,r);return{dataFile:WQt(e),loaderFile:s}}bt();function QY(t,{basePath:e}){let r=ue.toPortablePath(e),s=K.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,c=new Map(t.packageRegistryData.map(([C,S])=>[C,new Map(S.map(([P,I])=>{if(C===null!=(P===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let R=I.discardFromLookup??!1,N={name:C,reference:P},U=n.get(I.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&R,R||(U.locator=N)):n.set(I.packageLocation,{locator:N,discardFromLookup:R});let W=null;return[P,{packageDependencies:new Map(I.packageDependencies),packagePeers:new Set(I.packagePeers),linkType:I.linkType,discardFromLookup:R,get packageLocation(){return W||(W=K.join(s,I.packageLocation))}}]}))])),f=new Map(t.fallbackExclusionList.map(([C,S])=>[C,new Set(S)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:f,pnpZipBackend:t.pnpZipBackend,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:c}}bt();bt();var ah=Ie("module"),Hm=Ie("url"),HY=Ie("util");var ra=Ie("url");var uxe=et(Ie("assert"));var TY=Array.isArray,qD=JSON.stringify,GD=Object.getOwnPropertyNames,Um=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),RY=(t,e)=>RegExp.prototype.exec.call(t,e),FY=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),rg=(t,...e)=>String.prototype.endsWith.apply(t,e),NY=(t,...e)=>String.prototype.includes.apply(t,e),OY=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),WD=(t,...e)=>String.prototype.indexOf.apply(t,e),axe=(t,...e)=>String.prototype.replace.apply(t,e),ng=(t,...e)=>String.prototype.slice.apply(t,e),dA=(t,...e)=>String.prototype.startsWith.apply(t,e),lxe=Map,cxe=JSON.parse;function YD(t,e,r){return class extends r{constructor(...s){super(e(...s)),this.code=t,this.name=`${r.name} [${t}]`}}}var fxe=YD("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,r)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${r}`,TypeError),LY=YD("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),Axe=YD("ERR_INVALID_PACKAGE_TARGET",(t,e,r,s=!1,a=void 0)=>{let n=typeof r=="string"&&!s&&r.length&&!dA(r,"./");return e==="."?((0,uxe.default)(s===!1),`Invalid "exports" main target ${qD(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${qD(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),VD=YD("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error),pxe=YD("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,r=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${r?` imported from ${r}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${r?` imported from ${r}`:""}`,Error);var oN=Ie("url");function hxe(t,e){let r=Object.create(null);for(let s=0;se):t+e}KD(r,t,s,c,a)}RY(dxe,ng(t,2))!==null&&KD(r,t,s,c,a);let p=new URL(t,s),h=p.pathname,E=new URL(".",s).pathname;if(dA(h,E)||KD(r,t,s,c,a),e==="")return p;if(RY(dxe,e)!==null){let C=n?axe(r,"*",()=>e):r+e;ZQt(C,s,c,a)}return n?new URL(FY(mxe,p.href,()=>e)):new URL(e,p)}function $Qt(t){let e=+t;return`${e}`!==t?!1:e>=0&&e<4294967295}function vw(t,e,r,s,a,n,c,f){if(typeof e=="string")return XQt(e,r,s,t,a,n,c,f);if(TY(e)){if(e.length===0)return null;let p;for(let h=0;hn?-1:n>a||r===-1?1:s===-1||t.length>e.length?-1:e.length>t.length?1:0}function eTt(t,e,r){if(typeof t=="string"||TY(t))return!0;if(typeof t!="object"||t===null)return!1;let s=GD(t),a=!1,n=0;for(let c=0;c=h.length&&rg(e,C)&&Exe(n,h)===1&&OY(h,"*")===E&&(n=h,c=ng(e,E,e.length-C.length))}}if(n){let p=r[n],h=vw(t,p,c,n,s,!0,!1,a);return h==null&&MY(e,t,s),h}MY(e,t,s)}function Cxe({name:t,base:e,conditions:r,readFileSyncFn:s}){if(t==="#"||dA(t,"#/")||rg(t,"/")){let c="is not a valid internal imports specifier name";throw new LY(t,c,(0,ra.fileURLToPath)(e))}let a,n=gxe(e,s);if(n.exists){a=(0,ra.pathToFileURL)(n.pjsonPath);let c=n.imports;if(c)if(Um(c,t)&&!NY(t,"*")){let f=vw(a,c[t],"",t,e,!1,!0,r);if(f!=null)return f}else{let f="",p,h=GD(c);for(let E=0;E=C.length&&rg(t,P)&&Exe(f,C)===1&&OY(C,"*")===S&&(f=C,p=ng(t,S,t.length-P.length))}}if(f){let E=c[f],C=vw(a,E,p,f,e,!0,!0,r);if(C!=null)return C}}}zQt(t,a,e)}bt();var rTt=new Set(["BUILTIN_NODE_RESOLUTION_FAILED","MISSING_DEPENDENCY","MISSING_PEER_DEPENDENCY","QUALIFIED_PATH_RESOLUTION_FAILED","UNDECLARED_DEPENDENCY"]);function ms(t,e,r={},s){s??=rTt.has(t)?"MODULE_NOT_FOUND":t;let a={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:{...a,value:s},pnpCode:{...a,value:t},data:{...a,value:r}})}function cf(t){return ue.normalize(ue.fromPortablePath(t))}var Sxe=et(Bxe());function Dxe(t){return nTt(),UY[t]}var UY;function nTt(){UY||(UY={"--conditions":[],...vxe(iTt()),...vxe(process.execArgv)})}function vxe(t){return(0,Sxe.default)({"--conditions":[String],"-C":"--conditions"},{argv:t,permissive:!0})}function iTt(){let t=[],e=sTt(process.env.NODE_OPTIONS||"",t);return t.length,e}function sTt(t,e){let r=[],s=!1,a=!0;for(let n=0;nparseInt(t,10)),bxe=yl>19||yl===19&&oh>=2||yl===18&&oh>=13,pdr=yl===20&&oh<6||yl===19&&oh>=3,hdr=yl>19||yl===19&&oh>=6,gdr=yl>=21||yl===20&&oh>=10||yl===18&&oh>=19,ddr=yl>=21||yl===20&&oh>=10||yl===18&&oh>=20,mdr=yl>=22;function Pxe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>ue.fromPortablePath(Ao.resolveVirtual(ue.toPortablePath(e)))),bxe)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function jY(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,c=/\/$/,f=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Fe of["react-scripts","gatsby"]){let Ne=t.packageRegistry.get(Fe);if(Ne)for(let Pe of Ne.keys()){if(Pe===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Fe,reference:Pe})}}let{ignorePattern:C,packageRegistry:S,packageLocatorsByLocations:P}=t;function I(Fe,Ne){return{fn:Fe,args:Ne,error:null,result:null}}function R(Fe){let Ne=process.stderr?.hasColors?.()??process.stdout.isTTY,Pe=(it,_e)=>`\x1B[${it}m${_e}\x1B[0m`,Ye=Fe.error;console.error(Ye?Pe("31;1",`\u2716 ${Fe.error?.message.replace(/\n.*/s,"")}`):Pe("33;1","\u203C Resolution")),Fe.args.length>0&&console.error();for(let it of Fe.args)console.error(` ${Pe("37;1","In \u2190")} ${(0,HY.inspect)(it,{colors:Ne,compact:!0})}`);Fe.result&&(console.error(),console.error(` ${Pe("37;1","Out \u2192")} ${(0,HY.inspect)(Fe.result,{colors:Ne,compact:!0})}`));let ke=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(ke.length>0){console.error();for(let it of ke)console.error(` ${Pe("38;5;244",it)}`)}console.error()}function N(Fe,Ne){if(e.allowDebug===!1)return Ne;if(Number.isFinite(s)){if(s>=2)return(...Pe)=>{let Ye=I(Fe,Pe);try{return Ye.result=Ne(...Pe)}catch(ke){throw Ye.error=ke}finally{R(Ye)}};if(s>=1)return(...Pe)=>{try{return Ne(...Pe)}catch(Ye){let ke=I(Fe,Pe);throw ke.error=Ye,R(ke),Ye}}}return Ne}function U(Fe){let Ne=g(Fe);if(!Ne)throw ms("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Ne}function W(Fe){if(Fe.name===null)return!0;for(let Ne of t.dependencyTreeRoots)if(Ne.name===Fe.name&&Ne.reference===Fe.reference)return!0;return!1}let te=new Set(["node","require",...Dxe("--conditions")]);function ie(Fe,Ne=te,Pe){let Ye=fe(K.join(Fe,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ye===null)throw ms("INTERNAL",`The locator that owns the "${Fe}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:ke}=U(Ye),it=K.join(ke,Er.manifest);if(!e.fakeFs.existsSync(it))return null;let _e=JSON.parse(e.fakeFs.readFileSync(it,"utf8"));if(_e.exports==null)return null;let x=K.contains(ke,Fe);if(x===null)throw ms("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");x!=="."&&!f.test(x)&&(x=`./${x}`);try{let w=Ixe({packageJSONUrl:(0,Hm.pathToFileURL)(ue.fromPortablePath(it)),packageSubpath:x,exports:_e.exports,base:Pe?(0,Hm.pathToFileURL)(ue.fromPortablePath(Pe)):null,conditions:Ne});return ue.toPortablePath((0,Hm.fileURLToPath)(w))}catch(w){throw ms("EXPORTS_RESOLUTION_FAILED",w.message,{unqualifiedPath:cf(Fe),locator:Ye,pkgJson:_e,subpath:cf(x),conditions:Ne},w.code)}}function Ae(Fe,Ne,{extensions:Pe}){let Ye;try{Ne.push(Fe),Ye=e.fakeFs.statSync(Fe)}catch{}if(Ye&&!Ye.isDirectory())return e.fakeFs.realpathSync(Fe);if(Ye&&Ye.isDirectory()){let ke;try{ke=JSON.parse(e.fakeFs.readFileSync(K.join(Fe,Er.manifest),"utf8"))}catch{}let it;if(ke&&ke.main&&(it=K.resolve(Fe,ke.main)),it&&it!==Fe){let _e=Ae(it,Ne,{extensions:Pe});if(_e!==null)return _e}}for(let ke=0,it=Pe.length;ke{let x=JSON.stringify(_e.name);if(Ye.has(x))return;Ye.add(x);let w=we(_e);for(let b of w)if(U(b).packagePeers.has(Fe))ke(b);else{let F=Pe.get(b.name);typeof F>"u"&&Pe.set(b.name,F=new Set),F.add(b.reference)}};ke(Ne);let it=[];for(let _e of[...Pe.keys()].sort())for(let x of[...Pe.get(_e)].sort())it.push({name:_e,reference:x});return it}function fe(Fe,{resolveIgnored:Ne=!1,includeDiscardFromLookup:Pe=!1}={}){if(pe(Fe)&&!Ne)return null;let Ye=K.relative(t.basePath,Fe);Ye.match(n)||(Ye=`./${Ye}`),Ye.endsWith("/")||(Ye=`${Ye}/`);do{let ke=P.get(Ye);if(typeof ke>"u"||ke.discardFromLookup&&!Pe){Ye=Ye.substring(0,Ye.lastIndexOf("/",Ye.length-2)+1);continue}return ke.locator}while(Ye!=="");return null}function se(Fe){try{return e.fakeFs.readFileSync(ue.toPortablePath(Fe),"utf8")}catch(Ne){if(Ne.code==="ENOENT")return;throw Ne}}function X(Fe,Ne,{considerBuiltins:Pe=!0}={}){if(Fe.startsWith("#"))throw new Error("resolveToUnqualified can not handle private import mappings");if(Fe==="pnpapi")return ue.toPortablePath(e.pnpapiResolution);if(Pe&&(0,ah.isBuiltin)(Fe))return null;let Ye=cf(Fe),ke=Ne&&cf(Ne);if(Ne&&pe(Ne)&&(!K.isAbsolute(Fe)||fe(Fe)===null)){let x=me(Fe,Ne);if(x===!1)throw ms("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) - -Require request: "${Ye}" -Required by: ${ke} -`,{request:Ye,issuer:ke});return ue.toPortablePath(x)}let it,_e=Fe.match(a);if(_e){if(!Ne)throw ms("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:ke});let[,x,w]=_e,b=fe(Ne);if(!b){let Te=me(Fe,Ne);if(Te===!1)throw ms("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). - -Require path: "${Ye}" -Required by: ${ke} -`,{request:Ye,issuer:ke});return ue.toPortablePath(Te)}let F=U(b).packageDependencies.get(x),z=null;if(F==null&&b.name!==null){let Te=t.fallbackExclusionList.get(b.name);if(!Te||!Te.has(b.reference)){for(let It=0,qt=h.length;ItW(lt))?Z=ms("MISSING_PEER_DEPENDENCY",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. - -Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} -Required by: ${b.name}@${b.reference} (via ${ke}) -${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference} -`).join("")} -`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te}):Z=ms("MISSING_PEER_DEPENDENCY",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. - -Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} -Required by: ${b.name}@${b.reference} (via ${ke}) - -${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference} -`).join("")} -`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te})}else F===void 0&&(!Pe&&(0,ah.isBuiltin)(Fe)?W(b)?Z=ms("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. - -Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} -Required by: ${ke} -`,{request:Ye,issuer:ke,dependencyName:x}):Z=ms("UNDECLARED_DEPENDENCY",`${b.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${b.name}'s dependencies, this makes the require call ambiguous and unsound. - -Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} -Required by: ${ke} -`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}):W(b)?Z=ms("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. - -Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} -Required by: ${ke} -`,{request:Ye,issuer:ke,dependencyName:x}):Z=ms("UNDECLARED_DEPENDENCY",`${b.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. - -Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} -Required by: ${b.name}@${b.reference} (via ${ke}) -`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}));if(F==null){if(z===null||Z===null)throw Z||new Error("Assertion failed: Expected an error to have been set");F=z;let Te=Z.message.replace(/\n.*/g,"");Z.message=Te,!E.has(Te)&&s!==0&&(E.add(Te),process.emitWarning(Z))}let $=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:x,reference:F},oe=U($);if(!oe.packageLocation)throw ms("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. - -Required package: ${$.name}@${$.reference}${$.name!==Ye?` (via "${Ye}")`:""} -Required by: ${b.name}@${b.reference} (via ${ke}) -`,{request:Ye,issuer:ke,dependencyLocator:Object.assign({},$)});let xe=oe.packageLocation;w?it=K.join(xe,w):it=xe}else if(K.isAbsolute(Fe))it=K.normalize(Fe);else{if(!Ne)throw ms("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:ke});let x=K.resolve(Ne);Ne.match(c)?it=K.normalize(K.join(x,Fe)):it=K.normalize(K.join(K.dirname(x),Fe))}return K.normalize(it)}function De(Fe,Ne,Pe=te,Ye){if(n.test(Fe))return Ne;let ke=ie(Ne,Pe,Ye);return ke?K.normalize(ke):Ne}function Re(Fe,{extensions:Ne=Object.keys(ah.Module._extensions)}={}){let Pe=[],Ye=Ae(Fe,Pe,{extensions:Ne});if(Ye)return K.normalize(Ye);{Pxe(Pe.map(_e=>ue.fromPortablePath(_e)));let ke=cf(Fe),it=fe(Fe);if(it){let{packageLocation:_e}=U(it),x=!0;try{e.fakeFs.accessSync(_e)}catch(w){if(w?.code==="ENOENT")x=!1;else{let b=(w?.message??w??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw ms("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${b}). - -Missing package: ${it.name}@${it.reference} -Expected package location: ${cf(_e)} -`,{unqualifiedPath:ke,extensions:Ne})}}if(!x){let w=_e.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw ms("QUALIFIED_PATH_RESOLUTION_FAILED",`${w} - -Missing package: ${it.name}@${it.reference} -Expected package location: ${cf(_e)} -`,{unqualifiedPath:ke,extensions:Ne})}}throw ms("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed. - -Source path: ${ke} -${Pe.map(_e=>`Not found: ${cf(_e)} -`).join("")}`,{unqualifiedPath:ke,extensions:Ne})}}function dt(Fe,Ne,Pe){if(!Ne)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let Ye=Cxe({name:Fe,base:(0,Hm.pathToFileURL)(ue.fromPortablePath(Ne)),conditions:Pe.conditions??te,readFileSyncFn:se});if(Ye instanceof URL)return Re(ue.toPortablePath((0,Hm.fileURLToPath)(Ye)),{extensions:Pe.extensions});if(Ye.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return j(Ye,Ne,Pe)}function j(Fe,Ne,Pe={}){try{if(Fe.startsWith("#"))return dt(Fe,Ne,Pe);let{considerBuiltins:Ye,extensions:ke,conditions:it}=Pe,_e=X(Fe,Ne,{considerBuiltins:Ye});if(Fe==="pnpapi")return _e;if(_e===null)return null;let x=()=>Ne!==null?pe(Ne):!1,w=(!Ye||!(0,ah.isBuiltin)(Fe))&&!x()?De(Fe,_e,it,Ne):_e;return Re(w,{extensions:ke})}catch(Ye){throw Object.hasOwn(Ye,"pnpCode")&&Object.assign(Ye.data,{request:cf(Fe),issuer:Ne&&cf(Ne)}),Ye}}function rt(Fe){let Ne=K.normalize(Fe),Pe=Ao.resolveVirtual(Ne);return Pe!==Ne?Pe:null}return{VERSIONS:Be,topLevel:Ce,getLocator:(Fe,Ne)=>Array.isArray(Ne)?{name:Ne[0],reference:Ne[1]}:{name:Fe,reference:Ne},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Fe=[];for(let[Ne,Pe]of S)for(let Ye of Pe.keys())Ne!==null&&Ye!==null&&Fe.push({name:Ne,reference:Ye});return Fe},getPackageInformation:Fe=>{let Ne=g(Fe);if(Ne===null)return null;let Pe=ue.fromPortablePath(Ne.packageLocation);return{...Ne,packageLocation:Pe}},findPackageLocator:Fe=>fe(ue.toPortablePath(Fe)),resolveToUnqualified:N("resolveToUnqualified",(Fe,Ne,Pe)=>{let Ye=Ne!==null?ue.toPortablePath(Ne):null,ke=X(ue.toPortablePath(Fe),Ye,Pe);return ke===null?null:ue.fromPortablePath(ke)}),resolveUnqualified:N("resolveUnqualified",(Fe,Ne)=>ue.fromPortablePath(Re(ue.toPortablePath(Fe),Ne))),resolveRequest:N("resolveRequest",(Fe,Ne,Pe)=>{let Ye=Ne!==null?ue.toPortablePath(Ne):null,ke=j(ue.toPortablePath(Fe),Ye,Pe);return ke===null?null:ue.fromPortablePath(ke)}),resolveVirtual:N("resolveVirtual",Fe=>{let Ne=rt(ue.toPortablePath(Fe));return Ne!==null?ue.fromPortablePath(Ne):null})}}bt();var xxe=(t,e,r)=>{let s=jD(t),a=QY(s,{basePath:e}),n=ue.join(e,Er.pnpCjs);return jY(a,{fakeFs:r,pnpapiResolution:n})};var GY=et(Qxe());Wt();var mA={};Vt(mA,{checkManifestCompatibility:()=>Txe,extractBuildRequest:()=>aN,getExtractHint:()=>WY,hasBindingGyp:()=>YY});Ve();bt();function Txe(t){return q.isPackageCompatible(t,ps.getArchitectureSet())}function aN(t,e,r,{configuration:s}){let a=[];for(let n of["preinstall","install","postinstall"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:t.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${q.prettyLocator(s,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${q.prettyLocator(s,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!s.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${q.prettyLocator(s,t)} lists build scripts, but all build scripts have been disabled.`)}:Txe(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${q.prettyLocator(s,t)} The ${ps.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var aTt=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function WY(t){return t.packageFs.getExtractHint({relevantExtensions:aTt})}function YY(t){let e=K.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var ZD={};Vt(ZD,{getUnpluggedPath:()=>zD});Ve();bt();function zD(t,{configuration:e}){return K.resolve(e.get("pnpUnpluggedFolder"),q.slugifyLocator(t))}var lTt=new Set([q.makeIdent(null,"open").identHash,q.makeIdent(null,"opn").identHash]),ig=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let s=sg(r.project).cjs;if(!le.existsSync(s))throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})),n={name:q.stringifyIdent(e),reference:e.reference},c=a.getPackageInformation(n);if(!c)throw new nt(`Couldn't find ${q.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return ue.toPortablePath(c.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=sg(r.project).cjs;if(!le.existsSync(s))return null;let n=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})).findPackageLocator(ue.fromPortablePath(e));return n?q.makeLocator(q.parseIdent(n.name),n.reference):null}makeInstaller(e){return new jm(e)}isEnabled(e){return!(e.project.configuration.get("nodeLinker")!=="pnp"||e.project.configuration.get("pnpMode")!==this.mode)}},jm=class{constructor(e){this.opts=e;this.mode="strict";this.asyncActions=new je.AsyncActions(10);this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=e}attachCustomData(e){this.customData=e}async installPackage(e,r,s){let a=q.stringifyIdent(e),n=e.reference,c=!!this.opts.project.tryWorkspaceByLocator(e),f=q.isVirtualLocator(e),p=e.peerDependencies.size>0&&!f,h=!p&&!c,E=!p&&e.linkType!=="SOFT",C,S;if(h||E){let te=f?q.devirtualizeLocator(e):e;C=this.customData.store.get(te.locatorHash),typeof C>"u"&&(C=await cTt(r),e.linkType==="HARD"&&this.customData.store.set(te.locatorHash,C)),C.manifest.type==="module"&&(this.isESMLoaderRequired=!0),S=this.opts.project.getDependencyMeta(te,e.version)}let P=h?aN(e,C,S,{configuration:this.opts.project.configuration}):null,I=E?await this.unplugPackageIfNeeded(e,C,r,S,s):r.packageFs;if(K.isAbsolute(r.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${r.prefixPath}) to be relative to the parent`);let R=K.resolve(I.getRealPath(),r.prefixPath),N=VY(this.opts.project.cwd,R),U=new Map,W=new Set;if(f){for(let te of e.peerDependencies.values())U.set(q.stringifyIdent(te),null),W.add(q.stringifyIdent(te));if(!c){let te=q.devirtualizeLocator(e);this.virtualTemplates.set(te.locatorHash,{location:VY(this.opts.project.cwd,Ao.resolveVirtual(R)),locator:te})}}return je.getMapWithDefault(this.packageRegistry,a).set(n,{packageLocation:N,packageDependencies:U,packagePeers:W,linkType:e.linkType,discardFromLookup:r.discardFromLookup||!1}),{packageLocation:R,buildRequest:P}}async attachInternalDependencies(e,r){let s=this.getPackageInformation(e);for(let[a,n]of r){let c=q.areIdentsEqual(a,n)?n.reference:[q.stringifyIdent(n),n.reference];s.packageDependencies.set(q.stringifyIdent(a),c)}}async attachExternalDependents(e,r){for(let s of r)this.getDiskInformation(s).packageDependencies.set(q.stringifyIdent(e),e.reference)}async finalizeInstall(){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;let e=sg(this.opts.project);if(this.isEsmEnabled()||await le.removePromise(e.esmLoader),this.opts.project.configuration.get("nodeLinker")!=="pnp"){await le.removePromise(e.cjs),await le.removePromise(e.data),await le.removePromise(e.esmLoader),await le.removePromise(this.opts.project.configuration.get("pnpUnpluggedFolder"));return}for(let{locator:C,location:S}of this.virtualTemplates.values())je.getMapWithDefault(this.packageRegistry,q.stringifyIdent(C)).set(C.reference,{packageLocation:S,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1});let r=this.opts.project.configuration.get("pnpFallbackMode"),s=this.opts.project.workspaces.map(({anchoredLocator:C})=>({name:q.stringifyIdent(C),reference:C.reference})),a=r!=="none",n=[],c=new Map,f=je.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),p=this.packageRegistry,h=this.opts.project.configuration.get("pnpShebang"),E=this.opts.project.configuration.get("pnpZipBackend");if(r==="dependencies-only")for(let C of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(C)&&n.push({name:q.stringifyIdent(C),reference:C.reference});return await this.asyncActions.wait(),await this.finalizeInstallWithPnp({dependencyTreeRoots:s,enableTopLevelFallback:a,fallbackExclusionList:n,fallbackPool:c,ignorePattern:f,pnpZipBackend:E,packageRegistry:p,shebang:h}),{customData:this.customData}}async transformPnpSettings(e){}isEsmEnabled(){if(this.opts.project.configuration.sources.has("pnpEnableEsmLoader"))return this.opts.project.configuration.get("pnpEnableEsmLoader");if(this.isESMLoaderRequired)return!0;for(let e of this.opts.project.workspaces)if(e.manifest.type==="module")return!0;return!1}async finalizeInstallWithPnp(e){let r=sg(this.opts.project),s=await this.locateNodeModules(e.ignorePattern);if(s.length>0){this.opts.report.reportWarning(31,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(let n of s)await le.removePromise(n)}if(await this.transformPnpSettings(e),this.opts.project.configuration.get("pnpEnableInlining")){let n=sxe(e);await le.changeFilePromise(r.cjs,n,{automaticNewlines:!0,mode:493}),await le.removePromise(r.data)}else{let{dataFile:n,loaderFile:c}=oxe(e);await le.changeFilePromise(r.cjs,c,{automaticNewlines:!0,mode:493}),await le.changeFilePromise(r.data,n,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(0,"ESM support for PnP uses the experimental loader API and is therefore experimental"),await le.changeFilePromise(r.esmLoader,(0,GY.default)(),{automaticNewlines:!0,mode:420}));let a=this.opts.project.configuration.get("pnpUnpluggedFolder");if(this.unpluggedPaths.size===0)await le.removePromise(a);else for(let n of await le.readdirPromise(a)){let c=K.resolve(a,n);this.unpluggedPaths.has(c)||await le.removePromise(c)}}async locateNodeModules(e){let r=[],s=e?new RegExp(e):null;for(let a of this.opts.project.workspaces){let n=K.join(a.cwd,"node_modules");if(s&&s.test(K.relative(this.opts.project.cwd,a.cwd))||!le.existsSync(n))continue;let c=await le.readdirPromise(n,{withFileTypes:!0}),f=c.filter(p=>!p.isDirectory()||p.name===".bin"||!p.name.startsWith("."));if(f.length===c.length)r.push(n);else for(let p of f)r.push(K.join(n,p.name))}return r}async unplugPackageIfNeeded(e,r,s,a,n){return this.shouldBeUnplugged(e,r,a)?this.unplugPackage(e,s,n):s.packageFs}shouldBeUnplugged(e,r,s){return typeof s.unplugged<"u"?s.unplugged:lTt.has(e.identHash)||e.conditions!=null?!0:r.manifest.preferUnplugged!==null?r.manifest.preferUnplugged:!!(aN(e,r,s,{configuration:this.opts.project.configuration})?.skipped===!1||r.misc.extractHint)}async unplugPackage(e,r,s){let a=zD(e,{configuration:this.opts.project.configuration});return this.opts.project.disabledLocators.has(e.locatorHash)?new Hf(a,{baseFs:r.packageFs,pathUtils:K}):(this.unpluggedPaths.add(a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{let n=K.join(a,r.prefixPath,".ready");await le.existsPromise(n)||(this.opts.project.storedBuildState.delete(e.locatorHash),await le.mkdirPromise(a,{recursive:!0}),await le.copyPromise(a,vt.dot,{baseFs:r.packageFs,overwrite:!1}),await le.writeFilePromise(n,""))})),new Sn(a))}getPackageInformation(e){let r=q.stringifyIdent(e),s=e.reference,a=this.packageRegistry.get(r);if(!a)throw new Error(`Assertion failed: The package information store should have been available (for ${q.prettyIdent(this.opts.project.configuration,e)})`);let n=a.get(s);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${q.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){let r=je.getMapWithDefault(this.packageRegistry,"@@disk"),s=VY(this.opts.project.cwd,e);return je.getFactoryWithDefault(r,s,()=>({packageLocation:s,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1}))}};function VY(t,e){let r=K.relative(t,e);return r.match(/^\.{0,2}\//)||(r=`./${r}`),r.replace(/\/?$/,"/")}async function cTt(t){let e=await Ht.tryFind(t.prefixPath,{baseFs:t.packageFs})??new Ht,r=new Set(["preinstall","install","postinstall"]);for(let s of e.scripts.keys())r.has(s)||e.scripts.delete(s);return{manifest:{scripts:e.scripts,preferUnplugged:e.preferUnplugged,type:e.type},misc:{extractHint:WY(t),hasBindingGyp:YY(t)}}}Ve();Ve();Wt();var Rxe=et(Sa());var Sw=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unplug direct dependencies from the entire project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Unplug both direct and transitive dependencies"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}static{this.paths=[["unplug"]]}static{this.usage=ot.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);if(r.get("nodeLinker")!=="pnp")throw new nt("This command can only be used if the `nodeLinker` option is set to `pnp`");await s.restoreInstallState();let c=new Set(this.patterns),f=this.patterns.map(P=>{let I=q.parseDescriptor(P),R=I.range!=="unknown"?I:q.makeDescriptor(I,"*");if(!Or.validRange(R.range))throw new nt(`The range of the descriptor patterns must be a valid semver range (${q.prettyDescriptor(r,R)})`);return N=>{let U=q.stringifyIdent(N);return!Rxe.default.isMatch(U,q.stringifyIdent(R))||N.version&&!Or.satisfiesWithPrereleases(N.version,R.range)?!1:(c.delete(P),!0)}}),p=()=>{let P=[];for(let I of s.storedPackages.values())!s.tryWorkspaceByLocator(I)&&!q.isVirtualLocator(I)&&f.some(R=>R(I))&&P.push(I);return P},h=P=>{let I=new Set,R=[],N=(U,W)=>{if(I.has(U.locatorHash))return;let te=!!s.tryWorkspaceByLocator(U);if(!(W>0&&!this.recursive&&te)&&(I.add(U.locatorHash),!s.tryWorkspaceByLocator(U)&&f.some(ie=>ie(U))&&R.push(U),!(W>0&&!this.recursive)))for(let ie of U.dependencies.values()){let Ae=s.storedResolutions.get(ie.descriptorHash);if(!Ae)throw new Error("Assertion failed: The resolution should have been registered");let ce=s.storedPackages.get(Ae);if(!ce)throw new Error("Assertion failed: The package should have been registered");N(ce,W+1)}};for(let U of P)N(U.anchoredPackage,0);return R},E,C;if(this.all&&this.recursive?(E=p(),C="the project"):this.all?(E=h(s.workspaces),C="any workspace"):(E=h([a]),C="this workspace"),c.size>1)throw new nt(`Patterns ${he.prettyList(r,c,he.Type.CODE)} don't match any packages referenced by ${C}`);if(c.size>0)throw new nt(`Pattern ${he.prettyList(r,c,he.Type.CODE)} doesn't match any packages referenced by ${C}`);E=je.sortMap(E,P=>q.stringifyLocator(P));let S=await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async P=>{for(let I of E){let R=I.version??"unknown",N=s.topLevelWorkspace.manifest.ensureDependencyMeta(q.makeDescriptor(I,R));N.unplugged=!0,P.reportInfo(0,`Will unpack ${q.prettyLocator(r,I)} to ${he.pretty(r,zD(I,{configuration:r}),he.Type.PATH)}`),P.reportJson({locator:q.stringifyLocator(I),version:R})}await s.topLevelWorkspace.persistManifest(),this.json||P.reportSeparator()});return S.hasErrors()?S.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};var sg=t=>({cjs:K.join(t.cwd,Er.pnpCjs),data:K.join(t.cwd,Er.pnpData),esmLoader:K.join(t.cwd,Er.pnpEsmLoader)}),Nxe=t=>/\s/.test(t)?JSON.stringify(t):t;async function uTt(t,e,r){let s=/\s*--require\s+\S*\.pnp\.c?js\s*/g,a=/\s*--experimental-loader\s+\S*\.pnp\.loader\.mjs\s*/,n=(e.NODE_OPTIONS??"").replace(s," ").replace(a," ").trim();if(t.configuration.get("nodeLinker")!=="pnp"){e.NODE_OPTIONS=n||void 0;return}let c=sg(t),f=`--require ${Nxe(ue.fromPortablePath(c.cjs))}`;le.existsSync(c.esmLoader)&&(f=`${f} --experimental-loader ${(0,Fxe.pathToFileURL)(ue.fromPortablePath(c.esmLoader)).href}`),le.existsSync(c.cjs)&&(e.NODE_OPTIONS=n?`${f} ${n}`:f)}async function fTt(t,e){let r=sg(t);e(r.cjs),e(r.data),e(r.esmLoader),e(t.configuration.get("pnpUnpluggedFolder"))}var ATt={hooks:{populateYarnPaths:fTt,setupScriptEnvironment:uTt},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "pnpm", or "node-modules"',type:"STRING",default:"pnp"},minizip:{description:"Whether Yarn should use minizip to extract archives",type:"BOOLEAN",default:!1},winLinkType:{description:"Whether Yarn should use Windows Junctions or symlinks when creating links on Windows.",type:"STRING",values:["junctions","symlinks"],default:"junctions"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:"STRING",default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:"STRING",default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:"STRING",default:[],isArray:!0},pnpZipBackend:{description:"Whether to use the experimental js implementation for the ZipFS",type:"STRING",values:["libzip","js"],default:"libzip"},pnpEnableEsmLoader:{description:"If true, Yarn will generate an ESM loader (`.pnp.loader.mjs`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.",type:"BOOLEAN",default:!1},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:"BOOLEAN",default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:"STRING",default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:"ABSOLUTE_PATH",default:"./.yarn/unplugged"}},linkers:[ig],commands:[Sw]},pTt=ATt;var qxe=et(Uxe());Wt();var tV=et(Ie("crypto")),Gxe=et(Ie("fs")),Wxe=1,Ri="node_modules",lN=".bin",Yxe=".yarn-state.yml",kTt=1e3,rV=(s=>(s.CLASSIC="classic",s.HARDLINKS_LOCAL="hardlinks-local",s.HARDLINKS_GLOBAL="hardlinks-global",s))(rV||{}),XD=class{constructor(){this.installStateCache=new Map}getCustomDataKey(){return JSON.stringify({name:"NodeModulesLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the node-modules linker to be enabled");let s=r.project.tryWorkspaceByLocator(e);if(s)return s.cwd;let a=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await eV(r.project,{unrollAliases:!0}));if(a===null)throw new nt("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");let n=a.locatorMap.get(q.stringifyLocator(e));if(!n){let p=new nt(`Couldn't find ${q.prettyLocator(r.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw p.code="LOCATOR_NOT_INSTALLED",p}let c=n.locations.sort((p,h)=>p.split(K.sep).length-h.split(K.sep).length),f=K.join(r.project.configuration.startingCwd,Ri);return c.find(p=>K.contains(f,p))||n.locations[0]}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await eV(r.project,{unrollAliases:!0}));if(s===null)return null;let{locationRoot:a,segments:n}=cN(K.resolve(e),{skipPrefix:r.project.cwd}),c=s.locationTree.get(a);if(!c)return null;let f=c.locator;for(let p of n){if(c=c.children.get(p),!c)break;f=c.locator||f}return q.parseLocator(f)}makeInstaller(e){return new $Y(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="node-modules"}},$Y=class{constructor(e){this.opts=e;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}attachCustomData(e){this.customData=e}async installPackage(e,r){let s=K.resolve(r.packageFs.getRealPath(),r.prefixPath),a=this.customData.store.get(e.locatorHash);if(typeof a>"u"&&(a=await QTt(e,r),e.linkType==="HARD"&&this.customData.store.set(e.locatorHash,a)),!q.isPackageCompatible(e,this.opts.project.configuration.getSupportedArchitectures()))return{packageLocation:null,buildRequest:null};let n=new Map,c=new Set;n.has(q.stringifyIdent(e))||n.set(q.stringifyIdent(e),e.reference);let f=e;if(q.isVirtualLocator(e)){f=q.devirtualizeLocator(e);for(let E of e.peerDependencies.values())n.set(q.stringifyIdent(E),null),c.add(q.stringifyIdent(E))}let p={packageLocation:`${ue.fromPortablePath(s)}/`,packageDependencies:n,packagePeers:c,linkType:e.linkType,discardFromLookup:r.discardFromLookup??!1};this.localStore.set(e.locatorHash,{pkg:e,customPackageData:a,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:p});let h=r.checksum?r.checksum.substring(r.checksum.indexOf("/")+1):null;return this.realLocatorChecksums.set(f.locatorHash,h),{packageLocation:s,buildRequest:null}}async attachInternalDependencies(e,r){let s=this.localStore.get(e.locatorHash);if(typeof s>"u")throw new Error("Assertion failed: Expected information object to have been registered");for(let[a,n]of r){let c=q.areIdentsEqual(a,n)?n.reference:[q.stringifyIdent(n),n.reference];s.pnpNode.packageDependencies.set(q.stringifyIdent(a),c)}}async attachExternalDependents(e,r){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if(this.opts.project.configuration.get("nodeLinker")!=="node-modules")return;let e=new Ao({baseFs:new tA({maxOpenFiles:80,readOnlyArchives:!0})}),r=await eV(this.opts.project),s=this.opts.project.configuration.get("nmMode");(r===null||s!==r.nmMode)&&(this.opts.project.storedBuildState.clear(),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:s,mtimeMs:0});let a=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get("nmHoistingLimits");try{P=je.validateEnum(_D,S.manifest.installConfig?.hoistingLimits??P)}catch{let I=q.prettyWorkspace(this.opts.project.configuration,S);this.opts.report.reportWarning(57,`${I}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(_D).join(", ")}, using default: "${P}"`)}return[S.relativeCwd,P]})),n=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get("nmSelfReferences");return P=S.manifest.installConfig?.selfReferences??P,[S.relativeCwd,P]})),c={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(S,P)=>Array.isArray(P)?{name:P[0],reference:P[1]}:{name:S,reference:P},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(S=>{let P=S.anchoredLocator;return{name:q.stringifyIdent(P),reference:P.reference}}),getPackageInformation:S=>{let P=S.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:q.makeLocator(q.parseIdent(S.name),S.reference),I=this.localStore.get(P.locatorHash);if(typeof I>"u")throw new Error("Assertion failed: Expected the package reference to have been registered");return I.pnpNode},findPackageLocator:S=>{let P=this.opts.project.tryWorkspaceByCwd(ue.toPortablePath(S));if(P!==null){let I=P.anchoredLocator;return{name:q.stringifyIdent(I),reference:I.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:S=>ue.fromPortablePath(Ao.resolveVirtual(ue.toPortablePath(S)))},{tree:f,errors:p,preserveSymlinksRequired:h}=UD(c,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:a,project:this.opts.project,selfReferencesByCwd:n});if(!f){for(let{messageName:S,text:P}of p)this.opts.report.reportError(S,P);return}let E=xY(f);await MTt(r,E,{baseFs:e,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async S=>{let P=q.parseLocator(S),I=this.localStore.get(P.locatorHash);if(typeof I>"u")throw new Error("Assertion failed: Expected the slot to exist");return I.customPackageData.manifest}});let C=[];for(let[S,P]of E.entries()){if(Jxe(S))continue;let I=q.parseLocator(S),R=this.localStore.get(I.locatorHash);if(typeof R>"u")throw new Error("Assertion failed: Expected the slot to exist");if(this.opts.project.tryWorkspaceByLocator(R.pkg))continue;let N=mA.extractBuildRequest(R.pkg,R.customPackageData,R.dependencyMeta,{configuration:this.opts.project.configuration});N&&C.push({buildLocations:P.locations,locator:I,buildRequest:N})}return h&&this.opts.report.reportWarning(72,`The application uses portals and that's why ${he.pretty(this.opts.project.configuration,"--preserve-symlinks",he.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:C}}};async function QTt(t,e){let r=await Ht.tryFind(e.prefixPath,{baseFs:e.packageFs})??new Ht,s=new Set(["preinstall","install","postinstall"]);for(let a of r.scripts.keys())s.has(a)||r.scripts.delete(a);return{manifest:{bin:r.bin,scripts:r.scripts},misc:{hasBindingGyp:mA.hasBindingGyp(e)}}}async function TTt(t,e,r,s,{installChangedByUser:a}){let n="";n+=`# Warning: This file is automatically generated. Removing it is fine, but will -`,n+=`# cause your node_modules installation to become invalidated. -`,n+=` -`,n+=`__metadata: -`,n+=` version: ${Wxe} -`,n+=` nmMode: ${s.value} -`;let c=Array.from(e.keys()).sort(),f=q.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of c){let C=e.get(E);n+=` -`,n+=`${JSON.stringify(E)}: -`,n+=` locations: -`;for(let S of C.locations){let P=K.contains(t.cwd,S);if(P===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` - ${JSON.stringify(P)} -`}if(C.aliases.length>0){n+=` aliases: -`;for(let S of C.aliases)n+=` - ${JSON.stringify(S)} -`}if(E===f&&r.size>0){n+=` bin: -`;for(let[S,P]of r){let I=K.contains(t.cwd,S);if(I===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` ${JSON.stringify(I)}: -`;for(let[R,N]of P){let U=K.relative(K.join(S,Ri),N);n+=` ${JSON.stringify(R)}: ${JSON.stringify(U)} -`}}}}let p=t.cwd,h=K.join(p,Ri,Yxe);a&&await le.removePromise(h),await le.changeFilePromise(h,n,{automaticNewlines:!0})}async function eV(t,{unrollAliases:e=!1}={}){let r=t.cwd,s=K.join(r,Ri,Yxe),a;try{a=await le.statPromise(s)}catch{}if(!a)return null;let n=cs(await le.readFilePromise(s,"utf8"));if(n.__metadata.version>Wxe)return null;let c=n.__metadata.nmMode||"classic",f=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let C=E.locations.map(P=>K.join(r,P)),S=E.bin;if(S)for(let[P,I]of Object.entries(S)){let R=K.join(r,ue.toPortablePath(P)),N=je.getMapWithDefault(p,R);for(let[U,W]of Object.entries(I))N.set(U,ue.toPortablePath([R,Ri,W].join(K.sep)))}if(f.set(h,{target:vt.dot,linkType:"HARD",locations:C,aliases:E.aliases||[]}),e&&E.aliases)for(let P of E.aliases){let{scope:I,name:R}=q.parseLocator(h),N=q.makeLocator(q.makeIdent(I,R),P),U=q.stringifyLocator(N);f.set(U,{target:vt.dot,linkType:"HARD",locations:C,aliases:[]})}}return{locatorMap:f,binSymlinks:p,locationTree:Vxe(f,{skipPrefix:t.cwd}),nmMode:c,mtimeMs:a.mtimeMs}}var bw=async(t,e)=>{if(t.split(K.sep).indexOf(Ri)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{let r;if(!e.innerLoop&&(r=await le.lstatPromise(t),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!e.isWorkspaceDir)){await le.unlinkPromise(t);return}let s=await le.readdirPromise(t,{withFileTypes:!0});for(let n of s){let c=K.join(t,n.name);n.isDirectory()?(n.name!==Ri||e&&e.innerLoop)&&await bw(c,{innerLoop:!0,contentsOnly:!1}):await le.unlinkPromise(c)}let a=!e.innerLoop&&e.isWorkspaceDir&&r?.isSymbolicLink();!e.contentsOnly&&!a&&await le.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},Hxe=4,cN=(t,{skipPrefix:e})=>{let r=K.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let s=r.split(K.sep).filter(p=>p!==""),a=s.indexOf(Ri),n=s.slice(0,a).join(K.sep),c=K.join(e,n),f=s.slice(a);return{locationRoot:c,segments:f}},Vxe=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let s=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&K.contains(e,n.target)!==null){let f=je.getFactoryWithDefault(r,n.target,s);f.locator=a,f.linkType=n.linkType}for(let c of n.locations){let{locationRoot:f,segments:p}=cN(c,{skipPrefix:e}),h=je.getFactoryWithDefault(r,f,s);for(let E=0;E{if(process.platform==="win32"&&r==="junctions"){let s;try{s=await le.lstatPromise(t)}catch{}if(!s||s.isDirectory()){await le.symlinkPromise(t,e,"junction");return}}await le.symlinkPromise(K.relative(K.dirname(e),t),e)};async function Kxe(t,e,r){let s=K.join(t,`${tV.default.randomBytes(16).toString("hex")}.tmp`);try{await le.writeFilePromise(s,r);try{await le.linkPromise(s,e)}catch{}}finally{await le.unlinkPromise(s)}}async function RTt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:s,baseFs:a,nmMode:n}){if(r.kind==="file"){if(n.value==="hardlinks-global"&&s&&r.digest){let f=K.join(s,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await le.statPromise(f);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs{await le.mkdirPromise(t,{recursive:!0});let f=async(E=vt.dot)=>{let C=K.join(e,E),S=await r.readdirPromise(C,{withFileTypes:!0}),P=new Map;for(let I of S){let R=K.join(E,I.name),N,U=K.join(C,I.name);if(I.isFile()){if(N={kind:"file",mode:(await r.lstatPromise(U)).mode},a.value==="hardlinks-global"){let W=await Nn.checksumFile(U,{baseFs:r,algorithm:"sha1"});N.digest=W}}else if(I.isDirectory())N={kind:"directory"};else if(I.isSymbolicLink())N={kind:"symlink",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,"0")})`);if(P.set(R,N),I.isDirectory()&&R!==Ri){let W=await f(R);for(let[te,ie]of W)P.set(te,ie)}}return P},p;if(a.value==="hardlinks-global"&&s&&c){let E=K.join(s,c.substring(0,2),`${c.substring(2)}.json`);try{p=new Map(Object.entries(JSON.parse(await le.readFilePromise(E,"utf8"))))}catch{p=await f()}}else p=await f();let h=!1;for(let[E,C]of p){let S=K.join(e,E),P=K.join(t,E);if(C.kind==="directory")await le.mkdirPromise(P,{recursive:!0});else if(C.kind==="file"){let I=C.mtimeMs;await RTt({srcPath:S,dstPath:P,entry:C,nmMode:a,baseFs:r,globalHardlinksStore:s}),C.mtimeMs!==I&&(h=!0)}else C.kind==="symlink"&&await nV(K.resolve(K.dirname(P),C.symlinkTo),P,n)}if(a.value==="hardlinks-global"&&s&&h&&c){let E=K.join(s,c.substring(0,2),`${c.substring(2)}.json`);await le.removePromise(E),await Kxe(s,E,Buffer.from(JSON.stringify(Object.fromEntries(p))))}};function NTt(t,e,r,s){let a=new Map,n=new Map,c=new Map,f=!1,p=(h,E,C,S,P)=>{let I=!0,R=K.join(h,E),N=new Set;if(E===Ri||E.startsWith("@")){let W;try{W=le.statSync(R)}catch{}I=!!W,W?W.mtimeMs>r?(f=!0,N=new Set(le.readdirSync(R))):N=new Set(C.children.get(E).children.keys()):f=!0;let te=e.get(h);if(te){let ie=K.join(h,Ri,lN),Ae;try{Ae=le.statSync(ie)}catch{}if(!Ae)f=!0;else if(Ae.mtimeMs>r){f=!0;let ce=new Set(le.readdirSync(ie)),me=new Map;n.set(h,me);for(let[pe,Be]of te)ce.has(pe)&&me.set(pe,Be)}else n.set(h,te)}}else I=P.has(E);let U=C.children.get(E);if(I){let{linkType:W,locator:te}=U,ie={children:new Map,linkType:W,locator:te};if(S.children.set(E,ie),te){let Ae=je.getSetWithDefault(c,te);Ae.add(R),c.set(te,Ae)}for(let Ae of U.children.keys())p(R,Ae,U,ie,N)}else U.locator&&s.storedBuildState.delete(q.parseLocator(U.locator).locatorHash)};for(let[h,E]of t){let{linkType:C,locator:S}=E,P={children:new Map,linkType:C,locator:S};if(a.set(h,P),S){let I=je.getSetWithDefault(c,E.locator);I.add(h),c.set(E.locator,I)}E.children.has(Ri)&&p(h,Ri,E,P,new Set)}return{locationTree:a,binSymlinks:n,locatorLocations:c,installChangedByUser:f}}function Jxe(t){let e=q.parseDescriptor(t);return q.isVirtualDescriptor(e)&&(e=q.devirtualizeDescriptor(e)),e.range.startsWith("link:")}async function OTt(t,e,r,{loadManifest:s}){let a=new Map;for(let[f,{locations:p}]of t){let h=Jxe(f)?null:await s(f,p[0]),E=new Map;if(h)for(let[C,S]of h.bin){let P=K.join(p[0],S);S!==""&&le.existsSync(P)&&E.set(C,S)}a.set(f,E)}let n=new Map,c=(f,p,h)=>{let E=new Map,C=K.contains(r,f);if(h.locator&&C!==null){let S=a.get(h.locator);for(let[P,I]of S){let R=K.join(f,ue.toPortablePath(I));E.set(P,R)}for(let[P,I]of h.children){let R=K.join(f,P),N=c(R,R,I);N.size>0&&n.set(f,new Map([...n.get(f)||new Map,...N]))}}else for(let[S,P]of h.children){let I=c(K.join(f,S),p,P);for(let[R,N]of I)E.set(R,N)}return E};for(let[f,p]of e){let h=c(f,f,p);h.size>0&&n.set(f,new Map([...n.get(f)||new Map,...h]))}return n}var jxe=(t,e)=>{if(!t||!e)return t===e;let r=q.parseLocator(t);q.isVirtualLocator(r)&&(r=q.devirtualizeLocator(r));let s=q.parseLocator(e);return q.isVirtualLocator(s)&&(s=q.devirtualizeLocator(s)),q.areLocatorsEqual(r,s)};function iV(t){return K.join(t.get("globalFolder"),"store")}function LTt(t,e){let r=s=>{let a=s.split(K.sep),n=a.lastIndexOf(Ri);if(n<0||n==a.length-1)throw new Error(`Assertion failed. Path is outside of any node_modules package ${s}`);return a.slice(0,n+(a[n+1].startsWith("@")?3:2)).join(K.sep)};for(let s of t.values())for(let[a,n]of s)e.has(r(n))&&s.delete(a)}async function MTt(t,e,{baseFs:r,project:s,report:a,loadManifest:n,realLocatorChecksums:c}){let f=K.join(s.cwd,Ri),{locationTree:p,binSymlinks:h,locatorLocations:E,installChangedByUser:C}=NTt(t.locationTree,t.binSymlinks,t.mtimeMs,s),S=Vxe(e,{skipPrefix:s.cwd}),P=[],I=async({srcDir:Be,dstDir:Ce,linkType:g,globalHardlinksStore:we,nmMode:ye,windowsLinkType:fe,packageChecksum:se})=>{let X=(async()=>{try{g==="SOFT"?(await le.mkdirPromise(K.dirname(Ce),{recursive:!0}),await nV(K.resolve(Be),Ce,fe)):await FTt(Ce,Be,{baseFs:r,globalHardlinksStore:we,nmMode:ye,windowsLinkType:fe,packageChecksum:se})}catch(De){throw De.message=`While persisting ${Be} -> ${Ce} ${De.message}`,De}finally{ie.tick()}})().then(()=>P.splice(P.indexOf(X),1));P.push(X),P.length>Hxe&&await Promise.race(P)},R=async(Be,Ce,g)=>{let we=(async()=>{let ye=async(fe,se,X)=>{try{X.innerLoop||await le.mkdirPromise(se,{recursive:!0});let De=await le.readdirPromise(fe,{withFileTypes:!0});for(let Re of De){if(!X.innerLoop&&Re.name===lN)continue;let dt=K.join(fe,Re.name),j=K.join(se,Re.name);Re.isDirectory()?(Re.name!==Ri||X&&X.innerLoop)&&(await le.mkdirPromise(j,{recursive:!0}),await ye(dt,j,{...X,innerLoop:!0})):me.value==="hardlinks-local"||me.value==="hardlinks-global"?await le.linkPromise(dt,j):await le.copyFilePromise(dt,j,Gxe.default.constants.COPYFILE_FICLONE)}}catch(De){throw X.innerLoop||(De.message=`While cloning ${fe} -> ${se} ${De.message}`),De}finally{X.innerLoop||ie.tick()}};await ye(Be,Ce,g)})().then(()=>P.splice(P.indexOf(we),1));P.push(we),P.length>Hxe&&await Promise.race(P)},N=async(Be,Ce,g)=>{if(g)for(let[we,ye]of Ce.children){let fe=g.children.get(we);await N(K.join(Be,we),ye,fe)}else{Ce.children.has(Ri)&&await bw(K.join(Be,Ri),{contentsOnly:!1});let we=K.basename(Be)===Ri&&p.has(K.join(K.dirname(Be)));await bw(Be,{contentsOnly:Be===f,isWorkspaceDir:we})}};for(let[Be,Ce]of p){let g=S.get(Be);for(let[we,ye]of Ce.children){if(we===".")continue;let fe=g&&g.children.get(we),se=K.join(Be,we);await N(se,ye,fe)}}let U=async(Be,Ce,g)=>{if(g){jxe(Ce.locator,g.locator)||await bw(Be,{contentsOnly:Ce.linkType==="HARD"});for(let[we,ye]of Ce.children){let fe=g.children.get(we);await U(K.join(Be,we),ye,fe)}}else{Ce.children.has(Ri)&&await bw(K.join(Be,Ri),{contentsOnly:!0});let we=K.basename(Be)===Ri&&S.has(K.join(K.dirname(Be)));await bw(Be,{contentsOnly:Ce.linkType==="HARD",isWorkspaceDir:we})}};for(let[Be,Ce]of S){let g=p.get(Be);for(let[we,ye]of Ce.children){if(we===".")continue;let fe=g&&g.children.get(we);await U(K.join(Be,we),ye,fe)}}let W=new Map,te=[];for(let[Be,Ce]of E)for(let g of Ce){let{locationRoot:we,segments:ye}=cN(g,{skipPrefix:s.cwd}),fe=S.get(we),se=we;if(fe){for(let X of ye)if(se=K.join(se,X),fe=fe.children.get(X),!fe)break;if(fe){let X=jxe(fe.locator,Be),De=e.get(fe.locator),Re=De.target,dt=se,j=De.linkType;if(X)W.has(Re)||W.set(Re,dt);else if(Re!==dt){let rt=q.parseLocator(fe.locator);q.isVirtualLocator(rt)&&(rt=q.devirtualizeLocator(rt)),te.push({srcDir:Re,dstDir:dt,linkType:j,realLocatorHash:rt.locatorHash})}}}}for(let[Be,{locations:Ce}]of e.entries())for(let g of Ce){let{locationRoot:we,segments:ye}=cN(g,{skipPrefix:s.cwd}),fe=p.get(we),se=S.get(we),X=we,De=e.get(Be),Re=q.parseLocator(Be);q.isVirtualLocator(Re)&&(Re=q.devirtualizeLocator(Re));let dt=Re.locatorHash,j=De.target,rt=g;if(j===rt)continue;let Fe=De.linkType;for(let Ne of ye)se=se.children.get(Ne);if(!fe)te.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:dt});else for(let Ne of ye)if(X=K.join(X,Ne),fe=fe.children.get(Ne),!fe){te.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:dt});break}}let ie=ho.progressViaCounter(te.length),Ae=a.reportProgress(ie),ce=s.configuration.get("nmMode"),me={value:ce},pe=s.configuration.get("winLinkType");try{let Be=me.value==="hardlinks-global"?`${iV(s.configuration)}/v1`:null;if(Be&&!await le.existsPromise(Be)){await le.mkdirpPromise(Be);for(let g=0;g<256;g++)await le.mkdirPromise(K.join(Be,g.toString(16).padStart(2,"0")))}for(let g of te)(g.linkType==="SOFT"||!W.has(g.srcDir))&&(W.set(g.srcDir,g.dstDir),await I({...g,globalHardlinksStore:Be,nmMode:me,windowsLinkType:pe,packageChecksum:c.get(g.realLocatorHash)||null}));await Promise.all(P),P.length=0;for(let g of te){let we=W.get(g.srcDir);g.linkType!=="SOFT"&&g.dstDir!==we&&await R(we,g.dstDir,{nmMode:me})}await Promise.all(P),await le.mkdirPromise(f,{recursive:!0}),LTt(h,new Set(te.map(g=>g.dstDir)));let Ce=await OTt(e,S,s.cwd,{loadManifest:n});await _Tt(h,Ce,s.cwd,pe),await TTt(s,e,Ce,me,{installChangedByUser:C}),ce=="hardlinks-global"&&me.value=="hardlinks-local"&&a.reportWarningOnce(74,"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices")}finally{Ae.stop()}}async function _Tt(t,e,r,s){for(let a of t.keys()){if(K.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);if(!e.has(a)){let n=K.join(a,Ri,lN);await le.removePromise(n)}}for(let[a,n]of e){if(K.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);let c=K.join(a,Ri,lN),f=t.get(a)||new Map;await le.mkdirPromise(c,{recursive:!0});for(let p of f.keys())n.has(p)||(await le.removePromise(K.join(c,p)),process.platform==="win32"&&await le.removePromise(K.join(c,`${p}.cmd`)));for(let[p,h]of n){let E=f.get(p),C=K.join(c,p);E!==h&&(process.platform==="win32"?await(0,qxe.default)(ue.fromPortablePath(h),ue.fromPortablePath(C),{createPwshFile:!1}):(await le.removePromise(C),await nV(h,C,s),K.contains(r,await le.realpathPromise(h))!==null&&await le.chmodPromise(h,493)))}}}Ve();bt();rA();var $D=class extends ig{constructor(){super(...arguments);this.mode="loose"}makeInstaller(r){return new sV(r)}},sV=class extends jm{constructor(){super(...arguments);this.mode="loose"}async transformPnpSettings(r){let s=new Ao({baseFs:new tA({maxOpenFiles:80,readOnlyArchives:!0})}),a=xxe(r,this.opts.project.cwd,s),{tree:n,errors:c}=UD(a,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:C,text:S}of c)this.opts.report.reportError(C,S);return}let f=new Map;r.fallbackPool=f;let p=(C,S)=>{let P=q.parseLocator(S.locator),I=q.stringifyIdent(P);I===C?f.set(C,P.reference):f.set(C,[I,P.reference])},h=K.join(this.opts.project.cwd,Er.nodeModules),E=n.get(h);if(!(typeof E>"u")){if("target"in E)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(let C of E.dirList){let S=K.join(h,C),P=n.get(S);if(typeof P>"u")throw new Error("Assertion failed: Expected the child to have been registered");if("target"in P)p(C,P);else for(let I of P.dirList){let R=K.join(S,I),N=n.get(R);if(typeof N>"u")throw new Error("Assertion failed: Expected the subchild to have been registered");if("target"in N)p(`${C}/${I}`,N);else throw new Error("Assertion failed: Expected the leaf junction to be a package")}}}}};var UTt={hooks:{cleanGlobalArtifacts:async t=>{let e=iV(t);await le.removePromise(e)}},configuration:{nmHoistingLimits:{description:"Prevents packages to be hoisted past specific levels",type:"STRING",values:["workspaces","dependencies","none"],default:"none"},nmMode:{description:"Defines in which measure Yarn must use hardlinks and symlinks when generated `node_modules` directories.",type:"STRING",values:["classic","hardlinks-local","hardlinks-global"],default:"classic"},nmSelfReferences:{description:"Defines whether the linker should generate self-referencing symlinks for workspaces.",type:"BOOLEAN",default:!0}},linkers:[XD,$D]},HTt=UTt;var oz={};Vt(oz,{NpmHttpFetcher:()=>rb,NpmRemapResolver:()=>nb,NpmSemverFetcher:()=>lh,NpmSemverResolver:()=>ib,NpmTagResolver:()=>sb,default:()=>ZHt,npmConfigUtils:()=>hi,npmHttpUtils:()=>an,npmPublishUtils:()=>B1});Ve();var nke=et(Ai());var oi="npm:";var an={};Vt(an,{AuthType:()=>eke,customPackageError:()=>qm,del:()=>tRt,get:()=>Gm,getIdentUrl:()=>uN,getPackageMetadata:()=>kw,handleInvalidAuthenticationError:()=>og,post:()=>$Tt,put:()=>eRt});Ve();Ve();bt();var cV=et(nS()),Xxe=et(mG()),$xe=et(Ai());var hi={};Vt(hi,{RegistryType:()=>zxe,getAuditRegistry:()=>jTt,getAuthConfiguration:()=>lV,getDefaultRegistry:()=>eb,getPublishRegistry:()=>qTt,getRegistryConfiguration:()=>Zxe,getScopeConfiguration:()=>aV,getScopeRegistry:()=>Pw,normalizeRegistry:()=>zc});var zxe=(s=>(s.AUDIT_REGISTRY="npmAuditRegistry",s.FETCH_REGISTRY="npmRegistryServer",s.PUBLISH_REGISTRY="npmPublishRegistry",s))(zxe||{});function zc(t){return t.replace(/\/$/,"")}function jTt({configuration:t}){return eb({configuration:t,type:"npmAuditRegistry"})}function qTt(t,{configuration:e}){return t.publishConfig?.registry?zc(t.publishConfig.registry):t.name?Pw(t.name.scope,{configuration:e,type:"npmPublishRegistry"}):eb({configuration:e,type:"npmPublishRegistry"})}function Pw(t,{configuration:e,type:r="npmRegistryServer"}){let s=aV(t,{configuration:e});if(s===null)return eb({configuration:e,type:r});let a=s.get(r);return a===null?eb({configuration:e,type:r}):zc(a)}function eb({configuration:t,type:e="npmRegistryServer"}){let r=t.get(e);return zc(r!==null?r:t.get("npmRegistryServer"))}function Zxe(t,{configuration:e}){let r=e.get("npmRegistries"),s=zc(t),a=r.get(s);if(typeof a<"u")return a;let n=r.get(s.replace(/^[a-z]+:/,""));return typeof n<"u"?n:null}var GTt=new Map([["npmRegistryServer","https://npm.jsr.io/"]]);function aV(t,{configuration:e}){if(t===null)return null;let s=e.get("npmScopes").get(t);return s||(t==="jsr"?GTt:null)}function lV(t,{configuration:e,ident:r}){let s=r&&aV(r.scope,{configuration:e});return s?.get("npmAuthIdent")||s?.get("npmAuthToken")?s:Zxe(t,{configuration:e})||e}var eke=(a=>(a[a.NO_AUTH=0]="NO_AUTH",a[a.BEST_EFFORT=1]="BEST_EFFORT",a[a.CONFIGURATION=2]="CONFIGURATION",a[a.ALWAYS_AUTH=3]="ALWAYS_AUTH",a))(eke||{});async function og(t,{attemptedAs:e,registry:r,headers:s,configuration:a}){if(AN(t))throw new Yt(41,"Invalid OTP token");if(t.originalError?.name==="HTTPError"&&t.originalError?.response.statusCode===401)throw new Yt(41,`Invalid authentication (${typeof e!="string"?`as ${await nRt(r,s,{configuration:a})}`:`attempted as ${e}`})`)}function qm(t,e){let r=t.response?.statusCode;return r?r===404?"Package not found":r>=500&&r<600?`The registry appears to be down (using a ${he.applyHyperlink(e,"local cache","https://yarnpkg.com/advanced/lexicon#local-cache")} might have protected you against such outages)`:null:null}function uN(t){return t.scope?`/@${t.scope}%2f${t.name}`:`/${t.name}`}var tke=new Map,WTt=new Map;async function YTt(t){return await je.getFactoryWithDefault(tke,t,async()=>{let e=null;try{e=await le.readJsonPromise(t)}catch{}return e})}async function VTt(t,e,{configuration:r,cached:s,registry:a,headers:n,version:c,...f}){return await je.getFactoryWithDefault(WTt,t,async()=>await Gm(uN(e),{...f,customErrorMessage:qm,configuration:r,registry:a,ident:e,headers:{...n,"If-None-Match":s?.etag,"If-Modified-Since":s?.lastModified},wrapNetworkRequest:async p=>async()=>{let h=await p();if(h.statusCode===304){if(s===null)throw new Error("Assertion failed: cachedMetadata should not be null");return{...h,body:s.metadata}}let E=JTt(JSON.parse(h.body.toString())),C={metadata:E,etag:h.headers.etag,lastModified:h.headers["last-modified"]};return tke.set(t,Promise.resolve(C)),Promise.resolve().then(async()=>{let S=`${t}-${process.pid}.tmp`;await le.mkdirPromise(K.dirname(S),{recursive:!0}),await le.writeJsonPromise(S,C,{compact:!0}),await le.renamePromise(S,t)}).catch(()=>{}),{...h,body:E}}}))}function KTt(t){return t.scope!==null?`@${t.scope}-${t.name}-${t.scope.length}`:t.name}async function kw(t,{cache:e,project:r,registry:s,headers:a,version:n,...c}){let{configuration:f}=r;s=tb(f,{ident:t,registry:s});let p=ZTt(f,s),h=K.join(p,`${KTt(t)}.json`),E=null;if(!r.lockfileNeedsRefresh&&(E=await YTt(h),E)){if(typeof n<"u"&&typeof E.metadata.versions[n]<"u")return E.metadata;if(f.get("enableOfflineMode")){let C=structuredClone(E.metadata),S=new Set;if(e){for(let I of Object.keys(C.versions)){let R=q.makeLocator(t,`npm:${I}`),N=e.getLocatorMirrorPath(R);(!N||!le.existsSync(N))&&(delete C.versions[I],S.add(I))}let P=C["dist-tags"].latest;if(S.has(P)){let I=Object.keys(E.metadata.versions).sort($xe.default.compare),R=I.indexOf(P);for(;S.has(I[R])&&R>=0;)R-=1;R>=0?C["dist-tags"].latest=I[R]:delete C["dist-tags"].latest}}return C}}return await VTt(h,t,{...c,configuration:f,cached:E,registry:s,headers:a,version:n})}var rke=["name","dist.tarball","bin","scripts","os","cpu","libc","dependencies","dependenciesMeta","optionalDependencies","peerDependencies","peerDependenciesMeta","deprecated"];function JTt(t){return{"dist-tags":t["dist-tags"],versions:Object.fromEntries(Object.entries(t.versions).map(([e,r])=>[e,(0,Xxe.default)(r,rke)]))}}var zTt=Nn.makeHash(...rke).slice(0,6);function ZTt(t,e){let r=XTt(t),s=new URL(e);return K.join(r,zTt,s.hostname)}function XTt(t){return K.join(t.get("globalFolder"),"metadata/npm")}async function Gm(t,{configuration:e,headers:r,ident:s,authType:a,registry:n,...c}){n=tb(e,{ident:s,registry:n}),s&&s.scope&&typeof a>"u"&&(a=1);let f=await fN(n,{authType:a,configuration:e,ident:s});f&&(r={...r,authorization:f});try{return await An.get(t.charAt(0)==="/"?`${n}${t}`:t,{configuration:e,headers:r,...c})}catch(p){throw await og(p,{registry:n,configuration:e,headers:r}),p}}async function $Tt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,registry:f,otp:p,...h}){f=tb(s,{ident:n,registry:f});let E=await fN(f,{authType:c,configuration:s,ident:n});E&&(a={...a,authorization:E}),p&&(a={...a,...xw(p)});try{return await An.post(f+t,e,{configuration:s,headers:a,...h})}catch(C){if(!AN(C)||p)throw await og(C,{attemptedAs:r,registry:f,configuration:s,headers:a}),C;p=await uV(C,{configuration:s});let S={...a,...xw(p)};try{return await An.post(`${f}${t}`,e,{configuration:s,headers:S,...h})}catch(P){throw await og(P,{attemptedAs:r,registry:f,configuration:s,headers:a}),P}}}async function eRt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,registry:f,otp:p,...h}){f=tb(s,{ident:n,registry:f});let E=await fN(f,{authType:c,configuration:s,ident:n});E&&(a={...a,authorization:E}),p&&(a={...a,...xw(p)});try{return await An.put(f+t,e,{configuration:s,headers:a,...h})}catch(C){if(!AN(C))throw await og(C,{attemptedAs:r,registry:f,configuration:s,headers:a}),C;p=await uV(C,{configuration:s});let S={...a,...xw(p)};try{return await An.put(`${f}${t}`,e,{configuration:s,headers:S,...h})}catch(P){throw await og(P,{attemptedAs:r,registry:f,configuration:s,headers:a}),P}}}async function tRt(t,{attemptedAs:e,configuration:r,headers:s,ident:a,authType:n=3,registry:c,otp:f,...p}){c=tb(r,{ident:a,registry:c});let h=await fN(c,{authType:n,configuration:r,ident:a});h&&(s={...s,authorization:h}),f&&(s={...s,...xw(f)});try{return await An.del(c+t,{configuration:r,headers:s,...p})}catch(E){if(!AN(E)||f)throw await og(E,{attemptedAs:e,registry:c,configuration:r,headers:s}),E;f=await uV(E,{configuration:r});let C={...s,...xw(f)};try{return await An.del(`${c}${t}`,{configuration:r,headers:C,...p})}catch(S){throw await og(S,{attemptedAs:e,registry:c,configuration:r,headers:s}),S}}}function tb(t,{ident:e,registry:r}){if(typeof r>"u"&&e)return Pw(e.scope,{configuration:t});if(typeof r!="string")throw new Error("Assertion failed: The registry should be a string");return zc(r)}async function fN(t,{authType:e=2,configuration:r,ident:s}){let a=lV(t,{configuration:r,ident:s}),n=rRt(a,e);if(!n)return null;let c=await r.reduceHook(f=>f.getNpmAuthenticationHeader,void 0,t,{configuration:r,ident:s});if(c)return c;if(a.get("npmAuthToken"))return`Bearer ${a.get("npmAuthToken")}`;if(a.get("npmAuthIdent")){let f=a.get("npmAuthIdent");return f.includes(":")?`Basic ${Buffer.from(f).toString("base64")}`:`Basic ${f}`}if(n&&e!==1)throw new Yt(33,"No authentication configured for request");return null}function rRt(t,e){switch(e){case 2:return t.get("npmAlwaysAuth");case 1:case 3:return!0;case 0:return!1;default:throw new Error("Unreachable")}}async function nRt(t,e,{configuration:r}){if(typeof e>"u"||typeof e.authorization>"u")return"an anonymous user";try{return(await An.get(new URL(`${t}/-/whoami`).href,{configuration:r,headers:e,jsonResponse:!0})).username??"an unknown user"}catch{return"an unknown user"}}async function uV(t,{configuration:e}){let r=t.originalError?.response.headers["npm-notice"];if(r&&(await Ot.start({configuration:e,stdout:process.stdout,includeFooter:!1},async a=>{if(a.reportInfo(0,r.replace(/(https?:\/\/\S+)/g,he.pretty(e,"$1",he.Type.URL))),!process.env.YARN_IS_TEST_ENV){let n=r.match(/open (https?:\/\/\S+)/i);if(n&&ps.openUrl){let{openNow:c}=await(0,cV.prompt)({type:"confirm",name:"openNow",message:"Do you want to try to open this url now?",required:!0,initial:!0,onCancel:()=>process.exit(130)});c&&(await ps.openUrl(n[1])||(a.reportSeparator(),a.reportWarning(0,"We failed to automatically open the url; you'll have to open it yourself in your browser of choice.")))}}}),process.stdout.write(` -`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:s}=await(0,cV.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(` -`),s}function AN(t){if(t.originalError?.name!=="HTTPError")return!1;try{return(t.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function xw(t){return{"npm-otp":t}}var rb=class{supports(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s,params:a}=q.parseRange(e.reference);return!(!nke.default.valid(s)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let{params:s}=q.parseRange(e.reference);if(s===null||typeof s.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await Gm(s.__archiveUrl,{customErrorMessage:qm,configuration:r.project.configuration,ident:e});return await gs.convertToZip(a,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}};Ve();var nb=class{supportsDescriptor(e,r){return!(!e.range.startsWith(oi)||!q.tryParseDescriptor(e.range.slice(oi.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){let s=r.project.configuration.normalizeDependency(q.parseDescriptor(e.range.slice(oi.length),!0));return r.resolver.getResolutionDependencies(s,r)}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(q.parseDescriptor(e.range.slice(oi.length),!0));return await s.resolver.getCandidates(a,r,s)}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(q.parseDescriptor(e.range.slice(oi.length),!0));return a.resolver.getSatisfying(n,r,s,a)}resolve(e,r){throw new Error("Unreachable")}};Ve();Ve();var ike=et(Ai());var lh=class t{supports(e,r){if(!e.reference.startsWith(oi))return!1;let s=new URL(e.reference);return!(!ike.default.valid(s.pathname)||s.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s;try{s=await Gm(t.getLocatorUrl(e),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}catch{s=await Gm(t.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}return await gs.convertToZip(s,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:s}){let a=Pw(e.scope,{configuration:s}),n=t.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=Or.clean(e.reference.slice(oi.length));if(r===null)throw new Yt(10,"The npm semver resolver got selected, but the version isn't semver");return`${uN(e)}/-/${e.name}-${r}.tgz`}};Ve();Ve();Ve();var fV=et(Ai());var pN=q.makeIdent(null,"node-gyp"),iRt=/\b(node-gyp|prebuild-install)\b/,ib=class{supportsDescriptor(e,r){return e.range.startsWith(oi)?!!Or.validRange(e.range.slice(oi.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s}=q.parseRange(e.reference);return!!fV.default.valid(s)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=Or.validRange(e.range.slice(oi.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(oi.length)}`);let n=await kw(e,{cache:s.fetchOptions?.cache,project:s.project,version:fV.default.valid(a.raw)?a.raw:void 0}),c=je.mapAndFilter(Object.keys(n.versions),h=>{try{let E=new Or.SemVer(h);if(a.test(E))return E}catch{}return je.mapAndFilter.skip}),f=c.filter(h=>!n.versions[h.raw].deprecated),p=f.length>0?f:c;return p.sort((h,E)=>-h.compare(E)),p.map(h=>{let E=q.makeLocator(e,`${oi}${h.raw}`),C=n.versions[h.raw].dist.tarball;return lh.isConventionalTarballUrl(E,C,{configuration:s.project.configuration})?E:q.bindLocator(E,{__archiveUrl:C})})}async getSatisfying(e,r,s,a){let n=Or.validRange(e.range.slice(oi.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(oi.length)}`);return{locators:je.mapAndFilter(s,p=>{if(p.identHash!==e.identHash)return je.mapAndFilter.skip;let h=q.tryParseRange(p.reference,{requireProtocol:oi});if(!h)return je.mapAndFilter.skip;let E=new Or.SemVer(h.selector);return n.test(E)?{locator:p,version:E}:je.mapAndFilter.skip}).sort((p,h)=>-p.version.compare(h.version)).map(({locator:p})=>p),sorted:!0}}async resolve(e,r){let{selector:s}=q.parseRange(e.reference),a=Or.clean(s);if(a===null)throw new Yt(10,"The npm semver resolver got selected, but the version isn't semver");let n=await kw(e,{cache:r.fetchOptions?.cache,project:r.project,version:a});if(!Object.hasOwn(n,"versions"))throw new Yt(15,'Registry returned invalid data for - missing "versions" field');if(!Object.hasOwn(n.versions,a))throw new Yt(16,`Registry failed to return reference "${a}"`);let c=new Ht;if(c.load(n.versions[a]),!c.dependencies.has(pN.identHash)&&!c.peerDependencies.has(pN.identHash)){for(let f of c.scripts.values())if(f.match(iRt)){c.dependencies.set(pN.identHash,q.makeDescriptor(pN,"latest"));break}}return{...e,version:a,languageName:"node",linkType:"HARD",conditions:c.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(c.dependencies),peerDependencies:c.peerDependencies,dependenciesMeta:c.dependenciesMeta,peerDependenciesMeta:c.peerDependenciesMeta,bin:c.bin}}};Ve();Ve();var ske=et(Ai());var sb=class{supportsDescriptor(e,r){return!(!e.range.startsWith(oi)||!Up.test(e.range.slice(oi.length)))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(oi.length),n=await kw(e,{cache:s.fetchOptions?.cache,project:s.project});if(!Object.hasOwn(n,"dist-tags"))throw new Yt(15,'Registry returned invalid data - missing "dist-tags" field');let c=n["dist-tags"];if(!Object.hasOwn(c,a))throw new Yt(16,`Registry failed to return tag "${a}"`);let f=c[a],p=q.makeLocator(e,`${oi}${f}`),h=n.versions[f].dist.tarball;return lh.isConventionalTarballUrl(p,h,{configuration:s.project.configuration})?[p]:[q.bindLocator(p,{__archiveUrl:h})]}async getSatisfying(e,r,s,a){let n=[];for(let c of s){if(c.identHash!==e.identHash)continue;let f=q.tryParseRange(c.reference,{requireProtocol:oi});if(!(!f||!ske.default.valid(f.selector))){if(f.params?.__archiveUrl){let p=q.makeRange({protocol:oi,selector:f.selector,source:null,params:null}),[h]=await a.resolver.getCandidates(q.makeDescriptor(e,p),r,a);if(c.reference!==h.reference)continue}n.push(c)}}return{locators:n,sorted:!1}}async resolve(e,r){throw new Error("Unreachable")}};var B1={};Vt(B1,{getGitHead:()=>JHt,getPublishAccess:()=>JNe,getReadmeContent:()=>zNe,makePublishBody:()=>KHt});Ve();Ve();bt();var $V={};Vt($V,{PackCommand:()=>Hw,default:()=>LNt,packUtils:()=>IA});Ve();Ve();Ve();bt();Wt();var IA={};Vt(IA,{genPackList:()=>ON,genPackStream:()=>XV,genPackageManifest:()=>OQe,hasPackScripts:()=>zV,prepareForPack:()=>ZV});Ve();bt();var JV=et(Sa()),FQe=et(kQe()),NQe=Ie("zlib"),DNt=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],bNt=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function zV(t){return!!(In.hasWorkspaceScript(t,"prepack")||In.hasWorkspaceScript(t,"postpack"))}async function ZV(t,{report:e},r){await In.maybeExecuteWorkspaceLifecycleScript(t,"prepack",{report:e});try{let s=K.join(t.cwd,Ht.fileName);await le.existsPromise(s)&&await t.manifest.loadFile(s,{baseFs:le}),await r()}finally{await In.maybeExecuteWorkspaceLifecycleScript(t,"postpack",{report:e})}}async function XV(t,e){typeof e>"u"&&(e=await ON(t));let r=new Set;for(let n of t.manifest.publishConfig?.executableFiles??new Set)r.add(K.normalize(n));for(let n of t.manifest.bin.values())r.add(K.normalize(n));let s=FQe.default.pack();process.nextTick(async()=>{for(let n of e){let c=K.normalize(n),f=K.resolve(t.cwd,c),p=K.join("package",c),h=await le.lstatPromise(f),E={name:p,mtime:new Date(fi.SAFE_TIME*1e3)},C=r.has(c)?493:420,S,P,I=new Promise((N,U)=>{S=N,P=U}),R=N=>{N?P(N):S()};if(h.isFile()){let N;c==="package.json"?N=Buffer.from(JSON.stringify(await OQe(t),null,2)):N=await le.readFilePromise(f),s.entry({...E,mode:C,type:"file"},N,R)}else h.isSymbolicLink()?s.entry({...E,mode:C,type:"symlink",linkname:await le.readlinkPromise(f)},R):R(new Error(`Unsupported file type ${h.mode} for ${ue.fromPortablePath(c)}`));await I}s.finalize()});let a=(0,NQe.createGzip)();return s.pipe(a),a}async function OQe(t){let e=JSON.parse(JSON.stringify(t.manifest.raw));return await t.project.configuration.triggerHook(r=>r.beforeWorkspacePacking,t,e),e}async function ON(t){let e=t.project,r=e.configuration,s={accept:[],reject:[]};for(let C of bNt)s.reject.push(C);for(let C of DNt)s.accept.push(C);s.reject.push(r.get("rcFilename"));let a=C=>{if(C===null||!C.startsWith(`${t.cwd}/`))return;let S=K.relative(t.cwd,C),P=K.resolve(vt.root,S);s.reject.push(P)};a(K.resolve(e.cwd,Er.lockfile)),a(r.get("cacheFolder")),a(r.get("globalFolder")),a(r.get("installStatePath")),a(r.get("virtualFolder")),a(r.get("yarnPath")),await r.triggerHook(C=>C.populateYarnPaths,e,C=>{a(C)});for(let C of e.workspaces){let S=K.relative(t.cwd,C.cwd);S!==""&&!S.match(/^(\.\.)?\//)&&s.reject.push(`/${S}`)}let n={accept:[],reject:[]},c=t.manifest.publishConfig?.main??t.manifest.main,f=t.manifest.publishConfig?.module??t.manifest.module,p=t.manifest.publishConfig?.browser??t.manifest.browser,h=t.manifest.publishConfig?.bin??t.manifest.bin;c!=null&&n.accept.push(K.resolve(vt.root,c)),f!=null&&n.accept.push(K.resolve(vt.root,f)),typeof p=="string"&&n.accept.push(K.resolve(vt.root,p));for(let C of h.values())n.accept.push(K.resolve(vt.root,C));if(p instanceof Map)for(let[C,S]of p.entries())n.accept.push(K.resolve(vt.root,C)),typeof S=="string"&&n.accept.push(K.resolve(vt.root,S));let E=t.manifest.files!==null;if(E){n.reject.push("/*");for(let C of t.manifest.files)LQe(n.accept,C,{cwd:vt.root})}return await PNt(t.cwd,{hasExplicitFileList:E,globalList:s,ignoreList:n})}async function PNt(t,{hasExplicitFileList:e,globalList:r,ignoreList:s}){let a=[],n=new jf(t),c=[[vt.root,[s]]];for(;c.length>0;){let[f,p]=c.pop(),h=await n.lstatPromise(f);if(!TQe(f,{globalList:r,ignoreLists:h.isDirectory()?null:p}))if(h.isDirectory()){let E=await n.readdirPromise(f),C=!1,S=!1;if(!e||f!==vt.root)for(let R of E)C=C||R===".gitignore",S=S||R===".npmignore";let P=S?await QQe(n,f,".npmignore"):C?await QQe(n,f,".gitignore"):null,I=P!==null?[P].concat(p):p;TQe(f,{globalList:r,ignoreLists:p})&&(I=[...p,{accept:[],reject:["**/*"]}]);for(let R of E)c.push([K.resolve(f,R),I])}else(h.isFile()||h.isSymbolicLink())&&a.push(K.relative(vt.root,f))}return a.sort()}async function QQe(t,e,r){let s={accept:[],reject:[]},a=await t.readFilePromise(K.join(e,r),"utf8");for(let n of a.split(/\n/g))LQe(s.reject,n,{cwd:e});return s}function xNt(t,{cwd:e}){let r=t[0]==="!";return r&&(t=t.slice(1)),t.match(/\.{0,1}\//)&&(t=K.resolve(e,t)),r&&(t=`!${t}`),t}function LQe(t,e,{cwd:r}){let s=e.trim();s===""||s[0]==="#"||t.push(xNt(s,{cwd:r}))}function TQe(t,{globalList:e,ignoreLists:r}){let s=NN(t,e.accept);if(s!==0)return s===2;let a=NN(t,e.reject);if(a!==0)return a===1;if(r!==null)for(let n of r){let c=NN(t,n.accept);if(c!==0)return c===2;let f=NN(t,n.reject);if(f!==0)return f===1}return!1}function NN(t,e){let r=e,s=[];for(let a=0;a{await ZV(a,{report:p},async()=>{p.reportJson({base:ue.fromPortablePath(a.cwd)});let h=await ON(a);for(let E of h)p.reportInfo(null,ue.fromPortablePath(E)),p.reportJson({location:ue.fromPortablePath(E)});if(!this.dryRun){let E=await XV(a,h);await le.mkdirPromise(K.dirname(c),{recursive:!0});let C=le.createWriteStream(c);E.pipe(C),await new Promise(S=>{C.on("finish",S)})}}),this.dryRun||(p.reportInfo(0,`Package archive generated in ${he.pretty(r,c,he.Type.PATH)}`),p.reportJson({output:ue.fromPortablePath(c)}))})).exitCode()}};function kNt(t,{workspace:e}){let r=t.replace("%s",QNt(e)).replace("%v",TNt(e));return ue.toPortablePath(r)}function QNt(t){return t.manifest.name!==null?q.slugifyIdent(t.manifest.name):"package"}function TNt(t){return t.manifest.version!==null?t.manifest.version:"unknown"}var RNt=["dependencies","devDependencies","peerDependencies"],FNt="workspace:",NNt=(t,e)=>{e.publishConfig&&(e.publishConfig.type&&(e.type=e.publishConfig.type),e.publishConfig.main&&(e.main=e.publishConfig.main),e.publishConfig.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.module&&(e.module=e.publishConfig.module),e.publishConfig.exports&&(e.exports=e.publishConfig.exports),e.publishConfig.imports&&(e.imports=e.publishConfig.imports),e.publishConfig.bin&&(e.bin=e.publishConfig.bin));let r=t.project;for(let s of RNt)for(let a of t.manifest.getForScope(s).values()){let n=r.tryWorkspaceByDescriptor(a),c=q.parseRange(a.range);if(c.protocol===FNt)if(n===null){if(r.tryWorkspaceByIdent(a)===null)throw new Yt(21,`${q.prettyDescriptor(r.configuration,a)}: No local workspace found for this range`)}else{let f;q.areDescriptorsEqual(a,n.anchoredDescriptor)||c.selector==="*"?f=n.manifest.version??"0.0.0":c.selector==="~"||c.selector==="^"?f=`${c.selector}${n.manifest.version??"0.0.0"}`:f=c.selector;let p=s==="dependencies"?q.makeDescriptor(a,"unknown"):null,h=p!==null&&t.manifest.ensureDependencyMeta(p).optional?"optionalDependencies":s;e[h][q.stringifyIdent(a)]=f}}},ONt={hooks:{beforeWorkspacePacking:NNt},commands:[Hw]},LNt=ONt;var KNe=et(YQe());Ve();var YNe=et(WNe()),{env:Bt}=process,_Ht="application/vnd.in-toto+json",UHt="https://in-toto.io/Statement/v0.1",HHt="https://in-toto.io/Statement/v1",jHt="https://slsa.dev/provenance/v0.2",qHt="https://slsa.dev/provenance/v1",GHt="https://github.com/actions/runner",WHt="https://slsa-framework.github.io/github-actions-buildtypes/workflow/v1",YHt="https://github.com/npm/cli/gitlab",VHt="v0alpha1",VNe=async(t,e)=>{let r;if(Bt.GITHUB_ACTIONS){if(!Bt.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Yt(91,'Provenance generation in GitHub Actions requires "write" access to the "id-token" permission');let s=(Bt.GITHUB_WORKFLOW_REF||"").replace(`${Bt.GITHUB_REPOSITORY}/`,""),a=s.indexOf("@"),n=s.slice(0,a),c=s.slice(a+1);r={_type:HHt,subject:t,predicateType:qHt,predicate:{buildDefinition:{buildType:WHt,externalParameters:{workflow:{ref:c,repository:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}`,path:n}},internalParameters:{github:{event_name:Bt.GITHUB_EVENT_NAME,repository_id:Bt.GITHUB_REPOSITORY_ID,repository_owner_id:Bt.GITHUB_REPOSITORY_OWNER_ID}},resolvedDependencies:[{uri:`git+${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}@${Bt.GITHUB_REF}`,digest:{gitCommit:Bt.GITHUB_SHA}}]},runDetails:{builder:{id:`${GHt}/${Bt.RUNNER_ENVIRONMENT}`},metadata:{invocationId:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}/actions/runs/${Bt.GITHUB_RUN_ID}/attempts/${Bt.GITHUB_RUN_ATTEMPT}`}}}}}else if(Bt.GITLAB_CI){if(!Bt.SIGSTORE_ID_TOKEN)throw new Yt(91,`Provenance generation in GitLab CI requires "SIGSTORE_ID_TOKEN" with "sigstore" audience to be present in "id_tokens". For more info see: -https://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html`);r={_type:UHt,subject:t,predicateType:jHt,predicate:{buildType:`${YHt}/${VHt}`,builder:{id:`${Bt.CI_PROJECT_URL}/-/runners/${Bt.CI_RUNNER_ID}`},invocation:{configSource:{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA},entryPoint:Bt.CI_JOB_NAME},parameters:{CI:Bt.CI,CI_API_GRAPHQL_URL:Bt.CI_API_GRAPHQL_URL,CI_API_V4_URL:Bt.CI_API_V4_URL,CI_BUILD_BEFORE_SHA:Bt.CI_BUILD_BEFORE_SHA,CI_BUILD_ID:Bt.CI_BUILD_ID,CI_BUILD_NAME:Bt.CI_BUILD_NAME,CI_BUILD_REF:Bt.CI_BUILD_REF,CI_BUILD_REF_NAME:Bt.CI_BUILD_REF_NAME,CI_BUILD_REF_SLUG:Bt.CI_BUILD_REF_SLUG,CI_BUILD_STAGE:Bt.CI_BUILD_STAGE,CI_COMMIT_BEFORE_SHA:Bt.CI_COMMIT_BEFORE_SHA,CI_COMMIT_BRANCH:Bt.CI_COMMIT_BRANCH,CI_COMMIT_REF_NAME:Bt.CI_COMMIT_REF_NAME,CI_COMMIT_REF_PROTECTED:Bt.CI_COMMIT_REF_PROTECTED,CI_COMMIT_REF_SLUG:Bt.CI_COMMIT_REF_SLUG,CI_COMMIT_SHA:Bt.CI_COMMIT_SHA,CI_COMMIT_SHORT_SHA:Bt.CI_COMMIT_SHORT_SHA,CI_COMMIT_TIMESTAMP:Bt.CI_COMMIT_TIMESTAMP,CI_COMMIT_TITLE:Bt.CI_COMMIT_TITLE,CI_CONFIG_PATH:Bt.CI_CONFIG_PATH,CI_DEFAULT_BRANCH:Bt.CI_DEFAULT_BRANCH,CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_SERVER:Bt.CI_DEPENDENCY_PROXY_SERVER,CI_DEPENDENCY_PROXY_USER:Bt.CI_DEPENDENCY_PROXY_USER,CI_JOB_ID:Bt.CI_JOB_ID,CI_JOB_NAME:Bt.CI_JOB_NAME,CI_JOB_NAME_SLUG:Bt.CI_JOB_NAME_SLUG,CI_JOB_STAGE:Bt.CI_JOB_STAGE,CI_JOB_STARTED_AT:Bt.CI_JOB_STARTED_AT,CI_JOB_URL:Bt.CI_JOB_URL,CI_NODE_TOTAL:Bt.CI_NODE_TOTAL,CI_PAGES_DOMAIN:Bt.CI_PAGES_DOMAIN,CI_PAGES_URL:Bt.CI_PAGES_URL,CI_PIPELINE_CREATED_AT:Bt.CI_PIPELINE_CREATED_AT,CI_PIPELINE_ID:Bt.CI_PIPELINE_ID,CI_PIPELINE_IID:Bt.CI_PIPELINE_IID,CI_PIPELINE_SOURCE:Bt.CI_PIPELINE_SOURCE,CI_PIPELINE_URL:Bt.CI_PIPELINE_URL,CI_PROJECT_CLASSIFICATION_LABEL:Bt.CI_PROJECT_CLASSIFICATION_LABEL,CI_PROJECT_DESCRIPTION:Bt.CI_PROJECT_DESCRIPTION,CI_PROJECT_ID:Bt.CI_PROJECT_ID,CI_PROJECT_NAME:Bt.CI_PROJECT_NAME,CI_PROJECT_NAMESPACE:Bt.CI_PROJECT_NAMESPACE,CI_PROJECT_NAMESPACE_ID:Bt.CI_PROJECT_NAMESPACE_ID,CI_PROJECT_PATH:Bt.CI_PROJECT_PATH,CI_PROJECT_PATH_SLUG:Bt.CI_PROJECT_PATH_SLUG,CI_PROJECT_REPOSITORY_LANGUAGES:Bt.CI_PROJECT_REPOSITORY_LANGUAGES,CI_PROJECT_ROOT_NAMESPACE:Bt.CI_PROJECT_ROOT_NAMESPACE,CI_PROJECT_TITLE:Bt.CI_PROJECT_TITLE,CI_PROJECT_URL:Bt.CI_PROJECT_URL,CI_PROJECT_VISIBILITY:Bt.CI_PROJECT_VISIBILITY,CI_REGISTRY:Bt.CI_REGISTRY,CI_REGISTRY_IMAGE:Bt.CI_REGISTRY_IMAGE,CI_REGISTRY_USER:Bt.CI_REGISTRY_USER,CI_RUNNER_DESCRIPTION:Bt.CI_RUNNER_DESCRIPTION,CI_RUNNER_ID:Bt.CI_RUNNER_ID,CI_RUNNER_TAGS:Bt.CI_RUNNER_TAGS,CI_SERVER_HOST:Bt.CI_SERVER_HOST,CI_SERVER_NAME:Bt.CI_SERVER_NAME,CI_SERVER_PORT:Bt.CI_SERVER_PORT,CI_SERVER_PROTOCOL:Bt.CI_SERVER_PROTOCOL,CI_SERVER_REVISION:Bt.CI_SERVER_REVISION,CI_SERVER_SHELL_SSH_HOST:Bt.CI_SERVER_SHELL_SSH_HOST,CI_SERVER_SHELL_SSH_PORT:Bt.CI_SERVER_SHELL_SSH_PORT,CI_SERVER_URL:Bt.CI_SERVER_URL,CI_SERVER_VERSION:Bt.CI_SERVER_VERSION,CI_SERVER_VERSION_MAJOR:Bt.CI_SERVER_VERSION_MAJOR,CI_SERVER_VERSION_MINOR:Bt.CI_SERVER_VERSION_MINOR,CI_SERVER_VERSION_PATCH:Bt.CI_SERVER_VERSION_PATCH,CI_TEMPLATE_REGISTRY_HOST:Bt.CI_TEMPLATE_REGISTRY_HOST,GITLAB_CI:Bt.GITLAB_CI,GITLAB_FEATURES:Bt.GITLAB_FEATURES,GITLAB_USER_ID:Bt.GITLAB_USER_ID,GITLAB_USER_LOGIN:Bt.GITLAB_USER_LOGIN,RUNNER_GENERATE_ARTIFACTS_METADATA:Bt.RUNNER_GENERATE_ARTIFACTS_METADATA},environment:{name:Bt.CI_RUNNER_DESCRIPTION,architecture:Bt.CI_RUNNER_EXECUTABLE_ARCH,server:Bt.CI_SERVER_URL,project:Bt.CI_PROJECT_PATH,job:{id:Bt.CI_JOB_ID},pipeline:{id:Bt.CI_PIPELINE_ID,ref:Bt.CI_CONFIG_PATH}}},metadata:{buildInvocationId:`${Bt.CI_JOB_URL}`,completeness:{parameters:!0,environment:!0,materials:!1},reproducible:!1},materials:[{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA}}]}}}else throw new Yt(91,"Provenance generation is only supported in GitHub Actions and GitLab CI");return YNe.attest(Buffer.from(JSON.stringify(r)),_Ht,e)};async function KHt(t,e,{access:r,tag:s,registry:a,gitHead:n,provenance:c}){let f=t.manifest.name,p=t.manifest.version,h=q.stringifyIdent(f),E=KNe.default.fromData(e,{algorithms:["sha1","sha512"]}),C=r??JNe(t,f),S=await zNe(t),P=await IA.genPackageManifest(t),I=`${h}-${p}.tgz`,R=new URL(`${zc(a)}/${h}/-/${I}`),N={[I]:{content_type:"application/octet-stream",data:e.toString("base64"),length:e.length}};if(c){let U={name:`pkg:npm/${h.replace(/^@/,"%40")}@${p}`,digest:{sha512:E.sha512[0].hexDigest()}},W=await VNe([U]),te=JSON.stringify(W);N[`${h}-${p}.sigstore`]={content_type:W.mediaType,data:te,length:te.length}}return{_id:h,_attachments:N,name:h,access:C,"dist-tags":{[s]:p},versions:{[p]:{...P,_id:`${h}@${p}`,name:h,version:p,gitHead:n,dist:{shasum:E.sha1[0].hexDigest(),integrity:E.sha512[0].toString(),tarball:R.toString()}}},readme:S}}async function JHt(t){try{let{stdout:e}=await Gr.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:t});return e.trim()===""?void 0:e.trim()}catch{return}}function JNe(t,e){let r=t.project.configuration;return t.manifest.publishConfig&&typeof t.manifest.publishConfig.access=="string"?t.manifest.publishConfig.access:r.get("npmPublishAccess")!==null?r.get("npmPublishAccess"):e.scope?"restricted":"public"}async function zNe(t){let e=ue.toPortablePath(`${t.cwd}/README.md`),r=t.manifest.name,a=`# ${q.stringifyIdent(r)} -`;try{a=await le.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var sz={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},ZNe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},zHt={configuration:{...sz,...ZNe,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...sz,...ZNe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:zc,valueDefinition:{description:"",type:"SHAPE",properties:{...sz}}}},fetchers:[rb,lh],resolvers:[nb,ib,sb]},ZHt=zHt;var gz={};Vt(gz,{NpmAuditCommand:()=>S1,NpmInfoCommand:()=>D1,NpmLoginCommand:()=>b1,NpmLogoutCommand:()=>x1,NpmPublishCommand:()=>k1,NpmTagAddCommand:()=>T1,NpmTagListCommand:()=>Q1,NpmTagRemoveCommand:()=>R1,NpmWhoamiCommand:()=>F1,default:()=>ijt,npmAuditTypes:()=>sP,npmAuditUtils:()=>QL});Ve();Ve();Wt();var fz=et(Sa());Ul();var sP={};Vt(sP,{Environment:()=>nP,Severity:()=>iP});var nP=(s=>(s.All="all",s.Production="production",s.Development="development",s))(nP||{}),iP=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(iP||{});var QL={};Vt(QL,{allSeverities:()=>v1,getPackages:()=>uz,getReportTree:()=>lz,getSeverityInclusions:()=>az,getTopLevelDependencies:()=>cz});Ve();var XNe=et(Ai());var v1=["info","low","moderate","high","critical"];function az(t){if(typeof t>"u")return new Set(v1);let e=v1.indexOf(t),r=v1.slice(e);return new Set(r)}function lz(t){let e={},r={children:e};for(let[s,a]of je.sortMap(Object.entries(t),n=>n[0]))for(let n of je.sortMap(a,c=>`${c.id}`))e[`${s}/${n.id}`]={value:he.tuple(he.Type.IDENT,q.parseIdent(s)),children:{ID:typeof n.id<"u"&&{label:"ID",value:he.tuple(he.Type.ID,n.id)},Issue:{label:"Issue",value:he.tuple(he.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:he.tuple(he.Type.URL,n.url)},Severity:{label:"Severity",value:he.tuple(he.Type.NO_HINT,n.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:he.tuple(he.Type.RANGE,n.vulnerable_versions)},"Tree Versions":{label:"Tree Versions",children:[...n.versions].sort(XNe.default.compare).map(c=>({value:he.tuple(he.Type.REFERENCE,c)}))},Dependents:{label:"Dependents",children:je.sortMap(n.dependents,c=>q.stringifyLocator(c)).map(c=>({value:he.tuple(he.Type.LOCATOR,c)}))}}};return r}function cz(t,e,{all:r,environment:s}){let a=[],n=r?t.workspaces:[e],c=["all","production"].includes(s),f=["all","development"].includes(s);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!f:!c)||a.push({workspace:p,dependency:h});return a}function uz(t,e,{recursive:r}){let s=new Map,a=new Set,n=[],c=(f,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");if(q.ensureDevirtualizedLocator(E).reference.startsWith("npm:")&&E.version!==null){let S=q.stringifyIdent(E),P=je.getMapWithDefault(s,S);je.getArrayWithDefault(P,E.version).push(f)}if(r)for(let S of E.dependencies.values())n.push([E,S])};for(let{workspace:f,dependency:p}of e)n.push([f.anchoredLocator,p]);for(;n.length>0;){let[f,p]=n.shift();c(f,p)}return s}var S1=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=ge.String("--environment","all",{description:"Which environments to cover",validator:po(nP)});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.noDeprecations=ge.Boolean("--no-deprecations",!1,{description:"Don't warn about deprecated packages"});this.severity=ge.String("--severity","info",{description:"Minimal severity requested for packages to be displayed",validator:po(iP)});this.excludes=ge.Array("--exclude",[],{description:"Array of glob patterns of packages to exclude from audit"});this.ignores=ge.Array("--ignore",[],{description:"Array of glob patterns of advisory ID's to ignore in the audit report"})}static{this.paths=[["npm","audit"]]}static{this.usage=ot.Usage({description:"perform a vulnerability audit against the installed packages",details:` - This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths). - - For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`. - - Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${v1.map(r=>`\`${r}\``).join(", ")}. - - If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages. - - If certain packages produce false positives for a particular environment, the \`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option. - - If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option. - - To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why package\` to get more information as to who depends on them. - `,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=cz(s,a,{all:this.all,environment:this.environment}),c=uz(s,n,{recursive:this.recursive}),f=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes])),p=Object.create(null);for(let[N,U]of c)f.some(W=>fz.default.isMatch(N,W))||(p[N]=[...U.keys()]);let h=hi.getAuditRegistry({configuration:r}),E,C=await uA.start({configuration:r,stdout:this.context.stdout},async()=>{let N=an.post("/-/npm/v1/security/advisories/bulk",p,{authType:an.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([te,ie])=>{let Ae=await an.getPackageMetadata(q.parseIdent(te),{project:s});return je.mapAndFilter(ie,ce=>{let{deprecated:me}=Ae.versions[ce];return me?[te,ce,me]:je.mapAndFilter.skip})})),W=await N;for(let[te,ie,Ae]of U.flat(1))Object.hasOwn(W,te)&&W[te].some(ce=>Or.satisfiesWithPrereleases(ie,ce.vulnerable_versions))||(W[te]??=[],W[te].push({id:`${te} (deprecation)`,title:(typeof Ae=="string"?Ae:"").trim()||"This package has been deprecated.",severity:"moderate",vulnerable_versions:ie}));E=W});if(C.hasErrors())return C.exitCode();let S=az(this.severity),P=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores])),I=Object.create(null);for(let[N,U]of Object.entries(E)){let W=U.filter(te=>!fz.default.isMatch(`${te.id}`,P)&&S.has(te.severity));W.length>0&&(I[N]=W.map(te=>{let ie=c.get(N);if(typeof ie>"u")throw new Error("Assertion failed: Expected the registry to only return packages that were requested");let Ae=[...ie.keys()].filter(me=>Or.satisfiesWithPrereleases(me,te.vulnerable_versions)),ce=new Map;for(let me of Ae)for(let pe of ie.get(me))ce.set(pe.locatorHash,pe);return{...te,versions:Ae,dependents:[...ce.values()]}}))}let R=Object.keys(I).length>0;return R?(Qs.emitTree(lz(I),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async N=>{N.reportInfo(1,"No audit suggestions")}),R?1:0)}};Ve();Ve();bt();Wt();var Az=et(Ai()),pz=Ie("util"),D1=class extends ut{constructor(){super(...arguments);this.fields=ge.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=ge.Rest()}static{this.paths=[["npm","info"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],c=!1,f=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let E;if(h==="."){let ie=s.topLevelWorkspace;if(!ie.manifest.name)throw new nt(`Missing ${he.pretty(r,"name",he.Type.CODE)} field in ${ue.fromPortablePath(K.join(ie.cwd,Er.manifest))}`);E=q.makeDescriptor(ie.manifest.name,"unknown")}else E=q.parseDescriptor(h);let C=an.getIdentUrl(E),S=hz(await an.get(C,{configuration:r,ident:E,jsonResponse:!0,customErrorMessage:an.customPackageError})),P=Object.keys(S.versions).sort(Az.default.compareLoose),R=S["dist-tags"].latest||P[P.length-1],N=Or.validRange(E.range);if(N){let ie=Az.default.maxSatisfying(P,N);ie!==null?R=ie:(p.reportWarning(0,`Unmet range ${q.prettyRange(r,E.range)}; falling back to the latest version`),c=!0)}else Object.hasOwn(S["dist-tags"],E.range)?R=S["dist-tags"][E.range]:E.range!=="unknown"&&(p.reportWarning(0,`Unknown tag ${q.prettyRange(r,E.range)}; falling back to the latest version`),c=!0);let U=S.versions[R],W={...S,...U,version:R,versions:P},te;if(a!==null){te={};for(let ie of a){let Ae=W[ie];if(typeof Ae<"u")te[ie]=Ae;else{p.reportWarning(1,`The ${he.pretty(r,ie,he.Type.CODE)} field doesn't exist inside ${q.prettyIdent(r,E)}'s information`),c=!0;continue}}}else this.json||(delete W.dist,delete W.readme,delete W.users),te=W;p.reportJson(te),this.json||n.push(te)}});pz.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||c)&&this.context.stdout.write(` -`),this.context.stdout.write(`${(0,pz.inspect)(p,{depth:1/0,colors:!0,compact:!1})} -`);return f.exitCode()}};function hz(t){if(Array.isArray(t)){let e=[];for(let r of t)r=hz(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let s=hz(t[r]);s&&(e[r]=s)}return e}else return t||null}Ve();Ve();Wt();var $Ne=et(nS()),b1=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=ge.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}static{this.paths=[["npm","login"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await TL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ot.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let c=await ejt({configuration:r,registry:s,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),f=await XHt(s,c,r);return await $Ht(s,f,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};async function TL({scope:t,publish:e,configuration:r,cwd:s}){return t&&e?hi.getScopeRegistry(t,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):t?hi.getScopeRegistry(t,{configuration:r}):e?hi.getPublishRegistry((await eC(r,s)).manifest,{configuration:r}):hi.getDefaultRegistry({configuration:r})}async function XHt(t,e,r){let s=`/-/user/org.couchdb.user:${encodeURIComponent(e.name)}`,a={_id:`org.couchdb.user:${e.name}`,name:e.name,password:e.password,type:"user",roles:[],date:new Date().toISOString()},n={attemptedAs:e.name,configuration:r,registry:t,jsonResponse:!0,authType:an.AuthType.NO_AUTH};try{return(await an.put(s,a,n)).token}catch(E){if(!(E.originalError?.name==="HTTPError"&&E.originalError?.response.statusCode===409))throw E}let c={...n,authType:an.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${e.name}:${e.password}`).toString("base64")}`}},f=await an.get(s,c);for(let[E,C]of Object.entries(f))(!a[E]||E==="roles")&&(a[E]=C);let p=`${s}/-rev/${a._rev}`;return(await an.put(p,a,c)).token}async function $Ht(t,e,{alwaysAuth:r,scope:s}){let a=c=>f=>{let p=je.isIndexableObject(f)?f:{},h=p[c],E=je.isIndexableObject(h)?h:{};return{...p,[c]:{...E,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=s?{npmScopes:a(s)}:{npmRegistries:a(t)};return await ze.updateHomeConfiguration(n)}async function ejt({configuration:t,registry:e,report:r,stdin:s,stdout:a}){r.reportInfo(0,`Logging in to ${he.pretty(t,e,he.Type.URL)}`);let n=!1;if(e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(0,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),r.reportSeparator(),t.env.YARN_IS_TEST_ENV)return{name:t.env.YARN_INJECT_NPM_USER||"",password:t.env.YARN_INJECT_NPM_PASSWORD||""};let c=await(0,$Ne.prompt)([{type:"input",name:"name",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a}]);return r.reportSeparator(),c}Ve();Ve();Wt();var P1=new Set(["npmAuthIdent","npmAuthToken"]),x1=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=ge.Boolean("-A,--all",!1,{description:"Logout of all registries"})}static{this.paths=[["npm","logout"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=async()=>{let n=await TL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),c=await ze.find(this.context.cwd,this.context.plugins),f=q.makeIdent(this.scope??null,"pkg");return!hi.getAuthConfiguration(n,{configuration:c,ident:f}).get("npmAuthToken")};return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{if(this.all&&(await rjt(),n.reportInfo(0,"Successfully logged out from everything")),this.scope){await eOe("npmScopes",this.scope),await s()?n.reportInfo(0,`Successfully logged out from ${this.scope}`):n.reportWarning(0,"Scope authentication settings removed, but some other ones settings still apply to it");return}let c=await TL({configuration:r,cwd:this.context.cwd,publish:this.publish});await eOe("npmRegistries",c),await s()?n.reportInfo(0,`Successfully logged out from ${c}`):n.reportWarning(0,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}};function tjt(t,e){let r=t[e];if(!je.isIndexableObject(r))return!1;let s=new Set(Object.keys(r));if([...P1].every(n=>!s.has(n)))return!1;for(let n of P1)s.delete(n);if(s.size===0)return t[e]=void 0,!0;let a={...r};for(let n of P1)delete a[n];return t[e]=a,!0}async function rjt(){let t=e=>{let r=!1,s=je.isIndexableObject(e)?{...e}:{};s.npmAuthToken&&(delete s.npmAuthToken,r=!0);for(let a of Object.keys(s))tjt(s,a)&&(r=!0);if(Object.keys(s).length!==0)return r?s:e};return await ze.updateHomeConfiguration({npmRegistries:t,npmScopes:t})}async function eOe(t,e){return await ze.updateHomeConfiguration({[t]:r=>{let s=je.isIndexableObject(r)?r:{};if(!Object.hasOwn(s,e))return r;let a=s[e],n=je.isIndexableObject(a)?a:{},c=new Set(Object.keys(n));if([...P1].every(p=>!c.has(p)))return r;for(let p of P1)c.delete(p);if(c.size===0)return Object.keys(s).length===1?void 0:{...s,[e]:void 0};let f={};for(let p of P1)f[p]=void 0;return{...s,[e]:{...n,...f}}}})}Ve();Wt();var k1=class extends ut{constructor(){super(...arguments);this.access=ge.String("--access",{description:"The access for the published package (public or restricted)"});this.tag=ge.String("--tag","latest",{description:"The tag on the registry that the package should be attached to"});this.tolerateRepublish=ge.Boolean("--tolerate-republish",!1,{description:"Warn and exit when republishing an already existing version of a package"});this.otp=ge.String("--otp",{description:"The OTP token to use with the command"});this.provenance=ge.Boolean("--provenance",!1,{description:"Generate provenance for the package. Only available in GitHub Actions and GitLab CI. Can be set globally through the `npmPublishProvenance` setting or the `YARN_NPM_CONFIG_PROVENANCE` environment variable, or per-package through the `publishConfig.provenance` field in package.json."})}static{this.paths=[["npm","publish"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overridden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);if(a.manifest.private)throw new nt("Private workspaces cannot be published");if(a.manifest.name===null||a.manifest.version===null)throw new nt("Workspaces must have valid names and versions to be published on an external registry");await s.restoreInstallState();let n=a.manifest.name,c=a.manifest.version,f=hi.getPublishRegistry(a.manifest,{configuration:r});return(await Ot.start({configuration:r,stdout:this.context.stdout},async h=>{if(this.tolerateRepublish)try{let E=await an.get(an.getIdentUrl(n),{configuration:r,registry:f,ident:n,jsonResponse:!0});if(!Object.hasOwn(E,"versions"))throw new Yt(15,'Registry returned invalid data for - missing "versions" field');if(Object.hasOwn(E.versions,c)){h.reportWarning(0,`Registry already knows about version ${c}; skipping.`);return}}catch(E){if(E.originalError?.response?.statusCode!==404)throw E}await In.maybeExecuteWorkspaceLifecycleScript(a,"prepublish",{report:h}),await IA.prepareForPack(a,{report:h},async()=>{let E=await IA.genPackList(a);for(let N of E)h.reportInfo(null,N);let C=await IA.genPackStream(a,E),S=await je.bufferStream(C),P=await B1.getGitHead(a.cwd),I=!1;a.manifest.publishConfig&&"provenance"in a.manifest.publishConfig?(I=!!a.manifest.publishConfig.provenance,I?h.reportInfo(null,"Generating provenance statement because `publishConfig.provenance` field is set."):h.reportInfo(null,"Skipping provenance statement because `publishConfig.provenance` field is set to false.")):this.provenance?(I=!0,h.reportInfo(null,"Generating provenance statement because `--provenance` flag is set.")):r.get("npmPublishProvenance")&&(I=!0,h.reportInfo(null,"Generating provenance statement because `npmPublishProvenance` setting is set."));let R=await B1.makePublishBody(a,S,{access:this.access,tag:this.tag,registry:f,gitHead:P,provenance:I});await an.put(an.getIdentUrl(n),R,{configuration:r,registry:f,ident:n,otp:this.otp,jsonResponse:!0})}),h.reportInfo(0,"Package archive published")})).exitCode()}};Ve();Wt();var tOe=et(Ai());Ve();bt();Wt();var Q1=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=ge.String({required:!1})}static{this.paths=[["npm","tag","list"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:` - This command will list all tags of a package from the npm registry. - - If the package is not specified, Yarn will default to the current workspace. - `,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n;if(typeof this.package<"u")n=q.parseIdent(this.package);else{if(!a)throw new ar(s.cwd,this.context.cwd);if(!a.manifest.name)throw new nt(`Missing 'name' field in ${ue.fromPortablePath(K.join(a.cwd,Er.manifest))}`);n=a.manifest.name}let c=await oP(n,r),p={children:je.sortMap(Object.entries(c),([h])=>h).map(([h,E])=>({value:he.tuple(he.Type.RESOLUTION,{descriptor:q.makeDescriptor(n,h),locator:q.makeLocator(n,E)})}))};return Qs.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function oP(t,e){let r=`/-/package${an.getIdentUrl(t)}/dist-tags`;return an.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:an.customPackageError})}var T1=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[["npm","tag","add"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:` - This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten. - `,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=q.parseDescriptor(this.package,!0),c=n.range;if(!tOe.default.valid(c))throw new nt(`The range ${he.pretty(r,n.range,he.Type.RANGE)} must be a valid semver version`);let f=hi.getPublishRegistry(a.manifest,{configuration:r}),p=he.pretty(r,n,he.Type.IDENT),h=he.pretty(r,c,he.Type.RANGE),E=he.pretty(r,this.tag,he.Type.CODE);return(await Ot.start({configuration:r,stdout:this.context.stdout},async S=>{let P=await oP(n,r);Object.hasOwn(P,this.tag)&&P[this.tag]===c&&S.reportWarning(0,`Tag ${E} is already set to version ${h}`);let I=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.put(I,c,{configuration:r,registry:f,ident:n,jsonRequest:!0,jsonResponse:!0}),S.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};Ve();Wt();var R1=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[["npm","tag","remove"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:` - This command will remove a tag from a package from the npm registry. - `,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]})}async execute(){if(this.tag==="latest")throw new nt("The 'latest' tag cannot be removed.");let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=q.parseIdent(this.package),c=hi.getPublishRegistry(a.manifest,{configuration:r}),f=he.pretty(r,this.tag,he.Type.CODE),p=he.pretty(r,n,he.Type.IDENT),h=await oP(n,r);if(!Object.hasOwn(h,this.tag))throw new nt(`${f} is not a tag of package ${p}`);return(await Ot.start({configuration:r,stdout:this.context.stdout},async C=>{let S=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.del(S,{configuration:r,registry:c,ident:n,jsonResponse:!0}),C.reportInfo(0,`Tag ${f} removed from package ${p}`)})).exitCode()}};Ve();Ve();Wt();var F1=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Print username for the publish registry"})}static{this.paths=[["npm","whoami"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s;return this.scope&&this.publish?s=hi.getScopeRegistry(this.scope,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):this.scope?s=hi.getScopeRegistry(this.scope,{configuration:r}):this.publish?s=hi.getPublishRegistry((await eC(r,this.context.cwd)).manifest,{configuration:r}):s=hi.getDefaultRegistry({configuration:r}),(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c;try{c=await an.get("/-/whoami",{configuration:r,registry:s,authType:an.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?q.makeIdent(this.scope,""):void 0})}catch(f){if(f.response?.statusCode===401||f.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw f}n.reportInfo(0,c.username)})).exitCode()}};var njt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmPublishProvenance:{description:"Whether to generate provenance for the published packages",type:"BOOLEAN",default:!1},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[S1,D1,b1,x1,k1,T1,Q1,R1,F1]},ijt=njt;var wz={};Vt(wz,{PatchCommand:()=>U1,PatchCommitCommand:()=>_1,PatchFetcher:()=>fP,PatchResolver:()=>AP,default:()=>wjt,patchUtils:()=>hy});Ve();Ve();bt();rA();var hy={};Vt(hy,{applyPatchFile:()=>FL,diffFolders:()=>Iz,ensureUnpatchedDescriptor:()=>dz,ensureUnpatchedLocator:()=>OL,extractPackageToDisk:()=>Ez,extractPatchFlags:()=>lOe,isParentRequired:()=>yz,isPatchDescriptor:()=>NL,isPatchLocator:()=>Tg,loadPatchFiles:()=>uP,makeDescriptor:()=>LL,makeLocator:()=>mz,makePatchHash:()=>Cz,parseDescriptor:()=>lP,parseLocator:()=>cP,parsePatchFile:()=>aP,unpatchDescriptor:()=>Ejt,unpatchLocator:()=>Ijt});Ve();bt();Ve();bt();var sjt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function N1(t){return K.relative(vt.root,K.resolve(vt.root,ue.toPortablePath(t)))}function ojt(t){let e=t.trim().match(sjt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var ajt=420,ljt=493;var rOe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),cjt=t=>({header:ojt(t),parts:[]}),ujt={"@":"header","-":"deletion","+":"insertion"," ":"context","\\":"pragma",undefined:"context"};function fjt(t){let e=[],r=rOe(),s="parsing header",a=null,n=null;function c(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function f(){c(),e.push(r),r=rOe()}for(let p=0;p0?"patch":"mode change",W=null;switch(U){case"rename":{if(!E||!C)throw new Error("Bad parser state: rename from & to not given");e.push({type:"rename",semverExclusivity:s,fromPath:N1(E),toPath:N1(C)}),W=C}break;case"file deletion":{let te=a||I;if(!te)throw new Error("Bad parse state: no path given for file deletion");e.push({type:"file deletion",semverExclusivity:s,hunk:N&&N[0]||null,path:N1(te),mode:RL(p),hash:S})}break;case"file creation":{let te=n||R;if(!te)throw new Error("Bad parse state: no path given for file creation");e.push({type:"file creation",semverExclusivity:s,hunk:N&&N[0]||null,path:N1(te),mode:RL(h),hash:P})}break;case"patch":case"mode change":W=R||n;break;default:je.assertNever(U);break}W&&c&&f&&c!==f&&e.push({type:"mode change",semverExclusivity:s,path:N1(W),oldMode:RL(c),newMode:RL(f)}),W&&N&&N.length&&e.push({type:"patch",semverExclusivity:s,path:N1(W),hunks:N,beforeHash:S,afterHash:P})}if(e.length===0)throw new Error("Unable to parse patch file: No changes found. Make sure the patch is a valid UTF8 encoded string");return e}function RL(t){let e=parseInt(t,8)&511;if(e!==ajt&&e!==ljt)throw new Error(`Unexpected file mode string: ${t}`);return e}function aP(t){let e=t.split(/\n/g);return e[e.length-1]===""&&e.pop(),Ajt(fjt(e))}function pjt(t){let e=0,r=0;for(let{type:s,lines:a}of t.parts)switch(s){case"context":r+=a.length,e+=a.length;break;case"deletion":e+=a.length;break;case"insertion":r+=a.length;break;default:je.assertNever(s);break}if(e!==t.header.original.length||r!==t.header.patched.length){let s=a=>a<0?a:`+${a}`;throw new Error(`hunk header integrity check failed (expected @@ ${s(t.header.original.length)} ${s(t.header.patched.length)} @@, got @@ ${s(e)} ${s(r)} @@)`)}}Ve();bt();var O1=class extends Error{constructor(r,s){super(`Cannot apply hunk #${r+1}`);this.hunk=s}};async function L1(t,e,r){let s=await t.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await t.lutimesPromise(e,s.atime,s.mtime)}async function FL(t,{baseFs:e=new Yn,dryRun:r=!1,version:s=null}={}){for(let a of t)if(!(a.semverExclusivity!==null&&s!==null&&!Or.satisfiesWithPrereleases(s,a.semverExclusivity)))switch(a.type){case"file deletion":if(r){if(!e.existsSync(a.path))throw new Error(`Trying to delete a file that doesn't exist: ${a.path}`)}else await L1(e,K.dirname(a.path),async()=>{await e.unlinkPromise(a.path)});break;case"rename":if(r){if(!e.existsSync(a.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${a.fromPath}`)}else await L1(e,K.dirname(a.fromPath),async()=>{await L1(e,K.dirname(a.toPath),async()=>{await L1(e,a.fromPath,async()=>(await e.movePromise(a.fromPath,a.toPath),a.toPath))})});break;case"file creation":if(r){if(e.existsSync(a.path))throw new Error(`Trying to create a file that already exists: ${a.path}`)}else{let n=a.hunk?a.hunk.parts[0].lines.join(` -`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":` -`):"";await e.mkdirpPromise(K.dirname(a.path),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,fi.SAFE_TIME,fi.SAFE_TIME)}break;case"patch":await L1(e,a.path,async()=>{await djt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let c=(await e.statPromise(a.path)).mode;if(nOe(a.newMode)!==nOe(c))continue;await L1(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:je.assertNever(a);break}}function nOe(t){return(t&64)>0}function iOe(t){return t.replace(/\s+$/,"")}function gjt(t,e){return iOe(t)===iOe(e)}async function djt({hunks:t,path:e},{baseFs:r,dryRun:s=!1}){let a=await r.statSync(e).mode,c=(await r.readFileSync(e,"utf8")).split(/\n/),f=[],p=0,h=0;for(let C of t){let S=Math.max(h,C.header.patched.start+p),P=Math.max(0,S-h),I=Math.max(0,c.length-S-C.header.original.length),R=Math.max(P,I),N=0,U=0,W=null;for(;N<=R;){if(N<=P&&(U=S-N,W=sOe(C,c,U),W!==null)){N=-N;break}if(N<=I&&(U=S+N,W=sOe(C,c,U),W!==null))break;N+=1}if(W===null)throw new O1(t.indexOf(C),C);f.push(W),p+=N,h=U+C.header.original.length}if(s)return;let E=0;for(let C of f)for(let S of C)switch(S.type){case"splice":{let P=S.index+E;c.splice(P,S.numToDelete,...S.linesToInsert),E+=S.linesToInsert.length-S.numToDelete}break;case"pop":c.pop();break;case"push":c.push(S.line);break;default:je.assertNever(S);break}await r.writeFilePromise(e,c.join(` -`),{mode:a})}function sOe(t,e,r){let s=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let c=e[r];if(c==null||!gjt(c,n))return null;r+=1}a.type==="deletion"&&(s.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&s.push({type:"push",line:""}))}break;case"insertion":s.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&s.push({type:"pop"});break;default:je.assertNever(a.type);break}return s}var yjt=/^builtin<([^>]+)>$/;function M1(t,e){let{protocol:r,source:s,selector:a,params:n}=q.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(s===null)throw new Error("Patch locators must explicitly define their source");let c=a?a.split(/&/).map(E=>ue.toPortablePath(E)):[],f=n&&typeof n.locator=="string"?q.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(s);return{parentLocator:f,sourceItem:h,patchPaths:c,sourceVersion:p}}function NL(t){return t.range.startsWith("patch:")}function Tg(t){return t.reference.startsWith("patch:")}function lP(t){let{sourceItem:e,...r}=M1(t.range,q.parseDescriptor);return{...r,sourceDescriptor:e}}function cP(t){let{sourceItem:e,...r}=M1(t.reference,q.parseLocator);return{...r,sourceLocator:e}}function Ejt(t){let{sourceItem:e}=M1(t.range,q.parseDescriptor);return e}function Ijt(t){let{sourceItem:e}=M1(t.reference,q.parseLocator);return e}function dz(t){if(!NL(t))return t;let{sourceItem:e}=M1(t.range,q.parseDescriptor);return e}function OL(t){if(!Tg(t))return t;let{sourceItem:e}=M1(t.reference,q.parseLocator);return e}function oOe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:s,patchHash:a},n){let c=t!==null?{locator:q.stringifyLocator(t)}:{},f=typeof s<"u"?{version:s}:{},p=typeof a<"u"?{hash:a}:{};return q.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...f,...p,...c}})}function LL(t,{parentLocator:e,sourceDescriptor:r,patchPaths:s}){return q.makeDescriptor(t,oOe({parentLocator:e,sourceItem:r,patchPaths:s},q.stringifyDescriptor))}function mz(t,{parentLocator:e,sourcePackage:r,patchPaths:s,patchHash:a}){return q.makeLocator(t,oOe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:a},q.stringifyLocator))}function aOe({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:s},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let c=a.match(yjt);return c!==null?s(c[1]):a.startsWith("~/")?r(a.slice(2)):K.isAbsolute(a)?t(a):e(a)}function lOe(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function yz(t){return aOe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function uP(t,e,r){let s=t!==null?await r.fetcher.fetch(t,r):null,a=s&&s.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,s.localPath)}:s;s&&s!==a&&s.releaseFs&&s.releaseFs();let n=await je.releaseAfterUseAsync(async()=>await Promise.all(e.map(async c=>{let f=lOe(c),p=await aOe({onAbsolute:async h=>await le.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(K.join(a.prefixPath,h),"utf8")},onProject:async h=>await le.readFilePromise(K.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},c);return{...f,source:p}})));for(let c of n)typeof c.source=="string"&&(c.source=c.source.replace(/\r\n?/g,` -`));return n}async function Ez(t,{cache:e,project:r}){let s=r.storedPackages.get(t.locatorHash);if(typeof s>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=OL(t),n=r.storedChecksums,c=new Yi,f=await le.mktempPromise(),p=K.join(f,"source"),h=K.join(f,"user"),E=K.join(f,".yarn-patch.json"),C=r.configuration.makeFetcher(),S=[];try{let P,I;if(t.locatorHash===a.locatorHash){let R=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c});S.push(()=>R.releaseFs?.()),P=R,I=R}else P=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>P.releaseFs?.()),I=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>I.releaseFs?.());await Promise.all([le.copyPromise(p,P.prefixPath,{baseFs:P.packageFs}),le.copyPromise(h,I.prefixPath,{baseFs:I.packageFs}),le.writeJsonPromise(E,{locator:q.stringifyLocator(t),version:s.version})])}finally{for(let P of S)P()}return le.detachTemp(f),h}async function Iz(t,e){let r=ue.fromPortablePath(t).replace(/\\/g,"/"),s=ue.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Gr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,s],{cwd:ue.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH. -The following error was reported by 'git': -${n}`);let c=r.startsWith("/")?f=>f.slice(1):f=>f;return a.replace(new RegExp(`(a|b)(${je.escapeRegExp(`/${c(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${je.escapeRegExp(`/${c(s)}/`)}`,"g"),"$1/").replace(new RegExp(je.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(je.escapeRegExp(`${s}/`),"g"),"")}function Cz(t,e){let r=[];for(let{source:s}of t){if(s===null)continue;let a=aP(s);for(let n of a){let{semverExclusivity:c,...f}=n;c!==null&&e!==null&&!Or.satisfiesWithPrereleases(e,c)||r.push(JSON.stringify(f))}}return Nn.makeHash(`${3}`,...r).slice(0,6)}Ve();function cOe(t,{configuration:e,report:r}){for(let s of t.parts)for(let a of s.lines)switch(s.type){case"context":r.reportInfo(null,` ${he.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${he.pretty(e,a,he.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${he.pretty(e,a,he.Type.ADDED)}`);break;default:je.assertNever(s.type)}}var fP=class{supports(e,r){return!!Tg(e)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async patchPackage(e,r){let{parentLocator:s,sourceLocator:a,sourceVersion:n,patchPaths:c}=cP(e),f=await uP(s,c,r),p=await le.mktempPromise(),h=K.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),C=q.getIdentVendorPath(e),S=new hs(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await je.releaseAfterUseAsync(async()=>{await S.copyPromise(C,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),S.saveAndClose();for(let{source:P,optional:I}of f){if(P===null)continue;let R=new hs(h,{level:r.project.configuration.get("compressionLevel")}),N=new Sn(K.resolve(vt.root,C),{baseFs:R});try{await FL(aP(P),{baseFs:N,version:n})}catch(U){if(!(U instanceof O1))throw U;let W=r.project.configuration.get("enableInlineHunks"),te=!W&&!I?" (set enableInlineHunks for details)":"",ie=`${q.prettyLocator(r.project.configuration,e)}: ${U.message}${te}`,Ae=ce=>{W&&cOe(U.hunk,{configuration:r.project.configuration,report:ce})};if(R.discardAndClose(),I){r.report.reportWarningOnce(66,ie,{reportExtra:Ae});continue}else throw new Yt(66,ie,Ae)}R.saveAndClose()}return new hs(h,{level:r.project.configuration.get("compressionLevel")})}};Ve();var AP=class{supportsDescriptor(e,r){return!!NL(e)}supportsLocator(e,r){return!!Tg(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){let{patchPaths:a}=lP(e);return a.every(n=>!yz(n))?e:q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:s}=lP(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=lP(e),c=await uP(a,n,s.fetchOptions),f=r.sourceDescriptor;if(typeof f>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=Cz(c,f.version);return[mz(e,{parentLocator:a,sourcePackage:f,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:s}=cP(e);return{...await r.resolver.resolve(s,r),...e}}};Ve();bt();Wt();var _1=class extends ut{constructor(){super(...arguments);this.save=ge.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=ge.String()}static{this.paths=[["patch-commit"]]}static{this.usage=ot.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=K.resolve(this.context.cwd,ue.toPortablePath(this.patchFolder)),c=K.join(n,"../source"),f=K.join(n,"../.yarn-patch.json");if(!le.existsSync(c))throw new nt("The argument folder didn't get created by 'yarn patch'");let p=await Iz(c,n),h=await le.readJsonPromise(f),E=q.parseLocator(h.locator,!0);if(!s.storedPackages.has(E.locatorHash))throw new nt("No package found in the project for the given locator");if(!this.save){this.context.stdout.write(p);return}let C=r.get("patchFolder"),S=K.join(C,`${q.slugifyLocator(E)}.patch`);await le.mkdirPromise(C,{recursive:!0}),await le.writeFilePromise(S,p);let P=[],I=new Map;for(let R of s.storedPackages.values()){if(q.isVirtualLocator(R))continue;let N=R.dependencies.get(E.identHash);if(!N)continue;let U=q.ensureDevirtualizedDescriptor(N),W=dz(U),te=s.storedResolutions.get(W.descriptorHash);if(!te)throw new Error("Assertion failed: Expected the resolution to have been registered");if(!s.storedPackages.get(te))throw new Error("Assertion failed: Expected the package to have been registered");let Ae=s.tryWorkspaceByLocator(R);if(Ae)P.push(Ae);else{let ce=s.originalPackages.get(R.locatorHash);if(!ce)throw new Error("Assertion failed: Expected the original package to have been registered");let me=ce.dependencies.get(N.identHash);if(!me)throw new Error("Assertion failed: Expected the original dependency to have been registered");I.set(me.descriptorHash,me)}}for(let R of P)for(let N of Ht.hardDependencies){let U=R.manifest[N].get(E.identHash);if(!U)continue;let W=LL(U,{parentLocator:null,sourceDescriptor:q.convertLocatorToDescriptor(E),patchPaths:[K.join(Er.home,K.relative(s.cwd,S))]});R.manifest[N].set(U.identHash,W)}for(let R of I.values()){let N=LL(R,{parentLocator:null,sourceDescriptor:q.convertLocatorToDescriptor(E),patchPaths:[K.join(Er.home,K.relative(s.cwd,S))]});s.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:q.stringifyIdent(N),description:R.range}},reference:N.range})}await s.persist()}};Ve();bt();Wt();var U1=class extends ut{constructor(){super(...arguments);this.update=ge.Boolean("-u,--update",!1,{description:"Reapply local patches that already apply to this packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=ge.String()}static{this.paths=[["patch"]]}static{this.usage=ot.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n\n Once you're done with your changes, run `yarn patch-commit -s path` (with `path` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n\n Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=q.parseLocator(this.package);if(c.reference==="unknown"){let f=je.mapAndFilter([...s.storedPackages.values()],p=>p.identHash!==c.identHash?je.mapAndFilter.skip:q.isVirtualLocator(p)?je.mapAndFilter.skip:Tg(p)!==this.update?je.mapAndFilter.skip:p);if(f.length===0)throw new nt("No package found in the project for the given locator");if(f.length>1)throw new nt(`Multiple candidate packages found; explicitly choose one of them (use \`yarn why \` to get more information as to who depends on them): -${f.map(p=>` -- ${q.prettyLocator(r,p)}`).join("")}`);c=f[0]}if(!s.storedPackages.has(c.locatorHash))throw new nt("No package found in the project for the given locator");await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=OL(c),h=await Ez(c,{cache:n,project:s});f.reportJson({locator:q.stringifyLocator(p),path:ue.fromPortablePath(h)});let E=this.update?" along with its current modifications":"";f.reportInfo(0,`Package ${q.prettyLocator(r,p)} got extracted with success${E}!`),f.reportInfo(0,`You can now edit the following folder: ${he.pretty(r,ue.fromPortablePath(h),"magenta")}`),f.reportInfo(0,`Once you are done run ${he.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${ue.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};var Cjt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[_1,U1],fetchers:[fP],resolvers:[AP]},wjt=Cjt;var Sz={};Vt(Sz,{PnpmLinker:()=>pP,default:()=>Pjt});Ve();bt();Wt();var pP=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>"u")throw new nt(`Couldn't find ${q.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let c=e,f=e;do{f=c,c=K.dirname(f);let p=a.locatorByPath.get(f);if(p)return p}while(c!==f);return null}makeInstaller(e){return new Bz(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},Bz=class{constructor(e){this.opts=e;this.asyncActions=new je.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=ax(le,{indexPath:K.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,s){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,s);case"HARD":return this.installPackageHard(e,r,s)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,s){let a=K.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?K.join(a,Er.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(e,r,s){let a=vjt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,q.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await le.mkdirPromise(n,{recursive:!0}),await le.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let f=q.isVirtualLocator(e)?q.devirtualizeLocator(e):e,p={manifest:await Ht.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Ht,misc:{hasBindingGyp:mA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(f,e.version),E=mA.extractBuildRequest(e,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!uOe(e,{project:this.opts.project}))return;let s=this.customData.pathsByLocator.get(e.locatorHash);if(typeof s>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${q.stringifyLocator(e)})`);let{dependenciesLocation:a}=s;a&&this.asyncActions.reduce(e.locatorHash,async n=>{await le.mkdirPromise(a,{recursive:!0});let c=await Sjt(a),f=new Map(c),p=[n],h=(C,S)=>{let P=S;uOe(S,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),P=q.devirtualizeLocator(S));let I=this.customData.pathsByLocator.get(P.locatorHash);if(typeof I>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${q.stringifyLocator(S)})`);let R=q.stringifyIdent(C),N=K.join(a,R),U=K.relative(K.dirname(N),I.packageLocation),W=f.get(R);f.delete(R),p.push(Promise.resolve().then(async()=>{if(W){if(W.isSymbolicLink()&&await le.readlinkPromise(N)===U)return;await le.removePromise(N)}await le.mkdirpPromise(K.dirname(N)),process.platform=="win32"&&this.opts.project.configuration.get("winLinkType")==="junctions"?await le.symlinkPromise(I.packageLocation,N,"junction"):await le.symlinkPromise(U,N)}))},E=!1;for(let[C,S]of r)C.identHash===e.identHash&&(E=!0),h(C,S);!E&&!this.opts.project.tryWorkspaceByLocator(e)&&h(q.convertLocatorToDescriptor(e),e),p.push(Djt(a,f)),await Promise.all(p)})}async attachExternalDependents(e,r){throw new Error("External dependencies haven't been implemented for the pnpm linker")}async finalizeInstall(){let e=fOe(this.opts.project);if(this.opts.project.configuration.get("nodeLinker")!=="pnpm")await le.removePromise(e);else{let r;try{r=new Set(await le.readdirPromise(e))}catch{r=new Set}for(let{dependenciesLocation:s}of this.customData.pathsByLocator.values()){if(!s)continue;let a=K.contains(e,s);if(a===null)continue;let[n]=a.split(K.sep);r.delete(n)}await Promise.all([...r].map(async s=>{await le.removePromise(K.join(e,s))}))}return await this.asyncActions.wait(),await vz(e),this.opts.project.configuration.get("nodeLinker")!=="node-modules"&&await vz(Bjt(this.opts.project)),{customData:this.customData}}};function Bjt(t){return K.join(t.cwd,Er.nodeModules)}function fOe(t){return t.configuration.get("pnpmStoreFolder")}function vjt(t,{project:e}){let r=q.slugifyLocator(t),s=fOe(e),a=K.join(s,r,"package"),n=K.join(s,r,Er.nodeModules);return{packageLocation:a,dependenciesLocation:n}}function uOe(t,{project:e}){return!q.isVirtualLocator(t)||!e.tryWorkspaceByLocator(t)}async function Sjt(t){let e=new Map,r=[];try{r=await le.readdirPromise(t,{withFileTypes:!0})}catch(s){if(s.code!=="ENOENT")throw s}try{for(let s of r)if(!s.name.startsWith("."))if(s.name.startsWith("@")){let a=await le.readdirPromise(K.join(t,s.name),{withFileTypes:!0});if(a.length===0)e.set(s.name,s);else for(let n of a)e.set(`${s.name}/${n.name}`,n)}else e.set(s.name,s)}catch(s){if(s.code!=="ENOENT")throw s}return e}async function Djt(t,e){let r=[],s=new Set;for(let a of e.keys()){r.push(le.removePromise(K.join(t,a)));let n=q.tryParseIdent(a)?.scope;n&&s.add(`@${n}`)}return Promise.all(r).then(()=>Promise.all([...s].map(a=>vz(K.join(t,a)))))}async function vz(t){try{await le.rmdirPromise(t)}catch(e){if(e.code!=="ENOENT"&&e.code!=="ENOTEMPTY")throw e}}var bjt={configuration:{pnpmStoreFolder:{description:"By default, the store is stored in the 'node_modules/.store' of the project. Sometimes in CI scenario's it is convenient to store this in a different location so it can be cached and reused.",type:"ABSOLUTE_PATH",default:"./node_modules/.store"}},linkers:[pP]},Pjt=bjt;var Tz={};Vt(Tz,{StageCommand:()=>H1,default:()=>_jt,stageUtils:()=>_L});Ve();bt();Wt();Ve();bt();var _L={};Vt(_L,{ActionType:()=>Dz,checkConsensus:()=>ML,expandDirectory:()=>xz,findConsensus:()=>kz,findVcsRoot:()=>bz,genCommitMessage:()=>Qz,getCommitPrefix:()=>AOe,isYarnFile:()=>Pz});bt();var Dz=(n=>(n[n.CREATE=0]="CREATE",n[n.DELETE=1]="DELETE",n[n.ADD=2]="ADD",n[n.REMOVE=3]="REMOVE",n[n.MODIFY=4]="MODIFY",n))(Dz||{});async function bz(t,{marker:e}){do if(!le.existsSync(K.join(t,e)))t=K.dirname(t);else return t;while(t!=="/");return null}function Pz(t,{roots:e,names:r}){if(r.has(K.basename(t)))return!0;do if(!e.has(t))t=K.dirname(t);else return!0;while(t!=="/");return!1}function xz(t){let e=[],r=[t];for(;r.length>0;){let s=r.pop(),a=le.readdirSync(s);for(let n of a){let c=K.resolve(s,n);le.lstatSync(c).isDirectory()?r.push(c):e.push(c)}}return e}function ML(t,e){let r=0,s=0;for(let a of t)a!=="wip"&&(e.test(a)?r+=1:s+=1);return r>=s}function kz(t){let e=ML(t,/^(\w\(\w+\):\s*)?\w+s/),r=ML(t,/^(\w\(\w+\):\s*)?[A-Z]/),s=ML(t,/^\w\(\w+\):/);return{useThirdPerson:e,useUpperCase:r,useComponent:s}}function AOe(t){return t.useComponent?"chore(yarn): ":""}var xjt=new Map([[0,"create"],[1,"delete"],[2,"add"],[3,"remove"],[4,"update"]]);function Qz(t,e){let r=AOe(t),s=[],a=e.slice().sort((n,c)=>n[0]-c[0]);for(;a.length>0;){let[n,c]=a.shift(),f=xjt.get(n);t.useUpperCase&&s.length===0&&(f=`${f[0].toUpperCase()}${f.slice(1)}`),t.useThirdPerson&&(f+="s");let p=[c];for(;a.length>0&&a[0][0]===n;){let[,E]=a.shift();p.push(E)}p.sort();let h=p.shift();p.length===1?h+=" (and one other)":p.length>1&&(h+=` (and ${p.length} others)`),s.push(`${f} ${h}`)}return`${r}${s.join(", ")}`}var kjt="Commit generated via `yarn stage`",Qjt=11;async function pOe(t){let{code:e,stdout:r}=await Gr.execvp("git",["log","-1","--pretty=format:%H"],{cwd:t});return e===0?r.trim():null}async function Tjt(t,e){let r=[],s=e.filter(h=>K.basename(h.path)==="package.json");for(let{action:h,path:E}of s){let C=K.relative(t,E);if(h===4){let S=await pOe(t),{stdout:P}=await Gr.execvp("git",["show",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ht.fromText(P),R=await Ht.fromFile(E),N=new Map([...R.dependencies,...R.devDependencies]),U=new Map([...I.dependencies,...I.devDependencies]);for(let[W,te]of U){let ie=q.stringifyIdent(te),Ae=N.get(W);Ae?Ae.range!==te.range&&r.push([4,`${ie} to ${Ae.range}`]):r.push([3,ie])}for(let[W,te]of N)U.has(W)||r.push([2,q.stringifyIdent(te)])}else if(h===0){let S=await Ht.fromFile(E);S.name?r.push([0,q.stringifyIdent(S.name)]):r.push([0,"a package"])}else if(h===1){let S=await pOe(t),{stdout:P}=await Gr.execvp("git",["show",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ht.fromText(P);I.name?r.push([1,q.stringifyIdent(I.name)]):r.push([1,"a package"])}else throw new Error("Assertion failed: Unsupported action type")}let{code:a,stdout:n}=await Gr.execvp("git",["log",`-${Qjt}`,"--pretty=format:%s"],{cwd:t}),c=a===0?n.split(/\n/g).filter(h=>h!==""):[],f=kz(c);return Qz(f,r)}var Rjt={0:[" A ","?? "],4:[" M "],1:[" D "]},Fjt={0:["A "],4:["M "],1:["D "]},hOe={async findRoot(t){return await bz(t,{marker:".git"})},async filterChanges(t,e,r,s){let{stdout:a}=await Gr.execvp("git",["status","-s"],{cwd:t,strict:!0}),n=a.toString().split(/\n/g),c=s?.staged?Fjt:Rjt;return[].concat(...n.map(p=>{if(p==="")return[];let h=p.slice(0,3),E=K.resolve(t,p.slice(3));if(!s?.staged&&h==="?? "&&p.endsWith("/"))return xz(E).map(C=>({action:0,path:C}));{let S=[0,4,1].find(P=>c[P].includes(h));return S!==void 0?[{action:S,path:E}]:[]}})).filter(p=>Pz(p.path,{roots:e,names:r}))},async genCommitMessage(t,e){return await Tjt(t,e)},async makeStage(t,e){let r=e.map(s=>ue.fromPortablePath(s.path));await Gr.execvp("git",["add","--",...r],{cwd:t,strict:!0})},async makeCommit(t,e,r){let s=e.map(a=>ue.fromPortablePath(a.path));await Gr.execvp("git",["add","-N","--",...s],{cwd:t,strict:!0}),await Gr.execvp("git",["commit","-m",`${r} - -${kjt} -`,"--",...s],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(s=>ue.fromPortablePath(s.path));await Gr.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var Njt=[hOe],H1=class extends ut{constructor(){super(...arguments);this.commit=ge.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=ge.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=ge.Boolean("-u,--update",!1,{hidden:!0})}static{this.paths=[["stage"]]}static{this.usage=ot.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),{driver:a,root:n}=await Ojt(s.cwd),c=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(C=>C.populateYarnPaths,s,C=>{c.push(C)});let f=new Set;for(let C of c)for(let S of Ljt(n,C))f.add(S);let p=new Set([r.get("rcFilename"),Er.lockfile,Er.manifest]),h=await a.filterChanges(n,f,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E} -`);else for(let C of h)this.context.stdout.write(`${ue.fromPortablePath(C.path)} -`);else if(this.reset){let C=await a.filterChanges(n,f,p,{staged:!0});C.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,C)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function Ojt(t){let e=null,r=null;for(let s of Njt)if((r=await s.findRoot(t))!==null){e=s;break}if(e===null||r===null)throw new nt("No stage driver has been found for your current project");return{driver:e,root:r}}function Ljt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let s;try{s=le.statSync(e)}catch{break}if(s.isSymbolicLink())e=K.resolve(K.dirname(e),le.readlinkSync(e));else break}return r}var Mjt={commands:[H1]},_jt=Mjt;var Rz={};Vt(Rz,{default:()=>Vjt});Ve();Ve();bt();var mOe=et(Ai());Ve();var gOe=et(G9()),Ujt="e8e1bd300d860104bb8c58453ffa1eb4",Hjt="OFCNCOG2CU",dOe=async(t,e)=>{let r=q.stringifyIdent(t),a=jjt(e).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},jjt=t=>(0,gOe.default)(Hjt,Ujt,{requester:{async send(r){try{let s=await An.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var yOe=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,qjt=async(t,e,r,s)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(le.existsSync(K.join(t.cwd,"tsconfig.json"))||le.existsSync(K.join(a.cwd,"tsconfig.json")))))return;let f=n.makeResolver(),p={project:a,resolver:f,report:new Yi};if(!await dOe(r,n))return;let E=yOe(r),C=q.parseRange(r.range).selector;if(!Or.validRange(C)){let N=n.normalizeDependency(r),U=await f.getCandidates(N,{},p);C=q.parseRange(U[0].reference).selector}let S=mOe.default.coerce(C);if(S===null)return;let P=`${Xu.Modifier.CARET}${S.major}`,I=q.makeDescriptor(q.makeIdent("types",E),P),R=je.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,W=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&W!==r.descriptorHash)return je.mapAndFind.skip;let te=[];for(let ie of Ht.allDependencies){let Ae=N.manifest[ie].get(I.identHash);typeof Ae>"u"||te.push([ie,Ae])}return te.length===0?je.mapAndFind.skip:te});if(typeof R<"u")for(let[N,U]of R)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(I);if((await f.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Xu.Target.DEVELOPMENT].set(I.identHash,I)}},Gjt=async(t,e,r)=>{if(r.scope==="types")return;let{project:s}=t,{configuration:a}=s;if(!(a.get("tsEnableAutoTypes")??(le.existsSync(K.join(t.cwd,"tsconfig.json"))||le.existsSync(K.join(s.cwd,"tsconfig.json")))))return;let c=yOe(r),f=q.makeIdent("types",c);for(let p of Ht.allDependencies)typeof t.manifest[p].get(f.identHash)>"u"||t.manifest[p].delete(f.identHash)},Wjt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},Yjt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:qjt,afterWorkspaceDependencyRemoval:Gjt,beforeWorkspacePacking:Wjt}},Vjt=Yjt;var Mz={};Vt(Mz,{VersionApplyCommand:()=>Y1,VersionCheckCommand:()=>V1,VersionCommand:()=>K1,default:()=>A6t,versionUtils:()=>W1});Ve();Ve();Wt();var W1={};Vt(W1,{Decision:()=>q1,applyPrerelease:()=>vOe,applyReleases:()=>Lz,applyStrategy:()=>HL,clearVersionFiles:()=>Fz,getUndecidedDependentWorkspaces:()=>gP,getUndecidedWorkspaces:()=>UL,openVersionFile:()=>G1,requireMoreDecisions:()=>c6t,resolveVersionFiles:()=>hP,suggestStrategy:()=>Oz,updateVersionFiles:()=>Nz,validateReleaseDecision:()=>j1});Ve();bt();Bc();Wt();var BOe=et(wOe()),TA=et(Ai()),l6t=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,q1=(c=>(c.UNDECIDED="undecided",c.DECLINE="decline",c.MAJOR="major",c.MINOR="minor",c.PATCH="patch",c.PRERELEASE="prerelease",c))(q1||{});function j1(t){let e=TA.default.valid(t);return e||je.validateEnum((0,BOe.default)(q1,"UNDECIDED"),t)}async function hP(t,{prerelease:e=null}={}){let r=new Map,s=t.configuration.get("deferredVersionFolder");if(!le.existsSync(s))return r;let a=await le.readdirPromise(s);for(let n of a){if(!n.endsWith(".yml"))continue;let c=K.join(s,n),f=await le.readFilePromise(c,"utf8"),p=cs(f);for(let[h,E]of Object.entries(p.releases||{})){if(E==="decline")continue;let C=q.parseIdent(h),S=t.tryWorkspaceByIdent(C);if(S===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${K.basename(c)} references ${h})`);if(S.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${q.prettyLocator(t.configuration,S.anchoredLocator)})`);let P=S.manifest.raw.stableVersion??S.manifest.version,I=r.get(S),R=HL(P,j1(E));if(R===null)throw new Error(`Assertion failed: Expected ${P} to support being bumped via strategy ${E}`);let N=typeof I<"u"?TA.default.gt(R,I)?R:I:R;r.set(S,N)}}return e&&(r=new Map([...r].map(([n,c])=>[n,vOe(c,{current:n.manifest.version,prerelease:e})]))),r}async function Fz(t){let e=t.configuration.get("deferredVersionFolder");le.existsSync(e)&&await le.removePromise(e)}async function Nz(t,e){let r=new Set(e),s=t.configuration.get("deferredVersionFolder");if(!le.existsSync(s))return;let a=await le.readdirPromise(s);for(let n of a){if(!n.endsWith(".yml"))continue;let c=K.join(s,n),f=await le.readFilePromise(c,"utf8"),p=cs(f),h=p?.releases;if(h){for(let E of Object.keys(h)){let C=q.parseIdent(E),S=t.tryWorkspaceByIdent(C);(S===null||r.has(S))&&delete p.releases[E]}Object.keys(p.releases).length>0?await le.changeFilePromise(c,il(new il.PreserveOrdering(p))):await le.unlinkPromise(c)}}}async function G1(t,{allowEmpty:e=!1}={}){let r=t.configuration;if(r.projectCwd===null)throw new nt("This command can only be run from within a Yarn project");let s=await Qa.fetchRoot(r.projectCwd),a=s!==null?await Qa.fetchBase(s,{baseRefs:r.get("changesetBaseRefs")}):null,n=s!==null?await Qa.fetchChangedFiles(s,{base:a.hash,project:t}):[],c=r.get("deferredVersionFolder"),f=n.filter(P=>K.contains(c,P)!==null);if(f.length>1)throw new nt(`Your current branch contains multiple versioning files; this isn't supported: -- ${f.map(P=>ue.fromPortablePath(P)).join(` -- `)}`);let p=new Set(je.mapAndFilter(n,P=>{let I=t.tryWorkspaceByFilePath(P);return I===null?je.mapAndFilter.skip:I}));if(f.length===0&&p.size===0&&!e)return null;let h=f.length===1?f[0]:K.join(c,`${Nn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=le.existsSync(h)?await le.readFilePromise(h,"utf8"):"{}",C=cs(E),S=new Map;for(let P of C.declined||[]){let I=q.parseIdent(P),R=t.getWorkspaceByIdent(I);S.set(R,"decline")}for(let[P,I]of Object.entries(C.releases||{})){let R=q.parseIdent(P),N=t.getWorkspaceByIdent(R);S.set(N,j1(I))}return{project:t,root:s,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(P=>P.manifest.version!==null)),releases:S,async saveAll(){let P={},I=[],R=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=q.stringifyIdent(N.anchoredLocator),W=S.get(N);W==="decline"?I.push(U):typeof W<"u"?P[U]=j1(W):p.has(N)&&R.push(U)}await le.mkdirPromise(K.dirname(h),{recursive:!0}),await le.changeFilePromise(h,il(new il.PreserveOrdering({releases:Object.keys(P).length>0?P:void 0,declined:I.length>0?I:void 0,undecided:R.length>0?R:void 0})))}}}function c6t(t){return UL(t).size>0||gP(t).length>0}function UL(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function gP(t,{include:e=new Set}={}){let r=[],s=new Map(je.mapAndFilter([...t.releases],([n,c])=>c==="decline"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(je.mapAndFilter([...t.releases],([n,c])=>c!=="decline"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let c of Ht.hardDependencies)for(let f of n.manifest.getForScope(c).values()){let p=t.project.tryWorkspaceByDescriptor(f);p!==null&&s.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function Oz(t,e){let r=TA.default.clean(e);for(let s of Object.values(q1))if(s!=="undecided"&&s!=="decline"&&TA.default.inc(t,s)===r)return s;return null}function HL(t,e){if(TA.default.valid(e))return e;if(t===null)throw new nt(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!TA.default.valid(t))throw new nt(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=TA.default.inc(t,e);if(r===null)throw new nt(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function Lz(t,e,{report:r,exact:s}){let a=new Map;for(let n of t.workspaces)for(let c of Ht.allDependencies)for(let f of n.manifest[c].values()){let p=t.tryWorkspaceByDescriptor(f);if(p===null||!e.has(p))continue;je.getArrayWithDefault(a,p).push([n,c,f.identHash])}for(let[n,c]of e){let f=n.manifest.version;n.manifest.version=c,TA.default.prerelease(c)===null?delete n.manifest.raw.stableVersion:n.manifest.raw.stableVersion||(n.manifest.raw.stableVersion=f);let p=n.manifest.name!==null?q.stringifyIdent(n.manifest.name):null;r.reportInfo(0,`${q.prettyLocator(t.configuration,n.anchoredLocator)}: Bumped to ${c}`),r.reportJson({cwd:ue.fromPortablePath(n.cwd),ident:p,oldVersion:f,newVersion:c});let h=a.get(n);if(!(typeof h>"u"))for(let[E,C,S]of h){let P=E.manifest[C].get(S);if(typeof P>"u")throw new Error("Assertion failed: The dependency should have existed");let I=P.range,R=!1;if(I.startsWith(Ei.protocol)&&(I=I.slice(Ei.protocol.length),R=!0,I===n.relativeCwd))continue;let N=I.match(l6t);if(!N){r.reportWarning(0,`Couldn't auto-upgrade range ${I} (in ${q.prettyLocator(t.configuration,E.anchoredLocator)})`);continue}let U=s?`${c}`:`${N[1]}${c}`;R&&(U=`${Ei.protocol}${U}`);let W=q.makeDescriptor(P,U);E.manifest[C].set(S,W)}}}var u6t=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function vOe(t,{current:e,prerelease:r}){let s=new TA.default.SemVer(e),a=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==t&&(a.length=0);let c=!0,f=r.split(/\./g);for(let p of f){let h=u6t.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():c=!1;else{let E=c?h.extract(a):null;E!==null&&typeof E[0]=="number"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),c=!1)}}return s.prerelease&&(s.prerelease=[]),`${t}-${n.join(".")}`}var Y1=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=ge.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=ge.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.exact=ge.Boolean("--exact",!1,{description:"Use the exact version of each package, removes any range. Useful for nightly releases where the range might match another version."});this.recursive=ge.Boolean("-R,--recursive",{description:"Release the transitive workspaces as well"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["version","apply"]]}static{this.usage=ot.Usage({category:"Release-related commands",description:"apply all the deferred version bumps at once",details:` - This command will apply the deferred version changes and remove their definitions from the repository. - - Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%n\`) will be used on all new versions and the version definitions will be kept as-is. - - By default only the current workspace will be bumped, but you can configure this behavior by using one of: - - - \`--recursive\` to also apply the version bump on its dependencies - - \`--all\` to apply the version bump on all packages in the repository - - Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump. - `,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await hP(s,{prerelease:p}),E=new Map;if(this.all)E=h;else{let C=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let S of C){let P=h.get(S);typeof P<"u"&&E.set(S,P)}}if(E.size===0){let C=h.size>0?" Did you want to add --all?":"";f.reportWarning(0,`The current workspace doesn't seem to require a version bump.${C}`);return}Lz(s,E,{report:f,exact:this.exact}),this.dryRun||(p||(this.all?await Fz(s):await Nz(s,[...E.keys()])),f.reportSeparator())});return this.dryRun||c.hasErrors()?c.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Ve();bt();Wt();var jL=et(Ai());var V1=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}static{this.paths=[["version","check"]]}static{this.usage=ot.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){iw(this.context);let{Gem:r}=await Promise.resolve().then(()=>(YF(),cY)),{ScrollableItems:s}=await Promise.resolve().then(()=>(zF(),JF)),{FocusRequest:a}=await Promise.resolve().then(()=>(fY(),PPe)),{useListInput:n}=await Promise.resolve().then(()=>(KF(),xPe)),{renderForm:c}=await Promise.resolve().then(()=>(eN(),$F)),{Box:f,Text:p}=await Promise.resolve().then(()=>et(Vc())),{default:h,useCallback:E,useState:C}=await Promise.resolve().then(()=>et(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState();let R=await G1(P);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new nt("This command can only be run on Git repositories");let N=()=>h.createElement(f,{flexDirection:"row",paddingBottom:1},h.createElement(f,{flexDirection:"column",width:60},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},""),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to select workspaces.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},""),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to select release strategies."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to save.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to abort.")))),U=({workspace:me,active:pe,decision:Be,setDecision:Ce})=>{let g=me.manifest.raw.stableVersion??me.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${q.prettyLocator(S,me.anchoredLocator)})`);if(jL.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let we=["undecided","decline","patch","minor","major"];n(Be,we,{active:pe,minus:"left",plus:"right",set:Ce});let ye=Be==="undecided"?h.createElement(p,{color:"yellow"},g):Be==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},jL.default.valid(Be)?Be:jL.default.inc(g,Be)));return h.createElement(f,{flexDirection:"column"},h.createElement(f,null,h.createElement(p,null,q.prettyLocator(S,me.anchoredLocator)," - ",ye)),h.createElement(f,null,we.map(fe=>h.createElement(f,{key:fe,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:fe===Be})," ",fe)))))},W=me=>{let pe=new Set(R.releaseRoots),Be=new Map([...me].filter(([Ce])=>pe.has(Ce)));for(;;){let Ce=gP({project:R.project,releases:Be}),g=!1;if(Ce.length>0){for(let[we]of Ce)if(!pe.has(we)){pe.add(we),g=!0;let ye=me.get(we);typeof ye<"u"&&Be.set(we,ye)}}if(!g)break}return{relevantWorkspaces:pe,relevantReleases:Be}},te=()=>{let[me,pe]=C(()=>new Map(R.releases)),Be=E((Ce,g)=>{let we=new Map(me);g!=="undecided"?we.set(Ce,g):we.delete(Ce);let{relevantReleases:ye}=W(we);pe(ye)},[me,pe]);return[me,Be]},ie=({workspaces:me,releases:pe})=>{let Be=[];Be.push(`${me.size} total`);let Ce=0,g=0;for(let we of me){let ye=pe.get(we);typeof ye>"u"?g+=1:ye!=="decline"&&(Ce+=1)}return Be.push(`${Ce} release${Ce===1?"":"s"}`),Be.push(`${g} remaining`),h.createElement(p,{color:"yellow"},Be.join(", "))},ce=await c(({useSubmit:me})=>{let[pe,Be]=te();me(pe);let{relevantWorkspaces:Ce}=W(pe),g=new Set([...Ce].filter(se=>!R.releaseRoots.has(se))),[we,ye]=C(0),fe=E(se=>{switch(se){case a.BEFORE:ye(we-1);break;case a.AFTER:ye(we+1);break}},[we,ye]);return h.createElement(f,{flexDirection:"column"},h.createElement(N,null),h.createElement(f,null,h.createElement(p,{wrap:"wrap"},"The following files have been modified in your local checkout.")),h.createElement(f,{flexDirection:"column",marginTop:1,paddingLeft:2},[...R.changedFiles].map(se=>h.createElement(f,{key:se},h.createElement(p,null,h.createElement(p,{color:"grey"},ue.fromPortablePath(R.root)),ue.sep,ue.relative(ue.fromPortablePath(R.root),ue.fromPortablePath(se)))))),R.releaseRoots.size>0&&h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:"wrap"},"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):")),g.size>3?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:R.releaseRoots,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:"column"},h.createElement(s,{active:we%2===0,radius:1,size:2,onFocusRequest:fe},[...R.releaseRoots].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||"undecided",setDecision:X=>Be(se,X)}))))),g.size>0?h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:"wrap"},"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:")),h.createElement(f,null,h.createElement(p,null,"(Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to move the focus between the workspace groups.)")),g.size>5?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:g,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:"column"},h.createElement(s,{active:we%2===1,radius:2,size:2,onFocusRequest:fe},[...g].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||"undecided",setDecision:X=>Be(se,X)}))))):null)},{versionFile:R},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ce>"u")return 1;R.releases.clear();for(let[me,pe]of ce)R.releases.set(me,pe);await R.saveAll()}async executeStandard(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return await s.restoreInstallState(),(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{let f=await G1(s);if(f===null||f.releaseRoots.size===0)return;if(f.root===null)throw new nt("This command can only be run on Git repositories");if(c.reportInfo(0,`Your PR was started right after ${he.pretty(r,f.baseHash.slice(0,7),"yellow")} ${he.pretty(r,f.baseTitle,"magenta")}`),f.changedFiles.size>0){c.reportInfo(0,"You have changed the following files since then:"),c.reportSeparator();for(let S of f.changedFiles)c.reportInfo(null,`${he.pretty(r,ue.fromPortablePath(f.root),"gray")}${ue.sep}${ue.relative(ue.fromPortablePath(f.root),ue.fromPortablePath(S))}`)}let p=!1,h=!1,E=UL(f);if(E.size>0){p||c.reportSeparator();for(let S of E)c.reportError(0,`${q.prettyLocator(r,S.anchoredLocator)} has been modified but doesn't have a release strategy attached`);p=!0}let C=gP(f);for(let[S,P]of C)h||c.reportSeparator(),c.reportError(0,`${q.prettyLocator(r,S.anchoredLocator)} doesn't have a release strategy attached, but depends on ${q.prettyWorkspace(r,P)} which is planned for release.`),h=!0;(p||h)&&(c.reportSeparator(),c.reportInfo(0,"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed)."),c.reportInfo(0,"To correct these errors, run `yarn version check --interactive` then follow the instructions."))})).exitCode()}};Ve();Wt();var qL=et(Ai());var K1=class extends ut{constructor(){super(...arguments);this.deferred=ge.Boolean("-d,--deferred",{description:"Prepare the version to be bumped during the next release cycle"});this.immediate=ge.Boolean("-i,--immediate",{description:"Bump the version immediately"});this.strategy=ge.String()}static{this.paths=[["version"]]}static{this.usage=ot.Usage({category:"Release-related commands",description:"apply a new version to the current package",details:"\n This command will bump the version number for the given package, following the specified strategy:\n\n - If `major`, the first number from the semver range will be increased (`X.0.0`).\n - If `minor`, the second number from the semver range will be increased (`0.X.0`).\n - If `patch`, the third number from the semver range will be increased (`0.0.X`).\n - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\n - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\n - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\n - If a valid semver range, it will be used as new version.\n - If unspecified, Yarn will ask you for guidance.\n\n For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\n ",examples:[["Immediately bump the version to the next major","yarn version major"],["Prepare the version to be bumped to the next major","yarn version major --deferred"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=r.get("preferDeferredVersions");this.deferred&&(n=!0),this.immediate&&(n=!1);let c=qL.default.valid(this.strategy),f=this.strategy==="decline",p;if(c)if(a.manifest.version!==null){let E=Oz(a.manifest.version,this.strategy);E!==null?p=E:p=this.strategy}else p=this.strategy;else{let E=a.manifest.version;if(!f){if(E===null)throw new nt("Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.");if(typeof E!="string"||!qL.default.valid(E))throw new nt(`Can't bump the version (${E}) if it's not valid semver`)}p=j1(this.strategy)}if(!n){let C=(await hP(s)).get(a);if(typeof C<"u"&&p!=="decline"){let S=HL(a.manifest.version,p);if(qL.default.lt(S,C))throw new nt(`Can't bump the version to one that would be lower than the current deferred one (${C})`)}}let h=await G1(s,{allowEmpty:!0});return h.releases.set(a,p),await h.saveAll(),n?0:await this.cli.run(["version","apply"])}};var f6t={configuration:{deferredVersionFolder:{description:"Folder where are stored the versioning files",type:"ABSOLUTE_PATH",default:"./.yarn/versions"},preferDeferredVersions:{description:"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set",type:"BOOLEAN",default:!1}},commands:[Y1,V1,K1]},A6t=f6t;var _z={};Vt(_z,{WorkspacesFocusCommand:()=>J1,WorkspacesForeachCommand:()=>Z1,default:()=>g6t});Ve();Ve();Wt();var J1=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=ge.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=ge.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=ge.Rest()}static{this.paths=[["workspaces","focus"]]}static{this.usage=ot.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);await s.restoreInstallState({restoreResolutions:!1});let c;if(this.all)c=new Set(s.workspaces);else if(this.workspaces.length===0){if(!a)throw new ar(s.cwd,this.context.cwd);c=new Set([a])}else c=new Set(this.workspaces.map(f=>s.getWorkspaceByIdent(q.parseIdent(f))));for(let f of c)for(let p of this.production?["dependencies"]:Ht.hardDependencies)for(let h of f.manifest.getForScope(p).values()){let E=s.tryWorkspaceByDescriptor(h);E!==null&&c.add(E)}for(let f of s.workspaces)c.has(f)?this.production&&f.manifest.devDependencies.clear():(f.manifest.installConfig=f.manifest.installConfig||{},f.manifest.installConfig.selfReferences=!1,f.manifest.dependencies.clear(),f.manifest.devDependencies.clear(),f.manifest.peerDependencies.clear(),f.manifest.scripts.clear());return await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n,persistProject:!1})}};Ve();Ve();Ve();Wt();var z1=et(Sa()),DOe=et(Od());Ul();var Z1=class extends ut{constructor(){super(...arguments);this.from=ge.Array("--from",{description:"An array of glob pattern idents or paths from which to base any recursion"});this.all=ge.Boolean("-A,--all",{description:"Run the command on all workspaces of a project"});this.recursive=ge.Boolean("-R,--recursive",{description:"Run the command on the current workspace and all of its recursive dependencies"});this.worktree=ge.Boolean("-W,--worktree",{description:"Run the command on all workspaces of the current worktree"});this.verbose=ge.Counter("-v,--verbose",{description:"Increase level of logging verbosity up to 2 times"});this.parallel=ge.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=ge.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=ge.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:mU([po(["unlimited"]),$2(dU(),[EU(),yU(1)])])});this.topological=ge.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=ge.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=ge.Array("--include",[],{description:"An array of glob pattern idents or paths; only matching workspaces will be traversed"});this.exclude=ge.Array("--exclude",[],{description:"An array of glob pattern idents or paths; matching workspaces won't be traversed"});this.publicOnly=ge.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=ge.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.dryRun=ge.Boolean("-n,--dry-run",{description:"Print the commands that would be run, without actually running them"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[["workspaces","foreach"]]}static{this.usage=ot.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `-W,--worktree` is set, Yarn will find workspaces to run the command on by looking at the current worktree.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `--dry-run` is set, Yarn will explain what it would do without actually doing anything.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. You can also use the `--no-private` flag to avoid running the command in private workspaces.\n\n The `-v,--verbose` flag can be passed up to twice: once to prefix output lines with the originating workspace's name, and again to include start/finish/timing log lines. Maximum verbosity is enabled by default in terminal environments.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish all packages","yarn workspaces foreach -A --no-private npm publish --tolerate-republish"],["Run the build script on all descendant packages","yarn workspaces foreach -A run build"],["Run the build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -Apt run build"],["Run the build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -Rpt --from '{workspace-a,workspace-b}' run build"]]})}static{this.schema=[tB("all",Wf.Forbids,["from","recursive","since","worktree"],{missingIf:"undefined"}),IU(["all","recursive","since","worktree"],{missingIf:"undefined"})]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!this.all&&!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=this.cli.process([this.commandName,...this.args]),c=n.path.length===1&&n.path[0]==="run"&&typeof n.scriptName<"u"?n.scriptName:null;if(n.path.length===0)throw new nt("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let f=Ce=>{this.dryRun&&this.context.stdout.write(`${Ce} -`)},p=()=>{let Ce=this.from.map(g=>z1.default.matcher(g));return s.workspaces.filter(g=>{let we=q.stringifyIdent(g.anchoredLocator),ye=g.relativeCwd;return Ce.some(fe=>fe(we)||fe(ye))})},h=[];if(this.since?(f("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await Qa.fetchChangedWorkspaces({ref:this.since,project:s}))):this.from?(f("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(f("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(f("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(f("Option --all is set; selecting all workspaces"),h=[...s.workspaces]),this.dryRun&&!this.all){for(let Ce of h)f(` -- ${Ce.relativeCwd} - ${q.prettyLocator(r,Ce.anchoredLocator)}`);h.length>0&&f("")}let E;if(this.recursive?this.since?(f("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependents()]).flat())):(f("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(f("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ce of E)f(` -- ${Ce.relativeCwd} - ${q.prettyLocator(r,Ce.anchoredLocator)}`);let C=[],S=!1;if(c?.includes(":")){for(let Ce of s.workspaces)if(Ce.manifest.scripts.has(c)&&(S=!S,S===!1))break}for(let Ce of h){if(c&&!Ce.manifest.scripts.has(c)&&!S&&!(await In.getWorkspaceAccessibleBinaries(Ce)).has(c)){f(`Excluding ${Ce.relativeCwd} because it doesn't have a "${c}" script`);continue}if(!(c===r.env.npm_lifecycle_event&&Ce.cwd===a.cwd)){if(this.include.length>0&&!z1.default.isMatch(q.stringifyIdent(Ce.anchoredLocator),this.include)&&!z1.default.isMatch(Ce.relativeCwd,this.include)){f(`Excluding ${Ce.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(z1.default.isMatch(q.stringifyIdent(Ce.anchoredLocator),this.exclude)||z1.default.isMatch(Ce.relativeCwd,this.exclude))){f(`Excluding ${Ce.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ce.manifest.private===!0){f(`Excluding ${Ce.relativeCwd} because it's a private workspace and --no-private was set`);continue}C.push(Ce)}}if(this.dryRun)return 0;let P=this.verbose??(this.context.stdout.isTTY?1/0:0),I=P>0,R=P>1,N=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(ps.availableParallelism()/2):1,U=N===1?!1:this.parallel,W=U?this.interlaced:!0,te=(0,DOe.default)(N),ie=new Map,Ae=new Set,ce=0,me=null,pe=!1,Be=await Ot.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ce=>{let g=async(we,{commandIndex:ye})=>{if(pe)return-1;!U&&R&&ye>1&&Ce.reportSeparator();let fe=p6t(we,{configuration:r,label:I,commandIndex:ye}),[se,X]=SOe(Ce,{prefix:fe,interlaced:W}),[De,Re]=SOe(Ce,{prefix:fe,interlaced:W});try{R&&Ce.reportInfo(null,`${fe?`${fe} `:""}Process started`);let dt=Date.now(),j=await this.cli.run([this.commandName,...this.args],{cwd:we.cwd,stdout:se,stderr:De})||0;se.end(),De.end(),await X,await Re;let rt=Date.now();if(R){let Fe=r.get("enableTimers")?`, completed in ${he.pretty(r,rt-dt,he.Type.DURATION)}`:"";Ce.reportInfo(null,`${fe?`${fe} `:""}Process exited (exit code ${j})${Fe}`)}return j===130&&(pe=!0,me=j),j}catch(dt){throw se.end(),De.end(),await X,await Re,dt}};for(let we of C)ie.set(we.anchoredLocator.locatorHash,we);for(;ie.size>0&&!Ce.hasErrors();){let we=[];for(let[X,De]of ie){if(Ae.has(De.anchoredDescriptor.descriptorHash))continue;let Re=!0;if(this.topological||this.topologicalDev){let dt=this.topologicalDev?new Map([...De.manifest.dependencies,...De.manifest.devDependencies]):De.manifest.dependencies;for(let j of dt.values()){let rt=s.tryWorkspaceByDescriptor(j);if(Re=rt===null||!ie.has(rt.anchoredLocator.locatorHash),!Re)break}}if(Re&&(Ae.add(De.anchoredDescriptor.descriptorHash),we.push(te(async()=>{let dt=await g(De,{commandIndex:++ce});return ie.delete(X),Ae.delete(De.anchoredDescriptor.descriptorHash),{workspace:De,exitCode:dt}})),!U))break}if(we.length===0){let X=Array.from(ie.values()).map(De=>q.prettyLocator(r,De.anchoredLocator)).join(", ");Ce.reportError(3,`Dependency cycle detected (${X})`);return}let ye=await Promise.all(we);ye.forEach(({workspace:X,exitCode:De})=>{De!==0&&Ce.reportError(0,`The command failed in workspace ${q.prettyLocator(r,X.anchoredLocator)} with exit code ${De}`)});let se=ye.map(X=>X.exitCode).find(X=>X!==0);(this.topological||this.topologicalDev)&&typeof se<"u"&&Ce.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return me!==null?me:Be.exitCode()}};function SOe(t,{prefix:e,interlaced:r}){let s=t.createStreamReporter(e),a=new je.DefaultStream;a.pipe(s,{end:!1}),a.on("finish",()=>{s.end()});let n=new Promise(f=>{s.on("finish",()=>{f(a.active)})});if(r)return[a,n];let c=new je.BufferStream;return c.pipe(a,{end:!1}),c.on("finish",()=>{a.end()}),[c,n]}function p6t(t,{configuration:e,commandIndex:r,label:s}){if(!s)return null;let n=`[${q.stringifyIdent(t.anchoredLocator)}]:`,c=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],f=c[r%c.length];return he.pretty(e,n,f)}var h6t={commands:[J1,Z1]},g6t=h6t;var tC=()=>({modules:new Map([["@yarnpkg/cli",$v],["@yarnpkg/core",Xv],["@yarnpkg/fslib",U2],["@yarnpkg/libzip",Iv],["@yarnpkg/parsers",K2],["@yarnpkg/shell",Dv],["clipanion",oB],["semver",d6t],["typanion",Ia],["@yarnpkg/plugin-essentials",Y5],["@yarnpkg/plugin-compat",Z5],["@yarnpkg/plugin-constraints",g9],["@yarnpkg/plugin-dlx",d9],["@yarnpkg/plugin-exec",E9],["@yarnpkg/plugin-file",C9],["@yarnpkg/plugin-git",W5],["@yarnpkg/plugin-github",v9],["@yarnpkg/plugin-http",S9],["@yarnpkg/plugin-init",D9],["@yarnpkg/plugin-interactive-tools",IY],["@yarnpkg/plugin-jsr",wY],["@yarnpkg/plugin-link",BY],["@yarnpkg/plugin-nm",oV],["@yarnpkg/plugin-npm",oz],["@yarnpkg/plugin-npm-cli",gz],["@yarnpkg/plugin-pack",$V],["@yarnpkg/plugin-patch",wz],["@yarnpkg/plugin-pnp",KY],["@yarnpkg/plugin-pnpm",Sz],["@yarnpkg/plugin-stage",Tz],["@yarnpkg/plugin-typescript",Rz],["@yarnpkg/plugin-version",Mz],["@yarnpkg/plugin-workspace-tools",_z]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-jsr","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"])});function xOe({cwd:t,pluginConfiguration:e}){let r=new wa({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:un??""});return Object.assign(r,{defaultContext:{...wa.defaultContext,cwd:t,plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr}})}function m6t(t){if(je.parseOptionalBoolean(process.env.YARN_IGNORE_NODE))return!0;let r=process.versions.node,s=">=18.12.0";if(Or.satisfiesWithPrereleases(r,s))return!0;let a=new nt(`This tool requires a Node version compatible with ${s} (got ${r}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);return wa.defaultContext.stdout.write(t.error(a)),!1}async function kOe({selfPath:t,pluginConfiguration:e}){return await ze.find(ue.toPortablePath(process.cwd()),e,{strict:!1,usePathCheck:t})}function y6t(t,e,{yarnPath:r}){if(!le.existsSync(r))return t.error(new Error(`The "yarn-path" option has been set, but the specified location doesn't exist (${r}).`)),1;process.on("SIGINT",()=>{});let s={stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1"}};try{(0,bOe.execFileSync)(process.execPath,[ue.fromPortablePath(r),...e],s)}catch(a){return a.status??1}return 0}function E6t(t,e){let r=null,s=e;return e.length>=2&&e[0]==="--cwd"?(r=ue.toPortablePath(e[1]),s=e.slice(2)):e.length>=1&&e[0].startsWith("--cwd=")?(r=ue.toPortablePath(e[0].slice(6)),s=e.slice(1)):e[0]==="add"&&e[e.length-2]==="--cwd"&&(r=ue.toPortablePath(e[e.length-1]),s=e.slice(0,e.length-2)),t.defaultContext.cwd=r!==null?K.resolve(r):K.cwd(),s}function I6t(t,{configuration:e}){if(!e.get("enableTelemetry")||POe.isCI||!process.stdout.isTTY)return;ze.telemetry=new XI(e,"puba9cdc10ec5790a2cf4969dd413a47270");let s=/^@yarnpkg\/plugin-(.*)$/;for(let a of e.plugins.keys())$I.has(a.match(s)?.[1]??"")&&ze.telemetry?.reportPluginName(a);t.binaryVersion&&ze.telemetry.reportVersion(t.binaryVersion)}function QOe(t,{configuration:e}){for(let r of e.plugins.values())for(let s of r.commands||[])t.register(s)}async function C6t(t,e,{selfPath:r,pluginConfiguration:s}){if(!m6t(t))return 1;let a=await kOe({selfPath:r,pluginConfiguration:s}),n=a.get("yarnPath"),c=a.get("ignorePath");if(n&&!c)return y6t(t,e,{yarnPath:n});delete process.env.YARN_IGNORE_PATH;let f=E6t(t,e);I6t(t,{configuration:a}),QOe(t,{configuration:a});let p=t.process(f,t.defaultContext);return p.help||ze.telemetry?.reportCommandName(p.path.join(" ")),await t.run(p,t.defaultContext)}async function XCe({cwd:t=K.cwd(),pluginConfiguration:e=tC()}={}){let r=xOe({cwd:t,pluginConfiguration:e}),s=await kOe({pluginConfiguration:e,selfPath:null});return QOe(r,{configuration:s}),r}async function KR(t,{cwd:e=K.cwd(),selfPath:r,pluginConfiguration:s}){let a=xOe({cwd:e,pluginConfiguration:s});function n(){wa.defaultContext.stdout.write(`ERROR: Yarn is terminating due to an unexpected empty event loop. -Please report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once("beforeExit",n);try{process.exitCode=42,process.exitCode=await C6t(a,t,{selfPath:r,pluginConfiguration:s})}catch(c){wa.defaultContext.stdout.write(a.error(c)),process.exitCode=1}finally{process.off("beforeExit",n),await le.rmtempPromise()}}KR(process.argv.slice(2),{cwd:K.cwd(),selfPath:ue.toPortablePath(ue.resolve(process.argv[1])),pluginConfiguration:tC()});})(); -/** - @license - Copyright (c) 2015, Rebecca Turner - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - */ -/** - @license - Copyright Node.js contributors. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. -*/ -/** - @license - The MIT License (MIT) - - Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ -/** - @license - Copyright Joyent, Inc. and other Node contributors. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ -/*! Bundled license information: - -is-number/index.js: - (*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - *) - -to-regex-range/index.js: - (*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - *) - -fill-range/index.js: - (*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - *) - -is-extglob/index.js: - (*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - *) - -is-glob/index.js: - (*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - *) - -queue-microtask/index.js: - (*! queue-microtask. MIT License. Feross Aboukhadijeh *) - -run-parallel/index.js: - (*! run-parallel. MIT License. Feross Aboukhadijeh *) - -git-url-parse/lib/index.js: - (*! - * buildToken - * Builds OAuth token prefix (helper function) - * - * @name buildToken - * @function - * @param {GitUrl} obj The parsed Git url object. - * @return {String} token prefix - *) - -object-assign/index.js: - (* - object-assign - (c) Sindre Sorhus - @license MIT - *) - -react/cjs/react.production.min.js: - (** @license React v17.0.2 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -scheduler/cjs/scheduler.production.min.js: - (** @license React v0.20.2 - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -react-reconciler/cjs/react-reconciler.production.min.js: - (** @license React v0.26.2 - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -is-windows/index.js: - (*! - * is-windows - * - * Copyright © 2015-2018, Jon Schlinkert. - * Released under the MIT License. - *) -*/ diff --git a/.yarnrc.yml b/.yarnrc.yml deleted file mode 100644 index b3708d7c3..000000000 --- a/.yarnrc.yml +++ /dev/null @@ -1,15 +0,0 @@ -compressionLevel: mixed - -enableGlobalCache: false - -logFilters: - - level: discard - pattern: "*(pde6dc), which doesn't satisfy what react-scripts*" - - level: discard - pattern: "*(p6f2bc), which doesn't satisfy what react-identicons*" - - level: discard - pattern: "*(pca8b0), which doesn't satisfy what react-identicons*" - -nodeLinker: node-modules - -yarnPath: .yarn/releases/yarn-4.9.2.cjs diff --git a/CNAME b/CNAME new file mode 100644 index 000000000..1e5caef53 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +docs.v2.kleros.builders \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 2add1d197..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,37 +0,0 @@ -## Contribution Guidelines - -👉 Please start by reading our guidelines here: https://kleros.gitbook.io/docs/contribution-guidelines/overview - -## Opening an issue - -You should usually open an issue in the following situations: - -- Report an error you can’t solve yourself -- Discuss a high-level topic or idea (for example, community, vision or policies) -- Propose a new feature or other project idea - -### Tips for communicating on issues: - -- **If you see an open issue that you want to tackle,** comment on the issue to let people know you’re on it. That way, people are less likely to duplicate your work. -- **If an issue was opened a while ago,** it’s possible that it’s being addressed somewhere else, or has already been resolved, so comment to ask for confirmation before starting work. -- **If you opened an issue, but figured out the answer later on your own,** comment on the issue to let people know, then close the issue. Even documenting that outcome is a contribution to the project. - -## Opening a pull request - -You should usually open a pull request in the following situations: - -- Submit trivial fixes (for example, a typo, a broken link or an obvious error). -- Start work on a contribution that was already asked for, or that you’ve already discussed, in an issue. - -A pull request doesn’t have to represent finished work. It’s usually better to open a _draft_ pull request early on, so others can watch or give feedback on your progress. Just mark it as a “WIP” (Work in Progress) in the subject line. You can always add more commits later. - -As a contributor who is not an organization member, here’s how to submit a pull request: - -- **Fork the repository** and clone it locally. Connect your local to the original repository by adding it as a remote. Pull in changes from this repository often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely. -- **Create a branch** for your edits. -- **Reference any relevant issues** or supporting documentation in your PR (for example, “Closes #37.”) -- **Include screenshots of the before and after** if your changes include differences in HTML/CSS. Drag and drop the images into the body of your pull request. -- **Test your changes!** Run your changes against any existing tests if they exist and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project. -- **Contribute in the style of the project** to the best of your abilities. This may mean using indents, semi-colons or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future. - -If you are an organization member, a branch can be created directly in this repository, there is no need to fork it. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 51ffd05a0..000000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Kleros - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 9ff56aaa0..000000000 --- a/README.md +++ /dev/null @@ -1,195 +0,0 @@ - - -

- Kleros v2 -

- -

- OpenSSF Scorecard - Security Rating - Quality Gate Status - Bugs - Reliability Rating - Maintainability Rating -
- Unit testing - Conventional Commits - Commitizen Friendly - Styled with Prettier -
- GitPoap badge -

- ---- - -## Deployments - -##### ⛓️ [Contracts addresses](contracts/README.md#deployments) - -##### 🗃️ [Subgraph endpoints](subgraph/README.md#deployments) - -##### ⚖️ [Web frontend](web/README.md#court-deployments) - -## Content - -| Package | Description | -| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **[bots](/bots)** | Automation of the on-chain upkeep of the smart contracts. Anyone willing to spend some gas may run these bots and contribute to the upkeep operations. | -| **[contracts](/contracts)** | Smart contracts of the arbitration protocol. | -| **[kleros-app](/kleros-app)** | Library of React hooks and utilities shared by the Kleros frontend apps. | -| **[kleros-sdk](/kleros-sdk)** | SDK which facilitates the creation of arbitrable applications, the interactions with the arbitrator, the rendering of the dispute and evidence information. | -| **[subgraph](/subgraph)** | The indexing layer. | -| **[web](/web)** | The court frontend intended for the jurors and parties in a dispute. | - -## Contributing - -### Prerequisites - -- Install NodeJS 16: - - on Red Hat Linux: `sudo dnf module install nodejs:16` - - on Ubuntu Linux: `sudo snap install node --classic` - - on MacOS via [brew](https://brew.sh/): `brew install node` -- Install Yarn v1.22: `npm install -g yarn` - - Then [upgrade](https://yarnpkg.com/getting-started/install#updating-to-the-latest-versions) Yarn to v3: `yarn set version berry` -- Install Volta.sh: `curl https://get.volta.sh | bash` -- Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) to run the local graph node. -- Shell utilities: [jq](https://stedolan.github.io/jq/), [yq](https://mikefarah.gitbook.io/yq/) - - on Red Hat Linux: `sudo dnf install jq yq` - - on Ubuntu Linux: `sudo snap install jq yq` - - on MacOS via [brew](https://brew.sh/): `brew install jq yq` - -### Install the dependencies - -```bash -$ yarn install - -# Foundry libraries -$ git submodule update --init --recursive -j 4 -``` - -### [Hardhat CLI auto-completion](https://hardhat.org/guides/shorthand.html) (optional) - -```bash -$ npm i -g hardhat-shorthand - -$ hardhat-completion install -✔ Which Shell do you use ? · bash -✔ We will install completion to ~/.bashrc, is it ok ? (y/N) · true - -$ exec bash -``` - -### Full Stack Local Deployment - -Run the commands below from the top-level folder. Alternatively, it is possible to `cd` into the relevant package first and then call yarn without `workspace @kleros/xxxx`. - -#### Shortcut using tmux - -If you have **[tmux](https://github.com/tmux/tmux/wiki)** installed, you can get started quickly with a single command. - -```bash -$ yarn local-stack -``` - -![terminal](/docs/local-stack-2.png) - -#### Shell 1 - Local RPC with Contracts Deployed - -```bash -$ yarn workspace @kleros/kleros-v2-contracts start-local -... -Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/ - -``` - -⏳ Wait until deployment is complete. - -#### Shell 2 - Local Graph Node - -```bash -$ yarn workspace @kleros/kleros-v2-subgraph start-local-indexer -... -graph-node-graph-node-1 | INFO Successfully connected to IPFS node at: http://ipfs:5001/ -graph-node-graph-node-1 | INFO Pool successfully connected to Postgres, pool: main, shard: primary, component: Store -... -graph-node-graph-node-1 | INFO Connected to Ethereum, capabilities: archive, traces, network_version: 31337, provider: mainnet-rpc-0 -``` - -⏳ Wait until the graph service is ready. - -#### Shell 3 - Subgraph Rebuild and Local Deploy - -:warning: This step modifies `subgraph.yaml` and creates a backup file. See further down on how to restore it. - -```bash -$ yarn workspace @kleros/kleros-v2-subgraph rebuild-deploy:local -... -✔ Upload subgraph to IPFS - -Build completed: QmZVaZQ9qcXPia9YnFEKk7D1dEDHbfyDiJi1sqJ6E1NydB - -Deployed to http://localhost:8000/subgraphs/name/kleros/kleros-v2-core-local/graphql - -Subgraph endpoints: -Queries (HTTP): http://localhost:8000/subgraphs/name/kleros/kleros-v2-core-local -``` - -#### Shell 4 - Frontend Pointing to the Local Subgraph - -```bash -yarn workspace @kleros/kleros-v2-web generate -✔ Parse Configuration -✔ Generate outputs -✔ Validating plugins -✔ Resolving contracts -✔ Running plugins -✔ Writing to src/hooks/contracts/generated.ts - -$ yarn workspace @kleros/kleros-v2-web start-local -Server running at http://localhost:1234 -✨ Built in 2.35s -``` - -### Redeploying - -```bash -# Contracts -$ yarn workspace @kleros/kleros-v2-contracts deploy-local - -# Subgraph -$ yarn workspace @kleros/kleros-v2-subgraph rebuild-deploy:local - -``` - -### Simulating Arbitration Activity - -```bash -$ yarn workspace @kleros/kleros-v2-contracts simulate-local - -``` - -### Stopping - -Just press `Ctrl + c` in each terminal. - -#### Docker containers and data removal - -`yarn workspace @kleros/kleros-v2-subgraph stop-local-indexer` - -#### Restoring subgraph.yaml - -##### From a backup file - -Every versions were saved as `subgraph.yaml.bak.`. - -##### Based on the ArbitrumGoerli deployment artifacts - -`yarn workspace @kleros/kleros-v2-subgraph update` - -##### Based on the last commit - -`git restore subgraph.yaml` diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 233b5398d..000000000 --- a/SECURITY.md +++ /dev/null @@ -1,6 +0,0 @@ -# Security Policy - -## Reporting a Vulnerability - -You can privately disclose vulnerabilities to us at any time, by sending an email to clement@kleros.io and contact@kleros.io. -We can then discuss the best way to handle things on a case by case basis. diff --git a/bots/README.md b/bots/README.md deleted file mode 100644 index fc8f49825..000000000 --- a/bots/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# @kleros/kleros-v2-bots - -🚧 ⚖️ 🚧 diff --git a/commitlint.config.js b/commitlint.config.js deleted file mode 100644 index 69b1ed0c7..000000000 --- a/commitlint.config.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - /* - * Resolve and load @commitlint/config-conventional from node_modules. - * Referenced packages must be installed - */ - extends: ["@commitlint/config-conventional"], - /* - * Any rules defined here will override rules from @commitlint/config-conventional - */ - rules: { - "body-leading-blank": [2, "always"], - "footer-leading-blank": [2, "always"], - }, - /* - * Custom URL to show upon failure - */ - helpUrl: "https://github.com/conventional-changelog/commitlint/#what-is-commitlint", -}; diff --git a/contracts/.env.example b/contracts/.env.example deleted file mode 100644 index a82240696..000000000 --- a/contracts/.env.example +++ /dev/null @@ -1,27 +0,0 @@ -PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 - -INFURA_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1 - -# Testing -REPORT_GAS=true - -# There seems to be a bug with hardhat-deploy's implementation of etherscan-verify -# If ETHERSCAN_API_KEY is set, it overrides any hardhat configuration. -ETHERSCAN_API_KEY_FIX=ABC123ABC123ABC123ABC123ABC123ABC1 -ARBISCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1 -GNOSISSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1 - -# For the bots -LOG_LEVEL=debug -SUBGRAPH_URL=https://api.studio.thegraph.com/query/61738/kleros-v2-core-devnet/version/latest -LOGTAIL_TOKEN_KEEPER_BOT=ABC123ABC123ABC123ABC -LOGTAIL_TOKEN_RELAYER_BOT=ABC123ABC123ABC123ABC -LOGTAIL_TOKEN_DISPUTOR_BOT=ABC123ABC123ABC123ABC -HEARTBEAT_URL_KEEPER_BOT=https://uptime.betterstack.com/api/v1/heartbeat/ABC123ABC123ABC123ABC -SHUTTER_API=testnet -SHUTTER_API_KEY= -DISPUTES_TO_SKIP= - -# Optionally for debugging -# TENDERLY_USERNAME=your_username -# TENDERLY_PROJECT=your_project diff --git a/contracts/.eslintignore b/contracts/.eslintignore deleted file mode 100644 index 85f5562af..000000000 --- a/contracts/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -artifacts -cache -coverage diff --git a/contracts/.npmignore b/contracts/.npmignore deleted file mode 100644 index ac1207574..000000000 --- a/contracts/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -# NOP, just force npm to disregard .gitignore -# https://docs.npmjs.com/cli/v9/using-npm/developers#keeping-files-out-of-your-package - -.env* -.flaskenv* -!.env.project -!.env.vault \ No newline at end of file diff --git a/contracts/.npmrc b/contracts/.npmrc deleted file mode 100644 index af941b49c..000000000 --- a/contracts/.npmrc +++ /dev/null @@ -1 +0,0 @@ -sign-git-tag=true diff --git a/contracts/.prettierignore b/contracts/.prettierignore deleted file mode 100644 index f268596e5..000000000 --- a/contracts/.prettierignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -artifacts -cache -coverage* -gasReporterOutput.json diff --git a/contracts/.solcover.js b/contracts/.solcover.js deleted file mode 100644 index 46bc39e3c..000000000 --- a/contracts/.solcover.js +++ /dev/null @@ -1,25 +0,0 @@ -/* eslint-disable node/no-extraneous-require */ - -const shell = require("shelljs"); - -// The environment variables are loaded in hardhat.config.ts - -module.exports = { - istanbulReporter: ["lcov"], - configureYulOptimizer: true, - irMinimum: true, - onCompileComplete: async function (_config) { - await run("typechain"); - }, - onIstanbulComplete: async function (_config) { - // We need to do this because solcover generates bespoke artifacts. - shell.rm("-rf", "./artifacts"); - shell.rm("-rf", "./typechain"); - }, - skipFiles: ["test", "token", "kleros-v1", "proxy/mock", "gateway/mock", "rng/mock"], - mocha: { - timeout: 20000, - grep: "@skip-on-coverage", // Find everything with this tag - invert: true, // Run the grep's inverse set. - }, -}; diff --git a/contracts/.solhint.json b/contracts/.solhint.json deleted file mode 100644 index 465b9a041..000000000 --- a/contracts/.solhint.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "solhint:recommended", - "plugins": [ - "prettier" - ], - "rules": { - "compiler-version": [ - "error", - "^0.8.0" - ], - "func-visibility": [ - "warn", - { - "ignoreConstructors": true - } - ], - "prettier/prettier": "warn", - "max-line-length": "off", - "check-send-result": "off", - "not-rely-on-time": "off", - "multiple-sends": "off", - "quotes": "warn" - } -} diff --git a/contracts/.solhintignore b/contracts/.solhintignore deleted file mode 100644 index 78ecf992e..000000000 --- a/contracts/.solhintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -src/**/mock/*.sol diff --git a/contracts/.yarnrc.yml b/contracts/.yarnrc.yml deleted file mode 100644 index c6e883c59..000000000 --- a/contracts/.yarnrc.yml +++ /dev/null @@ -1,2 +0,0 @@ -nodeLinker: node-modules - diff --git a/contracts/CHANGELOG.md b/contracts/CHANGELOG.md deleted file mode 100644 index 2e61786fb..000000000 --- a/contracts/CHANGELOG.md +++ /dev/null @@ -1,167 +0,0 @@ -# Changelog - -All notable changes to this package will be documented in this file. - -The format is based on [Common Changelog](https://common-changelog.org/). - -## [0.13.0] - 2025-08-07 (Not published yet) - -### Changed - -- **Breaking:** Stake the juror's PNK rewards instead of transferring them out ([#2099](https://github.com/kleros/kleros-v2/issues/2099)) -- **Breaking:** Replace `require()` with `revert()` and custom errors outside KlerosCore for consistency and smaller bytecode ([#2084](https://github.com/kleros/kleros-v2/issues/2084)) -- **Breaking:** Rename the interface from `RNG` to `IRNG` ([#2054](https://github.com/kleros/kleros-v2/issues/2054)) -- **Breaking:** Remove the `_block` parameter from `IRNG.requestRandomness()` and `IRNG.receiveRandomness()`, not needed for the primary VRF-based RNG ([#2054](https://github.com/kleros/kleros-v2/issues/2054)) -- **Breaking:** Rename `governor` to `owner` in order to comply with the lightweight ownership standard [ERC-5313](https://eipsinsight.com/ercs/erc-5313) ([#2112](https://github.com/kleros/kleros-v2/issues/2112)) -- **Breaking:** Apply the penalties to the stakes in the Sortition Tree ([#2107](https://github.com/kleros/kleros-v2/issues/2107)) -- **Breaking:** Make `SortitionModule.getJurorBalance().stakedInCourt` include the penalties ([#2107](https://github.com/kleros/kleros-v2/issues/2107)) -- Make `IDisputeKit.draw()` and `ISortitionModule.draw()` return the court ID from which the juror was drawn ([#2107](https://github.com/kleros/kleros-v2/issues/2107)) -- Rename `SortitionModule.setJurorInactive()` to `SortitionModule.forcedUnstakeAllCourts()` ([#2107](https://github.com/kleros/kleros-v2/issues/2107)) -- Make the primary VRF-based RNG fall back to `BlockhashRNG` if the VRF request is not fulfilled within a timeout ([#2054](https://github.com/kleros/kleros-v2/issues/2054)) -- Authenticate the calls to the RNGs to prevent 3rd parties from depleting the Chainlink VRF subscription funds ([#2054](https://github.com/kleros/kleros-v2/issues/2054)) -- Use `block.timestamp` rather than `block.number` for `BlockhashRNG` for better reliability on Arbitrum as block production is sporadic depending on network conditions. ([#2054](https://github.com/kleros/kleros-v2/issues/2054)) -- Replace the `bytes32 _key` parameter in `SortitionTrees.createTree()` and `SortitionTrees.draw()` by `uint96 courtID` ([#2113](https://github.com/kleros/kleros-v2/issues/2113)) -- Extract the sortition sum trees logic into a library `SortitionTrees` ([#2113](https://github.com/kleros/kleros-v2/issues/2113)) -- Make `IDisputeKit.getDegreeOfCoherenceReward()` multi-dimensional so different calculations may be applied to PNK rewards, fee rewards and PNK penalties (future-proofing) ([#2090](https://github.com/kleros/kleros-v2/issues/2090)) -- Consolidate the constant `ALPHA_DIVISOR` with `ONE_BASIS_POINTS` ([#2090](https://github.com/kleros/kleros-v2/issues/2090)) -- Set the Hardhat Solidity version to v0.8.30 and enable the IR pipeline ([#2069](https://github.com/kleros/kleros-v2/issues/2069)) -- Set the Foundry Solidity version to v0.8.30 and enable the IR pipeline ([#2073](https://github.com/kleros/kleros-v2/issues/2073)) -- Widen the allowed solc version to any v0.8.x for the interfaces only ([#2083](https://github.com/kleros/kleros-v2/issues/2083)) -- Bump `hardhat` to v2.26.2 ([#2069](https://github.com/kleros/kleros-v2/issues/2069)) -- Bump `@kleros/vea-contracts` to v0.7.0 ([#2073](https://github.com/kleros/kleros-v2/issues/2073)) - -### Added - -- **Breaking:** Add a new field `drawnJurorFromCourtIDs` to the `Round` struct in `KlerosCoreBase` and `KlerosCoreUniversity` ([#2107](https://github.com/kleros/kleros-v2/issues/2107)) -- **Breaking:** Add a new state variable `jumpDisputeKitID` to the `DisputeKitClassicBase` contract ([#2114](https://github.com/kleros/kleros-v2/issues/2114)) -- **Breaking:** Add a parameter `_recoveryCommit` to the event `DisputeKitShutter.CommitCastShutter` ([#2100](https://github.com/kleros/kleros-v2/issues/2100)) -- **Breaking:** Add a storage variable `recoveryCommitments` to `DisputeKitShutter` ([#2100](https://github.com/kleros/kleros-v2/issues/2100)) -- Allow the Shutter commitment to be recovered by the juror using only the salt and the choice, without having to provide the justification ([#2100](https://github.com/kleros/kleros-v2/issues/2100)) -- Allow the dispute kits to force an early court jump and to override the number of votes after an appeal (future-proofing) ([#2110](https://github.com/kleros/kleros-v2/issues/2110)) -- Allow the dispute kits to specify which new dispute kit to use when a court jump occurs ([#2114](https://github.com/kleros/kleros-v2/issues/2114)) -- Allow stake changes to by-pass delayed stakes when initiated by the SortitionModule by setting the `_noDelay` parameter to `true` in `SortitionModule.validateStake()` ([#2107](https://github.com/kleros/kleros-v2/issues/2107)) - -### Fixed - -- Do not pass to Voting period if all the commits are cast because it breaks the current Shutter auto-reveal process. ([#2085](https://github.com/kleros/kleros-v2/issues/2085)) - -## [0.12.0] - 2025-08-05 - -### Changed - -- **Breaking:** Make `viem` a peer dependency, it should be provided by the consuming package ([`4594536`](https://github.com/kleros/kleros-v2/commit/4594536c)) - -### Added - -- Add helper function `getDisputeKitsViem` to retrieve a deployment's available dispute kit infos including their capabilities (`isShutter`, `isGated`) ([`5a81f9e`](https://github.com/kleros/kleros-v2/commit/5a81f9ec)) - -## [0.11.0] - 2025-08-02 - -### Changed - -- **Breaking:** Add an extra wNative parameter to the initializer of `KlerosCoreBase` and `DisputeKitBase` and their descendants ([#2041](https://github.com/kleros/kleros-v2/issues/2041)) -- **Breaking:** Add an extra wNative parameter to the constructor of `KlerosGovernor` ([#2041](https://github.com/kleros/kleros-v2/issues/2041)) -- **Breaking:** Upgrade Mainnet Beta to v0.11.0 ([`ea9dcc95`](https://github.com/kleros/kleros-v2/commit/ea9dcc95)) -- **Breaking:** Upgrade Devnet and Testnet to v0.11.0 ([`b9e847d`](https://github.com/kleros/kleros-v2/commit/b9e847d9)) -- Fallback to sending wETH if sending ETH fails ([#2041](https://github.com/kleros/kleros-v2/issues/2041)) -- Automate `SortitionModule.withdrawLeftoverPNK()` using the keeper bot ([`97ba58a`](https://github.com/kleros/kleros-v2/commit/97ba58a)) -- Upgrade Testnet to v0.10.0 ([#2058](https://github.com/kleros/kleros-v2/issues/2058)) -- Support the Gated and Shutter Gated dispute kits by the keeper bot ([`026fe83`](https://github.com/kleros/kleros-v2/commit/026fe83)) -- Support the Gated and Shutter Gated dispute kits by the contracts getter tests ([`2166ee0`](https://github.com/kleros/kleros-v2/commit/2166ee0)) -- Draw jurors with a more number of iterations to account for ineligible jurors by the keeper bot ([`6eb5bc6`](https://github.com/kleros/kleros-v2/commit/6eb5bc6)) -- Bump `@shutter-network/shutter-sdk` to 0.0.2 ([#2049](https://github.com/kleros/kleros-v2/issues/2049)) - -### Added - -- **Breaking:** Add new dispute kits to Mainnet Beta: Shutter, Gated, Gated Shutter ([`ea9dcc95`](https://github.com/kleros/kleros-v2/commit/ea9dcc95)) -- **Breaking:** Add new dispute kits to Testnet: Shutter, Gated, Gated Shutter ([`b9e847d`](https://github.com/kleros/kleros-v2/commit/b9e847d9)) - -### Fixed - -- Do not push address(0) in `DisputeKitBase.round.votes` during `draw()` when there is no staked juror in the court ([#2059](https://github.com/kleros/kleros-v2/issues/2059)) -- Reduce Neo core contract size below limit by 144 bytes by extracting internal functions for repeated code and by making the `appealPeriod()` view external. ([`4a84534`](https://github.com/kleros/kleros-v2/commit/4a845346)) - -## [0.10.0] - 2025-07-20 - -### Changed - -- **Breaking:** Redeploy the Devnet contracts ([`b8a2a15`](https://github.com/kleros/kleros-v2/commit/b8a2a15)) -- **Breaking:** Update the Devnet contract artifacts, add getter for the new Shutter, Gated and Gated Shutter dispute kits ([`5ef5f23`](https://github.com/kleros/kleros-v2/commit/5ef5f23)) -- **Breaking**: Make `KlerosCoreBase.draw()` return the number of drawn jurors ([`54d83a7`](https://github.com/kleros/kleros-v2/commit/54d83a7)) -- **Breaking**: Make `SortitionModule.penalizeStake()` return `(uint256 pnkBalance, uint256 availablePenalty)` ([#2004](https://github.com/kleros/kleros-v2/issues/2004)) -- **Breaking**: Split SortitionModuleBase.setStake() into 2 functions: `validateStake()` and `setStake()` ([#2004](https://github.com/kleros/kleros-v2/issues/2004)) -- Avoid unnecessary calls `KlerosCoreBase.draw()` by the keeper bot when no juror is available ([`54d83a7`](https://github.com/kleros/kleros-v2/commit/54d83a7)) -- Migrate the contracts verification tooling to the etherscan v2 API ([`b8a2a15`](https://github.com/kleros/kleros-v2/commit/b8a2a15)) -- Bump contract Solidity version to v0.8.28 ([`6e535cc`](https://github.com/kleros/kleros-v2/commit/6e535cc)) -- Bump contract dependencies, `hardhat` to v2.26.0 `node` to v20, `yarn` to 4.9.2 ([`6e535cc`](https://github.com/kleros/kleros-v2/commit/6e535cc)) -- Deprecate struct field `SortitionModuleBase.SortitionSumTree.alreadyTransferred` ([#2004](https://github.com/kleros/kleros-v2/issues/2004)) -- Deprecate state variable `SortitionModuleBase.latestDelayedStakeIndex` ([#2004](https://github.com/kleros/kleros-v2/issues/2004)) - -### Added - -- Add Gated dispute kit with support a dynamic token address for the Gated dispute kit using the dispute `extraData` ([#2045](https://github.com/kleros/kleros-v2/issues/2045)) -- Add Shutter Gated dispute kit ([#2045](https://github.com/kleros/kleros-v2/issues/2045)) -- Add public functions to `SortitionModuleBase` `getJurorLeftoverPNK(address _juror)` and `withdrawLeftoverPNK(address _account)` ([#2004](https://github.com/kleros/kleros-v2/issues/2004)) -- Add a permissioned function to KlerosCoreBase `transferBySortitionModule(address _account, uint256 _amount)` -- Add a public boolean `DisputeKitBase.coreDisputeIDToActive` keyed by `coreDisputeID` ([#2039](https://github.com/kleros/kleros-v2/issues/2039)) -- Support for the Shutter API token by the keeper bot using the environment variable `SHUTTER_API_KEY` ([`f999611`](https://github.com/kleros/kleros-v2/commit/f999611)) - -### Removed - -- Remove instant staking logic ([#2004](https://github.com/kleros/kleros-v2/issues/2004)) -- Remove the parameter `_alreadyTransferred` to the staking functions. No external interfaces impact. ([#2004](https://github.com/kleros/kleros-v2/issues/2004)) - -### Fixed - -- Do not prevent a juror from being drawn if their entire stake is already locked ([#2004](https://github.com/kleros/kleros-v2/issues/2004)) -- Prevent stake corruption when delayed stakes move existing stakes to another court and juror is drawn ([#2004](https://github.com/kleros/kleros-v2/issues/2004)) -- Ensure that a dispute does belong to the right dispute kit ([#2039](https://github.com/kleros/kleros-v2/issues/2039)) -- Reset `dispute.jumped` in dispute kit `createDispute()` ([#2039](https://github.com/kleros/kleros-v2/issues/2039)) - -## [0.9.4] - 2025-06-23 - -### Changed - -- Upgrade the Beta contracts ([`a72c450`](https://github.com/kleros/kleros-v2/commit/a72c450)) -- Upgrade the Testnet contracts ([`05c5b3d`](https://github.com/kleros/kleros-v2/commit/05c5b3d)) -- Upgrade the Devnet contracts ([`019cfd9`](https://github.com/kleros/kleros-v2/commit/019cfd9)) - -### Added - -- Add a view function `KlerosCoreBase.getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round)` -- Add a public boolean `DisputeKitBase.alreadyDrawn` keyed by `localDisputeID`, `localRoundID` and `drawnAddress` - -### Fixed - -- Stop calling `getRoundInfo()` from the mutating function `DisputeKitBase._postDrawCheck()` ([`524a2dc`](https://github.com/kleros/kleros-v2/commit/524a2dc)) -- Restore the broken dispute kit storage layout on Testnet ([`1d2e62a`](https://github.com/kleros/kleros-v2/commit/1d2e62a)) -- Fix a typo in SafeERC20.sol ([#1960](https://github.com/kleros/kleros-v2/issues/1960)) - -### Uncategorized - -## [0.9.3] - 2025-04-18 - -### Changed - -- **Breaking change**: Bundle the package for both CJS and ESM, it changes the package entry point ([`c132303`](https://github.com/kleros/kleros-v2/commit/c132303)) -- Pass the commit and appeal periods quicker when possible ([#1955](https://github.com/kleros/kleros-v2/issues/1955)) - -### Added - -- Add contracts getter for Viem ([`1aeb0a2`](https://github.com/kleros/kleros-v2/commit/1aeb0a2)) -- Add contract getter for EtherJS, export deployment files ([`692c83f`](https://github.com/kleros/kleros-v2/commit/692c83f)) -- New DisputeKitBase view function `isAppealFunded()` ([#1955](https://github.com/kleros/kleros-v2/issues/1955)) - -### Fixed - -- Fix typo in custom error `StakingNotPossibleInThisCourt` ([#1956](https://github.com/kleros/kleros-v2/issues/1956)) - -## [0.8.1] - 2025-04-10 - -[0.13.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.13.0 -[0.12.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.12.0 -[0.11.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.11.0 -[0.10.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.10.0 -[0.9.4]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.9.4 -[0.9.3]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.9.3 -[0.8.1]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.8.1 diff --git a/contracts/DEVNET_REDEPLOY.md b/contracts/DEVNET_REDEPLOY.md deleted file mode 100644 index 19f9b7ae3..000000000 --- a/contracts/DEVNET_REDEPLOY.md +++ /dev/null @@ -1,109 +0,0 @@ -## Clean up of the old artifacts - -The following contracts have been preserved: - -- The University contracts (out-of-scope for now) -- The ERC20 tokens and their faucets (unchanged): PinakionV2, PNK, PNKFaucet, DAI, DAIFaucet, WETH, WETHFaucet -- The RNG contracts (unchanged): RandomizerOracle, BlockHashRNG, ChainlinkRNG, ChainlinkVRFCoordinator (mock) -- KlerosV2NeoEarlyUser (unchanged, for Neo devnet) - -```shell -rm deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitGated_Implementation.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitGated.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Implementation.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Implementation.json -rm deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json -rm deployments/arbitrumSepoliaDevnet/DisputeResolver.json -rm deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json -rm deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json -rm deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json -rm deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json -rm deployments/arbitrumSepoliaDevnet/EvidenceModule.json -rm deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json -rm deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json -rm deployments/arbitrumSepoliaDevnet/KlerosCore.json -rm deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json -rm deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json -rm deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json -rm deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json -rm deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json -rm deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json -rm deployments/arbitrumSepoliaDevnet/PolicyRegistry.json -rm deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json -rm deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json -rm deployments/arbitrumSepoliaDevnet/SortitionModule.json -rm deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json -rm deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json -``` - -## Contracts Deployment - DRY RUN - -Shell 1: fork node - -```shell -anvil --fork-url https://sepolia-rollup.arbitrum.io/rpc -``` - -Shell 2: deployer - -```shell -export ARBITRUM_SEPOLIA_RPC=http://127.0.0.1:8545 - -yarn clean -yarn deploy --network arbitrumSepoliaDevnet --tags Resolver -yarn deploy --network arbitrumSepoliaDevnet --tags ArbitrationRuler - -unset ARBITRUM_SEPOLIA_RPC -``` - -:warning: Remember to delete all the deployed artifacts after each dry run. - -## Contracts Deployment - LIVE - -```shell -yarn clean -yarn deploy --network arbitrumSepoliaDevnet --tags Resolver -yarn deploy --network arbitrumSepoliaDevnet --tags ArbitrationRuler - -# Contracts verification, marking proxies -yarn etherscan-verify --network arbitrumSepoliaDevnet -yarn etherscan-verify-proxies - -# Docs update -./scripts/populateReadme.sh -``` - -## Courts structure and policies configuration - -```shell -yarn hardhat populate:courts --from v2_devnet --network arbitrumSepoliaDevnet - -yarn hardhat populate:policy-registry --from v2_devnet --network arbitrumSepoliaDevnet -``` - -## Contracts SDK - -### Refresh the artifacts - -```shell -# Viem artifacts -yarn viem:generate-devnet - -# Hardhat artifacts -yarn export:devnet -``` - -### Update the contract helpers - -If there are new or removed contracts, edit the contract helpers in: - -- `scripts/utils/contracts.ts` (Hardhat runtime) -- `deployments/contractsEthers.ts` (pure EthersJS) -- `deployments/contractsViem.ts` (pure Viem) diff --git a/contracts/README.md b/contracts/README.md deleted file mode 100644 index 4f5d6d657..000000000 --- a/contracts/README.md +++ /dev/null @@ -1,296 +0,0 @@ -# @kleros/kleros-v2-contracts - -Smart contracts for Kleros v2 - -## Deployments - -Refresh the list of deployed contracts by running `./scripts/generateDeploymentsMarkdown.sh` or `./scripts/populateReadme.sh`. - -### V2 Neo (prelaunch) - -#### Arbitrum One - -- [BlockHashRNG](https://arbiscan.io/address/0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B) -- [ChainlinkRNG](https://arbiscan.io/address/0x897d83a7d5F23555eFA15e1BE297d5503522cbA3) -- [DisputeKitClassicNeo: proxy](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421), [implementation](https://arbiscan.io/address/0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC) -- [DisputeKitGatedNeo: proxy](https://arbiscan.io/address/0xaE1eed20C125B739b64c948820C61F809ad9a925), [implementation](https://arbiscan.io/address/0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a) -- [DisputeKitGatedShutterNeo: proxy](https://arbiscan.io/address/0x788330092B9704809C19858E39EB9Ac402c2E47b), [implementation](https://arbiscan.io/address/0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32) -- [DisputeKitShutterNeo: proxy](https://arbiscan.io/address/0x9D3e3f1765744c2a1BC6F6088549770444BBC768), [implementation](https://arbiscan.io/address/0xF3103B46403A0bBd4551648BFb29BCC2b8783947) -- [DisputeResolverNeo](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) -- [DisputeResolverRulerNeo](https://arbiscan.io/address/0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140) -- [DisputeTemplateRegistry: proxy](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2), [implementation](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) -- [EvidenceModule: proxy](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3), [implementation](https://arbiscan.io/address/0xA502A3942abCF8e71FBD87ed442B39b798b192C8) -- [KlerosCoreNeo: proxy](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea), [implementation](https://arbiscan.io/address/0xC1210493804eEF123096F9581Ee82B915150E54c) -- [KlerosCoreRulerNeo: proxy](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13), [implementation](https://arbiscan.io/address/0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324) -- [KlerosCoreSnapshotProxy](https://arbiscan.io/address/0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95) -- [KlerosV2NeoEarlyUser](https://arbiscan.io/address/0xfE34a72c55e512601E7d491A9c5b36373cE34d63) -- [Pinakion](https://arbiscan.io/address/0x330bD769382cFc6d50175903434CCC8D206DCAE5) -- [PolicyRegistry: proxy](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c), [implementation](https://arbiscan.io/address/0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28) -- [RandomizerRNG: proxy](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3), [implementation](https://arbiscan.io/address/0xF1a7Cd3115F5852966430f8E3877D2221F074A2e) -- [SortitionModuleNeo: proxy](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D), [implementation](https://arbiscan.io/address/0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE) -- [TransactionBatcher](https://arbiscan.io/address/0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF) - -### Official Testnet - -#### Arbitrum Sepolia - -- [BlockHashRNG](https://sepolia.arbiscan.io/address/0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754) -- [ChainlinkRNG](https://sepolia.arbiscan.io/address/0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79) -- [DAI](https://sepolia.arbiscan.io/address/0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03) -- [DAIFaucet](https://sepolia.arbiscan.io/address/0x1Fa58B52326488D62A406E71DBaD839560e810fF) -- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94), [implementation](https://sepolia.arbiscan.io/address/0xA122856B3B4C5fBcA129088af3CEb204509805f0) -- [DisputeKitGated: proxy](https://sepolia.arbiscan.io/address/0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed), [implementation](https://sepolia.arbiscan.io/address/0x2d1b63C9638ed62875256676C665a7ec14D7663C) -- [DisputeKitGatedShutter: proxy](https://sepolia.arbiscan.io/address/0x936231010462458ebaA45dDc422A5940C08a474C), [implementation](https://sepolia.arbiscan.io/address/0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7) -- [DisputeKitShutter: proxy](https://sepolia.arbiscan.io/address/0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa), [implementation](https://sepolia.arbiscan.io/address/0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d) -- [DisputeResolver](https://sepolia.arbiscan.io/address/0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652) -- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb), [implementation](https://sepolia.arbiscan.io/address/0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec) -- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397), [implementation](https://sepolia.arbiscan.io/address/0xC4e64e6E949936a18269937FC1e18cb11E3db14D) -- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479), [implementation](https://sepolia.arbiscan.io/address/0x02F607722749CECd32db07AA0b0755281FE9D13c) -- [KlerosCoreSnapshotProxy](https://sepolia.arbiscan.io/address/0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C) -- [PinakionV2](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) -- [PNKFaucet](https://sepolia.arbiscan.io/address/0x9f6ffc13B685A68ae359fCA128dfE776458Df464) -- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585), [implementation](https://sepolia.arbiscan.io/address/0x7CC8E0787e381aE159C4d3e137f20f9203313D41) -- [RandomizerRNG: proxy](https://sepolia.arbiscan.io/address/0x51a97ad9F0aA818e75819da3cA20CAc319580627), [implementation](https://sepolia.arbiscan.io/address/0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203) -- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD), [implementation](https://sepolia.arbiscan.io/address/0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83) -- [TransactionBatcher](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) -- [WETH](https://sepolia.arbiscan.io/address/0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511) -- [WETHFaucet](https://sepolia.arbiscan.io/address/0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835) - -#### Sepolia - -- [PinakionV2](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - -#### Chiado - -- [ArbitrableExample](https://gnosis-chiado.blockscout.com/address/0x438ca5337AE771dF926B7f4fDE1A21D72a315bDC) -- [DisputeResolver](https://gnosis-chiado.blockscout.com/address/0x5f79737f65320bA12440aA88087281cC8e71A781) -- [DisputeTemplateRegistry](https://gnosis-chiado.blockscout.com/address/0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385) -- [ForeignGatewayOnGnosis](https://gnosis-chiado.blockscout.com/address/0x2824bdcc752b1272D56A84be03A74Ee856C06e43) -- [SortitionSumTreeFactory](https://gnosis-chiado.blockscout.com/address/0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636) -- [TokenBridge](https://gnosis-chiado.blockscout.com/address/0xbb3c86f9918C3C1d83668fA84e79E876d147fFf2) -- [WETH](https://gnosis-chiado.blockscout.com/address/0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8) -- [WETHFaucet](https://gnosis-chiado.blockscout.com/address/0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F) -- [WPNKFaucet](https://gnosis-chiado.blockscout.com/address/0x5898aeE045A25B276369914c3448B72a41758B2c) -- [WrappedPinakionV2](https://gnosis-chiado.blockscout.com/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd) -- [xKlerosLiquidV2](https://gnosis-chiado.blockscout.com/address/0x34E520dc1d2Db660113b64724e14CEdCD01Ee879) - -### Devnet - -#### Arbitrum Sepolia - -- [ArbitrableExample](https://sepolia.arbiscan.io/address/0x3Eae72F076c68F5c354C73abC33EAA291ef1b2Fa) -- [BlockHashRNG](https://sepolia.arbiscan.io/address/0x56d6d65Fe202232714794B5D5e4ed9894466Ee01) -- [ChainlinkRNG](https://sepolia.arbiscan.io/address/0x7e40f5aC809521654A9c17e442F2a0a5a4d890FA) -- [DAI](https://sepolia.arbiscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) -- [DAIFaucet](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E) -- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1), [implementation](https://sepolia.arbiscan.io/address/0xc4cC0274E55a9818f8cF42640B1De61d269425ad) -- [DisputeKitClassicUniversity: proxy](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5), [implementation](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) -- [DisputeKitGated: proxy](https://sepolia.arbiscan.io/address/0x677dA30B4b27D129354DdA1e219Bcc86802132d1), [implementation](https://sepolia.arbiscan.io/address/0xA27EedcEA916BC1ab91720cE70c56666E854F55e) -- [DisputeKitGatedShutter: proxy](https://sepolia.arbiscan.io/address/0xd86b84eb36Cd48f3f384b4490F255b494385F429), [implementation](https://sepolia.arbiscan.io/address/0x56199F9E5C0ef9251A251a41597A971141199EDF) -- [DisputeKitShutter: proxy](https://sepolia.arbiscan.io/address/0xfE0a958bc744Bb9E224E1822625B53134ac5CB69), [implementation](https://sepolia.arbiscan.io/address/0x6582CE0FdB29B5673E6650e34728C784BafB2139) -- [DisputeResolver](https://sepolia.arbiscan.io/address/0x71f8537e925C753Fe88DA7e69Ae423f9f3a9A292) -- [DisputeResolverRuler](https://sepolia.arbiscan.io/address/0xAEB1bbaE58125BA5F32349c69e4274d15dfD6EC3) -- [DisputeResolverUniversity](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) -- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f), [implementation](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) -- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49), [implementation](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) -- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9), [implementation](https://sepolia.arbiscan.io/address/0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E) -- [KlerosCoreRuler: proxy](https://sepolia.arbiscan.io/address/0x0630e4248a17b506809009F5D88E2f5bEE584c83), [implementation](https://sepolia.arbiscan.io/address/0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF) -- [KlerosCoreSnapshotProxy](https://sepolia.arbiscan.io/address/0xF924ac62b20901914c101Fa089Da1FB6A0585138) -- [KlerosCoreUniversity: proxy](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6), [implementation](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) -- [KlerosV2NeoEarlyUser](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) -- [PinakionV2](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) -- [PNKFaucet](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) -- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0xd8681dBF525ecBda2F799BFddB96840065075e8A), [implementation](https://sepolia.arbiscan.io/address/0x472846F88D1356bb483a88f97B55026654Fc5deD) -- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663), [implementation](https://sepolia.arbiscan.io/address/0x8a26445989c944C58503275ad87Ab4d7b17d4F1e) -- [SortitionModuleUniversity: proxy](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79), [implementation](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) -- [TransactionBatcher](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) -- [WETH](https://sepolia.arbiscan.io/address/0x3829A2486d53ee984a0ca2D76552715726b77138) -- [WETHFaucet](https://sepolia.arbiscan.io/address/0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd) - -#### Sepolia - -- [PinakionV2](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - -#### Chiado - -- [ArbitrableExample](https://gnosis-chiado.blockscout.com/address/0xB56A23b396E0eae85414Ce5815da448ba529Cb4A) -- [DisputeResolver](https://gnosis-chiado.blockscout.com/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) -- [DisputeTemplateRegistry](https://gnosis-chiado.blockscout.com/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) -- [ForeignGatewayOnGnosis: proxy](https://gnosis-chiado.blockscout.com/address/0x078dAd05373d19d7fd6829735b765F12242a4300), [implementation](https://gnosis-chiado.blockscout.com/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) -- [WETH](https://gnosis-chiado.blockscout.com/address/0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8) -- [WETHFaucet](https://gnosis-chiado.blockscout.com/address/0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F) -- [WPNKFaucet](https://gnosis-chiado.blockscout.com/address/0x5898aeE045A25B276369914c3448B72a41758B2c) -- [WrappedPinakionV2](https://gnosis-chiado.blockscout.com/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd) - -## Getting Started - -### Install the Dependencies - -```bash -yarn install -``` - -### Run Tests - -```bash -yarn test -``` - -### Compile the Contracts - -```bash -yarn build -``` - -### Run Linter on Files - -```bash -yarn lint -``` - -### Fix Linter Issues on Files - -```bash -yarn fix -``` - -### Deploy Instructions - -**NOTICE:** the commands below work only if you are inside the `contracts/` directory. - -#### 0. Set the Environment Variables - -Copy `.env.example` file as `.env` and edit it accordingly. - -```bash -cp .env.example .env -``` - -The following env vars are required: - -- `PRIVATE_KEY`: the private key of the deployer account used for the testnets. -- `MAINNET_PRIVATE_KEY`: the private key of the deployer account used for Mainnet. -- `INFURA_API_KEY`: the API key for infura. - -The ones below are optional: - -- `ETHERSCAN_API_KEY`: to verify the source of the newly deployed contracts on **Etherscan**. -- `ARBISCAN_API_KEY`: to verify the source of the newly deployed contracts on **Arbitrum**. -- `GNOSISSCAN_API_KEY`: to verify the source of the newly deployed contracts on **Gnosis chain**. - -#### 1. Update the Constructor Parameters (optional) - -If some of the constructor parameters (such as the Meta Evidence) needs to change, you need to update the files in the `deploy/` directory. - -#### 2. Deploy to a Local Network - -The complete deployment is multi-chain, so a deployment to the local network can only simulate either the Home chain or the Foreign chain. - -**Shell 1: the node** - -```bash -yarn hardhat node --tags nothing -``` - -**Shell 2: the deploy script** - -```bash -yarn deploy --network localhost --tags -``` - -#### 3. Deploy to Public Testnets - -```bash -# ArbitrumSepolia to Chiado -yarn deploy --network arbitrumSepolia --tags Arbitration -yarn deploy --network arbitrumSepolia --tags Resolver -yarn deploy --network chiado --tags ForeignGatewayOnGnosis -yarn deploy --network chiado --tags KlerosLiquidOnGnosis -yarn deploy --network chiado --tags ForeignArbitrable -yarn deploy --network arbitrumSepolia --tags HomeGatewayToGnosis - -# Sepolia -yarn deploy --network sepolia --tags ForeignGatewayOnEthereum -yarn deploy --network sepolia --tags ForeignArbitrable -yarn deploy --network arbitrumSepolia --tags HomeGatewayToEthereum -``` - -The deployed addresses should be displayed to the screen after the deployment is complete. If you missed them, you can always go to the `deployments/` directory and look for the respective file. - -#### 4. Deploy a Devnet on Public Testnets - -Same steps as above but append `Devnet` to the `--network` parameter. - -#### Running Test Fixtures - -**Shell 1: the node** - -```bash -yarn hardhat node --tags Arbitration,VeaMock -``` - -**Shell 2: the test scripts** - -```bash -yarn test --network localhost -``` - -#### 4. Verify the Source Code - -This must be done for each network separately. - -```bash -# explorer -yarn etherscan-verify --network -yarn etherscan-verify-proxies - -# sourcify -yarn sourcify --network - -``` - -## Ad-hoc procedures - -### Populating the policy registry and courts - -The policy registry and courts configuration can be found in `config/policies.*.json` and `config/courts.*.json`. - -#### 1/ Export the registry data from V1 - -```bash -for network in mainnet gnosischain -do - yarn hardhat run scripts/getPoliciesV1.ts --network $network | tee config/policies.v1.$network.json - yarn hardhat run scripts/getCourtsV1.ts --network $network | tee config/courts.v1.$network.json -done -``` - -#### 2/ Import the data to V2 - Public Testnet - -```bash -yarn hardhat populate:courts --from v2_testnet --max-number-of-courts 3 --network arbitrumSepolia -yarn hardhat populate:policy-registry --from v2_testnet --network arbitrumSepolia -``` - -### Generate deployment artifacts for existing contracts - -#### Usage - -```bash -scripts/generateDeploymentArtifact.sh
-``` - -#### Example: WETH on Gnosis chain - -```bash -scripts/generateDeploymentArtifact.sh gnosischain 0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9 > deployments/gnosischain/WETH.json -``` - -### Push the contracts to a Tenderly project - -Ensure that your `$TENDERLY_PROJECT` and `$TENDERLY_USERNAME` is set correctly in `.env`. - -```bash -yarn tenderly-verify --network sepolia -yarn tenderly-verify --network arbitrumSepolia -``` diff --git a/contracts/README.md.template b/contracts/README.md.template deleted file mode 100644 index 0c4594d35..000000000 --- a/contracts/README.md.template +++ /dev/null @@ -1,182 +0,0 @@ -# @kleros/kleros-v2-contracts - -Smart contracts for Kleros v2 - -## Deployments - -Refresh the list of deployed contracts by running `./scripts/generateDeploymentsMarkdown.sh` or `./scripts/populateReadme.sh`. - -$deployments - -## Getting Started - -### Install the Dependencies - -```bash -yarn install -``` - -### Run Tests - -```bash -yarn test -``` - -### Compile the Contracts - -```bash -yarn build -``` - -### Run Linter on Files - -```bash -yarn lint -``` - -### Fix Linter Issues on Files - -```bash -yarn fix -``` - -### Deploy Instructions - -**NOTICE:** the commands below work only if you are inside the `contracts/` directory. - -#### 0. Set the Environment Variables - -Copy `.env.example` file as `.env` and edit it accordingly. - -```bash -cp .env.example .env -``` - -The following env vars are required: - -- `PRIVATE_KEY`: the private key of the deployer account used for the testnets. -- `MAINNET_PRIVATE_KEY`: the private key of the deployer account used for Mainnet. -- `INFURA_API_KEY`: the API key for infura. - -The ones below are optional: - -- `ETHERSCAN_API_KEY`: to verify the source of the newly deployed contracts on **Etherscan**. -- `ARBISCAN_API_KEY`: to verify the source of the newly deployed contracts on **Arbitrum**. -- `GNOSISSCAN_API_KEY`: to verify the source of the newly deployed contracts on **Gnosis chain**. - -#### 1. Update the Constructor Parameters (optional) - -If some of the constructor parameters (such as the Meta Evidence) needs to change, you need to update the files in the `deploy/` directory. - -#### 2. Deploy to a Local Network - -The complete deployment is multi-chain, so a deployment to the local network can only simulate either the Home chain or the Foreign chain. - -**Shell 1: the node** - -```bash -yarn hardhat node --tags nothing -``` - -**Shell 2: the deploy script** - -```bash -yarn deploy --network localhost --tags -``` - -#### 3. Deploy to Public Testnets - -```bash -# ArbitrumSepolia to Chiado -yarn deploy --network arbitrumSepolia --tags Arbitration -yarn deploy --network arbitrumSepolia --tags Resolver -yarn deploy --network chiado --tags ForeignGatewayOnGnosis -yarn deploy --network chiado --tags KlerosLiquidOnGnosis -yarn deploy --network chiado --tags ForeignArbitrable -yarn deploy --network arbitrumSepolia --tags HomeGatewayToGnosis - -# Sepolia -yarn deploy --network sepolia --tags ForeignGatewayOnEthereum -yarn deploy --network sepolia --tags ForeignArbitrable -yarn deploy --network arbitrumSepolia --tags HomeGatewayToEthereum -``` - -The deployed addresses should be displayed to the screen after the deployment is complete. If you missed them, you can always go to the `deployments/` directory and look for the respective file. - -#### 4. Deploy a Devnet on Public Testnets - -Same steps as above but append `Devnet` to the `--network` parameter. - -#### Running Test Fixtures - -**Shell 1: the node** - -```bash -yarn hardhat node --tags Arbitration,VeaMock -``` - -**Shell 2: the test scripts** - -```bash -yarn test --network localhost -``` - -#### 4. Verify the Source Code - -This must be done for each network separately. - -```bash -# explorer -yarn etherscan-verify --network -yarn etherscan-verify-proxies - -# sourcify -yarn sourcify --network - -``` - -## Ad-hoc procedures - -### Populating the policy registry and courts - -The policy registry and courts configuration can be found in `config/policies.*.json` and `config/courts.*.json`. - -#### 1/ Export the registry data from V1 - -```bash -for network in mainnet gnosischain -do - yarn hardhat run scripts/getPoliciesV1.ts --network $network | tee config/policies.v1.$network.json - yarn hardhat run scripts/getCourtsV1.ts --network $network | tee config/courts.v1.$network.json -done -``` - -#### 2/ Import the data to V2 - Public Testnet - -```bash -yarn hardhat populate:courts --from v2_testnet --max-number-of-courts 3 --network arbitrumSepolia -yarn hardhat populate:policy-registry --from v2_testnet --network arbitrumSepolia -``` - -### Generate deployment artifacts for existing contracts - -#### Usage - -```bash -scripts/generateDeploymentArtifact.sh
-``` - -#### Example: WETH on Gnosis chain - -```bash -scripts/generateDeploymentArtifact.sh gnosischain 0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9 > deployments/gnosischain/WETH.json -``` - -### Push the contracts to a Tenderly project - -Ensure that your `$TENDERLY_PROJECT` and `$TENDERLY_USERNAME` is set correctly in `.env`. - -```bash -yarn tenderly-verify --network sepolia -yarn tenderly-verify --network arbitrumSepolia -``` diff --git a/contracts/audit/METRICS.html b/contracts/audit/index.html similarity index 100% rename from contracts/audit/METRICS.html rename to contracts/audit/index.html diff --git a/contracts/config/courts.v1.gnosischain.json b/contracts/config/courts.v1.gnosischain.json deleted file mode 100644 index f18c2de85..000000000 --- a/contracts/config/courts.v1.gnosischain.json +++ /dev/null @@ -1,272 +0,0 @@ -[ - { - "id": 0, - "parent": 0, - "hiddenVotes": true, - "minStake": "1600000000000000000000", - "alpha": "10000", - "feeForJuror": "13000000000000000000", - "jurorsForCourtJump": "511", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "id": 1, - "parent": 0, - "hiddenVotes": false, - "minStake": "1600000000000000000000", - "alpha": "5000", - "feeForJuror": "6400000000000000000", - "jurorsForCourtJump": "14", - "timesPerPeriod": [ - 140400, - 291600, - 291600, - 194400 - ] - }, - { - "id": 2, - "parent": 0, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "5000", - "feeForJuror": "19000000000000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 3, - "parent": 2, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "1800", - "feeForJuror": "8200000000000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 4, - "parent": 2, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "1800", - "feeForJuror": "8200000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 5, - "parent": 2, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "1800", - "feeForJuror": "8200000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 6, - "parent": 2, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "2200", - "feeForJuror": "10000000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 7, - "parent": 2, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "2200", - "feeForJuror": "10000000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 8, - "parent": 2, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "2800", - "feeForJuror": "13000000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 9, - "parent": 2, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "2800", - "feeForJuror": "13000000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 10, - "parent": 2, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "2800", - "feeForJuror": "13000000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 11, - "parent": 2, - "hiddenVotes": false, - "minStake": "5800000000000000000000", - "alpha": "2800", - "feeForJuror": "13000000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 12, - "parent": 0, - "hiddenVotes": false, - "minStake": "7400000000000000000000", - "alpha": "5000", - "feeForJuror": "30000000000000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 13, - "parent": 12, - "hiddenVotes": false, - "minStake": "7400000000000000000000", - "alpha": "5000", - "feeForJuror": "30000000000000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 14, - "parent": 12, - "hiddenVotes": false, - "minStake": "7400000000000000000000", - "alpha": "5000", - "feeForJuror": "30000000000000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 15, - "parent": 0, - "hiddenVotes": true, - "minStake": "3300000000000000000000", - "alpha": "5000", - "feeForJuror": "13000000000000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "id": 16, - "parent": 15, - "hiddenVotes": false, - "minStake": "3300000000000000000000", - "alpha": "2400", - "feeForJuror": "6400000000000000000", - "jurorsForCourtJump": "30", - "timesPerPeriod": [ - 140400, - 291600, - 291600, - 194400 - ] - }, - { - "id": 17, - "parent": 15, - "hiddenVotes": false, - "minStake": "3300000000000000000000", - "alpha": "4250", - "feeForJuror": "15000000000000000000", - "jurorsForCourtJump": "15", - "timesPerPeriod": [ - 108000, - 216000, - 216000, - 216000 - ] - } -] diff --git a/contracts/config/courts.v1.mainnet.json b/contracts/config/courts.v1.mainnet.json deleted file mode 100644 index 6d5559ba6..000000000 --- a/contracts/config/courts.v1.mainnet.json +++ /dev/null @@ -1,362 +0,0 @@ -[ - { - "id": 0, - "parent": 0, - "hiddenVotes": false, - "minStake": "1700000000000000000000", - "alpha": "10000", - "feeForJuror": "16000000000000000", - "jurorsForCourtJump": "511", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "id": 1, - "parent": 0, - "hiddenVotes": false, - "minStake": "5000000000000000000000", - "alpha": "5000", - "feeForJuror": "20000000000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "id": 2, - "parent": 1, - "hiddenVotes": false, - "minStake": "5000000000000000000000", - "alpha": "3900", - "feeForJuror": "11000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 151200, - 324000, - 324000, - 302400 - ] - }, - { - "id": 3, - "parent": 2, - "hiddenVotes": false, - "minStake": "10000000000000000000000", - "alpha": "5000", - "feeForJuror": "70000000000000000", - "jurorsForCourtJump": "47", - "timesPerPeriod": [ - 367200, - 626400, - 626400, - 604800 - ] - }, - { - "id": 4, - "parent": 1, - "hiddenVotes": false, - "minStake": "23000000000000000000000", - "alpha": "5000", - "feeForJuror": "79000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "id": 5, - "parent": 0, - "hiddenVotes": false, - "minStake": "14000000000000000000000", - "alpha": "3250", - "feeForJuror": "100000000000000000", - "jurorsForCourtJump": "15", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "id": 6, - "parent": 0, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "5000", - "feeForJuror": "36000000000000000", - "jurorsForCourtJump": "3", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "id": 7, - "parent": 0, - "hiddenVotes": false, - "minStake": "14000000000000000000000", - "alpha": "3250", - "feeForJuror": "100000000000000000", - "jurorsForCourtJump": "3", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "id": 8, - "parent": 0, - "hiddenVotes": false, - "minStake": "1700000000000000000000", - "alpha": "4000", - "feeForJuror": "4500000000000000", - "jurorsForCourtJump": "255", - "timesPerPeriod": [ - 140400, - 291600, - 291600, - 194400 - ] - }, - { - "id": 9, - "parent": 0, - "hiddenVotes": false, - "minStake": "4600000000000000000000", - "alpha": "5000", - "feeForJuror": "25000000000000000", - "jurorsForCourtJump": "30", - "timesPerPeriod": [ - 140400, - 291600, - 291600, - 194400 - ] - }, - { - "id": 10, - "parent": 0, - "hiddenVotes": false, - "minStake": "3800000000000000000000", - "alpha": "5000", - "feeForJuror": "25000000000000000", - "jurorsForCourtJump": "64", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 38800 - ] - }, - { - "id": 11, - "parent": 10, - "hiddenVotes": false, - "minStake": "4700000000000000000000", - "alpha": "5000", - "feeForJuror": "31000000000000000", - "jurorsForCourtJump": "32", - "timesPerPeriod": [ - 367200, - 626400, - 626400, - 604800 - ] - }, - { - "id": 12, - "parent": 9, - "hiddenVotes": false, - "minStake": "4600000000000000000000", - "alpha": "4100", - "feeForJuror": "25000000000000000", - "jurorsForCourtJump": "30", - "timesPerPeriod": [ - 210660, - 437400, - 437400, - 291600 - ] - }, - { - "id": 13, - "parent": 6, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "4000", - "feeForJuror": "28000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 14, - "parent": 6, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "4000", - "feeForJuror": "28000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 15, - "parent": 6, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "4000", - "feeForJuror": "28000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 16, - "parent": 6, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "4000", - "feeForJuror": "29000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 17, - "parent": 6, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "4000", - "feeForJuror": "29000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 18, - "parent": 6, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "4300", - "feeForJuror": "31000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 19, - "parent": 6, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "4300", - "feeForJuror": "31000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 20, - "parent": 6, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "4300", - "feeForJuror": "31000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 21, - "parent": 6, - "hiddenVotes": false, - "minStake": "3900000000000000000000", - "alpha": "4300", - "feeForJuror": "31000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "id": 22, - "parent": 0, - "hiddenVotes": true, - "minStake": "2300000000000000000000", - "alpha": "10000", - "feeForJuror": "15000000000000000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "id": 23, - "parent": 0, - "hiddenVotes": false, - "minStake": "16000000000000000000000", - "alpha": "5000", - "feeForJuror": "25000000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 540000, - 437400, - 437400, - 291600 - ] - } -] diff --git a/contracts/config/courts.v2.devnet.json b/contracts/config/courts.v2.devnet.json deleted file mode 100644 index 69a8a591f..000000000 --- a/contracts/config/courts.v2.devnet.json +++ /dev/null @@ -1,98 +0,0 @@ -[ - { - "name": "General Court", - "id": 1, - "parent": 0, - "hiddenVotes": true, - "minStake": "1500000000000000000", - "alpha": "5000", - "feeForJuror": "100000000000", - "jurorsForCourtJump": "511", - "timesPerPeriod": [ - 120, - 240, - 240, - 600 - ] - }, - { - "name": "Curation", - "id": 2, - "parent": 1, - "hiddenVotes": false, - "minStake": "2000000000000000000", - "alpha": "3100", - "feeForJuror": "100000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 120, - 240, - 240, - 600 - ] - }, - { - "name": "English Language", - "id": 3, - "parent": 1, - "hiddenVotes": false, - "minStake": "2000000000000000000", - "alpha": "5000", - "feeForJuror": "100000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 120, - 240, - 240, - 600 - ] - }, - { - "name": "Corte de Disputas de Consumo y Vecindad", - "id": 4, - "parent": 1, - "hiddenVotes": false, - "minStake": "2000000000000000000", - "alpha": "5000", - "feeForJuror": "100000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 120, - 240, - 240, - 600 - ] - }, - { - "name": "Oracle Court", - "id": 5, - "parent": 1, - "hiddenVotes": false, - "minStake": "2000000000000000000", - "alpha": "5000", - "feeForJuror": "100000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 120, - 240, - 240, - 600 - ] - }, - { - "name": "Automated Curation", - "id": 6, - "parent": 2, - "hiddenVotes": false, - "minStake": "2000000000000000000", - "alpha": "3100", - "feeForJuror": "100000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 120, - 240, - 240, - 600 - ] - } -] diff --git a/contracts/config/courts.v2.mainnet.json b/contracts/config/courts.v2.mainnet.json deleted file mode 100644 index db7ec6b98..000000000 --- a/contracts/config/courts.v2.mainnet.json +++ /dev/null @@ -1,498 +0,0 @@ -[ - { - "name": "General Court", - "id": 1, - "parent": 1, - "hiddenVotes": true, - "minStake": "2300000000000000000000", - "feeForJuror": "5000000000000000", - "alpha": "10000", - "jurorsForCourtJump": "511", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "name": "Blockchain", - "id": 2, - "parent": 1, - "hiddenVotes": false, - "minStake": "7000000000000000000000", - "feeForJuror": "6900000000000000", - "alpha": "5000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "name": "Non-Technical", - "id": 3, - "parent": 2, - "hiddenVotes": false, - "minStake": "7000000000000000000000", - "feeForJuror": "3000000000000000", - "alpha": "3333", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 151200, - 324000, - 324000, - 302400 - ] - }, - { - "name": "Token Listing", - "id": 4, - "parent": 3, - "hiddenVotes": false, - "minStake": "70000000000000000000000", - "feeForJuror": "64000000000000000", - "alpha": "5000", - "jurorsForCourtJump": "47", - "timesPerPeriod": [ - 367200, - 626400, - 626400, - 604800 - ] - }, - { - "name": "Technical", - "id": 5, - "parent": 2, - "hiddenVotes": false, - "minStake": "33000000000000000000000", - "feeForJuror": "33000000000000000", - "alpha": "5000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "name": "Marketing Services", - "id": 6, - "parent": 1, - "hiddenVotes": false, - "minStake": "7800000000000000000000", - "feeForJuror": "6200000000000000", - "alpha": "5000", - "jurorsForCourtJump": "15", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "name": "English Language", - "id": 7, - "parent": 1, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "7400000000000000", - "alpha": "5000", - "jurorsForCourtJump": "3", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "name": "Video Production", - "id": 8, - "parent": 1, - "hiddenVotes": false, - "minStake": "7500000000000000000000", - "feeForJuror": "6200000000000000", - "alpha": "5000", - "jurorsForCourtJump": "3", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "name": "Onboarding", - "id": 9, - "parent": 1, - "hiddenVotes": false, - "minStake": "2300000000000000000000", - "feeForJuror": "700000000000000", - "alpha": "1300", - "jurorsForCourtJump": "255", - "timesPerPeriod": [ - 140400, - 291600, - 291600, - 194400 - ] - }, - { - "name": "Curation", - "id": 10, - "parent": 1, - "hiddenVotes": false, - "minStake": "2600000000000000000000", - "feeForJuror": "2400000000000000", - "alpha": "5000", - "jurorsForCourtJump": "30", - "timesPerPeriod": [ - 140400, - 291600, - 291600, - 194400 - ] - }, - { - "name": "Data Analysis", - "id": 11, - "parent": 1, - "hiddenVotes": false, - "minStake": "15000000000000000000000", - "feeForJuror": "18000000000000000", - "alpha": "5000", - "jurorsForCourtJump": "64", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "name": "Statistical Modeling", - "id": 12, - "parent": 11, - "hiddenVotes": false, - "minStake": "19000000000000000000000", - "feeForJuror": "19000000000000000", - "alpha": "5000", - "jurorsForCourtJump": "32", - "timesPerPeriod": [ - 367200, - 626400, - 626400, - 604800 - ] - }, - { - "name": "Curation (Medium)", - "id": 13, - "parent": 10, - "hiddenVotes": false, - "minStake": "2900000000000000000000", - "feeForJuror": "2300000000000000", - "alpha": "5000", - "jurorsForCourtJump": "30", - "timesPerPeriod": [ - 210660, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Spanish-English Translation", - "id": 14, - "parent": 7, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "3100000000000000", - "alpha": "1500", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "French-English Translation", - "id": 15, - "parent": 7, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "3100000000000000", - "alpha": "1500", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Portuguese-English Translation", - "id": 16, - "parent": 7, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "3100000000000000", - "alpha": "1500", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "German-English Translation", - "id": 17, - "parent": 7, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "3900000000000000", - "alpha": "1800", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Russian-English Translation", - "id": 18, - "parent": 7, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "3900000000000000", - "alpha": "1800", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Korean-English Translation", - "id": 19, - "parent": 7, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "5000000000000000", - "alpha": "2300", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Japanese-English Translation", - "id": 20, - "parent": 7, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "5000000000000000", - "alpha": "2300", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Turkish-English Translation", - "id": 21, - "parent": 7, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "5000000000000000", - "alpha": "2300", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Chinese-English Translation", - "id": 22, - "parent": 7, - "hiddenVotes": false, - "minStake": "9000000000000000000000", - "feeForJuror": "5000000000000000", - "alpha": "2300", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Corte General en Español", - "id": 23, - "parent": 1, - "hiddenVotes": false, - "minStake": "5100000000000000000000", - "feeForJuror": "5000000000000000", - "alpha": "10000", - "jurorsForCourtJump": "128", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "name": "Humanity Court", - "id": 24, - "parent": 1, - "hiddenVotes": false, - "minStake": "5300000000000000000000", - "feeForJuror": "2400000000000000", - "alpha": "2500", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 540000, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Development Court", - "id": 25, - "parent": 1, - "hiddenVotes": false, - "minStake": "9500000000000000000000", - "feeForJuror": "11000000000000000", - "alpha": "5000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Solidity Court", - "id": 26, - "parent": 25, - "hiddenVotes": false, - "minStake": "9500000000000000000000", - "feeForJuror": "11000000000000000", - "alpha": "5000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Javascript Court", - "id": 27, - "parent": 25, - "hiddenVotes": false, - "minStake": "9500000000000000000000", - "feeForJuror": "11000000000000000", - "alpha": "5000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 280800, - 437400, - 437400, - 291600 - ] - }, - { - "name": "Corte de Curación en Español", - "id": 28, - "parent": 23, - "hiddenVotes": false, - "minStake": "5100000000000000000000", - "feeForJuror": "2400000000000000", - "alpha": "2500", - "jurorsForCourtJump": "30", - "timesPerPeriod": [ - 140400, - 291600, - 291600, - 194400 - ] - }, - { - "name": "Corte de Disputas de Consumo y Vecindad", - "id": 29, - "parent": 23, - "hiddenVotes": false, - "minStake": "8400000000000000000000", - "feeForJuror": "5400000000000000", - "alpha": "5000", - "jurorsForCourtJump": "15", - "timesPerPeriod": [ - 21600, - 216000, - 216000, - 216000 - ] - }, - { - "name": "Oracle Court", - "id": 30, - "parent": 1, - "hiddenVotes": false, - "minStake": "5000000000000000000000", - "feeForJuror": "6900000000000000", - "alpha": "5000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 280800, - 583200, - 583200, - 388800 - ] - }, - { - "name": "Automated Curation", - "id": 31, - "parent": 10, - "hiddenVotes": false, - "minStake": "2600000000000000000000", - "alpha": "290", - "feeForJuror": "170000000000000", - "jurorsForCourtJump": "3", - "timesPerPeriod": [ - 140400, - 291600, - 291600, - 194400 - ] - } -] diff --git a/contracts/config/courts.v2.testnet.json b/contracts/config/courts.v2.testnet.json deleted file mode 100644 index 1c15a017c..000000000 --- a/contracts/config/courts.v2.testnet.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "name": "General Court", - "id": 1, - "parent": 0, - "hiddenVotes": true, - "minStake": "150000000000000000000", - "alpha": "5000", - "feeForJuror": "10000000000000", - "jurorsForCourtJump": "511", - "timesPerPeriod": [ - 43200, - 43200, - 43200, - 43200 - ] - }, - { - "name": "Curation", - "id": 2, - "parent": 1, - "hiddenVotes": false, - "minStake": "200000000000000000000", - "alpha": "3100", - "feeForJuror": "10000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 43200, - 43200, - 43200, - 43200 - ] - }, - { - "name": "English Language", - "id": 3, - "parent": 1, - "hiddenVotes": false, - "minStake": "200000000000000000000", - "alpha": "5000", - "feeForJuror": "10000000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 43200, - 43200, - 43200, - 43200 - ] - }, - { - "name": "Corte de Disputas de Consumo y Vecindad", - "id": 4, - "parent": 1, - "hiddenVotes": false, - "minStake": "200000000000000000000", - "alpha": "5000", - "feeForJuror": "10000000000000", - "jurorsForCourtJump": "63", - "timesPerPeriod": [ - 43200, - 43200, - 43200, - 43200 - ] - }, - { - "name": "Oracle Court", - "id": 5, - "parent": 1, - "hiddenVotes": false, - "minStake": "200000000000000000000", - "alpha": "5000", - "feeForJuror": "10000000000000", - "jurorsForCourtJump": "31", - "timesPerPeriod": [ - 43200, - 43200, - 43200, - 43200 - ] - } -] diff --git a/contracts/config/policies.v1.gnosischain.json b/contracts/config/policies.v1.gnosischain.json deleted file mode 100644 index a56e9e219..000000000 --- a/contracts/config/policies.v1.gnosischain.json +++ /dev/null @@ -1,145 +0,0 @@ -[ - { - "name": "xDai General Court", - "description": "**Court Purpose:**\n\nThe General court exists as the top court in the hierarchy. All appeals made in subcourts will make their way to the General Court.", - "summary": "**Guidelines:**\n - All policies of a court also apply to all of its child subcourts.\n - Jurors should cast their vote with a suitable verification.\n - Jurors should not rule in favor of a side who have engaged in immoral activities (example: rule reject on “revenge porn” images even if they would otherwise fit into the category).\n - “Refuse to arbitrate” should be used for disputes where both sides of the dispute have engaged in activities which are immoral (ex: refuse to rule on an assassination market dispute).\n Immoral activities include: Murder, slavery, rape, violence, theft and perjury.\n - Rulings should be made based on the “state of the world” at the time a dispute was created. (Ex: in a dispute concerning membership of a smart contract on a curated list of “bug free” contracts, jurors should not take into account changes made to the contract after the dispute is raised.) In particular, jurors should base their rulings on court policies and arbitrable application primary documents as they exist at the time of the creation of the dispute, disregarding later modifications.\n - To ensure fairness to jurors who vote at different times within a voting period, jurors should disregard any evidence that is both 1) submitted after the end of the evidence period of the initial round of a dispute AND 2) cannot be reasonably considered to have been readily, publicly available to jurors. Jurors may, however, consider arguments that are submitted later that are based upon existing evidence and/or information which a juror considering the case during the evidence period of the initial round could reasonably have been expected to find themselves. (Ex: a party submits a new photo of a damaged product in an insurance case after the evidence period; this photo should not be considered by jurors. Ex: in a dispute over whether a token satisfies the criteria of a curated list of ERC20 tokens, an argument that reminds jurors of a definitional element of the ERC20 standard is submitted; this is publicly available and can be considered by jurors. Ex: in a dispute over whether a token satisfies a decentralization criterion for an exchange listing, an argument that invokes the distribution of tokens over different Ethereum addresses, as publicly available from sites such as Etherscan, can be considered by jurors.)\n - When considering an appeal of a case that has originated in a lower court, jurors should consider whether 1) evaluating the case requires specialized skills which jurors in the appellate court cannot be expected to have (ex: evaluating the quality of an English to Korean translation when knowledge of Korean is not a requirement of the appellate court) and 2) whether there is evidence that an attack was performed against this case in the lower court (ex: bribes, p+epsilon attacks, 51% attacks, etc). If there is no evidence of an attack AND appellate court jurors cannot be reasonably expected to have the required skills to independently evaluate the case, jurors should vote to uphold the lower court ruling. Evidence related to the presence of attacks on Kleros should be considered by jurors even if it would otherwise violate the above points on evidence admissibility.\n - Jurors should attempt to interpret disputes according to the “spirit of the dispute” unless the arbitrable contract or the policies of the subcourt state otherwise.\n - Jurors should interpret disputes without assuming the existence of gods, spirits or other supernatural beings unless the arbitrable contract or the policies of the subcourt state otherwise.", - "court": 0, - "uri": "/ipfs/QmTsPLwhozEqjWnYKsnamZiJW47LFT7LzkQhKw5ygQxqyH/xDai-General-Court-Policy.json" - }, - { - "name": "xDai Curation", - "description": "**Court purpose:** \n\n In this court, jurors will solve micro-tasks related to curation or content moderation, such as for social media, when requirements for inclusion are relatively straightforward. Higher effort cases, requiring application of more nuanced rules should be placed in other courts but might arrive in this court upon appeal.", - "summary": "", - "requiredSkills": "No particular skills are required.", - "court": 1, - "uri": "/ipfs/QmWQDgtUWALrnCgakAAoFWdX1P7iDGmr5imZLZzyYtPqcE/xDai-Curation-Court-Policy.json" - }, - { - "name": "xDai English Language", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n - Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to be accepted unless a target audience is specifically mentioned in the contract.", - "requiredSkills": "This court requires an advanced level of English. Jurors who are not native English speakers are advised to stake into this court only if they have C1+ level of English.\n\nThe following tests evaluates a C1 level: Cambridge Advanced (CAE), BEC Higher, BULATS score 75+, CLB/CELPIP 8+, CAEL 70+, IELTS level 7, TOEFL 110+, TOEIC score 880+.", - "court": 2, - "uri": "/ipfs/QmPLD9Zj8aZj5sVH9WcsHXbARR3RfRnEwHRrVeDM8AbPLt/xDai-English-Language-Court-Policy.json" - }, - { - "name": "xDai Spanish-English Translation", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the quality of translations between Spanish and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Spanish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Spanish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Mexican/Argentinian/European Spanish.", - "court": 3, - "uri": "/ipfs/QmXJbzzuKQQVa7PFrwhb8r4in1yy1sRRQseCZ6g8EZWpHZ/xDai-Spanish-English-Language-Court-Policy.json" - }, - { - "name": "xDai French-English Translation", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the quality of translations between French and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and French. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and French for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or European/Québécois French.", - "court": 4, - "uri": "/ipfs/QmUYsy6mVozbGn885ssCk3LKC8iXT363RwY7DH3QuRCu1Y/xDai-French-English-Language-Court-Policy.json" - }, - { - "name": "xDai Portuguese-English Translation", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the quality of translations between Portuguese and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Portuguese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Portuguese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Brazilian/European Portuguese.", - "court": 5, - "uri": "/ipfs/QmRZviKJzgkr6AyxcAULjnoQArt5DvNPssvEzVNxHjAUzb/xDai-Portuguese-English-Language-Court-Policy.json" - }, - { - "name": "xDai German-English Translation", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the quality of translations between German and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and German. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and German for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 6, - "uri": "/ipfs/Qmf6hiaVdzHHVV5jAp7AM6MA9EHLoAtVbbDnFDhPqwU4TL/xDai-German-English-Language-Court-Policy.json" - }, - { - "name": "xDai Russian-English Translation", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the quality of translations between Russian and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Russian. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Russian for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 7, - "uri": "/ipfs/QmViD1v5PBkYwtAeWiLktDZtBVCRvDd3LrLSzQ7TTEsTtb/xDai-Russian-English-Language-Court-Policy.json" - }, - { - "name": "xDai Korean-English Translation", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the quality of translations between Korean and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Korean. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Korean for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 8, - "uri": "/ipfs/QmZZaTxzkJsWd1JTKvSQsBPBSDWbPc5og6By7Vx8F7Wcdt/xDai-Korean-English-Language-Court-Policy.json" - }, - { - "name": "xDai Japanese-English Translation", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the quality of translations between Japanese and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Japanese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Japanese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 9, - "uri": "/ipfs/QmWqxZhKFyR17JYU4GwXtumMinfACtw9z2r9cXumVcUbek/xDai-Japanese-English-Language-Court-Policy.json" - }, - { - "name": "xDai Turkish-English Translation", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the quality of translations between Turkish and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Turkish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Turkish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 10, - "uri": "/ipfs/QmZxbiUdvC9CwsTiLGhqnnYYBUJNFp28ZNFWJfhSXFXY8K/xDai-Turkish-English-Language-Court-Policy.json" - }, - { - "name": "xDai Chinese-English Translation", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the quality of translations between Chinese and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Chinese (written in simplified characters). While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Chinese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 11, - "uri": "/ipfs/QmTERr8X73QTnTXNDMSWew2znWYWrcgvFWTUbEJeXPXmBU/xDai-Chinese-English-Language-Court-Policy.json" - }, - { - "name": "xDai Development Court", - "description": "**Court purpose:** \n\n In this court, jurors will solve disputes involving the respect of specifications given by the client.", - "summary": "**Example** \n\n Developper does not respect indentation, does not name variables explicitly or has not made a clear file structure. In such cases, jurors should refuse the proposal made by the developer.", - "requiredSkills": "This court requires a good level of programmation. Jurors who are not intermediate developers are advised to stake into this court only if they have some basics of low-level programming languages, ​​algorithmic and knowledge of good practices of development.", - "court": 12, - "uri": "/ipfs/QmbgUL2iv9XH3jui7xdLBXp2Hqe4VqGnNkK7PnAorJ8XQa/xDai-Development-Court-Policy.json" - }, - { - "name": "xDai Solidity Court", - "description": "**Court purpose:** \n\n If the disputed code is of significant size (> 500 code lines), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.", - "summary": "", - "requiredSkills": "This court requires a good level of solidity. Jurors who are not solidity intermediate developers are advised to stake into this court only if they also know how to make relatively simple contracts, know the main solidity hacks and can compute the complexity of simple functions.", - "court": 13, - "uri": "/ipfs/QmQbyk1qnD4e4MQrwSr6a21w2t82YJEMxU3F7QTYKkxuNS/xDai-Solidity-Court-Policy.json" - }, - { - "name": "xDai Javascript Court", - "description": "**Court purpose:** \n\n If the disputed code is of significant size (> 700 code lines), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.", - "summary": "", - "requiredSkills": "This court requires a good level of javascript. Jurors who are not javascript intermediate developers are advised to stake into this court only if they know the main frameworks/libraries (ExpressJs, React, EthersJs…) and be comfortable with testing, APIs or languages to interact with databases.", - "court": 14, - "uri": "/ipfs/Qme15AUfpvLX3iwEtqswe26PQHMmKnF4eWGywBPqbkdqcD/xDai-Javascript-Court-Policy.json" - }, - { - "name": "Corte General en Español", - "description": "**Propósito de la Corte** \n\n La Corte General en Español sirve como corte de uso múltiple para todo tipo de disputas que requieran un alto nivel de conocimiento del español para ser evaluadas. Los casos resueltos por cortes más especializadas que requieran conocimientos de español además de otras habilidades pueden ser revisados en esta corte tras el proceso de apelación.", - "summary": "**Políticas:** \n\n Además del requisito de que los jurados tengan un nivel suficiente de español, esta corte debe tener la misma política que la Corte General de Kleros en xDai(xDai General Court).", - "requiredSkills": "**Habilidades Requeridas:** \n\n Este tribunal requiere un nivel avanzado de español. Los miembros del jurado deben poder leer la evidencia y proporcionar una justificación adecuada en español sobre una amplia gama de temas.", - "court": 15, - "uri": "/ipfs/QmNotPsy4BKY2kxRqbWchCTJrgGMqnQrxfE5b5Jd63A7rj/xDai-Spanish-General-Court-Policy.json" - }, - { - "name": "Corte de Curación en Español", - "description": "**Propósito de la Corte** \n\n En esta corte, los miembros del jurado resuelven microtareas relacionadas con la curación o la moderación de contenido, como para redes sociales, cuando los requisitos son relativamente sencillos. Los casos de mayor esfuerzo, que requieren la aplicación de reglas con mayores matices, deben presentarse en otras cortes, pero pueden llegar a este tribunal en caso de apelación.", - "summary": "", - "requiredSkills": "**Habilidades Requeridas:** \n\n Este tribunal requiere un nivel avanzado de español. Los miembros del jurado deben poder leer la evidencia y proporcionar una justificación adecuada en español sobre una amplia gama de temas.", - "court": 16, - "uri": "/ipfs/QmQeHpuaL9RViwKnPNRMCAbPakdPSDefBmhPpMAi45vRLS/xDai-Spanish-Curation-Court-Policy.json" - }, - { - "name": "Blockchain No Técnica", - "description": "", - "summary": "", - "requiredSkills": "**Habilidades Requeridas:** \n\n Los jurados no necesitan un conocimiento profundo de blockchain ni habilidades de programación. Pero necesitan conocimiento para leer exploradores de blockchain, buscar criptoactivos listados en exchanges, entender cómo verificar una transacción y analizar datos on-chain.", - "court": 17, - "uri": "/ipfs/QmVxh7KmFrimGz6WMvLMRXZhwQFDoj28KEYLTpYoUTGwAj/xDai-Blockchain-No-Tecnica-Policy.json" - } -] diff --git a/contracts/config/policies.v1.gnosischain/xDai-Chinese-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Chinese-English-Language-Court-Policy.json deleted file mode 100644 index 2a3e45e09..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Chinese-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Chinese-English Translation", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the quality of translations between Chinese and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Chinese (written in simplified characters). While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Chinese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Curation-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Curation-Court-Policy.json deleted file mode 100644 index 1dc000d2b..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Curation-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Curation", - "description": "**Court purpose** \n\n In this court, jurors will solve micro-tasks related to curation or content moderation, such as for social media, when requirements for inclusion are relatively straightforward. Higher effort cases, requiring application of more nuanced rules should be placed in other courts but might arrive in this court upon appeal.", - "summary": "", - "requiredSkills": "No particular skills are required." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Development-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Development-Court-Policy.json deleted file mode 100644 index 846f431cf..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Development-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Development Court", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the respect of specifications given by the client.", - "summary": "**Example** \n\n Developper does not respect indentation, does not name variables explicitly or has not made a clear file structure. In such cases, jurors should refuse the proposal made by the developer.", - "requiredSkills": "This court requires a good level of programmation. Jurors who are not intermediate developers are advised to stake into this court only if they have some basics of low-level programming languages, ​​algorithmic and knowledge of good practices of development." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-English-Language-Court-Policy.json deleted file mode 100644 index 6a7c0534d..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai English Language", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to be accepted unless a target audience is specifically mentioned in the contract.", - "requiredSkills": "This court requires an advanced level of English. Jurors who are not native English speakers are advised to stake into this court only if they have C1+ level of English.\n\nThe following tests evaluates a C1 level: Cambridge Advanced (CAE), BEC Higher, BULATS score 75+, CLB/CELPIP 8+, CAEL 70+, IELTS level 7, TOEFL 110+, TOEIC score 880+." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-French-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-French-English-Language-Court-Policy.json deleted file mode 100644 index 94e4f157e..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-French-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai French-English Translation", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the quality of translations between French and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and French. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and French for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or European/Québécois French." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-General-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-General-Court-Policy.json deleted file mode 100644 index d1e2ecca2..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-General-Court-Policy.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "xDai General Court", - "description": "**Court Purpose**\n\nThe General court exists as the top court in the hierarchy. All appeals made in subcourts will make their way to the General Court.", - "summary": "**Guidelines:**\n All policies of a court also apply to all of its child subcourts.\n Jurors should cast their vote with a suitable verification.\n Jurors should not rule in favor of a side who have engaged in immoral activities (example: rule reject on “revenge porn” images even if they would otherwise fit into the category).\n “Refuse to arbitrate” should be used for disputes where both sides of the dispute have engaged in activities which are immoral (ex: refuse to rule on an assassination market dispute).\n Immoral activities include: Murder, slavery, rape, violence, theft and perjury.\n Rulings should be made based on the “state of the world” at the time a dispute was created. (Ex: in a dispute concerning membership of a smart contract on a curated list of “bug free” contracts, jurors should not take into account changes made to the contract after the dispute is raised.) In particular, jurors should base their rulings on court policies and arbitrable application primary documents as they exist at the time of the creation of the dispute, disregarding later modifications.\n To ensure fairness to jurors who vote at different times within a voting period, jurors should disregard any evidence that is both 1) submitted after the end of the evidence period of the initial round of a dispute AND 2) cannot be reasonably considered to have been readily, publicly available to jurors. Jurors may, however, consider arguments that are submitted later that are based upon existing evidence and/or information which a juror considering the case during the evidence period of the initial round could reasonably have been expected to find themselves. (Ex: a party submits a new photo of a damaged product in an insurance case after the evidence period; this photo should not be considered by jurors. Ex: in a dispute over whether a token satisfies the criteria of a curated list of ERC20 tokens, an argument that reminds jurors of a definitional element of the ERC20 standard is submitted; this is publicly available and can be considered by jurors. Ex: in a dispute over whether a token satisfies a decentralization criterion for an exchange listing, an argument that invokes the distribution of tokens over different Ethereum addresses, as publicly available from sites such as Etherscan, can be considered by jurors.)\n When considering an appeal of a case that has originated in a lower court, jurors should consider whether 1) evaluating the case requires specialized skills which jurors in the appellate court cannot be expected to have (ex: evaluating the quality of an English to Korean translation when knowledge of Korean is not a requirement of the appellate court) and 2) whether there is evidence that an attack was performed against this case in the lower court (ex: bribes, p+epsilon attacks, 51% attacks, etc). If there is no evidence of an attack AND appellate court jurors cannot be reasonably expected to have the required skills to independently evaluate the case, jurors should vote to uphold the lower court ruling. Evidence related to the presence of attacks on Kleros should be considered by jurors even if it would otherwise violate the above points on evidence admissibility.\n Jurors should attempt to interpret disputes according to the “spirit of the dispute” unless the arbitrable contract or the policies of the subcourt state otherwise.\n Jurors should interpret disputes without assuming the existence of gods, spirits or other supernatural beings unless the arbitrable contract or the policies of the subcourt state otherwise." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-German-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-German-English-Language-Court-Policy.json deleted file mode 100644 index 2cd24791e..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-German-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai German-English Translation", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the quality of translations between German and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and German. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and German for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Japanese-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Japanese-English-Language-Court-Policy.json deleted file mode 100644 index d076cf98c..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Japanese-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Japanese-English Translation", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the quality of translations between Japanese and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Japanese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Japanese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Javascript-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Javascript-Court-Policy.json deleted file mode 100644 index dfd328fce..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Javascript-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Javascript Court", - "description": "**Court purpose** \n\n If the disputed code is of significant size (> 700 code lines), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.", - "summary": "", - "requiredSkills": "This court requires a good level of javascript. Jurors who are not javascript intermediate developers are advised to stake into this court only if they know the main frameworks/libraries (ExpressJs, React, EthersJs…) and be comfortable with testing, APIs or languages to interact with databases." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Korean-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Korean-English-Language-Court-Policy.json deleted file mode 100644 index 2f8ee9c29..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Korean-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Korean-English Translation", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the quality of translations between Korean and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Korean. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Korean for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Portuguese-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Portuguese-English-Language-Court-Policy.json deleted file mode 100644 index 472a5f1c3..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Portuguese-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Portuguese-English Translation", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the quality of translations between Portuguese and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Portuguese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Portuguese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Brazilian/European Portuguese." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Russian-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Russian-English-Language-Court-Policy.json deleted file mode 100644 index abecec2bb..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Russian-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Russian-English Translation", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the quality of translations between Russian and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Russian. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Russian for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Solidity-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Solidity-Court-Policy.json deleted file mode 100644 index fdf065dd8..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Solidity-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Solidity Court", - "description": "**Court purpose** \n\n If the disputed code is of significant size (> 500 code lines), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.", - "summary": "", - "requiredSkills": "This court requires a good level of solidity. Jurors who are not solidity intermediate developers are advised to stake into this court only if they also know how to make relatively simple contracts, know the main solidity hacks and can compute the complexity of simple functions." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Spanish-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Spanish-English-Language-Court-Policy.json deleted file mode 100644 index a186f863f..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Spanish-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Spanish-English Translation", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the quality of translations between Spanish and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Spanish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Spanish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Mexican/Argentinian/European Spanish." -} diff --git a/contracts/config/policies.v1.gnosischain/xDai-Turkish-English-Language-Court-Policy.json b/contracts/config/policies.v1.gnosischain/xDai-Turkish-English-Language-Court-Policy.json deleted file mode 100644 index df49116bc..000000000 --- a/contracts/config/policies.v1.gnosischain/xDai-Turkish-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "xDai Turkish-English Translation", - "description": "**Court purpose** \n\n In this court, jurors will solve disputes involving the quality of translations between Turkish and English.", - "summary": "", - "requiredSkills": "Jurors in this court should have a strong command of both English and Turkish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Turkish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.mainnet.json b/contracts/config/policies.v1.mainnet.json deleted file mode 100644 index a23d06b2b..000000000 --- a/contracts/config/policies.v1.mainnet.json +++ /dev/null @@ -1,191 +0,0 @@ -[ - { - "name": "General Court", - "description": "**Court Purpose:**\n\nThe General court exists as the top court in the hierarchy. All appeals made in subcourts will make their way to the General Court.", - "summary": "**Guidelines:**\n - All policies of a court also apply to all of its child subcourts.\n - Jurors should cast their vote with a suitable verification.\n - Jurors should not rule in favor of a side who have engaged in immoral activities (example: rule reject on “revenge porn” images even if they would otherwise fit into the category).\n - “Refuse to arbitrate” should be used for disputes where both sides of the dispute have engaged in activities which are immoral (ex: refuse to rule on an assassination market dispute).\n Immoral activities include: Murder, slavery, rape, violence, theft and perjury.\n - Rulings should be made based on the “state of the world” at the time a dispute was created. (Ex: in a dispute concerning membership of a smart contract on a curated list of “bug free” contracts, jurors should not take into account changes made to the contract after the dispute is raised.) In particular, jurors should base their rulings on court policies and arbitrable application primary documents as they exist at the time of the creation of the dispute, disregarding later modifications.\n - To ensure fairness to jurors who vote at different times within a voting period, jurors should disregard any evidence that is both 1) submitted after the end of the evidence period of the initial round of a dispute AND 2) cannot be reasonably considered to have been readily, publicly available to jurors. Jurors may, however, consider arguments that are submitted later that are based upon existing evidence and/or information which a juror considering the case during the evidence period of the initial round could reasonably have been expected to find themselves. (Ex: a party submits a new photo of a damaged product in an insurance case after the evidence period; this photo should not be considered by jurors. Ex: in a dispute over whether a token satisfies the criteria of a curated list of ERC20 tokens, an argument that reminds jurors of a definitional element of the ERC20 standard is submitted; this is publicly available and can be considered by jurors. Ex: in a dispute over whether a token satisfies a decentralization criterion for an exchange listing, an argument that invokes the distribution of tokens over different Ethereum addresses, as publicly available from sites such as Etherscan, can be considered by jurors.)\n - When considering an appeal of a case that has originated in a lower court, jurors should consider whether 1) evaluating the case requires specialized skills which jurors in the appellate court cannot be expected to have (ex: evaluating the quality of an English to Korean translation when knowledge of Korean is not a requirement of the appellate court) and 2) whether there is evidence that an attack was performed against this case in the lower court (ex: bribes, p+epsilon attacks, 51% attacks, etc). If there is no evidence of an attack AND appellate court jurors cannot be reasonably expected to have the required skills to independently evaluate the case, jurors should vote to uphold the lower court ruling. Evidence related to the presence of attacks on Kleros should be considered by jurors even if it would otherwise violate the above points on evidence admissibility.\n - Jurors should attempt to interpret disputes according to the “spirit of the dispute” unless the arbitrable contract or the policies of the subcourt state otherwise.\n - Jurors should interpret disputes without assuming the existence of gods, spirits or other supernatural beings unless the arbitrable contract or the policies of the subcourt state otherwise.", - "court": 0, - "uri": "/ipfs/Qmd1TMEbtic3TSonu5dfqa5k3aSrjxRGY8oJH3ruGgazRB" - }, - { - "name": "Blockchain", - "description": "**Court Purpose:**\n\nThis is the blockchain community subcourt. Disputes in this subcourt should be those that require that jurors have an understanding of the broad blockchain ecosystem. Cases in this court may come from varying aspects of the ecosystem and could also be from lower courts that have been appealed. For example, a case in the Token Curated Registry could arrive here on appeal.\n", - "summary": "", - "court": 1, - "uri": "/ipfs/QmYMdCkb7WULmiK6aQrgsayGG3VYisQwsHSLC3TLkzEHCm" - }, - { - "name": "Non-Technical", - "description": "**Court Purpose:**\n\nThis subcourt is for small non-technical blockchain disputes. It is used for disputes on challenged tokens from Kleros Token² Curated Registry Dapp, Cryptoasset Transfer and Exchange Listing agreement escrow disputes. This can include:\n\n- **Token² Curated Registry**: A curated list of verified tokens submitted by users. This includes, logo, token name, contract address and ticker. \n\n- **Cryptoasset Transfer Escrow**: This escrow can be used by users to safely and securely transfer cryptoassets between two parties, even if one cryptoasset is on a chain other than Ethereum. Funds are locked in a smart contract until the other party has complied with the agreement or a dispute is brought. An example use case could be transferring ETH for BTC P2P without knowledge of the other party. You deposit ETH into the escrow, the other party sends BTC and you release ETH.\n\n- **Exchange Listing Agreement Escrow**: This escrow can be used to delegate listing of tokens to token listing agents. A reward is paid to the agent if the token is appropriately listed on the agreed upon exchange.\n\n**Example:**\n\n- Someone submits the PNK token with the address “0x87c260900c391559fd2816c9fbf078de37e2f520”. Someone challenges the listing as incorrect as the real PNK address is “0x93ed3fbe21207ec2e8f2d3c3de6e058cb73bc04d”.\n\n- Parties make a contract to exchange 1 BTC for 30 ETH. After the deadline agreed in the contract, the address of the BTC buyer still hasn’t been credited.\n\n- Contractor agreed to list clients token or coin in both USD and DAI pairings but did not deliver USD.", - "summary": "**Policies:** \n\n- In escrow disputes involving privacy coins where “view key’s” are needed, those should be provided as evidence before the end of the evidence period. ", - "requiredSkills": "Jurors do not need a deep blockchain technical knowledge or coding skills but do need the ability to read blockchain explorers, look at cryptoassets listed on exchanges, understand how to verify a transaction and cross reference on-chain data. ", - "court": 2, - "uri": "/ipfs/QmdJYHubLGQCt2GxpJch2riSYVxZzDC4cBg2mNPXuiY6rX" - }, - { - "name": "Token Listing", - "description": "**Court Purpose:**\n\nThis court serves as the final validation for token listing for verified projects listing on the Ethfinex Exchange using Kleros’ Token Curated List Dapp.\nThis is a high level, high stake court requiring deep blockchain knowledge, legal experience and / or a knowledge of exchange listings in general. Jurors are required to stake a large amount of PNK and should only do so if they are confident in the above capabilities.", - "summary": "[Ethfinex Court Policy](https://cdn.kleros.link/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)", - "court": 3, - "uri": "/ipfs/QmeyojE13mcQtWqQQddYypafDRChVND8z6dcHLbaarmbbx" - }, - { - "name": "Technical", - "description": "**Court Purpose:**\n\nThis court serves to arbitrate blockchain disputes of a technical nature. This can include:\n\n- Verifying that a smart contract meets a defined standard. \n\n- Verifying that a proposed contract call is the technical translation of a decision taken by governance.\n\n**Example:**\n\n- A dispute on whether or not a token should be given a badge indicating that it satisfies ERC20. \n\n- A dispute on whether or not a proposed Kleros governor call matches the decision which has been voted through governance.", - "summary": "**Policies:** \n\n- Disputes in this subcourt should only be of technical nature. ", - "requiredSkills": "A high understanding of blockchain technology, smart contract, solidity language and Ethereum ABI is required.", - "court": 4, - "uri": "/ipfs/QmcBjGYfmKmkpYc8HYkaiBa9ot2eoWAa2Mhfef7i7QKd5H" - }, - { - "name": "Marketing Services", - "description": "**Court Purpose:**\n\nIn this court, jurors will solve disputes on quality of paid marketing services including but not exclusive to sponsored articles, social media promotion and PR writing.\n\n**Example**\n\n- Marketing company promised to publish article on Cointelegraph and subsequently list on Google news, neither of these things happened.", - "summary": "**Policies:** \n\n- It is the responsibility of the marketing contractor to prove that the service has been delivered. This should be done by providing evidence.", - "requiredSkills": "A high level of reading and writing comprehension, data corroboration and web search.", - "court": 5, - "uri": "/ipfs/QmbSwJ4acdQP9EF6DfDU6czaG8ePha3eyvcSpPgAR8tPZ4" - }, - { - "name": "English Language", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "This subcourt requires an advanced level of English. Jurors who are not native English speakers are advised to stake into this court only if they have C1+ level of English.The following tests evaluates a C1 level: Cambridge Advanced (CAE), BEC Higher, BULATS score 75+, CLB/CELPIP 8+, CAEL 70+, IELTS level 7, TOEFL 110+, TOEIC score 880+.", - "court": 6, - "uri": "/ipfs/QmSn2RJX7a4BQ8rDtfvKLjKQSC3eHWjayPTSkFo3QMbjBx" - }, - { - "name": "Video Production", - "description": "**Court Purpose:**\n\nThis court is for disputes on video production created through agreements in the Kleros escrow. This included editing quality, resolution and final deliverable format.\n\n**Example:**\n\n- Freelancer did not complete video project as agreed in contract. Agreement stated video should be of 1min 30 seconds long but was only 59 seconds.", - "summary": "**Policies:**\n\n- If the video is longer than 1h, parties in the dispute should draw attention to certain sections of the video that do not meet the requirements of the agreement.", - "requiredSkills": "Knowledge of video editing programs / encoding standards and editing procedures. Ability to check resolutions, durations and visual branding on platforms such as YouTube, Vimeo etc.", - "court": 7, - "uri": "/ipfs/QmXvtokEk3qPiB2WPXXUpd4xCoAr5xeceS1n4BHHqNpP7p" - }, - { - "name": "Onboarding", - "description": "**Court Purpose:**\n\n- Allow new jurors to get a feel of Kleros by solving a variety of small disputes.\n- Allow projects considering Kleros use to have some disputes solved with Kleros in order to compare Kleros results with other methods.", - "summary": "**Policies:** \n\n- Disputes should be relatively simple. They should require less than 1 hour to solve.", - "requiredSkills": "No particular skills are required.", - "court": 8, - "uri": "/ipfs/QmbC7uhDEC33V8zyp8u6xozuD3GwtMp4Eaw25EzscEJk3R/Bce1VQaKwHGhMXxqgsmzJLH79ngeP4c57hGBeQQmSCZmPJcgrq4jBj3eFuMsgXuJhfYCXbARyNDx8oNvgusd9pDLjt" - }, - { - "name": "Curation", - "description": "**Court purpose:** \n\n In this court, jurors will solve micro-tasks related to curation or content moderation, such as for social media, when requirements for inclusion are relatively straightforward. Higher effort cases, requiring application of more nuanced rules should be placed in other courts but might arrive in this court upon appeal.", - "summary": "", - "requiredSkills": "No particular skills are required.", - "court": 9, - "uri": "/ipfs/QmWcf4mgnPyxUVbRMKmNjx9pzk3scQRg8bVbNjDdfgh2Nq" - }, - { - "name": "Data Analysis", - "description": "", - "summary": "", - "requiredSkills": "Jurors should be comfortable dealing with data sets, particularly in being able to understand the context of the data from the structure of the data set, and in estimating what percentage of entries are unusable/would need to be cleaned.", - "court": 10, - "uri": "/ipfs/Qmb3r65GXcoWfkpb6m3mnzgCyTyz7dk59UaY4iW6eTKkqJ" - }, - { - "name": "Statistical Modeling", - "description": "", - "summary": "", - "requiredSkills": "Jurors should be comfortable dealing with data sets. Furthermore, jurors should have a background in statistics equivalent to (at minimum) a university statistics course, and they should be able to analyze the assumptions taken in the creation of statistical models.", - "court": 11, - "uri": "/ipfs/QmSu7HxnTmQQz23EPTAMv7oF1NsBM752mEEytCDrgdoAUx" - }, - { - "name": "Curation (Medium)", - "description": "**Court purpose:** \n\n In this court, jurors will solve tasks of “medium difficulty” related to curation or content moderation. Here requirements to be analyzed can be more complicated than those of the micro-tasks in the Curation court; however, much higher effort cases should still be placed in other courts, but might arrive in this court upon appeal.", - "summary": "", - "requiredSkills": "No particular skills are required.", - "court": 12, - "uri": "/ipfs/QmeGQ5pq7eDcS3NmKXyPsRFLEXd9pJe3MHKdDviy3buDce" - }, - { - "name": "Spanish-English Translation", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Spanish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Spanish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Mexican/Argentinian/European Spanish.", - "court": 13, - "uri": "/ipfs/QmY79fya7FQAzvhjzS6S5w9N8TkXZTQ5TSajqdC26VVK6L" - }, - { - "name": "French-English Translation", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and French. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and French for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or European/Québécois French.", - "court": 14, - "uri": "/ipfs/QmQtCrG1EQzLiboYtQ15oWYstPrBUgftBUHmhUSZGk3jWc" - }, - { - "name": "Portuguese-English Translation", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Portuguese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Portuguese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Brazilian/European Portuguese.", - "court": 15, - "uri": "/ipfs/QmYdR9v8LzYnw9pT4ZCcWyoivFMPNyQcBFXgCW3PZRSMCF" - }, - { - "name": "German-English Translation", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and German. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and German for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 16, - "uri": "/ipfs/QmcqBRYin9Ug4YX7ysGf65xDjAQecuRzWp7nSucGvBcpwP" - }, - { - "name": "Russian-English Translation", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Russian. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Russian for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 17, - "uri": "/ipfs/QmXoSvQJCW4HVjB6vreL8YwXj2HHJSpwNzroMkojos7p6c" - }, - { - "name": "Korean-English Translation", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Korean. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Korean for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 18, - "uri": "/ipfs/QmUJGjgDCX9Bsn5fL6ZAZdXRLke3Pbdhwo312hJSewsKwg" - }, - { - "name": "Japanese-English Translation", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Japanese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Japanese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 19, - "uri": "/ipfs/QmWQ5NCSjZM8NK3quv72wcD7nbs9MfMxWajYnUgrZRAWch" - }, - { - "name": "Turkish-English Translation", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Turkish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Turkish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 20, - "uri": "/ipfs/QmNSpBnACohhHwSpqg5nG8ZVxED2B4pMiputfZqZdbZvuc" - }, - { - "name": "Chinese-English Translation", - "description": "**Court Purpose:**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example:**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Chinese (written in simplified characters). While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Chinese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 21, - "uri": "/ipfs/QmbuTx2dcWGSqGo7ykMhMDbvs6oM1AcbC8LvbfAQohup25" - }, - { - "name": "Corte General en Español", - "description": "**Propósito de la Corte:**\n\nLa Corte General en Español sirve como corte de uso múltiple para todo tipo de disputas que requieran un alto nivel de conocimiento del español para ser evaluadas. Los casos resueltos por cortes más especializadas que requieran conocimientos de español además de otras habilidades pueden ser revisados en esta corte tras el proceso de apelación.", - "summary": "**Políticas:**\n\nAdemás del requisito de que los jurados tengan un nivel suficiente de español, esta corte debe tener la misma política que la Corte General de Kleros.", - "requiredSkills": "**Habilidades Requeridas:**\n\nEste tribunal requiere un nivel avanzado de español. Los miembros del jurado deben poder leer la evidencia y proporcionar una justificación adecuada en español sobre una amplia gama de temas.", - "court": 22, - "uri": "/ipfs/QmRPz626unSwc7fxo3ikoZzXmCpVm5EHfiSz2bfErCsHti" - }, - { - "name": "Humanity Court", - "description": "**Court Purpose:**\n\nIn this court jurors will judge disputes related to establishing Sybil resistant lists of unique human identities, particularly for the Proof of Humanity protocol.\n\n", - "summary": "", - "requiredSkills": "Jurors should be capable of reasonably evaluating whether a proposed submission consisting of photo and video evidence corresponds to a unique human being, eventually making use of supplementary information that might be provided as evidence by relevant parties.", - "court": 23, - "uri": "/ipfs/QmQKEJbyw89Qh5AurQ4kvidCSr32ihQUdAQZ646cPkJV34" - } -] diff --git a/contracts/config/policies.v1.mainnet/Blockchain-Court-Policy.json b/contracts/config/policies.v1.mainnet/Blockchain-Court-Policy.json deleted file mode 100644 index 1c7a1d732..000000000 --- a/contracts/config/policies.v1.mainnet/Blockchain-Court-Policy.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Blockchain", - "description": "**Court Purpose:**\n\nThis is the blockchain community subcourt. Disputes in this subcourt should be those that require that jurors have an understanding of the broad blockchain ecosystem. Cases in this court may come from varying aspects of the ecosystem and could also be from lower courts that have been appealed. For example, a case in the Token Curated Registry could arrive here on appeal.\n", - "summary": "" -} diff --git a/contracts/config/policies.v1.mainnet/Chinese-English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/Chinese-English-Language-Court-Policy.json deleted file mode 100644 index 362063f22..000000000 --- a/contracts/config/policies.v1.mainnet/Chinese-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Chinese-English Translation", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Chinese (written in simplified characters). While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Chinese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.mainnet/Curation-Court-Policy.json b/contracts/config/policies.v1.mainnet/Curation-Court-Policy.json deleted file mode 100644 index 9f4a8a5b7..000000000 --- a/contracts/config/policies.v1.mainnet/Curation-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Curation", - "description": "**Court purpose** \n\n: In this court, jurors will solve micro-tasks related to curation or content moderation, such as for social media, when requirements for inclusion are relatively straightforward. Higher effort cases, requiring application of more nuanced rules should be placed in other courts but might arrive in this court upon appeal.", - "summary": "", - "requiredSkills": "No particular skills are required." -} diff --git a/contracts/config/policies.v1.mainnet/Curation-Medium-Court-Policy.json b/contracts/config/policies.v1.mainnet/Curation-Medium-Court-Policy.json deleted file mode 100644 index d289a3eef..000000000 --- a/contracts/config/policies.v1.mainnet/Curation-Medium-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Curation (Medium)", - "description": "**Court purpose** \n\n: In this court, jurors will solve tasks of “medium difficulty” related to curation or content moderation. Here requirements to be analyzed can be more complicated than those of the micro-tasks in the Curation court; however, much higher effort cases should still be placed in other courts, but might arrive in this court upon appeal.", - "summary": "", - "requiredSkills": "No particular skills are required." -} diff --git a/contracts/config/policies.v1.mainnet/Data-Analysis-Court-Policy.json b/contracts/config/policies.v1.mainnet/Data-Analysis-Court-Policy.json deleted file mode 100644 index b3ad10f73..000000000 --- a/contracts/config/policies.v1.mainnet/Data-Analysis-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Data Analysis", - "description": "", - "summary": "", - "requiredSkills": "Jurors should be comfortable dealing with data sets, particularly in being able to understand the context of the data from the structure of the data set, and in estimating what percentage of entries are unusable/would need to be cleaned." -} diff --git a/contracts/config/policies.v1.mainnet/English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/English-Language-Court-Policy.json deleted file mode 100644 index f157776cd..000000000 --- a/contracts/config/policies.v1.mainnet/English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "English Language", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "This subcourt requires an advanced level of English. Jurors who are not native English speakers are advised to stake into this court only if they have C1+ level of English.The following tests evaluates a C1 level: Cambridge Advanced (CAE), BEC Higher, BULATS score 75+, CLB/CELPIP 8+, CAEL 70+, IELTS level 7, TOEFL 110+, TOEIC score 880+." -} diff --git a/contracts/config/policies.v1.mainnet/French-English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/French-English-Language-Court-Policy.json deleted file mode 100644 index 3ef9275a9..000000000 --- a/contracts/config/policies.v1.mainnet/French-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "French-English Translation", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and French. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and French for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or European/Québécois French." -} diff --git a/contracts/config/policies.v1.mainnet/General-Court-Policy.json b/contracts/config/policies.v1.mainnet/General-Court-Policy.json deleted file mode 100644 index 7b26e0856..000000000 --- a/contracts/config/policies.v1.mainnet/General-Court-Policy.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "General Court", - "description": "**Court Purpose**\n\nThe General court exists as the top court in the hierarchy. All appeals made in subcourts will make their way to the General Court.", - "summary": "**Guidelines:**\n All policies of a court also apply to all of its child subcourts.\n Jurors should cast their vote with a suitable verification.\n Jurors should not rule in favor of a side who have engaged in immoral activities (example: rule reject on “revenge porn” images even if they would otherwise fit into the category).\n “Refuse to arbitrate” should be used for disputes where both sides of the dispute have engaged in activities which are immoral (ex: refuse to rule on an assassination market dispute).\n Immoral activities include: Murder, slavery, rape, violence, theft and perjury.\n Rulings should be made based on the “state of the world” at the time a dispute was created. (Ex: in a dispute concerning membership of a smart contract on a curated list of “bug free” contracts, jurors should not take into account changes made to the contract after the dispute is raised.) In particular, jurors should base their rulings on court policies and arbitrable application primary documents as they exist at the time of the creation of the dispute, disregarding later modifications.\n To ensure fairness to jurors who vote at different times within a voting period, jurors should disregard any evidence that is both 1) submitted after the end of the evidence period of the initial round of a dispute AND 2) cannot be reasonably considered to have been readily, publicly available to jurors. Jurors may, however, consider arguments that are submitted later that are based upon existing evidence and/or information which a juror considering the case during the evidence period of the initial round could reasonably have been expected to find themselves. (Ex: a party submits a new photo of a damaged product in an insurance case after the evidence period; this photo should not be considered by jurors. Ex: in a dispute over whether a token satisfies the criteria of a curated list of ERC20 tokens, an argument that reminds jurors of a definitional element of the ERC20 standard is submitted; this is publicly available and can be considered by jurors. Ex: in a dispute over whether a token satisfies a decentralization criterion for an exchange listing, an argument that invokes the distribution of tokens over different Ethereum addresses, as publicly available from sites such as Etherscan, can be considered by jurors.)\n When considering an appeal of a case that has originated in a lower court, jurors should consider whether 1) evaluating the case requires specialized skills which jurors in the appellate court cannot be expected to have (ex: evaluating the quality of an English to Korean translation when knowledge of Korean is not a requirement of the appellate court) and 2) whether there is evidence that an attack was performed against this case in the lower court (ex: bribes, p+epsilon attacks, 51% attacks, etc). If there is no evidence of an attack AND appellate court jurors cannot be reasonably expected to have the required skills to independently evaluate the case, jurors should vote to uphold the lower court ruling. Evidence related to the presence of attacks on Kleros should be considered by jurors even if it would otherwise violate the above points on evidence admissibility.\n Jurors should attempt to interpret disputes according to the “spirit of the dispute” unless the arbitrable contract or the policies of the subcourt state otherwise.\n Jurors should interpret disputes without assuming the existence of gods, spirits or other supernatural beings unless the arbitrable contract or the policies of the subcourt state otherwise." -} diff --git a/contracts/config/policies.v1.mainnet/German-English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/German-English-Language-Court-Policy.json deleted file mode 100644 index f81a9b7b9..000000000 --- a/contracts/config/policies.v1.mainnet/German-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "German-English Translation", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and German. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and German for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.mainnet/Humanity-Court-Policy.json b/contracts/config/policies.v1.mainnet/Humanity-Court-Policy.json deleted file mode 100644 index fc912b14a..000000000 --- a/contracts/config/policies.v1.mainnet/Humanity-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Humanity Court", - "description": "**Court Purpose**\n\nIn this court jurors will judge disputes related to establishing Sybil resistant lists of unique human identities, particularly for the Proof of Humanity protocol.\n\n", - "summary": "", - "requiredSkills": "Jurors should be capable of reasonably evaluating whether a proposed submission consisting of photo and video evidence corresponds to a unique human being, eventually making use of supplementary information that might be provided as evidence by relevant parties." -} diff --git a/contracts/config/policies.v1.mainnet/Japanese-English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/Japanese-English-Language-Court-Policy.json deleted file mode 100644 index 47bfad15b..000000000 --- a/contracts/config/policies.v1.mainnet/Japanese-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Japanese-English Translation", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Japanese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Japanese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.mainnet/Korean-English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/Korean-English-Language-Court-Policy.json deleted file mode 100644 index dc889628b..000000000 --- a/contracts/config/policies.v1.mainnet/Korean-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Korean-English Translation", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Korean. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Korean for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.mainnet/Marketing-Services-Court-Policy.json b/contracts/config/policies.v1.mainnet/Marketing-Services-Court-Policy.json deleted file mode 100644 index 3ccb7105f..000000000 --- a/contracts/config/policies.v1.mainnet/Marketing-Services-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Marketing Services", - "description": "**Court Purpose**\n\nIn this court, jurors will solve disputes on quality of paid marketing services including but not exclusive to sponsored articles, social media promotion and PR writing.\n\n**Example**\n\n- Marketing company promised to publish article on Cointelegraph and subsequently list on Google news, neither of these things happened.", - "summary": "**Policies:** \n\n- It is the responsibility of the marketing contractor to prove that the service has been delivered. This should be done by providing evidence.", - "requiredSkills": "A high level of reading and writing comprehension, data corroboration and web search." -} diff --git a/contracts/config/policies.v1.mainnet/Non-Technical-Court-Policy.json b/contracts/config/policies.v1.mainnet/Non-Technical-Court-Policy.json deleted file mode 100644 index ccd9e5692..000000000 --- a/contracts/config/policies.v1.mainnet/Non-Technical-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Non-Technical", - "description": "**Court Purpose**\n\nThis subcourt is for small non-technical blockchain disputes. It is used for disputes on challenged tokens from Kleros Token² Curated Registry Dapp, Cryptoasset Transfer and Exchange Listing agreement escrow disputes. This can include:\n\n- **Token² Curated Registry**: A curated list of verified tokens submitted by users. This includes, logo, token name, contract address and ticker. \n\n- **Cryptoasset Transfer Escrow**: This escrow can be used by users to safely and securely transfer cryptoassets between two parties, even if one cryptoasset is on a chain other than Ethereum. Funds are locked in a smart contract until the other party has complied with the agreement or a dispute is brought. An example use case could be transferring ETH for BTC P2P without knowledge of the other party. You deposit ETH into the escrow, the other party sends BTC and you release ETH.\n\n- **Exchange Listing Agreement Escrow**: This escrow can be used to delegate listing of tokens to token listing agents. A reward is paid to the agent if the token is appropriately listed on the agreed upon exchange.\n\n**Example**\n\n- Someone submits the PNK token with the address “0x87c260900c391559fd2816c9fbf078de37e2f520”. Someone challenges the listing as incorrect as the real PNK address is “0x93ed3fbe21207ec2e8f2d3c3de6e058cb73bc04d”.\n\n- Parties make a contract to exchange 1 BTC for 30 ETH. After the deadline agreed in the contract, the address of the BTC buyer still hasn’t been credited.\n\n- Contractor agreed to list clients token or coin in both USD and DAI pairings but did not deliver USD.", - "summary": "**Policies:** \n\n- In escrow disputes involving privacy coins where “view key’s” are needed, those should be provided as evidence before the end of the evidence period. ", - "requiredSkills": "Jurors do not need a deep blockchain technical knowledge or coding skills but do need the ability to read blockchain explorers, look at cryptoassets listed on exchanges, understand how to verify a transaction and cross reference on-chain data. " -} diff --git a/contracts/config/policies.v1.mainnet/Onboarding-Court-Policy.json b/contracts/config/policies.v1.mainnet/Onboarding-Court-Policy.json deleted file mode 100644 index f2aaa3ee7..000000000 --- a/contracts/config/policies.v1.mainnet/Onboarding-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Onboarding", - "description": "**Court Purpose**\n\n- Allow new jurors to get a feel of Kleros by solving a variety of small disputes.\n- Allow projects considering Kleros use to have some disputes solved with Kleros in order to compare Kleros results with other methods.", - "summary": "**Policies:** \n\n- Disputes should be relatively simple. They should require less than 1 hour to solve.", - "requiredSkills": "No particular skills are required." -} diff --git a/contracts/config/policies.v1.mainnet/Portuguese-English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/Portuguese-English-Language-Court-Policy.json deleted file mode 100644 index e8af98acc..000000000 --- a/contracts/config/policies.v1.mainnet/Portuguese-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Portuguese-English Translation", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Portuguese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Portuguese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Brazilian/European Portuguese." -} diff --git a/contracts/config/policies.v1.mainnet/Russian-English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/Russian-English-Language-Court-Policy.json deleted file mode 100644 index dd2d00d50..000000000 --- a/contracts/config/policies.v1.mainnet/Russian-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Russian-English Translation", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Russian. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Russian for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.mainnet/Spanish-English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/Spanish-English-Language-Court-Policy.json deleted file mode 100644 index 57c370a00..000000000 --- a/contracts/config/policies.v1.mainnet/Spanish-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Spanish-English Translation", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Spanish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Spanish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Mexican/Argentinian/European Spanish." -} diff --git a/contracts/config/policies.v1.mainnet/Spanish-General-Court-Policy.json b/contracts/config/policies.v1.mainnet/Spanish-General-Court-Policy.json deleted file mode 100644 index 08a2dec88..000000000 --- a/contracts/config/policies.v1.mainnet/Spanish-General-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Corte General en Español", - "description": "**Propósito de la Corte**\n\nLa Corte General en Español sirve como corte de uso múltiple para todo tipo de disputas que requieran un alto nivel de conocimiento del español para ser evaluadas. Los casos resueltos por cortes más especializadas que requieran conocimientos de español además de otras habilidades pueden ser revisados en esta corte tras el proceso de apelación.", - "summary": "**Políticas:**\n\nAdemás del requisito de que los jurados tengan un nivel suficiente de español, esta corte debe tener la misma política que la Corte General de Kleros.", - "requiredSkills": "**Habilidades Requeridas:**\n\nEste tribunal requiere un nivel avanzado de español. Los miembros del jurado deben poder leer la evidencia y proporcionar una justificación adecuada en español sobre una amplia gama de temas." -} diff --git a/contracts/config/policies.v1.mainnet/Statistical-Modeling-Court-Policy.json b/contracts/config/policies.v1.mainnet/Statistical-Modeling-Court-Policy.json deleted file mode 100644 index d65cadd31..000000000 --- a/contracts/config/policies.v1.mainnet/Statistical-Modeling-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Statistical Modeling", - "description": "", - "summary": "", - "requiredSkills": "Jurors should be comfortable dealing with data sets. Furthermore, jurors should have a background in statistics equivalent to (at minimum) a university statistics course, and they should be able to analyze the assumptions taken in the creation of statistical models." -} diff --git a/contracts/config/policies.v1.mainnet/Technical-Court-Policy.json b/contracts/config/policies.v1.mainnet/Technical-Court-Policy.json deleted file mode 100644 index f9cac9f62..000000000 --- a/contracts/config/policies.v1.mainnet/Technical-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Technical", - "description": "**Court Purpose**\n\nThis court serves to arbitrate blockchain disputes of a technical nature. This can include:\n\n- Verifying that a smart contract meets a defined standard. \n\n- Verifying that a proposed contract call is the technical translation of a decision taken by governance.\n\n**Example**\n\n- A dispute on whether or not a token should be given a badge indicating that it satisfies ERC20. \n\n- A dispute on whether or not a proposed Kleros governor call matches the decision which has been voted through governance.", - "summary": "**Policies:** \n\n- Disputes in this subcourt should only be of technical nature. ", - "requiredSkills": "A high understanding of blockchain technology, smart contract, solidity language and Ethereum ABI is required." -} diff --git a/contracts/config/policies.v1.mainnet/Token-Listing-Court-Policy.json b/contracts/config/policies.v1.mainnet/Token-Listing-Court-Policy.json deleted file mode 100644 index 8204e77bf..000000000 --- a/contracts/config/policies.v1.mainnet/Token-Listing-Court-Policy.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Token Listing", - "description": "This court serves as the final validation for token listing for verified projects listing on the Ethfinex Exchange using Kleros’ Token Curated List Dapp.\nThis is a high level, high stake court requiring deep blockchain knowledge, legal experience and / or a knowledge of exchange listings in general. Jurors are required to stake a large amount of PNK and should only do so if they are confident in the above capabilities.", - "summary": "[Ethfinex Court Policy](https://cdn.kleros.link/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)" -} diff --git a/contracts/config/policies.v1.mainnet/Turkish-English-Language-Court-Policy.json b/contracts/config/policies.v1.mainnet/Turkish-English-Language-Court-Policy.json deleted file mode 100644 index aae67e36c..000000000 --- a/contracts/config/policies.v1.mainnet/Turkish-English-Language-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Turkish-English Translation", - "description": "**Court Purpose**\n\nIn this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "summary": "**Policies:**\n\n- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Turkish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Turkish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English." -} diff --git a/contracts/config/policies.v1.mainnet/Video-Production-Court-Policy.json b/contracts/config/policies.v1.mainnet/Video-Production-Court-Policy.json deleted file mode 100644 index 167d0afb0..000000000 --- a/contracts/config/policies.v1.mainnet/Video-Production-Court-Policy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Video Production", - "description": "**Court Purpose**\n\nThis court is for disputes on video production created through agreements in the Kleros escrow. This included editing quality, resolution and final deliverable format.\n\n**Example**\n\n- Freelancer did not complete video project as agreed in contract. Agreement stated video should be of 1min 30 seconds long but was only 59 seconds.", - "summary": "**Policies:**\n\n- If the video is longer than 1h, parties in the dispute should draw attention to certain sections of the video that do not meet the requirements of the agreement.", - "requiredSkills": "Knowledge of video editing programs / encoding standards and editing procedures. Ability to check resolutions, durations and visual branding on platforms such as YouTube, Vimeo etc." -} diff --git a/contracts/config/policies.v2.devnet.json b/contracts/config/policies.v2.devnet.json deleted file mode 100644 index 811587df6..000000000 --- a/contracts/config/policies.v2.devnet.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "name": "General Court", - "purpose": "The General court exists as the top court in the hierarchy.\n\nAll appeals made in subcourts will make their way to the General Court.", - "rules": "- All policies of a court also apply to all of its child subcourts.\n - Jurors should cast their vote with a suitable verification.\n - Jurors should not rule in favor of a side who have engaged in immoral activities (example: rule reject on “revenge porn” images even if they would otherwise fit into the category).\n - “Refuse to arbitrate” should be used for disputes where both sides of the dispute have engaged in activities which are immoral (ex: refuse to rule on an assassination market dispute).\n Immoral activities include: Murder, slavery, rape, violence, theft and perjury.\n - Rulings should be made based on the “state of the world” at the time a dispute was created. (Ex: in a dispute concerning membership of a smart contract on a curated list of “bug free” contracts, jurors should not take into account changes made to the contract after the dispute is raised.) In particular, jurors should base their rulings on court policies and arbitrable application primary documents as they exist at the time of the creation of the dispute, disregarding later modifications.\n - To ensure fairness to jurors who vote at different times within a voting period, jurors should disregard any evidence that is both 1) submitted after the end of the evidence period of the initial round of a dispute AND 2) cannot be reasonably considered to have been readily, publicly available to jurors. Jurors may, however, consider arguments that are submitted later that are based upon existing evidence and/or information which a juror considering the case during the evidence period of the initial round could reasonably have been expected to find themselves. (Ex: a party submits a new photo of a damaged product in an insurance case after the evidence period; this photo should not be considered by jurors. Ex: in a dispute over whether a token satisfies the criteria of a curated list of ERC20 tokens, an argument that reminds jurors of a definitional element of the ERC20 standard is submitted; this is publicly available and can be considered by jurors. Ex: in a dispute over whether a token satisfies a decentralization criterion for an exchange listing, an argument that invokes the distribution of tokens over different Ethereum addresses, as publicly available from sites such as Etherscan, can be considered by jurors.)\n - When considering an appeal of a case that has originated in a lower court, jurors should consider whether 1) evaluating the case requires specialized skills which jurors in the appellate court cannot be expected to have (ex: evaluating the quality of an English to Korean translation when knowledge of Korean is not a requirement of the appellate court) and 2) whether there is evidence that an attack was performed against this case in the lower court (ex: bribes, p+epsilon attacks, 51% attacks, etc). If there is no evidence of an attack AND appellate court jurors cannot be reasonably expected to have the required skills to independently evaluate the case, jurors should vote to uphold the lower court ruling. Evidence related to the presence of attacks on Kleros should be considered by jurors even if it would otherwise violate the above points on evidence admissibility.\n - Jurors should attempt to interpret disputes according to the “spirit of the dispute” unless the arbitrable contract or the policies of the subcourt state otherwise.\n - Jurors should interpret disputes without assuming the existence of gods, spirits or other supernatural beings unless the arbitrable contract or the policies of the subcourt state otherwise.", - "court": 1, - "uri": "/ipfs/QmRDYF4su41noCb447vp9iMicCYfT2a2eXg4wPC3DVR58b" - }, - { - "name": "Curation", - "purpose": "In this court, jurors will solve micro-tasks related to curation or content moderation, such as for social media, when requirements for inclusion are relatively straightforward. Higher effort cases, requiring application of more nuanced rules should be placed in other courts but might arrive in this court upon appeal.", - "rules": "", - "requiredSkills": "No particular skills are required.", - "court": 2, - "uri": "/ipfs/QmPpey7rFbPi25Djcb4ppcGaxR4pojLgpGW2jhUvKxvE5q" - }, - { - "name": "English Language", - "purpose": "In this court, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n - Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to be accepted unless a target audience is specifically mentioned in the contract.", - "requiredSkills": "This court requires an advanced level of English. Jurors who are not native English speakers are advised to stake into this court only if they have C1+ level of English.\n\nThe following tests evaluates a C1 level: Cambridge Advanced (CAE), BEC Higher, BULATS score 75+, CLB/CELPIP 8+, CAEL 70+, IELTS level 7, TOEFL 110+, TOEIC score 880+.", - "court": 3, - "uri": "/ipfs/QmcMU8hG1UsgEPVykcZFTefeizBux8QPunZAXXTv7KF5B8" - }, - { - "name": "Corte de Disputas de Consumo y Vecindad", - "purpose": "Esta corte está destinada a resolver una amplia variedad de disputas de complejidad baja a moderada, principalmente de carácter civil y comercial. La misma actúa como tribunal subsidiario para los casos en los que no exista otra corte más especializada o aplicable. Su alcance incluye, pero no se limita a:\n- Conflictos contractuales.\n- Reclamos por daños y perjuicios.\n- Reclamos de defensa del consumidor entre usuarios y empresas.", - "rules": "", - "requiredSkills": "- Familiaridad con los [derechos básicos del consumidor](https://buenosaires.gob.ar/principales-derechos-de-los-consumidores).\n- Comprensión de las prácticas comunes en entornos digitales y descentralizados.\n- Capacidad para evaluar de manera crítica y objetiva la autenticidad y relevancia de las pruebas presentadas.", - "court": 4, - "uri": "/ipfs/QmdfPa7UZxc7iVquQWiTmmRG3n6RSkwN16aXFeK7XyLvjr" - }, - { - "name": "Oracle", - "purpose": "The Oracle Court is designed to resolve disputes related to reporting real-world events, including but not limited to those originating from prediction markets.", - "rules": "The following rules are subsidiary and will apply only if no contrary provisions are outlined in the primary document or other rules or sources relevant to resolving the specific question. In such cases, jurors should adhere to these standard guidelines for resolution.\n### Refuse to Arbitrate\n\nThe following questions must resolve as \"Refuse to Arbitrate\":\n\n**1. Invalid answers:** Questions in which none of the answers are valid.\n\n*Refuse to Arbitrate: A Prediction Market question: \"Which movie will win the Best Picture award at the 2024 Oscars Academy Awards?\" with outcomes \"Barbie\" and \"Poor Things\" (the actual winner was \"Oppenheimer\").*\n\n**2. Multiple outcomes:** Questions in which multiple outcomes are valid, unless the question allows multiple correct answers. In a multiple choice question in which only one correct answer is allowed, the fact that multiple outcomes could be valid at the same time does not make the question invalid if only one of those outcomes occurs.\n\n*Valid:​ A Prediction Market multiple choice question that allows more than one answer: \"What team will reach the semi-finals of Copa America 2021?\" with answers \"Brazil,\" \"Argentina,\" \"Uruguay,\" and \"Colombia\" (all of them except Uruguay reached the semi-finals).*\n\n*Refuse to Arbitrate: A Prediction Market multiple choice question in which only one correct answer is allowed: \"Who will be the Time person of the year 1937?\" with answers \"Chiang Kai-shek\" and \"Soong Mei-ling\" (they got the prize jointly).*\n\n**3. Prohibited questions:** Questions that directly incentivize immoral violent actions (such as murder, rape or unjust imprisonment) which could likely be performed by any participant.\n\n*Refuse to Arbitrate: A Prediction Market question: Will Donald Trump be alive on 01/12/2024? (Anyone could bet on \"No\" and kill him for a guaranteed profit. Anyone could bet on \"Yes\" to effectively put a bounty on his head).*\n\n*Refuse to Arbitrate: A Prediction Market question: Will Hera be a victim of swatting in 2024? (Anyone could falsely call the emergency services on him in order to win the bet)*\n\nThis must not prevent questions:\n\n* Whose topics are violent events not caused by human beings.\n\n*Valid:​ A Prediction Market question: How many people will die from COVID19 in 2024? (Viruses don't use prediction markets).*\n\n* Whose main source of uncertainty is not related to a potential violent action.\n\n*Valid:​ A Prediction Market question: Will Trump win the 2020 US presidential election? (The main source of uncertainty is the vote of US citizens, not a potential murder of a presidential candidate).*\n\n* Which could give an incentive only to specific participants to commit an immoral violent action, but are in practice unlikely.\n\n*Valid:​ A Prediction Market question: Will the US be engaged in a military conflict with a UN member state in 2024? (It's unlikely for the US to declare war in order to win a bet on this market).*\n\n*Valid:​ Will Derek Chauvin go to jail for the murder of George Flyod? (It's unlikely that the jurors would collude to make a wrong verdict in order to win this market).*\n\n### Default assumptions\n\nUnless stated otherwise, the following assumptions must be made:\n\n**4. Entities:** Entities are assumed to reference the most obvious entity with that name, taking the context of the question into account.\n\n*Example: A Prediction Market question: \"Will Michael Jordan receive the 2021 Turing award?\" refers to the computer scientist Michael I. Jordan whereas \"How many points will Michael Jordan score in the FIBA Americas Championship?\" refers to Michael J. Jordan, the basketball player.*\n\n**5. Units:** In case units are omitted, they are assumed to be the units which are the most often used in this particular situation.\n\n*Example: A Prediction Market question: \"Will a NFT be sold for more than one million in 2021?\" will be interpreted as \"Will a NFT be sold for more than 1,000,000 USD in 2021?\".*\n\n**6. Rounding rule:** If no specific rounding method is given, values are to be rounded to the nearest proposed value, unit or range. Unless otherwise stated, roundings are done middle toward 0. If no proposed rule, value, or unit is provided, the value shall default to the most commonly used standard in the specific context.\n\n*Example: In a Prediction Market question with outcomes -100, 0 and 100. 77->100, 50->0, -50 -> 0.*\n\n*Example: In a Prediction Market question with outcomes A: 0-2, B: 3-5 and C: 6+. 1->A, 8->C, 5.5->B.*\n\n*Example: In the Prediction Market question \"What percentage of the popular vote will Joe Biden receive in the 2020 United States Presidential Election?\". If Biden received 51.305859559% of the vote, the correct answer is 51% (rounding to the nearest whole percent).*\n\n*Example: In the Prediction Market question \"What percentage of the popular vote will Joe Biden receive in the 2020 United States Presidential Election? (2 decimals)\". If Biden received 51.305859559% of the vote, the correct answer is 51.31%.*\n\n### Resolving unclear questions\n\nIn general, if the question does not break a rule of the Refuse to Arbitrate section, reasonable efforts should be made to determine its outcome even if the question is not 100% technically perfect, and the following rules must be applied:\n\n**7. Objective interpretation:** Questions must be interpreted according to their context, as any average reasonable person would.\n\n*Example: \"Will there be more than ten thousand deaths caused by Coronavirus in the United States in 2024?\" should be interpreted as referring to COVID-19, and not other types of Coronavirus.*\n\n**8. Sources of truth:** If the question doesn't mention a specific source, the most credible outcome must be reported. In order to determine the credibility of an outcome, the quantity of sources and their credibility are to be taken into account. Credibility of sources and of outcomes must be assessed according to facts, not unproven beliefs.\n\n*Example: \"Will extraterrestrial lifeforms visit planet earth?\" will resolve to No, unless a number of credible sources announce it, despite some people reporting having experienced such encounters.*\n\n*Example: \"How many people will die of COVID-19 in 2024?\" should be answered according to numbers reported by renowned health organisations and not according to some public figures claiming COVID-19 to be a hoax.*\n\n**9. Equal interpretations:** If a question can have different interpretations, but all those interpretations lead to the same outcome, this outcome must be reported. If no interpretation is clearly more reasonable than the others, jurors must vote Refuse to Arbitrate.\n\n*Example: A Prediction Market question: \"Which party will win the October 2012 Czeck elections?\" Should be reported as \"Czech Social Democratic Party\". Even if there were both senatorial and regional elections at the same date and the election the question refers to is ambiguous, the \"Czech Social Democratic Party\" won both of them.*\n\n*Example: In a Prediction Market question: \"Which party will win the October 2015 Czech elections?\" jurors should vote Refuse to Arbitrate because \"Christian and Democratic Union – Czechoslovak People's Party\" won the senatorial election but \"ANO 2011\" won the regional ones.*\n\n**10. Precision in numerical values:** When the answer to a question is a numerical value and the exact value is uncertain, the first reported value that is reasonable based on common approximations must be accepted.\n\n*Example: If in a Prediction Market question, \"What will be the global potato production in tons for the year 2024?\", the first answer is 374,000,000, this answer should be accepted if the estimates provided range between 374 million and 375 million tons.*", - "requiredSkills": "Jurors in the Oracle Court should possess:\n- **Analytical Skills**: Ability to objectively assess a wide range of real-world event data, statistics, and sources, with precision and critical thinking.\n- **Understanding of Prediction Markets**: Familiarity with how prediction markets function.", - "court": 5, - "uri": "/ipfs/QmT8DAjUbzzEo2e9oPpJSDH2QzswfNeWAsxoDH3zsGrtkH" - }, - { - "name": "Automated Curation", - "purpose": "The Automated Curation Court is designed to handle micro-tasks and cases requiring fast and near-instant resolution. These include, but are not limited to, content moderation, gaming disputes, automated data curation, and similar use cases. AI agents capable of rapid decision-making are better suited for this court's short resolution time.", - "rules": "", - "requiredSkills": "AI agents participating as jurors of this court must be capable of:\n- Data Processing Efficiency: Handling high volumes of disputes in near real-time without compromising accuracy.\n- Kleros Rules Compliance: analyzing all evidence presented and ruling in accordance with Kleros General Court Policy, this Automated Curation Court Policy, and the case’s Primary Document.\n- Temporal Awareness: Identifying the moment of relevant events in a dispute, which may be crucial for applying the General Court’s Policy. This includes understanding the state of the world at the time the dispute was created, recognizing the exact time a piece of evidence was submitted, understanding the applicable court policies and arbitrable application primary documents that existed at the time of the dispute’s creation, and assessing whether a piece of evidence was submitted after the end of the evidence period of the initial round of the dispute.", - "court": 6, - "uri": "/ipfs/QmNm6w4itnvMoWQXcz3CAQmjSF4nP5w6uTwGAQ1Z5YoUKJ" - } -] diff --git a/contracts/config/policies.v2.mainnet.json b/contracts/config/policies.v2.mainnet.json deleted file mode 100644 index a820d53d1..000000000 --- a/contracts/config/policies.v2.mainnet.json +++ /dev/null @@ -1,247 +0,0 @@ -[ - { - "name": "General Court", - "purpose": "The General court exists as the top court in the hierarchy.\n\nAll appeals made in subcourts will make their way to the General Court.", - "rules": "- All policies of a court also apply to all of its child subcourts.\n- Jurors should cast their vote with a suitable verification.\n- Jurors should not rule in favor of a side who have engaged in immoral activities (example: rule reject on “revenge porn” images even if they would otherwise fit into the category).\n- “Refuse to arbitrate” should be used for disputes where both sides of the dispute have engaged in activities which are immoral (ex: refuse to rule on an assassination market dispute).\n- Immoral activities include: Murder, slavery, rape, violence, theft and perjury.\n- Rulings should be made based on the “state of the world” at the time a dispute was created. (Ex: in a dispute concerning membership of a smart contract on a curated list of “bug free” contracts, jurors should not take into account changes made to the contract after the dispute is raised.) In particular, jurors should base their rulings on court policies and arbitrable application primary documents as they exist at the time of the creation of the dispute, disregarding later modifications.\n- To ensure fairness to jurors who vote at different times within a voting period, jurors should disregard any evidence that is both 1) submitted after the end of the evidence period of the initial round of a dispute AND 2) cannot be reasonably considered to have been readily, publicly available to jurors. Jurors may, however, consider arguments that are submitted later that are based upon existing evidence and/or information which a juror considering the case during the evidence period of the initial round could reasonably have been expected to find themselves. (Ex: a party submits a new photo of a damaged product in an insurance case after the evidence period; this photo should not be considered by jurors. Ex: in a dispute over whether a token satisfies the criteria of a curated list of ERC20 tokens, an argument that reminds jurors of a definitional element of the ERC20 standard is submitted; this is publicly available and can be considered by jurors. Ex: in a dispute over whether a token satisfies a decentralization criterion for an exchange listing, an argument that invokes the distribution of tokens over different Ethereum addresses, as publicly available from sites such as Etherscan, can be considered by jurors.)\n- When considering an appeal of a case that has originated in a lower court, jurors should consider whether 1) evaluating the case requires specialized skills which jurors in the appellate court cannot be expected to have (ex: evaluating the quality of an English to Korean translation when knowledge of Korean is not a requirement of the appellate court) and 2) whether there is evidence that an attack was performed against this case in the lower court (ex: bribes, p+epsilon attacks, 51% attacks, etc). If there is no evidence of an attack AND appellate court jurors cannot be reasonably expected to have the required skills to independently evaluate the case, jurors should vote to uphold the lower court ruling. Evidence related to the presence of attacks on Kleros should be considered by jurors even if it would otherwise violate the above points on evidence admissibility.\n- Jurors should attempt to interpret disputes according to the “spirit of the dispute” unless the arbitrable contract or the policies of the subcourt state otherwise.\n- Jurors should interpret disputes without assuming the existence of gods, spirits or other supernatural beings unless the arbitrable contract or the policies of the subcourt state otherwise.", - "court": 1, - "uri": "/ipfs/QmRwmJAF8NK1r3fAS8dHofbTKsuhWSd3LruzkjrpNNBprC" - }, - { - "name": "Blockchain", - "purpose": "This is the blockchain community subcourt. Disputes in this subcourt should be those that require that jurors have an understanding of the broad blockchain ecosystem. Cases in this court may come from varying aspects of the ecosystem and could also be from lower courts that have been appealed. For example, a case in the Token Curated Registry could arrive here on appeal.", - "rules": "", - "court": 2, - "uri": "/ipfs/QmX4DuuKAHX7rqMcnmYLHHEWvW93bdJ2zNUVBmNRX4kKQK" - }, - { - "name": "Non-Technical", - "purpose": "This subcourt is for small non-technical blockchain disputes. It is used for disputes on challenged tokens from Kleros Token² Curated Registry Dapp, Cryptoasset Transfer and Exchange Listing agreement escrow disputes. This can include:\n- **Token² Curated Registry**: A curated list of verified tokens submitted by users. This includes, logo, token name, contract address and ticker. \n- **Cryptoasset Transfer Escrow**: This escrow can be used by users to safely and securely transfer cryptoassets between two parties, even if one cryptoasset is on a chain other than Ethereum. Funds are locked in a smart contract until the other party has complied with the agreement or a dispute is brought. An example use case could be transferring ETH for BTC P2P without knowledge of the other party. You deposit ETH into the escrow, the other party sends BTC and you release ETH.\n- **Exchange Listing Agreement Escrow**: This escrow can be used to delegate listing of tokens to token listing agents. A reward is paid to the agent if the token is appropriately listed on the agreed upon exchange.\n### Example\n- Someone submits the PNK token with the address “0x87c260900c391559fd2816c9fbf078de37e2f520”. Someone challenges the listing as incorrect as the real PNK address is “0x93ed3fbe21207ec2e8f2d3c3de6e058cb73bc04d”.\n- Parties make a contract to exchange 1 BTC for 30 ETH. After the deadline agreed in the contract, the address of the BTC buyer still hasn’t been credited.\n- Contractor agreed to list clients token or coin in both USD and DAI pairings but did not deliver USD.", - "rules": "In escrow disputes involving privacy coins where “view key’s” are needed, those should be provided as evidence before the end of the evidence period. ", - "requiredSkills": "Jurors do not need a deep blockchain technical knowledge or coding skills but do need the ability to read blockchain explorers, look at cryptoassets listed on exchanges, understand how to verify a transaction and cross reference on-chain data. ", - "court": 3, - "uri": "/ipfs/QmPVEjGaZ9f1sWmqjbqvgcmPWM2686VDgccZce2ZwhAtiD" - }, - { - "name": "Token Listing", - "purpose": "This court serves as the final validation for token listing for verified projects listing on the Ethfinex Exchange using Kleros’ Token Curated List Dapp.\nThis is a high level, high stake court requiring deep blockchain knowledge, legal experience and / or a knowledge of exchange listings in general. Jurors are required to stake a large amount of PNK and should only do so if they are confident in the above capabilities.", - "rules": "[Ethfinex Court Policy](https://cdn.kleros.link/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)", - "court": 4, - "uri": "/ipfs/QmU4AgUKUD7oXkmu4FM8o2mXEJXnnV4Kv4u1CgAWriTrgq" - }, - { - "name": "Technical", - "purpose": "This court serves to arbitrate blockchain disputes of a technical nature. This can include:\n- Verifying that a smart contract meets a defined standard.\n- Verifying that a proposed contract call is the technical translation of a decision taken by governance.\n### Example\n- A dispute on whether or not a token should be given a badge indicating that it satisfies ERC20.\n- A dispute on whether or not a proposed Kleros governor call matches the decision which has been voted through governance.", - "rules": "- Disputes in this subcourt should only be of technical nature. ", - "requiredSkills": "A high understanding of blockchain technology, smart contract, solidity language and Ethereum ABI is required.", - "court": 5, - "uri": "/ipfs/QmX43E594Prj7KcaCfvPBpcg6soVrnxJWbYmfUtxM1tGwk" - }, - { - "name": "Marketing Services", - "purpose": "In this court, jurors will solve disputes on quality of paid marketing services including but not exclusive to sponsored articles, social media promotion and PR writing.\n### Example\nMarketing company promised to publish article on Cointelegraph and subsequently list on Google news, neither of these things happened.", - "rules": "It is the responsibility of the marketing contractor to prove that the service has been delivered. This should be done by providing evidence.", - "requiredSkills": "A high level of reading and writing comprehension, data corroboration and web search.", - "court": 6, - "uri": "/ipfs/QmSrfZRXnfeseSvzTeWXL1dKcVyGnPYvuoQD7JQoRS6GSr" - }, - { - "name": "English Language", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n###Example\n- Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "This subcourt requires an advanced level of English. Jurors who are not native English speakers are advised to stake into this court only if they have C1+ level of English.The following tests evaluates a C1 level: Cambridge Advanced (CAE), BEC Higher, BULATS score 75+, CLB/CELPIP 8+, CAEL 70+, IELTS level 7, TOEFL 110+, TOEIC score 880+.", - "court": 7, - "uri": "/ipfs/Qme3QwJs36fcqiC5KUMGwSubhfoUkLBjYBBs1cAabjQoU1" - }, - { - "name": "Video Production", - "purpose": "This court is for disputes on video production created through agreements in the Kleros escrow. This included editing quality, resolution and final deliverable format.\n### Example\nFreelancer did not complete video project as agreed in contract. Agreement stated video should be of 1min 30 seconds long but was only 59 seconds.", - "rules": "- If the video is longer than 1h, parties in the dispute should draw attention to certain sections of the video that do not meet the requirements of the agreement.", - "requiredSkills": "Knowledge of video editing programs / encoding standards and editing procedures. Ability to check resolutions, durations and visual branding on platforms such as YouTube, Vimeo etc.", - "court": 8, - "uri": "/ipfs/QmWV29MMfPx9qh5YCevZdWF5Bm7tBCMCfL15H4Gs2SHSMc" - }, - { - "name": "Onboarding", - "purpose": "- Allow new jurors to get a feel of Kleros by solving a variety of small disputes.\n- Allow projects considering Kleros use to have some disputes solved with Kleros in order to compare Kleros results with other methods.", - "rules": "Disputes should be relatively simple. They should require less than 1 hour to solve.", - "requiredSkills": "No particular skills are required.", - "court": 9, - "uri": "/ipfs/QmT92EfehJpUgbvDSEM4b8nLJ4Y8rrAig6g9T41iCYyApx" - }, - { - "name": "Curation", - "purpose": "In this court, jurors will solve micro-tasks related to curation or content moderation, such as for social media, when requirements for inclusion are relatively straightforward. Higher effort cases, requiring application of more nuanced rules should be placed in other courts but might arrive in this court upon appeal.", - "rules": "", - "requiredSkills": "No particular skills are required.", - "court": 10, - "uri": "/ipfs/QmNRutLfBNXrFpVACnCiGhfm837pEMTUpokgpArjg9oP4n" - }, - { - "name": "Data Analysis", - "purpose": "", - "rules": "", - "requiredSkills": "Jurors should be comfortable dealing with data sets, particularly in being able to understand the context of the data from the structure of the data set, and in estimating what percentage of entries are unusable/would need to be cleaned.", - "court": 11, - "uri": "/ipfs/QmVRzM6ZFSegnDzX9zN5oUqXut75j3pdRdqdcb86ZoWXac" - }, - { - "name": "Statistical Modeling", - "purpose": "", - "rules": "", - "requiredSkills": "Jurors should be comfortable dealing with data sets. Furthermore, jurors should have a background in statistics equivalent to (at minimum) a university statistics course, and they should be able to analyze the assumptions taken in the creation of statistical models.", - "court": 12, - "uri": "/ipfs/QmZSZfQDkpkz5MXLThmV2ZkLhwjFAXWe9XxvSEhr2M8rcQ" - }, - { - "name": "Curation (Medium)", - "purpose": "In this court, jurors will solve tasks of “medium difficulty” related to curation or content moderation. Here requirements to be analyzed can be more complicated than those of the micro-tasks in the Curation court; however, much higher effort cases should still be placed in other courts, but might arrive in this court upon appeal.", - "rules": "", - "requiredSkills": "No particular skills are required.", - "court": 13, - "uri": "/ipfs/QmeMp1yVg385hPNjW6Xz6GL9noUhHpVmyFvFCpDKosTWEi" - }, - { - "name": "Spanish-English Translation", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n### Example\nContractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Spanish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Spanish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Mexican/Argentinian/European Spanish.", - "court": 14, - "uri": "/ipfs/Qmf1cCBh5iWVWEZoKbwCxVymFefAbmvoFbUtCEu8jzDUXf" - }, - { - "name": "French-English Translation", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n### Example\nContractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and French. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and French for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or European/Québécois French.", - "court": 15, - "uri": "/ipfs/QmaWhoi2JFXqbXsMjKfqaNENknXjzuaJeUEU3YdTKwiuj9" - }, - { - "name": "Portuguese-English Translation", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n### Example\nContractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Portuguese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Portuguese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English, or Brazilian/European Portuguese.", - "court": 16, - "uri": "/ipfs/QmVseoDMTcexMBSXDSJc75LimLZmhbKYDe27xwK8xtBqs1" - }, - { - "name": "German-English Translation", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n### Example\nContractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and German. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and German for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 17, - "uri": "/ipfs/QmZ4yfbLnN3FyFfTyPeZNw2M1B4UbWu75fCVaVEuNkgqJR" - }, - { - "name": "Russian-English Translation", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n### Example\nContractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Russian. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Russian for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 18, - "uri": "/ipfs/QmbcQyKHUMXzJv1T7deDVuUKa9W4ZzkJiCthMkceRjqWTu" - }, - { - "name": "Korean-English Translation", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n### Example\nContractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Korean. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Korean for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 19, - "uri": "/ipfs/QmSFSSohm7r3inSxCuNLAkoQpe2jnQJd5eXzsFeYWGcAQ8" - }, - { - "name": "Japanese-English Translation", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n### Example\nContractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Japanese. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Japanese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 20, - "uri": "/ipfs/QmS1rS5jByBSM1frt8fhD33X4Mb1JqcgMCBpTtKv5ciHBi" - }, - { - "name": "Turkish-English Translation", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n### Example\nContractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Turkish. While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Turkish for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 21, - "uri": "/ipfs/QmWjPb7a3XUQjN5eFHRPiBB1KkVFY9fes2LxGAN41PnUNW" - }, - { - "name": "Chinese-English Translation", - "purpose": "In this subcourt, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n### Example\nContractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out to specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n- All variations of English (UK, US, Australia, etc) are to accepted unless a target audience is specifically mentioned in the contract. ", - "requiredSkills": "Jurors in this court should have a strong command of both English and Chinese (written in simplified characters). While jurors do not necessarily have to have the skills of a professional translator themselves, they should be able to review texts translated between English and Chinese for the quality of their translation. Particularly, when presented with passages that are flagged by challengers as potentially erroneous or inadequate and arguments given by the translator and the challenger for why the passage should or should not be considered acceptable, jurors should be able to make a determination on the quality of the passage. Jurors should be capable of these tasks even when the text is being translated to or from regional variations of these languages, such as US/British English.", - "court": 22, - "uri": "/ipfs/QmeDe5dsrofxU8bHU1TpwkbJrFdHCseFkPL74Pg47TbJ7i" - }, - { - "name": "Corte General en Español", - "purpose": "La Corte General en Español sirve como corte de uso múltiple para todo tipo de disputas que requieran un alto nivel de conocimiento del español para ser evaluadas. Los casos resueltos por cortes más especializadas que requieran conocimientos de español además de otras habilidades pueden ser revisados en esta corte tras el proceso de apelación.", - "rules": "Además del requisito de que los jurados tengan un nivel suficiente de español, esta corte debe tener la misma política que la Corte General de Kleros.", - "requiredSkills": "Este tribunal requiere un nivel avanzado de español. Los miembros del jurado deben poder leer la evidencia y proporcionar una justificación adecuada en español sobre una amplia gama de temas.", - "court": 23, - "uri": "/ipfs/QmcaMbPgKAAvc67URzbq1yegnCANPRSNSmLQ7GwsyYNTCe" - }, - { - "name": "Humanity", - "purpose": "In this court jurors will judge disputes related to establishing Sybil resistant lists of unique human identities, particularly for the Proof of Humanity protocol.\n\n", - "rules": "", - "requiredSkills": "Jurors should be capable of reasonably evaluating whether a proposed submission consisting of photo and video evidence corresponds to a unique human being, eventually making use of supplementary information that might be provided as evidence by relevant parties.", - "court": 24, - "uri": "/ipfs/QmfH68LJWRQ7UEJqFGDKDpR6hmxmmJrbz2EHJMgqtCgFo6" - }, - { - "name": "Development", - "purpose": "In this court, jurors will solve disputes involving the respect of specifications given by the client.", - "rules": "### Example\nDeveloper does not respect indentation, does not name variables explicitly or has not made a clear file structure. In such cases, jurors should refuse the proposal made by the developer.", - "requiredSkills": "This court requires a good level of familiarity with programming. Jurors who are not intermediate developers are advised to stake into this court only if they have some basics of low-level programming languages, ​​algorithmic and knowledge of good practices of development.", - "court": 25, - "uri": "/ipfs/QmdiQGftN4Mxtocvf1ENxeEvVzU62AGR3knzfhMDb85iTh" - }, - { - "name": "Solidity", - "purpose": "", - "rules": "If the disputed code is of significant size (> 500 code lines), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.", - "requiredSkills": "This court requires a good level of solidity. Jurors who are not solidity intermediate developers are advised to stake into this court only if they also know how to make relatively simple contracts, know the main solidity hacks and can compute the complexity of simple functions.", - "court": 26, - "uri": "/ipfs/QmbKfy5vF5jZ5GFqFKgUxnYsbAjJdtsDfp2UJLwxzDokmb" - }, - { - "name": "Javascript", - "purpose": "", - "rules": "If the disputed code is of significant size (> 700 code lines), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.", - "requiredSkills": "This court requires a good level of javascript. Jurors who are not javascript intermediate developers are advised to stake into this court only if they know the main frameworks/libraries (ExpressJs, React, EthersJs…) and be comfortable with testing, APIs or languages to interact with databases.", - "court": 27, - "uri": "/ipfs/Qmaf4NzAvyVa4biu7MwaGTTwCe46XVSdBa3t3Uu2soFToz" - }, - { - "name": "Corte de Curación en Español", - "purpose": "En esta corte, los miembros del jurado resuelven microtareas relacionadas con la curación o la moderación de contenido, como para redes sociales, cuando los requisitos son relativamente sencillos. Los casos de mayor esfuerzo, que requieren la aplicación de reglas con mayores matices, deben presentarse en otras cortes, pero pueden llegar a este tribunal en caso de apelación.", - "rules": "", - "requiredSkills": "Este tribunal requiere un nivel avanzado de español. Los miembros del jurado deben poder leer la evidencia y proporcionar una justificación adecuada en español sobre una amplia gama de temas.", - "court": 28, - "uri": "/ipfs/QmWGwXsDrFzb26pXM7dvAHSLjvM4p1DUuDT3FtVX7J1jtt" - }, - { - "name": "Corte de Disputas de Consumo y Vecindad", - "purpose": "Esta corte está destinada a resolver una amplia variedad de disputas de complejidad baja a moderada, principalmente de carácter civil y comercial. La misma actúa como tribunal subsidiario para los casos en los que no exista otra corte más especializada o aplicable. Su alcance incluye, pero no se limita a:\n- Conflictos contractuales.\n- Reclamos por daños y perjuicios.\n- Reclamos de defensa del consumidor entre usuarios y empresas.", - "rules": "", - "requiredSkills": "- Familiaridad con los [derechos básicos del consumidor](https://buenosaires.gob.ar/principales-derechos-de-los-consumidores).\n- Comprensión de las prácticas comunes en entornos digitales y descentralizados.\n- Capacidad para evaluar de manera crítica y objetiva la autenticidad y relevancia de las pruebas presentadas.", - "court": 29, - "uri": "/ipfs/Qmczrn2DgdKGnacdvKRYwCk7JkeyTCokdqQycWdetYrxGC" - }, - { - "name": "Oracle", - "purpose": "The Oracle Court is designed to resolve disputes related to reporting real-world events, including but not limited to those originating from prediction markets.", - "rules": "The following rules are subsidiary and will apply only if no contrary provisions are outlined in the primary document or other rules or sources relevant to resolving the specific question. In such cases, jurors should adhere to these standard guidelines for resolution.\n### Refuse to Arbitrate\n\nThe following questions must resolve as \"Refuse to Arbitrate\":\n\n**1. Invalid answers:** Questions in which none of the answers are valid.\n\n*Refuse to Arbitrate: A Prediction Market question: \"Which movie will win the Best Picture award at the 2024 Oscars Academy Awards?\" with outcomes \"Barbie\" and \"Poor Things\" (the actual winner was \"Oppenheimer\").*\n\n**2. Multiple outcomes:** Questions in which multiple outcomes are valid, unless the question allows multiple correct answers. In a multiple choice question in which only one correct answer is allowed, the fact that multiple outcomes could be valid at the same time does not make the question invalid if only one of those outcomes occurs.\n\n*Valid:​ A Prediction Market multiple choice question that allows more than one answer: \"What team will reach the semi-finals of Copa America 2021?\" with answers \"Brazil,\" \"Argentina,\" \"Uruguay,\" and \"Colombia\" (all of them except Uruguay reached the semi-finals).*\n\n*Refuse to Arbitrate: A Prediction Market multiple choice question in which only one correct answer is allowed: \"Who will be the Time person of the year 1937?\" with answers \"Chiang Kai-shek\" and \"Soong Mei-ling\" (they got the prize jointly).*\n\n**3. Prohibited questions:** Questions that directly incentivize immoral violent actions (such as murder, rape or unjust imprisonment) which could likely be performed by any participant.\n\n*Refuse to Arbitrate: A Prediction Market question: Will Donald Trump be alive on 01/12/2024? (Anyone could bet on \"No\" and kill him for a guaranteed profit. Anyone could bet on \"Yes\" to effectively put a bounty on his head).*\n\n*Refuse to Arbitrate: A Prediction Market question: Will Hera be a victim of swatting in 2024? (Anyone could falsely call the emergency services on him in order to win the bet)*\n\nThis must not prevent questions:\n\n* Whose topics are violent events not caused by human beings.\n\n*Valid:​ A Prediction Market question: How many people will die from COVID19 in 2024? (Viruses don't use prediction markets).*\n\n* Whose main source of uncertainty is not related to a potential violent action.\n\n*Valid:​ A Prediction Market question: Will Trump win the 2020 US presidential election? (The main source of uncertainty is the vote of US citizens, not a potential murder of a presidential candidate).*\n\n* Which could give an incentive only to specific participants to commit an immoral violent action, but are in practice unlikely.\n\n*Valid:​ A Prediction Market question: Will the US be engaged in a military conflict with a UN member state in 2024? (It's unlikely for the US to declare war in order to win a bet on this market).*\n\n*Valid:​ Will Derek Chauvin go to jail for the murder of George Flyod? (It's unlikely that the jurors would collude to make a wrong verdict in order to win this market).*\n\n### Default assumptions\n\nUnless stated otherwise, the following assumptions must be made:\n\n**4. Entities:** Entities are assumed to reference the most obvious entity with that name, taking the context of the question into account.\n\n*Example: A Prediction Market question: \"Will Michael Jordan receive the 2021 Turing award?\" refers to the computer scientist Michael I. Jordan whereas \"How many points will Michael Jordan score in the FIBA Americas Championship?\" refers to Michael J. Jordan, the basketball player.*\n\n**5. Units:** In case units are omitted, they are assumed to be the units which are the most often used in this particular situation.\n\n*Example: A Prediction Market question: \"Will a NFT be sold for more than one million in 2021?\" will be interpreted as \"Will a NFT be sold for more than 1,000,000 USD in 2021?\".*\n\n**6. Rounding rule:** If no specific rounding method is given, values are to be rounded to the nearest proposed value, unit or range. Unless otherwise stated, roundings are done middle toward 0. If no proposed rule, value, or unit is provided, the value shall default to the most commonly used standard in the specific context.\n\n*Example: In a Prediction Market question with outcomes -100, 0 and 100. 77->100, 50->0, -50 -> 0.*\n\n*Example: In a Prediction Market question with outcomes A: 0-2, B: 3-5 and C: 6+. 1->A, 8->C, 5.5->B.*\n\n*Example: In the Prediction Market question \"What percentage of the popular vote will Joe Biden receive in the 2020 United States Presidential Election?\". If Biden received 51.305859559% of the vote, the correct answer is 51% (rounding to the nearest whole percent).*\n\n*Example: In the Prediction Market question \"What percentage of the popular vote will Joe Biden receive in the 2020 United States Presidential Election? (2 decimals)\". If Biden received 51.305859559% of the vote, the correct answer is 51.31%.*\n\n### Resolving unclear questions\n\nIn general, if the question does not break a rule of the Refuse to Arbitrate section, reasonable efforts should be made to determine its outcome even if the question is not 100% technically perfect, and the following rules must be applied:\n\n**7. Objective interpretation:** Questions must be interpreted according to their context, as any average reasonable person would.\n\n*Example: \"Will there be more than ten thousand deaths caused by Coronavirus in the United States in 2024?\" should be interpreted as referring to COVID-19, and not other types of Coronavirus.*\n\n**8. Sources of truth:** If the question doesn't mention a specific source, the most credible outcome must be reported. In order to determine the credibility of an outcome, the quantity of sources and their credibility are to be taken into account. Credibility of sources and of outcomes must be assessed according to facts, not unproven beliefs.\n\n*Example: \"Will extraterrestrial lifeforms visit planet earth?\" will resolve to No, unless a number of credible sources announce it, despite some people reporting having experienced such encounters.*\n\n*Example: \"How many people will die of COVID-19 in 2024?\" should be answered according to numbers reported by renowned health organisations and not according to some public figures claiming COVID-19 to be a hoax.*\n\n**9. Equal interpretations:** If a question can have different interpretations, but all those interpretations lead to the same outcome, this outcome must be reported. If no interpretation is clearly more reasonable than the others, jurors must vote Refuse to Arbitrate.\n\n*Example: A Prediction Market question: \"Which party will win the October 2012 Czeck elections?\" Should be reported as \"Czech Social Democratic Party\". Even if there were both senatorial and regional elections at the same date and the election the question refers to is ambiguous, the \"Czech Social Democratic Party\" won both of them.*\n\n*Example: In a Prediction Market question: \"Which party will win the October 2015 Czech elections?\" jurors should vote Refuse to Arbitrate because \"Christian and Democratic Union – Czechoslovak People's Party\" won the senatorial election but \"ANO 2011\" won the regional ones.*\n\n**10. Precision in numerical values:** When the answer to a question is a numerical value and the exact value is uncertain, the first reported value that is reasonable based on common approximations must be accepted.\n\n*Example: If in a Prediction Market question, \"What will be the global potato production in tons for the year 2024?\", the first answer is 374,000,000, this answer should be accepted if the estimates provided range between 374 million and 375 million tons.*", - "requiredSkills": "Jurors in the Oracle Court should possess:\n- **Analytical Skills**: Ability to objectively assess a wide range of real-world event data, statistics, and sources, with precision and critical thinking.\n- **Understanding of Prediction Markets**: Familiarity with how prediction markets function.", - "court": 30, - "uri": "/ipfs/QmZqV3TJNZtYTZ74fcVTNT5uEwrsv2aDkGGVB5XUS32VD9" - }, - { - "name": "Automated Curation", - "purpose": "The Automated Curation Court is designed to handle micro-tasks and cases requiring fast and near-instant resolution. These include, but are not limited to, content moderation, gaming disputes, automated data curation, and similar use cases. AI agents capable of rapid decision-making are better suited for this court's short resolution time.", - "rules": "", - "requiredSkills": "AI agents participating as jurors of this court must be capable of:\n- Data Processing Efficiency: Handling high volumes of disputes in near real-time without compromising accuracy.\n- Kleros Rules Compliance: analyzing all evidence presented and ruling in accordance with Kleros General Court Policy, this Automated Curation Court Policy, and the case’s Primary Document.\n- Temporal Awareness: Identifying the moment of relevant events in a dispute, which may be crucial for applying the General Court’s Policy. This includes understanding the state of the world at the time the dispute was created, recognizing the exact time a piece of evidence was submitted, understanding the applicable court policies and arbitrable application primary documents that existed at the time of the dispute’s creation, and assessing whether a piece of evidence was submitted after the end of the evidence period of the initial round of the dispute.", - "court": 31, - "uri": "/ipfs/QmV4TYUwUFgpMMKfWgDQjBtC5Dn5cRGraDnVatccSb6LMx" - } -] diff --git a/contracts/config/policies.v2.testnet.json b/contracts/config/policies.v2.testnet.json deleted file mode 100644 index 1fd7918e2..000000000 --- a/contracts/config/policies.v2.testnet.json +++ /dev/null @@ -1,41 +0,0 @@ -[ - { - "name": "General Court", - "purpose": "The General court exists as the top court in the hierarchy.\n\nAll appeals made in subcourts will make their way to the General Court.", - "rules": "- All policies of a court also apply to all of its child subcourts.\n - Jurors should cast their vote with a suitable verification.\n - Jurors should not rule in favor of a side who have engaged in immoral activities (example: rule reject on “revenge porn” images even if they would otherwise fit into the category).\n - “Refuse to arbitrate” should be used for disputes where both sides of the dispute have engaged in activities which are immoral (ex: refuse to rule on an assassination market dispute).\n Immoral activities include: Murder, slavery, rape, violence, theft and perjury.\n - Rulings should be made based on the “state of the world” at the time a dispute was created. (Ex: in a dispute concerning membership of a smart contract on a curated list of “bug free” contracts, jurors should not take into account changes made to the contract after the dispute is raised.) In particular, jurors should base their rulings on court policies and arbitrable application primary documents as they exist at the time of the creation of the dispute, disregarding later modifications.\n - To ensure fairness to jurors who vote at different times within a voting period, jurors should disregard any evidence that is both 1) submitted after the end of the evidence period of the initial round of a dispute AND 2) cannot be reasonably considered to have been readily, publicly available to jurors. Jurors may, however, consider arguments that are submitted later that are based upon existing evidence and/or information which a juror considering the case during the evidence period of the initial round could reasonably have been expected to find themselves. (Ex: a party submits a new photo of a damaged product in an insurance case after the evidence period; this photo should not be considered by jurors. Ex: in a dispute over whether a token satisfies the criteria of a curated list of ERC20 tokens, an argument that reminds jurors of a definitional element of the ERC20 standard is submitted; this is publicly available and can be considered by jurors. Ex: in a dispute over whether a token satisfies a decentralization criterion for an exchange listing, an argument that invokes the distribution of tokens over different Ethereum addresses, as publicly available from sites such as Etherscan, can be considered by jurors.)\n - When considering an appeal of a case that has originated in a lower court, jurors should consider whether 1) evaluating the case requires specialized skills which jurors in the appellate court cannot be expected to have (ex: evaluating the quality of an English to Korean translation when knowledge of Korean is not a requirement of the appellate court) and 2) whether there is evidence that an attack was performed against this case in the lower court (ex: bribes, p+epsilon attacks, 51% attacks, etc). If there is no evidence of an attack AND appellate court jurors cannot be reasonably expected to have the required skills to independently evaluate the case, jurors should vote to uphold the lower court ruling. Evidence related to the presence of attacks on Kleros should be considered by jurors even if it would otherwise violate the above points on evidence admissibility.\n - Jurors should attempt to interpret disputes according to the “spirit of the dispute” unless the arbitrable contract or the policies of the subcourt state otherwise.\n - Jurors should interpret disputes without assuming the existence of gods, spirits or other supernatural beings unless the arbitrable contract or the policies of the subcourt state otherwise.", - "court": 1, - "uri": "/ipfs/QmRDYF4su41noCb447vp9iMicCYfT2a2eXg4wPC3DVR58b" - }, - { - "name": "Curation", - "purpose": "In this court, jurors will solve micro-tasks related to curation or content moderation, such as for social media, when requirements for inclusion are relatively straightforward. Higher effort cases, requiring application of more nuanced rules should be placed in other courts but might arrive in this court upon appeal.", - "rules": "", - "requiredSkills": "No particular skills are required.", - "court": 2, - "uri": "/ipfs/QmPpey7rFbPi25Djcb4ppcGaxR4pojLgpGW2jhUvKxvE5q" - }, - { - "name": "English Language", - "purpose": "In this court, jurors will solve disputes involving quality of written content. This includes grammar and text logic.\n\n**Example**\n\n - Contractor utilizes poor grammar in a sponsored article which doesn’t meet the standards as agreed in the contract.", - "rules": "- If the disputed content is of significant size (> 10 000 words), parties in the dispute should point out specific parts of the content which are being disputed. Otherwise, jurors should refuse to arbitrate.\n\n- All variations of English (UK, US, Australia, etc) are to be accepted unless a target audience is specifically mentioned in the contract.", - "requiredSkills": "This court requires an advanced level of English. Jurors who are not native English speakers are advised to stake into this court only if they have C1+ level of English.\n\nThe following tests evaluates a C1 level: Cambridge Advanced (CAE), BEC Higher, BULATS score 75+, CLB/CELPIP 8+, CAEL 70+, IELTS level 7, TOEFL 110+, TOEIC score 880+.", - "court": 3, - "uri": "/ipfs/QmcMU8hG1UsgEPVykcZFTefeizBux8QPunZAXXTv7KF5B8" - }, - { - "name": "Corte de Disputas de Consumo y Vecindad", - "purpose": "Esta corte está destinada a resolver una amplia variedad de disputas de complejidad baja a moderada, principalmente de carácter civil y comercial. La misma actúa como tribunal subsidiario para los casos en los que no exista otra corte más especializada o aplicable. Su alcance incluye, pero no se limita a:\n- Conflictos contractuales.\n- Reclamos por daños y perjuicios.\n- Reclamos de defensa del consumidor entre usuarios y empresas.", - "rules": "", - "requiredSkills": "- Familiaridad con los [derechos básicos del consumidor](https://buenosaires.gob.ar/principales-derechos-de-los-consumidores).\n- Comprensión de las prácticas comunes en entornos digitales y descentralizados.\n- Capacidad para evaluar de manera crítica y objetiva la autenticidad y relevancia de las pruebas presentadas.", - "court": 4, - "uri": "/ipfs/QmdfPa7UZxc7iVquQWiTmmRG3n6RSkwN16aXFeK7XyLvjr" - }, - { - "name": "Oracle", - "purpose": "The Oracle Court is designed to resolve disputes related to reporting real-world events, including but not limited to those originating from prediction markets.", - "rules": "The following rules are subsidiary and will apply only if no contrary provisions are outlined in the primary document or other rules or sources relevant to resolving the specific question. In such cases, jurors should adhere to these standard guidelines for resolution.\n### Refuse to Arbitrate\n\nThe following questions must resolve as \"Refuse to Arbitrate\":\n\n**1. Invalid answers:** Questions in which none of the answers are valid.\n\n*Refuse to Arbitrate: A Prediction Market question: \"Which movie will win the Best Picture award at the 2024 Oscars Academy Awards?\" with outcomes \"Barbie\" and \"Poor Things\" (the actual winner was \"Oppenheimer\").*\n\n**2. Multiple outcomes:** Questions in which multiple outcomes are valid, unless the question allows multiple correct answers. In a multiple choice question in which only one correct answer is allowed, the fact that multiple outcomes could be valid at the same time does not make the question invalid if only one of those outcomes occurs.\n\n*Valid:​ A Prediction Market multiple choice question that allows more than one answer: \"What team will reach the semi-finals of Copa America 2021?\" with answers \"Brazil,\" \"Argentina,\" \"Uruguay,\" and \"Colombia\" (all of them except Uruguay reached the semi-finals).*\n\n*Refuse to Arbitrate: A Prediction Market multiple choice question in which only one correct answer is allowed: \"Who will be the Time person of the year 1937?\" with answers \"Chiang Kai-shek\" and \"Soong Mei-ling\" (they got the prize jointly).*\n\n**3. Prohibited questions:** Questions that directly incentivize immoral violent actions (such as murder, rape or unjust imprisonment) which could likely be performed by any participant.\n\n*Refuse to Arbitrate: A Prediction Market question: Will Donald Trump be alive on 01/12/2024? (Anyone could bet on \"No\" and kill him for a guaranteed profit. Anyone could bet on \"Yes\" to effectively put a bounty on his head).*\n\n*Refuse to Arbitrate: A Prediction Market question: Will Hera be a victim of swatting in 2024? (Anyone could falsely call the emergency services on him in order to win the bet)*\n\nThis must not prevent questions:\n\n* Whose topics are violent events not caused by human beings.\n\n*Valid:​ A Prediction Market question: How many people will die from COVID19 in 2024? (Viruses don't use prediction markets).*\n\n* Whose main source of uncertainty is not related to a potential violent action.\n\n*Valid:​ A Prediction Market question: Will Trump win the 2020 US presidential election? (The main source of uncertainty is the vote of US citizens, not a potential murder of a presidential candidate).*\n\n* Which could give an incentive only to specific participants to commit an immoral violent action, but are in practice unlikely.\n\n*Valid:​ A Prediction Market question: Will the US be engaged in a military conflict with a UN member state in 2024? (It's unlikely for the US to declare war in order to win a bet on this market).*\n\n*Valid:​ Will Derek Chauvin go to jail for the murder of George Flyod? (It's unlikely that the jurors would collude to make a wrong verdict in order to win this market).*\n\n### Default assumptions\n\nUnless stated otherwise, the following assumptions must be made:\n\n**4. Entities:** Entities are assumed to reference the most obvious entity with that name, taking the context of the question into account.\n\n*Example: A Prediction Market question: \"Will Michael Jordan receive the 2021 Turing award?\" refers to the computer scientist Michael I. Jordan whereas \"How many points will Michael Jordan score in the FIBA Americas Championship?\" refers to Michael J. Jordan, the basketball player.*\n\n**5. Units:** In case units are omitted, they are assumed to be the units which are the most often used in this particular situation.\n\n*Example: A Prediction Market question: \"Will a NFT be sold for more than one million in 2021?\" will be interpreted as \"Will a NFT be sold for more than 1,000,000 USD in 2021?\".*\n\n**6. Rounding rule:** If no specific rounding method is given, values are to be rounded to the nearest proposed value, unit or range. Unless otherwise stated, roundings are done middle toward 0. If no proposed rule, value, or unit is provided, the value shall default to the most commonly used standard in the specific context.\n\n*Example: In a Prediction Market question with outcomes -100, 0 and 100. 77->100, 50->0, -50 -> 0.*\n\n*Example: In a Prediction Market question with outcomes A: 0-2, B: 3-5 and C: 6+. 1->A, 8->C, 5.5->B.*\n\n*Example: In the Prediction Market question \"What percentage of the popular vote will Joe Biden receive in the 2020 United States Presidential Election?\". If Biden received 51.305859559% of the vote, the correct answer is 51% (rounding to the nearest whole percent).*\n\n*Example: In the Prediction Market question \"What percentage of the popular vote will Joe Biden receive in the 2020 United States Presidential Election? (2 decimals)\". If Biden received 51.305859559% of the vote, the correct answer is 51.31%.*\n\n### Resolving unclear questions\n\nIn general, if the question does not break a rule of the Refuse to Arbitrate section, reasonable efforts should be made to determine its outcome even if the question is not 100% technically perfect, and the following rules must be applied:\n\n**7. Objective interpretation:** Questions must be interpreted according to their context, as any average reasonable person would.\n\n*Example: \"Will there be more than ten thousand deaths caused by Coronavirus in the United States in 2024?\" should be interpreted as referring to COVID-19, and not other types of Coronavirus.*\n\n**8. Sources of truth:** If the question doesn't mention a specific source, the most credible outcome must be reported. In order to determine the credibility of an outcome, the quantity of sources and their credibility are to be taken into account. Credibility of sources and of outcomes must be assessed according to facts, not unproven beliefs.\n\n*Example: \"Will extraterrestrial lifeforms visit planet earth?\" will resolve to No, unless a number of credible sources announce it, despite some people reporting having experienced such encounters.*\n\n*Example: \"How many people will die of COVID-19 in 2024?\" should be answered according to numbers reported by renowned health organisations and not according to some public figures claiming COVID-19 to be a hoax.*\n\n**9. Equal interpretations:** If a question can have different interpretations, but all those interpretations lead to the same outcome, this outcome must be reported. If no interpretation is clearly more reasonable than the others, jurors must vote Refuse to Arbitrate.\n\n*Example: A Prediction Market question: \"Which party will win the October 2012 Czeck elections?\" Should be reported as \"Czech Social Democratic Party\". Even if there were both senatorial and regional elections at the same date and the election the question refers to is ambiguous, the \"Czech Social Democratic Party\" won both of them.*\n\n*Example: In a Prediction Market question: \"Which party will win the October 2015 Czech elections?\" jurors should vote Refuse to Arbitrate because \"Christian and Democratic Union – Czechoslovak People's Party\" won the senatorial election but \"ANO 2011\" won the regional ones.*\n\n**10. Precision in numerical values:** When the answer to a question is a numerical value and the exact value is uncertain, the first reported value that is reasonable based on common approximations must be accepted.\n\n*Example: If in a Prediction Market question, \"What will be the global potato production in tons for the year 2024?\", the first answer is 374,000,000, this answer should be accepted if the estimates provided range between 374 million and 375 million tons.*", - "requiredSkills": "Jurors in the Oracle Court should possess:\n- **Analytical Skills**: Ability to objectively assess a wide range of real-world event data, statistics, and sources, with precision and critical thinking.\n- **Understanding of Prediction Markets**: Familiarity with how prediction markets function.", - "court": 5, - "uri": "/ipfs/QmT8DAjUbzzEo2e9oPpJSDH2QzswfNeWAsxoDH3zsGrtkH" - } -] diff --git a/contracts/deploy/00-home-chain-arbitration-mainnet.ts b/contracts/deploy/00-home-chain-arbitration-mainnet.ts deleted file mode 100644 index a3d87f51f..000000000 --- a/contracts/deploy/00-home-chain-arbitration-mainnet.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { getContractAddress } from "./utils/getContractAddress"; -import { deployUpgradable } from "./utils/deployUpgradable"; -import { changeCurrencyRate } from "./utils/klerosCoreHelper"; -import { HomeChains, isSkipped, isDevnet, PNK, ETH } from "./utils"; -import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy"; -import { deployERC20AndFaucet, deployERC721 } from "./utils/deployTokens"; -import { DisputeKitClassic, KlerosCore, RNGWithFallback } from "../typechain-types"; - -const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers, deployments, getNamedAccounts, getChainId } = hre; - const { deploy } = deployments; - const { ZeroAddress } = hre.ethers; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - - const pnk = await deployERC20AndFaucet(hre, deployer, "PNK"); - const weth = await deployERC20AndFaucet(hre, deployer, "WETH"); - const nft = await deployERC721(hre, deployer, "Kleros V2 Neo Early User", "KlerosV2NeoEarlyUser"); - - await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true }); - - await deployUpgradable(deployments, "PolicyRegistry", { from: deployer, args: [deployer], log: true }); - - await deployUpgradable(deployments, "EvidenceModule", { from: deployer, args: [deployer], log: true }); - - const classicDisputeKitID = 1; // Classic DK - const disputeKit = await deployUpgradable(deployments, "DisputeKitClassic", { - from: deployer, - args: [deployer, ZeroAddress, weth.target, classicDisputeKitID], - log: true, - }); - - let klerosCoreAddress = await deployments.getOrNull("KlerosCore").then((deployment) => deployment?.address); - if (!klerosCoreAddress) { - const nonce = await ethers.provider.getTransactionCount(deployer); - klerosCoreAddress = getContractAddress(deployer, nonce + 3); // deployed on the 4th tx (nonce+3): SortitionModule Impl tx, SortitionModule Proxy tx, KlerosCore Impl tx, KlerosCore Proxy tx - console.log("calculated future KlerosCore address for nonce %d: %s", nonce + 3, klerosCoreAddress); - } - const devnet = isDevnet(hre.network); - const minStakingTime = devnet ? 180 : 1800; - const maxFreezingTime = devnet ? 600 : 1800; - const rngWithFallback = await ethers.getContract("RNGWithFallback"); - const maxStakePerJuror = PNK(2_000); - const maxTotalStaked = PNK(2_000_000); - const sortitionModule = await deployUpgradable(deployments, "SortitionModule", { - from: deployer, - args: [ - deployer, - klerosCoreAddress, - minStakingTime, - maxFreezingTime, - rngWithFallback.target, - maxStakePerJuror, - maxTotalStaked, - ], - log: true, - }); // nonce (implementation), nonce+1 (proxy) - - const minStake = PNK(200); - const alpha = 10000; - const feeForJuror = ETH(0.1); - const jurorsForCourtJump = 256; - const klerosCore = await deployUpgradable(deployments, "KlerosCore", { - from: deployer, - args: [ - deployer, - deployer, - pnk.target, - ZeroAddress, // jurorProsecutionModule is not implemented yet - disputeKit.address, - false, - [minStake, alpha, feeForJuror, jurorsForCourtJump], - [0, 0, 0, 10], // evidencePeriod, commitPeriod, votePeriod, appealPeriod - ethers.toBeHex(5), // Extra data for sortition module will return the default value of K - sortitionModule.address, - weth.target, - nft.target, - ], - log: true, - }); // nonce+2 (implementation), nonce+3 (proxy) - - // disputeKit.changeCore() only if necessary - const disputeKitContract = await hre.ethers.getContract("DisputeKitClassic"); - const currentCore = await disputeKitContract.core(); - if (currentCore !== klerosCore.address) { - console.log(`disputeKit.changeCore(${klerosCore.address})`); - await disputeKitContract.changeCore(klerosCore.address); - } - - // rngWithFallback.changeConsumer() only if necessary - const rngConsumer = await rngWithFallback.consumer(); - if (rngConsumer !== sortitionModule.address) { - console.log(`rngWithFallback.changeConsumer(${sortitionModule.address})`); - await rngWithFallback.changeConsumer(sortitionModule.address); - } - - const core = await hre.ethers.getContract("KlerosCore"); - try { - await changeCurrencyRate(core, await weth.getAddress(), true, 1, 1); - } catch (e) { - console.error("failed to change currency rates:", e); - } - - const disputeTemplateRegistry = await getContractOrDeployUpgradable(hre, "DisputeTemplateRegistry", { - from: deployer, - args: [deployer], - log: true, - }); - - const resolver = await deploy("DisputeResolver", { - from: deployer, - args: [core.target, disputeTemplateRegistry.target], - log: true, - }); - console.log(`core.changeArbitrableWhitelistEnabled(true)`); - await core.changeArbitrableWhitelistEnabled(true); - console.log(`core.changeArbitrableWhitelist(${resolver.address}, true)`); - await core.changeArbitrableWhitelist(resolver.address, true); - - // Extra dispute kits - const disputeKitShutter = await deployUpgradable(deployments, "DisputeKitShutter", { - from: deployer, - args: [deployer, core.target, weth.target, classicDisputeKitID], - log: true, - }); - await core.addNewDisputeKit(disputeKitShutter.address); - const disputeKitShutterID = (await core.getDisputeKitsLength()) - 1n; - - const disputeKitGated = await deployUpgradable(deployments, "DisputeKitGated", { - from: deployer, - args: [deployer, core.target, weth.target, classicDisputeKitID], - log: true, - }); - await core.addNewDisputeKit(disputeKitGated.address); - const disputeKitGatedID = (await core.getDisputeKitsLength()) - 1n; - - const disputeKitGatedShutter = await deployUpgradable(deployments, "DisputeKitGatedShutter", { - from: deployer, - args: [deployer, core.target, weth.target, disputeKitShutterID], // Does not jump to DKClassic - log: true, - }); - await core.addNewDisputeKit(disputeKitGatedShutter.address); - const disputeKitGatedShutterID = (await core.getDisputeKitsLength()) - 1n; - - // Snapshot proxy - await deploy("KlerosCoreSnapshotProxy", { - from: deployer, - args: [deployer, core.target], - log: true, - }); -}; - -deployArbitration.tags = ["ArbitrationMainnet"]; -deployArbitration.dependencies = ["ChainlinkRNG"]; -deployArbitration.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default deployArbitration; diff --git a/contracts/deploy/00-home-chain-arbitration-ruler.ts b/contracts/deploy/00-home-chain-arbitration-ruler.ts deleted file mode 100644 index a9077dbe6..000000000 --- a/contracts/deploy/00-home-chain-arbitration-ruler.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { deployUpgradable } from "./utils/deployUpgradable"; -import { HomeChains, isSkipped } from "./utils"; -import { deployERC20AndFaucet } from "./utils/deployTokens"; -import { KlerosCoreRuler } from "../typechain-types"; -import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy"; -import { changeCurrencyRate } from "./utils/klerosCoreHelper"; - -const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy } = deployments; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - - const pnk = await deployERC20AndFaucet(hre, deployer, "PNK"); - const dai = await deployERC20AndFaucet(hre, deployer, "DAI"); - const weth = await deployERC20AndFaucet(hre, deployer, "WETH"); - - await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true }); - - const minStake = 0; - const alpha = 10000; - const feeForJuror = 10n ** 17n; - const jurorsForCourtJump = 16; - await deployUpgradable(deployments, "KlerosCoreRuler", { - from: deployer, - args: [ - deployer, // owner - pnk.target, - [minStake, alpha, feeForJuror, jurorsForCourtJump], - ], - log: true, - }); - const core = await hre.ethers.getContract("KlerosCoreRuler"); - - try { - await changeCurrencyRate(core, await pnk.getAddress(), true, 12225583, 12); - await changeCurrencyRate(core, await dai.getAddress(), true, 60327783, 11); - await changeCurrencyRate(core, await weth.getAddress(), true, 1, 1); - } catch (e) { - console.error("failed to change currency rates:", e); - } - - const disputeTemplateRegistry = await getContractOrDeployUpgradable(hre, "DisputeTemplateRegistry", { - from: deployer, - args: [deployer], - log: true, - }); - - await deploy("DisputeResolverRuler", { - from: deployer, - args: [core.target, disputeTemplateRegistry.target], - log: true, - }); -}; - -deployArbitration.tags = ["ArbitrationRuler"]; -deployArbitration.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default deployArbitration; diff --git a/contracts/deploy/00-home-chain-arbitration-university.ts b/contracts/deploy/00-home-chain-arbitration-university.ts deleted file mode 100644 index 2aa5f747b..000000000 --- a/contracts/deploy/00-home-chain-arbitration-university.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { getContractAddress } from "./utils/getContractAddress"; -import { deployUpgradable } from "./utils/deployUpgradable"; -import { changeCurrencyRate } from "./utils/klerosCoreHelper"; -import { ETH, HomeChains, PNK, isSkipped } from "./utils"; -import { deployERC20AndFaucet } from "./utils/deployTokens"; -import { DisputeKitClassic, KlerosCoreUniversity } from "../typechain-types"; -import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy"; - -const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers, deployments, getNamedAccounts, getChainId } = hre; - const { deploy } = deployments; - const { ZeroAddress } = hre.ethers; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - - const pnk = await deployERC20AndFaucet(hre, deployer, "PNK"); - const dai = await deployERC20AndFaucet(hre, deployer, "DAI"); - const weth = await deployERC20AndFaucet(hre, deployer, "WETH"); - - await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true }); - - const disputeKit = await deployUpgradable(deployments, "DisputeKitClassicUniversity", { - from: deployer, - contract: "DisputeKitClassic", - args: [deployer, ZeroAddress, weth.target], - log: true, - }); - - let klerosCoreAddress = await deployments.getOrNull("KlerosCoreUniversity").then((deployment) => deployment?.address); - if (!klerosCoreAddress) { - const nonce = await ethers.provider.getTransactionCount(deployer); - klerosCoreAddress = getContractAddress(deployer, nonce + 3); // deployed on the 4th tx (nonce+3): SortitionModule Impl tx, SortitionModule Proxy tx, KlerosCore Impl tx, KlerosCore Proxy tx - console.log("calculated future KlerosCoreUniversity address for nonce %d: %s", nonce + 3, klerosCoreAddress); - } - const sortitionModule = await deployUpgradable(deployments, "SortitionModuleUniversity", { - from: deployer, - args: [deployer, klerosCoreAddress], - log: true, - }); // nonce (implementation), nonce+1 (proxy) - - const minStake = PNK(200); - const alpha = 10000; - const feeForJuror = ETH(0.1); - const jurorsForCourtJump = 256; - const klerosCore = await deployUpgradable(deployments, "KlerosCoreUniversity", { - from: deployer, - args: [ - deployer, // owner - deployer, // instructor - pnk.target, - ZeroAddress, // KlerosCore is configured later - disputeKit.address, - false, - [minStake, alpha, feeForJuror, jurorsForCourtJump], - [0, 0, 0, 10], // evidencePeriod, commitPeriod, votePeriod, appealPeriod - sortitionModule.address, - ], - log: true, - }); // nonce+2 (implementation), nonce+3 (proxy) - - // disputeKit.changeCore() only if necessary - const disputeKitContract = await ethers.getContract("DisputeKitClassicUniversity"); - const currentCore = await disputeKitContract.core(); - if (currentCore !== klerosCore.address) { - console.log(`disputeKit.changeCore(${klerosCore.address})`); - await disputeKitContract.changeCore(klerosCore.address); - } - - const core = await hre.ethers.getContract("KlerosCoreUniversity"); - try { - await changeCurrencyRate(core, await pnk.getAddress(), true, 12225583, 12); - await changeCurrencyRate(core, await dai.getAddress(), true, 60327783, 11); - await changeCurrencyRate(core, await weth.getAddress(), true, 1, 1); - } catch (e) { - console.error("Failed to change currency rates for token, with error:", e); - } - - const disputeTemplateRegistry = await getContractOrDeployUpgradable(hre, "DisputeTemplateRegistry", { - from: deployer, - args: [deployer], - log: true, - }); - - await deploy("DisputeResolverUniversity", { - from: deployer, - contract: "DisputeResolver", - args: [core.target, disputeTemplateRegistry.target], - log: true, - }); -}; - -deployArbitration.tags = ["ArbitrationUniversity"]; -deployArbitration.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default deployArbitration; diff --git a/contracts/deploy/00-home-chain-arbitration.ts b/contracts/deploy/00-home-chain-arbitration.ts deleted file mode 100644 index 1c4c29695..000000000 --- a/contracts/deploy/00-home-chain-arbitration.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { getContractAddress } from "./utils/getContractAddress"; -import { deployUpgradable } from "./utils/deployUpgradable"; -import { changeCurrencyRate } from "./utils/klerosCoreHelper"; -import { HomeChains, isSkipped, isDevnet, PNK, ETH, Courts } from "./utils"; -import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy"; -import { deployERC20AndFaucet } from "./utils/deployTokens"; -import { DisputeKitClassic, KlerosCore, RNGWithFallback } from "../typechain-types"; - -const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers, deployments, getNamedAccounts, getChainId } = hre; - const { deploy } = deployments; - const { ZeroAddress } = hre.ethers; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - - const pnk = await deployERC20AndFaucet(hre, deployer, "PNK"); - const dai = await deployERC20AndFaucet(hre, deployer, "DAI"); - const weth = await deployERC20AndFaucet(hre, deployer, "WETH"); - - await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true }); - - await getContractOrDeployUpgradable(hre, "PolicyRegistry", { from: deployer, args: [deployer], log: true }); - - await getContractOrDeployUpgradable(hre, "EvidenceModule", { from: deployer, args: [deployer], log: true }); - - await deployUpgradable(deployments, "DisputeTemplateRegistry", { - from: deployer, - args: [deployer], - log: true, - }); - - const classicDisputeKitID = 1; // Classic DK - const disputeKit = await deployUpgradable(deployments, "DisputeKitClassic", { - from: deployer, - args: [deployer, ZeroAddress, weth.target, classicDisputeKitID], - log: true, - }); - - let klerosCoreAddress = await deployments.getOrNull("KlerosCore").then((deployment) => deployment?.address); - if (!klerosCoreAddress) { - const nonce = await ethers.provider.getTransactionCount(deployer); - klerosCoreAddress = getContractAddress(deployer, nonce + 3); // deployed on the 4th tx (nonce+3): SortitionModule Impl tx, SortitionModule Proxy tx, KlerosCore Impl tx, KlerosCore Proxy tx - console.log("calculated future KlerosCore address for nonce %d: %s", nonce + 3, klerosCoreAddress); - } - const devnet = isDevnet(hre.network); - const minStakingTime = devnet ? 180 : 1800; - const maxFreezingTime = devnet ? 600 : 1800; - const rngWithFallback = await ethers.getContract("RNGWithFallback"); - const sortitionModule = await deployUpgradable(deployments, "SortitionModule", { - from: deployer, - args: [ - deployer, - klerosCoreAddress, - minStakingTime, - maxFreezingTime, - rngWithFallback.target, - ethers.MaxUint256, // maxStakePerJuror - ethers.MaxUint256, // maxTotalStaked - ], - log: true, - }); // nonce (implementation), nonce+1 (proxy) - - const minStake = PNK(200); - const alpha = 10000; - const feeForJuror = ETH(0.1); - const jurorsForCourtJump = 256; - const klerosCore = await deployUpgradable(deployments, "KlerosCore", { - from: deployer, - args: [ - deployer, - deployer, - pnk.target, - ZeroAddress, // KlerosCore is configured later - disputeKit.address, - false, - [minStake, alpha, feeForJuror, jurorsForCourtJump], - [0, 0, 0, 10], // evidencePeriod, commitPeriod, votePeriod, appealPeriod - ethers.toBeHex(5), // Extra data for sortition module will return the default value of K - sortitionModule.address, - weth.target, - ZeroAddress, // jurorNft - ], - log: true, - }); // nonce+2 (implementation), nonce+3 (proxy) - - // disputeKit.changeCore() only if necessary - const disputeKitContract = await ethers.getContract("DisputeKitClassic"); - const currentCore = await disputeKitContract.core(); - if (currentCore !== klerosCore.address) { - console.log(`disputeKit.changeCore(${klerosCore.address})`); - await disputeKitContract.changeCore(klerosCore.address); - } - - // rngWithFallback.changeConsumer() only if necessary - const rngConsumer = await rngWithFallback.consumer(); - if (rngConsumer !== sortitionModule.address) { - console.log(`rngWithFallback.changeConsumer(${sortitionModule.address})`); - await rngWithFallback.changeConsumer(sortitionModule.address); - } - - const core = await hre.ethers.getContract("KlerosCore"); - try { - await changeCurrencyRate(core, await pnk.getAddress(), true, 12225583, 12); - await changeCurrencyRate(core, await dai.getAddress(), true, 60327783, 11); - await changeCurrencyRate(core, await weth.getAddress(), true, 1, 1); - } catch (e) { - console.error("failed to change currency rates:", e); - } - - // Extra dispute kits - const disputeKitShutter = await deployUpgradable(deployments, "DisputeKitShutter", { - from: deployer, - args: [deployer, core.target, weth.target, classicDisputeKitID], - log: true, - }); - await core.addNewDisputeKit(disputeKitShutter.address); - const disputeKitShutterID = (await core.getDisputeKitsLength()) - 1n; - await core.enableDisputeKits(Courts.GENERAL, [disputeKitShutterID], true); // enable disputeKitShutter on the General Court - - const disputeKitGated = await deployUpgradable(deployments, "DisputeKitGated", { - from: deployer, - args: [deployer, core.target, weth.target, classicDisputeKitID], - log: true, - }); - await core.addNewDisputeKit(disputeKitGated.address); - const disputeKitGatedID = (await core.getDisputeKitsLength()) - 1n; - await core.enableDisputeKits(Courts.GENERAL, [disputeKitGatedID], true); // enable disputeKitGated on the General Court - - const disputeKitGatedShutter = await deployUpgradable(deployments, "DisputeKitGatedShutter", { - from: deployer, - args: [deployer, core.target, weth.target, disputeKitShutterID], // Does not jump to DKClassic - log: true, - }); - await core.addNewDisputeKit(disputeKitGatedShutter.address); - const disputeKitGatedShutterID = (await core.getDisputeKitsLength()) - 1n; - await core.enableDisputeKits(Courts.GENERAL, [disputeKitGatedShutterID], true); // enable disputeKitGatedShutter on the General Court - - // Snapshot proxy - await deploy("KlerosCoreSnapshotProxy", { - from: deployer, - args: [deployer, core.target], - log: true, - }); -}; - -deployArbitration.tags = ["Arbitration"]; -deployArbitration.dependencies = ["ChainlinkRNG"]; -deployArbitration.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default deployArbitration; diff --git a/contracts/deploy/00-home-chain-resolver.ts b/contracts/deploy/00-home-chain-resolver.ts deleted file mode 100644 index 64d3431f6..000000000 --- a/contracts/deploy/00-home-chain-resolver.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { HomeChains, isSkipped } from "./utils"; -import { getContractOrDeploy } from "./utils/getContractOrDeploy"; - -const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy } = deployments; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - - const klerosCore = await deployments.get("KlerosCore"); - const disputeTemplateRegistry = await deployments.get("DisputeTemplateRegistry"); - - await getContractOrDeploy(hre, "DisputeResolver", { - from: deployer, - args: [klerosCore.address, disputeTemplateRegistry.address], - log: true, - }); -}; - -deployArbitration.tags = ["Resolver"]; -deployArbitration.dependencies = ["Arbitration"]; -deployArbitration.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default deployArbitration; diff --git a/contracts/deploy/00-rng-chainlink.ts b/contracts/deploy/00-rng-chainlink.ts deleted file mode 100644 index 78a1c5e87..000000000 --- a/contracts/deploy/00-rng-chainlink.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { HomeChains, isSkipped } from "./utils"; -import { getContractOrDeploy } from "./utils/getContractOrDeploy"; -import { RNGWithFallback } from "../typechain-types"; - -const deployRng: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { getNamedAccounts, getChainId, ethers } = hre; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()) as unknown as HomeChains; // Checked at runtime by skip() - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - - const KEY_HASHES = { - // https://docs.chain.link/vrf/v2-5/supported-networks#arbitrum-mainnet - [HomeChains.ARBITRUM_ONE]: { - 2: "0x9e9e46732b32662b9adc6f3abdf6c5e926a666d174a4d6b8e39c4cca76a38897", - 30: "0x8472ba59cf7134dfe321f4d61a430c4857e8b19cdd5230b09952a92671c24409", - 150: "0xe9f223d7d83ec85c4f78042a4845af3a1c8df7757b4997b815ce4b8d07aca68c", - }, - // https://docs.chain.link/vrf/v2-5/supported-networks#arbitrum-sepolia-testnet - [HomeChains.ARBITRUM_SEPOLIA]: { - 150: "0x1770bdc7eec7771f7ba4ffd640f34260d7f095b79c92d34a5b2551d6f6cfd2be", - }, - [HomeChains.HARDHAT]: { - 0: "0x0000000000000000000000000000000000000000000000000000000000000000", - }, - }; - - const SUBSCRIPTION_ID = { - [HomeChains.ARBITRUM_ONE]: "66240499937595191069677958665918759554657443303079118766000192000140992834352", - [HomeChains.ARBITRUM_SEPOLIA]: "38502597312983100069991953687934627561654236680431968938019951490339399569548", - [HomeChains.HARDHAT]: "0x0000000000000000000000000000000000000000000000000000000000000001", - }; - - function getKeyHash({ gasPrice }: { gasPrice: keyof (typeof KEY_HASHES)[HomeChains.ARBITRUM_ONE] }): string { - const validGasPrices = Object.keys(KEY_HASHES[HomeChains.ARBITRUM_ONE]).map(Number); - if (!validGasPrices.includes(gasPrice)) { - throw new Error(`Invalid gas price ${gasPrice}. Valid values are: ${validGasPrices.join(", ")}`); - } - if (chainId == HomeChains.HARDHAT) return KEY_HASHES[chainId][0]; - if (chainId == HomeChains.ARBITRUM_ONE) return KEY_HASHES[chainId][gasPrice]; - if (chainId == HomeChains.ARBITRUM_SEPOLIA) return KEY_HASHES[chainId][150]; - throw new Error(`Unknown chainId ${chainId}`); - } - - const ChainlinkVRFCoordinator = await getContractOrDeploy(hre, "ChainlinkVRFCoordinator", { - from: deployer, - contract: "ChainlinkVRFCoordinatorV2Mock", - args: [], - log: true, - }); - - const keyHash = getKeyHash({ gasPrice: 30 }); - const subscriptionId = SUBSCRIPTION_ID[chainId]; - const requestConfirmations = 200; // between 1 and 200 L2 blocks - const callbackGasLimit = 100000; - - const oldRng = await ethers.getContractOrNull("ChainlinkRNG"); - if (!oldRng) { - console.log("Register this Chainlink consumer here: http://vrf.chain.link/"); - } - - const rng = await getContractOrDeploy(hre, "ChainlinkRNG", { - from: deployer, - args: [ - deployer, - deployer, // The consumer is configured as the RNGWithFallback later - ChainlinkVRFCoordinator.target, - keyHash, - subscriptionId, - requestConfirmations, - callbackGasLimit, - ], - log: true, - }); - - const fallbackTimeoutSeconds = 30 * 60; // 30 minutes - await getContractOrDeploy(hre, "RNGWithFallback", { - from: deployer, - args: [ - deployer, - deployer, // The consumer is configured as the SortitionModule later - fallbackTimeoutSeconds, - rng.target, - ], - log: true, - }); - - // rng.changeConsumer() only if necessary - const rngWithFallback = await ethers.getContract("RNGWithFallback"); - const rngConsumer = await rng.consumer(); - if (rngConsumer !== rngWithFallback.target) { - console.log(`rng.changeConsumer(${rngWithFallback.target})`); - await rng.changeConsumer(rngWithFallback.target); - } -}; - -deployRng.tags = ["ChainlinkRNG"]; -deployRng.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default deployRng; diff --git a/contracts/deploy/00-rng-randomizer.ts b/contracts/deploy/00-rng-randomizer.ts deleted file mode 100644 index 8413b39f6..000000000 --- a/contracts/deploy/00-rng-randomizer.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { HomeChains, isSkipped } from "./utils"; -import { getContractOrDeploy } from "./utils/getContractOrDeploy"; -import { RNGWithFallback } from "../typechain-types"; - -const deployRng: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { getNamedAccounts, getChainId, ethers } = hre; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()) as unknown as HomeChains; // Checked at runtime by skip() - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - - // Randomizer.ai: https://randomizer.ai/docs#addresses - const randomizerOracle = await getContractOrDeploy(hre, "RandomizerOracle", { - from: deployer, - contract: "RandomizerMock", // The mock is deployed only on the Hardhat network - args: [], - log: true, - }); - - const rng = await getContractOrDeploy(hre, "RandomizerRNG", { - from: deployer, - args: [ - deployer, - deployer, // The consumer is configured as the RNGWithFallback later - randomizerOracle.target, - ], - log: true, - }); - - const fallbackTimeoutSeconds = 30 * 60; // 30 minutes - await getContractOrDeploy(hre, "RNGWithFallback", { - from: deployer, - args: [ - deployer, - deployer, // The consumer is configured as the SortitionModule later - fallbackTimeoutSeconds, - rng.target, - ], - log: true, - }); - - // rng.changeConsumer() only if necessary - const rngWithFallback = await ethers.getContract("RNGWithFallback"); - const rngConsumer = await rng.consumer(); - if (rngConsumer !== rngWithFallback.target) { - console.log(`rng.changeConsumer(${rngWithFallback.target})`); - await rng.changeConsumer(rngWithFallback.target); - } -}; - -deployRng.tags = ["RandomizerRNG"]; -deployRng.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default deployRng; diff --git a/contracts/deploy/01-foreign-gateway-on-ethereum.ts b/contracts/deploy/01-foreign-gateway-on-ethereum.ts deleted file mode 100644 index 4c85a3fdb..000000000 --- a/contracts/deploy/01-foreign-gateway-on-ethereum.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { HardhatRuntimeEnvironment, HttpNetworkConfig } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { getContractAddress } from "./utils/getContractAddress"; -import { KlerosCore__factory } from "../typechain-types"; -import { Courts, ForeignChains, isSkipped } from "./utils"; -import { deployUpgradable } from "./utils/deployUpgradable"; - -const deployForeignGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers, deployments, getNamedAccounts, getChainId, config } = hre; - const { execute } = deployments; - const { zeroPadValue, toBeHex } = ethers; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to chainId %s with deployer %s", chainId, deployer); - - // Hack to predict the deployment address on the home chain. - // TODO: use deterministic deployments - const network = config.networks[hre.network.name]; - const homeNetwork = config.networks[network.companionNetworks.home] as HttpNetworkConfig; - const homeChainProvider = new ethers.JsonRpcProvider(homeNetwork.url); - let nonce = await homeChainProvider.getTransactionCount(deployer); - nonce += 1; // HomeGatewayToEthereum Proxy deploy tx will be the 2nd tx after this on its home network, so we add 1 to the current nonce. - const homeGatewayAddress = getContractAddress(deployer, nonce); - console.log("calculated future HomeGatewayToEthereum address for nonce %d: %s", nonce, homeGatewayAddress); - - const veaOutbox = await deployments.get("VeaOutboxArbToEthDevnet"); - console.log("using VeaOutboxArbToEthDevnet at %s", veaOutbox.address); - - const homeChainId = (await homeChainProvider.getNetwork()).chainId; - const homeChainIdAsBytes32 = zeroPadValue(toBeHex(homeChainId), 32); - await deployUpgradable(deployments, "ForeignGatewayOnEthereum", { - from: deployer, - contract: "ForeignGateway", - args: [deployer, veaOutbox.address, homeChainIdAsBytes32, homeGatewayAddress], - gasLimit: 4000000, - log: true, - }); - - // TODO: disable the gateway until fully initialized with the correct fees OR allow disputeCreators to add funds again if necessary. - const coreDeployment = await hre.companionNetworks.home.deployments.get("KlerosCore"); - const core = await KlerosCore__factory.connect(coreDeployment.address, homeChainProvider); - // TODO: set up the correct fees for the FORKING_COURT - const fee = (await core.courts(Courts.GENERAL)).feeForJuror; - await execute("ForeignGatewayOnEthereum", { from: deployer, log: true }, "changeCourtJurorFee", Courts.GENERAL, fee); - // TODO: set up the correct fees for the lower courts -}; - -deployForeignGateway.tags = ["ForeignGatewayOnEthereum"]; -deployForeignGateway.skip = async ({ network }) => { - return isSkipped(network, !ForeignChains[network.config.chainId ?? 0]); -}; - -export default deployForeignGateway; diff --git a/contracts/deploy/01-foreign-gateway-on-gnosis.ts b/contracts/deploy/01-foreign-gateway-on-gnosis.ts deleted file mode 100644 index e0ab6861f..000000000 --- a/contracts/deploy/01-foreign-gateway-on-gnosis.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { parseUnits } from "ethers"; -import { BigNumber } from "@ethersproject/bignumber"; -import { HardhatRuntimeEnvironment, HttpNetworkConfig } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { getContractAddress } from "./utils/getContractAddress"; -import { KlerosCore__factory } from "../typechain-types"; -import { Courts, ForeignChains, isSkipped } from "./utils"; -import { deployUpgradable } from "./utils/deployUpgradable"; - -const ONE_GWEI = BigNumber.from(parseUnits("1", "gwei")); - -const deployForeignGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers, deployments, getNamedAccounts, getChainId, config } = hre; - const { deploy, execute } = deployments; - const { zeroPadValue, toBeHex } = ethers; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to chainId %s with deployer %s", chainId, deployer); - - // Hack to predict the deployment address on the home chain. - // TODO: use deterministic deployments - const network = config.networks[hre.network.name]; - const homeNetwork = config.networks[network.companionNetworks.home] as HttpNetworkConfig; - const homeChainProvider = new ethers.JsonRpcProvider(homeNetwork.url); - let nonce = await homeChainProvider.getTransactionCount(deployer); - nonce += 1; // HomeGatewayToEthereum Proxy deploy tx will be the 2nd tx after this on its home network, so we add 1 to the current nonce. - const homeGatewayAddress = getContractAddress(deployer, nonce); // HomeGateway deploy tx will be the next tx home network - console.log("calculated future HomeGatewayToEthereum address for nonce %d: %s", nonce, homeGatewayAddress); - - const veaOutbox = await deployments.get("VeaOutboxArbToGnosisDevnet"); - console.log("using VeaOutboxArbToGnosisDevnet at %s", veaOutbox.address); - - const homeChainId = (await homeChainProvider.getNetwork()).chainId; - const homeChainIdAsBytes32 = zeroPadValue(toBeHex(homeChainId), 32); - await deployUpgradable(deployments, "ForeignGatewayOnGnosis", { - from: deployer, - contract: "ForeignGateway", - args: [deployer, veaOutbox.address, homeChainIdAsBytes32, homeGatewayAddress], - maxFeePerGas: ONE_GWEI, - maxPriorityFeePerGas: ONE_GWEI, - log: true, - }); - - // TODO: disable the gateway until fully initialized with the correct fees OR allow disputeCreators to add funds again if necessary. - const coreDeployment = await hre.companionNetworks.home.deployments.get("KlerosCore"); - const core = await KlerosCore__factory.connect(coreDeployment.address, homeChainProvider); - // TODO: set up the correct fees for the FORKING_COURT - const fee = (await core.courts(Courts.GENERAL)).feeForJuror; - await execute("ForeignGatewayOnGnosis", { from: deployer, log: true }, "changeCourtJurorFee", Courts.GENERAL, fee); - // TODO: set up the correct fees for the lower courts -}; - -deployForeignGateway.tags = ["ForeignGatewayOnGnosis"]; -deployForeignGateway.skip = async ({ network }) => { - return isSkipped(network, !ForeignChains[network.config.chainId ?? 0]); -}; - -export default deployForeignGateway; diff --git a/contracts/deploy/02-home-gateway-to-ethereum.ts b/contracts/deploy/02-home-gateway-to-ethereum.ts deleted file mode 100644 index 84cf1550c..000000000 --- a/contracts/deploy/02-home-gateway-to-ethereum.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ethers } from "hardhat"; -import { HardhatChain, HomeChains, isSkipped } from "./utils"; -import { deployUpgradable } from "./utils/deployUpgradable"; - -// TODO: use deterministic deployments - -const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy } = deployments; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to chainId %s with deployer %s", chainId, deployer); - - const veaInbox = await deployments.get("VeaInboxArbToEthDevnet"); - const klerosCore = await deployments.get("KlerosCore"); - - const foreignGateway = await hre.companionNetworks.foreignSepolia.deployments.get("ForeignGatewayOnEthereum"); - const foreignChainId = Number(await hre.companionNetworks.foreignSepolia.getChainId()); - const foreignChainName = await hre.companionNetworks.foreignSepolia.deployments.getNetworkName(); - console.log("using ForeignGateway %s on chainId %s (%s)", foreignGateway.address, foreignChainId, foreignChainName); - - await deployUpgradable(deployments, "HomeGatewayToEthereum", { - from: deployer, - contract: "HomeGateway", - args: [ - deployer, - klerosCore.address, - veaInbox.address, - foreignChainId, - foreignGateway.address, - ethers.ZeroAddress, // feeToken is ETH - ], - log: true, - }); // nonce+0 -}; - -deployHomeGateway.tags = ["HomeGatewayToEthereum"]; -deployHomeGateway.skip = async ({ network }) => { - const chainId = network.config.chainId ?? 0; - return isSkipped(network, !HomeChains[chainId] || HardhatChain[chainId] !== undefined); -}; - -export default deployHomeGateway; diff --git a/contracts/deploy/02-home-gateway-to-gnosis.ts b/contracts/deploy/02-home-gateway-to-gnosis.ts deleted file mode 100644 index c86ec8442..000000000 --- a/contracts/deploy/02-home-gateway-to-gnosis.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { HardhatChain, HomeChains, isSkipped } from "./utils"; -import { deployUpgradable } from "./utils/deployUpgradable"; - -// TODO: use deterministic deployments - -const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy } = deployments; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to chainId %s with deployer %s", chainId, deployer); - - const veaInbox = await deployments.get("VeaInboxArbToGnosisDevnet"); - const klerosCore = await deployments.get("KlerosCore"); - const dai = await deployments.get("DAI"); - - const foreignGateway = await hre.companionNetworks.foreignChiado.deployments.get("ForeignGatewayOnGnosis"); - const foreignChainId = Number(await hre.companionNetworks.foreignChiado.getChainId()); - const foreignChainName = await hre.companionNetworks.foreignChiado.deployments.getNetworkName(); - console.log("using ForeignGateway %s on chainId %s (%s)", foreignGateway.address, foreignChainId, foreignChainName); - - await deployUpgradable(deployments, "HomeGatewayToGnosis", { - from: deployer, - contract: "HomeGateway", - args: [deployer, klerosCore.address, veaInbox.address, foreignChainId, foreignGateway.address, dai.address], - log: true, - }); // nonce+0 -}; - -deployHomeGateway.tags = ["HomeGatewayToGnosis"]; -deployHomeGateway.skip = async ({ network }) => { - const chainId = network.config.chainId ?? 0; - return isSkipped(network, !HomeChains[chainId] || HardhatChain[chainId] !== undefined); -}; - -export default deployHomeGateway; diff --git a/contracts/deploy/03-vea-mock.ts b/contracts/deploy/03-vea-mock.ts deleted file mode 100644 index 2a59bbaa6..000000000 --- a/contracts/deploy/03-vea-mock.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { getContractAddress } from "./utils/getContractAddress"; -import { KlerosCore__factory } from "../typechain-types"; -import disputeTemplate from "../test/fixtures/DisputeTemplate.simple.json"; -import { Courts, HardhatChain, isSkipped } from "./utils"; -import { deployUpgradable } from "./utils/deployUpgradable"; - -// TODO: use deterministic deployments - -const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers, deployments, getNamedAccounts } = hre; - const { deploy, execute } = deployments; - const { zeroPadValue, toBeHex } = ethers; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - console.log("deploying to chainId %s with deployer %s", HardhatChain.HARDHAT, deployer); - - const klerosCore = await deployments.get("KlerosCore"); - - const vea = await deploy("VeaMock", { - from: deployer, - log: true, - }); - - let nonce = await ethers.provider.getTransactionCount(deployer); - nonce += 3; // deployed on the 4th tx (nonce+3): SortitionModule Impl tx, SortitionModule Proxy tx, KlerosCore Impl tx, KlerosCore Proxy tx - const homeGatewayAddress = getContractAddress(deployer, nonce); - console.log("calculated future HomeGatewayToEthereum address for nonce %d: %s", nonce, homeGatewayAddress); - - const homeChainIdAsBytes32 = zeroPadValue(toBeHex(HardhatChain.HARDHAT), 32); - const foreignGateway = await deployUpgradable(deployments, "ForeignGatewayOnEthereum", { - from: deployer, - contract: "ForeignGateway", - args: [deployer, vea.address, homeChainIdAsBytes32, homeGatewayAddress], - gasLimit: 4000000, - log: true, - }); // nonce (implementation), nonce+1 (proxy) - console.log("foreignGateway.address: ", foreignGateway.address); - - await deployUpgradable(deployments, "HomeGatewayToEthereum", { - from: deployer, - contract: "HomeGateway", - args: [ - deployer, - klerosCore.address, - vea.address, - HardhatChain.HARDHAT, - foreignGateway.address, - ethers.ZeroAddress, // feeToken - // Confirm that using ZeroAddress here is intentional and safe for the intended use case. - ], - gasLimit: 4000000, - log: true, - }); // nonce+2 (implementation), nonce+3 (proxy) - - // TODO: disable the gateway until fully initialized with the correct fees OR allow disputeCreators to add funds again if necessary. - const signer = (await hre.ethers.getSigners())[0]; - const core = KlerosCore__factory.connect(klerosCore.address, signer); - // TODO: set up the correct fees for the FORKING_COURT - const fee = (await core.courts(Courts.GENERAL)).feeForJuror; - await execute( - "ForeignGatewayOnEthereum", - { from: deployer, gasLimit: 4000000, log: true }, - "changeCourtJurorFee", - Courts.GENERAL, - fee - ); - // TODO: set up the correct fees for the lower courts - - const disputeTemplateRegistry = await deployUpgradable(deployments, "DisputeTemplateRegistry", { - from: deployer, - args: [deployer], - log: true, - }); - - // TODO: debug why this extraData fails but "0x00" works - // const extraData = - // "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003"; // General court, 3 jurors - const extraData = "0x00"; - await deploy("ArbitrableExample", { - from: deployer, - args: [ - foreignGateway.address, - disputeTemplate, - "disputeTemplateMapping: TODO", - extraData, - disputeTemplateRegistry.address, - ethers.ZeroAddress, - ], - log: true, - }); -}; - -deployHomeGateway.tags = ["VeaMock"]; -deployHomeGateway.skip = async ({ network }) => { - return isSkipped(network, HardhatChain[network.config.chainId ?? 0] === undefined); -}; - -export default deployHomeGateway; diff --git a/contracts/deploy/04-foreign-arbitrable.ts b/contracts/deploy/04-foreign-arbitrable.ts deleted file mode 100644 index 1a773a854..000000000 --- a/contracts/deploy/04-foreign-arbitrable.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { parseUnits } from "ethers"; -import disputeTemplate from "../test/fixtures/DisputeTemplate.simple.json"; -import { ForeignChains, isSkipped } from "./utils"; -import { BigNumber } from "@ethersproject/bignumber"; - -const foreignGatewayArtifactByChain = new Map([ - [ForeignChains.ETHEREUM_MAINNET, "ForeignGatewayOnEthereum"], - [ForeignChains.ETHEREUM_SEPOLIA, "ForeignGatewayOnEthereum"], - [ForeignChains.GNOSIS_MAINNET, "ForeignGatewayOnGnosis"], - [ForeignChains.GNOSIS_CHIADO, "ForeignGatewayOnGnosis"], -]); - -const ONE_GWEI = BigNumber.from(parseUnits("1", "gwei")); - -const deployForeignGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers, deployments, getNamedAccounts, getChainId, config } = hre; - const { deploy, execute } = deployments; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to chainId %s with deployer %s", chainId, deployer); - - const foreignGatewayArtifact = foreignGatewayArtifactByChain.get(chainId) ?? ethers.ZeroAddress; - const foreignGateway = await deployments.get(foreignGatewayArtifact); - console.log("using foreign gateway: %s", foreignGatewayArtifact); - - const extraData = - "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003"; // General court, 3 jurors - const weth = await deployments.get("WETH"); - - const disputeTemplateRegistry = await deploy("DisputeTemplateRegistry", { - from: deployer, - args: [], - log: true, - }); - - await deploy("ArbitrableExample", { - from: deployer, - args: [ - foreignGateway.address, - disputeTemplate, - "disputeTemplateMapping: TODO", - extraData, - disputeTemplateRegistry.address, - weth.address, - ], - log: true, - }); - - await deploy("DisputeResolver", { - from: deployer, - args: [foreignGateway.address, disputeTemplateRegistry.address], - log: true, - maxFeePerGas: ONE_GWEI, - maxPriorityFeePerGas: ONE_GWEI, - }); -}; - -deployForeignGateway.tags = ["ForeignArbitrable"]; -deployForeignGateway.skip = async ({ network }) => { - return isSkipped(network, !ForeignChains[network.config.chainId ?? 0]); -}; - -export default deployForeignGateway; diff --git a/contracts/deploy/04-klerosliquid-to-v2-gnosis.ts b/contracts/deploy/04-klerosliquid-to-v2-gnosis.ts deleted file mode 100644 index 7fd87c946..000000000 --- a/contracts/deploy/04-klerosliquid-to-v2-gnosis.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { parseUnits, parseEther } from "ethers"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import disputeTemplate from "../test/fixtures/DisputeTemplate.simple.json"; -import { ForeignChains, isSkipped } from "./utils"; -import { BigNumber } from "@ethersproject/bignumber"; - -const wrappedPNKByChain = new Map([ - [ForeignChains.GNOSIS_MAINNET, "0xcb3231aBA3b451343e0Fddfc45883c842f223846"], -]); - -const ONE_GWEI = BigNumber.from(parseUnits("1", "gwei")); - -const deployKlerosLiquid: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers, deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to chainId %s with deployer %s", chainId, deployer); - - if (!wrappedPNKByChain.get(chainId)) { - const wPnk = await deploy("WrappedPinakionV2", { - from: deployer, - log: true, - maxFeePerGas: ONE_GWEI, - maxPriorityFeePerGas: ONE_GWEI, - }); - - wrappedPNKByChain.set(ForeignChains[ForeignChains[chainId]], wPnk.address); - - await deploy("WPNKFaucet", { - from: deployer, - contract: "Faucet", - args: [wPnk.address], - log: true, - maxFeePerGas: ONE_GWEI, - maxPriorityFeePerGas: ONE_GWEI, - }); - } - - const wPnkAddress = wrappedPNKByChain.get(ForeignChains[ForeignChains[chainId]]); - const rng = ethers.ZeroAddress; - const minStakingTime = 99999999; - const maxFreezingTime = 0; - const minStake = parseEther("9999999"); - const alpha = 10000; - const feeForJuror = 0; - const jurorsForCourtJump = 9999999; - const sortitionSumTreeK = 3; - const foreignGateway = await deployments.get("ForeignGatewayOnGnosis"); - const extraData = - "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003"; // General court, 3 jurors - const weth = await deployments.get("WETH"); - - console.log("using: \nwPNK at %s, \nForeignGateway at %s", wPnkAddress, foreignGateway.address, weth.address); - - const sortitionSumTreeLibrary = await deploy("SortitionSumTreeFactory", { - from: deployer, - log: true, - maxFeePerGas: ONE_GWEI, - maxPriorityFeePerGas: ONE_GWEI, - }); - - const xKlerosLiquidV2 = await deploy("xKlerosLiquidV2", { - from: deployer, - log: true, - libraries: { - SortitionSumTreeFactory: sortitionSumTreeLibrary.address, - }, - maxFeePerGas: ONE_GWEI, - maxPriorityFeePerGas: ONE_GWEI, - }); - - await execute( - "xKlerosLiquidV2", - { - from: deployer, - log: true, - maxFeePerGas: ONE_GWEI, - maxPriorityFeePerGas: ONE_GWEI, - }, - "initialize", - deployer, - wPnkAddress, - rng, - minStakingTime, - maxFreezingTime, - false, - [minStake, alpha, feeForJuror, jurorsForCourtJump], // minStake, alpha, feeForJuror, jurorsForCourtJump - [0, 0, 0, 0], // evidencePeriod, commitPeriod, votePeriod, appealPeriod - sortitionSumTreeK, - foreignGateway.address - ); - - // const xKlerosLiquidV2 = await deployments.get("xKlerosLiquidV2"); - const disputeTemplateRegistry = await deployments.get("DisputeTemplateRegistry"); - await deploy("ArbitrableExample", { - from: deployer, - args: [ - xKlerosLiquidV2.address, - 0, - disputeTemplate, - "disputeTemplateMapping: TODO", - extraData, - disputeTemplateRegistry.address, - weth.address, - ], - log: true, - maxFeePerGas: ONE_GWEI, - maxPriorityFeePerGas: ONE_GWEI, - }); -}; - -// TODO: mock deployment on the hardhat network -// const xPinakionByChain = new Map([ -// [ForeignChains.GNOSIS_MAINNET, "0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3"], -// [ForeignChains.GNOSIS_CHIADO, "0x00"], -// ]); -// const tokenBridgeByChain = new Map([ -// [ForeignChains.GNOSIS_MAINNET, "0xf6A78083ca3e2a662D6dd1703c939c8aCE2e268d"], -// [ForeignChains.GNOSIS_CHIADO, "0xbb3c86f9918C3C1d83668fA84e79E876d147fFf2"], -// ]); -// const hardhatDeployer = () => { -// // TODO: deploy mocks for xPinakion and tokenBridge for Hardhat network -// // const xPnk = await deployments.get("WPNK"); -// const xPnk = xPinakionByChain[chainId]; -// const tokenBridge = tokenBridgeByChain[chainId]; -// const wPnk = await deploy("WrappedPinakionV2", { -// from: deployer, -// log: true, -// }); - -// await execute( -// "WrappedPinakionV2", -// { from: deployer, log: true }, -// "initialize", -// "Staking PNK on xDai", -// "stPNK", -// xPnk, -// tokenBridge -// ); -// }; - -deployKlerosLiquid.tags = ["KlerosLiquidOnGnosis"]; -deployKlerosLiquid.skip = async ({ network }) => { - return isSkipped(network, !ForeignChains[network.config.chainId ?? 0]); -}; - -export default deployKlerosLiquid; diff --git a/contracts/deploy/change-arbitrable-dispute-template.ts b/contracts/deploy/change-arbitrable-dispute-template.ts deleted file mode 100644 index 8b41ce2d2..000000000 --- a/contracts/deploy/change-arbitrable-dispute-template.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ArbitrableExample } from "../typechain-types"; -import { EventLog } from "ethers"; - -const deployResolver: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers } = hre; - - const template = `{ - "$schema": "../NewDisputeTemplate.schema.json", - "title": "Proof of Humanity Registration Request", - "description": "A request to register the specified entry to a list of provable humans.", - "question": "Should the request to register be accepted?", - "answers": [ - { - "title": "Yes", - "description": "Accept the request to register the entry." - }, - { - "title": "No", - "description": "Deny the request." - } - ], - "policyURI": "/ipfs/QmXDiiBAizCPoLqHvcfTzuMT7uvFEe1j3s4TgoWWd4k5np/proof-of-humanity-registry-policy-v1.3.pdf", - "frontendUrl": "https://app.proofofhumanity.id/profile/%s", - "arbitrableChainID": "1", - "arbitrableAddress": "0xc5e9ddebb09cd64dfacab4011a0d5cedaf7c9bdb", - "arbitratorChainID": "421614", - "arbitratorAddress": "0xD08Ab99480d02bf9C092828043f611BcDFEA917b", - "category": "Curated Lists", - "specification": "KIP88" - }`; - - const arbitrable = await ethers.getContract("ArbitrableExample"); - let tx = await (await arbitrable.changeDisputeTemplate(template, "disputeTemplateMapping: TODO")).wait(); - tx?.logs?.forEach((event) => { - if (event instanceof EventLog) console.log("event: %O", event.args); - }); -}; - -deployResolver.tags = ["ArbitrableDisputeTemplate"]; - -export default deployResolver; diff --git a/contracts/deploy/change-sortition-module-rng.ts b/contracts/deploy/change-sortition-module-rng.ts deleted file mode 100644 index 986e408ec..000000000 --- a/contracts/deploy/change-sortition-module-rng.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { HomeChains, isSkipped } from "./utils"; -import { ethers } from "hardhat"; -import { ChainlinkRNG, SortitionModule } from "../typechain-types"; - -const task: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { getNamedAccounts, getChainId } = hre; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()) as unknown as HomeChains; // Checked at runtime by skip() - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - - const chainlinkRng = await ethers.getContract("ChainlinkRNG"); - const sortitionModule = await ethers.getContract("SortitionModule"); - - console.log(`chainlinkRng.changeConsumer(${sortitionModule.target})`); - await chainlinkRng.changeConsumer(sortitionModule.target); - - console.log(`sortitionModule.changeRandomNumberGenerator(${chainlinkRng.target})`); - await sortitionModule.changeRandomNumberGenerator(chainlinkRng.target); -}; - -task.tags = ["ChangeSortitionModuleRNG"]; -task.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default task; diff --git a/contracts/deploy/fix1148.ts b/contracts/deploy/fix1148.ts deleted file mode 100644 index fc3cde36e..000000000 --- a/contracts/deploy/fix1148.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { DisputeKitClassic, KlerosCore, SortitionModule } from "../typechain-types"; -import assert from "node:assert"; -import { HomeChains, isSkipped } from "./utils"; - -const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { ethers, deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; - const { ZeroAddress } = ethers; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - - const klerosCore = (await ethers.getContract("KlerosCore")) as KlerosCore; - const oldDisputeKit = (await ethers.getContract("DisputeKitClassic")) as DisputeKitClassic; - const oldDisputeKitAddress = await oldDisputeKit.getAddress(); - - await deploy("DisputeKitClassic", { - from: deployer, - args: [deployer, ZeroAddress], - log: true, - }); - - const newDisputeKit = (await ethers.getContract("DisputeKitClassic")) as DisputeKitClassic; - const newDisputeKitAddress = await newDisputeKit.getAddress(); - await execute("DisputeKitClassic", { from: deployer, log: true }, "changeCore", await klerosCore.getAddress()); - await execute("KlerosCore", { from: deployer, log: true }, "addNewDisputeKit", await newDisputeKit.getAddress(), 0); - - const oldDisputeKitId = 1; - const newDisputeKitId = 2; - - assert( - await klerosCore.disputeKits(oldDisputeKitId).then((dk) => dk === oldDisputeKitAddress), - `wrong dispute kit id ${oldDisputeKitId}` - ); - assert( - await klerosCore.disputeKits(newDisputeKitId).then((dk) => dk === newDisputeKitAddress), - `wrong dispute kit id ${newDisputeKitId}` - ); - - await execute("KlerosCore", { from: deployer, log: true }, "enableDisputeKits", 1, [newDisputeKitId], true); // enable the new dispute kit in court 1 - await execute("KlerosCore", { from: deployer, log: true }, "enableDisputeKits", 2, [newDisputeKitId], true); // enable the new dispute kit in court 2 - await execute("KlerosCore", { from: deployer, log: true }, "enableDisputeKits", 3, [newDisputeKitId], true); // enable the new dispute kit in court 3 - - // Cannot disable the old DK because of https://github.com/kleros/kleros-v2/blob/d9adb8f54e8164eb01880296b4dd62b74cad3a0e/contracts/src/arbitration/KlerosCore.sol#L452 - // Does not seem correct - // await execute("KlerosCore", { from: deployer, log: true }, "enableDisputeKits", 1, [oldDisputeKitId], false); // disable the old dispute kit -}; - -deployArbitration.tags = ["Fix1148"]; -deployArbitration.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default deployArbitration; diff --git a/contracts/deploy/upgrade-all.ts b/contracts/deploy/upgrade-all.ts deleted file mode 100644 index 572ed7187..000000000 --- a/contracts/deploy/upgrade-all.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { prompt, print } from "gluegun"; -import { deployUpgradable } from "./utils/deployUpgradable"; -import { HomeChains, isSkipped } from "./utils"; -import { getContractNamesFromNetwork } from "../scripts/utils/contracts"; - -const { bold } = print.colors; - -const deployUpgradeAll: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { deployments, getNamedAccounts, getChainId } = hre; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; - const chainId = Number(await getChainId()); - console.log("upgrading on %s with deployer %s", HomeChains[chainId], deployer); - - const { - disputeKitClassic, - disputeKitShutter, - disputeKitGated, - disputeKitGatedShutter, - disputeTemplateRegistry, - evidence, - core, - policyRegistry, - sortition, - } = await getContractNamesFromNetwork(hre); - - console.log("disputeKitClassic", disputeKitClassic); - console.log("disputeKitShutter", disputeKitShutter); - console.log("disputeKitGated", disputeKitGated); - console.log("disputeKitGatedShutter", disputeKitGatedShutter); - - const upgrade = async (contractName: string, initializer: string, args: any[]) => { - try { - print.highlight(`🔍 Validating upgrade of ${bold(contractName)}`); - - let compareStorageOptions = { contract: contractName } as any; - await hre.run("compare-storage", compareStorageOptions); - print.newline(); - print.highlight(`💣 Upgrading ${bold(contractName)}`); - const { confirm } = await prompt.ask({ - type: "confirm", - name: "confirm", - message: "Are you sure you want to proceed?", - }); - if (!confirm) { - print.info("Operation cancelled by user."); - return; - } - print.info(`Upgrading ${contractName}...`); - - await deployUpgradable(deployments, contractName, { - newImplementation: contractName, - initializer, - from: deployer, - args, // Warning: do not reinitialize existing state variables, only the new ones - }); - print.info(`Verifying ${contractName} on Etherscan...`); - await hre.run("etherscan-verify", { contractName: `${contractName}_Implementation` }); - } catch (err) { - console.error(err); - throw err; - } - }; - - const wETH = await deployments.get("WETH"); - - await upgrade(disputeKitClassic, "reinitialize", [wETH.address]); - await upgrade(disputeKitShutter, "reinitialize", [wETH.address]); - await upgrade(disputeKitGated, "reinitialize", [wETH.address]); - await upgrade(disputeKitGatedShutter, "reinitialize", [wETH.address]); - await upgrade(disputeTemplateRegistry, "reinitialize", []); - await upgrade(evidence, "reinitialize", []); - await upgrade(core, "reinitialize", [wETH.address]); - await upgrade(policyRegistry, "reinitialize", []); - await upgrade(sortition, "reinitialize", []); -}; - -deployUpgradeAll.tags = ["UpgradeAll"]; -deployUpgradeAll.skip = async ({ network }) => { - return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); -}; - -export default deployUpgradeAll; diff --git a/contracts/deploy/utils/deployTokens.ts b/contracts/deploy/utils/deployTokens.ts deleted file mode 100644 index 3e6222f99..000000000 --- a/contracts/deploy/utils/deployTokens.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Contract } from "ethers"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { getContractOrDeploy } from "./getContractOrDeploy"; -import { isMainnet } from "."; - -export const deployERC20AndFaucet = async ( - hre: HardhatRuntimeEnvironment, - deployer: string, - ticker: string, - faucetFundingAmount: bigint = hre.ethers.parseUnits("100000") -): Promise => { - const erc20 = await deployERC20(hre, deployer, ticker); - if (!isMainnet(hre.network)) { - await deployFaucet(hre, deployer, ticker, erc20, faucetFundingAmount); - } - return erc20; -}; - -export const deployERC20 = async ( - hre: HardhatRuntimeEnvironment, - deployer: string, - ticker: string -): Promise => { - return await getContractOrDeploy(hre, ticker, { - from: deployer, - contract: "TestERC20", - args: [ticker, ticker], - log: true, - }); -}; - -export const deployFaucet = async ( - hre: HardhatRuntimeEnvironment, - deployer: string, - ticker: string, - erc20: Contract, - faucetFundingAmount: bigint -): Promise => { - const faucet = await getContractOrDeploy(hre, `${ticker}Faucet`, { - from: deployer, - contract: "Faucet", - args: [erc20.target], - log: true, - }); - - const faucetBalance = await erc20.balanceOf(faucet.target); - const deployerBalance = await erc20.balanceOf(deployer); - if (deployerBalance >= faucetFundingAmount && faucetBalance < faucetFundingAmount / 5n) { - // Fund the faucet if deployer has enough tokens and if the faucet has less than 20% of the faucetFundingAmount - console.log(`funding ${ticker}Faucet with ${faucetFundingAmount}`); - await erc20.transfer(faucet.target, faucetFundingAmount); - } -}; - -export const deployERC721 = async ( - hre: HardhatRuntimeEnvironment, - deployer: string, - name: string, - ticker: string -): Promise => { - return getContractOrDeploy(hre, ticker, { - from: deployer, - contract: "TestERC721", - args: [name, ticker], - log: true, - }); -}; - -export const deployERC1155 = async ( - hre: HardhatRuntimeEnvironment, - deployer: string, - name: string, - ticker: string -): Promise => { - return getContractOrDeploy(hre, ticker, { - from: deployer, - contract: "TestERC1155", - args: [], - log: true, - }); -}; diff --git a/contracts/deploy/utils/deployUpgradable.ts b/contracts/deploy/utils/deployUpgradable.ts deleted file mode 100644 index 932afd816..000000000 --- a/contracts/deploy/utils/deployUpgradable.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { - DeployResult, - DeployOptions, - DeploymentsExtension, - DeployOptionsBase, - ProxyOptions, -} from "hardhat-deploy/types"; - -// Rationale: https://github.com/kleros/kleros-v2/pull/1214#issue-1879116629 -function proxyOptions(proxyContract: string): ProxyOptions { - return { - proxyContract, - proxyArgs: ["{implementation}", "{data}"], - checkProxyAdmin: false, // Not relevant for UUPSProxy - checkABIConflict: false, // Not relevant for UUPSProxy - upgradeFunction: { - methodName: "upgradeToAndCall", - upgradeArgs: ["{implementation}", "{data}"], - }, - }; -} - -export type DeployUpgradableOptions = { - newImplementation?: string; - initializer?: string; - proxyAlias?: string; -} & DeployOptionsBase; - -/** - * Deploy a contract with an upgradable proxy - * NOTE: This function assumes the existence of a proxy contract with the name `${proxy}Proxy`, if there is none add the option `proxyAlias: "UUPSProxy"` - * @param deployments - The deployments extension - * @param proxy - The name of the proxy contract - * @param options - The options for the deployment - * @returns The deployment result - */ -export const deployUpgradable = async ( - deployments: DeploymentsExtension, - proxy: string, - options: DeployUpgradableOptions -): Promise => { - const { deploy } = deployments; - const { - newImplementation, - initializer, - args: initializerArgs, - proxy: proxyOverrides, - proxyAlias, - ...otherOptions - } = options; - - const methodName = initializer ?? "initialize"; - const args = initializerArgs ?? []; - - const contract: Partial = newImplementation - ? { - contract: newImplementation, - } - : {}; - - const implementationName: Partial = newImplementation - ? { - implementationName: newImplementation + "_Implementation", - } - : {}; - - const fullOptions: DeployOptions = { - ...otherOptions, - ...contract, - proxy: { - ...proxyOptions(proxyAlias ?? `${proxy}Proxy`), - ...implementationName, - ...((proxyOverrides as ProxyOptions) ?? {}), - execute: { - init: { - methodName, - args, - }, - onUpgrade: { - methodName, - args, - }, - }, - }, - }; - - // console.debug("fullOptions: ", JSON.stringify(fullOptions)); - return deploy(proxy, fullOptions); -}; diff --git a/contracts/deploy/utils/getContractAddress.ts b/contracts/deploy/utils/getContractAddress.ts deleted file mode 100644 index bfad406d3..000000000 --- a/contracts/deploy/utils/getContractAddress.ts +++ /dev/null @@ -1,12 +0,0 @@ -const { BN, Address, toChecksumAddress } = require("ethereumjs-util"); - -/** - * Gets the address of a soon to be deployed contract. - * @param {string} deployer The address of the deployer account. - * @param {number|BN} nonce The current nonce for the deployer account. - * @return {string} The address of a contract if it is deployed in the next transaction sent by the deployer account. - */ -export const getContractAddress = (deployer, nonce) => { - const deployAddress = Address.generate(Address.fromString(deployer), new BN(String(nonce))); - return toChecksumAddress(deployAddress.toString()); -}; diff --git a/contracts/deploy/utils/getContractOrDeploy.ts b/contracts/deploy/utils/getContractOrDeploy.ts deleted file mode 100644 index 1bcb46177..000000000 --- a/contracts/deploy/utils/getContractOrDeploy.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { DeployOptions } from "hardhat-deploy/types"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { deployUpgradable } from "./deployUpgradable"; -import { Contract } from "ethers"; - -export const getContractOrDeploy = async ( - hre: HardhatRuntimeEnvironment, - contractName: string, - options: DeployOptions -): Promise => { - let contract = await hre.ethers.getContractOrNull(contractName); - if (!contract) { - console.log(`contract ${contractName} not deployed, deploying now...`); - await hre.deployments.deploy(contractName, options); - contract = await hre.ethers.getContract(contractName); - } else { - console.log(`contract ${contractName} already deployed`); - } - return contract; -}; - -export const getContractOrDeployUpgradable = async ( - hre: HardhatRuntimeEnvironment, - contractName: string, - options: DeployOptions -): Promise => { - let contract = await hre.ethers.getContractOrNull(contractName); - if (!contract) { - console.log(`contract ${contractName} not deployed, deploying as upgradable now...`); - await deployUpgradable(hre.deployments, contractName, options); - contract = await hre.ethers.getContract(contractName); - } else { - console.log(`contract ${contractName} already deployed`); - } - return contract; -}; diff --git a/contracts/deploy/utils/index.ts b/contracts/deploy/utils/index.ts deleted file mode 100644 index bb14bf0fd..000000000 --- a/contracts/deploy/utils/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ethers } from "ethers"; -import { Network } from "hardhat/types"; - -// TODO: derive this from hardhat.config and make it rely on viem/chains - -export enum HardhatChain { - HARDHAT = 31337, -} - -export enum HomeChains { - ARBITRUM_ONE = 42161, - ARBITRUM_SEPOLIA = 421614, - HARDHAT = HardhatChain.HARDHAT, -} - -export enum ForeignChains { - ETHEREUM_MAINNET = 1, - ETHEREUM_SEPOLIA = 11155111, - GNOSIS_MAINNET = 100, - GNOSIS_CHIADO = 10200, - HARDHAT = HardhatChain.HARDHAT, -} - -export enum Courts { - FORKING = 0, - GENERAL = 1, -} - -export const isMainnet = (network: Network) => network.tags.production ?? false; -export const isDevnet = (network: Network) => network.name.endsWith("Devnet"); - -export const isSkipped = async (network: Network, skip: boolean) => { - if (skip) { - console.error(`Error: incompatible network ${network.name} for this deployment script`); - return true; - } - return false; -}; - -export const PNK = (n: number) => ethers.parseUnits(String(n)); -export const ETH = (n: number) => ethers.parseUnits(String(n)); diff --git a/contracts/deploy/utils/klerosCoreHelper.ts b/contracts/deploy/utils/klerosCoreHelper.ts deleted file mode 100644 index 3325652a3..000000000 --- a/contracts/deploy/utils/klerosCoreHelper.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { KlerosCore, KlerosCoreRuler, KlerosCoreUniversity } from "../../typechain-types"; -import { BigNumberish, toBigInt } from "ethers"; - -export const changeCurrencyRate = async ( - core: KlerosCore | KlerosCoreRuler | KlerosCoreUniversity, - erc20: string, - accepted: boolean, - rateInEth: BigNumberish, - rateDecimals: BigNumberish -) => { - const pnkRate = await core.currencyRates(erc20); - if (pnkRate.feePaymentAccepted !== accepted) { - console.log(`core.changeAcceptedFeeTokens(${erc20}, ${accepted})`); - const tx = await core.changeAcceptedFeeTokens(erc20, accepted); - await tx.wait(); - } - if (pnkRate.rateInEth !== toBigInt(rateInEth) || pnkRate.rateDecimals !== rateDecimals) { - console.log(`core.changeCurrencyRates(${erc20}, ${rateInEth}, ${rateDecimals})`); - const tx = await core.changeCurrencyRates(erc20, rateInEth, rateDecimals); - await tx.wait(); - } -}; diff --git a/contracts/deployments/arbitrum.ts b/contracts/deployments/arbitrum.ts deleted file mode 100644 index 2b5d6eb3f..000000000 --- a/contracts/deployments/arbitrum.ts +++ /dev/null @@ -1,26347 +0,0 @@ -export default { - name: "arbitrum", - chainId: "42161", - contracts: { - BlockHashRNG: { - address: "0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "block", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "number", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_block", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_block", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - ChainlinkRNG: { - address: "0x897d83a7d5F23555eFA15e1BE297d5503522cbA3", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_sortitionModule", - type: "address", - }, - { - internalType: "address", - name: "_vrfCoordinator", - type: "address", - }, - { - internalType: "bytes32", - name: "_keyHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_subscriptionId", - type: "uint256", - }, - { - internalType: "uint16", - name: "_requestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "_callbackGasLimit", - type: "uint32", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "have", - type: "address", - }, - { - internalType: "address", - name: "want", - type: "address", - }, - ], - name: "OnlyCoordinatorCanFulfill", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "have", - type: "address", - }, - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "coordinator", - type: "address", - }, - ], - name: "OnlyOwnerOrCoordinator", - type: "error", - }, - { - inputs: [], - name: "ZeroAddress", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "vrfCoordinator", - type: "address", - }, - ], - name: "CoordinatorSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "randomWord", - type: "uint256", - }, - ], - name: "RequestFulfilled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "RequestSent", - type: "event", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint32", - name: "_callbackGasLimit", - type: "uint32", - }, - ], - name: "changeCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_keyHash", - type: "bytes32", - }, - ], - name: "changeKeyHash", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint16", - name: "_requestConfirmations", - type: "uint16", - }, - ], - name: "changeRequestConfirmations", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_subscriptionId", - type: "uint256", - }, - ], - name: "changeSubscriptionId", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vrfCoordinator", - type: "address", - }, - ], - name: "changeVrfCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "keyHash", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastRequestId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "number", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "randomWords", - type: "uint256[]", - }, - ], - name: "rawFulfillRandomWords", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "requestConfirmations", - outputs: [ - { - internalType: "uint16", - name: "", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "s_vrfCoordinator", - outputs: [ - { - internalType: "contract IVRFCoordinatorV2Plus", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vrfCoordinator", - type: "address", - }, - ], - name: "setCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "subscriptionId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - ChainlinkVRFCoordinator: { - address: "0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "blockhashStore", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "uint256", - name: "internalBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "externalBalance", - type: "uint256", - }, - ], - name: "BalanceInvariantViolated", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "blockNum", - type: "uint256", - }, - ], - name: "BlockhashNotInStore", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorAlreadyRegistered", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorNotRegistered", - type: "error", - }, - { - inputs: [], - name: "FailedToSendNative", - type: "error", - }, - { - inputs: [], - name: "FailedToTransferLink", - type: "error", - }, - { - inputs: [ - { - internalType: "uint32", - name: "have", - type: "uint32", - }, - { - internalType: "uint32", - name: "want", - type: "uint32", - }, - ], - name: "GasLimitTooBig", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxGas", - type: "uint256", - }, - ], - name: "GasPriceExceeded", - type: "error", - }, - { - inputs: [], - name: "IncorrectCommitment", - type: "error", - }, - { - inputs: [], - name: "IndexOutOfRange", - type: "error", - }, - { - inputs: [], - name: "InsufficientBalance", - type: "error", - }, - { - inputs: [], - name: "InvalidCalldata", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "InvalidConsumer", - type: "error", - }, - { - inputs: [], - name: "InvalidExtraArgsTag", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "linkWei", - type: "int256", - }, - ], - name: "InvalidLinkWeiPrice", - type: "error", - }, - { - inputs: [ - { - internalType: "uint8", - name: "premiumPercentage", - type: "uint8", - }, - { - internalType: "uint8", - name: "max", - type: "uint8", - }, - ], - name: "InvalidPremiumPercentage", - type: "error", - }, - { - inputs: [ - { - internalType: "uint16", - name: "have", - type: "uint16", - }, - { - internalType: "uint16", - name: "min", - type: "uint16", - }, - { - internalType: "uint16", - name: "max", - type: "uint16", - }, - ], - name: "InvalidRequestConfirmations", - type: "error", - }, - { - inputs: [], - name: "InvalidSubscription", - type: "error", - }, - { - inputs: [], - name: "LinkAlreadySet", - type: "error", - }, - { - inputs: [ - { - internalType: "uint32", - name: "flatFeeLinkDiscountPPM", - type: "uint32", - }, - { - internalType: "uint32", - name: "flatFeeNativePPM", - type: "uint32", - }, - ], - name: "LinkDiscountTooHigh", - type: "error", - }, - { - inputs: [], - name: "LinkNotSet", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "have", - type: "uint256", - }, - { - internalType: "uint32", - name: "max", - type: "uint32", - }, - ], - name: "MsgDataTooBig", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "proposedOwner", - type: "address", - }, - ], - name: "MustBeRequestedOwner", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "MustBeSubOwner", - type: "error", - }, - { - inputs: [], - name: "NoCorrespondingRequest", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - ], - name: "NoSuchProvingKey", - type: "error", - }, - { - inputs: [ - { - internalType: "uint32", - name: "have", - type: "uint32", - }, - { - internalType: "uint32", - name: "want", - type: "uint32", - }, - ], - name: "NumWordsTooBig", - type: "error", - }, - { - inputs: [], - name: "OnlyCallableFromLink", - type: "error", - }, - { - inputs: [], - name: "PaymentTooLarge", - type: "error", - }, - { - inputs: [], - name: "PendingRequestExists", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - ], - name: "ProvingKeyAlreadyRegistered", - type: "error", - }, - { - inputs: [], - name: "Reentrant", - type: "error", - }, - { - inputs: [], - name: "TooManyConsumers", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - indexed: false, - internalType: "uint32", - name: "maxGasLimit", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "stalenessSeconds", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "gasAfterPaymentCalculation", - type: "uint32", - }, - { - indexed: false, - internalType: "int256", - name: "fallbackWeiPerUnitLink", - type: "int256", - }, - { - indexed: false, - internalType: "uint32", - name: "fulfillmentFlatFeeNativePPM", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "fulfillmentFlatFeeLinkDiscountPPM", - type: "uint32", - }, - { - indexed: false, - internalType: "uint8", - name: "nativePremiumPercentage", - type: "uint8", - }, - { - indexed: false, - internalType: "uint8", - name: "linkPremiumPercentage", - type: "uint8", - }, - ], - name: "ConfigSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorDeregistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorRegistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "fallbackWeiPerUnitLink", - type: "int256", - }, - ], - name: "FallbackWeiPerUnitLinkUsed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "FundsRecovered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "newCoordinator", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "MigrationCompleted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "NativeFundsRecovered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - name: "ProvingKeyDeregistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - name: "ProvingKeyRegistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "outputSeed", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint96", - name: "payment", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "nativePayment", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "success", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "onlyPremium", - type: "bool", - }, - ], - name: "RandomWordsFulfilled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "preSeed", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - indexed: false, - internalType: "uint32", - name: "callbackGasLimit", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "numWords", - type: "uint32", - }, - { - indexed: false, - internalType: "bytes", - name: "extraArgs", - type: "bytes", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - ], - name: "RandomWordsRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountLink", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountNative", - type: "uint256", - }, - ], - name: "SubscriptionCanceled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "SubscriptionConsumerAdded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "SubscriptionConsumerRemoved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "SubscriptionCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "oldBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "SubscriptionFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "oldNativeBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newNativeBalance", - type: "uint256", - }, - ], - name: "SubscriptionFundedWithNative", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "SubscriptionOwnerTransferRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "SubscriptionOwnerTransferred", - type: "event", - }, - { - inputs: [], - name: "BLOCKHASH_STORE", - outputs: [ - { - internalType: "contract BlockhashStoreInterface", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LINK", - outputs: [ - { - internalType: "contract LinkTokenInterface", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LINK_NATIVE_FEED", - outputs: [ - { - internalType: "contract AggregatorV3Interface", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_CONSUMERS", - outputs: [ - { - internalType: "uint16", - name: "", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_NUM_WORDS", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_REQUEST_CONFIRMATIONS", - outputs: [ - { - internalType: "uint16", - name: "", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "acceptSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "addConsumer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "cancelSubscription", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "createSubscription", - outputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "deregisterMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[2]", - name: "publicProvingKey", - type: "uint256[2]", - }, - ], - name: "deregisterProvingKey", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256[2]", - name: "pk", - type: "uint256[2]", - }, - { - internalType: "uint256[2]", - name: "gamma", - type: "uint256[2]", - }, - { - internalType: "uint256", - name: "c", - type: "uint256", - }, - { - internalType: "uint256", - name: "s", - type: "uint256", - }, - { - internalType: "uint256", - name: "seed", - type: "uint256", - }, - { - internalType: "address", - name: "uWitness", - type: "address", - }, - { - internalType: "uint256[2]", - name: "cGammaWitness", - type: "uint256[2]", - }, - { - internalType: "uint256[2]", - name: "sHashWitness", - type: "uint256[2]", - }, - { - internalType: "uint256", - name: "zInv", - type: "uint256", - }, - ], - internalType: "struct VRF.Proof", - name: "proof", - type: "tuple", - }, - { - components: [ - { - internalType: "uint64", - name: "blockNum", - type: "uint64", - }, - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "uint32", - name: "callbackGasLimit", - type: "uint32", - }, - { - internalType: "uint32", - name: "numWords", - type: "uint32", - }, - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "bytes", - name: "extraArgs", - type: "bytes", - }, - ], - internalType: "struct VRFTypes.RequestCommitmentV2Plus", - name: "rc", - type: "tuple", - }, - { - internalType: "bool", - name: "onlyPremium", - type: "bool", - }, - ], - name: "fulfillRandomWords", - outputs: [ - { - internalType: "uint96", - name: "payment", - type: "uint96", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "fundSubscriptionWithNative", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "startIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxCount", - type: "uint256", - }, - ], - name: "getActiveSubscriptionIds", - outputs: [ - { - internalType: "uint256[]", - name: "ids", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "getSubscription", - outputs: [ - { - internalType: "uint96", - name: "balance", - type: "uint96", - }, - { - internalType: "uint96", - name: "nativeBalance", - type: "uint96", - }, - { - internalType: "uint64", - name: "reqCount", - type: "uint64", - }, - { - internalType: "address", - name: "subOwner", - type: "address", - }, - { - internalType: "address[]", - name: "consumers", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[2]", - name: "publicKey", - type: "uint256[2]", - }, - ], - name: "hashOfKey", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "newCoordinator", - type: "address", - }, - ], - name: "migrate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "onTokenTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "ownerCancelSubscription", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "pendingRequestExists", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "recoverFunds", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "to", - type: "address", - }, - ], - name: "recoverNativeFunds", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "registerMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[2]", - name: "publicProvingKey", - type: "uint256[2]", - }, - { - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - name: "registerProvingKey", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "removeConsumer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "uint16", - name: "requestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "callbackGasLimit", - type: "uint32", - }, - { - internalType: "uint32", - name: "numWords", - type: "uint32", - }, - { - internalType: "bytes", - name: "extraArgs", - type: "bytes", - }, - ], - internalType: "struct VRFV2PlusClient.RandomWordsRequest", - name: "req", - type: "tuple", - }, - ], - name: "requestRandomWords", - outputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "requestSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "s_config", - outputs: [ - { - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "maxGasLimit", - type: "uint32", - }, - { - internalType: "bool", - name: "reentrancyLock", - type: "bool", - }, - { - internalType: "uint32", - name: "stalenessSeconds", - type: "uint32", - }, - { - internalType: "uint32", - name: "gasAfterPaymentCalculation", - type: "uint32", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeNativePPM", - type: "uint32", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeLinkDiscountPPM", - type: "uint32", - }, - { - internalType: "uint8", - name: "nativePremiumPercentage", - type: "uint8", - }, - { - internalType: "uint8", - name: "linkPremiumPercentage", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_currentSubNonce", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_fallbackWeiPerUnitLink", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "s_provingKeyHashes", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "s_provingKeys", - outputs: [ - { - internalType: "bool", - name: "exists", - type: "bool", - }, - { - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "s_requestCommitments", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_totalBalance", - outputs: [ - { - internalType: "uint96", - name: "", - type: "uint96", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_totalNativeBalance", - outputs: [ - { - internalType: "uint96", - name: "", - type: "uint96", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "maxGasLimit", - type: "uint32", - }, - { - internalType: "uint32", - name: "stalenessSeconds", - type: "uint32", - }, - { - internalType: "uint32", - name: "gasAfterPaymentCalculation", - type: "uint32", - }, - { - internalType: "int256", - name: "fallbackWeiPerUnitLink", - type: "int256", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeNativePPM", - type: "uint32", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeLinkDiscountPPM", - type: "uint32", - }, - { - internalType: "uint8", - name: "nativePremiumPercentage", - type: "uint8", - }, - { - internalType: "uint8", - name: "linkPremiumPercentage", - type: "uint8", - }, - ], - name: "setConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "link", - type: "address", - }, - { - internalType: "address", - name: "linkNativeFeed", - type: "address", - }, - ], - name: "setLINKAndLINKNativeFeed", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "recipient", - type: "address", - }, - ], - name: "withdrawNative", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DAI: { - address: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "usr", - type: "address", - }, - ], - name: "Deny", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "usr", - type: "address", - }, - ], - name: "Rely", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PERMIT_TYPEHASH", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "uint256", - name: "value", - 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: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "usr", - type: "address", - }, - ], - name: "deny", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "deploymentChainId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - 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: "", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - 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: "address", - name: "usr", - type: "address", - }, - ], - name: "rely", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - 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: "value", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "wards", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeKitClassic: { - address: "0x70B464be85A547144C72485eBa2577E5D3A45421", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitClassic_Implementation: { - address: "0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitClassic_Proxy: { - address: "0x70B464be85A547144C72485eBa2577E5D3A45421", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitGated: { - address: "0xaE1eed20C125B739b64c948820C61F809ad9a925", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "extraDataToTokenInfo", - outputs: [ - { - internalType: "address", - name: "tokenGate", - type: "address", - }, - { - internalType: "bool", - name: "isERC1155", - type: "bool", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitGatedShutter: { - address: "0x788330092B9704809C19858E39EB9Ac402c2E47b", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitGatedShutter_Implementation: { - address: "0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitGatedShutter_Proxy: { - address: "0x788330092B9704809C19858E39EB9Ac402c2E47b", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitGated_Implementation: { - address: "0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "extraDataToTokenInfo", - outputs: [ - { - internalType: "address", - name: "tokenGate", - type: "address", - }, - { - internalType: "bool", - name: "isERC1155", - type: "bool", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitGated_Proxy: { - address: "0xaE1eed20C125B739b64c948820C61F809ad9a925", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitShutter: { - address: "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitShutter_Implementation: { - address: "0xF3103B46403A0bBd4551648BFb29BCC2b8783947", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitShutter_Proxy: { - address: "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeResolver: { - address: "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", - abi: [ - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, - ], - name: "DisputeRequest", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", - outputs: [ - { - internalType: "contract IArbitratorV2", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplate", - type: "string", - }, - { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "uint256", - name: "numberOfRulingOptions", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeResolverRuler: { - address: "0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140", - abi: [ - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, - ], - name: "DisputeRequest", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", - outputs: [ - { - internalType: "contract IArbitratorV2", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplate", - type: "string", - }, - { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "uint256", - name: "numberOfRulingOptions", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeTemplateRegistry: { - address: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "DisputeTemplate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "setDisputeTemplate", - outputs: [ - { - internalType: "uint256", - name: "templateId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templates", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeTemplateRegistry_Implementation: { - address: "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "DisputeTemplate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "setDisputeTemplate", - outputs: [ - { - internalType: "uint256", - name: "templateId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templates", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - DisputeTemplateRegistry_Proxy: { - address: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - EvidenceModule: { - address: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_party", - type: "address", - }, - { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - EvidenceModule_Implementation: { - address: "0xA502A3942abCF8e71FBD87ed442B39b798b192C8", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_party", - type: "address", - }, - { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - EvidenceModule_Proxy: { - address: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - KlerosCore: { - address: "0x991d2df165670b9cac3B022f4B68D65b664222ea", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrableNotWhitelisted", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEligibleForStaking", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingMoreThanMaxStakePerJuror", - type: "error", - }, - { - inputs: [], - name: "StakingMoreThanMaxTotalStaked", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibleInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "StakingZeroWhenNoStake", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WhenNotPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WhenPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreBase.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "arbitrableWhitelist", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_arbitrable", - type: "address", - }, - { - internalType: "bool", - name: "_allowed", - type: "bool", - }, - ], - name: "changeArbitrableWhitelist", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_guardian", - type: "address", - }, - ], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC721", - name: "_jurorNft", - type: "address", - }, - ], - name: "changeJurorNft", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModule", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreBase.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "uint256", - name: "nbDrawnJurors", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getPnkAtStakePerJuror", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreBase.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "guardian", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_guardian", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", - }, - { - internalType: "contract IERC721", - name: "_jurorNft", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorNft", - outputs: [ - { - internalType: "contract IERC721", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "contract ISortitionModule", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - KlerosCoreRuler: { - address: "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NoRulerSet", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulerOnly", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "RulingModeNotSet", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "enum KlerosCoreRuler.RulingMode", - name: "mode", - type: "uint8", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "tied", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "AutoRuled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreRuler.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_oldRuler", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "RulerChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - components: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - indexed: false, - internalType: "struct KlerosCoreRuler.RulerSettings", - name: "_settings", - type: "tuple", - }, - ], - name: "RulerSettingsChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "uint256", - name: "_presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "_presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "_presetOverridden", - type: "bool", - }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToManual", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreRuler.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getNextDisputeID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - ], - internalType: "struct KlerosCoreRuler.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "rulers", - outputs: [ - { - internalType: "address", - name: "ruler", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - name: "rulingResults", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - KlerosCoreRuler_Implementation: { - address: "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NoRulerSet", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulerOnly", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "RulingModeNotSet", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "enum KlerosCoreRuler.RulingMode", - name: "mode", - type: "uint8", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "tied", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "AutoRuled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreRuler.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_oldRuler", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "RulerChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - components: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - indexed: false, - internalType: "struct KlerosCoreRuler.RulerSettings", - name: "_settings", - type: "tuple", - }, - ], - name: "RulerSettingsChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "uint256", - name: "_presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "_presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "_presetOverridden", - type: "bool", - }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToManual", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreRuler.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getNextDisputeID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - ], - internalType: "struct KlerosCoreRuler.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "rulers", - outputs: [ - { - internalType: "address", - name: "ruler", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - name: "rulingResults", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - KlerosCoreRuler_Proxy: { - address: "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - KlerosCoreSnapshotProxy: { - address: "0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IKlerosCore", - name: "_core", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IKlerosCore", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract IKlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - 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", - }, - ], - }, - KlerosCore_Implementation: { - address: "0xC1210493804eEF123096F9581Ee82B915150E54c", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrableNotWhitelisted", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEligibleForStaking", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingMoreThanMaxStakePerJuror", - type: "error", - }, - { - inputs: [], - name: "StakingMoreThanMaxTotalStaked", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibleInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "StakingZeroWhenNoStake", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WhenNotPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WhenPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreBase.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "arbitrableWhitelist", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_arbitrable", - type: "address", - }, - { - internalType: "bool", - name: "_allowed", - type: "bool", - }, - ], - name: "changeArbitrableWhitelist", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_guardian", - type: "address", - }, - ], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC721", - name: "_jurorNft", - type: "address", - }, - ], - name: "changeJurorNft", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModule", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreBase.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "uint256", - name: "nbDrawnJurors", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getPnkAtStakePerJuror", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreBase.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "guardian", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_guardian", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", - }, - { - internalType: "contract IERC721", - name: "_jurorNft", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorNft", - outputs: [ - { - internalType: "contract IERC721", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "contract ISortitionModule", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - KlerosCore_Proxy: { - address: "0x991d2df165670b9cac3B022f4B68D65b664222ea", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - KlerosV2NeoEarlyUser: { - address: "0xfE34a72c55e512601E7d491A9c5b36373cE34d63", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "approved", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "operator", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "approved", - type: "bool", - }, - ], - name: "ApprovalForAll", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newMinter", - type: "address", - }, - ], - name: "EventMinterAdded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "oldMinter", - type: "address", - }, - ], - name: "EventMinterRemoved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "minter", - type: "address", - }, - ], - name: "addMinter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - 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: [], - name: "baseURI", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256[]", - name: "ids", - type: "uint256[]", - }, - ], - name: "burnBatch", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "cid", - 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: [], - name: "getNumMinted", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - 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: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - ], - name: "isOwnerOf", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "cid", - type: "uint256", - }, - ], - name: "mint", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "cidArr", - type: "uint256[]", - }, - ], - name: "mintBatch", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "minters", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "ownerOf", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "minter", - type: "address", - }, - ], - name: "removeMinter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "operator", - type: "address", - }, - { - internalType: "bool", - name: "approved", - type: "bool", - }, - ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "newName", - type: "string", - }, - ], - name: "setName", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "newSymbol", - type: "string", - }, - ], - name: "setSymbol", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "transferable", - type: "bool", - }, - ], - name: "setTransferable", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "newURI", - type: "string", - }, - ], - name: "setURI", - 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: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - ], - name: "tokenOfOwnerByIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "tokenURI", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "transferable", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - PNK: { - address: "0x330bD769382cFc6d50175903434CCC8D206DCAE5", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - PNKFaucet: { - address: "0x0000000000000000000000000000000000000000", - abi: [ - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "balance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - Pinakion: { - address: "0x330bD769382cFc6d50175903434CCC8D206DCAE5", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - PolicyRegistry: { - address: "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_courtName", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "PolicyUpdate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "policies", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - internalType: "string", - name: "_courtName", - type: "string", - }, - { - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - PolicyRegistry_Implementation: { - address: "0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_courtName", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "PolicyUpdate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "policies", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - internalType: "string", - name: "_courtName", - type: "string", - }, - { - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - PolicyRegistry_Proxy: { - address: "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - RandomizerOracle: { - address: "0x5b8bB80f2d72D0C85caB8fB169e8170A05C94bAF", - abi: [], - }, - RandomizerRNG: { - address: "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IRandomizer", - name: "_randomizer", - type: "address", - }, - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "number", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomizer", - outputs: [ - { - internalType: "contract IRandomizer", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_id", - type: "uint256", - }, - { - internalType: "bytes32", - name: "_value", - type: "bytes32", - }, - ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "requester", - type: "address", - }, - ], - name: "requesterToID", - outputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_callbackGasLimit", - type: "uint256", - }, - ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_randomizer", - type: "address", - }, - ], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - RandomizerRNG_Implementation: { - address: "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IRandomizer", - name: "_randomizer", - type: "address", - }, - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "number", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomizer", - outputs: [ - { - internalType: "contract IRandomizer", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_id", - type: "uint256", - }, - { - internalType: "bytes32", - name: "_value", - type: "bytes32", - }, - ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "requester", - type: "address", - }, - ], - name: "requesterToID", - outputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_callbackGasLimit", - type: "uint256", - }, - ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_randomizer", - type: "address", - }, - ], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - RandomizerRNG_Proxy: { - address: "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - SortitionModule: { - address: "0x21A9402aDb818744B296e1d1BE58C804118DC03D", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNK", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNKWithdrawn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", - }, - ], - name: "NewPhase", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "StakeDelayed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amountAllCourts", - type: "uint256", - }, - ], - name: "StakeSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxStakePerJuror", - type: "uint256", - }, - ], - name: "changeMaxStakePerJuror", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxTotalStaked", - type: "uint256", - }, - ], - name: "changeMaxTotalStaked", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - ], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "delayedStakeReadIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "delayedStakes", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "bool", - name: "alreadyTransferred", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, - { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbCourts", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorCourtIDs", - outputs: [ - { - internalType: "uint96[]", - name: "", - type: "uint96[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorLeftoverPNK", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxTotalStaked", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "isJurorStaked", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "jurors", - outputs: [ - { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastPhaseChange", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "jurorAccount", - type: "address", - }, - { - internalType: "uint96", - name: "courtId", - type: "uint96", - }, - ], - name: "latestDelayedStakeIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "maxDrawingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxStakePerJuror", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxTotalStaked", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minStakingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", - }, - ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", - outputs: [ - { - internalType: "uint256", - name: "pnkBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "availablePenalty", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "phase", - outputs: [ - { - internalType: "enum ISortitionModule.Phase", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumber", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumberRequestBlock", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rng", - outputs: [ - { - internalType: "contract RNG", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rngLookahead", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "_pnkWithdrawal", - type: "uint256", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_ID", - type: "bytes32", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalStaked", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "validateStake", - outputs: [ - { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", - type: "uint256", - }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - SortitionModule_Implementation: { - address: "0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNK", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNKWithdrawn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", - }, - ], - name: "NewPhase", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "StakeDelayed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amountAllCourts", - type: "uint256", - }, - ], - name: "StakeSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxStakePerJuror", - type: "uint256", - }, - ], - name: "changeMaxStakePerJuror", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxTotalStaked", - type: "uint256", - }, - ], - name: "changeMaxTotalStaked", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - ], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "delayedStakeReadIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "delayedStakes", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "bool", - name: "alreadyTransferred", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, - { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbCourts", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorCourtIDs", - outputs: [ - { - internalType: "uint96[]", - name: "", - type: "uint96[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorLeftoverPNK", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxTotalStaked", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "isJurorStaked", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "jurors", - outputs: [ - { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastPhaseChange", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "jurorAccount", - type: "address", - }, - { - internalType: "uint96", - name: "courtId", - type: "uint96", - }, - ], - name: "latestDelayedStakeIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "maxDrawingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxStakePerJuror", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxTotalStaked", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minStakingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", - }, - ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", - outputs: [ - { - internalType: "uint256", - name: "pnkBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "availablePenalty", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "phase", - outputs: [ - { - internalType: "enum ISortitionModule.Phase", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumber", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumberRequestBlock", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rng", - outputs: [ - { - internalType: "contract RNG", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rngLookahead", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "_pnkWithdrawal", - type: "uint256", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_ID", - type: "bytes32", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalStaked", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "validateStake", - outputs: [ - { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", - type: "uint256", - }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - SortitionModule_Proxy: { - address: "0x21A9402aDb818744B296e1d1BE58C804118DC03D", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - TransactionBatcher: { - address: "0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF", - abi: [ - { - inputs: [ - { - internalType: "address[]", - name: "targets", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "values", - type: "uint256[]", - }, - { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", - }, - ], - name: "batchSend", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "targets", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "values", - type: "uint256[]", - }, - { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", - }, - ], - name: "batchSendUnchecked", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - WETH: { - address: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_logic", - type: "address", - }, - { - internalType: "address", - name: "admin_", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "payable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "previousAdmin", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newAdmin", - type: "address", - }, - ], - name: "AdminChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - inputs: [], - name: "admin", - outputs: [ - { - internalType: "address", - name: "admin_", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newAdmin", - type: "address", - }, - ], - name: "changeAdmin", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "implementation", - outputs: [ - { - internalType: "address", - name: "implementation_", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "upgradeTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - }, -} as const; diff --git a/contracts/deployments/arbitrum/.chainId b/contracts/deployments/arbitrum/.chainId deleted file mode 100644 index 1395ca74e..000000000 --- a/contracts/deployments/arbitrum/.chainId +++ /dev/null @@ -1 +0,0 @@ -42161 diff --git a/contracts/deployments/arbitrum/BlockHashRNG.json b/contracts/deployments/arbitrum/BlockHashRNG.json deleted file mode 100644 index 643e13451..000000000 --- a/contracts/deployments/arbitrum/BlockHashRNG.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "address": "0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "block", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "number", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_block", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_block", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x6ef5328c567093fa94fc10f1b23dd73f62b533aaa2ceaaa676ae2e2a15adc83b", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B", - "transactionIndex": 3, - "gasUsed": "224305", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xf88fbe2248f81d28c062b7380dcc474fb084e579a3766bc6ce77f5649187078b", - "transactionHash": "0x6ef5328c567093fa94fc10f1b23dd73f62b533aaa2ceaaa676ae2e2a15adc83b", - "logs": [], - "blockNumber": 278824880, - "cumulativeGasUsed": "584927", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"block\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cl\\u00e9ment Lesaege - \",\"details\":\"Random Number Generator returning the blockhash with a fallback behaviour. In case no one called it within the 256 blocks, it returns the previous blockhash. This contract must be used when returning 0 is a worse failure mode than returning another blockhash. Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.\",\"kind\":\"dev\",\"methods\":{\"receiveRandomness(uint256)\":{\"details\":\"Return the random number. If it has not been saved and is still computable compute it.\",\"params\":{\"_block\":\"Block the random number is linked to.\"},\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number.\",\"params\":{\"_block\":\"Block the random number is linked to.\"}}},\"title\":\"Random Number Generator using blockhash with fallback.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/rng/BlockhashRNG.sol\":\"BlockHashRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/rng/BlockhashRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./RNG.sol\\\";\\n\\n/// @title Random Number Generator using blockhash with fallback.\\n/// @author Cl\\u00e9ment Lesaege - \\n/// @dev\\n/// Random Number Generator returning the blockhash with a fallback behaviour.\\n/// In case no one called it within the 256 blocks, it returns the previous blockhash.\\n/// This contract must be used when returning 0 is a worse failure mode than returning another blockhash.\\n/// Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.\\ncontract BlockHashRNG is RNG {\\n mapping(uint256 block => uint256 number) public randomNumbers; // randomNumbers[block] is the random number for this block, 0 otherwise.\\n\\n /// @dev Request a random number.\\n /// @param _block Block the random number is linked to.\\n function requestRandomness(uint256 _block) external override {\\n // nop\\n }\\n\\n /// @dev Return the random number. If it has not been saved and is still computable compute it.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 _block) external override returns (uint256 randomNumber) {\\n randomNumber = randomNumbers[_block];\\n if (randomNumber != 0) {\\n return randomNumber;\\n }\\n\\n if (_block < block.number) {\\n // The random number is not already set and can be.\\n if (blockhash(_block) != 0x0) {\\n // Normal case.\\n randomNumber = uint256(blockhash(_block));\\n } else {\\n // The contract was not called in time. Fallback to returning previous blockhash.\\n randomNumber = uint256(blockhash(block.number - 1));\\n }\\n }\\n randomNumbers[_block] = randomNumber;\\n }\\n}\\n\",\"keccak256\":\"0xb2ae9b40700c5915c1cbe57dde68486b669cfea1fdfec18d5b42ffbde44031de\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0xf92e0cf768afefc5cc6ef786c263b67dd00c021aa5753213dbbc33014adb68c5\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50610169806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b8181038181111561012d57634e487b7160e01b600052601160045260246000fd5b9291505056fea26469706673582212208af4d57cc9727b11cb8cd9b8e8dca8477db4c383e58db8f1fbccf103ef66318d64736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b8181038181111561012d57634e487b7160e01b600052601160045260246000fd5b9291505056fea26469706673582212208af4d57cc9727b11cb8cd9b8e8dca8477db4c383e58db8f1fbccf103ef66318d64736f6c63430008180033", - "devdoc": { - "author": "Clément Lesaege - ", - "details": "Random Number Generator returning the blockhash with a fallback behaviour. In case no one called it within the 256 blocks, it returns the previous blockhash. This contract must be used when returning 0 is a worse failure mode than returning another blockhash. Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.", - "kind": "dev", - "methods": { - "receiveRandomness(uint256)": { - "details": "Return the random number. If it has not been saved and is still computable compute it.", - "params": { - "_block": "Block the random number is linked to." - }, - "returns": { - "randomNumber": "The random number or 0 if it is not ready or has not been requested." - } - }, - "requestRandomness(uint256)": { - "details": "Request a random number.", - "params": { - "_block": "Block the random number is linked to." - } - } - }, - "title": "Random Number Generator using blockhash with fallback.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 34790, - "contract": "src/rng/BlockhashRNG.sol:BlockHashRNG", - "label": "randomNumbers", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/ChainlinkRNG.json b/contracts/deployments/arbitrum/ChainlinkRNG.json deleted file mode 100644 index 694e7396e..000000000 --- a/contracts/deployments/arbitrum/ChainlinkRNG.json +++ /dev/null @@ -1,749 +0,0 @@ -{ - "address": "0x897d83a7d5F23555eFA15e1BE297d5503522cbA3", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_sortitionModule", - "type": "address" - }, - { - "internalType": "address", - "name": "_vrfCoordinator", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_keyHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_subscriptionId", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "_requestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "_callbackGasLimit", - "type": "uint32" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "have", - "type": "address" - }, - { - "internalType": "address", - "name": "want", - "type": "address" - } - ], - "name": "OnlyCoordinatorCanFulfill", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "have", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "coordinator", - "type": "address" - } - ], - "name": "OnlyOwnerOrCoordinator", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "vrfCoordinator", - "type": "address" - } - ], - "name": "CoordinatorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "randomWord", - "type": "uint256" - } - ], - "name": "RequestFulfilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "RequestSent", - "type": "event" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "callbackGasLimit", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_callbackGasLimit", - "type": "uint32" - } - ], - "name": "changeCallbackGasLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_keyHash", - "type": "bytes32" - } - ], - "name": "changeKeyHash", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_requestConfirmations", - "type": "uint16" - } - ], - "name": "changeRequestConfirmations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_subscriptionId", - "type": "uint256" - } - ], - "name": "changeSubscriptionId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vrfCoordinator", - "type": "address" - } - ], - "name": "changeVrfCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "keyHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastRequestId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "number", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "randomWords", - "type": "uint256[]" - } - ], - "name": "rawFulfillRandomWords", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "requestConfirmations", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "s_vrfCoordinator", - "outputs": [ - { - "internalType": "contract IVRFCoordinatorV2Plus", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vrfCoordinator", - "type": "address" - } - ], - "name": "setCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "subscriptionId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xe836e09161f9bedd5874f29ca3869b3c274962e386177b13dedf159b3baec588", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x897d83a7d5F23555eFA15e1BE297d5503522cbA3", - "transactionIndex": 1, - "gasUsed": "1048593", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2a5ba9c10406df82a46799081e8833ecaab8682bddbdce9c30b891706649721f", - "transactionHash": "0xe836e09161f9bedd5874f29ca3869b3c274962e386177b13dedf159b3baec588", - "logs": [], - "blockNumber": 283670668, - "cumulativeGasUsed": "1048593", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4", - "0xe9f223d7d83ec85c4f78042a4845af3a1c8df7757b4997b815ce4b8d07aca68c", - "66240499937595191069677958665918759554657443303079118766000192000140992834352", - 200, - 100000 - ], - "numDeployments": 1, - "solcInputHash": "409820253ec776b564318c3061b7e926", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sortitionModule\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_subscriptionId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"randomWord\",\"type\":\"uint256\"}],\"name\":\"RequestFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"RequestSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"callbackGasLimit\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"name\":\"changeCallbackGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"}],\"name\":\"changeKeyHash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"}],\"name\":\"changeRequestConfirmations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_subscriptionId\",\"type\":\"uint256\"}],\"name\":\"changeSubscriptionId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"changeVrfCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"keyHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestConfirmations\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contract IVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"subscriptionId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"RequestFulfilled(uint256,uint256)\":{\"params\":{\"randomWord\":\"The random value answering the request.\",\"requestId\":\"The ID of the request\"}},\"RequestSent(uint256)\":{\"details\":\"Emitted when a request is sent to the VRF Coordinator\",\"params\":{\"requestId\":\"The ID of the request\"}}},\"kind\":\"dev\",\"methods\":{\"changeCallbackGasLimit(uint32)\":{\"details\":\"Changes the callback gas limit of the contract.\",\"params\":{\"_callbackGasLimit\":\"The new callback gas limit.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"changeKeyHash(bytes32)\":{\"details\":\"Changes the key hash of the contract.\",\"params\":{\"_keyHash\":\"The new key hash.\"}},\"changeRequestConfirmations(uint16)\":{\"details\":\"Changes the request confirmations of the contract.\",\"params\":{\"_requestConfirmations\":\"The new request confirmations.\"}},\"changeSortitionModule(address)\":{\"details\":\"Changes the sortition module of the contract.\",\"params\":{\"_sortitionModule\":\"The new sortition module.\"}},\"changeSubscriptionId(uint256)\":{\"details\":\"Changes the subscription ID of the contract.\",\"params\":{\"_subscriptionId\":\"The new subscription ID.\"}},\"changeVrfCoordinator(address)\":{\"details\":\"Changes the VRF Coordinator of the contract.\",\"params\":{\"_vrfCoordinator\":\"The new VRF Coordinator.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number\",\"params\":{\"_callbackGasLimit\":\"The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function.\",\"_governor\":\"The Governor of the contract.\",\"_keyHash\":\"The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).\",\"_requestConfirmations\":\"How many confirmations the Chainlink node should wait before responding.\",\"_sortitionModule\":\"The address of the SortitionModule contract.\",\"_subscriptionId\":\"The unique identifier of the subscription used for funding requests.\",\"_vrfCoordinator\":\"The address of the VRFCoordinator contract.\"}},\"receiveRandomness(uint256)\":{\"details\":\"Return the random number.\",\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number. SortitionModule only.\"}},\"title\":\"Random Number Generator that uses Chainlink VRF v2.5 https://blog.chain.link/introducing-vrf-v2-5/\",\"version\":1},\"userdoc\":{\"events\":{\"RequestFulfilled(uint256,uint256)\":{\"notice\":\"Emitted when a request has been fulfilled.\"}},\"kind\":\"user\",\"methods\":{\"acceptOwnership()\":{\"notice\":\"Allows an ownership transfer to be completed by the recipient.\"},\"owner()\":{\"notice\":\"Get the current owner\"},\"setCoordinator(address)\":{\"notice\":\"Sets the VRF Coordinator addressThis method should only be callable by the coordinator or contract owner\"},\"transferOwnership(address)\":{\"notice\":\"Allows an owner to begin transferring ownership to a new address.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/rng/ChainlinkRNG.sol\":\"ChainlinkRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {ConfirmedOwnerWithProposal} from \\\"./ConfirmedOwnerWithProposal.sol\\\";\\n\\n/// @title The ConfirmedOwner contract\\n/// @notice A contract with helpers for basic contract ownership.\\ncontract ConfirmedOwner is ConfirmedOwnerWithProposal {\\n constructor(address newOwner) ConfirmedOwnerWithProposal(newOwner, address(0)) {}\\n}\\n\",\"keccak256\":\"0xdcb0e9135ddbe71ee27ba99fa06656960c66c964cf2ecb29696da1c1427d9861\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwnerWithProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {IOwnable} from \\\"../interfaces/IOwnable.sol\\\";\\n\\n/// @title The ConfirmedOwner contract\\n/// @notice A contract with helpers for basic contract ownership.\\ncontract ConfirmedOwnerWithProposal is IOwnable {\\n address private s_owner;\\n address private s_pendingOwner;\\n\\n event OwnershipTransferRequested(address indexed from, address indexed to);\\n event OwnershipTransferred(address indexed from, address indexed to);\\n\\n constructor(address newOwner, address pendingOwner) {\\n // solhint-disable-next-line gas-custom-errors\\n require(newOwner != address(0), \\\"Cannot set owner to zero\\\");\\n\\n s_owner = newOwner;\\n if (pendingOwner != address(0)) {\\n _transferOwnership(pendingOwner);\\n }\\n }\\n\\n /// @notice Allows an owner to begin transferring ownership to a new address.\\n function transferOwnership(address to) public override onlyOwner {\\n _transferOwnership(to);\\n }\\n\\n /// @notice Allows an ownership transfer to be completed by the recipient.\\n function acceptOwnership() external override {\\n // solhint-disable-next-line gas-custom-errors\\n require(msg.sender == s_pendingOwner, \\\"Must be proposed owner\\\");\\n\\n address oldOwner = s_owner;\\n s_owner = msg.sender;\\n s_pendingOwner = address(0);\\n\\n emit OwnershipTransferred(oldOwner, msg.sender);\\n }\\n\\n /// @notice Get the current owner\\n function owner() public view override returns (address) {\\n return s_owner;\\n }\\n\\n /// @notice validate, transfer ownership, and emit relevant events\\n function _transferOwnership(address to) private {\\n // solhint-disable-next-line gas-custom-errors\\n require(to != msg.sender, \\\"Cannot transfer to self\\\");\\n\\n s_pendingOwner = to;\\n\\n emit OwnershipTransferRequested(s_owner, to);\\n }\\n\\n /// @notice validate access\\n function _validateOwnership() internal view {\\n // solhint-disable-next-line gas-custom-errors\\n require(msg.sender == s_owner, \\\"Only callable by owner\\\");\\n }\\n\\n /// @notice Reverts if called by anyone other than the contract owner.\\n modifier onlyOwner() {\\n _validateOwnership();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x2422a055657a87e98be61f8f31abb1824ec50fd0f73949f4e3c6ac877efb6da8\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/shared/interfaces/IOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IOwnable {\\n function owner() external returns (address);\\n\\n function transferOwnership(address recipient) external;\\n\\n function acceptOwnership() external;\\n}\\n\",\"keccak256\":\"0x885de72b7b4e4f1bf8ba817a3f2bcc37fd9022d342c4ce76782151c30122d767\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport {IVRFCoordinatorV2Plus} from \\\"./interfaces/IVRFCoordinatorV2Plus.sol\\\";\\nimport {IVRFMigratableConsumerV2Plus} from \\\"./interfaces/IVRFMigratableConsumerV2Plus.sol\\\";\\nimport {ConfirmedOwner} from \\\"../../shared/access/ConfirmedOwner.sol\\\";\\n\\n/** ****************************************************************************\\n * @notice Interface for contracts using VRF randomness\\n * *****************************************************************************\\n * @dev PURPOSE\\n *\\n * @dev Reggie the Random Oracle (not his real job) wants to provide randomness\\n * @dev to Vera the verifier in such a way that Vera can be sure he's not\\n * @dev making his output up to suit himself. Reggie provides Vera a public key\\n * @dev to which he knows the secret key. Each time Vera provides a seed to\\n * @dev Reggie, he gives back a value which is computed completely\\n * @dev deterministically from the seed and the secret key.\\n *\\n * @dev Reggie provides a proof by which Vera can verify that the output was\\n * @dev correctly computed once Reggie tells it to her, but without that proof,\\n * @dev the output is indistinguishable to her from a uniform random sample\\n * @dev from the output space.\\n *\\n * @dev The purpose of this contract is to make it easy for unrelated contracts\\n * @dev to talk to Vera the verifier about the work Reggie is doing, to provide\\n * @dev simple access to a verifiable source of randomness. It ensures 2 things:\\n * @dev 1. The fulfillment came from the VRFCoordinatorV2Plus.\\n * @dev 2. The consumer contract implements fulfillRandomWords.\\n * *****************************************************************************\\n * @dev USAGE\\n *\\n * @dev Calling contracts must inherit from VRFConsumerBaseV2Plus, and can\\n * @dev initialize VRFConsumerBaseV2Plus's attributes in their constructor as\\n * @dev shown:\\n *\\n * @dev contract VRFConsumerV2Plus is VRFConsumerBaseV2Plus {\\n * @dev constructor(, address _vrfCoordinator, address _subOwner)\\n * @dev VRFConsumerBaseV2Plus(_vrfCoordinator, _subOwner) public {\\n * @dev \\n * @dev }\\n * @dev }\\n *\\n * @dev The oracle will have given you an ID for the VRF keypair they have\\n * @dev committed to (let's call it keyHash). Create a subscription, fund it\\n * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface\\n * @dev subscription management functions).\\n * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,\\n * @dev callbackGasLimit, numWords, extraArgs),\\n * @dev see (IVRFCoordinatorV2Plus for a description of the arguments).\\n *\\n * @dev Once the VRFCoordinatorV2Plus has received and validated the oracle's response\\n * @dev to your request, it will call your contract's fulfillRandomWords method.\\n *\\n * @dev The randomness argument to fulfillRandomWords is a set of random words\\n * @dev generated from your requestId and the blockHash of the request.\\n *\\n * @dev If your contract could have concurrent requests open, you can use the\\n * @dev requestId returned from requestRandomWords to track which response is associated\\n * @dev with which randomness request.\\n * @dev See \\\"SECURITY CONSIDERATIONS\\\" for principles to keep in mind,\\n * @dev if your contract could have multiple requests in flight simultaneously.\\n *\\n * @dev Colliding `requestId`s are cryptographically impossible as long as seeds\\n * @dev differ.\\n *\\n * *****************************************************************************\\n * @dev SECURITY CONSIDERATIONS\\n *\\n * @dev A method with the ability to call your fulfillRandomness method directly\\n * @dev could spoof a VRF response with any random value, so it's critical that\\n * @dev it cannot be directly called by anything other than this base contract\\n * @dev (specifically, by the VRFConsumerBaseV2Plus.rawFulfillRandomness method).\\n *\\n * @dev For your users to trust that your contract's random behavior is free\\n * @dev from malicious interference, it's best if you can write it so that all\\n * @dev behaviors implied by a VRF response are executed *during* your\\n * @dev fulfillRandomness method. If your contract must store the response (or\\n * @dev anything derived from it) and use it later, you must ensure that any\\n * @dev user-significant behavior which depends on that stored value cannot be\\n * @dev manipulated by a subsequent VRF request.\\n *\\n * @dev Similarly, both miners and the VRF oracle itself have some influence\\n * @dev over the order in which VRF responses appear on the blockchain, so if\\n * @dev your contract could have multiple VRF requests in flight simultaneously,\\n * @dev you must ensure that the order in which the VRF responses arrive cannot\\n * @dev be used to manipulate your contract's user-significant behavior.\\n *\\n * @dev Since the block hash of the block which contains the requestRandomness\\n * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful\\n * @dev miner could, in principle, fork the blockchain to evict the block\\n * @dev containing the request, forcing the request to be included in a\\n * @dev different block with a different hash, and therefore a different input\\n * @dev to the VRF. However, such an attack would incur a substantial economic\\n * @dev cost. This cost scales with the number of blocks the VRF oracle waits\\n * @dev until it calls responds to a request. It is for this reason that\\n * @dev that you can signal to an oracle you'd like them to wait longer before\\n * @dev responding to the request (however this is not enforced in the contract\\n * @dev and so remains effective only in the case of unmodified oracle software).\\n */\\nabstract contract VRFConsumerBaseV2Plus is IVRFMigratableConsumerV2Plus, ConfirmedOwner {\\n error OnlyCoordinatorCanFulfill(address have, address want);\\n error OnlyOwnerOrCoordinator(address have, address owner, address coordinator);\\n error ZeroAddress();\\n\\n // s_vrfCoordinator should be used by consumers to make requests to vrfCoordinator\\n // so that coordinator reference is updated after migration\\n IVRFCoordinatorV2Plus public s_vrfCoordinator;\\n\\n /**\\n * @param _vrfCoordinator address of VRFCoordinator contract\\n */\\n constructor(address _vrfCoordinator) ConfirmedOwner(msg.sender) {\\n if (_vrfCoordinator == address(0)) {\\n revert ZeroAddress();\\n }\\n s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);\\n }\\n\\n /**\\n * @notice fulfillRandomness handles the VRF response. Your contract must\\n * @notice implement it. See \\\"SECURITY CONSIDERATIONS\\\" above for important\\n * @notice principles to keep in mind when implementing your fulfillRandomness\\n * @notice method.\\n *\\n * @dev VRFConsumerBaseV2Plus expects its subcontracts to have a method with this\\n * @dev signature, and will call it once it has verified the proof\\n * @dev associated with the randomness. (It is triggered via a call to\\n * @dev rawFulfillRandomness, below.)\\n *\\n * @param requestId The Id initially returned by requestRandomness\\n * @param randomWords the VRF output expanded to the requested number of words\\n */\\n // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore\\n function fulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) internal virtual;\\n\\n // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF\\n // proof. rawFulfillRandomness then calls fulfillRandomness, after validating\\n // the origin of the call\\n function rawFulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) external {\\n if (msg.sender != address(s_vrfCoordinator)) {\\n revert OnlyCoordinatorCanFulfill(msg.sender, address(s_vrfCoordinator));\\n }\\n fulfillRandomWords(requestId, randomWords);\\n }\\n\\n /**\\n * @inheritdoc IVRFMigratableConsumerV2Plus\\n */\\n function setCoordinator(address _vrfCoordinator) external override onlyOwnerOrCoordinator {\\n if (_vrfCoordinator == address(0)) {\\n revert ZeroAddress();\\n }\\n s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);\\n\\n emit CoordinatorSet(_vrfCoordinator);\\n }\\n\\n modifier onlyOwnerOrCoordinator() {\\n if (msg.sender != owner() && msg.sender != address(s_vrfCoordinator)) {\\n revert OnlyOwnerOrCoordinator(msg.sender, owner(), address(s_vrfCoordinator));\\n }\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0c92838396c5abe72754ebeae526a0434dd53fdaf63e6b98111aebd6114cfcc2\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {VRFV2PlusClient} from \\\"../libraries/VRFV2PlusClient.sol\\\";\\nimport {IVRFSubscriptionV2Plus} from \\\"./IVRFSubscriptionV2Plus.sol\\\";\\n\\n// Interface that enables consumers of VRFCoordinatorV2Plus to be future-proof for upgrades\\n// This interface is supported by subsequent versions of VRFCoordinatorV2Plus\\ninterface IVRFCoordinatorV2Plus is IVRFSubscriptionV2Plus {\\n /**\\n * @notice Request a set of random words.\\n * @param req - a struct containing following fields for randomness request:\\n * keyHash - Corresponds to a particular oracle job which uses\\n * that key for generating the VRF proof. Different keyHash's have different gas price\\n * ceilings, so you can select a specific one to bound your maximum per request cost.\\n * subId - The ID of the VRF subscription. Must be funded\\n * with the minimum subscription balance required for the selected keyHash.\\n * requestConfirmations - How many blocks you'd like the\\n * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS\\n * for why you may want to request more. The acceptable range is\\n * [minimumRequestBlockConfirmations, 200].\\n * callbackGasLimit - How much gas you'd like to receive in your\\n * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords\\n * may be slightly less than this amount because of gas used calling the function\\n * (argument decoding etc.), so you may need to request slightly more than you expect\\n * to have inside fulfillRandomWords. The acceptable range is\\n * [0, maxGasLimit]\\n * numWords - The number of uint256 random values you'd like to receive\\n * in your fulfillRandomWords callback. Note these numbers are expanded in a\\n * secure way by the VRFCoordinator from a single random value supplied by the oracle.\\n * extraArgs - abi-encoded extra args\\n * @return requestId - A unique identifier of the request. Can be used to match\\n * a request to a response in fulfillRandomWords.\\n */\\n function requestRandomWords(VRFV2PlusClient.RandomWordsRequest calldata req) external returns (uint256 requestId);\\n}\\n\",\"keccak256\":\"0x7dca2a64690ddd95ee05e422e1f61e7c1d701aaf5be1390ae12e9bd144266c36\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFMigratableConsumerV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @notice The IVRFMigratableConsumerV2Plus interface defines the\\n/// @notice method required to be implemented by all V2Plus consumers.\\n/// @dev This interface is designed to be used in VRFConsumerBaseV2Plus.\\ninterface IVRFMigratableConsumerV2Plus {\\n event CoordinatorSet(address vrfCoordinator);\\n\\n /// @notice Sets the VRF Coordinator address\\n /// @notice This method should only be callable by the coordinator or contract owner\\n function setCoordinator(address vrfCoordinator) external;\\n}\\n\",\"keccak256\":\"0x8be8744e3b8380dc85354cf110e8caef8f394266e79120ad675a7da835ed2a85\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFSubscriptionV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @notice The IVRFSubscriptionV2Plus interface defines the subscription\\n/// @notice related methods implemented by the V2Plus coordinator.\\ninterface IVRFSubscriptionV2Plus {\\n /**\\n * @notice Add a consumer to a VRF subscription.\\n * @param subId - ID of the subscription\\n * @param consumer - New consumer which can use the subscription\\n */\\n function addConsumer(uint256 subId, address consumer) external;\\n\\n /**\\n * @notice Remove a consumer from a VRF subscription.\\n * @param subId - ID of the subscription\\n * @param consumer - Consumer to remove from the subscription\\n */\\n function removeConsumer(uint256 subId, address consumer) external;\\n\\n /**\\n * @notice Cancel a subscription\\n * @param subId - ID of the subscription\\n * @param to - Where to send the remaining LINK to\\n */\\n function cancelSubscription(uint256 subId, address to) external;\\n\\n /**\\n * @notice Accept subscription owner transfer.\\n * @param subId - ID of the subscription\\n * @dev will revert if original owner of subId has\\n * not requested that msg.sender become the new owner.\\n */\\n function acceptSubscriptionOwnerTransfer(uint256 subId) external;\\n\\n /**\\n * @notice Request subscription owner transfer.\\n * @param subId - ID of the subscription\\n * @param newOwner - proposed new owner of the subscription\\n */\\n function requestSubscriptionOwnerTransfer(uint256 subId, address newOwner) external;\\n\\n /**\\n * @notice Create a VRF subscription.\\n * @return subId - A unique subscription id.\\n * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.\\n * @dev Note to fund the subscription with LINK, use transferAndCall. For example\\n * @dev LINKTOKEN.transferAndCall(\\n * @dev address(COORDINATOR),\\n * @dev amount,\\n * @dev abi.encode(subId));\\n * @dev Note to fund the subscription with Native, use fundSubscriptionWithNative. Be sure\\n * @dev to send Native with the call, for example:\\n * @dev COORDINATOR.fundSubscriptionWithNative{value: amount}(subId);\\n */\\n function createSubscription() external returns (uint256 subId);\\n\\n /**\\n * @notice Get a VRF subscription.\\n * @param subId - ID of the subscription\\n * @return balance - LINK balance of the subscription in juels.\\n * @return nativeBalance - native balance of the subscription in wei.\\n * @return reqCount - Requests count of subscription.\\n * @return owner - owner of the subscription.\\n * @return consumers - list of consumer address which are able to use this subscription.\\n */\\n function getSubscription(\\n uint256 subId\\n )\\n external\\n view\\n returns (uint96 balance, uint96 nativeBalance, uint64 reqCount, address owner, address[] memory consumers);\\n\\n /*\\n * @notice Check to see if there exists a request commitment consumers\\n * for all consumers and keyhashes for a given sub.\\n * @param subId - ID of the subscription\\n * @return true if there exists at least one unfulfilled request for the subscription, false\\n * otherwise.\\n */\\n function pendingRequestExists(uint256 subId) external view returns (bool);\\n\\n /**\\n * @notice Paginate through all active VRF subscriptions.\\n * @param startIndex index of the subscription to start from\\n * @param maxCount maximum number of subscriptions to return, 0 to return all\\n * @dev the order of IDs in the list is **not guaranteed**, therefore, if making successive calls, one\\n * @dev should consider keeping the blockheight constant to ensure a holistic picture of the contract state\\n */\\n function getActiveSubscriptionIds(uint256 startIndex, uint256 maxCount) external view returns (uint256[] memory);\\n\\n /**\\n * @notice Fund a subscription with native.\\n * @param subId - ID of the subscription\\n * @notice This method expects msg.value to be greater than or equal to 0.\\n */\\n function fundSubscriptionWithNative(uint256 subId) external payable;\\n}\\n\",\"keccak256\":\"0x85b348297ce36794e3bf97a47c001fc216bd0ee243e91514a7b395f3fcd189b0\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n// End consumer library.\\nlibrary VRFV2PlusClient {\\n // extraArgs will evolve to support new features\\n bytes4 public constant EXTRA_ARGS_V1_TAG = bytes4(keccak256(\\\"VRF ExtraArgsV1\\\"));\\n struct ExtraArgsV1 {\\n bool nativePayment;\\n }\\n\\n struct RandomWordsRequest {\\n bytes32 keyHash;\\n uint256 subId;\\n uint16 requestConfirmations;\\n uint32 callbackGasLimit;\\n uint32 numWords;\\n bytes extraArgs;\\n }\\n\\n function _argsToBytes(ExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {\\n return abi.encodeWithSelector(EXTRA_ARGS_V1_TAG, extraArgs);\\n }\\n}\\n\",\"keccak256\":\"0x839ad7a737ef18147b518b4ec3cbaf4a49dc994db65cf8369ed4e69d169a98a6\",\"license\":\"MIT\"},\"src/rng/ChainlinkRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {VRFConsumerBaseV2Plus, IVRFCoordinatorV2Plus} from \\\"@chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol\\\";\\nimport {VRFV2PlusClient} from \\\"@chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol\\\";\\n\\nimport \\\"./RNG.sol\\\";\\n\\n/// @title Random Number Generator that uses Chainlink VRF v2.5\\n/// https://blog.chain.link/introducing-vrf-v2-5/\\ncontract ChainlinkRNG is RNG, VRFConsumerBaseV2Plus {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The address that can withdraw funds.\\n address public sortitionModule; // The address of the SortitionModule.\\n bytes32 public keyHash; // The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).\\n uint256 public subscriptionId; // The unique identifier of the subscription used for funding requests.\\n uint16 public requestConfirmations; // How many confirmations the Chainlink node should wait before responding.\\n // 22 bytes remaining in slot\\n uint32 public callbackGasLimit; // Gas limit for the Chainlink callback.\\n uint256 public lastRequestId; // The last request ID.\\n mapping(uint256 requestId => uint256 number) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a request is sent to the VRF Coordinator\\n /// @param requestId The ID of the request\\n event RequestSent(uint256 indexed requestId);\\n\\n /// Emitted when a request has been fulfilled.\\n /// @param requestId The ID of the request\\n /// @param randomWord The random value answering the request.\\n event RequestFulfilled(uint256 indexed requestId, uint256 randomWord);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor only\\\");\\n _;\\n }\\n\\n modifier onlyBySortitionModule() {\\n require(sortitionModule == msg.sender, \\\"SortitionModule only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n /// @param _governor The Governor of the contract.\\n /// @param _sortitionModule The address of the SortitionModule contract.\\n /// @param _vrfCoordinator The address of the VRFCoordinator contract.\\n /// @param _keyHash The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).\\n /// @param _subscriptionId The unique identifier of the subscription used for funding requests.\\n /// @param _requestConfirmations How many confirmations the Chainlink node should wait before responding.\\n /// @param _callbackGasLimit The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function.\\n /// @dev https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number\\n constructor(\\n address _governor,\\n address _sortitionModule,\\n address _vrfCoordinator,\\n bytes32 _keyHash,\\n uint256 _subscriptionId,\\n uint16 _requestConfirmations,\\n uint32 _callbackGasLimit\\n ) VRFConsumerBaseV2Plus(_vrfCoordinator) {\\n governor = _governor;\\n sortitionModule = _sortitionModule;\\n keyHash = _keyHash;\\n subscriptionId = _subscriptionId;\\n requestConfirmations = _requestConfirmations;\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the sortition module of the contract.\\n /// @param _sortitionModule The new sortition module.\\n function changeSortitionModule(address _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Changes the VRF Coordinator of the contract.\\n /// @param _vrfCoordinator The new VRF Coordinator.\\n function changeVrfCoordinator(address _vrfCoordinator) external onlyByGovernor {\\n s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);\\n emit CoordinatorSet(_vrfCoordinator);\\n }\\n\\n /// @dev Changes the key hash of the contract.\\n /// @param _keyHash The new key hash.\\n function changeKeyHash(bytes32 _keyHash) external onlyByGovernor {\\n keyHash = _keyHash;\\n }\\n\\n /// @dev Changes the subscription ID of the contract.\\n /// @param _subscriptionId The new subscription ID.\\n function changeSubscriptionId(uint256 _subscriptionId) external onlyByGovernor {\\n subscriptionId = _subscriptionId;\\n }\\n\\n /// @dev Changes the request confirmations of the contract.\\n /// @param _requestConfirmations The new request confirmations.\\n function changeRequestConfirmations(uint16 _requestConfirmations) external onlyByGovernor {\\n requestConfirmations = _requestConfirmations;\\n }\\n\\n /// @dev Changes the callback gas limit of the contract.\\n /// @param _callbackGasLimit The new callback gas limit.\\n function changeCallbackGasLimit(uint32 _callbackGasLimit) external onlyByGovernor {\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Request a random number. SortitionModule only.\\n function requestRandomness(uint256 /*_block*/) external override onlyBySortitionModule {\\n // Will revert if subscription is not set and funded.\\n uint256 requestId = s_vrfCoordinator.requestRandomWords(\\n VRFV2PlusClient.RandomWordsRequest({\\n keyHash: keyHash,\\n subId: subscriptionId,\\n requestConfirmations: requestConfirmations,\\n callbackGasLimit: callbackGasLimit,\\n numWords: 1,\\n extraArgs: VRFV2PlusClient._argsToBytes(\\n // Set nativePayment to true to pay for VRF requests with ETH instead of LINK\\n VRFV2PlusClient.ExtraArgsV1({nativePayment: true})\\n )\\n })\\n );\\n lastRequestId = requestId;\\n emit RequestSent(requestId);\\n }\\n\\n /// @dev Callback function called by the VRF Coordinator when the random value is generated.\\n /// @param _requestId The ID of the request.\\n /// @param _randomWords The random values answering the request.\\n function fulfillRandomWords(uint256 _requestId, uint256[] calldata _randomWords) internal override {\\n // Access control is handled by the parent VRFCoordinator.rawFulfillRandomWords()\\n randomNumbers[_requestId] = _randomWords[0];\\n emit RequestFulfilled(_requestId, _randomWords[0]);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Return the random number.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 /*_block*/) external view override returns (uint256 randomNumber) {\\n randomNumber = randomNumbers[lastRequestId];\\n }\\n}\\n\",\"keccak256\":\"0xf132cbbbbb47a4f11c248fab30212a3dd3e7b20b1bc5b543ff21b6d291367dc8\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0xf92e0cf768afefc5cc6ef786c263b67dd00c021aa5753213dbbc33014adb68c5\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000f6038038062000f6083398101604081905262000034916200022d565b8433806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000165565b5050506001600160a01b038116620000ea5760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b03199081166001600160a01b03938416179091556003805482169983169990991790985560048054909816961695909517909555600591909155600655506007805461ffff90931665ffffffffffff19909316929092176201000063ffffffff90921691909102179055620002c5565b336001600160a01b03821603620001bf5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200022857600080fd5b919050565b600080600080600080600060e0888a0312156200024957600080fd5b620002548862000210565b9650620002646020890162000210565b9550620002746040890162000210565b9450606088015193506080880151925060a088015161ffff811681146200029a57600080fd5b60c089015190925063ffffffff81168114620002b557600080fd5b8091505092959891949750929550565b610c8b80620002d56000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c806379ba5097116100c3578063e4c0aaf41161007c578063e4c0aaf4146102e5578063e86a51cb146102f8578063f2fde38b1461030b578063f50d390d1461031e578063f9f5dd9114610331578063fc2a88c31461034457600080fd5b806379ba5097146102725780638da5cb5b1461027a5780638ea981171461028b5780639eccacf61461029e578063b0049637146102b1578063b0fb162f146102c457600080fd5b80632e1daf2f116101155780632e1daf2f146101fd5780632f68f4821461021057806339b1e245146102235780635257cd901461023657806361728f39146102565780637363ae1f1461025f57600080fd5b806309c1ba2e146101525780630c340a241461016e57806313cf9054146101995780631fe543e3146101bd57806324f74697146101d2575b600080fd5b61015b60065481565b6040519081526020015b60405180910390f35b600354610181906001600160a01b031681565b6040516001600160a01b039091168152602001610165565b61015b6101a7366004610a4f565b5060085460009081526009602052604090205490565b6101d06101cb366004610a68565b61034d565b005b6007546101e89062010000900463ffffffff1681565b60405163ffffffff9091168152602001610165565b600454610181906001600160a01b031681565b6101d061021e366004610a4f565b6103a2565b6101d0610231366004610a4f565b6103d1565b61015b610244366004610a4f565b60096020526000908152604090205481565b61015b60055481565b6101d061026d366004610a4f565b610400565b6101d061055b565b6000546001600160a01b0316610181565b6101d0610299366004610ae7565b610605565b600254610181906001600160a01b031681565b6101d06102bf366004610ae7565b6106f7565b6007546102d29061ffff1681565b60405161ffff9091168152602001610165565b6101d06102f3366004610ae7565b610743565b6101d0610306366004610b17565b61078f565b6101d0610319366004610ae7565b6107dd565b6101d061032c366004610b3d565b6107f1565b6101d061033f366004610ae7565b610833565b61015b60085481565b6002546001600160a01b031633146103925760025460405163073e64fd60e21b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b61039d83838361085d565b505050565b6003546001600160a01b031633146103cc5760405162461bcd60e51b815260040161038990610b61565b600555565b6003546001600160a01b031633146103fb5760405162461bcd60e51b815260040161038990610b61565b600655565b6004546001600160a01b031633146104515760405162461bcd60e51b8152602060048201526014602482015273536f72746974696f6e4d6f64756c65206f6e6c7960601b6044820152606401610389565b6002546040805160c081018252600554815260065460208083019190915260075461ffff81168385015262010000900463ffffffff16606083015260016080830181905283519182019093529182526000926001600160a01b031691639b1c385e919060a08201906104c2906108e6565b8152506040518263ffffffff1660e01b81526004016104e19190610b88565b6020604051808303816000875af1158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190610c26565b600881905560405190915081907f0cd21a41891ff04ecd9a8754bec97e2fb85d2a4e7694329d4dc364c796f23d0690600090a25050565b6001546001600160a01b031633146105ae5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610389565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000546001600160a01b0316331480159061062b57506002546001600160a01b03163314155b1561067c57336106436000546001600160a01b031690565b60025460405163061db9c160e01b81526001600160a01b0393841660048201529183166024830152919091166044820152606401610389565b6001600160a01b0381166106a35760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b6003546001600160a01b031633146107215760405162461bcd60e51b815260040161038990610b61565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331461076d5760405162461bcd60e51b815260040161038990610b61565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031633146107b95760405162461bcd60e51b815260040161038990610b61565b6007805463ffffffff909216620100000265ffffffff000019909216919091179055565b6107e5610957565b6107ee816109ac565b50565b6003546001600160a01b0316331461081b5760405162461bcd60e51b815260040161038990610b61565b6007805461ffff191661ffff92909216919091179055565b6003546001600160a01b031633146106a35760405162461bcd60e51b815260040161038990610b61565b8181600081811061087057610870610c3f565b905060200201356009600085815260200190815260200160002081905550827f5c69e7026b653d8606b5613bb00fd8c4b0504b1cbe8db600c406faac180924d5838360008181106108c3576108c3610c3f565b905060200201356040516108d991815260200190565b60405180910390a2505050565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161091f91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b6000546001600160a01b031633146109aa5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610389565b565b336001600160a01b038216036109fe5760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610389565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215610a6157600080fd5b5035919050565b600080600060408486031215610a7d57600080fd5b83359250602084013567ffffffffffffffff80821115610a9c57600080fd5b818601915086601f830112610ab057600080fd5b813581811115610abf57600080fd5b8760208260051b8501011115610ad457600080fd5b6020830194508093505050509250925092565b600060208284031215610af957600080fd5b81356001600160a01b0381168114610b1057600080fd5b9392505050565b600060208284031215610b2957600080fd5b813563ffffffff81168114610b1057600080fd5b600060208284031215610b4f57600080fd5b813561ffff81168114610b1057600080fd5b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b60006020808352835160208401526020840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610c015782810184015186820161010001528301610be4565b506101009250600083828701015282601f19601f830116860101935050505092915050565b600060208284031215610c3857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fdfea26469706673582212201c20e67178fd79424f46cb830b3496516dfa70ea88c1d07b59de6b70b0f17ca764736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c806379ba5097116100c3578063e4c0aaf41161007c578063e4c0aaf4146102e5578063e86a51cb146102f8578063f2fde38b1461030b578063f50d390d1461031e578063f9f5dd9114610331578063fc2a88c31461034457600080fd5b806379ba5097146102725780638da5cb5b1461027a5780638ea981171461028b5780639eccacf61461029e578063b0049637146102b1578063b0fb162f146102c457600080fd5b80632e1daf2f116101155780632e1daf2f146101fd5780632f68f4821461021057806339b1e245146102235780635257cd901461023657806361728f39146102565780637363ae1f1461025f57600080fd5b806309c1ba2e146101525780630c340a241461016e57806313cf9054146101995780631fe543e3146101bd57806324f74697146101d2575b600080fd5b61015b60065481565b6040519081526020015b60405180910390f35b600354610181906001600160a01b031681565b6040516001600160a01b039091168152602001610165565b61015b6101a7366004610a4f565b5060085460009081526009602052604090205490565b6101d06101cb366004610a68565b61034d565b005b6007546101e89062010000900463ffffffff1681565b60405163ffffffff9091168152602001610165565b600454610181906001600160a01b031681565b6101d061021e366004610a4f565b6103a2565b6101d0610231366004610a4f565b6103d1565b61015b610244366004610a4f565b60096020526000908152604090205481565b61015b60055481565b6101d061026d366004610a4f565b610400565b6101d061055b565b6000546001600160a01b0316610181565b6101d0610299366004610ae7565b610605565b600254610181906001600160a01b031681565b6101d06102bf366004610ae7565b6106f7565b6007546102d29061ffff1681565b60405161ffff9091168152602001610165565b6101d06102f3366004610ae7565b610743565b6101d0610306366004610b17565b61078f565b6101d0610319366004610ae7565b6107dd565b6101d061032c366004610b3d565b6107f1565b6101d061033f366004610ae7565b610833565b61015b60085481565b6002546001600160a01b031633146103925760025460405163073e64fd60e21b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b61039d83838361085d565b505050565b6003546001600160a01b031633146103cc5760405162461bcd60e51b815260040161038990610b61565b600555565b6003546001600160a01b031633146103fb5760405162461bcd60e51b815260040161038990610b61565b600655565b6004546001600160a01b031633146104515760405162461bcd60e51b8152602060048201526014602482015273536f72746974696f6e4d6f64756c65206f6e6c7960601b6044820152606401610389565b6002546040805160c081018252600554815260065460208083019190915260075461ffff81168385015262010000900463ffffffff16606083015260016080830181905283519182019093529182526000926001600160a01b031691639b1c385e919060a08201906104c2906108e6565b8152506040518263ffffffff1660e01b81526004016104e19190610b88565b6020604051808303816000875af1158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190610c26565b600881905560405190915081907f0cd21a41891ff04ecd9a8754bec97e2fb85d2a4e7694329d4dc364c796f23d0690600090a25050565b6001546001600160a01b031633146105ae5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610389565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000546001600160a01b0316331480159061062b57506002546001600160a01b03163314155b1561067c57336106436000546001600160a01b031690565b60025460405163061db9c160e01b81526001600160a01b0393841660048201529183166024830152919091166044820152606401610389565b6001600160a01b0381166106a35760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b6003546001600160a01b031633146107215760405162461bcd60e51b815260040161038990610b61565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331461076d5760405162461bcd60e51b815260040161038990610b61565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031633146107b95760405162461bcd60e51b815260040161038990610b61565b6007805463ffffffff909216620100000265ffffffff000019909216919091179055565b6107e5610957565b6107ee816109ac565b50565b6003546001600160a01b0316331461081b5760405162461bcd60e51b815260040161038990610b61565b6007805461ffff191661ffff92909216919091179055565b6003546001600160a01b031633146106a35760405162461bcd60e51b815260040161038990610b61565b8181600081811061087057610870610c3f565b905060200201356009600085815260200190815260200160002081905550827f5c69e7026b653d8606b5613bb00fd8c4b0504b1cbe8db600c406faac180924d5838360008181106108c3576108c3610c3f565b905060200201356040516108d991815260200190565b60405180910390a2505050565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161091f91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b6000546001600160a01b031633146109aa5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610389565b565b336001600160a01b038216036109fe5760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610389565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215610a6157600080fd5b5035919050565b600080600060408486031215610a7d57600080fd5b83359250602084013567ffffffffffffffff80821115610a9c57600080fd5b818601915086601f830112610ab057600080fd5b813581811115610abf57600080fd5b8760208260051b8501011115610ad457600080fd5b6020830194508093505050509250925092565b600060208284031215610af957600080fd5b81356001600160a01b0381168114610b1057600080fd5b9392505050565b600060208284031215610b2957600080fd5b813563ffffffff81168114610b1057600080fd5b600060208284031215610b4f57600080fd5b813561ffff81168114610b1057600080fd5b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b60006020808352835160208401526020840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610c015782810184015186820161010001528301610be4565b506101009250600083828701015282601f19601f830116860101935050505092915050565b600060208284031215610c3857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fdfea26469706673582212201c20e67178fd79424f46cb830b3496516dfa70ea88c1d07b59de6b70b0f17ca764736f6c63430008180033", - "devdoc": { - "events": { - "RequestFulfilled(uint256,uint256)": { - "params": { - "randomWord": "The random value answering the request.", - "requestId": "The ID of the request" - } - }, - "RequestSent(uint256)": { - "details": "Emitted when a request is sent to the VRF Coordinator", - "params": { - "requestId": "The ID of the request" - } - } - }, - "kind": "dev", - "methods": { - "changeCallbackGasLimit(uint32)": { - "details": "Changes the callback gas limit of the contract.", - "params": { - "_callbackGasLimit": "The new callback gas limit." - } - }, - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "changeKeyHash(bytes32)": { - "details": "Changes the key hash of the contract.", - "params": { - "_keyHash": "The new key hash." - } - }, - "changeRequestConfirmations(uint16)": { - "details": "Changes the request confirmations of the contract.", - "params": { - "_requestConfirmations": "The new request confirmations." - } - }, - "changeSortitionModule(address)": { - "details": "Changes the sortition module of the contract.", - "params": { - "_sortitionModule": "The new sortition module." - } - }, - "changeSubscriptionId(uint256)": { - "details": "Changes the subscription ID of the contract.", - "params": { - "_subscriptionId": "The new subscription ID." - } - }, - "changeVrfCoordinator(address)": { - "details": "Changes the VRF Coordinator of the contract.", - "params": { - "_vrfCoordinator": "The new VRF Coordinator." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface.https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number", - "params": { - "_callbackGasLimit": "The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function.", - "_governor": "The Governor of the contract.", - "_keyHash": "The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).", - "_requestConfirmations": "How many confirmations the Chainlink node should wait before responding.", - "_sortitionModule": "The address of the SortitionModule contract.", - "_subscriptionId": "The unique identifier of the subscription used for funding requests.", - "_vrfCoordinator": "The address of the VRFCoordinator contract." - } - }, - "receiveRandomness(uint256)": { - "details": "Return the random number.", - "returns": { - "randomNumber": "The random number or 0 if it is not ready or has not been requested." - } - }, - "requestRandomness(uint256)": { - "details": "Request a random number. SortitionModule only." - } - }, - "title": "Random Number Generator that uses Chainlink VRF v2.5 https://blog.chain.link/introducing-vrf-v2-5/", - "version": 1 - }, - "userdoc": { - "events": { - "RequestFulfilled(uint256,uint256)": { - "notice": "Emitted when a request has been fulfilled." - } - }, - "kind": "user", - "methods": { - "acceptOwnership()": { - "notice": "Allows an ownership transfer to be completed by the recipient." - }, - "owner()": { - "notice": "Get the current owner" - }, - "setCoordinator(address)": { - "notice": "Sets the VRF Coordinator addressThis method should only be callable by the coordinator or contract owner" - }, - "transferOwnership(address)": { - "notice": "Allows an owner to begin transferring ownership to a new address." - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 29, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "s_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 31, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "s_pendingOwner", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 231, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "s_vrfCoordinator", - "offset": 0, - "slot": "2", - "type": "t_contract(IVRFCoordinatorV2Plus)380" - }, - { - "astId": 35404, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "governor", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 35406, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "sortitionModule", - "offset": 0, - "slot": "4", - "type": "t_address" - }, - { - "astId": 35408, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "keyHash", - "offset": 0, - "slot": "5", - "type": "t_bytes32" - }, - { - "astId": 35410, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "subscriptionId", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 35412, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "requestConfirmations", - "offset": 0, - "slot": "7", - "type": "t_uint16" - }, - { - "astId": 35414, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "callbackGasLimit", - "offset": 2, - "slot": "7", - "type": "t_uint32" - }, - { - "astId": 35416, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "lastRequestId", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 35420, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "randomNumbers", - "offset": 0, - "slot": "9", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IVRFCoordinatorV2Plus)380": { - "encoding": "inplace", - "label": "contract IVRFCoordinatorV2Plus", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "encoding": "inplace", - "label": "uint32", - "numberOfBytes": "4" - } - } - } -} diff --git a/contracts/deployments/arbitrum/ChainlinkVRFCoordinator.json b/contracts/deployments/arbitrum/ChainlinkVRFCoordinator.json deleted file mode 100644 index 1c7b0579a..000000000 --- a/contracts/deployments/arbitrum/ChainlinkVRFCoordinator.json +++ /dev/null @@ -1,1753 +0,0 @@ -{ - "address": "0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "blockhashStore", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "internalBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "externalBalance", - "type": "uint256" - } - ], - "name": "BalanceInvariantViolated", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "blockNum", - "type": "uint256" - } - ], - "name": "BlockhashNotInStore", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorAlreadyRegistered", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorNotRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "FailedToSendNative", - "type": "error" - }, - { - "inputs": [], - "name": "FailedToTransferLink", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "have", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "want", - "type": "uint32" - } - ], - "name": "GasLimitTooBig", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxGas", - "type": "uint256" - } - ], - "name": "GasPriceExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectCommitment", - "type": "error" - }, - { - "inputs": [], - "name": "IndexOutOfRange", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidCalldata", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "InvalidConsumer", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidExtraArgsTag", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "linkWei", - "type": "int256" - } - ], - "name": "InvalidLinkWeiPrice", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "premiumPercentage", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "max", - "type": "uint8" - } - ], - "name": "InvalidPremiumPercentage", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "have", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "min", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "max", - "type": "uint16" - } - ], - "name": "InvalidRequestConfirmations", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidSubscription", - "type": "error" - }, - { - "inputs": [], - "name": "LinkAlreadySet", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "flatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "flatFeeNativePPM", - "type": "uint32" - } - ], - "name": "LinkDiscountTooHigh", - "type": "error" - }, - { - "inputs": [], - "name": "LinkNotSet", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "have", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "max", - "type": "uint32" - } - ], - "name": "MsgDataTooBig", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "proposedOwner", - "type": "address" - } - ], - "name": "MustBeRequestedOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "MustBeSubOwner", - "type": "error" - }, - { - "inputs": [], - "name": "NoCorrespondingRequest", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - } - ], - "name": "NoSuchProvingKey", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "have", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "want", - "type": "uint32" - } - ], - "name": "NumWordsTooBig", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyCallableFromLink", - "type": "error" - }, - { - "inputs": [], - "name": "PaymentTooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "PendingRequestExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - } - ], - "name": "ProvingKeyAlreadyRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "Reentrant", - "type": "error" - }, - { - "inputs": [], - "name": "TooManyConsumers", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "maxGasLimit", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "stalenessSeconds", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "gasAfterPaymentCalculation", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "int256", - "name": "fallbackWeiPerUnitLink", - "type": "int256" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "fulfillmentFlatFeeNativePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "fulfillmentFlatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "nativePremiumPercentage", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "linkPremiumPercentage", - "type": "uint8" - } - ], - "name": "ConfigSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorDeregistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "fallbackWeiPerUnitLink", - "type": "int256" - } - ], - "name": "FallbackWeiPerUnitLinkUsed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "FundsRecovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newCoordinator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "MigrationCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "NativeFundsRecovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "name": "ProvingKeyDeregistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "name": "ProvingKeyRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outputSeed", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "payment", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "nativePayment", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "success", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "onlyPremium", - "type": "bool" - } - ], - "name": "RandomWordsFulfilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "preSeed", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "callbackGasLimit", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "numWords", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraArgs", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RandomWordsRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountLink", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountNative", - "type": "uint256" - } - ], - "name": "SubscriptionCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "SubscriptionConsumerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "SubscriptionConsumerRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "SubscriptionCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "SubscriptionFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldNativeBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newNativeBalance", - "type": "uint256" - } - ], - "name": "SubscriptionFundedWithNative", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "SubscriptionOwnerTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "SubscriptionOwnerTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "BLOCKHASH_STORE", - "outputs": [ - { - "internalType": "contract BlockhashStoreInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LINK", - "outputs": [ - { - "internalType": "contract LinkTokenInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LINK_NATIVE_FEED", - "outputs": [ - { - "internalType": "contract AggregatorV3Interface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_CONSUMERS", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_NUM_WORDS", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_REQUEST_CONFIRMATIONS", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "acceptSubscriptionOwnerTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "addConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "cancelSubscription", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "createSubscription", - "outputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "deregisterMigratableCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[2]", - "name": "publicProvingKey", - "type": "uint256[2]" - } - ], - "name": "deregisterProvingKey", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256[2]", - "name": "pk", - "type": "uint256[2]" - }, - { - "internalType": "uint256[2]", - "name": "gamma", - "type": "uint256[2]" - }, - { - "internalType": "uint256", - "name": "c", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "s", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "seed", - "type": "uint256" - }, - { - "internalType": "address", - "name": "uWitness", - "type": "address" - }, - { - "internalType": "uint256[2]", - "name": "cGammaWitness", - "type": "uint256[2]" - }, - { - "internalType": "uint256[2]", - "name": "sHashWitness", - "type": "uint256[2]" - }, - { - "internalType": "uint256", - "name": "zInv", - "type": "uint256" - } - ], - "internalType": "struct VRF.Proof", - "name": "proof", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint64", - "name": "blockNum", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "callbackGasLimit", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "numWords", - "type": "uint32" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "bytes", - "name": "extraArgs", - "type": "bytes" - } - ], - "internalType": "struct VRFTypes.RequestCommitmentV2Plus", - "name": "rc", - "type": "tuple" - }, - { - "internalType": "bool", - "name": "onlyPremium", - "type": "bool" - } - ], - "name": "fulfillRandomWords", - "outputs": [ - { - "internalType": "uint96", - "name": "payment", - "type": "uint96" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "fundSubscriptionWithNative", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxCount", - "type": "uint256" - } - ], - "name": "getActiveSubscriptionIds", - "outputs": [ - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "getSubscription", - "outputs": [ - { - "internalType": "uint96", - "name": "balance", - "type": "uint96" - }, - { - "internalType": "uint96", - "name": "nativeBalance", - "type": "uint96" - }, - { - "internalType": "uint64", - "name": "reqCount", - "type": "uint64" - }, - { - "internalType": "address", - "name": "subOwner", - "type": "address" - }, - { - "internalType": "address[]", - "name": "consumers", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[2]", - "name": "publicKey", - "type": "uint256[2]" - } - ], - "name": "hashOfKey", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "newCoordinator", - "type": "address" - } - ], - "name": "migrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "ownerCancelSubscription", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "pendingRequestExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "recoverFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - } - ], - "name": "recoverNativeFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "registerMigratableCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[2]", - "name": "publicProvingKey", - "type": "uint256[2]" - }, - { - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "name": "registerProvingKey", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "removeConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "requestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "callbackGasLimit", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "numWords", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "extraArgs", - "type": "bytes" - } - ], - "internalType": "struct VRFV2PlusClient.RandomWordsRequest", - "name": "req", - "type": "tuple" - } - ], - "name": "requestRandomWords", - "outputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "requestSubscriptionOwnerTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "s_config", - "outputs": [ - { - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "maxGasLimit", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "reentrancyLock", - "type": "bool" - }, - { - "internalType": "uint32", - "name": "stalenessSeconds", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "gasAfterPaymentCalculation", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeNativePPM", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "internalType": "uint8", - "name": "nativePremiumPercentage", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "linkPremiumPercentage", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_currentSubNonce", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_fallbackWeiPerUnitLink", - "outputs": [ - { - "internalType": "int256", - "name": "", - "type": "int256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "s_provingKeyHashes", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "s_provingKeys", - "outputs": [ - { - "internalType": "bool", - "name": "exists", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "s_requestCommitments", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_totalBalance", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_totalNativeBalance", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "maxGasLimit", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "stalenessSeconds", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "gasAfterPaymentCalculation", - "type": "uint32" - }, - { - "internalType": "int256", - "name": "fallbackWeiPerUnitLink", - "type": "int256" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeNativePPM", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "internalType": "uint8", - "name": "nativePremiumPercentage", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "linkPremiumPercentage", - "type": "uint8" - } - ], - "name": "setConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "link", - "type": "address" - }, - { - "internalType": "address", - "name": "linkNativeFeed", - "type": "address" - } - ], - "name": "setLINKAndLINKNativeFeed", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawNative", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} diff --git a/contracts/deployments/arbitrum/DAI.json b/contracts/deployments/arbitrum/DAI.json deleted file mode 100644 index a7e7b954c..000000000 --- a/contracts/deployments/arbitrum/DAI.json +++ /dev/null @@ -1,501 +0,0 @@ -{ - "address": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "usr", - "type": "address" - } - ], - "name": "Deny", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "usr", - "type": "address" - } - ], - "name": "Rely", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "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": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "usr", - "type": "address" - } - ], - "name": "deny", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deploymentChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "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": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "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": "address", - "name": "usr", - "type": "address" - } - ], - "name": "rely", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "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": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "wards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ] -} diff --git a/contracts/deployments/arbitrum/DisputeKitClassic.json b/contracts/deployments/arbitrum/DisputeKitClassic.json deleted file mode 100644 index 31c3cb61e..000000000 --- a/contracts/deployments/arbitrum/DisputeKitClassic.json +++ /dev/null @@ -1,1210 +0,0 @@ -{ - "address": "0x70B464be85A547144C72485eBa2577E5D3A45421", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x70B464be85A547144C72485eBa2577E5D3A45421", - "transactionIndex": 3, - "gasUsed": "370687", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000004000000000000000000000000000000000000000000400000000800000000000000000000000000000000", - "blockHash": "0x9ef5590771fb4a09e609e46729eb2f307ec8c215acedbd827de6d56b3a8f2577", - "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 272063168, - "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", - "address": "0x70B464be85A547144C72485eBa2577E5D3A45421", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 9, - "blockHash": "0x9ef5590771fb4a09e609e46729eb2f307ec8c215acedbd827de6d56b3a8f2577" - } - ], - "blockNumber": 272063168, - "cumulativeGasUsed": "1689314", - "status": 1, - "byzantium": true - }, - "args": [ - "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 3, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Workaround to get meaningful names for the proxy contracts Otherwise all the contracts are called `UUPSProxy` on the chain explorers\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicNeoProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220eea8f233cb9fa7bae3071b9ec684aad8d8ce0e9da5dee492e9eceaf08691ee9a64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220eea8f233cb9fa7bae3071b9ec684aad8d8ce0e9da5dee492e9eceaf08691ee9a64736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" - ] - }, - "implementation": "0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "notice": "Workaround to get meaningful names for the proxy contracts Otherwise all the contracts are called `UUPSProxy` on the chain explorers", - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitClassic_Implementation.json b/contracts/deployments/arbitrum/DisputeKitClassic_Implementation.json deleted file mode 100644 index c8d5c2f3b..000000000 --- a/contracts/deployments/arbitrum/DisputeKitClassic_Implementation.json +++ /dev/null @@ -1,1852 +0,0 @@ -{ - "address": "0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x4b4f029f6b84bc9f9837ae9772fc5346d2180800e0cb9c438d0cc48a50b0d351", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC", - "transactionIndex": 1, - "gasUsed": "3901523", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000800000000000000000000000080000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe9e88b748f3360750a3cb17ef664e7c7690b241730adac47b9be0313181a449c", - "transactionHash": "0x4b4f029f6b84bc9f9837ae9772fc5346d2180800e0cb9c438d0cc48a50b0d351", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 364034049, - "transactionHash": "0x4b4f029f6b84bc9f9837ae9772fc5346d2180800e0cb9c438d0cc48a50b0d351", - "address": "0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0xe9e88b748f3360750a3cb17ef664e7c7690b241730adac47b9be0313181a449c" - } - ], - "blockNumber": 364034049, - "cumulativeGasUsed": "3901523", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":\"DisputeKitClassic\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0xfe30d2fa9e1f882d77900894c0b4389e38f91b937e3c095f87bf255488cefd8b\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516143f36100fc600039600081816118130152818161183c0152611a3401526143f36000f3fe6080604052600436106102205760003560e01c80636d4cd8ea1161012e578063c0c53b8b116100ab578063f2f4eb261161006f578063f2f4eb2614610718578063f32ab92714610738578063f7e7d1fd1461076d578063f8abee101461078d578063fc6f8f16146107bd57600080fd5b8063c0c53b8b14610698578063d2b8035a146106b8578063da3beb8c146106d8578063e349ad301461058a578063e4c0aaf4146106f857600080fd5b8063a7cc08fe116100f2578063a7cc08fe146105e0578063b34bfaa81461062c578063b6ede54014610642578063ba66fde714610662578063be4676041461068257600080fd5b80636d4cd8ea1461054a578063751accd01461056a578063796490f91461058a5780637c04034e146105a05780638e426460146105c057600080fd5b80634b2f0ea0116101bc5780635a155ccd116101805780635a155ccd1461044f5780635c92e2f61461049057806365540b96146104b0578063675926f6146104dd57806369f3f041146104fd57600080fd5b80634b2f0ea0146103a45780634f1ef286146103b957806352d1902d146103cc57806354fd4d50146103e1578063564a565d1461042057600080fd5b80630855bbe9146102255780630baa64d11461025a5780630c340a241461027a5780631200aabc146102b25780631c3db16d146102ed5780631cc3423a1461032a5780632621b9a21461034a5780632d68efc914610364578063362c347914610384575b600080fd5b34801561023157600080fd5b50610245610240366004613814565b6107dd565b60405190151581526020015b60405180910390f35b34801561026657600080fd5b50610245610275366004613814565b6108a5565b34801561028657600080fd5b5060005461029a906001600160a01b031681565b6040516001600160a01b039091168152602001610251565b3480156102be57600080fd5b506102df6102cd366004613814565b60036020526000908152604090205481565b604051908152602001610251565b3480156102f957600080fd5b5061030d610308366004613814565b61091c565b604080519384529115156020840152151590820152606001610251565b34801561033657600080fd5b506102df6103453660046138d7565b610a8a565b34801561035657600080fd5b506004546102459060ff1681565b34801561037057600080fd5b5060075461029a906001600160a01b031681565b34801561039057600080fd5b506102df61039f36600461393b565b610aba565b6103b76103b2366004613978565b610f6f565b005b6103b76103c736600461399a565b6117ff565b3480156103d857600080fd5b506102df611a27565b3480156103ed57600080fd5b50610413604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102519190613a39565b34801561042c57600080fd5b5061044061043b366004613814565b611a85565b60405161025193929190613a4c565b34801561045b57600080fd5b5061024561046a366004613a6d565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b34801561049c57600080fd5b506103b76104ab366004613af1565b611b4b565b3480156104bc57600080fd5b506104d06104cb366004613814565b611b57565b6040516102519190613b43565b3480156104e957600080fd5b506102df6104f8366004613b86565b611c1b565b34801561050957600080fd5b5061051d610518366004613bc1565b611d5e565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610251565b34801561055657600080fd5b50610245610565366004613814565b611e16565b34801561057657600080fd5b506103b7610585366004613bed565b611f99565b34801561059657600080fd5b506102df61271081565b3480156105ac57600080fd5b506103b76105bb366004613c2f565b612065565b3480156105cc57600080fd5b506103b76105db366004613cb7565b61207c565b3480156105ec57600080fd5b506106006105fb366004613bc1565b6120c8565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610251565b34801561063857600080fd5b506102df614e2081565b34801561064e57600080fd5b506103b761065d366004613cd4565b61218e565b34801561066e57600080fd5b5061024561067d366004613bc1565b612381565b34801561068e57600080fd5b506102df61138881565b3480156106a457600080fd5b506103b76106b3366004613d5d565b61241c565b3480156106c457600080fd5b5061029a6106d3366004613978565b6124e6565b3480156106e457600080fd5b506102df6106f3366004613978565b612835565b34801561070457600080fd5b506103b7610713366004613cb7565b612988565b34801561072457600080fd5b5060015461029a906001600160a01b031681565b34801561074457600080fd5b50610758610753366004613978565b6129d4565b60408051928352602083019190915201610251565b34801561077957600080fd5b506103b7610788366004613cb7565b612a26565b34801561079957600080fd5b506102456107a8366004613814565b60066020526000908152604090205460ff1681565b3480156107c957600080fd5b506102df6107d8366004613814565b612af8565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190613d9d565b91509150600061085d85611b57565b90508051600014801561089c575061271061138861087b8585613dd7565b6108859190613dea565b61088f9190613e01565b6108998442613dd7565b10155b95945050505050565b6000818152600360205260408120546002805483929081106108c9576108c9613e23565b600091825260208220600590910201805490925082906108eb90600190613dd7565b815481106108fb576108fb613e23565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061094857610948613e23565b6000918252602082206005909102018054909250829061096a90600190613dd7565b8154811061097a5761097a613e23565b60009182526020909120600c90910201600381015460ff1694509050836109a55780600101546109a8565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156109f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1b9190613e65565b5090935060049250610a2b915050565b816004811115610a3d57610a3d613ece565b03610a80576000610a4d88611b57565b90508051600103610a7e5780600081518110610a6b57610a6b613e23565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2c9190613e65565b50935050505080610b845760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfb9190613ee4565b15610c395760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610b7b565b60008681526006602052604090205460ff16610c675760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110610c8b57610c8b613e23565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610cbf57610cbf613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3e9190613f36565b5050600087815260078401602052604090205490915060ff16610d88576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ecd565b808603610dfd576000868152600683016020526040902054610dab576000610df6565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610dec9190613dea565b610df69190613e01565b9450610ecd565b600081815260078301602052604090205460ff16610ecd5781600601600083600a01600181548110610e3157610e31613e23565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610e6757610e67613e23565b9060005260206000200154815260200190815260200160002054610e8b9190613f72565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610ec09190613dea565b610eca9190613e01565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610f6357600754610f14906001600160a01b038a811691889116612b24565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610f5a929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610f9357610f93613e23565b600091825260209091206002600590920201015460ff1615610fc75760405162461bcd60e51b8152600401610b7b90613f85565b600083815260036020526040812054600280549091908110610feb57610feb613e23565b90600052602060002090600502019050806001015483111561104f5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610b7b565b60008481526006602052604090205460ff1661107d5760405162461bcd60e51b8152600401610b7b90613eff565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190613d9d565b9150915081421015801561110157508042105b6111465760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610b7b565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab9190613f36565b505090508681036111c0576127109150611241565b6127106113886111d08686613dd7565b6111da9190613dea565b6111e49190613e01565b6111ee8542613dd7565b1061123b5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610b7b565b614e2091505b8454600090869061125490600190613dd7565b8154811061126457611264613e23565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156112c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e79190613fbc565b6112f19190613dd7565b60008a815260078401602052604090205490915060ff16156113555760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610b7b565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561139f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c39190613fbc565b905060006127106113d48784613dea565b6113de9190613e01565b6113e89083613f72565b60008c8152600686016020526040812054919250908211156114995760008c815260068601602052604090205434906114219084613dd7565b116114465760008c81526006860160205260409020546114419083613dd7565b611448565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611490929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906114c5908490613f72565b909155505060008c8152600686016020526040812080548392906114ea908490613f72565b909155505060008c815260068601602052604090205482116115bc5760008c81526006860160205260408120546009870180549192909161152c908490613f72565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156117c7578285600901546115d99190613dd7565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164b9190613ee4565b156116645760028a01805460ff19166001179055611747565b895460038b016000611677876001613f72565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b81526004016116f291815260200190565b602060405180830381865afa15801561170f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117339190613fbc565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117949392919061400f565b6000604051808303818588803b1580156117ad57600080fd5b505af11580156117c1573d6000803e3d6000fd5b50505050505b803411156117f0576117f06117dc8234613dd7565b6007543391906001600160a01b0316612b24565b50505050505050505050505050565b61180882612c0f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061188657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661187a60008051602061439e8339815191525490565b6001600160a01b031614155b156118a45760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118fe575060408051601f3d908101601f191682019092526118fb91810190613fbc565b60015b61192657604051630c76093760e01b81526001600160a01b0383166004820152602401610b7b565b60008051602061439e833981519152811461195757604051632a87526960e21b815260048101829052602401610b7b565b60008051602061439e8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a22576000836001600160a01b0316836040516119be91906140a9565b600060405180830381855af49150503d80600081146119f9576040519150601f19603f3d011682016040523d82523d6000602084013e6119fe565b606091505b5050905080611a20576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611a725760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061439e83398151915290565b60028181548110611a9557600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611ac890613fd5565b80601f0160208091040260200160405190810160405280929190818152602001828054611af490613fd5565b8015611b415780601f10611b1657610100808354040283529160200191611b41565b820191906000526020600020905b815481529060010190602001808311611b2457829003601f168201915b5050505050905083565b611a2084848484612c3c565b6000818152600360205260408120546002805460609392908110611b7d57611b7d613e23565b60009182526020822060059091020180549092508290611b9f90600190613dd7565b81548110611baf57611baf613e23565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c0d57602002820191906000526020600020905b815481526020019060010190808311611bf9575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c3f57611c3f613e23565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611c7357611c73613e23565b90600052602060002090600c02016000018681548110611c9557611c95613e23565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190613f36565b506003850154919350915060ff168015611d3b57508183600201541480611d3b5750805b15611d4e5761271094505050505061089c565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611d8f57611d8f613e23565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611dc357611dc3613e23565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e3a57611e3a613e23565b60009182526020822060059091020180549092508290611e5c90600190613dd7565b81548110611e6c57611e6c613e23565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ec7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eeb9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a91906140c5565b5050505050915050600081611f80578354611f86565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b03163314611fc35760405162461bcd60e51b8152600401610b7b90614131565b6000836001600160a01b03168383604051611fde91906140a9565b60006040518083038185875af1925050503d806000811461201b576040519150601f19603f3d011682016040523d82523d6000602084013e612020565b606091505b5050905080611a205760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610b7b565b61207486868686868633612f9f565b505050505050565b6000546001600160a01b031633146120a65760405162461bcd60e51b8152600401610b7b90614131565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a815260200190815260200160002054815481106120f6576120f6613e23565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061212a5761212a613e23565b90600052602060002090600c0201600001878154811061214c5761214c613e23565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146121b85760405162461bcd60e51b8152600401610b7b90614173565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612243858783614205565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ca9190613fbc565b6122d49190613dd7565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061236f908a908a908a906142c4565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123a5576123a5613e23565b600091825260208083208784526003600590930201918201905260408220548154919350839181106123d9576123d9613e23565b90600052602060002090600c020160000184815481106123fb576123fb613e23565b600091825260209091206004909102016003015460ff169695505050505050565b600160006124286136d0565b8054909150600160401b900460ff168061244f575080546001600160401b03808416911610155b1561246c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124988585856136f4565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146125135760405162461bcd60e51b8152600401610b7b90614173565b60008381526003602052604090205460028054859290811061253757612537613e23565b600091825260209091206002600590920201015460ff161561256b5760405162461bcd60e51b8152600401610b7b90613f85565b600084815260036020526040812054600280549192918390811061259157612591613e23565b60009182526020822060059091020180549092506125b190600190613dd7565b905060008260000182815481106125ca576125ca613e23565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561262f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265391906142fa565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c69190613e65565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561272a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061274e91906142fa565b98506001600160a01b03891661276a575050505050505061282e565b612775848c8b61373b565b1561282157604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612826565b600098505b505050505050505b5092915050565b60008281526003602052604081205460028054839290811061285957612859613e23565b6000918252602080832086845260036005909302019182019052604082205481549193508391811061288d5761288d613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa1580156128ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129109190613f36565b509150915082600401546000148061293f57508015801561293f57506000828152600284016020526040902054155b15612951576000945050505050612982565b80156129665750506004015491506129829050565b5060009081526002909101602052604090205491506129829050565b92915050565b6000546001600160a01b031633146129b25760405162461bcd60e51b8152600401610b7b90614131565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526003602052604081205460028054919291839081106129fa576129fa613e23565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612a326136d0565b8054909150600160401b900460ff1680612a59575080546001600160401b03808416911610155b15612a765760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b0d57612b0d613e23565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612b5357505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b8e57600080fd5b505af1158015612ba2573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612bf257600080fd5b505af1158015612c06573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612c395760405162461bcd60e51b8152600401610b7b90614131565b50565b600084815260036020526040902054600280548692908110612c6057612c60613e23565b600091825260209091206002600590920201015460ff1615612c945760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d029190613e65565b5090935060019250612d12915050565b816004811115612d2457612d24613ece565b14612d815760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610b7b565b82612dbe5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610b7b565b60008681526006602052604090205460ff16612dec5760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110612e1057612e10613e23565b60009182526020822060059091020180549092508290612e3290600190613dd7565b81548110612e4257612e42613e23565b90600052602060002090600c0201905060005b86811015612f38573382898984818110612e7157612e71613e23565b9050602002013581548110612e8857612e88613e23565b60009182526020909120600490910201546001600160a01b031614612eef5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610b7b565b8582898984818110612f0357612f03613e23565b9050602002013581548110612f1a57612f1a613e23565b60009182526020909120600160049092020181019190915501612e55565b5086869050816005016000828254612f509190613f72565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890612f8d908b908b908b90614349565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110612fc357612fc3613e23565b600091825260209091206002600590920201015460ff1615612ff75760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613041573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130659190613e65565b5090935060029250613075915050565b81600481111561308757613087613ece565b146130e25760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610b7b565b866131245760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610b7b565b60008981526006602052604090205460ff166131525760405162461bcd60e51b8152600401610b7b90613eff565b60008981526003602052604081205460028054909190811061317657613176613e23565b9060005260206000209060050201905080600101548711156131d15760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610b7b565b805460009082906131e490600190613dd7565b815481106131f4576131f4613e23565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d90613239908f9060040190815260200190565b60a060405180830381865afa158015613256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327a9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156132d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132f991906140c5565b5050505050915050600061330e8b8b8b610a8a565b905060005b8c811015613595576001600160a01b038916858f8f8481811061333857613338613e23565b905060200201358154811061334f5761334f613e23565b60009182526020909120600490910201546001600160a01b0316146133b65760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610b7b565b8215806133fd575081858f8f848181106133d2576133d2613e23565b90506020020135815481106133e9576133e9613e23565b906000526020600020906004020160010154145b61347d5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610b7b565b848e8e8381811061349057613490613e23565b90506020020135815481106134a7576134a7613e23565b600091825260209091206003600490920201015460ff16156135005760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610b7b565b8b858f8f8481811061351457613514613e23565b905060200201358154811061352b5761352b613e23565b60009182526020909120600260049092020101556001858f8f8481811061355457613554613e23565b905060200201358154811061356b5761356b613e23565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613313565b5050506004820180548b92506000906135af908490613f72565b90915550506000888152600282016020526040812080548b92906135d4908490613f72565b90915550506001810154880361360357600381015460ff16156135fe5760038101805460ff191690555b61367c565b60018101546000908152600282016020526040808220548a83529120540361364557600381015460ff166135fe5760038101805460ff1916600117905561367c565b60018101546000908152600282016020526040808220548a8352912054111561367c576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516136bb9392919061436d565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6136fc6137d3565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156137c957600083815260036020526040812054600280549192918390811061376f5761376f613e23565b600091825260208220600590910201805490925061378f90600190613dd7565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610ab3915050565b5060019392505050565b6137db6137fa565b6137f857604051631afcd79f60e31b815260040160405180910390fd5b565b60006138046136d0565b54600160401b900460ff16919050565b60006020828403121561382657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261385457600080fd5b8135602083016000806001600160401b038411156138745761387461382d565b50604051601f19601f85018116603f011681018181106001600160401b03821117156138a2576138a261382d565b6040528381529050808284018710156138ba57600080fd5b838360208301376000602085830101528094505050505092915050565b6000806000606084860312156138ec57600080fd5b833592506020840135915060408401356001600160401b0381111561391057600080fd5b61391c86828701613843565b9150509250925092565b6001600160a01b0381168114612c3957600080fd5b6000806000806080858703121561395157600080fd5b84359350602085013561396381613926565b93969395505050506040820135916060013590565b6000806040838503121561398b57600080fd5b50508035926020909101359150565b600080604083850312156139ad57600080fd5b82356139b881613926565b915060208301356001600160401b038111156139d357600080fd5b6139df85828601613843565b9150509250929050565b60005b83811015613a045781810151838201526020016139ec565b50506000910152565b60008151808452613a258160208601602086016139e9565b601f01601f19169290920160200192915050565b602081526000610ab36020830184613a0d565b838152821515602082015260606040820152600061089c6060830184613a0d565b600080600060608486031215613a8257600080fd5b83359250602084013591506040840135613a9b81613926565b809150509250925092565b60008083601f840112613ab857600080fd5b5081356001600160401b03811115613acf57600080fd5b6020830191508360208260051b8501011115613aea57600080fd5b9250929050565b60008060008060608587031215613b0757600080fd5b8435935060208501356001600160401b03811115613b2457600080fd5b613b3087828801613aa6565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613b7b578351835260209384019390920191600101613b5d565b509095945050505050565b600080600080600060a08688031215613b9e57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613bd657600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613c0257600080fd5b8335613c0d81613926565b92506020840135915060408401356001600160401b0381111561391057600080fd5b60008060008060008060a08789031215613c4857600080fd5b8635955060208701356001600160401b03811115613c6557600080fd5b613c7189828a01613aa6565b909650945050604087013592506060870135915060808701356001600160401b03811115613c9e57600080fd5b613caa89828a01613843565b9150509295509295509295565b600060208284031215613cc957600080fd5b8135610ab381613926565b600080600080600060808688031215613cec57600080fd5b853594506020860135935060408601356001600160401b03811115613d1057600080fd5b8601601f81018813613d2157600080fd5b80356001600160401b03811115613d3757600080fd5b886020828401011115613d4957600080fd5b959894975060200195606001359392505050565b600080600060608486031215613d7257600080fd5b8335613d7d81613926565b92506020840135613d8d81613926565b91506040840135613a9b81613926565b60008060408385031215613db057600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b8181038181111561298257612982613dc1565b808202811582820484141761298257612982613dc1565b600082613e1e57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b0381168114613e5057600080fd5b919050565b80518015158114613e5057600080fd5b600080600080600060a08688031215613e7d57600080fd5b613e8686613e39565b94506020860151613e9681613926565b604087015190945060058110613eab57600080fd5b9250613eb960608701613e55565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613ef657600080fd5b610ab382613e55565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b600080600060608486031215613f4b57600080fd5b83519250613f5b60208501613e55565b9150613f6960408501613e55565b90509250925092565b8082018082111561298257612982613dc1565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600060208284031215613fce57600080fd5b5051919050565b600181811c90821680613fe957607f821691505b60208210810361400957634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461402d81613fd5565b806060860152600182166000811461404c57600181146140685761409c565b60ff1983166080870152608082151560051b870101935061409c565b86600052602060002060005b8381101561409357815488820160800152600190910190602001614074565b87016080019450505b5091979650505050505050565b600082516140bb8184602087016139e9565b9190910192915050565b600080600080600080600060e0888a0312156140e057600080fd5b6140e988613e39565b96506140f760208901613e55565b604089015160608a015160808b015160a08c015193995091975095509350915061412360c08901613e55565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a2257806000526020600020601f840160051c810160208510156141de5750805b601f840160051c820191505b818110156141fe57600081556001016141ea565b5050505050565b6001600160401b0383111561421c5761421c61382d565b6142308361422a8354613fd5565b836141b7565b6000601f841160018114614264576000851561424c5750838201355b600019600387901b1c1916600186901b1783556141fe565b600083815260209020601f19861690835b828110156142955786850135825560209485019460019092019101614275565b50868210156142b25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60006020828403121561430c57600080fd5b8151610ab381613926565b81835260006001600160fb1b0383111561433057600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061435d604083018587614317565b9050826020830152949350505050565b604081526000614381604083018587614317565b82810360208401526143938185613a0d565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205273a7fd5d9b74f6a10c8e8ff9173490991e595b881e9a1f0a7986976eaa245264736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102205760003560e01c80636d4cd8ea1161012e578063c0c53b8b116100ab578063f2f4eb261161006f578063f2f4eb2614610718578063f32ab92714610738578063f7e7d1fd1461076d578063f8abee101461078d578063fc6f8f16146107bd57600080fd5b8063c0c53b8b14610698578063d2b8035a146106b8578063da3beb8c146106d8578063e349ad301461058a578063e4c0aaf4146106f857600080fd5b8063a7cc08fe116100f2578063a7cc08fe146105e0578063b34bfaa81461062c578063b6ede54014610642578063ba66fde714610662578063be4676041461068257600080fd5b80636d4cd8ea1461054a578063751accd01461056a578063796490f91461058a5780637c04034e146105a05780638e426460146105c057600080fd5b80634b2f0ea0116101bc5780635a155ccd116101805780635a155ccd1461044f5780635c92e2f61461049057806365540b96146104b0578063675926f6146104dd57806369f3f041146104fd57600080fd5b80634b2f0ea0146103a45780634f1ef286146103b957806352d1902d146103cc57806354fd4d50146103e1578063564a565d1461042057600080fd5b80630855bbe9146102255780630baa64d11461025a5780630c340a241461027a5780631200aabc146102b25780631c3db16d146102ed5780631cc3423a1461032a5780632621b9a21461034a5780632d68efc914610364578063362c347914610384575b600080fd5b34801561023157600080fd5b50610245610240366004613814565b6107dd565b60405190151581526020015b60405180910390f35b34801561026657600080fd5b50610245610275366004613814565b6108a5565b34801561028657600080fd5b5060005461029a906001600160a01b031681565b6040516001600160a01b039091168152602001610251565b3480156102be57600080fd5b506102df6102cd366004613814565b60036020526000908152604090205481565b604051908152602001610251565b3480156102f957600080fd5b5061030d610308366004613814565b61091c565b604080519384529115156020840152151590820152606001610251565b34801561033657600080fd5b506102df6103453660046138d7565b610a8a565b34801561035657600080fd5b506004546102459060ff1681565b34801561037057600080fd5b5060075461029a906001600160a01b031681565b34801561039057600080fd5b506102df61039f36600461393b565b610aba565b6103b76103b2366004613978565b610f6f565b005b6103b76103c736600461399a565b6117ff565b3480156103d857600080fd5b506102df611a27565b3480156103ed57600080fd5b50610413604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102519190613a39565b34801561042c57600080fd5b5061044061043b366004613814565b611a85565b60405161025193929190613a4c565b34801561045b57600080fd5b5061024561046a366004613a6d565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b34801561049c57600080fd5b506103b76104ab366004613af1565b611b4b565b3480156104bc57600080fd5b506104d06104cb366004613814565b611b57565b6040516102519190613b43565b3480156104e957600080fd5b506102df6104f8366004613b86565b611c1b565b34801561050957600080fd5b5061051d610518366004613bc1565b611d5e565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610251565b34801561055657600080fd5b50610245610565366004613814565b611e16565b34801561057657600080fd5b506103b7610585366004613bed565b611f99565b34801561059657600080fd5b506102df61271081565b3480156105ac57600080fd5b506103b76105bb366004613c2f565b612065565b3480156105cc57600080fd5b506103b76105db366004613cb7565b61207c565b3480156105ec57600080fd5b506106006105fb366004613bc1565b6120c8565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610251565b34801561063857600080fd5b506102df614e2081565b34801561064e57600080fd5b506103b761065d366004613cd4565b61218e565b34801561066e57600080fd5b5061024561067d366004613bc1565b612381565b34801561068e57600080fd5b506102df61138881565b3480156106a457600080fd5b506103b76106b3366004613d5d565b61241c565b3480156106c457600080fd5b5061029a6106d3366004613978565b6124e6565b3480156106e457600080fd5b506102df6106f3366004613978565b612835565b34801561070457600080fd5b506103b7610713366004613cb7565b612988565b34801561072457600080fd5b5060015461029a906001600160a01b031681565b34801561074457600080fd5b50610758610753366004613978565b6129d4565b60408051928352602083019190915201610251565b34801561077957600080fd5b506103b7610788366004613cb7565b612a26565b34801561079957600080fd5b506102456107a8366004613814565b60066020526000908152604090205460ff1681565b3480156107c957600080fd5b506102df6107d8366004613814565b612af8565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190613d9d565b91509150600061085d85611b57565b90508051600014801561089c575061271061138861087b8585613dd7565b6108859190613dea565b61088f9190613e01565b6108998442613dd7565b10155b95945050505050565b6000818152600360205260408120546002805483929081106108c9576108c9613e23565b600091825260208220600590910201805490925082906108eb90600190613dd7565b815481106108fb576108fb613e23565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061094857610948613e23565b6000918252602082206005909102018054909250829061096a90600190613dd7565b8154811061097a5761097a613e23565b60009182526020909120600c90910201600381015460ff1694509050836109a55780600101546109a8565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156109f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1b9190613e65565b5090935060049250610a2b915050565b816004811115610a3d57610a3d613ece565b03610a80576000610a4d88611b57565b90508051600103610a7e5780600081518110610a6b57610a6b613e23565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2c9190613e65565b50935050505080610b845760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfb9190613ee4565b15610c395760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610b7b565b60008681526006602052604090205460ff16610c675760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110610c8b57610c8b613e23565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610cbf57610cbf613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3e9190613f36565b5050600087815260078401602052604090205490915060ff16610d88576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ecd565b808603610dfd576000868152600683016020526040902054610dab576000610df6565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610dec9190613dea565b610df69190613e01565b9450610ecd565b600081815260078301602052604090205460ff16610ecd5781600601600083600a01600181548110610e3157610e31613e23565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610e6757610e67613e23565b9060005260206000200154815260200190815260200160002054610e8b9190613f72565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610ec09190613dea565b610eca9190613e01565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610f6357600754610f14906001600160a01b038a811691889116612b24565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610f5a929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610f9357610f93613e23565b600091825260209091206002600590920201015460ff1615610fc75760405162461bcd60e51b8152600401610b7b90613f85565b600083815260036020526040812054600280549091908110610feb57610feb613e23565b90600052602060002090600502019050806001015483111561104f5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610b7b565b60008481526006602052604090205460ff1661107d5760405162461bcd60e51b8152600401610b7b90613eff565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190613d9d565b9150915081421015801561110157508042105b6111465760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610b7b565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab9190613f36565b505090508681036111c0576127109150611241565b6127106113886111d08686613dd7565b6111da9190613dea565b6111e49190613e01565b6111ee8542613dd7565b1061123b5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610b7b565b614e2091505b8454600090869061125490600190613dd7565b8154811061126457611264613e23565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156112c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e79190613fbc565b6112f19190613dd7565b60008a815260078401602052604090205490915060ff16156113555760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610b7b565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561139f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c39190613fbc565b905060006127106113d48784613dea565b6113de9190613e01565b6113e89083613f72565b60008c8152600686016020526040812054919250908211156114995760008c815260068601602052604090205434906114219084613dd7565b116114465760008c81526006860160205260409020546114419083613dd7565b611448565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611490929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906114c5908490613f72565b909155505060008c8152600686016020526040812080548392906114ea908490613f72565b909155505060008c815260068601602052604090205482116115bc5760008c81526006860160205260408120546009870180549192909161152c908490613f72565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156117c7578285600901546115d99190613dd7565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164b9190613ee4565b156116645760028a01805460ff19166001179055611747565b895460038b016000611677876001613f72565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b81526004016116f291815260200190565b602060405180830381865afa15801561170f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117339190613fbc565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117949392919061400f565b6000604051808303818588803b1580156117ad57600080fd5b505af11580156117c1573d6000803e3d6000fd5b50505050505b803411156117f0576117f06117dc8234613dd7565b6007543391906001600160a01b0316612b24565b50505050505050505050505050565b61180882612c0f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061188657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661187a60008051602061439e8339815191525490565b6001600160a01b031614155b156118a45760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118fe575060408051601f3d908101601f191682019092526118fb91810190613fbc565b60015b61192657604051630c76093760e01b81526001600160a01b0383166004820152602401610b7b565b60008051602061439e833981519152811461195757604051632a87526960e21b815260048101829052602401610b7b565b60008051602061439e8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a22576000836001600160a01b0316836040516119be91906140a9565b600060405180830381855af49150503d80600081146119f9576040519150601f19603f3d011682016040523d82523d6000602084013e6119fe565b606091505b5050905080611a20576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611a725760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061439e83398151915290565b60028181548110611a9557600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611ac890613fd5565b80601f0160208091040260200160405190810160405280929190818152602001828054611af490613fd5565b8015611b415780601f10611b1657610100808354040283529160200191611b41565b820191906000526020600020905b815481529060010190602001808311611b2457829003601f168201915b5050505050905083565b611a2084848484612c3c565b6000818152600360205260408120546002805460609392908110611b7d57611b7d613e23565b60009182526020822060059091020180549092508290611b9f90600190613dd7565b81548110611baf57611baf613e23565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c0d57602002820191906000526020600020905b815481526020019060010190808311611bf9575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c3f57611c3f613e23565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611c7357611c73613e23565b90600052602060002090600c02016000018681548110611c9557611c95613e23565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190613f36565b506003850154919350915060ff168015611d3b57508183600201541480611d3b5750805b15611d4e5761271094505050505061089c565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611d8f57611d8f613e23565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611dc357611dc3613e23565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e3a57611e3a613e23565b60009182526020822060059091020180549092508290611e5c90600190613dd7565b81548110611e6c57611e6c613e23565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ec7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eeb9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a91906140c5565b5050505050915050600081611f80578354611f86565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b03163314611fc35760405162461bcd60e51b8152600401610b7b90614131565b6000836001600160a01b03168383604051611fde91906140a9565b60006040518083038185875af1925050503d806000811461201b576040519150601f19603f3d011682016040523d82523d6000602084013e612020565b606091505b5050905080611a205760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610b7b565b61207486868686868633612f9f565b505050505050565b6000546001600160a01b031633146120a65760405162461bcd60e51b8152600401610b7b90614131565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a815260200190815260200160002054815481106120f6576120f6613e23565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061212a5761212a613e23565b90600052602060002090600c0201600001878154811061214c5761214c613e23565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146121b85760405162461bcd60e51b8152600401610b7b90614173565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612243858783614205565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ca9190613fbc565b6122d49190613dd7565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061236f908a908a908a906142c4565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123a5576123a5613e23565b600091825260208083208784526003600590930201918201905260408220548154919350839181106123d9576123d9613e23565b90600052602060002090600c020160000184815481106123fb576123fb613e23565b600091825260209091206004909102016003015460ff169695505050505050565b600160006124286136d0565b8054909150600160401b900460ff168061244f575080546001600160401b03808416911610155b1561246c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124988585856136f4565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146125135760405162461bcd60e51b8152600401610b7b90614173565b60008381526003602052604090205460028054859290811061253757612537613e23565b600091825260209091206002600590920201015460ff161561256b5760405162461bcd60e51b8152600401610b7b90613f85565b600084815260036020526040812054600280549192918390811061259157612591613e23565b60009182526020822060059091020180549092506125b190600190613dd7565b905060008260000182815481106125ca576125ca613e23565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561262f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265391906142fa565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c69190613e65565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561272a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061274e91906142fa565b98506001600160a01b03891661276a575050505050505061282e565b612775848c8b61373b565b1561282157604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612826565b600098505b505050505050505b5092915050565b60008281526003602052604081205460028054839290811061285957612859613e23565b6000918252602080832086845260036005909302019182019052604082205481549193508391811061288d5761288d613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa1580156128ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129109190613f36565b509150915082600401546000148061293f57508015801561293f57506000828152600284016020526040902054155b15612951576000945050505050612982565b80156129665750506004015491506129829050565b5060009081526002909101602052604090205491506129829050565b92915050565b6000546001600160a01b031633146129b25760405162461bcd60e51b8152600401610b7b90614131565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526003602052604081205460028054919291839081106129fa576129fa613e23565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612a326136d0565b8054909150600160401b900460ff1680612a59575080546001600160401b03808416911610155b15612a765760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b0d57612b0d613e23565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612b5357505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b8e57600080fd5b505af1158015612ba2573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612bf257600080fd5b505af1158015612c06573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612c395760405162461bcd60e51b8152600401610b7b90614131565b50565b600084815260036020526040902054600280548692908110612c6057612c60613e23565b600091825260209091206002600590920201015460ff1615612c945760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d029190613e65565b5090935060019250612d12915050565b816004811115612d2457612d24613ece565b14612d815760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610b7b565b82612dbe5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610b7b565b60008681526006602052604090205460ff16612dec5760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110612e1057612e10613e23565b60009182526020822060059091020180549092508290612e3290600190613dd7565b81548110612e4257612e42613e23565b90600052602060002090600c0201905060005b86811015612f38573382898984818110612e7157612e71613e23565b9050602002013581548110612e8857612e88613e23565b60009182526020909120600490910201546001600160a01b031614612eef5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610b7b565b8582898984818110612f0357612f03613e23565b9050602002013581548110612f1a57612f1a613e23565b60009182526020909120600160049092020181019190915501612e55565b5086869050816005016000828254612f509190613f72565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890612f8d908b908b908b90614349565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110612fc357612fc3613e23565b600091825260209091206002600590920201015460ff1615612ff75760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613041573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130659190613e65565b5090935060029250613075915050565b81600481111561308757613087613ece565b146130e25760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610b7b565b866131245760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610b7b565b60008981526006602052604090205460ff166131525760405162461bcd60e51b8152600401610b7b90613eff565b60008981526003602052604081205460028054909190811061317657613176613e23565b9060005260206000209060050201905080600101548711156131d15760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610b7b565b805460009082906131e490600190613dd7565b815481106131f4576131f4613e23565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d90613239908f9060040190815260200190565b60a060405180830381865afa158015613256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327a9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156132d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132f991906140c5565b5050505050915050600061330e8b8b8b610a8a565b905060005b8c811015613595576001600160a01b038916858f8f8481811061333857613338613e23565b905060200201358154811061334f5761334f613e23565b60009182526020909120600490910201546001600160a01b0316146133b65760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610b7b565b8215806133fd575081858f8f848181106133d2576133d2613e23565b90506020020135815481106133e9576133e9613e23565b906000526020600020906004020160010154145b61347d5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610b7b565b848e8e8381811061349057613490613e23565b90506020020135815481106134a7576134a7613e23565b600091825260209091206003600490920201015460ff16156135005760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610b7b565b8b858f8f8481811061351457613514613e23565b905060200201358154811061352b5761352b613e23565b60009182526020909120600260049092020101556001858f8f8481811061355457613554613e23565b905060200201358154811061356b5761356b613e23565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613313565b5050506004820180548b92506000906135af908490613f72565b90915550506000888152600282016020526040812080548b92906135d4908490613f72565b90915550506001810154880361360357600381015460ff16156135fe5760038101805460ff191690555b61367c565b60018101546000908152600282016020526040808220548a83529120540361364557600381015460ff166135fe5760038101805460ff1916600117905561367c565b60018101546000908152600282016020526040808220548a8352912054111561367c576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516136bb9392919061436d565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6136fc6137d3565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156137c957600083815260036020526040812054600280549192918390811061376f5761376f613e23565b600091825260208220600590910201805490925061378f90600190613dd7565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610ab3915050565b5060019392505050565b6137db6137fa565b6137f857604051631afcd79f60e31b815260040160405180910390fd5b565b60006138046136d0565b54600160401b900460ff16919050565b60006020828403121561382657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261385457600080fd5b8135602083016000806001600160401b038411156138745761387461382d565b50604051601f19601f85018116603f011681018181106001600160401b03821117156138a2576138a261382d565b6040528381529050808284018710156138ba57600080fd5b838360208301376000602085830101528094505050505092915050565b6000806000606084860312156138ec57600080fd5b833592506020840135915060408401356001600160401b0381111561391057600080fd5b61391c86828701613843565b9150509250925092565b6001600160a01b0381168114612c3957600080fd5b6000806000806080858703121561395157600080fd5b84359350602085013561396381613926565b93969395505050506040820135916060013590565b6000806040838503121561398b57600080fd5b50508035926020909101359150565b600080604083850312156139ad57600080fd5b82356139b881613926565b915060208301356001600160401b038111156139d357600080fd5b6139df85828601613843565b9150509250929050565b60005b83811015613a045781810151838201526020016139ec565b50506000910152565b60008151808452613a258160208601602086016139e9565b601f01601f19169290920160200192915050565b602081526000610ab36020830184613a0d565b838152821515602082015260606040820152600061089c6060830184613a0d565b600080600060608486031215613a8257600080fd5b83359250602084013591506040840135613a9b81613926565b809150509250925092565b60008083601f840112613ab857600080fd5b5081356001600160401b03811115613acf57600080fd5b6020830191508360208260051b8501011115613aea57600080fd5b9250929050565b60008060008060608587031215613b0757600080fd5b8435935060208501356001600160401b03811115613b2457600080fd5b613b3087828801613aa6565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613b7b578351835260209384019390920191600101613b5d565b509095945050505050565b600080600080600060a08688031215613b9e57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613bd657600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613c0257600080fd5b8335613c0d81613926565b92506020840135915060408401356001600160401b0381111561391057600080fd5b60008060008060008060a08789031215613c4857600080fd5b8635955060208701356001600160401b03811115613c6557600080fd5b613c7189828a01613aa6565b909650945050604087013592506060870135915060808701356001600160401b03811115613c9e57600080fd5b613caa89828a01613843565b9150509295509295509295565b600060208284031215613cc957600080fd5b8135610ab381613926565b600080600080600060808688031215613cec57600080fd5b853594506020860135935060408601356001600160401b03811115613d1057600080fd5b8601601f81018813613d2157600080fd5b80356001600160401b03811115613d3757600080fd5b886020828401011115613d4957600080fd5b959894975060200195606001359392505050565b600080600060608486031215613d7257600080fd5b8335613d7d81613926565b92506020840135613d8d81613926565b91506040840135613a9b81613926565b60008060408385031215613db057600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b8181038181111561298257612982613dc1565b808202811582820484141761298257612982613dc1565b600082613e1e57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b0381168114613e5057600080fd5b919050565b80518015158114613e5057600080fd5b600080600080600060a08688031215613e7d57600080fd5b613e8686613e39565b94506020860151613e9681613926565b604087015190945060058110613eab57600080fd5b9250613eb960608701613e55565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613ef657600080fd5b610ab382613e55565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b600080600060608486031215613f4b57600080fd5b83519250613f5b60208501613e55565b9150613f6960408501613e55565b90509250925092565b8082018082111561298257612982613dc1565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600060208284031215613fce57600080fd5b5051919050565b600181811c90821680613fe957607f821691505b60208210810361400957634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461402d81613fd5565b806060860152600182166000811461404c57600181146140685761409c565b60ff1983166080870152608082151560051b870101935061409c565b86600052602060002060005b8381101561409357815488820160800152600190910190602001614074565b87016080019450505b5091979650505050505050565b600082516140bb8184602087016139e9565b9190910192915050565b600080600080600080600060e0888a0312156140e057600080fd5b6140e988613e39565b96506140f760208901613e55565b604089015160608a015160808b015160a08c015193995091975095509350915061412360c08901613e55565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a2257806000526020600020601f840160051c810160208510156141de5750805b601f840160051c820191505b818110156141fe57600081556001016141ea565b5050505050565b6001600160401b0383111561421c5761421c61382d565b6142308361422a8354613fd5565b836141b7565b6000601f841160018114614264576000851561424c5750838201355b600019600387901b1c1916600186901b1783556141fe565b600083815260209020601f19861690835b828110156142955786850135825560209485019460019092019101614275565b50868210156142b25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60006020828403121561430c57600080fd5b8151610ab381613926565b81835260006001600160fb1b0383111561433057600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061435d604083018587614317565b9050826020830152949350505050565b604081526000614381604083018587614317565b82810360208401526143938185613a0d565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205273a7fd5d9b74f6a10c8e8ff9173490991e595b881e9a1f0a7986976eaa245264736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 21704, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 21707, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)11133" - }, - { - "astId": 21711, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)21643_storage)dyn_storage" - }, - { - "astId": 21715, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21717, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 21725, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 21729, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 21731, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)21643_storage)dyn_storage": { - "base": "t_struct(Dispute)21643_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)21681_storage)dyn_storage": { - "base": "t_struct(Round)21681_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)21690_storage)dyn_storage": { - "base": "t_struct(Vote)21690_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)11133": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)21643_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 21632, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)21681_storage)dyn_storage" - }, - { - "astId": 21634, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 21636, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 21640, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21642, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)21681_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 21647, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)21690_storage)dyn_storage" - }, - { - "astId": 21649, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 21653, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21655, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 21657, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 21659, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 21663, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21667, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 21673, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 21675, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 21678, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 21680, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)21690_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 21683, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 21685, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 21687, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 21689, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitClassic_Proxy.json b/contracts/deployments/arbitrum/DisputeKitClassic_Proxy.json deleted file mode 100644 index bfc0c7eae..000000000 --- a/contracts/deployments/arbitrum/DisputeKitClassic_Proxy.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "address": "0x70B464be85A547144C72485eBa2577E5D3A45421", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x70B464be85A547144C72485eBa2577E5D3A45421", - "transactionIndex": 3, - "gasUsed": "370687", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000004000000000000000000000000000000000000000000400000000800000000000000000000000000000000", - "blockHash": "0x9ef5590771fb4a09e609e46729eb2f307ec8c215acedbd827de6d56b3a8f2577", - "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 272063168, - "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", - "address": "0x70B464be85A547144C72485eBa2577E5D3A45421", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 9, - "blockHash": "0x9ef5590771fb4a09e609e46729eb2f307ec8c215acedbd827de6d56b3a8f2577" - } - ], - "blockNumber": 272063168, - "cumulativeGasUsed": "1689314", - "status": 1, - "byzantium": true - }, - "args": [ - "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Workaround to get meaningful names for the proxy contracts Otherwise all the contracts are called `UUPSProxy` on the chain explorers\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicNeoProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212201794998342bb1cd2ef0f3a37df1807bf3e7ce8cccf145231219f8598e7a8b2c664736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212201794998342bb1cd2ef0f3a37df1807bf3e7ce8cccf145231219f8598e7a8b2c664736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "notice": "Workaround to get meaningful names for the proxy contracts Otherwise all the contracts are called `UUPSProxy` on the chain explorers", - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitGated.json b/contracts/deployments/arbitrum/DisputeKitGated.json deleted file mode 100644 index eefc6616b..000000000 --- a/contracts/deployments/arbitrum/DisputeKitGated.json +++ /dev/null @@ -1,1240 +0,0 @@ -{ - "address": "0xaE1eed20C125B739b64c948820C61F809ad9a925", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "extraDataToTokenInfo", - "outputs": [ - { - "internalType": "address", - "name": "tokenGate", - "type": "address" - }, - { - "internalType": "bool", - "name": "isERC1155", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x2df70cb0e77da4f9e5f9c0799df57f4584279e3eada9a226a6a049ec8d7d0897", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xaE1eed20C125B739b64c948820C61F809ad9a925", - "transactionIndex": 9, - "gasUsed": "228501", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000020000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcac1900c875542795826e4e2f892aad5de97bfffd195bb789ac244df2c5b4f29", - "transactionHash": "0x2df70cb0e77da4f9e5f9c0799df57f4584279e3eada9a226a6a049ec8d7d0897", - "logs": [ - { - "transactionIndex": 9, - "blockNumber": 364034429, - "transactionHash": "0x2df70cb0e77da4f9e5f9c0799df57f4584279e3eada9a226a6a049ec8d7d0897", - "address": "0xaE1eed20C125B739b64c948820C61F809ad9a925", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0xcac1900c875542795826e4e2f892aad5de97bfffd195bb789ac244df2c5b4f29" - } - ], - "blockNumber": 364034429, - "cumulativeGasUsed": "1192860", - "status": 1, - "byzantium": true - }, - "args": [ - "0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a", - "0xc0c53b8b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1" - ], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" - ] - }, - "implementation": "0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitGatedShutter.json b/contracts/deployments/arbitrum/DisputeKitGatedShutter.json deleted file mode 100644 index 5017da8e8..000000000 --- a/contracts/deployments/arbitrum/DisputeKitGatedShutter.json +++ /dev/null @@ -1,1314 +0,0 @@ -{ - "address": "0x788330092B9704809C19858E39EB9Ac402c2E47b", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x2fa78e2ff0776968dd343541316038adf2b361d51d423989f38975bf9f9d1141", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x788330092B9704809C19858E39EB9Ac402c2E47b", - "transactionIndex": 4, - "gasUsed": "228419", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000800000000000000000080000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x41216ca34b46131cdfbdacb6eb99ce2aeae86cb1c8ed38f1b71e4d1d8eb8d302", - "transactionHash": "0x2fa78e2ff0776968dd343541316038adf2b361d51d423989f38975bf9f9d1141", - "logs": [ - { - "transactionIndex": 4, - "blockNumber": 364034451, - "transactionHash": "0x2fa78e2ff0776968dd343541316038adf2b361d51d423989f38975bf9f9d1141", - "address": "0x788330092B9704809C19858E39EB9Ac402c2E47b", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0x41216ca34b46131cdfbdacb6eb99ce2aeae86cb1c8ed38f1b71e4d1d8eb8d302" - } - ], - "blockNumber": 364034451, - "cumulativeGasUsed": "441843", - "status": 1, - "byzantium": true - }, - "args": [ - "0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32", - "0xc0c53b8b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1" - ], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" - ] - }, - "implementation": "0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitGatedShutter_Implementation.json b/contracts/deployments/arbitrum/DisputeKitGatedShutter_Implementation.json deleted file mode 100644 index 09c042717..000000000 --- a/contracts/deployments/arbitrum/DisputeKitGatedShutter_Implementation.json +++ /dev/null @@ -1,1975 +0,0 @@ -{ - "address": "0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x92cdc20c7dc734658ecd517e152a4609cddb83ecc1148b0e3aaa04914dff749f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32", - "transactionIndex": 1, - "gasUsed": "4170135", - "logsBloom": "0x00000000000000000000000000000000100000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8a6ce2400d0f5ada9d21362a41283917162913719c7678683daaf363c7c8a665", - "transactionHash": "0x92cdc20c7dc734658ecd517e152a4609cddb83ecc1148b0e3aaa04914dff749f", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 364034443, - "transactionHash": "0x92cdc20c7dc734658ecd517e152a4609cddb83ecc1148b0e3aaa04914dff749f", - "address": "0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x8a6ce2400d0f5ada9d21362a41283917162913719c7678683daaf363c7c8a665" - } - ], - "blockNumber": 364034443, - "cumulativeGasUsed": "4170135", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"CommitCastShutter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"castCommitShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVoteShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"CommitCastShutter(uint256,address,bytes32,bytes32,bytes)\":{\"details\":\"Emitted when a vote is cast.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_juror\":\"The address of the juror casting the vote commitment.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash including the justification.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encoding\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitGatedShutter Added functionality: shielded voting. Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitGatedShutter.sol\":\"DisputeKitGatedShutter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitGatedShutter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\ninterface IBalanceHolder {\\n /// @dev Returns the number of tokens in `owner` account.\\n /// @dev Compatible with ERC-20 and ERC-721.\\n /// @param owner The address of the owner.\\n /// @return balance The number of tokens in `owner` account.\\n function balanceOf(address owner) external view returns (uint256 balance);\\n}\\n\\ninterface IBalanceHolderERC1155 {\\n /// @dev Returns the balance of an ERC-1155 token.\\n /// @param account The address of the token holder\\n /// @param id ID of the token\\n /// @return The token balance\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\\n/// @title DisputeKitGatedShutter\\n/// Added functionality: shielded voting.\\n/// Dispute kit implementation adapted from DisputeKitClassic\\n/// - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitGatedShutter is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a vote is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _commit The commitment hash.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n event CommitCastShutter(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n bytes32 indexed _commit,\\n bytes32 _identity,\\n bytes _encryptedVote\\n );\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash including the justification.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n function castCommitShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit,\\n bytes32 _identity,\\n bytes calldata _encryptedVote\\n ) external notJumped(_coreDisputeID) {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n emit CommitCastShutter(_coreDisputeID, msg.sender, _commit, _identity, _encryptedVote);\\n }\\n\\n function castVoteShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n address juror = dispute.rounds[dispute.rounds.length - 1].votes[_voteIDs[0]].account;\\n\\n // _castVote() ensures that all the _voteIDs do belong to `juror`\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, juror);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure override returns (bytes32) {\\n bytes32 justificationHash = keccak256(bytes(_justification));\\n return keccak256(abi.encode(_choice, _salt, justificationHash));\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Extracts token gating information from the extra data.\\n /// @param _extraData The extra data bytes array with the following encoding:\\n /// - bytes 0-31: uint96 courtID, not used here\\n /// - bytes 32-63: uint256 minJurors, not used here\\n /// - bytes 64-95: uint256 disputeKitID, not used here\\n /// - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160)\\n /// - bytes 128-159: uint256 tokenId\\n /// @return tokenGate The address of the token contract used for gating access.\\n /// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721.\\n /// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).\\n function _extraDataToTokenInfo(\\n bytes memory _extraData\\n ) internal pure returns (address tokenGate, bool isERC1155, uint256 tokenId) {\\n // Need at least 160 bytes to safely read the parameters\\n if (_extraData.length < 160) return (address(0), false, 0);\\n\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let packedTokenGateIsERC1155 := mload(add(_extraData, 0x80)) // 4th parameter at offset 128\\n tokenId := mload(add(_extraData, 0xA0)) // 5th parameter at offset 160 (moved up)\\n\\n // Unpack address from lower 160 bits and bool from bit 160\\n tokenGate := and(packedTokenGateIsERC1155, 0xffffffffffffffffffffffffffffffffffffffff)\\n isERC1155 := and(shr(160, packedTokenGateIsERC1155), 1)\\n }\\n }\\n\\n /// @inheritdoc DisputeKitClassicBase\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view override returns (bool) {\\n if (!super._postDrawCheck(_round, _coreDisputeID, _juror)) return false;\\n\\n // Get the local dispute and extract token info from extraData\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n (address tokenGate, bool isERC1155, uint256 tokenId) = _extraDataToTokenInfo(dispute.extraData);\\n\\n // If no token gate is specified, allow all jurors\\n if (tokenGate == address(0)) return true;\\n\\n // Check juror's token balance\\n if (isERC1155) {\\n return IBalanceHolderERC1155(tokenGate).balanceOf(_juror, tokenId) > 0;\\n } else {\\n return IBalanceHolder(tokenGate).balanceOf(_juror) > 0;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2b7c8f0af04be5a41d5e0a3a97b359867f6e79eb98da2303d33317fe147faef\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161489e6100fc60003960008181611937015281816119600152611b4f015261489e6000f3fe6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf414610753578063f2f4eb2614610773578063f32ab92714610793578063f7e7d1fd146107c8578063f8abee10146107e8578063fc6f8f161461081857600080fd5b8063be467604146106dd578063c0c53b8b146106f3578063d2b8035a14610713578063da3beb8c14610733578063e349ad30146105c557600080fd5b80638f06f112116100fd5780638f06f1121461061b578063a7cc08fe1461063b578063b34bfaa814610687578063b6ede5401461069d578063ba66fde7146106bd57600080fd5b80636d4cd8ea14610585578063751accd0146105a5578063796490f9146105c55780637c04034e146105db5780638e426460146105fb57600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd1461048a5780635c92e2f6146104cb57806365540b96146104eb578063675926f61461051857806369f3f0411461053857600080fd5b80634b2f0ea0146103e15780634f1ef286146103f457806352d1902d1461040757806354fd4d501461041c578063564a565d1461045b57600080fd5b80631c3db16d1161020e5780631c3db16d1461032a5780631cc3423a146103675780632621b9a2146103875780632d68efc9146103a1578063362c3479146103c157600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102ef575b600080fd5b34801561025757600080fd5b5061026b610266366004613bfc565b610838565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613ca1565b610900565b005b3480156102ae57600080fd5b5061026b6102bd366004613bfc565b6109be565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516102779190613d31565b3480156102fb57600080fd5b5061031c61030a366004613bfc565b60036020526000908152604090205481565b604051908152602001610277565b34801561033657600080fd5b5061034a610345366004613bfc565b610a35565b604080519384529115156020840152151590820152606001610277565b34801561037357600080fd5b5061031c610382366004613def565b610ba3565b34801561039357600080fd5b5060045461026b9060ff1681565b3480156103ad57600080fd5b506007546102e2906001600160a01b031681565b3480156103cd57600080fd5b5061031c6103dc366004613e53565b610be3565b6102a06103ef366004613e90565b611093565b6102a0610402366004613eb2565b611923565b34801561041357600080fd5b5061031c611b42565b34801561042857600080fd5b5061044e604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613f51565b34801561046757600080fd5b5061047b610476366004613bfc565b611ba0565b60405161027793929190613f64565b34801561049657600080fd5b5061026b6104a5366004613f85565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104d757600080fd5b506102a06104e6366004613fbe565b611c66565b3480156104f757600080fd5b5061050b610506366004613bfc565b611c72565b6040516102779190614010565b34801561052457600080fd5b5061031c610533366004614053565b611d36565b34801561054457600080fd5b5061055861055336600461408e565b611e79565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059157600080fd5b5061026b6105a0366004613bfc565b611f31565b3480156105b157600080fd5b506102a06105c03660046140ba565b6120b4565b3480156105d157600080fd5b5061031c61271081565b3480156105e757600080fd5b506102a06105f63660046140fc565b612180565b34801561060757600080fd5b506102a0610616366004614184565b612197565b34801561062757600080fd5b506102a06106363660046140fc565b6121e3565b34801561064757600080fd5b5061065b61065636600461408e565b6122a9565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069357600080fd5b5061031c614e2081565b3480156106a957600080fd5b506102a06106b83660046141a1565b61236f565b3480156106c957600080fd5b5061026b6106d836600461408e565b612562565b3480156106e957600080fd5b5061031c61138881565b3480156106ff57600080fd5b506102a061070e3660046141fb565b6125fd565b34801561071f57600080fd5b506102e261072e366004613e90565b6126c7565b34801561073f57600080fd5b5061031c61074e366004613e90565b612a16565b34801561075f57600080fd5b506102a061076e366004614184565b612b69565b34801561077f57600080fd5b506001546102e2906001600160a01b031681565b34801561079f57600080fd5b506107b36107ae366004613e90565b612bb5565b60408051928352602083019190915201610277565b3480156107d457600080fd5b506102a06107e3366004614184565b612c07565b3480156107f457600080fd5b5061026b610803366004613bfc565b60066020526000908152604090205460ff1681565b34801561082457600080fd5b5061031c610833366004613bfc565b612cd9565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a9919061423b565b9150915060006108b885611c72565b9050805160001480156108f757506127106113886108d68585614275565b6108e09190614288565b6108ea919061429f565b6108f48442614275565b10155b95945050505050565b600087815260036020526040902054600280548992908110610924576109246142c1565b600091825260209091206002600590920201015460ff16156109615760405162461bcd60e51b8152600401610958906142d7565b60405180910390fd5b61096d88888888612d05565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109ac93929190614337565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109e2576109e26142c1565b60009182526020822060059091020180549092508290610a0490600190614275565b81548110610a1457610a146142c1565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6157610a616142c1565b60009182526020822060059091020180549092508290610a8390600190614275565b81548110610a9357610a936142c1565b60009182526020909120600c90910201600381015460ff169450905083610abe578060010154610ac1565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061437d565b5090935060049250610b44915050565b816004811115610b5657610b566143e6565b03610b99576000610b6688611c72565b90508051600103610b975780600081518110610b8457610b846142c1565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c55919061437d565b50935050505080610ca85760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610958565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f91906143fc565b15610d5d5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610958565b60008681526006602052604090205460ff16610d8b5760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110610daf57610daf6142c1565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610de357610de36142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e62919061444e565b5050600087815260078401602052604090205490915060ff16610eac576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ff1565b808603610f21576000868152600683016020526040902054610ecf576000610f1a565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f109190614288565b610f1a919061429f565b9450610ff1565b600081815260078301602052604090205460ff16610ff15781600601600083600a01600181548110610f5557610f556142c1565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f8b57610f8b6142c1565b9060005260206000200154815260200190815260200160002054610faf919061448a565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fe49190614288565b610fee919061429f565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561108757600754611038906001600160a01b038a811691889116613068565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae898960405161107e929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110b7576110b76142c1565b600091825260209091206002600590920201015460ff16156110eb5760405162461bcd60e51b8152600401610958906142d7565b60008381526003602052604081205460028054909190811061110f5761110f6142c1565b9060005260206000209060050201905080600101548311156111735760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610958565b60008481526006602052604090205460ff166111a15760405162461bcd60e51b815260040161095890614417565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611212919061423b565b9150915081421015801561122557508042105b61126a5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610958565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cf919061444e565b505090508681036112e4576127109150611365565b6127106113886112f48686614275565b6112fe9190614288565b611308919061429f565b6113128542614275565b1061135f5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610958565b614e2091505b8454600090869061137890600190614275565b81548110611388576113886142c1565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140b919061449d565b6114159190614275565b60008a815260078401602052604090205490915060ff16156114795760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610958565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e7919061449d565b905060006127106114f88784614288565b611502919061429f565b61150c908361448a565b60008c8152600686016020526040812054919250908211156115bd5760008c815260068601602052604090205434906115459084614275565b1161156a5760008c81526006860160205260409020546115659083614275565b61156c565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115b4929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115e990849061448a565b909155505060008c81526006860160205260408120805483929061160e90849061448a565b909155505060008c815260068601602052604090205482116116e05760008c81526006860160205260408120546009870180549192909161165090849061448a565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118eb578285600901546116fd9190614275565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561174b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176f91906143fc565b156117885760028a01805460ff1916600117905561186b565b895460038b01600061179b87600161448a565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161181691815260200190565b602060405180830381865afa158015611833573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611857919061449d565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118b8939291906144f0565b6000604051808303818588803b1580156118d157600080fd5b505af11580156118e5573d6000803e3d6000fd5b50505050505b80341115611914576119146119008234614275565b6007543391906001600160a01b0316613068565b50505050505050505050505050565b61192c82613153565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661199e6000805160206148498339815191525490565b6001600160a01b031614155b156119c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a22575060408051601f3d908101601f19168201909252611a1f9181019061449d565b60015b611a415781604051630c76093760e01b81526004016109589190613d31565b6000805160206148498339815191528114611a7257604051632a87526960e21b815260048101829052602401610958565b6000805160206148498339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b3d576000836001600160a01b031683604051611ad9919061458a565b600060405180830381855af49150503d8060008114611b14576040519150601f19603f3d011682016040523d82523d6000602084013e611b19565b606091505b5050905080611b3b576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b8d5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061484983398151915290565b60028181548110611bb057600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611be3906144b6565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0f906144b6565b8015611c5c5780601f10611c3157610100808354040283529160200191611c5c565b820191906000526020600020905b815481529060010190602001808311611c3f57829003601f168201915b5050505050905083565b611b3b84848484612d05565b6000818152600360205260408120546002805460609392908110611c9857611c986142c1565b60009182526020822060059091020180549092508290611cba90600190614275565b81548110611cca57611cca6142c1565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d2857602002820191906000526020600020905b815481526020019060010190808311611d14575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d5a57611d5a6142c1565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611d8e57611d8e6142c1565b90600052602060002090600c02016000018681548110611db057611db06142c1565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e32919061444e565b506003850154919350915060ff168015611e5657508183600201541480611e565750805b15611e69576127109450505050506108f7565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611eaa57611eaa6142c1565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ede57611ede6142c1565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f5557611f556142c1565b60009182526020822060059091020180549092508290611f7790600190614275565b81548110611f8757611f876142c1565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611fe2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612006919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612061573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208591906145a6565b505050505091505060008161209b5783546120a1565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120de5760405162461bcd60e51b815260040161095890614612565b6000836001600160a01b031683836040516120f9919061458a565b60006040518083038185875af1925050503d8060008114612136576040519150601f19603f3d011682016040523d82523d6000602084013e61213b565b606091505b5050905080611b3b5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610958565b61218f86868686868633613180565b505050505050565b6000546001600160a01b031633146121c15760405162461bcd60e51b815260040161095890614612565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600086815260036020526040812054600280549091908110612207576122076142c1565b6000918252602082206005909102018054909250829061222990600190614275565b81548110612239576122396142c1565b90600052602060002090600c02016000018787600081811061225d5761225d6142c1565b9050602002013581548110612274576122746142c1565b60009182526020909120600490910201546001600160a01b0316905061229f88888888888887613180565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122d7576122d76142c1565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061230b5761230b6142c1565b90600052602060002090600c0201600001878154811061232d5761232d6142c1565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123995760405162461bcd60e51b815260040161095890614654565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124248587836146e6565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab919061449d565b6124b59190614275565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612550908a908a908a90614337565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612586576125866142c1565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ba576125ba6142c1565b90600052602060002090600c020160000184815481106125dc576125dc6142c1565b600091825260209091206004909102016003015460ff169695505050505050565b600160006126096138b1565b8054909150600160401b900460ff1680612630575080546001600160401b03808416911610155b1561264d5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556126798585856138d5565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146126f45760405162461bcd60e51b815260040161095890614654565b600083815260036020526040902054600280548592908110612718576127186142c1565b600091825260209091206002600590920201015460ff161561274c5760405162461bcd60e51b8152600401610958906142d7565b6000848152600360205260408120546002805491929183908110612772576127726142c1565b600091825260208220600590910201805490925061279290600190614275565b905060008260000182815481106127ab576127ab6142c1565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612810573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283491906147a5565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a7919061437d565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561290b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292f91906147a5565b98506001600160a01b03891661294b5750505050505050612a0f565b612956848c8b61391c565b15612a0257604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a07565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a3a57612a3a6142c1565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a6e57612a6e6142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612acd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af1919061444e565b5091509150826004015460001480612b20575080158015612b2057506000828152600284016020526040902054155b15612b32576000945050505050612b63565b8015612b47575050600401549150612b639050565b506000908152600290910160205260409020549150612b639050565b92915050565b6000546001600160a01b03163314612b935760405162461bcd60e51b815260040161095890614612565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bdb57612bdb6142c1565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c136138b1565b8054909150600160401b900460ff1680612c3a575080546001600160401b03808416911610155b15612c575760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612cee57612cee6142c1565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d2957612d296142c1565b600091825260209091206002600590920201015460ff1615612d5d5760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dcb919061437d565b5090935060019250612ddb915050565b816004811115612ded57612ded6143e6565b14612e4a5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610958565b82612e875760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610958565b60008681526006602052604090205460ff16612eb55760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110612ed957612ed96142c1565b60009182526020822060059091020180549092508290612efb90600190614275565b81548110612f0b57612f0b6142c1565b90600052602060002090600c0201905060005b86811015613001573382898984818110612f3a57612f3a6142c1565b9050602002013581548110612f5157612f516142c1565b60009182526020909120600490910201546001600160a01b031614612fb85760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610958565b8582898984818110612fcc57612fcc6142c1565b9050602002013581548110612fe357612fe36142c1565b60009182526020909120600160049092020181019190915501612f1e565b5086869050816005016000828254613019919061448a565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890613056908b908b908b906147f4565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501561309757505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130d257600080fd5b505af11580156130e6573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561313657600080fd5b505af115801561314a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b0316331461317d5760405162461bcd60e51b815260040161095890614612565b50565b6000878152600360205260409020546002805489929081106131a4576131a46142c1565b600091825260209091206002600590920201015460ff16156131d85760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613222573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613246919061437d565b5090935060029250613256915050565b816004811115613268576132686143e6565b146132c35760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610958565b866133055760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610958565b60008981526006602052604090205460ff166133335760405162461bcd60e51b815260040161095890614417565b600089815260036020526040812054600280549091908110613357576133576142c1565b9060005260206000209060050201905080600101548711156133b25760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610958565b805460009082906133c590600190614275565b815481106133d5576133d56142c1565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061341a908f9060040190815260200190565b60a060405180830381865afa158015613437573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345b919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134da91906145a6565b505050505091505060006134ef8b8b8b610ba3565b905060005b8c811015613776576001600160a01b038916858f8f84818110613519576135196142c1565b9050602002013581548110613530576135306142c1565b60009182526020909120600490910201546001600160a01b0316146135975760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610958565b8215806135de575081858f8f848181106135b3576135b36142c1565b90506020020135815481106135ca576135ca6142c1565b906000526020600020906004020160010154145b61365e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610958565b848e8e83818110613671576136716142c1565b9050602002013581548110613688576136886142c1565b600091825260209091206003600490920201015460ff16156136e15760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610958565b8b858f8f848181106136f5576136f56142c1565b905060200201358154811061370c5761370c6142c1565b60009182526020909120600260049092020101556001858f8f84818110613735576137356142c1565b905060200201358154811061374c5761374c6142c1565b60009182526020909120600490910201600301805460ff19169115159190911790556001016134f4565b5050506004820180548b925060009061379090849061448a565b90915550506000888152600282016020526040812080548b92906137b590849061448a565b9091555050600181015488036137e457600381015460ff16156137df5760038101805460ff191690555b61385d565b60018101546000908152600282016020526040808220548a83529120540361382657600381015460ff166137df5760038101805460ff1916600117905561385d565b60018101546000908152600282016020526040808220548a8352912054111561385d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161389c93929190614818565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138dd613ade565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b6000613929848484613b05565b61393557506000610bdc565b600083815260036020526040812054600280549192918390811061395b5761395b6142c1565b906000526020600020906005020190506000806000613a05846004018054613982906144b6565b80601f01602080910402602001604051908101604052809291908181526020018280546139ae906144b6565b80156139fb5780601f106139d0576101008083540402835291602001916139fb565b820191906000526020600020905b8154815290600101906020018083116139de57829003601f168201915b5050505050613b9d565b919450925090506001600160a01b038316613a2857600195505050505050610bdc565b8115613aaf57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa158015613a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa2919061449d565b1195505050505050610bdc565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613a61908b90600401613d31565b613ae6613be2565b613b0357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613b93576000838152600360205260408120546002805491929183908110613b3957613b396142c1565b6000918252602082206005909102018054909250613b5990600190614275565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610bdc915050565b5060019392505050565b600080600060a084511015613bba57506000915081905080613bdb565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000613bec6138b1565b54600160401b900460ff16919050565b600060208284031215613c0e57600080fd5b5035919050565b60008083601f840112613c2757600080fd5b5081356001600160401b03811115613c3e57600080fd5b6020830191508360208260051b8501011115613c5957600080fd5b9250929050565b60008083601f840112613c7257600080fd5b5081356001600160401b03811115613c8957600080fd5b602083019150836020828501011115613c5957600080fd5b600080600080600080600060a0888a031215613cbc57600080fd5b8735965060208801356001600160401b03811115613cd957600080fd5b613ce58a828b01613c15565b909750955050604088013593506060880135925060808801356001600160401b03811115613d1257600080fd5b613d1e8a828b01613c60565b989b979a50959850939692959293505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613d6c57600080fd5b8135602083016000806001600160401b03841115613d8c57613d8c613d45565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613dba57613dba613d45565b604052838152905080828401871015613dd257600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613e0457600080fd5b833592506020840135915060408401356001600160401b03811115613e2857600080fd5b613e3486828701613d5b565b9150509250925092565b6001600160a01b038116811461317d57600080fd5b60008060008060808587031215613e6957600080fd5b843593506020850135613e7b81613e3e565b93969395505050506040820135916060013590565b60008060408385031215613ea357600080fd5b50508035926020909101359150565b60008060408385031215613ec557600080fd5b8235613ed081613e3e565b915060208301356001600160401b03811115613eeb57600080fd5b613ef785828601613d5b565b9150509250929050565b60005b83811015613f1c578181015183820152602001613f04565b50506000910152565b60008151808452613f3d816020860160208601613f01565b601f01601f19169290920160200192915050565b602081526000610bdc6020830184613f25565b83815282151560208201526060604082015260006108f76060830184613f25565b600080600060608486031215613f9a57600080fd5b83359250602084013591506040840135613fb381613e3e565b809150509250925092565b60008060008060608587031215613fd457600080fd5b8435935060208501356001600160401b03811115613ff157600080fd5b613ffd87828801613c15565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b8181101561404857835183526020938401939092019160010161402a565b509095945050505050565b600080600080600060a0868803121561406b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806000606084860312156140a357600080fd5b505081359360208301359350604090920135919050565b6000806000606084860312156140cf57600080fd5b83356140da81613e3e565b92506020840135915060408401356001600160401b03811115613e2857600080fd5b60008060008060008060a0878903121561411557600080fd5b8635955060208701356001600160401b0381111561413257600080fd5b61413e89828a01613c15565b909650945050604087013592506060870135915060808701356001600160401b0381111561416b57600080fd5b61417789828a01613d5b565b9150509295509295509295565b60006020828403121561419657600080fd5b8135610bdc81613e3e565b6000806000806000608086880312156141b957600080fd5b853594506020860135935060408601356001600160401b038111156141dd57600080fd5b6141e988828901613c60565b96999598509660600135949350505050565b60008060006060848603121561421057600080fd5b833561421b81613e3e565b9250602084013561422b81613e3e565b91506040840135613fb381613e3e565b6000806040838503121561424e57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b6357612b6361425f565b8082028115828204841417612b6357612b6361425f565b6000826142bc57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8381526040602082015260006108f760408301848661430e565b80516001600160601b038116811461436857600080fd5b919050565b8051801515811461436857600080fd5b600080600080600060a0868803121561439557600080fd5b61439e86614351565b945060208601516143ae81613e3e565b6040870151909450600581106143c357600080fd5b92506143d16060870161436d565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561440e57600080fd5b610bdc8261436d565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561446357600080fd5b835192506144736020850161436d565b91506144816040850161436d565b90509250925092565b80820180821115612b6357612b6361425f565b6000602082840312156144af57600080fd5b5051919050565b600181811c908216806144ca57607f821691505b6020821081036144ea57634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461450e816144b6565b806060860152600182166000811461452d57600181146145495761457d565b60ff1983166080870152608082151560051b870101935061457d565b86600052602060002060005b8381101561457457815488820160800152600190910190602001614555565b87016080019450505b5091979650505050505050565b6000825161459c818460208701613f01565b9190910192915050565b600080600080600080600060e0888a0312156145c157600080fd5b6145ca88614351565b96506145d86020890161436d565b604089015160608a015160808b015160a08c015193995091975095509350915061460460c0890161436d565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b3d57806000526020600020601f840160051c810160208510156146bf5750805b601f840160051c820191505b818110156146df57600081556001016146cb565b5050505050565b6001600160401b038311156146fd576146fd613d45565b6147118361470b83546144b6565b83614698565b6000601f841160018114614745576000851561472d5750838201355b600019600387901b1c1916600186901b1783556146df565b600083815260209020601f19861690835b828110156147765786850135825560209485019460019092019101614756565b50868210156147935760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156147b757600080fd5b8151610bdc81613e3e565b81835260006001600160fb1b038311156147db57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006148086040830185876147c2565b9050826020830152949350505050565b60408152600061482c6040830185876147c2565b828103602084015261483e8185613f25565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220cd5d3742f8c0524170b60f04c4a752d412f4c6d549337356905de2b1c28294eb64736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf414610753578063f2f4eb2614610773578063f32ab92714610793578063f7e7d1fd146107c8578063f8abee10146107e8578063fc6f8f161461081857600080fd5b8063be467604146106dd578063c0c53b8b146106f3578063d2b8035a14610713578063da3beb8c14610733578063e349ad30146105c557600080fd5b80638f06f112116100fd5780638f06f1121461061b578063a7cc08fe1461063b578063b34bfaa814610687578063b6ede5401461069d578063ba66fde7146106bd57600080fd5b80636d4cd8ea14610585578063751accd0146105a5578063796490f9146105c55780637c04034e146105db5780638e426460146105fb57600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd1461048a5780635c92e2f6146104cb57806365540b96146104eb578063675926f61461051857806369f3f0411461053857600080fd5b80634b2f0ea0146103e15780634f1ef286146103f457806352d1902d1461040757806354fd4d501461041c578063564a565d1461045b57600080fd5b80631c3db16d1161020e5780631c3db16d1461032a5780631cc3423a146103675780632621b9a2146103875780632d68efc9146103a1578063362c3479146103c157600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102ef575b600080fd5b34801561025757600080fd5b5061026b610266366004613bfc565b610838565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613ca1565b610900565b005b3480156102ae57600080fd5b5061026b6102bd366004613bfc565b6109be565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516102779190613d31565b3480156102fb57600080fd5b5061031c61030a366004613bfc565b60036020526000908152604090205481565b604051908152602001610277565b34801561033657600080fd5b5061034a610345366004613bfc565b610a35565b604080519384529115156020840152151590820152606001610277565b34801561037357600080fd5b5061031c610382366004613def565b610ba3565b34801561039357600080fd5b5060045461026b9060ff1681565b3480156103ad57600080fd5b506007546102e2906001600160a01b031681565b3480156103cd57600080fd5b5061031c6103dc366004613e53565b610be3565b6102a06103ef366004613e90565b611093565b6102a0610402366004613eb2565b611923565b34801561041357600080fd5b5061031c611b42565b34801561042857600080fd5b5061044e604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613f51565b34801561046757600080fd5b5061047b610476366004613bfc565b611ba0565b60405161027793929190613f64565b34801561049657600080fd5b5061026b6104a5366004613f85565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104d757600080fd5b506102a06104e6366004613fbe565b611c66565b3480156104f757600080fd5b5061050b610506366004613bfc565b611c72565b6040516102779190614010565b34801561052457600080fd5b5061031c610533366004614053565b611d36565b34801561054457600080fd5b5061055861055336600461408e565b611e79565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059157600080fd5b5061026b6105a0366004613bfc565b611f31565b3480156105b157600080fd5b506102a06105c03660046140ba565b6120b4565b3480156105d157600080fd5b5061031c61271081565b3480156105e757600080fd5b506102a06105f63660046140fc565b612180565b34801561060757600080fd5b506102a0610616366004614184565b612197565b34801561062757600080fd5b506102a06106363660046140fc565b6121e3565b34801561064757600080fd5b5061065b61065636600461408e565b6122a9565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069357600080fd5b5061031c614e2081565b3480156106a957600080fd5b506102a06106b83660046141a1565b61236f565b3480156106c957600080fd5b5061026b6106d836600461408e565b612562565b3480156106e957600080fd5b5061031c61138881565b3480156106ff57600080fd5b506102a061070e3660046141fb565b6125fd565b34801561071f57600080fd5b506102e261072e366004613e90565b6126c7565b34801561073f57600080fd5b5061031c61074e366004613e90565b612a16565b34801561075f57600080fd5b506102a061076e366004614184565b612b69565b34801561077f57600080fd5b506001546102e2906001600160a01b031681565b34801561079f57600080fd5b506107b36107ae366004613e90565b612bb5565b60408051928352602083019190915201610277565b3480156107d457600080fd5b506102a06107e3366004614184565b612c07565b3480156107f457600080fd5b5061026b610803366004613bfc565b60066020526000908152604090205460ff1681565b34801561082457600080fd5b5061031c610833366004613bfc565b612cd9565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a9919061423b565b9150915060006108b885611c72565b9050805160001480156108f757506127106113886108d68585614275565b6108e09190614288565b6108ea919061429f565b6108f48442614275565b10155b95945050505050565b600087815260036020526040902054600280548992908110610924576109246142c1565b600091825260209091206002600590920201015460ff16156109615760405162461bcd60e51b8152600401610958906142d7565b60405180910390fd5b61096d88888888612d05565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109ac93929190614337565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109e2576109e26142c1565b60009182526020822060059091020180549092508290610a0490600190614275565b81548110610a1457610a146142c1565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6157610a616142c1565b60009182526020822060059091020180549092508290610a8390600190614275565b81548110610a9357610a936142c1565b60009182526020909120600c90910201600381015460ff169450905083610abe578060010154610ac1565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061437d565b5090935060049250610b44915050565b816004811115610b5657610b566143e6565b03610b99576000610b6688611c72565b90508051600103610b975780600081518110610b8457610b846142c1565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c55919061437d565b50935050505080610ca85760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610958565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f91906143fc565b15610d5d5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610958565b60008681526006602052604090205460ff16610d8b5760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110610daf57610daf6142c1565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610de357610de36142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e62919061444e565b5050600087815260078401602052604090205490915060ff16610eac576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ff1565b808603610f21576000868152600683016020526040902054610ecf576000610f1a565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f109190614288565b610f1a919061429f565b9450610ff1565b600081815260078301602052604090205460ff16610ff15781600601600083600a01600181548110610f5557610f556142c1565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f8b57610f8b6142c1565b9060005260206000200154815260200190815260200160002054610faf919061448a565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fe49190614288565b610fee919061429f565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561108757600754611038906001600160a01b038a811691889116613068565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae898960405161107e929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110b7576110b76142c1565b600091825260209091206002600590920201015460ff16156110eb5760405162461bcd60e51b8152600401610958906142d7565b60008381526003602052604081205460028054909190811061110f5761110f6142c1565b9060005260206000209060050201905080600101548311156111735760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610958565b60008481526006602052604090205460ff166111a15760405162461bcd60e51b815260040161095890614417565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611212919061423b565b9150915081421015801561122557508042105b61126a5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610958565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cf919061444e565b505090508681036112e4576127109150611365565b6127106113886112f48686614275565b6112fe9190614288565b611308919061429f565b6113128542614275565b1061135f5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610958565b614e2091505b8454600090869061137890600190614275565b81548110611388576113886142c1565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140b919061449d565b6114159190614275565b60008a815260078401602052604090205490915060ff16156114795760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610958565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e7919061449d565b905060006127106114f88784614288565b611502919061429f565b61150c908361448a565b60008c8152600686016020526040812054919250908211156115bd5760008c815260068601602052604090205434906115459084614275565b1161156a5760008c81526006860160205260409020546115659083614275565b61156c565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115b4929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115e990849061448a565b909155505060008c81526006860160205260408120805483929061160e90849061448a565b909155505060008c815260068601602052604090205482116116e05760008c81526006860160205260408120546009870180549192909161165090849061448a565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118eb578285600901546116fd9190614275565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561174b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176f91906143fc565b156117885760028a01805460ff1916600117905561186b565b895460038b01600061179b87600161448a565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161181691815260200190565b602060405180830381865afa158015611833573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611857919061449d565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118b8939291906144f0565b6000604051808303818588803b1580156118d157600080fd5b505af11580156118e5573d6000803e3d6000fd5b50505050505b80341115611914576119146119008234614275565b6007543391906001600160a01b0316613068565b50505050505050505050505050565b61192c82613153565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661199e6000805160206148498339815191525490565b6001600160a01b031614155b156119c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a22575060408051601f3d908101601f19168201909252611a1f9181019061449d565b60015b611a415781604051630c76093760e01b81526004016109589190613d31565b6000805160206148498339815191528114611a7257604051632a87526960e21b815260048101829052602401610958565b6000805160206148498339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b3d576000836001600160a01b031683604051611ad9919061458a565b600060405180830381855af49150503d8060008114611b14576040519150601f19603f3d011682016040523d82523d6000602084013e611b19565b606091505b5050905080611b3b576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b8d5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061484983398151915290565b60028181548110611bb057600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611be3906144b6565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0f906144b6565b8015611c5c5780601f10611c3157610100808354040283529160200191611c5c565b820191906000526020600020905b815481529060010190602001808311611c3f57829003601f168201915b5050505050905083565b611b3b84848484612d05565b6000818152600360205260408120546002805460609392908110611c9857611c986142c1565b60009182526020822060059091020180549092508290611cba90600190614275565b81548110611cca57611cca6142c1565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d2857602002820191906000526020600020905b815481526020019060010190808311611d14575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d5a57611d5a6142c1565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611d8e57611d8e6142c1565b90600052602060002090600c02016000018681548110611db057611db06142c1565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e32919061444e565b506003850154919350915060ff168015611e5657508183600201541480611e565750805b15611e69576127109450505050506108f7565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611eaa57611eaa6142c1565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ede57611ede6142c1565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f5557611f556142c1565b60009182526020822060059091020180549092508290611f7790600190614275565b81548110611f8757611f876142c1565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611fe2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612006919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612061573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208591906145a6565b505050505091505060008161209b5783546120a1565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120de5760405162461bcd60e51b815260040161095890614612565b6000836001600160a01b031683836040516120f9919061458a565b60006040518083038185875af1925050503d8060008114612136576040519150601f19603f3d011682016040523d82523d6000602084013e61213b565b606091505b5050905080611b3b5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610958565b61218f86868686868633613180565b505050505050565b6000546001600160a01b031633146121c15760405162461bcd60e51b815260040161095890614612565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600086815260036020526040812054600280549091908110612207576122076142c1565b6000918252602082206005909102018054909250829061222990600190614275565b81548110612239576122396142c1565b90600052602060002090600c02016000018787600081811061225d5761225d6142c1565b9050602002013581548110612274576122746142c1565b60009182526020909120600490910201546001600160a01b0316905061229f88888888888887613180565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122d7576122d76142c1565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061230b5761230b6142c1565b90600052602060002090600c0201600001878154811061232d5761232d6142c1565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123995760405162461bcd60e51b815260040161095890614654565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124248587836146e6565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab919061449d565b6124b59190614275565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612550908a908a908a90614337565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612586576125866142c1565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ba576125ba6142c1565b90600052602060002090600c020160000184815481106125dc576125dc6142c1565b600091825260209091206004909102016003015460ff169695505050505050565b600160006126096138b1565b8054909150600160401b900460ff1680612630575080546001600160401b03808416911610155b1561264d5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556126798585856138d5565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146126f45760405162461bcd60e51b815260040161095890614654565b600083815260036020526040902054600280548592908110612718576127186142c1565b600091825260209091206002600590920201015460ff161561274c5760405162461bcd60e51b8152600401610958906142d7565b6000848152600360205260408120546002805491929183908110612772576127726142c1565b600091825260208220600590910201805490925061279290600190614275565b905060008260000182815481106127ab576127ab6142c1565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612810573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283491906147a5565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a7919061437d565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561290b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292f91906147a5565b98506001600160a01b03891661294b5750505050505050612a0f565b612956848c8b61391c565b15612a0257604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a07565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a3a57612a3a6142c1565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a6e57612a6e6142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612acd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af1919061444e565b5091509150826004015460001480612b20575080158015612b2057506000828152600284016020526040902054155b15612b32576000945050505050612b63565b8015612b47575050600401549150612b639050565b506000908152600290910160205260409020549150612b639050565b92915050565b6000546001600160a01b03163314612b935760405162461bcd60e51b815260040161095890614612565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bdb57612bdb6142c1565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c136138b1565b8054909150600160401b900460ff1680612c3a575080546001600160401b03808416911610155b15612c575760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612cee57612cee6142c1565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d2957612d296142c1565b600091825260209091206002600590920201015460ff1615612d5d5760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dcb919061437d565b5090935060019250612ddb915050565b816004811115612ded57612ded6143e6565b14612e4a5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610958565b82612e875760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610958565b60008681526006602052604090205460ff16612eb55760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110612ed957612ed96142c1565b60009182526020822060059091020180549092508290612efb90600190614275565b81548110612f0b57612f0b6142c1565b90600052602060002090600c0201905060005b86811015613001573382898984818110612f3a57612f3a6142c1565b9050602002013581548110612f5157612f516142c1565b60009182526020909120600490910201546001600160a01b031614612fb85760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610958565b8582898984818110612fcc57612fcc6142c1565b9050602002013581548110612fe357612fe36142c1565b60009182526020909120600160049092020181019190915501612f1e565b5086869050816005016000828254613019919061448a565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890613056908b908b908b906147f4565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501561309757505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130d257600080fd5b505af11580156130e6573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561313657600080fd5b505af115801561314a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b0316331461317d5760405162461bcd60e51b815260040161095890614612565b50565b6000878152600360205260409020546002805489929081106131a4576131a46142c1565b600091825260209091206002600590920201015460ff16156131d85760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613222573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613246919061437d565b5090935060029250613256915050565b816004811115613268576132686143e6565b146132c35760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610958565b866133055760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610958565b60008981526006602052604090205460ff166133335760405162461bcd60e51b815260040161095890614417565b600089815260036020526040812054600280549091908110613357576133576142c1565b9060005260206000209060050201905080600101548711156133b25760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610958565b805460009082906133c590600190614275565b815481106133d5576133d56142c1565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061341a908f9060040190815260200190565b60a060405180830381865afa158015613437573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345b919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134da91906145a6565b505050505091505060006134ef8b8b8b610ba3565b905060005b8c811015613776576001600160a01b038916858f8f84818110613519576135196142c1565b9050602002013581548110613530576135306142c1565b60009182526020909120600490910201546001600160a01b0316146135975760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610958565b8215806135de575081858f8f848181106135b3576135b36142c1565b90506020020135815481106135ca576135ca6142c1565b906000526020600020906004020160010154145b61365e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610958565b848e8e83818110613671576136716142c1565b9050602002013581548110613688576136886142c1565b600091825260209091206003600490920201015460ff16156136e15760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610958565b8b858f8f848181106136f5576136f56142c1565b905060200201358154811061370c5761370c6142c1565b60009182526020909120600260049092020101556001858f8f84818110613735576137356142c1565b905060200201358154811061374c5761374c6142c1565b60009182526020909120600490910201600301805460ff19169115159190911790556001016134f4565b5050506004820180548b925060009061379090849061448a565b90915550506000888152600282016020526040812080548b92906137b590849061448a565b9091555050600181015488036137e457600381015460ff16156137df5760038101805460ff191690555b61385d565b60018101546000908152600282016020526040808220548a83529120540361382657600381015460ff166137df5760038101805460ff1916600117905561385d565b60018101546000908152600282016020526040808220548a8352912054111561385d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161389c93929190614818565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138dd613ade565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b6000613929848484613b05565b61393557506000610bdc565b600083815260036020526040812054600280549192918390811061395b5761395b6142c1565b906000526020600020906005020190506000806000613a05846004018054613982906144b6565b80601f01602080910402602001604051908101604052809291908181526020018280546139ae906144b6565b80156139fb5780601f106139d0576101008083540402835291602001916139fb565b820191906000526020600020905b8154815290600101906020018083116139de57829003601f168201915b5050505050613b9d565b919450925090506001600160a01b038316613a2857600195505050505050610bdc565b8115613aaf57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa158015613a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa2919061449d565b1195505050505050610bdc565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613a61908b90600401613d31565b613ae6613be2565b613b0357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613b93576000838152600360205260408120546002805491929183908110613b3957613b396142c1565b6000918252602082206005909102018054909250613b5990600190614275565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610bdc915050565b5060019392505050565b600080600060a084511015613bba57506000915081905080613bdb565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000613bec6138b1565b54600160401b900460ff16919050565b600060208284031215613c0e57600080fd5b5035919050565b60008083601f840112613c2757600080fd5b5081356001600160401b03811115613c3e57600080fd5b6020830191508360208260051b8501011115613c5957600080fd5b9250929050565b60008083601f840112613c7257600080fd5b5081356001600160401b03811115613c8957600080fd5b602083019150836020828501011115613c5957600080fd5b600080600080600080600060a0888a031215613cbc57600080fd5b8735965060208801356001600160401b03811115613cd957600080fd5b613ce58a828b01613c15565b909750955050604088013593506060880135925060808801356001600160401b03811115613d1257600080fd5b613d1e8a828b01613c60565b989b979a50959850939692959293505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613d6c57600080fd5b8135602083016000806001600160401b03841115613d8c57613d8c613d45565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613dba57613dba613d45565b604052838152905080828401871015613dd257600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613e0457600080fd5b833592506020840135915060408401356001600160401b03811115613e2857600080fd5b613e3486828701613d5b565b9150509250925092565b6001600160a01b038116811461317d57600080fd5b60008060008060808587031215613e6957600080fd5b843593506020850135613e7b81613e3e565b93969395505050506040820135916060013590565b60008060408385031215613ea357600080fd5b50508035926020909101359150565b60008060408385031215613ec557600080fd5b8235613ed081613e3e565b915060208301356001600160401b03811115613eeb57600080fd5b613ef785828601613d5b565b9150509250929050565b60005b83811015613f1c578181015183820152602001613f04565b50506000910152565b60008151808452613f3d816020860160208601613f01565b601f01601f19169290920160200192915050565b602081526000610bdc6020830184613f25565b83815282151560208201526060604082015260006108f76060830184613f25565b600080600060608486031215613f9a57600080fd5b83359250602084013591506040840135613fb381613e3e565b809150509250925092565b60008060008060608587031215613fd457600080fd5b8435935060208501356001600160401b03811115613ff157600080fd5b613ffd87828801613c15565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b8181101561404857835183526020938401939092019160010161402a565b509095945050505050565b600080600080600060a0868803121561406b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806000606084860312156140a357600080fd5b505081359360208301359350604090920135919050565b6000806000606084860312156140cf57600080fd5b83356140da81613e3e565b92506020840135915060408401356001600160401b03811115613e2857600080fd5b60008060008060008060a0878903121561411557600080fd5b8635955060208701356001600160401b0381111561413257600080fd5b61413e89828a01613c15565b909650945050604087013592506060870135915060808701356001600160401b0381111561416b57600080fd5b61417789828a01613d5b565b9150509295509295509295565b60006020828403121561419657600080fd5b8135610bdc81613e3e565b6000806000806000608086880312156141b957600080fd5b853594506020860135935060408601356001600160401b038111156141dd57600080fd5b6141e988828901613c60565b96999598509660600135949350505050565b60008060006060848603121561421057600080fd5b833561421b81613e3e565b9250602084013561422b81613e3e565b91506040840135613fb381613e3e565b6000806040838503121561424e57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b6357612b6361425f565b8082028115828204841417612b6357612b6361425f565b6000826142bc57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8381526040602082015260006108f760408301848661430e565b80516001600160601b038116811461436857600080fd5b919050565b8051801515811461436857600080fd5b600080600080600060a0868803121561439557600080fd5b61439e86614351565b945060208601516143ae81613e3e565b6040870151909450600581106143c357600080fd5b92506143d16060870161436d565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561440e57600080fd5b610bdc8261436d565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561446357600080fd5b835192506144736020850161436d565b91506144816040850161436d565b90509250925092565b80820180821115612b6357612b6361425f565b6000602082840312156144af57600080fd5b5051919050565b600181811c908216806144ca57607f821691505b6020821081036144ea57634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461450e816144b6565b806060860152600182166000811461452d57600181146145495761457d565b60ff1983166080870152608082151560051b870101935061457d565b86600052602060002060005b8381101561457457815488820160800152600190910190602001614555565b87016080019450505b5091979650505050505050565b6000825161459c818460208701613f01565b9190910192915050565b600080600080600080600060e0888a0312156145c157600080fd5b6145ca88614351565b96506145d86020890161436d565b604089015160608a015160808b015160a08c015193995091975095509350915061460460c0890161436d565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b3d57806000526020600020601f840160051c810160208510156146bf5750805b601f840160051c820191505b818110156146df57600081556001016146cb565b5050505050565b6001600160401b038311156146fd576146fd613d45565b6147118361470b83546144b6565b83614698565b6000601f841160018114614745576000851561472d5750838201355b600019600387901b1c1916600186901b1783556146df565b600083815260209020601f19861690835b828110156147765786850135825560209485019460019092019101614756565b50868210156147935760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156147b757600080fd5b8151610bdc81613e3e565b81835260006001600160fb1b038311156147db57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006148086040830185876147c2565b9050826020830152949350505050565b60408152600061482c6040830185876147c2565b828103602084015261483e8185613f25565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220cd5d3742f8c0524170b60f04c4a752d412f4c6d549337356905de2b1c28294eb64736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "CommitCastShutter(uint256,address,bytes32,bytes32,bytes)": { - "details": "Emitted when a vote is cast.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_juror": "The address of the juror casting the vote commitment." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash including the justification.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encoding", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitGatedShutter Added functionality: shielded voting. Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 21704, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 21707, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)11133" - }, - { - "astId": 21711, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)21643_storage)dyn_storage" - }, - { - "astId": 21715, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21717, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 21725, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 21729, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 21731, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)21643_storage)dyn_storage": { - "base": "t_struct(Dispute)21643_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)21681_storage)dyn_storage": { - "base": "t_struct(Round)21681_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)21690_storage)dyn_storage": { - "base": "t_struct(Vote)21690_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)11133": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)21643_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 21632, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)21681_storage)dyn_storage" - }, - { - "astId": 21634, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 21636, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 21640, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21642, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)21681_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 21647, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)21690_storage)dyn_storage" - }, - { - "astId": 21649, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 21653, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21655, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 21657, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 21659, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 21663, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21667, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 21673, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 21675, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 21678, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 21680, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)21690_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 21683, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 21685, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 21687, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 21689, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitGatedShutter_Proxy.json b/contracts/deployments/arbitrum/DisputeKitGatedShutter_Proxy.json deleted file mode 100644 index b31e1c28a..000000000 --- a/contracts/deployments/arbitrum/DisputeKitGatedShutter_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x788330092B9704809C19858E39EB9Ac402c2E47b", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x2fa78e2ff0776968dd343541316038adf2b361d51d423989f38975bf9f9d1141", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x788330092B9704809C19858E39EB9Ac402c2E47b", - "transactionIndex": 4, - "gasUsed": "228419", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000800000000000000000080000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x41216ca34b46131cdfbdacb6eb99ce2aeae86cb1c8ed38f1b71e4d1d8eb8d302", - "transactionHash": "0x2fa78e2ff0776968dd343541316038adf2b361d51d423989f38975bf9f9d1141", - "logs": [ - { - "transactionIndex": 4, - "blockNumber": 364034451, - "transactionHash": "0x2fa78e2ff0776968dd343541316038adf2b361d51d423989f38975bf9f9d1141", - "address": "0x788330092B9704809C19858E39EB9Ac402c2E47b", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0x41216ca34b46131cdfbdacb6eb99ce2aeae86cb1c8ed38f1b71e4d1d8eb8d302" - } - ], - "blockNumber": 364034451, - "cumulativeGasUsed": "441843", - "status": 1, - "byzantium": true - }, - "args": [ - "0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32", - "0xc0c53b8b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1" - ], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitGated_Implementation.json b/contracts/deployments/arbitrum/DisputeKitGated_Implementation.json deleted file mode 100644 index e038a35fb..000000000 --- a/contracts/deployments/arbitrum/DisputeKitGated_Implementation.json +++ /dev/null @@ -1,1892 +0,0 @@ -{ - "address": "0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "extraDataToTokenInfo", - "outputs": [ - { - "internalType": "address", - "name": "tokenGate", - "type": "address" - }, - { - "internalType": "bool", - "name": "isERC1155", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x86256e18136ffa7e75a436e99b4619608bc89fba418263ab52b8ce371a6a40d8", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a", - "transactionIndex": 6, - "gasUsed": "4056168", - "logsBloom": "0x00000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb1d2130d5bdd50bbdf7153f0c5269bbbf6ac62ba63415c605c07d51038355d52", - "transactionHash": "0x86256e18136ffa7e75a436e99b4619608bc89fba418263ab52b8ce371a6a40d8", - "logs": [ - { - "transactionIndex": 6, - "blockNumber": 364034421, - "transactionHash": "0x86256e18136ffa7e75a436e99b4619608bc89fba418263ab52b8ce371a6a40d8", - "address": "0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 9, - "blockHash": "0xb1d2130d5bdd50bbdf7153f0c5269bbbf6ac62ba63415c605c07d51038355d52" - } - ], - "blockNumber": 364034421, - "cumulativeGasUsed": "4410841", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"extraDataToTokenInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"tokenGate\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isERC1155\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"extraDataToTokenInfo(bytes)\":{\"details\":\"Extracts token gating information from the extra data.\",\"params\":{\"_extraData\":\"The extra data bytes array with the following encoding: - bytes 0-31: uint96 courtID, not used here - bytes 32-63: uint256 minJurors, not used here - bytes 64-95: uint256 disputeKitID, not used here - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160) - bytes 128-159: uint256 tokenId\"},\"returns\":{\"isERC1155\":\"True if the token is an ERC-1155, false for ERC-20/ERC-721.\",\"tokenGate\":\"The address of the token contract used for gating access.\",\"tokenId\":\"The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitGated Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitGated.sol\":\"DisputeKitGated\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitGated.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\ninterface IBalanceHolder {\\n /// @dev Returns the number of tokens in `owner` account.\\n /// @dev Compatible with ERC-20 and ERC-721.\\n /// @param owner The address of the owner.\\n /// @return balance The number of tokens in `owner` account.\\n function balanceOf(address owner) external view returns (uint256 balance);\\n}\\n\\ninterface IBalanceHolderERC1155 {\\n /// @dev Returns the balance of an ERC-1155 token.\\n /// @param account The address of the token holder\\n /// @param id ID of the token\\n /// @return The token balance\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\\n/// @title DisputeKitGated\\n/// Dispute kit implementation adapted from DisputeKitClassic\\n/// - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitGated is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Extracts token gating information from the extra data.\\n /// @param _extraData The extra data bytes array with the following encoding:\\n /// - bytes 0-31: uint96 courtID, not used here\\n /// - bytes 32-63: uint256 minJurors, not used here\\n /// - bytes 64-95: uint256 disputeKitID, not used here\\n /// - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160)\\n /// - bytes 128-159: uint256 tokenId\\n /// @return tokenGate The address of the token contract used for gating access.\\n /// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721.\\n /// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).\\n function extraDataToTokenInfo(\\n bytes memory _extraData\\n ) public pure returns (address tokenGate, bool isERC1155, uint256 tokenId) {\\n // Need at least 160 bytes to safely read the parameters\\n if (_extraData.length < 160) return (address(0), false, 0);\\n\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let packedTokenGateIsERC1155 := mload(add(_extraData, 0x80)) // 4th parameter at offset 128\\n tokenId := mload(add(_extraData, 0xA0)) // 5th parameter at offset 160 (moved up)\\n\\n // Unpack address from lower 160 bits and bool from bit 160\\n tokenGate := and(packedTokenGateIsERC1155, 0xffffffffffffffffffffffffffffffffffffffff)\\n isERC1155 := and(shr(160, packedTokenGateIsERC1155), 1)\\n }\\n }\\n\\n /// @inheritdoc DisputeKitClassicBase\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view override returns (bool) {\\n if (!super._postDrawCheck(_round, _coreDisputeID, _juror)) return false;\\n\\n // Get the local dispute and extract token info from extraData\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n (address tokenGate, bool isERC1155, uint256 tokenId) = extraDataToTokenInfo(dispute.extraData);\\n\\n // If no token gate is specified, allow all jurors\\n if (tokenGate == address(0)) return true;\\n\\n // Check juror's token balance\\n if (isERC1155) {\\n return IBalanceHolderERC1155(tokenGate).balanceOf(_juror, tokenId) > 0;\\n } else {\\n return IBalanceHolder(tokenGate).balanceOf(_juror) > 0;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x449beea4cdeceb81cfc053987fd39c2f552fe3f5da03384c623b167f91f9307b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516146966100fc60003960008181611868015281816118910152611a8001526146966000f3fe60806040526004361061023b5760003560e01c8063751accd01161012e578063d2b8035a116100ab578063f2f4eb261161006f578063f2f4eb261461076d578063f32ab9271461078d578063f7e7d1fd146107c2578063f8abee10146107e2578063fc6f8f161461081257600080fd5b8063d2b8035a146106c8578063da3beb8c146106e8578063e349ad301461059a578063e4c0aaf414610708578063ec7b23fb1461072857600080fd5b8063b34bfaa8116100f2578063b34bfaa81461063c578063b6ede54014610652578063ba66fde714610672578063be46760414610692578063c0c53b8b146106a857600080fd5b8063751accd01461057a578063796490f91461059a5780637c04034e146105b05780638e426460146105d0578063a7cc08fe146105f057600080fd5b80634f1ef286116101bc5780635c92e2f6116101805780635c92e2f6146104a057806365540b96146104c0578063675926f6146104ed57806369f3f0411461050d5780636d4cd8ea1461055a57600080fd5b80634f1ef286146103c957806352d1902d146103dc57806354fd4d50146103f1578063564a565d146104305780635a155ccd1461045f57600080fd5b80631cc3423a116102035780631cc3423a1461033a5780632621b9a21461035a5780632d68efc914610374578063362c3479146103945780634b2f0ea0146103b457600080fd5b80630855bbe9146102405780630baa64d1146102755780630c340a24146102955780631200aabc146102c25780631c3db16d146102fd575b600080fd5b34801561024c57600080fd5b5061026061025b366004613a67565b610832565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b50610260610290366004613a67565b6108fa565b3480156102a157600080fd5b506000546102b5906001600160a01b031681565b60405161026c9190613a80565b3480156102ce57600080fd5b506102ef6102dd366004613a67565b60036020526000908152604090205481565b60405190815260200161026c565b34801561030957600080fd5b5061031d610318366004613a67565b610971565b60408051938452911515602084015215159082015260600161026c565b34801561034657600080fd5b506102ef610355366004613b3e565b610adf565b34801561036657600080fd5b506004546102609060ff1681565b34801561038057600080fd5b506007546102b5906001600160a01b031681565b3480156103a057600080fd5b506102ef6103af366004613ba2565b610b0f565b6103c76103c2366004613bdf565b610fc4565b005b6103c76103d7366004613c01565b611854565b3480156103e857600080fd5b506102ef611a73565b3480156103fd57600080fd5b50610423604051806040016040528060068152602001650302e31322e360d41b81525081565b60405161026c9190613ca0565b34801561043c57600080fd5b5061045061044b366004613a67565b611ad1565b60405161026c93929190613cb3565b34801561046b57600080fd5b5061026061047a366004613cd4565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104ac57600080fd5b506103c76104bb366004613d58565b611b97565b3480156104cc57600080fd5b506104e06104db366004613a67565b611ba3565b60405161026c9190613daa565b3480156104f957600080fd5b506102ef610508366004613ded565b611c67565b34801561051957600080fd5b5061052d610528366004613e28565b611daa565b604080519687529415156020870152938501929092526060840152608083015260a082015260c00161026c565b34801561056657600080fd5b50610260610575366004613a67565b611e62565b34801561058657600080fd5b506103c7610595366004613e54565b611fe5565b3480156105a657600080fd5b506102ef61271081565b3480156105bc57600080fd5b506103c76105cb366004613e96565b6120b1565b3480156105dc57600080fd5b506103c76105eb366004613f1e565b6120c8565b3480156105fc57600080fd5b5061061061060b366004613e28565b612114565b604080516001600160a01b0390951685526020850193909352918301521515606082015260800161026c565b34801561064857600080fd5b506102ef614e2081565b34801561065e57600080fd5b506103c761066d366004613f3b565b6121da565b34801561067e57600080fd5b5061026061068d366004613e28565b6123cd565b34801561069e57600080fd5b506102ef61138881565b3480156106b457600080fd5b506103c76106c3366004613fc4565b612468565b3480156106d457600080fd5b506102b56106e3366004613bdf565b612532565b3480156106f457600080fd5b506102ef610703366004613bdf565b612881565b34801561071457600080fd5b506103c7610723366004613f1e565b6129d4565b34801561073457600080fd5b50610748610743366004614004565b612a20565b604080516001600160a01b03909416845291151560208401529082015260600161026c565b34801561077957600080fd5b506001546102b5906001600160a01b031681565b34801561079957600080fd5b506107ad6107a8366004613bdf565b612a65565b6040805192835260208301919091520161026c565b3480156107ce57600080fd5b506103c76107dd366004613f1e565b612ab7565b3480156107ee57600080fd5b506102606107fd366004613a67565b60066020526000908152604090205460ff1681565b34801561081e57600080fd5b506102ef61082d366004613a67565b612b89565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190614040565b9150915060006108b285611ba3565b9050805160001480156108f157506127106113886108d0858561407a565b6108da919061408d565b6108e491906140a4565b6108ee844261407a565b10155b95945050505050565b60008181526003602052604081205460028054839290811061091e5761091e6140c6565b600091825260208220600590910201805490925082906109409060019061407a565b81548110610950576109506140c6565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061099d5761099d6140c6565b600091825260208220600590910201805490925082906109bf9060019061407a565b815481106109cf576109cf6140c6565b60009182526020909120600c90910201600381015460ff1694509050836109fa5780600101546109fd565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190614108565b5090935060049250610a80915050565b816004811115610a9257610a92614171565b03610ad5576000610aa288611ba3565b90508051600103610ad35780600081518110610ac057610ac06140c6565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b819190614108565b50935050505080610bd95760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c509190614187565b15610c8e5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610bd0565b60008681526006602052604090205460ff16610cbc5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110610ce057610ce06140c6565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610d1457610d146140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9391906141d9565b5050600087815260078401602052604090205490915060ff16610ddd576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610f22565b808603610e52576000868152600683016020526040902054610e00576000610e4b565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610e41919061408d565b610e4b91906140a4565b9450610f22565b600081815260078301602052604090205460ff16610f225781600601600083600a01600181548110610e8657610e866140c6565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610ebc57610ebc6140c6565b9060005260206000200154815260200190815260200160002054610ee09190614215565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610f15919061408d565b610f1f91906140a4565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610fb857600754610f69906001600160a01b038a811691889116612bb5565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610faf929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610fe857610fe86140c6565b600091825260209091206002600590920201015460ff161561101c5760405162461bcd60e51b8152600401610bd090614228565b600083815260036020526040812054600280549091908110611040576110406140c6565b9060005260206000209060050201905080600101548311156110a45760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610bd0565b60008481526006602052604090205460ff166110d25760405162461bcd60e51b8152600401610bd0906141a2565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa15801561111f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111439190614040565b9150915081421015801561115657508042105b61119b5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610bd0565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156111dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120091906141d9565b50509050868103611215576127109150611296565b612710611388611225868661407a565b61122f919061408d565b61123991906140a4565b611243854261407a565b106112905760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610bd0565b614e2091505b845460009086906112a99060019061407a565b815481106112b9576112b96140c6565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c919061425f565b611346919061407a565b60008a815260078401602052604090205490915060ff16156113aa5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610bd0565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156113f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611418919061425f565b90506000612710611429878461408d565b61143391906140a4565b61143d9083614215565b60008c8152600686016020526040812054919250908211156114ee5760008c81526006860160205260409020543490611476908461407a565b1161149b5760008c8152600686016020526040902054611496908361407a565b61149d565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516114e5929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061151a908490614215565b909155505060008c81526006860160205260408120805483929061153f908490614215565b909155505060008c815260068601602052604090205482116116115760008c815260068601602052604081205460098701805491929091611581908490614215565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a8501546001101561181c5782856009015461162e919061407a565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190614187565b156116b95760028a01805460ff1916600117905561179c565b895460038b0160006116cc876001614215565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161174791815260200190565b602060405180830381865afa158015611764573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611788919061425f565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117e9939291906142b2565b6000604051808303818588803b15801561180257600080fd5b505af1158015611816573d6000803e3d6000fd5b50505050505b8034111561184557611845611831823461407a565b6007543391906001600160a01b0316612bb5565b50505050505050505050505050565b61185d82612ca0565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806118db57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166118cf6000805160206146418339815191525490565b6001600160a01b031614155b156118f95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611953575060408051601f3d908101601f191682019092526119509181019061425f565b60015b6119725781604051630c76093760e01b8152600401610bd09190613a80565b60008051602061464183398151915281146119a357604051632a87526960e21b815260048101829052602401610bd0565b6000805160206146418339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a6e576000836001600160a01b031683604051611a0a919061434c565b600060405180830381855af49150503d8060008114611a45576040519150601f19603f3d011682016040523d82523d6000602084013e611a4a565b606091505b5050905080611a6c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611abe5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464183398151915290565b60028181548110611ae157600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611b1490614278565b80601f0160208091040260200160405190810160405280929190818152602001828054611b4090614278565b8015611b8d5780601f10611b6257610100808354040283529160200191611b8d565b820191906000526020600020905b815481529060010190602001808311611b7057829003601f168201915b5050505050905083565b611a6c84848484612ccd565b6000818152600360205260408120546002805460609392908110611bc957611bc96140c6565b60009182526020822060059091020180549092508290611beb9060019061407a565b81548110611bfb57611bfb6140c6565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c5957602002820191906000526020600020905b815481526020019060010190808311611c45575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c8b57611c8b6140c6565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611cbf57611cbf6140c6565b90600052602060002090600c02016000018681548110611ce157611ce16140c6565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6391906141d9565b506003850154919350915060ff168015611d8757508183600201541480611d875750805b15611d9a576127109450505050506108f1565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ddb57611ddb6140c6565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e0f57611e0f6140c6565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e8657611e866140c6565b60009182526020822060059091020180549092508290611ea89060019061407a565b81548110611eb857611eb86140c6565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611f13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f379190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb69190614368565b5050505050915050600081611fcc578354611fd2565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b0316331461200f5760405162461bcd60e51b8152600401610bd0906143d4565b6000836001600160a01b0316838360405161202a919061434c565b60006040518083038185875af1925050503d8060008114612067576040519150601f19603f3d011682016040523d82523d6000602084013e61206c565b606091505b5050905080611a6c5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610bd0565b6120c086868686868633613030565b505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b8152600401610bd0906143d4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612142576121426140c6565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612176576121766140c6565b90600052602060002090600c02016000018781548110612198576121986140c6565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146122045760405162461bcd60e51b8152600401610bd090614416565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161228f8587836144a8565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612316919061425f565b612320919061407a565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108906123bb908a908a908a90614567565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123f1576123f16140c6565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612425576124256140c6565b90600052602060002090600c02016000018481548110612447576124476140c6565b600091825260209091206004909102016003015460ff169695505050505050565b60016000612474613761565b8054909150600160401b900460ff168061249b575080546001600160401b03808416911610155b156124b85760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124e4858585613785565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b0316331461255f5760405162461bcd60e51b8152600401610bd090614416565b600083815260036020526040902054600280548592908110612583576125836140c6565b600091825260209091206002600590920201015460ff16156125b75760405162461bcd60e51b8152600401610bd090614228565b60008481526003602052604081205460028054919291839081106125dd576125dd6140c6565b60009182526020822060059091020180549092506125fd9060019061407a565b90506000826000018281548110612616576126166140c6565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f919061459d565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127129190614108565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061279a919061459d565b98506001600160a01b0389166127b6575050505050505061287a565b6127c1848c8b6137cc565b1561286d57604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612872565b600098505b505050505050505b5092915050565b6000828152600360205260408120546002805483929081106128a5576128a56140c6565b600091825260208083208684526003600590930201918201905260408220548154919350839181106128d9576128d96140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295c91906141d9565b509150915082600401546000148061298b57508015801561298b57506000828152600284016020526040902054155b1561299d5760009450505050506129ce565b80156129b25750506004015491506129ce9050565b5060009081526002909101602052604090205491506129ce9050565b92915050565b6000546001600160a01b031633146129fe5760405162461bcd60e51b8152600401610bd0906143d4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600060a084511015612a3d57506000915081905080612a5e565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000828152600360205260408120546002805491929183908110612a8b57612a8b6140c6565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612ac3613761565b8054909150600160401b900460ff1680612aea575080546001600160401b03808416911610155b15612b075760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b9e57612b9e6140c6565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612be457505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612c1f57600080fd5b505af1158015612c33573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612c8357600080fd5b505af1158015612c97573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612cca5760405162461bcd60e51b8152600401610bd0906143d4565b50565b600084815260036020526040902054600280548692908110612cf157612cf16140c6565b600091825260209091206002600590920201015460ff1615612d255760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d939190614108565b5090935060019250612da3915050565b816004811115612db557612db5614171565b14612e125760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610bd0565b82612e4f5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610bd0565b60008681526006602052604090205460ff16612e7d5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110612ea157612ea16140c6565b60009182526020822060059091020180549092508290612ec39060019061407a565b81548110612ed357612ed36140c6565b90600052602060002090600c0201905060005b86811015612fc9573382898984818110612f0257612f026140c6565b9050602002013581548110612f1957612f196140c6565b60009182526020909120600490910201546001600160a01b031614612f805760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610bd0565b8582898984818110612f9457612f946140c6565b9050602002013581548110612fab57612fab6140c6565b60009182526020909120600160049092020181019190915501612ee6565b5086869050816005016000828254612fe19190614215565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061301e908b908b908b906145ec565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110613054576130546140c6565b600091825260209091206002600590920201015460ff16156130885760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa1580156130d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f69190614108565b5090935060029250613106915050565b81600481111561311857613118614171565b146131735760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610bd0565b866131b55760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610bd0565b60008981526006602052604090205460ff166131e35760405162461bcd60e51b8152600401610bd0906141a2565b600089815260036020526040812054600280549091908110613207576132076140c6565b9060005260206000209060050201905080600101548711156132625760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610bd0565b805460009082906132759060019061407a565b81548110613285576132856140c6565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d906132ca908f9060040190815260200190565b60a060405180830381865afa1580156132e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061330b9190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015613366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061338a9190614368565b5050505050915050600061339f8b8b8b610adf565b905060005b8c811015613626576001600160a01b038916858f8f848181106133c9576133c96140c6565b90506020020135815481106133e0576133e06140c6565b60009182526020909120600490910201546001600160a01b0316146134475760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610bd0565b82158061348e575081858f8f84818110613463576134636140c6565b905060200201358154811061347a5761347a6140c6565b906000526020600020906004020160010154145b61350e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610bd0565b848e8e83818110613521576135216140c6565b9050602002013581548110613538576135386140c6565b600091825260209091206003600490920201015460ff16156135915760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610bd0565b8b858f8f848181106135a5576135a56140c6565b90506020020135815481106135bc576135bc6140c6565b60009182526020909120600260049092020101556001858f8f848181106135e5576135e56140c6565b90506020020135815481106135fc576135fc6140c6565b60009182526020909120600490910201600301805460ff19169115159190911790556001016133a4565b5050506004820180548b9250600090613640908490614215565b90915550506000888152600282016020526040812080548b9290613665908490614215565b90915550506001810154880361369457600381015460ff161561368f5760038101805460ff191690555b61370d565b60018101546000908152600282016020526040808220548a8352912054036136d657600381015460ff1661368f5760038101805460ff1916600117905561370d565b60018101546000908152600282016020526040808220548a8352912054111561370d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161374c93929190614610565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61378d61398e565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60006137d98484846139b5565b6137e557506000610b08565b600083815260036020526040812054600280549192918390811061380b5761380b6140c6565b9060005260206000209060050201905060008060006138b584600401805461383290614278565b80601f016020809104026020016040519081016040528092919081815260200182805461385e90614278565b80156138ab5780601f10613880576101008083540402835291602001916138ab565b820191906000526020600020905b81548152906001019060200180831161388e57829003601f168201915b5050505050612a20565b919450925090506001600160a01b0383166138d857600195505050505050610b08565b811561395f57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa15801561392e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613952919061425f565b1195505050505050610b08565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613911908b90600401613a80565b613996613a4d565b6139b357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613a435760008381526003602052604081205460028054919291839081106139e9576139e96140c6565b6000918252602082206005909102018054909250613a099060019061407a565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610b08915050565b5060019392505050565b6000613a57613761565b54600160401b900460ff16919050565b600060208284031215613a7957600080fd5b5035919050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613abb57600080fd5b8135602083016000806001600160401b03841115613adb57613adb613a94565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613b0957613b09613a94565b604052838152905080828401871015613b2157600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613b5357600080fd5b833592506020840135915060408401356001600160401b03811115613b7757600080fd5b613b8386828701613aaa565b9150509250925092565b6001600160a01b0381168114612cca57600080fd5b60008060008060808587031215613bb857600080fd5b843593506020850135613bca81613b8d565b93969395505050506040820135916060013590565b60008060408385031215613bf257600080fd5b50508035926020909101359150565b60008060408385031215613c1457600080fd5b8235613c1f81613b8d565b915060208301356001600160401b03811115613c3a57600080fd5b613c4685828601613aaa565b9150509250929050565b60005b83811015613c6b578181015183820152602001613c53565b50506000910152565b60008151808452613c8c816020860160208601613c50565b601f01601f19169290920160200192915050565b602081526000610b086020830184613c74565b83815282151560208201526060604082015260006108f16060830184613c74565b600080600060608486031215613ce957600080fd5b83359250602084013591506040840135613d0281613b8d565b809150509250925092565b60008083601f840112613d1f57600080fd5b5081356001600160401b03811115613d3657600080fd5b6020830191508360208260051b8501011115613d5157600080fd5b9250929050565b60008060008060608587031215613d6e57600080fd5b8435935060208501356001600160401b03811115613d8b57600080fd5b613d9787828801613d0d565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613de2578351835260209384019390920191600101613dc4565b509095945050505050565b600080600080600060a08688031215613e0557600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e3d57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613e6957600080fd5b8335613e7481613b8d565b92506020840135915060408401356001600160401b03811115613b7757600080fd5b60008060008060008060a08789031215613eaf57600080fd5b8635955060208701356001600160401b03811115613ecc57600080fd5b613ed889828a01613d0d565b909650945050604087013592506060870135915060808701356001600160401b03811115613f0557600080fd5b613f1189828a01613aaa565b9150509295509295509295565b600060208284031215613f3057600080fd5b8135610b0881613b8d565b600080600080600060808688031215613f5357600080fd5b853594506020860135935060408601356001600160401b03811115613f7757600080fd5b8601601f81018813613f8857600080fd5b80356001600160401b03811115613f9e57600080fd5b886020828401011115613fb057600080fd5b959894975060200195606001359392505050565b600080600060608486031215613fd957600080fd5b8335613fe481613b8d565b92506020840135613ff481613b8d565b91506040840135613d0281613b8d565b60006020828403121561401657600080fd5b81356001600160401b0381111561402c57600080fd5b61403884828501613aaa565b949350505050565b6000806040838503121561405357600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b818103818111156129ce576129ce614064565b80820281158282048414176129ce576129ce614064565b6000826140c157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b03811681146140f357600080fd5b919050565b805180151581146140f357600080fd5b600080600080600060a0868803121561412057600080fd5b614129866140dc565b9450602086015161413981613b8d565b60408701519094506005811061414e57600080fd5b925061415c606087016140f8565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561419957600080fd5b610b08826140f8565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b6000806000606084860312156141ee57600080fd5b835192506141fe602085016140f8565b915061420c604085016140f8565b90509250925092565b808201808211156129ce576129ce614064565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60006020828403121561427157600080fd5b5051919050565b600181811c9082168061428c57607f821691505b6020821081036142ac57634e487b7160e01b600052602260045260246000fd5b50919050565b8381528260208201526060604082015260008083546142d081614278565b80606086015260018216600081146142ef576001811461430b5761433f565b60ff1983166080870152608082151560051b870101935061433f565b86600052602060002060005b8381101561433657815488820160800152600190910190602001614317565b87016080019450505b5091979650505050505050565b6000825161435e818460208701613c50565b9190910192915050565b600080600080600080600060e0888a03121561438357600080fd5b61438c886140dc565b965061439a602089016140f8565b604089015160608a015160808b015160a08c01519399509197509550935091506143c660c089016140f8565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a6e57806000526020600020601f840160051c810160208510156144815750805b601f840160051c820191505b818110156144a1576000815560010161448d565b5050505050565b6001600160401b038311156144bf576144bf613a94565b6144d3836144cd8354614278565b8361445a565b6000601f84116001811461450757600085156144ef5750838201355b600019600387901b1c1916600186901b1783556144a1565b600083815260209020601f19861690835b828110156145385786850135825560209485019460019092019101614518565b50868210156145555760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b6000602082840312156145af57600080fd5b8151610b0881613b8d565b81835260006001600160fb1b038311156145d357600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146006040830185876145ba565b9050826020830152949350505050565b6040815260006146246040830185876145ba565b82810360208401526146368185613c74565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220809532e74c527307f7c4fb23228698c888252ec20a2012cf6adf507c53468b9f64736f6c634300081c0033", - "deployedBytecode": "0x60806040526004361061023b5760003560e01c8063751accd01161012e578063d2b8035a116100ab578063f2f4eb261161006f578063f2f4eb261461076d578063f32ab9271461078d578063f7e7d1fd146107c2578063f8abee10146107e2578063fc6f8f161461081257600080fd5b8063d2b8035a146106c8578063da3beb8c146106e8578063e349ad301461059a578063e4c0aaf414610708578063ec7b23fb1461072857600080fd5b8063b34bfaa8116100f2578063b34bfaa81461063c578063b6ede54014610652578063ba66fde714610672578063be46760414610692578063c0c53b8b146106a857600080fd5b8063751accd01461057a578063796490f91461059a5780637c04034e146105b05780638e426460146105d0578063a7cc08fe146105f057600080fd5b80634f1ef286116101bc5780635c92e2f6116101805780635c92e2f6146104a057806365540b96146104c0578063675926f6146104ed57806369f3f0411461050d5780636d4cd8ea1461055a57600080fd5b80634f1ef286146103c957806352d1902d146103dc57806354fd4d50146103f1578063564a565d146104305780635a155ccd1461045f57600080fd5b80631cc3423a116102035780631cc3423a1461033a5780632621b9a21461035a5780632d68efc914610374578063362c3479146103945780634b2f0ea0146103b457600080fd5b80630855bbe9146102405780630baa64d1146102755780630c340a24146102955780631200aabc146102c25780631c3db16d146102fd575b600080fd5b34801561024c57600080fd5b5061026061025b366004613a67565b610832565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b50610260610290366004613a67565b6108fa565b3480156102a157600080fd5b506000546102b5906001600160a01b031681565b60405161026c9190613a80565b3480156102ce57600080fd5b506102ef6102dd366004613a67565b60036020526000908152604090205481565b60405190815260200161026c565b34801561030957600080fd5b5061031d610318366004613a67565b610971565b60408051938452911515602084015215159082015260600161026c565b34801561034657600080fd5b506102ef610355366004613b3e565b610adf565b34801561036657600080fd5b506004546102609060ff1681565b34801561038057600080fd5b506007546102b5906001600160a01b031681565b3480156103a057600080fd5b506102ef6103af366004613ba2565b610b0f565b6103c76103c2366004613bdf565b610fc4565b005b6103c76103d7366004613c01565b611854565b3480156103e857600080fd5b506102ef611a73565b3480156103fd57600080fd5b50610423604051806040016040528060068152602001650302e31322e360d41b81525081565b60405161026c9190613ca0565b34801561043c57600080fd5b5061045061044b366004613a67565b611ad1565b60405161026c93929190613cb3565b34801561046b57600080fd5b5061026061047a366004613cd4565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104ac57600080fd5b506103c76104bb366004613d58565b611b97565b3480156104cc57600080fd5b506104e06104db366004613a67565b611ba3565b60405161026c9190613daa565b3480156104f957600080fd5b506102ef610508366004613ded565b611c67565b34801561051957600080fd5b5061052d610528366004613e28565b611daa565b604080519687529415156020870152938501929092526060840152608083015260a082015260c00161026c565b34801561056657600080fd5b50610260610575366004613a67565b611e62565b34801561058657600080fd5b506103c7610595366004613e54565b611fe5565b3480156105a657600080fd5b506102ef61271081565b3480156105bc57600080fd5b506103c76105cb366004613e96565b6120b1565b3480156105dc57600080fd5b506103c76105eb366004613f1e565b6120c8565b3480156105fc57600080fd5b5061061061060b366004613e28565b612114565b604080516001600160a01b0390951685526020850193909352918301521515606082015260800161026c565b34801561064857600080fd5b506102ef614e2081565b34801561065e57600080fd5b506103c761066d366004613f3b565b6121da565b34801561067e57600080fd5b5061026061068d366004613e28565b6123cd565b34801561069e57600080fd5b506102ef61138881565b3480156106b457600080fd5b506103c76106c3366004613fc4565b612468565b3480156106d457600080fd5b506102b56106e3366004613bdf565b612532565b3480156106f457600080fd5b506102ef610703366004613bdf565b612881565b34801561071457600080fd5b506103c7610723366004613f1e565b6129d4565b34801561073457600080fd5b50610748610743366004614004565b612a20565b604080516001600160a01b03909416845291151560208401529082015260600161026c565b34801561077957600080fd5b506001546102b5906001600160a01b031681565b34801561079957600080fd5b506107ad6107a8366004613bdf565b612a65565b6040805192835260208301919091520161026c565b3480156107ce57600080fd5b506103c76107dd366004613f1e565b612ab7565b3480156107ee57600080fd5b506102606107fd366004613a67565b60066020526000908152604090205460ff1681565b34801561081e57600080fd5b506102ef61082d366004613a67565b612b89565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190614040565b9150915060006108b285611ba3565b9050805160001480156108f157506127106113886108d0858561407a565b6108da919061408d565b6108e491906140a4565b6108ee844261407a565b10155b95945050505050565b60008181526003602052604081205460028054839290811061091e5761091e6140c6565b600091825260208220600590910201805490925082906109409060019061407a565b81548110610950576109506140c6565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061099d5761099d6140c6565b600091825260208220600590910201805490925082906109bf9060019061407a565b815481106109cf576109cf6140c6565b60009182526020909120600c90910201600381015460ff1694509050836109fa5780600101546109fd565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190614108565b5090935060049250610a80915050565b816004811115610a9257610a92614171565b03610ad5576000610aa288611ba3565b90508051600103610ad35780600081518110610ac057610ac06140c6565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b819190614108565b50935050505080610bd95760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c509190614187565b15610c8e5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610bd0565b60008681526006602052604090205460ff16610cbc5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110610ce057610ce06140c6565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610d1457610d146140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9391906141d9565b5050600087815260078401602052604090205490915060ff16610ddd576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610f22565b808603610e52576000868152600683016020526040902054610e00576000610e4b565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610e41919061408d565b610e4b91906140a4565b9450610f22565b600081815260078301602052604090205460ff16610f225781600601600083600a01600181548110610e8657610e866140c6565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610ebc57610ebc6140c6565b9060005260206000200154815260200190815260200160002054610ee09190614215565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610f15919061408d565b610f1f91906140a4565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610fb857600754610f69906001600160a01b038a811691889116612bb5565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610faf929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610fe857610fe86140c6565b600091825260209091206002600590920201015460ff161561101c5760405162461bcd60e51b8152600401610bd090614228565b600083815260036020526040812054600280549091908110611040576110406140c6565b9060005260206000209060050201905080600101548311156110a45760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610bd0565b60008481526006602052604090205460ff166110d25760405162461bcd60e51b8152600401610bd0906141a2565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa15801561111f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111439190614040565b9150915081421015801561115657508042105b61119b5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610bd0565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156111dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120091906141d9565b50509050868103611215576127109150611296565b612710611388611225868661407a565b61122f919061408d565b61123991906140a4565b611243854261407a565b106112905760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610bd0565b614e2091505b845460009086906112a99060019061407a565b815481106112b9576112b96140c6565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c919061425f565b611346919061407a565b60008a815260078401602052604090205490915060ff16156113aa5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610bd0565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156113f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611418919061425f565b90506000612710611429878461408d565b61143391906140a4565b61143d9083614215565b60008c8152600686016020526040812054919250908211156114ee5760008c81526006860160205260409020543490611476908461407a565b1161149b5760008c8152600686016020526040902054611496908361407a565b61149d565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516114e5929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061151a908490614215565b909155505060008c81526006860160205260408120805483929061153f908490614215565b909155505060008c815260068601602052604090205482116116115760008c815260068601602052604081205460098701805491929091611581908490614215565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a8501546001101561181c5782856009015461162e919061407a565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190614187565b156116b95760028a01805460ff1916600117905561179c565b895460038b0160006116cc876001614215565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161174791815260200190565b602060405180830381865afa158015611764573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611788919061425f565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117e9939291906142b2565b6000604051808303818588803b15801561180257600080fd5b505af1158015611816573d6000803e3d6000fd5b50505050505b8034111561184557611845611831823461407a565b6007543391906001600160a01b0316612bb5565b50505050505050505050505050565b61185d82612ca0565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806118db57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166118cf6000805160206146418339815191525490565b6001600160a01b031614155b156118f95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611953575060408051601f3d908101601f191682019092526119509181019061425f565b60015b6119725781604051630c76093760e01b8152600401610bd09190613a80565b60008051602061464183398151915281146119a357604051632a87526960e21b815260048101829052602401610bd0565b6000805160206146418339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a6e576000836001600160a01b031683604051611a0a919061434c565b600060405180830381855af49150503d8060008114611a45576040519150601f19603f3d011682016040523d82523d6000602084013e611a4a565b606091505b5050905080611a6c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611abe5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464183398151915290565b60028181548110611ae157600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611b1490614278565b80601f0160208091040260200160405190810160405280929190818152602001828054611b4090614278565b8015611b8d5780601f10611b6257610100808354040283529160200191611b8d565b820191906000526020600020905b815481529060010190602001808311611b7057829003601f168201915b5050505050905083565b611a6c84848484612ccd565b6000818152600360205260408120546002805460609392908110611bc957611bc96140c6565b60009182526020822060059091020180549092508290611beb9060019061407a565b81548110611bfb57611bfb6140c6565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c5957602002820191906000526020600020905b815481526020019060010190808311611c45575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c8b57611c8b6140c6565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611cbf57611cbf6140c6565b90600052602060002090600c02016000018681548110611ce157611ce16140c6565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6391906141d9565b506003850154919350915060ff168015611d8757508183600201541480611d875750805b15611d9a576127109450505050506108f1565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ddb57611ddb6140c6565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e0f57611e0f6140c6565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e8657611e866140c6565b60009182526020822060059091020180549092508290611ea89060019061407a565b81548110611eb857611eb86140c6565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611f13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f379190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb69190614368565b5050505050915050600081611fcc578354611fd2565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b0316331461200f5760405162461bcd60e51b8152600401610bd0906143d4565b6000836001600160a01b0316838360405161202a919061434c565b60006040518083038185875af1925050503d8060008114612067576040519150601f19603f3d011682016040523d82523d6000602084013e61206c565b606091505b5050905080611a6c5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610bd0565b6120c086868686868633613030565b505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b8152600401610bd0906143d4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612142576121426140c6565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612176576121766140c6565b90600052602060002090600c02016000018781548110612198576121986140c6565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146122045760405162461bcd60e51b8152600401610bd090614416565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161228f8587836144a8565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612316919061425f565b612320919061407a565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108906123bb908a908a908a90614567565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123f1576123f16140c6565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612425576124256140c6565b90600052602060002090600c02016000018481548110612447576124476140c6565b600091825260209091206004909102016003015460ff169695505050505050565b60016000612474613761565b8054909150600160401b900460ff168061249b575080546001600160401b03808416911610155b156124b85760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124e4858585613785565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b0316331461255f5760405162461bcd60e51b8152600401610bd090614416565b600083815260036020526040902054600280548592908110612583576125836140c6565b600091825260209091206002600590920201015460ff16156125b75760405162461bcd60e51b8152600401610bd090614228565b60008481526003602052604081205460028054919291839081106125dd576125dd6140c6565b60009182526020822060059091020180549092506125fd9060019061407a565b90506000826000018281548110612616576126166140c6565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f919061459d565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127129190614108565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061279a919061459d565b98506001600160a01b0389166127b6575050505050505061287a565b6127c1848c8b6137cc565b1561286d57604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612872565b600098505b505050505050505b5092915050565b6000828152600360205260408120546002805483929081106128a5576128a56140c6565b600091825260208083208684526003600590930201918201905260408220548154919350839181106128d9576128d96140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295c91906141d9565b509150915082600401546000148061298b57508015801561298b57506000828152600284016020526040902054155b1561299d5760009450505050506129ce565b80156129b25750506004015491506129ce9050565b5060009081526002909101602052604090205491506129ce9050565b92915050565b6000546001600160a01b031633146129fe5760405162461bcd60e51b8152600401610bd0906143d4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600060a084511015612a3d57506000915081905080612a5e565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000828152600360205260408120546002805491929183908110612a8b57612a8b6140c6565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612ac3613761565b8054909150600160401b900460ff1680612aea575080546001600160401b03808416911610155b15612b075760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b9e57612b9e6140c6565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612be457505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612c1f57600080fd5b505af1158015612c33573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612c8357600080fd5b505af1158015612c97573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612cca5760405162461bcd60e51b8152600401610bd0906143d4565b50565b600084815260036020526040902054600280548692908110612cf157612cf16140c6565b600091825260209091206002600590920201015460ff1615612d255760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d939190614108565b5090935060019250612da3915050565b816004811115612db557612db5614171565b14612e125760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610bd0565b82612e4f5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610bd0565b60008681526006602052604090205460ff16612e7d5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110612ea157612ea16140c6565b60009182526020822060059091020180549092508290612ec39060019061407a565b81548110612ed357612ed36140c6565b90600052602060002090600c0201905060005b86811015612fc9573382898984818110612f0257612f026140c6565b9050602002013581548110612f1957612f196140c6565b60009182526020909120600490910201546001600160a01b031614612f805760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610bd0565b8582898984818110612f9457612f946140c6565b9050602002013581548110612fab57612fab6140c6565b60009182526020909120600160049092020181019190915501612ee6565b5086869050816005016000828254612fe19190614215565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061301e908b908b908b906145ec565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110613054576130546140c6565b600091825260209091206002600590920201015460ff16156130885760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa1580156130d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f69190614108565b5090935060029250613106915050565b81600481111561311857613118614171565b146131735760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610bd0565b866131b55760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610bd0565b60008981526006602052604090205460ff166131e35760405162461bcd60e51b8152600401610bd0906141a2565b600089815260036020526040812054600280549091908110613207576132076140c6565b9060005260206000209060050201905080600101548711156132625760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610bd0565b805460009082906132759060019061407a565b81548110613285576132856140c6565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d906132ca908f9060040190815260200190565b60a060405180830381865afa1580156132e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061330b9190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015613366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061338a9190614368565b5050505050915050600061339f8b8b8b610adf565b905060005b8c811015613626576001600160a01b038916858f8f848181106133c9576133c96140c6565b90506020020135815481106133e0576133e06140c6565b60009182526020909120600490910201546001600160a01b0316146134475760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610bd0565b82158061348e575081858f8f84818110613463576134636140c6565b905060200201358154811061347a5761347a6140c6565b906000526020600020906004020160010154145b61350e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610bd0565b848e8e83818110613521576135216140c6565b9050602002013581548110613538576135386140c6565b600091825260209091206003600490920201015460ff16156135915760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610bd0565b8b858f8f848181106135a5576135a56140c6565b90506020020135815481106135bc576135bc6140c6565b60009182526020909120600260049092020101556001858f8f848181106135e5576135e56140c6565b90506020020135815481106135fc576135fc6140c6565b60009182526020909120600490910201600301805460ff19169115159190911790556001016133a4565b5050506004820180548b9250600090613640908490614215565b90915550506000888152600282016020526040812080548b9290613665908490614215565b90915550506001810154880361369457600381015460ff161561368f5760038101805460ff191690555b61370d565b60018101546000908152600282016020526040808220548a8352912054036136d657600381015460ff1661368f5760038101805460ff1916600117905561370d565b60018101546000908152600282016020526040808220548a8352912054111561370d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161374c93929190614610565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61378d61398e565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60006137d98484846139b5565b6137e557506000610b08565b600083815260036020526040812054600280549192918390811061380b5761380b6140c6565b9060005260206000209060050201905060008060006138b584600401805461383290614278565b80601f016020809104026020016040519081016040528092919081815260200182805461385e90614278565b80156138ab5780601f10613880576101008083540402835291602001916138ab565b820191906000526020600020905b81548152906001019060200180831161388e57829003601f168201915b5050505050612a20565b919450925090506001600160a01b0383166138d857600195505050505050610b08565b811561395f57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa15801561392e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613952919061425f565b1195505050505050610b08565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613911908b90600401613a80565b613996613a4d565b6139b357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613a435760008381526003602052604081205460028054919291839081106139e9576139e96140c6565b6000918252602082206005909102018054909250613a099060019061407a565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610b08915050565b5060019392505050565b6000613a57613761565b54600160401b900460ff16919050565b600060208284031215613a7957600080fd5b5035919050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613abb57600080fd5b8135602083016000806001600160401b03841115613adb57613adb613a94565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613b0957613b09613a94565b604052838152905080828401871015613b2157600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613b5357600080fd5b833592506020840135915060408401356001600160401b03811115613b7757600080fd5b613b8386828701613aaa565b9150509250925092565b6001600160a01b0381168114612cca57600080fd5b60008060008060808587031215613bb857600080fd5b843593506020850135613bca81613b8d565b93969395505050506040820135916060013590565b60008060408385031215613bf257600080fd5b50508035926020909101359150565b60008060408385031215613c1457600080fd5b8235613c1f81613b8d565b915060208301356001600160401b03811115613c3a57600080fd5b613c4685828601613aaa565b9150509250929050565b60005b83811015613c6b578181015183820152602001613c53565b50506000910152565b60008151808452613c8c816020860160208601613c50565b601f01601f19169290920160200192915050565b602081526000610b086020830184613c74565b83815282151560208201526060604082015260006108f16060830184613c74565b600080600060608486031215613ce957600080fd5b83359250602084013591506040840135613d0281613b8d565b809150509250925092565b60008083601f840112613d1f57600080fd5b5081356001600160401b03811115613d3657600080fd5b6020830191508360208260051b8501011115613d5157600080fd5b9250929050565b60008060008060608587031215613d6e57600080fd5b8435935060208501356001600160401b03811115613d8b57600080fd5b613d9787828801613d0d565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613de2578351835260209384019390920191600101613dc4565b509095945050505050565b600080600080600060a08688031215613e0557600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e3d57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613e6957600080fd5b8335613e7481613b8d565b92506020840135915060408401356001600160401b03811115613b7757600080fd5b60008060008060008060a08789031215613eaf57600080fd5b8635955060208701356001600160401b03811115613ecc57600080fd5b613ed889828a01613d0d565b909650945050604087013592506060870135915060808701356001600160401b03811115613f0557600080fd5b613f1189828a01613aaa565b9150509295509295509295565b600060208284031215613f3057600080fd5b8135610b0881613b8d565b600080600080600060808688031215613f5357600080fd5b853594506020860135935060408601356001600160401b03811115613f7757600080fd5b8601601f81018813613f8857600080fd5b80356001600160401b03811115613f9e57600080fd5b886020828401011115613fb057600080fd5b959894975060200195606001359392505050565b600080600060608486031215613fd957600080fd5b8335613fe481613b8d565b92506020840135613ff481613b8d565b91506040840135613d0281613b8d565b60006020828403121561401657600080fd5b81356001600160401b0381111561402c57600080fd5b61403884828501613aaa565b949350505050565b6000806040838503121561405357600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b818103818111156129ce576129ce614064565b80820281158282048414176129ce576129ce614064565b6000826140c157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b03811681146140f357600080fd5b919050565b805180151581146140f357600080fd5b600080600080600060a0868803121561412057600080fd5b614129866140dc565b9450602086015161413981613b8d565b60408701519094506005811061414e57600080fd5b925061415c606087016140f8565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561419957600080fd5b610b08826140f8565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b6000806000606084860312156141ee57600080fd5b835192506141fe602085016140f8565b915061420c604085016140f8565b90509250925092565b808201808211156129ce576129ce614064565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60006020828403121561427157600080fd5b5051919050565b600181811c9082168061428c57607f821691505b6020821081036142ac57634e487b7160e01b600052602260045260246000fd5b50919050565b8381528260208201526060604082015260008083546142d081614278565b80606086015260018216600081146142ef576001811461430b5761433f565b60ff1983166080870152608082151560051b870101935061433f565b86600052602060002060005b8381101561433657815488820160800152600190910190602001614317565b87016080019450505b5091979650505050505050565b6000825161435e818460208701613c50565b9190910192915050565b600080600080600080600060e0888a03121561438357600080fd5b61438c886140dc565b965061439a602089016140f8565b604089015160608a015160808b015160a08c01519399509197509550935091506143c660c089016140f8565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a6e57806000526020600020601f840160051c810160208510156144815750805b601f840160051c820191505b818110156144a1576000815560010161448d565b5050505050565b6001600160401b038311156144bf576144bf613a94565b6144d3836144cd8354614278565b8361445a565b6000601f84116001811461450757600085156144ef5750838201355b600019600387901b1c1916600186901b1783556144a1565b600083815260209020601f19861690835b828110156145385786850135825560209485019460019092019101614518565b50868210156145555760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b6000602082840312156145af57600080fd5b8151610b0881613b8d565b81835260006001600160fb1b038311156145d357600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146006040830185876145ba565b9050826020830152949350505050565b6040815260006146246040830185876145ba565b82810360208401526146368185613c74565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220809532e74c527307f7c4fb23228698c888252ec20a2012cf6adf507c53468b9f64736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "extraDataToTokenInfo(bytes)": { - "details": "Extracts token gating information from the extra data.", - "params": { - "_extraData": "The extra data bytes array with the following encoding: - bytes 0-31: uint96 courtID, not used here - bytes 32-63: uint256 minJurors, not used here - bytes 64-95: uint256 disputeKitID, not used here - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160) - bytes 128-159: uint256 tokenId" - }, - "returns": { - "isERC1155": "True if the token is an ERC-1155, false for ERC-20/ERC-721.", - "tokenGate": "The address of the token contract used for gating access.", - "tokenId": "The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721)." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitGated Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 21704, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 21707, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)11133" - }, - { - "astId": 21711, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)21643_storage)dyn_storage" - }, - { - "astId": 21715, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21717, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 21725, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 21729, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 21731, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)21643_storage)dyn_storage": { - "base": "t_struct(Dispute)21643_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)21681_storage)dyn_storage": { - "base": "t_struct(Round)21681_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)21690_storage)dyn_storage": { - "base": "t_struct(Vote)21690_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)11133": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)21643_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 21632, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)21681_storage)dyn_storage" - }, - { - "astId": 21634, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 21636, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 21640, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21642, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)21681_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 21647, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)21690_storage)dyn_storage" - }, - { - "astId": 21649, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 21653, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21655, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 21657, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 21659, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 21663, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21667, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 21673, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 21675, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 21678, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 21680, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)21690_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 21683, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 21685, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 21687, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 21689, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitGated_Proxy.json b/contracts/deployments/arbitrum/DisputeKitGated_Proxy.json deleted file mode 100644 index 79f6b003c..000000000 --- a/contracts/deployments/arbitrum/DisputeKitGated_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xaE1eed20C125B739b64c948820C61F809ad9a925", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x2df70cb0e77da4f9e5f9c0799df57f4584279e3eada9a226a6a049ec8d7d0897", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xaE1eed20C125B739b64c948820C61F809ad9a925", - "transactionIndex": 9, - "gasUsed": "228501", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000020000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcac1900c875542795826e4e2f892aad5de97bfffd195bb789ac244df2c5b4f29", - "transactionHash": "0x2df70cb0e77da4f9e5f9c0799df57f4584279e3eada9a226a6a049ec8d7d0897", - "logs": [ - { - "transactionIndex": 9, - "blockNumber": 364034429, - "transactionHash": "0x2df70cb0e77da4f9e5f9c0799df57f4584279e3eada9a226a6a049ec8d7d0897", - "address": "0xaE1eed20C125B739b64c948820C61F809ad9a925", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0xcac1900c875542795826e4e2f892aad5de97bfffd195bb789ac244df2c5b4f29" - } - ], - "blockNumber": 364034429, - "cumulativeGasUsed": "1192860", - "status": 1, - "byzantium": true - }, - "args": [ - "0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a", - "0xc0c53b8b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1" - ], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitShutter.json b/contracts/deployments/arbitrum/DisputeKitShutter.json deleted file mode 100644 index 4ddf89ea8..000000000 --- a/contracts/deployments/arbitrum/DisputeKitShutter.json +++ /dev/null @@ -1,1314 +0,0 @@ -{ - "address": "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x7fb022ef5148ef65adf5cc9ec618ab3d0616fb03926747c95480100ff27a449c", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", - "transactionIndex": 15, - "gasUsed": "228435", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6e1577e8f55bfadd354f05189cb9c1efbdd2ba0fd0ead54646ddfeca11ab7344", - "transactionHash": "0x7fb022ef5148ef65adf5cc9ec618ab3d0616fb03926747c95480100ff27a449c", - "logs": [ - { - "transactionIndex": 15, - "blockNumber": 364034407, - "transactionHash": "0x7fb022ef5148ef65adf5cc9ec618ab3d0616fb03926747c95480100ff27a449c", - "address": "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 17, - "blockHash": "0x6e1577e8f55bfadd354f05189cb9c1efbdd2ba0fd0ead54646ddfeca11ab7344" - } - ], - "blockNumber": 364034407, - "cumulativeGasUsed": "2231063", - "status": 1, - "byzantium": true - }, - "args": [ - "0xF3103B46403A0bBd4551648BFb29BCC2b8783947", - "0xc0c53b8b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1" - ], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" - ] - }, - "implementation": "0xF3103B46403A0bBd4551648BFb29BCC2b8783947", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitShutter_Implementation.json b/contracts/deployments/arbitrum/DisputeKitShutter_Implementation.json deleted file mode 100644 index cb346ec82..000000000 --- a/contracts/deployments/arbitrum/DisputeKitShutter_Implementation.json +++ /dev/null @@ -1,1975 +0,0 @@ -{ - "address": "0xF3103B46403A0bBd4551648BFb29BCC2b8783947", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x3d3ff835a513465848b6b68e883f4a7d8910b0a302e6a057727d19c1b7c00429", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xF3103B46403A0bBd4551648BFb29BCC2b8783947", - "transactionIndex": 4, - "gasUsed": "4056317", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000200000000000000000000000800000000000000000000000080000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5f0d86132f55f7222b038c454d9ea6ce063f1c302f75dfdaf7f4eaa298a1a9bb", - "transactionHash": "0x3d3ff835a513465848b6b68e883f4a7d8910b0a302e6a057727d19c1b7c00429", - "logs": [ - { - "transactionIndex": 4, - "blockNumber": 364034399, - "transactionHash": "0x3d3ff835a513465848b6b68e883f4a7d8910b0a302e6a057727d19c1b7c00429", - "address": "0xF3103B46403A0bBd4551648BFb29BCC2b8783947", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 2, - "blockHash": "0x5f0d86132f55f7222b038c454d9ea6ce063f1c302f75dfdaf7f4eaa298a1a9bb" - } - ], - "blockNumber": 364034399, - "cumulativeGasUsed": "4261331", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"CommitCastShutter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"castCommitShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVoteShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"CommitCastShutter(uint256,address,bytes32,bytes32,bytes)\":{\"details\":\"Emitted when a vote is cast.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_juror\":\"The address of the juror casting the vote commitment.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash including the justification.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encoding\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitShutter Added functionality: shielded voting. Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitShutter.sol\":\"DisputeKitShutter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitShutter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitShutter\\n/// Added functionality: shielded voting.\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitShutter is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a vote is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _commit The commitment hash.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n event CommitCastShutter(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n bytes32 indexed _commit,\\n bytes32 _identity,\\n bytes _encryptedVote\\n );\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash including the justification.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n function castCommitShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit,\\n bytes32 _identity,\\n bytes calldata _encryptedVote\\n ) external notJumped(_coreDisputeID) {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n emit CommitCastShutter(_coreDisputeID, msg.sender, _commit, _identity, _encryptedVote);\\n }\\n\\n function castVoteShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n address juror = dispute.rounds[dispute.rounds.length - 1].votes[_voteIDs[0]].account;\\n\\n // _castVote() ensures that all the _voteIDs do belong to `juror`\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, juror);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure override returns (bytes32) {\\n bytes32 justificationHash = keccak256(bytes(_justification));\\n return keccak256(abi.encode(_choice, _salt, justificationHash));\\n }\\n}\\n\",\"keccak256\":\"0x22667ae7b4db6a3290463f2f42df92136c4f91190665a2f14523f05e1bbc50c5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516146976100fc600039600081816119420152818161196b0152611b6301526146976000f3fe6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf41461075e578063f2f4eb261461077e578063f32ab9271461079e578063f7e7d1fd146107d3578063f8abee10146107f3578063fc6f8f161461082357600080fd5b8063be467604146106e8578063c0c53b8b146106fe578063d2b8035a1461071e578063da3beb8c1461073e578063e349ad30146105d057600080fd5b80638f06f112116100fd5780638f06f11214610626578063a7cc08fe14610646578063b34bfaa814610692578063b6ede540146106a8578063ba66fde7146106c857600080fd5b80636d4cd8ea14610590578063751accd0146105b0578063796490f9146105d05780637c04034e146105e65780638e4264601461060657600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd146104955780635c92e2f6146104d657806365540b96146104f6578063675926f61461052357806369f3f0411461054357600080fd5b80634b2f0ea0146103ec5780634f1ef286146103ff57806352d1902d1461041257806354fd4d5014610427578063564a565d1461046657600080fd5b80631c3db16d1161020e5780631c3db16d146103355780631cc3423a146103725780632621b9a2146103925780632d68efc9146103ac578063362c3479146103cc57600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102fa575b600080fd5b34801561025757600080fd5b5061026b610266366004613a09565b610843565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613aae565b61090b565b005b3480156102ae57600080fd5b5061026b6102bd366004613a09565b6109c9565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561030657600080fd5b50610327610315366004613a09565b60036020526000908152604090205481565b604051908152602001610277565b34801561034157600080fd5b50610355610350366004613a09565b610a40565b604080519384529115156020840152151590820152606001610277565b34801561037e57600080fd5b5061032761038d366004613be8565b610bae565b34801561039e57600080fd5b5060045461026b9060ff1681565b3480156103b857600080fd5b506007546102e2906001600160a01b031681565b3480156103d857600080fd5b506103276103e7366004613c4c565b610bee565b6102a06103fa366004613c89565b61109e565b6102a061040d366004613cab565b61192e565b34801561041e57600080fd5b50610327611b56565b34801561043357600080fd5b50610459604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613d4a565b34801561047257600080fd5b50610486610481366004613a09565b611bb4565b60405161027793929190613d5d565b3480156104a157600080fd5b5061026b6104b0366004613d7e565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104e257600080fd5b506102a06104f1366004613db7565b611c7a565b34801561050257600080fd5b50610516610511366004613a09565b611c86565b6040516102779190613e09565b34801561052f57600080fd5b5061032761053e366004613e4c565b611d4a565b34801561054f57600080fd5b5061056361055e366004613e87565b611e8d565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059c57600080fd5b5061026b6105ab366004613a09565b611f45565b3480156105bc57600080fd5b506102a06105cb366004613eb3565b6120c8565b3480156105dc57600080fd5b5061032761271081565b3480156105f257600080fd5b506102a0610601366004613ef5565b612194565b34801561061257600080fd5b506102a0610621366004613f7d565b6121ab565b34801561063257600080fd5b506102a0610641366004613ef5565b6121f7565b34801561065257600080fd5b50610666610661366004613e87565b6122bd565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069e57600080fd5b50610327614e2081565b3480156106b457600080fd5b506102a06106c3366004613f9a565b612383565b3480156106d457600080fd5b5061026b6106e3366004613e87565b612576565b3480156106f457600080fd5b5061032761138881565b34801561070a57600080fd5b506102a0610719366004613ff4565b612611565b34801561072a57600080fd5b506102e2610739366004613c89565b6126db565b34801561074a57600080fd5b50610327610759366004613c89565b612a2a565b34801561076a57600080fd5b506102a0610779366004613f7d565b612b7d565b34801561078a57600080fd5b506001546102e2906001600160a01b031681565b3480156107aa57600080fd5b506107be6107b9366004613c89565b612bc9565b60408051928352602083019190915201610277565b3480156107df57600080fd5b506102a06107ee366004613f7d565b612c1b565b3480156107ff57600080fd5b5061026b61080e366004613a09565b60066020526000908152604090205460ff1681565b34801561082f57600080fd5b5061032761083e366004613a09565b612ced565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190614034565b9150915060006108c385611c86565b90508051600014801561090257506127106113886108e1858561406e565b6108eb9190614081565b6108f59190614098565b6108ff844261406e565b10155b95945050505050565b60008781526003602052604090205460028054899290811061092f5761092f6140ba565b600091825260209091206002600590920201015460ff161561096c5760405162461bcd60e51b8152600401610963906140d0565b60405180910390fd5b61097888888888612d19565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109b793929190614130565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109ed576109ed6140ba565b60009182526020822060059091020180549092508290610a0f9060019061406e565b81548110610a1f57610a1f6140ba565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6c57610a6c6140ba565b60009182526020822060059091020180549092508290610a8e9060019061406e565b81548110610a9e57610a9e6140ba565b60009182526020909120600c90910201600381015460ff169450905083610ac9578060010154610acc565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f9190614176565b5090935060049250610b4f915050565b816004811115610b6157610b616141df565b03610ba4576000610b7188611c86565b90508051600103610ba25780600081518110610b8f57610b8f6140ba565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c609190614176565b50935050505080610cb35760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610963565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a91906141f5565b15610d685760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610963565b60008681526006602052604090205460ff16610d965760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110610dba57610dba6140ba565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610dee57610dee6140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190614247565b5050600087815260078401602052604090205490915060ff16610eb7576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ffc565b808603610f2c576000868152600683016020526040902054610eda576000610f25565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f1b9190614081565b610f259190614098565b9450610ffc565b600081815260078301602052604090205460ff16610ffc5781600601600083600a01600181548110610f6057610f606140ba565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f9657610f966140ba565b9060005260206000200154815260200190815260200160002054610fba9190614283565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fef9190614081565b610ff99190614098565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561109257600754611043906001600160a01b038a81169188911661307c565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051611089929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110c2576110c26140ba565b600091825260209091206002600590920201015460ff16156110f65760405162461bcd60e51b8152600401610963906140d0565b60008381526003602052604081205460028054909190811061111a5761111a6140ba565b90600052602060002090600502019050806001015483111561117e5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610963565b60008481526006602052604090205460ff166111ac5760405162461bcd60e51b815260040161096390614210565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121d9190614034565b9150915081421015801561123057508042105b6112755760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610963565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112da9190614247565b505090508681036112ef576127109150611370565b6127106113886112ff868661406e565b6113099190614081565b6113139190614098565b61131d854261406e565b1061136a5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610963565b614e2091505b845460009086906113839060019061406e565b81548110611393576113936140ba565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114169190614296565b611420919061406e565b60008a815260078401602052604090205490915060ff16156114845760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610963565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f29190614296565b905060006127106115038784614081565b61150d9190614098565b6115179083614283565b60008c8152600686016020526040812054919250908211156115c85760008c81526006860160205260409020543490611550908461406e565b116115755760008c8152600686016020526040902054611570908361406e565b611577565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115bf929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115f4908490614283565b909155505060008c815260068601602052604081208054839290611619908490614283565b909155505060008c815260068601602052604090205482116116eb5760008c81526006860160205260408120546009870180549192909161165b908490614283565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118f657828560090154611708919061406e565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177a91906141f5565b156117935760028a01805460ff19166001179055611876565b895460038b0160006117a6876001614283565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161182191815260200190565b602060405180830381865afa15801561183e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118629190614296565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118c3939291906142e9565b6000604051808303818588803b1580156118dc57600080fd5b505af11580156118f0573d6000803e3d6000fd5b50505050505b8034111561191f5761191f61190b823461406e565b6007543391906001600160a01b031661307c565b50505050505050505050505050565b61193782613167565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119b557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166119a96000805160206146428339815191525490565b6001600160a01b031614155b156119d35760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a2d575060408051601f3d908101601f19168201909252611a2a91810190614296565b60015b611a5557604051630c76093760e01b81526001600160a01b0383166004820152602401610963565b6000805160206146428339815191528114611a8657604051632a87526960e21b815260048101829052602401610963565b6000805160206146428339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b51576000836001600160a01b031683604051611aed9190614383565b600060405180830381855af49150503d8060008114611b28576040519150601f19603f3d011682016040523d82523d6000602084013e611b2d565b606091505b5050905080611b4f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ba15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464283398151915290565b60028181548110611bc457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611bf7906142af565b80601f0160208091040260200160405190810160405280929190818152602001828054611c23906142af565b8015611c705780601f10611c4557610100808354040283529160200191611c70565b820191906000526020600020905b815481529060010190602001808311611c5357829003601f168201915b5050505050905083565b611b4f84848484612d19565b6000818152600360205260408120546002805460609392908110611cac57611cac6140ba565b60009182526020822060059091020180549092508290611cce9060019061406e565b81548110611cde57611cde6140ba565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d3c57602002820191906000526020600020905b815481526020019060010190808311611d28575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d6e57611d6e6140ba565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611da257611da26140ba565b90600052602060002090600c02016000018681548110611dc457611dc46140ba565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e469190614247565b506003850154919350915060ff168015611e6a57508183600201541480611e6a5750805b15611e7d57612710945050505050610902565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ebe57611ebe6140ba565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ef257611ef26140ba565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f6957611f696140ba565b60009182526020822060059091020180549092508290611f8b9060019061406e565b81548110611f9b57611f9b6140ba565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201a9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612075573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612099919061439f565b50505050509150506000816120af5783546120b5565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b81526004016109639061440b565b6000836001600160a01b0316838360405161210d9190614383565b60006040518083038185875af1925050503d806000811461214a576040519150601f19603f3d011682016040523d82523d6000602084013e61214f565b606091505b5050905080611b4f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610963565b6121a386868686868633613194565b505050505050565b6000546001600160a01b031633146121d55760405162461bcd60e51b81526004016109639061440b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008681526003602052604081205460028054909190811061221b5761221b6140ba565b6000918252602082206005909102018054909250829061223d9060019061406e565b8154811061224d5761224d6140ba565b90600052602060002090600c020160000187876000818110612271576122716140ba565b9050602002013581548110612288576122886140ba565b60009182526020909120600490910201546001600160a01b031690506122b388888888888887613194565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122eb576122eb6140ba565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061231f5761231f6140ba565b90600052602060002090600c02016000018781548110612341576123416140ba565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123ad5760405162461bcd60e51b81526004016109639061444d565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124388587836144df565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561249b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bf9190614296565b6124c9919061406e565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612564908a908a908a90614130565b60405180910390a25050505050505050565b60008381526003602052604081205460028054839290811061259a5761259a6140ba565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ce576125ce6140ba565b90600052602060002090600c020160000184815481106125f0576125f06140ba565b600091825260209091206004909102016003015460ff169695505050505050565b6001600061261d6138c5565b8054909150600160401b900460ff1680612644575080546001600160401b03808416911610155b156126615760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561268d8585856138e9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146127085760405162461bcd60e51b81526004016109639061444d565b60008381526003602052604090205460028054859290811061272c5761272c6140ba565b600091825260209091206002600590920201015460ff16156127605760405162461bcd60e51b8152600401610963906140d0565b6000848152600360205260408120546002805491929183908110612786576127866140ba565b60009182526020822060059091020180549092506127a69060019061406e565b905060008260000182815481106127bf576127bf6140ba565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612824573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612848919061459e565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128bb9190614176565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561291f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612943919061459e565b98506001600160a01b03891661295f5750505050505050612a23565b61296a848c8b613930565b15612a1657604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a1b565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a4e57612a4e6140ba565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a8257612a826140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b059190614247565b5091509150826004015460001480612b34575080158015612b3457506000828152600284016020526040902054155b15612b46576000945050505050612b77565b8015612b5b575050600401549150612b779050565b506000908152600290910160205260409020549150612b779050565b92915050565b6000546001600160a01b03163314612ba75760405162461bcd60e51b81526004016109639061440b565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bef57612bef6140ba565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c276138c5565b8054909150600160401b900460ff1680612c4e575080546001600160401b03808416911610155b15612c6b5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612d0257612d026140ba565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d3d57612d3d6140ba565b600091825260209091206002600590920201015460ff1615612d715760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddf9190614176565b5090935060019250612def915050565b816004811115612e0157612e016141df565b14612e5e5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610963565b82612e9b5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610963565b60008681526006602052604090205460ff16612ec95760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110612eed57612eed6140ba565b60009182526020822060059091020180549092508290612f0f9060019061406e565b81548110612f1f57612f1f6140ba565b90600052602060002090600c0201905060005b86811015613015573382898984818110612f4e57612f4e6140ba565b9050602002013581548110612f6557612f656140ba565b60009182526020909120600490910201546001600160a01b031614612fcc5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610963565b8582898984818110612fe057612fe06140ba565b9050602002013581548110612ff757612ff76140ba565b60009182526020909120600160049092020181019190915501612f32565b508686905081600501600082825461302d9190614283565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061306a908b908b908b906145ed565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f19350505050156130ab57505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130e657600080fd5b505af11580156130fa573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561314a57600080fd5b505af115801561315e573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146131915760405162461bcd60e51b81526004016109639061440b565b50565b6000878152600360205260409020546002805489929081106131b8576131b86140ba565b600091825260209091206002600590920201015460ff16156131ec5760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061325a9190614176565b509093506002925061326a915050565b81600481111561327c5761327c6141df565b146132d75760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610963565b866133195760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610963565b60008981526006602052604090205460ff166133475760405162461bcd60e51b815260040161096390614210565b60008981526003602052604081205460028054909190811061336b5761336b6140ba565b9060005260206000209060050201905080600101548711156133c65760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610963565b805460009082906133d99060019061406e565b815481106133e9576133e96140ba565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061342e908f9060040190815260200190565b60a060405180830381865afa15801561344b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346f9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ee919061439f565b505050505091505060006135038b8b8b610bae565b905060005b8c81101561378a576001600160a01b038916858f8f8481811061352d5761352d6140ba565b9050602002013581548110613544576135446140ba565b60009182526020909120600490910201546001600160a01b0316146135ab5760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610963565b8215806135f2575081858f8f848181106135c7576135c76140ba565b90506020020135815481106135de576135de6140ba565b906000526020600020906004020160010154145b6136725760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610963565b848e8e83818110613685576136856140ba565b905060200201358154811061369c5761369c6140ba565b600091825260209091206003600490920201015460ff16156136f55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610963565b8b858f8f84818110613709576137096140ba565b9050602002013581548110613720576137206140ba565b60009182526020909120600260049092020101556001858f8f84818110613749576137496140ba565b9050602002013581548110613760576137606140ba565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613508565b5050506004820180548b92506000906137a4908490614283565b90915550506000888152600282016020526040812080548b92906137c9908490614283565b9091555050600181015488036137f857600381015460ff16156137f35760038101805460ff191690555b613871565b60018101546000908152600282016020526040808220548a83529120540361383a57600381015460ff166137f35760038101805460ff19166001179055613871565b60018101546000908152600282016020526040808220548a83529120541115613871576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516138b093929190614611565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138f16139c8565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156139be576000838152600360205260408120546002805491929183908110613964576139646140ba565b60009182526020822060059091020180549092506139849060019061406e565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610be7915050565b5060019392505050565b6139d06139ef565b6139ed57604051631afcd79f60e31b815260040160405180910390fd5b565b60006139f96138c5565b54600160401b900460ff16919050565b600060208284031215613a1b57600080fd5b5035919050565b60008083601f840112613a3457600080fd5b5081356001600160401b03811115613a4b57600080fd5b6020830191508360208260051b8501011115613a6657600080fd5b9250929050565b60008083601f840112613a7f57600080fd5b5081356001600160401b03811115613a9657600080fd5b602083019150836020828501011115613a6657600080fd5b600080600080600080600060a0888a031215613ac957600080fd5b8735965060208801356001600160401b03811115613ae657600080fd5b613af28a828b01613a22565b909750955050604088013593506060880135925060808801356001600160401b03811115613b1f57600080fd5b613b2b8a828b01613a6d565b989b979a50959850939692959293505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613b6557600080fd5b8135602083016000806001600160401b03841115613b8557613b85613b3e565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613bb357613bb3613b3e565b604052838152905080828401871015613bcb57600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613bfd57600080fd5b833592506020840135915060408401356001600160401b03811115613c2157600080fd5b613c2d86828701613b54565b9150509250925092565b6001600160a01b038116811461319157600080fd5b60008060008060808587031215613c6257600080fd5b843593506020850135613c7481613c37565b93969395505050506040820135916060013590565b60008060408385031215613c9c57600080fd5b50508035926020909101359150565b60008060408385031215613cbe57600080fd5b8235613cc981613c37565b915060208301356001600160401b03811115613ce457600080fd5b613cf085828601613b54565b9150509250929050565b60005b83811015613d15578181015183820152602001613cfd565b50506000910152565b60008151808452613d36816020860160208601613cfa565b601f01601f19169290920160200192915050565b602081526000610be76020830184613d1e565b83815282151560208201526060604082015260006109026060830184613d1e565b600080600060608486031215613d9357600080fd5b83359250602084013591506040840135613dac81613c37565b809150509250925092565b60008060008060608587031215613dcd57600080fd5b8435935060208501356001600160401b03811115613dea57600080fd5b613df687828801613a22565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613e41578351835260209384019390920191600101613e23565b509095945050505050565b600080600080600060a08688031215613e6457600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e9c57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613ec857600080fd5b8335613ed381613c37565b92506020840135915060408401356001600160401b03811115613c2157600080fd5b60008060008060008060a08789031215613f0e57600080fd5b8635955060208701356001600160401b03811115613f2b57600080fd5b613f3789828a01613a22565b909650945050604087013592506060870135915060808701356001600160401b03811115613f6457600080fd5b613f7089828a01613b54565b9150509295509295509295565b600060208284031215613f8f57600080fd5b8135610be781613c37565b600080600080600060808688031215613fb257600080fd5b853594506020860135935060408601356001600160401b03811115613fd657600080fd5b613fe288828901613a6d565b96999598509660600135949350505050565b60008060006060848603121561400957600080fd5b833561401481613c37565b9250602084013561402481613c37565b91506040840135613dac81613c37565b6000806040838503121561404757600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b7757612b77614058565b8082028115828204841417612b7757612b77614058565b6000826140b557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152604060208201526000610902604083018486614107565b80516001600160601b038116811461416157600080fd5b919050565b8051801515811461416157600080fd5b600080600080600060a0868803121561418e57600080fd5b6141978661414a565b945060208601516141a781613c37565b6040870151909450600581106141bc57600080fd5b92506141ca60608701614166565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561420757600080fd5b610be782614166565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561425c57600080fd5b8351925061426c60208501614166565b915061427a60408501614166565b90509250925092565b80820180821115612b7757612b77614058565b6000602082840312156142a857600080fd5b5051919050565b600181811c908216806142c357607f821691505b6020821081036142e357634e487b7160e01b600052602260045260246000fd5b50919050565b838152826020820152606060408201526000808354614307816142af565b8060608601526001821660008114614326576001811461434257614376565b60ff1983166080870152608082151560051b8701019350614376565b86600052602060002060005b8381101561436d5781548882016080015260019091019060200161434e565b87016080019450505b5091979650505050505050565b60008251614395818460208701613cfa565b9190910192915050565b600080600080600080600060e0888a0312156143ba57600080fd5b6143c38861414a565b96506143d160208901614166565b604089015160608a015160808b015160a08c01519399509197509550935091506143fd60c08901614166565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b5157806000526020600020601f840160051c810160208510156144b85750805b601f840160051c820191505b818110156144d857600081556001016144c4565b5050505050565b6001600160401b038311156144f6576144f6613b3e565b61450a8361450483546142af565b83614491565b6000601f84116001811461453e57600085156145265750838201355b600019600387901b1c1916600186901b1783556144d8565b600083815260209020601f19861690835b8281101561456f578685013582556020948501946001909201910161454f565b508682101561458c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156145b057600080fd5b8151610be781613c37565b81835260006001600160fb1b038311156145d457600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146016040830185876145bb565b9050826020830152949350505050565b6040815260006146256040830185876145bb565b82810360208401526146378185613d1e565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204611969b7846b8f8df4dbeb55dc71bd009ee535c528de4a12223b6d97dbc9de164736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf41461075e578063f2f4eb261461077e578063f32ab9271461079e578063f7e7d1fd146107d3578063f8abee10146107f3578063fc6f8f161461082357600080fd5b8063be467604146106e8578063c0c53b8b146106fe578063d2b8035a1461071e578063da3beb8c1461073e578063e349ad30146105d057600080fd5b80638f06f112116100fd5780638f06f11214610626578063a7cc08fe14610646578063b34bfaa814610692578063b6ede540146106a8578063ba66fde7146106c857600080fd5b80636d4cd8ea14610590578063751accd0146105b0578063796490f9146105d05780637c04034e146105e65780638e4264601461060657600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd146104955780635c92e2f6146104d657806365540b96146104f6578063675926f61461052357806369f3f0411461054357600080fd5b80634b2f0ea0146103ec5780634f1ef286146103ff57806352d1902d1461041257806354fd4d5014610427578063564a565d1461046657600080fd5b80631c3db16d1161020e5780631c3db16d146103355780631cc3423a146103725780632621b9a2146103925780632d68efc9146103ac578063362c3479146103cc57600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102fa575b600080fd5b34801561025757600080fd5b5061026b610266366004613a09565b610843565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613aae565b61090b565b005b3480156102ae57600080fd5b5061026b6102bd366004613a09565b6109c9565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561030657600080fd5b50610327610315366004613a09565b60036020526000908152604090205481565b604051908152602001610277565b34801561034157600080fd5b50610355610350366004613a09565b610a40565b604080519384529115156020840152151590820152606001610277565b34801561037e57600080fd5b5061032761038d366004613be8565b610bae565b34801561039e57600080fd5b5060045461026b9060ff1681565b3480156103b857600080fd5b506007546102e2906001600160a01b031681565b3480156103d857600080fd5b506103276103e7366004613c4c565b610bee565b6102a06103fa366004613c89565b61109e565b6102a061040d366004613cab565b61192e565b34801561041e57600080fd5b50610327611b56565b34801561043357600080fd5b50610459604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613d4a565b34801561047257600080fd5b50610486610481366004613a09565b611bb4565b60405161027793929190613d5d565b3480156104a157600080fd5b5061026b6104b0366004613d7e565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104e257600080fd5b506102a06104f1366004613db7565b611c7a565b34801561050257600080fd5b50610516610511366004613a09565b611c86565b6040516102779190613e09565b34801561052f57600080fd5b5061032761053e366004613e4c565b611d4a565b34801561054f57600080fd5b5061056361055e366004613e87565b611e8d565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059c57600080fd5b5061026b6105ab366004613a09565b611f45565b3480156105bc57600080fd5b506102a06105cb366004613eb3565b6120c8565b3480156105dc57600080fd5b5061032761271081565b3480156105f257600080fd5b506102a0610601366004613ef5565b612194565b34801561061257600080fd5b506102a0610621366004613f7d565b6121ab565b34801561063257600080fd5b506102a0610641366004613ef5565b6121f7565b34801561065257600080fd5b50610666610661366004613e87565b6122bd565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069e57600080fd5b50610327614e2081565b3480156106b457600080fd5b506102a06106c3366004613f9a565b612383565b3480156106d457600080fd5b5061026b6106e3366004613e87565b612576565b3480156106f457600080fd5b5061032761138881565b34801561070a57600080fd5b506102a0610719366004613ff4565b612611565b34801561072a57600080fd5b506102e2610739366004613c89565b6126db565b34801561074a57600080fd5b50610327610759366004613c89565b612a2a565b34801561076a57600080fd5b506102a0610779366004613f7d565b612b7d565b34801561078a57600080fd5b506001546102e2906001600160a01b031681565b3480156107aa57600080fd5b506107be6107b9366004613c89565b612bc9565b60408051928352602083019190915201610277565b3480156107df57600080fd5b506102a06107ee366004613f7d565b612c1b565b3480156107ff57600080fd5b5061026b61080e366004613a09565b60066020526000908152604090205460ff1681565b34801561082f57600080fd5b5061032761083e366004613a09565b612ced565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190614034565b9150915060006108c385611c86565b90508051600014801561090257506127106113886108e1858561406e565b6108eb9190614081565b6108f59190614098565b6108ff844261406e565b10155b95945050505050565b60008781526003602052604090205460028054899290811061092f5761092f6140ba565b600091825260209091206002600590920201015460ff161561096c5760405162461bcd60e51b8152600401610963906140d0565b60405180910390fd5b61097888888888612d19565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109b793929190614130565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109ed576109ed6140ba565b60009182526020822060059091020180549092508290610a0f9060019061406e565b81548110610a1f57610a1f6140ba565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6c57610a6c6140ba565b60009182526020822060059091020180549092508290610a8e9060019061406e565b81548110610a9e57610a9e6140ba565b60009182526020909120600c90910201600381015460ff169450905083610ac9578060010154610acc565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f9190614176565b5090935060049250610b4f915050565b816004811115610b6157610b616141df565b03610ba4576000610b7188611c86565b90508051600103610ba25780600081518110610b8f57610b8f6140ba565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c609190614176565b50935050505080610cb35760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610963565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a91906141f5565b15610d685760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610963565b60008681526006602052604090205460ff16610d965760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110610dba57610dba6140ba565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610dee57610dee6140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190614247565b5050600087815260078401602052604090205490915060ff16610eb7576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ffc565b808603610f2c576000868152600683016020526040902054610eda576000610f25565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f1b9190614081565b610f259190614098565b9450610ffc565b600081815260078301602052604090205460ff16610ffc5781600601600083600a01600181548110610f6057610f606140ba565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f9657610f966140ba565b9060005260206000200154815260200190815260200160002054610fba9190614283565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fef9190614081565b610ff99190614098565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561109257600754611043906001600160a01b038a81169188911661307c565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051611089929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110c2576110c26140ba565b600091825260209091206002600590920201015460ff16156110f65760405162461bcd60e51b8152600401610963906140d0565b60008381526003602052604081205460028054909190811061111a5761111a6140ba565b90600052602060002090600502019050806001015483111561117e5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610963565b60008481526006602052604090205460ff166111ac5760405162461bcd60e51b815260040161096390614210565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121d9190614034565b9150915081421015801561123057508042105b6112755760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610963565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112da9190614247565b505090508681036112ef576127109150611370565b6127106113886112ff868661406e565b6113099190614081565b6113139190614098565b61131d854261406e565b1061136a5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610963565b614e2091505b845460009086906113839060019061406e565b81548110611393576113936140ba565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114169190614296565b611420919061406e565b60008a815260078401602052604090205490915060ff16156114845760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610963565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f29190614296565b905060006127106115038784614081565b61150d9190614098565b6115179083614283565b60008c8152600686016020526040812054919250908211156115c85760008c81526006860160205260409020543490611550908461406e565b116115755760008c8152600686016020526040902054611570908361406e565b611577565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115bf929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115f4908490614283565b909155505060008c815260068601602052604081208054839290611619908490614283565b909155505060008c815260068601602052604090205482116116eb5760008c81526006860160205260408120546009870180549192909161165b908490614283565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118f657828560090154611708919061406e565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177a91906141f5565b156117935760028a01805460ff19166001179055611876565b895460038b0160006117a6876001614283565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161182191815260200190565b602060405180830381865afa15801561183e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118629190614296565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118c3939291906142e9565b6000604051808303818588803b1580156118dc57600080fd5b505af11580156118f0573d6000803e3d6000fd5b50505050505b8034111561191f5761191f61190b823461406e565b6007543391906001600160a01b031661307c565b50505050505050505050505050565b61193782613167565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119b557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166119a96000805160206146428339815191525490565b6001600160a01b031614155b156119d35760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a2d575060408051601f3d908101601f19168201909252611a2a91810190614296565b60015b611a5557604051630c76093760e01b81526001600160a01b0383166004820152602401610963565b6000805160206146428339815191528114611a8657604051632a87526960e21b815260048101829052602401610963565b6000805160206146428339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b51576000836001600160a01b031683604051611aed9190614383565b600060405180830381855af49150503d8060008114611b28576040519150601f19603f3d011682016040523d82523d6000602084013e611b2d565b606091505b5050905080611b4f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ba15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464283398151915290565b60028181548110611bc457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611bf7906142af565b80601f0160208091040260200160405190810160405280929190818152602001828054611c23906142af565b8015611c705780601f10611c4557610100808354040283529160200191611c70565b820191906000526020600020905b815481529060010190602001808311611c5357829003601f168201915b5050505050905083565b611b4f84848484612d19565b6000818152600360205260408120546002805460609392908110611cac57611cac6140ba565b60009182526020822060059091020180549092508290611cce9060019061406e565b81548110611cde57611cde6140ba565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d3c57602002820191906000526020600020905b815481526020019060010190808311611d28575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d6e57611d6e6140ba565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611da257611da26140ba565b90600052602060002090600c02016000018681548110611dc457611dc46140ba565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e469190614247565b506003850154919350915060ff168015611e6a57508183600201541480611e6a5750805b15611e7d57612710945050505050610902565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ebe57611ebe6140ba565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ef257611ef26140ba565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f6957611f696140ba565b60009182526020822060059091020180549092508290611f8b9060019061406e565b81548110611f9b57611f9b6140ba565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201a9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612075573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612099919061439f565b50505050509150506000816120af5783546120b5565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b81526004016109639061440b565b6000836001600160a01b0316838360405161210d9190614383565b60006040518083038185875af1925050503d806000811461214a576040519150601f19603f3d011682016040523d82523d6000602084013e61214f565b606091505b5050905080611b4f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610963565b6121a386868686868633613194565b505050505050565b6000546001600160a01b031633146121d55760405162461bcd60e51b81526004016109639061440b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008681526003602052604081205460028054909190811061221b5761221b6140ba565b6000918252602082206005909102018054909250829061223d9060019061406e565b8154811061224d5761224d6140ba565b90600052602060002090600c020160000187876000818110612271576122716140ba565b9050602002013581548110612288576122886140ba565b60009182526020909120600490910201546001600160a01b031690506122b388888888888887613194565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122eb576122eb6140ba565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061231f5761231f6140ba565b90600052602060002090600c02016000018781548110612341576123416140ba565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123ad5760405162461bcd60e51b81526004016109639061444d565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124388587836144df565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561249b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bf9190614296565b6124c9919061406e565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612564908a908a908a90614130565b60405180910390a25050505050505050565b60008381526003602052604081205460028054839290811061259a5761259a6140ba565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ce576125ce6140ba565b90600052602060002090600c020160000184815481106125f0576125f06140ba565b600091825260209091206004909102016003015460ff169695505050505050565b6001600061261d6138c5565b8054909150600160401b900460ff1680612644575080546001600160401b03808416911610155b156126615760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561268d8585856138e9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146127085760405162461bcd60e51b81526004016109639061444d565b60008381526003602052604090205460028054859290811061272c5761272c6140ba565b600091825260209091206002600590920201015460ff16156127605760405162461bcd60e51b8152600401610963906140d0565b6000848152600360205260408120546002805491929183908110612786576127866140ba565b60009182526020822060059091020180549092506127a69060019061406e565b905060008260000182815481106127bf576127bf6140ba565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612824573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612848919061459e565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128bb9190614176565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561291f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612943919061459e565b98506001600160a01b03891661295f5750505050505050612a23565b61296a848c8b613930565b15612a1657604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a1b565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a4e57612a4e6140ba565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a8257612a826140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b059190614247565b5091509150826004015460001480612b34575080158015612b3457506000828152600284016020526040902054155b15612b46576000945050505050612b77565b8015612b5b575050600401549150612b779050565b506000908152600290910160205260409020549150612b779050565b92915050565b6000546001600160a01b03163314612ba75760405162461bcd60e51b81526004016109639061440b565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bef57612bef6140ba565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c276138c5565b8054909150600160401b900460ff1680612c4e575080546001600160401b03808416911610155b15612c6b5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612d0257612d026140ba565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d3d57612d3d6140ba565b600091825260209091206002600590920201015460ff1615612d715760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddf9190614176565b5090935060019250612def915050565b816004811115612e0157612e016141df565b14612e5e5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610963565b82612e9b5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610963565b60008681526006602052604090205460ff16612ec95760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110612eed57612eed6140ba565b60009182526020822060059091020180549092508290612f0f9060019061406e565b81548110612f1f57612f1f6140ba565b90600052602060002090600c0201905060005b86811015613015573382898984818110612f4e57612f4e6140ba565b9050602002013581548110612f6557612f656140ba565b60009182526020909120600490910201546001600160a01b031614612fcc5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610963565b8582898984818110612fe057612fe06140ba565b9050602002013581548110612ff757612ff76140ba565b60009182526020909120600160049092020181019190915501612f32565b508686905081600501600082825461302d9190614283565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061306a908b908b908b906145ed565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f19350505050156130ab57505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130e657600080fd5b505af11580156130fa573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561314a57600080fd5b505af115801561315e573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146131915760405162461bcd60e51b81526004016109639061440b565b50565b6000878152600360205260409020546002805489929081106131b8576131b86140ba565b600091825260209091206002600590920201015460ff16156131ec5760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061325a9190614176565b509093506002925061326a915050565b81600481111561327c5761327c6141df565b146132d75760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610963565b866133195760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610963565b60008981526006602052604090205460ff166133475760405162461bcd60e51b815260040161096390614210565b60008981526003602052604081205460028054909190811061336b5761336b6140ba565b9060005260206000209060050201905080600101548711156133c65760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610963565b805460009082906133d99060019061406e565b815481106133e9576133e96140ba565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061342e908f9060040190815260200190565b60a060405180830381865afa15801561344b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346f9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ee919061439f565b505050505091505060006135038b8b8b610bae565b905060005b8c81101561378a576001600160a01b038916858f8f8481811061352d5761352d6140ba565b9050602002013581548110613544576135446140ba565b60009182526020909120600490910201546001600160a01b0316146135ab5760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610963565b8215806135f2575081858f8f848181106135c7576135c76140ba565b90506020020135815481106135de576135de6140ba565b906000526020600020906004020160010154145b6136725760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610963565b848e8e83818110613685576136856140ba565b905060200201358154811061369c5761369c6140ba565b600091825260209091206003600490920201015460ff16156136f55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610963565b8b858f8f84818110613709576137096140ba565b9050602002013581548110613720576137206140ba565b60009182526020909120600260049092020101556001858f8f84818110613749576137496140ba565b9050602002013581548110613760576137606140ba565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613508565b5050506004820180548b92506000906137a4908490614283565b90915550506000888152600282016020526040812080548b92906137c9908490614283565b9091555050600181015488036137f857600381015460ff16156137f35760038101805460ff191690555b613871565b60018101546000908152600282016020526040808220548a83529120540361383a57600381015460ff166137f35760038101805460ff19166001179055613871565b60018101546000908152600282016020526040808220548a83529120541115613871576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516138b093929190614611565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138f16139c8565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156139be576000838152600360205260408120546002805491929183908110613964576139646140ba565b60009182526020822060059091020180549092506139849060019061406e565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610be7915050565b5060019392505050565b6139d06139ef565b6139ed57604051631afcd79f60e31b815260040160405180910390fd5b565b60006139f96138c5565b54600160401b900460ff16919050565b600060208284031215613a1b57600080fd5b5035919050565b60008083601f840112613a3457600080fd5b5081356001600160401b03811115613a4b57600080fd5b6020830191508360208260051b8501011115613a6657600080fd5b9250929050565b60008083601f840112613a7f57600080fd5b5081356001600160401b03811115613a9657600080fd5b602083019150836020828501011115613a6657600080fd5b600080600080600080600060a0888a031215613ac957600080fd5b8735965060208801356001600160401b03811115613ae657600080fd5b613af28a828b01613a22565b909750955050604088013593506060880135925060808801356001600160401b03811115613b1f57600080fd5b613b2b8a828b01613a6d565b989b979a50959850939692959293505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613b6557600080fd5b8135602083016000806001600160401b03841115613b8557613b85613b3e565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613bb357613bb3613b3e565b604052838152905080828401871015613bcb57600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613bfd57600080fd5b833592506020840135915060408401356001600160401b03811115613c2157600080fd5b613c2d86828701613b54565b9150509250925092565b6001600160a01b038116811461319157600080fd5b60008060008060808587031215613c6257600080fd5b843593506020850135613c7481613c37565b93969395505050506040820135916060013590565b60008060408385031215613c9c57600080fd5b50508035926020909101359150565b60008060408385031215613cbe57600080fd5b8235613cc981613c37565b915060208301356001600160401b03811115613ce457600080fd5b613cf085828601613b54565b9150509250929050565b60005b83811015613d15578181015183820152602001613cfd565b50506000910152565b60008151808452613d36816020860160208601613cfa565b601f01601f19169290920160200192915050565b602081526000610be76020830184613d1e565b83815282151560208201526060604082015260006109026060830184613d1e565b600080600060608486031215613d9357600080fd5b83359250602084013591506040840135613dac81613c37565b809150509250925092565b60008060008060608587031215613dcd57600080fd5b8435935060208501356001600160401b03811115613dea57600080fd5b613df687828801613a22565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613e41578351835260209384019390920191600101613e23565b509095945050505050565b600080600080600060a08688031215613e6457600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e9c57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613ec857600080fd5b8335613ed381613c37565b92506020840135915060408401356001600160401b03811115613c2157600080fd5b60008060008060008060a08789031215613f0e57600080fd5b8635955060208701356001600160401b03811115613f2b57600080fd5b613f3789828a01613a22565b909650945050604087013592506060870135915060808701356001600160401b03811115613f6457600080fd5b613f7089828a01613b54565b9150509295509295509295565b600060208284031215613f8f57600080fd5b8135610be781613c37565b600080600080600060808688031215613fb257600080fd5b853594506020860135935060408601356001600160401b03811115613fd657600080fd5b613fe288828901613a6d565b96999598509660600135949350505050565b60008060006060848603121561400957600080fd5b833561401481613c37565b9250602084013561402481613c37565b91506040840135613dac81613c37565b6000806040838503121561404757600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b7757612b77614058565b8082028115828204841417612b7757612b77614058565b6000826140b557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152604060208201526000610902604083018486614107565b80516001600160601b038116811461416157600080fd5b919050565b8051801515811461416157600080fd5b600080600080600060a0868803121561418e57600080fd5b6141978661414a565b945060208601516141a781613c37565b6040870151909450600581106141bc57600080fd5b92506141ca60608701614166565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561420757600080fd5b610be782614166565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561425c57600080fd5b8351925061426c60208501614166565b915061427a60408501614166565b90509250925092565b80820180821115612b7757612b77614058565b6000602082840312156142a857600080fd5b5051919050565b600181811c908216806142c357607f821691505b6020821081036142e357634e487b7160e01b600052602260045260246000fd5b50919050565b838152826020820152606060408201526000808354614307816142af565b8060608601526001821660008114614326576001811461434257614376565b60ff1983166080870152608082151560051b8701019350614376565b86600052602060002060005b8381101561436d5781548882016080015260019091019060200161434e565b87016080019450505b5091979650505050505050565b60008251614395818460208701613cfa565b9190910192915050565b600080600080600080600060e0888a0312156143ba57600080fd5b6143c38861414a565b96506143d160208901614166565b604089015160608a015160808b015160a08c01519399509197509550935091506143fd60c08901614166565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b5157806000526020600020601f840160051c810160208510156144b85750805b601f840160051c820191505b818110156144d857600081556001016144c4565b5050505050565b6001600160401b038311156144f6576144f6613b3e565b61450a8361450483546142af565b83614491565b6000601f84116001811461453e57600085156145265750838201355b600019600387901b1c1916600186901b1783556144d8565b600083815260209020601f19861690835b8281101561456f578685013582556020948501946001909201910161454f565b508682101561458c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156145b057600080fd5b8151610be781613c37565b81835260006001600160fb1b038311156145d457600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146016040830185876145bb565b9050826020830152949350505050565b6040815260006146256040830185876145bb565b82810360208401526146378185613d1e565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204611969b7846b8f8df4dbeb55dc71bd009ee535c528de4a12223b6d97dbc9de164736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "CommitCastShutter(uint256,address,bytes32,bytes32,bytes)": { - "details": "Emitted when a vote is cast.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_juror": "The address of the juror casting the vote commitment." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash including the justification.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encoding", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitShutter Added functionality: shielded voting. Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 21704, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 21707, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)11133" - }, - { - "astId": 21711, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)21643_storage)dyn_storage" - }, - { - "astId": 21715, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21717, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 21725, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 21729, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 21731, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)21643_storage)dyn_storage": { - "base": "t_struct(Dispute)21643_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)21681_storage)dyn_storage": { - "base": "t_struct(Round)21681_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)21690_storage)dyn_storage": { - "base": "t_struct(Vote)21690_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)11133": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)21643_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 21632, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)21681_storage)dyn_storage" - }, - { - "astId": 21634, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 21636, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 21640, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21642, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)21681_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 21647, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)21690_storage)dyn_storage" - }, - { - "astId": 21649, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 21653, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21655, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 21657, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 21659, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 21663, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 21667, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 21673, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 21675, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 21678, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 21680, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)21690_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 21683, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 21685, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 21687, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 21689, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/DisputeKitShutter_Proxy.json b/contracts/deployments/arbitrum/DisputeKitShutter_Proxy.json deleted file mode 100644 index 5190f773d..000000000 --- a/contracts/deployments/arbitrum/DisputeKitShutter_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x7fb022ef5148ef65adf5cc9ec618ab3d0616fb03926747c95480100ff27a449c", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", - "transactionIndex": 15, - "gasUsed": "228435", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6e1577e8f55bfadd354f05189cb9c1efbdd2ba0fd0ead54646ddfeca11ab7344", - "transactionHash": "0x7fb022ef5148ef65adf5cc9ec618ab3d0616fb03926747c95480100ff27a449c", - "logs": [ - { - "transactionIndex": 15, - "blockNumber": 364034407, - "transactionHash": "0x7fb022ef5148ef65adf5cc9ec618ab3d0616fb03926747c95480100ff27a449c", - "address": "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 17, - "blockHash": "0x6e1577e8f55bfadd354f05189cb9c1efbdd2ba0fd0ead54646ddfeca11ab7344" - } - ], - "blockNumber": 364034407, - "cumulativeGasUsed": "2231063", - "status": 1, - "byzantium": true - }, - "args": [ - "0xF3103B46403A0bBd4551648BFb29BCC2b8783947", - "0xc0c53b8b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1" - ], - "numDeployments": 1, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/DisputeResolver.json b/contracts/deployments/arbitrum/DisputeResolver.json deleted file mode 100644 index 3f2f457ae..000000000 --- a/contracts/deployments/arbitrum/DisputeResolver.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "arbitratorDisputeIDToLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplate", - "type": "string" - }, - { - "internalType": "string", - "name": "_disputeTemplateDataMappings", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplateUri", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplateUri", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bytes", - "name": "arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x31858b192f3efb673fbb83a4fc627c7813a0f7c49f426c627ab7477727f925d3", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", - "transactionIndex": 2, - "gasUsed": "1523128", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa074596c02c8018797fdb3db47e7398f7a135f54120d7942bad487b987363cb3", - "transactionHash": "0x31858b192f3efb673fbb83a4fc627c7813a0f7c49f426c627ab7477727f925d3", - "logs": [], - "blockNumber": 272063364, - "cumulativeGasUsed": "1773126", - "status": 1, - "byzantium": true - }, - "args": [ - "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_arbitratorDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/DisputeResolver.sol\":\"DisputeResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal virtual returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0xee61f409399f0e66be187def6fcbe2e23717475b2b752d913dfac0a32c7dca1a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xb46ff71c32a524a865fe8ca99d94c9daeb690bc9d7d49d963a45b06f60af19f3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610ed7380380610ed783398101604081905261002f91610083565b600080546001600160a01b03199081163317909155600180546001600160a01b03948516908316179055600280549290931691161790556100bd565b6001600160a01b038116811461008057600080fd5b50565b6000806040838503121561009657600080fd5b82516100a18161006b565b60208401519092506100b28161006b565b809150509250929050565b610e0b806100cc6000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea264697066735822122028e3f1561d663e8479b35f936c2645829463b01bf5fedd3e120b732867bda19a64736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea264697066735822122028e3f1561d663e8479b35f936c2645829463b01bf5fedd3e120b732867bda19a64736f6c63430008180033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrator": "The arbitrator of the contract.", - "_arbitratorDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "Target global arbitrator for any disputes." - } - }, - "createDisputeForTemplate(bytes,string,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplate": "Dispute template.", - "_disputeTemplateDataMappings": "The data mappings.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "createDisputeForTemplateUri(bytes,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 14991, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 14994, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)23044" - }, - { - "astId": 14997, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)23215" - }, - { - "astId": 15001, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage" - }, - { - "astId": 15005, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)14989_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)23044": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)23215": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)14989_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 14982, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 14984, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 14986, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 14988, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/DisputeResolverRuler.json b/contracts/deployments/arbitrum/DisputeResolverRuler.json deleted file mode 100644 index b5d45949a..000000000 --- a/contracts/deployments/arbitrum/DisputeResolverRuler.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "arbitratorDisputeIDToLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplate", - "type": "string" - }, - { - "internalType": "string", - "name": "_disputeTemplateDataMappings", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplateUri", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplateUri", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bytes", - "name": "arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x1112abdc3f57ddc211ca722c574b81b13aa01739793e0cf023c8a7fcf6d373fe", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140", - "transactionIndex": 2, - "gasUsed": "915878", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1094f4f08b0e0a3bec164918a7059f883e0cd6a0a501a3490e65cc12df718df3", - "transactionHash": "0x1112abdc3f57ddc211ca722c574b81b13aa01739793e0cf023c8a7fcf6d373fe", - "logs": [], - "blockNumber": 286701355, - "cumulativeGasUsed": "979461", - "status": 1, - "byzantium": true - }, - "args": [ - "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2" - ], - "numDeployments": 1, - "solcInputHash": "6c34f81616194abf0f5b1c9c283b9294", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_arbitratorDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/DisputeResolverRuler.sol\":\"DisputeResolverRuler\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal virtual returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0xee61f409399f0e66be187def6fcbe2e23717475b2b752d913dfac0a32c7dca1a\",\"license\":\"MIT\"},\"src/arbitration/devtools/DisputeResolverRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {DisputeResolver, IArbitratorV2, IDisputeTemplateRegistry} from \\\"../arbitrables/DisputeResolver.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\ninterface IKlerosCoreRulerFragment {\\n function getNextDisputeID() external view returns (uint256);\\n}\\n\\n/// @title DisputeResolverRuler\\n/// It extends DisputeResolver for testing purposes of the automatic ruling modes.\\n/// The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\\ncontract DisputeResolverRuler is DisputeResolver {\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n IDisputeTemplateRegistry _templateRegistry\\n ) DisputeResolver(_arbitrator, _templateRegistry) {\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal override returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n uint256 localDisputeID = disputes.length;\\n DisputeStruct storage dispute = disputes.push();\\n dispute.arbitratorExtraData = _arbitratorExtraData;\\n dispute.numberOfRulingOptions = _numberOfRulingOptions;\\n\\n // Keep track of the upcoming dispute ID before dispute creation, so rule() can be called immediately after.\\n arbitratorDisputeID = IKlerosCoreRulerFragment(address(arbitrator)).getNextDisputeID();\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n\\n arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n }\\n}\\n\",\"keccak256\":\"0x310d715738bcb1210bb6094787f6c6cc8032664f9484e2137106474b749ff273\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xb46ff71c32a524a865fe8ca99d94c9daeb690bc9d7d49d963a45b06f60af19f3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610eee380380610eee83398101604081905261002f9161008b565b60008054600180546001600160a01b03199081166001600160a01b0396871617909155600280548216949095169390931790935591811633918216171790556100c5565b6001600160a01b038116811461008857600080fd5b50565b6000806040838503121561009e57600080fd5b82516100a981610073565b60208401519092506100ba81610073565b809150509250929050565b610e1a806100d46000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108c9565b610231565b005b34801561010c57600080fd5b506100fe61011b366004610903565b6103d1565b34801561012c57600080fd5b5061014061013b366004610927565b61041d565b6040516100d59493929190610986565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109fe565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a88565b61055a565b3480156101d057600080fd5b506101836101df366004610927565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c366004610903565b6105b9565b34801561021d57600080fd5b506100fe61022c366004610903565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b96565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610bac565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610bee565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610bee565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610bac565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610bac565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60038054600181018255600091909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106f1898b83610c79565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa158015610743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107679190610d3a565b600081815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a994174916107af918c918c9101610d53565b6020604051808303816000875af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190610d3a565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061083a90879086908c90610d8f565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906108789089908f908f90600401610dae565b60206040518083038185885af1158015610896573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108bb9190610d3a565b505050509695505050505050565b600080604083850312156108dc57600080fd5b50508035926020909101359150565b6001600160a01b038116811461090057600080fd5b50565b60006020828403121561091557600080fd5b8135610920816108eb565b9392505050565b60006020828403121561093957600080fd5b5035919050565b6000815180845260005b818110156109665760208185018101518683018201520161094a565b506000602082860101526020601f19601f83011685010191505092915050565b6080815260006109996080830187610940565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109c757600080fd5b50813567ffffffffffffffff8111156109df57600080fd5b6020830191508360208285010111156109f757600080fd5b9250929050565b600080600080600060608688031215610a1657600080fd5b853567ffffffffffffffff80821115610a2e57600080fd5b610a3a89838a016109b5565b90975095506020880135915080821115610a5357600080fd5b50610a60888289016109b5565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610aa157600080fd5b863567ffffffffffffffff80821115610ab957600080fd5b610ac58a838b016109b5565b90985096506020890135915080821115610ade57600080fd5b610aea8a838b016109b5565b90965094506040890135915080821115610b0357600080fd5b818901915089601f830112610b1757600080fd5b813581811115610b2957610b29610a72565b604051601f8201601f19908116603f01168101908382118183101715610b5157610b51610a72565b816040528281528c6020848701011115610b6a57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610c0257607f821691505b602082108103610c2257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c74576000816000526020600020601f850160051c81016020861015610c515750805b601f850160051c820191505b81811015610c7057828155600101610c5d565b5050505b505050565b67ffffffffffffffff831115610c9157610c91610a72565b610ca583610c9f8354610bee565b83610c28565b6000601f841160018114610cd95760008515610cc15750838201355b600019600387901b1c1916600186901b178355610d33565b600083815260209020601f19861690835b82811015610d0a5786850135825560209485019460019092019101610cea565b5086821015610d275760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600060208284031215610d4c57600080fd5b5051919050565b6060815260006060820152608060208201526000610d746080830185610940565b8281036040840152610d868185610940565b95945050505050565b838152826020820152606060408201526000610d866060830184610940565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f191601019291505056fea26469706673582212205a8e65d1dfc327ea0f1f71dae2dae97c38359baa8ee8493fab431b5809c2307a64736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108c9565b610231565b005b34801561010c57600080fd5b506100fe61011b366004610903565b6103d1565b34801561012c57600080fd5b5061014061013b366004610927565b61041d565b6040516100d59493929190610986565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109fe565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a88565b61055a565b3480156101d057600080fd5b506101836101df366004610927565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c366004610903565b6105b9565b34801561021d57600080fd5b506100fe61022c366004610903565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b96565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610bac565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610bee565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610bee565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610bac565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610bac565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60038054600181018255600091909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106f1898b83610c79565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa158015610743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107679190610d3a565b600081815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a994174916107af918c918c9101610d53565b6020604051808303816000875af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190610d3a565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061083a90879086908c90610d8f565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906108789089908f908f90600401610dae565b60206040518083038185885af1158015610896573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108bb9190610d3a565b505050509695505050505050565b600080604083850312156108dc57600080fd5b50508035926020909101359150565b6001600160a01b038116811461090057600080fd5b50565b60006020828403121561091557600080fd5b8135610920816108eb565b9392505050565b60006020828403121561093957600080fd5b5035919050565b6000815180845260005b818110156109665760208185018101518683018201520161094a565b506000602082860101526020601f19601f83011685010191505092915050565b6080815260006109996080830187610940565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109c757600080fd5b50813567ffffffffffffffff8111156109df57600080fd5b6020830191508360208285010111156109f757600080fd5b9250929050565b600080600080600060608688031215610a1657600080fd5b853567ffffffffffffffff80821115610a2e57600080fd5b610a3a89838a016109b5565b90975095506020880135915080821115610a5357600080fd5b50610a60888289016109b5565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610aa157600080fd5b863567ffffffffffffffff80821115610ab957600080fd5b610ac58a838b016109b5565b90985096506020890135915080821115610ade57600080fd5b610aea8a838b016109b5565b90965094506040890135915080821115610b0357600080fd5b818901915089601f830112610b1757600080fd5b813581811115610b2957610b29610a72565b604051601f8201601f19908116603f01168101908382118183101715610b5157610b51610a72565b816040528281528c6020848701011115610b6a57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610c0257607f821691505b602082108103610c2257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c74576000816000526020600020601f850160051c81016020861015610c515750805b601f850160051c820191505b81811015610c7057828155600101610c5d565b5050505b505050565b67ffffffffffffffff831115610c9157610c91610a72565b610ca583610c9f8354610bee565b83610c28565b6000601f841160018114610cd95760008515610cc15750838201355b600019600387901b1c1916600186901b178355610d33565b600083815260209020601f19861690835b82811015610d0a5786850135825560209485019460019092019101610cea565b5086821015610d275760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600060208284031215610d4c57600080fd5b5051919050565b6060815260006060820152608060208201526000610d746080830185610940565b8281036040840152610d868185610940565b95945050505050565b838152826020820152606060408201526000610d866060830184610940565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f191601019291505056fea26469706673582212205a8e65d1dfc327ea0f1f71dae2dae97c38359baa8ee8493fab431b5809c2307a64736f6c63430008180033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrator": "The arbitrator of the contract.", - "_arbitratorDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "Target global arbitrator for any disputes." - } - }, - "createDisputeForTemplate(bytes,string,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplate": "Dispute template.", - "_disputeTemplateDataMappings": "The data mappings.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "createDisputeForTemplateUri(bytes,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 15541, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 15544, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)21857" - }, - { - "astId": 15547, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)22028" - }, - { - "astId": 15551, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)15539_storage)dyn_storage" - }, - { - "astId": 15555, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)15539_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)15539_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)21857": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)22028": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)15539_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 15532, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 15534, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 15536, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 15538, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/DisputeTemplateRegistry.json b/contracts/deployments/arbitrum/DisputeTemplateRegistry.json deleted file mode 100644 index 4e5470eca..000000000 --- a/contracts/deployments/arbitrum/DisputeTemplateRegistry.json +++ /dev/null @@ -1,299 +0,0 @@ -{ - "address": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "DisputeTemplate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "setDisputeTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "templateId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templates", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - "transactionIndex": 19, - "gasUsed": "380009", - "logsBloom": "0x00000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000004000000000000000000000000000000000000000000", - "blockHash": "0xe0292fb12b680dd0be51cb110aac65972d0fc6c26744782e368735aa496482cc", - "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", - "logs": [ - { - "transactionIndex": 19, - "blockNumber": 272063329, - "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", - "address": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 237, - "blockHash": "0xe0292fb12b680dd0be51cb110aac65972d0fc6c26744782e368735aa496482cc" - } - ], - "blockNumber": 272063329, - "cumulativeGasUsed": "14853054", - "status": 1, - "byzantium": true - }, - "args": [ - "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeTemplateRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] - }, - "implementation": "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/DisputeTemplateRegistry_Implementation.json b/contracts/deployments/arbitrum/DisputeTemplateRegistry_Implementation.json deleted file mode 100644 index e8100c7c6..000000000 --- a/contracts/deployments/arbitrum/DisputeTemplateRegistry_Implementation.json +++ /dev/null @@ -1,400 +0,0 @@ -{ - "address": "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "DisputeTemplate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "setDisputeTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "templateId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templates", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0xb30d787cd00260e1a283592ae874afc7abc01499ef7f97b6c89c604eb5a07948", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", - "transactionIndex": 2, - "gasUsed": "980209", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000800000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd7765587214aeea42b020462049f2b9cedead6e1d9a20028c2b8efd50656fb5b", - "transactionHash": "0xb30d787cd00260e1a283592ae874afc7abc01499ef7f97b6c89c604eb5a07948", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 272063313, - "transactionHash": "0xb30d787cd00260e1a283592ae874afc7abc01499ef7f97b6c89c604eb5a07948", - "address": "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 3, - "blockHash": "0xd7765587214aeea42b020462049f2b9cedead6e1d9a20028c2b8efd50656fb5b" - } - ], - "blockNumber": 272063313, - "cumulativeGasUsed": "1140433", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"DisputeTemplate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"setDisputeTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"templateId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"DisputeTemplate(uint256,string,string,string)\":{\"details\":\"To be emitted when a new dispute template is created.\",\"params\":{\"_templateData\":\"The template data.\",\"_templateDataMappings\":\"The data mappings.\",\"_templateId\":\"The identifier of the dispute template.\",\"_templateTag\":\"An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"initialize(address)\":{\"details\":\"Initializer\",\"params\":{\"_governor\":\"Governor of the contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setDisputeTemplate(string,string,string)\":{\"details\":\"Registers a new dispute template.\",\"params\":{\"_templateData\":\"The data of the template.\",\"_templateDataMappings\":\"The data mappings of the template.\",\"_templateTag\":\"The tag of the template (optional).\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"governor\":{\"details\":\"The governor of the contract.\"},\"templates\":{\"details\":\"The number of templates.\"}},\"title\":\"Dispute Template Registry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/DisputeTemplateRegistry.sol\":\"DisputeTemplateRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/arbitration/DisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\nimport \\\"./interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\n/// @title Dispute Template Registry\\n/// @dev A contract to maintain a registry of dispute templates.\\ncontract DisputeTemplateRegistry is IDisputeTemplateRegistry, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev The governor of the contract.\\n address public governor;\\n\\n /// @dev The number of templates.\\n uint256 public templates;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer\\n /// @param _governor Governor of the contract.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Registers a new dispute template.\\n /// @param _templateTag The tag of the template (optional).\\n /// @param _templateData The data of the template.\\n /// @param _templateDataMappings The data mappings of the template.\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId) {\\n templateId = templates++;\\n emit DisputeTemplate(templateId, _templateTag, _templateData, _templateDataMappings);\\n }\\n}\\n\",\"keccak256\":\"0xb6898a1fa7ec85c1aa12f4cb5b7a5407ab2a9105c36d6f08c77982982672758a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xb46ff71c32a524a865fe8ca99d94c9daeb690bc9d7d49d963a45b06f60af19f3\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516108d66100fc600039600081816101d1015281816101fa01526103f701526108d66000f3fe6080604052600436106100605760003560e01c80630c340a24146100655780633a283d7d146100a25780634a994174146100c65780634f1ef286146100e657806352d1902d146100fb578063c4d66de814610110578063e4c0aaf414610130575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b860015481565b604051908152602001610099565b3480156100d257600080fd5b506100b86100e136600461065e565b610150565b6100f96100f4366004610702565b6101bd565b005b34801561010757600080fd5b506100b86103ea565b34801561011c57600080fd5b506100f961012b366004610764565b610448565b34801561013c57600080fd5b506100f961014b366004610764565b610532565b60018054600091826101618361077f565b9190505590508360405161017591906107ca565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516101ae929190610812565b60405180910390a39392505050565b6101c68261057e565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061024457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102386000805160206108818339815191525490565b6001600160a01b031614155b156102625760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156102bc575060408051601f3d908101601f191682019092526102b991810190610840565b60015b6102e957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610881833981519152811461031a57604051632a87526960e21b8152600481018290526024016102e0565b6000805160206108818339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156103e5576000836001600160a01b03168360405161038191906107ca565b600060405180830381855af49150503d80600081146103bc576040519150601f19603f3d011682016040523d82523d6000602084013e6103c1565b606091505b50509050806103e3576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104355760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061088183398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104925750805467ffffffffffffffff808416911610155b156104af5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461055c5760405162461bcd60e51b81526004016102e090610859565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105a85760405162461bcd60e51b81526004016102e090610859565b50565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156105dc576105dc6105ab565b604051601f8501601f19908116603f01168101908282118183101715610604576106046105ab565b8160405280935085815286868601111561061d57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261064857600080fd5b610657838335602085016105c1565b9392505050565b60008060006060848603121561067357600080fd5b833567ffffffffffffffff8082111561068b57600080fd5b61069787838801610637565b945060208601359150808211156106ad57600080fd5b6106b987838801610637565b935060408601359150808211156106cf57600080fd5b506106dc86828701610637565b9150509250925092565b80356001600160a01b03811681146106fd57600080fd5b919050565b6000806040838503121561071557600080fd5b61071e836106e6565b9150602083013567ffffffffffffffff81111561073a57600080fd5b8301601f8101851361074b57600080fd5b61075a858235602084016105c1565b9150509250929050565b60006020828403121561077657600080fd5b610657826106e6565b60006001820161079f57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b838110156107c15781810151838201526020016107a9565b50506000910152565b600082516107dc8184602087016107a6565b9190910192915050565b600081518084526107fe8160208601602086016107a6565b601f01601f19169290920160200192915050565b60408152600061082560408301856107e6565b828103602084015261083781856107e6565b95945050505050565b60006020828403121561085257600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220977df6a0b32ff9f925b16c822cbefa6381b9d1bcdec0a17337085ad8366f688b64736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a24146100655780633a283d7d146100a25780634a994174146100c65780634f1ef286146100e657806352d1902d146100fb578063c4d66de814610110578063e4c0aaf414610130575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b860015481565b604051908152602001610099565b3480156100d257600080fd5b506100b86100e136600461065e565b610150565b6100f96100f4366004610702565b6101bd565b005b34801561010757600080fd5b506100b86103ea565b34801561011c57600080fd5b506100f961012b366004610764565b610448565b34801561013c57600080fd5b506100f961014b366004610764565b610532565b60018054600091826101618361077f565b9190505590508360405161017591906107ca565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516101ae929190610812565b60405180910390a39392505050565b6101c68261057e565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061024457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102386000805160206108818339815191525490565b6001600160a01b031614155b156102625760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156102bc575060408051601f3d908101601f191682019092526102b991810190610840565b60015b6102e957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610881833981519152811461031a57604051632a87526960e21b8152600481018290526024016102e0565b6000805160206108818339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156103e5576000836001600160a01b03168360405161038191906107ca565b600060405180830381855af49150503d80600081146103bc576040519150601f19603f3d011682016040523d82523d6000602084013e6103c1565b606091505b50509050806103e3576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104355760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061088183398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104925750805467ffffffffffffffff808416911610155b156104af5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461055c5760405162461bcd60e51b81526004016102e090610859565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105a85760405162461bcd60e51b81526004016102e090610859565b50565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156105dc576105dc6105ab565b604051601f8501601f19908116603f01168101908282118183101715610604576106046105ab565b8160405280935085815286868601111561061d57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261064857600080fd5b610657838335602085016105c1565b9392505050565b60008060006060848603121561067357600080fd5b833567ffffffffffffffff8082111561068b57600080fd5b61069787838801610637565b945060208601359150808211156106ad57600080fd5b6106b987838801610637565b935060408601359150808211156106cf57600080fd5b506106dc86828701610637565b9150509250925092565b80356001600160a01b03811681146106fd57600080fd5b919050565b6000806040838503121561071557600080fd5b61071e836106e6565b9150602083013567ffffffffffffffff81111561073a57600080fd5b8301601f8101851361074b57600080fd5b61075a858235602084016105c1565b9150509250929050565b60006020828403121561077657600080fd5b610657826106e6565b60006001820161079f57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b838110156107c15781810151838201526020016107a9565b50506000910152565b600082516107dc8184602087016107a6565b9190910192915050565b600081518084526107fe8160208601602086016107a6565b601f01601f19169290920160200192915050565b60408152600061082560408301856107e6565b828103602084015261083781856107e6565b95945050505050565b60006020828403121561085257600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220977df6a0b32ff9f925b16c822cbefa6381b9d1bcdec0a17337085ad8366f688b64736f6c63430008180033", - "devdoc": { - "details": "A contract to maintain a registry of dispute templates.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "DisputeTemplate(uint256,string,string,string)": { - "details": "To be emitted when a new dispute template is created.", - "params": { - "_templateData": "The template data.", - "_templateDataMappings": "The data mappings.", - "_templateId": "The identifier of the dispute template.", - "_templateTag": "An optional tag for the dispute template, such as \"registration\" or \"removal\"." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." - }, - "initialize(address)": { - "details": "Initializer", - "params": { - "_governor": "Governor of the contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setDisputeTemplate(string,string,string)": { - "details": "Registers a new dispute template.", - "params": { - "_templateData": "The data of the template.", - "_templateDataMappings": "The data mappings of the template.", - "_templateTag": "The tag of the template (optional)." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "governor": { - "details": "The governor of the contract." - }, - "templates": { - "details": "The number of templates." - } - }, - "title": "Dispute Template Registry", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ], - "InvalidImplementation(address)": [ - { - "notice": "The `implementation` is not UUPS-compliant" - } - ] - }, - "events": { - "Upgraded(address)": { - "notice": "Emitted when the `implementation` has been successfully upgraded." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 6884, - "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6887, - "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", - "label": "templates", - "offset": 0, - "slot": "1", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/DisputeTemplateRegistry_Proxy.json b/contracts/deployments/arbitrum/DisputeTemplateRegistry_Proxy.json deleted file mode 100644 index b398c42e7..000000000 --- a/contracts/deployments/arbitrum/DisputeTemplateRegistry_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - "transactionIndex": 19, - "gasUsed": "380009", - "logsBloom": "0x00000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000004000000000000000000000000000000000000000000", - "blockHash": "0xe0292fb12b680dd0be51cb110aac65972d0fc6c26744782e368735aa496482cc", - "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", - "logs": [ - { - "transactionIndex": 19, - "blockNumber": 272063329, - "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", - "address": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 237, - "blockHash": "0xe0292fb12b680dd0be51cb110aac65972d0fc6c26744782e368735aa496482cc" - } - ], - "blockNumber": 272063329, - "cumulativeGasUsed": "14853054", - "status": 1, - "byzantium": true - }, - "args": [ - "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeTemplateRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/EvidenceModule.json b/contracts/deployments/arbitrum/EvidenceModule.json deleted file mode 100644 index 578aa4b09..000000000 --- a/contracts/deployments/arbitrum/EvidenceModule.json +++ /dev/null @@ -1,274 +0,0 @@ -{ - "address": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_party", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "Evidence", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "submitEvidence", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - "transactionIndex": 3, - "gasUsed": "366311", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000008000080100000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7e2d9da6677d008068faf9339fe4e662ff7806ca1f41666125e8fec1295fda29", - "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 272063086, - "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", - "address": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x7e2d9da6677d008068faf9339fe4e662ff7806ca1f41666125e8fec1295fda29" - } - ], - "blockNumber": 272063086, - "cumulativeGasUsed": "658598", - "status": 1, - "byzantium": true - }, - "args": [ - "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 2, - "solcInputHash": "3becf00d91b882372d51b0fc9f6a5781", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"EvidenceModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", - "execute": { - "methodName": "initialize2", - "args": [] - }, - "implementation": "0xA502A3942abCF8e71FBD87ed442B39b798b192C8", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/EvidenceModule_Implementation.json b/contracts/deployments/arbitrum/EvidenceModule_Implementation.json deleted file mode 100644 index 45ceb2b01..000000000 --- a/contracts/deployments/arbitrum/EvidenceModule_Implementation.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "address": "0xA502A3942abCF8e71FBD87ed442B39b798b192C8", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_party", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "Evidence", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "submitEvidence", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x7b5ebb6885b55a76e43e220d0ac460bd89babee613a2107d7fbfeff33af226d6", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA502A3942abCF8e71FBD87ed442B39b798b192C8", - "transactionIndex": 1, - "gasUsed": "736209", - "logsBloom": "0x00000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800010000000000000000000080000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc96ccd0e204fea83876cf3e31f859ce8cec9089197707e4b42baa9c0e3112a16", - "transactionHash": "0x7b5ebb6885b55a76e43e220d0ac460bd89babee613a2107d7fbfeff33af226d6", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 337009545, - "transactionHash": "0x7b5ebb6885b55a76e43e220d0ac460bd89babee613a2107d7fbfeff33af226d6", - "address": "0xA502A3942abCF8e71FBD87ed442B39b798b192C8", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0xc96ccd0e204fea83876cf3e31f859ce8cec9089197707e4b42baa9c0e3112a16" - } - ], - "blockNumber": 337009545, - "cumulativeGasUsed": "736209", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "3becf00d91b882372d51b0fc9f6a5781", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_party\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"Evidence\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Evidence(uint256,address,string)\":{\"details\":\"To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\",\"params\":{\"_evidence\":\"Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\",\"_party\":\"The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"details\":\"Initializer.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"submitEvidence(uint256,string)\":{\"details\":\"Submits evidence for a dispute.\",\"params\":{\"_evidence\":\"Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Evidence Module\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/evidence/EvidenceModule.sol\":\"EvidenceModule\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/evidence/EvidenceModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport \\\"../interfaces/IEvidence.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title Evidence Module\\ncontract EvidenceModule is IEvidence, Initializable, UUPSProxiable {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submits evidence for a dispute.\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\\n /// @param _evidence Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\\n function submitEvidence(uint256 _externalDisputeID, string calldata _evidence) external {\\n emit Evidence(_externalDisputeID, msg.sender, _evidence);\\n }\\n}\\n\",\"keccak256\":\"0xedf978718e5d349c5a39747e2c4da253a1d8b73588c4118b74b39c324ba471fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IEvidence.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IEvidence\\ninterface IEvidence {\\n /// @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\\n /// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\\n /// @param _evidence Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\\n event Evidence(uint256 indexed _externalDisputeID, address indexed _party, string _evidence);\\n}\\n\",\"keccak256\":\"0xa881a6604ffe43044edee5a789363e19b78af854092fe1e322d75a140150714c\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516108ff6100fc6000396000818161024a01528181610273015261047001526108ff6000f3fe6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Evidence(uint256,address,string)": { - "details": "To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).", - "params": { - "_evidence": "Stringified evidence object, example: '{\"name\" : \"Justification\", \"description\" : \"Description\", \"fileURI\" : \"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\"}'.", - "_externalDisputeID": "Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.", - "_party": "The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "initialize(address)": { - "details": "Initializer.", - "params": { - "_governor": "The governor's address." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "submitEvidence(uint256,string)": { - "details": "Submits evidence for a dispute.", - "params": { - "_evidence": "Stringified evidence object, example: '{\"name\" : \"Justification\", \"description\" : \"Description\", \"fileURI\" : \"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\"}'.", - "_externalDisputeID": "Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "Evidence Module", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 21337, - "contract": "src/arbitration/evidence/EvidenceModule.sol:EvidenceModule", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - } - } -} diff --git a/contracts/deployments/arbitrum/EvidenceModule_Proxy.json b/contracts/deployments/arbitrum/EvidenceModule_Proxy.json deleted file mode 100644 index e92870b8b..000000000 --- a/contracts/deployments/arbitrum/EvidenceModule_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - "transactionIndex": 3, - "gasUsed": "366311", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000008000080100000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7e2d9da6677d008068faf9339fe4e662ff7806ca1f41666125e8fec1295fda29", - "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 272063086, - "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", - "address": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x7e2d9da6677d008068faf9339fe4e662ff7806ca1f41666125e8fec1295fda29" - } - ], - "blockNumber": 272063086, - "cumulativeGasUsed": "658598", - "status": 1, - "byzantium": true - }, - "args": [ - "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"EvidenceModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206156b4d247e9775a938a1d5238ff9222ccea78aa0d46323980701cdafc6c1e2d64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206156b4d247e9775a938a1d5238ff9222ccea78aa0d46323980701cdafc6c1e2d64736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/KlerosCore.json b/contracts/deployments/arbitrum/KlerosCore.json deleted file mode 100644 index 457f0f011..000000000 --- a/contracts/deployments/arbitrum/KlerosCore.json +++ /dev/null @@ -1,2144 +0,0 @@ -{ - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "AppealPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrableNotWhitelisted", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "CannotDisableClassicDK", - "type": "error" - }, - { - "inputs": [], - "name": "CommitPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitNotSupportedByCourt", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitOnly", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "DisputePeriodIsFinal", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeStillDrawing", - "type": "error" - }, - { - "inputs": [], - "name": "EvidenceNotPassedAndNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GuardianOrGovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDisputKitParent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "MinStakeLowerThanParentCourt", - "type": "error" - }, - { - "inputs": [], - "name": "MustSupportDisputeKitClassic", - "type": "error" - }, - { - "inputs": [], - "name": "NotEligibleForStaking", - "type": "error" - }, - { - "inputs": [], - "name": "NotEvidencePeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotExecutionPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "SortitionModuleOnly", - "type": "error" - }, - { - "inputs": [], - "name": "StakingInTooManyCourts", - "type": "error" - }, - { - "inputs": [], - "name": "StakingLessThanCourtMinStake", - "type": "error" - }, - { - "inputs": [], - "name": "StakingMoreThanMaxStakePerJuror", - "type": "error" - }, - { - "inputs": [], - "name": "StakingMoreThanMaxTotalStaked", - "type": "error" - }, - { - "inputs": [], - "name": "StakingNotPossibleInThisCourt", - "type": "error" - }, - { - "inputs": [], - "name": "StakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "StakingZeroWhenNoStake", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnstakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "inputs": [], - "name": "UnsupportedDisputeKit", - "type": "error" - }, - { - "inputs": [], - "name": "VotePeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "WhenNotPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WhenPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WrongDisputeKitIndex", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "DisputeKitCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "DisputeKitEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_fromDisputeKitID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toDisputeKitID", - "type": "uint256" - } - ], - "name": "DisputeKitJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreBase.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "addNewDisputeKit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "arbitrableWhitelist", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "bool", - "name": "_allowed", - "type": "bool" - } - ], - "name": "changeArbitrableWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_guardian", - "type": "address" - } - ], - "name": "changeGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC721", - "name": "_jurorNft", - "type": "address" - } - ], - "name": "changeJurorNft", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - } - ], - "name": "changeJurorProsecutionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeKits", - "outputs": [ - { - "internalType": "contract IDisputeKit", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreBase.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "uint256", - "name": "nbDrawnJurors", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256[]", - "name": "_disputeKitIDs", - "type": "uint256[]" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "enableDisputeKits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getDisputeKitsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getPnkAtStakePerJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "disputeKitID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkAtStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "repartitions", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkPenalties", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "drawnJurors", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumPnkRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "drawIterations", - "type": "uint256" - } - ], - "internalType": "struct KlerosCoreBase.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_guardian", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "_disputeKit", - "type": "address" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModuleAddress", - "type": "address" - }, - { - "internalType": "contract IERC721", - "name": "_jurorNft", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "isDisputeKitJumping", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - } - ], - "name": "isSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorNft", - "outputs": [ - { - "internalType": "contract IERC721", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorProsecutionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "passPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStakeBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "contract ISortitionModule", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "transactionIndex": 2, - "gasUsed": "836960", - "logsBloom": "0x00000002000200000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000420000000000000010000800402000000000000008000000000000000000000000000000000800000000000080000000000080000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000200000000004000000000000000060000000001001000000800000000000000000000000000000000000000000000000", - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247", - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 272063254, - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x00000000000000000000000070b464be85a547144c72485eba2577e5d3a45421" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" - }, - { - "transactionIndex": 2, - "blockNumber": 272063254, - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 2, - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" - }, - { - "transactionIndex": 2, - "blockNumber": 272063254, - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" - }, - { - "transactionIndex": 2, - "blockNumber": 272063254, - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 4, - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" - } - ], - "blockNumber": 272063254, - "cumulativeGasUsed": "918567", - "status": 1, - "byzantium": true - }, - "args": [ - "0x17c39AB53A7072b167A74a85D47b30385c98ae89", - "0x2c053739000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070b464be85a547144c72485eba2577e5d3a45421000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000022000000000000000000000000021a9402adb818744b296e1d1be58c804118dc03d000000000000000000000000fe34a72c55e512601e7d491a9c5b36373ce34d6300000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 3, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreNeoProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212201c5acfa5298e951819678eb1ad6657fd09ee38510bab3bc500b837f47242febc64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212201c5acfa5298e951819678eb1ad6657fd09ee38510bab3bc500b837f47242febc64736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" - ] - }, - "implementation": "0xC1210493804eEF123096F9581Ee82B915150E54c", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/KlerosCoreRuler.json b/contracts/deployments/arbitrum/KlerosCoreRuler.json deleted file mode 100644 index 9fd6d468f..000000000 --- a/contracts/deployments/arbitrum/KlerosCoreRuler.json +++ /dev/null @@ -1,1602 +0,0 @@ -{ - "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NoRulerSet", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulerOnly", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "RulingModeNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "mode", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "AutoRuled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreRuler.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_oldRuler", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "RulerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct KlerosCoreRuler.RulerSettings", - "name": "_settings", - "type": "tuple" - } - ], - "name": "RulerSettingsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "changeRuler", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "_presetOverridden", - "type": "bool" - } - ], - "name": "changeRulingModeToAutomaticPreset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToAutomaticRandom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToManual", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreRuler.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getNextDisputeID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - } - ], - "internalType": "struct KlerosCoreRuler.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "rulers", - "outputs": [ - { - "internalType": "address", - "name": "ruler", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "name": "rulingResults", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "settings", - "outputs": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - "transactionIndex": 2, - "gasUsed": "314451", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000100004000000000000000000000000000060008000000000000000000000000220000000000000000000800000080000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d", - "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 286701284, - "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", - "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - "topics": [ - "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 0, - "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d" - }, - { - "transactionIndex": 2, - "blockNumber": 286701284, - "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", - "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d" - } - ], - "blockNumber": 286701284, - "cumulativeGasUsed": "348983", - "status": 1, - "byzantium": true - }, - "args": [ - "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", - "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" - ], - "numDeployments": 1, - "solcInputHash": "072c3d36aa3704de09a27a044cf00231", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreRulerProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212205e24db8a42d0caaa77ce845dfb341502dc3b700c5ccf0c51c4cf914535a4a64564736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212205e24db8a42d0caaa77ce845dfb341502dc3b700c5ccf0c51c4cf914535a4a64564736f6c63430008180033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x330bD769382cFc6d50175903434CCC8D206DCAE5", - [ - 0, - 10000, - "100000000000000000", - 16 - ] - ] - }, - "implementation": "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/KlerosCoreRuler_Implementation.json b/contracts/deployments/arbitrum/KlerosCoreRuler_Implementation.json deleted file mode 100644 index 5461d6c22..000000000 --- a/contracts/deployments/arbitrum/KlerosCoreRuler_Implementation.json +++ /dev/null @@ -1,2221 +0,0 @@ -{ - "address": "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NoRulerSet", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulerOnly", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "RulingModeNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "mode", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "AutoRuled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreRuler.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_oldRuler", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "RulerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct KlerosCoreRuler.RulerSettings", - "name": "_settings", - "type": "tuple" - } - ], - "name": "RulerSettingsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "changeRuler", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "_presetOverridden", - "type": "bool" - } - ], - "name": "changeRulingModeToAutomaticPreset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToAutomaticRandom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToManual", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreRuler.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getNextDisputeID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - } - ], - "internalType": "struct KlerosCoreRuler.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "rulers", - "outputs": [ - { - "internalType": "address", - "name": "ruler", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "name": "rulingResults", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "settings", - "outputs": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0xf4d87406caaf352d4a0c65a9f9963300a2e4fd4f762ca428155ac8c93e11ce48", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", - "transactionIndex": 5, - "gasUsed": "2957987", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x86b9c352bef894ed240b7fca2b89945fd86b54ea9672c8843a8061568921982b", - "transactionHash": "0xf4d87406caaf352d4a0c65a9f9963300a2e4fd4f762ca428155ac8c93e11ce48", - "logs": [ - { - "transactionIndex": 5, - "blockNumber": 286701267, - "transactionHash": "0xf4d87406caaf352d4a0c65a9f9963300a2e4fd4f762ca428155ac8c93e11ce48", - "address": "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 50, - "blockHash": "0x86b9c352bef894ed240b7fca2b89945fd86b54ea9672c8843a8061568921982b" - } - ], - "blockNumber": 286701267, - "cumulativeGasUsed": "4476604", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "6c34f81616194abf0f5b1c9c283b9294", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOrInstructorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoRulerSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingModeNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"mode\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"AutoRuled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreRuler.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_oldRuler\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"RulerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"struct KlerosCoreRuler.RulerSettings\",\"name\":\"_settings\",\"type\":\"tuple\"}],\"name\":\"RulerSettingsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"changeRuler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_presetOverridden\",\"type\":\"bool\"}],\"name\":\"changeRulingModeToAutomaticPreset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToAutomaticRandom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToManual\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreRuler.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNextDisputeID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"}],\"internalType\":\"struct KlerosCoreRuler.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"rulers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ruler\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"name\":\"rulingResults\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"settings\",\"outputs\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"appeal(uint256,uint256,bytes,bool)\":{\"details\":\"Appeals the ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"}},\"appealCost(uint256,bool)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])\":{\"details\":\"Creates a court under a specified parent court.\",\"params\":{\"_alpha\":\"The `alpha` property value of the court.\",\"_feeForJuror\":\"The `feeForJuror` property value of the court.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the court.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the court.\",\"_minStake\":\"The `minStake` property value of the court.\",\"_parent\":\"The `parent` property value of the court.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the court.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"execute(uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The appeal round.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"executeRuling(uint256,uint256,bool,bool)\":{\"details\":\"Executes a specified dispute's ruling.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getNumberOfVotes(uint256)\":{\"details\":\"Gets the number of votes permitted for the specified dispute in the latest round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"initialize(address,address,uint256[4])\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_governor\":\"The governor's address.\",\"_pinakion\":\"The address of the token contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"title\":\"KlerosCoreRuler Core arbitrator contract for development and testing purposes.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/KlerosCoreRuler.sol\":\"KlerosCoreRuler\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/devtools/KlerosCoreRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreRuler\\n/// Core arbitrator contract for development and testing purposes.\\ncontract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum RulingMode {\\n uninitialized,\\n manual, // executeRuling() is called manually.\\n automaticRandom, // The ruling is given randomly automatically.\\n automaticPreset // The ruling is given automatically with a preset value.\\n }\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct RulerSettings {\\n RulingMode rulingMode; // The ruling mode of the arbitrator.\\n uint256 presetRuling; // The ruling to give in case of automatic ruling mode.\\n bool presetTied; // Whether the ruling is tied or not.\\n bool presetOverridden; // Whether the ruling is overridden or not.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n struct RulingResult {\\n uint256 ruling;\\n bool tied;\\n bool overridden;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n IERC20 public pinakion; // The Pinakion token contract.\\n Court[] public courts; // The courts.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n mapping(IArbitrableV2 arbitrable => address ruler) public rulers; // The ruler of each arbitrable contract.\\n mapping(IArbitrableV2 arbitrable => RulerSettings) public settings; // The settings of each arbitrable contract.\\n mapping(uint256 disputeID => RulingResult) public rulingResults; // The ruling results of each dispute.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event AutoRuled(\\n IArbitrableV2 indexed _arbitrable,\\n RulingMode indexed mode,\\n uint256 indexed _disputeID,\\n uint256 _ruling,\\n bool tied,\\n bool overridden\\n );\\n event RulerSettingsChanged(IArbitrableV2 indexed _arbitrable, RulerSettings _settings);\\n event RulerChanged(IArbitrableV2 indexed _arbitrable, address indexed _oldRuler, address indexed _newRuler);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n function initialize(\\n address _governor,\\n IERC20 _pinakion,\\n uint256[4] memory _courtParameters\\n ) external reinitializer(1) {\\n governor = _governor;\\n pinakion = _pinakion;\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = false;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = [0, 0, 0, 0];\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n court.hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n court.timesPerPeriod\\n );\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function changeRulingModeToManual(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.manual;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticRandom(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticRandom;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticPreset(\\n IArbitrableV2 _arbitrable,\\n uint256 _presetRuling,\\n bool _presetTied,\\n bool _presetOverridden\\n ) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticPreset;\\n arbitratedSettings.presetRuling = _presetRuling;\\n arbitratedSettings.presetTied = _presetTied;\\n arbitratedSettings.presetOverridden = _presetOverridden;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRuler(IArbitrableV2 _arbitrable, address _newRuler) external {\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n rulers[_arbitrable] = _newRuler;\\n emit RulerChanged(_arbitrable, msg.sender, _newRuler);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , ) = _unpackExtraData(_extraData);\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n\\n Round storage round = dispute.rounds.push();\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n _autoRule(disputeID, _numberOfChoices);\\n\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n function _autoRule(uint256 _disputeID, uint256 _numberOfChoices) internal {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 roundID = dispute.rounds.length - 1;\\n RulerSettings storage arbitratedSettings = settings[dispute.arbitrated];\\n if (arbitratedSettings.rulingMode == RulingMode.uninitialized) revert RulingModeNotSet();\\n if (arbitratedSettings.rulingMode == RulingMode.manual) {\\n // NOP\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticPreset) {\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticPreset,\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.executeRuling(\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.execute(_disputeID, roundID);\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticRandom) {\\n uint256 pseudoRandomNumber = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1)))) %\\n _numberOfChoices; // Not secure but it's just a dev tool for testing, sue me\\n bool tied = pseudoRandomNumber & 4 == 0;\\n bool overridden = pseudoRandomNumber & 2 == 0;\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticRandom,\\n _disputeID,\\n pseudoRandomNumber,\\n tied,\\n overridden\\n );\\n this.executeRuling(_disputeID, pseudoRandomNumber, tied, overridden);\\n this.execute(_disputeID, roundID);\\n }\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _jump Whether to jump to the parent court or not.\\n function appeal(\\n uint256 _disputeID,\\n uint256 _numberOfChoices,\\n bytes memory /*_extraData*/,\\n bool _jump\\n ) external payable {\\n if (msg.value < appealCost(_disputeID, _jump)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (rulers[dispute.arbitrated] != msg.sender) revert RulerOnly();\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n uint96 newCourtID = dispute.courtID;\\n\\n if (_jump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n\\n Round storage extraRound = dispute.rounds.push();\\n extraRound.totalFeesForJurors = msg.value;\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n\\n _autoRule(_disputeID, _numberOfChoices);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n function execute(uint256 _disputeID, uint256 _round) external {\\n Dispute storage dispute = disputes[_disputeID];\\n address account = rulers[dispute.arbitrated];\\n if (account == address(0)) revert NoRulerSet();\\n\\n // Transfer the fees back to the ruler\\n Round storage round = dispute.rounds[_round];\\n uint256 feeReward = round.totalFeesForJurors;\\n round.sumFeeRewardPaid += feeReward;\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(account, _disputeID, _round, 1, int256(0), int256(feeReward), round.feeToken);\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID, uint256 _ruling, bool tied, bool overridden) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n if (msg.sender != rulers[dispute.arbitrated] && msg.sender != address(this)) revert RulerOnly();\\n\\n rulingResults[_disputeID] = RulingResult(_ruling, tied, overridden);\\n dispute.ruled = true;\\n dispute.arbitrated.rule(_disputeID, _ruling);\\n\\n emit Ruling(dispute.arbitrated, _disputeID, _ruling);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _unpackExtraData(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _jump Whether to jump to the parent court or not.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID, bool _jump) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n uint256 nbVotes = round.totalFeesForJurors / court.feeForJuror;\\n if (_jump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n RulingResult storage rulingResult = rulingResults[_disputeID];\\n return (rulingResult.ruling, rulingResult.tied, rulingResult.overridden);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n function getNextDisputeID() external view returns (uint256) {\\n return disputes.length;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n return dispute.rounds[dispute.rounds.length - 1].totalFeesForJurors / court.feeForJuror;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _unpackExtraData(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GovernorOrInstructorOnly();\\n error RulerOnly();\\n error NoRulerSet();\\n error RulingModeNotSet();\\n error UnsuccessfulCall();\\n error InvalidForkingCourtAsParent();\\n error ArbitrationFeesNotEnough();\\n error TokenNotAccepted();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error RulingAlreadyExecuted();\\n error TransferFailed();\\n}\\n\",\"keccak256\":\"0xb8a370ce083224d6aa6e3eefe1f2c5ef8bbc10f3d957277e09fa5d9b10607afe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161336562000103600039600081816113350152818161135e015261155b01526133656000f3fe6080604052600436106101e95760003560e01c8063564a565d11610113578063d98493f6116100ab578063e6d49cdf1161006f578063e6d49cdf14610727578063f6506db414610767578063f7434ea914610787578063fbf405b0146107a7578063fc6f8f16146107c757600080fd5b8063d98493f614610665578063d9ee095f14610685578063db8a173b14610698578063e2373ab3146106ad578063e4c0aaf41461070757600080fd5b8063564a565d146105175780636736b70c14610547578063751accd0146105675780637934c0be1461058757806382d02237146105a757806386541b24146105c75780638a9bb02a146105e7578063c13517e114610632578063c71f42531461064557600080fd5b80632177470c116101865780632177470c146103ec578063379f0a171461040c5780633cfd118414610442578063405d51ae1461046f57806343818d661461048f57806347cdcc1d146104af5780634f1ef286146104cf57806352d1902d146104e25780635601eaea146104f757600080fd5b8062f5822c146101ee57806301fcf74d146102105780630219da791461024357806305d3177d146102b65780630c340a24146102d65780630e3993a41461030e5780631860592b1461032e5780631c3db16d1461034e5780631f5a0dd21461038b575b600080fd5b3480156101fa57600080fd5b5061020e610209366004612900565b6107e7565b005b34801561021c57600080fd5b5061023061022b366004612932565b610834565b6040519081526020015b60405180910390f35b34801561024f57600080fd5b5061028e61025e366004612900565b60046020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff169082015260600161023a565b3480156102c257600080fd5b5061020e6102d13660046129e5565b610990565b3480156102e257600080fd5b506000546102f6906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b34801561031a57600080fd5b5061020e610329366004612900565b610be9565b34801561033a57600080fd5b50610230610349366004612a2d565b610cf4565b34801561035a57600080fd5b5061036e610369366004612a59565b610d4e565b60408051938452911515602084015215159082015260600161023a565b34801561039757600080fd5b506103ab6103a6366004612a59565b610d78565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161023a565b3480156103f857600080fd5b5061020e610407366004612a72565b610dd7565b34801561041857600080fd5b506102f6610427366004612900565b6005602052600090815260409020546001600160a01b031681565b34801561044e57600080fd5b5061046261045d366004612ad8565b610f9f565b60405161023a9190612b16565b34801561047b57600080fd5b5061020e61048a366004612b24565b611009565b34801561049b57600080fd5b5061020e6104aa366004612900565b6111c9565b3480156104bb57600080fd5b5061020e6104ca366004612b92565b61128e565b61020e6104dd366004612c4c565b611321565b3480156104ee57600080fd5b5061023061154e565b34801561050357600080fd5b5061020e610512366004612c9b565b6115ac565b34801561052357600080fd5b50610537610532366004612a59565b61171e565b60405161023a9493929190612ce7565b34801561055357600080fd5b5061020e610562366004612d24565b611773565b34801561057357600080fd5b5061020e610582366004612d5c565b611884565b34801561059357600080fd5b5061020e6105a2366004612db4565b61192e565b3480156105b357600080fd5b5061020e6105c2366004612de2565b6119ad565b3480156105d357600080fd5b5061020e6105e2366004612b24565b611a6a565b3480156105f357600080fd5b50610607610602366004612c9b565b611b5e565b604080518251815260208084015190820152918101516001600160a01b03169082015260600161023a565b610230610640366004612e3f565b611c0b565b34801561065157600080fd5b50610230610660366004612a59565b611c43565b34801561067157600080fd5b50610230610680366004612eb7565b611ced565b61020e610693366004612f02565b611d32565b3480156106a457600080fd5b50600354610230565b3480156106b957600080fd5b506106f76106c8366004612900565b60066020526000908152604090208054600182015460029092015460ff91821692918181169161010090041684565b60405161023a9493929190612f69565b34801561071357600080fd5b5061020e610722366004612900565b611f7f565b34801561073357600080fd5b5061036e610742366004612a59565b6007602052600090815260409020805460019091015460ff8082169161010090041683565b34801561077357600080fd5b50610230610782366004612f94565b611fcc565b34801561079357600080fd5b506102306107a2366004612ffa565b6120b0565b3480156107b357600080fd5b506001546102f6906001600160a01b031681565b3480156107d357600080fd5b506102306107e2366004612a59565b6120fc565b6000546001600160a01b031633146108125760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000806003848154811061084a5761084a61302e565b60009182526020822060026003909202019081018054919350906108709060019061305a565b815481106108805761088061302e565b6000918252602082208454600280546003909402909201945090916001600160601b039091169081106108b5576108b561302e565b90600052602060002090600b020190506000816004015483600001546108db9190613083565b9050851561095e5783546001600160601b031660001901610905576001600160ff1b039450610986565b610910816002613097565b61091b9060016130ae565b82546002805490916001600160601b031690811061093b5761093b61302e565b90600052602060002090600b0201600401546109579190613097565b9450610986565b610969816002613097565b6109749060016130ae565b82600401546109839190613097565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806109d9575080546001600160401b03808416911610155b156109f65760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610aaf578160200160208202803683370190505b508051610ac691600184019160209091019061280d565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184526000808252948101859052928301849052820192909252610b2c91600684019190612858565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610b9295600160601b90930460ff1694919390929060068b01906130c1565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b0381811660009081526005602052604090205416610c31576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b03818116600090815260056020526040902054163314610c6b576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610ce8919061311d565b60405180910390a25050565b6001600160a01b03821660009081526004602052604081205461010081046001600160401b031690610d3190600160481b900460ff16600a613246565b610d3b9084613097565b610d459190613083565b90505b92915050565b6000818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610d8857600080fd5b60009182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600060038581548110610dec57610dec61302e565b906000526020600020906003020190508060010160019054906101000a900460ff1615610e2c5760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b03908116600090815260056020526040902054163314801590610e5f5750333014155b15610e7d576040516301627e2760e61b815260040160405180910390fd5b60408051606081018252858152841515602080830191825285151583850190815260008a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015610f3757600080fd5b505af1158015610f4b573d6000803e3d6000fd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b610fa761288b565b6002826001600160601b031681548110610fc357610fc361302e565b6000918252602090912060408051608081019182905292600b029091016006019060049082845b815481526020019060010190808311610fea5750505050509050919050565b6000546001600160a01b031633146110345760405163c383977560e01b815260040160405180910390fd5b6001600160601b03871661105b57604051631ef4f64960e01b815260040160405180910390fd5b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b1617815590916040519080825280602002602001820160405280156110d4578160200160208202803683370190505b5080516110eb91600184019160209091019061280d565b50805460ff60601b1916600160601b89151502178155600281018790556003810186905560048082018690556005820185905561112e90600683019085906128a9565b506002896001600160601b03168154811061114b5761114b61302e565b600091825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761906111b6908c908c908c908c908c908c90613255565b60405180910390a3505050505050505050565b6001600160a01b0381811660009081526005602052604090205416611211576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b0381811660009081526005602052604090205416331461124b576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610caa565b6001600160a01b038281166000908152600560205260409020541633146112c8576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0382811660008181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b61132a8261212b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113a857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661139c6000805160206133108339815191525490565b6001600160a01b031614155b156113c65760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611420575060408051601f3d908101601f1916820190925261141d91810190613288565b60015b61144d57604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020613310833981519152811461147e57604051632a87526960e21b815260048101829052602401611444565b6000805160206133108339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611549576000836001600160a01b0316836040516114e591906132a1565b600060405180830381855af49150503d8060008114611520576040519150601f19603f3d011682016040523d82523d6000602084013e611525565b606091505b5050905080611547576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115995760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061331083398151915290565b6000600383815481106115c1576115c161302e565b60009182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806116165760405163f4612fe560e01b815260040160405180910390fd5b600082600201848154811061162d5761162d61302e565b906000526020600020906003020190506000816000015490508082600101600082825461165a91906130ae565b909155505060028201546001600160a01b031661169c576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050506116b7565b60028201546116b5906001600160a01b03168483612159565b505b60028201546040805160018152600060208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b6003818154811061172e57600080fd5b6000918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b03848116600090815260056020526040902054166117bb576001600160a01b038416600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b038481166000908152600560205260409020541633146117f5576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b03841660008181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f49061187590849061311d565b60405180910390a25050505050565b6000546001600160a01b031633146118af5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b031683836040516118ca91906132a1565b60006040518083038185875af1925050503d8060008114611907576040519150601f19603f3d011682016040523d82523d6000602084013e61190c565b606091505b5050905080611547576040516322092f2f60e11b815260040160405180910390fd5b6000546001600160a01b031633146119595760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b031633146119d85760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611a955760405163c383977560e01b815260040160405180910390fd5b60006002886001600160601b031681548110611ab357611ab361302e565b60009182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611b0890600683019084906128a9565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611b4c96959493929190613255565b60405180910390a25050505050505050565b611b8b6040518060600160405280600081526020016000815260200160006001600160a01b031681525090565b60038381548110611b9e57611b9e61302e565b90600052602060002090600302016002018281548110611bc057611bc061302e565b6000918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b6000611c16826120b0565b341015611c3657604051630e3360f160e21b815260040160405180910390fd5b610d458383600034612222565b60008060038381548110611c5957611c5961302e565b600091825260208220600390910201805460028054929450916001600160601b03909116908110611c8c57611c8c61302e565b90600052602060002090600b0201905080600401548260020160018460020180549050611cb9919061305a565b81548110611cc957611cc961302e565b906000526020600020906003020160000154611ce59190613083565b949350505050565b6000611ce58261034986868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120b092505050565b611d3c8482610834565b341015611d5c57604051633191f8f160e01b815260040160405180910390fd5b600060038581548110611d7157611d7161302e565b6000918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611dc7576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611de257611de2612cbd565b14611e00576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215611eb2576002816001600160601b031681548110611e2d57611e2d61302e565b60009182526020909120600b909102015482546001600160601b039182169250168114611eb257815460028301546001600160601b0390911690611e739060019061305a565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff191690556002830180549182018155600090815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051611f6491906132d0565b60405180910390a2611f768787612317565b50505050505050565b6000546001600160a01b03163314611faa5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526004602052604081205460ff166120055760405163e51cf7bf60e01b815260040160405180910390fd5b612010858585611ced565b82101561203057604051630e3360f160e21b815260040160405180910390fd5b6120456001600160a01b0384163330856126bc565b612062576040516312171d8360e31b815260040160405180910390fd5b6120a68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506122229050565b9695505050505050565b60008060006120be84612798565b5091509150806002836001600160601b0316815481106120e0576120e061302e565b90600052602060002090600b020160040154611ce59190613097565b6000600382815481106121115761211161302e565b600091825260209091206002600390920201015492915050565b6000546001600160a01b031633146121565760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516121b691906132a1565b6000604051808303816000865af19150503d80600081146121f3576040519150601f19603f3d011682016040523d82523d6000602084013e6121f8565b606091505b50915091508180156120a65750805115806120a65750808060200190518101906120a691906132de565b60008061222e85612798565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d018054928301815560009081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a16179055909450919250906122df8489612317565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a3505050949350505050565b60006003838154811061232c5761232c61302e565b90600052602060002090600302019050600060018260020180549050612352919061305a565b8254600160601b90046001600160a01b03166000908152600660205260408120919250815460ff16600381111561238b5761238b612cbd565b036123a95760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff1660038111156123c1576123c1612cbd565b146126b5576003815460ff1660038111156123de576123de612cbd565b0361252d578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c90608401600060405180830381600087803b1580156124b857600080fd5b505af11580156124cc573d6000803e3d6000fd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea9150604401600060405180830381600087803b15801561251057600080fd5b505af1158015612524573d6000803e3d6000fd5b505050506126b5565b6002815460ff16600381111561254557612545612cbd565b036126b55760008461255860014361305a565b6040805191406020830152016040516020818303038152906040528051906020012060001c61258791906132fb565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c90608401600060405180830381600087803b15801561264157600080fd5b505af1158015612655573d6000803e3d6000fd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea9150604401600060405180830381600087803b15801561269957600080fd5b505af11580156126ad573d6000803e3d6000fd5b505050505050505b5050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161272191906132a1565b6000604051808303816000865af19150503d806000811461275e576040519150601f19603f3d011682016040523d82523d6000602084013e612763565b606091505b509150915081801561278d57508051158061278d57508080602001905181019061278d91906132de565b979650505050505050565b600080600060408451106127fe575050506020810151604082015160608301516001600160601b03831615806127d957506002546001600160601b03841610155b156127e357600192505b816000036127f057600391505b806127f9575060015b610d71565b50600193600393508492509050565b828054828255906000526020600020908101928215612848579160200282015b8281111561284857825182559160200191906001019061282d565b506128549291506128d6565b5090565b8260048101928215612848579160200282015b82811115612848578251829060ff1690559160200191906001019061286b565b60405180608001604052806004906020820280368337509192915050565b8260048101928215612848579160200282018281111561284857825182559160200191906001019061282d565b5b8082111561285457600081556001016128d7565b6001600160a01b038116811461215657600080fd5b60006020828403121561291257600080fd5b813561291d816128eb565b9392505050565b801515811461215657600080fd5b6000806040838503121561294557600080fd5b82359150602083013561295781612924565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298957600080fd5b604051608081018181106001600160401b03821117156129ab576129ab612962565b6040528060808401858111156129c057600080fd5b845b818110156129da5780358352602092830192016129c2565b509195945050505050565b600080600060c084860312156129fa57600080fd5b8335612a05816128eb565b92506020840135612a15816128eb565b9150612a248560408601612978565b90509250925092565b60008060408385031215612a4057600080fd5b8235612a4b816128eb565b946020939093013593505050565b600060208284031215612a6b57600080fd5b5035919050565b60008060008060808587031215612a8857600080fd5b84359350602085013592506040850135612aa181612924565b91506060850135612ab181612924565b939692955090935050565b80356001600160601b0381168114612ad357600080fd5b919050565b600060208284031215612aea57600080fd5b610d4582612abc565b8060005b6004811015611547578151845260209384019390910190600101612af7565b60808101610d488284612af3565b6000806000806000806000610140888a031215612b4057600080fd5b612b4988612abc565b96506020880135612b5981612924565b955060408801359450606088013593506080880135925060a08801359150612b848960c08a01612978565b905092959891949750929550565b60008060408385031215612ba557600080fd5b8235612bb0816128eb565b91506020830135612957816128eb565b600082601f830112612bd157600080fd5b81356001600160401b0380821115612beb57612beb612962565b604051601f8301601f19908116603f01168101908282118183101715612c1357612c13612962565b81604052838152866020858801011115612c2c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612c5f57600080fd5b8235612c6a816128eb565b915060208301356001600160401b03811115612c8557600080fd5b612c9185828601612bc0565b9150509250929050565b60008060408385031215612cae57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60058110612ce357612ce3612cbd565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612d136040830185612cd3565b821515606083015295945050505050565b60008060008060808587031215612d3a57600080fd5b8435612d45816128eb565b9350602085013592506040850135612aa181612924565b600080600060608486031215612d7157600080fd5b8335612d7c816128eb565b92506020840135915060408401356001600160401b03811115612d9e57600080fd5b612daa86828701612bc0565b9150509250925092565b60008060408385031215612dc757600080fd5b8235612dd2816128eb565b9150602083013561295781612924565b600080600060608486031215612df757600080fd5b8335612e02816128eb565b925060208401356001600160401b0381168114612e1e57600080fd5b9150604084013560ff81168114612e3457600080fd5b809150509250925092565b60008060408385031215612e5257600080fd5b8235915060208301356001600160401b03811115612c8557600080fd5b60008083601f840112612e8157600080fd5b5081356001600160401b03811115612e9857600080fd5b602083019150836020828501011115612eb057600080fd5b9250929050565b600080600060408486031215612ecc57600080fd5b83356001600160401b03811115612ee257600080fd5b612eee86828701612e6f565b9094509250506020840135612e34816128eb565b60008060008060808587031215612f1857600080fd5b843593506020850135925060408501356001600160401b03811115612f3c57600080fd5b612f4887828801612bc0565b9250506060850135612ab181612924565b60048110612ce357612ce3612cbd565b60808101612f778287612f59565b602082019490945291151560408301521515606090910152919050565b600080600080600060808688031215612fac57600080fd5b8535945060208601356001600160401b03811115612fc957600080fd5b612fd588828901612e6f565b9095509350506040860135612fe9816128eb565b949793965091946060013592915050565b60006020828403121561300c57600080fd5b81356001600160401b0381111561302257600080fd5b611ce584828501612bc0565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610d4857610d48613044565b634e487b7160e01b600052601260045260246000fd5b6000826130925761309261306d565b500490565b8082028115828204841417610d4857610d48613044565b80820180821115610d4857610d48613044565b6000610120820190508715158252602087602084015286604084015285606084015284608084015260a083018460005b600481101561310e578154835291830191600191820191016130f1565b50505050979650505050505050565b60006080820190506131338260ff855416612f59565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b600181815b8085111561319d57816000190482111561318357613183613044565b8085161561319057918102915b93841c9390800290613167565b509250929050565b6000826131b457506001610d48565b816131c157506000610d48565b81600181146131d757600281146131e1576131fd565b6001915050610d48565b60ff8411156131f2576131f2613044565b50506001821b610d48565b5060208310610133831016604e8410600b8410161715613220575081810a610d48565b61322a8383613162565b806000190482111561323e5761323e613044565b029392505050565b6000610d4560ff8416836131a5565b600061012082019050871515825286602083015285604083015284606083015283608083015261278d60a0830184612af3565b60006020828403121561329a57600080fd5b5051919050565b6000825160005b818110156132c257602081860181015185830152016132a8565b506000920191825250919050565b60208101610d488284612cd3565b6000602082840312156132f057600080fd5b815161291d81612924565b60008261330a5761330a61306d565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204bcdc26480adc94ceb9c089d1af202275da9840934fdb8dead13e3defee11c1164736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106101e95760003560e01c8063564a565d11610113578063d98493f6116100ab578063e6d49cdf1161006f578063e6d49cdf14610727578063f6506db414610767578063f7434ea914610787578063fbf405b0146107a7578063fc6f8f16146107c757600080fd5b8063d98493f614610665578063d9ee095f14610685578063db8a173b14610698578063e2373ab3146106ad578063e4c0aaf41461070757600080fd5b8063564a565d146105175780636736b70c14610547578063751accd0146105675780637934c0be1461058757806382d02237146105a757806386541b24146105c75780638a9bb02a146105e7578063c13517e114610632578063c71f42531461064557600080fd5b80632177470c116101865780632177470c146103ec578063379f0a171461040c5780633cfd118414610442578063405d51ae1461046f57806343818d661461048f57806347cdcc1d146104af5780634f1ef286146104cf57806352d1902d146104e25780635601eaea146104f757600080fd5b8062f5822c146101ee57806301fcf74d146102105780630219da791461024357806305d3177d146102b65780630c340a24146102d65780630e3993a41461030e5780631860592b1461032e5780631c3db16d1461034e5780631f5a0dd21461038b575b600080fd5b3480156101fa57600080fd5b5061020e610209366004612900565b6107e7565b005b34801561021c57600080fd5b5061023061022b366004612932565b610834565b6040519081526020015b60405180910390f35b34801561024f57600080fd5b5061028e61025e366004612900565b60046020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff169082015260600161023a565b3480156102c257600080fd5b5061020e6102d13660046129e5565b610990565b3480156102e257600080fd5b506000546102f6906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b34801561031a57600080fd5b5061020e610329366004612900565b610be9565b34801561033a57600080fd5b50610230610349366004612a2d565b610cf4565b34801561035a57600080fd5b5061036e610369366004612a59565b610d4e565b60408051938452911515602084015215159082015260600161023a565b34801561039757600080fd5b506103ab6103a6366004612a59565b610d78565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161023a565b3480156103f857600080fd5b5061020e610407366004612a72565b610dd7565b34801561041857600080fd5b506102f6610427366004612900565b6005602052600090815260409020546001600160a01b031681565b34801561044e57600080fd5b5061046261045d366004612ad8565b610f9f565b60405161023a9190612b16565b34801561047b57600080fd5b5061020e61048a366004612b24565b611009565b34801561049b57600080fd5b5061020e6104aa366004612900565b6111c9565b3480156104bb57600080fd5b5061020e6104ca366004612b92565b61128e565b61020e6104dd366004612c4c565b611321565b3480156104ee57600080fd5b5061023061154e565b34801561050357600080fd5b5061020e610512366004612c9b565b6115ac565b34801561052357600080fd5b50610537610532366004612a59565b61171e565b60405161023a9493929190612ce7565b34801561055357600080fd5b5061020e610562366004612d24565b611773565b34801561057357600080fd5b5061020e610582366004612d5c565b611884565b34801561059357600080fd5b5061020e6105a2366004612db4565b61192e565b3480156105b357600080fd5b5061020e6105c2366004612de2565b6119ad565b3480156105d357600080fd5b5061020e6105e2366004612b24565b611a6a565b3480156105f357600080fd5b50610607610602366004612c9b565b611b5e565b604080518251815260208084015190820152918101516001600160a01b03169082015260600161023a565b610230610640366004612e3f565b611c0b565b34801561065157600080fd5b50610230610660366004612a59565b611c43565b34801561067157600080fd5b50610230610680366004612eb7565b611ced565b61020e610693366004612f02565b611d32565b3480156106a457600080fd5b50600354610230565b3480156106b957600080fd5b506106f76106c8366004612900565b60066020526000908152604090208054600182015460029092015460ff91821692918181169161010090041684565b60405161023a9493929190612f69565b34801561071357600080fd5b5061020e610722366004612900565b611f7f565b34801561073357600080fd5b5061036e610742366004612a59565b6007602052600090815260409020805460019091015460ff8082169161010090041683565b34801561077357600080fd5b50610230610782366004612f94565b611fcc565b34801561079357600080fd5b506102306107a2366004612ffa565b6120b0565b3480156107b357600080fd5b506001546102f6906001600160a01b031681565b3480156107d357600080fd5b506102306107e2366004612a59565b6120fc565b6000546001600160a01b031633146108125760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000806003848154811061084a5761084a61302e565b60009182526020822060026003909202019081018054919350906108709060019061305a565b815481106108805761088061302e565b6000918252602082208454600280546003909402909201945090916001600160601b039091169081106108b5576108b561302e565b90600052602060002090600b020190506000816004015483600001546108db9190613083565b9050851561095e5783546001600160601b031660001901610905576001600160ff1b039450610986565b610910816002613097565b61091b9060016130ae565b82546002805490916001600160601b031690811061093b5761093b61302e565b90600052602060002090600b0201600401546109579190613097565b9450610986565b610969816002613097565b6109749060016130ae565b82600401546109839190613097565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806109d9575080546001600160401b03808416911610155b156109f65760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610aaf578160200160208202803683370190505b508051610ac691600184019160209091019061280d565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184526000808252948101859052928301849052820192909252610b2c91600684019190612858565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610b9295600160601b90930460ff1694919390929060068b01906130c1565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b0381811660009081526005602052604090205416610c31576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b03818116600090815260056020526040902054163314610c6b576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610ce8919061311d565b60405180910390a25050565b6001600160a01b03821660009081526004602052604081205461010081046001600160401b031690610d3190600160481b900460ff16600a613246565b610d3b9084613097565b610d459190613083565b90505b92915050565b6000818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610d8857600080fd5b60009182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600060038581548110610dec57610dec61302e565b906000526020600020906003020190508060010160019054906101000a900460ff1615610e2c5760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b03908116600090815260056020526040902054163314801590610e5f5750333014155b15610e7d576040516301627e2760e61b815260040160405180910390fd5b60408051606081018252858152841515602080830191825285151583850190815260008a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015610f3757600080fd5b505af1158015610f4b573d6000803e3d6000fd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b610fa761288b565b6002826001600160601b031681548110610fc357610fc361302e565b6000918252602090912060408051608081019182905292600b029091016006019060049082845b815481526020019060010190808311610fea5750505050509050919050565b6000546001600160a01b031633146110345760405163c383977560e01b815260040160405180910390fd5b6001600160601b03871661105b57604051631ef4f64960e01b815260040160405180910390fd5b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b1617815590916040519080825280602002602001820160405280156110d4578160200160208202803683370190505b5080516110eb91600184019160209091019061280d565b50805460ff60601b1916600160601b89151502178155600281018790556003810186905560048082018690556005820185905561112e90600683019085906128a9565b506002896001600160601b03168154811061114b5761114b61302e565b600091825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761906111b6908c908c908c908c908c908c90613255565b60405180910390a3505050505050505050565b6001600160a01b0381811660009081526005602052604090205416611211576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b0381811660009081526005602052604090205416331461124b576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610caa565b6001600160a01b038281166000908152600560205260409020541633146112c8576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0382811660008181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b61132a8261212b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113a857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661139c6000805160206133108339815191525490565b6001600160a01b031614155b156113c65760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611420575060408051601f3d908101601f1916820190925261141d91810190613288565b60015b61144d57604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020613310833981519152811461147e57604051632a87526960e21b815260048101829052602401611444565b6000805160206133108339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611549576000836001600160a01b0316836040516114e591906132a1565b600060405180830381855af49150503d8060008114611520576040519150601f19603f3d011682016040523d82523d6000602084013e611525565b606091505b5050905080611547576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115995760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061331083398151915290565b6000600383815481106115c1576115c161302e565b60009182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806116165760405163f4612fe560e01b815260040160405180910390fd5b600082600201848154811061162d5761162d61302e565b906000526020600020906003020190506000816000015490508082600101600082825461165a91906130ae565b909155505060028201546001600160a01b031661169c576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050506116b7565b60028201546116b5906001600160a01b03168483612159565b505b60028201546040805160018152600060208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b6003818154811061172e57600080fd5b6000918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b03848116600090815260056020526040902054166117bb576001600160a01b038416600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b038481166000908152600560205260409020541633146117f5576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b03841660008181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f49061187590849061311d565b60405180910390a25050505050565b6000546001600160a01b031633146118af5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b031683836040516118ca91906132a1565b60006040518083038185875af1925050503d8060008114611907576040519150601f19603f3d011682016040523d82523d6000602084013e61190c565b606091505b5050905080611547576040516322092f2f60e11b815260040160405180910390fd5b6000546001600160a01b031633146119595760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b031633146119d85760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611a955760405163c383977560e01b815260040160405180910390fd5b60006002886001600160601b031681548110611ab357611ab361302e565b60009182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611b0890600683019084906128a9565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611b4c96959493929190613255565b60405180910390a25050505050505050565b611b8b6040518060600160405280600081526020016000815260200160006001600160a01b031681525090565b60038381548110611b9e57611b9e61302e565b90600052602060002090600302016002018281548110611bc057611bc061302e565b6000918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b6000611c16826120b0565b341015611c3657604051630e3360f160e21b815260040160405180910390fd5b610d458383600034612222565b60008060038381548110611c5957611c5961302e565b600091825260208220600390910201805460028054929450916001600160601b03909116908110611c8c57611c8c61302e565b90600052602060002090600b0201905080600401548260020160018460020180549050611cb9919061305a565b81548110611cc957611cc961302e565b906000526020600020906003020160000154611ce59190613083565b949350505050565b6000611ce58261034986868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120b092505050565b611d3c8482610834565b341015611d5c57604051633191f8f160e01b815260040160405180910390fd5b600060038581548110611d7157611d7161302e565b6000918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611dc7576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611de257611de2612cbd565b14611e00576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215611eb2576002816001600160601b031681548110611e2d57611e2d61302e565b60009182526020909120600b909102015482546001600160601b039182169250168114611eb257815460028301546001600160601b0390911690611e739060019061305a565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff191690556002830180549182018155600090815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051611f6491906132d0565b60405180910390a2611f768787612317565b50505050505050565b6000546001600160a01b03163314611faa5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526004602052604081205460ff166120055760405163e51cf7bf60e01b815260040160405180910390fd5b612010858585611ced565b82101561203057604051630e3360f160e21b815260040160405180910390fd5b6120456001600160a01b0384163330856126bc565b612062576040516312171d8360e31b815260040160405180910390fd5b6120a68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506122229050565b9695505050505050565b60008060006120be84612798565b5091509150806002836001600160601b0316815481106120e0576120e061302e565b90600052602060002090600b020160040154611ce59190613097565b6000600382815481106121115761211161302e565b600091825260209091206002600390920201015492915050565b6000546001600160a01b031633146121565760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516121b691906132a1565b6000604051808303816000865af19150503d80600081146121f3576040519150601f19603f3d011682016040523d82523d6000602084013e6121f8565b606091505b50915091508180156120a65750805115806120a65750808060200190518101906120a691906132de565b60008061222e85612798565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d018054928301815560009081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a16179055909450919250906122df8489612317565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a3505050949350505050565b60006003838154811061232c5761232c61302e565b90600052602060002090600302019050600060018260020180549050612352919061305a565b8254600160601b90046001600160a01b03166000908152600660205260408120919250815460ff16600381111561238b5761238b612cbd565b036123a95760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff1660038111156123c1576123c1612cbd565b146126b5576003815460ff1660038111156123de576123de612cbd565b0361252d578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c90608401600060405180830381600087803b1580156124b857600080fd5b505af11580156124cc573d6000803e3d6000fd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea9150604401600060405180830381600087803b15801561251057600080fd5b505af1158015612524573d6000803e3d6000fd5b505050506126b5565b6002815460ff16600381111561254557612545612cbd565b036126b55760008461255860014361305a565b6040805191406020830152016040516020818303038152906040528051906020012060001c61258791906132fb565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c90608401600060405180830381600087803b15801561264157600080fd5b505af1158015612655573d6000803e3d6000fd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea9150604401600060405180830381600087803b15801561269957600080fd5b505af11580156126ad573d6000803e3d6000fd5b505050505050505b5050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161272191906132a1565b6000604051808303816000865af19150503d806000811461275e576040519150601f19603f3d011682016040523d82523d6000602084013e612763565b606091505b509150915081801561278d57508051158061278d57508080602001905181019061278d91906132de565b979650505050505050565b600080600060408451106127fe575050506020810151604082015160608301516001600160601b03831615806127d957506002546001600160601b03841610155b156127e357600192505b816000036127f057600391505b806127f9575060015b610d71565b50600193600393508492509050565b828054828255906000526020600020908101928215612848579160200282015b8281111561284857825182559160200191906001019061282d565b506128549291506128d6565b5090565b8260048101928215612848579160200282015b82811115612848578251829060ff1690559160200191906001019061286b565b60405180608001604052806004906020820280368337509192915050565b8260048101928215612848579160200282018281111561284857825182559160200191906001019061282d565b5b8082111561285457600081556001016128d7565b6001600160a01b038116811461215657600080fd5b60006020828403121561291257600080fd5b813561291d816128eb565b9392505050565b801515811461215657600080fd5b6000806040838503121561294557600080fd5b82359150602083013561295781612924565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298957600080fd5b604051608081018181106001600160401b03821117156129ab576129ab612962565b6040528060808401858111156129c057600080fd5b845b818110156129da5780358352602092830192016129c2565b509195945050505050565b600080600060c084860312156129fa57600080fd5b8335612a05816128eb565b92506020840135612a15816128eb565b9150612a248560408601612978565b90509250925092565b60008060408385031215612a4057600080fd5b8235612a4b816128eb565b946020939093013593505050565b600060208284031215612a6b57600080fd5b5035919050565b60008060008060808587031215612a8857600080fd5b84359350602085013592506040850135612aa181612924565b91506060850135612ab181612924565b939692955090935050565b80356001600160601b0381168114612ad357600080fd5b919050565b600060208284031215612aea57600080fd5b610d4582612abc565b8060005b6004811015611547578151845260209384019390910190600101612af7565b60808101610d488284612af3565b6000806000806000806000610140888a031215612b4057600080fd5b612b4988612abc565b96506020880135612b5981612924565b955060408801359450606088013593506080880135925060a08801359150612b848960c08a01612978565b905092959891949750929550565b60008060408385031215612ba557600080fd5b8235612bb0816128eb565b91506020830135612957816128eb565b600082601f830112612bd157600080fd5b81356001600160401b0380821115612beb57612beb612962565b604051601f8301601f19908116603f01168101908282118183101715612c1357612c13612962565b81604052838152866020858801011115612c2c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612c5f57600080fd5b8235612c6a816128eb565b915060208301356001600160401b03811115612c8557600080fd5b612c9185828601612bc0565b9150509250929050565b60008060408385031215612cae57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60058110612ce357612ce3612cbd565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612d136040830185612cd3565b821515606083015295945050505050565b60008060008060808587031215612d3a57600080fd5b8435612d45816128eb565b9350602085013592506040850135612aa181612924565b600080600060608486031215612d7157600080fd5b8335612d7c816128eb565b92506020840135915060408401356001600160401b03811115612d9e57600080fd5b612daa86828701612bc0565b9150509250925092565b60008060408385031215612dc757600080fd5b8235612dd2816128eb565b9150602083013561295781612924565b600080600060608486031215612df757600080fd5b8335612e02816128eb565b925060208401356001600160401b0381168114612e1e57600080fd5b9150604084013560ff81168114612e3457600080fd5b809150509250925092565b60008060408385031215612e5257600080fd5b8235915060208301356001600160401b03811115612c8557600080fd5b60008083601f840112612e8157600080fd5b5081356001600160401b03811115612e9857600080fd5b602083019150836020828501011115612eb057600080fd5b9250929050565b600080600060408486031215612ecc57600080fd5b83356001600160401b03811115612ee257600080fd5b612eee86828701612e6f565b9094509250506020840135612e34816128eb565b60008060008060808587031215612f1857600080fd5b843593506020850135925060408501356001600160401b03811115612f3c57600080fd5b612f4887828801612bc0565b9250506060850135612ab181612924565b60048110612ce357612ce3612cbd565b60808101612f778287612f59565b602082019490945291151560408301521515606090910152919050565b600080600080600060808688031215612fac57600080fd5b8535945060208601356001600160401b03811115612fc957600080fd5b612fd588828901612e6f565b9095509350506040860135612fe9816128eb565b949793965091946060013592915050565b60006020828403121561300c57600080fd5b81356001600160401b0381111561302257600080fd5b611ce584828501612bc0565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610d4857610d48613044565b634e487b7160e01b600052601260045260246000fd5b6000826130925761309261306d565b500490565b8082028115828204841417610d4857610d48613044565b80820180821115610d4857610d48613044565b6000610120820190508715158252602087602084015286604084015285606084015284608084015260a083018460005b600481101561310e578154835291830191600191820191016130f1565b50505050979650505050505050565b60006080820190506131338260ff855416612f59565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b600181815b8085111561319d57816000190482111561318357613183613044565b8085161561319057918102915b93841c9390800290613167565b509250929050565b6000826131b457506001610d48565b816131c157506000610d48565b81600181146131d757600281146131e1576131fd565b6001915050610d48565b60ff8411156131f2576131f2613044565b50506001821b610d48565b5060208310610133831016604e8410600b8410161715613220575081810a610d48565b61322a8383613162565b806000190482111561323e5761323e613044565b029392505050565b6000610d4560ff8416836131a5565b600061012082019050871515825286602083015285604083015284606083015283608083015261278d60a0830184612af3565b60006020828403121561329a57600080fd5b5051919050565b6000825160005b818110156132c257602081860181015185830152016132a8565b506000920191825250919050565b60208101610d488284612cd3565b6000602082840312156132f057600080fd5b815161291d81612924565b60008261330a5761330a61306d565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204bcdc26480adc94ceb9c089d1af202275da9840934fdb8dead13e3defee11c1164736f6c63430008180033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "AcceptedFeeToken(address,bool)": { - "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", - "params": { - "_accepted": "Whether the token is accepted or not.", - "_token": "The ERC20 token." - } - }, - "DisputeCreation(uint256,address)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_arbitrable": "The contract which created the dispute.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "NewCurrencyRate(address,uint64,uint8)": { - "details": "To be emitted when the fee for a particular ERC20 token is updated.", - "params": { - "_feeToken": "The ERC20 token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrable": "The arbitrable receiving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - }, - "Upgraded(address)": { - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "appeal(uint256,uint256,bytes,bool)": { - "details": "Appeals the ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute.", - "_jump": "Whether to jump to the parent court or not." - } - }, - "appealCost(uint256,bool)": { - "details": "Gets the cost of appealing a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute.", - "_jump": "Whether to jump to the parent court or not." - }, - "returns": { - "cost": "The appeal cost." - } - }, - "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." - }, - "returns": { - "cost": "The arbitration cost in ETH." - } - }, - "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeToken": "The ERC20 token used to pay fees." - }, - "returns": { - "cost": "The arbitration cost in `_feeToken`." - } - }, - "changeAcceptedFeeTokens(address,bool)": { - "details": "Changes the supported fee tokens.", - "params": { - "_accepted": "Whether the token is supported or not as a method of fee payment.", - "_feeToken": "The fee token." - } - }, - "changeCurrencyRates(address,uint64,uint8)": { - "details": "Changes the currency rate of a fee token.", - "params": { - "_feeToken": "The fee token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "changePinakion(address)": { - "details": "Changes the `pinakion` storage variable.", - "params": { - "_pinakion": "The new value for the `pinakion` storage variable." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." - }, - "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])": { - "details": "Creates a court under a specified parent court.", - "params": { - "_alpha": "The `alpha` property value of the court.", - "_feeForJuror": "The `feeForJuror` property value of the court.", - "_hiddenVotes": "The `hiddenVotes` property value of the court.", - "_jurorsForCourtJump": "The `jurorsForCourtJump` property value of the court.", - "_minStake": "The `minStake` property value of the court.", - "_parent": "The `parent` property value of the court.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the court." - } - }, - "createDispute(uint256,bytes)": { - "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "createDispute(uint256,bytes,address,uint256)": { - "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeAmount": "Amount of the ERC20 token used to pay fees.", - "_feeToken": "The ERC20 token used to pay fees.", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "execute(uint256,uint256)": { - "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.", - "params": { - "_disputeID": "The ID of the dispute.", - "_round": "The appeal round." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "executeRuling(uint256,uint256,bool,bool)": { - "details": "Executes a specified dispute's ruling.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getNumberOfVotes(uint256)": { - "details": "Gets the number of votes permitted for the specified dispute in the latest round.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "initialize(address,address,uint256[4])": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", - "_governor": "The governor's address.", - "_pinakion": "The address of the token contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "title": "KlerosCoreRuler Core arbitrator contract for development and testing purposes.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ], - "InvalidImplementation(address)": [ - { - "notice": "The `implementation` is not UUPS-compliant" - } - ] - }, - "events": { - "Upgraded(address)": { - "notice": "Emitted when the `implementation` has been successfully upgraded." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 16346, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 16349, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "pinakion", - "offset": 0, - "slot": "1", - "type": "t_contract(IERC20)1755" - }, - { - "astId": 16353, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "courts", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Court)16297_storage)dyn_storage" - }, - { - "astId": 16357, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(Dispute)16312_storage)dyn_storage" - }, - { - "astId": 16363, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "currencyRates", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_contract(IERC20)1755,t_struct(CurrencyRate)16327_storage)" - }, - { - "astId": 16368, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rulers", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_contract(IArbitrableV2)21759,t_address)" - }, - { - "astId": 16374, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "settings", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_contract(IArbitrableV2)21759,t_struct(RulerSettings)16275_storage)" - }, - { - "astId": 16379, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rulingResults", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_struct(RulingResult)16334_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Court)16297_storage)dyn_storage": { - "base": "t_struct(Court)16297_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreRuler.Court[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Dispute)16312_storage)dyn_storage": { - "base": "t_struct(Dispute)16312_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreRuler.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)16320_storage)dyn_storage": { - "base": "t_struct(Round)16320_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreRuler.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)4_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[4]", - "numberOfBytes": "128" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IArbitrableV2)21759": { - "encoding": "inplace", - "label": "contract IArbitrableV2", - "numberOfBytes": "20" - }, - "t_contract(IERC20)1755": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_enum(Period)16265": { - "encoding": "inplace", - "label": "enum KlerosCoreRuler.Period", - "numberOfBytes": "1" - }, - "t_enum(RulingMode)16259": { - "encoding": "inplace", - "label": "enum KlerosCoreRuler.RulingMode", - "numberOfBytes": "1" - }, - "t_mapping(t_contract(IArbitrableV2)21759,t_address)": { - "encoding": "mapping", - "key": "t_contract(IArbitrableV2)21759", - "label": "mapping(contract IArbitrableV2 => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_mapping(t_contract(IArbitrableV2)21759,t_struct(RulerSettings)16275_storage)": { - "encoding": "mapping", - "key": "t_contract(IArbitrableV2)21759", - "label": "mapping(contract IArbitrableV2 => struct KlerosCoreRuler.RulerSettings)", - "numberOfBytes": "32", - "value": "t_struct(RulerSettings)16275_storage" - }, - "t_mapping(t_contract(IERC20)1755,t_struct(CurrencyRate)16327_storage)": { - "encoding": "mapping", - "key": "t_contract(IERC20)1755", - "label": "mapping(contract IERC20 => struct KlerosCoreRuler.CurrencyRate)", - "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)16327_storage" - }, - "t_mapping(t_uint256,t_struct(RulingResult)16334_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct KlerosCoreRuler.RulingResult)", - "numberOfBytes": "32", - "value": "t_struct(RulingResult)16334_storage" - }, - "t_struct(Court)16297_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.Court", - "members": [ - { - "astId": 16277, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "parent", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 16279, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "hiddenVotes", - "offset": 12, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 16282, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "children", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 16284, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "minStake", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 16286, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "alpha", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 16288, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "feeForJuror", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 16290, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "jurorsForCourtJump", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 16294, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "timesPerPeriod", - "offset": 0, - "slot": "6", - "type": "t_array(t_uint256)4_storage" - }, - { - "astId": 16296, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "disabled", - "offset": 0, - "slot": "10", - "type": "t_bool" - } - ], - "numberOfBytes": "352" - }, - "t_struct(CurrencyRate)16327_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.CurrencyRate", - "members": [ - { - "astId": 16322, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "feePaymentAccepted", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 16324, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rateInEth", - "offset": 1, - "slot": "0", - "type": "t_uint64" - }, - { - "astId": 16326, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rateDecimals", - "offset": 9, - "slot": "0", - "type": "t_uint8" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Dispute)16312_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.Dispute", - "members": [ - { - "astId": 16299, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "courtID", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 16302, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "arbitrated", - "offset": 12, - "slot": "0", - "type": "t_contract(IArbitrableV2)21759" - }, - { - "astId": 16305, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "period", - "offset": 0, - "slot": "1", - "type": "t_enum(Period)16265" - }, - { - "astId": 16307, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "ruled", - "offset": 1, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 16311, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rounds", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Round)16320_storage)dyn_storage" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Round)16320_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.Round", - "members": [ - { - "astId": 16314, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "totalFeesForJurors", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 16316, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "sumFeeRewardPaid", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 16319, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "feeToken", - "offset": 0, - "slot": "2", - "type": "t_contract(IERC20)1755" - } - ], - "numberOfBytes": "96" - }, - "t_struct(RulerSettings)16275_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.RulerSettings", - "members": [ - { - "astId": 16268, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rulingMode", - "offset": 0, - "slot": "0", - "type": "t_enum(RulingMode)16259" - }, - { - "astId": 16270, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "presetRuling", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 16272, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "presetTied", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 16274, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "presetOverridden", - "offset": 1, - "slot": "2", - "type": "t_bool" - } - ], - "numberOfBytes": "96" - }, - "t_struct(RulingResult)16334_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.RulingResult", - "members": [ - { - "astId": 16329, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "ruling", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 16331, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "tied", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 16333, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "overridden", - "offset": 1, - "slot": "1", - "type": "t_bool" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint64": { - "encoding": "inplace", - "label": "uint64", - "numberOfBytes": "8" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrum/KlerosCoreRuler_Proxy.json b/contracts/deployments/arbitrum/KlerosCoreRuler_Proxy.json deleted file mode 100644 index 89a258aaa..000000000 --- a/contracts/deployments/arbitrum/KlerosCoreRuler_Proxy.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - "transactionIndex": 2, - "gasUsed": "314451", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000100004000000000000000000000000000060008000000000000000000000000220000000000000000000800000080000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d", - "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 286701284, - "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", - "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - "topics": [ - "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 0, - "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d" - }, - { - "transactionIndex": 2, - "blockNumber": 286701284, - "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", - "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d" - } - ], - "blockNumber": 286701284, - "cumulativeGasUsed": "348983", - "status": 1, - "byzantium": true - }, - "args": [ - "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", - "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" - ], - "numDeployments": 1, - "solcInputHash": "072c3d36aa3704de09a27a044cf00231", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreRulerProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212205e24db8a42d0caaa77ce845dfb341502dc3b700c5ccf0c51c4cf914535a4a64564736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212205e24db8a42d0caaa77ce845dfb341502dc3b700c5ccf0c51c4cf914535a4a64564736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/KlerosCoreSnapshotProxy.json b/contracts/deployments/arbitrum/KlerosCoreSnapshotProxy.json deleted file mode 100644 index 69426d3f2..000000000 --- a/contracts/deployments/arbitrum/KlerosCoreSnapshotProxy.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "address": "0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IKlerosCore", - "name": "_core", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IKlerosCore", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract IKlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "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" - } - ], - "transactionHash": "0x9519002826064774768f0756c58d55c3f908265e0437de0cb6794f193df7bab4", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95", - "transactionIndex": 2, - "gasUsed": "381513", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x377819384e975cdff6f1207252d20ff63dae97c6e6f5e30a0ef4c0690e05362e", - "transactionHash": "0x9519002826064774768f0756c58d55c3f908265e0437de0cb6794f193df7bab4", - "logs": [], - "blockNumber": 303002159, - "cumulativeGasUsed": "1057838", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x991d2df165670b9cac3B022f4B68D65b664222ea" - ], - "numDeployments": 1, - "solcInputHash": "ede3f7f4426109631936df3b8acee8f2", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"balanceOf(address)\":{\"details\":\"Returns the amount of PNK staked in KlerosV2 for a particular address. Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\",\"params\":{\"_account\":\"The address to query.\"},\"returns\":{\"totalStaked\":\"Total amount staked in V2 by the address.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_core\":\"KlerosCore to read the balance from.\",\"_governor\":\"The governor of the contract.\"}}},\"title\":\"KlerosCoreSnapshotProxy Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":\"KlerosCoreSnapshotProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface IKlerosCore {\\n function sortitionModule() external view returns (ISortitionModule);\\n}\\n\\n/// @title KlerosCoreSnapshotProxy\\n/// Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\\ncontract KlerosCoreSnapshotProxy {\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n IKlerosCore public core;\\n address public governor;\\n string public constant name = \\\"Staked Pinakion\\\";\\n string public constant symbol = \\\"stPNK\\\";\\n uint8 public constant decimals = 18;\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _governor The governor of the contract.\\n /// @param _core KlerosCore to read the balance from.\\n constructor(address _governor, IKlerosCore _core) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(IKlerosCore _core) external onlyByGovernor {\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Returns the amount of PNK staked in KlerosV2 for a particular address.\\n /// Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\\n /// @param _account The address to query.\\n /// @return totalStaked Total amount staked in V2 by the address.\\n function balanceOf(address _account) external view returns (uint256 totalStaked) {\\n (totalStaked, , , ) = core.sortitionModule().getJurorBalance(_account, 0);\\n }\\n}\\n\",\"keccak256\":\"0xf9516838d21bc8b4d8776d8d8b0b17d46ebb3d0940c055c09944f7f35adfd99d\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161053338038061053383398101604081905261002f91610078565b600180546001600160a01b039384166001600160a01b031991821617909155600080549290931691161790556100b2565b6001600160a01b038116811461007557600080fd5b50565b6000806040838503121561008b57600080fd5b825161009681610060565b60208401519092506100a781610060565b809150509250929050565b610472806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610383565b610186565b6040519081526020016100b8565b61013a610135366004610383565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610383565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a7565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c4565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103fa565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103fa565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006020808352835180602085015260005b8181101561034a5785810183015185820160400152820161032e565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461038057600080fd5b50565b60006020828403121561039557600080fd5b81356103a08161036b565b9392505050565b6000602082840312156103b957600080fd5b81516103a08161036b565b600080600080608085870312156103da57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea2646970667358221220ae7b8da51562210a09a90e77fc37c7a9669fa0ff5f919ec51b43ac365aace78464736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610383565b610186565b6040519081526020016100b8565b61013a610135366004610383565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610383565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a7565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c4565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103fa565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103fa565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006020808352835180602085015260005b8181101561034a5785810183015185820160400152820161032e565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461038057600080fd5b50565b60006020828403121561039557600080fd5b81356103a08161036b565b9392505050565b6000602082840312156103b957600080fd5b81516103a08161036b565b600080600080608085870312156103da57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea2646970667358221220ae7b8da51562210a09a90e77fc37c7a9669fa0ff5f919ec51b43ac365aace78464736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": { - "balanceOf(address)": { - "details": "Returns the amount of PNK staked in KlerosV2 for a particular address. Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.", - "params": { - "_account": "The address to query." - }, - "returns": { - "totalStaked": "Total amount staked in V2 by the address." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_core": "KlerosCore to read the balance from.", - "_governor": "The governor of the contract." - } - } - }, - "title": "KlerosCoreSnapshotProxy Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 216, - "contract": "src/arbitration/view/KlerosCoreSnapshotProxy.sol:KlerosCoreSnapshotProxy", - "label": "core", - "offset": 0, - "slot": "0", - "type": "t_contract(IKlerosCore)212" - }, - { - "astId": 218, - "contract": "src/arbitration/view/KlerosCoreSnapshotProxy.sol:KlerosCoreSnapshotProxy", - "label": "governor", - "offset": 0, - "slot": "1", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_contract(IKlerosCore)212": { - "encoding": "inplace", - "label": "contract IKlerosCore", - "numberOfBytes": "20" - } - } - } -} diff --git a/contracts/deployments/arbitrum/KlerosCore_Implementation.json b/contracts/deployments/arbitrum/KlerosCore_Implementation.json deleted file mode 100644 index 46bc67163..000000000 --- a/contracts/deployments/arbitrum/KlerosCore_Implementation.json +++ /dev/null @@ -1,2979 +0,0 @@ -{ - "address": "0xC1210493804eEF123096F9581Ee82B915150E54c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "AppealPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrableNotWhitelisted", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "CannotDisableClassicDK", - "type": "error" - }, - { - "inputs": [], - "name": "CommitPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitNotSupportedByCourt", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitOnly", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "DisputePeriodIsFinal", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeStillDrawing", - "type": "error" - }, - { - "inputs": [], - "name": "EvidenceNotPassedAndNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GuardianOrGovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDisputKitParent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "MinStakeLowerThanParentCourt", - "type": "error" - }, - { - "inputs": [], - "name": "MustSupportDisputeKitClassic", - "type": "error" - }, - { - "inputs": [], - "name": "NotEligibleForStaking", - "type": "error" - }, - { - "inputs": [], - "name": "NotEvidencePeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotExecutionPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "SortitionModuleOnly", - "type": "error" - }, - { - "inputs": [], - "name": "StakingInTooManyCourts", - "type": "error" - }, - { - "inputs": [], - "name": "StakingLessThanCourtMinStake", - "type": "error" - }, - { - "inputs": [], - "name": "StakingMoreThanMaxStakePerJuror", - "type": "error" - }, - { - "inputs": [], - "name": "StakingMoreThanMaxTotalStaked", - "type": "error" - }, - { - "inputs": [], - "name": "StakingNotPossibleInThisCourt", - "type": "error" - }, - { - "inputs": [], - "name": "StakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "StakingZeroWhenNoStake", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnstakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "inputs": [], - "name": "UnsupportedDisputeKit", - "type": "error" - }, - { - "inputs": [], - "name": "VotePeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "WhenNotPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WhenPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WrongDisputeKitIndex", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "DisputeKitCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "DisputeKitEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_fromDisputeKitID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toDisputeKitID", - "type": "uint256" - } - ], - "name": "DisputeKitJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreBase.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "addNewDisputeKit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "arbitrableWhitelist", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "bool", - "name": "_allowed", - "type": "bool" - } - ], - "name": "changeArbitrableWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_guardian", - "type": "address" - } - ], - "name": "changeGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC721", - "name": "_jurorNft", - "type": "address" - } - ], - "name": "changeJurorNft", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - } - ], - "name": "changeJurorProsecutionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeKits", - "outputs": [ - { - "internalType": "contract IDisputeKit", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreBase.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "uint256", - "name": "nbDrawnJurors", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256[]", - "name": "_disputeKitIDs", - "type": "uint256[]" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "enableDisputeKits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getDisputeKitsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getPnkAtStakePerJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "disputeKitID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkAtStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "repartitions", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkPenalties", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "drawnJurors", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumPnkRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "drawIterations", - "type": "uint256" - } - ], - "internalType": "struct KlerosCoreBase.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_guardian", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "_disputeKit", - "type": "address" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModuleAddress", - "type": "address" - }, - { - "internalType": "contract IERC721", - "name": "_jurorNft", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "isDisputeKitJumping", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - } - ], - "name": "isSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorNft", - "outputs": [ - { - "internalType": "contract IERC721", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorProsecutionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "passPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStakeBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "contract ISortitionModule", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xd9c5f763c1dcbbf614793dc5ebef833d080e5ef31171e8cbdbda56e787982c28", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xC1210493804eEF123096F9581Ee82B915150E54c", - "transactionIndex": 3, - "gasUsed": "5475085", - "logsBloom": "0x00000000000000000800000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000001000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2903f253c5a923b6e7dd48d732b4ef152501bf05e1632869d3bf4b16ee0662e0", - "transactionHash": "0xd9c5f763c1dcbbf614793dc5ebef833d080e5ef31171e8cbdbda56e787982c28", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 364034123, - "transactionHash": "0xd9c5f763c1dcbbf614793dc5ebef833d080e5ef31171e8cbdbda56e787982c28", - "address": "0xC1210493804eEF123096F9581Ee82B915150E54c", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 1, - "blockHash": "0x2903f253c5a923b6e7dd48d732b4ef152501bf05e1632869d3bf4b16ee0662e0" - } - ], - "blockNumber": 364034123, - "cumulativeGasUsed": "5530512", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 3, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrableNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotDisableClassicDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitNotSupportedByCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputePeriodIsFinal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeStillDrawing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EvidenceNotPassedAndNotAppeal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GuardianOrGovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEligibleForStaking\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingInTooManyCourts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingLessThanCourtMinStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingMoreThanMaxStakePerJuror\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingMoreThanMaxTotalStaked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingNotPossibleInThisCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingZeroWhenNoStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnstakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedDisputeKit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotePeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenNotPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"arbitrableWhitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"changeArbitrableWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"}],\"name\":\"changeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"_jurorNft\",\"type\":\"address\"}],\"name\":\"changeJurorNft\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nbDrawnJurors\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getPnkAtStakePerJuror\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreBase.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"},{\"internalType\":\"contract IERC721\",\"name\":\"_jurorNft\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorNft\",\"outputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeArbitrableWhitelist(address,bool)\":{\"details\":\"Adds or removes an arbitrable from whitelist.\",\"params\":{\"_allowed\":\"Whether add or remove permission.\",\"_arbitrable\":\"Arbitrable address.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeGuardian(address)\":{\"details\":\"Changes the `guardian` storage variable.\",\"params\":{\"_guardian\":\"The new value for the `guardian` storage variable.\"}},\"changeJurorNft(address)\":{\"details\":\"Changes the `jurorNft` storage variable.\",\"params\":{\"_jurorNft\":\"The new value for the `jurorNft` storage variable.\"}},\"changeJurorProsecutionModule(address)\":{\"details\":\"Changes the `jurorProsecutionModule` storage variable.\",\"params\":{\"_jurorProsecutionModule\":\"The new value for the `jurorProsecutionModule` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"changeSortitionModule(address)\":{\"details\":\"Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.\",\"params\":{\"_sortitionModule\":\"The new value for the `sortitionModule` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],bytes,uint256[])\":{\"details\":\"Creates a court under a specified parent court.\",\"params\":{\"_alpha\":\"The `alpha` property value of the court.\",\"_feeForJuror\":\"The `feeForJuror` property value of the court.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the court.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the court.\",\"_minStake\":\"The `minStake` property value of the court.\",\"_parent\":\"The `parent` property value of the court.\",\"_sortitionExtraData\":\"Extra data for sortition module.\",\"_supportedDisputeKits\":\"Indexes of dispute kits that this court will support.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the court.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws jurors for the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\"},\"returns\":{\"nbDrawnJurors\":\"The total number of jurors drawn in the round.\"}},\"enableDisputeKits(uint96,uint256[],bool)\":{\"details\":\"Adds/removes court's support for specified dispute kits.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_disputeKitIDs\":\"The IDs of dispute kits which support should be added/removed.\",\"_enable\":\"Whether add or remove the dispute kits from the court.\"}},\"execute(uint256,uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts. Note: Reward distributions are forbidden during pause.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\",\"_round\":\"The appeal round.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"executeRuling(uint256)\":{\"details\":\"Executes a specified dispute's ruling.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Gets the number of rounds for a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"The number of rounds.\"}},\"getNumberOfVotes(uint256)\":{\"details\":\"Gets the number of votes permitted for the specified dispute in the latest round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getPnkAtStakePerJuror(uint256,uint256)\":{\"details\":\"Gets the PNK at stake per juror for a specified dispute and round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The round to get the info for.\"},\"returns\":{\"_0\":\"pnkAtStakePerJuror The PNK at stake per juror.\"}},\"getRoundInfo(uint256,uint256)\":{\"details\":\"Gets the round info for a specified dispute and round.This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The round to get the info for.\"},\"returns\":{\"_0\":\"round The round info.\"}},\"getTimesPerPeriod(uint96)\":{\"details\":\"Gets the timesPerPeriod array for a given court.\",\"params\":{\"_courtID\":\"The ID of the court to get the times from.\"},\"returns\":{\"timesPerPeriod\":\"The timesPerPeriod array for the given court.\"}},\"initialize(address,address,address,address,address,bool,uint256[4],uint256[4],bytes,address,address,address)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_disputeKit\":\"The address of the default dispute kit.\",\"_governor\":\"The governor's address.\",\"_guardian\":\"The guardian's address.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_jurorNft\":\"NFT contract to vet the jurors.\",\"_jurorProsecutionModule\":\"The address of the juror prosecution module.\",\"_pinakion\":\"The address of the token contract.\",\"_sortitionExtraData\":\"The extra data for sortition module.\",\"_sortitionModuleAddress\":\"The sortition module responsible for sortition of the jurors.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the general court.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isDisputeKitJumping(uint256)\":{\"details\":\"Returns true if the dispute kit will be switched to a parent DK.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"Whether DK will be switched or not.\"}},\"isSupported(uint96,uint256)\":{\"details\":\"Checks if a given dispute kit is supported by a given court.\",\"params\":{\"_courtID\":\"The ID of the court to check the support for.\",\"_disputeKitID\":\"The ID of the dispute kit to check the support for.\"},\"returns\":{\"_0\":\"Whether the dispute kit is supported or not.\"}},\"passPeriod(uint256)\":{\"details\":\"Passes the period of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"pause()\":{\"details\":\"Pause staking and reward execution. Can only be done by guardian or governor.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setStake(uint96,uint256)\":{\"details\":\"Sets the caller's stake in a court. Note: Staking and unstaking is forbidden during pause.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake. Note that the existing delayed stake will be nullified as non-relevant.\"}},\"setStakeBySortitionModule(address,uint96,uint256)\":{\"details\":\"Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\",\"params\":{\"_account\":\"The account whose stake is being set.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"}},\"transferBySortitionModule(address,uint256)\":{\"details\":\"Transfers PNK to the juror by SortitionModule.\",\"params\":{\"_account\":\"The account of the juror whose PNK to transfer.\",\"_amount\":\"The amount to transfer.\"}},\"unpause()\":{\"details\":\"Unpause staking and reward execution. Can only be done by governor.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"KlerosCoreNeo Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/KlerosCoreNeo.sol\":\"KlerosCoreNeo\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC165} from \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC-721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\\n * a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC-721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or\\n * {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\\n * a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the address zero.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xf78f05f3b8c9f75570e85300d7b4600d7f6f6a198449273f31d44c1641adb46f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreNeo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20, OnError, StakingResult} from \\\"./KlerosCoreBase.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\n/// @title KlerosCoreNeo\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCoreNeo is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n mapping(address => bool) public arbitrableWhitelist; // Arbitrable whitelist.\\n IERC721 public jurorNft; // Eligible jurors NFT.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _jurorNft NFT contract to vet the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n IERC721 _jurorNft,\\n address _wNative\\n ) external reinitializer(2) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n jurorNft = _jurorNft;\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the `jurorNft` storage variable.\\n /// @param _jurorNft The new value for the `jurorNft` storage variable.\\n function changeJurorNft(IERC721 _jurorNft) external onlyByGovernor {\\n jurorNft = _jurorNft;\\n }\\n\\n /// @dev Adds or removes an arbitrable from whitelist.\\n /// @param _arbitrable Arbitrable address.\\n /// @param _allowed Whether add or remove permission.\\n function changeArbitrableWhitelist(address _arbitrable, bool _allowed) external onlyByGovernor {\\n arbitrableWhitelist[_arbitrable] = _allowed;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// Note: Staking and unstaking is forbidden during pause.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external override whenNotPaused {\\n if (jurorNft.balanceOf(msg.sender) == 0) revert NotEligibleForStaking();\\n super._setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal override returns (uint256 disputeID) {\\n if (!arbitrableWhitelist[msg.sender]) revert ArbitrableNotWhitelisted();\\n return super._createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure override {\\n super._stakingFailed(_onError, _result);\\n if (_result == StakingResult.CannotStakeMoreThanMaxStakePerJuror) revert StakingMoreThanMaxStakePerJuror();\\n if (_result == StakingResult.CannotStakeMoreThanMaxTotalStaked) revert StakingMoreThanMaxTotalStaked();\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error NotEligibleForStaking();\\n error StakingMoreThanMaxStakePerJuror();\\n error StakingMoreThanMaxTotalStaked();\\n error ArbitrableNotWhitelisted();\\n}\\n\",\"keccak256\":\"0xd5657fa7b1a8dd650b55b3e6c9ff750cd776504c0f1877071ed6a8c329ca4b9a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051615fe46100fc600039600081816119f601528181611a1f0152611c140152615fe46000f3fe6080604052600436106103005760003560e01c806382d0223711610191578063c71f4253116100e2578063f6506db411610090578063f6506db414610a43578063f7434ea914610a63578063f7e7d1fd14610a83578063fbf405b014610aa3578063fc6f8f1614610ac3578063fca31d6d14610ae3578063fe4037e614610b03578063fe524c3914610b2357600080fd5b8063c71f42531461096e578063cf0c38f81461098e578063d07368bd146109ae578063d2b8035a146109ce578063d4d1d76a146109ee578063d98493f614610a03578063e4c0aaf414610a2357600080fd5b8063acdbf51d1161013f578063acdbf51d14610883578063afe15cfb146108a3578063b0049637146108d8578063b44d573c146108f8578063c13517e114610928578063c258bb191461093b578063c35699021461095b57600080fd5b806382d02237146107a15780638456cb59146107c157806386541b24146107d657806386cdecef146107f65780638a9bb02a146108165780638bb0487514610843578063a072b86c1461086357600080fd5b80632e2e936a1161025657806352d1902d1161020457806352d1902d1461068257806354fd4d5014610697578063564a565d146106d657806359ec827e146107075780635c975abb14610727578063751accd0146107415780637717a6e8146107615780637934c0be1461078157600080fd5b80632e2e936a146105ad5780632fcb4f04146105cd5780633cfd1184146105ed5780633f4ba83a1461061a57806342c37fa31461062f578063452a93201461064f5780634f1ef2861461066f57600080fd5b806319b81529116102b357806319b815291461045a5780631c3db16d1461048a5780631d7e6892146104c75780631f5a0dd2146104e75780632d29a47b146105485780632d68efc9146105685780632e1daf2f1461058d57600080fd5b8062f5822c146103055780630219da79146103275780630761c14d1461039f5780630b7414bc146103bf5780630c340a24146103df578063115d53761461040c5780631860592b1461042c575b600080fd5b34801561031157600080fd5b50610325610320366004615102565b610b43565b005b34801561033357600080fd5b50610372610342366004615102565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b3480156103ab57600080fd5b506103256103ba36600461513d565b610b90565b3480156103cb57600080fd5b506103256103da366004615253565b610bce565b3480156103eb57600080fd5b506000546103ff906001600160a01b031681565b60405161039691906152b4565b34801561041857600080fd5b506103256104273660046152c8565b610cff565b34801561043857600080fd5b5061044c6104473660046152e1565b6112cc565b604051908152602001610396565b34801561046657600080fd5b5061047a6104753660046152c8565b611326565b6040519015158152602001610396565b34801561049657600080fd5b506104aa6104a53660046152c8565b61141f565b604080519384529115156020840152151590820152606001610396565b3480156104d357600080fd5b506103256104e236600461530d565b611520565b3480156104f357600080fd5b506105076105023660046152c8565b611576565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610396565b34801561055457600080fd5b50610325610563366004615346565b6115d5565b34801561057457600080fd5b506009546103ff9061010090046001600160a01b031681565b34801561059957600080fd5b506004546103ff906001600160a01b031681565b3480156105b957600080fd5b50600b546103ff906001600160a01b031681565b3480156105d957600080fd5b506103256105e8366004615102565b611861565b3480156105f957600080fd5b5061060d610608366004615372565b6118ae565b60405161039691906153b0565b34801561062657600080fd5b50610325611918565b34801561063b57600080fd5b5061032561064a3660046152e1565b61199b565b34801561065b57600080fd5b506001546103ff906001600160a01b031681565b61032561067d36600461542d565b6119e2565b34801561068e57600080fd5b5061044c611c07565b3480156106a357600080fd5b506106c9604051806040016040528060068152602001650302e31302e360d41b81525081565b60405161039691906154cc565b3480156106e257600080fd5b506106f66106f13660046152c8565b611c65565b604051610396959493929190615517565b34801561071357600080fd5b5061044c6107223660046152c8565b611cc1565b34801561073357600080fd5b5060095461047a9060ff1681565b34801561074d57600080fd5b5061032561075c366004615556565b611e16565b34801561076d57600080fd5b5061032561077c3660046155ae565b611ec0565b34801561078d57600080fd5b5061032561079c36600461530d565b611f82565b3480156107ad57600080fd5b506103256107bc3660046155ca565b612001565b3480156107cd57600080fd5b506103256120be565b3480156107e257600080fd5b506103256107f1366004615689565b61215e565b34801561080257600080fd5b5061044c6108113660046156f7565b61233b565b34801561082257600080fd5b506108366108313660046156f7565b61238c565b604051610396919061575e565b34801561084f57600080fd5b5061032561085e3660046152c8565b612518565b34801561086f57600080fd5b5061032561087e366004615804565b61267d565b34801561088f57600080fd5b506103ff61089e3660046152c8565b6129b5565b3480156108af57600080fd5b506108c36108be3660046152c8565b6129df565b60408051928352602083019190915201610396565b3480156108e457600080fd5b506103256108f3366004615102565b612a8b565b34801561090457600080fd5b5061047a610913366004615102565b600a6020526000908152604090205460ff1681565b61044c6109363660046158c8565b612ad8565b34801561094757600080fd5b50610325610956366004615102565b612b10565b6103256109693660046158f8565b612b5d565b34801561097a57600080fd5b5061044c6109893660046152c8565b613022565b34801561099a57600080fd5b506003546103ff906001600160a01b031681565b3480156109ba57600080fd5b506103256109c9366004615102565b61308a565b3480156109da57600080fd5b5061044c6109e93660046156f7565b613133565b3480156109fa57600080fd5b5060065461044c565b348015610a0f57600080fd5b5061044c610a1e366004615979565b613452565b348015610a2f57600080fd5b50610325610a3e366004615102565b61349f565b348015610a4f57600080fd5b5061044c610a5e3660046159c4565b6134ec565b348015610a6f57600080fd5b5061044c610a7e366004615a2a565b6135d0565b348015610a8f57600080fd5b50610325610a9e366004615102565b61361c565b348015610aaf57600080fd5b506002546103ff906001600160a01b031681565b348015610acf57600080fd5b5061044c610ade3660046152c8565b6136f3565b348015610aef57600080fd5b50610325610afe366004615a5e565b613722565b348015610b0f57600080fd5b50610325610b1e366004615102565b613818565b348015610b2f57600080fd5b5061047a610b3e3660046155ae565b613865565b6000546001600160a01b03163314610b6e5760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314610bbb57604051639d6cab9960e01b815260040160405180910390fd5b610bc883838360016138ad565b50505050565b6000546001600160a01b03163314610bf95760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610bc8578115610c9857828181518110610c1d57610c1d615b5a565b602002602001015160001480610c5057506006548351849083908110610c4557610c45615b5a565b602002602001015110155b15610c6e57604051633d58a98960e11b815260040160405180910390fd5b610c9384848381518110610c8457610c84615b5a565b60200260200101516001613b29565b610cf7565b6001838281518110610cac57610cac615b5a565b602002602001015103610cd2576040516356d111fd60e11b815260040160405180910390fd5b610cf784848381518110610ce857610ce8615b5a565b60200260200101516000613b29565b600101610bfc565b600060078281548110610d1457610d14615b5a565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610d4757610d47615b5a565b6000918252602082206003850154600c909202019250610d6990600190615b86565b90506000836003018281548110610d8257610d82615b5a565b600091825260208220600b909102019150600185015460ff166004811115610dac57610dac6154df565b03610e875781158015610dfb57506001840154600684019060ff166004811115610dd857610dd86154df565b60048110610de857610de8615b5a565b01546002850154610df99042615b86565b105b15610e1957604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610e41576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610e58576002610e5b565b60015b60018086018054909160ff1990911690836004811115610e7d57610e7d6154df565b021790555061127e565b60018085015460ff166004811115610ea157610ea16154df565b03610fb1576001840154600684019060ff166004811115610ec457610ec46154df565b60048110610ed457610ed4615b5a565b01546002850154610ee59042615b86565b108015610f7c57506006816000015481548110610f0457610f04615b5a565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610f56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7a9190615b99565b155b15610f9a57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610e7d565b6002600185015460ff166004811115610fcc57610fcc6154df565b0361111a576001840154600684019060ff166004811115610fef57610fef6154df565b60048110610fff57610fff615b5a565b015460028501546110109042615b86565b1080156110a75750600681600001548154811061102f5761102f615b5a565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015611081573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a59190615b99565b155b156110c557604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a361127e565b6003600185015460ff166004811115611135576111356154df565b03611245576001840154600684019060ff166004811115611158576111586154df565b6004811061116857611168615b5a565b015460028501546111799042615b86565b1080156112105750600681600001548154811061119857611198615b5a565b600091825260209091200154604051630855bbe960e01b8152600481018790526001600160a01b0390911690630855bbe990602401602060405180830381865afa1580156111ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120e9190615b99565b155b1561122e57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610e7d565b6004600185015460ff166004811115611260576112606154df565b0361127e576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916112bd9160ff1690615bb6565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061130990600160481b900460ff16600a615cab565b6113139084615cba565b61131d9190615ce7565b90505b92915050565b6000806007838154811061133c5761133c615b5a565b600091825260208220600360049092020190810180549193509061136290600190615b86565b8154811061137257611372615b5a565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106113a7576113a7615b5a565b90600052602060002090600c020190508060050154826003015410156113d257506000949350505050565b80546005805490916001600160601b03169081106113f2576113f2615b5a565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061143857611438615b5a565b600091825260208220600360049092020190810180549193509061145e90600190615b86565b8154811061146e5761146e615b5a565b90600052602060002090600b020190506000600682600001548154811061149757611497615b5a565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156114ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115109190615cfb565b9199909850909650945050505050565b6000546001600160a01b0316331461154b5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6005818154811061158657600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff16156115f957604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061160f5761160f615b5a565b600091825260209091206004918202019150600182015460ff16600481111561163a5761163a6154df565b1461165857604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061166d5761166d615b5a565b6000918252602082206004600b909202019081015490935091506116918483615d34565b60058401546006850154600286015492935090916000906116b3908390615ce7565b905060008660010154905060008060068960000154815481106116d8576116d8615b5a565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611734573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117589190615d47565b91505080600003611774578386111561176f578395505b611794565b61177f846002615cba565b86111561179457611791846002615cba565b95505b60048801869055865b8681101561184057848110156117f6576117ef6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613bb1565b9550611838565b6118386040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061405f565b60010161179d565b508488600501541461185457600588018590555b5050505050505050505050565b6000546001600160a01b0316331461188c5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6118b6615032565b6005826001600160601b0316815481106118d2576118d2615b5a565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116118f95750505050509050919050565b6000546001600160a01b031633146119435760405163c383977560e01b815260040160405180910390fd5b60095460ff166119665760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6004546001600160a01b031633146119c657604051639d6cab9960e01b815260040160405180910390fd5b6002546119dd906001600160a01b0316838361445c565b505050565b6119eb8261451f565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480611a6957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611a5d600080516020615f8f8339815191525490565b6001600160a01b031614155b15611a875760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611ae1575060408051601f3d908101601f19168201909252611ade91810190615d47565b60015b611b095781604051630c76093760e01b8152600401611b0091906152b4565b60405180910390fd5b600080516020615f8f8339815191528114611b3a57604051632a87526960e21b815260048101829052602401611b00565b600080516020615f8f8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156119dd576000836001600160a01b031683604051611ba19190615d60565b600060405180830381855af49150503d8060008114611bdc576040519150601f19603f3d011682016040523d82523d6000602084013e611be1565b606091505b5050905080610bc8576040516339b21b5d60e11b815260040160405180910390fd5b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c525760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615f8f83398151915290565b60078181548110611c7557600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611cd757611cd7615b5a565b6000918252602082206003600490920201908101805491935090611cfd90600190615b86565b81548110611d0d57611d0d615b5a565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611d4257611d42615b5a565b90600052602060002090600c020190508060050154826003015410611de15782546001600160601b031660001901611d83576001600160ff1b039350611e0e565b6003820154611d93906002615cba565b611d9e906001615d34565b81546005805490916001600160601b0316908110611dbe57611dbe615b5a565b90600052602060002090600c020160040154611dda9190615cba565b9350611e0e565b6003820154611df1906002615cba565b611dfc906001615d34565b8160040154611e0b9190615cba565b93505b505050919050565b6000546001600160a01b03163314611e415760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611e5c9190615d60565b60006040518083038185875af1925050503d8060008114611e99576040519150601f19603f3d011682016040523d82523d6000602084013e611e9e565b606091505b5050905080610bc8576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611ee457604051636f1dac1d60e01b815260040160405180910390fd5b600b546040516370a0823160e01b81526001600160a01b03909116906370a0823190611f149033906004016152b4565b602060405180830381865afa158015611f31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f559190615d47565b600003611f75576040516326b551e560e11b815260040160405180910390fd5b6119dd33838360006138ad565b6000546001600160a01b03163314611fad5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b0316331461202c5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b031633148015906120e457506000546001600160a01b03163314155b1561210257604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561212657604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146121895760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106121a7576121a7615b5a565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015612209575080546005805488926001600160601b03169081106121f5576121f5615b5a565b90600052602060002090600c020160020154115b1561222757604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156122a25786600583600101838154811061224e5761224e615b5a565b90600052602060002001548154811061226957612269615b5a565b90600052602060002090600c020160020154101561229a57604051639717078960e01b815260040160405180910390fd5b60010161222a565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556122e59060068301908490615050565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161232996959493929190615d7c565b60405180910390a25050505050505050565b60006007838154811061235057612350615b5a565b9060005260206000209060040201600301828154811061237257612372615b5a565b90600052602060002090600b020160010154905092915050565b6123f260405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6007838154811061240557612405615b5a565b9060005260206000209060040201600301828154811061242757612427615b5a565b90600052602060002090600b020160405180610160016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682018054806020026020016040519081016040528092919081815260200182805480156124d657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116124b8575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061252d5761252d615b5a565b600091825260209091206004918202019150600182015460ff166004811115612558576125586154df565b1461257657604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156125a15760405163c977f8d360e01b815260040160405180910390fd5b60006125ac8361141f565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c56906044015b600060405180830381600087803b15801561266057600080fd5b505af1158015612674573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146126a85760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106126c5576126c5615b5a565b90600052602060002090600c02016002015411156126f657604051639717078960e01b815260040160405180910390fd5b80516000036127185760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661273f57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b83518110156128015783818151811061279257612792615b5a565b6020026020010151600014806127c5575060065484518590839081106127ba576127ba615b5a565b602002602001015110155b156127e357604051633d58a98960e11b815260040160405180910390fd5b6127f983858381518110610c8457610c84615b5a565b600101612777565b5060016000908152600a8201602052604090205460ff16612835576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c16178155604080516000815260208101918290525161286d91600184019161508e565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556128b09060068301908790615050565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916128e2918691899101615daf565b600060405180830381600087803b1580156128fc57600080fd5b505af1158015612910573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061293057612930615b5a565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906129a0908e908e908e908e908e908e908d90615dc8565b60405180910390a35050505050505050505050565b600681815481106129c557600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106129f7576129f7615b5a565b6000918252602090912060049091020190506003600182015460ff166004811115612a2457612a246154df565b03612a7c576002810154815460058054929550916001600160601b03909116908110612a5257612a52615b5a565b600091825260209091206009600c9092020101546002820154612a759190615d34565b9150612a85565b60009250600091505b50915091565b6000546001600160a01b03163314612ab65760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612ae3826135d0565b341015612b0357604051630e3360f160e21b815260040160405180910390fd5b61131d838360003461454d565b6000546001600160a01b03163314612b3b5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612b6683611cc1565b341015612b8657604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612b9b57612b9b615b5a565b6000918252602090912060049091020190506003600182015460ff166004811115612bc857612bc86154df565b14612be6576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612bfc90600190615b86565b81548110612c0c57612c0c615b5a565b90600052602060002090600b020190506006816000015481548110612c3357612c33615b5a565b6000918252602090912001546001600160a01b03163314612c675760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612caa57612caa615b5a565b90600052602060002090600c020160050154846003015410612db3576005836001600160601b031681548110612ce257612ce2615b5a565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612d1557612d15615b5a565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612d4157600191505b84546001600160601b03848116911614612db357845460038601546001600160601b0390911690612d7490600190615b86565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612df657612df6615b5a565b90600052602060002090600c02019050806004015434612e169190615ce7565b8260030181905550612e3081600201548260030154614592565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612e6791615b86565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612ea557600080fd5b505af1158015612eb9573d6000803e3d6000fd5b505086548454149150612f9f90505784546003870154612edb90600190615b86565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612f2957612f29615b5a565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612f6c918d918d918d9190600401615e45565b600060405180830381600087803b158015612f8657600080fd5b505af1158015612f9a573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91600060405161300f9190615bb6565b60405180910390a2505050505050505050565b6000806007838154811061303857613038615b5a565b9060005260206000209060040201905080600301600182600301805490506130609190615b86565b8154811061307057613070615b5a565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b031633146130b55760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b6000806007848154811061314957613149615b5a565b9060005260206000209060040201905060006001826003018054905061316f9190615b86565b9050600082600301828154811061318857613188615b5a565b600091825260208220600b909102019150600184015460ff1660048111156131b2576131b26154df565b146131d057604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106131e9576131e9615b5a565b6000918252602082200154600a8401546001600160a01b039091169250905b878110801561321e575060038401546006850154105b156134265760006001600160a01b03841663d2b8035a8b8461323f81615e75565b955061324b9087615d34565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af115801561328e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132b29190615e8e565b90506001600160a01b0381166132c85750613208565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e926132fe928692909101615eab565b600060405180830381600087803b15801561331857600080fd5b505af115801561332c573d6000803e3d6000fd5b50505060068601546040518c92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b91613379918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036134205760048054604051632e96bc2360e11b81529182018c9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561340757600080fd5b505af115801561341b573d6000803e3d6000fd5b505050505b50613208565b8084600a01600082825461343a9190615d34565b90915550505060069092015494505050505092915050565b60006134978261044786868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506135d092505050565b949350505050565b6000546001600160a01b031633146134ca5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166135255760405163e51cf7bf60e01b815260040160405180910390fd5b613530858585613452565b82101561355057604051630e3360f160e21b815260040160405180910390fd5b6135656001600160a01b0384163330856145a1565b613582576040516312171d8360e31b815260040160405180910390fd5b6135c68686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525088925087915061454d9050565b9695505050505050565b60008060006135de8461467d565b5091509150806005836001600160601b03168154811061360057613600615b5a565b90600052602060002090600c0201600401546134979190615cba565b60066000613628614704565b8054909150600160401b900460ff168061364f575080546001600160401b03808416911610155b1561366c5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff19909216821717825560098054610100600160a81b0319166101006001600160a01b03871602179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60006007828154811061370857613708615b5a565b600091825260209091206003600490920201015492915050565b6002600061372e614704565b8054909150600160401b900460ff1680613755575080546001600160401b03808416911610155b156137725760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556137a68e8e8e8e8e8e8e8e8e8e8d614728565b600b80546001600160a01b0319166001600160a01b038616179055805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050505050505050565b6000546001600160a01b031633146138435760405163c383977560e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006005836001600160601b03168154811061388357613883615b5a565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b60006001600160601b03841615806138d057506005546001600160601b03851610155b156138e8576138e0826005614a6b565b506000613497565b821580159061392357506005846001600160601b03168154811061390e5761390e615b5a565b90600052602060002090600c02016002015483105b15613933576138e0826006614a6b565b600480546040516303d9595760e31b81526001600160a01b03888116938201939093526001600160601b03871660248201526044810186905260009283928392911690631ecacab8906064016060604051808303816000875af115801561399e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139c29190615ec4565b9194509250905060008160098111156139dd576139dd6154df565b141580156139fd575060018160098111156139fa576139fa6154df565b14155b15613a1857613a0c8582614a6b565b60009350505050613497565b6001816009811115613a2c57613a2c6154df565b03613a3d5760019350505050613497565b8215613a6a57600254613a5b906001600160a01b03168930866145a1565b613a6a57613a0c856002614a6b565b8115613a9657600254613a87906001600160a01b0316898461445c565b613a9657613a0c856003614a6b565b600480546040516355601d6960e11b81526001600160a01b038b8116938201939093526001600160601b038a16602482015260448101869052606481018590526084810189905291169063aac03ad29060a401600060405180830381600087803b158015613b0357600080fd5b505af1158015613b17573d6000803e3d6000fd5b5060019b9a5050505050505050505050565b806005846001600160601b031681548110613b4657613b46615b5a565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b6000806007836000015181548110613bcb57613bcb615b5a565b90600052602060002090600402019050600081600301846020015181548110613bf657613bf6615b5a565b90600052602060002090600b0201905060006006826000015481548110613c1f57613c1f615b5a565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc99190615d47565b9050612710811115613cda57506127105b6000612710613ce98382615b86565b8560010154613cf89190615cba565b613d029190615ce7565b90506000846006018860e0015181548110613d1f57613d1f615b5a565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613d60918591879101615eab565b600060405180830381600087803b158015613d7a57600080fd5b505af1158015613d8e573d6000803e3d6000fd5b505060048054604051633c85b79360e21b8152600094508493506001600160a01b039091169163f216de4c91613dc8918791899101615eab565b60408051808303816000875af1158015613de6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e0a9190615ef7565b91509150808a60c001818151613e209190615d34565b90525060208a01518a516001600160a01b0385167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e788613e5f86615f1b565b60098d0154604051613e819392916000916001600160a01b0390911690615f37565b60405180910390a4811580613f165750895160208b015160e08c015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0387169063ba66fde790606401602060405180830381865afa158015613ef0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f149190615b99565b155b15613f7d576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e9991613f4a918791016152b4565b600060405180830381600087803b158015613f6457600080fd5b505af1158015613f78573d6000803e3d6000fd5b505050505b60018a60600151613f8e9190615b86565b8a60e00151148015613fa2575060408a0151155b1561404c5760098701546000546002890154613fcb926001600160a01b03908116921690614ad9565b60005460c08b0151600254613fee926001600160a01b039182169291169061445c565b5060208a01518a5160c08c015160028a015460098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361404393909290916001600160a01b0390911690615f5b565b60405180910390a35b50505060c0909601519695505050505050565b6000600782600001518154811061407857614078615b5a565b906000526020600020906004020190506000816003018360200151815481106140a3576140a3615b5a565b90600052602060002090600b02019050600060068260000154815481106140cc576140cc615b5a565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f69390929161410b91615f7a565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa15801561416b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061418f9190615d47565b90506127108111156141a057506127105b60008360060186606001518760e001516141ba9190615f7a565b815481106141ca576141ca615b5a565b600091825260208220015460018601546001600160a01b0390911692506141f19084614592565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791614223918691869101615eab565b600060405180830381600087803b15801561423d57600080fd5b505af1158015614251573d6000803e3d6000fd5b50505050600061427488604001518960c0015161426e9190615ce7565b85614592565b90508086600801600082825461428a9190615d34565b9250508190555060006142b0896040015188600201546142aa9190615ce7565b86614592565b9050808760070160008282546142c69190615d34565b90915550506002546142e2906001600160a01b0316858461445c565b5060098701546142fc906001600160a01b03168583614ad9565b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79261434c928c928a928a9290911690615f37565b60405180910390a46001896060015160026143679190615cba565b6143719190615b86565b8960e001510361445157600087600801548a60c001516143919190615b86565b90506000886007015489600201546143a99190615b86565b9050811515806143b857508015155b156118545781156143e2576000546002546143e0916001600160a01b0391821691168461445c565b505b8015614407576009890154600054614407916001600160a01b03908116911683614ad9565b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916129a091879187916001600160a01b0390911690615f5b565b505050505050505050565b6000806000856001600160a01b0316858560405160240161447e929190615eab565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516144b39190615d60565b6000604051808303816000865af19150503d80600081146144f0576040519150601f19603f3d011682016040523d82523d6000602084013e6144f5565b606091505b50915091508180156135c65750805115806135c65750808060200190518101906135c69190615b99565b6000546001600160a01b0316331461454a5760405163c383977560e01b815260040160405180910390fd5b50565b336000908152600a602052604081205460ff1661457d57604051630407618360e31b815260040160405180910390fd5b61458985858585614b1c565b95945050505050565b60006127106113138385615cba565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516146069190615d60565b6000604051808303816000865af19150503d8060008114614643576040519150601f19603f3d011682016040523d82523d6000602084013e614648565b606091505b50915091508180156146725750805115806146725750808060200190518101906146729190615b99565b979650505050505050565b600080600060408451106146f2575050506020810151604082015160608301516001600160601b03831615806146be57506005546001600160601b03841610155b156146c857600192505b816000036146d557600391505b8015806146e457506006548110155b156146ed575060015b6146fd565b506001915060039050815b9193909250565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b614730614df7565b600080546001600160a01b03199081166001600160a01b038e81169190911783556001805483168e83161781556002805484168e84161781556003805485168e851617905560048054851688851617905560098054610100600160a81b031916610100888616021790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918b1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261483b92889101615daf565b600060405180830381600087803b15801561485557600080fd5b505af1158015614869573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516148d791600184019160209091019061508e565b50805460ff60601b1916600160601b8815150217815585516002820155602086015160038201556040860151600480830191909155606087015160058301556149269060068301908790615050565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161495991600191899101615daf565b600060405180830381600087803b15801561497357600080fd5b505af1158015614987573d6000803e3d6000fd5b5060009250600191506149979050565b6040519080825280602002602001820160405280156149c0578160200160208202803683370190505b5090506001816000815181106149d8576149d8615b5a565b602090810291909101015281546001600160601b031660017f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee68a8a600060200201518b600160200201518c600260200201518d600360200201518d89604051614a479796959493929190615dc8565b60405180910390a3614a5c6001806001613b29565b50505050505050505050505050565b614a758282614e1e565b6007816009811115614a8957614a896154df565b03614aa757604051636590e91560e01b815260040160405180910390fd5b6008816009811115614abb57614abb6154df565b03611c03576040516358859f1d60e01b815260040160405180910390fd5b6001600160a01b038316614b08576009546119dd906001600160a01b0384811691849161010090910416614f67565b610bc86001600160a01b038416838361445c565b6000806000614b2a8661467d565b92505091506005826001600160601b031681548110614b4b57614b4b615b5a565b60009182526020808320848452600a600c90930201919091019052604090205460ff16614b8b5760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614c1657614c16615b5a565b6000918252602082200154600580546001600160a01b039092169350906001600160601b038716908110614c4c57614c4c615b5a565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614c9757614c928a84600401546112cc565b614c9d565b82600401545b9050614ca9818a615ce7565b600380840191909155868355600284015490840154614cc89190614592565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b158015614d3b57600080fd5b505af1158015614d4f573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b8152600401614d899493929190615e45565b600060405180830381600087803b158015614da357600080fd5b505af1158015614db7573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b614dff615018565b614e1c57604051631afcd79f60e31b815260040160405180910390fd5b565b6001826001811115614e3257614e326154df565b03614e3b575050565b6002816009811115614e4f57614e4f6154df565b03614e6d57604051630f323ed960e11b815260040160405180910390fd5b6003816009811115614e8157614e816154df565b03614e9f5760405163e45e13a360e01b815260040160405180910390fd5b6004816009811115614eb357614eb36154df565b03614ed157604051631d91d0ed60e31b815260040160405180910390fd5b6005816009811115614ee557614ee56154df565b03614f0357604051637c84af5160e01b815260040160405180910390fd5b6006816009811115614f1757614f176154df565b03614f3557604051630caac6b360e31b815260040160405180910390fd5b6009816009811115614f4957614f496154df565b03611c0357604051633e57962f60e21b815260040160405180910390fd5b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015614f9657505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015614fd157600080fd5b505af1158015614fe5573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516935063a9059cbb9250612646915086908690600401615eab565b6000615022614704565b54600160401b900460ff16919050565b60405180608001604052806004906020820280368337509192915050565b826004810192821561507e579160200282015b8281111561507e578251825591602001919060010190615063565b5061508a9291506150c8565b5090565b82805482825590600052602060002090810192821561507e579160200282018281111561507e578251825591602001919060010190615063565b5b8082111561508a57600081556001016150c9565b6001600160a01b038116811461454a57600080fd5b80356150fd816150dd565b919050565b60006020828403121561511457600080fd5b813561511f816150dd565b9392505050565b80356001600160601b03811681146150fd57600080fd5b60008060006060848603121561515257600080fd5b833561515d816150dd565b925061516b60208501615126565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156151ba576151ba61517c565b604052919050565b600082601f8301126151d357600080fd5b81356001600160401b038111156151ec576151ec61517c565b8060051b6151fc60208201615192565b9182526020818501810192908101908684111561521857600080fd5b6020860192505b838310156135c657823582526020928301929091019061521f565b801515811461454a57600080fd5b80356150fd8161523a565b60008060006060848603121561526857600080fd5b61527184615126565b925060208401356001600160401b0381111561528c57600080fd5b615298868287016151c2565b92505060408401356152a98161523a565b809150509250925092565b6001600160a01b0391909116815260200190565b6000602082840312156152da57600080fd5b5035919050565b600080604083850312156152f457600080fd5b82356152ff816150dd565b946020939093013593505050565b6000806040838503121561532057600080fd5b823561532b816150dd565b9150602083013561533b8161523a565b809150509250929050565b60008060006060848603121561535b57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561538457600080fd5b61131d82615126565b8060005b6004811015610bc8578151845260209384019390910190600101615391565b60808101611320828461538d565b600082601f8301126153cf57600080fd5b81356001600160401b038111156153e8576153e861517c565b6153fb601f8201601f1916602001615192565b81815284602083860101111561541057600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561544057600080fd5b823561544b816150dd565b915060208301356001600160401b0381111561546657600080fd5b615472858286016153be565b9150509250929050565b60005b8381101561549757818101518382015260200161547f565b50506000910152565b600081518084526154b881602086016020860161547c565b601f01601f19169290920160200192915050565b60208152600061131d60208301846154a0565b634e487b7160e01b600052602160045260246000fd5b6005811061551357634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a0810161554360408301866154f5565b9215156060820152608001529392505050565b60008060006060848603121561556b57600080fd5b8335615576816150dd565b92506020840135915060408401356001600160401b0381111561559857600080fd5b6155a4868287016153be565b9150509250925092565b600080604083850312156155c157600080fd5b6152ff83615126565b6000806000606084860312156155df57600080fd5b83356155ea816150dd565b925060208401356001600160401b038116811461560657600080fd5b9150604084013560ff811681146152a957600080fd5b600082601f83011261562d57600080fd5b604051608081016001600160401b038111828210171561564f5761564f61517c565b60405280608084018581111561566457600080fd5b845b8181101561567e578035835260209283019201615666565b509195945050505050565b6000806000806000806000610140888a0312156156a557600080fd5b6156ae88615126565b965060208801356156be8161523a565b955060408801359450606088013593506080880135925060a088013591506156e98960c08a0161561c565b905092959891949750929550565b6000806040838503121561570a57600080fd5b50508035926020909101359150565b600081518084526020840193506020830160005b828110156157545781516001600160a01b031686526020958601959091019060010161572d565b5093949350505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c083015161016060e08401526157b8610180840182615719565b905060e08401516101008401526101008401516101208401526101208401516157ed6101408501826001600160a01b03169052565b506101408401516101608401528091505092915050565b60008060008060008060008060006101808a8c03121561582357600080fd5b61582c8a615126565b985060208a013561583c8161523a565b975060408a0135965060608a0135955060808a0135945060a08a013593506158678b60c08c0161561c565b92506101408a01356001600160401b0381111561588357600080fd5b61588f8c828d016153be565b9250506101608a01356001600160401b038111156158ac57600080fd5b6158b88c828d016151c2565b9150509295985092959850929598565b600080604083850312156158db57600080fd5b8235915060208301356001600160401b0381111561546657600080fd5b60008060006060848603121561590d57600080fd5b833592506020840135915060408401356001600160401b0381111561559857600080fd5b60008083601f84011261594357600080fd5b5081356001600160401b0381111561595a57600080fd5b60208301915083602082850101111561597257600080fd5b9250929050565b60008060006040848603121561598e57600080fd5b83356001600160401b038111156159a457600080fd5b6159b086828701615931565b90945092505060208401356152a9816150dd565b6000806000806000608086880312156159dc57600080fd5b8535945060208601356001600160401b038111156159f957600080fd5b615a0588828901615931565b9095509350506040860135615a19816150dd565b949793965091946060013592915050565b600060208284031215615a3c57600080fd5b81356001600160401b03811115615a5257600080fd5b613497848285016153be565b6000806000806000806000806000806000806102408d8f031215615a8157600080fd5b615a8a8d6150f2565b9b50615a9860208e016150f2565b9a50615aa660408e016150f2565b9950615ab460608e016150f2565b9850615ac260808e016150f2565b9750615ad060a08e01615248565b9650615adf8e60c08f0161561c565b9550615aef8e6101408f0161561c565b94506001600160401b036101c08e01351115615b0a57600080fd5b615b1b8e6101c08f01358f016153be565b9350615b2a6101e08e016150f2565b9250615b396102008e016150f2565b9150615b486102208e016150f2565b90509295989b509295989b509295989b565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561132057611320615b70565b600060208284031215615bab57600080fd5b815161511f8161523a565b6020810161132082846154f5565b6001815b6001841115615bff57808504811115615be357615be3615b70565b6001841615615bf157908102905b60019390931c928002615bc8565b935093915050565b600082615c1657506001611320565b81615c2357506000611320565b8160018114615c395760028114615c4357615c5f565b6001915050611320565b60ff841115615c5457615c54615b70565b50506001821b611320565b5060208310610133831016604e8410600b8410161715615c82575081810a611320565b615c8f6000198484615bc4565b8060001904821115615ca357615ca3615b70565b029392505050565b600061131d60ff841683615c07565b808202811582820484141761132057611320615b70565b634e487b7160e01b600052601260045260246000fd5b600082615cf657615cf6615cd1565b500490565b600080600060608486031215615d1057600080fd5b83516020850151909350615d238161523a565b60408501519092506152a98161523a565b8082018082111561132057611320615b70565b600060208284031215615d5957600080fd5b5051919050565b60008251615d7281846020870161547c565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261467260a083018461538d565b82815260406020820152600061349760408301846154a0565b600061014082018915158352886020840152876040840152866060840152856080840152615df960a084018661538d565b610140610120840152835190819052602084019061016084019060005b81811015615e34578351835260209384019390920191600101615e16565b50909b9a5050505050505050505050565b848152836020820152608060408201526000615e6460808301856154a0565b905082606083015295945050505050565b600060018201615e8757615e87615b70565b5060010190565b600060208284031215615ea057600080fd5b815161511f816150dd565b6001600160a01b03929092168252602082015260400190565b600080600060608486031215615ed957600080fd5b8351602085015160408601519194509250600a81106152a957600080fd5b60008060408385031215615f0a57600080fd5b505080516020909101519092909150565b6000600160ff1b8201615f3057615f30615b70565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615f8957615f89615cd1565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122004d0e8698d556c8622b85aecf09450b7bc71e8101fe95c2464a140be1c6fb1b364736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106103005760003560e01c806382d0223711610191578063c71f4253116100e2578063f6506db411610090578063f6506db414610a43578063f7434ea914610a63578063f7e7d1fd14610a83578063fbf405b014610aa3578063fc6f8f1614610ac3578063fca31d6d14610ae3578063fe4037e614610b03578063fe524c3914610b2357600080fd5b8063c71f42531461096e578063cf0c38f81461098e578063d07368bd146109ae578063d2b8035a146109ce578063d4d1d76a146109ee578063d98493f614610a03578063e4c0aaf414610a2357600080fd5b8063acdbf51d1161013f578063acdbf51d14610883578063afe15cfb146108a3578063b0049637146108d8578063b44d573c146108f8578063c13517e114610928578063c258bb191461093b578063c35699021461095b57600080fd5b806382d02237146107a15780638456cb59146107c157806386541b24146107d657806386cdecef146107f65780638a9bb02a146108165780638bb0487514610843578063a072b86c1461086357600080fd5b80632e2e936a1161025657806352d1902d1161020457806352d1902d1461068257806354fd4d5014610697578063564a565d146106d657806359ec827e146107075780635c975abb14610727578063751accd0146107415780637717a6e8146107615780637934c0be1461078157600080fd5b80632e2e936a146105ad5780632fcb4f04146105cd5780633cfd1184146105ed5780633f4ba83a1461061a57806342c37fa31461062f578063452a93201461064f5780634f1ef2861461066f57600080fd5b806319b81529116102b357806319b815291461045a5780631c3db16d1461048a5780631d7e6892146104c75780631f5a0dd2146104e75780632d29a47b146105485780632d68efc9146105685780632e1daf2f1461058d57600080fd5b8062f5822c146103055780630219da79146103275780630761c14d1461039f5780630b7414bc146103bf5780630c340a24146103df578063115d53761461040c5780631860592b1461042c575b600080fd5b34801561031157600080fd5b50610325610320366004615102565b610b43565b005b34801561033357600080fd5b50610372610342366004615102565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b3480156103ab57600080fd5b506103256103ba36600461513d565b610b90565b3480156103cb57600080fd5b506103256103da366004615253565b610bce565b3480156103eb57600080fd5b506000546103ff906001600160a01b031681565b60405161039691906152b4565b34801561041857600080fd5b506103256104273660046152c8565b610cff565b34801561043857600080fd5b5061044c6104473660046152e1565b6112cc565b604051908152602001610396565b34801561046657600080fd5b5061047a6104753660046152c8565b611326565b6040519015158152602001610396565b34801561049657600080fd5b506104aa6104a53660046152c8565b61141f565b604080519384529115156020840152151590820152606001610396565b3480156104d357600080fd5b506103256104e236600461530d565b611520565b3480156104f357600080fd5b506105076105023660046152c8565b611576565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610396565b34801561055457600080fd5b50610325610563366004615346565b6115d5565b34801561057457600080fd5b506009546103ff9061010090046001600160a01b031681565b34801561059957600080fd5b506004546103ff906001600160a01b031681565b3480156105b957600080fd5b50600b546103ff906001600160a01b031681565b3480156105d957600080fd5b506103256105e8366004615102565b611861565b3480156105f957600080fd5b5061060d610608366004615372565b6118ae565b60405161039691906153b0565b34801561062657600080fd5b50610325611918565b34801561063b57600080fd5b5061032561064a3660046152e1565b61199b565b34801561065b57600080fd5b506001546103ff906001600160a01b031681565b61032561067d36600461542d565b6119e2565b34801561068e57600080fd5b5061044c611c07565b3480156106a357600080fd5b506106c9604051806040016040528060068152602001650302e31302e360d41b81525081565b60405161039691906154cc565b3480156106e257600080fd5b506106f66106f13660046152c8565b611c65565b604051610396959493929190615517565b34801561071357600080fd5b5061044c6107223660046152c8565b611cc1565b34801561073357600080fd5b5060095461047a9060ff1681565b34801561074d57600080fd5b5061032561075c366004615556565b611e16565b34801561076d57600080fd5b5061032561077c3660046155ae565b611ec0565b34801561078d57600080fd5b5061032561079c36600461530d565b611f82565b3480156107ad57600080fd5b506103256107bc3660046155ca565b612001565b3480156107cd57600080fd5b506103256120be565b3480156107e257600080fd5b506103256107f1366004615689565b61215e565b34801561080257600080fd5b5061044c6108113660046156f7565b61233b565b34801561082257600080fd5b506108366108313660046156f7565b61238c565b604051610396919061575e565b34801561084f57600080fd5b5061032561085e3660046152c8565b612518565b34801561086f57600080fd5b5061032561087e366004615804565b61267d565b34801561088f57600080fd5b506103ff61089e3660046152c8565b6129b5565b3480156108af57600080fd5b506108c36108be3660046152c8565b6129df565b60408051928352602083019190915201610396565b3480156108e457600080fd5b506103256108f3366004615102565b612a8b565b34801561090457600080fd5b5061047a610913366004615102565b600a6020526000908152604090205460ff1681565b61044c6109363660046158c8565b612ad8565b34801561094757600080fd5b50610325610956366004615102565b612b10565b6103256109693660046158f8565b612b5d565b34801561097a57600080fd5b5061044c6109893660046152c8565b613022565b34801561099a57600080fd5b506003546103ff906001600160a01b031681565b3480156109ba57600080fd5b506103256109c9366004615102565b61308a565b3480156109da57600080fd5b5061044c6109e93660046156f7565b613133565b3480156109fa57600080fd5b5060065461044c565b348015610a0f57600080fd5b5061044c610a1e366004615979565b613452565b348015610a2f57600080fd5b50610325610a3e366004615102565b61349f565b348015610a4f57600080fd5b5061044c610a5e3660046159c4565b6134ec565b348015610a6f57600080fd5b5061044c610a7e366004615a2a565b6135d0565b348015610a8f57600080fd5b50610325610a9e366004615102565b61361c565b348015610aaf57600080fd5b506002546103ff906001600160a01b031681565b348015610acf57600080fd5b5061044c610ade3660046152c8565b6136f3565b348015610aef57600080fd5b50610325610afe366004615a5e565b613722565b348015610b0f57600080fd5b50610325610b1e366004615102565b613818565b348015610b2f57600080fd5b5061047a610b3e3660046155ae565b613865565b6000546001600160a01b03163314610b6e5760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314610bbb57604051639d6cab9960e01b815260040160405180910390fd5b610bc883838360016138ad565b50505050565b6000546001600160a01b03163314610bf95760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610bc8578115610c9857828181518110610c1d57610c1d615b5a565b602002602001015160001480610c5057506006548351849083908110610c4557610c45615b5a565b602002602001015110155b15610c6e57604051633d58a98960e11b815260040160405180910390fd5b610c9384848381518110610c8457610c84615b5a565b60200260200101516001613b29565b610cf7565b6001838281518110610cac57610cac615b5a565b602002602001015103610cd2576040516356d111fd60e11b815260040160405180910390fd5b610cf784848381518110610ce857610ce8615b5a565b60200260200101516000613b29565b600101610bfc565b600060078281548110610d1457610d14615b5a565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610d4757610d47615b5a565b6000918252602082206003850154600c909202019250610d6990600190615b86565b90506000836003018281548110610d8257610d82615b5a565b600091825260208220600b909102019150600185015460ff166004811115610dac57610dac6154df565b03610e875781158015610dfb57506001840154600684019060ff166004811115610dd857610dd86154df565b60048110610de857610de8615b5a565b01546002850154610df99042615b86565b105b15610e1957604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610e41576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610e58576002610e5b565b60015b60018086018054909160ff1990911690836004811115610e7d57610e7d6154df565b021790555061127e565b60018085015460ff166004811115610ea157610ea16154df565b03610fb1576001840154600684019060ff166004811115610ec457610ec46154df565b60048110610ed457610ed4615b5a565b01546002850154610ee59042615b86565b108015610f7c57506006816000015481548110610f0457610f04615b5a565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610f56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7a9190615b99565b155b15610f9a57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610e7d565b6002600185015460ff166004811115610fcc57610fcc6154df565b0361111a576001840154600684019060ff166004811115610fef57610fef6154df565b60048110610fff57610fff615b5a565b015460028501546110109042615b86565b1080156110a75750600681600001548154811061102f5761102f615b5a565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015611081573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a59190615b99565b155b156110c557604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a361127e565b6003600185015460ff166004811115611135576111356154df565b03611245576001840154600684019060ff166004811115611158576111586154df565b6004811061116857611168615b5a565b015460028501546111799042615b86565b1080156112105750600681600001548154811061119857611198615b5a565b600091825260209091200154604051630855bbe960e01b8152600481018790526001600160a01b0390911690630855bbe990602401602060405180830381865afa1580156111ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120e9190615b99565b155b1561122e57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610e7d565b6004600185015460ff166004811115611260576112606154df565b0361127e576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916112bd9160ff1690615bb6565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061130990600160481b900460ff16600a615cab565b6113139084615cba565b61131d9190615ce7565b90505b92915050565b6000806007838154811061133c5761133c615b5a565b600091825260208220600360049092020190810180549193509061136290600190615b86565b8154811061137257611372615b5a565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106113a7576113a7615b5a565b90600052602060002090600c020190508060050154826003015410156113d257506000949350505050565b80546005805490916001600160601b03169081106113f2576113f2615b5a565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061143857611438615b5a565b600091825260208220600360049092020190810180549193509061145e90600190615b86565b8154811061146e5761146e615b5a565b90600052602060002090600b020190506000600682600001548154811061149757611497615b5a565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156114ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115109190615cfb565b9199909850909650945050505050565b6000546001600160a01b0316331461154b5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6005818154811061158657600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff16156115f957604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061160f5761160f615b5a565b600091825260209091206004918202019150600182015460ff16600481111561163a5761163a6154df565b1461165857604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061166d5761166d615b5a565b6000918252602082206004600b909202019081015490935091506116918483615d34565b60058401546006850154600286015492935090916000906116b3908390615ce7565b905060008660010154905060008060068960000154815481106116d8576116d8615b5a565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611734573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117589190615d47565b91505080600003611774578386111561176f578395505b611794565b61177f846002615cba565b86111561179457611791846002615cba565b95505b60048801869055865b8681101561184057848110156117f6576117ef6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613bb1565b9550611838565b6118386040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061405f565b60010161179d565b508488600501541461185457600588018590555b5050505050505050505050565b6000546001600160a01b0316331461188c5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6118b6615032565b6005826001600160601b0316815481106118d2576118d2615b5a565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116118f95750505050509050919050565b6000546001600160a01b031633146119435760405163c383977560e01b815260040160405180910390fd5b60095460ff166119665760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6004546001600160a01b031633146119c657604051639d6cab9960e01b815260040160405180910390fd5b6002546119dd906001600160a01b0316838361445c565b505050565b6119eb8261451f565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480611a6957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611a5d600080516020615f8f8339815191525490565b6001600160a01b031614155b15611a875760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611ae1575060408051601f3d908101601f19168201909252611ade91810190615d47565b60015b611b095781604051630c76093760e01b8152600401611b0091906152b4565b60405180910390fd5b600080516020615f8f8339815191528114611b3a57604051632a87526960e21b815260048101829052602401611b00565b600080516020615f8f8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156119dd576000836001600160a01b031683604051611ba19190615d60565b600060405180830381855af49150503d8060008114611bdc576040519150601f19603f3d011682016040523d82523d6000602084013e611be1565b606091505b5050905080610bc8576040516339b21b5d60e11b815260040160405180910390fd5b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c525760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615f8f83398151915290565b60078181548110611c7557600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611cd757611cd7615b5a565b6000918252602082206003600490920201908101805491935090611cfd90600190615b86565b81548110611d0d57611d0d615b5a565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611d4257611d42615b5a565b90600052602060002090600c020190508060050154826003015410611de15782546001600160601b031660001901611d83576001600160ff1b039350611e0e565b6003820154611d93906002615cba565b611d9e906001615d34565b81546005805490916001600160601b0316908110611dbe57611dbe615b5a565b90600052602060002090600c020160040154611dda9190615cba565b9350611e0e565b6003820154611df1906002615cba565b611dfc906001615d34565b8160040154611e0b9190615cba565b93505b505050919050565b6000546001600160a01b03163314611e415760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611e5c9190615d60565b60006040518083038185875af1925050503d8060008114611e99576040519150601f19603f3d011682016040523d82523d6000602084013e611e9e565b606091505b5050905080610bc8576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611ee457604051636f1dac1d60e01b815260040160405180910390fd5b600b546040516370a0823160e01b81526001600160a01b03909116906370a0823190611f149033906004016152b4565b602060405180830381865afa158015611f31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f559190615d47565b600003611f75576040516326b551e560e11b815260040160405180910390fd5b6119dd33838360006138ad565b6000546001600160a01b03163314611fad5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b0316331461202c5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b031633148015906120e457506000546001600160a01b03163314155b1561210257604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561212657604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146121895760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106121a7576121a7615b5a565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015612209575080546005805488926001600160601b03169081106121f5576121f5615b5a565b90600052602060002090600c020160020154115b1561222757604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156122a25786600583600101838154811061224e5761224e615b5a565b90600052602060002001548154811061226957612269615b5a565b90600052602060002090600c020160020154101561229a57604051639717078960e01b815260040160405180910390fd5b60010161222a565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556122e59060068301908490615050565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161232996959493929190615d7c565b60405180910390a25050505050505050565b60006007838154811061235057612350615b5a565b9060005260206000209060040201600301828154811061237257612372615b5a565b90600052602060002090600b020160010154905092915050565b6123f260405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6007838154811061240557612405615b5a565b9060005260206000209060040201600301828154811061242757612427615b5a565b90600052602060002090600b020160405180610160016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682018054806020026020016040519081016040528092919081815260200182805480156124d657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116124b8575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061252d5761252d615b5a565b600091825260209091206004918202019150600182015460ff166004811115612558576125586154df565b1461257657604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156125a15760405163c977f8d360e01b815260040160405180910390fd5b60006125ac8361141f565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c56906044015b600060405180830381600087803b15801561266057600080fd5b505af1158015612674573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146126a85760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106126c5576126c5615b5a565b90600052602060002090600c02016002015411156126f657604051639717078960e01b815260040160405180910390fd5b80516000036127185760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661273f57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b83518110156128015783818151811061279257612792615b5a565b6020026020010151600014806127c5575060065484518590839081106127ba576127ba615b5a565b602002602001015110155b156127e357604051633d58a98960e11b815260040160405180910390fd5b6127f983858381518110610c8457610c84615b5a565b600101612777565b5060016000908152600a8201602052604090205460ff16612835576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c16178155604080516000815260208101918290525161286d91600184019161508e565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556128b09060068301908790615050565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916128e2918691899101615daf565b600060405180830381600087803b1580156128fc57600080fd5b505af1158015612910573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061293057612930615b5a565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906129a0908e908e908e908e908e908e908d90615dc8565b60405180910390a35050505050505050505050565b600681815481106129c557600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106129f7576129f7615b5a565b6000918252602090912060049091020190506003600182015460ff166004811115612a2457612a246154df565b03612a7c576002810154815460058054929550916001600160601b03909116908110612a5257612a52615b5a565b600091825260209091206009600c9092020101546002820154612a759190615d34565b9150612a85565b60009250600091505b50915091565b6000546001600160a01b03163314612ab65760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612ae3826135d0565b341015612b0357604051630e3360f160e21b815260040160405180910390fd5b61131d838360003461454d565b6000546001600160a01b03163314612b3b5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612b6683611cc1565b341015612b8657604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612b9b57612b9b615b5a565b6000918252602090912060049091020190506003600182015460ff166004811115612bc857612bc86154df565b14612be6576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612bfc90600190615b86565b81548110612c0c57612c0c615b5a565b90600052602060002090600b020190506006816000015481548110612c3357612c33615b5a565b6000918252602090912001546001600160a01b03163314612c675760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612caa57612caa615b5a565b90600052602060002090600c020160050154846003015410612db3576005836001600160601b031681548110612ce257612ce2615b5a565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612d1557612d15615b5a565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612d4157600191505b84546001600160601b03848116911614612db357845460038601546001600160601b0390911690612d7490600190615b86565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612df657612df6615b5a565b90600052602060002090600c02019050806004015434612e169190615ce7565b8260030181905550612e3081600201548260030154614592565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612e6791615b86565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612ea557600080fd5b505af1158015612eb9573d6000803e3d6000fd5b505086548454149150612f9f90505784546003870154612edb90600190615b86565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612f2957612f29615b5a565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612f6c918d918d918d9190600401615e45565b600060405180830381600087803b158015612f8657600080fd5b505af1158015612f9a573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91600060405161300f9190615bb6565b60405180910390a2505050505050505050565b6000806007838154811061303857613038615b5a565b9060005260206000209060040201905080600301600182600301805490506130609190615b86565b8154811061307057613070615b5a565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b031633146130b55760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b6000806007848154811061314957613149615b5a565b9060005260206000209060040201905060006001826003018054905061316f9190615b86565b9050600082600301828154811061318857613188615b5a565b600091825260208220600b909102019150600184015460ff1660048111156131b2576131b26154df565b146131d057604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106131e9576131e9615b5a565b6000918252602082200154600a8401546001600160a01b039091169250905b878110801561321e575060038401546006850154105b156134265760006001600160a01b03841663d2b8035a8b8461323f81615e75565b955061324b9087615d34565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af115801561328e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132b29190615e8e565b90506001600160a01b0381166132c85750613208565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e926132fe928692909101615eab565b600060405180830381600087803b15801561331857600080fd5b505af115801561332c573d6000803e3d6000fd5b50505060068601546040518c92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b91613379918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036134205760048054604051632e96bc2360e11b81529182018c9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561340757600080fd5b505af115801561341b573d6000803e3d6000fd5b505050505b50613208565b8084600a01600082825461343a9190615d34565b90915550505060069092015494505050505092915050565b60006134978261044786868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506135d092505050565b949350505050565b6000546001600160a01b031633146134ca5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166135255760405163e51cf7bf60e01b815260040160405180910390fd5b613530858585613452565b82101561355057604051630e3360f160e21b815260040160405180910390fd5b6135656001600160a01b0384163330856145a1565b613582576040516312171d8360e31b815260040160405180910390fd5b6135c68686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525088925087915061454d9050565b9695505050505050565b60008060006135de8461467d565b5091509150806005836001600160601b03168154811061360057613600615b5a565b90600052602060002090600c0201600401546134979190615cba565b60066000613628614704565b8054909150600160401b900460ff168061364f575080546001600160401b03808416911610155b1561366c5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff19909216821717825560098054610100600160a81b0319166101006001600160a01b03871602179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60006007828154811061370857613708615b5a565b600091825260209091206003600490920201015492915050565b6002600061372e614704565b8054909150600160401b900460ff1680613755575080546001600160401b03808416911610155b156137725760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556137a68e8e8e8e8e8e8e8e8e8e8d614728565b600b80546001600160a01b0319166001600160a01b038616179055805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050505050505050565b6000546001600160a01b031633146138435760405163c383977560e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006005836001600160601b03168154811061388357613883615b5a565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b60006001600160601b03841615806138d057506005546001600160601b03851610155b156138e8576138e0826005614a6b565b506000613497565b821580159061392357506005846001600160601b03168154811061390e5761390e615b5a565b90600052602060002090600c02016002015483105b15613933576138e0826006614a6b565b600480546040516303d9595760e31b81526001600160a01b03888116938201939093526001600160601b03871660248201526044810186905260009283928392911690631ecacab8906064016060604051808303816000875af115801561399e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139c29190615ec4565b9194509250905060008160098111156139dd576139dd6154df565b141580156139fd575060018160098111156139fa576139fa6154df565b14155b15613a1857613a0c8582614a6b565b60009350505050613497565b6001816009811115613a2c57613a2c6154df565b03613a3d5760019350505050613497565b8215613a6a57600254613a5b906001600160a01b03168930866145a1565b613a6a57613a0c856002614a6b565b8115613a9657600254613a87906001600160a01b0316898461445c565b613a9657613a0c856003614a6b565b600480546040516355601d6960e11b81526001600160a01b038b8116938201939093526001600160601b038a16602482015260448101869052606481018590526084810189905291169063aac03ad29060a401600060405180830381600087803b158015613b0357600080fd5b505af1158015613b17573d6000803e3d6000fd5b5060019b9a5050505050505050505050565b806005846001600160601b031681548110613b4657613b46615b5a565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b6000806007836000015181548110613bcb57613bcb615b5a565b90600052602060002090600402019050600081600301846020015181548110613bf657613bf6615b5a565b90600052602060002090600b0201905060006006826000015481548110613c1f57613c1f615b5a565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc99190615d47565b9050612710811115613cda57506127105b6000612710613ce98382615b86565b8560010154613cf89190615cba565b613d029190615ce7565b90506000846006018860e0015181548110613d1f57613d1f615b5a565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613d60918591879101615eab565b600060405180830381600087803b158015613d7a57600080fd5b505af1158015613d8e573d6000803e3d6000fd5b505060048054604051633c85b79360e21b8152600094508493506001600160a01b039091169163f216de4c91613dc8918791899101615eab565b60408051808303816000875af1158015613de6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e0a9190615ef7565b91509150808a60c001818151613e209190615d34565b90525060208a01518a516001600160a01b0385167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e788613e5f86615f1b565b60098d0154604051613e819392916000916001600160a01b0390911690615f37565b60405180910390a4811580613f165750895160208b015160e08c015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0387169063ba66fde790606401602060405180830381865afa158015613ef0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f149190615b99565b155b15613f7d576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e9991613f4a918791016152b4565b600060405180830381600087803b158015613f6457600080fd5b505af1158015613f78573d6000803e3d6000fd5b505050505b60018a60600151613f8e9190615b86565b8a60e00151148015613fa2575060408a0151155b1561404c5760098701546000546002890154613fcb926001600160a01b03908116921690614ad9565b60005460c08b0151600254613fee926001600160a01b039182169291169061445c565b5060208a01518a5160c08c015160028a015460098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361404393909290916001600160a01b0390911690615f5b565b60405180910390a35b50505060c0909601519695505050505050565b6000600782600001518154811061407857614078615b5a565b906000526020600020906004020190506000816003018360200151815481106140a3576140a3615b5a565b90600052602060002090600b02019050600060068260000154815481106140cc576140cc615b5a565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f69390929161410b91615f7a565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa15801561416b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061418f9190615d47565b90506127108111156141a057506127105b60008360060186606001518760e001516141ba9190615f7a565b815481106141ca576141ca615b5a565b600091825260208220015460018601546001600160a01b0390911692506141f19084614592565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791614223918691869101615eab565b600060405180830381600087803b15801561423d57600080fd5b505af1158015614251573d6000803e3d6000fd5b50505050600061427488604001518960c0015161426e9190615ce7565b85614592565b90508086600801600082825461428a9190615d34565b9250508190555060006142b0896040015188600201546142aa9190615ce7565b86614592565b9050808760070160008282546142c69190615d34565b90915550506002546142e2906001600160a01b0316858461445c565b5060098701546142fc906001600160a01b03168583614ad9565b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79261434c928c928a928a9290911690615f37565b60405180910390a46001896060015160026143679190615cba565b6143719190615b86565b8960e001510361445157600087600801548a60c001516143919190615b86565b90506000886007015489600201546143a99190615b86565b9050811515806143b857508015155b156118545781156143e2576000546002546143e0916001600160a01b0391821691168461445c565b505b8015614407576009890154600054614407916001600160a01b03908116911683614ad9565b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916129a091879187916001600160a01b0390911690615f5b565b505050505050505050565b6000806000856001600160a01b0316858560405160240161447e929190615eab565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516144b39190615d60565b6000604051808303816000865af19150503d80600081146144f0576040519150601f19603f3d011682016040523d82523d6000602084013e6144f5565b606091505b50915091508180156135c65750805115806135c65750808060200190518101906135c69190615b99565b6000546001600160a01b0316331461454a5760405163c383977560e01b815260040160405180910390fd5b50565b336000908152600a602052604081205460ff1661457d57604051630407618360e31b815260040160405180910390fd5b61458985858585614b1c565b95945050505050565b60006127106113138385615cba565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516146069190615d60565b6000604051808303816000865af19150503d8060008114614643576040519150601f19603f3d011682016040523d82523d6000602084013e614648565b606091505b50915091508180156146725750805115806146725750808060200190518101906146729190615b99565b979650505050505050565b600080600060408451106146f2575050506020810151604082015160608301516001600160601b03831615806146be57506005546001600160601b03841610155b156146c857600192505b816000036146d557600391505b8015806146e457506006548110155b156146ed575060015b6146fd565b506001915060039050815b9193909250565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b614730614df7565b600080546001600160a01b03199081166001600160a01b038e81169190911783556001805483168e83161781556002805484168e84161781556003805485168e851617905560048054851688851617905560098054610100600160a81b031916610100888616021790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918b1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261483b92889101615daf565b600060405180830381600087803b15801561485557600080fd5b505af1158015614869573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516148d791600184019160209091019061508e565b50805460ff60601b1916600160601b8815150217815585516002820155602086015160038201556040860151600480830191909155606087015160058301556149269060068301908790615050565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161495991600191899101615daf565b600060405180830381600087803b15801561497357600080fd5b505af1158015614987573d6000803e3d6000fd5b5060009250600191506149979050565b6040519080825280602002602001820160405280156149c0578160200160208202803683370190505b5090506001816000815181106149d8576149d8615b5a565b602090810291909101015281546001600160601b031660017f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee68a8a600060200201518b600160200201518c600260200201518d600360200201518d89604051614a479796959493929190615dc8565b60405180910390a3614a5c6001806001613b29565b50505050505050505050505050565b614a758282614e1e565b6007816009811115614a8957614a896154df565b03614aa757604051636590e91560e01b815260040160405180910390fd5b6008816009811115614abb57614abb6154df565b03611c03576040516358859f1d60e01b815260040160405180910390fd5b6001600160a01b038316614b08576009546119dd906001600160a01b0384811691849161010090910416614f67565b610bc86001600160a01b038416838361445c565b6000806000614b2a8661467d565b92505091506005826001600160601b031681548110614b4b57614b4b615b5a565b60009182526020808320848452600a600c90930201919091019052604090205460ff16614b8b5760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614c1657614c16615b5a565b6000918252602082200154600580546001600160a01b039092169350906001600160601b038716908110614c4c57614c4c615b5a565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614c9757614c928a84600401546112cc565b614c9d565b82600401545b9050614ca9818a615ce7565b600380840191909155868355600284015490840154614cc89190614592565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b158015614d3b57600080fd5b505af1158015614d4f573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b8152600401614d899493929190615e45565b600060405180830381600087803b158015614da357600080fd5b505af1158015614db7573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b614dff615018565b614e1c57604051631afcd79f60e31b815260040160405180910390fd5b565b6001826001811115614e3257614e326154df565b03614e3b575050565b6002816009811115614e4f57614e4f6154df565b03614e6d57604051630f323ed960e11b815260040160405180910390fd5b6003816009811115614e8157614e816154df565b03614e9f5760405163e45e13a360e01b815260040160405180910390fd5b6004816009811115614eb357614eb36154df565b03614ed157604051631d91d0ed60e31b815260040160405180910390fd5b6005816009811115614ee557614ee56154df565b03614f0357604051637c84af5160e01b815260040160405180910390fd5b6006816009811115614f1757614f176154df565b03614f3557604051630caac6b360e31b815260040160405180910390fd5b6009816009811115614f4957614f496154df565b03611c0357604051633e57962f60e21b815260040160405180910390fd5b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015614f9657505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015614fd157600080fd5b505af1158015614fe5573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516935063a9059cbb9250612646915086908690600401615eab565b6000615022614704565b54600160401b900460ff16919050565b60405180608001604052806004906020820280368337509192915050565b826004810192821561507e579160200282015b8281111561507e578251825591602001919060010190615063565b5061508a9291506150c8565b5090565b82805482825590600052602060002090810192821561507e579160200282018281111561507e578251825591602001919060010190615063565b5b8082111561508a57600081556001016150c9565b6001600160a01b038116811461454a57600080fd5b80356150fd816150dd565b919050565b60006020828403121561511457600080fd5b813561511f816150dd565b9392505050565b80356001600160601b03811681146150fd57600080fd5b60008060006060848603121561515257600080fd5b833561515d816150dd565b925061516b60208501615126565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156151ba576151ba61517c565b604052919050565b600082601f8301126151d357600080fd5b81356001600160401b038111156151ec576151ec61517c565b8060051b6151fc60208201615192565b9182526020818501810192908101908684111561521857600080fd5b6020860192505b838310156135c657823582526020928301929091019061521f565b801515811461454a57600080fd5b80356150fd8161523a565b60008060006060848603121561526857600080fd5b61527184615126565b925060208401356001600160401b0381111561528c57600080fd5b615298868287016151c2565b92505060408401356152a98161523a565b809150509250925092565b6001600160a01b0391909116815260200190565b6000602082840312156152da57600080fd5b5035919050565b600080604083850312156152f457600080fd5b82356152ff816150dd565b946020939093013593505050565b6000806040838503121561532057600080fd5b823561532b816150dd565b9150602083013561533b8161523a565b809150509250929050565b60008060006060848603121561535b57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561538457600080fd5b61131d82615126565b8060005b6004811015610bc8578151845260209384019390910190600101615391565b60808101611320828461538d565b600082601f8301126153cf57600080fd5b81356001600160401b038111156153e8576153e861517c565b6153fb601f8201601f1916602001615192565b81815284602083860101111561541057600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561544057600080fd5b823561544b816150dd565b915060208301356001600160401b0381111561546657600080fd5b615472858286016153be565b9150509250929050565b60005b8381101561549757818101518382015260200161547f565b50506000910152565b600081518084526154b881602086016020860161547c565b601f01601f19169290920160200192915050565b60208152600061131d60208301846154a0565b634e487b7160e01b600052602160045260246000fd5b6005811061551357634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a0810161554360408301866154f5565b9215156060820152608001529392505050565b60008060006060848603121561556b57600080fd5b8335615576816150dd565b92506020840135915060408401356001600160401b0381111561559857600080fd5b6155a4868287016153be565b9150509250925092565b600080604083850312156155c157600080fd5b6152ff83615126565b6000806000606084860312156155df57600080fd5b83356155ea816150dd565b925060208401356001600160401b038116811461560657600080fd5b9150604084013560ff811681146152a957600080fd5b600082601f83011261562d57600080fd5b604051608081016001600160401b038111828210171561564f5761564f61517c565b60405280608084018581111561566457600080fd5b845b8181101561567e578035835260209283019201615666565b509195945050505050565b6000806000806000806000610140888a0312156156a557600080fd5b6156ae88615126565b965060208801356156be8161523a565b955060408801359450606088013593506080880135925060a088013591506156e98960c08a0161561c565b905092959891949750929550565b6000806040838503121561570a57600080fd5b50508035926020909101359150565b600081518084526020840193506020830160005b828110156157545781516001600160a01b031686526020958601959091019060010161572d565b5093949350505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c083015161016060e08401526157b8610180840182615719565b905060e08401516101008401526101008401516101208401526101208401516157ed6101408501826001600160a01b03169052565b506101408401516101608401528091505092915050565b60008060008060008060008060006101808a8c03121561582357600080fd5b61582c8a615126565b985060208a013561583c8161523a565b975060408a0135965060608a0135955060808a0135945060a08a013593506158678b60c08c0161561c565b92506101408a01356001600160401b0381111561588357600080fd5b61588f8c828d016153be565b9250506101608a01356001600160401b038111156158ac57600080fd5b6158b88c828d016151c2565b9150509295985092959850929598565b600080604083850312156158db57600080fd5b8235915060208301356001600160401b0381111561546657600080fd5b60008060006060848603121561590d57600080fd5b833592506020840135915060408401356001600160401b0381111561559857600080fd5b60008083601f84011261594357600080fd5b5081356001600160401b0381111561595a57600080fd5b60208301915083602082850101111561597257600080fd5b9250929050565b60008060006040848603121561598e57600080fd5b83356001600160401b038111156159a457600080fd5b6159b086828701615931565b90945092505060208401356152a9816150dd565b6000806000806000608086880312156159dc57600080fd5b8535945060208601356001600160401b038111156159f957600080fd5b615a0588828901615931565b9095509350506040860135615a19816150dd565b949793965091946060013592915050565b600060208284031215615a3c57600080fd5b81356001600160401b03811115615a5257600080fd5b613497848285016153be565b6000806000806000806000806000806000806102408d8f031215615a8157600080fd5b615a8a8d6150f2565b9b50615a9860208e016150f2565b9a50615aa660408e016150f2565b9950615ab460608e016150f2565b9850615ac260808e016150f2565b9750615ad060a08e01615248565b9650615adf8e60c08f0161561c565b9550615aef8e6101408f0161561c565b94506001600160401b036101c08e01351115615b0a57600080fd5b615b1b8e6101c08f01358f016153be565b9350615b2a6101e08e016150f2565b9250615b396102008e016150f2565b9150615b486102208e016150f2565b90509295989b509295989b509295989b565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561132057611320615b70565b600060208284031215615bab57600080fd5b815161511f8161523a565b6020810161132082846154f5565b6001815b6001841115615bff57808504811115615be357615be3615b70565b6001841615615bf157908102905b60019390931c928002615bc8565b935093915050565b600082615c1657506001611320565b81615c2357506000611320565b8160018114615c395760028114615c4357615c5f565b6001915050611320565b60ff841115615c5457615c54615b70565b50506001821b611320565b5060208310610133831016604e8410600b8410161715615c82575081810a611320565b615c8f6000198484615bc4565b8060001904821115615ca357615ca3615b70565b029392505050565b600061131d60ff841683615c07565b808202811582820484141761132057611320615b70565b634e487b7160e01b600052601260045260246000fd5b600082615cf657615cf6615cd1565b500490565b600080600060608486031215615d1057600080fd5b83516020850151909350615d238161523a565b60408501519092506152a98161523a565b8082018082111561132057611320615b70565b600060208284031215615d5957600080fd5b5051919050565b60008251615d7281846020870161547c565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261467260a083018461538d565b82815260406020820152600061349760408301846154a0565b600061014082018915158352886020840152876040840152866060840152856080840152615df960a084018661538d565b610140610120840152835190819052602084019061016084019060005b81811015615e34578351835260209384019390920191600101615e16565b50909b9a5050505050505050505050565b848152836020820152608060408201526000615e6460808301856154a0565b905082606083015295945050505050565b600060018201615e8757615e87615b70565b5060010190565b600060208284031215615ea057600080fd5b815161511f816150dd565b6001600160a01b03929092168252602082015260400190565b600080600060608486031215615ed957600080fd5b8351602085015160408601519194509250600a81106152a957600080fd5b60008060408385031215615f0a57600080fd5b505080516020909101519092909150565b6000600160ff1b8201615f3057615f30615b70565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615f8957615f89615cd1565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122004d0e8698d556c8622b85aecf09450b7bc71e8101fe95c2464a140be1c6fb1b364736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "AcceptedFeeToken(address,bool)": { - "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", - "params": { - "_accepted": "Whether the token is accepted or not.", - "_token": "The ERC20 token." - } - }, - "DisputeCreation(uint256,address)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_arbitrable": "The contract which created the dispute.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "NewCurrencyRate(address,uint64,uint8)": { - "details": "To be emitted when the fee for a particular ERC20 token is updated.", - "params": { - "_feeToken": "The ERC20 token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrable": "The arbitrable receiving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "addNewDisputeKit(address)": { - "details": "Add a new supported dispute kit module to the court.", - "params": { - "_disputeKitAddress": "The address of the dispute kit contract." - } - }, - "appeal(uint256,uint256,bytes)": { - "details": "Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.", - "params": { - "_disputeID": "The ID of the dispute.", - "_extraData": "Extradata for the dispute. Can be required during court jump.", - "_numberOfChoices": "Number of choices for the dispute. Can be required during court jump." - } - }, - "appealCost(uint256)": { - "details": "Gets the cost of appealing a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "cost": "The appeal cost." - } - }, - "appealPeriod(uint256)": { - "details": "Gets the start and the end of a specified dispute's current appeal period.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "end": "The end of the appeal period.", - "start": "The start of the appeal period." - } - }, - "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." - }, - "returns": { - "cost": "The arbitration cost in ETH." - } - }, - "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeToken": "The ERC20 token used to pay fees." - }, - "returns": { - "cost": "The arbitration cost in `_feeToken`." - } - }, - "changeAcceptedFeeTokens(address,bool)": { - "details": "Changes the supported fee tokens.", - "params": { - "_accepted": "Whether the token is supported or not as a method of fee payment.", - "_feeToken": "The fee token." - } - }, - "changeArbitrableWhitelist(address,bool)": { - "details": "Adds or removes an arbitrable from whitelist.", - "params": { - "_allowed": "Whether add or remove permission.", - "_arbitrable": "Arbitrable address." - } - }, - "changeCurrencyRates(address,uint64,uint8)": { - "details": "Changes the currency rate of a fee token.", - "params": { - "_feeToken": "The fee token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "changeGuardian(address)": { - "details": "Changes the `guardian` storage variable.", - "params": { - "_guardian": "The new value for the `guardian` storage variable." - } - }, - "changeJurorNft(address)": { - "details": "Changes the `jurorNft` storage variable.", - "params": { - "_jurorNft": "The new value for the `jurorNft` storage variable." - } - }, - "changeJurorProsecutionModule(address)": { - "details": "Changes the `jurorProsecutionModule` storage variable.", - "params": { - "_jurorProsecutionModule": "The new value for the `jurorProsecutionModule` storage variable." - } - }, - "changePinakion(address)": { - "details": "Changes the `pinakion` storage variable.", - "params": { - "_pinakion": "The new value for the `pinakion` storage variable." - } - }, - "changeSortitionModule(address)": { - "details": "Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.", - "params": { - "_sortitionModule": "The new value for the `sortitionModule` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],bytes,uint256[])": { - "details": "Creates a court under a specified parent court.", - "params": { - "_alpha": "The `alpha` property value of the court.", - "_feeForJuror": "The `feeForJuror` property value of the court.", - "_hiddenVotes": "The `hiddenVotes` property value of the court.", - "_jurorsForCourtJump": "The `jurorsForCourtJump` property value of the court.", - "_minStake": "The `minStake` property value of the court.", - "_parent": "The `parent` property value of the court.", - "_sortitionExtraData": "Extra data for sortition module.", - "_supportedDisputeKits": "Indexes of dispute kits that this court will support.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the court." - } - }, - "createDispute(uint256,bytes)": { - "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "createDispute(uint256,bytes,address,uint256)": { - "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeAmount": "Amount of the ERC20 token used to pay fees.", - "_feeToken": "The ERC20 token used to pay fees.", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws jurors for the dispute. Can be called in parts.", - "params": { - "_disputeID": "The ID of the dispute.", - "_iterations": "The number of iterations to run." - }, - "returns": { - "nbDrawnJurors": "The total number of jurors drawn in the round." - } - }, - "enableDisputeKits(uint96,uint256[],bool)": { - "details": "Adds/removes court's support for specified dispute kits.", - "params": { - "_courtID": "The ID of the court.", - "_disputeKitIDs": "The IDs of dispute kits which support should be added/removed.", - "_enable": "Whether add or remove the dispute kits from the court." - } - }, - "execute(uint256,uint256,uint256)": { - "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts. Note: Reward distributions are forbidden during pause.", - "params": { - "_disputeID": "The ID of the dispute.", - "_iterations": "The number of iterations to run.", - "_round": "The appeal round." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "executeRuling(uint256)": { - "details": "Executes a specified dispute's ruling.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Gets the number of rounds for a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "_0": "The number of rounds." - } - }, - "getNumberOfVotes(uint256)": { - "details": "Gets the number of votes permitted for the specified dispute in the latest round.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getPnkAtStakePerJuror(uint256,uint256)": { - "details": "Gets the PNK at stake per juror for a specified dispute and round.", - "params": { - "_disputeID": "The ID of the dispute.", - "_round": "The round to get the info for." - }, - "returns": { - "_0": "pnkAtStakePerJuror The PNK at stake per juror." - } - }, - "getRoundInfo(uint256,uint256)": { - "details": "Gets the round info for a specified dispute and round.This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.", - "params": { - "_disputeID": "The ID of the dispute.", - "_round": "The round to get the info for." - }, - "returns": { - "_0": "round The round info." - } - }, - "getTimesPerPeriod(uint96)": { - "details": "Gets the timesPerPeriod array for a given court.", - "params": { - "_courtID": "The ID of the court to get the times from." - }, - "returns": { - "timesPerPeriod": "The timesPerPeriod array for the given court." - } - }, - "initialize(address,address,address,address,address,bool,uint256[4],uint256[4],bytes,address,address,address)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", - "_disputeKit": "The address of the default dispute kit.", - "_governor": "The governor's address.", - "_guardian": "The guardian's address.", - "_hiddenVotes": "The `hiddenVotes` property value of the general court.", - "_jurorNft": "NFT contract to vet the jurors.", - "_jurorProsecutionModule": "The address of the juror prosecution module.", - "_pinakion": "The address of the token contract.", - "_sortitionExtraData": "The extra data for sortition module.", - "_sortitionModuleAddress": "The sortition module responsible for sortition of the jurors.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the general court.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isDisputeKitJumping(uint256)": { - "details": "Returns true if the dispute kit will be switched to a parent DK.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "_0": "Whether DK will be switched or not." - } - }, - "isSupported(uint96,uint256)": { - "details": "Checks if a given dispute kit is supported by a given court.", - "params": { - "_courtID": "The ID of the court to check the support for.", - "_disputeKitID": "The ID of the dispute kit to check the support for." - }, - "returns": { - "_0": "Whether the dispute kit is supported or not." - } - }, - "passPeriod(uint256)": { - "details": "Passes the period of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "pause()": { - "details": "Pause staking and reward execution. Can only be done by guardian or governor." - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setStake(uint96,uint256)": { - "details": "Sets the caller's stake in a court. Note: Staking and unstaking is forbidden during pause.", - "params": { - "_courtID": "The ID of the court.", - "_newStake": "The new stake. Note that the existing delayed stake will be nullified as non-relevant." - } - }, - "setStakeBySortitionModule(address,uint96,uint256)": { - "details": "Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.", - "params": { - "_account": "The account whose stake is being set.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake." - } - }, - "transferBySortitionModule(address,uint256)": { - "details": "Transfers PNK to the juror by SortitionModule.", - "params": { - "_account": "The account of the juror whose PNK to transfer.", - "_amount": "The amount to transfer." - } - }, - "unpause()": { - "details": "Unpause staking and reward execution. Can only be done by governor." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "KlerosCoreNeo Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 11279, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 11281, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "guardian", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 11284, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "pinakion", - "offset": 0, - "slot": "2", - "type": "t_contract(IERC20)2923" - }, - { - "astId": 11286, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "jurorProsecutionModule", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 11289, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "sortitionModule", - "offset": 0, - "slot": "4", - "type": "t_contract(ISortitionModule)26449" - }, - { - "astId": 11293, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "courts", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(Court)11198_storage)dyn_storage" - }, - { - "astId": 11297, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "disputeKits", - "offset": 0, - "slot": "6", - "type": "t_array(t_contract(IDisputeKit)26259)dyn_storage" - }, - { - "astId": 11301, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "disputes", - "offset": 0, - "slot": "7", - "type": "t_array(t_struct(Dispute)11215_storage)dyn_storage" - }, - { - "astId": 11307, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "currencyRates", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_contract(IERC20)2923,t_struct(CurrencyRate)11264_storage)" - }, - { - "astId": 11309, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "paused", - "offset": 0, - "slot": "9", - "type": "t_bool" - }, - { - "astId": 11311, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "wNative", - "offset": 1, - "slot": "9", - "type": "t_address" - }, - { - "astId": 14870, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "arbitrableWhitelist", - "offset": 0, - "slot": "10", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 14873, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "jurorNft", - "offset": 0, - "slot": "11", - "type": "t_contract(IERC721)4069" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "base": "t_address", - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_contract(IDisputeKit)26259)dyn_storage": { - "base": "t_contract(IDisputeKit)26259", - "encoding": "dynamic_array", - "label": "contract IDisputeKit[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Court)11198_storage)dyn_storage": { - "base": "t_struct(Court)11198_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Court[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Dispute)11215_storage)dyn_storage": { - "base": "t_struct(Dispute)11215_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)11240_storage)dyn_storage": { - "base": "t_struct(Round)11240_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)4_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[4]", - "numberOfBytes": "128" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IArbitrableV2)26008": { - "encoding": "inplace", - "label": "contract IArbitrableV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeKit)26259": { - "encoding": "inplace", - "label": "contract IDisputeKit", - "numberOfBytes": "20" - }, - "t_contract(IERC20)2923": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_contract(IERC721)4069": { - "encoding": "inplace", - "label": "contract IERC721", - "numberOfBytes": "20" - }, - "t_contract(ISortitionModule)26449": { - "encoding": "inplace", - "label": "contract ISortitionModule", - "numberOfBytes": "20" - }, - "t_enum(Period)11172": { - "encoding": "inplace", - "label": "enum KlerosCoreBase.Period", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_contract(IERC20)2923,t_struct(CurrencyRate)11264_storage)": { - "encoding": "mapping", - "key": "t_contract(IERC20)2923", - "label": "mapping(contract IERC20 => struct KlerosCoreBase.CurrencyRate)", - "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)11264_storage" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_struct(Court)11198_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Court", - "members": [ - { - "astId": 11174, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "parent", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 11176, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "hiddenVotes", - "offset": 12, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 11179, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "children", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 11181, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "minStake", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 11183, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "alpha", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 11185, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "feeForJuror", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 11187, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "jurorsForCourtJump", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 11191, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "timesPerPeriod", - "offset": 0, - "slot": "6", - "type": "t_array(t_uint256)4_storage" - }, - { - "astId": 11195, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "supportedDisputeKits", - "offset": 0, - "slot": "10", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 11197, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "disabled", - "offset": 0, - "slot": "11", - "type": "t_bool" - } - ], - "numberOfBytes": "384" - }, - "t_struct(CurrencyRate)11264_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.CurrencyRate", - "members": [ - { - "astId": 11259, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "feePaymentAccepted", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 11261, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "rateInEth", - "offset": 1, - "slot": "0", - "type": "t_uint64" - }, - { - "astId": 11263, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "rateDecimals", - "offset": 9, - "slot": "0", - "type": "t_uint8" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Dispute)11215_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Dispute", - "members": [ - { - "astId": 11200, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "courtID", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 11203, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "arbitrated", - "offset": 12, - "slot": "0", - "type": "t_contract(IArbitrableV2)26008" - }, - { - "astId": 11206, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "period", - "offset": 0, - "slot": "1", - "type": "t_enum(Period)11172" - }, - { - "astId": 11208, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "ruled", - "offset": 1, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 11210, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "lastPeriodChange", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 11214, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "rounds", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(Round)11240_storage)dyn_storage" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Round)11240_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Round", - "members": [ - { - "astId": 11217, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "disputeKitID", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 11219, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "pnkAtStakePerJuror", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 11221, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "totalFeesForJurors", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 11223, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "nbVotes", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 11225, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "repartitions", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 11227, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "pnkPenalties", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 11230, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "drawnJurors", - "offset": 0, - "slot": "6", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 11232, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "sumFeeRewardPaid", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 11234, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "sumPnkRewardPaid", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 11237, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "feeToken", - "offset": 0, - "slot": "9", - "type": "t_contract(IERC20)2923" - }, - { - "astId": 11239, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "drawIterations", - "offset": 0, - "slot": "10", - "type": "t_uint256" - } - ], - "numberOfBytes": "352" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint64": { - "encoding": "inplace", - "label": "uint64", - "numberOfBytes": "8" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrum/KlerosCore_Proxy.json b/contracts/deployments/arbitrum/KlerosCore_Proxy.json deleted file mode 100644 index cd78726b2..000000000 --- a/contracts/deployments/arbitrum/KlerosCore_Proxy.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "transactionIndex": 2, - "gasUsed": "836960", - "logsBloom": "0x00000002000200000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000420000000000000010000800402000000000000008000000000000000000000000000000000800000000000080000000000080000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000200000000004000000000000000060000000001001000000800000000000000000000000000000000000000000000000", - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247", - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 272063254, - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x00000000000000000000000070b464be85a547144c72485eba2577e5d3a45421" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" - }, - { - "transactionIndex": 2, - "blockNumber": 272063254, - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 2, - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" - }, - { - "transactionIndex": 2, - "blockNumber": 272063254, - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" - }, - { - "transactionIndex": 2, - "blockNumber": 272063254, - "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", - "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 4, - "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" - } - ], - "blockNumber": 272063254, - "cumulativeGasUsed": "918567", - "status": 1, - "byzantium": true - }, - "args": [ - "0x17c39AB53A7072b167A74a85D47b30385c98ae89", - "0x2c053739000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070b464be85a547144c72485eba2577e5d3a45421000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000022000000000000000000000000021a9402adb818744b296e1d1be58c804118dc03d000000000000000000000000fe34a72c55e512601e7d491a9c5b36373ce34d6300000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreNeoProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206184205afef335e3929cbe6d07c51961f33c4cbe24e68a0b19e4f7ab6df6903064736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206184205afef335e3929cbe6d07c51961f33c4cbe24e68a0b19e4f7ab6df6903064736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/KlerosV2NeoEarlyUser.json b/contracts/deployments/arbitrum/KlerosV2NeoEarlyUser.json deleted file mode 100644 index 6557302a1..000000000 --- a/contracts/deployments/arbitrum/KlerosV2NeoEarlyUser.json +++ /dev/null @@ -1,723 +0,0 @@ -{ - "address": "0xfE34a72c55e512601E7d491A9c5b36373cE34d63", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newMinter", - "type": "address" - } - ], - "name": "EventMinterAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldMinter", - "type": "address" - } - ], - "name": "EventMinterRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "addMinter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "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": [], - "name": "baseURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "burnBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "cid", - "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": [], - "name": "getNumMinted", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "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": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "isOwnerOf", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "cid", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "cidArr", - "type": "uint256[]" - } - ], - "name": "mintBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "minters", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "removeMinter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "setName", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newSymbol", - "type": "string" - } - ], - "name": "setSymbol", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "transferable", - "type": "bool" - } - ], - "name": "setTransferable", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newURI", - "type": "string" - } - ], - "name": "setURI", - "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": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenOfOwnerByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "transferable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ] -} diff --git a/contracts/deployments/arbitrum/PNK.json b/contracts/deployments/arbitrum/PNK.json deleted file mode 120000 index 3bc687fa7..000000000 --- a/contracts/deployments/arbitrum/PNK.json +++ /dev/null @@ -1 +0,0 @@ -Pinakion.json \ No newline at end of file diff --git a/contracts/deployments/arbitrum/PNKFaucet.json b/contracts/deployments/arbitrum/PNKFaucet.json deleted file mode 100644 index f880395bc..000000000 --- a/contracts/deployments/arbitrum/PNKFaucet.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "address": "0x0000000000000000000000000000000000000000", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "amount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "changeAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ] -} diff --git a/contracts/deployments/arbitrum/Pinakion.json b/contracts/deployments/arbitrum/Pinakion.json deleted file mode 100644 index 2fab003bd..000000000 --- a/contracts/deployments/arbitrum/Pinakion.json +++ /dev/null @@ -1,280 +0,0 @@ -{ - "address": "0x330bD769382cFc6d50175903434CCC8D206DCAE5", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ] -} diff --git a/contracts/deployments/arbitrum/PolicyRegistry.json b/contracts/deployments/arbitrum/PolicyRegistry.json deleted file mode 100644 index b0d9a0bb4..000000000 --- a/contracts/deployments/arbitrum/PolicyRegistry.json +++ /dev/null @@ -1,311 +0,0 @@ -{ - "address": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "PolicyUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "policies", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "setPolicy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", - "transactionIndex": 2, - "gasUsed": "353404", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000088000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000008000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x813d680f913ac698f1004b8ecaef18f96f7f7962ac9103391c6ced97cf9039db", - "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 272063037, - "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", - "address": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x813d680f913ac698f1004b8ecaef18f96f7f7962ac9103391c6ced97cf9039db" - } - ], - "blockNumber": 272063037, - "cumulativeGasUsed": "448355", - "status": 1, - "byzantium": true - }, - "args": [ - "0x15E5964C7751dF8563eA4bC000301582C79BC454", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 2, - "solcInputHash": "3becf00d91b882372d51b0fc9f6a5781", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"PolicyRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", - "execute": { - "methodName": "initialize2", - "args": [] - }, - "implementation": "0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/PolicyRegistry_Implementation.json b/contracts/deployments/arbitrum/PolicyRegistry_Implementation.json deleted file mode 100644 index c12e72de8..000000000 --- a/contracts/deployments/arbitrum/PolicyRegistry_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "PolicyUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "policies", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "setPolicy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x59d9270bdd89ba9e63e465d4479d348374be88171baa8ae8b36add3791280941", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28", - "transactionIndex": 13, - "gasUsed": "1018766", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800010000000000000000000080000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000020000000000000000000000000000000000000000", - "blockHash": "0x894906b5785fe65b1f448a3ca394fdbd8b81d724e93ee27af6b342a17e91c43d", - "transactionHash": "0x59d9270bdd89ba9e63e465d4479d348374be88171baa8ae8b36add3791280941", - "logs": [ - { - "transactionIndex": 13, - "blockNumber": 337009849, - "transactionHash": "0x59d9270bdd89ba9e63e465d4479d348374be88171baa8ae8b36add3791280941", - "address": "0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 20, - "blockHash": "0x894906b5785fe65b1f448a3ca394fdbd8b81d724e93ee27af6b342a17e91c43d" - } - ], - "blockNumber": 337009849, - "cumulativeGasUsed": "2994581", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "3becf00d91b882372d51b0fc9f6a5781", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"PolicyUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"policies\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"setPolicy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a policy for each court.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"PolicyUpdate(uint256,string,string)\":{\"details\":\"Emitted when a policy is updated.\",\"params\":{\"_courtID\":\"The ID of the policy's court.\",\"_courtName\":\"The name of the policy's court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"details\":\"Constructs the `PolicyRegistry` contract.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setPolicy(uint256,string,string)\":{\"details\":\"Sets the policy for the specified court.\",\"params\":{\"_courtID\":\"The ID of the specified court.\",\"_courtName\":\"The name of the specified court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"PolicyRegistry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/PolicyRegistry.sol\":\"PolicyRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/arbitration/PolicyRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title PolicyRegistry\\n/// @dev A contract to maintain a policy for each court.\\ncontract PolicyRegistry is UUPSProxiable, Initializable {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a policy is updated.\\n /// @param _courtID The ID of the policy's court.\\n /// @param _courtName The name of the policy's court.\\n /// @param _policy The URI of the policy JSON.\\n event PolicyUpdate(uint256 indexed _courtID, string _courtName, string _policy);\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor;\\n mapping(uint256 => string) public policies;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Requires that the sender is the governor.\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"No allowed: governor only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Constructs the `PolicyRegistry` contract.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the policy for the specified court.\\n /// @param _courtID The ID of the specified court.\\n /// @param _courtName The name of the specified court.\\n /// @param _policy The URI of the policy JSON.\\n function setPolicy(uint256 _courtID, string calldata _courtName, string calldata _policy) external onlyByGovernor {\\n policies[_courtID] = _policy;\\n emit PolicyUpdate(_courtID, _courtName, policies[_courtID]);\\n }\\n}\\n\",\"keccak256\":\"0x3616d00a695cf960373d73a56d727fba4988a6c67f4e9084d1aab18f6db72e73\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610cb66100fc6000396000818161029e015281816102c701526104c40152610cb66000f3fe6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", - "devdoc": { - "details": "A contract to maintain a policy for each court.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "PolicyUpdate(uint256,string,string)": { - "details": "Emitted when a policy is updated.", - "params": { - "_courtID": "The ID of the policy's court.", - "_courtName": "The name of the policy's court.", - "_policy": "The URI of the policy JSON." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "initialize(address)": { - "details": "Constructs the `PolicyRegistry` contract.", - "params": { - "_governor": "The governor's address." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setPolicy(uint256,string,string)": { - "details": "Sets the policy for the specified court.", - "params": { - "_courtID": "The ID of the specified court.", - "_courtName": "The name of the specified court.", - "_policy": "The URI of the policy JSON." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "PolicyRegistry", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 13698, - "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 13702, - "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", - "label": "policies", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_uint256,t_string_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_string_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => string)", - "numberOfBytes": "32", - "value": "t_string_storage" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/PolicyRegistry_Proxy.json b/contracts/deployments/arbitrum/PolicyRegistry_Proxy.json deleted file mode 100644 index 933403b17..000000000 --- a/contracts/deployments/arbitrum/PolicyRegistry_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", - "transactionIndex": 2, - "gasUsed": "353404", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000088000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000008000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x813d680f913ac698f1004b8ecaef18f96f7f7962ac9103391c6ced97cf9039db", - "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 272063037, - "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", - "address": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x813d680f913ac698f1004b8ecaef18f96f7f7962ac9103391c6ced97cf9039db" - } - ], - "blockNumber": 272063037, - "cumulativeGasUsed": "448355", - "status": 1, - "byzantium": true - }, - "args": [ - "0x15E5964C7751dF8563eA4bC000301582C79BC454", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"PolicyRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212203b3fd7b58d814daf56e8a98b5f03d35c3e25bc365afd21a0aa80ee883c5d3f1264736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212203b3fd7b58d814daf56e8a98b5f03d35c3e25bc365afd21a0aa80ee883c5d3f1264736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/RandomizerOracle.json b/contracts/deployments/arbitrum/RandomizerOracle.json deleted file mode 100644 index b345d104e..000000000 --- a/contracts/deployments/arbitrum/RandomizerOracle.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "address": "0x5b8bB80f2d72D0C85caB8fB169e8170A05C94bAF", - "abi": [] -} diff --git a/contracts/deployments/arbitrum/RandomizerRNG.json b/contracts/deployments/arbitrum/RandomizerRNG.json deleted file mode 100644 index 96fbbb05c..000000000 --- a/contracts/deployments/arbitrum/RandomizerRNG.json +++ /dev/null @@ -1,385 +0,0 @@ -{ - "address": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "callbackGasLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IRandomizer", - "name": "_randomizer", - "type": "address" - }, - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "number", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomizer", - "outputs": [ - { - "internalType": "contract IRandomizer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_id", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_value", - "type": "bytes32" - } - ], - "name": "randomizerCallback", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "randomizerWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "requester", - "type": "address" - } - ], - "name": "requesterToID", - "outputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_callbackGasLimit", - "type": "uint256" - } - ], - "name": "setCallbackGasLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_randomizer", - "type": "address" - } - ], - "name": "setRandomizer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", - "transactionIndex": 11, - "gasUsed": "420417", - "logsBloom": "0x00000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000200000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xddff904a7835f247225000014a5301fa9462a1fd8f68da0f0dcdc3a9c70d34c8", - "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", - "logs": [ - { - "transactionIndex": 11, - "blockNumber": 272063118, - "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", - "address": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 37, - "blockHash": "0xddff904a7835f247225000014a5301fa9462a1fd8f68da0f0dcdc3a9c70d34c8" - } - ], - "blockNumber": 272063118, - "cumulativeGasUsed": "3366631", - "status": 1, - "byzantium": true - }, - "args": [ - "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", - "0x485cc9550000000000000000000000005b8bb80f2d72d0c85cab8fb169e8170a05c94baf000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"RandomizerRNGProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", - "execute": { - "methodName": "initialize", - "args": [ - "0x5b8bB80f2d72D0C85caB8fB169e8170A05C94bAF", - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] - }, - "implementation": "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/RandomizerRNG_Implementation.json b/contracts/deployments/arbitrum/RandomizerRNG_Implementation.json deleted file mode 100644 index 18fbcd074..000000000 --- a/contracts/deployments/arbitrum/RandomizerRNG_Implementation.json +++ /dev/null @@ -1,533 +0,0 @@ -{ - "address": "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "callbackGasLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IRandomizer", - "name": "_randomizer", - "type": "address" - }, - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "number", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomizer", - "outputs": [ - { - "internalType": "contract IRandomizer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_id", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_value", - "type": "bytes32" - } - ], - "name": "randomizerCallback", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "randomizerWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "requester", - "type": "address" - } - ], - "name": "requesterToID", - "outputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_callbackGasLimit", - "type": "uint256" - } - ], - "name": "setCallbackGasLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_randomizer", - "type": "address" - } - ], - "name": "setRandomizer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0xa3e2215009913f71ca45453989465da40afe272f20c76b3f960fa0ac8315df16", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", - "transactionIndex": 1, - "gasUsed": "1153296", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004100000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xba092d35a051cde13ed281dd7d2491a5312ae73995780f9c5440e6c4c64d5d79", - "transactionHash": "0xa3e2215009913f71ca45453989465da40afe272f20c76b3f960fa0ac8315df16", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 272063103, - "transactionHash": "0xa3e2215009913f71ca45453989465da40afe272f20c76b3f960fa0ac8315df16", - "address": "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0xba092d35a051cde13ed281dd7d2491a5312ae73995780f9c5440e6c4c64d5d79" - } - ], - "blockNumber": 272063103, - "cumulativeGasUsed": "1153296", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"callbackGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IRandomizer\",\"name\":\"_randomizer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomizer\",\"outputs\":[{\"internalType\":\"contract IRandomizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_value\",\"type\":\"bytes32\"}],\"name\":\"randomizerCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"randomizerWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"}],\"name\":\"requesterToID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_callbackGasLimit\",\"type\":\"uint256\"}],\"name\":\"setCallbackGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_randomizer\",\"type\":\"address\"}],\"name\":\"setRandomizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"initialize(address,address)\":{\"details\":\"Initializer\",\"params\":{\"_governor\":\"Governor of the contract.\",\"_randomizer\":\"Randomizer contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"randomizerCallback(uint256,bytes32)\":{\"details\":\"Callback function called by the randomizer contract when the random value is generated.\"},\"randomizerWithdraw(uint256)\":{\"details\":\"Allows the governor to withdraw randomizer funds.\",\"params\":{\"_amount\":\"Amount to withdraw in wei.\"}},\"receiveRandomness(uint256)\":{\"details\":\"Return the random number.\",\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number. The id of the request is tied to the sender.\"},\"setCallbackGasLimit(uint256)\":{\"details\":\"Change the Randomizer callback gas limit.\",\"params\":{\"_callbackGasLimit\":\"the new limit.\"}},\"setRandomizer(address)\":{\"details\":\"Change the Randomizer address.\",\"params\":{\"_randomizer\":\"the new Randomizer address.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"title\":\"Random Number Generator that uses Randomizer.ai https://randomizer.ai/\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/rng/RandomizerRNG.sol\":\"RandomizerRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"},\"src/rng/IRandomizer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n// Randomizer protocol interface\\ninterface IRandomizer {\\n function request(uint256 callbackGasLimit) external returns (uint256);\\n\\n function clientWithdrawTo(address _to, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0xc2f92fb0decde8e9c09b1617ff58fae69b052ad1e8aa4a4fed25867b6bb329c1\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0xf92e0cf768afefc5cc6ef786c263b67dd00c021aa5753213dbbc33014adb68c5\",\"license\":\"MIT\"},\"src/rng/RandomizerRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./RNG.sol\\\";\\nimport \\\"./IRandomizer.sol\\\";\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title Random Number Generator that uses Randomizer.ai\\n/// https://randomizer.ai/\\ncontract RandomizerRNG is RNG, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The address that can withdraw funds.\\n uint256 public callbackGasLimit; // Gas limit for the randomizer callback\\n IRandomizer public randomizer; // Randomizer address.\\n mapping(uint256 requestId => uint256 number) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise.\\n mapping(address requester => uint256 requestId) public requesterToID; // Maps the requester to his latest request ID.\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer\\n /// @param _randomizer Randomizer contract.\\n /// @param _governor Governor of the contract.\\n function initialize(IRandomizer _randomizer, address _governor) external reinitializer(1) {\\n randomizer = _randomizer;\\n governor = _governor;\\n callbackGasLimit = 50000;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Change the Randomizer callback gas limit.\\n /// @param _callbackGasLimit the new limit.\\n function setCallbackGasLimit(uint256 _callbackGasLimit) external onlyByGovernor {\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n /// @dev Change the Randomizer address.\\n /// @param _randomizer the new Randomizer address.\\n function setRandomizer(address _randomizer) external onlyByGovernor {\\n randomizer = IRandomizer(_randomizer);\\n }\\n\\n /// @dev Allows the governor to withdraw randomizer funds.\\n /// @param _amount Amount to withdraw in wei.\\n function randomizerWithdraw(uint256 _amount) external onlyByGovernor {\\n randomizer.clientWithdrawTo(msg.sender, _amount);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Request a random number. The id of the request is tied to the sender.\\n function requestRandomness(uint256 /*_block*/) external override {\\n uint256 id = randomizer.request(callbackGasLimit);\\n requesterToID[msg.sender] = id;\\n }\\n\\n /// @dev Callback function called by the randomizer contract when the random value is generated.\\n function randomizerCallback(uint256 _id, bytes32 _value) external {\\n require(msg.sender == address(randomizer), \\\"Randomizer only\\\");\\n randomNumbers[_id] = uint256(_value);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Return the random number.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 /*_block*/) external view override returns (uint256 randomNumber) {\\n // Get the latest request ID for this requester.\\n uint256 id = requesterToID[msg.sender];\\n randomNumber = randomNumbers[id];\\n }\\n}\\n\",\"keccak256\":\"0x84d5dc50531aac4976948b2898b44630febefd95b54fdeee026190ba675a57dc\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610b396100fc600039600081816104a1015281816104ca01526106c20152610b396000f3fe6080604052600436106100c85760003560e01c806352d1902d1161007a57806352d1902d146101ec57806371d4b00b146102015780637363ae1f1461022e578063767bcab51461024e5780638a54942f1461026e578063e4c0aaf41461028e578063ebe93caf146102ae578063f10fb584146102ce57600080fd5b80630c340a24146100cd57806313cf90541461010a57806324f7469714610154578063485cc9551461016a5780634e07c9391461018c5780634f1ef286146101ac5780635257cd90146101bf575b600080fd5b3480156100d957600080fd5b506000546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561011657600080fd5b506101466101253660046108ed565b50336000908152600460209081526040808320548352600390915290205490565b604051908152602001610101565b34801561016057600080fd5b5061014660015481565b34801561017657600080fd5b5061018a61018536600461091b565b6102ee565b005b34801561019857600080fd5b5061018a6101a73660046108ed565b6103f3565b61018a6101ba36600461096a565b61048d565b3480156101cb57600080fd5b506101466101da3660046108ed565b60036020526000908152604090205481565b3480156101f857600080fd5b506101466106b5565b34801561020d57600080fd5b5061014661021c366004610a2e565b60046020526000908152604090205481565b34801561023a57600080fd5b5061018a6102493660046108ed565b610713565b34801561025a57600080fd5b5061018a610269366004610a2e565b61079b565b34801561027a57600080fd5b5061018a6102893660046108ed565b6107e7565b34801561029a57600080fd5b5061018a6102a9366004610a2e565b610816565b3480156102ba57600080fd5b5061018a6102c9366004610a52565b610862565b3480156102da57600080fd5b506002546100ed906001600160a01b031681565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806103385750805467ffffffffffffffff808416911610155b156103555760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600280546001600160a01b038781166001600160a01b031992831617909255600080549287169290911691909117905561c350600155815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90610a74565b60405180910390fd5b600254604051632465f8f560e01b8152336004820152602481018390526001600160a01b0390911690632465f8f590604401600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b5050505050565b610496826108c0565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061051457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610508600080516020610ae48339815191525490565b6001600160a01b031614155b156105325760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561058c575060408051601f3d908101601f1916820190925261058991810190610a9b565b60015b6105b457604051630c76093760e01b81526001600160a01b038316600482015260240161041d565b600080516020610ae483398151915281146105e557604051632a87526960e21b81526004810182905260240161041d565b600080516020610ae48339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156106b0576000836001600160a01b03168360405161064c9190610ab4565b600060405180830381855af49150503d8060008114610687576040519150601f19603f3d011682016040523d82523d6000602084013e61068c565b606091505b50509050806106ae576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107005760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610ae483398151915290565b60025460015460405163d845a4b360e01b815260048101919091526000916001600160a01b03169063d845a4b3906024016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610a9b565b336000908152600460205260409020555050565b6000546001600160a01b031633146107c55760405162461bcd60e51b815260040161041d90610a74565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108115760405162461bcd60e51b815260040161041d90610a74565b600155565b6000546001600160a01b031633146108405760405162461bcd60e51b815260040161041d90610a74565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108ae5760405162461bcd60e51b815260206004820152600f60248201526e52616e646f6d697a6572206f6e6c7960881b604482015260640161041d565b60009182526003602052604090912055565b6000546001600160a01b031633146108ea5760405162461bcd60e51b815260040161041d90610a74565b50565b6000602082840312156108ff57600080fd5b5035919050565b6001600160a01b03811681146108ea57600080fd5b6000806040838503121561092e57600080fd5b823561093981610906565b9150602083013561094981610906565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561097d57600080fd5b823561098881610906565b9150602083013567ffffffffffffffff808211156109a557600080fd5b818501915085601f8301126109b957600080fd5b8135818111156109cb576109cb610954565b604051601f8201601f19908116603f011681019083821181831017156109f3576109f3610954565b81604052828152886020848701011115610a0c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610a4057600080fd5b8135610a4b81610906565b9392505050565b60008060408385031215610a6557600080fd5b50508035926020909101359150565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b600060208284031215610aad57600080fd5b5051919050565b6000825160005b81811015610ad55760208186018101518583015201610abb565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220721afbaa690caa7b92bcb9018e5c4d2ecece02ca01c80c470d74bec052f7ae9264736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106100c85760003560e01c806352d1902d1161007a57806352d1902d146101ec57806371d4b00b146102015780637363ae1f1461022e578063767bcab51461024e5780638a54942f1461026e578063e4c0aaf41461028e578063ebe93caf146102ae578063f10fb584146102ce57600080fd5b80630c340a24146100cd57806313cf90541461010a57806324f7469714610154578063485cc9551461016a5780634e07c9391461018c5780634f1ef286146101ac5780635257cd90146101bf575b600080fd5b3480156100d957600080fd5b506000546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561011657600080fd5b506101466101253660046108ed565b50336000908152600460209081526040808320548352600390915290205490565b604051908152602001610101565b34801561016057600080fd5b5061014660015481565b34801561017657600080fd5b5061018a61018536600461091b565b6102ee565b005b34801561019857600080fd5b5061018a6101a73660046108ed565b6103f3565b61018a6101ba36600461096a565b61048d565b3480156101cb57600080fd5b506101466101da3660046108ed565b60036020526000908152604090205481565b3480156101f857600080fd5b506101466106b5565b34801561020d57600080fd5b5061014661021c366004610a2e565b60046020526000908152604090205481565b34801561023a57600080fd5b5061018a6102493660046108ed565b610713565b34801561025a57600080fd5b5061018a610269366004610a2e565b61079b565b34801561027a57600080fd5b5061018a6102893660046108ed565b6107e7565b34801561029a57600080fd5b5061018a6102a9366004610a2e565b610816565b3480156102ba57600080fd5b5061018a6102c9366004610a52565b610862565b3480156102da57600080fd5b506002546100ed906001600160a01b031681565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806103385750805467ffffffffffffffff808416911610155b156103555760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600280546001600160a01b038781166001600160a01b031992831617909255600080549287169290911691909117905561c350600155815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90610a74565b60405180910390fd5b600254604051632465f8f560e01b8152336004820152602481018390526001600160a01b0390911690632465f8f590604401600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b5050505050565b610496826108c0565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061051457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610508600080516020610ae48339815191525490565b6001600160a01b031614155b156105325760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561058c575060408051601f3d908101601f1916820190925261058991810190610a9b565b60015b6105b457604051630c76093760e01b81526001600160a01b038316600482015260240161041d565b600080516020610ae483398151915281146105e557604051632a87526960e21b81526004810182905260240161041d565b600080516020610ae48339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156106b0576000836001600160a01b03168360405161064c9190610ab4565b600060405180830381855af49150503d8060008114610687576040519150601f19603f3d011682016040523d82523d6000602084013e61068c565b606091505b50509050806106ae576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107005760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610ae483398151915290565b60025460015460405163d845a4b360e01b815260048101919091526000916001600160a01b03169063d845a4b3906024016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610a9b565b336000908152600460205260409020555050565b6000546001600160a01b031633146107c55760405162461bcd60e51b815260040161041d90610a74565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108115760405162461bcd60e51b815260040161041d90610a74565b600155565b6000546001600160a01b031633146108405760405162461bcd60e51b815260040161041d90610a74565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108ae5760405162461bcd60e51b815260206004820152600f60248201526e52616e646f6d697a6572206f6e6c7960881b604482015260640161041d565b60009182526003602052604090912055565b6000546001600160a01b031633146108ea5760405162461bcd60e51b815260040161041d90610a74565b50565b6000602082840312156108ff57600080fd5b5035919050565b6001600160a01b03811681146108ea57600080fd5b6000806040838503121561092e57600080fd5b823561093981610906565b9150602083013561094981610906565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561097d57600080fd5b823561098881610906565b9150602083013567ffffffffffffffff808211156109a557600080fd5b818501915085601f8301126109b957600080fd5b8135818111156109cb576109cb610954565b604051601f8201601f19908116603f011681019083821181831017156109f3576109f3610954565b81604052828152886020848701011115610a0c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610a4057600080fd5b8135610a4b81610906565b9392505050565b60008060408385031215610a6557600080fd5b50508035926020909101359150565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b600060208284031215610aad57600080fd5b5051919050565b6000825160005b81811015610ad55760208186018101518583015201610abb565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220721afbaa690caa7b92bcb9018e5c4d2ecece02ca01c80c470d74bec052f7ae9264736f6c63430008180033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." - }, - "initialize(address,address)": { - "details": "Initializer", - "params": { - "_governor": "Governor of the contract.", - "_randomizer": "Randomizer contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "randomizerCallback(uint256,bytes32)": { - "details": "Callback function called by the randomizer contract when the random value is generated." - }, - "randomizerWithdraw(uint256)": { - "details": "Allows the governor to withdraw randomizer funds.", - "params": { - "_amount": "Amount to withdraw in wei." - } - }, - "receiveRandomness(uint256)": { - "details": "Return the random number.", - "returns": { - "randomNumber": "The random number or 0 if it is not ready or has not been requested." - } - }, - "requestRandomness(uint256)": { - "details": "Request a random number. The id of the request is tied to the sender." - }, - "setCallbackGasLimit(uint256)": { - "details": "Change the Randomizer callback gas limit.", - "params": { - "_callbackGasLimit": "the new limit." - } - }, - "setRandomizer(address)": { - "details": "Change the Randomizer address.", - "params": { - "_randomizer": "the new Randomizer address." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "title": "Random Number Generator that uses Randomizer.ai https://randomizer.ai/", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ], - "InvalidImplementation(address)": [ - { - "notice": "The `implementation` is not UUPS-compliant" - } - ] - }, - "events": { - "Upgraded(address)": { - "notice": "Emitted when the `implementation` has been successfully upgraded." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 34952, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 34954, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "callbackGasLimit", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 34957, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "randomizer", - "offset": 0, - "slot": "2", - "type": "t_contract(IRandomizer)34880" - }, - { - "astId": 34961, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "randomNumbers", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 34965, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "requesterToID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_address,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_contract(IRandomizer)34880": { - "encoding": "inplace", - "label": "contract IRandomizer", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrum/RandomizerRNG_Proxy.json b/contracts/deployments/arbitrum/RandomizerRNG_Proxy.json deleted file mode 100644 index a18214647..000000000 --- a/contracts/deployments/arbitrum/RandomizerRNG_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", - "transactionIndex": 11, - "gasUsed": "420417", - "logsBloom": "0x00000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000200000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xddff904a7835f247225000014a5301fa9462a1fd8f68da0f0dcdc3a9c70d34c8", - "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", - "logs": [ - { - "transactionIndex": 11, - "blockNumber": 272063118, - "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", - "address": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 37, - "blockHash": "0xddff904a7835f247225000014a5301fa9462a1fd8f68da0f0dcdc3a9c70d34c8" - } - ], - "blockNumber": 272063118, - "cumulativeGasUsed": "3366631", - "status": 1, - "byzantium": true - }, - "args": [ - "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", - "0x485cc9550000000000000000000000005b8bb80f2d72d0c85cab8fb169e8170a05c94baf000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"RandomizerRNGProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/SortitionModule.json b/contracts/deployments/arbitrum/SortitionModule.json deleted file mode 100644 index 2416168ed..000000000 --- a/contracts/deployments/arbitrum/SortitionModule.json +++ /dev/null @@ -1,1181 +0,0 @@ -{ - "address": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNK", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNKWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum ISortitionModule.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "StakeDelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_unlock", - "type": "bool" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amountAllCourts", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - } - ], - "name": "changeMaxDrawingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxStakePerJuror", - "type": "uint256" - } - ], - "name": "changeMaxStakePerJuror", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxTotalStaked", - "type": "uint256" - } - ], - "name": "changeMaxTotalStaked", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - } - ], - "name": "changeMinStakingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "changeRandomNumberGenerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDisputeHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createTree", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeReadIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeWriteIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "delayedStakes", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "alreadyTransferred", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "disputesWithoutJurors", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "executeDelayedStakes", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getJurorBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalLocked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stakedInCourt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbCourts", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorCourtIDs", - "outputs": [ - { - "internalType": "uint96[]", - "name": "", - "type": "uint96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorLeftoverPNK", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - }, - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxTotalStaked", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize4", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "isJurorStaked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "jurors", - "outputs": [ - { - "internalType": "uint256", - "name": "stakedPnk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedPnk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPhaseChange", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "jurorAccount", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtId", - "type": "uint96" - } - ], - "name": "latestDelayedStakeIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "lockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxDrawingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxStakePerJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxTotalStaked", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minStakingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" - } - ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "passPhase", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availablePenalty", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "phase", - "outputs": [ - { - "internalType": "enum ISortitionModule.Phase", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "postDrawHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumberRequestBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rng", - "outputs": [ - { - "internalType": "contract RNG", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rngLookahead", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "setJurorInactive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_ID", - "type": "bytes32" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalStaked", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "validateStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "withdrawLeftoverPNK", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", - "transactionIndex": 7, - "gasUsed": "595244", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd0b7f441a69fe8a34febf4998ba3ad138790bfba81f486df83208c393801a7ba", - "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", - "logs": [ - { - "transactionIndex": 7, - "blockNumber": 272063201, - "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", - "address": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 18, - "blockHash": "0xd0b7f441a69fe8a34febf4998ba3ad138790bfba81f486df83208c393801a7ba" - } - ], - "blockNumber": 272063201, - "cumulativeGasUsed": "1884235", - "status": 1, - "byzantium": true - }, - "args": [ - "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", - "0x498c752c000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000708000000000000000000000000044afe0069c0fd641bc5f90d9a4218ef0b2fa9d3000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000006c6b935b8bbd40000000000000000000000000000000000000000000000001a784379d99db42000000" - ], - "numDeployments": 3, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleNeoProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122064d5540e7436cff4f68d038f9f28acc385d8590bbe5021a0288171123c7a73ee64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122064d5540e7436cff4f68d038f9f28acc385d8590bbe5021a0288171123c7a73ee64736f6c634300081c0033", - "execute": { - "methodName": "initialize4", - "args": [] - }, - "implementation": "0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/SortitionModule_Implementation.json b/contracts/deployments/arbitrum/SortitionModule_Implementation.json deleted file mode 100644 index a75dc39b1..000000000 --- a/contracts/deployments/arbitrum/SortitionModule_Implementation.json +++ /dev/null @@ -1,1780 +0,0 @@ -{ - "address": "0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNK", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNKWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum ISortitionModule.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "StakeDelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_unlock", - "type": "bool" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amountAllCourts", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - } - ], - "name": "changeMaxDrawingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxStakePerJuror", - "type": "uint256" - } - ], - "name": "changeMaxStakePerJuror", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxTotalStaked", - "type": "uint256" - } - ], - "name": "changeMaxTotalStaked", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - } - ], - "name": "changeMinStakingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "changeRandomNumberGenerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDisputeHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createTree", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeReadIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeWriteIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "delayedStakes", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "alreadyTransferred", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "disputesWithoutJurors", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "executeDelayedStakes", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getJurorBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalLocked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stakedInCourt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbCourts", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorCourtIDs", - "outputs": [ - { - "internalType": "uint96[]", - "name": "", - "type": "uint96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorLeftoverPNK", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - }, - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxTotalStaked", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize4", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "isJurorStaked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "jurors", - "outputs": [ - { - "internalType": "uint256", - "name": "stakedPnk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedPnk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPhaseChange", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "jurorAccount", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtId", - "type": "uint96" - } - ], - "name": "latestDelayedStakeIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "lockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxDrawingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxStakePerJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxTotalStaked", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minStakingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" - } - ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "passPhase", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availablePenalty", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "phase", - "outputs": [ - { - "internalType": "enum ISortitionModule.Phase", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "postDrawHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumberRequestBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rng", - "outputs": [ - { - "internalType": "contract RNG", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rngLookahead", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "setJurorInactive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_ID", - "type": "bytes32" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalStaked", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "validateStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "withdrawLeftoverPNK", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xf808ec232c9ed34d0b4c7b88423890abf9e95d0d6b59dbec094a75cd6440dc7e", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE", - "transactionIndex": 1, - "gasUsed": "2887253", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000020000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x44f9adb9508a182d9cb7240f320a284933dee7fc57cd0afc36a8f192e9f503a1", - "transactionHash": "0xf808ec232c9ed34d0b4c7b88423890abf9e95d0d6b59dbec094a75cd6440dc7e", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 364034221, - "transactionHash": "0xf808ec232c9ed34d0b4c7b88423890abf9e95d0d6b59dbec094a75cd6440dc7e", - "address": "0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x44f9adb9508a182d9cb7240f320a284933dee7fc57cd0afc36a8f192e9f503a1" - } - ], - "blockNumber": 364034221, - "cumulativeGasUsed": "2887253", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 3, - "solcInputHash": "dce986e4165bcb9f133699e2fcc4a531", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LeftoverPNK\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LeftoverPNKWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"_phase\",\"type\":\"uint8\"}],\"name\":\"NewPhase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_unlock\",\"type\":\"bool\"}],\"name\":\"StakeLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amountAllCourts\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxStakePerJuror\",\"type\":\"uint256\"}],\"name\":\"changeMaxStakePerJuror\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxTotalStaked\",\"type\":\"uint256\"}],\"name\":\"changeMaxTotalStaked\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorLeftoverPNK\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxTotalStaked\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"isJurorStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedPnk\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedPnk\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"jurorAccount\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtId\",\"type\":\"uint96\"}],\"name\":\"latestDelayedStakeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxStakePerJuror\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxTotalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"availablePenalty\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumberRequestBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngLookahead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"validateStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"withdrawLeftoverPNK\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A factory of trees that keeps track of staked values for sortition.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LeftoverPNK(address,uint256)\":{\"details\":\"Emitted when leftover PNK is available.\",\"params\":{\"_account\":\"The account of the juror.\",\"_amount\":\"The amount of PNK available.\"}},\"LeftoverPNKWithdrawn(address,uint256)\":{\"details\":\"Emitted when leftover PNK is withdrawn.\",\"params\":{\"_account\":\"The account of the juror withdrawing PNK.\",\"_amount\":\"The amount of PNK withdrawn.\"}},\"StakeDelayed(address,uint96,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_courtID\":\"The ID of the court.\"}},\"StakeLocked(address,uint256,bool)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_relativeAmount\":\"The amount of tokens locked.\",\"_unlock\":\"Whether the stake is locked or unlocked.\"}},\"StakeSet(address,uint256,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_amountAllCourts\":\"The amount of tokens staked in all courts.\",\"_courtID\":\"The ID of the court.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"changeMaxDrawingTime(uint256)\":{\"details\":\"Changes the `maxDrawingTime` storage variable.\",\"params\":{\"_maxDrawingTime\":\"The new value for the `maxDrawingTime` storage variable.\"}},\"changeMinStakingTime(uint256)\":{\"details\":\"Changes the `minStakingTime` storage variable.\",\"params\":{\"_minStakingTime\":\"The new value for the `minStakingTime` storage variable.\"}},\"changeRandomNumberGenerator(address,uint256)\":{\"details\":\"Changes the `_rng` and `_rngLookahead` storage variables.\",\"params\":{\"_rng\":\"The new value for the `RNGenerator` storage variable.\",\"_rngLookahead\":\"The new value for the `rngLookahead` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createTree(bytes32,bytes)\":{\"details\":\"Create a sortition sum tree at the specified key.\",\"params\":{\"_extraData\":\"Extra data that contains the number of children each node in the tree should have.\",\"_key\":\"The key of the new tree.\"}},\"draw(bytes32,uint256,uint256)\":{\"details\":\"Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.\",\"params\":{\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\",\"_key\":\"The key of the tree.\",\"_nonce\":\"Nonce to hash with random number.\"},\"returns\":{\"drawnAddress\":\"The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended.\"}},\"executeDelayedStakes(uint256)\":{\"details\":\"Executes the next delayed stakes.\",\"params\":{\"_iterations\":\"The number of delayed stakes to execute.\"}},\"getJurorCourtIDs(address)\":{\"details\":\"Gets the court identifiers where a specific `_juror` has staked.\",\"params\":{\"_juror\":\"The address of the juror.\"}},\"initialize(address,address,uint256,uint256,address,uint256,uint256,uint256)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_governor\":\"The governor.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_maxStakePerJuror\":\"The maximum amount of PNK a juror can stake in a court.\",\"_maxTotalStaked\":\"The maximum amount of PNK that can be staked in all courts.\",\"_minStakingTime\":\"Minimal time to stake\",\"_rng\":\"The random number generator.\",\"_rngLookahead\":\"Lookahead value for rng.\"}},\"notifyRandomNumber(uint256)\":{\"details\":\"Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\",\"params\":{\"_randomNumber\":\"Random number returned by RNG contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setJurorInactive(address)\":{\"details\":\"Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The juror to unstake.\"}},\"setStake(address,uint96,uint256,uint256,uint256)\":{\"details\":\"Update the state of the stakes, called by KC at the end of setStake flow. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\",\"_pnkDeposit\":\"The amount of PNK to be deposited.\",\"_pnkWithdrawal\":\"The amount of PNK to be withdrawn.\"}},\"stakeOf(address,uint96)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_juror\":\"The address of the juror.\"},\"returns\":{\"_0\":\"value The stake of the juror in the court.\"}},\"stakeOf(bytes32,bytes32)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_ID\":\"The stake path ID, corresponding to a juror.\",\"_key\":\"The key of the tree, corresponding to a court.\"},\"returns\":{\"_0\":\"The stake of the juror in the court.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"validateStake(address,uint96,uint256)\":{\"details\":\"Validate the specified juror's new stake for a court. Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"},\"returns\":{\"pnkDeposit\":\"The amount of PNK to be deposited.\",\"pnkWithdrawal\":\"The amount of PNK to be withdrawn.\",\"stakingResult\":\"The result of the staking operation.\"}},\"withdrawLeftoverPNK(address)\":{\"details\":\"Gives back the locked PNKs in case the juror fully unstaked earlier. Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). In this case the juror can use this function to withdraw the leftover tokens. Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\",\"params\":{\"_account\":\"The juror whose PNK to withdraw.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"SortitionModuleNeo\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"events\":{\"StakeDelayed(address,uint96,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed.\"},\"StakeLocked(address,uint256,bool)\":{\"notice\":\"Emitted when a juror's stake is locked.\"},\"StakeSet(address,uint256,uint256,uint256)\":{\"notice\":\"Emitted when a juror stakes in a court.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/SortitionModuleNeo.sol\":\"SortitionModuleNeo\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/SortitionModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore} from \\\"./KlerosCore.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {RNG} from \\\"../rng/RNG.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title SortitionModuleBase\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\nabstract contract SortitionModuleBase is ISortitionModule, Initializable, UUPSProxiable {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct SortitionSumTree {\\n uint256 K; // The maximum number of children per node.\\n // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around.\\n uint256[] stack;\\n uint256[] nodes;\\n // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node.\\n mapping(bytes32 => uint256) IDsToNodeIndexes;\\n mapping(uint256 => bytes32) nodeIndexesToIDs;\\n }\\n\\n struct DelayedStake {\\n address account; // The address of the juror.\\n uint96 courtID; // The ID of the court.\\n uint256 stake; // The new stake.\\n bool alreadyTransferred; // DEPRECATED. True if tokens were already transferred before delayed stake's execution.\\n }\\n\\n struct Juror {\\n uint96[] courtIDs; // The IDs of courts where the juror's stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`.\\n uint256 stakedPnk; // The juror's total amount of tokens staked in subcourts. Reflects actual pnk balance.\\n uint256 lockedPnk; // The juror's total amount of tokens locked in disputes.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The core arbitrator contract.\\n Phase public phase; // The current phase.\\n uint256 public minStakingTime; // The time after which the phase can be switched to Drawing if there are open disputes.\\n uint256 public maxDrawingTime; // The time after which the phase can be switched back to Staking.\\n uint256 public lastPhaseChange; // The last time the phase was changed.\\n uint256 public randomNumberRequestBlock; // Number of the block when RNG request was made.\\n uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\n RNG public rng; // The random number generator.\\n uint256 public randomNumber; // Random number returned by RNG.\\n uint256 public rngLookahead; // Minimal block distance between requesting and obtaining a random number.\\n uint256 public delayedStakeWriteIndex; // The index of the last `delayedStake` item that was written to the array. 0 index is skipped.\\n uint256 public delayedStakeReadIndex; // The index of the next `delayedStake` item that should be processed. Starts at 1 because 0 index is skipped.\\n mapping(bytes32 treeHash => SortitionSumTree) sortitionSumTrees; // The mapping trees by keys.\\n mapping(address account => Juror) public jurors; // The jurors.\\n mapping(uint256 => DelayedStake) public delayedStakes; // Stores the stakes that were changed during Drawing phase, to update them when the phase is switched to Staking.\\n mapping(address jurorAccount => mapping(uint96 courtId => uint256)) public latestDelayedStakeIndex; // DEPRECATED. Maps the juror to its latest delayed stake. If there is already a delayed stake for this juror then it'll be replaced. latestDelayedStakeIndex[juror][courtID].\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice Emitted when a juror stakes in a court.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n /// @param _amountAllCourts The amount of tokens staked in all courts.\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts);\\n\\n /// @notice Emitted when a juror's stake is delayed.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n event StakeDelayed(address indexed _address, uint96 indexed _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is locked.\\n /// @param _address The address of the juror.\\n /// @param _relativeAmount The amount of tokens locked.\\n /// @param _unlock Whether the stake is locked or unlocked.\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n /// @dev Emitted when leftover PNK is available.\\n /// @param _account The account of the juror.\\n /// @param _amount The amount of PNK available.\\n event LeftoverPNK(address indexed _account, uint256 _amount);\\n\\n /// @dev Emitted when leftover PNK is withdrawn.\\n /// @param _account The account of the juror withdrawing PNK.\\n /// @param _amount The amount of PNK withdrawn.\\n event LeftoverPNKWithdrawn(address indexed _account, uint256 _amount);\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __SortitionModuleBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n minStakingTime = _minStakingTime;\\n maxDrawingTime = _maxDrawingTime;\\n lastPhaseChange = block.timestamp;\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n delayedStakeReadIndex = 1;\\n }\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `minStakingTime` storage variable.\\n /// @param _minStakingTime The new value for the `minStakingTime` storage variable.\\n function changeMinStakingTime(uint256 _minStakingTime) external onlyByGovernor {\\n minStakingTime = _minStakingTime;\\n }\\n\\n /// @dev Changes the `maxDrawingTime` storage variable.\\n /// @param _maxDrawingTime The new value for the `maxDrawingTime` storage variable.\\n function changeMaxDrawingTime(uint256 _maxDrawingTime) external onlyByGovernor {\\n maxDrawingTime = _maxDrawingTime;\\n }\\n\\n /// @dev Changes the `_rng` and `_rngLookahead` storage variables.\\n /// @param _rng The new value for the `RNGenerator` storage variable.\\n /// @param _rngLookahead The new value for the `rngLookahead` storage variable.\\n function changeRandomNumberGenerator(RNG _rng, uint256 _rngLookahead) external onlyByGovernor {\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n if (phase == Phase.generating) {\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function passPhase() external {\\n if (phase == Phase.staking) {\\n require(\\n block.timestamp - lastPhaseChange >= minStakingTime,\\n \\\"The minimum staking time has not passed yet.\\\"\\n );\\n require(disputesWithoutJurors > 0, \\\"There are no disputes that need jurors.\\\");\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n phase = Phase.generating;\\n } else if (phase == Phase.generating) {\\n randomNumber = rng.receiveRandomness(randomNumberRequestBlock + rngLookahead);\\n require(randomNumber != 0, \\\"Random number is not ready yet\\\");\\n phase = Phase.drawing;\\n } else if (phase == Phase.drawing) {\\n require(\\n disputesWithoutJurors == 0 || block.timestamp - lastPhaseChange >= maxDrawingTime,\\n \\\"There are still disputes without jurors and the maximum drawing time has not passed yet.\\\"\\n );\\n phase = Phase.staking;\\n }\\n\\n lastPhaseChange = block.timestamp;\\n emit NewPhase(phase);\\n }\\n\\n /// @dev Create a sortition sum tree at the specified key.\\n /// @param _key The key of the new tree.\\n /// @param _extraData Extra data that contains the number of children each node in the tree should have.\\n function createTree(bytes32 _key, bytes memory _extraData) external override onlyByCore {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 K = _extraDataToTreeK(_extraData);\\n require(tree.K == 0, \\\"Tree already exists.\\\");\\n require(K > 1, \\\"K must be greater than one.\\\");\\n tree.K = K;\\n tree.nodes.push(0);\\n }\\n\\n /// @dev Executes the next delayed stakes.\\n /// @param _iterations The number of delayed stakes to execute.\\n function executeDelayedStakes(uint256 _iterations) external {\\n require(phase == Phase.staking, \\\"Should be in Staking phase.\\\");\\n require(delayedStakeWriteIndex >= delayedStakeReadIndex, \\\"No delayed stake to execute.\\\");\\n\\n uint256 actualIterations = (delayedStakeReadIndex + _iterations) - 1 > delayedStakeWriteIndex\\n ? (delayedStakeWriteIndex - delayedStakeReadIndex) + 1\\n : _iterations;\\n uint256 newDelayedStakeReadIndex = delayedStakeReadIndex + actualIterations;\\n\\n for (uint256 i = delayedStakeReadIndex; i < newDelayedStakeReadIndex; i++) {\\n DelayedStake storage delayedStake = delayedStakes[i];\\n core.setStakeBySortitionModule(delayedStake.account, delayedStake.courtID, delayedStake.stake);\\n delete delayedStakes[i];\\n }\\n delayedStakeReadIndex = newDelayedStakeReadIndex;\\n }\\n\\n function createDisputeHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors++;\\n }\\n\\n function postDrawHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors--;\\n }\\n\\n /// @dev Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\\n /// @param _randomNumber Random number returned by RNG contract.\\n function notifyRandomNumber(uint256 _randomNumber) public override {}\\n\\n /// @dev Validate the specified juror's new stake for a court.\\n /// Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @return pnkDeposit The amount of PNK to be deposited.\\n /// @return pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @return stakingResult The result of the staking operation.\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n (pnkDeposit, pnkWithdrawal, stakingResult) = _validateStake(_account, _courtID, _newStake);\\n }\\n\\n function _validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) internal virtual returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n Juror storage juror = jurors[_account];\\n uint256 currentStake = stakeOf(_account, _courtID);\\n\\n uint256 nbCourts = juror.courtIDs.length;\\n if (currentStake == 0 && nbCourts >= MAX_STAKE_PATHS) {\\n return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed.\\n }\\n\\n if (currentStake == 0 && _newStake == 0) {\\n return (0, 0, StakingResult.CannotStakeZeroWhenNoStake); // Forbid staking 0 amount when current stake is 0 to avoid flaky behaviour.\\n }\\n\\n if (phase != Phase.staking) {\\n // Store the stake change as delayed, to be applied when the phase switches back to Staking.\\n DelayedStake storage delayedStake = delayedStakes[++delayedStakeWriteIndex];\\n delayedStake.account = _account;\\n delayedStake.courtID = _courtID;\\n delayedStake.stake = _newStake;\\n emit StakeDelayed(_account, _courtID, _newStake);\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Delayed);\\n }\\n\\n // Current phase is Staking: set stakes.\\n if (_newStake >= currentStake) {\\n pnkDeposit = _newStake - currentStake;\\n } else {\\n pnkWithdrawal = currentStake - _newStake;\\n // Ensure locked tokens remain in the contract. They can only be released during Execution.\\n uint256 possibleWithdrawal = juror.stakedPnk > juror.lockedPnk ? juror.stakedPnk - juror.lockedPnk : 0;\\n if (pnkWithdrawal > possibleWithdrawal) {\\n pnkWithdrawal = possibleWithdrawal;\\n }\\n }\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n /// @dev Update the state of the stakes, called by KC at the end of setStake flow.\\n /// `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _pnkDeposit The amount of PNK to be deposited.\\n /// @param _pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @param _newStake The new stake.\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external override onlyByCore {\\n _setStake(_account, _courtID, _pnkDeposit, _pnkWithdrawal, _newStake);\\n }\\n\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) internal virtual {\\n Juror storage juror = jurors[_account];\\n if (_pnkDeposit > 0) {\\n uint256 currentStake = stakeOf(_account, _courtID);\\n if (currentStake == 0) {\\n juror.courtIDs.push(_courtID);\\n }\\n // Increase juror's balance by deposited amount.\\n juror.stakedPnk += _pnkDeposit;\\n } else {\\n juror.stakedPnk -= _pnkWithdrawal;\\n if (_newStake == 0) {\\n // Cleanup\\n for (uint256 i = juror.courtIDs.length; i > 0; i--) {\\n if (juror.courtIDs[i - 1] == _courtID) {\\n juror.courtIDs[i - 1] = juror.courtIDs[juror.courtIDs.length - 1];\\n juror.courtIDs.pop();\\n break;\\n }\\n }\\n }\\n }\\n\\n // Update the sortition sum tree.\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_account, _courtID);\\n bool finished = false;\\n uint96 currenCourtID = _courtID;\\n while (!finished) {\\n // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn.\\n _set(bytes32(uint256(currenCourtID)), _newStake, stakePathID);\\n if (currenCourtID == GENERAL_COURT) {\\n finished = true;\\n } else {\\n (currenCourtID, , , , , , ) = core.courts(currenCourtID); // Get the parent court.\\n }\\n }\\n emit StakeSet(_account, _courtID, _newStake, juror.stakedPnk);\\n }\\n\\n function lockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n jurors[_account].lockedPnk += _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, false);\\n }\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n Juror storage juror = jurors[_account];\\n juror.lockedPnk -= _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, true);\\n\\n uint256 amount = getJurorLeftoverPNK(_account);\\n if (amount > 0) {\\n emit LeftoverPNK(_account, amount);\\n }\\n }\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external override onlyByCore returns (uint256 pnkBalance, uint256 availablePenalty) {\\n Juror storage juror = jurors[_account];\\n uint256 stakedPnk = juror.stakedPnk;\\n\\n if (stakedPnk >= _relativeAmount) {\\n availablePenalty = _relativeAmount;\\n juror.stakedPnk -= _relativeAmount;\\n } else {\\n availablePenalty = stakedPnk;\\n juror.stakedPnk = 0;\\n }\\n\\n pnkBalance = juror.stakedPnk;\\n return (pnkBalance, availablePenalty);\\n }\\n\\n /// @dev Unstakes the inactive juror from all courts.\\n /// `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The juror to unstake.\\n function setJurorInactive(address _account) external override onlyByCore {\\n uint96[] memory courtIDs = getJurorCourtIDs(_account);\\n for (uint256 j = courtIDs.length; j > 0; j--) {\\n core.setStakeBySortitionModule(_account, courtIDs[j - 1], 0);\\n }\\n }\\n\\n /// @dev Gives back the locked PNKs in case the juror fully unstaked earlier.\\n /// Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance\\n /// while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked).\\n /// In this case the juror can use this function to withdraw the leftover tokens.\\n /// Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\\n /// @param _account The juror whose PNK to withdraw.\\n function withdrawLeftoverPNK(address _account) external override {\\n // Can withdraw the leftover PNK if fully unstaked, has no tokens locked and has positive balance.\\n // This withdrawal can't be triggered by calling setStake() in KlerosCore because current stake is technically 0, thus it is done via separate function.\\n uint256 amount = getJurorLeftoverPNK(_account);\\n require(amount > 0, \\\"Not eligible for withdrawal.\\\");\\n jurors[_account].stakedPnk = 0;\\n core.transferBySortitionModule(_account, amount);\\n emit LeftoverPNKWithdrawn(_account, amount);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Draw an ID from a tree using a number.\\n /// Note that this function reverts if the sum of all values in the tree is 0.\\n /// @param _key The key of the tree.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _nonce Nonce to hash with random number.\\n /// @return drawnAddress The drawn address.\\n /// `O(k * log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function draw(\\n bytes32 _key,\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) public view override returns (address drawnAddress) {\\n require(phase == Phase.drawing, \\\"Wrong phase.\\\");\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n if (tree.nodes[0] == 0) {\\n return address(0); // No jurors staked.\\n }\\n\\n uint256 currentDrawnNumber = uint256(keccak256(abi.encodePacked(randomNumber, _coreDisputeID, _nonce))) %\\n tree.nodes[0];\\n\\n // While it still has children\\n uint256 treeIndex = 0;\\n while ((tree.K * treeIndex) + 1 < tree.nodes.length) {\\n for (uint256 i = 1; i <= tree.K; i++) {\\n // Loop over children.\\n uint256 nodeIndex = (tree.K * treeIndex) + i;\\n uint256 nodeValue = tree.nodes[nodeIndex];\\n\\n if (currentDrawnNumber >= nodeValue) {\\n // Go to the next child.\\n currentDrawnNumber -= nodeValue;\\n } else {\\n // Pick this child.\\n treeIndex = nodeIndex;\\n break;\\n }\\n }\\n }\\n drawnAddress = _stakePathIDToAccount(tree.nodeIndexesToIDs[treeIndex]);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return value The stake of the juror in the court.\\n function stakeOf(address _juror, uint96 _courtID) public view returns (uint256) {\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_juror, _courtID);\\n return stakeOf(bytes32(uint256(_courtID)), stakePathID);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _key The key of the tree, corresponding to a court.\\n /// @param _ID The stake path ID, corresponding to a juror.\\n /// @return The stake of the juror in the court.\\n function stakeOf(bytes32 _key, bytes32 _ID) public view returns (uint256) {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint treeIndex = tree.IDsToNodeIndexes[_ID];\\n if (treeIndex == 0) {\\n return 0;\\n }\\n return tree.nodes[treeIndex];\\n }\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n )\\n external\\n view\\n override\\n returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts)\\n {\\n Juror storage juror = jurors[_juror];\\n totalStaked = juror.stakedPnk;\\n totalLocked = juror.lockedPnk;\\n stakedInCourt = stakeOf(_juror, _courtID);\\n nbCourts = juror.courtIDs.length;\\n }\\n\\n /// @dev Gets the court identifiers where a specific `_juror` has staked.\\n /// @param _juror The address of the juror.\\n function getJurorCourtIDs(address _juror) public view override returns (uint96[] memory) {\\n return jurors[_juror].courtIDs;\\n }\\n\\n function isJurorStaked(address _juror) external view override returns (bool) {\\n return jurors[_juror].stakedPnk > 0;\\n }\\n\\n function getJurorLeftoverPNK(address _juror) public view override returns (uint256) {\\n Juror storage juror = jurors[_juror];\\n if (juror.courtIDs.length == 0 && juror.lockedPnk == 0) {\\n return juror.stakedPnk;\\n } else {\\n return 0;\\n }\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Update all the parents of a node.\\n /// @param _key The key of the tree to update.\\n /// @param _treeIndex The index of the node to start from.\\n /// @param _plusOrMinus Whether to add (true) or substract (false).\\n /// @param _value The value to add or substract.\\n /// `O(log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function _updateParents(bytes32 _key, uint256 _treeIndex, bool _plusOrMinus, uint256 _value) private {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n uint256 parentIndex = _treeIndex;\\n while (parentIndex != 0) {\\n parentIndex = (parentIndex - 1) / tree.K;\\n tree.nodes[parentIndex] = _plusOrMinus\\n ? tree.nodes[parentIndex] + _value\\n : tree.nodes[parentIndex] - _value;\\n }\\n }\\n\\n /// @dev Retrieves a juror's address from the stake path ID.\\n /// @param _stakePathID The stake path ID to unpack.\\n /// @return account The account.\\n function _stakePathIDToAccount(bytes32 _stakePathID) internal pure returns (address account) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(add(ptr, 0x0c), i), byte(i, _stakePathID))\\n }\\n account := mload(ptr)\\n }\\n }\\n\\n function _extraDataToTreeK(bytes memory _extraData) internal pure returns (uint256 K) {\\n if (_extraData.length >= 32) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n K := mload(add(_extraData, 0x20))\\n }\\n } else {\\n K = DEFAULT_K;\\n }\\n }\\n\\n /// @dev Set a value in a tree.\\n /// @param _key The key of the tree.\\n /// @param _value The new value.\\n /// @param _ID The ID of the value.\\n /// `O(log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function _set(bytes32 _key, uint256 _value, bytes32 _ID) internal {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n if (treeIndex == 0) {\\n // No existing node.\\n if (_value != 0) {\\n // Non zero value.\\n // Append.\\n // Add node.\\n if (tree.stack.length == 0) {\\n // No vacant spots.\\n // Get the index and append the value.\\n treeIndex = tree.nodes.length;\\n tree.nodes.push(_value);\\n\\n // Potentially append a new node and make the parent a sum node.\\n if (treeIndex != 1 && (treeIndex - 1) % tree.K == 0) {\\n // Is first child.\\n uint256 parentIndex = treeIndex / tree.K;\\n bytes32 parentID = tree.nodeIndexesToIDs[parentIndex];\\n uint256 newIndex = treeIndex + 1;\\n tree.nodes.push(tree.nodes[parentIndex]);\\n delete tree.nodeIndexesToIDs[parentIndex];\\n tree.IDsToNodeIndexes[parentID] = newIndex;\\n tree.nodeIndexesToIDs[newIndex] = parentID;\\n }\\n } else {\\n // Some vacant spot.\\n // Pop the stack and append the value.\\n treeIndex = tree.stack[tree.stack.length - 1];\\n tree.stack.pop();\\n tree.nodes[treeIndex] = _value;\\n }\\n\\n // Add label.\\n tree.IDsToNodeIndexes[_ID] = treeIndex;\\n tree.nodeIndexesToIDs[treeIndex] = _ID;\\n\\n _updateParents(_key, treeIndex, true, _value);\\n }\\n } else {\\n // Existing node.\\n if (_value == 0) {\\n // Zero value.\\n // Remove.\\n // Remember value and set to 0.\\n uint256 value = tree.nodes[treeIndex];\\n tree.nodes[treeIndex] = 0;\\n\\n // Push to stack.\\n tree.stack.push(treeIndex);\\n\\n // Clear label.\\n delete tree.IDsToNodeIndexes[_ID];\\n delete tree.nodeIndexesToIDs[treeIndex];\\n\\n _updateParents(_key, treeIndex, false, value);\\n } else if (_value != tree.nodes[treeIndex]) {\\n // New, non zero value.\\n // Set.\\n bool plusOrMinus = tree.nodes[treeIndex] <= _value;\\n uint256 plusOrMinusValue = plusOrMinus\\n ? _value - tree.nodes[treeIndex]\\n : tree.nodes[treeIndex] - _value;\\n tree.nodes[treeIndex] = _value;\\n\\n _updateParents(_key, treeIndex, plusOrMinus, plusOrMinusValue);\\n }\\n }\\n }\\n\\n /// @dev Packs an account and a court ID into a stake path ID.\\n /// @param _account The address of the juror to pack.\\n /// @param _courtID The court ID to pack.\\n /// @return stakePathID The stake path ID.\\n function _accountAndCourtIDToStakePathID(\\n address _account,\\n uint96 _courtID\\n ) internal pure returns (bytes32 stakePathID) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(add(0x0c, i), _account))\\n }\\n for {\\n let i := 0x14\\n } lt(i, 0x20) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(i, _courtID))\\n }\\n stakePathID := mload(ptr)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x550f0c0bea80f7457f76f50e27dfa1b8632fe9eb28d4e57f8b2bed9a10a31696\",\"license\":\"MIT\"},\"src/arbitration/SortitionModuleNeo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {SortitionModuleBase, KlerosCore, RNG, StakingResult} from \\\"./SortitionModuleBase.sol\\\";\\n\\n/// @title SortitionModuleNeo\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModuleNeo is SortitionModuleBase {\\n string public constant override version = \\\"0.9.0\\\";\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public maxStakePerJuror;\\n uint256 public maxTotalStaked;\\n uint256 public totalStaked;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor.\\n /// @param _core The KlerosCore.\\n /// @param _minStakingTime Minimal time to stake\\n /// @param _maxDrawingTime Time after which the drawing phase can be switched\\n /// @param _rng The random number generator.\\n /// @param _rngLookahead Lookahead value for rng.\\n /// @param _maxStakePerJuror The maximum amount of PNK a juror can stake in a court.\\n /// @param _maxTotalStaked The maximum amount of PNK that can be staked in all courts.\\n function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead,\\n uint256 _maxStakePerJuror,\\n uint256 _maxTotalStaked\\n ) external reinitializer(2) {\\n __SortitionModuleBase_initialize(_governor, _core, _minStakingTime, _maxDrawingTime, _rng, _rngLookahead);\\n maxStakePerJuror = _maxStakePerJuror;\\n maxTotalStaked = _maxTotalStaked;\\n }\\n\\n function initialize4() external reinitializer(4) {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n function changeMaxStakePerJuror(uint256 _maxStakePerJuror) external onlyByGovernor {\\n maxStakePerJuror = _maxStakePerJuror;\\n }\\n\\n function changeMaxTotalStaked(uint256 _maxTotalStaked) external onlyByGovernor {\\n maxTotalStaked = _maxTotalStaked;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function _validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) internal override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n uint256 currentStake = stakeOf(_account, _courtID);\\n bool stakeIncrease = _newStake > currentStake;\\n uint256 stakeChange = stakeIncrease ? _newStake - currentStake : currentStake - _newStake;\\n Juror storage juror = jurors[_account];\\n if (stakeIncrease) {\\n if (juror.stakedPnk + stakeChange > maxStakePerJuror) {\\n return (0, 0, StakingResult.CannotStakeMoreThanMaxStakePerJuror);\\n }\\n if (totalStaked + stakeChange > maxTotalStaked) {\\n return (0, 0, StakingResult.CannotStakeMoreThanMaxTotalStaked);\\n }\\n }\\n if (phase == Phase.staking) {\\n if (stakeIncrease) {\\n totalStaked += stakeChange;\\n } else {\\n totalStaked -= stakeChange;\\n }\\n }\\n (pnkDeposit, pnkWithdrawal, stakingResult) = super._validateStake(_account, _courtID, _newStake);\\n }\\n}\\n\",\"keccak256\":\"0xf30bee4c2c9e6b428ba484184f8e5a8de99b1d07f44c5f526f0204d774c388b5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0x0f6a8fb72ed7e5a602dc0aaf4f3a037ba9f1765b79b6320604ff810d578af2cf\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516131d16100fc600039600081816115510152818161157a015261177201526131d16000f3fe6080604052600436106102a95760003560e01c80637dc38f1411610165578063c1572618116100cc578063dca5f6b011610085578063dca5f6b014610826578063dd5e5cb514610872578063e4c0aaf414610892578063e534710d146108b2578063f216de4c146108ea578063f2f4eb261461090a578063f6b4d82d1461092a57600080fd5b8063c157261814610765578063caeb50ed1461077b578063ccbac9f514610790578063d09f392d146107a6578063d1c1df48146107c6578063d605787b1461080657600080fd5b8063a2473cc11161011e578063a2473cc1146106ab578063aac03ad2146106cb578063b1c9fe6e146106eb578063b5d69e9914610719578063b888adfa14610739578063c057eca71461074f57600080fd5b80637dc38f14146105ff578063817b1cd214610615578063823cfd701461062b5780638d3771bb1461064b578063965af6c71461066b5780639fbb56f11461068b57600080fd5b8063498c752c1161021457806354fd4d50116101cd57806354fd4d50146104ea57806356acb050146105285780635a68c1541461053e5780635d2d7846146105545780636624192f1461057457806369f45877146105bf57806376fa9fc5146105df57600080fd5b8063498c752c146104355780634c70a0d6146104555780634dbbebbc146104755780634f1ef2861461049557806352d1902d146104a8578063543f8a36146104bd57600080fd5b80631ecacab8116102665780631ecacab81461037257806321e1625e146103a157806321ea9b3f146103c157806323f61de4146103df57806335975f4a146103f5578063477a655c1461041557600080fd5b806303432744146102ae57806306dfc967146102d75780630b274f2e146102f95780630c340a241461030e5780630e083ec9146103465780631b92bbbe1461035c575b600080fd5b3480156102ba57600080fd5b506102c460065481565b6040519081526020015b60405180910390f35b3480156102e357600080fd5b506102f76102f2366004612aed565b6109b8565b005b34801561030557600080fd5b506102f76109f0565b34801561031a57600080fd5b5060005461032e906001600160a01b031681565b6040516001600160a01b0390911681526020016102ce565b34801561035257600080fd5b506102c4600a5481565b34801561036857600080fd5b506102c460035481565b34801561037e57600080fd5b5061039261038d366004612b30565b610dc3565b6040516102ce93929190612b87565b3480156103ad57600080fd5b506102f76103bc366004612bb3565b610e0e565b3480156103cd57600080fd5b506102f76103dc366004612aed565b50565b3480156103eb57600080fd5b506102c460105481565b34801561040157600080fd5b506102f7610410366004612aed565b610eb1565b34801561042157600080fd5b506102f7610430366004612c82565b61109d565b34801561044157600080fd5b506102f7610450366004612cc8565b611194565b34801561046157600080fd5b5061032e610470366004612d40565b611270565b34801561048157600080fd5b506102f7610490366004612bb3565b611454565b6102f76104a3366004612d6c565b61153d565b3480156104b457600080fd5b506102c4611765565b3480156104c957600080fd5b506104dd6104d8366004612da5565b6117c3565b6040516102ce9190612dc2565b3480156104f657600080fd5b5061051b604051806040016040528060058152602001640302e392e360dc1b81525081565b6040516102ce9190612e32565b34801561053457600080fd5b506102c4600b5481565b34801561054a57600080fd5b506102c460115481565b34801561056057600080fd5b506102f761056f366004612e65565b611861565b34801561058057600080fd5b506105af61058f366004612da5565b6001600160a01b03166000908152600d6020526040902060010154151590565b60405190151581526020016102ce565b3480156105cb57600080fd5b506102f76105da366004612da5565b6118a4565b3480156105eb57600080fd5b506102c46105fa366004612e65565b6119bb565b34801561060b57600080fd5b506102c460095481565b34801561062157600080fd5b506102c460125481565b34801561063757600080fd5b506102f7610646366004612aed565b611a16565b34801561065757600080fd5b506102f7610666366004612aed565b611a45565b34801561067757600080fd5b506102f7610686366004612bb3565b611a74565b34801561069757600080fd5b506102c46106a6366004612da5565b611b70565b3480156106b757600080fd5b506102c46106c6366004612e87565b611bb1565b3480156106d757600080fd5b506102f76106e6366004612ec0565b611bdb565b3480156106f757600080fd5b5060015461070c90600160a01b900460ff1681565b6040516102ce9190612f11565b34801561072557600080fd5b506102f7610734366004612da5565b611c19565b34801561074557600080fd5b506102c460045481565b34801561075b57600080fd5b506102c460025481565b34801561077157600080fd5b506102c460055481565b34801561078757600080fd5b506102f7611cf9565b34801561079c57600080fd5b506102c460085481565b3480156107b257600080fd5b506102f76107c1366004612e65565b611daa565b3480156107d257600080fd5b506107e66107e1366004612e87565b611de4565b6040805194855260208501939093529183015260608201526080016102ce565b34801561081257600080fd5b5060075461032e906001600160a01b031681565b34801561083257600080fd5b5061085d610841366004612da5565b600d602052600090815260409020600181015460029091015482565b604080519283526020830191909152016102ce565b34801561087e57600080fd5b506102f761088d366004612aed565b611e23565b34801561089e57600080fd5b506102f76108ad366004612da5565b611e52565b3480156108be57600080fd5b506102c46108cd366004612e87565b600f60209081526000928352604080842090915290825290205481565b3480156108f657600080fd5b5061085d610905366004612bb3565b611e9e565b34801561091657600080fd5b5060015461032e906001600160a01b031681565b34801561093657600080fd5b50610984610945366004612aed565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b604080516001600160a01b0390951685526001600160601b03909316602085015291830152151560608201526080016102ce565b6000546001600160a01b031633146109eb5760405162461bcd60e51b81526004016109e290612f2b565b60405180910390fd5b601055565b6000600154600160a01b900460ff166002811115610a1057610a10612b71565b03610b7e57600254600454610a259042612f83565b1015610a885760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084016109e2565b600060065411610aea5760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016109e2565b6007546009546001600160a01b0390911690637363ae1f90610b0c9043612f96565b6040518263ffffffff1660e01b8152600401610b2a91815260200190565b600060405180830381600087803b158015610b4457600080fd5b505af1158015610b58573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610d78565b60018054600160a01b900460ff166002811115610b9d57610b9d612b71565b03610c95576007546009546005546001600160a01b03909216916313cf905491610bc691612f96565b6040518263ffffffff1660e01b8152600401610be491815260200190565b6020604051808303816000875af1158015610c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c279190612fa9565b6008819055600003610c7b5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016109e2565b600180546002919060ff60a01b1916600160a01b83610b74565b6002600154600160a01b900460ff166002811115610cb557610cb5612b71565b03610d78576006541580610cd75750600354600454610cd49042612f83565b10155b610d6a5760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016109e2565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610db991600160a01b90910460ff1690612f11565b60405180910390a1565b600154600090819081906001600160a01b03163314610df45760405162461bcd60e51b81526004016109e290612fc2565b610dff868686611f2c565b91989097509095509350505050565b6001546001600160a01b03163314610e385760405162461bcd60e51b81526004016109e290612fc2565b6001600160a01b0382166000908152600d602052604081206002018054839290610e63908490612f96565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610ed157610ed1612b71565b14610f1e5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016109e2565b600b54600a541015610f725760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016109e2565b6000600a54600183600b54610f879190612f96565b610f919190612f83565b11610f9c5781610fb7565b600b54600a54610fac9190612f83565b610fb7906001612f96565b9050600081600b54610fc99190612f96565b600b549091505b81811015611095576000818152600e602052604090819020600180548254918301549351630761c14d60e01b815292936001600160a01b0391821693630761c14d9361103393811692600160a01b9091046001600160601b031691600401613006565b600060405180830381600087803b15801561104d57600080fd5b505af1158015611061573d6000803e3d6000fd5b5050506000838152600e60205260408120818155600180820192909255600201805460ff191690559092019150610fd09050565b50600b555050565b6001546001600160a01b031633146110c75760405162461bcd60e51b81526004016109e290612fc2565b6000828152600c60205260408120906110df83612087565b8254909150156111285760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016109e2565b600181116111785760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016109e2565b8155600201805460018101825560009182526020822001555050565b600260006111a06120a3565b8054909150600160401b900460ff16806111c7575080546001600160401b03808416911610155b156111e45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556112138a8a8a8a8a8a6120c7565b60108490556011839055805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050565b60006002600154600160a01b900460ff16600281111561129257611292612b71565b146112ce5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016109e2565b6000848152600c60205260408120600281018054919290916112f2576112f2613030565b906000526020600020015460000361130e57600091505061144d565b60008160020160008154811061132657611326613030565b90600052602060002001546008548686604051602001611359939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c61137c919061305c565b905060005b60028301548354611393908390613070565b61139e906001612f96565b101561142d5760015b83548111611427576000818386600001546113c29190613070565b6113cc9190612f96565b905060008560020182815481106113e5576113e5613030565b9060005260206000200154905080851061140a576114038186612f83565b9450611412565b509150611427565b5050808061141f90613087565b9150506113a7565b50611381565b600081815260048401602052604090205461144790612127565b93505050505b9392505050565b6000546001600160a01b0316331461147e5760405162461bcd60e51b81526004016109e290612f2b565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156114bd576114bd612b71565b03611539576007546009546001600160a01b0390911690637363ae1f906114e49043612f96565b6040518263ffffffff1660e01b815260040161150291815260200190565b600060405180830381600087803b15801561151c57600080fd5b505af1158015611530573d6000803e3d6000fd5b50504360055550505b5050565b61154682612152565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115c457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115b860008051602061317c8339815191525490565b6001600160a01b031614155b156115e25760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561163c575060408051601f3d908101601f1916820190925261163991810190612fa9565b60015b61166457604051630c76093760e01b81526001600160a01b03831660048201526024016109e2565b60008051602061317c833981519152811461169557604051632a87526960e21b8152600481018290526024016109e2565b60008051602061317c8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611760576000836001600160a01b0316836040516116fc91906130a0565b600060405180830381855af49150503d8060008114611737576040519150601f19603f3d011682016040523d82523d6000602084013e61173c565b606091505b505090508061175e576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117b05760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061317c83398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561185557602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116118125790505b50505050509050919050565b6001546001600160a01b0316331461188b5760405162461bcd60e51b81526004016109e290612fc2565b6006805490600061189b836130bc565b91905055505050565b60006118af82611b70565b9050600081116119015760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656c696769626c6520666f72207769746864726177616c2e0000000060448201526064016109e2565b6001600160a01b038281166000818152600d6020526040808220600190810192909255905490516342c37fa360e01b8152600481019290925260248201849052909116906342c37fa390604401600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b50505050816001600160a01b03167f71bb1b604559acc3db697ccf2aa4228d727cd5b133d6ffa419518d51c117c95c82604051610ea591815260200190565b6000828152600c60209081526040808320848452600381019092528220548083036119eb57600092505050611a10565b816002018181548110611a0057611a00613030565b9060005260206000200154925050505b92915050565b6000546001600160a01b03163314611a405760405162461bcd60e51b81526004016109e290612f2b565b600255565b6000546001600160a01b03163314611a6f5760405162461bcd60e51b81526004016109e290612f2b565b601155565b6001546001600160a01b03163314611a9e5760405162461bcd60e51b81526004016109e290612fc2565b6001600160a01b0382166000908152600d6020526040812060028101805491928492611acb908490612f83565b909155505060408051838152600160208201526001600160a01b038516917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b0910160405180910390a26000611b1f84611b70565b9050801561175e57836001600160a01b03167f819a3744490c627e221b71743857691f9c23bf56a1ecc5351f886cfd4c3187d982604051611b6291815260200190565b60405180910390a250505050565b6001600160a01b0381166000908152600d602052604081208054158015611b9957506002810154155b15611ba8576001015492915050565b50600092915050565b600080611bbe848461217c565b9050611bd36001600160601b038416826119bb565b949350505050565b6001546001600160a01b03163314611c055760405162461bcd60e51b81526004016109e290612fc2565b611c1285858585856121c4565b5050505050565b6001546001600160a01b03163314611c435760405162461bcd60e51b81526004016109e290612fc2565b6000611c4e826117c3565b80519091505b801561176057600180546001600160a01b031690630761c14d9085908590611c7c9086612f83565b81518110611c8c57611c8c613030565b602002602001015160006040518463ffffffff1660e01b8152600401611cb493929190613006565b600060405180830381600087803b158015611cce57600080fd5b505af1158015611ce2573d6000803e3d6000fd5b505050508080611cf1906130bc565b915050611c54565b60046000611d056120a3565b8054909150600160401b900460ff1680611d2c575080546001600160401b03808416911610155b15611d495760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611dd45760405162461bcd60e51b81526004016109e290612fc2565b6006805490600061189b83613087565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611e168787611bb1565b9054949793965094505050565b6000546001600160a01b03163314611e4d5760405162461bcd60e51b81526004016109e290612f2b565b600355565b6000546001600160a01b03163314611e7c5760405162461bcd60e51b81526004016109e290612f2b565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60015460009081906001600160a01b03163314611ecd5760405162461bcd60e51b81526004016109e290612fc2565b6001600160a01b0384166000908152600d602052604090206001810154848110611f135784925084826001016000828254611f089190612f83565b90915550611f1e9050565b600060018301559150815b506001015491509250929050565b600154600090819081906001600160a01b03163314611f5d5760405162461bcd60e51b81526004016109e290612fc2565b6000611f698787611bb1565b9050808511600081611f8457611f7f8784612f83565b611f8e565b611f8e8388612f83565b6001600160a01b038a166000908152600d60205260409020909150821561200757601054828260010154611fc29190612f96565b1115611fdc5760008060079650965096505050505061207e565b60115482601254611fed9190612f96565b11156120075760008060089650965096505050505061207e565b6000600154600160a01b900460ff16600281111561202757612027612b71565b0361206757821561204f5781601260008282546120449190612f96565b909155506120679050565b81601260008282546120619190612f83565b90915550505b6120728a8a8a6124fa565b91985096509450505050505b93509350939050565b6000602082511061209a57506020015190565b5060065b919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6120cf61269c565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b601481101561214a5783811a81600c8401015360010161212f565b505192915050565b6000546001600160a01b031633146103dc5760405162461bcd60e51b81526004016109e290612f2b565b600060405160005b601481101561219f578481600c011a81830153600101612184565b5060145b60208110156121bb5783811a818301536001016121a3565b50519392505050565b6001600160a01b0385166000908152600d6020526040902083156122535760006121ee8787611bb1565b905080600003612233578154600180820184556000848152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918916021790555b848260010160008282546122479190612f96565b909155506123ca915050565b828160010160008282546122679190612f83565b909155505060008290036123ca5780545b80156123c8576001600160601b03861682612294600184612f83565b815481106122a4576122a4613030565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123b657815482906122e090600190612f83565b815481106122f0576122f0613030565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906123249084612f83565b8154811061233457612334613030565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555081600001805480612380576123806130d3565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123c8565b806123c0816130bc565b915050612278565b505b60006123d6878761217c565b90506000865b81612494576123f56001600160601b03821686856126c3565b6000196001600160601b0382160161241057600191506123dc565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015612461573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061248591906130f9565b509495506123dc945050505050565b6001840154604080516001600160601b038b16815260208101889052908101919091526001600160a01b038a16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2505050505050505050565b6001600160a01b0383166000908152600d6020526040812081908190816125218888611bb1565b825490915081158015612535575060048110155b1561254d57600080600495509550955050505061207e565b81158015612559575086155b1561257157600080600995509550955050505061207e565b6000600154600160a01b900460ff16600281111561259157612591612b71565b1461262c576000600e6000600a600081546125ab90613087565b9182905550815260208082019290925260409081016000206001600160601b038c16600160a01b81026001600160a01b038f169081178355600183018d905592518c8152919450927fa59837f9df3fb816613d84e8fefe31ec8d6e67ff43df6533e3f793a3f53aade9910160405180910390a3506001935061207e92505050565b8187106126445761263d8288612f83565b955061268c565b61264e8783612f83565b94506000836002015484600101541161266857600061267c565b8360020154846001015461267c9190612f83565b90508086111561268a578095505b505b5060009250505093509350939050565b6126a4612a16565b6126c157604051631afcd79f60e31b815260040160405180910390fd5b565b6000838152600c6020908152604080832084845260038101909252822054909181900361289057831561288b5760018201546000036127de57506002810180546001808201835560009283526020909220810185905590811480159061273d57508154612731600183612f83565b61273b919061305c565b155b156127d95781546000906127519083613167565b6000818152600485016020526040812054919250612770846001612f96565b90508460020185600201848154811061278b5761278b613030565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b612859565b6001808301805490916127f091612f83565b8154811061280057612800613030565b9060005260206000200154905081600101805480612820576128206130d3565b600190038181906000526020600020016000905590558382600201828154811061284c5761284c613030565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561288b8582600187612a30565b611c12565b8360000361292e5760008260020182815481106128af576128af613030565b9060005260206000200154905060008360020183815481106128d3576128d3613030565b6000918252602080832090910192909255600180860180549182018155825282822001849055858152600385018252604080822082905584825260048601909252908120819055612928908790849084612a30565b50611c12565b81600201818154811061294357612943613030565b90600052602060002001548414611c125760008483600201838154811061296c5761296c613030565b9060005260206000200154111590506000816129b2578584600201848154811061299857612998613030565b90600052602060002001546129ad9190612f83565b6129dd565b8360020183815481106129c7576129c7613030565b9060005260206000200154866129dd9190612f83565b9050858460020184815481106129f5576129f5613030565b600091825260209091200155612a0d87848484612a30565b50505050505050565b6000612a206120a3565b54600160401b900460ff16919050565b6000848152600c60205260409020835b8015612ae5578154612a53600183612f83565b612a5d9190613167565b905083612a945782826002018281548110612a7a57612a7a613030565b9060005260206000200154612a8f9190612f83565b612abf565b82826002018281548110612aaa57612aaa613030565b9060005260206000200154612abf9190612f96565b826002018281548110612ad457612ad4613030565b600091825260209091200155612a40565b505050505050565b600060208284031215612aff57600080fd5b5035919050565b6001600160a01b03811681146103dc57600080fd5b6001600160601b03811681146103dc57600080fd5b600080600060608486031215612b4557600080fd5b8335612b5081612b06565b92506020840135612b6081612b1b565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b8381526020810183905260608101600a8310612ba557612ba5612b71565b826040830152949350505050565b60008060408385031215612bc657600080fd5b8235612bd181612b06565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612c0657600080fd5b81356001600160401b03811115612c1f57612c1f612bdf565b604051601f8201601f19908116603f011681016001600160401b0381118282101715612c4d57612c4d612bdf565b604052818152838201602001851015612c6557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612c9557600080fd5b8235915060208301356001600160401b03811115612cb257600080fd5b612cbe85828601612bf5565b9150509250929050565b600080600080600080600080610100898b031215612ce557600080fd5b8835612cf081612b06565b97506020890135612d0081612b06565b965060408901359550606089013594506080890135612d1e81612b06565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600080600060608486031215612d5557600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612d7f57600080fd5b8235612d8a81612b06565b915060208301356001600160401b03811115612cb257600080fd5b600060208284031215612db757600080fd5b813561144d81612b06565b602080825282518282018190526000918401906040840190835b81811015612e035783516001600160601b0316835260209384019390920191600101612ddc565b509095945050505050565b60005b83811015612e29578181015183820152602001612e11565b50506000910152565b6020815260008251806020840152612e51816040850160208701612e0e565b601f01601f19169190910160400192915050565b60008060408385031215612e7857600080fd5b50508035926020909101359150565b60008060408385031215612e9a57600080fd5b8235612ea581612b06565b91506020830135612eb581612b1b565b809150509250929050565b600080600080600060a08688031215612ed857600080fd5b8535612ee381612b06565b94506020860135612ef381612b1b565b94979496505050506040830135926060810135926080909101359150565b6020810160038310612f2557612f25612b71565b91905290565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611a1057611a10612f6d565b80820180821115611a1057611a10612f6d565b600060208284031215612fbb57600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b6001600160a01b039390931683526001600160601b03919091166020830152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60008261306b5761306b613046565b500690565b8082028115828204841417611a1057611a10612f6d565b60006001820161309957613099612f6d565b5060010190565b600082516130b2818460208701612e0e565b9190910192915050565b6000816130cb576130cb612f6d565b506000190190565b634e487b7160e01b600052603160045260246000fd5b8051801515811461209e57600080fd5b600080600080600080600060e0888a03121561311457600080fd5b875161311f81612b1b565b965061312d602089016130e9565b604089015160608a015160808b015160a08c015193995091975095509350915061315960c089016130e9565b905092959891949750929550565b60008261317657613176613046565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212209a929288a5ac23f35bff73c627572e378facda5250ad7cff62928f3d529469e064736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102a95760003560e01c80637dc38f1411610165578063c1572618116100cc578063dca5f6b011610085578063dca5f6b014610826578063dd5e5cb514610872578063e4c0aaf414610892578063e534710d146108b2578063f216de4c146108ea578063f2f4eb261461090a578063f6b4d82d1461092a57600080fd5b8063c157261814610765578063caeb50ed1461077b578063ccbac9f514610790578063d09f392d146107a6578063d1c1df48146107c6578063d605787b1461080657600080fd5b8063a2473cc11161011e578063a2473cc1146106ab578063aac03ad2146106cb578063b1c9fe6e146106eb578063b5d69e9914610719578063b888adfa14610739578063c057eca71461074f57600080fd5b80637dc38f14146105ff578063817b1cd214610615578063823cfd701461062b5780638d3771bb1461064b578063965af6c71461066b5780639fbb56f11461068b57600080fd5b8063498c752c1161021457806354fd4d50116101cd57806354fd4d50146104ea57806356acb050146105285780635a68c1541461053e5780635d2d7846146105545780636624192f1461057457806369f45877146105bf57806376fa9fc5146105df57600080fd5b8063498c752c146104355780634c70a0d6146104555780634dbbebbc146104755780634f1ef2861461049557806352d1902d146104a8578063543f8a36146104bd57600080fd5b80631ecacab8116102665780631ecacab81461037257806321e1625e146103a157806321ea9b3f146103c157806323f61de4146103df57806335975f4a146103f5578063477a655c1461041557600080fd5b806303432744146102ae57806306dfc967146102d75780630b274f2e146102f95780630c340a241461030e5780630e083ec9146103465780631b92bbbe1461035c575b600080fd5b3480156102ba57600080fd5b506102c460065481565b6040519081526020015b60405180910390f35b3480156102e357600080fd5b506102f76102f2366004612aed565b6109b8565b005b34801561030557600080fd5b506102f76109f0565b34801561031a57600080fd5b5060005461032e906001600160a01b031681565b6040516001600160a01b0390911681526020016102ce565b34801561035257600080fd5b506102c4600a5481565b34801561036857600080fd5b506102c460035481565b34801561037e57600080fd5b5061039261038d366004612b30565b610dc3565b6040516102ce93929190612b87565b3480156103ad57600080fd5b506102f76103bc366004612bb3565b610e0e565b3480156103cd57600080fd5b506102f76103dc366004612aed565b50565b3480156103eb57600080fd5b506102c460105481565b34801561040157600080fd5b506102f7610410366004612aed565b610eb1565b34801561042157600080fd5b506102f7610430366004612c82565b61109d565b34801561044157600080fd5b506102f7610450366004612cc8565b611194565b34801561046157600080fd5b5061032e610470366004612d40565b611270565b34801561048157600080fd5b506102f7610490366004612bb3565b611454565b6102f76104a3366004612d6c565b61153d565b3480156104b457600080fd5b506102c4611765565b3480156104c957600080fd5b506104dd6104d8366004612da5565b6117c3565b6040516102ce9190612dc2565b3480156104f657600080fd5b5061051b604051806040016040528060058152602001640302e392e360dc1b81525081565b6040516102ce9190612e32565b34801561053457600080fd5b506102c4600b5481565b34801561054a57600080fd5b506102c460115481565b34801561056057600080fd5b506102f761056f366004612e65565b611861565b34801561058057600080fd5b506105af61058f366004612da5565b6001600160a01b03166000908152600d6020526040902060010154151590565b60405190151581526020016102ce565b3480156105cb57600080fd5b506102f76105da366004612da5565b6118a4565b3480156105eb57600080fd5b506102c46105fa366004612e65565b6119bb565b34801561060b57600080fd5b506102c460095481565b34801561062157600080fd5b506102c460125481565b34801561063757600080fd5b506102f7610646366004612aed565b611a16565b34801561065757600080fd5b506102f7610666366004612aed565b611a45565b34801561067757600080fd5b506102f7610686366004612bb3565b611a74565b34801561069757600080fd5b506102c46106a6366004612da5565b611b70565b3480156106b757600080fd5b506102c46106c6366004612e87565b611bb1565b3480156106d757600080fd5b506102f76106e6366004612ec0565b611bdb565b3480156106f757600080fd5b5060015461070c90600160a01b900460ff1681565b6040516102ce9190612f11565b34801561072557600080fd5b506102f7610734366004612da5565b611c19565b34801561074557600080fd5b506102c460045481565b34801561075b57600080fd5b506102c460025481565b34801561077157600080fd5b506102c460055481565b34801561078757600080fd5b506102f7611cf9565b34801561079c57600080fd5b506102c460085481565b3480156107b257600080fd5b506102f76107c1366004612e65565b611daa565b3480156107d257600080fd5b506107e66107e1366004612e87565b611de4565b6040805194855260208501939093529183015260608201526080016102ce565b34801561081257600080fd5b5060075461032e906001600160a01b031681565b34801561083257600080fd5b5061085d610841366004612da5565b600d602052600090815260409020600181015460029091015482565b604080519283526020830191909152016102ce565b34801561087e57600080fd5b506102f761088d366004612aed565b611e23565b34801561089e57600080fd5b506102f76108ad366004612da5565b611e52565b3480156108be57600080fd5b506102c46108cd366004612e87565b600f60209081526000928352604080842090915290825290205481565b3480156108f657600080fd5b5061085d610905366004612bb3565b611e9e565b34801561091657600080fd5b5060015461032e906001600160a01b031681565b34801561093657600080fd5b50610984610945366004612aed565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b604080516001600160a01b0390951685526001600160601b03909316602085015291830152151560608201526080016102ce565b6000546001600160a01b031633146109eb5760405162461bcd60e51b81526004016109e290612f2b565b60405180910390fd5b601055565b6000600154600160a01b900460ff166002811115610a1057610a10612b71565b03610b7e57600254600454610a259042612f83565b1015610a885760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084016109e2565b600060065411610aea5760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016109e2565b6007546009546001600160a01b0390911690637363ae1f90610b0c9043612f96565b6040518263ffffffff1660e01b8152600401610b2a91815260200190565b600060405180830381600087803b158015610b4457600080fd5b505af1158015610b58573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610d78565b60018054600160a01b900460ff166002811115610b9d57610b9d612b71565b03610c95576007546009546005546001600160a01b03909216916313cf905491610bc691612f96565b6040518263ffffffff1660e01b8152600401610be491815260200190565b6020604051808303816000875af1158015610c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c279190612fa9565b6008819055600003610c7b5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016109e2565b600180546002919060ff60a01b1916600160a01b83610b74565b6002600154600160a01b900460ff166002811115610cb557610cb5612b71565b03610d78576006541580610cd75750600354600454610cd49042612f83565b10155b610d6a5760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016109e2565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610db991600160a01b90910460ff1690612f11565b60405180910390a1565b600154600090819081906001600160a01b03163314610df45760405162461bcd60e51b81526004016109e290612fc2565b610dff868686611f2c565b91989097509095509350505050565b6001546001600160a01b03163314610e385760405162461bcd60e51b81526004016109e290612fc2565b6001600160a01b0382166000908152600d602052604081206002018054839290610e63908490612f96565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610ed157610ed1612b71565b14610f1e5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016109e2565b600b54600a541015610f725760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016109e2565b6000600a54600183600b54610f879190612f96565b610f919190612f83565b11610f9c5781610fb7565b600b54600a54610fac9190612f83565b610fb7906001612f96565b9050600081600b54610fc99190612f96565b600b549091505b81811015611095576000818152600e602052604090819020600180548254918301549351630761c14d60e01b815292936001600160a01b0391821693630761c14d9361103393811692600160a01b9091046001600160601b031691600401613006565b600060405180830381600087803b15801561104d57600080fd5b505af1158015611061573d6000803e3d6000fd5b5050506000838152600e60205260408120818155600180820192909255600201805460ff191690559092019150610fd09050565b50600b555050565b6001546001600160a01b031633146110c75760405162461bcd60e51b81526004016109e290612fc2565b6000828152600c60205260408120906110df83612087565b8254909150156111285760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016109e2565b600181116111785760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016109e2565b8155600201805460018101825560009182526020822001555050565b600260006111a06120a3565b8054909150600160401b900460ff16806111c7575080546001600160401b03808416911610155b156111e45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556112138a8a8a8a8a8a6120c7565b60108490556011839055805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050565b60006002600154600160a01b900460ff16600281111561129257611292612b71565b146112ce5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016109e2565b6000848152600c60205260408120600281018054919290916112f2576112f2613030565b906000526020600020015460000361130e57600091505061144d565b60008160020160008154811061132657611326613030565b90600052602060002001546008548686604051602001611359939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c61137c919061305c565b905060005b60028301548354611393908390613070565b61139e906001612f96565b101561142d5760015b83548111611427576000818386600001546113c29190613070565b6113cc9190612f96565b905060008560020182815481106113e5576113e5613030565b9060005260206000200154905080851061140a576114038186612f83565b9450611412565b509150611427565b5050808061141f90613087565b9150506113a7565b50611381565b600081815260048401602052604090205461144790612127565b93505050505b9392505050565b6000546001600160a01b0316331461147e5760405162461bcd60e51b81526004016109e290612f2b565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156114bd576114bd612b71565b03611539576007546009546001600160a01b0390911690637363ae1f906114e49043612f96565b6040518263ffffffff1660e01b815260040161150291815260200190565b600060405180830381600087803b15801561151c57600080fd5b505af1158015611530573d6000803e3d6000fd5b50504360055550505b5050565b61154682612152565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115c457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115b860008051602061317c8339815191525490565b6001600160a01b031614155b156115e25760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561163c575060408051601f3d908101601f1916820190925261163991810190612fa9565b60015b61166457604051630c76093760e01b81526001600160a01b03831660048201526024016109e2565b60008051602061317c833981519152811461169557604051632a87526960e21b8152600481018290526024016109e2565b60008051602061317c8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611760576000836001600160a01b0316836040516116fc91906130a0565b600060405180830381855af49150503d8060008114611737576040519150601f19603f3d011682016040523d82523d6000602084013e61173c565b606091505b505090508061175e576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117b05760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061317c83398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561185557602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116118125790505b50505050509050919050565b6001546001600160a01b0316331461188b5760405162461bcd60e51b81526004016109e290612fc2565b6006805490600061189b836130bc565b91905055505050565b60006118af82611b70565b9050600081116119015760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656c696769626c6520666f72207769746864726177616c2e0000000060448201526064016109e2565b6001600160a01b038281166000818152600d6020526040808220600190810192909255905490516342c37fa360e01b8152600481019290925260248201849052909116906342c37fa390604401600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b50505050816001600160a01b03167f71bb1b604559acc3db697ccf2aa4228d727cd5b133d6ffa419518d51c117c95c82604051610ea591815260200190565b6000828152600c60209081526040808320848452600381019092528220548083036119eb57600092505050611a10565b816002018181548110611a0057611a00613030565b9060005260206000200154925050505b92915050565b6000546001600160a01b03163314611a405760405162461bcd60e51b81526004016109e290612f2b565b600255565b6000546001600160a01b03163314611a6f5760405162461bcd60e51b81526004016109e290612f2b565b601155565b6001546001600160a01b03163314611a9e5760405162461bcd60e51b81526004016109e290612fc2565b6001600160a01b0382166000908152600d6020526040812060028101805491928492611acb908490612f83565b909155505060408051838152600160208201526001600160a01b038516917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b0910160405180910390a26000611b1f84611b70565b9050801561175e57836001600160a01b03167f819a3744490c627e221b71743857691f9c23bf56a1ecc5351f886cfd4c3187d982604051611b6291815260200190565b60405180910390a250505050565b6001600160a01b0381166000908152600d602052604081208054158015611b9957506002810154155b15611ba8576001015492915050565b50600092915050565b600080611bbe848461217c565b9050611bd36001600160601b038416826119bb565b949350505050565b6001546001600160a01b03163314611c055760405162461bcd60e51b81526004016109e290612fc2565b611c1285858585856121c4565b5050505050565b6001546001600160a01b03163314611c435760405162461bcd60e51b81526004016109e290612fc2565b6000611c4e826117c3565b80519091505b801561176057600180546001600160a01b031690630761c14d9085908590611c7c9086612f83565b81518110611c8c57611c8c613030565b602002602001015160006040518463ffffffff1660e01b8152600401611cb493929190613006565b600060405180830381600087803b158015611cce57600080fd5b505af1158015611ce2573d6000803e3d6000fd5b505050508080611cf1906130bc565b915050611c54565b60046000611d056120a3565b8054909150600160401b900460ff1680611d2c575080546001600160401b03808416911610155b15611d495760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611dd45760405162461bcd60e51b81526004016109e290612fc2565b6006805490600061189b83613087565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611e168787611bb1565b9054949793965094505050565b6000546001600160a01b03163314611e4d5760405162461bcd60e51b81526004016109e290612f2b565b600355565b6000546001600160a01b03163314611e7c5760405162461bcd60e51b81526004016109e290612f2b565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60015460009081906001600160a01b03163314611ecd5760405162461bcd60e51b81526004016109e290612fc2565b6001600160a01b0384166000908152600d602052604090206001810154848110611f135784925084826001016000828254611f089190612f83565b90915550611f1e9050565b600060018301559150815b506001015491509250929050565b600154600090819081906001600160a01b03163314611f5d5760405162461bcd60e51b81526004016109e290612fc2565b6000611f698787611bb1565b9050808511600081611f8457611f7f8784612f83565b611f8e565b611f8e8388612f83565b6001600160a01b038a166000908152600d60205260409020909150821561200757601054828260010154611fc29190612f96565b1115611fdc5760008060079650965096505050505061207e565b60115482601254611fed9190612f96565b11156120075760008060089650965096505050505061207e565b6000600154600160a01b900460ff16600281111561202757612027612b71565b0361206757821561204f5781601260008282546120449190612f96565b909155506120679050565b81601260008282546120619190612f83565b90915550505b6120728a8a8a6124fa565b91985096509450505050505b93509350939050565b6000602082511061209a57506020015190565b5060065b919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6120cf61269c565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b601481101561214a5783811a81600c8401015360010161212f565b505192915050565b6000546001600160a01b031633146103dc5760405162461bcd60e51b81526004016109e290612f2b565b600060405160005b601481101561219f578481600c011a81830153600101612184565b5060145b60208110156121bb5783811a818301536001016121a3565b50519392505050565b6001600160a01b0385166000908152600d6020526040902083156122535760006121ee8787611bb1565b905080600003612233578154600180820184556000848152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918916021790555b848260010160008282546122479190612f96565b909155506123ca915050565b828160010160008282546122679190612f83565b909155505060008290036123ca5780545b80156123c8576001600160601b03861682612294600184612f83565b815481106122a4576122a4613030565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123b657815482906122e090600190612f83565b815481106122f0576122f0613030565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906123249084612f83565b8154811061233457612334613030565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555081600001805480612380576123806130d3565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123c8565b806123c0816130bc565b915050612278565b505b60006123d6878761217c565b90506000865b81612494576123f56001600160601b03821686856126c3565b6000196001600160601b0382160161241057600191506123dc565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015612461573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061248591906130f9565b509495506123dc945050505050565b6001840154604080516001600160601b038b16815260208101889052908101919091526001600160a01b038a16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2505050505050505050565b6001600160a01b0383166000908152600d6020526040812081908190816125218888611bb1565b825490915081158015612535575060048110155b1561254d57600080600495509550955050505061207e565b81158015612559575086155b1561257157600080600995509550955050505061207e565b6000600154600160a01b900460ff16600281111561259157612591612b71565b1461262c576000600e6000600a600081546125ab90613087565b9182905550815260208082019290925260409081016000206001600160601b038c16600160a01b81026001600160a01b038f169081178355600183018d905592518c8152919450927fa59837f9df3fb816613d84e8fefe31ec8d6e67ff43df6533e3f793a3f53aade9910160405180910390a3506001935061207e92505050565b8187106126445761263d8288612f83565b955061268c565b61264e8783612f83565b94506000836002015484600101541161266857600061267c565b8360020154846001015461267c9190612f83565b90508086111561268a578095505b505b5060009250505093509350939050565b6126a4612a16565b6126c157604051631afcd79f60e31b815260040160405180910390fd5b565b6000838152600c6020908152604080832084845260038101909252822054909181900361289057831561288b5760018201546000036127de57506002810180546001808201835560009283526020909220810185905590811480159061273d57508154612731600183612f83565b61273b919061305c565b155b156127d95781546000906127519083613167565b6000818152600485016020526040812054919250612770846001612f96565b90508460020185600201848154811061278b5761278b613030565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b612859565b6001808301805490916127f091612f83565b8154811061280057612800613030565b9060005260206000200154905081600101805480612820576128206130d3565b600190038181906000526020600020016000905590558382600201828154811061284c5761284c613030565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561288b8582600187612a30565b611c12565b8360000361292e5760008260020182815481106128af576128af613030565b9060005260206000200154905060008360020183815481106128d3576128d3613030565b6000918252602080832090910192909255600180860180549182018155825282822001849055858152600385018252604080822082905584825260048601909252908120819055612928908790849084612a30565b50611c12565b81600201818154811061294357612943613030565b90600052602060002001548414611c125760008483600201838154811061296c5761296c613030565b9060005260206000200154111590506000816129b2578584600201848154811061299857612998613030565b90600052602060002001546129ad9190612f83565b6129dd565b8360020183815481106129c7576129c7613030565b9060005260206000200154866129dd9190612f83565b9050858460020184815481106129f5576129f5613030565b600091825260209091200155612a0d87848484612a30565b50505050505050565b6000612a206120a3565b54600160401b900460ff16919050565b6000848152600c60205260409020835b8015612ae5578154612a53600183612f83565b612a5d9190613167565b905083612a945782826002018281548110612a7a57612a7a613030565b9060005260206000200154612a8f9190612f83565b612abf565b82826002018281548110612aaa57612aaa613030565b9060005260206000200154612abf9190612f96565b826002018281548110612ad457612ad4613030565b600091825260209091200155612a40565b505050505050565b600060208284031215612aff57600080fd5b5035919050565b6001600160a01b03811681146103dc57600080fd5b6001600160601b03811681146103dc57600080fd5b600080600060608486031215612b4557600080fd5b8335612b5081612b06565b92506020840135612b6081612b1b565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b8381526020810183905260608101600a8310612ba557612ba5612b71565b826040830152949350505050565b60008060408385031215612bc657600080fd5b8235612bd181612b06565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612c0657600080fd5b81356001600160401b03811115612c1f57612c1f612bdf565b604051601f8201601f19908116603f011681016001600160401b0381118282101715612c4d57612c4d612bdf565b604052818152838201602001851015612c6557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612c9557600080fd5b8235915060208301356001600160401b03811115612cb257600080fd5b612cbe85828601612bf5565b9150509250929050565b600080600080600080600080610100898b031215612ce557600080fd5b8835612cf081612b06565b97506020890135612d0081612b06565b965060408901359550606089013594506080890135612d1e81612b06565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600080600060608486031215612d5557600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612d7f57600080fd5b8235612d8a81612b06565b915060208301356001600160401b03811115612cb257600080fd5b600060208284031215612db757600080fd5b813561144d81612b06565b602080825282518282018190526000918401906040840190835b81811015612e035783516001600160601b0316835260209384019390920191600101612ddc565b509095945050505050565b60005b83811015612e29578181015183820152602001612e11565b50506000910152565b6020815260008251806020840152612e51816040850160208701612e0e565b601f01601f19169190910160400192915050565b60008060408385031215612e7857600080fd5b50508035926020909101359150565b60008060408385031215612e9a57600080fd5b8235612ea581612b06565b91506020830135612eb581612b1b565b809150509250929050565b600080600080600060a08688031215612ed857600080fd5b8535612ee381612b06565b94506020860135612ef381612b1b565b94979496505050506040830135926060810135926080909101359150565b6020810160038310612f2557612f25612b71565b91905290565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611a1057611a10612f6d565b80820180821115611a1057611a10612f6d565b600060208284031215612fbb57600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b6001600160a01b039390931683526001600160601b03919091166020830152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60008261306b5761306b613046565b500690565b8082028115828204841417611a1057611a10612f6d565b60006001820161309957613099612f6d565b5060010190565b600082516130b2818460208701612e0e565b9190910192915050565b6000816130cb576130cb612f6d565b506000190190565b634e487b7160e01b600052603160045260246000fd5b8051801515811461209e57600080fd5b600080600080600080600060e0888a03121561311457600080fd5b875161311f81612b1b565b965061312d602089016130e9565b604089015160608a015160808b015160a08c015193995091975095509350915061315960c089016130e9565b905092959891949750929550565b60008261317657613176613046565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212209a929288a5ac23f35bff73c627572e378facda5250ad7cff62928f3d529469e064736f6c634300081c0033", - "devdoc": { - "details": "A factory of trees that keeps track of staked values for sortition.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "LeftoverPNK(address,uint256)": { - "details": "Emitted when leftover PNK is available.", - "params": { - "_account": "The account of the juror.", - "_amount": "The amount of PNK available." - } - }, - "LeftoverPNKWithdrawn(address,uint256)": { - "details": "Emitted when leftover PNK is withdrawn.", - "params": { - "_account": "The account of the juror withdrawing PNK.", - "_amount": "The amount of PNK withdrawn." - } - }, - "StakeDelayed(address,uint96,uint256)": { - "params": { - "_address": "The address of the juror.", - "_amount": "The amount of tokens staked in the court.", - "_courtID": "The ID of the court." - } - }, - "StakeLocked(address,uint256,bool)": { - "params": { - "_address": "The address of the juror.", - "_relativeAmount": "The amount of tokens locked.", - "_unlock": "Whether the stake is locked or unlocked." - } - }, - "StakeSet(address,uint256,uint256,uint256)": { - "params": { - "_address": "The address of the juror.", - "_amount": "The amount of tokens staked in the court.", - "_amountAllCourts": "The amount of tokens staked in all courts.", - "_courtID": "The ID of the court." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "changeMaxDrawingTime(uint256)": { - "details": "Changes the `maxDrawingTime` storage variable.", - "params": { - "_maxDrawingTime": "The new value for the `maxDrawingTime` storage variable." - } - }, - "changeMinStakingTime(uint256)": { - "details": "Changes the `minStakingTime` storage variable.", - "params": { - "_minStakingTime": "The new value for the `minStakingTime` storage variable." - } - }, - "changeRandomNumberGenerator(address,uint256)": { - "details": "Changes the `_rng` and `_rngLookahead` storage variables.", - "params": { - "_rng": "The new value for the `RNGenerator` storage variable.", - "_rngLookahead": "The new value for the `rngLookahead` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createTree(bytes32,bytes)": { - "details": "Create a sortition sum tree at the specified key.", - "params": { - "_extraData": "Extra data that contains the number of children each node in the tree should have.", - "_key": "The key of the new tree." - } - }, - "draw(bytes32,uint256,uint256)": { - "details": "Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.", - "params": { - "_coreDisputeID": "Index of the dispute in Kleros Core.", - "_key": "The key of the tree.", - "_nonce": "Nonce to hash with random number." - }, - "returns": { - "drawnAddress": "The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended." - } - }, - "executeDelayedStakes(uint256)": { - "details": "Executes the next delayed stakes.", - "params": { - "_iterations": "The number of delayed stakes to execute." - } - }, - "getJurorCourtIDs(address)": { - "details": "Gets the court identifiers where a specific `_juror` has staked.", - "params": { - "_juror": "The address of the juror." - } - }, - "initialize(address,address,uint256,uint256,address,uint256,uint256,uint256)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_core": "The KlerosCore.", - "_governor": "The governor.", - "_maxDrawingTime": "Time after which the drawing phase can be switched", - "_maxStakePerJuror": "The maximum amount of PNK a juror can stake in a court.", - "_maxTotalStaked": "The maximum amount of PNK that can be staked in all courts.", - "_minStakingTime": "Minimal time to stake", - "_rng": "The random number generator.", - "_rngLookahead": "Lookahead value for rng." - } - }, - "notifyRandomNumber(uint256)": { - "details": "Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().", - "params": { - "_randomNumber": "Random number returned by RNG contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setJurorInactive(address)": { - "details": "Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", - "params": { - "_account": "The juror to unstake." - } - }, - "setStake(address,uint96,uint256,uint256,uint256)": { - "details": "Update the state of the stakes, called by KC at the end of setStake flow. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", - "params": { - "_account": "The address of the juror.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake.", - "_pnkDeposit": "The amount of PNK to be deposited.", - "_pnkWithdrawal": "The amount of PNK to be withdrawn." - } - }, - "stakeOf(address,uint96)": { - "details": "Get the stake of a juror in a court.", - "params": { - "_courtID": "The ID of the court.", - "_juror": "The address of the juror." - }, - "returns": { - "_0": "value The stake of the juror in the court." - } - }, - "stakeOf(bytes32,bytes32)": { - "details": "Get the stake of a juror in a court.", - "params": { - "_ID": "The stake path ID, corresponding to a juror.", - "_key": "The key of the tree, corresponding to a court." - }, - "returns": { - "_0": "The stake of the juror in the court." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "validateStake(address,uint96,uint256)": { - "details": "Validate the specified juror's new stake for a court. Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.", - "params": { - "_account": "The address of the juror.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake." - }, - "returns": { - "pnkDeposit": "The amount of PNK to be deposited.", - "pnkWithdrawal": "The amount of PNK to be withdrawn.", - "stakingResult": "The result of the staking operation." - } - }, - "withdrawLeftoverPNK(address)": { - "details": "Gives back the locked PNKs in case the juror fully unstaked earlier. Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). In this case the juror can use this function to withdraw the leftover tokens. Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.", - "params": { - "_account": "The juror whose PNK to withdraw." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "SortitionModuleNeo", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "events": { - "StakeDelayed(address,uint96,uint256)": { - "notice": "Emitted when a juror's stake is delayed." - }, - "StakeLocked(address,uint256,bool)": { - "notice": "Emitted when a juror's stake is locked." - }, - "StakeSet(address,uint256,uint256,uint256)": { - "notice": "Emitted when a juror stakes in a court." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 16677, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 16680, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)11133" - }, - { - "astId": 16683, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "phase", - "offset": 20, - "slot": "1", - "type": "t_enum(Phase)26305" - }, - { - "astId": 16685, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "minStakingTime", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 16687, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "maxDrawingTime", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 16689, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "lastPhaseChange", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 16691, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "randomNumberRequestBlock", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 16693, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "disputesWithoutJurors", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 16696, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "rng", - "offset": 0, - "slot": "7", - "type": "t_contract(RNG)35453" - }, - { - "astId": 16698, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "randomNumber", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 16700, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "rngLookahead", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 16702, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "delayedStakeWriteIndex", - "offset": 0, - "slot": "10", - "type": "t_uint256" - }, - { - "astId": 16704, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "delayedStakeReadIndex", - "offset": 0, - "slot": "11", - "type": "t_uint256" - }, - { - "astId": 16709, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "sortitionSumTrees", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)16658_storage)" - }, - { - "astId": 16714, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "jurors", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_address,t_struct(Juror)16675_storage)" - }, - { - "astId": 16719, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "delayedStakes", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_uint256,t_struct(DelayedStake)16667_storage)" - }, - { - "astId": 16725, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "latestDelayedStakeIndex", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_address,t_mapping(t_uint96,t_uint256))" - }, - { - "astId": 18517, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "maxStakePerJuror", - "offset": 0, - "slot": "16", - "type": "t_uint256" - }, - { - "astId": 18519, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "maxTotalStaked", - "offset": 0, - "slot": "17", - "type": "t_uint256" - }, - { - "astId": 18521, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "totalStaked", - "offset": 0, - "slot": "18", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_array(t_uint96)dyn_storage": { - "base": "t_uint96", - "encoding": "dynamic_array", - "label": "uint96[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)11133": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_contract(RNG)35453": { - "encoding": "inplace", - "label": "contract RNG", - "numberOfBytes": "20" - }, - "t_enum(Phase)26305": { - "encoding": "inplace", - "label": "enum ISortitionModule.Phase", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_mapping(t_uint96,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint96 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint96,t_uint256)" - }, - "t_mapping(t_address,t_struct(Juror)16675_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct SortitionModuleBase.Juror)", - "numberOfBytes": "32", - "value": "t_struct(Juror)16675_storage" - }, - "t_mapping(t_bytes32,t_struct(SortitionSumTree)16658_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct SortitionModuleBase.SortitionSumTree)", - "numberOfBytes": "32", - "value": "t_struct(SortitionSumTree)16658_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_bytes32)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bytes32)", - "numberOfBytes": "32", - "value": "t_bytes32" - }, - "t_mapping(t_uint256,t_struct(DelayedStake)16667_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct SortitionModuleBase.DelayedStake)", - "numberOfBytes": "32", - "value": "t_struct(DelayedStake)16667_storage" - }, - "t_mapping(t_uint96,t_uint256)": { - "encoding": "mapping", - "key": "t_uint96", - "label": "mapping(uint96 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DelayedStake)16667_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.DelayedStake", - "members": [ - { - "astId": 16660, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 16662, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "courtID", - "offset": 20, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 16664, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "stake", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 16666, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "alreadyTransferred", - "offset": 0, - "slot": "2", - "type": "t_bool" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Juror)16675_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.Juror", - "members": [ - { - "astId": 16670, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "courtIDs", - "offset": 0, - "slot": "0", - "type": "t_array(t_uint96)dyn_storage" - }, - { - "astId": 16672, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "stakedPnk", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 16674, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "lockedPnk", - "offset": 0, - "slot": "2", - "type": "t_uint256" - } - ], - "numberOfBytes": "96" - }, - "t_struct(SortitionSumTree)16658_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.SortitionSumTree", - "members": [ - { - "astId": 16643, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "K", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 16646, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "stack", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 16649, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "nodes", - "offset": 0, - "slot": "2", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 16653, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "IDsToNodeIndexes", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_bytes32,t_uint256)" - }, - { - "astId": 16657, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "nodeIndexesToIDs", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_bytes32)" - } - ], - "numberOfBytes": "160" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrum/SortitionModule_Proxy.json b/contracts/deployments/arbitrum/SortitionModule_Proxy.json deleted file mode 100644 index 692134e76..000000000 --- a/contracts/deployments/arbitrum/SortitionModule_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", - "transactionIndex": 7, - "gasUsed": "595244", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd0b7f441a69fe8a34febf4998ba3ad138790bfba81f486df83208c393801a7ba", - "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", - "logs": [ - { - "transactionIndex": 7, - "blockNumber": 272063201, - "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", - "address": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 18, - "blockHash": "0xd0b7f441a69fe8a34febf4998ba3ad138790bfba81f486df83208c393801a7ba" - } - ], - "blockNumber": 272063201, - "cumulativeGasUsed": "1884235", - "status": 1, - "byzantium": true - }, - "args": [ - "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", - "0x498c752c000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000708000000000000000000000000044afe0069c0fd641bc5f90d9a4218ef0b2fa9d3000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000006c6b935b8bbd40000000000000000000000000000000000000000000000001a784379d99db42000000" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleNeoProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204bceea1b46a095339c0faa0cacdfde8401f8237d6ebe71f92eacd5fa95b7ec3864736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204bceea1b46a095339c0faa0cacdfde8401f8237d6ebe71f92eacd5fa95b7ec3864736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/TransactionBatcher.json b/contracts/deployments/arbitrum/TransactionBatcher.json deleted file mode 100644 index 343ec6344..000000000 --- a/contracts/deployments/arbitrum/TransactionBatcher.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "address": "0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF", - "abi": [ - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "datas", - "type": "bytes[]" - } - ], - "name": "batchSend", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "datas", - "type": "bytes[]" - } - ], - "name": "batchSendUnchecked", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0x50a763cdca3efd37d6f33e98d7ea345ef4f6ad821949aba64ca8ce2a06c8b06a", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF", - "transactionIndex": 4, - "gasUsed": "458947", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1bfe2ba4e8defa670819e72dbe2fbac4d9b7ea05cfbbdafe0335df02d9410842", - "transactionHash": "0x50a763cdca3efd37d6f33e98d7ea345ef4f6ad821949aba64ca8ce2a06c8b06a", - "logs": [], - "blockNumber": 235536061, - "cumulativeGasUsed": "1233814", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "036e2ca71d8ebdd78fd6317e15ba1f3c", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSendUnchecked\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/utils/TransactionBatcher.sol\":\"TransactionBatcher\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/utils/TransactionBatcher.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from https://github.com/daostack/web3-transaction-batcher/blob/1b88d2ea062f8f2d9fdfdf9bbe85d2bbef780151/contracts/Batcher.sol\\n\\ncontract TransactionBatcher {\\n\\n function batchSend(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n (bool success,) = targets[i].call{value: values[i]}(datas[i]);\\n if (!success) revert('transaction failed'); // All the calls must succeed.\\n }\\n }\\n\\n function batchSendUnchecked(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n targets[i].call{value: values[i]}(datas[i]); // Intentionally ignoring return value.\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1983237012c29ef487ca47d60b197eb30d5b072ffec3078685d43fcc5fcc10a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561000f575f80fd5b506105238061001d5f395ff3fe608060405260043610610028575f3560e01c8063a8f0802e1461002c578063cef591aa14610041575b5f80fd5b61003f61003a3660046103c4565b610054565b005b61003f61004f3660046103c4565b61015c565b5f5b8351811015610156575f848281518110610072576100726104ad565b60200260200101516001600160a01b0316848381518110610095576100956104ad565b60200260200101518484815181106100af576100af6104ad565b60200260200101516040516100c491906104c1565b5f6040518083038185875af1925050503d805f81146100fe576040519150601f19603f3d011682016040523d82523d5f602084013e610103565b606091505b505090508061014d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd858dd1a5bdb8819985a5b195960721b604482015260640160405180910390fd5b50600101610056565b50505050565b5f5b835181101561015657838181518110610179576101796104ad565b60200260200101516001600160a01b031683828151811061019c5761019c6104ad565b60200260200101518383815181106101b6576101b66104ad565b60200260200101516040516101cb91906104c1565b5f6040518083038185875af1925050503d805f8114610205576040519150601f19603f3d011682016040523d82523d5f602084013e61020a565b606091505b50505060010161015e565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561025257610252610215565b604052919050565b5f67ffffffffffffffff82111561027357610273610215565b5060051b60200190565b5f82601f83011261028c575f80fd5b813560206102a161029c8361025a565b610229565b8083825260208201915060208460051b8701019350868411156102c2575f80fd5b602086015b848110156102de57803583529183019183016102c7565b509695505050505050565b5f601f83601f8401126102fa575f80fd5b8235602061030a61029c8361025a565b82815260059290921b85018101918181019087841115610328575f80fd5b8287015b848110156103b857803567ffffffffffffffff8082111561034b575f80fd5b818a0191508a603f83011261035e575f80fd5b8582013560408282111561037457610374610215565b610385828b01601f19168901610229565b92508183528c8183860101111561039a575f80fd5b8181850189850137505f90820187015284525091830191830161032c565b50979650505050505050565b5f805f606084860312156103d6575f80fd5b833567ffffffffffffffff808211156103ed575f80fd5b818601915086601f830112610400575f80fd5b8135602061041061029c8361025a565b82815260059290921b8401810191818101908a84111561042e575f80fd5b948201945b838610156104605785356001600160a01b0381168114610451575f80fd5b82529482019490820190610433565b97505087013592505080821115610475575f80fd5b6104818783880161027d565b93506040860135915080821115610496575f80fd5b506104a3868287016102e9565b9150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b818110156104e057602081860181015185830152016104c6565b505f92019182525091905056fea264697066735822122089797200888ad757484ded7bc0ffbb0769e9e974d73188d61385b7f6675e9f2064736f6c63430008180033", - "deployedBytecode": "0x608060405260043610610028575f3560e01c8063a8f0802e1461002c578063cef591aa14610041575b5f80fd5b61003f61003a3660046103c4565b610054565b005b61003f61004f3660046103c4565b61015c565b5f5b8351811015610156575f848281518110610072576100726104ad565b60200260200101516001600160a01b0316848381518110610095576100956104ad565b60200260200101518484815181106100af576100af6104ad565b60200260200101516040516100c491906104c1565b5f6040518083038185875af1925050503d805f81146100fe576040519150601f19603f3d011682016040523d82523d5f602084013e610103565b606091505b505090508061014d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd858dd1a5bdb8819985a5b195960721b604482015260640160405180910390fd5b50600101610056565b50505050565b5f5b835181101561015657838181518110610179576101796104ad565b60200260200101516001600160a01b031683828151811061019c5761019c6104ad565b60200260200101518383815181106101b6576101b66104ad565b60200260200101516040516101cb91906104c1565b5f6040518083038185875af1925050503d805f8114610205576040519150601f19603f3d011682016040523d82523d5f602084013e61020a565b606091505b50505060010161015e565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561025257610252610215565b604052919050565b5f67ffffffffffffffff82111561027357610273610215565b5060051b60200190565b5f82601f83011261028c575f80fd5b813560206102a161029c8361025a565b610229565b8083825260208201915060208460051b8701019350868411156102c2575f80fd5b602086015b848110156102de57803583529183019183016102c7565b509695505050505050565b5f601f83601f8401126102fa575f80fd5b8235602061030a61029c8361025a565b82815260059290921b85018101918181019087841115610328575f80fd5b8287015b848110156103b857803567ffffffffffffffff8082111561034b575f80fd5b818a0191508a603f83011261035e575f80fd5b8582013560408282111561037457610374610215565b610385828b01601f19168901610229565b92508183528c8183860101111561039a575f80fd5b8181850189850137505f90820187015284525091830191830161032c565b50979650505050505050565b5f805f606084860312156103d6575f80fd5b833567ffffffffffffffff808211156103ed575f80fd5b818601915086601f830112610400575f80fd5b8135602061041061029c8361025a565b82815260059290921b8401810191818101908a84111561042e575f80fd5b948201945b838610156104605785356001600160a01b0381168114610451575f80fd5b82529482019490820190610433565b97505087013592505080821115610475575f80fd5b6104818783880161027d565b93506040860135915080821115610496575f80fd5b506104a3868287016102e9565b9150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b818110156104e057602081860181015185830152016104c6565b505f92019182525091905056fea264697066735822122089797200888ad757484ded7bc0ffbb0769e9e974d73188d61385b7f6675e9f2064736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrum/WETH.json b/contracts/deployments/arbitrum/WETH.json deleted file mode 100644 index ba8ed293b..000000000 --- a/contracts/deployments/arbitrum/WETH.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] -} diff --git a/contracts/deployments/arbitrumSepolia.ts b/contracts/deployments/arbitrumSepolia.ts deleted file mode 100644 index 0bacd41a5..000000000 --- a/contracts/deployments/arbitrumSepolia.ts +++ /dev/null @@ -1,23286 +0,0 @@ -export default { - name: "arbitrumSepolia", - chainId: "421614", - contracts: { - BlockHashRNG: { - address: "0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "block", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "number", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_block", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_block", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - ChainlinkRNG: { - address: "0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_sortitionModule", - type: "address", - }, - { - internalType: "address", - name: "_vrfCoordinator", - type: "address", - }, - { - internalType: "bytes32", - name: "_keyHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_subscriptionId", - type: "uint256", - }, - { - internalType: "uint16", - name: "_requestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "_callbackGasLimit", - type: "uint32", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "have", - type: "address", - }, - { - internalType: "address", - name: "want", - type: "address", - }, - ], - name: "OnlyCoordinatorCanFulfill", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "have", - type: "address", - }, - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "coordinator", - type: "address", - }, - ], - name: "OnlyOwnerOrCoordinator", - type: "error", - }, - { - inputs: [], - name: "ZeroAddress", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "vrfCoordinator", - type: "address", - }, - ], - name: "CoordinatorSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "randomWord", - type: "uint256", - }, - ], - name: "RequestFulfilled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "RequestSent", - type: "event", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint32", - name: "_callbackGasLimit", - type: "uint32", - }, - ], - name: "changeCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_keyHash", - type: "bytes32", - }, - ], - name: "changeKeyHash", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint16", - name: "_requestConfirmations", - type: "uint16", - }, - ], - name: "changeRequestConfirmations", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_subscriptionId", - type: "uint256", - }, - ], - name: "changeSubscriptionId", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vrfCoordinator", - type: "address", - }, - ], - name: "changeVrfCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "keyHash", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastRequestId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "number", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "randomWords", - type: "uint256[]", - }, - ], - name: "rawFulfillRandomWords", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "requestConfirmations", - outputs: [ - { - internalType: "uint16", - name: "", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "s_vrfCoordinator", - outputs: [ - { - internalType: "contract IVRFCoordinatorV2Plus", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vrfCoordinator", - type: "address", - }, - ], - name: "setCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "subscriptionId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - ChainlinkVRFCoordinator: { - address: "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "blockhashStore", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "uint256", - name: "internalBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "externalBalance", - type: "uint256", - }, - ], - name: "BalanceInvariantViolated", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "blockNum", - type: "uint256", - }, - ], - name: "BlockhashNotInStore", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorAlreadyRegistered", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorNotRegistered", - type: "error", - }, - { - inputs: [], - name: "FailedToSendNative", - type: "error", - }, - { - inputs: [], - name: "FailedToTransferLink", - type: "error", - }, - { - inputs: [ - { - internalType: "uint32", - name: "have", - type: "uint32", - }, - { - internalType: "uint32", - name: "want", - type: "uint32", - }, - ], - name: "GasLimitTooBig", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxGas", - type: "uint256", - }, - ], - name: "GasPriceExceeded", - type: "error", - }, - { - inputs: [], - name: "IncorrectCommitment", - type: "error", - }, - { - inputs: [], - name: "IndexOutOfRange", - type: "error", - }, - { - inputs: [], - name: "InsufficientBalance", - type: "error", - }, - { - inputs: [], - name: "InvalidCalldata", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "InvalidConsumer", - type: "error", - }, - { - inputs: [], - name: "InvalidExtraArgsTag", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "linkWei", - type: "int256", - }, - ], - name: "InvalidLinkWeiPrice", - type: "error", - }, - { - inputs: [ - { - internalType: "uint8", - name: "premiumPercentage", - type: "uint8", - }, - { - internalType: "uint8", - name: "max", - type: "uint8", - }, - ], - name: "InvalidPremiumPercentage", - type: "error", - }, - { - inputs: [ - { - internalType: "uint16", - name: "have", - type: "uint16", - }, - { - internalType: "uint16", - name: "min", - type: "uint16", - }, - { - internalType: "uint16", - name: "max", - type: "uint16", - }, - ], - name: "InvalidRequestConfirmations", - type: "error", - }, - { - inputs: [], - name: "InvalidSubscription", - type: "error", - }, - { - inputs: [], - name: "LinkAlreadySet", - type: "error", - }, - { - inputs: [ - { - internalType: "uint32", - name: "flatFeeLinkDiscountPPM", - type: "uint32", - }, - { - internalType: "uint32", - name: "flatFeeNativePPM", - type: "uint32", - }, - ], - name: "LinkDiscountTooHigh", - type: "error", - }, - { - inputs: [], - name: "LinkNotSet", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "have", - type: "uint256", - }, - { - internalType: "uint32", - name: "max", - type: "uint32", - }, - ], - name: "MsgDataTooBig", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "proposedOwner", - type: "address", - }, - ], - name: "MustBeRequestedOwner", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "MustBeSubOwner", - type: "error", - }, - { - inputs: [], - name: "NoCorrespondingRequest", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - ], - name: "NoSuchProvingKey", - type: "error", - }, - { - inputs: [ - { - internalType: "uint32", - name: "have", - type: "uint32", - }, - { - internalType: "uint32", - name: "want", - type: "uint32", - }, - ], - name: "NumWordsTooBig", - type: "error", - }, - { - inputs: [], - name: "OnlyCallableFromLink", - type: "error", - }, - { - inputs: [], - name: "PaymentTooLarge", - type: "error", - }, - { - inputs: [], - name: "PendingRequestExists", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - ], - name: "ProvingKeyAlreadyRegistered", - type: "error", - }, - { - inputs: [], - name: "Reentrant", - type: "error", - }, - { - inputs: [], - name: "TooManyConsumers", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - indexed: false, - internalType: "uint32", - name: "maxGasLimit", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "stalenessSeconds", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "gasAfterPaymentCalculation", - type: "uint32", - }, - { - indexed: false, - internalType: "int256", - name: "fallbackWeiPerUnitLink", - type: "int256", - }, - { - indexed: false, - internalType: "uint32", - name: "fulfillmentFlatFeeNativePPM", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "fulfillmentFlatFeeLinkDiscountPPM", - type: "uint32", - }, - { - indexed: false, - internalType: "uint8", - name: "nativePremiumPercentage", - type: "uint8", - }, - { - indexed: false, - internalType: "uint8", - name: "linkPremiumPercentage", - type: "uint8", - }, - ], - name: "ConfigSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorDeregistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorRegistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "fallbackWeiPerUnitLink", - type: "int256", - }, - ], - name: "FallbackWeiPerUnitLinkUsed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "FundsRecovered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "newCoordinator", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "MigrationCompleted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "NativeFundsRecovered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - name: "ProvingKeyDeregistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - name: "ProvingKeyRegistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "outputSeed", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint96", - name: "payment", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "nativePayment", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "success", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "onlyPremium", - type: "bool", - }, - ], - name: "RandomWordsFulfilled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "preSeed", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - indexed: false, - internalType: "uint32", - name: "callbackGasLimit", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "numWords", - type: "uint32", - }, - { - indexed: false, - internalType: "bytes", - name: "extraArgs", - type: "bytes", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - ], - name: "RandomWordsRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountLink", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountNative", - type: "uint256", - }, - ], - name: "SubscriptionCanceled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "SubscriptionConsumerAdded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "SubscriptionConsumerRemoved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "SubscriptionCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "oldBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "SubscriptionFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "oldNativeBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newNativeBalance", - type: "uint256", - }, - ], - name: "SubscriptionFundedWithNative", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "SubscriptionOwnerTransferRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "SubscriptionOwnerTransferred", - type: "event", - }, - { - inputs: [], - name: "BLOCKHASH_STORE", - outputs: [ - { - internalType: "contract BlockhashStoreInterface", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LINK", - outputs: [ - { - internalType: "contract LinkTokenInterface", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LINK_NATIVE_FEED", - outputs: [ - { - internalType: "contract AggregatorV3Interface", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_CONSUMERS", - outputs: [ - { - internalType: "uint16", - name: "", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_NUM_WORDS", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_REQUEST_CONFIRMATIONS", - outputs: [ - { - internalType: "uint16", - name: "", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "acceptSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "addConsumer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "cancelSubscription", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "createSubscription", - outputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "deregisterMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[2]", - name: "publicProvingKey", - type: "uint256[2]", - }, - ], - name: "deregisterProvingKey", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256[2]", - name: "pk", - type: "uint256[2]", - }, - { - internalType: "uint256[2]", - name: "gamma", - type: "uint256[2]", - }, - { - internalType: "uint256", - name: "c", - type: "uint256", - }, - { - internalType: "uint256", - name: "s", - type: "uint256", - }, - { - internalType: "uint256", - name: "seed", - type: "uint256", - }, - { - internalType: "address", - name: "uWitness", - type: "address", - }, - { - internalType: "uint256[2]", - name: "cGammaWitness", - type: "uint256[2]", - }, - { - internalType: "uint256[2]", - name: "sHashWitness", - type: "uint256[2]", - }, - { - internalType: "uint256", - name: "zInv", - type: "uint256", - }, - ], - internalType: "struct VRF.Proof", - name: "proof", - type: "tuple", - }, - { - components: [ - { - internalType: "uint64", - name: "blockNum", - type: "uint64", - }, - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "uint32", - name: "callbackGasLimit", - type: "uint32", - }, - { - internalType: "uint32", - name: "numWords", - type: "uint32", - }, - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "bytes", - name: "extraArgs", - type: "bytes", - }, - ], - internalType: "struct VRFTypes.RequestCommitmentV2Plus", - name: "rc", - type: "tuple", - }, - { - internalType: "bool", - name: "onlyPremium", - type: "bool", - }, - ], - name: "fulfillRandomWords", - outputs: [ - { - internalType: "uint96", - name: "payment", - type: "uint96", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "fundSubscriptionWithNative", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "startIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxCount", - type: "uint256", - }, - ], - name: "getActiveSubscriptionIds", - outputs: [ - { - internalType: "uint256[]", - name: "ids", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "getSubscription", - outputs: [ - { - internalType: "uint96", - name: "balance", - type: "uint96", - }, - { - internalType: "uint96", - name: "nativeBalance", - type: "uint96", - }, - { - internalType: "uint64", - name: "reqCount", - type: "uint64", - }, - { - internalType: "address", - name: "subOwner", - type: "address", - }, - { - internalType: "address[]", - name: "consumers", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[2]", - name: "publicKey", - type: "uint256[2]", - }, - ], - name: "hashOfKey", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "newCoordinator", - type: "address", - }, - ], - name: "migrate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "onTokenTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "ownerCancelSubscription", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "pendingRequestExists", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "recoverFunds", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "to", - type: "address", - }, - ], - name: "recoverNativeFunds", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "registerMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[2]", - name: "publicProvingKey", - type: "uint256[2]", - }, - { - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - name: "registerProvingKey", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "removeConsumer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "uint16", - name: "requestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "callbackGasLimit", - type: "uint32", - }, - { - internalType: "uint32", - name: "numWords", - type: "uint32", - }, - { - internalType: "bytes", - name: "extraArgs", - type: "bytes", - }, - ], - internalType: "struct VRFV2PlusClient.RandomWordsRequest", - name: "req", - type: "tuple", - }, - ], - name: "requestRandomWords", - outputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "requestSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "s_config", - outputs: [ - { - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "maxGasLimit", - type: "uint32", - }, - { - internalType: "bool", - name: "reentrancyLock", - type: "bool", - }, - { - internalType: "uint32", - name: "stalenessSeconds", - type: "uint32", - }, - { - internalType: "uint32", - name: "gasAfterPaymentCalculation", - type: "uint32", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeNativePPM", - type: "uint32", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeLinkDiscountPPM", - type: "uint32", - }, - { - internalType: "uint8", - name: "nativePremiumPercentage", - type: "uint8", - }, - { - internalType: "uint8", - name: "linkPremiumPercentage", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_currentSubNonce", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_fallbackWeiPerUnitLink", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "s_provingKeyHashes", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "s_provingKeys", - outputs: [ - { - internalType: "bool", - name: "exists", - type: "bool", - }, - { - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "s_requestCommitments", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_totalBalance", - outputs: [ - { - internalType: "uint96", - name: "", - type: "uint96", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_totalNativeBalance", - outputs: [ - { - internalType: "uint96", - name: "", - type: "uint96", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "maxGasLimit", - type: "uint32", - }, - { - internalType: "uint32", - name: "stalenessSeconds", - type: "uint32", - }, - { - internalType: "uint32", - name: "gasAfterPaymentCalculation", - type: "uint32", - }, - { - internalType: "int256", - name: "fallbackWeiPerUnitLink", - type: "int256", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeNativePPM", - type: "uint32", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeLinkDiscountPPM", - type: "uint32", - }, - { - internalType: "uint8", - name: "nativePremiumPercentage", - type: "uint8", - }, - { - internalType: "uint8", - name: "linkPremiumPercentage", - type: "uint8", - }, - ], - name: "setConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "link", - type: "address", - }, - { - internalType: "address", - name: "linkNativeFeed", - type: "address", - }, - ], - name: "setLINKAndLINKNativeFeed", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "recipient", - type: "address", - }, - ], - name: "withdrawNative", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DAI: { - address: "0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03", - abi: [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - DAIFaucet: { - address: "0x1Fa58B52326488D62A406E71DBaD839560e810fF", - abi: [ - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "balance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeKitClassic: { - address: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitClassic_Implementation: { - address: "0xA122856B3B4C5fBcA129088af3CEb204509805f0", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitClassic_Proxy: { - address: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitGated: { - address: "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "extraDataToTokenInfo", - outputs: [ - { - internalType: "address", - name: "tokenGate", - type: "address", - }, - { - internalType: "bool", - name: "isERC1155", - type: "bool", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitGatedShutter: { - address: "0x936231010462458ebaA45dDc422A5940C08a474C", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitGatedShutter_Implementation: { - address: "0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitGatedShutter_Proxy: { - address: "0x936231010462458ebaA45dDc422A5940C08a474C", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitGated_Implementation: { - address: "0x2d1b63C9638ed62875256676C665a7ec14D7663C", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "extraDataToTokenInfo", - outputs: [ - { - internalType: "address", - name: "tokenGate", - type: "address", - }, - { - internalType: "bool", - name: "isERC1155", - type: "bool", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitGated_Proxy: { - address: "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitShutter: { - address: "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitShutter_Implementation: { - address: "0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitShutter_Proxy: { - address: "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeResolver: { - address: "0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652", - abi: [ - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, - ], - name: "DisputeRequest", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", - outputs: [ - { - internalType: "contract IArbitratorV2", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplate", - type: "string", - }, - { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "uint256", - name: "numberOfRulingOptions", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeTemplateRegistry: { - address: "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "DisputeTemplate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "setDisputeTemplate", - outputs: [ - { - internalType: "uint256", - name: "templateId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templates", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeTemplateRegistry_Implementation: { - address: "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "DisputeTemplate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "setDisputeTemplate", - outputs: [ - { - internalType: "uint256", - name: "templateId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templates", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeTemplateRegistry_Proxy: { - address: "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - EvidenceModule: { - address: "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_party", - type: "address", - }, - { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - EvidenceModule_Implementation: { - address: "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_party", - type: "address", - }, - { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - EvidenceModule_Proxy: { - address: "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - KlerosCore: { - address: "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibleInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "StakingZeroWhenNoStake", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WhenNotPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WhenPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreBase.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_guardian", - type: "address", - }, - ], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModule", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreBase.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "uint256", - name: "nbDrawnJurors", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getPnkAtStakePerJuror", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreBase.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "guardian", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_guardian", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "contract ISortitionModule", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - KlerosCoreSnapshotProxy: { - address: "0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IKlerosCore", - name: "_core", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IKlerosCore", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract IKlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - 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", - }, - ], - }, - KlerosCore_Implementation: { - address: "0x02F607722749CECd32db07AA0b0755281FE9D13c", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibleInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "StakingZeroWhenNoStake", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WhenNotPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WhenPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreBase.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_guardian", - type: "address", - }, - ], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModule", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreBase.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "uint256", - name: "nbDrawnJurors", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getPnkAtStakePerJuror", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreBase.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "guardian", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_guardian", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "contract ISortitionModule", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - KlerosCore_Proxy: { - address: "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - PNK: { - address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - PNKFaucet: { - address: "0x9f6ffc13B685A68ae359fCA128dfE776458Df464", - abi: [ - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "balance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - PinakionV2: { - address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - PolicyRegistry: { - address: "0x2668c46A14af8997417138B064ca1bEB70769585", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_courtName", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "PolicyUpdate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "policies", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - internalType: "string", - name: "_courtName", - type: "string", - }, - { - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - PolicyRegistry_Implementation: { - address: "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_courtName", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "PolicyUpdate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "policies", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - internalType: "string", - name: "_courtName", - type: "string", - }, - { - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - PolicyRegistry_Proxy: { - address: "0x2668c46A14af8997417138B064ca1bEB70769585", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - RandomizerOracle: { - address: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", - abi: [], - }, - RandomizerRNG: { - address: "0x51a97ad9F0aA818e75819da3cA20CAc319580627", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IRandomizer", - name: "_randomizer", - type: "address", - }, - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "number", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomizer", - outputs: [ - { - internalType: "contract IRandomizer", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_id", - type: "uint256", - }, - { - internalType: "bytes32", - name: "_value", - type: "bytes32", - }, - ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "requester", - type: "address", - }, - ], - name: "requesterToID", - outputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_callbackGasLimit", - type: "uint256", - }, - ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_randomizer", - type: "address", - }, - ], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - RandomizerRNG_Implementation: { - address: "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IRandomizer", - name: "_randomizer", - type: "address", - }, - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "number", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomizer", - outputs: [ - { - internalType: "contract IRandomizer", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_id", - type: "uint256", - }, - { - internalType: "bytes32", - name: "_value", - type: "bytes32", - }, - ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "requester", - type: "address", - }, - ], - name: "requesterToID", - outputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_callbackGasLimit", - type: "uint256", - }, - ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_randomizer", - type: "address", - }, - ], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - RandomizerRNG_Proxy: { - address: "0x51a97ad9F0aA818e75819da3cA20CAc319580627", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - SortitionModule: { - address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNK", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNKWithdrawn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", - }, - ], - name: "NewPhase", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "StakeDelayed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amountAllCourts", - type: "uint256", - }, - ], - name: "StakeSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - ], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "delayedStakeReadIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "delayedStakes", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "bool", - name: "alreadyTransferred", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, - { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbCourts", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorCourtIDs", - outputs: [ - { - internalType: "uint96[]", - name: "", - type: "uint96[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorLeftoverPNK", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "isJurorStaked", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "jurors", - outputs: [ - { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastPhaseChange", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "jurorAccount", - type: "address", - }, - { - internalType: "uint96", - name: "courtId", - type: "uint96", - }, - ], - name: "latestDelayedStakeIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "maxDrawingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minStakingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", - }, - ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", - outputs: [ - { - internalType: "uint256", - name: "pnkBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "availablePenalty", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "phase", - outputs: [ - { - internalType: "enum ISortitionModule.Phase", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumber", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumberRequestBlock", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rng", - outputs: [ - { - internalType: "contract RNG", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rngLookahead", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "_pnkWithdrawal", - type: "uint256", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_ID", - type: "bytes32", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "validateStake", - outputs: [ - { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", - type: "uint256", - }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - SortitionModule_Implementation: { - address: "0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNK", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNKWithdrawn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", - }, - ], - name: "NewPhase", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "StakeDelayed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amountAllCourts", - type: "uint256", - }, - ], - name: "StakeSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - ], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "delayedStakeReadIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "delayedStakes", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "bool", - name: "alreadyTransferred", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, - { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbCourts", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorCourtIDs", - outputs: [ - { - internalType: "uint96[]", - name: "", - type: "uint96[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorLeftoverPNK", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "isJurorStaked", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "jurors", - outputs: [ - { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastPhaseChange", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "jurorAccount", - type: "address", - }, - { - internalType: "uint96", - name: "courtId", - type: "uint96", - }, - ], - name: "latestDelayedStakeIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "maxDrawingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minStakingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", - }, - ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", - outputs: [ - { - internalType: "uint256", - name: "pnkBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "availablePenalty", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "phase", - outputs: [ - { - internalType: "enum ISortitionModule.Phase", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumber", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumberRequestBlock", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rng", - outputs: [ - { - internalType: "contract RNG", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rngLookahead", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "_pnkWithdrawal", - type: "uint256", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_ID", - type: "bytes32", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "validateStake", - outputs: [ - { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", - type: "uint256", - }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - SortitionModule_Proxy: { - address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - TransactionBatcher: { - address: "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", - abi: [ - { - inputs: [ - { - internalType: "address[]", - name: "targets", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "values", - type: "uint256[]", - }, - { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", - }, - ], - name: "batchSend", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "targets", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "values", - type: "uint256[]", - }, - { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", - }, - ], - name: "batchSendUnchecked", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - WETH: { - address: "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511", - abi: [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - WETHFaucet: { - address: "0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835", - abi: [ - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "balance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - VeaInboxArbToEthDevnet: { - address: "0xF6C5640de593fEf76129F1F1A863F7ddc65776C9", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "_epochPeriod", - type: "uint256", - }, - { - internalType: "address", - name: "_veaOutboxArbToEth", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "_nodeData", - type: "bytes", - }, - ], - name: "MessageSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "_snapshot", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - indexed: false, - internalType: "uint64", - name: "_count", - type: "uint64", - }, - ], - name: "SnapshotSaved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_epochSent", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "_ticketId", - type: "bytes32", - }, - ], - name: "SnapshotSent", - type: "event", - }, - { - inputs: [], - name: "count", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, - ], - name: "epochAt", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochFinalized", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochNow", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochPeriod", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "saveSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_to", - type: "address", - }, - { - internalType: "bytes4", - name: "_fnSelector", - type: "bytes4", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "sendMessage", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - components: [ - { - internalType: "bytes32", - name: "stateRoot", - type: "bytes32", - }, - { - internalType: "address", - name: "claimer", - type: "address", - }, - { - internalType: "uint32", - name: "timestampClaimed", - type: "uint32", - }, - { - internalType: "uint32", - name: "timestampVerification", - type: "uint32", - }, - { - internalType: "uint32", - name: "blocknumberVerification", - type: "uint32", - }, - { - internalType: "enum Party", - name: "honest", - type: "uint8", - }, - { - internalType: "address", - name: "challenger", - type: "address", - }, - ], - internalType: "struct Claim", - name: "_claim", - type: "tuple", - }, - ], - name: "sendSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - name: "snapshots", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "veaOutboxArbToEth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - VeaInboxArbToEthTestnet: { - address: "0xE12daFE59Bc3A996362d54b37DFd2BA9279cAd06", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "_epochPeriod", - type: "uint256", - }, - { - internalType: "address", - name: "_veaOutboxArbToEth", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "_nodeData", - type: "bytes", - }, - ], - name: "MessageSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "_snapshot", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - indexed: false, - internalType: "uint64", - name: "_count", - type: "uint64", - }, - ], - name: "SnapshotSaved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_epochSent", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "_ticketId", - type: "bytes32", - }, - ], - name: "SnapshotSent", - type: "event", - }, - { - inputs: [], - name: "count", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, - ], - name: "epochAt", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochFinalized", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochNow", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochPeriod", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "saveSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_to", - type: "address", - }, - { - internalType: "bytes4", - name: "_fnSelector", - type: "bytes4", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "sendMessage", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - components: [ - { - internalType: "bytes32", - name: "stateRoot", - type: "bytes32", - }, - { - internalType: "address", - name: "claimer", - type: "address", - }, - { - internalType: "uint32", - name: "timestampClaimed", - type: "uint32", - }, - { - internalType: "uint32", - name: "timestampVerification", - type: "uint32", - }, - { - internalType: "uint32", - name: "blocknumberVerification", - type: "uint32", - }, - { - internalType: "enum Party", - name: "honest", - type: "uint8", - }, - { - internalType: "address", - name: "challenger", - type: "address", - }, - ], - internalType: "struct Claim", - name: "_claim", - type: "tuple", - }, - ], - name: "sendSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - name: "snapshots", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "veaOutboxArbToEth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - VeaInboxArbToGnosisDevnet: { - address: "0xF6286b9C6c7F1B33Ea976FA43434027c7b8421A7", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "_epochPeriod", - type: "uint256", - }, - { - internalType: "address", - name: "_routerArbToGnosis", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "_nodeData", - type: "bytes", - }, - ], - name: "MessageSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "_snapshot", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - indexed: false, - internalType: "uint64", - name: "_count", - type: "uint64", - }, - ], - name: "SnapshotSaved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_epochSent", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "_ticketId", - type: "bytes32", - }, - ], - name: "SnapshotSent", - type: "event", - }, - { - inputs: [], - name: "count", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, - ], - name: "epochAt", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochFinalized", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochNow", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochPeriod", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "routerArbToGnosis", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "saveSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_to", - type: "address", - }, - { - internalType: "bytes4", - name: "_fnSelector", - type: "bytes4", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "sendMessage", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - internalType: "uint256", - name: "_gasLimit", - type: "uint256", - }, - { - components: [ - { - internalType: "bytes32", - name: "stateRoot", - type: "bytes32", - }, - { - internalType: "address", - name: "claimer", - type: "address", - }, - { - internalType: "uint32", - name: "timestampClaimed", - type: "uint32", - }, - { - internalType: "uint32", - name: "timestampVerification", - type: "uint32", - }, - { - internalType: "uint32", - name: "blocknumberVerification", - type: "uint32", - }, - { - internalType: "enum Party", - name: "honest", - type: "uint8", - }, - { - internalType: "address", - name: "challenger", - type: "address", - }, - ], - internalType: "struct Claim", - name: "_claim", - type: "tuple", - }, - ], - name: "sendSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - name: "snapshots", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - VeaInboxArbToGnosisTestnet: { - address: "0x62403e9Fbac618301175C89fb21920e4FF235A6a", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "_epochPeriod", - type: "uint256", - }, - { - internalType: "address", - name: "_routerArbToGnosis", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "_nodeData", - type: "bytes", - }, - ], - name: "MessageSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "_snapshot", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - indexed: false, - internalType: "uint64", - name: "_count", - type: "uint64", - }, - ], - name: "SnapshotSaved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_epochSent", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "_ticketId", - type: "bytes32", - }, - ], - name: "SnapshotSent", - type: "event", - }, - { - inputs: [], - name: "count", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, - ], - name: "epochAt", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochFinalized", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochNow", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochPeriod", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "routerArbToGnosis", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "saveSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_to", - type: "address", - }, - { - internalType: "bytes4", - name: "_fnSelector", - type: "bytes4", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "sendMessage", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - internalType: "uint256", - name: "_gasLimit", - type: "uint256", - }, - { - components: [ - { - internalType: "bytes32", - name: "stateRoot", - type: "bytes32", - }, - { - internalType: "address", - name: "claimer", - type: "address", - }, - { - internalType: "uint32", - name: "timestampClaimed", - type: "uint32", - }, - { - internalType: "uint32", - name: "timestampVerification", - type: "uint32", - }, - { - internalType: "uint32", - name: "blocknumberVerification", - type: "uint32", - }, - { - internalType: "enum Party", - name: "honest", - type: "uint8", - }, - { - internalType: "address", - name: "challenger", - type: "address", - }, - ], - internalType: "struct Claim", - name: "_claim", - type: "tuple", - }, - ], - name: "sendSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - name: "snapshots", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - }, -} as const; diff --git a/contracts/deployments/arbitrumSepolia/.chainId b/contracts/deployments/arbitrumSepolia/.chainId deleted file mode 100644 index 357f9c751..000000000 --- a/contracts/deployments/arbitrumSepolia/.chainId +++ /dev/null @@ -1 +0,0 @@ -421614 diff --git a/contracts/deployments/arbitrumSepolia/BlockHashRNG.json b/contracts/deployments/arbitrumSepolia/BlockHashRNG.json deleted file mode 100644 index 79c21e096..000000000 --- a/contracts/deployments/arbitrumSepolia/BlockHashRNG.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "address": "0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "block", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "number", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_block", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_block", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x4977e90ed984861e83438079b454ac095962773d9b0c43e0518644354dc3dd40", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754", - "transactionIndex": 1, - "gasUsed": "141446", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3d5075badf7f3a8669b37392af7e8a663c98e999a40cce679fd132316ca66e4d", - "transactionHash": "0x4977e90ed984861e83438079b454ac095962773d9b0c43e0518644354dc3dd40", - "logs": [], - "blockNumber": 94823214, - "cumulativeGasUsed": "141446", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "464986207bfd65f93de9fcb4daa23259", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"block\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cl\\u00e9ment Lesaege - \",\"details\":\"Random Number Generator returning the blockhash with a fallback behaviour. In case no one called it within the 256 blocks, it returns the previous blockhash. This contract must be used when returning 0 is a worse failure mode than returning another blockhash. Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.\",\"kind\":\"dev\",\"methods\":{\"receiveRandomness(uint256)\":{\"details\":\"Return the random number. If it has not been saved and is still computable compute it.\",\"params\":{\"_block\":\"Block the random number is linked to.\"},\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number.\",\"params\":{\"_block\":\"Block the random number is linked to.\"}}},\"title\":\"Random Number Generator using blockhash with fallback.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/rng/BlockhashRNG.sol\":\"BlockHashRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/rng/BlockhashRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./RNG.sol\\\";\\n\\n/// @title Random Number Generator using blockhash with fallback.\\n/// @author Cl\\u00e9ment Lesaege - \\n/// @dev\\n/// Random Number Generator returning the blockhash with a fallback behaviour.\\n/// In case no one called it within the 256 blocks, it returns the previous blockhash.\\n/// This contract must be used when returning 0 is a worse failure mode than returning another blockhash.\\n/// Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.\\ncontract BlockHashRNG is RNG {\\n mapping(uint256 block => uint256 number) public randomNumbers; // randomNumbers[block] is the random number for this block, 0 otherwise.\\n\\n /// @dev Request a random number.\\n /// @param _block Block the random number is linked to.\\n function requestRandomness(uint256 _block) external override {\\n // nop\\n }\\n\\n /// @dev Return the random number. If it has not been saved and is still computable compute it.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 _block) external override returns (uint256 randomNumber) {\\n randomNumber = randomNumbers[_block];\\n if (randomNumber != 0) {\\n return randomNumber;\\n }\\n\\n if (_block < block.number) {\\n // The random number is not already set and can be.\\n if (blockhash(_block) != 0x0) {\\n // Normal case.\\n randomNumber = uint256(blockhash(_block));\\n } else {\\n // The contract was not called in time. Fallback to returning previous blockhash.\\n randomNumber = uint256(blockhash(block.number - 1));\\n }\\n }\\n randomNumbers[_block] = randomNumber;\\n }\\n}\\n\",\"keccak256\":\"0xb2ae9b40700c5915c1cbe57dde68486b669cfea1fdfec18d5b42ffbde44031de\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0xf92e0cf768afefc5cc6ef786c263b67dd00c021aa5753213dbbc33014adb68c5\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50610169806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b8181038181111561012d57634e487b7160e01b600052601160045260246000fd5b9291505056fea26469706673582212208af4d57cc9727b11cb8cd9b8e8dca8477db4c383e58db8f1fbccf103ef66318d64736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b8181038181111561012d57634e487b7160e01b600052601160045260246000fd5b9291505056fea26469706673582212208af4d57cc9727b11cb8cd9b8e8dca8477db4c383e58db8f1fbccf103ef66318d64736f6c63430008180033", - "devdoc": { - "author": "Clément Lesaege - ", - "details": "Random Number Generator returning the blockhash with a fallback behaviour. In case no one called it within the 256 blocks, it returns the previous blockhash. This contract must be used when returning 0 is a worse failure mode than returning another blockhash. Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.", - "kind": "dev", - "methods": { - "receiveRandomness(uint256)": { - "details": "Return the random number. If it has not been saved and is still computable compute it.", - "params": { - "_block": "Block the random number is linked to." - }, - "returns": { - "randomNumber": "The random number or 0 if it is not ready or has not been requested." - } - }, - "requestRandomness(uint256)": { - "details": "Request a random number.", - "params": { - "_block": "Block the random number is linked to." - } - } - }, - "title": "Random Number Generator using blockhash with fallback.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 34514, - "contract": "src/rng/BlockhashRNG.sol:BlockHashRNG", - "label": "randomNumbers", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/ChainlinkRNG.json b/contracts/deployments/arbitrumSepolia/ChainlinkRNG.json deleted file mode 100644 index d0d5dd139..000000000 --- a/contracts/deployments/arbitrumSepolia/ChainlinkRNG.json +++ /dev/null @@ -1,749 +0,0 @@ -{ - "address": "0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_sortitionModule", - "type": "address" - }, - { - "internalType": "address", - "name": "_vrfCoordinator", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_keyHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_subscriptionId", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "_requestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "_callbackGasLimit", - "type": "uint32" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "have", - "type": "address" - }, - { - "internalType": "address", - "name": "want", - "type": "address" - } - ], - "name": "OnlyCoordinatorCanFulfill", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "have", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "coordinator", - "type": "address" - } - ], - "name": "OnlyOwnerOrCoordinator", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "vrfCoordinator", - "type": "address" - } - ], - "name": "CoordinatorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "randomWord", - "type": "uint256" - } - ], - "name": "RequestFulfilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "RequestSent", - "type": "event" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "callbackGasLimit", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_callbackGasLimit", - "type": "uint32" - } - ], - "name": "changeCallbackGasLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_keyHash", - "type": "bytes32" - } - ], - "name": "changeKeyHash", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_requestConfirmations", - "type": "uint16" - } - ], - "name": "changeRequestConfirmations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_subscriptionId", - "type": "uint256" - } - ], - "name": "changeSubscriptionId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vrfCoordinator", - "type": "address" - } - ], - "name": "changeVrfCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "keyHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastRequestId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "number", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "randomWords", - "type": "uint256[]" - } - ], - "name": "rawFulfillRandomWords", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "requestConfirmations", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "s_vrfCoordinator", - "outputs": [ - { - "internalType": "contract IVRFCoordinatorV2Plus", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vrfCoordinator", - "type": "address" - } - ], - "name": "setCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "subscriptionId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x40a4e8c98cb08f8cbfb734bbe1fdb551035cb3bce73044eba88b8bc2723ed44c", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79", - "transactionIndex": 3, - "gasUsed": "1670556", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcb374d845b9e5586106b1ae48e46d1e3cd94a0e059a21decb57ff5c08ba982d3", - "transactionHash": "0x40a4e8c98cb08f8cbfb734bbe1fdb551035cb3bce73044eba88b8bc2723ed44c", - "logs": [], - "blockNumber": 105821815, - "cumulativeGasUsed": "2209341", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", - "0x1770bdc7eec7771f7ba4ffd640f34260d7f095b79c92d34a5b2551d6f6cfd2be", - "38502597312983100069991953687934627561654236680431968938019951490339399569548", - 200, - 100000 - ], - "numDeployments": 1, - "solcInputHash": "409820253ec776b564318c3061b7e926", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sortitionModule\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_subscriptionId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"randomWord\",\"type\":\"uint256\"}],\"name\":\"RequestFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"RequestSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"callbackGasLimit\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"name\":\"changeCallbackGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"}],\"name\":\"changeKeyHash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"}],\"name\":\"changeRequestConfirmations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_subscriptionId\",\"type\":\"uint256\"}],\"name\":\"changeSubscriptionId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"changeVrfCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"keyHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestConfirmations\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contract IVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"subscriptionId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"RequestFulfilled(uint256,uint256)\":{\"params\":{\"randomWord\":\"The random value answering the request.\",\"requestId\":\"The ID of the request\"}},\"RequestSent(uint256)\":{\"details\":\"Emitted when a request is sent to the VRF Coordinator\",\"params\":{\"requestId\":\"The ID of the request\"}}},\"kind\":\"dev\",\"methods\":{\"changeCallbackGasLimit(uint32)\":{\"details\":\"Changes the callback gas limit of the contract.\",\"params\":{\"_callbackGasLimit\":\"The new callback gas limit.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"changeKeyHash(bytes32)\":{\"details\":\"Changes the key hash of the contract.\",\"params\":{\"_keyHash\":\"The new key hash.\"}},\"changeRequestConfirmations(uint16)\":{\"details\":\"Changes the request confirmations of the contract.\",\"params\":{\"_requestConfirmations\":\"The new request confirmations.\"}},\"changeSortitionModule(address)\":{\"details\":\"Changes the sortition module of the contract.\",\"params\":{\"_sortitionModule\":\"The new sortition module.\"}},\"changeSubscriptionId(uint256)\":{\"details\":\"Changes the subscription ID of the contract.\",\"params\":{\"_subscriptionId\":\"The new subscription ID.\"}},\"changeVrfCoordinator(address)\":{\"details\":\"Changes the VRF Coordinator of the contract.\",\"params\":{\"_vrfCoordinator\":\"The new VRF Coordinator.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number\",\"params\":{\"_callbackGasLimit\":\"The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function.\",\"_governor\":\"The Governor of the contract.\",\"_keyHash\":\"The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).\",\"_requestConfirmations\":\"How many confirmations the Chainlink node should wait before responding.\",\"_sortitionModule\":\"The address of the SortitionModule contract.\",\"_subscriptionId\":\"The unique identifier of the subscription used for funding requests.\",\"_vrfCoordinator\":\"The address of the VRFCoordinator contract.\"}},\"receiveRandomness(uint256)\":{\"details\":\"Return the random number.\",\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number. SortitionModule only.\"}},\"title\":\"Random Number Generator that uses Chainlink VRF v2.5 https://blog.chain.link/introducing-vrf-v2-5/\",\"version\":1},\"userdoc\":{\"events\":{\"RequestFulfilled(uint256,uint256)\":{\"notice\":\"Emitted when a request has been fulfilled.\"}},\"kind\":\"user\",\"methods\":{\"acceptOwnership()\":{\"notice\":\"Allows an ownership transfer to be completed by the recipient.\"},\"owner()\":{\"notice\":\"Get the current owner\"},\"setCoordinator(address)\":{\"notice\":\"Sets the VRF Coordinator addressThis method should only be callable by the coordinator or contract owner\"},\"transferOwnership(address)\":{\"notice\":\"Allows an owner to begin transferring ownership to a new address.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/rng/ChainlinkRNG.sol\":\"ChainlinkRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {ConfirmedOwnerWithProposal} from \\\"./ConfirmedOwnerWithProposal.sol\\\";\\n\\n/// @title The ConfirmedOwner contract\\n/// @notice A contract with helpers for basic contract ownership.\\ncontract ConfirmedOwner is ConfirmedOwnerWithProposal {\\n constructor(address newOwner) ConfirmedOwnerWithProposal(newOwner, address(0)) {}\\n}\\n\",\"keccak256\":\"0xdcb0e9135ddbe71ee27ba99fa06656960c66c964cf2ecb29696da1c1427d9861\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwnerWithProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {IOwnable} from \\\"../interfaces/IOwnable.sol\\\";\\n\\n/// @title The ConfirmedOwner contract\\n/// @notice A contract with helpers for basic contract ownership.\\ncontract ConfirmedOwnerWithProposal is IOwnable {\\n address private s_owner;\\n address private s_pendingOwner;\\n\\n event OwnershipTransferRequested(address indexed from, address indexed to);\\n event OwnershipTransferred(address indexed from, address indexed to);\\n\\n constructor(address newOwner, address pendingOwner) {\\n // solhint-disable-next-line gas-custom-errors\\n require(newOwner != address(0), \\\"Cannot set owner to zero\\\");\\n\\n s_owner = newOwner;\\n if (pendingOwner != address(0)) {\\n _transferOwnership(pendingOwner);\\n }\\n }\\n\\n /// @notice Allows an owner to begin transferring ownership to a new address.\\n function transferOwnership(address to) public override onlyOwner {\\n _transferOwnership(to);\\n }\\n\\n /// @notice Allows an ownership transfer to be completed by the recipient.\\n function acceptOwnership() external override {\\n // solhint-disable-next-line gas-custom-errors\\n require(msg.sender == s_pendingOwner, \\\"Must be proposed owner\\\");\\n\\n address oldOwner = s_owner;\\n s_owner = msg.sender;\\n s_pendingOwner = address(0);\\n\\n emit OwnershipTransferred(oldOwner, msg.sender);\\n }\\n\\n /// @notice Get the current owner\\n function owner() public view override returns (address) {\\n return s_owner;\\n }\\n\\n /// @notice validate, transfer ownership, and emit relevant events\\n function _transferOwnership(address to) private {\\n // solhint-disable-next-line gas-custom-errors\\n require(to != msg.sender, \\\"Cannot transfer to self\\\");\\n\\n s_pendingOwner = to;\\n\\n emit OwnershipTransferRequested(s_owner, to);\\n }\\n\\n /// @notice validate access\\n function _validateOwnership() internal view {\\n // solhint-disable-next-line gas-custom-errors\\n require(msg.sender == s_owner, \\\"Only callable by owner\\\");\\n }\\n\\n /// @notice Reverts if called by anyone other than the contract owner.\\n modifier onlyOwner() {\\n _validateOwnership();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x2422a055657a87e98be61f8f31abb1824ec50fd0f73949f4e3c6ac877efb6da8\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/shared/interfaces/IOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IOwnable {\\n function owner() external returns (address);\\n\\n function transferOwnership(address recipient) external;\\n\\n function acceptOwnership() external;\\n}\\n\",\"keccak256\":\"0x885de72b7b4e4f1bf8ba817a3f2bcc37fd9022d342c4ce76782151c30122d767\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport {IVRFCoordinatorV2Plus} from \\\"./interfaces/IVRFCoordinatorV2Plus.sol\\\";\\nimport {IVRFMigratableConsumerV2Plus} from \\\"./interfaces/IVRFMigratableConsumerV2Plus.sol\\\";\\nimport {ConfirmedOwner} from \\\"../../shared/access/ConfirmedOwner.sol\\\";\\n\\n/** ****************************************************************************\\n * @notice Interface for contracts using VRF randomness\\n * *****************************************************************************\\n * @dev PURPOSE\\n *\\n * @dev Reggie the Random Oracle (not his real job) wants to provide randomness\\n * @dev to Vera the verifier in such a way that Vera can be sure he's not\\n * @dev making his output up to suit himself. Reggie provides Vera a public key\\n * @dev to which he knows the secret key. Each time Vera provides a seed to\\n * @dev Reggie, he gives back a value which is computed completely\\n * @dev deterministically from the seed and the secret key.\\n *\\n * @dev Reggie provides a proof by which Vera can verify that the output was\\n * @dev correctly computed once Reggie tells it to her, but without that proof,\\n * @dev the output is indistinguishable to her from a uniform random sample\\n * @dev from the output space.\\n *\\n * @dev The purpose of this contract is to make it easy for unrelated contracts\\n * @dev to talk to Vera the verifier about the work Reggie is doing, to provide\\n * @dev simple access to a verifiable source of randomness. It ensures 2 things:\\n * @dev 1. The fulfillment came from the VRFCoordinatorV2Plus.\\n * @dev 2. The consumer contract implements fulfillRandomWords.\\n * *****************************************************************************\\n * @dev USAGE\\n *\\n * @dev Calling contracts must inherit from VRFConsumerBaseV2Plus, and can\\n * @dev initialize VRFConsumerBaseV2Plus's attributes in their constructor as\\n * @dev shown:\\n *\\n * @dev contract VRFConsumerV2Plus is VRFConsumerBaseV2Plus {\\n * @dev constructor(, address _vrfCoordinator, address _subOwner)\\n * @dev VRFConsumerBaseV2Plus(_vrfCoordinator, _subOwner) public {\\n * @dev \\n * @dev }\\n * @dev }\\n *\\n * @dev The oracle will have given you an ID for the VRF keypair they have\\n * @dev committed to (let's call it keyHash). Create a subscription, fund it\\n * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface\\n * @dev subscription management functions).\\n * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,\\n * @dev callbackGasLimit, numWords, extraArgs),\\n * @dev see (IVRFCoordinatorV2Plus for a description of the arguments).\\n *\\n * @dev Once the VRFCoordinatorV2Plus has received and validated the oracle's response\\n * @dev to your request, it will call your contract's fulfillRandomWords method.\\n *\\n * @dev The randomness argument to fulfillRandomWords is a set of random words\\n * @dev generated from your requestId and the blockHash of the request.\\n *\\n * @dev If your contract could have concurrent requests open, you can use the\\n * @dev requestId returned from requestRandomWords to track which response is associated\\n * @dev with which randomness request.\\n * @dev See \\\"SECURITY CONSIDERATIONS\\\" for principles to keep in mind,\\n * @dev if your contract could have multiple requests in flight simultaneously.\\n *\\n * @dev Colliding `requestId`s are cryptographically impossible as long as seeds\\n * @dev differ.\\n *\\n * *****************************************************************************\\n * @dev SECURITY CONSIDERATIONS\\n *\\n * @dev A method with the ability to call your fulfillRandomness method directly\\n * @dev could spoof a VRF response with any random value, so it's critical that\\n * @dev it cannot be directly called by anything other than this base contract\\n * @dev (specifically, by the VRFConsumerBaseV2Plus.rawFulfillRandomness method).\\n *\\n * @dev For your users to trust that your contract's random behavior is free\\n * @dev from malicious interference, it's best if you can write it so that all\\n * @dev behaviors implied by a VRF response are executed *during* your\\n * @dev fulfillRandomness method. If your contract must store the response (or\\n * @dev anything derived from it) and use it later, you must ensure that any\\n * @dev user-significant behavior which depends on that stored value cannot be\\n * @dev manipulated by a subsequent VRF request.\\n *\\n * @dev Similarly, both miners and the VRF oracle itself have some influence\\n * @dev over the order in which VRF responses appear on the blockchain, so if\\n * @dev your contract could have multiple VRF requests in flight simultaneously,\\n * @dev you must ensure that the order in which the VRF responses arrive cannot\\n * @dev be used to manipulate your contract's user-significant behavior.\\n *\\n * @dev Since the block hash of the block which contains the requestRandomness\\n * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful\\n * @dev miner could, in principle, fork the blockchain to evict the block\\n * @dev containing the request, forcing the request to be included in a\\n * @dev different block with a different hash, and therefore a different input\\n * @dev to the VRF. However, such an attack would incur a substantial economic\\n * @dev cost. This cost scales with the number of blocks the VRF oracle waits\\n * @dev until it calls responds to a request. It is for this reason that\\n * @dev that you can signal to an oracle you'd like them to wait longer before\\n * @dev responding to the request (however this is not enforced in the contract\\n * @dev and so remains effective only in the case of unmodified oracle software).\\n */\\nabstract contract VRFConsumerBaseV2Plus is IVRFMigratableConsumerV2Plus, ConfirmedOwner {\\n error OnlyCoordinatorCanFulfill(address have, address want);\\n error OnlyOwnerOrCoordinator(address have, address owner, address coordinator);\\n error ZeroAddress();\\n\\n // s_vrfCoordinator should be used by consumers to make requests to vrfCoordinator\\n // so that coordinator reference is updated after migration\\n IVRFCoordinatorV2Plus public s_vrfCoordinator;\\n\\n /**\\n * @param _vrfCoordinator address of VRFCoordinator contract\\n */\\n constructor(address _vrfCoordinator) ConfirmedOwner(msg.sender) {\\n if (_vrfCoordinator == address(0)) {\\n revert ZeroAddress();\\n }\\n s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);\\n }\\n\\n /**\\n * @notice fulfillRandomness handles the VRF response. Your contract must\\n * @notice implement it. See \\\"SECURITY CONSIDERATIONS\\\" above for important\\n * @notice principles to keep in mind when implementing your fulfillRandomness\\n * @notice method.\\n *\\n * @dev VRFConsumerBaseV2Plus expects its subcontracts to have a method with this\\n * @dev signature, and will call it once it has verified the proof\\n * @dev associated with the randomness. (It is triggered via a call to\\n * @dev rawFulfillRandomness, below.)\\n *\\n * @param requestId The Id initially returned by requestRandomness\\n * @param randomWords the VRF output expanded to the requested number of words\\n */\\n // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore\\n function fulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) internal virtual;\\n\\n // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF\\n // proof. rawFulfillRandomness then calls fulfillRandomness, after validating\\n // the origin of the call\\n function rawFulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) external {\\n if (msg.sender != address(s_vrfCoordinator)) {\\n revert OnlyCoordinatorCanFulfill(msg.sender, address(s_vrfCoordinator));\\n }\\n fulfillRandomWords(requestId, randomWords);\\n }\\n\\n /**\\n * @inheritdoc IVRFMigratableConsumerV2Plus\\n */\\n function setCoordinator(address _vrfCoordinator) external override onlyOwnerOrCoordinator {\\n if (_vrfCoordinator == address(0)) {\\n revert ZeroAddress();\\n }\\n s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);\\n\\n emit CoordinatorSet(_vrfCoordinator);\\n }\\n\\n modifier onlyOwnerOrCoordinator() {\\n if (msg.sender != owner() && msg.sender != address(s_vrfCoordinator)) {\\n revert OnlyOwnerOrCoordinator(msg.sender, owner(), address(s_vrfCoordinator));\\n }\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0c92838396c5abe72754ebeae526a0434dd53fdaf63e6b98111aebd6114cfcc2\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {VRFV2PlusClient} from \\\"../libraries/VRFV2PlusClient.sol\\\";\\nimport {IVRFSubscriptionV2Plus} from \\\"./IVRFSubscriptionV2Plus.sol\\\";\\n\\n// Interface that enables consumers of VRFCoordinatorV2Plus to be future-proof for upgrades\\n// This interface is supported by subsequent versions of VRFCoordinatorV2Plus\\ninterface IVRFCoordinatorV2Plus is IVRFSubscriptionV2Plus {\\n /**\\n * @notice Request a set of random words.\\n * @param req - a struct containing following fields for randomness request:\\n * keyHash - Corresponds to a particular oracle job which uses\\n * that key for generating the VRF proof. Different keyHash's have different gas price\\n * ceilings, so you can select a specific one to bound your maximum per request cost.\\n * subId - The ID of the VRF subscription. Must be funded\\n * with the minimum subscription balance required for the selected keyHash.\\n * requestConfirmations - How many blocks you'd like the\\n * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS\\n * for why you may want to request more. The acceptable range is\\n * [minimumRequestBlockConfirmations, 200].\\n * callbackGasLimit - How much gas you'd like to receive in your\\n * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords\\n * may be slightly less than this amount because of gas used calling the function\\n * (argument decoding etc.), so you may need to request slightly more than you expect\\n * to have inside fulfillRandomWords. The acceptable range is\\n * [0, maxGasLimit]\\n * numWords - The number of uint256 random values you'd like to receive\\n * in your fulfillRandomWords callback. Note these numbers are expanded in a\\n * secure way by the VRFCoordinator from a single random value supplied by the oracle.\\n * extraArgs - abi-encoded extra args\\n * @return requestId - A unique identifier of the request. Can be used to match\\n * a request to a response in fulfillRandomWords.\\n */\\n function requestRandomWords(VRFV2PlusClient.RandomWordsRequest calldata req) external returns (uint256 requestId);\\n}\\n\",\"keccak256\":\"0x7dca2a64690ddd95ee05e422e1f61e7c1d701aaf5be1390ae12e9bd144266c36\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFMigratableConsumerV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @notice The IVRFMigratableConsumerV2Plus interface defines the\\n/// @notice method required to be implemented by all V2Plus consumers.\\n/// @dev This interface is designed to be used in VRFConsumerBaseV2Plus.\\ninterface IVRFMigratableConsumerV2Plus {\\n event CoordinatorSet(address vrfCoordinator);\\n\\n /// @notice Sets the VRF Coordinator address\\n /// @notice This method should only be callable by the coordinator or contract owner\\n function setCoordinator(address vrfCoordinator) external;\\n}\\n\",\"keccak256\":\"0x8be8744e3b8380dc85354cf110e8caef8f394266e79120ad675a7da835ed2a85\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFSubscriptionV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @notice The IVRFSubscriptionV2Plus interface defines the subscription\\n/// @notice related methods implemented by the V2Plus coordinator.\\ninterface IVRFSubscriptionV2Plus {\\n /**\\n * @notice Add a consumer to a VRF subscription.\\n * @param subId - ID of the subscription\\n * @param consumer - New consumer which can use the subscription\\n */\\n function addConsumer(uint256 subId, address consumer) external;\\n\\n /**\\n * @notice Remove a consumer from a VRF subscription.\\n * @param subId - ID of the subscription\\n * @param consumer - Consumer to remove from the subscription\\n */\\n function removeConsumer(uint256 subId, address consumer) external;\\n\\n /**\\n * @notice Cancel a subscription\\n * @param subId - ID of the subscription\\n * @param to - Where to send the remaining LINK to\\n */\\n function cancelSubscription(uint256 subId, address to) external;\\n\\n /**\\n * @notice Accept subscription owner transfer.\\n * @param subId - ID of the subscription\\n * @dev will revert if original owner of subId has\\n * not requested that msg.sender become the new owner.\\n */\\n function acceptSubscriptionOwnerTransfer(uint256 subId) external;\\n\\n /**\\n * @notice Request subscription owner transfer.\\n * @param subId - ID of the subscription\\n * @param newOwner - proposed new owner of the subscription\\n */\\n function requestSubscriptionOwnerTransfer(uint256 subId, address newOwner) external;\\n\\n /**\\n * @notice Create a VRF subscription.\\n * @return subId - A unique subscription id.\\n * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.\\n * @dev Note to fund the subscription with LINK, use transferAndCall. For example\\n * @dev LINKTOKEN.transferAndCall(\\n * @dev address(COORDINATOR),\\n * @dev amount,\\n * @dev abi.encode(subId));\\n * @dev Note to fund the subscription with Native, use fundSubscriptionWithNative. Be sure\\n * @dev to send Native with the call, for example:\\n * @dev COORDINATOR.fundSubscriptionWithNative{value: amount}(subId);\\n */\\n function createSubscription() external returns (uint256 subId);\\n\\n /**\\n * @notice Get a VRF subscription.\\n * @param subId - ID of the subscription\\n * @return balance - LINK balance of the subscription in juels.\\n * @return nativeBalance - native balance of the subscription in wei.\\n * @return reqCount - Requests count of subscription.\\n * @return owner - owner of the subscription.\\n * @return consumers - list of consumer address which are able to use this subscription.\\n */\\n function getSubscription(\\n uint256 subId\\n )\\n external\\n view\\n returns (uint96 balance, uint96 nativeBalance, uint64 reqCount, address owner, address[] memory consumers);\\n\\n /*\\n * @notice Check to see if there exists a request commitment consumers\\n * for all consumers and keyhashes for a given sub.\\n * @param subId - ID of the subscription\\n * @return true if there exists at least one unfulfilled request for the subscription, false\\n * otherwise.\\n */\\n function pendingRequestExists(uint256 subId) external view returns (bool);\\n\\n /**\\n * @notice Paginate through all active VRF subscriptions.\\n * @param startIndex index of the subscription to start from\\n * @param maxCount maximum number of subscriptions to return, 0 to return all\\n * @dev the order of IDs in the list is **not guaranteed**, therefore, if making successive calls, one\\n * @dev should consider keeping the blockheight constant to ensure a holistic picture of the contract state\\n */\\n function getActiveSubscriptionIds(uint256 startIndex, uint256 maxCount) external view returns (uint256[] memory);\\n\\n /**\\n * @notice Fund a subscription with native.\\n * @param subId - ID of the subscription\\n * @notice This method expects msg.value to be greater than or equal to 0.\\n */\\n function fundSubscriptionWithNative(uint256 subId) external payable;\\n}\\n\",\"keccak256\":\"0x85b348297ce36794e3bf97a47c001fc216bd0ee243e91514a7b395f3fcd189b0\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n// End consumer library.\\nlibrary VRFV2PlusClient {\\n // extraArgs will evolve to support new features\\n bytes4 public constant EXTRA_ARGS_V1_TAG = bytes4(keccak256(\\\"VRF ExtraArgsV1\\\"));\\n struct ExtraArgsV1 {\\n bool nativePayment;\\n }\\n\\n struct RandomWordsRequest {\\n bytes32 keyHash;\\n uint256 subId;\\n uint16 requestConfirmations;\\n uint32 callbackGasLimit;\\n uint32 numWords;\\n bytes extraArgs;\\n }\\n\\n function _argsToBytes(ExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {\\n return abi.encodeWithSelector(EXTRA_ARGS_V1_TAG, extraArgs);\\n }\\n}\\n\",\"keccak256\":\"0x839ad7a737ef18147b518b4ec3cbaf4a49dc994db65cf8369ed4e69d169a98a6\",\"license\":\"MIT\"},\"src/rng/ChainlinkRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {VRFConsumerBaseV2Plus, IVRFCoordinatorV2Plus} from \\\"@chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol\\\";\\nimport {VRFV2PlusClient} from \\\"@chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol\\\";\\n\\nimport \\\"./RNG.sol\\\";\\n\\n/// @title Random Number Generator that uses Chainlink VRF v2.5\\n/// https://blog.chain.link/introducing-vrf-v2-5/\\ncontract ChainlinkRNG is RNG, VRFConsumerBaseV2Plus {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The address that can withdraw funds.\\n address public sortitionModule; // The address of the SortitionModule.\\n bytes32 public keyHash; // The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).\\n uint256 public subscriptionId; // The unique identifier of the subscription used for funding requests.\\n uint16 public requestConfirmations; // How many confirmations the Chainlink node should wait before responding.\\n // 22 bytes remaining in slot\\n uint32 public callbackGasLimit; // Gas limit for the Chainlink callback.\\n uint256 public lastRequestId; // The last request ID.\\n mapping(uint256 requestId => uint256 number) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a request is sent to the VRF Coordinator\\n /// @param requestId The ID of the request\\n event RequestSent(uint256 indexed requestId);\\n\\n /// Emitted when a request has been fulfilled.\\n /// @param requestId The ID of the request\\n /// @param randomWord The random value answering the request.\\n event RequestFulfilled(uint256 indexed requestId, uint256 randomWord);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor only\\\");\\n _;\\n }\\n\\n modifier onlyBySortitionModule() {\\n require(sortitionModule == msg.sender, \\\"SortitionModule only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n /// @param _governor The Governor of the contract.\\n /// @param _sortitionModule The address of the SortitionModule contract.\\n /// @param _vrfCoordinator The address of the VRFCoordinator contract.\\n /// @param _keyHash The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).\\n /// @param _subscriptionId The unique identifier of the subscription used for funding requests.\\n /// @param _requestConfirmations How many confirmations the Chainlink node should wait before responding.\\n /// @param _callbackGasLimit The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function.\\n /// @dev https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number\\n constructor(\\n address _governor,\\n address _sortitionModule,\\n address _vrfCoordinator,\\n bytes32 _keyHash,\\n uint256 _subscriptionId,\\n uint16 _requestConfirmations,\\n uint32 _callbackGasLimit\\n ) VRFConsumerBaseV2Plus(_vrfCoordinator) {\\n governor = _governor;\\n sortitionModule = _sortitionModule;\\n keyHash = _keyHash;\\n subscriptionId = _subscriptionId;\\n requestConfirmations = _requestConfirmations;\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the sortition module of the contract.\\n /// @param _sortitionModule The new sortition module.\\n function changeSortitionModule(address _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Changes the VRF Coordinator of the contract.\\n /// @param _vrfCoordinator The new VRF Coordinator.\\n function changeVrfCoordinator(address _vrfCoordinator) external onlyByGovernor {\\n s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);\\n emit CoordinatorSet(_vrfCoordinator);\\n }\\n\\n /// @dev Changes the key hash of the contract.\\n /// @param _keyHash The new key hash.\\n function changeKeyHash(bytes32 _keyHash) external onlyByGovernor {\\n keyHash = _keyHash;\\n }\\n\\n /// @dev Changes the subscription ID of the contract.\\n /// @param _subscriptionId The new subscription ID.\\n function changeSubscriptionId(uint256 _subscriptionId) external onlyByGovernor {\\n subscriptionId = _subscriptionId;\\n }\\n\\n /// @dev Changes the request confirmations of the contract.\\n /// @param _requestConfirmations The new request confirmations.\\n function changeRequestConfirmations(uint16 _requestConfirmations) external onlyByGovernor {\\n requestConfirmations = _requestConfirmations;\\n }\\n\\n /// @dev Changes the callback gas limit of the contract.\\n /// @param _callbackGasLimit The new callback gas limit.\\n function changeCallbackGasLimit(uint32 _callbackGasLimit) external onlyByGovernor {\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Request a random number. SortitionModule only.\\n function requestRandomness(uint256 /*_block*/) external override onlyBySortitionModule {\\n // Will revert if subscription is not set and funded.\\n uint256 requestId = s_vrfCoordinator.requestRandomWords(\\n VRFV2PlusClient.RandomWordsRequest({\\n keyHash: keyHash,\\n subId: subscriptionId,\\n requestConfirmations: requestConfirmations,\\n callbackGasLimit: callbackGasLimit,\\n numWords: 1,\\n extraArgs: VRFV2PlusClient._argsToBytes(\\n // Set nativePayment to true to pay for VRF requests with ETH instead of LINK\\n VRFV2PlusClient.ExtraArgsV1({nativePayment: true})\\n )\\n })\\n );\\n lastRequestId = requestId;\\n emit RequestSent(requestId);\\n }\\n\\n /// @dev Callback function called by the VRF Coordinator when the random value is generated.\\n /// @param _requestId The ID of the request.\\n /// @param _randomWords The random values answering the request.\\n function fulfillRandomWords(uint256 _requestId, uint256[] calldata _randomWords) internal override {\\n // Access control is handled by the parent VRFCoordinator.rawFulfillRandomWords()\\n randomNumbers[_requestId] = _randomWords[0];\\n emit RequestFulfilled(_requestId, _randomWords[0]);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Return the random number.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 /*_block*/) external view override returns (uint256 randomNumber) {\\n randomNumber = randomNumbers[lastRequestId];\\n }\\n}\\n\",\"keccak256\":\"0xf132cbbbbb47a4f11c248fab30212a3dd3e7b20b1bc5b543ff21b6d291367dc8\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0xf92e0cf768afefc5cc6ef786c263b67dd00c021aa5753213dbbc33014adb68c5\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000f6038038062000f6083398101604081905262000034916200022d565b8433806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000165565b5050506001600160a01b038116620000ea5760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b03199081166001600160a01b03938416179091556003805482169983169990991790985560048054909816961695909517909555600591909155600655506007805461ffff90931665ffffffffffff19909316929092176201000063ffffffff90921691909102179055620002c5565b336001600160a01b03821603620001bf5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200022857600080fd5b919050565b600080600080600080600060e0888a0312156200024957600080fd5b620002548862000210565b9650620002646020890162000210565b9550620002746040890162000210565b9450606088015193506080880151925060a088015161ffff811681146200029a57600080fd5b60c089015190925063ffffffff81168114620002b557600080fd5b8091505092959891949750929550565b610c8b80620002d56000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c806379ba5097116100c3578063e4c0aaf41161007c578063e4c0aaf4146102e5578063e86a51cb146102f8578063f2fde38b1461030b578063f50d390d1461031e578063f9f5dd9114610331578063fc2a88c31461034457600080fd5b806379ba5097146102725780638da5cb5b1461027a5780638ea981171461028b5780639eccacf61461029e578063b0049637146102b1578063b0fb162f146102c457600080fd5b80632e1daf2f116101155780632e1daf2f146101fd5780632f68f4821461021057806339b1e245146102235780635257cd901461023657806361728f39146102565780637363ae1f1461025f57600080fd5b806309c1ba2e146101525780630c340a241461016e57806313cf9054146101995780631fe543e3146101bd57806324f74697146101d2575b600080fd5b61015b60065481565b6040519081526020015b60405180910390f35b600354610181906001600160a01b031681565b6040516001600160a01b039091168152602001610165565b61015b6101a7366004610a4f565b5060085460009081526009602052604090205490565b6101d06101cb366004610a68565b61034d565b005b6007546101e89062010000900463ffffffff1681565b60405163ffffffff9091168152602001610165565b600454610181906001600160a01b031681565b6101d061021e366004610a4f565b6103a2565b6101d0610231366004610a4f565b6103d1565b61015b610244366004610a4f565b60096020526000908152604090205481565b61015b60055481565b6101d061026d366004610a4f565b610400565b6101d061055b565b6000546001600160a01b0316610181565b6101d0610299366004610ae7565b610605565b600254610181906001600160a01b031681565b6101d06102bf366004610ae7565b6106f7565b6007546102d29061ffff1681565b60405161ffff9091168152602001610165565b6101d06102f3366004610ae7565b610743565b6101d0610306366004610b17565b61078f565b6101d0610319366004610ae7565b6107dd565b6101d061032c366004610b3d565b6107f1565b6101d061033f366004610ae7565b610833565b61015b60085481565b6002546001600160a01b031633146103925760025460405163073e64fd60e21b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b61039d83838361085d565b505050565b6003546001600160a01b031633146103cc5760405162461bcd60e51b815260040161038990610b61565b600555565b6003546001600160a01b031633146103fb5760405162461bcd60e51b815260040161038990610b61565b600655565b6004546001600160a01b031633146104515760405162461bcd60e51b8152602060048201526014602482015273536f72746974696f6e4d6f64756c65206f6e6c7960601b6044820152606401610389565b6002546040805160c081018252600554815260065460208083019190915260075461ffff81168385015262010000900463ffffffff16606083015260016080830181905283519182019093529182526000926001600160a01b031691639b1c385e919060a08201906104c2906108e6565b8152506040518263ffffffff1660e01b81526004016104e19190610b88565b6020604051808303816000875af1158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190610c26565b600881905560405190915081907f0cd21a41891ff04ecd9a8754bec97e2fb85d2a4e7694329d4dc364c796f23d0690600090a25050565b6001546001600160a01b031633146105ae5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610389565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000546001600160a01b0316331480159061062b57506002546001600160a01b03163314155b1561067c57336106436000546001600160a01b031690565b60025460405163061db9c160e01b81526001600160a01b0393841660048201529183166024830152919091166044820152606401610389565b6001600160a01b0381166106a35760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b6003546001600160a01b031633146107215760405162461bcd60e51b815260040161038990610b61565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331461076d5760405162461bcd60e51b815260040161038990610b61565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031633146107b95760405162461bcd60e51b815260040161038990610b61565b6007805463ffffffff909216620100000265ffffffff000019909216919091179055565b6107e5610957565b6107ee816109ac565b50565b6003546001600160a01b0316331461081b5760405162461bcd60e51b815260040161038990610b61565b6007805461ffff191661ffff92909216919091179055565b6003546001600160a01b031633146106a35760405162461bcd60e51b815260040161038990610b61565b8181600081811061087057610870610c3f565b905060200201356009600085815260200190815260200160002081905550827f5c69e7026b653d8606b5613bb00fd8c4b0504b1cbe8db600c406faac180924d5838360008181106108c3576108c3610c3f565b905060200201356040516108d991815260200190565b60405180910390a2505050565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161091f91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b6000546001600160a01b031633146109aa5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610389565b565b336001600160a01b038216036109fe5760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610389565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215610a6157600080fd5b5035919050565b600080600060408486031215610a7d57600080fd5b83359250602084013567ffffffffffffffff80821115610a9c57600080fd5b818601915086601f830112610ab057600080fd5b813581811115610abf57600080fd5b8760208260051b8501011115610ad457600080fd5b6020830194508093505050509250925092565b600060208284031215610af957600080fd5b81356001600160a01b0381168114610b1057600080fd5b9392505050565b600060208284031215610b2957600080fd5b813563ffffffff81168114610b1057600080fd5b600060208284031215610b4f57600080fd5b813561ffff81168114610b1057600080fd5b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b60006020808352835160208401526020840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610c015782810184015186820161010001528301610be4565b506101009250600083828701015282601f19601f830116860101935050505092915050565b600060208284031215610c3857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fdfea26469706673582212201c20e67178fd79424f46cb830b3496516dfa70ea88c1d07b59de6b70b0f17ca764736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c806379ba5097116100c3578063e4c0aaf41161007c578063e4c0aaf4146102e5578063e86a51cb146102f8578063f2fde38b1461030b578063f50d390d1461031e578063f9f5dd9114610331578063fc2a88c31461034457600080fd5b806379ba5097146102725780638da5cb5b1461027a5780638ea981171461028b5780639eccacf61461029e578063b0049637146102b1578063b0fb162f146102c457600080fd5b80632e1daf2f116101155780632e1daf2f146101fd5780632f68f4821461021057806339b1e245146102235780635257cd901461023657806361728f39146102565780637363ae1f1461025f57600080fd5b806309c1ba2e146101525780630c340a241461016e57806313cf9054146101995780631fe543e3146101bd57806324f74697146101d2575b600080fd5b61015b60065481565b6040519081526020015b60405180910390f35b600354610181906001600160a01b031681565b6040516001600160a01b039091168152602001610165565b61015b6101a7366004610a4f565b5060085460009081526009602052604090205490565b6101d06101cb366004610a68565b61034d565b005b6007546101e89062010000900463ffffffff1681565b60405163ffffffff9091168152602001610165565b600454610181906001600160a01b031681565b6101d061021e366004610a4f565b6103a2565b6101d0610231366004610a4f565b6103d1565b61015b610244366004610a4f565b60096020526000908152604090205481565b61015b60055481565b6101d061026d366004610a4f565b610400565b6101d061055b565b6000546001600160a01b0316610181565b6101d0610299366004610ae7565b610605565b600254610181906001600160a01b031681565b6101d06102bf366004610ae7565b6106f7565b6007546102d29061ffff1681565b60405161ffff9091168152602001610165565b6101d06102f3366004610ae7565b610743565b6101d0610306366004610b17565b61078f565b6101d0610319366004610ae7565b6107dd565b6101d061032c366004610b3d565b6107f1565b6101d061033f366004610ae7565b610833565b61015b60085481565b6002546001600160a01b031633146103925760025460405163073e64fd60e21b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b61039d83838361085d565b505050565b6003546001600160a01b031633146103cc5760405162461bcd60e51b815260040161038990610b61565b600555565b6003546001600160a01b031633146103fb5760405162461bcd60e51b815260040161038990610b61565b600655565b6004546001600160a01b031633146104515760405162461bcd60e51b8152602060048201526014602482015273536f72746974696f6e4d6f64756c65206f6e6c7960601b6044820152606401610389565b6002546040805160c081018252600554815260065460208083019190915260075461ffff81168385015262010000900463ffffffff16606083015260016080830181905283519182019093529182526000926001600160a01b031691639b1c385e919060a08201906104c2906108e6565b8152506040518263ffffffff1660e01b81526004016104e19190610b88565b6020604051808303816000875af1158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190610c26565b600881905560405190915081907f0cd21a41891ff04ecd9a8754bec97e2fb85d2a4e7694329d4dc364c796f23d0690600090a25050565b6001546001600160a01b031633146105ae5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610389565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000546001600160a01b0316331480159061062b57506002546001600160a01b03163314155b1561067c57336106436000546001600160a01b031690565b60025460405163061db9c160e01b81526001600160a01b0393841660048201529183166024830152919091166044820152606401610389565b6001600160a01b0381166106a35760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b6003546001600160a01b031633146107215760405162461bcd60e51b815260040161038990610b61565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331461076d5760405162461bcd60e51b815260040161038990610b61565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031633146107b95760405162461bcd60e51b815260040161038990610b61565b6007805463ffffffff909216620100000265ffffffff000019909216919091179055565b6107e5610957565b6107ee816109ac565b50565b6003546001600160a01b0316331461081b5760405162461bcd60e51b815260040161038990610b61565b6007805461ffff191661ffff92909216919091179055565b6003546001600160a01b031633146106a35760405162461bcd60e51b815260040161038990610b61565b8181600081811061087057610870610c3f565b905060200201356009600085815260200190815260200160002081905550827f5c69e7026b653d8606b5613bb00fd8c4b0504b1cbe8db600c406faac180924d5838360008181106108c3576108c3610c3f565b905060200201356040516108d991815260200190565b60405180910390a2505050565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161091f91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b6000546001600160a01b031633146109aa5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610389565b565b336001600160a01b038216036109fe5760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610389565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215610a6157600080fd5b5035919050565b600080600060408486031215610a7d57600080fd5b83359250602084013567ffffffffffffffff80821115610a9c57600080fd5b818601915086601f830112610ab057600080fd5b813581811115610abf57600080fd5b8760208260051b8501011115610ad457600080fd5b6020830194508093505050509250925092565b600060208284031215610af957600080fd5b81356001600160a01b0381168114610b1057600080fd5b9392505050565b600060208284031215610b2957600080fd5b813563ffffffff81168114610b1057600080fd5b600060208284031215610b4f57600080fd5b813561ffff81168114610b1057600080fd5b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b60006020808352835160208401526020840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610c015782810184015186820161010001528301610be4565b506101009250600083828701015282601f19601f830116860101935050505092915050565b600060208284031215610c3857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fdfea26469706673582212201c20e67178fd79424f46cb830b3496516dfa70ea88c1d07b59de6b70b0f17ca764736f6c63430008180033", - "devdoc": { - "events": { - "RequestFulfilled(uint256,uint256)": { - "params": { - "randomWord": "The random value answering the request.", - "requestId": "The ID of the request" - } - }, - "RequestSent(uint256)": { - "details": "Emitted when a request is sent to the VRF Coordinator", - "params": { - "requestId": "The ID of the request" - } - } - }, - "kind": "dev", - "methods": { - "changeCallbackGasLimit(uint32)": { - "details": "Changes the callback gas limit of the contract.", - "params": { - "_callbackGasLimit": "The new callback gas limit." - } - }, - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "changeKeyHash(bytes32)": { - "details": "Changes the key hash of the contract.", - "params": { - "_keyHash": "The new key hash." - } - }, - "changeRequestConfirmations(uint16)": { - "details": "Changes the request confirmations of the contract.", - "params": { - "_requestConfirmations": "The new request confirmations." - } - }, - "changeSortitionModule(address)": { - "details": "Changes the sortition module of the contract.", - "params": { - "_sortitionModule": "The new sortition module." - } - }, - "changeSubscriptionId(uint256)": { - "details": "Changes the subscription ID of the contract.", - "params": { - "_subscriptionId": "The new subscription ID." - } - }, - "changeVrfCoordinator(address)": { - "details": "Changes the VRF Coordinator of the contract.", - "params": { - "_vrfCoordinator": "The new VRF Coordinator." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface.https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number", - "params": { - "_callbackGasLimit": "The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function.", - "_governor": "The Governor of the contract.", - "_keyHash": "The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).", - "_requestConfirmations": "How many confirmations the Chainlink node should wait before responding.", - "_sortitionModule": "The address of the SortitionModule contract.", - "_subscriptionId": "The unique identifier of the subscription used for funding requests.", - "_vrfCoordinator": "The address of the VRFCoordinator contract." - } - }, - "receiveRandomness(uint256)": { - "details": "Return the random number.", - "returns": { - "randomNumber": "The random number or 0 if it is not ready or has not been requested." - } - }, - "requestRandomness(uint256)": { - "details": "Request a random number. SortitionModule only." - } - }, - "title": "Random Number Generator that uses Chainlink VRF v2.5 https://blog.chain.link/introducing-vrf-v2-5/", - "version": 1 - }, - "userdoc": { - "events": { - "RequestFulfilled(uint256,uint256)": { - "notice": "Emitted when a request has been fulfilled." - } - }, - "kind": "user", - "methods": { - "acceptOwnership()": { - "notice": "Allows an ownership transfer to be completed by the recipient." - }, - "owner()": { - "notice": "Get the current owner" - }, - "setCoordinator(address)": { - "notice": "Sets the VRF Coordinator addressThis method should only be callable by the coordinator or contract owner" - }, - "transferOwnership(address)": { - "notice": "Allows an owner to begin transferring ownership to a new address." - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 29, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "s_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 31, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "s_pendingOwner", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 231, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "s_vrfCoordinator", - "offset": 0, - "slot": "2", - "type": "t_contract(IVRFCoordinatorV2Plus)380" - }, - { - "astId": 35404, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "governor", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 35406, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "sortitionModule", - "offset": 0, - "slot": "4", - "type": "t_address" - }, - { - "astId": 35408, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "keyHash", - "offset": 0, - "slot": "5", - "type": "t_bytes32" - }, - { - "astId": 35410, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "subscriptionId", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 35412, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "requestConfirmations", - "offset": 0, - "slot": "7", - "type": "t_uint16" - }, - { - "astId": 35414, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "callbackGasLimit", - "offset": 2, - "slot": "7", - "type": "t_uint32" - }, - { - "astId": 35416, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "lastRequestId", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 35420, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "randomNumbers", - "offset": 0, - "slot": "9", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IVRFCoordinatorV2Plus)380": { - "encoding": "inplace", - "label": "contract IVRFCoordinatorV2Plus", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "encoding": "inplace", - "label": "uint32", - "numberOfBytes": "4" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/ChainlinkVRFCoordinator.json b/contracts/deployments/arbitrumSepolia/ChainlinkVRFCoordinator.json deleted file mode 100644 index 0ad1f85b2..000000000 --- a/contracts/deployments/arbitrumSepolia/ChainlinkVRFCoordinator.json +++ /dev/null @@ -1,1753 +0,0 @@ -{ - "address": "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "blockhashStore", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "internalBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "externalBalance", - "type": "uint256" - } - ], - "name": "BalanceInvariantViolated", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "blockNum", - "type": "uint256" - } - ], - "name": "BlockhashNotInStore", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorAlreadyRegistered", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorNotRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "FailedToSendNative", - "type": "error" - }, - { - "inputs": [], - "name": "FailedToTransferLink", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "have", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "want", - "type": "uint32" - } - ], - "name": "GasLimitTooBig", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxGas", - "type": "uint256" - } - ], - "name": "GasPriceExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectCommitment", - "type": "error" - }, - { - "inputs": [], - "name": "IndexOutOfRange", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidCalldata", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "InvalidConsumer", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidExtraArgsTag", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "linkWei", - "type": "int256" - } - ], - "name": "InvalidLinkWeiPrice", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "premiumPercentage", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "max", - "type": "uint8" - } - ], - "name": "InvalidPremiumPercentage", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "have", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "min", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "max", - "type": "uint16" - } - ], - "name": "InvalidRequestConfirmations", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidSubscription", - "type": "error" - }, - { - "inputs": [], - "name": "LinkAlreadySet", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "flatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "flatFeeNativePPM", - "type": "uint32" - } - ], - "name": "LinkDiscountTooHigh", - "type": "error" - }, - { - "inputs": [], - "name": "LinkNotSet", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "have", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "max", - "type": "uint32" - } - ], - "name": "MsgDataTooBig", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "proposedOwner", - "type": "address" - } - ], - "name": "MustBeRequestedOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "MustBeSubOwner", - "type": "error" - }, - { - "inputs": [], - "name": "NoCorrespondingRequest", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - } - ], - "name": "NoSuchProvingKey", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "have", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "want", - "type": "uint32" - } - ], - "name": "NumWordsTooBig", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyCallableFromLink", - "type": "error" - }, - { - "inputs": [], - "name": "PaymentTooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "PendingRequestExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - } - ], - "name": "ProvingKeyAlreadyRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "Reentrant", - "type": "error" - }, - { - "inputs": [], - "name": "TooManyConsumers", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "maxGasLimit", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "stalenessSeconds", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "gasAfterPaymentCalculation", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "int256", - "name": "fallbackWeiPerUnitLink", - "type": "int256" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "fulfillmentFlatFeeNativePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "fulfillmentFlatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "nativePremiumPercentage", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "linkPremiumPercentage", - "type": "uint8" - } - ], - "name": "ConfigSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorDeregistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "fallbackWeiPerUnitLink", - "type": "int256" - } - ], - "name": "FallbackWeiPerUnitLinkUsed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "FundsRecovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newCoordinator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "MigrationCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "NativeFundsRecovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "name": "ProvingKeyDeregistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "name": "ProvingKeyRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outputSeed", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "payment", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "nativePayment", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "success", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "onlyPremium", - "type": "bool" - } - ], - "name": "RandomWordsFulfilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "preSeed", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "callbackGasLimit", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "numWords", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraArgs", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RandomWordsRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountLink", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountNative", - "type": "uint256" - } - ], - "name": "SubscriptionCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "SubscriptionConsumerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "SubscriptionConsumerRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "SubscriptionCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "SubscriptionFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldNativeBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newNativeBalance", - "type": "uint256" - } - ], - "name": "SubscriptionFundedWithNative", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "SubscriptionOwnerTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "SubscriptionOwnerTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "BLOCKHASH_STORE", - "outputs": [ - { - "internalType": "contract BlockhashStoreInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LINK", - "outputs": [ - { - "internalType": "contract LinkTokenInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LINK_NATIVE_FEED", - "outputs": [ - { - "internalType": "contract AggregatorV3Interface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_CONSUMERS", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_NUM_WORDS", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_REQUEST_CONFIRMATIONS", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "acceptSubscriptionOwnerTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "addConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "cancelSubscription", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "createSubscription", - "outputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "deregisterMigratableCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[2]", - "name": "publicProvingKey", - "type": "uint256[2]" - } - ], - "name": "deregisterProvingKey", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256[2]", - "name": "pk", - "type": "uint256[2]" - }, - { - "internalType": "uint256[2]", - "name": "gamma", - "type": "uint256[2]" - }, - { - "internalType": "uint256", - "name": "c", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "s", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "seed", - "type": "uint256" - }, - { - "internalType": "address", - "name": "uWitness", - "type": "address" - }, - { - "internalType": "uint256[2]", - "name": "cGammaWitness", - "type": "uint256[2]" - }, - { - "internalType": "uint256[2]", - "name": "sHashWitness", - "type": "uint256[2]" - }, - { - "internalType": "uint256", - "name": "zInv", - "type": "uint256" - } - ], - "internalType": "struct VRF.Proof", - "name": "proof", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint64", - "name": "blockNum", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "callbackGasLimit", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "numWords", - "type": "uint32" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "bytes", - "name": "extraArgs", - "type": "bytes" - } - ], - "internalType": "struct VRFTypes.RequestCommitmentV2Plus", - "name": "rc", - "type": "tuple" - }, - { - "internalType": "bool", - "name": "onlyPremium", - "type": "bool" - } - ], - "name": "fulfillRandomWords", - "outputs": [ - { - "internalType": "uint96", - "name": "payment", - "type": "uint96" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "fundSubscriptionWithNative", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxCount", - "type": "uint256" - } - ], - "name": "getActiveSubscriptionIds", - "outputs": [ - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "getSubscription", - "outputs": [ - { - "internalType": "uint96", - "name": "balance", - "type": "uint96" - }, - { - "internalType": "uint96", - "name": "nativeBalance", - "type": "uint96" - }, - { - "internalType": "uint64", - "name": "reqCount", - "type": "uint64" - }, - { - "internalType": "address", - "name": "subOwner", - "type": "address" - }, - { - "internalType": "address[]", - "name": "consumers", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[2]", - "name": "publicKey", - "type": "uint256[2]" - } - ], - "name": "hashOfKey", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "newCoordinator", - "type": "address" - } - ], - "name": "migrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "ownerCancelSubscription", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "pendingRequestExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "recoverFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - } - ], - "name": "recoverNativeFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "registerMigratableCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[2]", - "name": "publicProvingKey", - "type": "uint256[2]" - }, - { - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "name": "registerProvingKey", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "removeConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "requestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "callbackGasLimit", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "numWords", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "extraArgs", - "type": "bytes" - } - ], - "internalType": "struct VRFV2PlusClient.RandomWordsRequest", - "name": "req", - "type": "tuple" - } - ], - "name": "requestRandomWords", - "outputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "requestSubscriptionOwnerTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "s_config", - "outputs": [ - { - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "maxGasLimit", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "reentrancyLock", - "type": "bool" - }, - { - "internalType": "uint32", - "name": "stalenessSeconds", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "gasAfterPaymentCalculation", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeNativePPM", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "internalType": "uint8", - "name": "nativePremiumPercentage", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "linkPremiumPercentage", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_currentSubNonce", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_fallbackWeiPerUnitLink", - "outputs": [ - { - "internalType": "int256", - "name": "", - "type": "int256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "s_provingKeyHashes", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "s_provingKeys", - "outputs": [ - { - "internalType": "bool", - "name": "exists", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "s_requestCommitments", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_totalBalance", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_totalNativeBalance", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "maxGasLimit", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "stalenessSeconds", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "gasAfterPaymentCalculation", - "type": "uint32" - }, - { - "internalType": "int256", - "name": "fallbackWeiPerUnitLink", - "type": "int256" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeNativePPM", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "internalType": "uint8", - "name": "nativePremiumPercentage", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "linkPremiumPercentage", - "type": "uint8" - } - ], - "name": "setConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "link", - "type": "address" - }, - { - "internalType": "address", - "name": "linkNativeFeed", - "type": "address" - } - ], - "name": "setLINKAndLINKNativeFeed", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawNative", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} diff --git a/contracts/deployments/arbitrumSepolia/DAI.json b/contracts/deployments/arbitrumSepolia/DAI.json deleted file mode 100644 index c989bb132..000000000 --- a/contracts/deployments/arbitrumSepolia/DAI.json +++ /dev/null @@ -1,458 +0,0 @@ -{ - "address": "0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ], - "transactionHash": "0xf26e505115f57eeee85b2a1258a27f3560ce1d6dd0c8d5fdec02a38a90f68a0c", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03", - "transactionIndex": 1, - "gasUsed": "4834117", - "logsBloom": "0x00000020000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000400000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000040000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000100000000000000000", - "blockHash": "0xd28cc28660f187697c493cbcec57764f6912bd6042cb970f2fe51b74fc4fc6e9", - "transactionHash": "0xf26e505115f57eeee85b2a1258a27f3560ce1d6dd0c8d5fdec02a38a90f68a0c", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 3842783, - "transactionHash": "0xf26e505115f57eeee85b2a1258a27f3560ce1d6dd0c8d5fdec02a38a90f68a0c", - "address": "0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", - "logIndex": 0, - "blockHash": "0xd28cc28660f187697c493cbcec57764f6912bd6042cb970f2fe51b74fc4fc6e9" - } - ], - "blockNumber": 3842783, - "cumulativeGasUsed": "4834117", - "status": 1, - "byzantium": true - }, - "args": [ - "DAI", - "DAI" - ], - "numDeployments": 1, - "solcInputHash": "8e9cc2476be2df2a66044335eb796b9b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"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\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/TestERC20.sol\":\"TestERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"src/token/TestERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract TestERC20 is ERC20 {\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {\\n _mint(msg.sender, 1000000 ether);\\n }\\n}\\n\",\"keccak256\":\"0x9f67e6b63ca87e6c98b2986364ce16a747ce4098e9146fffb17ea13863c0b7e4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c5838038062000c5883398101604081905262000034916200020a565b8181600362000044838262000302565b50600462000053828262000302565b505050620000723369d3c21bcecceda10000006200007a60201b60201c565b5050620003f6565b6001600160a01b038216620000d55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620000e99190620003ce565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016d57600080fd5b81516001600160401b03808211156200018a576200018a62000145565b604051601f8301601f19908116603f01168101908282118183101715620001b557620001b562000145565b81604052838152602092508683858801011115620001d257600080fd5b600091505b83821015620001f65785820183015181830184015290820190620001d7565b600093810190920192909252949350505050565b600080604083850312156200021e57600080fd5b82516001600160401b03808211156200023657600080fd5b62000244868387016200015b565b935060208501519150808211156200025b57600080fd5b506200026a858286016200015b565b9150509250929050565b600181811c908216806200028957607f821691505b602082108103620002aa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200014057600081815260208120601f850160051c81016020861015620002d95750805b601f850160051c820191505b81811015620002fa57828155600101620002e5565b505050505050565b81516001600160401b038111156200031e576200031e62000145565b62000336816200032f845462000274565b84620002b0565b602080601f8311600181146200036e5760008415620003555750858301515b600019600386901b1c1916600185901b178555620002fa565b600085815260208120601f198616915b828110156200039f578886015182559484019460019091019084016200037e565b5085821015620003be5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620003f057634e487b7160e01b600052601160045260246000fd5b92915050565b61085280620004066000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea26469706673582212203a956e65a766c03ac95ae037cbdfb51b56810340c98132c2d2482405d386101b64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea26469706673582212203a956e65a766c03ac95ae037cbdfb51b56810340c98132c2d2482405d386101b64736f6c63430008120033", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 128, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 134, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 136, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 138, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 140, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/DAIFaucet.json b/contracts/deployments/arbitrumSepolia/DAIFaucet.json deleted file mode 100644 index 5c5e31c1d..000000000 --- a/contracts/deployments/arbitrumSepolia/DAIFaucet.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "address": "0x1Fa58B52326488D62A406E71DBaD839560e810fF", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "amount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "changeAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x703c6d2439eb53f2dce47dc5a223e73a1e1399e3058a9fc2d375ff7818a9f7e6", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x1Fa58B52326488D62A406E71DBaD839560e810fF", - "transactionIndex": 1, - "gasUsed": "2769180", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3d50a6300d95258d1cdc93f2f0f6fd62d46e5be5926c545230fd95071dd07610", - "transactionHash": "0x703c6d2439eb53f2dce47dc5a223e73a1e1399e3058a9fc2d375ff7818a9f7e6", - "logs": [], - "blockNumber": 3842785, - "cumulativeGasUsed": "2769180", - "status": 1, - "byzantium": true - }, - "args": [ - "0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03" - ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"amount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"changeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IERC20 public token;\\n address public governor;\\n mapping(address => bool) public withdrewAlready;\\n uint256 public amount = 10_000 ether;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeGovernor(address _governor) public onlyByGovernor {\\n governor = _governor;\\n }\\n\\n function changeAmount(uint256 _amount) public onlyByGovernor {\\n amount = _amount;\\n }\\n\\n function withdraw() public onlyByGovernor {\\n token.transfer(governor, token.balanceOf(address(this)));\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, amount);\\n withdrewAlready[msg.sender] = true;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x3a54681cc304ccbfdb42215104b63809919a432ac5d3986d3021a11fcc7a1cc3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405269021e19e0c9bab240000060035534801561001e57600080fd5b5060405161065538038061065583398101604081905261003d9161006b565b600080546001600160a01b039092166001600160a01b0319928316179055600180549091163317905561009b565b60006020828403121561007d57600080fd5b81516001600160a01b038116811461009457600080fd5b9392505050565b6105ab806100aa6000396000f3fe608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 24559, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)1042" - }, - { - "astId": 24561, - "contract": "src/token/Faucet.sol:Faucet", - "label": "governor", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 24565, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 24568, - "contract": "src/token/Faucet.sol:Faucet", - "label": "amount", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)1042": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitClassic.json b/contracts/deployments/arbitrumSepolia/DisputeKitClassic.json deleted file mode 100644 index ed2c11a7b..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitClassic.json +++ /dev/null @@ -1,1209 +0,0 @@ -{ - "address": "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xa851c86c0cdd54d7e6b8439188b655cd8676307dc7c4cfa9b831f7b36463498e", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", - "transactionIndex": 1, - "gasUsed": "203799", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000200000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb34e46f2829db2ccafc48071a3a1955eda10f39f57d0d723dc3d0a94951b4e32", - "transactionHash": "0xa851c86c0cdd54d7e6b8439188b655cd8676307dc7c4cfa9b831f7b36463498e", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95247789, - "transactionHash": "0xa851c86c0cdd54d7e6b8439188b655cd8676307dc7c4cfa9b831f7b36463498e", - "address": "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xb34e46f2829db2ccafc48071a3a1955eda10f39f57d0d723dc3d0a94951b4e32" - } - ], - "blockNumber": 95247789, - "cumulativeGasUsed": "203799", - "status": 1, - "byzantium": true - }, - "args": [ - "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 6, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c725b686c35c73323e89d3a1c5ad844b99f0379163dce99bcd79b25231551a8164736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c725b686c35c73323e89d3a1c5ad844b99f0379163dce99bcd79b25231551a8164736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511" - ] - }, - "implementation": "0xA122856B3B4C5fBcA129088af3CEb204509805f0", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Implementation.json b/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Implementation.json deleted file mode 100644 index 38b42f0ad..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Implementation.json +++ /dev/null @@ -1,1852 +0,0 @@ -{ - "address": "0xA122856B3B4C5fBcA129088af3CEb204509805f0", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xb878caa16800e96918f5ca3aaeb44cdca259a323bab5361890f1636a9c0e3058", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA122856B3B4C5fBcA129088af3CEb204509805f0", - "transactionIndex": 3, - "gasUsed": "3883411", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004200000000000000000000000000000000000008000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4ae9665c325c5698c84b8f40c63167b86a2b4a9bb344169cc44454c24f69b1b8", - "transactionHash": "0xb878caa16800e96918f5ca3aaeb44cdca259a323bab5361890f1636a9c0e3058", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 179580520, - "transactionHash": "0xb878caa16800e96918f5ca3aaeb44cdca259a323bab5361890f1636a9c0e3058", - "address": "0xA122856B3B4C5fBcA129088af3CEb204509805f0", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 4, - "blockHash": "0x4ae9665c325c5698c84b8f40c63167b86a2b4a9bb344169cc44454c24f69b1b8" - } - ], - "blockNumber": 179580520, - "cumulativeGasUsed": "4150165", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 6, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":\"DisputeKitClassic\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0xfe30d2fa9e1f882d77900894c0b4389e38f91b937e3c095f87bf255488cefd8b\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516143f36100fc600039600081816118130152818161183c0152611a3401526143f36000f3fe6080604052600436106102205760003560e01c80636d4cd8ea1161012e578063c0c53b8b116100ab578063f2f4eb261161006f578063f2f4eb2614610718578063f32ab92714610738578063f7e7d1fd1461076d578063f8abee101461078d578063fc6f8f16146107bd57600080fd5b8063c0c53b8b14610698578063d2b8035a146106b8578063da3beb8c146106d8578063e349ad301461058a578063e4c0aaf4146106f857600080fd5b8063a7cc08fe116100f2578063a7cc08fe146105e0578063b34bfaa81461062c578063b6ede54014610642578063ba66fde714610662578063be4676041461068257600080fd5b80636d4cd8ea1461054a578063751accd01461056a578063796490f91461058a5780637c04034e146105a05780638e426460146105c057600080fd5b80634b2f0ea0116101bc5780635a155ccd116101805780635a155ccd1461044f5780635c92e2f61461049057806365540b96146104b0578063675926f6146104dd57806369f3f041146104fd57600080fd5b80634b2f0ea0146103a45780634f1ef286146103b957806352d1902d146103cc57806354fd4d50146103e1578063564a565d1461042057600080fd5b80630855bbe9146102255780630baa64d11461025a5780630c340a241461027a5780631200aabc146102b25780631c3db16d146102ed5780631cc3423a1461032a5780632621b9a21461034a5780632d68efc914610364578063362c347914610384575b600080fd5b34801561023157600080fd5b50610245610240366004613814565b6107dd565b60405190151581526020015b60405180910390f35b34801561026657600080fd5b50610245610275366004613814565b6108a5565b34801561028657600080fd5b5060005461029a906001600160a01b031681565b6040516001600160a01b039091168152602001610251565b3480156102be57600080fd5b506102df6102cd366004613814565b60036020526000908152604090205481565b604051908152602001610251565b3480156102f957600080fd5b5061030d610308366004613814565b61091c565b604080519384529115156020840152151590820152606001610251565b34801561033657600080fd5b506102df6103453660046138d7565b610a8a565b34801561035657600080fd5b506004546102459060ff1681565b34801561037057600080fd5b5060075461029a906001600160a01b031681565b34801561039057600080fd5b506102df61039f36600461393b565b610aba565b6103b76103b2366004613978565b610f6f565b005b6103b76103c736600461399a565b6117ff565b3480156103d857600080fd5b506102df611a27565b3480156103ed57600080fd5b50610413604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102519190613a39565b34801561042c57600080fd5b5061044061043b366004613814565b611a85565b60405161025193929190613a4c565b34801561045b57600080fd5b5061024561046a366004613a6d565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b34801561049c57600080fd5b506103b76104ab366004613af1565b611b4b565b3480156104bc57600080fd5b506104d06104cb366004613814565b611b57565b6040516102519190613b43565b3480156104e957600080fd5b506102df6104f8366004613b86565b611c1b565b34801561050957600080fd5b5061051d610518366004613bc1565b611d5e565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610251565b34801561055657600080fd5b50610245610565366004613814565b611e16565b34801561057657600080fd5b506103b7610585366004613bed565b611f99565b34801561059657600080fd5b506102df61271081565b3480156105ac57600080fd5b506103b76105bb366004613c2f565b612065565b3480156105cc57600080fd5b506103b76105db366004613cb7565b61207c565b3480156105ec57600080fd5b506106006105fb366004613bc1565b6120c8565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610251565b34801561063857600080fd5b506102df614e2081565b34801561064e57600080fd5b506103b761065d366004613cd4565b61218e565b34801561066e57600080fd5b5061024561067d366004613bc1565b612381565b34801561068e57600080fd5b506102df61138881565b3480156106a457600080fd5b506103b76106b3366004613d5d565b61241c565b3480156106c457600080fd5b5061029a6106d3366004613978565b6124e6565b3480156106e457600080fd5b506102df6106f3366004613978565b612835565b34801561070457600080fd5b506103b7610713366004613cb7565b612988565b34801561072457600080fd5b5060015461029a906001600160a01b031681565b34801561074457600080fd5b50610758610753366004613978565b6129d4565b60408051928352602083019190915201610251565b34801561077957600080fd5b506103b7610788366004613cb7565b612a26565b34801561079957600080fd5b506102456107a8366004613814565b60066020526000908152604090205460ff1681565b3480156107c957600080fd5b506102df6107d8366004613814565b612af8565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190613d9d565b91509150600061085d85611b57565b90508051600014801561089c575061271061138861087b8585613dd7565b6108859190613dea565b61088f9190613e01565b6108998442613dd7565b10155b95945050505050565b6000818152600360205260408120546002805483929081106108c9576108c9613e23565b600091825260208220600590910201805490925082906108eb90600190613dd7565b815481106108fb576108fb613e23565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061094857610948613e23565b6000918252602082206005909102018054909250829061096a90600190613dd7565b8154811061097a5761097a613e23565b60009182526020909120600c90910201600381015460ff1694509050836109a55780600101546109a8565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156109f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1b9190613e65565b5090935060049250610a2b915050565b816004811115610a3d57610a3d613ece565b03610a80576000610a4d88611b57565b90508051600103610a7e5780600081518110610a6b57610a6b613e23565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2c9190613e65565b50935050505080610b845760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfb9190613ee4565b15610c395760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610b7b565b60008681526006602052604090205460ff16610c675760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110610c8b57610c8b613e23565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610cbf57610cbf613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3e9190613f36565b5050600087815260078401602052604090205490915060ff16610d88576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ecd565b808603610dfd576000868152600683016020526040902054610dab576000610df6565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610dec9190613dea565b610df69190613e01565b9450610ecd565b600081815260078301602052604090205460ff16610ecd5781600601600083600a01600181548110610e3157610e31613e23565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610e6757610e67613e23565b9060005260206000200154815260200190815260200160002054610e8b9190613f72565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610ec09190613dea565b610eca9190613e01565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610f6357600754610f14906001600160a01b038a811691889116612b24565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610f5a929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610f9357610f93613e23565b600091825260209091206002600590920201015460ff1615610fc75760405162461bcd60e51b8152600401610b7b90613f85565b600083815260036020526040812054600280549091908110610feb57610feb613e23565b90600052602060002090600502019050806001015483111561104f5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610b7b565b60008481526006602052604090205460ff1661107d5760405162461bcd60e51b8152600401610b7b90613eff565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190613d9d565b9150915081421015801561110157508042105b6111465760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610b7b565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab9190613f36565b505090508681036111c0576127109150611241565b6127106113886111d08686613dd7565b6111da9190613dea565b6111e49190613e01565b6111ee8542613dd7565b1061123b5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610b7b565b614e2091505b8454600090869061125490600190613dd7565b8154811061126457611264613e23565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156112c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e79190613fbc565b6112f19190613dd7565b60008a815260078401602052604090205490915060ff16156113555760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610b7b565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561139f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c39190613fbc565b905060006127106113d48784613dea565b6113de9190613e01565b6113e89083613f72565b60008c8152600686016020526040812054919250908211156114995760008c815260068601602052604090205434906114219084613dd7565b116114465760008c81526006860160205260409020546114419083613dd7565b611448565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611490929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906114c5908490613f72565b909155505060008c8152600686016020526040812080548392906114ea908490613f72565b909155505060008c815260068601602052604090205482116115bc5760008c81526006860160205260408120546009870180549192909161152c908490613f72565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156117c7578285600901546115d99190613dd7565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164b9190613ee4565b156116645760028a01805460ff19166001179055611747565b895460038b016000611677876001613f72565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b81526004016116f291815260200190565b602060405180830381865afa15801561170f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117339190613fbc565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117949392919061400f565b6000604051808303818588803b1580156117ad57600080fd5b505af11580156117c1573d6000803e3d6000fd5b50505050505b803411156117f0576117f06117dc8234613dd7565b6007543391906001600160a01b0316612b24565b50505050505050505050505050565b61180882612c0f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061188657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661187a60008051602061439e8339815191525490565b6001600160a01b031614155b156118a45760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118fe575060408051601f3d908101601f191682019092526118fb91810190613fbc565b60015b61192657604051630c76093760e01b81526001600160a01b0383166004820152602401610b7b565b60008051602061439e833981519152811461195757604051632a87526960e21b815260048101829052602401610b7b565b60008051602061439e8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a22576000836001600160a01b0316836040516119be91906140a9565b600060405180830381855af49150503d80600081146119f9576040519150601f19603f3d011682016040523d82523d6000602084013e6119fe565b606091505b5050905080611a20576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611a725760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061439e83398151915290565b60028181548110611a9557600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611ac890613fd5565b80601f0160208091040260200160405190810160405280929190818152602001828054611af490613fd5565b8015611b415780601f10611b1657610100808354040283529160200191611b41565b820191906000526020600020905b815481529060010190602001808311611b2457829003601f168201915b5050505050905083565b611a2084848484612c3c565b6000818152600360205260408120546002805460609392908110611b7d57611b7d613e23565b60009182526020822060059091020180549092508290611b9f90600190613dd7565b81548110611baf57611baf613e23565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c0d57602002820191906000526020600020905b815481526020019060010190808311611bf9575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c3f57611c3f613e23565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611c7357611c73613e23565b90600052602060002090600c02016000018681548110611c9557611c95613e23565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190613f36565b506003850154919350915060ff168015611d3b57508183600201541480611d3b5750805b15611d4e5761271094505050505061089c565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611d8f57611d8f613e23565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611dc357611dc3613e23565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e3a57611e3a613e23565b60009182526020822060059091020180549092508290611e5c90600190613dd7565b81548110611e6c57611e6c613e23565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ec7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eeb9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a91906140c5565b5050505050915050600081611f80578354611f86565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b03163314611fc35760405162461bcd60e51b8152600401610b7b90614131565b6000836001600160a01b03168383604051611fde91906140a9565b60006040518083038185875af1925050503d806000811461201b576040519150601f19603f3d011682016040523d82523d6000602084013e612020565b606091505b5050905080611a205760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610b7b565b61207486868686868633612f9f565b505050505050565b6000546001600160a01b031633146120a65760405162461bcd60e51b8152600401610b7b90614131565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a815260200190815260200160002054815481106120f6576120f6613e23565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061212a5761212a613e23565b90600052602060002090600c0201600001878154811061214c5761214c613e23565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146121b85760405162461bcd60e51b8152600401610b7b90614173565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612243858783614205565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ca9190613fbc565b6122d49190613dd7565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061236f908a908a908a906142c4565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123a5576123a5613e23565b600091825260208083208784526003600590930201918201905260408220548154919350839181106123d9576123d9613e23565b90600052602060002090600c020160000184815481106123fb576123fb613e23565b600091825260209091206004909102016003015460ff169695505050505050565b600160006124286136d0565b8054909150600160401b900460ff168061244f575080546001600160401b03808416911610155b1561246c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124988585856136f4565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146125135760405162461bcd60e51b8152600401610b7b90614173565b60008381526003602052604090205460028054859290811061253757612537613e23565b600091825260209091206002600590920201015460ff161561256b5760405162461bcd60e51b8152600401610b7b90613f85565b600084815260036020526040812054600280549192918390811061259157612591613e23565b60009182526020822060059091020180549092506125b190600190613dd7565b905060008260000182815481106125ca576125ca613e23565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561262f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265391906142fa565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c69190613e65565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561272a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061274e91906142fa565b98506001600160a01b03891661276a575050505050505061282e565b612775848c8b61373b565b1561282157604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612826565b600098505b505050505050505b5092915050565b60008281526003602052604081205460028054839290811061285957612859613e23565b6000918252602080832086845260036005909302019182019052604082205481549193508391811061288d5761288d613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa1580156128ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129109190613f36565b509150915082600401546000148061293f57508015801561293f57506000828152600284016020526040902054155b15612951576000945050505050612982565b80156129665750506004015491506129829050565b5060009081526002909101602052604090205491506129829050565b92915050565b6000546001600160a01b031633146129b25760405162461bcd60e51b8152600401610b7b90614131565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526003602052604081205460028054919291839081106129fa576129fa613e23565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612a326136d0565b8054909150600160401b900460ff1680612a59575080546001600160401b03808416911610155b15612a765760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b0d57612b0d613e23565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612b5357505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b8e57600080fd5b505af1158015612ba2573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612bf257600080fd5b505af1158015612c06573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612c395760405162461bcd60e51b8152600401610b7b90614131565b50565b600084815260036020526040902054600280548692908110612c6057612c60613e23565b600091825260209091206002600590920201015460ff1615612c945760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d029190613e65565b5090935060019250612d12915050565b816004811115612d2457612d24613ece565b14612d815760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610b7b565b82612dbe5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610b7b565b60008681526006602052604090205460ff16612dec5760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110612e1057612e10613e23565b60009182526020822060059091020180549092508290612e3290600190613dd7565b81548110612e4257612e42613e23565b90600052602060002090600c0201905060005b86811015612f38573382898984818110612e7157612e71613e23565b9050602002013581548110612e8857612e88613e23565b60009182526020909120600490910201546001600160a01b031614612eef5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610b7b565b8582898984818110612f0357612f03613e23565b9050602002013581548110612f1a57612f1a613e23565b60009182526020909120600160049092020181019190915501612e55565b5086869050816005016000828254612f509190613f72565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890612f8d908b908b908b90614349565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110612fc357612fc3613e23565b600091825260209091206002600590920201015460ff1615612ff75760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613041573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130659190613e65565b5090935060029250613075915050565b81600481111561308757613087613ece565b146130e25760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610b7b565b866131245760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610b7b565b60008981526006602052604090205460ff166131525760405162461bcd60e51b8152600401610b7b90613eff565b60008981526003602052604081205460028054909190811061317657613176613e23565b9060005260206000209060050201905080600101548711156131d15760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610b7b565b805460009082906131e490600190613dd7565b815481106131f4576131f4613e23565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d90613239908f9060040190815260200190565b60a060405180830381865afa158015613256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327a9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156132d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132f991906140c5565b5050505050915050600061330e8b8b8b610a8a565b905060005b8c811015613595576001600160a01b038916858f8f8481811061333857613338613e23565b905060200201358154811061334f5761334f613e23565b60009182526020909120600490910201546001600160a01b0316146133b65760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610b7b565b8215806133fd575081858f8f848181106133d2576133d2613e23565b90506020020135815481106133e9576133e9613e23565b906000526020600020906004020160010154145b61347d5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610b7b565b848e8e8381811061349057613490613e23565b90506020020135815481106134a7576134a7613e23565b600091825260209091206003600490920201015460ff16156135005760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610b7b565b8b858f8f8481811061351457613514613e23565b905060200201358154811061352b5761352b613e23565b60009182526020909120600260049092020101556001858f8f8481811061355457613554613e23565b905060200201358154811061356b5761356b613e23565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613313565b5050506004820180548b92506000906135af908490613f72565b90915550506000888152600282016020526040812080548b92906135d4908490613f72565b90915550506001810154880361360357600381015460ff16156135fe5760038101805460ff191690555b61367c565b60018101546000908152600282016020526040808220548a83529120540361364557600381015460ff166135fe5760038101805460ff1916600117905561367c565b60018101546000908152600282016020526040808220548a8352912054111561367c576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516136bb9392919061436d565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6136fc6137d3565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156137c957600083815260036020526040812054600280549192918390811061376f5761376f613e23565b600091825260208220600590910201805490925061378f90600190613dd7565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610ab3915050565b5060019392505050565b6137db6137fa565b6137f857604051631afcd79f60e31b815260040160405180910390fd5b565b60006138046136d0565b54600160401b900460ff16919050565b60006020828403121561382657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261385457600080fd5b8135602083016000806001600160401b038411156138745761387461382d565b50604051601f19601f85018116603f011681018181106001600160401b03821117156138a2576138a261382d565b6040528381529050808284018710156138ba57600080fd5b838360208301376000602085830101528094505050505092915050565b6000806000606084860312156138ec57600080fd5b833592506020840135915060408401356001600160401b0381111561391057600080fd5b61391c86828701613843565b9150509250925092565b6001600160a01b0381168114612c3957600080fd5b6000806000806080858703121561395157600080fd5b84359350602085013561396381613926565b93969395505050506040820135916060013590565b6000806040838503121561398b57600080fd5b50508035926020909101359150565b600080604083850312156139ad57600080fd5b82356139b881613926565b915060208301356001600160401b038111156139d357600080fd5b6139df85828601613843565b9150509250929050565b60005b83811015613a045781810151838201526020016139ec565b50506000910152565b60008151808452613a258160208601602086016139e9565b601f01601f19169290920160200192915050565b602081526000610ab36020830184613a0d565b838152821515602082015260606040820152600061089c6060830184613a0d565b600080600060608486031215613a8257600080fd5b83359250602084013591506040840135613a9b81613926565b809150509250925092565b60008083601f840112613ab857600080fd5b5081356001600160401b03811115613acf57600080fd5b6020830191508360208260051b8501011115613aea57600080fd5b9250929050565b60008060008060608587031215613b0757600080fd5b8435935060208501356001600160401b03811115613b2457600080fd5b613b3087828801613aa6565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613b7b578351835260209384019390920191600101613b5d565b509095945050505050565b600080600080600060a08688031215613b9e57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613bd657600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613c0257600080fd5b8335613c0d81613926565b92506020840135915060408401356001600160401b0381111561391057600080fd5b60008060008060008060a08789031215613c4857600080fd5b8635955060208701356001600160401b03811115613c6557600080fd5b613c7189828a01613aa6565b909650945050604087013592506060870135915060808701356001600160401b03811115613c9e57600080fd5b613caa89828a01613843565b9150509295509295509295565b600060208284031215613cc957600080fd5b8135610ab381613926565b600080600080600060808688031215613cec57600080fd5b853594506020860135935060408601356001600160401b03811115613d1057600080fd5b8601601f81018813613d2157600080fd5b80356001600160401b03811115613d3757600080fd5b886020828401011115613d4957600080fd5b959894975060200195606001359392505050565b600080600060608486031215613d7257600080fd5b8335613d7d81613926565b92506020840135613d8d81613926565b91506040840135613a9b81613926565b60008060408385031215613db057600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b8181038181111561298257612982613dc1565b808202811582820484141761298257612982613dc1565b600082613e1e57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b0381168114613e5057600080fd5b919050565b80518015158114613e5057600080fd5b600080600080600060a08688031215613e7d57600080fd5b613e8686613e39565b94506020860151613e9681613926565b604087015190945060058110613eab57600080fd5b9250613eb960608701613e55565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613ef657600080fd5b610ab382613e55565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b600080600060608486031215613f4b57600080fd5b83519250613f5b60208501613e55565b9150613f6960408501613e55565b90509250925092565b8082018082111561298257612982613dc1565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600060208284031215613fce57600080fd5b5051919050565b600181811c90821680613fe957607f821691505b60208210810361400957634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461402d81613fd5565b806060860152600182166000811461404c57600181146140685761409c565b60ff1983166080870152608082151560051b870101935061409c565b86600052602060002060005b8381101561409357815488820160800152600190910190602001614074565b87016080019450505b5091979650505050505050565b600082516140bb8184602087016139e9565b9190910192915050565b600080600080600080600060e0888a0312156140e057600080fd5b6140e988613e39565b96506140f760208901613e55565b604089015160608a015160808b015160a08c015193995091975095509350915061412360c08901613e55565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a2257806000526020600020601f840160051c810160208510156141de5750805b601f840160051c820191505b818110156141fe57600081556001016141ea565b5050505050565b6001600160401b0383111561421c5761421c61382d565b6142308361422a8354613fd5565b836141b7565b6000601f841160018114614264576000851561424c5750838201355b600019600387901b1c1916600186901b1783556141fe565b600083815260209020601f19861690835b828110156142955786850135825560209485019460019092019101614275565b50868210156142b25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60006020828403121561430c57600080fd5b8151610ab381613926565b81835260006001600160fb1b0383111561433057600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061435d604083018587614317565b9050826020830152949350505050565b604081526000614381604083018587614317565b82810360208401526143938185613a0d565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205273a7fd5d9b74f6a10c8e8ff9173490991e595b881e9a1f0a7986976eaa245264736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102205760003560e01c80636d4cd8ea1161012e578063c0c53b8b116100ab578063f2f4eb261161006f578063f2f4eb2614610718578063f32ab92714610738578063f7e7d1fd1461076d578063f8abee101461078d578063fc6f8f16146107bd57600080fd5b8063c0c53b8b14610698578063d2b8035a146106b8578063da3beb8c146106d8578063e349ad301461058a578063e4c0aaf4146106f857600080fd5b8063a7cc08fe116100f2578063a7cc08fe146105e0578063b34bfaa81461062c578063b6ede54014610642578063ba66fde714610662578063be4676041461068257600080fd5b80636d4cd8ea1461054a578063751accd01461056a578063796490f91461058a5780637c04034e146105a05780638e426460146105c057600080fd5b80634b2f0ea0116101bc5780635a155ccd116101805780635a155ccd1461044f5780635c92e2f61461049057806365540b96146104b0578063675926f6146104dd57806369f3f041146104fd57600080fd5b80634b2f0ea0146103a45780634f1ef286146103b957806352d1902d146103cc57806354fd4d50146103e1578063564a565d1461042057600080fd5b80630855bbe9146102255780630baa64d11461025a5780630c340a241461027a5780631200aabc146102b25780631c3db16d146102ed5780631cc3423a1461032a5780632621b9a21461034a5780632d68efc914610364578063362c347914610384575b600080fd5b34801561023157600080fd5b50610245610240366004613814565b6107dd565b60405190151581526020015b60405180910390f35b34801561026657600080fd5b50610245610275366004613814565b6108a5565b34801561028657600080fd5b5060005461029a906001600160a01b031681565b6040516001600160a01b039091168152602001610251565b3480156102be57600080fd5b506102df6102cd366004613814565b60036020526000908152604090205481565b604051908152602001610251565b3480156102f957600080fd5b5061030d610308366004613814565b61091c565b604080519384529115156020840152151590820152606001610251565b34801561033657600080fd5b506102df6103453660046138d7565b610a8a565b34801561035657600080fd5b506004546102459060ff1681565b34801561037057600080fd5b5060075461029a906001600160a01b031681565b34801561039057600080fd5b506102df61039f36600461393b565b610aba565b6103b76103b2366004613978565b610f6f565b005b6103b76103c736600461399a565b6117ff565b3480156103d857600080fd5b506102df611a27565b3480156103ed57600080fd5b50610413604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102519190613a39565b34801561042c57600080fd5b5061044061043b366004613814565b611a85565b60405161025193929190613a4c565b34801561045b57600080fd5b5061024561046a366004613a6d565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b34801561049c57600080fd5b506103b76104ab366004613af1565b611b4b565b3480156104bc57600080fd5b506104d06104cb366004613814565b611b57565b6040516102519190613b43565b3480156104e957600080fd5b506102df6104f8366004613b86565b611c1b565b34801561050957600080fd5b5061051d610518366004613bc1565b611d5e565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610251565b34801561055657600080fd5b50610245610565366004613814565b611e16565b34801561057657600080fd5b506103b7610585366004613bed565b611f99565b34801561059657600080fd5b506102df61271081565b3480156105ac57600080fd5b506103b76105bb366004613c2f565b612065565b3480156105cc57600080fd5b506103b76105db366004613cb7565b61207c565b3480156105ec57600080fd5b506106006105fb366004613bc1565b6120c8565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610251565b34801561063857600080fd5b506102df614e2081565b34801561064e57600080fd5b506103b761065d366004613cd4565b61218e565b34801561066e57600080fd5b5061024561067d366004613bc1565b612381565b34801561068e57600080fd5b506102df61138881565b3480156106a457600080fd5b506103b76106b3366004613d5d565b61241c565b3480156106c457600080fd5b5061029a6106d3366004613978565b6124e6565b3480156106e457600080fd5b506102df6106f3366004613978565b612835565b34801561070457600080fd5b506103b7610713366004613cb7565b612988565b34801561072457600080fd5b5060015461029a906001600160a01b031681565b34801561074457600080fd5b50610758610753366004613978565b6129d4565b60408051928352602083019190915201610251565b34801561077957600080fd5b506103b7610788366004613cb7565b612a26565b34801561079957600080fd5b506102456107a8366004613814565b60066020526000908152604090205460ff1681565b3480156107c957600080fd5b506102df6107d8366004613814565b612af8565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190613d9d565b91509150600061085d85611b57565b90508051600014801561089c575061271061138861087b8585613dd7565b6108859190613dea565b61088f9190613e01565b6108998442613dd7565b10155b95945050505050565b6000818152600360205260408120546002805483929081106108c9576108c9613e23565b600091825260208220600590910201805490925082906108eb90600190613dd7565b815481106108fb576108fb613e23565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061094857610948613e23565b6000918252602082206005909102018054909250829061096a90600190613dd7565b8154811061097a5761097a613e23565b60009182526020909120600c90910201600381015460ff1694509050836109a55780600101546109a8565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156109f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1b9190613e65565b5090935060049250610a2b915050565b816004811115610a3d57610a3d613ece565b03610a80576000610a4d88611b57565b90508051600103610a7e5780600081518110610a6b57610a6b613e23565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2c9190613e65565b50935050505080610b845760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfb9190613ee4565b15610c395760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610b7b565b60008681526006602052604090205460ff16610c675760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110610c8b57610c8b613e23565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610cbf57610cbf613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3e9190613f36565b5050600087815260078401602052604090205490915060ff16610d88576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ecd565b808603610dfd576000868152600683016020526040902054610dab576000610df6565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610dec9190613dea565b610df69190613e01565b9450610ecd565b600081815260078301602052604090205460ff16610ecd5781600601600083600a01600181548110610e3157610e31613e23565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610e6757610e67613e23565b9060005260206000200154815260200190815260200160002054610e8b9190613f72565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610ec09190613dea565b610eca9190613e01565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610f6357600754610f14906001600160a01b038a811691889116612b24565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610f5a929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610f9357610f93613e23565b600091825260209091206002600590920201015460ff1615610fc75760405162461bcd60e51b8152600401610b7b90613f85565b600083815260036020526040812054600280549091908110610feb57610feb613e23565b90600052602060002090600502019050806001015483111561104f5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610b7b565b60008481526006602052604090205460ff1661107d5760405162461bcd60e51b8152600401610b7b90613eff565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190613d9d565b9150915081421015801561110157508042105b6111465760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610b7b565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab9190613f36565b505090508681036111c0576127109150611241565b6127106113886111d08686613dd7565b6111da9190613dea565b6111e49190613e01565b6111ee8542613dd7565b1061123b5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610b7b565b614e2091505b8454600090869061125490600190613dd7565b8154811061126457611264613e23565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156112c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e79190613fbc565b6112f19190613dd7565b60008a815260078401602052604090205490915060ff16156113555760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610b7b565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561139f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c39190613fbc565b905060006127106113d48784613dea565b6113de9190613e01565b6113e89083613f72565b60008c8152600686016020526040812054919250908211156114995760008c815260068601602052604090205434906114219084613dd7565b116114465760008c81526006860160205260409020546114419083613dd7565b611448565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611490929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906114c5908490613f72565b909155505060008c8152600686016020526040812080548392906114ea908490613f72565b909155505060008c815260068601602052604090205482116115bc5760008c81526006860160205260408120546009870180549192909161152c908490613f72565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156117c7578285600901546115d99190613dd7565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164b9190613ee4565b156116645760028a01805460ff19166001179055611747565b895460038b016000611677876001613f72565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b81526004016116f291815260200190565b602060405180830381865afa15801561170f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117339190613fbc565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117949392919061400f565b6000604051808303818588803b1580156117ad57600080fd5b505af11580156117c1573d6000803e3d6000fd5b50505050505b803411156117f0576117f06117dc8234613dd7565b6007543391906001600160a01b0316612b24565b50505050505050505050505050565b61180882612c0f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061188657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661187a60008051602061439e8339815191525490565b6001600160a01b031614155b156118a45760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118fe575060408051601f3d908101601f191682019092526118fb91810190613fbc565b60015b61192657604051630c76093760e01b81526001600160a01b0383166004820152602401610b7b565b60008051602061439e833981519152811461195757604051632a87526960e21b815260048101829052602401610b7b565b60008051602061439e8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a22576000836001600160a01b0316836040516119be91906140a9565b600060405180830381855af49150503d80600081146119f9576040519150601f19603f3d011682016040523d82523d6000602084013e6119fe565b606091505b5050905080611a20576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611a725760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061439e83398151915290565b60028181548110611a9557600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611ac890613fd5565b80601f0160208091040260200160405190810160405280929190818152602001828054611af490613fd5565b8015611b415780601f10611b1657610100808354040283529160200191611b41565b820191906000526020600020905b815481529060010190602001808311611b2457829003601f168201915b5050505050905083565b611a2084848484612c3c565b6000818152600360205260408120546002805460609392908110611b7d57611b7d613e23565b60009182526020822060059091020180549092508290611b9f90600190613dd7565b81548110611baf57611baf613e23565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c0d57602002820191906000526020600020905b815481526020019060010190808311611bf9575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c3f57611c3f613e23565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611c7357611c73613e23565b90600052602060002090600c02016000018681548110611c9557611c95613e23565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190613f36565b506003850154919350915060ff168015611d3b57508183600201541480611d3b5750805b15611d4e5761271094505050505061089c565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611d8f57611d8f613e23565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611dc357611dc3613e23565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e3a57611e3a613e23565b60009182526020822060059091020180549092508290611e5c90600190613dd7565b81548110611e6c57611e6c613e23565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ec7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eeb9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a91906140c5565b5050505050915050600081611f80578354611f86565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b03163314611fc35760405162461bcd60e51b8152600401610b7b90614131565b6000836001600160a01b03168383604051611fde91906140a9565b60006040518083038185875af1925050503d806000811461201b576040519150601f19603f3d011682016040523d82523d6000602084013e612020565b606091505b5050905080611a205760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610b7b565b61207486868686868633612f9f565b505050505050565b6000546001600160a01b031633146120a65760405162461bcd60e51b8152600401610b7b90614131565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a815260200190815260200160002054815481106120f6576120f6613e23565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061212a5761212a613e23565b90600052602060002090600c0201600001878154811061214c5761214c613e23565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146121b85760405162461bcd60e51b8152600401610b7b90614173565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612243858783614205565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ca9190613fbc565b6122d49190613dd7565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061236f908a908a908a906142c4565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123a5576123a5613e23565b600091825260208083208784526003600590930201918201905260408220548154919350839181106123d9576123d9613e23565b90600052602060002090600c020160000184815481106123fb576123fb613e23565b600091825260209091206004909102016003015460ff169695505050505050565b600160006124286136d0565b8054909150600160401b900460ff168061244f575080546001600160401b03808416911610155b1561246c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124988585856136f4565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146125135760405162461bcd60e51b8152600401610b7b90614173565b60008381526003602052604090205460028054859290811061253757612537613e23565b600091825260209091206002600590920201015460ff161561256b5760405162461bcd60e51b8152600401610b7b90613f85565b600084815260036020526040812054600280549192918390811061259157612591613e23565b60009182526020822060059091020180549092506125b190600190613dd7565b905060008260000182815481106125ca576125ca613e23565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561262f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265391906142fa565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c69190613e65565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561272a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061274e91906142fa565b98506001600160a01b03891661276a575050505050505061282e565b612775848c8b61373b565b1561282157604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612826565b600098505b505050505050505b5092915050565b60008281526003602052604081205460028054839290811061285957612859613e23565b6000918252602080832086845260036005909302019182019052604082205481549193508391811061288d5761288d613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa1580156128ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129109190613f36565b509150915082600401546000148061293f57508015801561293f57506000828152600284016020526040902054155b15612951576000945050505050612982565b80156129665750506004015491506129829050565b5060009081526002909101602052604090205491506129829050565b92915050565b6000546001600160a01b031633146129b25760405162461bcd60e51b8152600401610b7b90614131565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526003602052604081205460028054919291839081106129fa576129fa613e23565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612a326136d0565b8054909150600160401b900460ff1680612a59575080546001600160401b03808416911610155b15612a765760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b0d57612b0d613e23565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612b5357505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b8e57600080fd5b505af1158015612ba2573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612bf257600080fd5b505af1158015612c06573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612c395760405162461bcd60e51b8152600401610b7b90614131565b50565b600084815260036020526040902054600280548692908110612c6057612c60613e23565b600091825260209091206002600590920201015460ff1615612c945760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d029190613e65565b5090935060019250612d12915050565b816004811115612d2457612d24613ece565b14612d815760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610b7b565b82612dbe5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610b7b565b60008681526006602052604090205460ff16612dec5760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110612e1057612e10613e23565b60009182526020822060059091020180549092508290612e3290600190613dd7565b81548110612e4257612e42613e23565b90600052602060002090600c0201905060005b86811015612f38573382898984818110612e7157612e71613e23565b9050602002013581548110612e8857612e88613e23565b60009182526020909120600490910201546001600160a01b031614612eef5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610b7b565b8582898984818110612f0357612f03613e23565b9050602002013581548110612f1a57612f1a613e23565b60009182526020909120600160049092020181019190915501612e55565b5086869050816005016000828254612f509190613f72565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890612f8d908b908b908b90614349565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110612fc357612fc3613e23565b600091825260209091206002600590920201015460ff1615612ff75760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613041573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130659190613e65565b5090935060029250613075915050565b81600481111561308757613087613ece565b146130e25760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610b7b565b866131245760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610b7b565b60008981526006602052604090205460ff166131525760405162461bcd60e51b8152600401610b7b90613eff565b60008981526003602052604081205460028054909190811061317657613176613e23565b9060005260206000209060050201905080600101548711156131d15760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610b7b565b805460009082906131e490600190613dd7565b815481106131f4576131f4613e23565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d90613239908f9060040190815260200190565b60a060405180830381865afa158015613256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327a9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156132d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132f991906140c5565b5050505050915050600061330e8b8b8b610a8a565b905060005b8c811015613595576001600160a01b038916858f8f8481811061333857613338613e23565b905060200201358154811061334f5761334f613e23565b60009182526020909120600490910201546001600160a01b0316146133b65760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610b7b565b8215806133fd575081858f8f848181106133d2576133d2613e23565b90506020020135815481106133e9576133e9613e23565b906000526020600020906004020160010154145b61347d5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610b7b565b848e8e8381811061349057613490613e23565b90506020020135815481106134a7576134a7613e23565b600091825260209091206003600490920201015460ff16156135005760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610b7b565b8b858f8f8481811061351457613514613e23565b905060200201358154811061352b5761352b613e23565b60009182526020909120600260049092020101556001858f8f8481811061355457613554613e23565b905060200201358154811061356b5761356b613e23565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613313565b5050506004820180548b92506000906135af908490613f72565b90915550506000888152600282016020526040812080548b92906135d4908490613f72565b90915550506001810154880361360357600381015460ff16156135fe5760038101805460ff191690555b61367c565b60018101546000908152600282016020526040808220548a83529120540361364557600381015460ff166135fe5760038101805460ff1916600117905561367c565b60018101546000908152600282016020526040808220548a8352912054111561367c576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516136bb9392919061436d565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6136fc6137d3565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156137c957600083815260036020526040812054600280549192918390811061376f5761376f613e23565b600091825260208220600590910201805490925061378f90600190613dd7565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610ab3915050565b5060019392505050565b6137db6137fa565b6137f857604051631afcd79f60e31b815260040160405180910390fd5b565b60006138046136d0565b54600160401b900460ff16919050565b60006020828403121561382657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261385457600080fd5b8135602083016000806001600160401b038411156138745761387461382d565b50604051601f19601f85018116603f011681018181106001600160401b03821117156138a2576138a261382d565b6040528381529050808284018710156138ba57600080fd5b838360208301376000602085830101528094505050505092915050565b6000806000606084860312156138ec57600080fd5b833592506020840135915060408401356001600160401b0381111561391057600080fd5b61391c86828701613843565b9150509250925092565b6001600160a01b0381168114612c3957600080fd5b6000806000806080858703121561395157600080fd5b84359350602085013561396381613926565b93969395505050506040820135916060013590565b6000806040838503121561398b57600080fd5b50508035926020909101359150565b600080604083850312156139ad57600080fd5b82356139b881613926565b915060208301356001600160401b038111156139d357600080fd5b6139df85828601613843565b9150509250929050565b60005b83811015613a045781810151838201526020016139ec565b50506000910152565b60008151808452613a258160208601602086016139e9565b601f01601f19169290920160200192915050565b602081526000610ab36020830184613a0d565b838152821515602082015260606040820152600061089c6060830184613a0d565b600080600060608486031215613a8257600080fd5b83359250602084013591506040840135613a9b81613926565b809150509250925092565b60008083601f840112613ab857600080fd5b5081356001600160401b03811115613acf57600080fd5b6020830191508360208260051b8501011115613aea57600080fd5b9250929050565b60008060008060608587031215613b0757600080fd5b8435935060208501356001600160401b03811115613b2457600080fd5b613b3087828801613aa6565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613b7b578351835260209384019390920191600101613b5d565b509095945050505050565b600080600080600060a08688031215613b9e57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613bd657600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613c0257600080fd5b8335613c0d81613926565b92506020840135915060408401356001600160401b0381111561391057600080fd5b60008060008060008060a08789031215613c4857600080fd5b8635955060208701356001600160401b03811115613c6557600080fd5b613c7189828a01613aa6565b909650945050604087013592506060870135915060808701356001600160401b03811115613c9e57600080fd5b613caa89828a01613843565b9150509295509295509295565b600060208284031215613cc957600080fd5b8135610ab381613926565b600080600080600060808688031215613cec57600080fd5b853594506020860135935060408601356001600160401b03811115613d1057600080fd5b8601601f81018813613d2157600080fd5b80356001600160401b03811115613d3757600080fd5b886020828401011115613d4957600080fd5b959894975060200195606001359392505050565b600080600060608486031215613d7257600080fd5b8335613d7d81613926565b92506020840135613d8d81613926565b91506040840135613a9b81613926565b60008060408385031215613db057600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b8181038181111561298257612982613dc1565b808202811582820484141761298257612982613dc1565b600082613e1e57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b0381168114613e5057600080fd5b919050565b80518015158114613e5057600080fd5b600080600080600060a08688031215613e7d57600080fd5b613e8686613e39565b94506020860151613e9681613926565b604087015190945060058110613eab57600080fd5b9250613eb960608701613e55565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613ef657600080fd5b610ab382613e55565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b600080600060608486031215613f4b57600080fd5b83519250613f5b60208501613e55565b9150613f6960408501613e55565b90509250925092565b8082018082111561298257612982613dc1565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600060208284031215613fce57600080fd5b5051919050565b600181811c90821680613fe957607f821691505b60208210810361400957634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461402d81613fd5565b806060860152600182166000811461404c57600181146140685761409c565b60ff1983166080870152608082151560051b870101935061409c565b86600052602060002060005b8381101561409357815488820160800152600190910190602001614074565b87016080019450505b5091979650505050505050565b600082516140bb8184602087016139e9565b9190910192915050565b600080600080600080600060e0888a0312156140e057600080fd5b6140e988613e39565b96506140f760208901613e55565b604089015160608a015160808b015160a08c015193995091975095509350915061412360c08901613e55565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a2257806000526020600020601f840160051c810160208510156141de5750805b601f840160051c820191505b818110156141fe57600081556001016141ea565b5050505050565b6001600160401b0383111561421c5761421c61382d565b6142308361422a8354613fd5565b836141b7565b6000601f841160018114614264576000851561424c5750838201355b600019600387901b1c1916600186901b1783556141fe565b600083815260209020601f19861690835b828110156142955786850135825560209485019460019092019101614275565b50868210156142b25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60006020828403121561430c57600080fd5b8151610ab381613926565b81835260006001600160fb1b0383111561433057600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061435d604083018587614317565b9050826020830152949350505050565b604081526000614381604083018587614317565b82810360208401526143938185613a0d565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205273a7fd5d9b74f6a10c8e8ff9173490991e595b881e9a1f0a7986976eaa245264736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 6613, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6616, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)303" - }, - { - "astId": 6620, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)6552_storage)dyn_storage" - }, - { - "astId": 6624, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6626, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 6634, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 6638, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6640, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)6552_storage)dyn_storage": { - "base": "t_struct(Dispute)6552_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)6590_storage)dyn_storage": { - "base": "t_struct(Round)6590_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)6599_storage)dyn_storage": { - "base": "t_struct(Vote)6599_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)303": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)6552_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 6541, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)6590_storage)dyn_storage" - }, - { - "astId": 6543, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6545, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 6549, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6551, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)6590_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 6556, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)6599_storage)dyn_storage" - }, - { - "astId": 6558, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6562, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6564, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 6566, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6568, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 6572, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6576, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6582, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 6584, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 6587, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 6589, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)6599_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 6592, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6594, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 6596, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 6598, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Proxy.json b/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Proxy.json deleted file mode 100644 index 3b1bf19a4..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xa851c86c0cdd54d7e6b8439188b655cd8676307dc7c4cfa9b831f7b36463498e", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", - "transactionIndex": 1, - "gasUsed": "203799", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000200000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb34e46f2829db2ccafc48071a3a1955eda10f39f57d0d723dc3d0a94951b4e32", - "transactionHash": "0xa851c86c0cdd54d7e6b8439188b655cd8676307dc7c4cfa9b831f7b36463498e", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95247789, - "transactionHash": "0xa851c86c0cdd54d7e6b8439188b655cd8676307dc7c4cfa9b831f7b36463498e", - "address": "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xb34e46f2829db2ccafc48071a3a1955eda10f39f57d0d723dc3d0a94951b4e32" - } - ], - "blockNumber": 95247789, - "cumulativeGasUsed": "203799", - "status": 1, - "byzantium": true - }, - "args": [ - "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212209138e100adbd3fe6a9a3438fe94aa8c15d5a5ba828eefa2eadc87e1958a90b6a64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212209138e100adbd3fe6a9a3438fe94aa8c15d5a5ba828eefa2eadc87e1958a90b6a64736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitGated.json b/contracts/deployments/arbitrumSepolia/DisputeKitGated.json deleted file mode 100644 index a5a30bf5a..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitGated.json +++ /dev/null @@ -1,1238 +0,0 @@ -{ - "address": "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "extraDataToTokenInfo", - "outputs": [ - { - "internalType": "address", - "name": "tokenGate", - "type": "address" - }, - { - "internalType": "bool", - "name": "isERC1155", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xff42b4296deabcf5e0598aae751de91a9bfe74d88f6ed4fe82f4373877356ed2", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", - "transactionIndex": 3, - "gasUsed": "199470", - "logsBloom": "0x00000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000800000000000000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6d6487daca86983ca793f5ef5bc7611b0083f34ce18bcb33c48ef1fc83d076be", - "transactionHash": "0xff42b4296deabcf5e0598aae751de91a9bfe74d88f6ed4fe82f4373877356ed2", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 178241316, - "transactionHash": "0xff42b4296deabcf5e0598aae751de91a9bfe74d88f6ed4fe82f4373877356ed2", - "address": "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x6d6487daca86983ca793f5ef5bc7611b0083f34ce18bcb33c48ef1fc83d076be" - } - ], - "blockNumber": 178241316, - "cumulativeGasUsed": "358154", - "status": 1, - "byzantium": true - }, - "args": [ - "0x074837F8306faD19D4e6b1f3d2f98eA796c3f8a9", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000e8442307d36e9bf6ab27f1a009f95ce8e11c3479" - ], - "numDeployments": 2, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511" - ] - }, - "implementation": "0x2d1b63C9638ed62875256676C665a7ec14D7663C", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter.json b/contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter.json deleted file mode 100644 index 34bb783b7..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter.json +++ /dev/null @@ -1,1312 +0,0 @@ -{ - "address": "0x936231010462458ebaA45dDc422A5940C08a474C", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x437f13f63ba31dedefe7a91e9ec302ea649844a3a1cfcbb5b8c5602c23ae1f3f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x936231010462458ebaA45dDc422A5940C08a474C", - "transactionIndex": 2, - "gasUsed": "199401", - "logsBloom": "0x00000000000000000100000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000400000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa1ce003b84a13937b1dce3f5ceea263df615e82cad05a83eb02b8dd4bc260f6b", - "transactionHash": "0x437f13f63ba31dedefe7a91e9ec302ea649844a3a1cfcbb5b8c5602c23ae1f3f", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 178241338, - "transactionHash": "0x437f13f63ba31dedefe7a91e9ec302ea649844a3a1cfcbb5b8c5602c23ae1f3f", - "address": "0x936231010462458ebaA45dDc422A5940C08a474C", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0xa1ce003b84a13937b1dce3f5ceea263df615e82cad05a83eb02b8dd4bc260f6b" - } - ], - "blockNumber": 178241338, - "cumulativeGasUsed": "339904", - "status": 1, - "byzantium": true - }, - "args": [ - "0xbd64B87c8A1276c0B83042f3F9128f7994753836", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000e8442307d36e9bf6ab27f1a009f95ce8e11c3479" - ], - "numDeployments": 2, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511" - ] - }, - "implementation": "0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Implementation.json b/contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Implementation.json deleted file mode 100644 index 338cd9c0d..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Implementation.json +++ /dev/null @@ -1,1975 +0,0 @@ -{ - "address": "0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xf344ebf59e326184b97eb77140166a463c219e3f519bd3b812594f093850bd60", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7", - "transactionIndex": 2, - "gasUsed": "4143949", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000800000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000800000000000000000000000000000000", - "blockHash": "0xfda1776987479ec0fd4d94e8b6e5693908238e21301d59073a2dca8f41106c90", - "transactionHash": "0xf344ebf59e326184b97eb77140166a463c219e3f519bd3b812594f093850bd60", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 179580680, - "transactionHash": "0xf344ebf59e326184b97eb77140166a463c219e3f519bd3b812594f093850bd60", - "address": "0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 2, - "blockHash": "0xfda1776987479ec0fd4d94e8b6e5693908238e21301d59073a2dca8f41106c90" - } - ], - "blockNumber": 179580680, - "cumulativeGasUsed": "4239598", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"CommitCastShutter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"castCommitShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVoteShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"CommitCastShutter(uint256,address,bytes32,bytes32,bytes)\":{\"details\":\"Emitted when a vote is cast.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_juror\":\"The address of the juror casting the vote commitment.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash including the justification.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encoding\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitGatedShutter Added functionality: shielded voting. Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitGatedShutter.sol\":\"DisputeKitGatedShutter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitGatedShutter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\ninterface IBalanceHolder {\\n /// @dev Returns the number of tokens in `owner` account.\\n /// @dev Compatible with ERC-20 and ERC-721.\\n /// @param owner The address of the owner.\\n /// @return balance The number of tokens in `owner` account.\\n function balanceOf(address owner) external view returns (uint256 balance);\\n}\\n\\ninterface IBalanceHolderERC1155 {\\n /// @dev Returns the balance of an ERC-1155 token.\\n /// @param account The address of the token holder\\n /// @param id ID of the token\\n /// @return The token balance\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\\n/// @title DisputeKitGatedShutter\\n/// Added functionality: shielded voting.\\n/// Dispute kit implementation adapted from DisputeKitClassic\\n/// - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitGatedShutter is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a vote is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _commit The commitment hash.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n event CommitCastShutter(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n bytes32 indexed _commit,\\n bytes32 _identity,\\n bytes _encryptedVote\\n );\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash including the justification.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n function castCommitShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit,\\n bytes32 _identity,\\n bytes calldata _encryptedVote\\n ) external notJumped(_coreDisputeID) {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n emit CommitCastShutter(_coreDisputeID, msg.sender, _commit, _identity, _encryptedVote);\\n }\\n\\n function castVoteShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n address juror = dispute.rounds[dispute.rounds.length - 1].votes[_voteIDs[0]].account;\\n\\n // _castVote() ensures that all the _voteIDs do belong to `juror`\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, juror);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure override returns (bytes32) {\\n bytes32 justificationHash = keccak256(bytes(_justification));\\n return keccak256(abi.encode(_choice, _salt, justificationHash));\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Extracts token gating information from the extra data.\\n /// @param _extraData The extra data bytes array with the following encoding:\\n /// - bytes 0-31: uint96 courtID, not used here\\n /// - bytes 32-63: uint256 minJurors, not used here\\n /// - bytes 64-95: uint256 disputeKitID, not used here\\n /// - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160)\\n /// - bytes 128-159: uint256 tokenId\\n /// @return tokenGate The address of the token contract used for gating access.\\n /// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721.\\n /// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).\\n function _extraDataToTokenInfo(\\n bytes memory _extraData\\n ) internal pure returns (address tokenGate, bool isERC1155, uint256 tokenId) {\\n // Need at least 160 bytes to safely read the parameters\\n if (_extraData.length < 160) return (address(0), false, 0);\\n\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let packedTokenGateIsERC1155 := mload(add(_extraData, 0x80)) // 4th parameter at offset 128\\n tokenId := mload(add(_extraData, 0xA0)) // 5th parameter at offset 160 (moved up)\\n\\n // Unpack address from lower 160 bits and bool from bit 160\\n tokenGate := and(packedTokenGateIsERC1155, 0xffffffffffffffffffffffffffffffffffffffff)\\n isERC1155 := and(shr(160, packedTokenGateIsERC1155), 1)\\n }\\n }\\n\\n /// @inheritdoc DisputeKitClassicBase\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view override returns (bool) {\\n if (!super._postDrawCheck(_round, _coreDisputeID, _juror)) return false;\\n\\n // Get the local dispute and extract token info from extraData\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n (address tokenGate, bool isERC1155, uint256 tokenId) = _extraDataToTokenInfo(dispute.extraData);\\n\\n // If no token gate is specified, allow all jurors\\n if (tokenGate == address(0)) return true;\\n\\n // Check juror's token balance\\n if (isERC1155) {\\n return IBalanceHolderERC1155(tokenGate).balanceOf(_juror, tokenId) > 0;\\n } else {\\n return IBalanceHolder(tokenGate).balanceOf(_juror) > 0;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2b7c8f0af04be5a41d5e0a3a97b359867f6e79eb98da2303d33317fe147faef\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161489e6100fc60003960008181611937015281816119600152611b4f015261489e6000f3fe6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf414610753578063f2f4eb2614610773578063f32ab92714610793578063f7e7d1fd146107c8578063f8abee10146107e8578063fc6f8f161461081857600080fd5b8063be467604146106dd578063c0c53b8b146106f3578063d2b8035a14610713578063da3beb8c14610733578063e349ad30146105c557600080fd5b80638f06f112116100fd5780638f06f1121461061b578063a7cc08fe1461063b578063b34bfaa814610687578063b6ede5401461069d578063ba66fde7146106bd57600080fd5b80636d4cd8ea14610585578063751accd0146105a5578063796490f9146105c55780637c04034e146105db5780638e426460146105fb57600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd1461048a5780635c92e2f6146104cb57806365540b96146104eb578063675926f61461051857806369f3f0411461053857600080fd5b80634b2f0ea0146103e15780634f1ef286146103f457806352d1902d1461040757806354fd4d501461041c578063564a565d1461045b57600080fd5b80631c3db16d1161020e5780631c3db16d1461032a5780631cc3423a146103675780632621b9a2146103875780632d68efc9146103a1578063362c3479146103c157600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102ef575b600080fd5b34801561025757600080fd5b5061026b610266366004613bfc565b610838565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613ca1565b610900565b005b3480156102ae57600080fd5b5061026b6102bd366004613bfc565b6109be565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516102779190613d31565b3480156102fb57600080fd5b5061031c61030a366004613bfc565b60036020526000908152604090205481565b604051908152602001610277565b34801561033657600080fd5b5061034a610345366004613bfc565b610a35565b604080519384529115156020840152151590820152606001610277565b34801561037357600080fd5b5061031c610382366004613def565b610ba3565b34801561039357600080fd5b5060045461026b9060ff1681565b3480156103ad57600080fd5b506007546102e2906001600160a01b031681565b3480156103cd57600080fd5b5061031c6103dc366004613e53565b610be3565b6102a06103ef366004613e90565b611093565b6102a0610402366004613eb2565b611923565b34801561041357600080fd5b5061031c611b42565b34801561042857600080fd5b5061044e604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613f51565b34801561046757600080fd5b5061047b610476366004613bfc565b611ba0565b60405161027793929190613f64565b34801561049657600080fd5b5061026b6104a5366004613f85565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104d757600080fd5b506102a06104e6366004613fbe565b611c66565b3480156104f757600080fd5b5061050b610506366004613bfc565b611c72565b6040516102779190614010565b34801561052457600080fd5b5061031c610533366004614053565b611d36565b34801561054457600080fd5b5061055861055336600461408e565b611e79565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059157600080fd5b5061026b6105a0366004613bfc565b611f31565b3480156105b157600080fd5b506102a06105c03660046140ba565b6120b4565b3480156105d157600080fd5b5061031c61271081565b3480156105e757600080fd5b506102a06105f63660046140fc565b612180565b34801561060757600080fd5b506102a0610616366004614184565b612197565b34801561062757600080fd5b506102a06106363660046140fc565b6121e3565b34801561064757600080fd5b5061065b61065636600461408e565b6122a9565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069357600080fd5b5061031c614e2081565b3480156106a957600080fd5b506102a06106b83660046141a1565b61236f565b3480156106c957600080fd5b5061026b6106d836600461408e565b612562565b3480156106e957600080fd5b5061031c61138881565b3480156106ff57600080fd5b506102a061070e3660046141fb565b6125fd565b34801561071f57600080fd5b506102e261072e366004613e90565b6126c7565b34801561073f57600080fd5b5061031c61074e366004613e90565b612a16565b34801561075f57600080fd5b506102a061076e366004614184565b612b69565b34801561077f57600080fd5b506001546102e2906001600160a01b031681565b34801561079f57600080fd5b506107b36107ae366004613e90565b612bb5565b60408051928352602083019190915201610277565b3480156107d457600080fd5b506102a06107e3366004614184565b612c07565b3480156107f457600080fd5b5061026b610803366004613bfc565b60066020526000908152604090205460ff1681565b34801561082457600080fd5b5061031c610833366004613bfc565b612cd9565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a9919061423b565b9150915060006108b885611c72565b9050805160001480156108f757506127106113886108d68585614275565b6108e09190614288565b6108ea919061429f565b6108f48442614275565b10155b95945050505050565b600087815260036020526040902054600280548992908110610924576109246142c1565b600091825260209091206002600590920201015460ff16156109615760405162461bcd60e51b8152600401610958906142d7565b60405180910390fd5b61096d88888888612d05565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109ac93929190614337565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109e2576109e26142c1565b60009182526020822060059091020180549092508290610a0490600190614275565b81548110610a1457610a146142c1565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6157610a616142c1565b60009182526020822060059091020180549092508290610a8390600190614275565b81548110610a9357610a936142c1565b60009182526020909120600c90910201600381015460ff169450905083610abe578060010154610ac1565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061437d565b5090935060049250610b44915050565b816004811115610b5657610b566143e6565b03610b99576000610b6688611c72565b90508051600103610b975780600081518110610b8457610b846142c1565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c55919061437d565b50935050505080610ca85760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610958565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f91906143fc565b15610d5d5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610958565b60008681526006602052604090205460ff16610d8b5760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110610daf57610daf6142c1565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610de357610de36142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e62919061444e565b5050600087815260078401602052604090205490915060ff16610eac576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ff1565b808603610f21576000868152600683016020526040902054610ecf576000610f1a565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f109190614288565b610f1a919061429f565b9450610ff1565b600081815260078301602052604090205460ff16610ff15781600601600083600a01600181548110610f5557610f556142c1565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f8b57610f8b6142c1565b9060005260206000200154815260200190815260200160002054610faf919061448a565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fe49190614288565b610fee919061429f565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561108757600754611038906001600160a01b038a811691889116613068565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae898960405161107e929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110b7576110b76142c1565b600091825260209091206002600590920201015460ff16156110eb5760405162461bcd60e51b8152600401610958906142d7565b60008381526003602052604081205460028054909190811061110f5761110f6142c1565b9060005260206000209060050201905080600101548311156111735760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610958565b60008481526006602052604090205460ff166111a15760405162461bcd60e51b815260040161095890614417565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611212919061423b565b9150915081421015801561122557508042105b61126a5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610958565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cf919061444e565b505090508681036112e4576127109150611365565b6127106113886112f48686614275565b6112fe9190614288565b611308919061429f565b6113128542614275565b1061135f5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610958565b614e2091505b8454600090869061137890600190614275565b81548110611388576113886142c1565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140b919061449d565b6114159190614275565b60008a815260078401602052604090205490915060ff16156114795760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610958565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e7919061449d565b905060006127106114f88784614288565b611502919061429f565b61150c908361448a565b60008c8152600686016020526040812054919250908211156115bd5760008c815260068601602052604090205434906115459084614275565b1161156a5760008c81526006860160205260409020546115659083614275565b61156c565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115b4929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115e990849061448a565b909155505060008c81526006860160205260408120805483929061160e90849061448a565b909155505060008c815260068601602052604090205482116116e05760008c81526006860160205260408120546009870180549192909161165090849061448a565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118eb578285600901546116fd9190614275565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561174b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176f91906143fc565b156117885760028a01805460ff1916600117905561186b565b895460038b01600061179b87600161448a565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161181691815260200190565b602060405180830381865afa158015611833573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611857919061449d565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118b8939291906144f0565b6000604051808303818588803b1580156118d157600080fd5b505af11580156118e5573d6000803e3d6000fd5b50505050505b80341115611914576119146119008234614275565b6007543391906001600160a01b0316613068565b50505050505050505050505050565b61192c82613153565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661199e6000805160206148498339815191525490565b6001600160a01b031614155b156119c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a22575060408051601f3d908101601f19168201909252611a1f9181019061449d565b60015b611a415781604051630c76093760e01b81526004016109589190613d31565b6000805160206148498339815191528114611a7257604051632a87526960e21b815260048101829052602401610958565b6000805160206148498339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b3d576000836001600160a01b031683604051611ad9919061458a565b600060405180830381855af49150503d8060008114611b14576040519150601f19603f3d011682016040523d82523d6000602084013e611b19565b606091505b5050905080611b3b576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b8d5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061484983398151915290565b60028181548110611bb057600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611be3906144b6565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0f906144b6565b8015611c5c5780601f10611c3157610100808354040283529160200191611c5c565b820191906000526020600020905b815481529060010190602001808311611c3f57829003601f168201915b5050505050905083565b611b3b84848484612d05565b6000818152600360205260408120546002805460609392908110611c9857611c986142c1565b60009182526020822060059091020180549092508290611cba90600190614275565b81548110611cca57611cca6142c1565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d2857602002820191906000526020600020905b815481526020019060010190808311611d14575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d5a57611d5a6142c1565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611d8e57611d8e6142c1565b90600052602060002090600c02016000018681548110611db057611db06142c1565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e32919061444e565b506003850154919350915060ff168015611e5657508183600201541480611e565750805b15611e69576127109450505050506108f7565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611eaa57611eaa6142c1565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ede57611ede6142c1565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f5557611f556142c1565b60009182526020822060059091020180549092508290611f7790600190614275565b81548110611f8757611f876142c1565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611fe2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612006919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612061573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208591906145a6565b505050505091505060008161209b5783546120a1565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120de5760405162461bcd60e51b815260040161095890614612565b6000836001600160a01b031683836040516120f9919061458a565b60006040518083038185875af1925050503d8060008114612136576040519150601f19603f3d011682016040523d82523d6000602084013e61213b565b606091505b5050905080611b3b5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610958565b61218f86868686868633613180565b505050505050565b6000546001600160a01b031633146121c15760405162461bcd60e51b815260040161095890614612565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600086815260036020526040812054600280549091908110612207576122076142c1565b6000918252602082206005909102018054909250829061222990600190614275565b81548110612239576122396142c1565b90600052602060002090600c02016000018787600081811061225d5761225d6142c1565b9050602002013581548110612274576122746142c1565b60009182526020909120600490910201546001600160a01b0316905061229f88888888888887613180565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122d7576122d76142c1565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061230b5761230b6142c1565b90600052602060002090600c0201600001878154811061232d5761232d6142c1565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123995760405162461bcd60e51b815260040161095890614654565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124248587836146e6565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab919061449d565b6124b59190614275565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612550908a908a908a90614337565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612586576125866142c1565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ba576125ba6142c1565b90600052602060002090600c020160000184815481106125dc576125dc6142c1565b600091825260209091206004909102016003015460ff169695505050505050565b600160006126096138b1565b8054909150600160401b900460ff1680612630575080546001600160401b03808416911610155b1561264d5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556126798585856138d5565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146126f45760405162461bcd60e51b815260040161095890614654565b600083815260036020526040902054600280548592908110612718576127186142c1565b600091825260209091206002600590920201015460ff161561274c5760405162461bcd60e51b8152600401610958906142d7565b6000848152600360205260408120546002805491929183908110612772576127726142c1565b600091825260208220600590910201805490925061279290600190614275565b905060008260000182815481106127ab576127ab6142c1565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612810573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283491906147a5565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a7919061437d565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561290b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292f91906147a5565b98506001600160a01b03891661294b5750505050505050612a0f565b612956848c8b61391c565b15612a0257604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a07565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a3a57612a3a6142c1565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a6e57612a6e6142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612acd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af1919061444e565b5091509150826004015460001480612b20575080158015612b2057506000828152600284016020526040902054155b15612b32576000945050505050612b63565b8015612b47575050600401549150612b639050565b506000908152600290910160205260409020549150612b639050565b92915050565b6000546001600160a01b03163314612b935760405162461bcd60e51b815260040161095890614612565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bdb57612bdb6142c1565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c136138b1565b8054909150600160401b900460ff1680612c3a575080546001600160401b03808416911610155b15612c575760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612cee57612cee6142c1565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d2957612d296142c1565b600091825260209091206002600590920201015460ff1615612d5d5760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dcb919061437d565b5090935060019250612ddb915050565b816004811115612ded57612ded6143e6565b14612e4a5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610958565b82612e875760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610958565b60008681526006602052604090205460ff16612eb55760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110612ed957612ed96142c1565b60009182526020822060059091020180549092508290612efb90600190614275565b81548110612f0b57612f0b6142c1565b90600052602060002090600c0201905060005b86811015613001573382898984818110612f3a57612f3a6142c1565b9050602002013581548110612f5157612f516142c1565b60009182526020909120600490910201546001600160a01b031614612fb85760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610958565b8582898984818110612fcc57612fcc6142c1565b9050602002013581548110612fe357612fe36142c1565b60009182526020909120600160049092020181019190915501612f1e565b5086869050816005016000828254613019919061448a565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890613056908b908b908b906147f4565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501561309757505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130d257600080fd5b505af11580156130e6573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561313657600080fd5b505af115801561314a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b0316331461317d5760405162461bcd60e51b815260040161095890614612565b50565b6000878152600360205260409020546002805489929081106131a4576131a46142c1565b600091825260209091206002600590920201015460ff16156131d85760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613222573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613246919061437d565b5090935060029250613256915050565b816004811115613268576132686143e6565b146132c35760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610958565b866133055760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610958565b60008981526006602052604090205460ff166133335760405162461bcd60e51b815260040161095890614417565b600089815260036020526040812054600280549091908110613357576133576142c1565b9060005260206000209060050201905080600101548711156133b25760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610958565b805460009082906133c590600190614275565b815481106133d5576133d56142c1565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061341a908f9060040190815260200190565b60a060405180830381865afa158015613437573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345b919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134da91906145a6565b505050505091505060006134ef8b8b8b610ba3565b905060005b8c811015613776576001600160a01b038916858f8f84818110613519576135196142c1565b9050602002013581548110613530576135306142c1565b60009182526020909120600490910201546001600160a01b0316146135975760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610958565b8215806135de575081858f8f848181106135b3576135b36142c1565b90506020020135815481106135ca576135ca6142c1565b906000526020600020906004020160010154145b61365e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610958565b848e8e83818110613671576136716142c1565b9050602002013581548110613688576136886142c1565b600091825260209091206003600490920201015460ff16156136e15760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610958565b8b858f8f848181106136f5576136f56142c1565b905060200201358154811061370c5761370c6142c1565b60009182526020909120600260049092020101556001858f8f84818110613735576137356142c1565b905060200201358154811061374c5761374c6142c1565b60009182526020909120600490910201600301805460ff19169115159190911790556001016134f4565b5050506004820180548b925060009061379090849061448a565b90915550506000888152600282016020526040812080548b92906137b590849061448a565b9091555050600181015488036137e457600381015460ff16156137df5760038101805460ff191690555b61385d565b60018101546000908152600282016020526040808220548a83529120540361382657600381015460ff166137df5760038101805460ff1916600117905561385d565b60018101546000908152600282016020526040808220548a8352912054111561385d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161389c93929190614818565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138dd613ade565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b6000613929848484613b05565b61393557506000610bdc565b600083815260036020526040812054600280549192918390811061395b5761395b6142c1565b906000526020600020906005020190506000806000613a05846004018054613982906144b6565b80601f01602080910402602001604051908101604052809291908181526020018280546139ae906144b6565b80156139fb5780601f106139d0576101008083540402835291602001916139fb565b820191906000526020600020905b8154815290600101906020018083116139de57829003601f168201915b5050505050613b9d565b919450925090506001600160a01b038316613a2857600195505050505050610bdc565b8115613aaf57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa158015613a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa2919061449d565b1195505050505050610bdc565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613a61908b90600401613d31565b613ae6613be2565b613b0357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613b93576000838152600360205260408120546002805491929183908110613b3957613b396142c1565b6000918252602082206005909102018054909250613b5990600190614275565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610bdc915050565b5060019392505050565b600080600060a084511015613bba57506000915081905080613bdb565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000613bec6138b1565b54600160401b900460ff16919050565b600060208284031215613c0e57600080fd5b5035919050565b60008083601f840112613c2757600080fd5b5081356001600160401b03811115613c3e57600080fd5b6020830191508360208260051b8501011115613c5957600080fd5b9250929050565b60008083601f840112613c7257600080fd5b5081356001600160401b03811115613c8957600080fd5b602083019150836020828501011115613c5957600080fd5b600080600080600080600060a0888a031215613cbc57600080fd5b8735965060208801356001600160401b03811115613cd957600080fd5b613ce58a828b01613c15565b909750955050604088013593506060880135925060808801356001600160401b03811115613d1257600080fd5b613d1e8a828b01613c60565b989b979a50959850939692959293505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613d6c57600080fd5b8135602083016000806001600160401b03841115613d8c57613d8c613d45565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613dba57613dba613d45565b604052838152905080828401871015613dd257600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613e0457600080fd5b833592506020840135915060408401356001600160401b03811115613e2857600080fd5b613e3486828701613d5b565b9150509250925092565b6001600160a01b038116811461317d57600080fd5b60008060008060808587031215613e6957600080fd5b843593506020850135613e7b81613e3e565b93969395505050506040820135916060013590565b60008060408385031215613ea357600080fd5b50508035926020909101359150565b60008060408385031215613ec557600080fd5b8235613ed081613e3e565b915060208301356001600160401b03811115613eeb57600080fd5b613ef785828601613d5b565b9150509250929050565b60005b83811015613f1c578181015183820152602001613f04565b50506000910152565b60008151808452613f3d816020860160208601613f01565b601f01601f19169290920160200192915050565b602081526000610bdc6020830184613f25565b83815282151560208201526060604082015260006108f76060830184613f25565b600080600060608486031215613f9a57600080fd5b83359250602084013591506040840135613fb381613e3e565b809150509250925092565b60008060008060608587031215613fd457600080fd5b8435935060208501356001600160401b03811115613ff157600080fd5b613ffd87828801613c15565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b8181101561404857835183526020938401939092019160010161402a565b509095945050505050565b600080600080600060a0868803121561406b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806000606084860312156140a357600080fd5b505081359360208301359350604090920135919050565b6000806000606084860312156140cf57600080fd5b83356140da81613e3e565b92506020840135915060408401356001600160401b03811115613e2857600080fd5b60008060008060008060a0878903121561411557600080fd5b8635955060208701356001600160401b0381111561413257600080fd5b61413e89828a01613c15565b909650945050604087013592506060870135915060808701356001600160401b0381111561416b57600080fd5b61417789828a01613d5b565b9150509295509295509295565b60006020828403121561419657600080fd5b8135610bdc81613e3e565b6000806000806000608086880312156141b957600080fd5b853594506020860135935060408601356001600160401b038111156141dd57600080fd5b6141e988828901613c60565b96999598509660600135949350505050565b60008060006060848603121561421057600080fd5b833561421b81613e3e565b9250602084013561422b81613e3e565b91506040840135613fb381613e3e565b6000806040838503121561424e57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b6357612b6361425f565b8082028115828204841417612b6357612b6361425f565b6000826142bc57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8381526040602082015260006108f760408301848661430e565b80516001600160601b038116811461436857600080fd5b919050565b8051801515811461436857600080fd5b600080600080600060a0868803121561439557600080fd5b61439e86614351565b945060208601516143ae81613e3e565b6040870151909450600581106143c357600080fd5b92506143d16060870161436d565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561440e57600080fd5b610bdc8261436d565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561446357600080fd5b835192506144736020850161436d565b91506144816040850161436d565b90509250925092565b80820180821115612b6357612b6361425f565b6000602082840312156144af57600080fd5b5051919050565b600181811c908216806144ca57607f821691505b6020821081036144ea57634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461450e816144b6565b806060860152600182166000811461452d57600181146145495761457d565b60ff1983166080870152608082151560051b870101935061457d565b86600052602060002060005b8381101561457457815488820160800152600190910190602001614555565b87016080019450505b5091979650505050505050565b6000825161459c818460208701613f01565b9190910192915050565b600080600080600080600060e0888a0312156145c157600080fd5b6145ca88614351565b96506145d86020890161436d565b604089015160608a015160808b015160a08c015193995091975095509350915061460460c0890161436d565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b3d57806000526020600020601f840160051c810160208510156146bf5750805b601f840160051c820191505b818110156146df57600081556001016146cb565b5050505050565b6001600160401b038311156146fd576146fd613d45565b6147118361470b83546144b6565b83614698565b6000601f841160018114614745576000851561472d5750838201355b600019600387901b1c1916600186901b1783556146df565b600083815260209020601f19861690835b828110156147765786850135825560209485019460019092019101614756565b50868210156147935760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156147b757600080fd5b8151610bdc81613e3e565b81835260006001600160fb1b038311156147db57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006148086040830185876147c2565b9050826020830152949350505050565b60408152600061482c6040830185876147c2565b828103602084015261483e8185613f25565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220cd5d3742f8c0524170b60f04c4a752d412f4c6d549337356905de2b1c28294eb64736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf414610753578063f2f4eb2614610773578063f32ab92714610793578063f7e7d1fd146107c8578063f8abee10146107e8578063fc6f8f161461081857600080fd5b8063be467604146106dd578063c0c53b8b146106f3578063d2b8035a14610713578063da3beb8c14610733578063e349ad30146105c557600080fd5b80638f06f112116100fd5780638f06f1121461061b578063a7cc08fe1461063b578063b34bfaa814610687578063b6ede5401461069d578063ba66fde7146106bd57600080fd5b80636d4cd8ea14610585578063751accd0146105a5578063796490f9146105c55780637c04034e146105db5780638e426460146105fb57600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd1461048a5780635c92e2f6146104cb57806365540b96146104eb578063675926f61461051857806369f3f0411461053857600080fd5b80634b2f0ea0146103e15780634f1ef286146103f457806352d1902d1461040757806354fd4d501461041c578063564a565d1461045b57600080fd5b80631c3db16d1161020e5780631c3db16d1461032a5780631cc3423a146103675780632621b9a2146103875780632d68efc9146103a1578063362c3479146103c157600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102ef575b600080fd5b34801561025757600080fd5b5061026b610266366004613bfc565b610838565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613ca1565b610900565b005b3480156102ae57600080fd5b5061026b6102bd366004613bfc565b6109be565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516102779190613d31565b3480156102fb57600080fd5b5061031c61030a366004613bfc565b60036020526000908152604090205481565b604051908152602001610277565b34801561033657600080fd5b5061034a610345366004613bfc565b610a35565b604080519384529115156020840152151590820152606001610277565b34801561037357600080fd5b5061031c610382366004613def565b610ba3565b34801561039357600080fd5b5060045461026b9060ff1681565b3480156103ad57600080fd5b506007546102e2906001600160a01b031681565b3480156103cd57600080fd5b5061031c6103dc366004613e53565b610be3565b6102a06103ef366004613e90565b611093565b6102a0610402366004613eb2565b611923565b34801561041357600080fd5b5061031c611b42565b34801561042857600080fd5b5061044e604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613f51565b34801561046757600080fd5b5061047b610476366004613bfc565b611ba0565b60405161027793929190613f64565b34801561049657600080fd5b5061026b6104a5366004613f85565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104d757600080fd5b506102a06104e6366004613fbe565b611c66565b3480156104f757600080fd5b5061050b610506366004613bfc565b611c72565b6040516102779190614010565b34801561052457600080fd5b5061031c610533366004614053565b611d36565b34801561054457600080fd5b5061055861055336600461408e565b611e79565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059157600080fd5b5061026b6105a0366004613bfc565b611f31565b3480156105b157600080fd5b506102a06105c03660046140ba565b6120b4565b3480156105d157600080fd5b5061031c61271081565b3480156105e757600080fd5b506102a06105f63660046140fc565b612180565b34801561060757600080fd5b506102a0610616366004614184565b612197565b34801561062757600080fd5b506102a06106363660046140fc565b6121e3565b34801561064757600080fd5b5061065b61065636600461408e565b6122a9565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069357600080fd5b5061031c614e2081565b3480156106a957600080fd5b506102a06106b83660046141a1565b61236f565b3480156106c957600080fd5b5061026b6106d836600461408e565b612562565b3480156106e957600080fd5b5061031c61138881565b3480156106ff57600080fd5b506102a061070e3660046141fb565b6125fd565b34801561071f57600080fd5b506102e261072e366004613e90565b6126c7565b34801561073f57600080fd5b5061031c61074e366004613e90565b612a16565b34801561075f57600080fd5b506102a061076e366004614184565b612b69565b34801561077f57600080fd5b506001546102e2906001600160a01b031681565b34801561079f57600080fd5b506107b36107ae366004613e90565b612bb5565b60408051928352602083019190915201610277565b3480156107d457600080fd5b506102a06107e3366004614184565b612c07565b3480156107f457600080fd5b5061026b610803366004613bfc565b60066020526000908152604090205460ff1681565b34801561082457600080fd5b5061031c610833366004613bfc565b612cd9565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a9919061423b565b9150915060006108b885611c72565b9050805160001480156108f757506127106113886108d68585614275565b6108e09190614288565b6108ea919061429f565b6108f48442614275565b10155b95945050505050565b600087815260036020526040902054600280548992908110610924576109246142c1565b600091825260209091206002600590920201015460ff16156109615760405162461bcd60e51b8152600401610958906142d7565b60405180910390fd5b61096d88888888612d05565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109ac93929190614337565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109e2576109e26142c1565b60009182526020822060059091020180549092508290610a0490600190614275565b81548110610a1457610a146142c1565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6157610a616142c1565b60009182526020822060059091020180549092508290610a8390600190614275565b81548110610a9357610a936142c1565b60009182526020909120600c90910201600381015460ff169450905083610abe578060010154610ac1565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061437d565b5090935060049250610b44915050565b816004811115610b5657610b566143e6565b03610b99576000610b6688611c72565b90508051600103610b975780600081518110610b8457610b846142c1565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c55919061437d565b50935050505080610ca85760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610958565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f91906143fc565b15610d5d5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610958565b60008681526006602052604090205460ff16610d8b5760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110610daf57610daf6142c1565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610de357610de36142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e62919061444e565b5050600087815260078401602052604090205490915060ff16610eac576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ff1565b808603610f21576000868152600683016020526040902054610ecf576000610f1a565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f109190614288565b610f1a919061429f565b9450610ff1565b600081815260078301602052604090205460ff16610ff15781600601600083600a01600181548110610f5557610f556142c1565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f8b57610f8b6142c1565b9060005260206000200154815260200190815260200160002054610faf919061448a565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fe49190614288565b610fee919061429f565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561108757600754611038906001600160a01b038a811691889116613068565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae898960405161107e929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110b7576110b76142c1565b600091825260209091206002600590920201015460ff16156110eb5760405162461bcd60e51b8152600401610958906142d7565b60008381526003602052604081205460028054909190811061110f5761110f6142c1565b9060005260206000209060050201905080600101548311156111735760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610958565b60008481526006602052604090205460ff166111a15760405162461bcd60e51b815260040161095890614417565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611212919061423b565b9150915081421015801561122557508042105b61126a5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610958565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cf919061444e565b505090508681036112e4576127109150611365565b6127106113886112f48686614275565b6112fe9190614288565b611308919061429f565b6113128542614275565b1061135f5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610958565b614e2091505b8454600090869061137890600190614275565b81548110611388576113886142c1565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140b919061449d565b6114159190614275565b60008a815260078401602052604090205490915060ff16156114795760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610958565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e7919061449d565b905060006127106114f88784614288565b611502919061429f565b61150c908361448a565b60008c8152600686016020526040812054919250908211156115bd5760008c815260068601602052604090205434906115459084614275565b1161156a5760008c81526006860160205260409020546115659083614275565b61156c565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115b4929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115e990849061448a565b909155505060008c81526006860160205260408120805483929061160e90849061448a565b909155505060008c815260068601602052604090205482116116e05760008c81526006860160205260408120546009870180549192909161165090849061448a565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118eb578285600901546116fd9190614275565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561174b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176f91906143fc565b156117885760028a01805460ff1916600117905561186b565b895460038b01600061179b87600161448a565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161181691815260200190565b602060405180830381865afa158015611833573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611857919061449d565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118b8939291906144f0565b6000604051808303818588803b1580156118d157600080fd5b505af11580156118e5573d6000803e3d6000fd5b50505050505b80341115611914576119146119008234614275565b6007543391906001600160a01b0316613068565b50505050505050505050505050565b61192c82613153565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661199e6000805160206148498339815191525490565b6001600160a01b031614155b156119c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a22575060408051601f3d908101601f19168201909252611a1f9181019061449d565b60015b611a415781604051630c76093760e01b81526004016109589190613d31565b6000805160206148498339815191528114611a7257604051632a87526960e21b815260048101829052602401610958565b6000805160206148498339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b3d576000836001600160a01b031683604051611ad9919061458a565b600060405180830381855af49150503d8060008114611b14576040519150601f19603f3d011682016040523d82523d6000602084013e611b19565b606091505b5050905080611b3b576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b8d5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061484983398151915290565b60028181548110611bb057600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611be3906144b6565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0f906144b6565b8015611c5c5780601f10611c3157610100808354040283529160200191611c5c565b820191906000526020600020905b815481529060010190602001808311611c3f57829003601f168201915b5050505050905083565b611b3b84848484612d05565b6000818152600360205260408120546002805460609392908110611c9857611c986142c1565b60009182526020822060059091020180549092508290611cba90600190614275565b81548110611cca57611cca6142c1565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d2857602002820191906000526020600020905b815481526020019060010190808311611d14575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d5a57611d5a6142c1565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611d8e57611d8e6142c1565b90600052602060002090600c02016000018681548110611db057611db06142c1565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e32919061444e565b506003850154919350915060ff168015611e5657508183600201541480611e565750805b15611e69576127109450505050506108f7565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611eaa57611eaa6142c1565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ede57611ede6142c1565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f5557611f556142c1565b60009182526020822060059091020180549092508290611f7790600190614275565b81548110611f8757611f876142c1565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611fe2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612006919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612061573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208591906145a6565b505050505091505060008161209b5783546120a1565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120de5760405162461bcd60e51b815260040161095890614612565b6000836001600160a01b031683836040516120f9919061458a565b60006040518083038185875af1925050503d8060008114612136576040519150601f19603f3d011682016040523d82523d6000602084013e61213b565b606091505b5050905080611b3b5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610958565b61218f86868686868633613180565b505050505050565b6000546001600160a01b031633146121c15760405162461bcd60e51b815260040161095890614612565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600086815260036020526040812054600280549091908110612207576122076142c1565b6000918252602082206005909102018054909250829061222990600190614275565b81548110612239576122396142c1565b90600052602060002090600c02016000018787600081811061225d5761225d6142c1565b9050602002013581548110612274576122746142c1565b60009182526020909120600490910201546001600160a01b0316905061229f88888888888887613180565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122d7576122d76142c1565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061230b5761230b6142c1565b90600052602060002090600c0201600001878154811061232d5761232d6142c1565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123995760405162461bcd60e51b815260040161095890614654565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124248587836146e6565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab919061449d565b6124b59190614275565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612550908a908a908a90614337565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612586576125866142c1565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ba576125ba6142c1565b90600052602060002090600c020160000184815481106125dc576125dc6142c1565b600091825260209091206004909102016003015460ff169695505050505050565b600160006126096138b1565b8054909150600160401b900460ff1680612630575080546001600160401b03808416911610155b1561264d5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556126798585856138d5565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146126f45760405162461bcd60e51b815260040161095890614654565b600083815260036020526040902054600280548592908110612718576127186142c1565b600091825260209091206002600590920201015460ff161561274c5760405162461bcd60e51b8152600401610958906142d7565b6000848152600360205260408120546002805491929183908110612772576127726142c1565b600091825260208220600590910201805490925061279290600190614275565b905060008260000182815481106127ab576127ab6142c1565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612810573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283491906147a5565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a7919061437d565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561290b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292f91906147a5565b98506001600160a01b03891661294b5750505050505050612a0f565b612956848c8b61391c565b15612a0257604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a07565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a3a57612a3a6142c1565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a6e57612a6e6142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612acd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af1919061444e565b5091509150826004015460001480612b20575080158015612b2057506000828152600284016020526040902054155b15612b32576000945050505050612b63565b8015612b47575050600401549150612b639050565b506000908152600290910160205260409020549150612b639050565b92915050565b6000546001600160a01b03163314612b935760405162461bcd60e51b815260040161095890614612565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bdb57612bdb6142c1565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c136138b1565b8054909150600160401b900460ff1680612c3a575080546001600160401b03808416911610155b15612c575760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612cee57612cee6142c1565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d2957612d296142c1565b600091825260209091206002600590920201015460ff1615612d5d5760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dcb919061437d565b5090935060019250612ddb915050565b816004811115612ded57612ded6143e6565b14612e4a5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610958565b82612e875760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610958565b60008681526006602052604090205460ff16612eb55760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110612ed957612ed96142c1565b60009182526020822060059091020180549092508290612efb90600190614275565b81548110612f0b57612f0b6142c1565b90600052602060002090600c0201905060005b86811015613001573382898984818110612f3a57612f3a6142c1565b9050602002013581548110612f5157612f516142c1565b60009182526020909120600490910201546001600160a01b031614612fb85760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610958565b8582898984818110612fcc57612fcc6142c1565b9050602002013581548110612fe357612fe36142c1565b60009182526020909120600160049092020181019190915501612f1e565b5086869050816005016000828254613019919061448a565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890613056908b908b908b906147f4565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501561309757505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130d257600080fd5b505af11580156130e6573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561313657600080fd5b505af115801561314a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b0316331461317d5760405162461bcd60e51b815260040161095890614612565b50565b6000878152600360205260409020546002805489929081106131a4576131a46142c1565b600091825260209091206002600590920201015460ff16156131d85760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613222573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613246919061437d565b5090935060029250613256915050565b816004811115613268576132686143e6565b146132c35760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610958565b866133055760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610958565b60008981526006602052604090205460ff166133335760405162461bcd60e51b815260040161095890614417565b600089815260036020526040812054600280549091908110613357576133576142c1565b9060005260206000209060050201905080600101548711156133b25760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610958565b805460009082906133c590600190614275565b815481106133d5576133d56142c1565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061341a908f9060040190815260200190565b60a060405180830381865afa158015613437573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345b919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134da91906145a6565b505050505091505060006134ef8b8b8b610ba3565b905060005b8c811015613776576001600160a01b038916858f8f84818110613519576135196142c1565b9050602002013581548110613530576135306142c1565b60009182526020909120600490910201546001600160a01b0316146135975760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610958565b8215806135de575081858f8f848181106135b3576135b36142c1565b90506020020135815481106135ca576135ca6142c1565b906000526020600020906004020160010154145b61365e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610958565b848e8e83818110613671576136716142c1565b9050602002013581548110613688576136886142c1565b600091825260209091206003600490920201015460ff16156136e15760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610958565b8b858f8f848181106136f5576136f56142c1565b905060200201358154811061370c5761370c6142c1565b60009182526020909120600260049092020101556001858f8f84818110613735576137356142c1565b905060200201358154811061374c5761374c6142c1565b60009182526020909120600490910201600301805460ff19169115159190911790556001016134f4565b5050506004820180548b925060009061379090849061448a565b90915550506000888152600282016020526040812080548b92906137b590849061448a565b9091555050600181015488036137e457600381015460ff16156137df5760038101805460ff191690555b61385d565b60018101546000908152600282016020526040808220548a83529120540361382657600381015460ff166137df5760038101805460ff1916600117905561385d565b60018101546000908152600282016020526040808220548a8352912054111561385d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161389c93929190614818565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138dd613ade565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b6000613929848484613b05565b61393557506000610bdc565b600083815260036020526040812054600280549192918390811061395b5761395b6142c1565b906000526020600020906005020190506000806000613a05846004018054613982906144b6565b80601f01602080910402602001604051908101604052809291908181526020018280546139ae906144b6565b80156139fb5780601f106139d0576101008083540402835291602001916139fb565b820191906000526020600020905b8154815290600101906020018083116139de57829003601f168201915b5050505050613b9d565b919450925090506001600160a01b038316613a2857600195505050505050610bdc565b8115613aaf57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa158015613a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa2919061449d565b1195505050505050610bdc565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613a61908b90600401613d31565b613ae6613be2565b613b0357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613b93576000838152600360205260408120546002805491929183908110613b3957613b396142c1565b6000918252602082206005909102018054909250613b5990600190614275565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610bdc915050565b5060019392505050565b600080600060a084511015613bba57506000915081905080613bdb565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000613bec6138b1565b54600160401b900460ff16919050565b600060208284031215613c0e57600080fd5b5035919050565b60008083601f840112613c2757600080fd5b5081356001600160401b03811115613c3e57600080fd5b6020830191508360208260051b8501011115613c5957600080fd5b9250929050565b60008083601f840112613c7257600080fd5b5081356001600160401b03811115613c8957600080fd5b602083019150836020828501011115613c5957600080fd5b600080600080600080600060a0888a031215613cbc57600080fd5b8735965060208801356001600160401b03811115613cd957600080fd5b613ce58a828b01613c15565b909750955050604088013593506060880135925060808801356001600160401b03811115613d1257600080fd5b613d1e8a828b01613c60565b989b979a50959850939692959293505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613d6c57600080fd5b8135602083016000806001600160401b03841115613d8c57613d8c613d45565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613dba57613dba613d45565b604052838152905080828401871015613dd257600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613e0457600080fd5b833592506020840135915060408401356001600160401b03811115613e2857600080fd5b613e3486828701613d5b565b9150509250925092565b6001600160a01b038116811461317d57600080fd5b60008060008060808587031215613e6957600080fd5b843593506020850135613e7b81613e3e565b93969395505050506040820135916060013590565b60008060408385031215613ea357600080fd5b50508035926020909101359150565b60008060408385031215613ec557600080fd5b8235613ed081613e3e565b915060208301356001600160401b03811115613eeb57600080fd5b613ef785828601613d5b565b9150509250929050565b60005b83811015613f1c578181015183820152602001613f04565b50506000910152565b60008151808452613f3d816020860160208601613f01565b601f01601f19169290920160200192915050565b602081526000610bdc6020830184613f25565b83815282151560208201526060604082015260006108f76060830184613f25565b600080600060608486031215613f9a57600080fd5b83359250602084013591506040840135613fb381613e3e565b809150509250925092565b60008060008060608587031215613fd457600080fd5b8435935060208501356001600160401b03811115613ff157600080fd5b613ffd87828801613c15565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b8181101561404857835183526020938401939092019160010161402a565b509095945050505050565b600080600080600060a0868803121561406b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806000606084860312156140a357600080fd5b505081359360208301359350604090920135919050565b6000806000606084860312156140cf57600080fd5b83356140da81613e3e565b92506020840135915060408401356001600160401b03811115613e2857600080fd5b60008060008060008060a0878903121561411557600080fd5b8635955060208701356001600160401b0381111561413257600080fd5b61413e89828a01613c15565b909650945050604087013592506060870135915060808701356001600160401b0381111561416b57600080fd5b61417789828a01613d5b565b9150509295509295509295565b60006020828403121561419657600080fd5b8135610bdc81613e3e565b6000806000806000608086880312156141b957600080fd5b853594506020860135935060408601356001600160401b038111156141dd57600080fd5b6141e988828901613c60565b96999598509660600135949350505050565b60008060006060848603121561421057600080fd5b833561421b81613e3e565b9250602084013561422b81613e3e565b91506040840135613fb381613e3e565b6000806040838503121561424e57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b6357612b6361425f565b8082028115828204841417612b6357612b6361425f565b6000826142bc57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8381526040602082015260006108f760408301848661430e565b80516001600160601b038116811461436857600080fd5b919050565b8051801515811461436857600080fd5b600080600080600060a0868803121561439557600080fd5b61439e86614351565b945060208601516143ae81613e3e565b6040870151909450600581106143c357600080fd5b92506143d16060870161436d565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561440e57600080fd5b610bdc8261436d565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561446357600080fd5b835192506144736020850161436d565b91506144816040850161436d565b90509250925092565b80820180821115612b6357612b6361425f565b6000602082840312156144af57600080fd5b5051919050565b600181811c908216806144ca57607f821691505b6020821081036144ea57634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461450e816144b6565b806060860152600182166000811461452d57600181146145495761457d565b60ff1983166080870152608082151560051b870101935061457d565b86600052602060002060005b8381101561457457815488820160800152600190910190602001614555565b87016080019450505b5091979650505050505050565b6000825161459c818460208701613f01565b9190910192915050565b600080600080600080600060e0888a0312156145c157600080fd5b6145ca88614351565b96506145d86020890161436d565b604089015160608a015160808b015160a08c015193995091975095509350915061460460c0890161436d565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b3d57806000526020600020601f840160051c810160208510156146bf5750805b601f840160051c820191505b818110156146df57600081556001016146cb565b5050505050565b6001600160401b038311156146fd576146fd613d45565b6147118361470b83546144b6565b83614698565b6000601f841160018114614745576000851561472d5750838201355b600019600387901b1c1916600186901b1783556146df565b600083815260209020601f19861690835b828110156147765786850135825560209485019460019092019101614756565b50868210156147935760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156147b757600080fd5b8151610bdc81613e3e565b81835260006001600160fb1b038311156147db57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006148086040830185876147c2565b9050826020830152949350505050565b60408152600061482c6040830185876147c2565b828103602084015261483e8185613f25565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220cd5d3742f8c0524170b60f04c4a752d412f4c6d549337356905de2b1c28294eb64736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "CommitCastShutter(uint256,address,bytes32,bytes32,bytes)": { - "details": "Emitted when a vote is cast.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_juror": "The address of the juror casting the vote commitment." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash including the justification.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encoding", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitGatedShutter Added functionality: shielded voting. Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 6613, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6616, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)303" - }, - { - "astId": 6620, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)6552_storage)dyn_storage" - }, - { - "astId": 6624, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6626, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 6634, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 6638, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6640, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)6552_storage)dyn_storage": { - "base": "t_struct(Dispute)6552_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)6590_storage)dyn_storage": { - "base": "t_struct(Round)6590_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)6599_storage)dyn_storage": { - "base": "t_struct(Vote)6599_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)303": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)6552_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 6541, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)6590_storage)dyn_storage" - }, - { - "astId": 6543, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6545, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 6549, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6551, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)6590_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 6556, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)6599_storage)dyn_storage" - }, - { - "astId": 6558, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6562, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6564, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 6566, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6568, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 6572, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6576, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6582, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 6584, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 6587, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 6589, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)6599_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 6592, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6594, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 6596, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 6598, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Proxy.json b/contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Proxy.json deleted file mode 100644 index 48a45a61b..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x936231010462458ebaA45dDc422A5940C08a474C", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x437f13f63ba31dedefe7a91e9ec302ea649844a3a1cfcbb5b8c5602c23ae1f3f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x936231010462458ebaA45dDc422A5940C08a474C", - "transactionIndex": 2, - "gasUsed": "199401", - "logsBloom": "0x00000000000000000100000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000400000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa1ce003b84a13937b1dce3f5ceea263df615e82cad05a83eb02b8dd4bc260f6b", - "transactionHash": "0x437f13f63ba31dedefe7a91e9ec302ea649844a3a1cfcbb5b8c5602c23ae1f3f", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 178241338, - "transactionHash": "0x437f13f63ba31dedefe7a91e9ec302ea649844a3a1cfcbb5b8c5602c23ae1f3f", - "address": "0x936231010462458ebaA45dDc422A5940C08a474C", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0xa1ce003b84a13937b1dce3f5ceea263df615e82cad05a83eb02b8dd4bc260f6b" - } - ], - "blockNumber": 178241338, - "cumulativeGasUsed": "339904", - "status": 1, - "byzantium": true - }, - "args": [ - "0xbd64B87c8A1276c0B83042f3F9128f7994753836", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000e8442307d36e9bf6ab27f1a009f95ce8e11c3479" - ], - "numDeployments": 1, - "solcInputHash": "74873d15f43e245d08be76d8560e80d9", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitGated_Implementation.json b/contracts/deployments/arbitrumSepolia/DisputeKitGated_Implementation.json deleted file mode 100644 index d8dee084e..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitGated_Implementation.json +++ /dev/null @@ -1,1892 +0,0 @@ -{ - "address": "0x2d1b63C9638ed62875256676C665a7ec14D7663C", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "extraDataToTokenInfo", - "outputs": [ - { - "internalType": "address", - "name": "tokenGate", - "type": "address" - }, - { - "internalType": "bool", - "name": "isERC1155", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x8ebd962a6af0559b118618288524e350870717540e1f5d9da1af03b66cb5502f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x2d1b63C9638ed62875256676C665a7ec14D7663C", - "transactionIndex": 3, - "gasUsed": "4030479", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004020000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x07398b278c6600e2c45ecf2c8d71cf13f6e091728accedf42af22f56f9051e3d", - "transactionHash": "0x8ebd962a6af0559b118618288524e350870717540e1f5d9da1af03b66cb5502f", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 179580643, - "transactionHash": "0x8ebd962a6af0559b118618288524e350870717540e1f5d9da1af03b66cb5502f", - "address": "0x2d1b63C9638ed62875256676C665a7ec14D7663C", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 2, - "blockHash": "0x07398b278c6600e2c45ecf2c8d71cf13f6e091728accedf42af22f56f9051e3d" - } - ], - "blockNumber": 179580643, - "cumulativeGasUsed": "4456833", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"extraDataToTokenInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"tokenGate\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isERC1155\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"extraDataToTokenInfo(bytes)\":{\"details\":\"Extracts token gating information from the extra data.\",\"params\":{\"_extraData\":\"The extra data bytes array with the following encoding: - bytes 0-31: uint96 courtID, not used here - bytes 32-63: uint256 minJurors, not used here - bytes 64-95: uint256 disputeKitID, not used here - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160) - bytes 128-159: uint256 tokenId\"},\"returns\":{\"isERC1155\":\"True if the token is an ERC-1155, false for ERC-20/ERC-721.\",\"tokenGate\":\"The address of the token contract used for gating access.\",\"tokenId\":\"The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitGated Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitGated.sol\":\"DisputeKitGated\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitGated.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\ninterface IBalanceHolder {\\n /// @dev Returns the number of tokens in `owner` account.\\n /// @dev Compatible with ERC-20 and ERC-721.\\n /// @param owner The address of the owner.\\n /// @return balance The number of tokens in `owner` account.\\n function balanceOf(address owner) external view returns (uint256 balance);\\n}\\n\\ninterface IBalanceHolderERC1155 {\\n /// @dev Returns the balance of an ERC-1155 token.\\n /// @param account The address of the token holder\\n /// @param id ID of the token\\n /// @return The token balance\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\\n/// @title DisputeKitGated\\n/// Dispute kit implementation adapted from DisputeKitClassic\\n/// - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitGated is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Extracts token gating information from the extra data.\\n /// @param _extraData The extra data bytes array with the following encoding:\\n /// - bytes 0-31: uint96 courtID, not used here\\n /// - bytes 32-63: uint256 minJurors, not used here\\n /// - bytes 64-95: uint256 disputeKitID, not used here\\n /// - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160)\\n /// - bytes 128-159: uint256 tokenId\\n /// @return tokenGate The address of the token contract used for gating access.\\n /// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721.\\n /// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).\\n function extraDataToTokenInfo(\\n bytes memory _extraData\\n ) public pure returns (address tokenGate, bool isERC1155, uint256 tokenId) {\\n // Need at least 160 bytes to safely read the parameters\\n if (_extraData.length < 160) return (address(0), false, 0);\\n\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let packedTokenGateIsERC1155 := mload(add(_extraData, 0x80)) // 4th parameter at offset 128\\n tokenId := mload(add(_extraData, 0xA0)) // 5th parameter at offset 160 (moved up)\\n\\n // Unpack address from lower 160 bits and bool from bit 160\\n tokenGate := and(packedTokenGateIsERC1155, 0xffffffffffffffffffffffffffffffffffffffff)\\n isERC1155 := and(shr(160, packedTokenGateIsERC1155), 1)\\n }\\n }\\n\\n /// @inheritdoc DisputeKitClassicBase\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view override returns (bool) {\\n if (!super._postDrawCheck(_round, _coreDisputeID, _juror)) return false;\\n\\n // Get the local dispute and extract token info from extraData\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n (address tokenGate, bool isERC1155, uint256 tokenId) = extraDataToTokenInfo(dispute.extraData);\\n\\n // If no token gate is specified, allow all jurors\\n if (tokenGate == address(0)) return true;\\n\\n // Check juror's token balance\\n if (isERC1155) {\\n return IBalanceHolderERC1155(tokenGate).balanceOf(_juror, tokenId) > 0;\\n } else {\\n return IBalanceHolder(tokenGate).balanceOf(_juror) > 0;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x449beea4cdeceb81cfc053987fd39c2f552fe3f5da03384c623b167f91f9307b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516146966100fc60003960008181611868015281816118910152611a8001526146966000f3fe60806040526004361061023b5760003560e01c8063751accd01161012e578063d2b8035a116100ab578063f2f4eb261161006f578063f2f4eb261461076d578063f32ab9271461078d578063f7e7d1fd146107c2578063f8abee10146107e2578063fc6f8f161461081257600080fd5b8063d2b8035a146106c8578063da3beb8c146106e8578063e349ad301461059a578063e4c0aaf414610708578063ec7b23fb1461072857600080fd5b8063b34bfaa8116100f2578063b34bfaa81461063c578063b6ede54014610652578063ba66fde714610672578063be46760414610692578063c0c53b8b146106a857600080fd5b8063751accd01461057a578063796490f91461059a5780637c04034e146105b05780638e426460146105d0578063a7cc08fe146105f057600080fd5b80634f1ef286116101bc5780635c92e2f6116101805780635c92e2f6146104a057806365540b96146104c0578063675926f6146104ed57806369f3f0411461050d5780636d4cd8ea1461055a57600080fd5b80634f1ef286146103c957806352d1902d146103dc57806354fd4d50146103f1578063564a565d146104305780635a155ccd1461045f57600080fd5b80631cc3423a116102035780631cc3423a1461033a5780632621b9a21461035a5780632d68efc914610374578063362c3479146103945780634b2f0ea0146103b457600080fd5b80630855bbe9146102405780630baa64d1146102755780630c340a24146102955780631200aabc146102c25780631c3db16d146102fd575b600080fd5b34801561024c57600080fd5b5061026061025b366004613a67565b610832565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b50610260610290366004613a67565b6108fa565b3480156102a157600080fd5b506000546102b5906001600160a01b031681565b60405161026c9190613a80565b3480156102ce57600080fd5b506102ef6102dd366004613a67565b60036020526000908152604090205481565b60405190815260200161026c565b34801561030957600080fd5b5061031d610318366004613a67565b610971565b60408051938452911515602084015215159082015260600161026c565b34801561034657600080fd5b506102ef610355366004613b3e565b610adf565b34801561036657600080fd5b506004546102609060ff1681565b34801561038057600080fd5b506007546102b5906001600160a01b031681565b3480156103a057600080fd5b506102ef6103af366004613ba2565b610b0f565b6103c76103c2366004613bdf565b610fc4565b005b6103c76103d7366004613c01565b611854565b3480156103e857600080fd5b506102ef611a73565b3480156103fd57600080fd5b50610423604051806040016040528060068152602001650302e31322e360d41b81525081565b60405161026c9190613ca0565b34801561043c57600080fd5b5061045061044b366004613a67565b611ad1565b60405161026c93929190613cb3565b34801561046b57600080fd5b5061026061047a366004613cd4565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104ac57600080fd5b506103c76104bb366004613d58565b611b97565b3480156104cc57600080fd5b506104e06104db366004613a67565b611ba3565b60405161026c9190613daa565b3480156104f957600080fd5b506102ef610508366004613ded565b611c67565b34801561051957600080fd5b5061052d610528366004613e28565b611daa565b604080519687529415156020870152938501929092526060840152608083015260a082015260c00161026c565b34801561056657600080fd5b50610260610575366004613a67565b611e62565b34801561058657600080fd5b506103c7610595366004613e54565b611fe5565b3480156105a657600080fd5b506102ef61271081565b3480156105bc57600080fd5b506103c76105cb366004613e96565b6120b1565b3480156105dc57600080fd5b506103c76105eb366004613f1e565b6120c8565b3480156105fc57600080fd5b5061061061060b366004613e28565b612114565b604080516001600160a01b0390951685526020850193909352918301521515606082015260800161026c565b34801561064857600080fd5b506102ef614e2081565b34801561065e57600080fd5b506103c761066d366004613f3b565b6121da565b34801561067e57600080fd5b5061026061068d366004613e28565b6123cd565b34801561069e57600080fd5b506102ef61138881565b3480156106b457600080fd5b506103c76106c3366004613fc4565b612468565b3480156106d457600080fd5b506102b56106e3366004613bdf565b612532565b3480156106f457600080fd5b506102ef610703366004613bdf565b612881565b34801561071457600080fd5b506103c7610723366004613f1e565b6129d4565b34801561073457600080fd5b50610748610743366004614004565b612a20565b604080516001600160a01b03909416845291151560208401529082015260600161026c565b34801561077957600080fd5b506001546102b5906001600160a01b031681565b34801561079957600080fd5b506107ad6107a8366004613bdf565b612a65565b6040805192835260208301919091520161026c565b3480156107ce57600080fd5b506103c76107dd366004613f1e565b612ab7565b3480156107ee57600080fd5b506102606107fd366004613a67565b60066020526000908152604090205460ff1681565b34801561081e57600080fd5b506102ef61082d366004613a67565b612b89565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190614040565b9150915060006108b285611ba3565b9050805160001480156108f157506127106113886108d0858561407a565b6108da919061408d565b6108e491906140a4565b6108ee844261407a565b10155b95945050505050565b60008181526003602052604081205460028054839290811061091e5761091e6140c6565b600091825260208220600590910201805490925082906109409060019061407a565b81548110610950576109506140c6565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061099d5761099d6140c6565b600091825260208220600590910201805490925082906109bf9060019061407a565b815481106109cf576109cf6140c6565b60009182526020909120600c90910201600381015460ff1694509050836109fa5780600101546109fd565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190614108565b5090935060049250610a80915050565b816004811115610a9257610a92614171565b03610ad5576000610aa288611ba3565b90508051600103610ad35780600081518110610ac057610ac06140c6565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b819190614108565b50935050505080610bd95760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c509190614187565b15610c8e5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610bd0565b60008681526006602052604090205460ff16610cbc5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110610ce057610ce06140c6565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610d1457610d146140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9391906141d9565b5050600087815260078401602052604090205490915060ff16610ddd576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610f22565b808603610e52576000868152600683016020526040902054610e00576000610e4b565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610e41919061408d565b610e4b91906140a4565b9450610f22565b600081815260078301602052604090205460ff16610f225781600601600083600a01600181548110610e8657610e866140c6565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610ebc57610ebc6140c6565b9060005260206000200154815260200190815260200160002054610ee09190614215565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610f15919061408d565b610f1f91906140a4565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610fb857600754610f69906001600160a01b038a811691889116612bb5565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610faf929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610fe857610fe86140c6565b600091825260209091206002600590920201015460ff161561101c5760405162461bcd60e51b8152600401610bd090614228565b600083815260036020526040812054600280549091908110611040576110406140c6565b9060005260206000209060050201905080600101548311156110a45760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610bd0565b60008481526006602052604090205460ff166110d25760405162461bcd60e51b8152600401610bd0906141a2565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa15801561111f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111439190614040565b9150915081421015801561115657508042105b61119b5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610bd0565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156111dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120091906141d9565b50509050868103611215576127109150611296565b612710611388611225868661407a565b61122f919061408d565b61123991906140a4565b611243854261407a565b106112905760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610bd0565b614e2091505b845460009086906112a99060019061407a565b815481106112b9576112b96140c6565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c919061425f565b611346919061407a565b60008a815260078401602052604090205490915060ff16156113aa5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610bd0565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156113f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611418919061425f565b90506000612710611429878461408d565b61143391906140a4565b61143d9083614215565b60008c8152600686016020526040812054919250908211156114ee5760008c81526006860160205260409020543490611476908461407a565b1161149b5760008c8152600686016020526040902054611496908361407a565b61149d565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516114e5929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061151a908490614215565b909155505060008c81526006860160205260408120805483929061153f908490614215565b909155505060008c815260068601602052604090205482116116115760008c815260068601602052604081205460098701805491929091611581908490614215565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a8501546001101561181c5782856009015461162e919061407a565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190614187565b156116b95760028a01805460ff1916600117905561179c565b895460038b0160006116cc876001614215565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161174791815260200190565b602060405180830381865afa158015611764573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611788919061425f565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117e9939291906142b2565b6000604051808303818588803b15801561180257600080fd5b505af1158015611816573d6000803e3d6000fd5b50505050505b8034111561184557611845611831823461407a565b6007543391906001600160a01b0316612bb5565b50505050505050505050505050565b61185d82612ca0565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806118db57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166118cf6000805160206146418339815191525490565b6001600160a01b031614155b156118f95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611953575060408051601f3d908101601f191682019092526119509181019061425f565b60015b6119725781604051630c76093760e01b8152600401610bd09190613a80565b60008051602061464183398151915281146119a357604051632a87526960e21b815260048101829052602401610bd0565b6000805160206146418339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a6e576000836001600160a01b031683604051611a0a919061434c565b600060405180830381855af49150503d8060008114611a45576040519150601f19603f3d011682016040523d82523d6000602084013e611a4a565b606091505b5050905080611a6c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611abe5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464183398151915290565b60028181548110611ae157600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611b1490614278565b80601f0160208091040260200160405190810160405280929190818152602001828054611b4090614278565b8015611b8d5780601f10611b6257610100808354040283529160200191611b8d565b820191906000526020600020905b815481529060010190602001808311611b7057829003601f168201915b5050505050905083565b611a6c84848484612ccd565b6000818152600360205260408120546002805460609392908110611bc957611bc96140c6565b60009182526020822060059091020180549092508290611beb9060019061407a565b81548110611bfb57611bfb6140c6565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c5957602002820191906000526020600020905b815481526020019060010190808311611c45575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c8b57611c8b6140c6565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611cbf57611cbf6140c6565b90600052602060002090600c02016000018681548110611ce157611ce16140c6565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6391906141d9565b506003850154919350915060ff168015611d8757508183600201541480611d875750805b15611d9a576127109450505050506108f1565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ddb57611ddb6140c6565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e0f57611e0f6140c6565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e8657611e866140c6565b60009182526020822060059091020180549092508290611ea89060019061407a565b81548110611eb857611eb86140c6565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611f13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f379190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb69190614368565b5050505050915050600081611fcc578354611fd2565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b0316331461200f5760405162461bcd60e51b8152600401610bd0906143d4565b6000836001600160a01b0316838360405161202a919061434c565b60006040518083038185875af1925050503d8060008114612067576040519150601f19603f3d011682016040523d82523d6000602084013e61206c565b606091505b5050905080611a6c5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610bd0565b6120c086868686868633613030565b505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b8152600401610bd0906143d4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612142576121426140c6565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612176576121766140c6565b90600052602060002090600c02016000018781548110612198576121986140c6565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146122045760405162461bcd60e51b8152600401610bd090614416565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161228f8587836144a8565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612316919061425f565b612320919061407a565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108906123bb908a908a908a90614567565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123f1576123f16140c6565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612425576124256140c6565b90600052602060002090600c02016000018481548110612447576124476140c6565b600091825260209091206004909102016003015460ff169695505050505050565b60016000612474613761565b8054909150600160401b900460ff168061249b575080546001600160401b03808416911610155b156124b85760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124e4858585613785565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b0316331461255f5760405162461bcd60e51b8152600401610bd090614416565b600083815260036020526040902054600280548592908110612583576125836140c6565b600091825260209091206002600590920201015460ff16156125b75760405162461bcd60e51b8152600401610bd090614228565b60008481526003602052604081205460028054919291839081106125dd576125dd6140c6565b60009182526020822060059091020180549092506125fd9060019061407a565b90506000826000018281548110612616576126166140c6565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f919061459d565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127129190614108565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061279a919061459d565b98506001600160a01b0389166127b6575050505050505061287a565b6127c1848c8b6137cc565b1561286d57604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612872565b600098505b505050505050505b5092915050565b6000828152600360205260408120546002805483929081106128a5576128a56140c6565b600091825260208083208684526003600590930201918201905260408220548154919350839181106128d9576128d96140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295c91906141d9565b509150915082600401546000148061298b57508015801561298b57506000828152600284016020526040902054155b1561299d5760009450505050506129ce565b80156129b25750506004015491506129ce9050565b5060009081526002909101602052604090205491506129ce9050565b92915050565b6000546001600160a01b031633146129fe5760405162461bcd60e51b8152600401610bd0906143d4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600060a084511015612a3d57506000915081905080612a5e565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000828152600360205260408120546002805491929183908110612a8b57612a8b6140c6565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612ac3613761565b8054909150600160401b900460ff1680612aea575080546001600160401b03808416911610155b15612b075760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b9e57612b9e6140c6565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612be457505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612c1f57600080fd5b505af1158015612c33573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612c8357600080fd5b505af1158015612c97573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612cca5760405162461bcd60e51b8152600401610bd0906143d4565b50565b600084815260036020526040902054600280548692908110612cf157612cf16140c6565b600091825260209091206002600590920201015460ff1615612d255760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d939190614108565b5090935060019250612da3915050565b816004811115612db557612db5614171565b14612e125760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610bd0565b82612e4f5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610bd0565b60008681526006602052604090205460ff16612e7d5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110612ea157612ea16140c6565b60009182526020822060059091020180549092508290612ec39060019061407a565b81548110612ed357612ed36140c6565b90600052602060002090600c0201905060005b86811015612fc9573382898984818110612f0257612f026140c6565b9050602002013581548110612f1957612f196140c6565b60009182526020909120600490910201546001600160a01b031614612f805760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610bd0565b8582898984818110612f9457612f946140c6565b9050602002013581548110612fab57612fab6140c6565b60009182526020909120600160049092020181019190915501612ee6565b5086869050816005016000828254612fe19190614215565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061301e908b908b908b906145ec565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110613054576130546140c6565b600091825260209091206002600590920201015460ff16156130885760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa1580156130d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f69190614108565b5090935060029250613106915050565b81600481111561311857613118614171565b146131735760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610bd0565b866131b55760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610bd0565b60008981526006602052604090205460ff166131e35760405162461bcd60e51b8152600401610bd0906141a2565b600089815260036020526040812054600280549091908110613207576132076140c6565b9060005260206000209060050201905080600101548711156132625760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610bd0565b805460009082906132759060019061407a565b81548110613285576132856140c6565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d906132ca908f9060040190815260200190565b60a060405180830381865afa1580156132e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061330b9190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015613366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061338a9190614368565b5050505050915050600061339f8b8b8b610adf565b905060005b8c811015613626576001600160a01b038916858f8f848181106133c9576133c96140c6565b90506020020135815481106133e0576133e06140c6565b60009182526020909120600490910201546001600160a01b0316146134475760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610bd0565b82158061348e575081858f8f84818110613463576134636140c6565b905060200201358154811061347a5761347a6140c6565b906000526020600020906004020160010154145b61350e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610bd0565b848e8e83818110613521576135216140c6565b9050602002013581548110613538576135386140c6565b600091825260209091206003600490920201015460ff16156135915760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610bd0565b8b858f8f848181106135a5576135a56140c6565b90506020020135815481106135bc576135bc6140c6565b60009182526020909120600260049092020101556001858f8f848181106135e5576135e56140c6565b90506020020135815481106135fc576135fc6140c6565b60009182526020909120600490910201600301805460ff19169115159190911790556001016133a4565b5050506004820180548b9250600090613640908490614215565b90915550506000888152600282016020526040812080548b9290613665908490614215565b90915550506001810154880361369457600381015460ff161561368f5760038101805460ff191690555b61370d565b60018101546000908152600282016020526040808220548a8352912054036136d657600381015460ff1661368f5760038101805460ff1916600117905561370d565b60018101546000908152600282016020526040808220548a8352912054111561370d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161374c93929190614610565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61378d61398e565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60006137d98484846139b5565b6137e557506000610b08565b600083815260036020526040812054600280549192918390811061380b5761380b6140c6565b9060005260206000209060050201905060008060006138b584600401805461383290614278565b80601f016020809104026020016040519081016040528092919081815260200182805461385e90614278565b80156138ab5780601f10613880576101008083540402835291602001916138ab565b820191906000526020600020905b81548152906001019060200180831161388e57829003601f168201915b5050505050612a20565b919450925090506001600160a01b0383166138d857600195505050505050610b08565b811561395f57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa15801561392e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613952919061425f565b1195505050505050610b08565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613911908b90600401613a80565b613996613a4d565b6139b357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613a435760008381526003602052604081205460028054919291839081106139e9576139e96140c6565b6000918252602082206005909102018054909250613a099060019061407a565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610b08915050565b5060019392505050565b6000613a57613761565b54600160401b900460ff16919050565b600060208284031215613a7957600080fd5b5035919050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613abb57600080fd5b8135602083016000806001600160401b03841115613adb57613adb613a94565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613b0957613b09613a94565b604052838152905080828401871015613b2157600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613b5357600080fd5b833592506020840135915060408401356001600160401b03811115613b7757600080fd5b613b8386828701613aaa565b9150509250925092565b6001600160a01b0381168114612cca57600080fd5b60008060008060808587031215613bb857600080fd5b843593506020850135613bca81613b8d565b93969395505050506040820135916060013590565b60008060408385031215613bf257600080fd5b50508035926020909101359150565b60008060408385031215613c1457600080fd5b8235613c1f81613b8d565b915060208301356001600160401b03811115613c3a57600080fd5b613c4685828601613aaa565b9150509250929050565b60005b83811015613c6b578181015183820152602001613c53565b50506000910152565b60008151808452613c8c816020860160208601613c50565b601f01601f19169290920160200192915050565b602081526000610b086020830184613c74565b83815282151560208201526060604082015260006108f16060830184613c74565b600080600060608486031215613ce957600080fd5b83359250602084013591506040840135613d0281613b8d565b809150509250925092565b60008083601f840112613d1f57600080fd5b5081356001600160401b03811115613d3657600080fd5b6020830191508360208260051b8501011115613d5157600080fd5b9250929050565b60008060008060608587031215613d6e57600080fd5b8435935060208501356001600160401b03811115613d8b57600080fd5b613d9787828801613d0d565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613de2578351835260209384019390920191600101613dc4565b509095945050505050565b600080600080600060a08688031215613e0557600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e3d57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613e6957600080fd5b8335613e7481613b8d565b92506020840135915060408401356001600160401b03811115613b7757600080fd5b60008060008060008060a08789031215613eaf57600080fd5b8635955060208701356001600160401b03811115613ecc57600080fd5b613ed889828a01613d0d565b909650945050604087013592506060870135915060808701356001600160401b03811115613f0557600080fd5b613f1189828a01613aaa565b9150509295509295509295565b600060208284031215613f3057600080fd5b8135610b0881613b8d565b600080600080600060808688031215613f5357600080fd5b853594506020860135935060408601356001600160401b03811115613f7757600080fd5b8601601f81018813613f8857600080fd5b80356001600160401b03811115613f9e57600080fd5b886020828401011115613fb057600080fd5b959894975060200195606001359392505050565b600080600060608486031215613fd957600080fd5b8335613fe481613b8d565b92506020840135613ff481613b8d565b91506040840135613d0281613b8d565b60006020828403121561401657600080fd5b81356001600160401b0381111561402c57600080fd5b61403884828501613aaa565b949350505050565b6000806040838503121561405357600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b818103818111156129ce576129ce614064565b80820281158282048414176129ce576129ce614064565b6000826140c157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b03811681146140f357600080fd5b919050565b805180151581146140f357600080fd5b600080600080600060a0868803121561412057600080fd5b614129866140dc565b9450602086015161413981613b8d565b60408701519094506005811061414e57600080fd5b925061415c606087016140f8565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561419957600080fd5b610b08826140f8565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b6000806000606084860312156141ee57600080fd5b835192506141fe602085016140f8565b915061420c604085016140f8565b90509250925092565b808201808211156129ce576129ce614064565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60006020828403121561427157600080fd5b5051919050565b600181811c9082168061428c57607f821691505b6020821081036142ac57634e487b7160e01b600052602260045260246000fd5b50919050565b8381528260208201526060604082015260008083546142d081614278565b80606086015260018216600081146142ef576001811461430b5761433f565b60ff1983166080870152608082151560051b870101935061433f565b86600052602060002060005b8381101561433657815488820160800152600190910190602001614317565b87016080019450505b5091979650505050505050565b6000825161435e818460208701613c50565b9190910192915050565b600080600080600080600060e0888a03121561438357600080fd5b61438c886140dc565b965061439a602089016140f8565b604089015160608a015160808b015160a08c01519399509197509550935091506143c660c089016140f8565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a6e57806000526020600020601f840160051c810160208510156144815750805b601f840160051c820191505b818110156144a1576000815560010161448d565b5050505050565b6001600160401b038311156144bf576144bf613a94565b6144d3836144cd8354614278565b8361445a565b6000601f84116001811461450757600085156144ef5750838201355b600019600387901b1c1916600186901b1783556144a1565b600083815260209020601f19861690835b828110156145385786850135825560209485019460019092019101614518565b50868210156145555760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b6000602082840312156145af57600080fd5b8151610b0881613b8d565b81835260006001600160fb1b038311156145d357600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146006040830185876145ba565b9050826020830152949350505050565b6040815260006146246040830185876145ba565b82810360208401526146368185613c74565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220809532e74c527307f7c4fb23228698c888252ec20a2012cf6adf507c53468b9f64736f6c634300081c0033", - "deployedBytecode": "0x60806040526004361061023b5760003560e01c8063751accd01161012e578063d2b8035a116100ab578063f2f4eb261161006f578063f2f4eb261461076d578063f32ab9271461078d578063f7e7d1fd146107c2578063f8abee10146107e2578063fc6f8f161461081257600080fd5b8063d2b8035a146106c8578063da3beb8c146106e8578063e349ad301461059a578063e4c0aaf414610708578063ec7b23fb1461072857600080fd5b8063b34bfaa8116100f2578063b34bfaa81461063c578063b6ede54014610652578063ba66fde714610672578063be46760414610692578063c0c53b8b146106a857600080fd5b8063751accd01461057a578063796490f91461059a5780637c04034e146105b05780638e426460146105d0578063a7cc08fe146105f057600080fd5b80634f1ef286116101bc5780635c92e2f6116101805780635c92e2f6146104a057806365540b96146104c0578063675926f6146104ed57806369f3f0411461050d5780636d4cd8ea1461055a57600080fd5b80634f1ef286146103c957806352d1902d146103dc57806354fd4d50146103f1578063564a565d146104305780635a155ccd1461045f57600080fd5b80631cc3423a116102035780631cc3423a1461033a5780632621b9a21461035a5780632d68efc914610374578063362c3479146103945780634b2f0ea0146103b457600080fd5b80630855bbe9146102405780630baa64d1146102755780630c340a24146102955780631200aabc146102c25780631c3db16d146102fd575b600080fd5b34801561024c57600080fd5b5061026061025b366004613a67565b610832565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b50610260610290366004613a67565b6108fa565b3480156102a157600080fd5b506000546102b5906001600160a01b031681565b60405161026c9190613a80565b3480156102ce57600080fd5b506102ef6102dd366004613a67565b60036020526000908152604090205481565b60405190815260200161026c565b34801561030957600080fd5b5061031d610318366004613a67565b610971565b60408051938452911515602084015215159082015260600161026c565b34801561034657600080fd5b506102ef610355366004613b3e565b610adf565b34801561036657600080fd5b506004546102609060ff1681565b34801561038057600080fd5b506007546102b5906001600160a01b031681565b3480156103a057600080fd5b506102ef6103af366004613ba2565b610b0f565b6103c76103c2366004613bdf565b610fc4565b005b6103c76103d7366004613c01565b611854565b3480156103e857600080fd5b506102ef611a73565b3480156103fd57600080fd5b50610423604051806040016040528060068152602001650302e31322e360d41b81525081565b60405161026c9190613ca0565b34801561043c57600080fd5b5061045061044b366004613a67565b611ad1565b60405161026c93929190613cb3565b34801561046b57600080fd5b5061026061047a366004613cd4565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104ac57600080fd5b506103c76104bb366004613d58565b611b97565b3480156104cc57600080fd5b506104e06104db366004613a67565b611ba3565b60405161026c9190613daa565b3480156104f957600080fd5b506102ef610508366004613ded565b611c67565b34801561051957600080fd5b5061052d610528366004613e28565b611daa565b604080519687529415156020870152938501929092526060840152608083015260a082015260c00161026c565b34801561056657600080fd5b50610260610575366004613a67565b611e62565b34801561058657600080fd5b506103c7610595366004613e54565b611fe5565b3480156105a657600080fd5b506102ef61271081565b3480156105bc57600080fd5b506103c76105cb366004613e96565b6120b1565b3480156105dc57600080fd5b506103c76105eb366004613f1e565b6120c8565b3480156105fc57600080fd5b5061061061060b366004613e28565b612114565b604080516001600160a01b0390951685526020850193909352918301521515606082015260800161026c565b34801561064857600080fd5b506102ef614e2081565b34801561065e57600080fd5b506103c761066d366004613f3b565b6121da565b34801561067e57600080fd5b5061026061068d366004613e28565b6123cd565b34801561069e57600080fd5b506102ef61138881565b3480156106b457600080fd5b506103c76106c3366004613fc4565b612468565b3480156106d457600080fd5b506102b56106e3366004613bdf565b612532565b3480156106f457600080fd5b506102ef610703366004613bdf565b612881565b34801561071457600080fd5b506103c7610723366004613f1e565b6129d4565b34801561073457600080fd5b50610748610743366004614004565b612a20565b604080516001600160a01b03909416845291151560208401529082015260600161026c565b34801561077957600080fd5b506001546102b5906001600160a01b031681565b34801561079957600080fd5b506107ad6107a8366004613bdf565b612a65565b6040805192835260208301919091520161026c565b3480156107ce57600080fd5b506103c76107dd366004613f1e565b612ab7565b3480156107ee57600080fd5b506102606107fd366004613a67565b60066020526000908152604090205460ff1681565b34801561081e57600080fd5b506102ef61082d366004613a67565b612b89565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190614040565b9150915060006108b285611ba3565b9050805160001480156108f157506127106113886108d0858561407a565b6108da919061408d565b6108e491906140a4565b6108ee844261407a565b10155b95945050505050565b60008181526003602052604081205460028054839290811061091e5761091e6140c6565b600091825260208220600590910201805490925082906109409060019061407a565b81548110610950576109506140c6565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061099d5761099d6140c6565b600091825260208220600590910201805490925082906109bf9060019061407a565b815481106109cf576109cf6140c6565b60009182526020909120600c90910201600381015460ff1694509050836109fa5780600101546109fd565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190614108565b5090935060049250610a80915050565b816004811115610a9257610a92614171565b03610ad5576000610aa288611ba3565b90508051600103610ad35780600081518110610ac057610ac06140c6565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b819190614108565b50935050505080610bd95760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c509190614187565b15610c8e5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610bd0565b60008681526006602052604090205460ff16610cbc5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110610ce057610ce06140c6565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610d1457610d146140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9391906141d9565b5050600087815260078401602052604090205490915060ff16610ddd576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610f22565b808603610e52576000868152600683016020526040902054610e00576000610e4b565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610e41919061408d565b610e4b91906140a4565b9450610f22565b600081815260078301602052604090205460ff16610f225781600601600083600a01600181548110610e8657610e866140c6565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610ebc57610ebc6140c6565b9060005260206000200154815260200190815260200160002054610ee09190614215565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610f15919061408d565b610f1f91906140a4565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610fb857600754610f69906001600160a01b038a811691889116612bb5565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610faf929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610fe857610fe86140c6565b600091825260209091206002600590920201015460ff161561101c5760405162461bcd60e51b8152600401610bd090614228565b600083815260036020526040812054600280549091908110611040576110406140c6565b9060005260206000209060050201905080600101548311156110a45760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610bd0565b60008481526006602052604090205460ff166110d25760405162461bcd60e51b8152600401610bd0906141a2565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa15801561111f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111439190614040565b9150915081421015801561115657508042105b61119b5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610bd0565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156111dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120091906141d9565b50509050868103611215576127109150611296565b612710611388611225868661407a565b61122f919061408d565b61123991906140a4565b611243854261407a565b106112905760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610bd0565b614e2091505b845460009086906112a99060019061407a565b815481106112b9576112b96140c6565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c919061425f565b611346919061407a565b60008a815260078401602052604090205490915060ff16156113aa5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610bd0565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156113f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611418919061425f565b90506000612710611429878461408d565b61143391906140a4565b61143d9083614215565b60008c8152600686016020526040812054919250908211156114ee5760008c81526006860160205260409020543490611476908461407a565b1161149b5760008c8152600686016020526040902054611496908361407a565b61149d565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516114e5929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061151a908490614215565b909155505060008c81526006860160205260408120805483929061153f908490614215565b909155505060008c815260068601602052604090205482116116115760008c815260068601602052604081205460098701805491929091611581908490614215565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a8501546001101561181c5782856009015461162e919061407a565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190614187565b156116b95760028a01805460ff1916600117905561179c565b895460038b0160006116cc876001614215565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161174791815260200190565b602060405180830381865afa158015611764573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611788919061425f565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117e9939291906142b2565b6000604051808303818588803b15801561180257600080fd5b505af1158015611816573d6000803e3d6000fd5b50505050505b8034111561184557611845611831823461407a565b6007543391906001600160a01b0316612bb5565b50505050505050505050505050565b61185d82612ca0565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806118db57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166118cf6000805160206146418339815191525490565b6001600160a01b031614155b156118f95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611953575060408051601f3d908101601f191682019092526119509181019061425f565b60015b6119725781604051630c76093760e01b8152600401610bd09190613a80565b60008051602061464183398151915281146119a357604051632a87526960e21b815260048101829052602401610bd0565b6000805160206146418339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a6e576000836001600160a01b031683604051611a0a919061434c565b600060405180830381855af49150503d8060008114611a45576040519150601f19603f3d011682016040523d82523d6000602084013e611a4a565b606091505b5050905080611a6c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611abe5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464183398151915290565b60028181548110611ae157600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611b1490614278565b80601f0160208091040260200160405190810160405280929190818152602001828054611b4090614278565b8015611b8d5780601f10611b6257610100808354040283529160200191611b8d565b820191906000526020600020905b815481529060010190602001808311611b7057829003601f168201915b5050505050905083565b611a6c84848484612ccd565b6000818152600360205260408120546002805460609392908110611bc957611bc96140c6565b60009182526020822060059091020180549092508290611beb9060019061407a565b81548110611bfb57611bfb6140c6565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c5957602002820191906000526020600020905b815481526020019060010190808311611c45575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c8b57611c8b6140c6565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611cbf57611cbf6140c6565b90600052602060002090600c02016000018681548110611ce157611ce16140c6565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6391906141d9565b506003850154919350915060ff168015611d8757508183600201541480611d875750805b15611d9a576127109450505050506108f1565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ddb57611ddb6140c6565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e0f57611e0f6140c6565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e8657611e866140c6565b60009182526020822060059091020180549092508290611ea89060019061407a565b81548110611eb857611eb86140c6565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611f13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f379190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb69190614368565b5050505050915050600081611fcc578354611fd2565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b0316331461200f5760405162461bcd60e51b8152600401610bd0906143d4565b6000836001600160a01b0316838360405161202a919061434c565b60006040518083038185875af1925050503d8060008114612067576040519150601f19603f3d011682016040523d82523d6000602084013e61206c565b606091505b5050905080611a6c5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610bd0565b6120c086868686868633613030565b505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b8152600401610bd0906143d4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612142576121426140c6565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612176576121766140c6565b90600052602060002090600c02016000018781548110612198576121986140c6565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146122045760405162461bcd60e51b8152600401610bd090614416565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161228f8587836144a8565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612316919061425f565b612320919061407a565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108906123bb908a908a908a90614567565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123f1576123f16140c6565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612425576124256140c6565b90600052602060002090600c02016000018481548110612447576124476140c6565b600091825260209091206004909102016003015460ff169695505050505050565b60016000612474613761565b8054909150600160401b900460ff168061249b575080546001600160401b03808416911610155b156124b85760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124e4858585613785565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b0316331461255f5760405162461bcd60e51b8152600401610bd090614416565b600083815260036020526040902054600280548592908110612583576125836140c6565b600091825260209091206002600590920201015460ff16156125b75760405162461bcd60e51b8152600401610bd090614228565b60008481526003602052604081205460028054919291839081106125dd576125dd6140c6565b60009182526020822060059091020180549092506125fd9060019061407a565b90506000826000018281548110612616576126166140c6565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f919061459d565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127129190614108565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061279a919061459d565b98506001600160a01b0389166127b6575050505050505061287a565b6127c1848c8b6137cc565b1561286d57604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612872565b600098505b505050505050505b5092915050565b6000828152600360205260408120546002805483929081106128a5576128a56140c6565b600091825260208083208684526003600590930201918201905260408220548154919350839181106128d9576128d96140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295c91906141d9565b509150915082600401546000148061298b57508015801561298b57506000828152600284016020526040902054155b1561299d5760009450505050506129ce565b80156129b25750506004015491506129ce9050565b5060009081526002909101602052604090205491506129ce9050565b92915050565b6000546001600160a01b031633146129fe5760405162461bcd60e51b8152600401610bd0906143d4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600060a084511015612a3d57506000915081905080612a5e565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000828152600360205260408120546002805491929183908110612a8b57612a8b6140c6565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612ac3613761565b8054909150600160401b900460ff1680612aea575080546001600160401b03808416911610155b15612b075760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b9e57612b9e6140c6565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612be457505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612c1f57600080fd5b505af1158015612c33573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612c8357600080fd5b505af1158015612c97573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612cca5760405162461bcd60e51b8152600401610bd0906143d4565b50565b600084815260036020526040902054600280548692908110612cf157612cf16140c6565b600091825260209091206002600590920201015460ff1615612d255760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d939190614108565b5090935060019250612da3915050565b816004811115612db557612db5614171565b14612e125760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610bd0565b82612e4f5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610bd0565b60008681526006602052604090205460ff16612e7d5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110612ea157612ea16140c6565b60009182526020822060059091020180549092508290612ec39060019061407a565b81548110612ed357612ed36140c6565b90600052602060002090600c0201905060005b86811015612fc9573382898984818110612f0257612f026140c6565b9050602002013581548110612f1957612f196140c6565b60009182526020909120600490910201546001600160a01b031614612f805760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610bd0565b8582898984818110612f9457612f946140c6565b9050602002013581548110612fab57612fab6140c6565b60009182526020909120600160049092020181019190915501612ee6565b5086869050816005016000828254612fe19190614215565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061301e908b908b908b906145ec565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110613054576130546140c6565b600091825260209091206002600590920201015460ff16156130885760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa1580156130d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f69190614108565b5090935060029250613106915050565b81600481111561311857613118614171565b146131735760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610bd0565b866131b55760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610bd0565b60008981526006602052604090205460ff166131e35760405162461bcd60e51b8152600401610bd0906141a2565b600089815260036020526040812054600280549091908110613207576132076140c6565b9060005260206000209060050201905080600101548711156132625760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610bd0565b805460009082906132759060019061407a565b81548110613285576132856140c6565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d906132ca908f9060040190815260200190565b60a060405180830381865afa1580156132e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061330b9190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015613366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061338a9190614368565b5050505050915050600061339f8b8b8b610adf565b905060005b8c811015613626576001600160a01b038916858f8f848181106133c9576133c96140c6565b90506020020135815481106133e0576133e06140c6565b60009182526020909120600490910201546001600160a01b0316146134475760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610bd0565b82158061348e575081858f8f84818110613463576134636140c6565b905060200201358154811061347a5761347a6140c6565b906000526020600020906004020160010154145b61350e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610bd0565b848e8e83818110613521576135216140c6565b9050602002013581548110613538576135386140c6565b600091825260209091206003600490920201015460ff16156135915760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610bd0565b8b858f8f848181106135a5576135a56140c6565b90506020020135815481106135bc576135bc6140c6565b60009182526020909120600260049092020101556001858f8f848181106135e5576135e56140c6565b90506020020135815481106135fc576135fc6140c6565b60009182526020909120600490910201600301805460ff19169115159190911790556001016133a4565b5050506004820180548b9250600090613640908490614215565b90915550506000888152600282016020526040812080548b9290613665908490614215565b90915550506001810154880361369457600381015460ff161561368f5760038101805460ff191690555b61370d565b60018101546000908152600282016020526040808220548a8352912054036136d657600381015460ff1661368f5760038101805460ff1916600117905561370d565b60018101546000908152600282016020526040808220548a8352912054111561370d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161374c93929190614610565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61378d61398e565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60006137d98484846139b5565b6137e557506000610b08565b600083815260036020526040812054600280549192918390811061380b5761380b6140c6565b9060005260206000209060050201905060008060006138b584600401805461383290614278565b80601f016020809104026020016040519081016040528092919081815260200182805461385e90614278565b80156138ab5780601f10613880576101008083540402835291602001916138ab565b820191906000526020600020905b81548152906001019060200180831161388e57829003601f168201915b5050505050612a20565b919450925090506001600160a01b0383166138d857600195505050505050610b08565b811561395f57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa15801561392e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613952919061425f565b1195505050505050610b08565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613911908b90600401613a80565b613996613a4d565b6139b357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613a435760008381526003602052604081205460028054919291839081106139e9576139e96140c6565b6000918252602082206005909102018054909250613a099060019061407a565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610b08915050565b5060019392505050565b6000613a57613761565b54600160401b900460ff16919050565b600060208284031215613a7957600080fd5b5035919050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613abb57600080fd5b8135602083016000806001600160401b03841115613adb57613adb613a94565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613b0957613b09613a94565b604052838152905080828401871015613b2157600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613b5357600080fd5b833592506020840135915060408401356001600160401b03811115613b7757600080fd5b613b8386828701613aaa565b9150509250925092565b6001600160a01b0381168114612cca57600080fd5b60008060008060808587031215613bb857600080fd5b843593506020850135613bca81613b8d565b93969395505050506040820135916060013590565b60008060408385031215613bf257600080fd5b50508035926020909101359150565b60008060408385031215613c1457600080fd5b8235613c1f81613b8d565b915060208301356001600160401b03811115613c3a57600080fd5b613c4685828601613aaa565b9150509250929050565b60005b83811015613c6b578181015183820152602001613c53565b50506000910152565b60008151808452613c8c816020860160208601613c50565b601f01601f19169290920160200192915050565b602081526000610b086020830184613c74565b83815282151560208201526060604082015260006108f16060830184613c74565b600080600060608486031215613ce957600080fd5b83359250602084013591506040840135613d0281613b8d565b809150509250925092565b60008083601f840112613d1f57600080fd5b5081356001600160401b03811115613d3657600080fd5b6020830191508360208260051b8501011115613d5157600080fd5b9250929050565b60008060008060608587031215613d6e57600080fd5b8435935060208501356001600160401b03811115613d8b57600080fd5b613d9787828801613d0d565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613de2578351835260209384019390920191600101613dc4565b509095945050505050565b600080600080600060a08688031215613e0557600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e3d57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613e6957600080fd5b8335613e7481613b8d565b92506020840135915060408401356001600160401b03811115613b7757600080fd5b60008060008060008060a08789031215613eaf57600080fd5b8635955060208701356001600160401b03811115613ecc57600080fd5b613ed889828a01613d0d565b909650945050604087013592506060870135915060808701356001600160401b03811115613f0557600080fd5b613f1189828a01613aaa565b9150509295509295509295565b600060208284031215613f3057600080fd5b8135610b0881613b8d565b600080600080600060808688031215613f5357600080fd5b853594506020860135935060408601356001600160401b03811115613f7757600080fd5b8601601f81018813613f8857600080fd5b80356001600160401b03811115613f9e57600080fd5b886020828401011115613fb057600080fd5b959894975060200195606001359392505050565b600080600060608486031215613fd957600080fd5b8335613fe481613b8d565b92506020840135613ff481613b8d565b91506040840135613d0281613b8d565b60006020828403121561401657600080fd5b81356001600160401b0381111561402c57600080fd5b61403884828501613aaa565b949350505050565b6000806040838503121561405357600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b818103818111156129ce576129ce614064565b80820281158282048414176129ce576129ce614064565b6000826140c157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b03811681146140f357600080fd5b919050565b805180151581146140f357600080fd5b600080600080600060a0868803121561412057600080fd5b614129866140dc565b9450602086015161413981613b8d565b60408701519094506005811061414e57600080fd5b925061415c606087016140f8565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561419957600080fd5b610b08826140f8565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b6000806000606084860312156141ee57600080fd5b835192506141fe602085016140f8565b915061420c604085016140f8565b90509250925092565b808201808211156129ce576129ce614064565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60006020828403121561427157600080fd5b5051919050565b600181811c9082168061428c57607f821691505b6020821081036142ac57634e487b7160e01b600052602260045260246000fd5b50919050565b8381528260208201526060604082015260008083546142d081614278565b80606086015260018216600081146142ef576001811461430b5761433f565b60ff1983166080870152608082151560051b870101935061433f565b86600052602060002060005b8381101561433657815488820160800152600190910190602001614317565b87016080019450505b5091979650505050505050565b6000825161435e818460208701613c50565b9190910192915050565b600080600080600080600060e0888a03121561438357600080fd5b61438c886140dc565b965061439a602089016140f8565b604089015160608a015160808b015160a08c01519399509197509550935091506143c660c089016140f8565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a6e57806000526020600020601f840160051c810160208510156144815750805b601f840160051c820191505b818110156144a1576000815560010161448d565b5050505050565b6001600160401b038311156144bf576144bf613a94565b6144d3836144cd8354614278565b8361445a565b6000601f84116001811461450757600085156144ef5750838201355b600019600387901b1c1916600186901b1783556144a1565b600083815260209020601f19861690835b828110156145385786850135825560209485019460019092019101614518565b50868210156145555760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b6000602082840312156145af57600080fd5b8151610b0881613b8d565b81835260006001600160fb1b038311156145d357600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146006040830185876145ba565b9050826020830152949350505050565b6040815260006146246040830185876145ba565b82810360208401526146368185613c74565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220809532e74c527307f7c4fb23228698c888252ec20a2012cf6adf507c53468b9f64736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "extraDataToTokenInfo(bytes)": { - "details": "Extracts token gating information from the extra data.", - "params": { - "_extraData": "The extra data bytes array with the following encoding: - bytes 0-31: uint96 courtID, not used here - bytes 32-63: uint256 minJurors, not used here - bytes 64-95: uint256 disputeKitID, not used here - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160) - bytes 128-159: uint256 tokenId" - }, - "returns": { - "isERC1155": "True if the token is an ERC-1155, false for ERC-20/ERC-721.", - "tokenGate": "The address of the token contract used for gating access.", - "tokenId": "The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721)." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitGated Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 6613, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6616, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)303" - }, - { - "astId": 6620, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)6552_storage)dyn_storage" - }, - { - "astId": 6624, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6626, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 6634, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 6638, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6640, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)6552_storage)dyn_storage": { - "base": "t_struct(Dispute)6552_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)6590_storage)dyn_storage": { - "base": "t_struct(Round)6590_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)6599_storage)dyn_storage": { - "base": "t_struct(Vote)6599_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)303": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)6552_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 6541, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)6590_storage)dyn_storage" - }, - { - "astId": 6543, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6545, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 6549, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6551, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)6590_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 6556, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)6599_storage)dyn_storage" - }, - { - "astId": 6558, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6562, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6564, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 6566, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6568, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 6572, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6576, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6582, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 6584, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 6587, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 6589, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)6599_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 6592, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6594, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 6596, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 6598, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitGated_Proxy.json b/contracts/deployments/arbitrumSepolia/DisputeKitGated_Proxy.json deleted file mode 100644 index a34a76190..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitGated_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xff42b4296deabcf5e0598aae751de91a9bfe74d88f6ed4fe82f4373877356ed2", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", - "transactionIndex": 3, - "gasUsed": "199470", - "logsBloom": "0x00000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000800000000000000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6d6487daca86983ca793f5ef5bc7611b0083f34ce18bcb33c48ef1fc83d076be", - "transactionHash": "0xff42b4296deabcf5e0598aae751de91a9bfe74d88f6ed4fe82f4373877356ed2", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 178241316, - "transactionHash": "0xff42b4296deabcf5e0598aae751de91a9bfe74d88f6ed4fe82f4373877356ed2", - "address": "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x6d6487daca86983ca793f5ef5bc7611b0083f34ce18bcb33c48ef1fc83d076be" - } - ], - "blockNumber": 178241316, - "cumulativeGasUsed": "358154", - "status": 1, - "byzantium": true - }, - "args": [ - "0x074837F8306faD19D4e6b1f3d2f98eA796c3f8a9", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000e8442307d36e9bf6ab27f1a009f95ce8e11c3479" - ], - "numDeployments": 1, - "solcInputHash": "74873d15f43e245d08be76d8560e80d9", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitShutter.json b/contracts/deployments/arbitrumSepolia/DisputeKitShutter.json deleted file mode 100644 index 2d6bf4b69..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitShutter.json +++ /dev/null @@ -1,1312 +0,0 @@ -{ - "address": "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x4991621447184cb4ee4f349d73f852ad6d564fced8a6e758965bafbd54676536", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", - "transactionIndex": 1, - "gasUsed": "199311", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000040000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x855951ef271368e1735aa167bb95c3e131fa812546b24c29c3ed7b14e9dd4955", - "transactionHash": "0x4991621447184cb4ee4f349d73f852ad6d564fced8a6e758965bafbd54676536", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 178241295, - "transactionHash": "0x4991621447184cb4ee4f349d73f852ad6d564fced8a6e758965bafbd54676536", - "address": "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x855951ef271368e1735aa167bb95c3e131fa812546b24c29c3ed7b14e9dd4955" - } - ], - "blockNumber": 178241295, - "cumulativeGasUsed": "199311", - "status": 1, - "byzantium": true - }, - "args": [ - "0x97a1DAAc5aF27383B2c2AB57d8974664A7fe4352", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000e8442307d36e9bf6ab27f1a009f95ce8e11c3479" - ], - "numDeployments": 2, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511" - ] - }, - "implementation": "0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitShutter_Implementation.json b/contracts/deployments/arbitrumSepolia/DisputeKitShutter_Implementation.json deleted file mode 100644 index e53e34b06..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitShutter_Implementation.json +++ /dev/null @@ -1,1975 +0,0 @@ -{ - "address": "0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x5b5c9c0c81b08aade7fbedd3e061c0cb62335e2af144c412e4f26230a129d15d", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d", - "transactionIndex": 1, - "gasUsed": "4030642", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000800000000000000000000000080000000000000000000004040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd3926df7e80ca22561a1dbb3afb1ff25b20cd6012d0244577d78b674b0772844", - "transactionHash": "0x5b5c9c0c81b08aade7fbedd3e061c0cb62335e2af144c412e4f26230a129d15d", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 179580573, - "transactionHash": "0x5b5c9c0c81b08aade7fbedd3e061c0cb62335e2af144c412e4f26230a129d15d", - "address": "0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0xd3926df7e80ca22561a1dbb3afb1ff25b20cd6012d0244577d78b674b0772844" - } - ], - "blockNumber": 179580573, - "cumulativeGasUsed": "4030642", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"CommitCastShutter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"castCommitShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVoteShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"CommitCastShutter(uint256,address,bytes32,bytes32,bytes)\":{\"details\":\"Emitted when a vote is cast.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_juror\":\"The address of the juror casting the vote commitment.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash including the justification.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encoding\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitShutter Added functionality: shielded voting. Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitShutter.sol\":\"DisputeKitShutter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitShutter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitShutter\\n/// Added functionality: shielded voting.\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitShutter is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a vote is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _commit The commitment hash.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n event CommitCastShutter(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n bytes32 indexed _commit,\\n bytes32 _identity,\\n bytes _encryptedVote\\n );\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash including the justification.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n function castCommitShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit,\\n bytes32 _identity,\\n bytes calldata _encryptedVote\\n ) external notJumped(_coreDisputeID) {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n emit CommitCastShutter(_coreDisputeID, msg.sender, _commit, _identity, _encryptedVote);\\n }\\n\\n function castVoteShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n address juror = dispute.rounds[dispute.rounds.length - 1].votes[_voteIDs[0]].account;\\n\\n // _castVote() ensures that all the _voteIDs do belong to `juror`\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, juror);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure override returns (bytes32) {\\n bytes32 justificationHash = keccak256(bytes(_justification));\\n return keccak256(abi.encode(_choice, _salt, justificationHash));\\n }\\n}\\n\",\"keccak256\":\"0x22667ae7b4db6a3290463f2f42df92136c4f91190665a2f14523f05e1bbc50c5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516146976100fc600039600081816119420152818161196b0152611b6301526146976000f3fe6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf41461075e578063f2f4eb261461077e578063f32ab9271461079e578063f7e7d1fd146107d3578063f8abee10146107f3578063fc6f8f161461082357600080fd5b8063be467604146106e8578063c0c53b8b146106fe578063d2b8035a1461071e578063da3beb8c1461073e578063e349ad30146105d057600080fd5b80638f06f112116100fd5780638f06f11214610626578063a7cc08fe14610646578063b34bfaa814610692578063b6ede540146106a8578063ba66fde7146106c857600080fd5b80636d4cd8ea14610590578063751accd0146105b0578063796490f9146105d05780637c04034e146105e65780638e4264601461060657600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd146104955780635c92e2f6146104d657806365540b96146104f6578063675926f61461052357806369f3f0411461054357600080fd5b80634b2f0ea0146103ec5780634f1ef286146103ff57806352d1902d1461041257806354fd4d5014610427578063564a565d1461046657600080fd5b80631c3db16d1161020e5780631c3db16d146103355780631cc3423a146103725780632621b9a2146103925780632d68efc9146103ac578063362c3479146103cc57600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102fa575b600080fd5b34801561025757600080fd5b5061026b610266366004613a09565b610843565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613aae565b61090b565b005b3480156102ae57600080fd5b5061026b6102bd366004613a09565b6109c9565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561030657600080fd5b50610327610315366004613a09565b60036020526000908152604090205481565b604051908152602001610277565b34801561034157600080fd5b50610355610350366004613a09565b610a40565b604080519384529115156020840152151590820152606001610277565b34801561037e57600080fd5b5061032761038d366004613be8565b610bae565b34801561039e57600080fd5b5060045461026b9060ff1681565b3480156103b857600080fd5b506007546102e2906001600160a01b031681565b3480156103d857600080fd5b506103276103e7366004613c4c565b610bee565b6102a06103fa366004613c89565b61109e565b6102a061040d366004613cab565b61192e565b34801561041e57600080fd5b50610327611b56565b34801561043357600080fd5b50610459604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613d4a565b34801561047257600080fd5b50610486610481366004613a09565b611bb4565b60405161027793929190613d5d565b3480156104a157600080fd5b5061026b6104b0366004613d7e565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104e257600080fd5b506102a06104f1366004613db7565b611c7a565b34801561050257600080fd5b50610516610511366004613a09565b611c86565b6040516102779190613e09565b34801561052f57600080fd5b5061032761053e366004613e4c565b611d4a565b34801561054f57600080fd5b5061056361055e366004613e87565b611e8d565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059c57600080fd5b5061026b6105ab366004613a09565b611f45565b3480156105bc57600080fd5b506102a06105cb366004613eb3565b6120c8565b3480156105dc57600080fd5b5061032761271081565b3480156105f257600080fd5b506102a0610601366004613ef5565b612194565b34801561061257600080fd5b506102a0610621366004613f7d565b6121ab565b34801561063257600080fd5b506102a0610641366004613ef5565b6121f7565b34801561065257600080fd5b50610666610661366004613e87565b6122bd565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069e57600080fd5b50610327614e2081565b3480156106b457600080fd5b506102a06106c3366004613f9a565b612383565b3480156106d457600080fd5b5061026b6106e3366004613e87565b612576565b3480156106f457600080fd5b5061032761138881565b34801561070a57600080fd5b506102a0610719366004613ff4565b612611565b34801561072a57600080fd5b506102e2610739366004613c89565b6126db565b34801561074a57600080fd5b50610327610759366004613c89565b612a2a565b34801561076a57600080fd5b506102a0610779366004613f7d565b612b7d565b34801561078a57600080fd5b506001546102e2906001600160a01b031681565b3480156107aa57600080fd5b506107be6107b9366004613c89565b612bc9565b60408051928352602083019190915201610277565b3480156107df57600080fd5b506102a06107ee366004613f7d565b612c1b565b3480156107ff57600080fd5b5061026b61080e366004613a09565b60066020526000908152604090205460ff1681565b34801561082f57600080fd5b5061032761083e366004613a09565b612ced565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190614034565b9150915060006108c385611c86565b90508051600014801561090257506127106113886108e1858561406e565b6108eb9190614081565b6108f59190614098565b6108ff844261406e565b10155b95945050505050565b60008781526003602052604090205460028054899290811061092f5761092f6140ba565b600091825260209091206002600590920201015460ff161561096c5760405162461bcd60e51b8152600401610963906140d0565b60405180910390fd5b61097888888888612d19565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109b793929190614130565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109ed576109ed6140ba565b60009182526020822060059091020180549092508290610a0f9060019061406e565b81548110610a1f57610a1f6140ba565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6c57610a6c6140ba565b60009182526020822060059091020180549092508290610a8e9060019061406e565b81548110610a9e57610a9e6140ba565b60009182526020909120600c90910201600381015460ff169450905083610ac9578060010154610acc565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f9190614176565b5090935060049250610b4f915050565b816004811115610b6157610b616141df565b03610ba4576000610b7188611c86565b90508051600103610ba25780600081518110610b8f57610b8f6140ba565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c609190614176565b50935050505080610cb35760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610963565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a91906141f5565b15610d685760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610963565b60008681526006602052604090205460ff16610d965760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110610dba57610dba6140ba565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610dee57610dee6140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190614247565b5050600087815260078401602052604090205490915060ff16610eb7576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ffc565b808603610f2c576000868152600683016020526040902054610eda576000610f25565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f1b9190614081565b610f259190614098565b9450610ffc565b600081815260078301602052604090205460ff16610ffc5781600601600083600a01600181548110610f6057610f606140ba565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f9657610f966140ba565b9060005260206000200154815260200190815260200160002054610fba9190614283565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fef9190614081565b610ff99190614098565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561109257600754611043906001600160a01b038a81169188911661307c565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051611089929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110c2576110c26140ba565b600091825260209091206002600590920201015460ff16156110f65760405162461bcd60e51b8152600401610963906140d0565b60008381526003602052604081205460028054909190811061111a5761111a6140ba565b90600052602060002090600502019050806001015483111561117e5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610963565b60008481526006602052604090205460ff166111ac5760405162461bcd60e51b815260040161096390614210565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121d9190614034565b9150915081421015801561123057508042105b6112755760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610963565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112da9190614247565b505090508681036112ef576127109150611370565b6127106113886112ff868661406e565b6113099190614081565b6113139190614098565b61131d854261406e565b1061136a5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610963565b614e2091505b845460009086906113839060019061406e565b81548110611393576113936140ba565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114169190614296565b611420919061406e565b60008a815260078401602052604090205490915060ff16156114845760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610963565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f29190614296565b905060006127106115038784614081565b61150d9190614098565b6115179083614283565b60008c8152600686016020526040812054919250908211156115c85760008c81526006860160205260409020543490611550908461406e565b116115755760008c8152600686016020526040902054611570908361406e565b611577565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115bf929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115f4908490614283565b909155505060008c815260068601602052604081208054839290611619908490614283565b909155505060008c815260068601602052604090205482116116eb5760008c81526006860160205260408120546009870180549192909161165b908490614283565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118f657828560090154611708919061406e565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177a91906141f5565b156117935760028a01805460ff19166001179055611876565b895460038b0160006117a6876001614283565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161182191815260200190565b602060405180830381865afa15801561183e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118629190614296565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118c3939291906142e9565b6000604051808303818588803b1580156118dc57600080fd5b505af11580156118f0573d6000803e3d6000fd5b50505050505b8034111561191f5761191f61190b823461406e565b6007543391906001600160a01b031661307c565b50505050505050505050505050565b61193782613167565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119b557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166119a96000805160206146428339815191525490565b6001600160a01b031614155b156119d35760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a2d575060408051601f3d908101601f19168201909252611a2a91810190614296565b60015b611a5557604051630c76093760e01b81526001600160a01b0383166004820152602401610963565b6000805160206146428339815191528114611a8657604051632a87526960e21b815260048101829052602401610963565b6000805160206146428339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b51576000836001600160a01b031683604051611aed9190614383565b600060405180830381855af49150503d8060008114611b28576040519150601f19603f3d011682016040523d82523d6000602084013e611b2d565b606091505b5050905080611b4f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ba15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464283398151915290565b60028181548110611bc457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611bf7906142af565b80601f0160208091040260200160405190810160405280929190818152602001828054611c23906142af565b8015611c705780601f10611c4557610100808354040283529160200191611c70565b820191906000526020600020905b815481529060010190602001808311611c5357829003601f168201915b5050505050905083565b611b4f84848484612d19565b6000818152600360205260408120546002805460609392908110611cac57611cac6140ba565b60009182526020822060059091020180549092508290611cce9060019061406e565b81548110611cde57611cde6140ba565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d3c57602002820191906000526020600020905b815481526020019060010190808311611d28575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d6e57611d6e6140ba565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611da257611da26140ba565b90600052602060002090600c02016000018681548110611dc457611dc46140ba565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e469190614247565b506003850154919350915060ff168015611e6a57508183600201541480611e6a5750805b15611e7d57612710945050505050610902565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ebe57611ebe6140ba565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ef257611ef26140ba565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f6957611f696140ba565b60009182526020822060059091020180549092508290611f8b9060019061406e565b81548110611f9b57611f9b6140ba565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201a9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612075573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612099919061439f565b50505050509150506000816120af5783546120b5565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b81526004016109639061440b565b6000836001600160a01b0316838360405161210d9190614383565b60006040518083038185875af1925050503d806000811461214a576040519150601f19603f3d011682016040523d82523d6000602084013e61214f565b606091505b5050905080611b4f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610963565b6121a386868686868633613194565b505050505050565b6000546001600160a01b031633146121d55760405162461bcd60e51b81526004016109639061440b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008681526003602052604081205460028054909190811061221b5761221b6140ba565b6000918252602082206005909102018054909250829061223d9060019061406e565b8154811061224d5761224d6140ba565b90600052602060002090600c020160000187876000818110612271576122716140ba565b9050602002013581548110612288576122886140ba565b60009182526020909120600490910201546001600160a01b031690506122b388888888888887613194565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122eb576122eb6140ba565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061231f5761231f6140ba565b90600052602060002090600c02016000018781548110612341576123416140ba565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123ad5760405162461bcd60e51b81526004016109639061444d565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124388587836144df565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561249b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bf9190614296565b6124c9919061406e565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612564908a908a908a90614130565b60405180910390a25050505050505050565b60008381526003602052604081205460028054839290811061259a5761259a6140ba565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ce576125ce6140ba565b90600052602060002090600c020160000184815481106125f0576125f06140ba565b600091825260209091206004909102016003015460ff169695505050505050565b6001600061261d6138c5565b8054909150600160401b900460ff1680612644575080546001600160401b03808416911610155b156126615760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561268d8585856138e9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146127085760405162461bcd60e51b81526004016109639061444d565b60008381526003602052604090205460028054859290811061272c5761272c6140ba565b600091825260209091206002600590920201015460ff16156127605760405162461bcd60e51b8152600401610963906140d0565b6000848152600360205260408120546002805491929183908110612786576127866140ba565b60009182526020822060059091020180549092506127a69060019061406e565b905060008260000182815481106127bf576127bf6140ba565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612824573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612848919061459e565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128bb9190614176565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561291f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612943919061459e565b98506001600160a01b03891661295f5750505050505050612a23565b61296a848c8b613930565b15612a1657604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a1b565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a4e57612a4e6140ba565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a8257612a826140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b059190614247565b5091509150826004015460001480612b34575080158015612b3457506000828152600284016020526040902054155b15612b46576000945050505050612b77565b8015612b5b575050600401549150612b779050565b506000908152600290910160205260409020549150612b779050565b92915050565b6000546001600160a01b03163314612ba75760405162461bcd60e51b81526004016109639061440b565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bef57612bef6140ba565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c276138c5565b8054909150600160401b900460ff1680612c4e575080546001600160401b03808416911610155b15612c6b5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612d0257612d026140ba565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d3d57612d3d6140ba565b600091825260209091206002600590920201015460ff1615612d715760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddf9190614176565b5090935060019250612def915050565b816004811115612e0157612e016141df565b14612e5e5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610963565b82612e9b5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610963565b60008681526006602052604090205460ff16612ec95760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110612eed57612eed6140ba565b60009182526020822060059091020180549092508290612f0f9060019061406e565b81548110612f1f57612f1f6140ba565b90600052602060002090600c0201905060005b86811015613015573382898984818110612f4e57612f4e6140ba565b9050602002013581548110612f6557612f656140ba565b60009182526020909120600490910201546001600160a01b031614612fcc5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610963565b8582898984818110612fe057612fe06140ba565b9050602002013581548110612ff757612ff76140ba565b60009182526020909120600160049092020181019190915501612f32565b508686905081600501600082825461302d9190614283565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061306a908b908b908b906145ed565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f19350505050156130ab57505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130e657600080fd5b505af11580156130fa573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561314a57600080fd5b505af115801561315e573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146131915760405162461bcd60e51b81526004016109639061440b565b50565b6000878152600360205260409020546002805489929081106131b8576131b86140ba565b600091825260209091206002600590920201015460ff16156131ec5760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061325a9190614176565b509093506002925061326a915050565b81600481111561327c5761327c6141df565b146132d75760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610963565b866133195760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610963565b60008981526006602052604090205460ff166133475760405162461bcd60e51b815260040161096390614210565b60008981526003602052604081205460028054909190811061336b5761336b6140ba565b9060005260206000209060050201905080600101548711156133c65760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610963565b805460009082906133d99060019061406e565b815481106133e9576133e96140ba565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061342e908f9060040190815260200190565b60a060405180830381865afa15801561344b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346f9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ee919061439f565b505050505091505060006135038b8b8b610bae565b905060005b8c81101561378a576001600160a01b038916858f8f8481811061352d5761352d6140ba565b9050602002013581548110613544576135446140ba565b60009182526020909120600490910201546001600160a01b0316146135ab5760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610963565b8215806135f2575081858f8f848181106135c7576135c76140ba565b90506020020135815481106135de576135de6140ba565b906000526020600020906004020160010154145b6136725760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610963565b848e8e83818110613685576136856140ba565b905060200201358154811061369c5761369c6140ba565b600091825260209091206003600490920201015460ff16156136f55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610963565b8b858f8f84818110613709576137096140ba565b9050602002013581548110613720576137206140ba565b60009182526020909120600260049092020101556001858f8f84818110613749576137496140ba565b9050602002013581548110613760576137606140ba565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613508565b5050506004820180548b92506000906137a4908490614283565b90915550506000888152600282016020526040812080548b92906137c9908490614283565b9091555050600181015488036137f857600381015460ff16156137f35760038101805460ff191690555b613871565b60018101546000908152600282016020526040808220548a83529120540361383a57600381015460ff166137f35760038101805460ff19166001179055613871565b60018101546000908152600282016020526040808220548a83529120541115613871576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516138b093929190614611565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138f16139c8565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156139be576000838152600360205260408120546002805491929183908110613964576139646140ba565b60009182526020822060059091020180549092506139849060019061406e565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610be7915050565b5060019392505050565b6139d06139ef565b6139ed57604051631afcd79f60e31b815260040160405180910390fd5b565b60006139f96138c5565b54600160401b900460ff16919050565b600060208284031215613a1b57600080fd5b5035919050565b60008083601f840112613a3457600080fd5b5081356001600160401b03811115613a4b57600080fd5b6020830191508360208260051b8501011115613a6657600080fd5b9250929050565b60008083601f840112613a7f57600080fd5b5081356001600160401b03811115613a9657600080fd5b602083019150836020828501011115613a6657600080fd5b600080600080600080600060a0888a031215613ac957600080fd5b8735965060208801356001600160401b03811115613ae657600080fd5b613af28a828b01613a22565b909750955050604088013593506060880135925060808801356001600160401b03811115613b1f57600080fd5b613b2b8a828b01613a6d565b989b979a50959850939692959293505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613b6557600080fd5b8135602083016000806001600160401b03841115613b8557613b85613b3e565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613bb357613bb3613b3e565b604052838152905080828401871015613bcb57600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613bfd57600080fd5b833592506020840135915060408401356001600160401b03811115613c2157600080fd5b613c2d86828701613b54565b9150509250925092565b6001600160a01b038116811461319157600080fd5b60008060008060808587031215613c6257600080fd5b843593506020850135613c7481613c37565b93969395505050506040820135916060013590565b60008060408385031215613c9c57600080fd5b50508035926020909101359150565b60008060408385031215613cbe57600080fd5b8235613cc981613c37565b915060208301356001600160401b03811115613ce457600080fd5b613cf085828601613b54565b9150509250929050565b60005b83811015613d15578181015183820152602001613cfd565b50506000910152565b60008151808452613d36816020860160208601613cfa565b601f01601f19169290920160200192915050565b602081526000610be76020830184613d1e565b83815282151560208201526060604082015260006109026060830184613d1e565b600080600060608486031215613d9357600080fd5b83359250602084013591506040840135613dac81613c37565b809150509250925092565b60008060008060608587031215613dcd57600080fd5b8435935060208501356001600160401b03811115613dea57600080fd5b613df687828801613a22565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613e41578351835260209384019390920191600101613e23565b509095945050505050565b600080600080600060a08688031215613e6457600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e9c57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613ec857600080fd5b8335613ed381613c37565b92506020840135915060408401356001600160401b03811115613c2157600080fd5b60008060008060008060a08789031215613f0e57600080fd5b8635955060208701356001600160401b03811115613f2b57600080fd5b613f3789828a01613a22565b909650945050604087013592506060870135915060808701356001600160401b03811115613f6457600080fd5b613f7089828a01613b54565b9150509295509295509295565b600060208284031215613f8f57600080fd5b8135610be781613c37565b600080600080600060808688031215613fb257600080fd5b853594506020860135935060408601356001600160401b03811115613fd657600080fd5b613fe288828901613a6d565b96999598509660600135949350505050565b60008060006060848603121561400957600080fd5b833561401481613c37565b9250602084013561402481613c37565b91506040840135613dac81613c37565b6000806040838503121561404757600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b7757612b77614058565b8082028115828204841417612b7757612b77614058565b6000826140b557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152604060208201526000610902604083018486614107565b80516001600160601b038116811461416157600080fd5b919050565b8051801515811461416157600080fd5b600080600080600060a0868803121561418e57600080fd5b6141978661414a565b945060208601516141a781613c37565b6040870151909450600581106141bc57600080fd5b92506141ca60608701614166565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561420757600080fd5b610be782614166565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561425c57600080fd5b8351925061426c60208501614166565b915061427a60408501614166565b90509250925092565b80820180821115612b7757612b77614058565b6000602082840312156142a857600080fd5b5051919050565b600181811c908216806142c357607f821691505b6020821081036142e357634e487b7160e01b600052602260045260246000fd5b50919050565b838152826020820152606060408201526000808354614307816142af565b8060608601526001821660008114614326576001811461434257614376565b60ff1983166080870152608082151560051b8701019350614376565b86600052602060002060005b8381101561436d5781548882016080015260019091019060200161434e565b87016080019450505b5091979650505050505050565b60008251614395818460208701613cfa565b9190910192915050565b600080600080600080600060e0888a0312156143ba57600080fd5b6143c38861414a565b96506143d160208901614166565b604089015160608a015160808b015160a08c01519399509197509550935091506143fd60c08901614166565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b5157806000526020600020601f840160051c810160208510156144b85750805b601f840160051c820191505b818110156144d857600081556001016144c4565b5050505050565b6001600160401b038311156144f6576144f6613b3e565b61450a8361450483546142af565b83614491565b6000601f84116001811461453e57600085156145265750838201355b600019600387901b1c1916600186901b1783556144d8565b600083815260209020601f19861690835b8281101561456f578685013582556020948501946001909201910161454f565b508682101561458c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156145b057600080fd5b8151610be781613c37565b81835260006001600160fb1b038311156145d457600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146016040830185876145bb565b9050826020830152949350505050565b6040815260006146256040830185876145bb565b82810360208401526146378185613d1e565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204611969b7846b8f8df4dbeb55dc71bd009ee535c528de4a12223b6d97dbc9de164736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf41461075e578063f2f4eb261461077e578063f32ab9271461079e578063f7e7d1fd146107d3578063f8abee10146107f3578063fc6f8f161461082357600080fd5b8063be467604146106e8578063c0c53b8b146106fe578063d2b8035a1461071e578063da3beb8c1461073e578063e349ad30146105d057600080fd5b80638f06f112116100fd5780638f06f11214610626578063a7cc08fe14610646578063b34bfaa814610692578063b6ede540146106a8578063ba66fde7146106c857600080fd5b80636d4cd8ea14610590578063751accd0146105b0578063796490f9146105d05780637c04034e146105e65780638e4264601461060657600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd146104955780635c92e2f6146104d657806365540b96146104f6578063675926f61461052357806369f3f0411461054357600080fd5b80634b2f0ea0146103ec5780634f1ef286146103ff57806352d1902d1461041257806354fd4d5014610427578063564a565d1461046657600080fd5b80631c3db16d1161020e5780631c3db16d146103355780631cc3423a146103725780632621b9a2146103925780632d68efc9146103ac578063362c3479146103cc57600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102fa575b600080fd5b34801561025757600080fd5b5061026b610266366004613a09565b610843565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613aae565b61090b565b005b3480156102ae57600080fd5b5061026b6102bd366004613a09565b6109c9565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561030657600080fd5b50610327610315366004613a09565b60036020526000908152604090205481565b604051908152602001610277565b34801561034157600080fd5b50610355610350366004613a09565b610a40565b604080519384529115156020840152151590820152606001610277565b34801561037e57600080fd5b5061032761038d366004613be8565b610bae565b34801561039e57600080fd5b5060045461026b9060ff1681565b3480156103b857600080fd5b506007546102e2906001600160a01b031681565b3480156103d857600080fd5b506103276103e7366004613c4c565b610bee565b6102a06103fa366004613c89565b61109e565b6102a061040d366004613cab565b61192e565b34801561041e57600080fd5b50610327611b56565b34801561043357600080fd5b50610459604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613d4a565b34801561047257600080fd5b50610486610481366004613a09565b611bb4565b60405161027793929190613d5d565b3480156104a157600080fd5b5061026b6104b0366004613d7e565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104e257600080fd5b506102a06104f1366004613db7565b611c7a565b34801561050257600080fd5b50610516610511366004613a09565b611c86565b6040516102779190613e09565b34801561052f57600080fd5b5061032761053e366004613e4c565b611d4a565b34801561054f57600080fd5b5061056361055e366004613e87565b611e8d565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059c57600080fd5b5061026b6105ab366004613a09565b611f45565b3480156105bc57600080fd5b506102a06105cb366004613eb3565b6120c8565b3480156105dc57600080fd5b5061032761271081565b3480156105f257600080fd5b506102a0610601366004613ef5565b612194565b34801561061257600080fd5b506102a0610621366004613f7d565b6121ab565b34801561063257600080fd5b506102a0610641366004613ef5565b6121f7565b34801561065257600080fd5b50610666610661366004613e87565b6122bd565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069e57600080fd5b50610327614e2081565b3480156106b457600080fd5b506102a06106c3366004613f9a565b612383565b3480156106d457600080fd5b5061026b6106e3366004613e87565b612576565b3480156106f457600080fd5b5061032761138881565b34801561070a57600080fd5b506102a0610719366004613ff4565b612611565b34801561072a57600080fd5b506102e2610739366004613c89565b6126db565b34801561074a57600080fd5b50610327610759366004613c89565b612a2a565b34801561076a57600080fd5b506102a0610779366004613f7d565b612b7d565b34801561078a57600080fd5b506001546102e2906001600160a01b031681565b3480156107aa57600080fd5b506107be6107b9366004613c89565b612bc9565b60408051928352602083019190915201610277565b3480156107df57600080fd5b506102a06107ee366004613f7d565b612c1b565b3480156107ff57600080fd5b5061026b61080e366004613a09565b60066020526000908152604090205460ff1681565b34801561082f57600080fd5b5061032761083e366004613a09565b612ced565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190614034565b9150915060006108c385611c86565b90508051600014801561090257506127106113886108e1858561406e565b6108eb9190614081565b6108f59190614098565b6108ff844261406e565b10155b95945050505050565b60008781526003602052604090205460028054899290811061092f5761092f6140ba565b600091825260209091206002600590920201015460ff161561096c5760405162461bcd60e51b8152600401610963906140d0565b60405180910390fd5b61097888888888612d19565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109b793929190614130565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109ed576109ed6140ba565b60009182526020822060059091020180549092508290610a0f9060019061406e565b81548110610a1f57610a1f6140ba565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6c57610a6c6140ba565b60009182526020822060059091020180549092508290610a8e9060019061406e565b81548110610a9e57610a9e6140ba565b60009182526020909120600c90910201600381015460ff169450905083610ac9578060010154610acc565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f9190614176565b5090935060049250610b4f915050565b816004811115610b6157610b616141df565b03610ba4576000610b7188611c86565b90508051600103610ba25780600081518110610b8f57610b8f6140ba565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c609190614176565b50935050505080610cb35760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610963565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a91906141f5565b15610d685760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610963565b60008681526006602052604090205460ff16610d965760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110610dba57610dba6140ba565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610dee57610dee6140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190614247565b5050600087815260078401602052604090205490915060ff16610eb7576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ffc565b808603610f2c576000868152600683016020526040902054610eda576000610f25565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f1b9190614081565b610f259190614098565b9450610ffc565b600081815260078301602052604090205460ff16610ffc5781600601600083600a01600181548110610f6057610f606140ba565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f9657610f966140ba565b9060005260206000200154815260200190815260200160002054610fba9190614283565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fef9190614081565b610ff99190614098565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561109257600754611043906001600160a01b038a81169188911661307c565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051611089929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110c2576110c26140ba565b600091825260209091206002600590920201015460ff16156110f65760405162461bcd60e51b8152600401610963906140d0565b60008381526003602052604081205460028054909190811061111a5761111a6140ba565b90600052602060002090600502019050806001015483111561117e5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610963565b60008481526006602052604090205460ff166111ac5760405162461bcd60e51b815260040161096390614210565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121d9190614034565b9150915081421015801561123057508042105b6112755760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610963565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112da9190614247565b505090508681036112ef576127109150611370565b6127106113886112ff868661406e565b6113099190614081565b6113139190614098565b61131d854261406e565b1061136a5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610963565b614e2091505b845460009086906113839060019061406e565b81548110611393576113936140ba565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114169190614296565b611420919061406e565b60008a815260078401602052604090205490915060ff16156114845760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610963565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f29190614296565b905060006127106115038784614081565b61150d9190614098565b6115179083614283565b60008c8152600686016020526040812054919250908211156115c85760008c81526006860160205260409020543490611550908461406e565b116115755760008c8152600686016020526040902054611570908361406e565b611577565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115bf929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115f4908490614283565b909155505060008c815260068601602052604081208054839290611619908490614283565b909155505060008c815260068601602052604090205482116116eb5760008c81526006860160205260408120546009870180549192909161165b908490614283565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118f657828560090154611708919061406e565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177a91906141f5565b156117935760028a01805460ff19166001179055611876565b895460038b0160006117a6876001614283565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161182191815260200190565b602060405180830381865afa15801561183e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118629190614296565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118c3939291906142e9565b6000604051808303818588803b1580156118dc57600080fd5b505af11580156118f0573d6000803e3d6000fd5b50505050505b8034111561191f5761191f61190b823461406e565b6007543391906001600160a01b031661307c565b50505050505050505050505050565b61193782613167565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119b557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166119a96000805160206146428339815191525490565b6001600160a01b031614155b156119d35760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a2d575060408051601f3d908101601f19168201909252611a2a91810190614296565b60015b611a5557604051630c76093760e01b81526001600160a01b0383166004820152602401610963565b6000805160206146428339815191528114611a8657604051632a87526960e21b815260048101829052602401610963565b6000805160206146428339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b51576000836001600160a01b031683604051611aed9190614383565b600060405180830381855af49150503d8060008114611b28576040519150601f19603f3d011682016040523d82523d6000602084013e611b2d565b606091505b5050905080611b4f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ba15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464283398151915290565b60028181548110611bc457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611bf7906142af565b80601f0160208091040260200160405190810160405280929190818152602001828054611c23906142af565b8015611c705780601f10611c4557610100808354040283529160200191611c70565b820191906000526020600020905b815481529060010190602001808311611c5357829003601f168201915b5050505050905083565b611b4f84848484612d19565b6000818152600360205260408120546002805460609392908110611cac57611cac6140ba565b60009182526020822060059091020180549092508290611cce9060019061406e565b81548110611cde57611cde6140ba565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d3c57602002820191906000526020600020905b815481526020019060010190808311611d28575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d6e57611d6e6140ba565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611da257611da26140ba565b90600052602060002090600c02016000018681548110611dc457611dc46140ba565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e469190614247565b506003850154919350915060ff168015611e6a57508183600201541480611e6a5750805b15611e7d57612710945050505050610902565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ebe57611ebe6140ba565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ef257611ef26140ba565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f6957611f696140ba565b60009182526020822060059091020180549092508290611f8b9060019061406e565b81548110611f9b57611f9b6140ba565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201a9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612075573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612099919061439f565b50505050509150506000816120af5783546120b5565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b81526004016109639061440b565b6000836001600160a01b0316838360405161210d9190614383565b60006040518083038185875af1925050503d806000811461214a576040519150601f19603f3d011682016040523d82523d6000602084013e61214f565b606091505b5050905080611b4f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610963565b6121a386868686868633613194565b505050505050565b6000546001600160a01b031633146121d55760405162461bcd60e51b81526004016109639061440b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008681526003602052604081205460028054909190811061221b5761221b6140ba565b6000918252602082206005909102018054909250829061223d9060019061406e565b8154811061224d5761224d6140ba565b90600052602060002090600c020160000187876000818110612271576122716140ba565b9050602002013581548110612288576122886140ba565b60009182526020909120600490910201546001600160a01b031690506122b388888888888887613194565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122eb576122eb6140ba565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061231f5761231f6140ba565b90600052602060002090600c02016000018781548110612341576123416140ba565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123ad5760405162461bcd60e51b81526004016109639061444d565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124388587836144df565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561249b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bf9190614296565b6124c9919061406e565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612564908a908a908a90614130565b60405180910390a25050505050505050565b60008381526003602052604081205460028054839290811061259a5761259a6140ba565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ce576125ce6140ba565b90600052602060002090600c020160000184815481106125f0576125f06140ba565b600091825260209091206004909102016003015460ff169695505050505050565b6001600061261d6138c5565b8054909150600160401b900460ff1680612644575080546001600160401b03808416911610155b156126615760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561268d8585856138e9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146127085760405162461bcd60e51b81526004016109639061444d565b60008381526003602052604090205460028054859290811061272c5761272c6140ba565b600091825260209091206002600590920201015460ff16156127605760405162461bcd60e51b8152600401610963906140d0565b6000848152600360205260408120546002805491929183908110612786576127866140ba565b60009182526020822060059091020180549092506127a69060019061406e565b905060008260000182815481106127bf576127bf6140ba565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612824573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612848919061459e565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128bb9190614176565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561291f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612943919061459e565b98506001600160a01b03891661295f5750505050505050612a23565b61296a848c8b613930565b15612a1657604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a1b565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a4e57612a4e6140ba565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a8257612a826140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b059190614247565b5091509150826004015460001480612b34575080158015612b3457506000828152600284016020526040902054155b15612b46576000945050505050612b77565b8015612b5b575050600401549150612b779050565b506000908152600290910160205260409020549150612b779050565b92915050565b6000546001600160a01b03163314612ba75760405162461bcd60e51b81526004016109639061440b565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bef57612bef6140ba565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c276138c5565b8054909150600160401b900460ff1680612c4e575080546001600160401b03808416911610155b15612c6b5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612d0257612d026140ba565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d3d57612d3d6140ba565b600091825260209091206002600590920201015460ff1615612d715760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddf9190614176565b5090935060019250612def915050565b816004811115612e0157612e016141df565b14612e5e5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610963565b82612e9b5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610963565b60008681526006602052604090205460ff16612ec95760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110612eed57612eed6140ba565b60009182526020822060059091020180549092508290612f0f9060019061406e565b81548110612f1f57612f1f6140ba565b90600052602060002090600c0201905060005b86811015613015573382898984818110612f4e57612f4e6140ba565b9050602002013581548110612f6557612f656140ba565b60009182526020909120600490910201546001600160a01b031614612fcc5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610963565b8582898984818110612fe057612fe06140ba565b9050602002013581548110612ff757612ff76140ba565b60009182526020909120600160049092020181019190915501612f32565b508686905081600501600082825461302d9190614283565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061306a908b908b908b906145ed565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f19350505050156130ab57505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130e657600080fd5b505af11580156130fa573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561314a57600080fd5b505af115801561315e573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146131915760405162461bcd60e51b81526004016109639061440b565b50565b6000878152600360205260409020546002805489929081106131b8576131b86140ba565b600091825260209091206002600590920201015460ff16156131ec5760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061325a9190614176565b509093506002925061326a915050565b81600481111561327c5761327c6141df565b146132d75760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610963565b866133195760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610963565b60008981526006602052604090205460ff166133475760405162461bcd60e51b815260040161096390614210565b60008981526003602052604081205460028054909190811061336b5761336b6140ba565b9060005260206000209060050201905080600101548711156133c65760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610963565b805460009082906133d99060019061406e565b815481106133e9576133e96140ba565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061342e908f9060040190815260200190565b60a060405180830381865afa15801561344b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346f9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ee919061439f565b505050505091505060006135038b8b8b610bae565b905060005b8c81101561378a576001600160a01b038916858f8f8481811061352d5761352d6140ba565b9050602002013581548110613544576135446140ba565b60009182526020909120600490910201546001600160a01b0316146135ab5760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610963565b8215806135f2575081858f8f848181106135c7576135c76140ba565b90506020020135815481106135de576135de6140ba565b906000526020600020906004020160010154145b6136725760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610963565b848e8e83818110613685576136856140ba565b905060200201358154811061369c5761369c6140ba565b600091825260209091206003600490920201015460ff16156136f55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610963565b8b858f8f84818110613709576137096140ba565b9050602002013581548110613720576137206140ba565b60009182526020909120600260049092020101556001858f8f84818110613749576137496140ba565b9050602002013581548110613760576137606140ba565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613508565b5050506004820180548b92506000906137a4908490614283565b90915550506000888152600282016020526040812080548b92906137c9908490614283565b9091555050600181015488036137f857600381015460ff16156137f35760038101805460ff191690555b613871565b60018101546000908152600282016020526040808220548a83529120540361383a57600381015460ff166137f35760038101805460ff19166001179055613871565b60018101546000908152600282016020526040808220548a83529120541115613871576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516138b093929190614611565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138f16139c8565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156139be576000838152600360205260408120546002805491929183908110613964576139646140ba565b60009182526020822060059091020180549092506139849060019061406e565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610be7915050565b5060019392505050565b6139d06139ef565b6139ed57604051631afcd79f60e31b815260040160405180910390fd5b565b60006139f96138c5565b54600160401b900460ff16919050565b600060208284031215613a1b57600080fd5b5035919050565b60008083601f840112613a3457600080fd5b5081356001600160401b03811115613a4b57600080fd5b6020830191508360208260051b8501011115613a6657600080fd5b9250929050565b60008083601f840112613a7f57600080fd5b5081356001600160401b03811115613a9657600080fd5b602083019150836020828501011115613a6657600080fd5b600080600080600080600060a0888a031215613ac957600080fd5b8735965060208801356001600160401b03811115613ae657600080fd5b613af28a828b01613a22565b909750955050604088013593506060880135925060808801356001600160401b03811115613b1f57600080fd5b613b2b8a828b01613a6d565b989b979a50959850939692959293505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613b6557600080fd5b8135602083016000806001600160401b03841115613b8557613b85613b3e565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613bb357613bb3613b3e565b604052838152905080828401871015613bcb57600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613bfd57600080fd5b833592506020840135915060408401356001600160401b03811115613c2157600080fd5b613c2d86828701613b54565b9150509250925092565b6001600160a01b038116811461319157600080fd5b60008060008060808587031215613c6257600080fd5b843593506020850135613c7481613c37565b93969395505050506040820135916060013590565b60008060408385031215613c9c57600080fd5b50508035926020909101359150565b60008060408385031215613cbe57600080fd5b8235613cc981613c37565b915060208301356001600160401b03811115613ce457600080fd5b613cf085828601613b54565b9150509250929050565b60005b83811015613d15578181015183820152602001613cfd565b50506000910152565b60008151808452613d36816020860160208601613cfa565b601f01601f19169290920160200192915050565b602081526000610be76020830184613d1e565b83815282151560208201526060604082015260006109026060830184613d1e565b600080600060608486031215613d9357600080fd5b83359250602084013591506040840135613dac81613c37565b809150509250925092565b60008060008060608587031215613dcd57600080fd5b8435935060208501356001600160401b03811115613dea57600080fd5b613df687828801613a22565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613e41578351835260209384019390920191600101613e23565b509095945050505050565b600080600080600060a08688031215613e6457600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e9c57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613ec857600080fd5b8335613ed381613c37565b92506020840135915060408401356001600160401b03811115613c2157600080fd5b60008060008060008060a08789031215613f0e57600080fd5b8635955060208701356001600160401b03811115613f2b57600080fd5b613f3789828a01613a22565b909650945050604087013592506060870135915060808701356001600160401b03811115613f6457600080fd5b613f7089828a01613b54565b9150509295509295509295565b600060208284031215613f8f57600080fd5b8135610be781613c37565b600080600080600060808688031215613fb257600080fd5b853594506020860135935060408601356001600160401b03811115613fd657600080fd5b613fe288828901613a6d565b96999598509660600135949350505050565b60008060006060848603121561400957600080fd5b833561401481613c37565b9250602084013561402481613c37565b91506040840135613dac81613c37565b6000806040838503121561404757600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b7757612b77614058565b8082028115828204841417612b7757612b77614058565b6000826140b557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152604060208201526000610902604083018486614107565b80516001600160601b038116811461416157600080fd5b919050565b8051801515811461416157600080fd5b600080600080600060a0868803121561418e57600080fd5b6141978661414a565b945060208601516141a781613c37565b6040870151909450600581106141bc57600080fd5b92506141ca60608701614166565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561420757600080fd5b610be782614166565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561425c57600080fd5b8351925061426c60208501614166565b915061427a60408501614166565b90509250925092565b80820180821115612b7757612b77614058565b6000602082840312156142a857600080fd5b5051919050565b600181811c908216806142c357607f821691505b6020821081036142e357634e487b7160e01b600052602260045260246000fd5b50919050565b838152826020820152606060408201526000808354614307816142af565b8060608601526001821660008114614326576001811461434257614376565b60ff1983166080870152608082151560051b8701019350614376565b86600052602060002060005b8381101561436d5781548882016080015260019091019060200161434e565b87016080019450505b5091979650505050505050565b60008251614395818460208701613cfa565b9190910192915050565b600080600080600080600060e0888a0312156143ba57600080fd5b6143c38861414a565b96506143d160208901614166565b604089015160608a015160808b015160a08c01519399509197509550935091506143fd60c08901614166565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b5157806000526020600020601f840160051c810160208510156144b85750805b601f840160051c820191505b818110156144d857600081556001016144c4565b5050505050565b6001600160401b038311156144f6576144f6613b3e565b61450a8361450483546142af565b83614491565b6000601f84116001811461453e57600085156145265750838201355b600019600387901b1c1916600186901b1783556144d8565b600083815260209020601f19861690835b8281101561456f578685013582556020948501946001909201910161454f565b508682101561458c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156145b057600080fd5b8151610be781613c37565b81835260006001600160fb1b038311156145d457600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146016040830185876145bb565b9050826020830152949350505050565b6040815260006146256040830185876145bb565b82810360208401526146378185613d1e565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204611969b7846b8f8df4dbeb55dc71bd009ee535c528de4a12223b6d97dbc9de164736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "CommitCastShutter(uint256,address,bytes32,bytes32,bytes)": { - "details": "Emitted when a vote is cast.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_juror": "The address of the juror casting the vote commitment." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash including the justification.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encoding", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitShutter Added functionality: shielded voting. Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 6613, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6616, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)303" - }, - { - "astId": 6620, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)6552_storage)dyn_storage" - }, - { - "astId": 6624, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6626, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 6634, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 6638, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6640, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)6552_storage)dyn_storage": { - "base": "t_struct(Dispute)6552_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)6590_storage)dyn_storage": { - "base": "t_struct(Round)6590_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)6599_storage)dyn_storage": { - "base": "t_struct(Vote)6599_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)303": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)6552_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 6541, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)6590_storage)dyn_storage" - }, - { - "astId": 6543, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6545, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 6549, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6551, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)6590_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 6556, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)6599_storage)dyn_storage" - }, - { - "astId": 6558, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6562, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6564, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 6566, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6568, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 6572, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6576, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6582, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 6584, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 6587, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 6589, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)6599_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 6592, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6594, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 6596, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 6598, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitShutter_Proxy.json b/contracts/deployments/arbitrumSepolia/DisputeKitShutter_Proxy.json deleted file mode 100644 index 1eab55369..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeKitShutter_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x4991621447184cb4ee4f349d73f852ad6d564fced8a6e758965bafbd54676536", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", - "transactionIndex": 1, - "gasUsed": "199311", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000040000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x855951ef271368e1735aa167bb95c3e131fa812546b24c29c3ed7b14e9dd4955", - "transactionHash": "0x4991621447184cb4ee4f349d73f852ad6d564fced8a6e758965bafbd54676536", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 178241295, - "transactionHash": "0x4991621447184cb4ee4f349d73f852ad6d564fced8a6e758965bafbd54676536", - "address": "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x855951ef271368e1735aa167bb95c3e131fa812546b24c29c3ed7b14e9dd4955" - } - ], - "blockNumber": 178241295, - "cumulativeGasUsed": "199311", - "status": 1, - "byzantium": true - }, - "args": [ - "0x97a1DAAc5aF27383B2c2AB57d8974664A7fe4352", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000e8442307d36e9bf6ab27f1a009f95ce8e11c3479" - ], - "numDeployments": 1, - "solcInputHash": "74873d15f43e245d08be76d8560e80d9", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeResolver.json b/contracts/deployments/arbitrumSepolia/DisputeResolver.json deleted file mode 100644 index a5a098ee0..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeResolver.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "arbitratorDisputeIDToLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplate", - "type": "string" - }, - { - "internalType": "string", - "name": "_disputeTemplateDataMappings", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplateUri", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplateUri", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bytes", - "name": "arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x7bf8850ada03cb9586b27e5f45fb25062c54e687e968ea5e57db3f0fca4c879d", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652", - "transactionIndex": 1, - "gasUsed": "956135", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xda42cc4d3d1a1e470120662712d425a541751f2f34d789332cfb2a928ac6d0b1", - "transactionHash": "0x7bf8850ada03cb9586b27e5f45fb25062c54e687e968ea5e57db3f0fca4c879d", - "logs": [], - "blockNumber": 95251553, - "cumulativeGasUsed": "956135", - "status": 1, - "byzantium": true - }, - "args": [ - "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_arbitratorDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/DisputeResolver.sol\":\"DisputeResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal virtual returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0xee61f409399f0e66be187def6fcbe2e23717475b2b752d913dfac0a32c7dca1a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xb46ff71c32a524a865fe8ca99d94c9daeb690bc9d7d49d963a45b06f60af19f3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610ed7380380610ed783398101604081905261002f91610083565b600080546001600160a01b03199081163317909155600180546001600160a01b03948516908316179055600280549290931691161790556100bd565b6001600160a01b038116811461008057600080fd5b50565b6000806040838503121561009657600080fd5b82516100a18161006b565b60208401519092506100b28161006b565b809150509250929050565b610e0b806100cc6000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea264697066735822122028e3f1561d663e8479b35f936c2645829463b01bf5fedd3e120b732867bda19a64736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea264697066735822122028e3f1561d663e8479b35f936c2645829463b01bf5fedd3e120b732867bda19a64736f6c63430008180033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrator": "The arbitrator of the contract.", - "_arbitratorDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "Target global arbitrator for any disputes." - } - }, - "createDisputeForTemplate(bytes,string,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplate": "Dispute template.", - "_disputeTemplateDataMappings": "The data mappings.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "createDisputeForTemplateUri(bytes,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 14991, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 14994, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)23044" - }, - { - "astId": 14997, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)23215" - }, - { - "astId": 15001, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage" - }, - { - "astId": 15005, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)14989_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)23044": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)23215": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)14989_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 14982, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 14984, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 14986, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 14988, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry.json b/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry.json deleted file mode 100644 index 8e4718672..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "address": "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "DisputeTemplate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "setDisputeTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "templateId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templates", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x78a54be6bb2374cbb6ef218babedcb18eaa5c1c8b917cc370e6ef8a0bffac7f0", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", - "transactionIndex": 1, - "gasUsed": "193742", - "logsBloom": "0x00000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5aff43f61222fce0570e2d9f29fa1bcf5e7ddbe96b642327d680a02f4883c5dc", - "transactionHash": "0x78a54be6bb2374cbb6ef218babedcb18eaa5c1c8b917cc370e6ef8a0bffac7f0", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95251543, - "transactionHash": "0x78a54be6bb2374cbb6ef218babedcb18eaa5c1c8b917cc370e6ef8a0bffac7f0", - "address": "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x5aff43f61222fce0570e2d9f29fa1bcf5e7ddbe96b642327d680a02f4883c5dc" - } - ], - "blockNumber": 95251543, - "cumulativeGasUsed": "193742", - "status": 1, - "byzantium": true - }, - "args": [ - "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeTemplateRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", - "execute": { - "methodName": "initialize2", - "args": [] - }, - "implementation": "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Implementation.json b/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Implementation.json deleted file mode 100644 index 1d584e08b..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Implementation.json +++ /dev/null @@ -1,423 +0,0 @@ -{ - "address": "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "DisputeTemplate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "setDisputeTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "templateId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templates", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x81094bcb02cdfbe03abe06cff23b68361d69bf3cc27d97a6fcb11cc322c759f4", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", - "transactionIndex": 1, - "gasUsed": "636291", - "logsBloom": "0x00000000000000000000000000000001000000000000000000000000000080000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd41f23f49bd948b47c425939bdd8fed42673bf0a54e49748aa17df3f8e45e147", - "transactionHash": "0x81094bcb02cdfbe03abe06cff23b68361d69bf3cc27d97a6fcb11cc322c759f4", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 139235123, - "transactionHash": "0x81094bcb02cdfbe03abe06cff23b68361d69bf3cc27d97a6fcb11cc322c759f4", - "address": "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0xd41f23f49bd948b47c425939bdd8fed42673bf0a54e49748aa17df3f8e45e147" - } - ], - "blockNumber": 139235123, - "cumulativeGasUsed": "636291", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"DisputeTemplate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"setDisputeTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"templateId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"DisputeTemplate(uint256,string,string,string)\":{\"details\":\"To be emitted when a new dispute template is created.\",\"params\":{\"_templateData\":\"The template data.\",\"_templateDataMappings\":\"The data mappings.\",\"_templateId\":\"The identifier of the dispute template.\",\"_templateTag\":\"An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"details\":\"Initializer\",\"params\":{\"_governor\":\"Governor of the contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setDisputeTemplate(string,string,string)\":{\"details\":\"Registers a new dispute template.\",\"params\":{\"_templateData\":\"The data of the template.\",\"_templateDataMappings\":\"The data mappings of the template.\",\"_templateTag\":\"The tag of the template (optional).\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"governor\":{\"details\":\"The governor of the contract.\"},\"templates\":{\"details\":\"The number of templates.\"},\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Dispute Template Registry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/DisputeTemplateRegistry.sol\":\"DisputeTemplateRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/arbitration/DisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\nimport \\\"./interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\n/// @title Dispute Template Registry\\n/// @dev A contract to maintain a registry of dispute templates.\\ncontract DisputeTemplateRegistry is IDisputeTemplateRegistry, UUPSProxiable, Initializable {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev The governor of the contract.\\n address public governor;\\n\\n /// @dev The number of templates.\\n uint256 public templates;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer\\n /// @param _governor Governor of the contract.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Registers a new dispute template.\\n /// @param _templateTag The tag of the template (optional).\\n /// @param _templateData The data of the template.\\n /// @param _templateDataMappings The data mappings of the template.\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId) {\\n templateId = templates++;\\n emit DisputeTemplate(templateId, _templateTag, _templateData, _templateDataMappings);\\n }\\n}\\n\",\"keccak256\":\"0x846514453223bb0f371180dd8b08b83c0b4a794e8cb915cac3321d3e1a5a26a8\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xb46ff71c32a524a865fe8ca99d94c9daeb690bc9d7d49d963a45b06f60af19f3\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610a146100fc600039600081816103010152818161032a01526105270152610a146000f3fe6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078b565b610280565b6100f161012136600461082e565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108df565b34801561018557600080fd5b506100f16101943660046108f2565b610578565b3480156101a557600080fd5b506100f16101b43660046108f2565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361090d565b919050559050836040516102a59190610934565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de929190610950565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109bf8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061097e565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109bf833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109bf8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610934565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109bf83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b815260040161041090610997565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b815260040161041090610997565b50565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115610709576107096106d9565b604051601f8501601f19908116603f01168101908282118183101715610731576107316106d9565b8160405280935085815286868601111561074a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261077557600080fd5b610784838335602085016106ef565b9392505050565b6000806000606084860312156107a057600080fd5b83356001600160401b03808211156107b757600080fd5b6107c387838801610764565b945060208601359150808211156107d957600080fd5b6107e587838801610764565b935060408601359150808211156107fb57600080fd5b5061080886828701610764565b9150509250925092565b80356001600160a01b038116811461082957600080fd5b919050565b6000806040838503121561084157600080fd5b61084a83610812565b915060208301356001600160401b0381111561086557600080fd5b8301601f8101851361087657600080fd5b610885858235602084016106ef565b9150509250929050565b60005b838110156108aa578181015183820152602001610892565b50506000910152565b600081518084526108cb81602086016020860161088f565b601f01601f19169290920160200192915050565b60208152600061078460208301846108b3565b60006020828403121561090457600080fd5b61078482610812565b60006001820161092d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161094681846020870161088f565b9190910192915050565b60408152600061096360408301856108b3565b828103602084015261097581856108b3565b95945050505050565b60006020828403121561099057600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122077c70451c86b4f0fa2f477a69ed75120b197b736aed325df40ecd8d281ec15a864736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078b565b610280565b6100f161012136600461082e565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108df565b34801561018557600080fd5b506100f16101943660046108f2565b610578565b3480156101a557600080fd5b506100f16101b43660046108f2565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361090d565b919050559050836040516102a59190610934565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de929190610950565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109bf8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061097e565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109bf833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109bf8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610934565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109bf83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b815260040161041090610997565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b815260040161041090610997565b50565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115610709576107096106d9565b604051601f8501601f19908116603f01168101908282118183101715610731576107316106d9565b8160405280935085815286868601111561074a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261077557600080fd5b610784838335602085016106ef565b9392505050565b6000806000606084860312156107a057600080fd5b83356001600160401b03808211156107b757600080fd5b6107c387838801610764565b945060208601359150808211156107d957600080fd5b6107e587838801610764565b935060408601359150808211156107fb57600080fd5b5061080886828701610764565b9150509250925092565b80356001600160a01b038116811461082957600080fd5b919050565b6000806040838503121561084157600080fd5b61084a83610812565b915060208301356001600160401b0381111561086557600080fd5b8301601f8101851361087657600080fd5b610885858235602084016106ef565b9150509250929050565b60005b838110156108aa578181015183820152602001610892565b50506000910152565b600081518084526108cb81602086016020860161088f565b601f01601f19169290920160200192915050565b60208152600061078460208301846108b3565b60006020828403121561090457600080fd5b61078482610812565b60006001820161092d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161094681846020870161088f565b9190910192915050565b60408152600061096360408301856108b3565b828103602084015261097581856108b3565b95945050505050565b60006020828403121561099057600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122077c70451c86b4f0fa2f477a69ed75120b197b736aed325df40ecd8d281ec15a864736f6c63430008180033", - "devdoc": { - "details": "A contract to maintain a registry of dispute templates.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "DisputeTemplate(uint256,string,string,string)": { - "details": "To be emitted when a new dispute template is created.", - "params": { - "_templateData": "The template data.", - "_templateDataMappings": "The data mappings.", - "_templateId": "The identifier of the dispute template.", - "_templateTag": "An optional tag for the dispute template, such as \"registration\" or \"removal\"." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "initialize(address)": { - "details": "Initializer", - "params": { - "_governor": "Governor of the contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setDisputeTemplate(string,string,string)": { - "details": "Registers a new dispute template.", - "params": { - "_templateData": "The data of the template.", - "_templateDataMappings": "The data mappings of the template.", - "_templateTag": "The tag of the template (optional)." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "governor": { - "details": "The governor of the contract." - }, - "templates": { - "details": "The number of templates." - }, - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "Dispute Template Registry", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 8294, - "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 8297, - "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", - "label": "templates", - "offset": 0, - "slot": "1", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Proxy.json b/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Proxy.json deleted file mode 100644 index 35034c61a..000000000 --- a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x78a54be6bb2374cbb6ef218babedcb18eaa5c1c8b917cc370e6ef8a0bffac7f0", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", - "transactionIndex": 1, - "gasUsed": "193742", - "logsBloom": "0x00000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5aff43f61222fce0570e2d9f29fa1bcf5e7ddbe96b642327d680a02f4883c5dc", - "transactionHash": "0x78a54be6bb2374cbb6ef218babedcb18eaa5c1c8b917cc370e6ef8a0bffac7f0", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95251543, - "transactionHash": "0x78a54be6bb2374cbb6ef218babedcb18eaa5c1c8b917cc370e6ef8a0bffac7f0", - "address": "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x5aff43f61222fce0570e2d9f29fa1bcf5e7ddbe96b642327d680a02f4883c5dc" - } - ], - "blockNumber": 95251543, - "cumulativeGasUsed": "193742", - "status": 1, - "byzantium": true - }, - "args": [ - "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeTemplateRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/EvidenceModule.json b/contracts/deployments/arbitrumSepolia/EvidenceModule.json deleted file mode 100644 index 876d7f1ca..000000000 --- a/contracts/deployments/arbitrumSepolia/EvidenceModule.json +++ /dev/null @@ -1,274 +0,0 @@ -{ - "address": "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_party", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "Evidence", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "submitEvidence", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x9b68f5d8657d7a2fcaab3327684238f02cf41afac6c673ed030a09d8a4a84f7c", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", - "transactionIndex": 1, - "gasUsed": "201064", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000004000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x756b1e7c8af15e913d51c92bd1b0499888f6a7843f512450d46a0a46220acfae", - "transactionHash": "0x9b68f5d8657d7a2fcaab3327684238f02cf41afac6c673ed030a09d8a4a84f7c", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95247733, - "transactionHash": "0x9b68f5d8657d7a2fcaab3327684238f02cf41afac6c673ed030a09d8a4a84f7c", - "address": "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x756b1e7c8af15e913d51c92bd1b0499888f6a7843f512450d46a0a46220acfae" - } - ], - "blockNumber": 95247733, - "cumulativeGasUsed": "201064", - "status": 1, - "byzantium": true - }, - "args": [ - "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"EvidenceModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", - "execute": { - "methodName": "initialize2", - "args": [] - }, - "implementation": "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/EvidenceModule_Implementation.json b/contracts/deployments/arbitrumSepolia/EvidenceModule_Implementation.json deleted file mode 100644 index f4d8edd0b..000000000 --- a/contracts/deployments/arbitrumSepolia/EvidenceModule_Implementation.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "address": "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_party", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "Evidence", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "submitEvidence", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x945c6b6b6ad6d37482c3a8ebb542ae3dbd0337b2279388ffab424d6dacd78eea", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", - "transactionIndex": 1, - "gasUsed": "576517", - "logsBloom": "0x00008000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8bbf5d1c8f8eee29b8a19cc13bba4148cf03b0676bc7b699cfc9fff73ef5a66f", - "transactionHash": "0x945c6b6b6ad6d37482c3a8ebb542ae3dbd0337b2279388ffab424d6dacd78eea", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 139235174, - "transactionHash": "0x945c6b6b6ad6d37482c3a8ebb542ae3dbd0337b2279388ffab424d6dacd78eea", - "address": "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x8bbf5d1c8f8eee29b8a19cc13bba4148cf03b0676bc7b699cfc9fff73ef5a66f" - } - ], - "blockNumber": 139235174, - "cumulativeGasUsed": "576517", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_party\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"Evidence\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Evidence(uint256,address,string)\":{\"details\":\"To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\",\"params\":{\"_evidence\":\"Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\",\"_party\":\"The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"details\":\"Initializer.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"submitEvidence(uint256,string)\":{\"details\":\"Submits evidence for a dispute.\",\"params\":{\"_evidence\":\"Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Evidence Module\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/evidence/EvidenceModule.sol\":\"EvidenceModule\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/evidence/EvidenceModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport \\\"../interfaces/IEvidence.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title Evidence Module\\ncontract EvidenceModule is IEvidence, Initializable, UUPSProxiable {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submits evidence for a dispute.\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\\n /// @param _evidence Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\\n function submitEvidence(uint256 _externalDisputeID, string calldata _evidence) external {\\n emit Evidence(_externalDisputeID, msg.sender, _evidence);\\n }\\n}\\n\",\"keccak256\":\"0xedf978718e5d349c5a39747e2c4da253a1d8b73588c4118b74b39c324ba471fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IEvidence.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IEvidence\\ninterface IEvidence {\\n /// @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\\n /// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\\n /// @param _evidence Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\\n event Evidence(uint256 indexed _externalDisputeID, address indexed _party, string _evidence);\\n}\\n\",\"keccak256\":\"0xa881a6604ffe43044edee5a789363e19b78af854092fe1e322d75a140150714c\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516108ff6100fc6000396000818161024a01528181610273015261047001526108ff6000f3fe6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Evidence(uint256,address,string)": { - "details": "To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).", - "params": { - "_evidence": "Stringified evidence object, example: '{\"name\" : \"Justification\", \"description\" : \"Description\", \"fileURI\" : \"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\"}'.", - "_externalDisputeID": "Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.", - "_party": "The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "initialize(address)": { - "details": "Initializer.", - "params": { - "_governor": "The governor's address." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "submitEvidence(uint256,string)": { - "details": "Submits evidence for a dispute.", - "params": { - "_evidence": "Stringified evidence object, example: '{\"name\" : \"Justification\", \"description\" : \"Description\", \"fileURI\" : \"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\"}'.", - "_externalDisputeID": "Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "Evidence Module", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 21480, - "contract": "src/arbitration/evidence/EvidenceModule.sol:EvidenceModule", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/EvidenceModule_Proxy.json b/contracts/deployments/arbitrumSepolia/EvidenceModule_Proxy.json deleted file mode 100644 index 19d03ac36..000000000 --- a/contracts/deployments/arbitrumSepolia/EvidenceModule_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x9b68f5d8657d7a2fcaab3327684238f02cf41afac6c673ed030a09d8a4a84f7c", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", - "transactionIndex": 1, - "gasUsed": "201064", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000004000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x756b1e7c8af15e913d51c92bd1b0499888f6a7843f512450d46a0a46220acfae", - "transactionHash": "0x9b68f5d8657d7a2fcaab3327684238f02cf41afac6c673ed030a09d8a4a84f7c", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95247733, - "transactionHash": "0x9b68f5d8657d7a2fcaab3327684238f02cf41afac6c673ed030a09d8a4a84f7c", - "address": "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x756b1e7c8af15e913d51c92bd1b0499888f6a7843f512450d46a0a46220acfae" - } - ], - "blockNumber": 95247733, - "cumulativeGasUsed": "201064", - "status": 1, - "byzantium": true - }, - "args": [ - "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"EvidenceModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206156b4d247e9775a938a1d5238ff9222ccea78aa0d46323980701cdafc6c1e2d64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206156b4d247e9775a938a1d5238ff9222ccea78aa0d46323980701cdafc6c1e2d64736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/KlerosCore.json b/contracts/deployments/arbitrumSepolia/KlerosCore.json deleted file mode 100644 index 412ddd1cd..000000000 --- a/contracts/deployments/arbitrumSepolia/KlerosCore.json +++ /dev/null @@ -1,2056 +0,0 @@ -{ - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "AppealPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "CannotDisableClassicDK", - "type": "error" - }, - { - "inputs": [], - "name": "CommitPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitNotSupportedByCourt", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitOnly", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "DisputePeriodIsFinal", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeStillDrawing", - "type": "error" - }, - { - "inputs": [], - "name": "EvidenceNotPassedAndNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GuardianOrGovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDisputKitParent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "MinStakeLowerThanParentCourt", - "type": "error" - }, - { - "inputs": [], - "name": "MustSupportDisputeKitClassic", - "type": "error" - }, - { - "inputs": [], - "name": "NotEvidencePeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotExecutionPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "SortitionModuleOnly", - "type": "error" - }, - { - "inputs": [], - "name": "StakingInTooManyCourts", - "type": "error" - }, - { - "inputs": [], - "name": "StakingLessThanCourtMinStake", - "type": "error" - }, - { - "inputs": [], - "name": "StakingNotPossibleInThisCourt", - "type": "error" - }, - { - "inputs": [], - "name": "StakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "StakingZeroWhenNoStake", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnstakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "inputs": [], - "name": "UnsupportedDisputeKit", - "type": "error" - }, - { - "inputs": [], - "name": "VotePeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "WhenNotPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WhenPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WrongDisputeKitIndex", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "DisputeKitCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "DisputeKitEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_fromDisputeKitID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toDisputeKitID", - "type": "uint256" - } - ], - "name": "DisputeKitJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreBase.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "addNewDisputeKit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_guardian", - "type": "address" - } - ], - "name": "changeGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - } - ], - "name": "changeJurorProsecutionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeKits", - "outputs": [ - { - "internalType": "contract IDisputeKit", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreBase.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "uint256", - "name": "nbDrawnJurors", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256[]", - "name": "_disputeKitIDs", - "type": "uint256[]" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "enableDisputeKits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getDisputeKitsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getPnkAtStakePerJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "disputeKitID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkAtStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "repartitions", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkPenalties", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "drawnJurors", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumPnkRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "drawIterations", - "type": "uint256" - } - ], - "internalType": "struct KlerosCoreBase.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_guardian", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "_disputeKit", - "type": "address" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModuleAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "isDisputeKitJumping", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - } - ], - "name": "isSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorProsecutionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "passPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStakeBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "contract ISortitionModule", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "transactionIndex": 2, - "gasUsed": "611101", - "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000001000000000000000000000000010040000000000000000008000000000020000000000000010000800402000000000000008000000000000000000000001000020000800000000000000000000000080000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000020000000000000000000000000000000004000000000000000060000000001001000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487", - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 95250346, - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000c38f115d001d3b5bbec5e8d44f78c7b61a27d94" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487" - }, - { - "transactionIndex": 2, - "blockNumber": 95250346, - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 4, - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487" - }, - { - "transactionIndex": 2, - "blockNumber": 95250346, - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 5, - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487" - }, - { - "transactionIndex": 2, - "blockNumber": 95250346, - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 6, - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487" - } - ], - "blockNumber": 95250346, - "cumulativeGasUsed": "696476", - "status": 1, - "byzantium": true - }, - "args": [ - "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55", - "0x7b4f3cc5000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c38f115d001d3b5bbec5e8d44f78c7b61a27d94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000200000000000000000000000000baa5068f0bd1417046250a3ede2b1f27e31383bd00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 5, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122013d7994215e0250a3caf5a61db41d7e3f7d36bd4d6c352ddb4eb5213b4783ea264736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122013d7994215e0250a3caf5a61db41d7e3f7d36bd4d6c352ddb4eb5213b4783ea264736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511" - ] - }, - "implementation": "0x02F607722749CECd32db07AA0b0755281FE9D13c", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/KlerosCoreSnapshotProxy.json b/contracts/deployments/arbitrumSepolia/KlerosCoreSnapshotProxy.json deleted file mode 100644 index d24c1bea4..000000000 --- a/contracts/deployments/arbitrumSepolia/KlerosCoreSnapshotProxy.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "address": "0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IKlerosCore", - "name": "_core", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IKlerosCore", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract IKlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "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" - } - ], - "transactionHash": "0x951a0309da4f71c199c36e0004ba7a67e1c68f4135942ee062040b6bf4edcf2f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C", - "transactionIndex": 1, - "gasUsed": "363319", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa62b5ceb98b8de3cd5d3f142c7384221d1d823adb28dcc8c9ae7945f22542274", - "transactionHash": "0x951a0309da4f71c199c36e0004ba7a67e1c68f4135942ee062040b6bf4edcf2f", - "logs": [], - "blockNumber": 121346526, - "cumulativeGasUsed": "363319", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479" - ], - "numDeployments": 1, - "solcInputHash": "ede3f7f4426109631936df3b8acee8f2", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"balanceOf(address)\":{\"details\":\"Returns the amount of PNK staked in KlerosV2 for a particular address. Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\",\"params\":{\"_account\":\"The address to query.\"},\"returns\":{\"totalStaked\":\"Total amount staked in V2 by the address.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_core\":\"KlerosCore to read the balance from.\",\"_governor\":\"The governor of the contract.\"}}},\"title\":\"KlerosCoreSnapshotProxy Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":\"KlerosCoreSnapshotProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface IKlerosCore {\\n function sortitionModule() external view returns (ISortitionModule);\\n}\\n\\n/// @title KlerosCoreSnapshotProxy\\n/// Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\\ncontract KlerosCoreSnapshotProxy {\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n IKlerosCore public core;\\n address public governor;\\n string public constant name = \\\"Staked Pinakion\\\";\\n string public constant symbol = \\\"stPNK\\\";\\n uint8 public constant decimals = 18;\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _governor The governor of the contract.\\n /// @param _core KlerosCore to read the balance from.\\n constructor(address _governor, IKlerosCore _core) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(IKlerosCore _core) external onlyByGovernor {\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Returns the amount of PNK staked in KlerosV2 for a particular address.\\n /// Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\\n /// @param _account The address to query.\\n /// @return totalStaked Total amount staked in V2 by the address.\\n function balanceOf(address _account) external view returns (uint256 totalStaked) {\\n (totalStaked, , , ) = core.sortitionModule().getJurorBalance(_account, 0);\\n }\\n}\\n\",\"keccak256\":\"0xf9516838d21bc8b4d8776d8d8b0b17d46ebb3d0940c055c09944f7f35adfd99d\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161053338038061053383398101604081905261002f91610078565b600180546001600160a01b039384166001600160a01b031991821617909155600080549290931691161790556100b2565b6001600160a01b038116811461007557600080fd5b50565b6000806040838503121561008b57600080fd5b825161009681610060565b60208401519092506100a781610060565b809150509250929050565b610472806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610383565b610186565b6040519081526020016100b8565b61013a610135366004610383565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610383565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a7565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c4565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103fa565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103fa565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006020808352835180602085015260005b8181101561034a5785810183015185820160400152820161032e565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461038057600080fd5b50565b60006020828403121561039557600080fd5b81356103a08161036b565b9392505050565b6000602082840312156103b957600080fd5b81516103a08161036b565b600080600080608085870312156103da57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea2646970667358221220ae7b8da51562210a09a90e77fc37c7a9669fa0ff5f919ec51b43ac365aace78464736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610383565b610186565b6040519081526020016100b8565b61013a610135366004610383565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610383565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a7565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c4565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103fa565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103fa565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006020808352835180602085015260005b8181101561034a5785810183015185820160400152820161032e565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461038057600080fd5b50565b60006020828403121561039557600080fd5b81356103a08161036b565b9392505050565b6000602082840312156103b957600080fd5b81516103a08161036b565b600080600080608085870312156103da57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea2646970667358221220ae7b8da51562210a09a90e77fc37c7a9669fa0ff5f919ec51b43ac365aace78464736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": { - "balanceOf(address)": { - "details": "Returns the amount of PNK staked in KlerosV2 for a particular address. Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.", - "params": { - "_account": "The address to query." - }, - "returns": { - "totalStaked": "Total amount staked in V2 by the address." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_core": "KlerosCore to read the balance from.", - "_governor": "The governor of the contract." - } - } - }, - "title": "KlerosCoreSnapshotProxy Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 216, - "contract": "src/arbitration/view/KlerosCoreSnapshotProxy.sol:KlerosCoreSnapshotProxy", - "label": "core", - "offset": 0, - "slot": "0", - "type": "t_contract(IKlerosCore)212" - }, - { - "astId": 218, - "contract": "src/arbitration/view/KlerosCoreSnapshotProxy.sol:KlerosCoreSnapshotProxy", - "label": "governor", - "offset": 0, - "slot": "1", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_contract(IKlerosCore)212": { - "encoding": "inplace", - "label": "contract IKlerosCore", - "numberOfBytes": "20" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/KlerosCore_Implementation.json b/contracts/deployments/arbitrumSepolia/KlerosCore_Implementation.json deleted file mode 100644 index 9f84f18ab..000000000 --- a/contracts/deployments/arbitrumSepolia/KlerosCore_Implementation.json +++ /dev/null @@ -1,2849 +0,0 @@ -{ - "address": "0x02F607722749CECd32db07AA0b0755281FE9D13c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "AppealPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "CannotDisableClassicDK", - "type": "error" - }, - { - "inputs": [], - "name": "CommitPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitNotSupportedByCourt", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitOnly", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "DisputePeriodIsFinal", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeStillDrawing", - "type": "error" - }, - { - "inputs": [], - "name": "EvidenceNotPassedAndNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GuardianOrGovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDisputKitParent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "MinStakeLowerThanParentCourt", - "type": "error" - }, - { - "inputs": [], - "name": "MustSupportDisputeKitClassic", - "type": "error" - }, - { - "inputs": [], - "name": "NotEvidencePeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotExecutionPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "SortitionModuleOnly", - "type": "error" - }, - { - "inputs": [], - "name": "StakingInTooManyCourts", - "type": "error" - }, - { - "inputs": [], - "name": "StakingLessThanCourtMinStake", - "type": "error" - }, - { - "inputs": [], - "name": "StakingNotPossibleInThisCourt", - "type": "error" - }, - { - "inputs": [], - "name": "StakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "StakingZeroWhenNoStake", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnstakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "inputs": [], - "name": "UnsupportedDisputeKit", - "type": "error" - }, - { - "inputs": [], - "name": "VotePeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "WhenNotPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WhenPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WrongDisputeKitIndex", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "DisputeKitCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "DisputeKitEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_fromDisputeKitID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toDisputeKitID", - "type": "uint256" - } - ], - "name": "DisputeKitJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreBase.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "addNewDisputeKit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_guardian", - "type": "address" - } - ], - "name": "changeGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - } - ], - "name": "changeJurorProsecutionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeKits", - "outputs": [ - { - "internalType": "contract IDisputeKit", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreBase.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "uint256", - "name": "nbDrawnJurors", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256[]", - "name": "_disputeKitIDs", - "type": "uint256[]" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "enableDisputeKits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getDisputeKitsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getPnkAtStakePerJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "disputeKitID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkAtStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "repartitions", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkPenalties", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "drawnJurors", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumPnkRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "drawIterations", - "type": "uint256" - } - ], - "internalType": "struct KlerosCoreBase.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_guardian", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "_disputeKit", - "type": "address" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModuleAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "isDisputeKitJumping", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - } - ], - "name": "isSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorProsecutionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "passPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStakeBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "contract ISortitionModule", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xdaddd52424ba1490e09360d58a1212288229c3121e70ee3a6f22135d07afbdd1", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x02F607722749CECd32db07AA0b0755281FE9D13c", - "transactionIndex": 2, - "gasUsed": "5292671", - "logsBloom": "0x00000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa55a3bec630c3202c7010b20dc588378dfd32656a84734d9964fe9a3f5aa951a", - "transactionHash": "0xdaddd52424ba1490e09360d58a1212288229c3121e70ee3a6f22135d07afbdd1", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 179580745, - "transactionHash": "0xdaddd52424ba1490e09360d58a1212288229c3121e70ee3a6f22135d07afbdd1", - "address": "0x02F607722749CECd32db07AA0b0755281FE9D13c", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 1, - "blockHash": "0xa55a3bec630c3202c7010b20dc588378dfd32656a84734d9964fe9a3f5aa951a" - } - ], - "blockNumber": 179580745, - "cumulativeGasUsed": "5354547", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 5, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotDisableClassicDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitNotSupportedByCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputePeriodIsFinal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeStillDrawing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EvidenceNotPassedAndNotAppeal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GuardianOrGovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingInTooManyCourts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingLessThanCourtMinStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingNotPossibleInThisCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingZeroWhenNoStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnstakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedDisputeKit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotePeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenNotPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"}],\"name\":\"changeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nbDrawnJurors\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getPnkAtStakePerJuror\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreBase.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeGuardian(address)\":{\"details\":\"Changes the `guardian` storage variable.\",\"params\":{\"_guardian\":\"The new value for the `guardian` storage variable.\"}},\"changeJurorProsecutionModule(address)\":{\"details\":\"Changes the `jurorProsecutionModule` storage variable.\",\"params\":{\"_jurorProsecutionModule\":\"The new value for the `jurorProsecutionModule` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"changeSortitionModule(address)\":{\"details\":\"Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.\",\"params\":{\"_sortitionModule\":\"The new value for the `sortitionModule` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],bytes,uint256[])\":{\"details\":\"Creates a court under a specified parent court.\",\"params\":{\"_alpha\":\"The `alpha` property value of the court.\",\"_feeForJuror\":\"The `feeForJuror` property value of the court.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the court.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the court.\",\"_minStake\":\"The `minStake` property value of the court.\",\"_parent\":\"The `parent` property value of the court.\",\"_sortitionExtraData\":\"Extra data for sortition module.\",\"_supportedDisputeKits\":\"Indexes of dispute kits that this court will support.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the court.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws jurors for the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\"},\"returns\":{\"nbDrawnJurors\":\"The total number of jurors drawn in the round.\"}},\"enableDisputeKits(uint96,uint256[],bool)\":{\"details\":\"Adds/removes court's support for specified dispute kits.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_disputeKitIDs\":\"The IDs of dispute kits which support should be added/removed.\",\"_enable\":\"Whether add or remove the dispute kits from the court.\"}},\"execute(uint256,uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts. Note: Reward distributions are forbidden during pause.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\",\"_round\":\"The appeal round.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"executeRuling(uint256)\":{\"details\":\"Executes a specified dispute's ruling.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Gets the number of rounds for a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"The number of rounds.\"}},\"getNumberOfVotes(uint256)\":{\"details\":\"Gets the number of votes permitted for the specified dispute in the latest round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getPnkAtStakePerJuror(uint256,uint256)\":{\"details\":\"Gets the PNK at stake per juror for a specified dispute and round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The round to get the info for.\"},\"returns\":{\"_0\":\"pnkAtStakePerJuror The PNK at stake per juror.\"}},\"getRoundInfo(uint256,uint256)\":{\"details\":\"Gets the round info for a specified dispute and round.This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The round to get the info for.\"},\"returns\":{\"_0\":\"round The round info.\"}},\"getTimesPerPeriod(uint96)\":{\"details\":\"Gets the timesPerPeriod array for a given court.\",\"params\":{\"_courtID\":\"The ID of the court to get the times from.\"},\"returns\":{\"timesPerPeriod\":\"The timesPerPeriod array for the given court.\"}},\"initialize(address,address,address,address,address,bool,uint256[4],uint256[4],bytes,address,address)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_disputeKit\":\"The address of the default dispute kit.\",\"_governor\":\"The governor's address.\",\"_guardian\":\"The guardian's address.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_jurorProsecutionModule\":\"The address of the juror prosecution module.\",\"_pinakion\":\"The address of the token contract.\",\"_sortitionExtraData\":\"The extra data for sortition module.\",\"_sortitionModuleAddress\":\"The sortition module responsible for sortition of the jurors.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the general court.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isDisputeKitJumping(uint256)\":{\"details\":\"Returns true if the dispute kit will be switched to a parent DK.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"Whether DK will be switched or not.\"}},\"isSupported(uint96,uint256)\":{\"details\":\"Checks if a given dispute kit is supported by a given court.\",\"params\":{\"_courtID\":\"The ID of the court to check the support for.\",\"_disputeKitID\":\"The ID of the dispute kit to check the support for.\"},\"returns\":{\"_0\":\"Whether the dispute kit is supported or not.\"}},\"passPeriod(uint256)\":{\"details\":\"Passes the period of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"pause()\":{\"details\":\"Pause staking and reward execution. Can only be done by guardian or governor.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setStake(uint96,uint256)\":{\"details\":\"Sets the caller's stake in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake. Note that the existing delayed stake will be nullified as non-relevant.\"}},\"setStakeBySortitionModule(address,uint96,uint256)\":{\"details\":\"Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\",\"params\":{\"_account\":\"The account whose stake is being set.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"}},\"transferBySortitionModule(address,uint256)\":{\"details\":\"Transfers PNK to the juror by SortitionModule.\",\"params\":{\"_account\":\"The account of the juror whose PNK to transfer.\",\"_amount\":\"The amount to transfer.\"}},\"unpause()\":{\"details\":\"Unpause staking and reward execution. Can only be done by governor.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"KlerosCore Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/KlerosCore.sol\":\"KlerosCore\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051615d166100fc600039600081816119be015281816119e70152611bdc0152615d166000f3fe6080604052600436106102d45760003560e01c80637934c0be1161017b578063c3569902116100d7578063e4c0aaf411610085578063e4c0aaf4146109a7578063f6506db4146109c7578063f7434ea9146109e7578063f7e7d1fd14610a07578063fbf405b014610a27578063fc6f8f1614610a47578063fe524c3914610a6757600080fd5b8063c3569902146108df578063c71f4253146108f2578063cf0c38f814610912578063d07368bd14610932578063d2b8035a14610952578063d4d1d76a14610972578063d98493f61461098757600080fd5b80638bb04875116101345780638bb04875146107f7578063a072b86c14610817578063acdbf51d14610837578063afe15cfb14610857578063b00496371461088c578063c13517e1146108ac578063c258bb19146108bf57600080fd5b80637934c0be1461073557806382d02237146107555780638456cb591461077557806386541b241461078a57806386cdecef146107aa5780638a9bb02a146107ca57600080fd5b80632e1daf2f1161023557806352d1902d116101e357806352d1902d1461063657806354fd4d501461064b578063564a565d1461068a57806359ec827e146106bb5780635c975abb146106db578063751accd0146106f55780637717a6e81461071557600080fd5b80632e1daf2f146105615780632fcb4f04146105815780633cfd1184146105a15780633f4ba83a146105ce57806342c37fa3146105e3578063452a9320146106035780634f1ef2861461062357600080fd5b80631860592b116102925780631860592b1461040057806319b815291461042e5780631c3db16d1461045e5780631f5a0dd21461049b5780632c053739146104fc5780632d29a47b1461051c5780632d68efc91461053c57600080fd5b8062f5822c146102d95780630219da79146102fb5780630761c14d146103735780630b7414bc146103935780630c340a24146103b3578063115d5376146103e0575b600080fd5b3480156102e557600080fd5b506102f96102f4366004614e43565b610a87565b005b34801561030757600080fd5b50610346610316366004614e43565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037f57600080fd5b506102f961038e366004614e7e565b610ad4565b34801561039f57600080fd5b506102f96103ae366004614f94565b610b12565b3480156103bf57600080fd5b506000546103d3906001600160a01b031681565b60405161036a9190614ff5565b3480156103ec57600080fd5b506102f96103fb366004615009565b610c43565b34801561040c57600080fd5b5061042061041b366004615022565b611210565b60405190815260200161036a565b34801561043a57600080fd5b5061044e610449366004615009565b61126a565b604051901515815260200161036a565b34801561046a57600080fd5b5061047e610479366004615009565b611363565b60408051938452911515602084015215159082015260600161036a565b3480156104a757600080fd5b506104bb6104b6366004615009565b611464565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161036a565b34801561050857600080fd5b506102f961051736600461512a565b6114c3565b34801561052857600080fd5b506102f9610537366004615217565b61159d565b34801561054857600080fd5b506009546103d39061010090046001600160a01b031681565b34801561056d57600080fd5b506004546103d3906001600160a01b031681565b34801561058d57600080fd5b506102f961059c366004614e43565b611829565b3480156105ad57600080fd5b506105c16105bc366004615243565b611876565b60405161036a9190615281565b3480156105da57600080fd5b506102f96118e0565b3480156105ef57600080fd5b506102f96105fe366004615022565b611963565b34801561060f57600080fd5b506001546103d3906001600160a01b031681565b6102f961063136600461528f565b6119aa565b34801561064257600080fd5b50610420611bcf565b34801561065757600080fd5b5061067d604051806040016040528060068152602001650302e31302e360d41b81525081565b60405161036a919061532e565b34801561069657600080fd5b506106aa6106a5366004615009565b611c2d565b60405161036a959493929190615379565b3480156106c757600080fd5b506104206106d6366004615009565b611c89565b3480156106e757600080fd5b5060095461044e9060ff1681565b34801561070157600080fd5b506102f96107103660046153b8565b611dde565b34801561072157600080fd5b506102f9610730366004615410565b611e88565b34801561074157600080fd5b506102f961075036600461542c565b611eb9565b34801561076157600080fd5b506102f9610770366004615465565b611f38565b34801561078157600080fd5b506102f9611ff5565b34801561079657600080fd5b506102f96107a53660046154b7565b612095565b3480156107b657600080fd5b506104206107c5366004615525565b612272565b3480156107d657600080fd5b506107ea6107e5366004615525565b6122c3565b60405161036a919061558c565b34801561080357600080fd5b506102f9610812366004615009565b61244f565b34801561082357600080fd5b506102f9610832366004615632565b6125b4565b34801561084357600080fd5b506103d3610852366004615009565b6128ec565b34801561086357600080fd5b50610877610872366004615009565b612916565b6040805192835260208301919091520161036a565b34801561089857600080fd5b506102f96108a7366004614e43565b6129c2565b6104206108ba3660046156f6565b612a0f565b3480156108cb57600080fd5b506102f96108da366004614e43565b612a47565b6102f96108ed366004615726565b612a94565b3480156108fe57600080fd5b5061042061090d366004615009565b612f59565b34801561091e57600080fd5b506003546103d3906001600160a01b031681565b34801561093e57600080fd5b506102f961094d366004614e43565b612fc1565b34801561095e57600080fd5b5061042061096d366004615525565b61306a565b34801561097e57600080fd5b50600654610420565b34801561099357600080fd5b506104206109a23660046157a7565b613389565b3480156109b357600080fd5b506102f96109c2366004614e43565b6133d6565b3480156109d357600080fd5b506104206109e23660046157f2565b613423565b3480156109f357600080fd5b50610420610a02366004615858565b613507565b348015610a1357600080fd5b506102f9610a22366004614e43565b613553565b348015610a3357600080fd5b506002546103d3906001600160a01b031681565b348015610a5357600080fd5b50610420610a62366004615009565b61362a565b348015610a7357600080fd5b5061044e610a82366004615410565b613659565b6000546001600160a01b03163314610ab25760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314610aff57604051639d6cab9960e01b815260040160405180910390fd5b610b0c83838360016136a1565b50505050565b6000546001600160a01b03163314610b3d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0c578115610bdc57828181518110610b6157610b6161588c565b602002602001015160001480610b9457506006548351849083908110610b8957610b8961588c565b602002602001015110155b15610bb257604051633d58a98960e11b815260040160405180910390fd5b610bd784848381518110610bc857610bc861588c565b6020026020010151600161391d565b610c3b565b6001838281518110610bf057610bf061588c565b602002602001015103610c16576040516356d111fd60e11b815260040160405180910390fd5b610c3b84848381518110610c2c57610c2c61588c565b6020026020010151600061391d565b600101610b40565b600060078281548110610c5857610c5861588c565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c8b57610c8b61588c565b6000918252602082206003850154600c909202019250610cad906001906158b8565b90506000836003018281548110610cc657610cc661588c565b600091825260208220600b909102019150600185015460ff166004811115610cf057610cf0615341565b03610dcb5781158015610d3f57506001840154600684019060ff166004811115610d1c57610d1c615341565b60048110610d2c57610d2c61588c565b01546002850154610d3d90426158b8565b105b15610d5d57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d85576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d9c576002610d9f565b60015b60018086018054909160ff1990911690836004811115610dc157610dc1615341565b02179055506111c2565b60018085015460ff166004811115610de557610de5615341565b03610ef5576001840154600684019060ff166004811115610e0857610e08615341565b60048110610e1857610e1861588c565b01546002850154610e2990426158b8565b108015610ec057506006816000015481548110610e4857610e4861588c565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebe91906158cb565b155b15610ede57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610dc1565b6002600185015460ff166004811115610f1057610f10615341565b0361105e576001840154600684019060ff166004811115610f3357610f33615341565b60048110610f4357610f4361588c565b01546002850154610f5490426158b8565b108015610feb57506006816000015481548110610f7357610f7361588c565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610fc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe991906158cb565b155b1561100957604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36111c2565b6003600185015460ff16600481111561107957611079615341565b03611189576001840154600684019060ff16600481111561109c5761109c615341565b600481106110ac576110ac61588c565b015460028501546110bd90426158b8565b108015611154575060068160000154815481106110dc576110dc61588c565b600091825260209091200154604051630855bbe960e01b8152600481018790526001600160a01b0390911690630855bbe990602401602060405180830381865afa15801561112e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115291906158cb565b155b1561117257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610dc1565b6004600185015460ff1660048111156111a4576111a4615341565b036111c2576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916112019160ff16906158e8565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061124d90600160481b900460ff16600a6159dd565b61125790846159ec565b6112619190615a19565b90505b92915050565b600080600783815481106112805761128061588c565b60009182526020822060036004909202019081018054919350906112a6906001906158b8565b815481106112b6576112b661588c565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106112eb576112eb61588c565b90600052602060002090600c0201905080600501548260030154101561131657506000949350505050565b80546005805490916001600160601b03169081106113365761133661588c565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061137c5761137c61588c565b60009182526020822060036004909202019081018054919350906113a2906001906158b8565b815481106113b2576113b261588c565b90600052602060002090600b02019050600060068260000154815481106113db576113db61588c565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611430573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114549190615a2d565b9199909850909650945050505050565b6005818154811061147457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600160006114cf6139a5565b8054909150600160401b900460ff16806114f6575080546001600160401b03808416911610155b156115135760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556115478d8d8d8d8d8d8d8d8d8d8d6139c9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff16156115c157604051636f1dac1d60e01b815260040160405180910390fd5b600080600785815481106115d7576115d761588c565b600091825260209091206004918202019150600182015460ff16600481111561160257611602615341565b1461162057604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106116355761163561588c565b6000918252602082206004600b909202019081015490935091506116598483615a66565b600584015460068501546002860154929350909160009061167b908390615a19565b905060008660010154905060008060068960000154815481106116a0576116a061588c565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156116fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117209190615a79565b9150508060000361173c5783861115611737578395505b61175c565b6117478460026159ec565b86111561175c576117598460026159ec565b95505b60048801869055865b8681101561180857848110156117be576117b76040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613d0c565b9550611800565b6118006040518061010001604052808e81526020018d8152602001848152602001878152602001868152602001858152602001888152602001838152506141ba565b600101611765565b508488600501541461181c57600588018590555b5050505050505050505050565b6000546001600160a01b031633146118545760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61187e614d73565b6005826001600160601b03168154811061189a5761189a61588c565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116118c15750505050509050919050565b6000546001600160a01b0316331461190b5760405163c383977560e01b815260040160405180910390fd5b60095460ff1661192e5760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6004546001600160a01b0316331461198e57604051639d6cab9960e01b815260040160405180910390fd5b6002546119a5906001600160a01b031683836145b7565b505050565b6119b38261467a565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480611a3157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611a25600080516020615cc18339815191525490565b6001600160a01b031614155b15611a4f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611aa9575060408051601f3d908101601f19168201909252611aa691810190615a79565b60015b611ad15781604051630c76093760e01b8152600401611ac89190614ff5565b60405180910390fd5b600080516020615cc18339815191528114611b0257604051632a87526960e21b815260048101829052602401611ac8565b600080516020615cc18339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156119a5576000836001600160a01b031683604051611b699190615a92565b600060405180830381855af49150503d8060008114611ba4576040519150601f19603f3d011682016040523d82523d6000602084013e611ba9565b606091505b5050905080610b0c576040516339b21b5d60e11b815260040160405180910390fd5b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c1a5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615cc183398151915290565b60078181548110611c3d57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611c9f57611c9f61588c565b6000918252602082206003600490920201908101805491935090611cc5906001906158b8565b81548110611cd557611cd561588c565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611d0a57611d0a61588c565b90600052602060002090600c020190508060050154826003015410611da95782546001600160601b031660001901611d4b576001600160ff1b039350611dd6565b6003820154611d5b9060026159ec565b611d66906001615a66565b81546005805490916001600160601b0316908110611d8657611d8661588c565b90600052602060002090600c020160040154611da291906159ec565b9350611dd6565b6003820154611db99060026159ec565b611dc4906001615a66565b8160040154611dd391906159ec565b93505b505050919050565b6000546001600160a01b03163314611e095760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611e249190615a92565b60006040518083038185875af1925050503d8060008114611e61576040519150601f19603f3d011682016040523d82523d6000602084013e611e66565b606091505b5050905080610b0c576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611eac57604051636f1dac1d60e01b815260040160405180910390fd5b6119a533838360006136a1565b6000546001600160a01b03163314611ee45760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f635760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b0316331480159061201b57506000546001600160a01b03163314155b1561203957604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561205d57604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146120c05760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106120de576120de61588c565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015612140575080546005805488926001600160601b031690811061212c5761212c61588c565b90600052602060002090600c020160020154115b1561215e57604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156121d9578660058360010183815481106121855761218561588c565b9060005260206000200154815481106121a0576121a061588c565b90600052602060002090600c02016002015410156121d157604051639717078960e01b815260040160405180910390fd5b600101612161565b5060028101869055805460ff60601b1916600160601b881515021781556003810185905560048082018590556005820184905561221c9060068301908490614d91565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161226096959493929190615aae565b60405180910390a25050505050505050565b6000600783815481106122875761228761588c565b906000526020600020906004020160030182815481106122a9576122a961588c565b90600052602060002090600b020160010154905092915050565b61232960405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6007838154811061233c5761233c61588c565b9060005260206000209060040201600301828154811061235e5761235e61588c565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561240d57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116123ef575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106124645761246461588c565b600091825260209091206004918202019150600182015460ff16600481111561248f5761248f615341565b146124ad57604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156124d85760405163c977f8d360e01b815260040160405180910390fd5b60006124e383611363565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c56906044015b600060405180830381600087803b15801561259757600080fd5b505af11580156125ab573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125df5760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106125fc576125fc61588c565b90600052602060002090600c020160020154111561262d57604051639717078960e01b815260040160405180910390fd5b805160000361264f5760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661267657604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612738578381815181106126c9576126c961588c565b6020026020010151600014806126fc575060065484518590839081106126f1576126f161588c565b602002602001015110155b1561271a57604051633d58a98960e11b815260040160405180910390fd5b61273083858381518110610bc857610bc861588c565b6001016126ae565b5060016000908152600a8201602052604090205460ff1661276c576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516127a4916001840191614dcf565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556127e79060068301908790614d91565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612819918691899101615ae1565b600060405180830381600087803b15801561283357600080fd5b505af1158015612847573d6000803e3d6000fd5b5050505060058b6001600160601b0316815481106128675761286761588c565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906128d7908e908e908e908e908e908e908d90615afa565b60405180910390a35050505050505050505050565b600681815481106128fc57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060006007848154811061292e5761292e61588c565b6000918252602090912060049091020190506003600182015460ff16600481111561295b5761295b615341565b036129b3576002810154815460058054929550916001600160601b039091169081106129895761298961588c565b600091825260209091206009600c90920201015460028201546129ac9190615a66565b91506129bc565b60009250600091505b50915091565b6000546001600160a01b031633146129ed5760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612a1a82613507565b341015612a3a57604051630e3360f160e21b815260040160405180910390fd5b61126183836000346146a8565b6000546001600160a01b03163314612a725760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a9d83611c89565b341015612abd57604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612ad257612ad261588c565b6000918252602090912060049091020190506003600182015460ff166004811115612aff57612aff615341565b14612b1d576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612b33906001906158b8565b81548110612b4357612b4361588c565b90600052602060002090600b020190506006816000015481548110612b6a57612b6a61588c565b6000918252602090912001546001600160a01b03163314612b9e5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612be157612be161588c565b90600052602060002090600c020160050154846003015410612cea576005836001600160601b031681548110612c1957612c1961588c565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612c4c57612c4c61588c565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c7857600191505b84546001600160601b03848116911614612cea57845460038601546001600160601b0390911690612cab906001906158b8565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612d2d57612d2d61588c565b90600052602060002090600c02019050806004015434612d4d9190615a19565b8260030181905550612d6781600201548260030154614983565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d9e916158b8565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612ddc57600080fd5b505af1158015612df0573d6000803e3d6000fd5b505086548454149150612ed690505784546003870154612e12906001906158b8565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e6057612e6061588c565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612ea3918d918d918d9190600401615b77565b600060405180830381600087803b158015612ebd57600080fd5b505af1158015612ed1573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612f4691906158e8565b60405180910390a2505050505050505050565b60008060078381548110612f6f57612f6f61588c565b906000526020600020906004020190508060030160018260030180549050612f9791906158b8565b81548110612fa757612fa761588c565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612fec5760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600080600784815481106130805761308061588c565b906000526020600020906004020190506000600182600301805490506130a691906158b8565b905060008260030182815481106130bf576130bf61588c565b600091825260208220600b909102019150600184015460ff1660048111156130e9576130e9615341565b1461310757604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106131205761312061588c565b6000918252602082200154600a8401546001600160a01b039091169250905b8781108015613155575060038401546006850154105b1561335d5760006001600160a01b03841663d2b8035a8b8461317681615ba7565b95506131829087615a66565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af11580156131c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e99190615bc0565b90506001600160a01b0381166131ff575061313f565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e92613235928692909101615bdd565b600060405180830381600087803b15801561324f57600080fd5b505af1158015613263573d6000803e3d6000fd5b50505060068601546040518c92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916132b0918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036133575760048054604051632e96bc2360e11b81529182018c9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561333e57600080fd5b505af1158015613352573d6000803e3d6000fd5b505050505b5061313f565b8084600a0160008282546133719190615a66565b90915550505060069092015494505050505092915050565b60006133ce8261041b86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061350792505050565b949350505050565b6000546001600160a01b031633146134015760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff1661345c5760405163e51cf7bf60e01b815260040160405180910390fd5b613467858585613389565b82101561348757604051630e3360f160e21b815260040160405180910390fd5b61349c6001600160a01b038416333085614992565b6134b9576040516312171d8360e31b815260040160405180910390fd5b6134fd8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506146a89050565b9695505050505050565b600080600061351584614a6e565b5091509150806005836001600160601b0316815481106135375761353761588c565b90600052602060002090600c0201600401546133ce91906159ec565b6006600061355f6139a5565b8054909150600160401b900460ff1680613586575080546001600160401b03808416911610155b156135a35760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff19909216821717825560098054610100600160a81b0319166101006001600160a01b03871602179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60006007828154811061363f5761363f61588c565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106136775761367761588c565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b60006001600160601b03841615806136c457506005546001600160601b03851610155b156136dc576136d4826005614af5565b5060006133ce565b821580159061371757506005846001600160601b0316815481106137025761370261588c565b90600052602060002090600c02016002015483105b15613727576136d4826006614af5565b600480546040516303d9595760e31b81526001600160a01b03888116938201939093526001600160601b03871660248201526044810186905260009283928392911690631ecacab8906064016060604051808303816000875af1158015613792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137b69190615bf6565b9194509250905060008160098111156137d1576137d1615341565b141580156137f1575060018160098111156137ee576137ee615341565b14155b1561380c576138008582614af5565b600093505050506133ce565b600181600981111561382057613820615341565b0361383157600193505050506133ce565b821561385e5760025461384f906001600160a01b0316893086614992565b61385e57613800856002614af5565b811561388a5760025461387b906001600160a01b031689846145b7565b61388a57613800856003614af5565b600480546040516355601d6960e11b81526001600160a01b038b8116938201939093526001600160601b038a16602482015260448101869052606481018590526084810189905291169063aac03ad29060a401600060405180830381600087803b1580156138f757600080fd5b505af115801561390b573d6000803e3d6000fd5b5060019b9a5050505050505050505050565b806005846001600160601b03168154811061393a5761393a61588c565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6139d1614c3e565b600080546001600160a01b03199081166001600160a01b038e81169190911783556001805483168e83161781556002805484168e84161781556003805485168e851617905560048054851688851617905560098054610100600160a81b031916610100888616021790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918b1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c92613adc92889101615ae1565b600060405180830381600087803b158015613af657600080fd5b505af1158015613b0a573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b031916815560408051838152602081019091529093509150508051613b78916001840191602090910190614dcf565b50805460ff60601b1916600160601b881515021781558551600282015560208601516003820155604086015160048083019190915560608701516005830155613bc79060068301908790614d91565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91613bfa91600191899101615ae1565b600060405180830381600087803b158015613c1457600080fd5b505af1158015613c28573d6000803e3d6000fd5b506000925060019150613c389050565b604051908082528060200260200182016040528015613c61578160200160208202803683370190505b509050600181600081518110613c7957613c7961588c565b602090810291909101015281546001600160601b031660017f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee68a8a600060200201518b600160200201518c600260200201518d600360200201518d89604051613ce89796959493929190615afa565b60405180910390a3613cfd600180600161391d565b50505050505050505050505050565b6000806007836000015181548110613d2657613d2661588c565b90600052602060002090600402019050600081600301846020015181548110613d5157613d5161588c565b90600052602060002090600b0201905060006006826000015481548110613d7a57613d7a61588c565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e249190615a79565b9050612710811115613e3557506127105b6000612710613e4483826158b8565b8560010154613e5391906159ec565b613e5d9190615a19565b90506000846006018860e0015181548110613e7a57613e7a61588c565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613ebb918591879101615bdd565b600060405180830381600087803b158015613ed557600080fd5b505af1158015613ee9573d6000803e3d6000fd5b505060048054604051633c85b79360e21b8152600094508493506001600160a01b039091169163f216de4c91613f23918791899101615bdd565b60408051808303816000875af1158015613f41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f659190615c29565b91509150808a60c001818151613f7b9190615a66565b90525060208a01518a516001600160a01b0385167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e788613fba86615c4d565b60098d0154604051613fdc9392916000916001600160a01b0390911690615c69565b60405180910390a48115806140715750895160208b015160e08c015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0387169063ba66fde790606401602060405180830381865afa15801561404b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061406f91906158cb565b155b156140d8576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916140a591879101614ff5565b600060405180830381600087803b1580156140bf57600080fd5b505af11580156140d3573d6000803e3d6000fd5b505050505b60018a606001516140e991906158b8565b8a60e001511480156140fd575060408a0151155b156141a75760098701546000546002890154614126926001600160a01b03908116921690614c65565b60005460c08b0151600254614149926001600160a01b03918216929116906145b7565b5060208a01518a5160c08c015160028a015460098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361419e93909290916001600160a01b0390911690615c8d565b60405180910390a35b50505060c0909601519695505050505050565b600060078260000151815481106141d3576141d361588c565b906000526020600020906004020190506000816003018360200151815481106141fe576141fe61588c565b90600052602060002090600b02019050600060068260000154815481106142275761422761588c565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f69390929161426691615cac565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa1580156142c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142ea9190615a79565b90506127108111156142fb57506127105b60008360060186606001518760e001516143159190615cac565b815481106143255761432561588c565b600091825260208220015460018601546001600160a01b03909116925061434c9084614983565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c79161437e918691869101615bdd565b600060405180830381600087803b15801561439857600080fd5b505af11580156143ac573d6000803e3d6000fd5b5050505060006143cf88604001518960c001516143c99190615a19565b85614983565b9050808660080160008282546143e59190615a66565b92505081905550600061440b896040015188600201546144059190615a19565b86614983565b9050808760070160008282546144219190615a66565b909155505060025461443d906001600160a01b031685846145b7565b506009870154614457906001600160a01b03168583614c65565b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7926144a7928c928a928a9290911690615c69565b60405180910390a46001896060015160026144c291906159ec565b6144cc91906158b8565b8960e00151036145ac57600087600801548a60c001516144ec91906158b8565b905060008860070154896002015461450491906158b8565b90508115158061451357508015155b1561181c57811561453d5760005460025461453b916001600160a01b039182169116846145b7565b505b8015614562576009890154600054614562916001600160a01b03908116911683614c65565b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916128d791879187916001600160a01b0390911690615c8d565b505050505050505050565b6000806000856001600160a01b031685856040516024016145d9929190615bdd565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b1790525161460e9190615a92565b6000604051808303816000865af19150503d806000811461464b576040519150601f19603f3d011682016040523d82523d6000602084013e614650565b606091505b50915091508180156134fd5750805115806134fd5750808060200190518101906134fd91906158cb565b6000546001600160a01b031633146146a55760405163c383977560e01b815260040160405180910390fd5b50565b60008060006146b686614a6e565b92505091506005826001600160601b0316815481106146d7576146d761588c565b60009182526020808320848452600a600c90930201919091019052604090205460ff166147175760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106147a2576147a261588c565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106147d8576147d861588c565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156148235761481e8a8460040154611210565b614829565b82600401545b9050614835818a615a19565b6003808401919091558683556002840154908401546148549190614983565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156148c757600080fd5b505af11580156148db573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016149159493929190615b77565b600060405180830381600087803b15801561492f57600080fd5b505af1158015614943573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b600061271061125783856159ec565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516149f79190615a92565b6000604051808303816000865af19150503d8060008114614a34576040519150601f19603f3d011682016040523d82523d6000602084013e614a39565b606091505b5091509150818015614a63575080511580614a63575080806020019051810190614a6391906158cb565b979650505050505050565b60008060006040845110614ae3575050506020810151604082015160608301516001600160601b0383161580614aaf57506005546001600160601b03841610155b15614ab957600192505b81600003614ac657600391505b801580614ad557506006548110155b15614ade575060015b614aee565b506001915060039050815b9193909250565b6001826001811115614b0957614b09615341565b03614b12575050565b6002816009811115614b2657614b26615341565b03614b4457604051630f323ed960e11b815260040160405180910390fd5b6003816009811115614b5857614b58615341565b03614b765760405163e45e13a360e01b815260040160405180910390fd5b6004816009811115614b8a57614b8a615341565b03614ba857604051631d91d0ed60e31b815260040160405180910390fd5b6005816009811115614bbc57614bbc615341565b03614bda57604051637c84af5160e01b815260040160405180910390fd5b6006816009811115614bee57614bee615341565b03614c0c57604051630caac6b360e31b815260040160405180910390fd5b6009816009811115614c2057614c20615341565b03611bcb57604051633e57962f60e21b815260040160405180910390fd5b614c46614ca8565b614c6357604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b038316614c94576009546119a5906001600160a01b0384811691849161010090910416614cc2565b610b0c6001600160a01b03841683836145b7565b6000614cb26139a5565b54600160401b900460ff16919050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015614cf157505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015614d2c57600080fd5b505af1158015614d40573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516935063a9059cbb925061257d915086908690600401615bdd565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614dbf579160200282015b82811115614dbf578251825591602001919060010190614da4565b50614dcb929150614e09565b5090565b828054828255906000526020600020908101928215614dbf5791602002820182811115614dbf578251825591602001919060010190614da4565b5b80821115614dcb5760008155600101614e0a565b6001600160a01b03811681146146a557600080fd5b8035614e3e81614e1e565b919050565b600060208284031215614e5557600080fd5b8135614e6081614e1e565b9392505050565b80356001600160601b0381168114614e3e57600080fd5b600080600060608486031215614e9357600080fd5b8335614e9e81614e1e565b9250614eac60208501614e67565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614efb57614efb614ebd565b604052919050565b600082601f830112614f1457600080fd5b81356001600160401b03811115614f2d57614f2d614ebd565b8060051b614f3d60208201614ed3565b91825260208185018101929081019086841115614f5957600080fd5b6020860192505b838310156134fd578235825260209283019290910190614f60565b80151581146146a557600080fd5b8035614e3e81614f7b565b600080600060608486031215614fa957600080fd5b614fb284614e67565b925060208401356001600160401b03811115614fcd57600080fd5b614fd986828701614f03565b9250506040840135614fea81614f7b565b809150509250925092565b6001600160a01b0391909116815260200190565b60006020828403121561501b57600080fd5b5035919050565b6000806040838503121561503557600080fd5b823561504081614e1e565b946020939093013593505050565b600082601f83011261505f57600080fd5b604051608081016001600160401b038111828210171561508157615081614ebd565b60405280608084018581111561509657600080fd5b845b818110156150b0578035835260209283019201615098565b509195945050505050565b600082601f8301126150cc57600080fd5b81356001600160401b038111156150e5576150e5614ebd565b6150f8601f8201601f1916602001614ed3565b81815284602083860101111561510d57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e03121561514c57600080fd5b8b3561515781614e1e565b9a5060208c013561516781614e1e565b995061517560408d01614e33565b985061518360608d01614e33565b975061519160808d01614e33565b965061519f60a08d01614f89565b95506151ae8d60c08e0161504e565b94506151be8d6101408e0161504e565b93506101c08c01356001600160401b038111156151da57600080fd5b6151e68e828f016150bb565b9350506151f66101e08d01614e33565b91506152056102008d01614e33565b90509295989b509295989b9093969950565b60008060006060848603121561522c57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561525557600080fd5b61126182614e67565b8060005b6004811015610b0c578151845260209384019390910190600101615262565b60808101611264828461525e565b600080604083850312156152a257600080fd5b82356152ad81614e1e565b915060208301356001600160401b038111156152c857600080fd5b6152d4858286016150bb565b9150509250929050565b60005b838110156152f95781810151838201526020016152e1565b50506000910152565b6000815180845261531a8160208601602086016152de565b601f01601f19169290920160200192915050565b6020815260006112616020830184615302565b634e487b7160e01b600052602160045260246000fd5b6005811061537557634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016153a56040830186615357565b9215156060820152608001529392505050565b6000806000606084860312156153cd57600080fd5b83356153d881614e1e565b92506020840135915060408401356001600160401b038111156153fa57600080fd5b615406868287016150bb565b9150509250925092565b6000806040838503121561542357600080fd5b61504083614e67565b6000806040838503121561543f57600080fd5b823561544a81614e1e565b9150602083013561545a81614f7b565b809150509250929050565b60008060006060848603121561547a57600080fd5b833561548581614e1e565b925060208401356001600160401b03811681146154a157600080fd5b9150604084013560ff81168114614fea57600080fd5b6000806000806000806000610140888a0312156154d357600080fd5b6154dc88614e67565b965060208801356154ec81614f7b565b955060408801359450606088013593506080880135925060a088013591506155178960c08a0161504e565b905092959891949750929550565b6000806040838503121561553857600080fd5b50508035926020909101359150565b600081518084526020840193506020830160005b828110156155825781516001600160a01b031686526020958601959091019060010161555b565b5093949350505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c083015161016060e08401526155e6610180840182615547565b905060e084015161010084015261010084015161012084015261012084015161561b6101408501826001600160a01b03169052565b506101408401516101608401528091505092915050565b60008060008060008060008060006101808a8c03121561565157600080fd5b61565a8a614e67565b985060208a013561566a81614f7b565b975060408a0135965060608a0135955060808a0135945060a08a013593506156958b60c08c0161504e565b92506101408a01356001600160401b038111156156b157600080fd5b6156bd8c828d016150bb565b9250506101608a01356001600160401b038111156156da57600080fd5b6156e68c828d01614f03565b9150509295985092959850929598565b6000806040838503121561570957600080fd5b8235915060208301356001600160401b038111156152c857600080fd5b60008060006060848603121561573b57600080fd5b833592506020840135915060408401356001600160401b038111156153fa57600080fd5b60008083601f84011261577157600080fd5b5081356001600160401b0381111561578857600080fd5b6020830191508360208285010111156157a057600080fd5b9250929050565b6000806000604084860312156157bc57600080fd5b83356001600160401b038111156157d257600080fd5b6157de8682870161575f565b9094509250506020840135614fea81614e1e565b60008060008060006080868803121561580a57600080fd5b8535945060208601356001600160401b0381111561582757600080fd5b6158338882890161575f565b909550935050604086013561584781614e1e565b949793965091946060013592915050565b60006020828403121561586a57600080fd5b81356001600160401b0381111561588057600080fd5b6133ce848285016150bb565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611264576112646158a2565b6000602082840312156158dd57600080fd5b8151614e6081614f7b565b602081016112648284615357565b6001815b600184111561593157808504811115615915576159156158a2565b600184161561592357908102905b60019390931c9280026158fa565b935093915050565b60008261594857506001611264565b8161595557506000611264565b816001811461596b576002811461597557615991565b6001915050611264565b60ff841115615986576159866158a2565b50506001821b611264565b5060208310610133831016604e8410600b84101617156159b4575081810a611264565b6159c160001984846158f6565b80600019048211156159d5576159d56158a2565b029392505050565b600061126160ff841683615939565b8082028115828204841417611264576112646158a2565b634e487b7160e01b600052601260045260246000fd5b600082615a2857615a28615a03565b500490565b600080600060608486031215615a4257600080fd5b83516020850151909350615a5581614f7b565b6040850151909250614fea81614f7b565b80820180821115611264576112646158a2565b600060208284031215615a8b57600080fd5b5051919050565b60008251615aa48184602087016152de565b9190910192915050565b6000610120820190508715158252866020830152856040830152846060830152836080830152614a6360a083018461525e565b8281526040602082015260006133ce6040830184615302565b600061014082018915158352886020840152876040840152866060840152856080840152615b2b60a084018661525e565b610140610120840152835190819052602084019061016084019060005b81811015615b66578351835260209384019390920191600101615b48565b50909b9a5050505050505050505050565b848152836020820152608060408201526000615b966080830185615302565b905082606083015295945050505050565b600060018201615bb957615bb96158a2565b5060010190565b600060208284031215615bd257600080fd5b8151614e6081614e1e565b6001600160a01b03929092168252602082015260400190565b600080600060608486031215615c0b57600080fd5b8351602085015160408601519194509250600a8110614fea57600080fd5b60008060408385031215615c3c57600080fd5b505080516020909101519092909150565b6000600160ff1b8201615c6257615c626158a2565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615cbb57615cbb615a03565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220a4155dec443a9c5d136f16c8c11bf35431e34b7e440060d5ff361d5e1f88354264736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102d45760003560e01c80637934c0be1161017b578063c3569902116100d7578063e4c0aaf411610085578063e4c0aaf4146109a7578063f6506db4146109c7578063f7434ea9146109e7578063f7e7d1fd14610a07578063fbf405b014610a27578063fc6f8f1614610a47578063fe524c3914610a6757600080fd5b8063c3569902146108df578063c71f4253146108f2578063cf0c38f814610912578063d07368bd14610932578063d2b8035a14610952578063d4d1d76a14610972578063d98493f61461098757600080fd5b80638bb04875116101345780638bb04875146107f7578063a072b86c14610817578063acdbf51d14610837578063afe15cfb14610857578063b00496371461088c578063c13517e1146108ac578063c258bb19146108bf57600080fd5b80637934c0be1461073557806382d02237146107555780638456cb591461077557806386541b241461078a57806386cdecef146107aa5780638a9bb02a146107ca57600080fd5b80632e1daf2f1161023557806352d1902d116101e357806352d1902d1461063657806354fd4d501461064b578063564a565d1461068a57806359ec827e146106bb5780635c975abb146106db578063751accd0146106f55780637717a6e81461071557600080fd5b80632e1daf2f146105615780632fcb4f04146105815780633cfd1184146105a15780633f4ba83a146105ce57806342c37fa3146105e3578063452a9320146106035780634f1ef2861461062357600080fd5b80631860592b116102925780631860592b1461040057806319b815291461042e5780631c3db16d1461045e5780631f5a0dd21461049b5780632c053739146104fc5780632d29a47b1461051c5780632d68efc91461053c57600080fd5b8062f5822c146102d95780630219da79146102fb5780630761c14d146103735780630b7414bc146103935780630c340a24146103b3578063115d5376146103e0575b600080fd5b3480156102e557600080fd5b506102f96102f4366004614e43565b610a87565b005b34801561030757600080fd5b50610346610316366004614e43565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037f57600080fd5b506102f961038e366004614e7e565b610ad4565b34801561039f57600080fd5b506102f96103ae366004614f94565b610b12565b3480156103bf57600080fd5b506000546103d3906001600160a01b031681565b60405161036a9190614ff5565b3480156103ec57600080fd5b506102f96103fb366004615009565b610c43565b34801561040c57600080fd5b5061042061041b366004615022565b611210565b60405190815260200161036a565b34801561043a57600080fd5b5061044e610449366004615009565b61126a565b604051901515815260200161036a565b34801561046a57600080fd5b5061047e610479366004615009565b611363565b60408051938452911515602084015215159082015260600161036a565b3480156104a757600080fd5b506104bb6104b6366004615009565b611464565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161036a565b34801561050857600080fd5b506102f961051736600461512a565b6114c3565b34801561052857600080fd5b506102f9610537366004615217565b61159d565b34801561054857600080fd5b506009546103d39061010090046001600160a01b031681565b34801561056d57600080fd5b506004546103d3906001600160a01b031681565b34801561058d57600080fd5b506102f961059c366004614e43565b611829565b3480156105ad57600080fd5b506105c16105bc366004615243565b611876565b60405161036a9190615281565b3480156105da57600080fd5b506102f96118e0565b3480156105ef57600080fd5b506102f96105fe366004615022565b611963565b34801561060f57600080fd5b506001546103d3906001600160a01b031681565b6102f961063136600461528f565b6119aa565b34801561064257600080fd5b50610420611bcf565b34801561065757600080fd5b5061067d604051806040016040528060068152602001650302e31302e360d41b81525081565b60405161036a919061532e565b34801561069657600080fd5b506106aa6106a5366004615009565b611c2d565b60405161036a959493929190615379565b3480156106c757600080fd5b506104206106d6366004615009565b611c89565b3480156106e757600080fd5b5060095461044e9060ff1681565b34801561070157600080fd5b506102f96107103660046153b8565b611dde565b34801561072157600080fd5b506102f9610730366004615410565b611e88565b34801561074157600080fd5b506102f961075036600461542c565b611eb9565b34801561076157600080fd5b506102f9610770366004615465565b611f38565b34801561078157600080fd5b506102f9611ff5565b34801561079657600080fd5b506102f96107a53660046154b7565b612095565b3480156107b657600080fd5b506104206107c5366004615525565b612272565b3480156107d657600080fd5b506107ea6107e5366004615525565b6122c3565b60405161036a919061558c565b34801561080357600080fd5b506102f9610812366004615009565b61244f565b34801561082357600080fd5b506102f9610832366004615632565b6125b4565b34801561084357600080fd5b506103d3610852366004615009565b6128ec565b34801561086357600080fd5b50610877610872366004615009565b612916565b6040805192835260208301919091520161036a565b34801561089857600080fd5b506102f96108a7366004614e43565b6129c2565b6104206108ba3660046156f6565b612a0f565b3480156108cb57600080fd5b506102f96108da366004614e43565b612a47565b6102f96108ed366004615726565b612a94565b3480156108fe57600080fd5b5061042061090d366004615009565b612f59565b34801561091e57600080fd5b506003546103d3906001600160a01b031681565b34801561093e57600080fd5b506102f961094d366004614e43565b612fc1565b34801561095e57600080fd5b5061042061096d366004615525565b61306a565b34801561097e57600080fd5b50600654610420565b34801561099357600080fd5b506104206109a23660046157a7565b613389565b3480156109b357600080fd5b506102f96109c2366004614e43565b6133d6565b3480156109d357600080fd5b506104206109e23660046157f2565b613423565b3480156109f357600080fd5b50610420610a02366004615858565b613507565b348015610a1357600080fd5b506102f9610a22366004614e43565b613553565b348015610a3357600080fd5b506002546103d3906001600160a01b031681565b348015610a5357600080fd5b50610420610a62366004615009565b61362a565b348015610a7357600080fd5b5061044e610a82366004615410565b613659565b6000546001600160a01b03163314610ab25760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314610aff57604051639d6cab9960e01b815260040160405180910390fd5b610b0c83838360016136a1565b50505050565b6000546001600160a01b03163314610b3d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0c578115610bdc57828181518110610b6157610b6161588c565b602002602001015160001480610b9457506006548351849083908110610b8957610b8961588c565b602002602001015110155b15610bb257604051633d58a98960e11b815260040160405180910390fd5b610bd784848381518110610bc857610bc861588c565b6020026020010151600161391d565b610c3b565b6001838281518110610bf057610bf061588c565b602002602001015103610c16576040516356d111fd60e11b815260040160405180910390fd5b610c3b84848381518110610c2c57610c2c61588c565b6020026020010151600061391d565b600101610b40565b600060078281548110610c5857610c5861588c565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c8b57610c8b61588c565b6000918252602082206003850154600c909202019250610cad906001906158b8565b90506000836003018281548110610cc657610cc661588c565b600091825260208220600b909102019150600185015460ff166004811115610cf057610cf0615341565b03610dcb5781158015610d3f57506001840154600684019060ff166004811115610d1c57610d1c615341565b60048110610d2c57610d2c61588c565b01546002850154610d3d90426158b8565b105b15610d5d57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d85576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d9c576002610d9f565b60015b60018086018054909160ff1990911690836004811115610dc157610dc1615341565b02179055506111c2565b60018085015460ff166004811115610de557610de5615341565b03610ef5576001840154600684019060ff166004811115610e0857610e08615341565b60048110610e1857610e1861588c565b01546002850154610e2990426158b8565b108015610ec057506006816000015481548110610e4857610e4861588c565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebe91906158cb565b155b15610ede57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610dc1565b6002600185015460ff166004811115610f1057610f10615341565b0361105e576001840154600684019060ff166004811115610f3357610f33615341565b60048110610f4357610f4361588c565b01546002850154610f5490426158b8565b108015610feb57506006816000015481548110610f7357610f7361588c565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610fc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe991906158cb565b155b1561100957604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36111c2565b6003600185015460ff16600481111561107957611079615341565b03611189576001840154600684019060ff16600481111561109c5761109c615341565b600481106110ac576110ac61588c565b015460028501546110bd90426158b8565b108015611154575060068160000154815481106110dc576110dc61588c565b600091825260209091200154604051630855bbe960e01b8152600481018790526001600160a01b0390911690630855bbe990602401602060405180830381865afa15801561112e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115291906158cb565b155b1561117257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610dc1565b6004600185015460ff1660048111156111a4576111a4615341565b036111c2576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916112019160ff16906158e8565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061124d90600160481b900460ff16600a6159dd565b61125790846159ec565b6112619190615a19565b90505b92915050565b600080600783815481106112805761128061588c565b60009182526020822060036004909202019081018054919350906112a6906001906158b8565b815481106112b6576112b661588c565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106112eb576112eb61588c565b90600052602060002090600c0201905080600501548260030154101561131657506000949350505050565b80546005805490916001600160601b03169081106113365761133661588c565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061137c5761137c61588c565b60009182526020822060036004909202019081018054919350906113a2906001906158b8565b815481106113b2576113b261588c565b90600052602060002090600b02019050600060068260000154815481106113db576113db61588c565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611430573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114549190615a2d565b9199909850909650945050505050565b6005818154811061147457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600160006114cf6139a5565b8054909150600160401b900460ff16806114f6575080546001600160401b03808416911610155b156115135760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556115478d8d8d8d8d8d8d8d8d8d8d6139c9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff16156115c157604051636f1dac1d60e01b815260040160405180910390fd5b600080600785815481106115d7576115d761588c565b600091825260209091206004918202019150600182015460ff16600481111561160257611602615341565b1461162057604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106116355761163561588c565b6000918252602082206004600b909202019081015490935091506116598483615a66565b600584015460068501546002860154929350909160009061167b908390615a19565b905060008660010154905060008060068960000154815481106116a0576116a061588c565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156116fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117209190615a79565b9150508060000361173c5783861115611737578395505b61175c565b6117478460026159ec565b86111561175c576117598460026159ec565b95505b60048801869055865b8681101561180857848110156117be576117b76040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613d0c565b9550611800565b6118006040518061010001604052808e81526020018d8152602001848152602001878152602001868152602001858152602001888152602001838152506141ba565b600101611765565b508488600501541461181c57600588018590555b5050505050505050505050565b6000546001600160a01b031633146118545760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61187e614d73565b6005826001600160601b03168154811061189a5761189a61588c565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116118c15750505050509050919050565b6000546001600160a01b0316331461190b5760405163c383977560e01b815260040160405180910390fd5b60095460ff1661192e5760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6004546001600160a01b0316331461198e57604051639d6cab9960e01b815260040160405180910390fd5b6002546119a5906001600160a01b031683836145b7565b505050565b6119b38261467a565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480611a3157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611a25600080516020615cc18339815191525490565b6001600160a01b031614155b15611a4f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611aa9575060408051601f3d908101601f19168201909252611aa691810190615a79565b60015b611ad15781604051630c76093760e01b8152600401611ac89190614ff5565b60405180910390fd5b600080516020615cc18339815191528114611b0257604051632a87526960e21b815260048101829052602401611ac8565b600080516020615cc18339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156119a5576000836001600160a01b031683604051611b699190615a92565b600060405180830381855af49150503d8060008114611ba4576040519150601f19603f3d011682016040523d82523d6000602084013e611ba9565b606091505b5050905080610b0c576040516339b21b5d60e11b815260040160405180910390fd5b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c1a5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615cc183398151915290565b60078181548110611c3d57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611c9f57611c9f61588c565b6000918252602082206003600490920201908101805491935090611cc5906001906158b8565b81548110611cd557611cd561588c565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611d0a57611d0a61588c565b90600052602060002090600c020190508060050154826003015410611da95782546001600160601b031660001901611d4b576001600160ff1b039350611dd6565b6003820154611d5b9060026159ec565b611d66906001615a66565b81546005805490916001600160601b0316908110611d8657611d8661588c565b90600052602060002090600c020160040154611da291906159ec565b9350611dd6565b6003820154611db99060026159ec565b611dc4906001615a66565b8160040154611dd391906159ec565b93505b505050919050565b6000546001600160a01b03163314611e095760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611e249190615a92565b60006040518083038185875af1925050503d8060008114611e61576040519150601f19603f3d011682016040523d82523d6000602084013e611e66565b606091505b5050905080610b0c576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611eac57604051636f1dac1d60e01b815260040160405180910390fd5b6119a533838360006136a1565b6000546001600160a01b03163314611ee45760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f635760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b0316331480159061201b57506000546001600160a01b03163314155b1561203957604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561205d57604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146120c05760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106120de576120de61588c565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015612140575080546005805488926001600160601b031690811061212c5761212c61588c565b90600052602060002090600c020160020154115b1561215e57604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156121d9578660058360010183815481106121855761218561588c565b9060005260206000200154815481106121a0576121a061588c565b90600052602060002090600c02016002015410156121d157604051639717078960e01b815260040160405180910390fd5b600101612161565b5060028101869055805460ff60601b1916600160601b881515021781556003810185905560048082018590556005820184905561221c9060068301908490614d91565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161226096959493929190615aae565b60405180910390a25050505050505050565b6000600783815481106122875761228761588c565b906000526020600020906004020160030182815481106122a9576122a961588c565b90600052602060002090600b020160010154905092915050565b61232960405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6007838154811061233c5761233c61588c565b9060005260206000209060040201600301828154811061235e5761235e61588c565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561240d57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116123ef575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106124645761246461588c565b600091825260209091206004918202019150600182015460ff16600481111561248f5761248f615341565b146124ad57604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156124d85760405163c977f8d360e01b815260040160405180910390fd5b60006124e383611363565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c56906044015b600060405180830381600087803b15801561259757600080fd5b505af11580156125ab573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125df5760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106125fc576125fc61588c565b90600052602060002090600c020160020154111561262d57604051639717078960e01b815260040160405180910390fd5b805160000361264f5760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661267657604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612738578381815181106126c9576126c961588c565b6020026020010151600014806126fc575060065484518590839081106126f1576126f161588c565b602002602001015110155b1561271a57604051633d58a98960e11b815260040160405180910390fd5b61273083858381518110610bc857610bc861588c565b6001016126ae565b5060016000908152600a8201602052604090205460ff1661276c576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516127a4916001840191614dcf565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556127e79060068301908790614d91565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612819918691899101615ae1565b600060405180830381600087803b15801561283357600080fd5b505af1158015612847573d6000803e3d6000fd5b5050505060058b6001600160601b0316815481106128675761286761588c565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906128d7908e908e908e908e908e908e908d90615afa565b60405180910390a35050505050505050505050565b600681815481106128fc57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060006007848154811061292e5761292e61588c565b6000918252602090912060049091020190506003600182015460ff16600481111561295b5761295b615341565b036129b3576002810154815460058054929550916001600160601b039091169081106129895761298961588c565b600091825260209091206009600c90920201015460028201546129ac9190615a66565b91506129bc565b60009250600091505b50915091565b6000546001600160a01b031633146129ed5760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612a1a82613507565b341015612a3a57604051630e3360f160e21b815260040160405180910390fd5b61126183836000346146a8565b6000546001600160a01b03163314612a725760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a9d83611c89565b341015612abd57604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612ad257612ad261588c565b6000918252602090912060049091020190506003600182015460ff166004811115612aff57612aff615341565b14612b1d576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612b33906001906158b8565b81548110612b4357612b4361588c565b90600052602060002090600b020190506006816000015481548110612b6a57612b6a61588c565b6000918252602090912001546001600160a01b03163314612b9e5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612be157612be161588c565b90600052602060002090600c020160050154846003015410612cea576005836001600160601b031681548110612c1957612c1961588c565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612c4c57612c4c61588c565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c7857600191505b84546001600160601b03848116911614612cea57845460038601546001600160601b0390911690612cab906001906158b8565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612d2d57612d2d61588c565b90600052602060002090600c02019050806004015434612d4d9190615a19565b8260030181905550612d6781600201548260030154614983565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d9e916158b8565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612ddc57600080fd5b505af1158015612df0573d6000803e3d6000fd5b505086548454149150612ed690505784546003870154612e12906001906158b8565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e6057612e6061588c565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612ea3918d918d918d9190600401615b77565b600060405180830381600087803b158015612ebd57600080fd5b505af1158015612ed1573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612f4691906158e8565b60405180910390a2505050505050505050565b60008060078381548110612f6f57612f6f61588c565b906000526020600020906004020190508060030160018260030180549050612f9791906158b8565b81548110612fa757612fa761588c565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612fec5760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600080600784815481106130805761308061588c565b906000526020600020906004020190506000600182600301805490506130a691906158b8565b905060008260030182815481106130bf576130bf61588c565b600091825260208220600b909102019150600184015460ff1660048111156130e9576130e9615341565b1461310757604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106131205761312061588c565b6000918252602082200154600a8401546001600160a01b039091169250905b8781108015613155575060038401546006850154105b1561335d5760006001600160a01b03841663d2b8035a8b8461317681615ba7565b95506131829087615a66565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af11580156131c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e99190615bc0565b90506001600160a01b0381166131ff575061313f565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e92613235928692909101615bdd565b600060405180830381600087803b15801561324f57600080fd5b505af1158015613263573d6000803e3d6000fd5b50505060068601546040518c92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916132b0918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036133575760048054604051632e96bc2360e11b81529182018c9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561333e57600080fd5b505af1158015613352573d6000803e3d6000fd5b505050505b5061313f565b8084600a0160008282546133719190615a66565b90915550505060069092015494505050505092915050565b60006133ce8261041b86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061350792505050565b949350505050565b6000546001600160a01b031633146134015760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff1661345c5760405163e51cf7bf60e01b815260040160405180910390fd5b613467858585613389565b82101561348757604051630e3360f160e21b815260040160405180910390fd5b61349c6001600160a01b038416333085614992565b6134b9576040516312171d8360e31b815260040160405180910390fd5b6134fd8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506146a89050565b9695505050505050565b600080600061351584614a6e565b5091509150806005836001600160601b0316815481106135375761353761588c565b90600052602060002090600c0201600401546133ce91906159ec565b6006600061355f6139a5565b8054909150600160401b900460ff1680613586575080546001600160401b03808416911610155b156135a35760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff19909216821717825560098054610100600160a81b0319166101006001600160a01b03871602179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60006007828154811061363f5761363f61588c565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106136775761367761588c565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b60006001600160601b03841615806136c457506005546001600160601b03851610155b156136dc576136d4826005614af5565b5060006133ce565b821580159061371757506005846001600160601b0316815481106137025761370261588c565b90600052602060002090600c02016002015483105b15613727576136d4826006614af5565b600480546040516303d9595760e31b81526001600160a01b03888116938201939093526001600160601b03871660248201526044810186905260009283928392911690631ecacab8906064016060604051808303816000875af1158015613792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137b69190615bf6565b9194509250905060008160098111156137d1576137d1615341565b141580156137f1575060018160098111156137ee576137ee615341565b14155b1561380c576138008582614af5565b600093505050506133ce565b600181600981111561382057613820615341565b0361383157600193505050506133ce565b821561385e5760025461384f906001600160a01b0316893086614992565b61385e57613800856002614af5565b811561388a5760025461387b906001600160a01b031689846145b7565b61388a57613800856003614af5565b600480546040516355601d6960e11b81526001600160a01b038b8116938201939093526001600160601b038a16602482015260448101869052606481018590526084810189905291169063aac03ad29060a401600060405180830381600087803b1580156138f757600080fd5b505af115801561390b573d6000803e3d6000fd5b5060019b9a5050505050505050505050565b806005846001600160601b03168154811061393a5761393a61588c565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6139d1614c3e565b600080546001600160a01b03199081166001600160a01b038e81169190911783556001805483168e83161781556002805484168e84161781556003805485168e851617905560048054851688851617905560098054610100600160a81b031916610100888616021790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918b1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c92613adc92889101615ae1565b600060405180830381600087803b158015613af657600080fd5b505af1158015613b0a573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b031916815560408051838152602081019091529093509150508051613b78916001840191602090910190614dcf565b50805460ff60601b1916600160601b881515021781558551600282015560208601516003820155604086015160048083019190915560608701516005830155613bc79060068301908790614d91565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91613bfa91600191899101615ae1565b600060405180830381600087803b158015613c1457600080fd5b505af1158015613c28573d6000803e3d6000fd5b506000925060019150613c389050565b604051908082528060200260200182016040528015613c61578160200160208202803683370190505b509050600181600081518110613c7957613c7961588c565b602090810291909101015281546001600160601b031660017f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee68a8a600060200201518b600160200201518c600260200201518d600360200201518d89604051613ce89796959493929190615afa565b60405180910390a3613cfd600180600161391d565b50505050505050505050505050565b6000806007836000015181548110613d2657613d2661588c565b90600052602060002090600402019050600081600301846020015181548110613d5157613d5161588c565b90600052602060002090600b0201905060006006826000015481548110613d7a57613d7a61588c565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e249190615a79565b9050612710811115613e3557506127105b6000612710613e4483826158b8565b8560010154613e5391906159ec565b613e5d9190615a19565b90506000846006018860e0015181548110613e7a57613e7a61588c565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613ebb918591879101615bdd565b600060405180830381600087803b158015613ed557600080fd5b505af1158015613ee9573d6000803e3d6000fd5b505060048054604051633c85b79360e21b8152600094508493506001600160a01b039091169163f216de4c91613f23918791899101615bdd565b60408051808303816000875af1158015613f41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f659190615c29565b91509150808a60c001818151613f7b9190615a66565b90525060208a01518a516001600160a01b0385167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e788613fba86615c4d565b60098d0154604051613fdc9392916000916001600160a01b0390911690615c69565b60405180910390a48115806140715750895160208b015160e08c015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0387169063ba66fde790606401602060405180830381865afa15801561404b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061406f91906158cb565b155b156140d8576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916140a591879101614ff5565b600060405180830381600087803b1580156140bf57600080fd5b505af11580156140d3573d6000803e3d6000fd5b505050505b60018a606001516140e991906158b8565b8a60e001511480156140fd575060408a0151155b156141a75760098701546000546002890154614126926001600160a01b03908116921690614c65565b60005460c08b0151600254614149926001600160a01b03918216929116906145b7565b5060208a01518a5160c08c015160028a015460098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361419e93909290916001600160a01b0390911690615c8d565b60405180910390a35b50505060c0909601519695505050505050565b600060078260000151815481106141d3576141d361588c565b906000526020600020906004020190506000816003018360200151815481106141fe576141fe61588c565b90600052602060002090600b02019050600060068260000154815481106142275761422761588c565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f69390929161426691615cac565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa1580156142c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142ea9190615a79565b90506127108111156142fb57506127105b60008360060186606001518760e001516143159190615cac565b815481106143255761432561588c565b600091825260208220015460018601546001600160a01b03909116925061434c9084614983565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c79161437e918691869101615bdd565b600060405180830381600087803b15801561439857600080fd5b505af11580156143ac573d6000803e3d6000fd5b5050505060006143cf88604001518960c001516143c99190615a19565b85614983565b9050808660080160008282546143e59190615a66565b92505081905550600061440b896040015188600201546144059190615a19565b86614983565b9050808760070160008282546144219190615a66565b909155505060025461443d906001600160a01b031685846145b7565b506009870154614457906001600160a01b03168583614c65565b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7926144a7928c928a928a9290911690615c69565b60405180910390a46001896060015160026144c291906159ec565b6144cc91906158b8565b8960e00151036145ac57600087600801548a60c001516144ec91906158b8565b905060008860070154896002015461450491906158b8565b90508115158061451357508015155b1561181c57811561453d5760005460025461453b916001600160a01b039182169116846145b7565b505b8015614562576009890154600054614562916001600160a01b03908116911683614c65565b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916128d791879187916001600160a01b0390911690615c8d565b505050505050505050565b6000806000856001600160a01b031685856040516024016145d9929190615bdd565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b1790525161460e9190615a92565b6000604051808303816000865af19150503d806000811461464b576040519150601f19603f3d011682016040523d82523d6000602084013e614650565b606091505b50915091508180156134fd5750805115806134fd5750808060200190518101906134fd91906158cb565b6000546001600160a01b031633146146a55760405163c383977560e01b815260040160405180910390fd5b50565b60008060006146b686614a6e565b92505091506005826001600160601b0316815481106146d7576146d761588c565b60009182526020808320848452600a600c90930201919091019052604090205460ff166147175760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106147a2576147a261588c565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106147d8576147d861588c565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156148235761481e8a8460040154611210565b614829565b82600401545b9050614835818a615a19565b6003808401919091558683556002840154908401546148549190614983565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156148c757600080fd5b505af11580156148db573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016149159493929190615b77565b600060405180830381600087803b15801561492f57600080fd5b505af1158015614943573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b600061271061125783856159ec565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516149f79190615a92565b6000604051808303816000865af19150503d8060008114614a34576040519150601f19603f3d011682016040523d82523d6000602084013e614a39565b606091505b5091509150818015614a63575080511580614a63575080806020019051810190614a6391906158cb565b979650505050505050565b60008060006040845110614ae3575050506020810151604082015160608301516001600160601b0383161580614aaf57506005546001600160601b03841610155b15614ab957600192505b81600003614ac657600391505b801580614ad557506006548110155b15614ade575060015b614aee565b506001915060039050815b9193909250565b6001826001811115614b0957614b09615341565b03614b12575050565b6002816009811115614b2657614b26615341565b03614b4457604051630f323ed960e11b815260040160405180910390fd5b6003816009811115614b5857614b58615341565b03614b765760405163e45e13a360e01b815260040160405180910390fd5b6004816009811115614b8a57614b8a615341565b03614ba857604051631d91d0ed60e31b815260040160405180910390fd5b6005816009811115614bbc57614bbc615341565b03614bda57604051637c84af5160e01b815260040160405180910390fd5b6006816009811115614bee57614bee615341565b03614c0c57604051630caac6b360e31b815260040160405180910390fd5b6009816009811115614c2057614c20615341565b03611bcb57604051633e57962f60e21b815260040160405180910390fd5b614c46614ca8565b614c6357604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b038316614c94576009546119a5906001600160a01b0384811691849161010090910416614cc2565b610b0c6001600160a01b03841683836145b7565b6000614cb26139a5565b54600160401b900460ff16919050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015614cf157505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015614d2c57600080fd5b505af1158015614d40573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516935063a9059cbb925061257d915086908690600401615bdd565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614dbf579160200282015b82811115614dbf578251825591602001919060010190614da4565b50614dcb929150614e09565b5090565b828054828255906000526020600020908101928215614dbf5791602002820182811115614dbf578251825591602001919060010190614da4565b5b80821115614dcb5760008155600101614e0a565b6001600160a01b03811681146146a557600080fd5b8035614e3e81614e1e565b919050565b600060208284031215614e5557600080fd5b8135614e6081614e1e565b9392505050565b80356001600160601b0381168114614e3e57600080fd5b600080600060608486031215614e9357600080fd5b8335614e9e81614e1e565b9250614eac60208501614e67565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614efb57614efb614ebd565b604052919050565b600082601f830112614f1457600080fd5b81356001600160401b03811115614f2d57614f2d614ebd565b8060051b614f3d60208201614ed3565b91825260208185018101929081019086841115614f5957600080fd5b6020860192505b838310156134fd578235825260209283019290910190614f60565b80151581146146a557600080fd5b8035614e3e81614f7b565b600080600060608486031215614fa957600080fd5b614fb284614e67565b925060208401356001600160401b03811115614fcd57600080fd5b614fd986828701614f03565b9250506040840135614fea81614f7b565b809150509250925092565b6001600160a01b0391909116815260200190565b60006020828403121561501b57600080fd5b5035919050565b6000806040838503121561503557600080fd5b823561504081614e1e565b946020939093013593505050565b600082601f83011261505f57600080fd5b604051608081016001600160401b038111828210171561508157615081614ebd565b60405280608084018581111561509657600080fd5b845b818110156150b0578035835260209283019201615098565b509195945050505050565b600082601f8301126150cc57600080fd5b81356001600160401b038111156150e5576150e5614ebd565b6150f8601f8201601f1916602001614ed3565b81815284602083860101111561510d57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e03121561514c57600080fd5b8b3561515781614e1e565b9a5060208c013561516781614e1e565b995061517560408d01614e33565b985061518360608d01614e33565b975061519160808d01614e33565b965061519f60a08d01614f89565b95506151ae8d60c08e0161504e565b94506151be8d6101408e0161504e565b93506101c08c01356001600160401b038111156151da57600080fd5b6151e68e828f016150bb565b9350506151f66101e08d01614e33565b91506152056102008d01614e33565b90509295989b509295989b9093969950565b60008060006060848603121561522c57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561525557600080fd5b61126182614e67565b8060005b6004811015610b0c578151845260209384019390910190600101615262565b60808101611264828461525e565b600080604083850312156152a257600080fd5b82356152ad81614e1e565b915060208301356001600160401b038111156152c857600080fd5b6152d4858286016150bb565b9150509250929050565b60005b838110156152f95781810151838201526020016152e1565b50506000910152565b6000815180845261531a8160208601602086016152de565b601f01601f19169290920160200192915050565b6020815260006112616020830184615302565b634e487b7160e01b600052602160045260246000fd5b6005811061537557634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016153a56040830186615357565b9215156060820152608001529392505050565b6000806000606084860312156153cd57600080fd5b83356153d881614e1e565b92506020840135915060408401356001600160401b038111156153fa57600080fd5b615406868287016150bb565b9150509250925092565b6000806040838503121561542357600080fd5b61504083614e67565b6000806040838503121561543f57600080fd5b823561544a81614e1e565b9150602083013561545a81614f7b565b809150509250929050565b60008060006060848603121561547a57600080fd5b833561548581614e1e565b925060208401356001600160401b03811681146154a157600080fd5b9150604084013560ff81168114614fea57600080fd5b6000806000806000806000610140888a0312156154d357600080fd5b6154dc88614e67565b965060208801356154ec81614f7b565b955060408801359450606088013593506080880135925060a088013591506155178960c08a0161504e565b905092959891949750929550565b6000806040838503121561553857600080fd5b50508035926020909101359150565b600081518084526020840193506020830160005b828110156155825781516001600160a01b031686526020958601959091019060010161555b565b5093949350505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c083015161016060e08401526155e6610180840182615547565b905060e084015161010084015261010084015161012084015261012084015161561b6101408501826001600160a01b03169052565b506101408401516101608401528091505092915050565b60008060008060008060008060006101808a8c03121561565157600080fd5b61565a8a614e67565b985060208a013561566a81614f7b565b975060408a0135965060608a0135955060808a0135945060a08a013593506156958b60c08c0161504e565b92506101408a01356001600160401b038111156156b157600080fd5b6156bd8c828d016150bb565b9250506101608a01356001600160401b038111156156da57600080fd5b6156e68c828d01614f03565b9150509295985092959850929598565b6000806040838503121561570957600080fd5b8235915060208301356001600160401b038111156152c857600080fd5b60008060006060848603121561573b57600080fd5b833592506020840135915060408401356001600160401b038111156153fa57600080fd5b60008083601f84011261577157600080fd5b5081356001600160401b0381111561578857600080fd5b6020830191508360208285010111156157a057600080fd5b9250929050565b6000806000604084860312156157bc57600080fd5b83356001600160401b038111156157d257600080fd5b6157de8682870161575f565b9094509250506020840135614fea81614e1e565b60008060008060006080868803121561580a57600080fd5b8535945060208601356001600160401b0381111561582757600080fd5b6158338882890161575f565b909550935050604086013561584781614e1e565b949793965091946060013592915050565b60006020828403121561586a57600080fd5b81356001600160401b0381111561588057600080fd5b6133ce848285016150bb565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611264576112646158a2565b6000602082840312156158dd57600080fd5b8151614e6081614f7b565b602081016112648284615357565b6001815b600184111561593157808504811115615915576159156158a2565b600184161561592357908102905b60019390931c9280026158fa565b935093915050565b60008261594857506001611264565b8161595557506000611264565b816001811461596b576002811461597557615991565b6001915050611264565b60ff841115615986576159866158a2565b50506001821b611264565b5060208310610133831016604e8410600b84101617156159b4575081810a611264565b6159c160001984846158f6565b80600019048211156159d5576159d56158a2565b029392505050565b600061126160ff841683615939565b8082028115828204841417611264576112646158a2565b634e487b7160e01b600052601260045260246000fd5b600082615a2857615a28615a03565b500490565b600080600060608486031215615a4257600080fd5b83516020850151909350615a5581614f7b565b6040850151909250614fea81614f7b565b80820180821115611264576112646158a2565b600060208284031215615a8b57600080fd5b5051919050565b60008251615aa48184602087016152de565b9190910192915050565b6000610120820190508715158252866020830152856040830152846060830152836080830152614a6360a083018461525e565b8281526040602082015260006133ce6040830184615302565b600061014082018915158352886020840152876040840152866060840152856080840152615b2b60a084018661525e565b610140610120840152835190819052602084019061016084019060005b81811015615b66578351835260209384019390920191600101615b48565b50909b9a5050505050505050505050565b848152836020820152608060408201526000615b966080830185615302565b905082606083015295945050505050565b600060018201615bb957615bb96158a2565b5060010190565b600060208284031215615bd257600080fd5b8151614e6081614e1e565b6001600160a01b03929092168252602082015260400190565b600080600060608486031215615c0b57600080fd5b8351602085015160408601519194509250600a8110614fea57600080fd5b60008060408385031215615c3c57600080fd5b505080516020909101519092909150565b6000600160ff1b8201615c6257615c626158a2565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615cbb57615cbb615a03565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220a4155dec443a9c5d136f16c8c11bf35431e34b7e440060d5ff361d5e1f88354264736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "AcceptedFeeToken(address,bool)": { - "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", - "params": { - "_accepted": "Whether the token is accepted or not.", - "_token": "The ERC20 token." - } - }, - "DisputeCreation(uint256,address)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_arbitrable": "The contract which created the dispute.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "NewCurrencyRate(address,uint64,uint8)": { - "details": "To be emitted when the fee for a particular ERC20 token is updated.", - "params": { - "_feeToken": "The ERC20 token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrable": "The arbitrable receiving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "addNewDisputeKit(address)": { - "details": "Add a new supported dispute kit module to the court.", - "params": { - "_disputeKitAddress": "The address of the dispute kit contract." - } - }, - "appeal(uint256,uint256,bytes)": { - "details": "Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.", - "params": { - "_disputeID": "The ID of the dispute.", - "_extraData": "Extradata for the dispute. Can be required during court jump.", - "_numberOfChoices": "Number of choices for the dispute. Can be required during court jump." - } - }, - "appealCost(uint256)": { - "details": "Gets the cost of appealing a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "cost": "The appeal cost." - } - }, - "appealPeriod(uint256)": { - "details": "Gets the start and the end of a specified dispute's current appeal period.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "end": "The end of the appeal period.", - "start": "The start of the appeal period." - } - }, - "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." - }, - "returns": { - "cost": "The arbitration cost in ETH." - } - }, - "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeToken": "The ERC20 token used to pay fees." - }, - "returns": { - "cost": "The arbitration cost in `_feeToken`." - } - }, - "changeAcceptedFeeTokens(address,bool)": { - "details": "Changes the supported fee tokens.", - "params": { - "_accepted": "Whether the token is supported or not as a method of fee payment.", - "_feeToken": "The fee token." - } - }, - "changeCurrencyRates(address,uint64,uint8)": { - "details": "Changes the currency rate of a fee token.", - "params": { - "_feeToken": "The fee token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "changeGuardian(address)": { - "details": "Changes the `guardian` storage variable.", - "params": { - "_guardian": "The new value for the `guardian` storage variable." - } - }, - "changeJurorProsecutionModule(address)": { - "details": "Changes the `jurorProsecutionModule` storage variable.", - "params": { - "_jurorProsecutionModule": "The new value for the `jurorProsecutionModule` storage variable." - } - }, - "changePinakion(address)": { - "details": "Changes the `pinakion` storage variable.", - "params": { - "_pinakion": "The new value for the `pinakion` storage variable." - } - }, - "changeSortitionModule(address)": { - "details": "Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.", - "params": { - "_sortitionModule": "The new value for the `sortitionModule` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],bytes,uint256[])": { - "details": "Creates a court under a specified parent court.", - "params": { - "_alpha": "The `alpha` property value of the court.", - "_feeForJuror": "The `feeForJuror` property value of the court.", - "_hiddenVotes": "The `hiddenVotes` property value of the court.", - "_jurorsForCourtJump": "The `jurorsForCourtJump` property value of the court.", - "_minStake": "The `minStake` property value of the court.", - "_parent": "The `parent` property value of the court.", - "_sortitionExtraData": "Extra data for sortition module.", - "_supportedDisputeKits": "Indexes of dispute kits that this court will support.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the court." - } - }, - "createDispute(uint256,bytes)": { - "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "createDispute(uint256,bytes,address,uint256)": { - "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeAmount": "Amount of the ERC20 token used to pay fees.", - "_feeToken": "The ERC20 token used to pay fees.", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws jurors for the dispute. Can be called in parts.", - "params": { - "_disputeID": "The ID of the dispute.", - "_iterations": "The number of iterations to run." - }, - "returns": { - "nbDrawnJurors": "The total number of jurors drawn in the round." - } - }, - "enableDisputeKits(uint96,uint256[],bool)": { - "details": "Adds/removes court's support for specified dispute kits.", - "params": { - "_courtID": "The ID of the court.", - "_disputeKitIDs": "The IDs of dispute kits which support should be added/removed.", - "_enable": "Whether add or remove the dispute kits from the court." - } - }, - "execute(uint256,uint256,uint256)": { - "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts. Note: Reward distributions are forbidden during pause.", - "params": { - "_disputeID": "The ID of the dispute.", - "_iterations": "The number of iterations to run.", - "_round": "The appeal round." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "executeRuling(uint256)": { - "details": "Executes a specified dispute's ruling.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Gets the number of rounds for a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "_0": "The number of rounds." - } - }, - "getNumberOfVotes(uint256)": { - "details": "Gets the number of votes permitted for the specified dispute in the latest round.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getPnkAtStakePerJuror(uint256,uint256)": { - "details": "Gets the PNK at stake per juror for a specified dispute and round.", - "params": { - "_disputeID": "The ID of the dispute.", - "_round": "The round to get the info for." - }, - "returns": { - "_0": "pnkAtStakePerJuror The PNK at stake per juror." - } - }, - "getRoundInfo(uint256,uint256)": { - "details": "Gets the round info for a specified dispute and round.This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.", - "params": { - "_disputeID": "The ID of the dispute.", - "_round": "The round to get the info for." - }, - "returns": { - "_0": "round The round info." - } - }, - "getTimesPerPeriod(uint96)": { - "details": "Gets the timesPerPeriod array for a given court.", - "params": { - "_courtID": "The ID of the court to get the times from." - }, - "returns": { - "timesPerPeriod": "The timesPerPeriod array for the given court." - } - }, - "initialize(address,address,address,address,address,bool,uint256[4],uint256[4],bytes,address,address)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", - "_disputeKit": "The address of the default dispute kit.", - "_governor": "The governor's address.", - "_guardian": "The guardian's address.", - "_hiddenVotes": "The `hiddenVotes` property value of the general court.", - "_jurorProsecutionModule": "The address of the juror prosecution module.", - "_pinakion": "The address of the token contract.", - "_sortitionExtraData": "The extra data for sortition module.", - "_sortitionModuleAddress": "The sortition module responsible for sortition of the jurors.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the general court.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isDisputeKitJumping(uint256)": { - "details": "Returns true if the dispute kit will be switched to a parent DK.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "_0": "Whether DK will be switched or not." - } - }, - "isSupported(uint96,uint256)": { - "details": "Checks if a given dispute kit is supported by a given court.", - "params": { - "_courtID": "The ID of the court to check the support for.", - "_disputeKitID": "The ID of the dispute kit to check the support for." - }, - "returns": { - "_0": "Whether the dispute kit is supported or not." - } - }, - "passPeriod(uint256)": { - "details": "Passes the period of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "pause()": { - "details": "Pause staking and reward execution. Can only be done by guardian or governor." - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setStake(uint96,uint256)": { - "details": "Sets the caller's stake in a court.", - "params": { - "_courtID": "The ID of the court.", - "_newStake": "The new stake. Note that the existing delayed stake will be nullified as non-relevant." - } - }, - "setStakeBySortitionModule(address,uint96,uint256)": { - "details": "Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.", - "params": { - "_account": "The account whose stake is being set.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake." - } - }, - "transferBySortitionModule(address,uint256)": { - "details": "Transfers PNK to the juror by SortitionModule.", - "params": { - "_account": "The account of the juror whose PNK to transfer.", - "_amount": "The amount to transfer." - } - }, - "unpause()": { - "details": "Unpause staking and reward execution. Can only be done by governor." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "KlerosCore Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 449, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 451, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "guardian", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 454, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "pinakion", - "offset": 0, - "slot": "2", - "type": "t_contract(IERC20)77" - }, - { - "astId": 456, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "jurorProsecutionModule", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 459, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "sortitionModule", - "offset": 0, - "slot": "4", - "type": "t_contract(ISortitionModule)9946" - }, - { - "astId": 463, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "courts", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(Court)368_storage)dyn_storage" - }, - { - "astId": 467, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "disputeKits", - "offset": 0, - "slot": "6", - "type": "t_array(t_contract(IDisputeKit)9795)dyn_storage" - }, - { - "astId": 471, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "disputes", - "offset": 0, - "slot": "7", - "type": "t_array(t_struct(Dispute)385_storage)dyn_storage" - }, - { - "astId": 477, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "currencyRates", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_contract(IERC20)77,t_struct(CurrencyRate)434_storage)" - }, - { - "astId": 479, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "paused", - "offset": 0, - "slot": "9", - "type": "t_bool" - }, - { - "astId": 481, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "wNative", - "offset": 1, - "slot": "9", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "base": "t_address", - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_contract(IDisputeKit)9795)dyn_storage": { - "base": "t_contract(IDisputeKit)9795", - "encoding": "dynamic_array", - "label": "contract IDisputeKit[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Court)368_storage)dyn_storage": { - "base": "t_struct(Court)368_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Court[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Dispute)385_storage)dyn_storage": { - "base": "t_struct(Dispute)385_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)410_storage)dyn_storage": { - "base": "t_struct(Round)410_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)4_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[4]", - "numberOfBytes": "128" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IArbitrableV2)9544": { - "encoding": "inplace", - "label": "contract IArbitrableV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeKit)9795": { - "encoding": "inplace", - "label": "contract IDisputeKit", - "numberOfBytes": "20" - }, - "t_contract(IERC20)77": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_contract(ISortitionModule)9946": { - "encoding": "inplace", - "label": "contract ISortitionModule", - "numberOfBytes": "20" - }, - "t_enum(Period)342": { - "encoding": "inplace", - "label": "enum KlerosCoreBase.Period", - "numberOfBytes": "1" - }, - "t_mapping(t_contract(IERC20)77,t_struct(CurrencyRate)434_storage)": { - "encoding": "mapping", - "key": "t_contract(IERC20)77", - "label": "mapping(contract IERC20 => struct KlerosCoreBase.CurrencyRate)", - "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)434_storage" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_struct(Court)368_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Court", - "members": [ - { - "astId": 344, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "parent", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 346, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "hiddenVotes", - "offset": 12, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 349, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "children", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 351, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "minStake", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 353, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "alpha", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 355, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "feeForJuror", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 357, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "jurorsForCourtJump", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 361, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "timesPerPeriod", - "offset": 0, - "slot": "6", - "type": "t_array(t_uint256)4_storage" - }, - { - "astId": 365, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "supportedDisputeKits", - "offset": 0, - "slot": "10", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 367, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "disabled", - "offset": 0, - "slot": "11", - "type": "t_bool" - } - ], - "numberOfBytes": "384" - }, - "t_struct(CurrencyRate)434_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.CurrencyRate", - "members": [ - { - "astId": 429, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "feePaymentAccepted", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 431, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "rateInEth", - "offset": 1, - "slot": "0", - "type": "t_uint64" - }, - { - "astId": 433, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "rateDecimals", - "offset": 9, - "slot": "0", - "type": "t_uint8" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Dispute)385_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Dispute", - "members": [ - { - "astId": 370, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "courtID", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 373, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "arbitrated", - "offset": 12, - "slot": "0", - "type": "t_contract(IArbitrableV2)9544" - }, - { - "astId": 376, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "period", - "offset": 0, - "slot": "1", - "type": "t_enum(Period)342" - }, - { - "astId": 378, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "ruled", - "offset": 1, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 380, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "lastPeriodChange", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 384, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "rounds", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(Round)410_storage)dyn_storage" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Round)410_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Round", - "members": [ - { - "astId": 387, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "disputeKitID", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 389, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "pnkAtStakePerJuror", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 391, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "totalFeesForJurors", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 393, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "nbVotes", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 395, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "repartitions", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 397, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "pnkPenalties", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 400, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "drawnJurors", - "offset": 0, - "slot": "6", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 402, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "sumFeeRewardPaid", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 404, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "sumPnkRewardPaid", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 407, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "feeToken", - "offset": 0, - "slot": "9", - "type": "t_contract(IERC20)77" - }, - { - "astId": 409, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "drawIterations", - "offset": 0, - "slot": "10", - "type": "t_uint256" - } - ], - "numberOfBytes": "352" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint64": { - "encoding": "inplace", - "label": "uint64", - "numberOfBytes": "8" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/KlerosCore_Proxy.json b/contracts/deployments/arbitrumSepolia/KlerosCore_Proxy.json deleted file mode 100644 index daa50745b..000000000 --- a/contracts/deployments/arbitrumSepolia/KlerosCore_Proxy.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "transactionIndex": 2, - "gasUsed": "611101", - "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000001000000000000000000000000010040000000000000000008000000000020000000000000010000800402000000000000008000000000000000000000001000020000800000000000000000000000080000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000020000000000000000000000000000000004000000000000000060000000001001000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487", - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 95250346, - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000c38f115d001d3b5bbec5e8d44f78c7b61a27d94" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487" - }, - { - "transactionIndex": 2, - "blockNumber": 95250346, - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 4, - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487" - }, - { - "transactionIndex": 2, - "blockNumber": 95250346, - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 5, - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487" - }, - { - "transactionIndex": 2, - "blockNumber": 95250346, - "transactionHash": "0xf811a5f75eb3434b36c389d7ab5f9736ed78bf7f17970ad91e07934733076c7d", - "address": "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 6, - "blockHash": "0x1872bcfb64e06c7b455f793d93e59e29d42887bccb2cf83b483a2a79bdb13487" - } - ], - "blockNumber": 95250346, - "cumulativeGasUsed": "696476", - "status": 1, - "byzantium": true - }, - "args": [ - "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55", - "0x7b4f3cc5000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c38f115d001d3b5bbec5e8d44f78c7b61a27d94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000200000000000000000000000000baa5068f0bd1417046250a3ede2b1f27e31383bd00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122085e549173d7216435e32cd3998e84d15db68396e4913f125fc39ce47c0997d8764736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122085e549173d7216435e32cd3998e84d15db68396e4913f125fc39ce47c0997d8764736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/PNK.json b/contracts/deployments/arbitrumSepolia/PNK.json deleted file mode 100644 index 5a97a10ee..000000000 --- a/contracts/deployments/arbitrumSepolia/PNK.json +++ /dev/null @@ -1,280 +0,0 @@ -{ - "address": "0x34B944D42cAcfC8266955D07A80181D2054aa225", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ] -} diff --git a/contracts/deployments/arbitrumSepolia/PNKFaucet.json b/contracts/deployments/arbitrumSepolia/PNKFaucet.json deleted file mode 100644 index bc24884f9..000000000 --- a/contracts/deployments/arbitrumSepolia/PNKFaucet.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "address": "0x9f6ffc13B685A68ae359fCA128dfE776458Df464", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "amount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "changeAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x9068f8e4c9858fd0ad2ef1834750aa591a7493a2c59d2a9bc94a8bc196a9c84d", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x9f6ffc13B685A68ae359fCA128dfE776458Df464", - "transactionIndex": 1, - "gasUsed": "450835", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x93a2a1d3710786af401913023f9809e4f0d07adc01b7bc7beb964697f92cc97a", - "transactionHash": "0x9068f8e4c9858fd0ad2ef1834750aa591a7493a2c59d2a9bc94a8bc196a9c84d", - "logs": [], - "blockNumber": 94816329, - "cumulativeGasUsed": "450835", - "status": 1, - "byzantium": true - }, - "args": [ - "0x34B944D42cAcfC8266955D07A80181D2054aa225" - ], - "numDeployments": 1, - "solcInputHash": "464986207bfd65f93de9fcb4daa23259", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"amount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"changeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IERC20 public token;\\n address public governor;\\n mapping(address => bool) public withdrewAlready;\\n uint256 public amount = 10_000 ether;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeGovernor(address _governor) public onlyByGovernor {\\n governor = _governor;\\n }\\n\\n function changeAmount(uint256 _amount) public onlyByGovernor {\\n amount = _amount;\\n }\\n\\n function withdraw() public onlyByGovernor {\\n token.transfer(governor, token.balanceOf(address(this)));\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, amount);\\n withdrewAlready[msg.sender] = true;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x5e9b22dbef41d5db3652078c815f7b219c330491976871392d65b40c85e2b5d8\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405269021e19e0c9bab240000060035534801561001e57600080fd5b5060405161065538038061065583398101604081905261003d9161006b565b600080546001600160a01b039092166001600160a01b0319928316179055600180549091163317905561009b565b60006020828403121561007d57600080fd5b81516001600160a01b038116811461009457600080fd5b9392505050565b6105ab806100aa6000396000f3fe608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea264697066735822122073ab1d460d89fd07d337489347f8a75fc558ee56deada473e378dc9dc706e0f564736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea264697066735822122073ab1d460d89fd07d337489347f8a75fc558ee56deada473e378dc9dc706e0f564736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 34934, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)1229" - }, - { - "astId": 34936, - "contract": "src/token/Faucet.sol:Faucet", - "label": "governor", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 34940, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 34943, - "contract": "src/token/Faucet.sol:Faucet", - "label": "amount", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)1229": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/PinakionV2.json b/contracts/deployments/arbitrumSepolia/PinakionV2.json deleted file mode 120000 index 0f29cb015..000000000 --- a/contracts/deployments/arbitrumSepolia/PinakionV2.json +++ /dev/null @@ -1 +0,0 @@ -PNK.json \ No newline at end of file diff --git a/contracts/deployments/arbitrumSepolia/PolicyRegistry.json b/contracts/deployments/arbitrumSepolia/PolicyRegistry.json deleted file mode 100644 index 746d5e0e0..000000000 --- a/contracts/deployments/arbitrumSepolia/PolicyRegistry.json +++ /dev/null @@ -1,311 +0,0 @@ -{ - "address": "0x2668c46A14af8997417138B064ca1bEB70769585", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "PolicyUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "policies", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "setPolicy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x7f78eab7fb4f44b83ff6e43b0df82a2620ea07420802ad9850aa1455b4ea6523", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x2668c46A14af8997417138B064ca1bEB70769585", - "transactionIndex": 3, - "gasUsed": "197468", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2348915b1097de71e1dbd156433bb6e95fee3a218aa5dcfb053973e87944a8f1", - "transactionHash": "0x7f78eab7fb4f44b83ff6e43b0df82a2620ea07420802ad9850aa1455b4ea6523", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 95247698, - "transactionHash": "0x7f78eab7fb4f44b83ff6e43b0df82a2620ea07420802ad9850aa1455b4ea6523", - "address": "0x2668c46A14af8997417138B064ca1bEB70769585", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0x2348915b1097de71e1dbd156433bb6e95fee3a218aa5dcfb053973e87944a8f1" - } - ], - "blockNumber": 95247698, - "cumulativeGasUsed": "352936", - "status": 1, - "byzantium": true - }, - "args": [ - "0xB958113f96950C7806d584eFBed964288d46a0B8", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"PolicyRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", - "execute": { - "methodName": "initialize2", - "args": [] - }, - "implementation": "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/PolicyRegistry_Implementation.json b/contracts/deployments/arbitrumSepolia/PolicyRegistry_Implementation.json deleted file mode 100644 index 483b4129e..000000000 --- a/contracts/deployments/arbitrumSepolia/PolicyRegistry_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "PolicyUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "policies", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "setPolicy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x10f4c35a7b899fe6fadba9e18904d277cc224474e541b59906421066c66e7bb4", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", - "transactionIndex": 3, - "gasUsed": "781799", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000800000000000000000000040080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000400000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x506689bf6b2c3385573a3d4c686989191a63f562f9dfbf18a00089afffdeaeb6", - "transactionHash": "0x10f4c35a7b899fe6fadba9e18904d277cc224474e541b59906421066c66e7bb4", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 139235279, - "transactionHash": "0x10f4c35a7b899fe6fadba9e18904d277cc224474e541b59906421066c66e7bb4", - "address": "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 3, - "blockHash": "0x506689bf6b2c3385573a3d4c686989191a63f562f9dfbf18a00089afffdeaeb6" - } - ], - "blockNumber": 139235279, - "cumulativeGasUsed": "998041", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"PolicyUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"policies\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"setPolicy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a policy for each court.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"PolicyUpdate(uint256,string,string)\":{\"details\":\"Emitted when a policy is updated.\",\"params\":{\"_courtID\":\"The ID of the policy's court.\",\"_courtName\":\"The name of the policy's court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"details\":\"Constructs the `PolicyRegistry` contract.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setPolicy(uint256,string,string)\":{\"details\":\"Sets the policy for the specified court.\",\"params\":{\"_courtID\":\"The ID of the specified court.\",\"_courtName\":\"The name of the specified court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"PolicyRegistry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/PolicyRegistry.sol\":\"PolicyRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/arbitration/PolicyRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title PolicyRegistry\\n/// @dev A contract to maintain a policy for each court.\\ncontract PolicyRegistry is UUPSProxiable, Initializable {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a policy is updated.\\n /// @param _courtID The ID of the policy's court.\\n /// @param _courtName The name of the policy's court.\\n /// @param _policy The URI of the policy JSON.\\n event PolicyUpdate(uint256 indexed _courtID, string _courtName, string _policy);\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor;\\n mapping(uint256 => string) public policies;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Requires that the sender is the governor.\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"No allowed: governor only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Constructs the `PolicyRegistry` contract.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the policy for the specified court.\\n /// @param _courtID The ID of the specified court.\\n /// @param _courtName The name of the specified court.\\n /// @param _policy The URI of the policy JSON.\\n function setPolicy(uint256 _courtID, string calldata _courtName, string calldata _policy) external onlyByGovernor {\\n policies[_courtID] = _policy;\\n emit PolicyUpdate(_courtID, _courtName, policies[_courtID]);\\n }\\n}\\n\",\"keccak256\":\"0x3616d00a695cf960373d73a56d727fba4988a6c67f4e9084d1aab18f6db72e73\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610cb66100fc6000396000818161029e015281816102c701526104c40152610cb66000f3fe6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", - "devdoc": { - "details": "A contract to maintain a policy for each court.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "PolicyUpdate(uint256,string,string)": { - "details": "Emitted when a policy is updated.", - "params": { - "_courtID": "The ID of the policy's court.", - "_courtName": "The name of the policy's court.", - "_policy": "The URI of the policy JSON." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "initialize(address)": { - "details": "Constructs the `PolicyRegistry` contract.", - "params": { - "_governor": "The governor's address." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setPolicy(uint256,string,string)": { - "details": "Sets the policy for the specified court.", - "params": { - "_courtID": "The ID of the specified court.", - "_courtName": "The name of the specified court.", - "_policy": "The URI of the policy JSON." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "PolicyRegistry", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 13671, - "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 13675, - "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", - "label": "policies", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_uint256,t_string_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_string_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => string)", - "numberOfBytes": "32", - "value": "t_string_storage" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/PolicyRegistry_Proxy.json b/contracts/deployments/arbitrumSepolia/PolicyRegistry_Proxy.json deleted file mode 100644 index 86bcec356..000000000 --- a/contracts/deployments/arbitrumSepolia/PolicyRegistry_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x2668c46A14af8997417138B064ca1bEB70769585", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x7f78eab7fb4f44b83ff6e43b0df82a2620ea07420802ad9850aa1455b4ea6523", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x2668c46A14af8997417138B064ca1bEB70769585", - "transactionIndex": 3, - "gasUsed": "197468", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2348915b1097de71e1dbd156433bb6e95fee3a218aa5dcfb053973e87944a8f1", - "transactionHash": "0x7f78eab7fb4f44b83ff6e43b0df82a2620ea07420802ad9850aa1455b4ea6523", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 95247698, - "transactionHash": "0x7f78eab7fb4f44b83ff6e43b0df82a2620ea07420802ad9850aa1455b4ea6523", - "address": "0x2668c46A14af8997417138B064ca1bEB70769585", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0x2348915b1097de71e1dbd156433bb6e95fee3a218aa5dcfb053973e87944a8f1" - } - ], - "blockNumber": 95247698, - "cumulativeGasUsed": "352936", - "status": 1, - "byzantium": true - }, - "args": [ - "0xB958113f96950C7806d584eFBed964288d46a0B8", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"PolicyRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212203b3fd7b58d814daf56e8a98b5f03d35c3e25bc365afd21a0aa80ee883c5d3f1264736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212203b3fd7b58d814daf56e8a98b5f03d35c3e25bc365afd21a0aa80ee883c5d3f1264736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/RandomizerOracle.json b/contracts/deployments/arbitrumSepolia/RandomizerOracle.json deleted file mode 100644 index 0ed65f9d1..000000000 --- a/contracts/deployments/arbitrumSepolia/RandomizerOracle.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "address": "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", - "abi": [] -} diff --git a/contracts/deployments/arbitrumSepolia/RandomizerRNG.json b/contracts/deployments/arbitrumSepolia/RandomizerRNG.json deleted file mode 100644 index aac005482..000000000 --- a/contracts/deployments/arbitrumSepolia/RandomizerRNG.json +++ /dev/null @@ -1,385 +0,0 @@ -{ - "address": "0x51a97ad9F0aA818e75819da3cA20CAc319580627", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "callbackGasLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IRandomizer", - "name": "_randomizer", - "type": "address" - }, - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "number", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomizer", - "outputs": [ - { - "internalType": "contract IRandomizer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_id", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_value", - "type": "bytes32" - } - ], - "name": "randomizerCallback", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "randomizerWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "requester", - "type": "address" - } - ], - "name": "requesterToID", - "outputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_callbackGasLimit", - "type": "uint256" - } - ], - "name": "setCallbackGasLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_randomizer", - "type": "address" - } - ], - "name": "setRandomizer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xe0fe2993ab0e273014c24ca106df28efc31159a1f4176b22ed7428d36319dd6e", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x51a97ad9F0aA818e75819da3cA20CAc319580627", - "transactionIndex": 1, - "gasUsed": "246610", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000010000000000000000000000000000000", - "blockHash": "0xd05ed0e3d3eab93951fbec824a05e7d37364829cb69aa9be55b712daf562464d", - "transactionHash": "0xe0fe2993ab0e273014c24ca106df28efc31159a1f4176b22ed7428d36319dd6e", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95247762, - "transactionHash": "0xe0fe2993ab0e273014c24ca106df28efc31159a1f4176b22ed7428d36319dd6e", - "address": "0x51a97ad9F0aA818e75819da3cA20CAc319580627", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xd05ed0e3d3eab93951fbec824a05e7d37364829cb69aa9be55b712daf562464d" - } - ], - "blockNumber": 95247762, - "cumulativeGasUsed": "246610", - "status": 1, - "byzantium": true - }, - "args": [ - "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", - "0x485cc955000000000000000000000000e775d7fde1d0d09ae627c0131040012ccbcc4b9b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"RandomizerRNGProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", - "execute": { - "methodName": "initialize", - "args": [ - "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] - }, - "implementation": "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/RandomizerRNG_Implementation.json b/contracts/deployments/arbitrumSepolia/RandomizerRNG_Implementation.json deleted file mode 100644 index 91684d2cc..000000000 --- a/contracts/deployments/arbitrumSepolia/RandomizerRNG_Implementation.json +++ /dev/null @@ -1,533 +0,0 @@ -{ - "address": "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "callbackGasLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IRandomizer", - "name": "_randomizer", - "type": "address" - }, - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "number", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomizer", - "outputs": [ - { - "internalType": "contract IRandomizer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_id", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_value", - "type": "bytes32" - } - ], - "name": "randomizerCallback", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "randomizerWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "requester", - "type": "address" - } - ], - "name": "requesterToID", - "outputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_callbackGasLimit", - "type": "uint256" - } - ], - "name": "setCallbackGasLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_randomizer", - "type": "address" - } - ], - "name": "setRandomizer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0xc13384c7f2c7f5a33ad91024980d3ae6e9de2294021bf3854646942ed838af45", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", - "transactionIndex": 2, - "gasUsed": "760072", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x65934baa2f318fc07a7bbad38561c5ee7c5a77328b41ac0bebf34cfab13ab297", - "transactionHash": "0xc13384c7f2c7f5a33ad91024980d3ae6e9de2294021bf3854646942ed838af45", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 95247751, - "transactionHash": "0xc13384c7f2c7f5a33ad91024980d3ae6e9de2294021bf3854646942ed838af45", - "address": "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 3, - "blockHash": "0x65934baa2f318fc07a7bbad38561c5ee7c5a77328b41ac0bebf34cfab13ab297" - } - ], - "blockNumber": 95247751, - "cumulativeGasUsed": "943743", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"callbackGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IRandomizer\",\"name\":\"_randomizer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomizer\",\"outputs\":[{\"internalType\":\"contract IRandomizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_value\",\"type\":\"bytes32\"}],\"name\":\"randomizerCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"randomizerWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"}],\"name\":\"requesterToID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_callbackGasLimit\",\"type\":\"uint256\"}],\"name\":\"setCallbackGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_randomizer\",\"type\":\"address\"}],\"name\":\"setRandomizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"initialize(address,address)\":{\"details\":\"Initializer\",\"params\":{\"_governor\":\"Governor of the contract.\",\"_randomizer\":\"Randomizer contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"randomizerCallback(uint256,bytes32)\":{\"details\":\"Callback function called by the randomizer contract when the random value is generated.\"},\"randomizerWithdraw(uint256)\":{\"details\":\"Allows the governor to withdraw randomizer funds.\",\"params\":{\"_amount\":\"Amount to withdraw in wei.\"}},\"receiveRandomness(uint256)\":{\"details\":\"Return the random number.\",\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number. The id of the request is tied to the sender.\"},\"setCallbackGasLimit(uint256)\":{\"details\":\"Change the Randomizer callback gas limit.\",\"params\":{\"_callbackGasLimit\":\"the new limit.\"}},\"setRandomizer(address)\":{\"details\":\"Change the Randomizer address.\",\"params\":{\"_randomizer\":\"the new Randomizer address.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"title\":\"Random Number Generator that uses Randomizer.ai https://randomizer.ai/\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/rng/RandomizerRNG.sol\":\"RandomizerRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"},\"src/rng/IRandomizer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n// Randomizer protocol interface\\ninterface IRandomizer {\\n function request(uint256 callbackGasLimit) external returns (uint256);\\n\\n function clientWithdrawTo(address _to, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0xc2f92fb0decde8e9c09b1617ff58fae69b052ad1e8aa4a4fed25867b6bb329c1\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0xf92e0cf768afefc5cc6ef786c263b67dd00c021aa5753213dbbc33014adb68c5\",\"license\":\"MIT\"},\"src/rng/RandomizerRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./RNG.sol\\\";\\nimport \\\"./IRandomizer.sol\\\";\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title Random Number Generator that uses Randomizer.ai\\n/// https://randomizer.ai/\\ncontract RandomizerRNG is RNG, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The address that can withdraw funds.\\n uint256 public callbackGasLimit; // Gas limit for the randomizer callback\\n IRandomizer public randomizer; // Randomizer address.\\n mapping(uint256 requestId => uint256 number) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise.\\n mapping(address requester => uint256 requestId) public requesterToID; // Maps the requester to his latest request ID.\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer\\n /// @param _randomizer Randomizer contract.\\n /// @param _governor Governor of the contract.\\n function initialize(IRandomizer _randomizer, address _governor) external reinitializer(1) {\\n randomizer = _randomizer;\\n governor = _governor;\\n callbackGasLimit = 50000;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Change the Randomizer callback gas limit.\\n /// @param _callbackGasLimit the new limit.\\n function setCallbackGasLimit(uint256 _callbackGasLimit) external onlyByGovernor {\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n /// @dev Change the Randomizer address.\\n /// @param _randomizer the new Randomizer address.\\n function setRandomizer(address _randomizer) external onlyByGovernor {\\n randomizer = IRandomizer(_randomizer);\\n }\\n\\n /// @dev Allows the governor to withdraw randomizer funds.\\n /// @param _amount Amount to withdraw in wei.\\n function randomizerWithdraw(uint256 _amount) external onlyByGovernor {\\n randomizer.clientWithdrawTo(msg.sender, _amount);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Request a random number. The id of the request is tied to the sender.\\n function requestRandomness(uint256 /*_block*/) external override {\\n uint256 id = randomizer.request(callbackGasLimit);\\n requesterToID[msg.sender] = id;\\n }\\n\\n /// @dev Callback function called by the randomizer contract when the random value is generated.\\n function randomizerCallback(uint256 _id, bytes32 _value) external {\\n require(msg.sender == address(randomizer), \\\"Randomizer only\\\");\\n randomNumbers[_id] = uint256(_value);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Return the random number.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 /*_block*/) external view override returns (uint256 randomNumber) {\\n // Get the latest request ID for this requester.\\n uint256 id = requesterToID[msg.sender];\\n randomNumber = randomNumbers[id];\\n }\\n}\\n\",\"keccak256\":\"0x84d5dc50531aac4976948b2898b44630febefd95b54fdeee026190ba675a57dc\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610b396100fc600039600081816104a1015281816104ca01526106c20152610b396000f3fe6080604052600436106100c85760003560e01c806352d1902d1161007a57806352d1902d146101ec57806371d4b00b146102015780637363ae1f1461022e578063767bcab51461024e5780638a54942f1461026e578063e4c0aaf41461028e578063ebe93caf146102ae578063f10fb584146102ce57600080fd5b80630c340a24146100cd57806313cf90541461010a57806324f7469714610154578063485cc9551461016a5780634e07c9391461018c5780634f1ef286146101ac5780635257cd90146101bf575b600080fd5b3480156100d957600080fd5b506000546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561011657600080fd5b506101466101253660046108ed565b50336000908152600460209081526040808320548352600390915290205490565b604051908152602001610101565b34801561016057600080fd5b5061014660015481565b34801561017657600080fd5b5061018a61018536600461091b565b6102ee565b005b34801561019857600080fd5b5061018a6101a73660046108ed565b6103f3565b61018a6101ba36600461096a565b61048d565b3480156101cb57600080fd5b506101466101da3660046108ed565b60036020526000908152604090205481565b3480156101f857600080fd5b506101466106b5565b34801561020d57600080fd5b5061014661021c366004610a2e565b60046020526000908152604090205481565b34801561023a57600080fd5b5061018a6102493660046108ed565b610713565b34801561025a57600080fd5b5061018a610269366004610a2e565b61079b565b34801561027a57600080fd5b5061018a6102893660046108ed565b6107e7565b34801561029a57600080fd5b5061018a6102a9366004610a2e565b610816565b3480156102ba57600080fd5b5061018a6102c9366004610a52565b610862565b3480156102da57600080fd5b506002546100ed906001600160a01b031681565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806103385750805467ffffffffffffffff808416911610155b156103555760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600280546001600160a01b038781166001600160a01b031992831617909255600080549287169290911691909117905561c350600155815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90610a74565b60405180910390fd5b600254604051632465f8f560e01b8152336004820152602481018390526001600160a01b0390911690632465f8f590604401600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b5050505050565b610496826108c0565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061051457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610508600080516020610ae48339815191525490565b6001600160a01b031614155b156105325760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561058c575060408051601f3d908101601f1916820190925261058991810190610a9b565b60015b6105b457604051630c76093760e01b81526001600160a01b038316600482015260240161041d565b600080516020610ae483398151915281146105e557604051632a87526960e21b81526004810182905260240161041d565b600080516020610ae48339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156106b0576000836001600160a01b03168360405161064c9190610ab4565b600060405180830381855af49150503d8060008114610687576040519150601f19603f3d011682016040523d82523d6000602084013e61068c565b606091505b50509050806106ae576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107005760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610ae483398151915290565b60025460015460405163d845a4b360e01b815260048101919091526000916001600160a01b03169063d845a4b3906024016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610a9b565b336000908152600460205260409020555050565b6000546001600160a01b031633146107c55760405162461bcd60e51b815260040161041d90610a74565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108115760405162461bcd60e51b815260040161041d90610a74565b600155565b6000546001600160a01b031633146108405760405162461bcd60e51b815260040161041d90610a74565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108ae5760405162461bcd60e51b815260206004820152600f60248201526e52616e646f6d697a6572206f6e6c7960881b604482015260640161041d565b60009182526003602052604090912055565b6000546001600160a01b031633146108ea5760405162461bcd60e51b815260040161041d90610a74565b50565b6000602082840312156108ff57600080fd5b5035919050565b6001600160a01b03811681146108ea57600080fd5b6000806040838503121561092e57600080fd5b823561093981610906565b9150602083013561094981610906565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561097d57600080fd5b823561098881610906565b9150602083013567ffffffffffffffff808211156109a557600080fd5b818501915085601f8301126109b957600080fd5b8135818111156109cb576109cb610954565b604051601f8201601f19908116603f011681019083821181831017156109f3576109f3610954565b81604052828152886020848701011115610a0c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610a4057600080fd5b8135610a4b81610906565b9392505050565b60008060408385031215610a6557600080fd5b50508035926020909101359150565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b600060208284031215610aad57600080fd5b5051919050565b6000825160005b81811015610ad55760208186018101518583015201610abb565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220721afbaa690caa7b92bcb9018e5c4d2ecece02ca01c80c470d74bec052f7ae9264736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106100c85760003560e01c806352d1902d1161007a57806352d1902d146101ec57806371d4b00b146102015780637363ae1f1461022e578063767bcab51461024e5780638a54942f1461026e578063e4c0aaf41461028e578063ebe93caf146102ae578063f10fb584146102ce57600080fd5b80630c340a24146100cd57806313cf90541461010a57806324f7469714610154578063485cc9551461016a5780634e07c9391461018c5780634f1ef286146101ac5780635257cd90146101bf575b600080fd5b3480156100d957600080fd5b506000546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561011657600080fd5b506101466101253660046108ed565b50336000908152600460209081526040808320548352600390915290205490565b604051908152602001610101565b34801561016057600080fd5b5061014660015481565b34801561017657600080fd5b5061018a61018536600461091b565b6102ee565b005b34801561019857600080fd5b5061018a6101a73660046108ed565b6103f3565b61018a6101ba36600461096a565b61048d565b3480156101cb57600080fd5b506101466101da3660046108ed565b60036020526000908152604090205481565b3480156101f857600080fd5b506101466106b5565b34801561020d57600080fd5b5061014661021c366004610a2e565b60046020526000908152604090205481565b34801561023a57600080fd5b5061018a6102493660046108ed565b610713565b34801561025a57600080fd5b5061018a610269366004610a2e565b61079b565b34801561027a57600080fd5b5061018a6102893660046108ed565b6107e7565b34801561029a57600080fd5b5061018a6102a9366004610a2e565b610816565b3480156102ba57600080fd5b5061018a6102c9366004610a52565b610862565b3480156102da57600080fd5b506002546100ed906001600160a01b031681565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806103385750805467ffffffffffffffff808416911610155b156103555760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600280546001600160a01b038781166001600160a01b031992831617909255600080549287169290911691909117905561c350600155815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90610a74565b60405180910390fd5b600254604051632465f8f560e01b8152336004820152602481018390526001600160a01b0390911690632465f8f590604401600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b5050505050565b610496826108c0565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061051457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610508600080516020610ae48339815191525490565b6001600160a01b031614155b156105325760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561058c575060408051601f3d908101601f1916820190925261058991810190610a9b565b60015b6105b457604051630c76093760e01b81526001600160a01b038316600482015260240161041d565b600080516020610ae483398151915281146105e557604051632a87526960e21b81526004810182905260240161041d565b600080516020610ae48339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156106b0576000836001600160a01b03168360405161064c9190610ab4565b600060405180830381855af49150503d8060008114610687576040519150601f19603f3d011682016040523d82523d6000602084013e61068c565b606091505b50509050806106ae576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107005760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610ae483398151915290565b60025460015460405163d845a4b360e01b815260048101919091526000916001600160a01b03169063d845a4b3906024016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610a9b565b336000908152600460205260409020555050565b6000546001600160a01b031633146107c55760405162461bcd60e51b815260040161041d90610a74565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108115760405162461bcd60e51b815260040161041d90610a74565b600155565b6000546001600160a01b031633146108405760405162461bcd60e51b815260040161041d90610a74565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108ae5760405162461bcd60e51b815260206004820152600f60248201526e52616e646f6d697a6572206f6e6c7960881b604482015260640161041d565b60009182526003602052604090912055565b6000546001600160a01b031633146108ea5760405162461bcd60e51b815260040161041d90610a74565b50565b6000602082840312156108ff57600080fd5b5035919050565b6001600160a01b03811681146108ea57600080fd5b6000806040838503121561092e57600080fd5b823561093981610906565b9150602083013561094981610906565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561097d57600080fd5b823561098881610906565b9150602083013567ffffffffffffffff808211156109a557600080fd5b818501915085601f8301126109b957600080fd5b8135818111156109cb576109cb610954565b604051601f8201601f19908116603f011681019083821181831017156109f3576109f3610954565b81604052828152886020848701011115610a0c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610a4057600080fd5b8135610a4b81610906565b9392505050565b60008060408385031215610a6557600080fd5b50508035926020909101359150565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b600060208284031215610aad57600080fd5b5051919050565b6000825160005b81811015610ad55760208186018101518583015201610abb565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220721afbaa690caa7b92bcb9018e5c4d2ecece02ca01c80c470d74bec052f7ae9264736f6c63430008180033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." - }, - "initialize(address,address)": { - "details": "Initializer", - "params": { - "_governor": "Governor of the contract.", - "_randomizer": "Randomizer contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "randomizerCallback(uint256,bytes32)": { - "details": "Callback function called by the randomizer contract when the random value is generated." - }, - "randomizerWithdraw(uint256)": { - "details": "Allows the governor to withdraw randomizer funds.", - "params": { - "_amount": "Amount to withdraw in wei." - } - }, - "receiveRandomness(uint256)": { - "details": "Return the random number.", - "returns": { - "randomNumber": "The random number or 0 if it is not ready or has not been requested." - } - }, - "requestRandomness(uint256)": { - "details": "Request a random number. The id of the request is tied to the sender." - }, - "setCallbackGasLimit(uint256)": { - "details": "Change the Randomizer callback gas limit.", - "params": { - "_callbackGasLimit": "the new limit." - } - }, - "setRandomizer(address)": { - "details": "Change the Randomizer address.", - "params": { - "_randomizer": "the new Randomizer address." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "title": "Random Number Generator that uses Randomizer.ai https://randomizer.ai/", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ], - "InvalidImplementation(address)": [ - { - "notice": "The `implementation` is not UUPS-compliant" - } - ] - }, - "events": { - "Upgraded(address)": { - "notice": "Emitted when the `implementation` has been successfully upgraded." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 34952, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 34954, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "callbackGasLimit", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 34957, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "randomizer", - "offset": 0, - "slot": "2", - "type": "t_contract(IRandomizer)34880" - }, - { - "astId": 34961, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "randomNumbers", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 34965, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "requesterToID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_address,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_contract(IRandomizer)34880": { - "encoding": "inplace", - "label": "contract IRandomizer", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/RandomizerRNG_Proxy.json b/contracts/deployments/arbitrumSepolia/RandomizerRNG_Proxy.json deleted file mode 100644 index a403b741f..000000000 --- a/contracts/deployments/arbitrumSepolia/RandomizerRNG_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x51a97ad9F0aA818e75819da3cA20CAc319580627", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xe0fe2993ab0e273014c24ca106df28efc31159a1f4176b22ed7428d36319dd6e", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x51a97ad9F0aA818e75819da3cA20CAc319580627", - "transactionIndex": 1, - "gasUsed": "246610", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000010000000000000000000000000000000", - "blockHash": "0xd05ed0e3d3eab93951fbec824a05e7d37364829cb69aa9be55b712daf562464d", - "transactionHash": "0xe0fe2993ab0e273014c24ca106df28efc31159a1f4176b22ed7428d36319dd6e", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95247762, - "transactionHash": "0xe0fe2993ab0e273014c24ca106df28efc31159a1f4176b22ed7428d36319dd6e", - "address": "0x51a97ad9F0aA818e75819da3cA20CAc319580627", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xd05ed0e3d3eab93951fbec824a05e7d37364829cb69aa9be55b712daf562464d" - } - ], - "blockNumber": 95247762, - "cumulativeGasUsed": "246610", - "status": 1, - "byzantium": true - }, - "args": [ - "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", - "0x485cc955000000000000000000000000e775d7fde1d0d09ae627c0131040012ccbcc4b9b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"RandomizerRNGProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/SortitionModule.json b/contracts/deployments/arbitrumSepolia/SortitionModule.json deleted file mode 100644 index 9a021ba68..000000000 --- a/contracts/deployments/arbitrumSepolia/SortitionModule.json +++ /dev/null @@ -1,1106 +0,0 @@ -{ - "address": "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNK", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNKWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum ISortitionModule.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "StakeDelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_unlock", - "type": "bool" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amountAllCourts", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - } - ], - "name": "changeMaxDrawingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - } - ], - "name": "changeMinStakingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "changeRandomNumberGenerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDisputeHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createTree", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeReadIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeWriteIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "delayedStakes", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "alreadyTransferred", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "disputesWithoutJurors", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "executeDelayedStakes", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getJurorBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalLocked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stakedInCourt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbCourts", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorCourtIDs", - "outputs": [ - { - "internalType": "uint96[]", - "name": "", - "type": "uint96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorLeftoverPNK", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - }, - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize4", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "isJurorStaked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "jurors", - "outputs": [ - { - "internalType": "uint256", - "name": "stakedPnk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedPnk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPhaseChange", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "jurorAccount", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtId", - "type": "uint96" - } - ], - "name": "latestDelayedStakeIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "lockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxDrawingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minStakingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" - } - ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "passPhase", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availablePenalty", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "phase", - "outputs": [ - { - "internalType": "enum ISortitionModule.Phase", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "postDrawHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumberRequestBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rng", - "outputs": [ - { - "internalType": "contract RNG", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rngLookahead", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "setJurorInactive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_ID", - "type": "bytes32" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "validateStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "withdrawLeftoverPNK", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x1341bcde150871b6c3001ef791e33bddac8b45de574894893c6b368a1781cb6f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - "transactionIndex": 1, - "gasUsed": "362402", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000004000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000200000000000000000000000000000000000000000", - "blockHash": "0x41c539093428c7ae0b79faa03c59034892fbb49e23bcf3694ac26773e979b19b", - "transactionHash": "0x1341bcde150871b6c3001ef791e33bddac8b45de574894893c6b368a1781cb6f", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95250316, - "transactionHash": "0x1341bcde150871b6c3001ef791e33bddac8b45de574894893c6b368a1781cb6f", - "address": "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x41c539093428c7ae0b79faa03c59034892fbb49e23bcf3694ac26773e979b19b" - } - ], - "blockNumber": 95250316, - "cumulativeGasUsed": "362402", - "status": 1, - "byzantium": true - }, - "args": [ - "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9", - "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000e8442307d36e9bf6ab27f1a009f95ce8e11c3479000000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000000000000000000007080000000000000000000000000298a3efa6faf90865725e2b48cf0f66e5d527540000000000000000000000000000000000000000000000000000000000000014" - ], - "numDeployments": 3, - "solcInputHash": "74873d15f43e245d08be76d8560e80d9", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f2e3563554b18c2c9587081d72ef7797df12f887fb52d3ccfb244524903568c364736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f2e3563554b18c2c9587081d72ef7797df12f887fb52d3ccfb244524903568c364736f6c634300081c0033", - "execute": { - "methodName": "initialize4", - "args": [] - }, - "implementation": "0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/SortitionModule_Implementation.json b/contracts/deployments/arbitrumSepolia/SortitionModule_Implementation.json deleted file mode 100644 index 28ba5f824..000000000 --- a/contracts/deployments/arbitrumSepolia/SortitionModule_Implementation.json +++ /dev/null @@ -1,1679 +0,0 @@ -{ - "address": "0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNK", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNKWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum ISortitionModule.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "StakeDelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_unlock", - "type": "bool" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amountAllCourts", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - } - ], - "name": "changeMaxDrawingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - } - ], - "name": "changeMinStakingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "changeRandomNumberGenerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDisputeHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createTree", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeReadIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeWriteIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "delayedStakes", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "alreadyTransferred", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "disputesWithoutJurors", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "executeDelayedStakes", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getJurorBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalLocked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stakedInCourt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbCourts", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorCourtIDs", - "outputs": [ - { - "internalType": "uint96[]", - "name": "", - "type": "uint96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorLeftoverPNK", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - }, - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize4", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "isJurorStaked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "jurors", - "outputs": [ - { - "internalType": "uint256", - "name": "stakedPnk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedPnk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPhaseChange", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "jurorAccount", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtId", - "type": "uint96" - } - ], - "name": "latestDelayedStakeIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "lockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxDrawingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minStakingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" - } - ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "passPhase", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availablePenalty", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "phase", - "outputs": [ - { - "internalType": "enum ISortitionModule.Phase", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "postDrawHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumberRequestBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rng", - "outputs": [ - { - "internalType": "contract RNG", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rngLookahead", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "setJurorInactive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_ID", - "type": "bytes32" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "validateStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "withdrawLeftoverPNK", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x351b6d405df45284ee5e84b3bcf3780db02d95a216094b161d2e578509b8cce4", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83", - "transactionIndex": 1, - "gasUsed": "2697945", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000800000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000008000000000000000000000000000000000000000000000000000", - "blockHash": "0x730a3e93247e55063212d836e0d0b5113b9a19f23730b8f2148712b5fd6e82ca", - "transactionHash": "0x351b6d405df45284ee5e84b3bcf3780db02d95a216094b161d2e578509b8cce4", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 178241757, - "transactionHash": "0x351b6d405df45284ee5e84b3bcf3780db02d95a216094b161d2e578509b8cce4", - "address": "0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x730a3e93247e55063212d836e0d0b5113b9a19f23730b8f2148712b5fd6e82ca" - } - ], - "blockNumber": 178241757, - "cumulativeGasUsed": "2697945", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 3, - "solcInputHash": "74873d15f43e245d08be76d8560e80d9", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LeftoverPNK\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LeftoverPNKWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"_phase\",\"type\":\"uint8\"}],\"name\":\"NewPhase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_unlock\",\"type\":\"bool\"}],\"name\":\"StakeLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amountAllCourts\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorLeftoverPNK\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"isJurorStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedPnk\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedPnk\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"jurorAccount\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtId\",\"type\":\"uint96\"}],\"name\":\"latestDelayedStakeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"availablePenalty\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumberRequestBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngLookahead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"validateStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"withdrawLeftoverPNK\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A factory of trees that keeps track of staked values for sortition.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LeftoverPNK(address,uint256)\":{\"details\":\"Emitted when leftover PNK is available.\",\"params\":{\"_account\":\"The account of the juror.\",\"_amount\":\"The amount of PNK available.\"}},\"LeftoverPNKWithdrawn(address,uint256)\":{\"details\":\"Emitted when leftover PNK is withdrawn.\",\"params\":{\"_account\":\"The account of the juror withdrawing PNK.\",\"_amount\":\"The amount of PNK withdrawn.\"}},\"StakeDelayed(address,uint96,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_courtID\":\"The ID of the court.\"}},\"StakeLocked(address,uint256,bool)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_relativeAmount\":\"The amount of tokens locked.\",\"_unlock\":\"Whether the stake is locked or unlocked.\"}},\"StakeSet(address,uint256,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_amountAllCourts\":\"The amount of tokens staked in all courts.\",\"_courtID\":\"The ID of the court.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"changeMaxDrawingTime(uint256)\":{\"details\":\"Changes the `maxDrawingTime` storage variable.\",\"params\":{\"_maxDrawingTime\":\"The new value for the `maxDrawingTime` storage variable.\"}},\"changeMinStakingTime(uint256)\":{\"details\":\"Changes the `minStakingTime` storage variable.\",\"params\":{\"_minStakingTime\":\"The new value for the `minStakingTime` storage variable.\"}},\"changeRandomNumberGenerator(address,uint256)\":{\"details\":\"Changes the `_rng` and `_rngLookahead` storage variables.\",\"params\":{\"_rng\":\"The new value for the `RNGenerator` storage variable.\",\"_rngLookahead\":\"The new value for the `rngLookahead` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createTree(bytes32,bytes)\":{\"details\":\"Create a sortition sum tree at the specified key.\",\"params\":{\"_extraData\":\"Extra data that contains the number of children each node in the tree should have.\",\"_key\":\"The key of the new tree.\"}},\"draw(bytes32,uint256,uint256)\":{\"details\":\"Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.\",\"params\":{\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\",\"_key\":\"The key of the tree.\",\"_nonce\":\"Nonce to hash with random number.\"},\"returns\":{\"drawnAddress\":\"The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended.\"}},\"executeDelayedStakes(uint256)\":{\"details\":\"Executes the next delayed stakes.\",\"params\":{\"_iterations\":\"The number of delayed stakes to execute.\"}},\"getJurorCourtIDs(address)\":{\"details\":\"Gets the court identifiers where a specific `_juror` has staked.\",\"params\":{\"_juror\":\"The address of the juror.\"}},\"initialize(address,address,uint256,uint256,address,uint256)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_governor\":\"The governor.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_minStakingTime\":\"Minimal time to stake\",\"_rng\":\"The random number generator.\",\"_rngLookahead\":\"Lookahead value for rng.\"}},\"notifyRandomNumber(uint256)\":{\"details\":\"Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\",\"params\":{\"_randomNumber\":\"Random number returned by RNG contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setJurorInactive(address)\":{\"details\":\"Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The juror to unstake.\"}},\"setStake(address,uint96,uint256,uint256,uint256)\":{\"details\":\"Update the state of the stakes, called by KC at the end of setStake flow. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\",\"_pnkDeposit\":\"The amount of PNK to be deposited.\",\"_pnkWithdrawal\":\"The amount of PNK to be withdrawn.\"}},\"stakeOf(address,uint96)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_juror\":\"The address of the juror.\"},\"returns\":{\"_0\":\"value The stake of the juror in the court.\"}},\"stakeOf(bytes32,bytes32)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_ID\":\"The stake path ID, corresponding to a juror.\",\"_key\":\"The key of the tree, corresponding to a court.\"},\"returns\":{\"_0\":\"The stake of the juror in the court.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"validateStake(address,uint96,uint256)\":{\"details\":\"Validate the specified juror's new stake for a court. Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"},\"returns\":{\"pnkDeposit\":\"The amount of PNK to be deposited.\",\"pnkWithdrawal\":\"The amount of PNK to be withdrawn.\",\"stakingResult\":\"The result of the staking operation.\"}},\"withdrawLeftoverPNK(address)\":{\"details\":\"Gives back the locked PNKs in case the juror fully unstaked earlier. Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). In this case the juror can use this function to withdraw the leftover tokens. Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\",\"params\":{\"_account\":\"The juror whose PNK to withdraw.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"SortitionModule\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"events\":{\"StakeDelayed(address,uint96,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed.\"},\"StakeLocked(address,uint256,bool)\":{\"notice\":\"Emitted when a juror's stake is locked.\"},\"StakeSet(address,uint256,uint256,uint256)\":{\"notice\":\"Emitted when a juror stakes in a court.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/SortitionModule.sol\":\"SortitionModule\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.9.4\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress\\n );\\n }\\n\\n function initialize5() external reinitializer(5) {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0xd09847c220b2727d8e68ef98b0b7ae6e9f678637626b4265abd4ef4fca9411b9\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x03e225e6c6c144dcbc7db8641d46a3b7a43b6222b83ea8b15c4cde58ef2cadd2\",\"license\":\"MIT\"},\"src/arbitration/SortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {SortitionModuleBase, KlerosCore, RNG} from \\\"./SortitionModuleBase.sol\\\";\\n\\n/// @title SortitionModule\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModule is SortitionModuleBase {\\n string public constant override version = \\\"0.9.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor.\\n /// @param _core The KlerosCore.\\n /// @param _minStakingTime Minimal time to stake\\n /// @param _maxDrawingTime Time after which the drawing phase can be switched\\n /// @param _rng The random number generator.\\n /// @param _rngLookahead Lookahead value for rng.\\n function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) external reinitializer(1) {\\n __SortitionModuleBase_initialize(_governor, _core, _minStakingTime, _maxDrawingTime, _rng, _rngLookahead);\\n }\\n\\n function initialize4() external reinitializer(4) {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view virtual override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0xc527c995e140a3092ed63f7a30043bd7f27190def9dd20499beeb4d8e009fb1c\",\"license\":\"MIT\"},\"src/arbitration/SortitionModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore} from \\\"./KlerosCore.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {RNG} from \\\"../rng/RNG.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title SortitionModuleBase\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\nabstract contract SortitionModuleBase is ISortitionModule, Initializable, UUPSProxiable {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct SortitionSumTree {\\n uint256 K; // The maximum number of children per node.\\n // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around.\\n uint256[] stack;\\n uint256[] nodes;\\n // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node.\\n mapping(bytes32 => uint256) IDsToNodeIndexes;\\n mapping(uint256 => bytes32) nodeIndexesToIDs;\\n }\\n\\n struct DelayedStake {\\n address account; // The address of the juror.\\n uint96 courtID; // The ID of the court.\\n uint256 stake; // The new stake.\\n bool alreadyTransferred; // DEPRECATED. True if tokens were already transferred before delayed stake's execution.\\n }\\n\\n struct Juror {\\n uint96[] courtIDs; // The IDs of courts where the juror's stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`.\\n uint256 stakedPnk; // The juror's total amount of tokens staked in subcourts. Reflects actual pnk balance.\\n uint256 lockedPnk; // The juror's total amount of tokens locked in disputes.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The core arbitrator contract.\\n Phase public phase; // The current phase.\\n uint256 public minStakingTime; // The time after which the phase can be switched to Drawing if there are open disputes.\\n uint256 public maxDrawingTime; // The time after which the phase can be switched back to Staking.\\n uint256 public lastPhaseChange; // The last time the phase was changed.\\n uint256 public randomNumberRequestBlock; // Number of the block when RNG request was made.\\n uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\n RNG public rng; // The random number generator.\\n uint256 public randomNumber; // Random number returned by RNG.\\n uint256 public rngLookahead; // Minimal block distance between requesting and obtaining a random number.\\n uint256 public delayedStakeWriteIndex; // The index of the last `delayedStake` item that was written to the array. 0 index is skipped.\\n uint256 public delayedStakeReadIndex; // The index of the next `delayedStake` item that should be processed. Starts at 1 because 0 index is skipped.\\n mapping(bytes32 treeHash => SortitionSumTree) sortitionSumTrees; // The mapping trees by keys.\\n mapping(address account => Juror) public jurors; // The jurors.\\n mapping(uint256 => DelayedStake) public delayedStakes; // Stores the stakes that were changed during Drawing phase, to update them when the phase is switched to Staking.\\n mapping(address jurorAccount => mapping(uint96 courtId => uint256)) public latestDelayedStakeIndex; // DEPRECATED. Maps the juror to its latest delayed stake. If there is already a delayed stake for this juror then it'll be replaced. latestDelayedStakeIndex[juror][courtID].\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice Emitted when a juror stakes in a court.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n /// @param _amountAllCourts The amount of tokens staked in all courts.\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts);\\n\\n /// @notice Emitted when a juror's stake is delayed.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n event StakeDelayed(address indexed _address, uint96 indexed _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is locked.\\n /// @param _address The address of the juror.\\n /// @param _relativeAmount The amount of tokens locked.\\n /// @param _unlock Whether the stake is locked or unlocked.\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n /// @dev Emitted when leftover PNK is available.\\n /// @param _account The account of the juror.\\n /// @param _amount The amount of PNK available.\\n event LeftoverPNK(address indexed _account, uint256 _amount);\\n\\n /// @dev Emitted when leftover PNK is withdrawn.\\n /// @param _account The account of the juror withdrawing PNK.\\n /// @param _amount The amount of PNK withdrawn.\\n event LeftoverPNKWithdrawn(address indexed _account, uint256 _amount);\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __SortitionModuleBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n minStakingTime = _minStakingTime;\\n maxDrawingTime = _maxDrawingTime;\\n lastPhaseChange = block.timestamp;\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n delayedStakeReadIndex = 1;\\n }\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `minStakingTime` storage variable.\\n /// @param _minStakingTime The new value for the `minStakingTime` storage variable.\\n function changeMinStakingTime(uint256 _minStakingTime) external onlyByGovernor {\\n minStakingTime = _minStakingTime;\\n }\\n\\n /// @dev Changes the `maxDrawingTime` storage variable.\\n /// @param _maxDrawingTime The new value for the `maxDrawingTime` storage variable.\\n function changeMaxDrawingTime(uint256 _maxDrawingTime) external onlyByGovernor {\\n maxDrawingTime = _maxDrawingTime;\\n }\\n\\n /// @dev Changes the `_rng` and `_rngLookahead` storage variables.\\n /// @param _rng The new value for the `RNGenerator` storage variable.\\n /// @param _rngLookahead The new value for the `rngLookahead` storage variable.\\n function changeRandomNumberGenerator(RNG _rng, uint256 _rngLookahead) external onlyByGovernor {\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n if (phase == Phase.generating) {\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function passPhase() external {\\n if (phase == Phase.staking) {\\n require(\\n block.timestamp - lastPhaseChange >= minStakingTime,\\n \\\"The minimum staking time has not passed yet.\\\"\\n );\\n require(disputesWithoutJurors > 0, \\\"There are no disputes that need jurors.\\\");\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n phase = Phase.generating;\\n } else if (phase == Phase.generating) {\\n randomNumber = rng.receiveRandomness(randomNumberRequestBlock + rngLookahead);\\n require(randomNumber != 0, \\\"Random number is not ready yet\\\");\\n phase = Phase.drawing;\\n } else if (phase == Phase.drawing) {\\n require(\\n disputesWithoutJurors == 0 || block.timestamp - lastPhaseChange >= maxDrawingTime,\\n \\\"There are still disputes without jurors and the maximum drawing time has not passed yet.\\\"\\n );\\n phase = Phase.staking;\\n }\\n\\n lastPhaseChange = block.timestamp;\\n emit NewPhase(phase);\\n }\\n\\n /// @dev Create a sortition sum tree at the specified key.\\n /// @param _key The key of the new tree.\\n /// @param _extraData Extra data that contains the number of children each node in the tree should have.\\n function createTree(bytes32 _key, bytes memory _extraData) external override onlyByCore {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 K = _extraDataToTreeK(_extraData);\\n require(tree.K == 0, \\\"Tree already exists.\\\");\\n require(K > 1, \\\"K must be greater than one.\\\");\\n tree.K = K;\\n tree.nodes.push(0);\\n }\\n\\n /// @dev Executes the next delayed stakes.\\n /// @param _iterations The number of delayed stakes to execute.\\n function executeDelayedStakes(uint256 _iterations) external {\\n require(phase == Phase.staking, \\\"Should be in Staking phase.\\\");\\n require(delayedStakeWriteIndex >= delayedStakeReadIndex, \\\"No delayed stake to execute.\\\");\\n\\n uint256 actualIterations = (delayedStakeReadIndex + _iterations) - 1 > delayedStakeWriteIndex\\n ? (delayedStakeWriteIndex - delayedStakeReadIndex) + 1\\n : _iterations;\\n uint256 newDelayedStakeReadIndex = delayedStakeReadIndex + actualIterations;\\n\\n for (uint256 i = delayedStakeReadIndex; i < newDelayedStakeReadIndex; i++) {\\n DelayedStake storage delayedStake = delayedStakes[i];\\n core.setStakeBySortitionModule(delayedStake.account, delayedStake.courtID, delayedStake.stake);\\n delete delayedStakes[i];\\n }\\n delayedStakeReadIndex = newDelayedStakeReadIndex;\\n }\\n\\n function createDisputeHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors++;\\n }\\n\\n function postDrawHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors--;\\n }\\n\\n /// @dev Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\\n /// @param _randomNumber Random number returned by RNG contract.\\n function notifyRandomNumber(uint256 _randomNumber) public override {}\\n\\n /// @dev Validate the specified juror's new stake for a court.\\n /// Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @return pnkDeposit The amount of PNK to be deposited.\\n /// @return pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @return stakingResult The result of the staking operation.\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n (pnkDeposit, pnkWithdrawal, stakingResult) = _validateStake(_account, _courtID, _newStake);\\n }\\n\\n function _validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) internal virtual returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n Juror storage juror = jurors[_account];\\n uint256 currentStake = stakeOf(_account, _courtID);\\n\\n uint256 nbCourts = juror.courtIDs.length;\\n if (currentStake == 0 && nbCourts >= MAX_STAKE_PATHS) {\\n return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed.\\n }\\n\\n if (currentStake == 0 && _newStake == 0) {\\n return (0, 0, StakingResult.CannotStakeZeroWhenNoStake); // Forbid staking 0 amount when current stake is 0 to avoid flaky behaviour.\\n }\\n\\n if (phase != Phase.staking) {\\n // Store the stake change as delayed, to be applied when the phase switches back to Staking.\\n DelayedStake storage delayedStake = delayedStakes[++delayedStakeWriteIndex];\\n delayedStake.account = _account;\\n delayedStake.courtID = _courtID;\\n delayedStake.stake = _newStake;\\n emit StakeDelayed(_account, _courtID, _newStake);\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Delayed);\\n }\\n\\n // Current phase is Staking: set stakes.\\n if (_newStake >= currentStake) {\\n pnkDeposit = _newStake - currentStake;\\n } else {\\n pnkWithdrawal = currentStake - _newStake;\\n // Ensure locked tokens remain in the contract. They can only be released during Execution.\\n uint256 possibleWithdrawal = juror.stakedPnk > juror.lockedPnk ? juror.stakedPnk - juror.lockedPnk : 0;\\n if (pnkWithdrawal > possibleWithdrawal) {\\n pnkWithdrawal = possibleWithdrawal;\\n }\\n }\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n /// @dev Update the state of the stakes, called by KC at the end of setStake flow.\\n /// `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _pnkDeposit The amount of PNK to be deposited.\\n /// @param _pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @param _newStake The new stake.\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external override onlyByCore {\\n _setStake(_account, _courtID, _pnkDeposit, _pnkWithdrawal, _newStake);\\n }\\n\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) internal virtual {\\n Juror storage juror = jurors[_account];\\n if (_pnkDeposit > 0) {\\n uint256 currentStake = stakeOf(_account, _courtID);\\n if (currentStake == 0) {\\n juror.courtIDs.push(_courtID);\\n }\\n // Increase juror's balance by deposited amount.\\n juror.stakedPnk += _pnkDeposit;\\n } else {\\n juror.stakedPnk -= _pnkWithdrawal;\\n if (_newStake == 0) {\\n // Cleanup\\n for (uint256 i = juror.courtIDs.length; i > 0; i--) {\\n if (juror.courtIDs[i - 1] == _courtID) {\\n juror.courtIDs[i - 1] = juror.courtIDs[juror.courtIDs.length - 1];\\n juror.courtIDs.pop();\\n break;\\n }\\n }\\n }\\n }\\n\\n // Update the sortition sum tree.\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_account, _courtID);\\n bool finished = false;\\n uint96 currenCourtID = _courtID;\\n while (!finished) {\\n // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn.\\n _set(bytes32(uint256(currenCourtID)), _newStake, stakePathID);\\n if (currenCourtID == GENERAL_COURT) {\\n finished = true;\\n } else {\\n (currenCourtID, , , , , , ) = core.courts(currenCourtID); // Get the parent court.\\n }\\n }\\n emit StakeSet(_account, _courtID, _newStake, juror.stakedPnk);\\n }\\n\\n function lockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n jurors[_account].lockedPnk += _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, false);\\n }\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n Juror storage juror = jurors[_account];\\n juror.lockedPnk -= _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, true);\\n\\n uint256 amount = getJurorLeftoverPNK(_account);\\n if (amount > 0) {\\n emit LeftoverPNK(_account, amount);\\n }\\n }\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external override onlyByCore returns (uint256 pnkBalance, uint256 availablePenalty) {\\n Juror storage juror = jurors[_account];\\n uint256 stakedPnk = juror.stakedPnk;\\n\\n if (stakedPnk >= _relativeAmount) {\\n availablePenalty = _relativeAmount;\\n juror.stakedPnk -= _relativeAmount;\\n } else {\\n availablePenalty = stakedPnk;\\n juror.stakedPnk = 0;\\n }\\n\\n pnkBalance = juror.stakedPnk;\\n return (pnkBalance, availablePenalty);\\n }\\n\\n /// @dev Unstakes the inactive juror from all courts.\\n /// `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The juror to unstake.\\n function setJurorInactive(address _account) external override onlyByCore {\\n uint96[] memory courtIDs = getJurorCourtIDs(_account);\\n for (uint256 j = courtIDs.length; j > 0; j--) {\\n core.setStakeBySortitionModule(_account, courtIDs[j - 1], 0);\\n }\\n }\\n\\n /// @dev Gives back the locked PNKs in case the juror fully unstaked earlier.\\n /// Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance\\n /// while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked).\\n /// In this case the juror can use this function to withdraw the leftover tokens.\\n /// Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\\n /// @param _account The juror whose PNK to withdraw.\\n function withdrawLeftoverPNK(address _account) external override {\\n // Can withdraw the leftover PNK if fully unstaked, has no tokens locked and has positive balance.\\n // This withdrawal can't be triggered by calling setStake() in KlerosCore because current stake is technically 0, thus it is done via separate function.\\n uint256 amount = getJurorLeftoverPNK(_account);\\n require(amount > 0, \\\"Not eligible for withdrawal.\\\");\\n jurors[_account].stakedPnk = 0;\\n core.transferBySortitionModule(_account, amount);\\n emit LeftoverPNKWithdrawn(_account, amount);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Draw an ID from a tree using a number.\\n /// Note that this function reverts if the sum of all values in the tree is 0.\\n /// @param _key The key of the tree.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _nonce Nonce to hash with random number.\\n /// @return drawnAddress The drawn address.\\n /// `O(k * log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function draw(\\n bytes32 _key,\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) public view override returns (address drawnAddress) {\\n require(phase == Phase.drawing, \\\"Wrong phase.\\\");\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n if (tree.nodes[0] == 0) {\\n return address(0); // No jurors staked.\\n }\\n\\n uint256 currentDrawnNumber = uint256(keccak256(abi.encodePacked(randomNumber, _coreDisputeID, _nonce))) %\\n tree.nodes[0];\\n\\n // While it still has children\\n uint256 treeIndex = 0;\\n while ((tree.K * treeIndex) + 1 < tree.nodes.length) {\\n for (uint256 i = 1; i <= tree.K; i++) {\\n // Loop over children.\\n uint256 nodeIndex = (tree.K * treeIndex) + i;\\n uint256 nodeValue = tree.nodes[nodeIndex];\\n\\n if (currentDrawnNumber >= nodeValue) {\\n // Go to the next child.\\n currentDrawnNumber -= nodeValue;\\n } else {\\n // Pick this child.\\n treeIndex = nodeIndex;\\n break;\\n }\\n }\\n }\\n drawnAddress = _stakePathIDToAccount(tree.nodeIndexesToIDs[treeIndex]);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return value The stake of the juror in the court.\\n function stakeOf(address _juror, uint96 _courtID) public view returns (uint256) {\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_juror, _courtID);\\n return stakeOf(bytes32(uint256(_courtID)), stakePathID);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _key The key of the tree, corresponding to a court.\\n /// @param _ID The stake path ID, corresponding to a juror.\\n /// @return The stake of the juror in the court.\\n function stakeOf(bytes32 _key, bytes32 _ID) public view returns (uint256) {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint treeIndex = tree.IDsToNodeIndexes[_ID];\\n if (treeIndex == 0) {\\n return 0;\\n }\\n return tree.nodes[treeIndex];\\n }\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n )\\n external\\n view\\n override\\n returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts)\\n {\\n Juror storage juror = jurors[_juror];\\n totalStaked = juror.stakedPnk;\\n totalLocked = juror.lockedPnk;\\n stakedInCourt = stakeOf(_juror, _courtID);\\n nbCourts = juror.courtIDs.length;\\n }\\n\\n /// @dev Gets the court identifiers where a specific `_juror` has staked.\\n /// @param _juror The address of the juror.\\n function getJurorCourtIDs(address _juror) public view override returns (uint96[] memory) {\\n return jurors[_juror].courtIDs;\\n }\\n\\n function isJurorStaked(address _juror) external view override returns (bool) {\\n return jurors[_juror].stakedPnk > 0;\\n }\\n\\n function getJurorLeftoverPNK(address _juror) public view override returns (uint256) {\\n Juror storage juror = jurors[_juror];\\n if (juror.courtIDs.length == 0 && juror.lockedPnk == 0) {\\n return juror.stakedPnk;\\n } else {\\n return 0;\\n }\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Update all the parents of a node.\\n /// @param _key The key of the tree to update.\\n /// @param _treeIndex The index of the node to start from.\\n /// @param _plusOrMinus Whether to add (true) or substract (false).\\n /// @param _value The value to add or substract.\\n /// `O(log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function _updateParents(bytes32 _key, uint256 _treeIndex, bool _plusOrMinus, uint256 _value) private {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n uint256 parentIndex = _treeIndex;\\n while (parentIndex != 0) {\\n parentIndex = (parentIndex - 1) / tree.K;\\n tree.nodes[parentIndex] = _plusOrMinus\\n ? tree.nodes[parentIndex] + _value\\n : tree.nodes[parentIndex] - _value;\\n }\\n }\\n\\n /// @dev Retrieves a juror's address from the stake path ID.\\n /// @param _stakePathID The stake path ID to unpack.\\n /// @return account The account.\\n function _stakePathIDToAccount(bytes32 _stakePathID) internal pure returns (address account) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(add(ptr, 0x0c), i), byte(i, _stakePathID))\\n }\\n account := mload(ptr)\\n }\\n }\\n\\n function _extraDataToTreeK(bytes memory _extraData) internal pure returns (uint256 K) {\\n if (_extraData.length >= 32) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n K := mload(add(_extraData, 0x20))\\n }\\n } else {\\n K = DEFAULT_K;\\n }\\n }\\n\\n /// @dev Set a value in a tree.\\n /// @param _key The key of the tree.\\n /// @param _value The new value.\\n /// @param _ID The ID of the value.\\n /// `O(log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function _set(bytes32 _key, uint256 _value, bytes32 _ID) internal {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n if (treeIndex == 0) {\\n // No existing node.\\n if (_value != 0) {\\n // Non zero value.\\n // Append.\\n // Add node.\\n if (tree.stack.length == 0) {\\n // No vacant spots.\\n // Get the index and append the value.\\n treeIndex = tree.nodes.length;\\n tree.nodes.push(_value);\\n\\n // Potentially append a new node and make the parent a sum node.\\n if (treeIndex != 1 && (treeIndex - 1) % tree.K == 0) {\\n // Is first child.\\n uint256 parentIndex = treeIndex / tree.K;\\n bytes32 parentID = tree.nodeIndexesToIDs[parentIndex];\\n uint256 newIndex = treeIndex + 1;\\n tree.nodes.push(tree.nodes[parentIndex]);\\n delete tree.nodeIndexesToIDs[parentIndex];\\n tree.IDsToNodeIndexes[parentID] = newIndex;\\n tree.nodeIndexesToIDs[newIndex] = parentID;\\n }\\n } else {\\n // Some vacant spot.\\n // Pop the stack and append the value.\\n treeIndex = tree.stack[tree.stack.length - 1];\\n tree.stack.pop();\\n tree.nodes[treeIndex] = _value;\\n }\\n\\n // Add label.\\n tree.IDsToNodeIndexes[_ID] = treeIndex;\\n tree.nodeIndexesToIDs[treeIndex] = _ID;\\n\\n _updateParents(_key, treeIndex, true, _value);\\n }\\n } else {\\n // Existing node.\\n if (_value == 0) {\\n // Zero value.\\n // Remove.\\n // Remember value and set to 0.\\n uint256 value = tree.nodes[treeIndex];\\n tree.nodes[treeIndex] = 0;\\n\\n // Push to stack.\\n tree.stack.push(treeIndex);\\n\\n // Clear label.\\n delete tree.IDsToNodeIndexes[_ID];\\n delete tree.nodeIndexesToIDs[treeIndex];\\n\\n _updateParents(_key, treeIndex, false, value);\\n } else if (_value != tree.nodes[treeIndex]) {\\n // New, non zero value.\\n // Set.\\n bool plusOrMinus = tree.nodes[treeIndex] <= _value;\\n uint256 plusOrMinusValue = plusOrMinus\\n ? _value - tree.nodes[treeIndex]\\n : tree.nodes[treeIndex] - _value;\\n tree.nodes[treeIndex] = _value;\\n\\n _updateParents(_key, treeIndex, plusOrMinus, plusOrMinusValue);\\n }\\n }\\n }\\n\\n /// @dev Packs an account and a court ID into a stake path ID.\\n /// @param _account The address of the juror to pack.\\n /// @param _courtID The court ID to pack.\\n /// @return stakePathID The stake path ID.\\n function _accountAndCourtIDToStakePathID(\\n address _account,\\n uint96 _courtID\\n ) internal pure returns (bytes32 stakePathID) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(add(0x0c, i), _account))\\n }\\n for {\\n let i := 0x14\\n } lt(i, 0x20) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(i, _courtID))\\n }\\n stakePathID := mload(ptr)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x550f0c0bea80f7457f76f50e27dfa1b8632fe9eb28d4e57f8b2bed9a10a31696\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0x0f6a8fb72ed7e5a602dc0aaf4f3a037ba9f1765b79b6320604ff810d578af2cf\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051612f3f6100fc60003960008181611389015281816113b201526115aa0152612f3f6000f3fe6080604052600436106102725760003560e01c80637dc38f141161014f578063caeb50ed116100c1578063dd5e5cb51161007a578063dd5e5cb5146107b9578063e4c0aaf4146107d9578063e534710d146107f9578063f216de4c14610831578063f2f4eb2614610851578063f6b4d82d1461087157600080fd5b8063caeb50ed146106c2578063ccbac9f5146106d7578063d09f392d146106ed578063d1c1df481461070d578063d605787b1461074d578063dca5f6b01461076d57600080fd5b8063aac03ad211610113578063aac03ad214610612578063b1c9fe6e14610632578063b5d69e9914610660578063b888adfa14610680578063c057eca714610696578063c1572618146106ac57600080fd5b80637dc38f141461057c578063823cfd7014610592578063965af6c7146105b25780639fbb56f1146105d2578063a2473cc1146105f257600080fd5b80634dbbebbc116101e857806354fd4d50116101ac57806354fd4d501461047d57806356acb050146104bb5780635d2d7846146104d15780636624192f146104f157806369f458771461053c57806376fa9fc51461055c57600080fd5b80634dbbebbc146103e85780634f1ef2861461040857806352d1902d1461041b578063543f8a361461043057806354812d171461045d57600080fd5b80631ecacab81161023a5780631ecacab81461031b57806321e1625e1461034a57806321ea9b3f1461036a57806335975f4a14610388578063477a655c146103a85780634c70a0d6146103c857600080fd5b806303432744146102775780630b274f2e146102a05780630c340a24146102b75780630e083ec9146102ef5780631b92bbbe14610305575b600080fd5b34801561028357600080fd5b5061028d60065481565b6040519081526020015b60405180910390f35b3480156102ac57600080fd5b506102b56108ff565b005b3480156102c357600080fd5b506000546102d7906001600160a01b031681565b6040516001600160a01b039091168152602001610297565b3480156102fb57600080fd5b5061028d600a5481565b34801561031157600080fd5b5061028d60035481565b34801561032757600080fd5b5061033b610336366004612896565b610cd7565b604051610297939291906128ed565b34801561035657600080fd5b506102b5610365366004612919565b610d22565b34801561037657600080fd5b506102b5610385366004612945565b50565b34801561039457600080fd5b506102b56103a3366004612945565b610dc5565b3480156103b457600080fd5b506102b56103c3366004612a01565b610fb1565b3480156103d457600080fd5b506102d76103e3366004612a47565b6110a8565b3480156103f457600080fd5b506102b5610403366004612919565b61128c565b6102b5610416366004612a73565b611375565b34801561042757600080fd5b5061028d61159d565b34801561043c57600080fd5b5061045061044b366004612aac565b6115fb565b6040516102979190612ac9565b34801561046957600080fd5b506102b5610478366004612b15565b611699565b34801561048957600080fd5b506104ae604051806040016040528060058152602001640302e392e360dc1b81525081565b6040516102979190612ba0565b3480156104c757600080fd5b5061028d600b5481565b3480156104dd57600080fd5b506102b56104ec366004612bd3565b611769565b3480156104fd57600080fd5b5061052c61050c366004612aac565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610297565b34801561054857600080fd5b506102b5610557366004612aac565b6117ac565b34801561056857600080fd5b5061028d610577366004612bd3565b6118c3565b34801561058857600080fd5b5061028d60095481565b34801561059e57600080fd5b506102b56105ad366004612945565b61191e565b3480156105be57600080fd5b506102b56105cd366004612919565b61194d565b3480156105de57600080fd5b5061028d6105ed366004612aac565b611a49565b3480156105fe57600080fd5b5061028d61060d366004612bf5565b611a8a565b34801561061e57600080fd5b506102b561062d366004612c2e565b611ab4565b34801561063e57600080fd5b5060015461065390600160a01b900460ff1681565b6040516102979190612c7f565b34801561066c57600080fd5b506102b561067b366004612aac565b611af2565b34801561068c57600080fd5b5061028d60045481565b3480156106a257600080fd5b5061028d60025481565b3480156106b857600080fd5b5061028d60055481565b3480156106ce57600080fd5b506102b5611bd2565b3480156106e357600080fd5b5061028d60085481565b3480156106f957600080fd5b506102b5610708366004612bd3565b611c83565b34801561071957600080fd5b5061072d610728366004612bf5565b611cbd565b604080519485526020850193909352918301526060820152608001610297565b34801561075957600080fd5b506007546102d7906001600160a01b031681565b34801561077957600080fd5b506107a4610788366004612aac565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610297565b3480156107c557600080fd5b506102b56107d4366004612945565b611cfc565b3480156107e557600080fd5b506102b56107f4366004612aac565b611d2b565b34801561080557600080fd5b5061028d610814366004612bf5565b600f60209081526000928352604080842090915290825290205481565b34801561083d57600080fd5b506107a461084c366004612919565b611d77565b34801561085d57600080fd5b506001546102d7906001600160a01b031681565b34801561087d57600080fd5b506108cb61088c366004612945565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b604080516001600160a01b0390951685526001600160601b0390931660208501529183015215156060820152608001610297565b6000600154600160a01b900460ff16600281111561091f5761091f6128d7565b03610a92576002546004546109349042612caf565b101561099c5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109fe5760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b6064820152608401610993565b6007546009546001600160a01b0390911690637363ae1f90610a209043612cc2565b6040518263ffffffff1660e01b8152600401610a3e91815260200190565b600060405180830381600087803b158015610a5857600080fd5b505af1158015610a6c573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c8c565b60018054600160a01b900460ff166002811115610ab157610ab16128d7565b03610ba9576007546009546005546001600160a01b03909216916313cf905491610ada91612cc2565b6040518263ffffffff1660e01b8152600401610af891815260200190565b6020604051808303816000875af1158015610b17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3b9190612cd5565b6008819055600003610b8f5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f742072656164792079657400006044820152606401610993565b600180546002919060ff60a01b1916600160a01b83610a88565b6002600154600160a01b900460ff166002811115610bc957610bc96128d7565b03610c8c576006541580610beb5750600354600454610be89042612caf565b10155b610c7e5760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a401610993565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610ccd91600160a01b90910460ff1690612c7f565b60405180910390a1565b600154600090819081906001600160a01b03163314610d085760405162461bcd60e51b815260040161099390612cee565b610d13868686611e05565b91989097509095509350505050565b6001546001600160a01b03163314610d4c5760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0382166000908152600d602052604081206002018054839290610d77908490612cc2565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610de557610de56128d7565b14610e325760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e00000000006044820152606401610993565b600b54600a541015610e865760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e000000006044820152606401610993565b6000600a54600183600b54610e9b9190612cc2565b610ea59190612caf565b11610eb05781610ecb565b600b54600a54610ec09190612caf565b610ecb906001612cc2565b9050600081600b54610edd9190612cc2565b600b549091505b81811015610fa9576000818152600e602052604090819020600180548254918301549351630761c14d60e01b815292936001600160a01b0391821693630761c14d93610f4793811692600160a01b9091046001600160601b031691600401612d32565b600060405180830381600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b5050506000838152600e60205260408120818155600180820192909255600201805460ff191690559092019150610ee49050565b50600b555050565b6001546001600160a01b03163314610fdb5760405162461bcd60e51b815260040161099390612cee565b6000828152600c6020526040812090610ff383611fa8565b82549091501561103c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b6044820152606401610993565b6001811161108c5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e00000000006044820152606401610993565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff1660028111156110ca576110ca6128d7565b146111065760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b6044820152606401610993565b6000848152600c602052604081206002810180549192909161112a5761112a612d5c565b9060005260206000200154600003611146576000915050611285565b60008160020160008154811061115e5761115e612d5c565b90600052602060002001546008548686604051602001611191939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111b49190612d88565b905060005b600283015483546111cb908390612d9c565b6111d6906001612cc2565b10156112655760015b8354811161125f576000818386600001546111fa9190612d9c565b6112049190612cc2565b9050600085600201828154811061121d5761121d612d5c565b906000526020600020015490508085106112425761123b8186612caf565b945061124a565b50915061125f565b5050808061125790612db3565b9150506111df565b506111b9565b600081815260048401602052604090205461127f90611fc4565b93505050505b9392505050565b6000546001600160a01b031633146112b65760405162461bcd60e51b815260040161099390612dcc565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156112f5576112f56128d7565b03611371576007546009546001600160a01b0390911690637363ae1f9061131c9043612cc2565b6040518263ffffffff1660e01b815260040161133a91815260200190565b600060405180830381600087803b15801561135457600080fd5b505af1158015611368573d6000803e3d6000fd5b50504360055550505b5050565b61137e82611fef565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113fc57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113f0600080516020612eea8339815191525490565b6001600160a01b031614155b1561141a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611474575060408051601f3d908101601f1916820190925261147191810190612cd5565b60015b61149c57604051630c76093760e01b81526001600160a01b0383166004820152602401610993565b600080516020612eea83398151915281146114cd57604051632a87526960e21b815260048101829052602401610993565b600080516020612eea8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611598576000836001600160a01b0316836040516115349190612e0e565b600060405180830381855af49150503d806000811461156f576040519150601f19603f3d011682016040523d82523d6000602084013e611574565b606091505b5050905080611596576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115e85760405163703e46dd60e11b815260040160405180910390fd5b50600080516020612eea83398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561168d57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161164a5790505b50505050509050919050565b600160006116a5612019565b8054909150600160401b900460ff16806116cc575080546001600160401b03808416911610155b156116e95760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561171888888888888861203d565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146117935760405162461bcd60e51b815260040161099390612cee565b600680549060006117a383612e2a565b91905055505050565b60006117b782611a49565b9050600081116118095760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656c696769626c6520666f72207769746864726177616c2e000000006044820152606401610993565b6001600160a01b038281166000818152600d6020526040808220600190810192909255905490516342c37fa360e01b8152600481019290925260248201849052909116906342c37fa390604401600060405180830381600087803b15801561187057600080fd5b505af1158015611884573d6000803e3d6000fd5b50505050816001600160a01b03167f71bb1b604559acc3db697ccf2aa4228d727cd5b133d6ffa419518d51c117c95c82604051610db991815260200190565b6000828152600c60209081526040808320848452600381019092528220548083036118f357600092505050611918565b81600201818154811061190857611908612d5c565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146119485760405162461bcd60e51b815260040161099390612dcc565b600255565b6001546001600160a01b031633146119775760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0382166000908152600d60205260408120600281018054919284926119a4908490612caf565b909155505060408051838152600160208201526001600160a01b038516917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b0910160405180910390a260006119f884611a49565b9050801561159657836001600160a01b03167f819a3744490c627e221b71743857691f9c23bf56a1ecc5351f886cfd4c3187d982604051611a3b91815260200190565b60405180910390a250505050565b6001600160a01b0381166000908152600d602052604081208054158015611a7257506002810154155b15611a81576001015492915050565b50600092915050565b600080611a97848461209d565b9050611aac6001600160601b038416826118c3565b949350505050565b6001546001600160a01b03163314611ade5760405162461bcd60e51b815260040161099390612cee565b611aeb85858585856120e5565b5050505050565b6001546001600160a01b03163314611b1c5760405162461bcd60e51b815260040161099390612cee565b6000611b27826115fb565b80519091505b801561159857600180546001600160a01b031690630761c14d9085908590611b559086612caf565b81518110611b6557611b65612d5c565b602002602001015160006040518463ffffffff1660e01b8152600401611b8d93929190612d32565b600060405180830381600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050508080611bca90612e2a565b915050611b2d565b60046000611bde612019565b8054909150600160401b900460ff1680611c05575080546001600160401b03808416911610155b15611c225760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611cad5760405162461bcd60e51b815260040161099390612cee565b600680549060006117a383612db3565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611cef8787611a8a565b9054949793965094505050565b6000546001600160a01b03163314611d265760405162461bcd60e51b815260040161099390612dcc565b600355565b6000546001600160a01b03163314611d555760405162461bcd60e51b815260040161099390612dcc565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60015460009081906001600160a01b03163314611da65760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0384166000908152600d602052604090206001810154848110611dec5784925084826001016000828254611de19190612caf565b90915550611df79050565b600060018301559150815b506001015491509250929050565b6001600160a01b0383166000908152600d602052604081208190819081611e2c8888611a8a565b825490915081158015611e40575060048110155b15611e58576000806004955095509550505050611f9f565b81158015611e64575086155b15611e7c576000806009955095509550505050611f9f565b6000600154600160a01b900460ff166002811115611e9c57611e9c6128d7565b14611f37576000600e6000600a60008154611eb690612db3565b9182905550815260208082019290925260409081016000206001600160601b038c16600160a01b81026001600160a01b038f169081178355600183018d905592518c8152919450927fa59837f9df3fb816613d84e8fefe31ec8d6e67ff43df6533e3f793a3f53aade9910160405180910390a35060019350611f9f92505050565b818710611f4f57611f488288612caf565b9550611f97565b611f598783612caf565b945060008360020154846001015411611f73576000611f87565b83600201548460010154611f879190612caf565b905080861115611f95578095505b505b506000925050505b93509350939050565b60006020825110611fbb57506020015190565b5060065b919050565b600060405160005b6014811015611fe75783811a81600c84010153600101611fcc565b505192915050565b6000546001600160a01b031633146103855760405162461bcd60e51b815260040161099390612dcc565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61204561241b565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b60148110156120c0578481600c011a818301536001016120a5565b5060145b60208110156120dc5783811a818301536001016120c4565b50519392505050565b6001600160a01b0385166000908152600d60205260409020831561217457600061210f8787611a8a565b905080600003612154578154600180820184556000848152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918916021790555b848260010160008282546121689190612cc2565b909155506122eb915050565b828160010160008282546121889190612caf565b909155505060008290036122eb5780545b80156122e9576001600160601b038616826121b5600184612caf565b815481106121c5576121c5612d5c565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036122d7578154829061220190600190612caf565b8154811061221157612211612d5c565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122459084612caf565b8154811061225557612255612d5c565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122a1576122a1612e41565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556122e9565b806122e181612e2a565b915050612199565b505b60006122f7878761209d565b90506000865b816123b5576123166001600160601b0382168685612442565b6000196001600160601b0382160161233157600191506122fd565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015612382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a69190612e67565b509495506122fd945050505050565b6001840154604080516001600160601b038b16815260208101889052908101919091526001600160a01b038a16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2505050505050505050565b612423612795565b61244057604051631afcd79f60e31b815260040160405180910390fd5b565b6000838152600c6020908152604080832084845260038101909252822054909181900361260f57831561260a57600182015460000361255d5750600281018054600180820183556000928352602090922081018590559081148015906124bc575081546124b0600183612caf565b6124ba9190612d88565b155b156125585781546000906124d09083612ed5565b60008181526004850160205260408120549192506124ef846001612cc2565b90508460020185600201848154811061250a5761250a612d5c565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6125d8565b60018083018054909161256f91612caf565b8154811061257f5761257f612d5c565b906000526020600020015490508160010180548061259f5761259f612e41565b60019003818190600052602060002001600090559055838260020182815481106125cb576125cb612d5c565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561260a85826001876127af565b611aeb565b836000036126ad57600082600201828154811061262e5761262e612d5c565b90600052602060002001549050600083600201838154811061265257612652612d5c565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556126a79087908490846127af565b50611aeb565b8160020181815481106126c2576126c2612d5c565b90600052602060002001548414611aeb576000848360020183815481106126eb576126eb612d5c565b906000526020600020015411159050600081612731578584600201848154811061271757612717612d5c565b906000526020600020015461272c9190612caf565b61275c565b83600201838154811061274657612746612d5c565b90600052602060002001548661275c9190612caf565b90508584600201848154811061277457612774612d5c565b60009182526020909120015561278c878484846127af565b50505050505050565b600061279f612019565b54600160401b900460ff16919050565b6000848152600c60205260409020835b80156128645781546127d2600183612caf565b6127dc9190612ed5565b90508361281357828260020182815481106127f9576127f9612d5c565b906000526020600020015461280e9190612caf565b61283e565b8282600201828154811061282957612829612d5c565b906000526020600020015461283e9190612cc2565b82600201828154811061285357612853612d5c565b6000918252602090912001556127bf565b505050505050565b6001600160a01b038116811461038557600080fd5b6001600160601b038116811461038557600080fd5b6000806000606084860312156128ab57600080fd5b83356128b68161286c565b925060208401356128c681612881565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b8381526020810183905260608101600a831061290b5761290b6128d7565b826040830152949350505050565b6000806040838503121561292c57600080fd5b82356129378161286c565b946020939093013593505050565b60006020828403121561295757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298557600080fd5b81356001600160401b0381111561299e5761299e61295e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156129cc576129cc61295e565b6040528181528382016020018510156129e457600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612a1457600080fd5b8235915060208301356001600160401b03811115612a3157600080fd5b612a3d85828601612974565b9150509250929050565b600080600060608486031215612a5c57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612a8657600080fd5b8235612a918161286c565b915060208301356001600160401b03811115612a3157600080fd5b600060208284031215612abe57600080fd5b81356112858161286c565b602080825282518282018190526000918401906040840190835b81811015612b0a5783516001600160601b0316835260209384019390920191600101612ae3565b509095945050505050565b60008060008060008060c08789031215612b2e57600080fd5b8635612b398161286c565b95506020870135612b498161286c565b945060408701359350606087013592506080870135612b678161286c565b9598949750929591949360a090920135925050565b60005b83811015612b97578181015183820152602001612b7f565b50506000910152565b6020815260008251806020840152612bbf816040850160208701612b7c565b601f01601f19169190910160400192915050565b60008060408385031215612be657600080fd5b50508035926020909101359150565b60008060408385031215612c0857600080fd5b8235612c138161286c565b91506020830135612c2381612881565b809150509250929050565b600080600080600060a08688031215612c4657600080fd5b8535612c518161286c565b94506020860135612c6181612881565b94979496505050506040830135926060810135926080909101359150565b6020810160038310612c9357612c936128d7565b91905290565b634e487b7160e01b600052601160045260246000fd5b8181038181111561191857611918612c99565b8082018082111561191857611918612c99565b600060208284031215612ce757600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b6001600160a01b039390931683526001600160601b03919091166020830152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612d9757612d97612d72565b500690565b808202811582820484141761191857611918612c99565b600060018201612dc557612dc5612c99565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251612e20818460208701612b7c565b9190910192915050565b600081612e3957612e39612c99565b506000190190565b634e487b7160e01b600052603160045260246000fd5b80518015158114611fbf57600080fd5b600080600080600080600060e0888a031215612e8257600080fd5b8751612e8d81612881565b9650612e9b60208901612e57565b604089015160608a015160808b015160a08c0151939950919750955093509150612ec760c08901612e57565b905092959891949750929550565b600082612ee457612ee4612d72565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200186314699ae77a443609cfb006b9ef79adca12e964bddf2a243cc7bcac06f9264736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102725760003560e01c80637dc38f141161014f578063caeb50ed116100c1578063dd5e5cb51161007a578063dd5e5cb5146107b9578063e4c0aaf4146107d9578063e534710d146107f9578063f216de4c14610831578063f2f4eb2614610851578063f6b4d82d1461087157600080fd5b8063caeb50ed146106c2578063ccbac9f5146106d7578063d09f392d146106ed578063d1c1df481461070d578063d605787b1461074d578063dca5f6b01461076d57600080fd5b8063aac03ad211610113578063aac03ad214610612578063b1c9fe6e14610632578063b5d69e9914610660578063b888adfa14610680578063c057eca714610696578063c1572618146106ac57600080fd5b80637dc38f141461057c578063823cfd7014610592578063965af6c7146105b25780639fbb56f1146105d2578063a2473cc1146105f257600080fd5b80634dbbebbc116101e857806354fd4d50116101ac57806354fd4d501461047d57806356acb050146104bb5780635d2d7846146104d15780636624192f146104f157806369f458771461053c57806376fa9fc51461055c57600080fd5b80634dbbebbc146103e85780634f1ef2861461040857806352d1902d1461041b578063543f8a361461043057806354812d171461045d57600080fd5b80631ecacab81161023a5780631ecacab81461031b57806321e1625e1461034a57806321ea9b3f1461036a57806335975f4a14610388578063477a655c146103a85780634c70a0d6146103c857600080fd5b806303432744146102775780630b274f2e146102a05780630c340a24146102b75780630e083ec9146102ef5780631b92bbbe14610305575b600080fd5b34801561028357600080fd5b5061028d60065481565b6040519081526020015b60405180910390f35b3480156102ac57600080fd5b506102b56108ff565b005b3480156102c357600080fd5b506000546102d7906001600160a01b031681565b6040516001600160a01b039091168152602001610297565b3480156102fb57600080fd5b5061028d600a5481565b34801561031157600080fd5b5061028d60035481565b34801561032757600080fd5b5061033b610336366004612896565b610cd7565b604051610297939291906128ed565b34801561035657600080fd5b506102b5610365366004612919565b610d22565b34801561037657600080fd5b506102b5610385366004612945565b50565b34801561039457600080fd5b506102b56103a3366004612945565b610dc5565b3480156103b457600080fd5b506102b56103c3366004612a01565b610fb1565b3480156103d457600080fd5b506102d76103e3366004612a47565b6110a8565b3480156103f457600080fd5b506102b5610403366004612919565b61128c565b6102b5610416366004612a73565b611375565b34801561042757600080fd5b5061028d61159d565b34801561043c57600080fd5b5061045061044b366004612aac565b6115fb565b6040516102979190612ac9565b34801561046957600080fd5b506102b5610478366004612b15565b611699565b34801561048957600080fd5b506104ae604051806040016040528060058152602001640302e392e360dc1b81525081565b6040516102979190612ba0565b3480156104c757600080fd5b5061028d600b5481565b3480156104dd57600080fd5b506102b56104ec366004612bd3565b611769565b3480156104fd57600080fd5b5061052c61050c366004612aac565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610297565b34801561054857600080fd5b506102b5610557366004612aac565b6117ac565b34801561056857600080fd5b5061028d610577366004612bd3565b6118c3565b34801561058857600080fd5b5061028d60095481565b34801561059e57600080fd5b506102b56105ad366004612945565b61191e565b3480156105be57600080fd5b506102b56105cd366004612919565b61194d565b3480156105de57600080fd5b5061028d6105ed366004612aac565b611a49565b3480156105fe57600080fd5b5061028d61060d366004612bf5565b611a8a565b34801561061e57600080fd5b506102b561062d366004612c2e565b611ab4565b34801561063e57600080fd5b5060015461065390600160a01b900460ff1681565b6040516102979190612c7f565b34801561066c57600080fd5b506102b561067b366004612aac565b611af2565b34801561068c57600080fd5b5061028d60045481565b3480156106a257600080fd5b5061028d60025481565b3480156106b857600080fd5b5061028d60055481565b3480156106ce57600080fd5b506102b5611bd2565b3480156106e357600080fd5b5061028d60085481565b3480156106f957600080fd5b506102b5610708366004612bd3565b611c83565b34801561071957600080fd5b5061072d610728366004612bf5565b611cbd565b604080519485526020850193909352918301526060820152608001610297565b34801561075957600080fd5b506007546102d7906001600160a01b031681565b34801561077957600080fd5b506107a4610788366004612aac565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610297565b3480156107c557600080fd5b506102b56107d4366004612945565b611cfc565b3480156107e557600080fd5b506102b56107f4366004612aac565b611d2b565b34801561080557600080fd5b5061028d610814366004612bf5565b600f60209081526000928352604080842090915290825290205481565b34801561083d57600080fd5b506107a461084c366004612919565b611d77565b34801561085d57600080fd5b506001546102d7906001600160a01b031681565b34801561087d57600080fd5b506108cb61088c366004612945565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b604080516001600160a01b0390951685526001600160601b0390931660208501529183015215156060820152608001610297565b6000600154600160a01b900460ff16600281111561091f5761091f6128d7565b03610a92576002546004546109349042612caf565b101561099c5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109fe5760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b6064820152608401610993565b6007546009546001600160a01b0390911690637363ae1f90610a209043612cc2565b6040518263ffffffff1660e01b8152600401610a3e91815260200190565b600060405180830381600087803b158015610a5857600080fd5b505af1158015610a6c573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c8c565b60018054600160a01b900460ff166002811115610ab157610ab16128d7565b03610ba9576007546009546005546001600160a01b03909216916313cf905491610ada91612cc2565b6040518263ffffffff1660e01b8152600401610af891815260200190565b6020604051808303816000875af1158015610b17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3b9190612cd5565b6008819055600003610b8f5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f742072656164792079657400006044820152606401610993565b600180546002919060ff60a01b1916600160a01b83610a88565b6002600154600160a01b900460ff166002811115610bc957610bc96128d7565b03610c8c576006541580610beb5750600354600454610be89042612caf565b10155b610c7e5760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a401610993565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610ccd91600160a01b90910460ff1690612c7f565b60405180910390a1565b600154600090819081906001600160a01b03163314610d085760405162461bcd60e51b815260040161099390612cee565b610d13868686611e05565b91989097509095509350505050565b6001546001600160a01b03163314610d4c5760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0382166000908152600d602052604081206002018054839290610d77908490612cc2565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610de557610de56128d7565b14610e325760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e00000000006044820152606401610993565b600b54600a541015610e865760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e000000006044820152606401610993565b6000600a54600183600b54610e9b9190612cc2565b610ea59190612caf565b11610eb05781610ecb565b600b54600a54610ec09190612caf565b610ecb906001612cc2565b9050600081600b54610edd9190612cc2565b600b549091505b81811015610fa9576000818152600e602052604090819020600180548254918301549351630761c14d60e01b815292936001600160a01b0391821693630761c14d93610f4793811692600160a01b9091046001600160601b031691600401612d32565b600060405180830381600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b5050506000838152600e60205260408120818155600180820192909255600201805460ff191690559092019150610ee49050565b50600b555050565b6001546001600160a01b03163314610fdb5760405162461bcd60e51b815260040161099390612cee565b6000828152600c6020526040812090610ff383611fa8565b82549091501561103c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b6044820152606401610993565b6001811161108c5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e00000000006044820152606401610993565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff1660028111156110ca576110ca6128d7565b146111065760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b6044820152606401610993565b6000848152600c602052604081206002810180549192909161112a5761112a612d5c565b9060005260206000200154600003611146576000915050611285565b60008160020160008154811061115e5761115e612d5c565b90600052602060002001546008548686604051602001611191939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111b49190612d88565b905060005b600283015483546111cb908390612d9c565b6111d6906001612cc2565b10156112655760015b8354811161125f576000818386600001546111fa9190612d9c565b6112049190612cc2565b9050600085600201828154811061121d5761121d612d5c565b906000526020600020015490508085106112425761123b8186612caf565b945061124a565b50915061125f565b5050808061125790612db3565b9150506111df565b506111b9565b600081815260048401602052604090205461127f90611fc4565b93505050505b9392505050565b6000546001600160a01b031633146112b65760405162461bcd60e51b815260040161099390612dcc565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156112f5576112f56128d7565b03611371576007546009546001600160a01b0390911690637363ae1f9061131c9043612cc2565b6040518263ffffffff1660e01b815260040161133a91815260200190565b600060405180830381600087803b15801561135457600080fd5b505af1158015611368573d6000803e3d6000fd5b50504360055550505b5050565b61137e82611fef565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113fc57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113f0600080516020612eea8339815191525490565b6001600160a01b031614155b1561141a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611474575060408051601f3d908101601f1916820190925261147191810190612cd5565b60015b61149c57604051630c76093760e01b81526001600160a01b0383166004820152602401610993565b600080516020612eea83398151915281146114cd57604051632a87526960e21b815260048101829052602401610993565b600080516020612eea8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611598576000836001600160a01b0316836040516115349190612e0e565b600060405180830381855af49150503d806000811461156f576040519150601f19603f3d011682016040523d82523d6000602084013e611574565b606091505b5050905080611596576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115e85760405163703e46dd60e11b815260040160405180910390fd5b50600080516020612eea83398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561168d57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161164a5790505b50505050509050919050565b600160006116a5612019565b8054909150600160401b900460ff16806116cc575080546001600160401b03808416911610155b156116e95760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561171888888888888861203d565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146117935760405162461bcd60e51b815260040161099390612cee565b600680549060006117a383612e2a565b91905055505050565b60006117b782611a49565b9050600081116118095760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656c696769626c6520666f72207769746864726177616c2e000000006044820152606401610993565b6001600160a01b038281166000818152600d6020526040808220600190810192909255905490516342c37fa360e01b8152600481019290925260248201849052909116906342c37fa390604401600060405180830381600087803b15801561187057600080fd5b505af1158015611884573d6000803e3d6000fd5b50505050816001600160a01b03167f71bb1b604559acc3db697ccf2aa4228d727cd5b133d6ffa419518d51c117c95c82604051610db991815260200190565b6000828152600c60209081526040808320848452600381019092528220548083036118f357600092505050611918565b81600201818154811061190857611908612d5c565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146119485760405162461bcd60e51b815260040161099390612dcc565b600255565b6001546001600160a01b031633146119775760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0382166000908152600d60205260408120600281018054919284926119a4908490612caf565b909155505060408051838152600160208201526001600160a01b038516917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b0910160405180910390a260006119f884611a49565b9050801561159657836001600160a01b03167f819a3744490c627e221b71743857691f9c23bf56a1ecc5351f886cfd4c3187d982604051611a3b91815260200190565b60405180910390a250505050565b6001600160a01b0381166000908152600d602052604081208054158015611a7257506002810154155b15611a81576001015492915050565b50600092915050565b600080611a97848461209d565b9050611aac6001600160601b038416826118c3565b949350505050565b6001546001600160a01b03163314611ade5760405162461bcd60e51b815260040161099390612cee565b611aeb85858585856120e5565b5050505050565b6001546001600160a01b03163314611b1c5760405162461bcd60e51b815260040161099390612cee565b6000611b27826115fb565b80519091505b801561159857600180546001600160a01b031690630761c14d9085908590611b559086612caf565b81518110611b6557611b65612d5c565b602002602001015160006040518463ffffffff1660e01b8152600401611b8d93929190612d32565b600060405180830381600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050508080611bca90612e2a565b915050611b2d565b60046000611bde612019565b8054909150600160401b900460ff1680611c05575080546001600160401b03808416911610155b15611c225760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611cad5760405162461bcd60e51b815260040161099390612cee565b600680549060006117a383612db3565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611cef8787611a8a565b9054949793965094505050565b6000546001600160a01b03163314611d265760405162461bcd60e51b815260040161099390612dcc565b600355565b6000546001600160a01b03163314611d555760405162461bcd60e51b815260040161099390612dcc565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60015460009081906001600160a01b03163314611da65760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0384166000908152600d602052604090206001810154848110611dec5784925084826001016000828254611de19190612caf565b90915550611df79050565b600060018301559150815b506001015491509250929050565b6001600160a01b0383166000908152600d602052604081208190819081611e2c8888611a8a565b825490915081158015611e40575060048110155b15611e58576000806004955095509550505050611f9f565b81158015611e64575086155b15611e7c576000806009955095509550505050611f9f565b6000600154600160a01b900460ff166002811115611e9c57611e9c6128d7565b14611f37576000600e6000600a60008154611eb690612db3565b9182905550815260208082019290925260409081016000206001600160601b038c16600160a01b81026001600160a01b038f169081178355600183018d905592518c8152919450927fa59837f9df3fb816613d84e8fefe31ec8d6e67ff43df6533e3f793a3f53aade9910160405180910390a35060019350611f9f92505050565b818710611f4f57611f488288612caf565b9550611f97565b611f598783612caf565b945060008360020154846001015411611f73576000611f87565b83600201548460010154611f879190612caf565b905080861115611f95578095505b505b506000925050505b93509350939050565b60006020825110611fbb57506020015190565b5060065b919050565b600060405160005b6014811015611fe75783811a81600c84010153600101611fcc565b505192915050565b6000546001600160a01b031633146103855760405162461bcd60e51b815260040161099390612dcc565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61204561241b565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b60148110156120c0578481600c011a818301536001016120a5565b5060145b60208110156120dc5783811a818301536001016120c4565b50519392505050565b6001600160a01b0385166000908152600d60205260409020831561217457600061210f8787611a8a565b905080600003612154578154600180820184556000848152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918916021790555b848260010160008282546121689190612cc2565b909155506122eb915050565b828160010160008282546121889190612caf565b909155505060008290036122eb5780545b80156122e9576001600160601b038616826121b5600184612caf565b815481106121c5576121c5612d5c565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036122d7578154829061220190600190612caf565b8154811061221157612211612d5c565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122459084612caf565b8154811061225557612255612d5c565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122a1576122a1612e41565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556122e9565b806122e181612e2a565b915050612199565b505b60006122f7878761209d565b90506000865b816123b5576123166001600160601b0382168685612442565b6000196001600160601b0382160161233157600191506122fd565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015612382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a69190612e67565b509495506122fd945050505050565b6001840154604080516001600160601b038b16815260208101889052908101919091526001600160a01b038a16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2505050505050505050565b612423612795565b61244057604051631afcd79f60e31b815260040160405180910390fd5b565b6000838152600c6020908152604080832084845260038101909252822054909181900361260f57831561260a57600182015460000361255d5750600281018054600180820183556000928352602090922081018590559081148015906124bc575081546124b0600183612caf565b6124ba9190612d88565b155b156125585781546000906124d09083612ed5565b60008181526004850160205260408120549192506124ef846001612cc2565b90508460020185600201848154811061250a5761250a612d5c565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6125d8565b60018083018054909161256f91612caf565b8154811061257f5761257f612d5c565b906000526020600020015490508160010180548061259f5761259f612e41565b60019003818190600052602060002001600090559055838260020182815481106125cb576125cb612d5c565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561260a85826001876127af565b611aeb565b836000036126ad57600082600201828154811061262e5761262e612d5c565b90600052602060002001549050600083600201838154811061265257612652612d5c565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556126a79087908490846127af565b50611aeb565b8160020181815481106126c2576126c2612d5c565b90600052602060002001548414611aeb576000848360020183815481106126eb576126eb612d5c565b906000526020600020015411159050600081612731578584600201848154811061271757612717612d5c565b906000526020600020015461272c9190612caf565b61275c565b83600201838154811061274657612746612d5c565b90600052602060002001548661275c9190612caf565b90508584600201848154811061277457612774612d5c565b60009182526020909120015561278c878484846127af565b50505050505050565b600061279f612019565b54600160401b900460ff16919050565b6000848152600c60205260409020835b80156128645781546127d2600183612caf565b6127dc9190612ed5565b90508361281357828260020182815481106127f9576127f9612d5c565b906000526020600020015461280e9190612caf565b61283e565b8282600201828154811061282957612829612d5c565b906000526020600020015461283e9190612cc2565b82600201828154811061285357612853612d5c565b6000918252602090912001556127bf565b505050505050565b6001600160a01b038116811461038557600080fd5b6001600160601b038116811461038557600080fd5b6000806000606084860312156128ab57600080fd5b83356128b68161286c565b925060208401356128c681612881565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b8381526020810183905260608101600a831061290b5761290b6128d7565b826040830152949350505050565b6000806040838503121561292c57600080fd5b82356129378161286c565b946020939093013593505050565b60006020828403121561295757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298557600080fd5b81356001600160401b0381111561299e5761299e61295e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156129cc576129cc61295e565b6040528181528382016020018510156129e457600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612a1457600080fd5b8235915060208301356001600160401b03811115612a3157600080fd5b612a3d85828601612974565b9150509250929050565b600080600060608486031215612a5c57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612a8657600080fd5b8235612a918161286c565b915060208301356001600160401b03811115612a3157600080fd5b600060208284031215612abe57600080fd5b81356112858161286c565b602080825282518282018190526000918401906040840190835b81811015612b0a5783516001600160601b0316835260209384019390920191600101612ae3565b509095945050505050565b60008060008060008060c08789031215612b2e57600080fd5b8635612b398161286c565b95506020870135612b498161286c565b945060408701359350606087013592506080870135612b678161286c565b9598949750929591949360a090920135925050565b60005b83811015612b97578181015183820152602001612b7f565b50506000910152565b6020815260008251806020840152612bbf816040850160208701612b7c565b601f01601f19169190910160400192915050565b60008060408385031215612be657600080fd5b50508035926020909101359150565b60008060408385031215612c0857600080fd5b8235612c138161286c565b91506020830135612c2381612881565b809150509250929050565b600080600080600060a08688031215612c4657600080fd5b8535612c518161286c565b94506020860135612c6181612881565b94979496505050506040830135926060810135926080909101359150565b6020810160038310612c9357612c936128d7565b91905290565b634e487b7160e01b600052601160045260246000fd5b8181038181111561191857611918612c99565b8082018082111561191857611918612c99565b600060208284031215612ce757600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b6001600160a01b039390931683526001600160601b03919091166020830152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612d9757612d97612d72565b500690565b808202811582820484141761191857611918612c99565b600060018201612dc557612dc5612c99565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251612e20818460208701612b7c565b9190910192915050565b600081612e3957612e39612c99565b506000190190565b634e487b7160e01b600052603160045260246000fd5b80518015158114611fbf57600080fd5b600080600080600080600060e0888a031215612e8257600080fd5b8751612e8d81612881565b9650612e9b60208901612e57565b604089015160608a015160808b015160a08c0151939950919750955093509150612ec760c08901612e57565b905092959891949750929550565b600082612ee457612ee4612d72565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200186314699ae77a443609cfb006b9ef79adca12e964bddf2a243cc7bcac06f9264736f6c634300081c0033", - "devdoc": { - "details": "A factory of trees that keeps track of staked values for sortition.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "LeftoverPNK(address,uint256)": { - "details": "Emitted when leftover PNK is available.", - "params": { - "_account": "The account of the juror.", - "_amount": "The amount of PNK available." - } - }, - "LeftoverPNKWithdrawn(address,uint256)": { - "details": "Emitted when leftover PNK is withdrawn.", - "params": { - "_account": "The account of the juror withdrawing PNK.", - "_amount": "The amount of PNK withdrawn." - } - }, - "StakeDelayed(address,uint96,uint256)": { - "params": { - "_address": "The address of the juror.", - "_amount": "The amount of tokens staked in the court.", - "_courtID": "The ID of the court." - } - }, - "StakeLocked(address,uint256,bool)": { - "params": { - "_address": "The address of the juror.", - "_relativeAmount": "The amount of tokens locked.", - "_unlock": "Whether the stake is locked or unlocked." - } - }, - "StakeSet(address,uint256,uint256,uint256)": { - "params": { - "_address": "The address of the juror.", - "_amount": "The amount of tokens staked in the court.", - "_amountAllCourts": "The amount of tokens staked in all courts.", - "_courtID": "The ID of the court." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "changeMaxDrawingTime(uint256)": { - "details": "Changes the `maxDrawingTime` storage variable.", - "params": { - "_maxDrawingTime": "The new value for the `maxDrawingTime` storage variable." - } - }, - "changeMinStakingTime(uint256)": { - "details": "Changes the `minStakingTime` storage variable.", - "params": { - "_minStakingTime": "The new value for the `minStakingTime` storage variable." - } - }, - "changeRandomNumberGenerator(address,uint256)": { - "details": "Changes the `_rng` and `_rngLookahead` storage variables.", - "params": { - "_rng": "The new value for the `RNGenerator` storage variable.", - "_rngLookahead": "The new value for the `rngLookahead` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createTree(bytes32,bytes)": { - "details": "Create a sortition sum tree at the specified key.", - "params": { - "_extraData": "Extra data that contains the number of children each node in the tree should have.", - "_key": "The key of the new tree." - } - }, - "draw(bytes32,uint256,uint256)": { - "details": "Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.", - "params": { - "_coreDisputeID": "Index of the dispute in Kleros Core.", - "_key": "The key of the tree.", - "_nonce": "Nonce to hash with random number." - }, - "returns": { - "drawnAddress": "The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended." - } - }, - "executeDelayedStakes(uint256)": { - "details": "Executes the next delayed stakes.", - "params": { - "_iterations": "The number of delayed stakes to execute." - } - }, - "getJurorCourtIDs(address)": { - "details": "Gets the court identifiers where a specific `_juror` has staked.", - "params": { - "_juror": "The address of the juror." - } - }, - "initialize(address,address,uint256,uint256,address,uint256)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_core": "The KlerosCore.", - "_governor": "The governor.", - "_maxDrawingTime": "Time after which the drawing phase can be switched", - "_minStakingTime": "Minimal time to stake", - "_rng": "The random number generator.", - "_rngLookahead": "Lookahead value for rng." - } - }, - "notifyRandomNumber(uint256)": { - "details": "Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().", - "params": { - "_randomNumber": "Random number returned by RNG contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setJurorInactive(address)": { - "details": "Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", - "params": { - "_account": "The juror to unstake." - } - }, - "setStake(address,uint96,uint256,uint256,uint256)": { - "details": "Update the state of the stakes, called by KC at the end of setStake flow. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", - "params": { - "_account": "The address of the juror.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake.", - "_pnkDeposit": "The amount of PNK to be deposited.", - "_pnkWithdrawal": "The amount of PNK to be withdrawn." - } - }, - "stakeOf(address,uint96)": { - "details": "Get the stake of a juror in a court.", - "params": { - "_courtID": "The ID of the court.", - "_juror": "The address of the juror." - }, - "returns": { - "_0": "value The stake of the juror in the court." - } - }, - "stakeOf(bytes32,bytes32)": { - "details": "Get the stake of a juror in a court.", - "params": { - "_ID": "The stake path ID, corresponding to a juror.", - "_key": "The key of the tree, corresponding to a court." - }, - "returns": { - "_0": "The stake of the juror in the court." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "validateStake(address,uint96,uint256)": { - "details": "Validate the specified juror's new stake for a court. Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.", - "params": { - "_account": "The address of the juror.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake." - }, - "returns": { - "pnkDeposit": "The amount of PNK to be deposited.", - "pnkWithdrawal": "The amount of PNK to be withdrawn.", - "stakingResult": "The result of the staking operation." - } - }, - "withdrawLeftoverPNK(address)": { - "details": "Gives back the locked PNKs in case the juror fully unstaked earlier. Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). In this case the juror can use this function to withdraw the leftover tokens. Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.", - "params": { - "_account": "The juror whose PNK to withdraw." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "SortitionModule", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "events": { - "StakeDelayed(address,uint96,uint256)": { - "notice": "Emitted when a juror's stake is delayed." - }, - "StakeLocked(address,uint256,bool)": { - "notice": "Emitted when a juror's stake is locked." - }, - "StakeSet(address,uint256,uint256,uint256)": { - "notice": "Emitted when a juror stakes in a court." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 16617, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 16620, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)11124" - }, - { - "astId": 16623, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "phase", - "offset": 20, - "slot": "1", - "type": "t_enum(Phase)26181" - }, - { - "astId": 16625, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "minStakingTime", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 16627, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "maxDrawingTime", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 16629, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "lastPhaseChange", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 16631, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "randomNumberRequestBlock", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 16633, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "disputesWithoutJurors", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 16636, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "rng", - "offset": 0, - "slot": "7", - "type": "t_contract(RNG)35283" - }, - { - "astId": 16638, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "randomNumber", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 16640, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "rngLookahead", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 16642, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "delayedStakeWriteIndex", - "offset": 0, - "slot": "10", - "type": "t_uint256" - }, - { - "astId": 16644, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "delayedStakeReadIndex", - "offset": 0, - "slot": "11", - "type": "t_uint256" - }, - { - "astId": 16649, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "sortitionSumTrees", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)16598_storage)" - }, - { - "astId": 16654, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "jurors", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_address,t_struct(Juror)16615_storage)" - }, - { - "astId": 16659, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "delayedStakes", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_uint256,t_struct(DelayedStake)16607_storage)" - }, - { - "astId": 16665, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "latestDelayedStakeIndex", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_address,t_mapping(t_uint96,t_uint256))" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_array(t_uint96)dyn_storage": { - "base": "t_uint96", - "encoding": "dynamic_array", - "label": "uint96[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)11124": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_contract(RNG)35283": { - "encoding": "inplace", - "label": "contract RNG", - "numberOfBytes": "20" - }, - "t_enum(Phase)26181": { - "encoding": "inplace", - "label": "enum ISortitionModule.Phase", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_mapping(t_uint96,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint96 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint96,t_uint256)" - }, - "t_mapping(t_address,t_struct(Juror)16615_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct SortitionModuleBase.Juror)", - "numberOfBytes": "32", - "value": "t_struct(Juror)16615_storage" - }, - "t_mapping(t_bytes32,t_struct(SortitionSumTree)16598_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct SortitionModuleBase.SortitionSumTree)", - "numberOfBytes": "32", - "value": "t_struct(SortitionSumTree)16598_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_bytes32)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bytes32)", - "numberOfBytes": "32", - "value": "t_bytes32" - }, - "t_mapping(t_uint256,t_struct(DelayedStake)16607_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct SortitionModuleBase.DelayedStake)", - "numberOfBytes": "32", - "value": "t_struct(DelayedStake)16607_storage" - }, - "t_mapping(t_uint96,t_uint256)": { - "encoding": "mapping", - "key": "t_uint96", - "label": "mapping(uint96 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DelayedStake)16607_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.DelayedStake", - "members": [ - { - "astId": 16600, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 16602, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "courtID", - "offset": 20, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 16604, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "stake", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 16606, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "alreadyTransferred", - "offset": 0, - "slot": "2", - "type": "t_bool" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Juror)16615_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.Juror", - "members": [ - { - "astId": 16610, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "courtIDs", - "offset": 0, - "slot": "0", - "type": "t_array(t_uint96)dyn_storage" - }, - { - "astId": 16612, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "stakedPnk", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 16614, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "lockedPnk", - "offset": 0, - "slot": "2", - "type": "t_uint256" - } - ], - "numberOfBytes": "96" - }, - "t_struct(SortitionSumTree)16598_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.SortitionSumTree", - "members": [ - { - "astId": 16583, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "K", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 16586, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "stack", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 16589, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "nodes", - "offset": 0, - "slot": "2", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 16593, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "IDsToNodeIndexes", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_bytes32,t_uint256)" - }, - { - "astId": 16597, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "nodeIndexesToIDs", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_bytes32)" - } - ], - "numberOfBytes": "160" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/SortitionModule_Proxy.json b/contracts/deployments/arbitrumSepolia/SortitionModule_Proxy.json deleted file mode 100644 index 759852b40..000000000 --- a/contracts/deployments/arbitrumSepolia/SortitionModule_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x1341bcde150871b6c3001ef791e33bddac8b45de574894893c6b368a1781cb6f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - "transactionIndex": 1, - "gasUsed": "362402", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000004000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000200000000000000000000000000000000000000000", - "blockHash": "0x41c539093428c7ae0b79faa03c59034892fbb49e23bcf3694ac26773e979b19b", - "transactionHash": "0x1341bcde150871b6c3001ef791e33bddac8b45de574894893c6b368a1781cb6f", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 95250316, - "transactionHash": "0x1341bcde150871b6c3001ef791e33bddac8b45de574894893c6b368a1781cb6f", - "address": "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x41c539093428c7ae0b79faa03c59034892fbb49e23bcf3694ac26773e979b19b" - } - ], - "blockNumber": 95250316, - "cumulativeGasUsed": "362402", - "status": 1, - "byzantium": true - }, - "args": [ - "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9", - "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000e8442307d36e9bf6ab27f1a009f95ce8e11c3479000000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000000000000000000007080000000000000000000000000298a3efa6faf90865725e2b48cf0f66e5d527540000000000000000000000000000000000000000000000000000000000000014" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220ceae34f8d0c3a8d9cda469aa0dab2c6865b82430654b42fa98d22bcc1559e71964736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220ceae34f8d0c3a8d9cda469aa0dab2c6865b82430654b42fa98d22bcc1559e71964736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/TransactionBatcher.json b/contracts/deployments/arbitrumSepolia/TransactionBatcher.json deleted file mode 100644 index 6372364e0..000000000 --- a/contracts/deployments/arbitrumSepolia/TransactionBatcher.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "address": "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", - "abi": [ - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "datas", - "type": "bytes[]" - } - ], - "name": "batchSend", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "datas", - "type": "bytes[]" - } - ], - "name": "batchSendUnchecked", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0x3c4a6f233fda3dc940b9aba1e04ee5993b515e4834b73365c4cd613718db46b2", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", - "transactionIndex": 2, - "gasUsed": "3685628", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe9853220bdd1f19aee5024da03ad2d91d98090a74ab599bdcf2af279f02d9744", - "transactionHash": "0x3c4a6f233fda3dc940b9aba1e04ee5993b515e4834b73365c4cd613718db46b2", - "logs": [], - "blockNumber": 66236728, - "cumulativeGasUsed": "5055051", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "036e2ca71d8ebdd78fd6317e15ba1f3c", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSendUnchecked\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/utils/TransactionBatcher.sol\":\"TransactionBatcher\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/utils/TransactionBatcher.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from https://github.com/daostack/web3-transaction-batcher/blob/1b88d2ea062f8f2d9fdfdf9bbe85d2bbef780151/contracts/Batcher.sol\\n\\ncontract TransactionBatcher {\\n\\n function batchSend(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n (bool success,) = targets[i].call{value: values[i]}(datas[i]);\\n if (!success) revert('transaction failed'); // All the calls must succeed.\\n }\\n }\\n\\n function batchSendUnchecked(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n targets[i].call{value: values[i]}(datas[i]); // Intentionally ignoring return value.\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1983237012c29ef487ca47d60b197eb30d5b072ffec3078685d43fcc5fcc10a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561000f575f80fd5b506105238061001d5f395ff3fe608060405260043610610028575f3560e01c8063a8f0802e1461002c578063cef591aa14610041575b5f80fd5b61003f61003a3660046103c4565b610054565b005b61003f61004f3660046103c4565b61015c565b5f5b8351811015610156575f848281518110610072576100726104ad565b60200260200101516001600160a01b0316848381518110610095576100956104ad565b60200260200101518484815181106100af576100af6104ad565b60200260200101516040516100c491906104c1565b5f6040518083038185875af1925050503d805f81146100fe576040519150601f19603f3d011682016040523d82523d5f602084013e610103565b606091505b505090508061014d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd858dd1a5bdb8819985a5b195960721b604482015260640160405180910390fd5b50600101610056565b50505050565b5f5b835181101561015657838181518110610179576101796104ad565b60200260200101516001600160a01b031683828151811061019c5761019c6104ad565b60200260200101518383815181106101b6576101b66104ad565b60200260200101516040516101cb91906104c1565b5f6040518083038185875af1925050503d805f8114610205576040519150601f19603f3d011682016040523d82523d5f602084013e61020a565b606091505b50505060010161015e565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561025257610252610215565b604052919050565b5f67ffffffffffffffff82111561027357610273610215565b5060051b60200190565b5f82601f83011261028c575f80fd5b813560206102a161029c8361025a565b610229565b8083825260208201915060208460051b8701019350868411156102c2575f80fd5b602086015b848110156102de57803583529183019183016102c7565b509695505050505050565b5f601f83601f8401126102fa575f80fd5b8235602061030a61029c8361025a565b82815260059290921b85018101918181019087841115610328575f80fd5b8287015b848110156103b857803567ffffffffffffffff8082111561034b575f80fd5b818a0191508a603f83011261035e575f80fd5b8582013560408282111561037457610374610215565b610385828b01601f19168901610229565b92508183528c8183860101111561039a575f80fd5b8181850189850137505f90820187015284525091830191830161032c565b50979650505050505050565b5f805f606084860312156103d6575f80fd5b833567ffffffffffffffff808211156103ed575f80fd5b818601915086601f830112610400575f80fd5b8135602061041061029c8361025a565b82815260059290921b8401810191818101908a84111561042e575f80fd5b948201945b838610156104605785356001600160a01b0381168114610451575f80fd5b82529482019490820190610433565b97505087013592505080821115610475575f80fd5b6104818783880161027d565b93506040860135915080821115610496575f80fd5b506104a3868287016102e9565b9150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b818110156104e057602081860181015185830152016104c6565b505f92019182525091905056fea264697066735822122089797200888ad757484ded7bc0ffbb0769e9e974d73188d61385b7f6675e9f2064736f6c63430008180033", - "deployedBytecode": "0x608060405260043610610028575f3560e01c8063a8f0802e1461002c578063cef591aa14610041575b5f80fd5b61003f61003a3660046103c4565b610054565b005b61003f61004f3660046103c4565b61015c565b5f5b8351811015610156575f848281518110610072576100726104ad565b60200260200101516001600160a01b0316848381518110610095576100956104ad565b60200260200101518484815181106100af576100af6104ad565b60200260200101516040516100c491906104c1565b5f6040518083038185875af1925050503d805f81146100fe576040519150601f19603f3d011682016040523d82523d5f602084013e610103565b606091505b505090508061014d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd858dd1a5bdb8819985a5b195960721b604482015260640160405180910390fd5b50600101610056565b50505050565b5f5b835181101561015657838181518110610179576101796104ad565b60200260200101516001600160a01b031683828151811061019c5761019c6104ad565b60200260200101518383815181106101b6576101b66104ad565b60200260200101516040516101cb91906104c1565b5f6040518083038185875af1925050503d805f8114610205576040519150601f19603f3d011682016040523d82523d5f602084013e61020a565b606091505b50505060010161015e565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561025257610252610215565b604052919050565b5f67ffffffffffffffff82111561027357610273610215565b5060051b60200190565b5f82601f83011261028c575f80fd5b813560206102a161029c8361025a565b610229565b8083825260208201915060208460051b8701019350868411156102c2575f80fd5b602086015b848110156102de57803583529183019183016102c7565b509695505050505050565b5f601f83601f8401126102fa575f80fd5b8235602061030a61029c8361025a565b82815260059290921b85018101918181019087841115610328575f80fd5b8287015b848110156103b857803567ffffffffffffffff8082111561034b575f80fd5b818a0191508a603f83011261035e575f80fd5b8582013560408282111561037457610374610215565b610385828b01601f19168901610229565b92508183528c8183860101111561039a575f80fd5b8181850189850137505f90820187015284525091830191830161032c565b50979650505050505050565b5f805f606084860312156103d6575f80fd5b833567ffffffffffffffff808211156103ed575f80fd5b818601915086601f830112610400575f80fd5b8135602061041061029c8361025a565b82815260059290921b8401810191818101908a84111561042e575f80fd5b948201945b838610156104605785356001600160a01b0381168114610451575f80fd5b82529482019490820190610433565b97505087013592505080821115610475575f80fd5b6104818783880161027d565b93506040860135915080821115610496575f80fd5b506104a3868287016102e9565b9150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b818110156104e057602081860181015185830152016104c6565b505f92019182525091905056fea264697066735822122089797200888ad757484ded7bc0ffbb0769e9e974d73188d61385b7f6675e9f2064736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepolia/WETH.json b/contracts/deployments/arbitrumSepolia/WETH.json deleted file mode 100644 index ffa23293a..000000000 --- a/contracts/deployments/arbitrumSepolia/WETH.json +++ /dev/null @@ -1,458 +0,0 @@ -{ - "address": "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ], - "transactionHash": "0xf91a0e7b9bf8d9f5e46432af0ed3dcf9b1fc0f35ed97e69201f5c92b6627f253", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511", - "transactionIndex": 1, - "gasUsed": "4834141", - "logsBloom": "0x00000020000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000001000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000200000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x902e4567bed29221bff704416e5f67d81fb89baf362a63c9a23a5be31fd8f951", - "transactionHash": "0xf91a0e7b9bf8d9f5e46432af0ed3dcf9b1fc0f35ed97e69201f5c92b6627f253", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 3842792, - "transactionHash": "0xf91a0e7b9bf8d9f5e46432af0ed3dcf9b1fc0f35ed97e69201f5c92b6627f253", - "address": "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", - "logIndex": 0, - "blockHash": "0x902e4567bed29221bff704416e5f67d81fb89baf362a63c9a23a5be31fd8f951" - } - ], - "blockNumber": 3842792, - "cumulativeGasUsed": "4834141", - "status": 1, - "byzantium": true - }, - "args": [ - "WETH", - "WETH" - ], - "numDeployments": 1, - "solcInputHash": "8e9cc2476be2df2a66044335eb796b9b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"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\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/TestERC20.sol\":\"TestERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"src/token/TestERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract TestERC20 is ERC20 {\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {\\n _mint(msg.sender, 1000000 ether);\\n }\\n}\\n\",\"keccak256\":\"0x9f67e6b63ca87e6c98b2986364ce16a747ce4098e9146fffb17ea13863c0b7e4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c5838038062000c5883398101604081905262000034916200020a565b8181600362000044838262000302565b50600462000053828262000302565b505050620000723369d3c21bcecceda10000006200007a60201b60201c565b5050620003f6565b6001600160a01b038216620000d55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620000e99190620003ce565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016d57600080fd5b81516001600160401b03808211156200018a576200018a62000145565b604051601f8301601f19908116603f01168101908282118183101715620001b557620001b562000145565b81604052838152602092508683858801011115620001d257600080fd5b600091505b83821015620001f65785820183015181830184015290820190620001d7565b600093810190920192909252949350505050565b600080604083850312156200021e57600080fd5b82516001600160401b03808211156200023657600080fd5b62000244868387016200015b565b935060208501519150808211156200025b57600080fd5b506200026a858286016200015b565b9150509250929050565b600181811c908216806200028957607f821691505b602082108103620002aa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200014057600081815260208120601f850160051c81016020861015620002d95750805b601f850160051c820191505b81811015620002fa57828155600101620002e5565b505050505050565b81516001600160401b038111156200031e576200031e62000145565b62000336816200032f845462000274565b84620002b0565b602080601f8311600181146200036e5760008415620003555750858301515b600019600386901b1c1916600185901b178555620002fa565b600085815260208120601f198616915b828110156200039f578886015182559484019460019091019084016200037e565b5085821015620003be5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620003f057634e487b7160e01b600052601160045260246000fd5b92915050565b61085280620004066000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea26469706673582212203a956e65a766c03ac95ae037cbdfb51b56810340c98132c2d2482405d386101b64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea26469706673582212203a956e65a766c03ac95ae037cbdfb51b56810340c98132c2d2482405d386101b64736f6c63430008120033", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 128, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 134, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 136, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 138, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 140, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepolia/WETHFaucet.json b/contracts/deployments/arbitrumSepolia/WETHFaucet.json deleted file mode 100644 index 405063314..000000000 --- a/contracts/deployments/arbitrumSepolia/WETHFaucet.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "address": "0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "amount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "changeAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xbfb4b10473c58ec57cdeb9470c1ec2e77f8e7f3a3b3fe0bef3b06f07bd415493", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835", - "transactionIndex": 1, - "gasUsed": "2793705", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9b0f884a08917ac9501a0154a2ba13a09449ceb5b34f40ebfd80b00a2fc74e09", - "transactionHash": "0xbfb4b10473c58ec57cdeb9470c1ec2e77f8e7f3a3b3fe0bef3b06f07bd415493", - "logs": [], - "blockNumber": 3842793, - "cumulativeGasUsed": "2793705", - "status": 1, - "byzantium": true - }, - "args": [ - "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511" - ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"amount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"changeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IERC20 public token;\\n address public governor;\\n mapping(address => bool) public withdrewAlready;\\n uint256 public amount = 10_000 ether;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeGovernor(address _governor) public onlyByGovernor {\\n governor = _governor;\\n }\\n\\n function changeAmount(uint256 _amount) public onlyByGovernor {\\n amount = _amount;\\n }\\n\\n function withdraw() public onlyByGovernor {\\n token.transfer(governor, token.balanceOf(address(this)));\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, amount);\\n withdrewAlready[msg.sender] = true;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x3a54681cc304ccbfdb42215104b63809919a432ac5d3986d3021a11fcc7a1cc3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405269021e19e0c9bab240000060035534801561001e57600080fd5b5060405161065538038061065583398101604081905261003d9161006b565b600080546001600160a01b039092166001600160a01b0319928316179055600180549091163317905561009b565b60006020828403121561007d57600080fd5b81516001600160a01b038116811461009457600080fd5b9392505050565b6105ab806100aa6000396000f3fe608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 24559, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)1042" - }, - { - "astId": 24561, - "contract": "src/token/Faucet.sol:Faucet", - "label": "governor", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 24565, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 24568, - "contract": "src/token/Faucet.sol:Faucet", - "label": "amount", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)1042": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet.ts b/contracts/deployments/arbitrumSepoliaDevnet.ts deleted file mode 100644 index bd581ea30..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet.ts +++ /dev/null @@ -1,33782 +0,0 @@ -export default { - name: "arbitrumSepoliaDevnet", - chainId: "421614", - contracts: { - ArbitrableExample: { - address: "0x3Eae72F076c68F5c354C73abC33EAA291ef1b2Fa", - abi: [ - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_weth", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "string", - name: "_action", - type: "string", - }, - ], - name: "Action", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, - ], - name: "DisputeRequest", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", - outputs: [ - { - internalType: "contract IArbitratorV2", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "arbitratorExtraData", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - ], - name: "changeArbitratorExtraData", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "changeDisputeTemplate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_action", - type: "string", - }, - { - internalType: "uint256", - name: "_feeInWeth", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_action", - type: "string", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "uint256", - name: "numberOfRulingOptions", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "externalIDtoLocalID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "weth", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - BlockHashRNG: { - address: "0x56d6d65Fe202232714794B5D5e4ed9894466Ee01", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_block", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_block", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - ChainlinkRNG: { - address: "0x7e40f5aC809521654A9c17e442F2a0a5a4d890FA", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_sortitionModule", - type: "address", - }, - { - internalType: "address", - name: "_vrfCoordinator", - type: "address", - }, - { - internalType: "bytes32", - name: "_keyHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_subscriptionId", - type: "uint256", - }, - { - internalType: "uint16", - name: "_requestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "_callbackGasLimit", - type: "uint32", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "have", - type: "address", - }, - { - internalType: "address", - name: "want", - type: "address", - }, - ], - name: "OnlyCoordinatorCanFulfill", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "have", - type: "address", - }, - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "coordinator", - type: "address", - }, - ], - name: "OnlyOwnerOrCoordinator", - type: "error", - }, - { - inputs: [], - name: "ZeroAddress", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "vrfCoordinator", - type: "address", - }, - ], - name: "CoordinatorSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "randomWord", - type: "uint256", - }, - ], - name: "RequestFulfilled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "RequestSent", - type: "event", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint32", - name: "_callbackGasLimit", - type: "uint32", - }, - ], - name: "changeCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_keyHash", - type: "bytes32", - }, - ], - name: "changeKeyHash", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint16", - name: "_requestConfirmations", - type: "uint16", - }, - ], - name: "changeRequestConfirmations", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_subscriptionId", - type: "uint256", - }, - ], - name: "changeSubscriptionId", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vrfCoordinator", - type: "address", - }, - ], - name: "changeVrfCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "keyHash", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastRequestId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - name: "randomNumbers", - outputs: [ - { - internalType: "uint256", - name: "number", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "randomWords", - type: "uint256[]", - }, - ], - name: "rawFulfillRandomWords", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "receiveRandomness", - outputs: [ - { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "requestConfirmations", - outputs: [ - { - internalType: "uint16", - name: "", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "s_vrfCoordinator", - outputs: [ - { - internalType: "contract IVRFCoordinatorV2Plus", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_vrfCoordinator", - type: "address", - }, - ], - name: "setCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "subscriptionId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - ChainlinkVRFCoordinator: { - address: "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "blockhashStore", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "uint256", - name: "internalBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "externalBalance", - type: "uint256", - }, - ], - name: "BalanceInvariantViolated", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "blockNum", - type: "uint256", - }, - ], - name: "BlockhashNotInStore", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorAlreadyRegistered", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorNotRegistered", - type: "error", - }, - { - inputs: [], - name: "FailedToSendNative", - type: "error", - }, - { - inputs: [], - name: "FailedToTransferLink", - type: "error", - }, - { - inputs: [ - { - internalType: "uint32", - name: "have", - type: "uint32", - }, - { - internalType: "uint32", - name: "want", - type: "uint32", - }, - ], - name: "GasLimitTooBig", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxGas", - type: "uint256", - }, - ], - name: "GasPriceExceeded", - type: "error", - }, - { - inputs: [], - name: "IncorrectCommitment", - type: "error", - }, - { - inputs: [], - name: "IndexOutOfRange", - type: "error", - }, - { - inputs: [], - name: "InsufficientBalance", - type: "error", - }, - { - inputs: [], - name: "InvalidCalldata", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "InvalidConsumer", - type: "error", - }, - { - inputs: [], - name: "InvalidExtraArgsTag", - type: "error", - }, - { - inputs: [ - { - internalType: "int256", - name: "linkWei", - type: "int256", - }, - ], - name: "InvalidLinkWeiPrice", - type: "error", - }, - { - inputs: [ - { - internalType: "uint8", - name: "premiumPercentage", - type: "uint8", - }, - { - internalType: "uint8", - name: "max", - type: "uint8", - }, - ], - name: "InvalidPremiumPercentage", - type: "error", - }, - { - inputs: [ - { - internalType: "uint16", - name: "have", - type: "uint16", - }, - { - internalType: "uint16", - name: "min", - type: "uint16", - }, - { - internalType: "uint16", - name: "max", - type: "uint16", - }, - ], - name: "InvalidRequestConfirmations", - type: "error", - }, - { - inputs: [], - name: "InvalidSubscription", - type: "error", - }, - { - inputs: [], - name: "LinkAlreadySet", - type: "error", - }, - { - inputs: [ - { - internalType: "uint32", - name: "flatFeeLinkDiscountPPM", - type: "uint32", - }, - { - internalType: "uint32", - name: "flatFeeNativePPM", - type: "uint32", - }, - ], - name: "LinkDiscountTooHigh", - type: "error", - }, - { - inputs: [], - name: "LinkNotSet", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "have", - type: "uint256", - }, - { - internalType: "uint32", - name: "max", - type: "uint32", - }, - ], - name: "MsgDataTooBig", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "proposedOwner", - type: "address", - }, - ], - name: "MustBeRequestedOwner", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "MustBeSubOwner", - type: "error", - }, - { - inputs: [], - name: "NoCorrespondingRequest", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - ], - name: "NoSuchProvingKey", - type: "error", - }, - { - inputs: [ - { - internalType: "uint32", - name: "have", - type: "uint32", - }, - { - internalType: "uint32", - name: "want", - type: "uint32", - }, - ], - name: "NumWordsTooBig", - type: "error", - }, - { - inputs: [], - name: "OnlyCallableFromLink", - type: "error", - }, - { - inputs: [], - name: "PaymentTooLarge", - type: "error", - }, - { - inputs: [], - name: "PendingRequestExists", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - ], - name: "ProvingKeyAlreadyRegistered", - type: "error", - }, - { - inputs: [], - name: "Reentrant", - type: "error", - }, - { - inputs: [], - name: "TooManyConsumers", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - indexed: false, - internalType: "uint32", - name: "maxGasLimit", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "stalenessSeconds", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "gasAfterPaymentCalculation", - type: "uint32", - }, - { - indexed: false, - internalType: "int256", - name: "fallbackWeiPerUnitLink", - type: "int256", - }, - { - indexed: false, - internalType: "uint32", - name: "fulfillmentFlatFeeNativePPM", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "fulfillmentFlatFeeLinkDiscountPPM", - type: "uint32", - }, - { - indexed: false, - internalType: "uint8", - name: "nativePremiumPercentage", - type: "uint8", - }, - { - indexed: false, - internalType: "uint8", - name: "linkPremiumPercentage", - type: "uint8", - }, - ], - name: "ConfigSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorDeregistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "coordinatorAddress", - type: "address", - }, - ], - name: "CoordinatorRegistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "fallbackWeiPerUnitLink", - type: "int256", - }, - ], - name: "FallbackWeiPerUnitLinkUsed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "FundsRecovered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "newCoordinator", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "MigrationCompleted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "NativeFundsRecovered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - name: "ProvingKeyDeregistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - name: "ProvingKeyRegistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "outputSeed", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint96", - name: "payment", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "nativePayment", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "success", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "onlyPremium", - type: "bool", - }, - ], - name: "RandomWordsFulfilled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "preSeed", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - indexed: false, - internalType: "uint32", - name: "callbackGasLimit", - type: "uint32", - }, - { - indexed: false, - internalType: "uint32", - name: "numWords", - type: "uint32", - }, - { - indexed: false, - internalType: "bytes", - name: "extraArgs", - type: "bytes", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - ], - name: "RandomWordsRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amountLink", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amountNative", - type: "uint256", - }, - ], - name: "SubscriptionCanceled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "SubscriptionConsumerAdded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "SubscriptionConsumerRemoved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "SubscriptionCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "oldBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "SubscriptionFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "oldNativeBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newNativeBalance", - type: "uint256", - }, - ], - name: "SubscriptionFundedWithNative", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "SubscriptionOwnerTransferRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "SubscriptionOwnerTransferred", - type: "event", - }, - { - inputs: [], - name: "BLOCKHASH_STORE", - outputs: [ - { - internalType: "contract BlockhashStoreInterface", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LINK", - outputs: [ - { - internalType: "contract LinkTokenInterface", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LINK_NATIVE_FEED", - outputs: [ - { - internalType: "contract AggregatorV3Interface", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_CONSUMERS", - outputs: [ - { - internalType: "uint16", - name: "", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_NUM_WORDS", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MAX_REQUEST_CONFIRMATIONS", - outputs: [ - { - internalType: "uint16", - name: "", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "acceptSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "addConsumer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "cancelSubscription", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "createSubscription", - outputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "deregisterMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[2]", - name: "publicProvingKey", - type: "uint256[2]", - }, - ], - name: "deregisterProvingKey", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256[2]", - name: "pk", - type: "uint256[2]", - }, - { - internalType: "uint256[2]", - name: "gamma", - type: "uint256[2]", - }, - { - internalType: "uint256", - name: "c", - type: "uint256", - }, - { - internalType: "uint256", - name: "s", - type: "uint256", - }, - { - internalType: "uint256", - name: "seed", - type: "uint256", - }, - { - internalType: "address", - name: "uWitness", - type: "address", - }, - { - internalType: "uint256[2]", - name: "cGammaWitness", - type: "uint256[2]", - }, - { - internalType: "uint256[2]", - name: "sHashWitness", - type: "uint256[2]", - }, - { - internalType: "uint256", - name: "zInv", - type: "uint256", - }, - ], - internalType: "struct VRF.Proof", - name: "proof", - type: "tuple", - }, - { - components: [ - { - internalType: "uint64", - name: "blockNum", - type: "uint64", - }, - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "uint32", - name: "callbackGasLimit", - type: "uint32", - }, - { - internalType: "uint32", - name: "numWords", - type: "uint32", - }, - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "bytes", - name: "extraArgs", - type: "bytes", - }, - ], - internalType: "struct VRFTypes.RequestCommitmentV2Plus", - name: "rc", - type: "tuple", - }, - { - internalType: "bool", - name: "onlyPremium", - type: "bool", - }, - ], - name: "fulfillRandomWords", - outputs: [ - { - internalType: "uint96", - name: "payment", - type: "uint96", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "fundSubscriptionWithNative", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "startIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxCount", - type: "uint256", - }, - ], - name: "getActiveSubscriptionIds", - outputs: [ - { - internalType: "uint256[]", - name: "ids", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "getSubscription", - outputs: [ - { - internalType: "uint96", - name: "balance", - type: "uint96", - }, - { - internalType: "uint96", - name: "nativeBalance", - type: "uint96", - }, - { - internalType: "uint64", - name: "reqCount", - type: "uint64", - }, - { - internalType: "address", - name: "subOwner", - type: "address", - }, - { - internalType: "address[]", - name: "consumers", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[2]", - name: "publicKey", - type: "uint256[2]", - }, - ], - name: "hashOfKey", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "newCoordinator", - type: "address", - }, - ], - name: "migrate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "onTokenTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "ownerCancelSubscription", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - ], - name: "pendingRequestExists", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "recoverFunds", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "to", - type: "address", - }, - ], - name: "recoverNativeFunds", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "registerMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256[2]", - name: "publicProvingKey", - type: "uint256[2]", - }, - { - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - name: "registerProvingKey", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "consumer", - type: "address", - }, - ], - name: "removeConsumer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes32", - name: "keyHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "uint16", - name: "requestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "callbackGasLimit", - type: "uint32", - }, - { - internalType: "uint32", - name: "numWords", - type: "uint32", - }, - { - internalType: "bytes", - name: "extraArgs", - type: "bytes", - }, - ], - internalType: "struct VRFV2PlusClient.RandomWordsRequest", - name: "req", - type: "tuple", - }, - ], - name: "requestRandomWords", - outputs: [ - { - internalType: "uint256", - name: "requestId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "subId", - type: "uint256", - }, - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "requestSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "s_config", - outputs: [ - { - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "maxGasLimit", - type: "uint32", - }, - { - internalType: "bool", - name: "reentrancyLock", - type: "bool", - }, - { - internalType: "uint32", - name: "stalenessSeconds", - type: "uint32", - }, - { - internalType: "uint32", - name: "gasAfterPaymentCalculation", - type: "uint32", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeNativePPM", - type: "uint32", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeLinkDiscountPPM", - type: "uint32", - }, - { - internalType: "uint8", - name: "nativePremiumPercentage", - type: "uint8", - }, - { - internalType: "uint8", - name: "linkPremiumPercentage", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_currentSubNonce", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_fallbackWeiPerUnitLink", - outputs: [ - { - internalType: "int256", - name: "", - type: "int256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "s_provingKeyHashes", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "s_provingKeys", - outputs: [ - { - internalType: "bool", - name: "exists", - type: "bool", - }, - { - internalType: "uint64", - name: "maxGas", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "s_requestCommitments", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_totalBalance", - outputs: [ - { - internalType: "uint96", - name: "", - type: "uint96", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "s_totalNativeBalance", - outputs: [ - { - internalType: "uint96", - name: "", - type: "uint96", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint16", - name: "minimumRequestConfirmations", - type: "uint16", - }, - { - internalType: "uint32", - name: "maxGasLimit", - type: "uint32", - }, - { - internalType: "uint32", - name: "stalenessSeconds", - type: "uint32", - }, - { - internalType: "uint32", - name: "gasAfterPaymentCalculation", - type: "uint32", - }, - { - internalType: "int256", - name: "fallbackWeiPerUnitLink", - type: "int256", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeNativePPM", - type: "uint32", - }, - { - internalType: "uint32", - name: "fulfillmentFlatFeeLinkDiscountPPM", - type: "uint32", - }, - { - internalType: "uint8", - name: "nativePremiumPercentage", - type: "uint8", - }, - { - internalType: "uint8", - name: "linkPremiumPercentage", - type: "uint8", - }, - ], - name: "setConfig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "link", - type: "address", - }, - { - internalType: "address", - name: "linkNativeFeed", - type: "address", - }, - ], - name: "setLINKAndLINKNativeFeed", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "recipient", - type: "address", - }, - ], - name: "withdrawNative", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DAI: { - address: "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - abi: [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - DAIFaucet: { - address: "0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E", - abi: [ - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "balance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeKitClassic: { - address: "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitClassicUniversity: { - address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitClassicUniversity_Implementation: { - address: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitClassicUniversity_Proxy: { - address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitClassic_Implementation: { - address: "0xc4cC0274E55a9818f8cF42640B1De61d269425ad", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitClassic_Proxy: { - address: "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitGated: { - address: "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "extraDataToTokenInfo", - outputs: [ - { - internalType: "address", - name: "tokenGate", - type: "address", - }, - { - internalType: "bool", - name: "isERC1155", - type: "bool", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitGatedShutter: { - address: "0xd86b84eb36Cd48f3f384b4490F255b494385F429", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitGatedShutter_Implementation: { - address: "0x56199F9E5C0ef9251A251a41597A971141199EDF", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitGatedShutter_Proxy: { - address: "0xd86b84eb36Cd48f3f384b4490F255b494385F429", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitGated_Implementation: { - address: "0xA27EedcEA916BC1ab91720cE70c56666E854F55e", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "extraDataToTokenInfo", - outputs: [ - { - internalType: "address", - name: "tokenGate", - type: "address", - }, - { - internalType: "bool", - name: "isERC1155", - type: "bool", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitGated_Proxy: { - address: "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeKitShutter: { - address: "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitShutter_Implementation: { - address: "0x6582CE0FdB29B5673E6650e34728C784BafB2139", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "CommitCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "CommitCastShutter", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - name: "alreadyDrawn", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areCommitsAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_identity", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_encryptedVote", - type: "bytes", - }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "coreDisputeID", - type: "uint256", - }, - ], - name: "coreDisputeIDToActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "getDegreeOfCoherence", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { - internalType: "uint256", - name: "localDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "localRoundID", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_localDisputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "uint256", - name: "totalVoted", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalCommited", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVoters", - type: "uint256", - }, - { - internalType: "uint256", - name: "choiceCount", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "getVoteInfo", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - { - internalType: "uint256", - name: "_salt", - type: "uint256", - }, - { - internalType: "string", - name: "_justification", - type: "string", - }, - ], - name: "hashVote", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "isAppealFunded", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", - type: "address", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - DisputeKitShutter_Proxy: { - address: "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - DisputeResolver: { - address: "0x71f8537e925C753Fe88DA7e69Ae423f9f3a9A292", - abi: [ - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, - ], - name: "DisputeRequest", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", - outputs: [ - { - internalType: "contract IArbitratorV2", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplate", - type: "string", - }, - { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "uint256", - name: "numberOfRulingOptions", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeResolverRuler: { - address: "0xAEB1bbaE58125BA5F32349c69e4274d15dfD6EC3", - abi: [ - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, - ], - name: "DisputeRequest", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", - outputs: [ - { - internalType: "contract IArbitratorV2", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplate", - type: "string", - }, - { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "uint256", - name: "numberOfRulingOptions", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeResolverUniversity: { - address: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", - abi: [ - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, - ], - name: "DisputeRequest", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", - outputs: [ - { - internalType: "contract IArbitratorV2", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplate", - type: "string", - }, - { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "uint256", - name: "numberOfRulingOptions", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeTemplateRegistry: { - address: "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "DisputeTemplate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "setDisputeTemplate", - outputs: [ - { - internalType: "uint256", - name: "templateId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templates", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeTemplateRegistry_Implementation: { - address: "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "DisputeTemplate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", - }, - ], - name: "setDisputeTemplate", - outputs: [ - { - internalType: "uint256", - name: "templateId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templates", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeTemplateRegistry_Proxy: { - address: "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - EvidenceModule: { - address: "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_party", - type: "address", - }, - { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - EvidenceModule_Implementation: { - address: "0x450Aa35da0ad8B282C5d910254055651417C2200", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_party", - type: "address", - }, - { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - EvidenceModule_Proxy: { - address: "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - KlerosCore: { - address: "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibleInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "StakingZeroWhenNoStake", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WhenNotPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WhenPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreBase.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_guardian", - type: "address", - }, - ], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModule", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreBase.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "uint256", - name: "nbDrawnJurors", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getPnkAtStakePerJuror", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreBase.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "guardian", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_guardian", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "contract ISortitionModule", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - KlerosCoreRuler: { - address: "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NoRulerSet", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulerOnly", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "RulingModeNotSet", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "enum KlerosCoreRuler.RulingMode", - name: "mode", - type: "uint8", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "tied", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "AutoRuled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreRuler.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_oldRuler", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "RulerChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - components: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - indexed: false, - internalType: "struct KlerosCoreRuler.RulerSettings", - name: "_settings", - type: "tuple", - }, - ], - name: "RulerSettingsChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "uint256", - name: "_presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "_presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "_presetOverridden", - type: "bool", - }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToManual", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreRuler.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getNextDisputeID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - ], - internalType: "struct KlerosCoreRuler.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "rulers", - outputs: [ - { - internalType: "address", - name: "ruler", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - name: "rulingResults", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - KlerosCoreRuler_Implementation: { - address: "0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NoRulerSet", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulerOnly", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "RulingModeNotSet", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "enum KlerosCoreRuler.RulingMode", - name: "mode", - type: "uint8", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "tied", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "AutoRuled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreRuler.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_oldRuler", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "RulerChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - components: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - indexed: false, - internalType: "struct KlerosCoreRuler.RulerSettings", - name: "_settings", - type: "tuple", - }, - ], - name: "RulerSettingsChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "uint256", - name: "_presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "_presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "_presetOverridden", - type: "bool", - }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToManual", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreRuler.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getNextDisputeID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - ], - internalType: "struct KlerosCoreRuler.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "rulers", - outputs: [ - { - internalType: "address", - name: "ruler", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - name: "rulingResults", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - KlerosCoreRuler_Proxy: { - address: "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - KlerosCoreSnapshotProxy: { - address: "0xF924ac62b20901914c101Fa089Da1FB6A0585138", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IKlerosCore", - name: "_core", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IKlerosCore", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract IKlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - 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", - }, - ], - }, - KlerosCoreUniversity: { - address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AllJurorsDrawn", - type: "error", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArraysLengthMismatch", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DepthLevelMax", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NoJurorDrawn", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibeInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreUniversity.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_instructor", - type: "address", - }, - ], - name: "changeInstructor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreUniversity.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreUniversity.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_instructor", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModuleAddress", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "instructor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "contract ISortitionModuleUniversity", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - KlerosCoreUniversity_Implementation: { - address: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AllJurorsDrawn", - type: "error", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArraysLengthMismatch", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DepthLevelMax", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NoJurorDrawn", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibeInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreUniversity.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_instructor", - type: "address", - }, - ], - name: "changeInstructor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreUniversity.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreUniversity.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_instructor", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModuleAddress", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "instructor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "contract ISortitionModuleUniversity", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - KlerosCoreUniversity_Proxy: { - address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - KlerosCore_Implementation: { - address: "0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibleInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "StakingZeroWhenNoStake", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WhenNotPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WhenPausedOnly", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreBase.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_guardian", - type: "address", - }, - ], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModule", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreBase.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "uint256", - name: "nbDrawnJurors", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getPnkAtStakePerJuror", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreBase.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "guardian", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_guardian", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", - }, - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_wNative", - type: "address", - }, - ], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "contract ISortitionModule", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "wNative", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - KlerosCore_Proxy: { - address: "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - KlerosV2NeoEarlyUser: { - address: "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", - abi: [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "approved", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "operator", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "approved", - type: "bool", - }, - ], - name: "ApprovalForAll", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: true, - 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: "address", - name: "_newOwner", - type: "address", - }, - ], - name: "changeOwner", - outputs: [], - stateMutability: "nonpayable", - 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: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "ownerOf", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "safeMint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "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", - }, - ], - }, - PNK: { - address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - PNKFaucet: { - address: "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", - abi: [ - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "balance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - PinakionV2: { - address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - PolicyRegistry: { - address: "0xd8681dBF525ecBda2F799BFddB96840065075e8A", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_courtName", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "PolicyUpdate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "policies", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - internalType: "string", - name: "_courtName", - type: "string", - }, - { - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - PolicyRegistry_Implementation: { - address: "0x472846F88D1356bb483a88f97B55026654Fc5deD", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_courtName", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "PolicyUpdate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "policies", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - internalType: "string", - name: "_courtName", - type: "string", - }, - { - internalType: "string", - name: "_policy", - type: "string", - }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - PolicyRegistry_Proxy: { - address: "0xd8681dBF525ecBda2F799BFddB96840065075e8A", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - RandomizerOracle: { - address: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", - abi: [], - }, - SortitionModule: { - address: "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNK", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNKWithdrawn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", - }, - ], - name: "NewPhase", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "StakeDelayed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amountAllCourts", - type: "uint256", - }, - ], - name: "StakeSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - ], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "delayedStakeReadIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "delayedStakes", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "bool", - name: "alreadyTransferred", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, - { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbCourts", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorCourtIDs", - outputs: [ - { - internalType: "uint96[]", - name: "", - type: "uint96[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorLeftoverPNK", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "isJurorStaked", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "jurors", - outputs: [ - { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastPhaseChange", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "jurorAccount", - type: "address", - }, - { - internalType: "uint96", - name: "courtId", - type: "uint96", - }, - ], - name: "latestDelayedStakeIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "maxDrawingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minStakingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", - }, - ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", - outputs: [ - { - internalType: "uint256", - name: "pnkBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "availablePenalty", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "phase", - outputs: [ - { - internalType: "enum ISortitionModule.Phase", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumber", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumberRequestBlock", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rng", - outputs: [ - { - internalType: "contract RNG", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rngLookahead", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "_pnkWithdrawal", - type: "uint256", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_ID", - type: "bytes32", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "validateStake", - outputs: [ - { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", - type: "uint256", - }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - SortitionModuleUniversity: { - address: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", - }, - ], - name: "NewPhase", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "StakeSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCoreUniversity", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, - { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbCourts", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorCourtIDs", - outputs: [ - { - internalType: "uint96[]", - name: "", - type: "uint96[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCoreUniversity", - name: "_core", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "isJurorStaked", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "jurors", - outputs: [ - { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", - }, - ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, - ], - name: "setStake", - outputs: [ - { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", - type: "uint256", - }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "setTransientJuror", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - SortitionModuleUniversity_Implementation: { - address: "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", - }, - ], - name: "NewPhase", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "StakeSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCoreUniversity", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, - { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbCourts", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorCourtIDs", - outputs: [ - { - internalType: "uint96[]", - name: "", - type: "uint96[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCoreUniversity", - name: "_core", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "isJurorStaked", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "jurors", - outputs: [ - { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", - }, - ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, - ], - name: "setStake", - outputs: [ - { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", - type: "uint256", - }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "setTransientJuror", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - SortitionModuleUniversity_Proxy: { - address: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - SortitionModule_Implementation: { - address: "0x8a26445989c944C58503275ad87Ab4d7b17d4F1e", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNK", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "LeftoverPNKWithdrawn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", - }, - ], - name: "NewPhase", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "StakeDelayed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amountAllCourts", - type: "uint256", - }, - ], - name: "StakeSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - ], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "delayedStakeReadIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "delayedStakes", - outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "bool", - name: "alreadyTransferred", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", - outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, - { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbCourts", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorCourtIDs", - outputs: [ - { - internalType: "uint96[]", - name: "", - type: "uint96[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "getJurorLeftoverPNK", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "isJurorStaked", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "jurors", - outputs: [ - { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastPhaseChange", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "jurorAccount", - type: "address", - }, - { - internalType: "uint96", - name: "courtId", - type: "uint96", - }, - ], - name: "latestDelayedStakeIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "maxDrawingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minStakingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", - }, - ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", - outputs: [ - { - internalType: "uint256", - name: "pnkBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "availablePenalty", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "phase", - outputs: [ - { - internalType: "enum ISortitionModule.Phase", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumber", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumberRequestBlock", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rng", - outputs: [ - { - internalType: "contract RNG", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rngLookahead", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "_pnkWithdrawal", - type: "uint256", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_ID", - type: "bytes32", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "validateStake", - outputs: [ - { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", - type: "uint256", - }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - SortitionModule_Proxy: { - address: "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - TransactionBatcher: { - address: "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", - abi: [ - { - inputs: [ - { - internalType: "address[]", - name: "targets", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "values", - type: "uint256[]", - }, - { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", - }, - ], - name: "batchSend", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "targets", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "values", - type: "uint256[]", - }, - { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", - }, - ], - name: "batchSendUnchecked", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - WETH: { - address: "0x3829A2486d53ee984a0ca2D76552715726b77138", - abi: [ - { - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - 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", - }, - ], - }, - WETHFaucet: { - address: "0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd", - abi: [ - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "balance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - VeaInboxArbToEthDevnet: { - address: "0xF6C5640de593fEf76129F1F1A863F7ddc65776C9", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "_epochPeriod", - type: "uint256", - }, - { - internalType: "address", - name: "_veaOutboxArbToEth", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "_nodeData", - type: "bytes", - }, - ], - name: "MessageSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "_snapshot", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - indexed: false, - internalType: "uint64", - name: "_count", - type: "uint64", - }, - ], - name: "SnapshotSaved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_epochSent", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "_ticketId", - type: "bytes32", - }, - ], - name: "SnapshotSent", - type: "event", - }, - { - inputs: [], - name: "count", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, - ], - name: "epochAt", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochFinalized", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochNow", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochPeriod", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "saveSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_to", - type: "address", - }, - { - internalType: "bytes4", - name: "_fnSelector", - type: "bytes4", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "sendMessage", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - components: [ - { - internalType: "bytes32", - name: "stateRoot", - type: "bytes32", - }, - { - internalType: "address", - name: "claimer", - type: "address", - }, - { - internalType: "uint32", - name: "timestampClaimed", - type: "uint32", - }, - { - internalType: "uint32", - name: "timestampVerification", - type: "uint32", - }, - { - internalType: "uint32", - name: "blocknumberVerification", - type: "uint32", - }, - { - internalType: "enum Party", - name: "honest", - type: "uint8", - }, - { - internalType: "address", - name: "challenger", - type: "address", - }, - ], - internalType: "struct Claim", - name: "_claim", - type: "tuple", - }, - ], - name: "sendSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - name: "snapshots", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "veaOutboxArbToEth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - VeaInboxArbToEthTestnet: { - address: "0xE12daFE59Bc3A996362d54b37DFd2BA9279cAd06", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "_epochPeriod", - type: "uint256", - }, - { - internalType: "address", - name: "_veaOutboxArbToEth", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "_nodeData", - type: "bytes", - }, - ], - name: "MessageSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "_snapshot", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - indexed: false, - internalType: "uint64", - name: "_count", - type: "uint64", - }, - ], - name: "SnapshotSaved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_epochSent", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "_ticketId", - type: "bytes32", - }, - ], - name: "SnapshotSent", - type: "event", - }, - { - inputs: [], - name: "count", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, - ], - name: "epochAt", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochFinalized", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochNow", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochPeriod", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "saveSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_to", - type: "address", - }, - { - internalType: "bytes4", - name: "_fnSelector", - type: "bytes4", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "sendMessage", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - components: [ - { - internalType: "bytes32", - name: "stateRoot", - type: "bytes32", - }, - { - internalType: "address", - name: "claimer", - type: "address", - }, - { - internalType: "uint32", - name: "timestampClaimed", - type: "uint32", - }, - { - internalType: "uint32", - name: "timestampVerification", - type: "uint32", - }, - { - internalType: "uint32", - name: "blocknumberVerification", - type: "uint32", - }, - { - internalType: "enum Party", - name: "honest", - type: "uint8", - }, - { - internalType: "address", - name: "challenger", - type: "address", - }, - ], - internalType: "struct Claim", - name: "_claim", - type: "tuple", - }, - ], - name: "sendSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - name: "snapshots", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "veaOutboxArbToEth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - VeaInboxArbToGnosisDevnet: { - address: "0xF6286b9C6c7F1B33Ea976FA43434027c7b8421A7", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "_epochPeriod", - type: "uint256", - }, - { - internalType: "address", - name: "_routerArbToGnosis", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "_nodeData", - type: "bytes", - }, - ], - name: "MessageSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "_snapshot", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - indexed: false, - internalType: "uint64", - name: "_count", - type: "uint64", - }, - ], - name: "SnapshotSaved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_epochSent", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "_ticketId", - type: "bytes32", - }, - ], - name: "SnapshotSent", - type: "event", - }, - { - inputs: [], - name: "count", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, - ], - name: "epochAt", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochFinalized", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochNow", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochPeriod", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "routerArbToGnosis", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "saveSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_to", - type: "address", - }, - { - internalType: "bytes4", - name: "_fnSelector", - type: "bytes4", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "sendMessage", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - internalType: "uint256", - name: "_gasLimit", - type: "uint256", - }, - { - components: [ - { - internalType: "bytes32", - name: "stateRoot", - type: "bytes32", - }, - { - internalType: "address", - name: "claimer", - type: "address", - }, - { - internalType: "uint32", - name: "timestampClaimed", - type: "uint32", - }, - { - internalType: "uint32", - name: "timestampVerification", - type: "uint32", - }, - { - internalType: "uint32", - name: "blocknumberVerification", - type: "uint32", - }, - { - internalType: "enum Party", - name: "honest", - type: "uint8", - }, - { - internalType: "address", - name: "challenger", - type: "address", - }, - ], - internalType: "struct Claim", - name: "_claim", - type: "tuple", - }, - ], - name: "sendSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - name: "snapshots", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - VeaInboxArbToGnosisTestnet: { - address: "0x62403e9Fbac618301175C89fb21920e4FF235A6a", - abi: [ - { - inputs: [ - { - internalType: "uint256", - name: "_epochPeriod", - type: "uint256", - }, - { - internalType: "address", - name: "_routerArbToGnosis", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes", - name: "_nodeData", - type: "bytes", - }, - ], - name: "MessageSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "_snapshot", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - indexed: false, - internalType: "uint64", - name: "_count", - type: "uint64", - }, - ], - name: "SnapshotSaved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_epochSent", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes32", - name: "_ticketId", - type: "bytes32", - }, - ], - name: "SnapshotSent", - type: "event", - }, - { - inputs: [], - name: "count", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, - ], - name: "epochAt", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochFinalized", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochNow", - outputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "epochPeriod", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "routerArbToGnosis", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "saveSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_to", - type: "address", - }, - { - internalType: "bytes4", - name: "_fnSelector", - type: "bytes4", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "sendMessage", - outputs: [ - { - internalType: "uint64", - name: "", - type: "uint64", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_epoch", - type: "uint256", - }, - { - internalType: "uint256", - name: "_gasLimit", - type: "uint256", - }, - { - components: [ - { - internalType: "bytes32", - name: "stateRoot", - type: "bytes32", - }, - { - internalType: "address", - name: "claimer", - type: "address", - }, - { - internalType: "uint32", - name: "timestampClaimed", - type: "uint32", - }, - { - internalType: "uint32", - name: "timestampVerification", - type: "uint32", - }, - { - internalType: "uint32", - name: "blocknumberVerification", - type: "uint32", - }, - { - internalType: "enum Party", - name: "honest", - type: "uint8", - }, - { - internalType: "address", - name: "challenger", - type: "address", - }, - ], - internalType: "struct Claim", - name: "_claim", - type: "tuple", - }, - ], - name: "sendSnapshot", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "epoch", - type: "uint256", - }, - ], - name: "snapshots", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - }, -} as const; diff --git a/contracts/deployments/arbitrumSepoliaDevnet/.chainId b/contracts/deployments/arbitrumSepoliaDevnet/.chainId deleted file mode 100644 index 357f9c751..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/.chainId +++ /dev/null @@ -1 +0,0 @@ -421614 diff --git a/contracts/deployments/arbitrumSepoliaDevnet/ArbitrableExample.json b/contracts/deployments/arbitrumSepoliaDevnet/ArbitrableExample.json deleted file mode 100644 index 34cf976be..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/ArbitrableExample.json +++ /dev/null @@ -1,618 +0,0 @@ -{ - "address": "0x3Eae72F076c68F5c354C73abC33EAA291ef1b2Fa", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - }, - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_weth", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "string", - "name": "_action", - "type": "string" - } - ], - "name": "Action", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "arbitratorExtraData", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - } - ], - "name": "changeArbitratorExtraData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "changeDisputeTemplate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_action", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_feeInWeth", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_action", - "type": "string" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "externalIDtoLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "weth", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x4e122e3a0f9a4ca635e2df3c2f948c4a7862505bb8a10e1580d0da26f6539ee7", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x3Eae72F076c68F5c354C73abC33EAA291ef1b2Fa", - "transactionIndex": 1, - "gasUsed": "1327522", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000008000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000080000000000000000000100000000000000000000000000000000000000000000000000040000000000000400000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000002000000400000000000100000000000000000000000000000000000000", - "blockHash": "0x17ec65a1f8f8bd6b8bd3364cc2e2c3d89b748c0c9a45fbe59c8b30903c67267b", - "transactionHash": "0x4e122e3a0f9a4ca635e2df3c2f948c4a7862505bb8a10e1580d0da26f6539ee7", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 88689951, - "transactionHash": "0x4e122e3a0f9a4ca635e2df3c2f948c4a7862505bb8a10e1580d0da26f6539ee7", - "address": "0x596D3B09E684D62217682216e9b7a0De75933391", - "topics": [ - "0x00f7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff9924", - "0x00000000000000000000000000000000000000000000000000000000000001ba", - "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c6469737075746554656d706c6174654d617070696e673a20544f444f00000000", - "logIndex": 0, - "blockHash": "0x17ec65a1f8f8bd6b8bd3364cc2e2c3d89b748c0c9a45fbe59c8b30903c67267b" - } - ], - "blockNumber": 88689951, - "cumulativeGasUsed": "1327522", - "status": 1, - "byzantium": true - }, - "args": [ - "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", - { - "$schema": "../NewDisputeTemplate.schema.json", - "title": "Let's do this", - "description": "We want to do this: %s", - "question": "Does it comply with the policy?", - "answers": [ - { - "title": "Yes", - "description": "Select this if you agree that it must be done." - }, - { - "title": "No", - "description": "Select this if you do not agree that it must be done." - } - ], - "policyURI": "/ipfs/Qmdvk...rSD6cE/policy.pdf", - "frontendUrl": "https://kleros-v2.netlify.app/#/cases/%s/overview", - "arbitratorChainID": "421614", - "arbitratorAddress": "0xD08Ab99480d02bf9C092828043f611BcDFEA917b", - "category": "Others", - "specification": "KIP001", - "lang": "en_US" - }, - "disputeTemplateMapping: TODO", - "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", - "0x596D3B09E684D62217682216e9b7a0De75933391", - "0x3829A2486d53ee984a0ca2D76552715726b77138" - ], - "numDeployments": 2, - "solcInputHash": "e0f719371c25ee6b430d9b7926bcf1db", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_action\",\"type\":\"string\"}],\"name\":\"Action\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbitratorExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"}],\"name\":\"changeArbitratorExtraData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"changeDisputeTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_action\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_feeInWeth\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_action\",\"type\":\"string\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"externalIDtoLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"The arbitrator to rule on created disputes.\",\"_arbitratorExtraData\":\"The extra data for the arbitrator.\",\"_templateData\":\"The dispute template data.\",\"_templateDataMappings\":\"The dispute template data mappings.\",\"_templateRegistry\":\"The dispute template registry.\",\"_weth\":\"The WETH token.\"}},\"createDispute(string)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_action\":\"The action that requires arbitration.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the dispute created.\"}},\"createDispute(string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_action\":\"The action that requires arbitration.\",\"_feeInWeth\":\"Amount of fees in WETH for the arbitrator.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the dispute created.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_arbitratorDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"ArbitrableExample An example of an arbitrable contract which connects to the arbitator that implements the updated interface.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/ArbitrableExample.sol\":\"ArbitrableExample\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/ArbitrableExample.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\nimport \\\"../../libraries/SafeERC20.sol\\\";\\n\\n/// @title ArbitrableExample\\n/// An example of an arbitrable contract which connects to the arbitator that implements the updated interface.\\ncontract ArbitrableExample is IArbitrableV2 {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bool isRuled; // Whether the dispute has been ruled or not.\\n uint256 ruling; // Ruling given by the arbitrator.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n event Action(string indexed _action);\\n\\n address public immutable governor;\\n IArbitratorV2 public arbitrator; // Arbitrator is set in constructor.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n uint256 public templateId; // The current dispute template identifier.\\n bytes public arbitratorExtraData; // Extra data to set up the arbitration.\\n IERC20 public immutable weth; // The WETH token.\\n mapping(uint256 => uint256) public externalIDtoLocalID; // Maps external (arbitrator side) dispute IDs to local dispute IDs.\\n DisputeStruct[] public disputes; // Stores the disputes' info. disputes[disputeID].\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(this) == msg.sender, \\\"Only the governor allowed.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator The arbitrator to rule on created disputes.\\n /// @param _templateData The dispute template data.\\n /// @param _templateDataMappings The dispute template data mappings.\\n /// @param _arbitratorExtraData The extra data for the arbitrator.\\n /// @param _templateRegistry The dispute template registry.\\n /// @param _weth The WETH token.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n string memory _templateData,\\n string memory _templateDataMappings,\\n bytes memory _arbitratorExtraData,\\n IDisputeTemplateRegistry _templateRegistry,\\n IERC20 _weth\\n ) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n arbitratorExtraData = _arbitratorExtraData;\\n templateRegistry = _templateRegistry;\\n weth = _weth;\\n\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external onlyByGovernor {\\n arbitrator = _arbitrator;\\n }\\n\\n function changeArbitratorExtraData(bytes calldata _arbitratorExtraData) external onlyByGovernor {\\n arbitratorExtraData = _arbitratorExtraData;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external onlyByGovernor {\\n templateRegistry = _templateRegistry;\\n }\\n\\n function changeDisputeTemplate(\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external onlyByGovernor {\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _action The action that requires arbitration.\\n /// @return disputeID Dispute id (on arbitrator side) of the dispute created.\\n function createDispute(string calldata _action) external payable returns (uint256 disputeID) {\\n emit Action(_action);\\n\\n uint256 numberOfRulingOptions = 2;\\n uint256 localDisputeID = disputes.length;\\n disputes.push(DisputeStruct({isRuled: false, ruling: 0, numberOfRulingOptions: numberOfRulingOptions}));\\n\\n disputeID = arbitrator.createDispute{value: msg.value}(numberOfRulingOptions, arbitratorExtraData);\\n externalIDtoLocalID[disputeID] = localDisputeID;\\n\\n uint256 externalDisputeID = uint256(keccak256(abi.encodePacked(_action)));\\n emit DisputeRequest(arbitrator, disputeID, externalDisputeID, templateId, \\\"\\\");\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _action The action that requires arbitration.\\n /// @param _feeInWeth Amount of fees in WETH for the arbitrator.\\n /// @return disputeID Dispute id (on arbitrator side) of the dispute created.\\n function createDispute(string calldata _action, uint256 _feeInWeth) external returns (uint256 disputeID) {\\n emit Action(_action);\\n\\n uint256 numberOfRulingOptions = 2;\\n uint256 localDisputeID = disputes.length;\\n disputes.push(DisputeStruct({isRuled: false, ruling: 0, numberOfRulingOptions: numberOfRulingOptions}));\\n\\n require(weth.safeTransferFrom(msg.sender, address(this), _feeInWeth), \\\"Transfer failed\\\");\\n require(weth.increaseAllowance(address(arbitrator), _feeInWeth), \\\"Allowance increase failed\\\");\\n\\n disputeID = arbitrator.createDispute(numberOfRulingOptions, arbitratorExtraData, weth, _feeInWeth);\\n externalIDtoLocalID[disputeID] = localDisputeID;\\n\\n uint256 externalDisputeID = uint256(keccak256(abi.encodePacked(_action)));\\n emit DisputeRequest(arbitrator, disputeID, externalDisputeID, templateId, \\\"\\\");\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = externalIDtoLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(dispute.isRuled == false, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n}\\n\",\"keccak256\":\"0x6f28cc8940c38afc38e3cf72ae4920d6a38c9fd6dfd93f56ba6f10325bf72991\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xb46ff71c32a524a865fe8ca99d94c9daeb690bc9d7d49d963a45b06f60af19f3\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801562000010575f80fd5b506040516200187c3803806200187c833981016040819052620000339162000201565b336080525f80546001600160a01b0319166001600160a01b03881617905560036200005f848262000363565b50600180546001600160a01b0319166001600160a01b0384811691821790925590821660a0526040516312a6505d60e21b8152634a99417490620000aa90889088906004016200045c565b6020604051808303815f875af1158015620000c7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620000ed91906200049a565b60025550620004b2945050505050565b6001600160a01b038116811462000112575f80fd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5b83811015620001455781810151838201526020016200012b565b50505f910152565b5f6001600160401b038084111562000169576200016962000115565b604051601f8501601f19908116603f0116810190828211818310171562000194576200019462000115565b81604052809350858152868686011115620001ad575f80fd5b620001bd86602083018762000129565b5050509392505050565b5f82601f830112620001d7575f80fd5b620001e8838351602085016200014d565b9392505050565b8051620001fc81620000fd565b919050565b5f805f805f8060c0878903121562000217575f80fd5b86516200022481620000fd565b60208801519096506001600160401b038082111562000241575f80fd5b6200024f8a838b01620001c7565b9650604089015191508082111562000265575f80fd5b620002738a838b01620001c7565b9550606089015191508082111562000289575f80fd5b508701601f810189136200029b575f80fd5b620002ac898251602084016200014d565b935050620002bd60808801620001ef565b9150620002cd60a08801620001ef565b90509295509295509295565b600181811c90821680620002ee57607f821691505b6020821081036200030d57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200035e57805f5260205f20601f840160051c810160208510156200033a5750805b601f840160051c820191505b818110156200035b575f815560010162000346565b50505b505050565b81516001600160401b038111156200037f576200037f62000115565b6200039781620003908454620002d9565b8462000313565b602080601f831160018114620003cd575f8415620003b55750858301515b5f19600386901b1c1916600185901b17855562000427565b5f85815260208120601f198616915b82811015620003fd57888601518255948401946001909101908401620003dc565b50858210156200041b57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f81518084526200044881602086016020860162000129565b601f01601f19169290920160200192915050565b606081525f6060820152608060208201525f6200047d60808301856200042f565b82810360408401526200049181856200042f565b95945050505050565b5f60208284031215620004ab575f80fd5b5051919050565b60805160a051611394620004e85f395f818161018c015281816106c80152818161074601526107e301525f60db01526113945ff3fe6080604052600436106100c6575f3560e01c80636546928711610078578063654692871461020957806368175996146102365780636cc6cde1146102495780637aa77f2914610267578063a0af81f01461027c578063c21ae0611461029b578063c5d55288146102c6578063fc548f08146102e5575f80fd5b80630c340a24146100ca5780630c7ac7b61461011a578063311a6c561461013b57806334e2672d1461015c5780633fc8cef31461017b5780634660ebbe146101ae578063564a565d146101cd575b5f80fd5b3480156100d5575f80fd5b506100fd7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610125575f80fd5b5061012e610304565b6040516101119190610dff565b348015610146575f80fd5b5061015a610155366004610e18565b610390565b005b348015610167575f80fd5b5061015a610176366004610e7d565b610527565b348015610186575f80fd5b506100fd7f000000000000000000000000000000000000000000000000000000000000000081565b3480156101b9575f80fd5b5061015a6101c8366004610ed3565b610558565b3480156101d8575f80fd5b506101ec6101e7366004610eee565b610599565b604080519315158452602084019290925290820152606001610111565b348015610214575f80fd5b50610228610223366004610f05565b6105ce565b604051908152602001610111565b610228610244366004610e7d565b6108f7565b348015610254575f80fd5b505f546100fd906001600160a01b031681565b348015610272575f80fd5b5061022860025481565b348015610287575f80fd5b506001546100fd906001600160a01b031681565b3480156102a6575f80fd5b506102286102b5366004610eee565b60046020525f908152604090205481565b3480156102d1575f80fd5b5061015a6102e0366004610fea565b610b05565b3480156102f0575f80fd5b5061015a6102ff366004610ed3565b610b9d565b600380546103119061104a565b80601f016020809104026020016040519081016040528092919081815260200182805461033d9061104a565b80156103885780601f1061035f57610100808354040283529160200191610388565b820191905f5260205f20905b81548152906001019060200180831161036b57829003601f168201915b505050505081565b5f8281526004602052604081205460058054919291839081106103b5576103b5611082565b5f91825260208220915460039190910290910191506001600160a01b031633146104345760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806002015483111561047a5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b604482015260640161042b565b805460ff16156104d85760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b606482015260840161042b565b805460ff1916600190811782558101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b3033146105465760405162461bcd60e51b815260040161042b90611096565b6003610553828483611118565b505050565b3033146105775760405162461bcd60e51b815260040161042b90611096565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600581815481106105a8575f80fd5b5f91825260209091206003909102018054600182015460029092015460ff909116925083565b5f83836040516105df9291906111d2565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f27905f90a260058054604080516060810182525f8082526020820181815260029383018481526001860187559590915290517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db060038502908101805460ff19169215159290921790915590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2909301929092556106f87f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316333087610bdd565b6107365760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b604482015260640161042b565b5f5461076f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911686610cb4565b6107b75760405162461bcd60e51b8152602060048201526019602482015278105b1b1bddd85b98d9481a5b98dc99585cd94819985a5b1959603a1b604482015260640161042b565b5f54604051633d941b6d60e21b81526001600160a01b039091169063f6506db49061080d9085906003907f0000000000000000000000000000000000000000000000000000000000000000908a9060040161125a565b6020604051808303815f875af1158015610829573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061084d919061128e565b5f8181526004602090815260408083208590555192955090916108749189918991016111d2565b60408051601f198184030181529082905280516020909101205f5460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186916108e59186825260208201526060604082018190525f9082015260800190565b60405180910390a35050509392505050565b5f82826040516109089291906111d2565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f27905f90a260058054604080516060810182525f80825260208201818152600283850181815260018701885596835292517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06003808802918201805460ff19169315159390931790925591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db183015595517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015554915163c13517e160e01b815290936001600160a01b039092169163c13517e1913491610a1b918791906004016112a5565b60206040518083038185885af1158015610a37573d5f803e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610a5c919061128e565b5f818152600460209081526040808320859055519295509091610a839188918891016111d2565b60408051601f198184030181529082905280516020909101205f5460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e2718691610af49186825260208201526060604082018190525f9082015260800190565b60405180910390a350505092915050565b303314610b245760405162461bcd60e51b815260040161042b90611096565b6001546040516312a6505d60e21b81526001600160a01b0390911690634a99417490610b5690859085906004016112c5565b6020604051808303815f875af1158015610b72573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b96919061128e565b6002555050565b303314610bbc5760405162461bcd60e51b815260040161042b90611096565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610c4191906112ff565b5f604051808303815f865af19150503d805f8114610c7a576040519150601f19603f3d011682016040523d82523d5f602084013e610c7f565b606091505b5091509150818015610ca9575080511580610ca9575080806020019051810190610ca9919061131a565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063095ea7b39085908590849063dd62ed3e90604401602060405180830381865afa158015610d0d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d31919061128e565b610d3b9190611339565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610d83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610da7919061131a565b506001949350505050565b5f5b83811015610dcc578181015183820152602001610db4565b50505f910152565b5f8151808452610deb816020860160208601610db2565b601f01601f19169290920160200192915050565b602081525f610e116020830184610dd4565b9392505050565b5f8060408385031215610e29575f80fd5b50508035926020909101359150565b5f8083601f840112610e48575f80fd5b50813567ffffffffffffffff811115610e5f575f80fd5b602083019150836020828501011115610e76575f80fd5b9250929050565b5f8060208385031215610e8e575f80fd5b823567ffffffffffffffff811115610ea4575f80fd5b610eb085828601610e38565b90969095509350505050565b6001600160a01b0381168114610ed0575f80fd5b50565b5f60208284031215610ee3575f80fd5b8135610e1181610ebc565b5f60208284031215610efe575f80fd5b5035919050565b5f805f60408486031215610f17575f80fd5b833567ffffffffffffffff811115610f2d575f80fd5b610f3986828701610e38565b909790965060209590950135949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112610f70575f80fd5b813567ffffffffffffffff80821115610f8b57610f8b610f4d565b604051601f8301601f19908116603f01168101908282118183101715610fb357610fb3610f4d565b81604052838152866020858801011115610fcb575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f8060408385031215610ffb575f80fd5b823567ffffffffffffffff80821115611012575f80fd5b61101e86838701610f61565b93506020850135915080821115611033575f80fd5b5061104085828601610f61565b9150509250929050565b600181811c9082168061105e57607f821691505b60208210810361107c57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b6020808252601a908201527f4f6e6c792074686520676f7665726e6f7220616c6c6f7765642e000000000000604082015260600190565b601f82111561055357805f5260205f20601f840160051c810160208510156110f25750805b601f840160051c820191505b81811015611111575f81556001016110fe565b5050505050565b67ffffffffffffffff83111561113057611130610f4d565b6111448361113e835461104a565b836110cd565b5f601f841160018114611175575f851561115e5750838201355b5f19600387901b1c1916600186901b178355611111565b5f83815260208120601f198716915b828110156111a45786850135825560209485019460019092019101611184565b50868210156111c0575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b818382375f9101908152919050565b5f81546111ed8161104a565b80855260206001838116801561120a57600181146112245761124f565b60ff1985168884015283151560051b88018301955061124f565b865f52825f205f5b858110156112475781548a820186015290830190840161122c565b890184019650505b505050505092915050565b848152608060208201525f61127260808301866111e1565b6001600160a01b03949094166040830152506060015292915050565b5f6020828403121561129e575f80fd5b5051919050565b828152604060208201525f6112bd60408301846111e1565b949350505050565b606081525f6060820152608060208201525f6112e46080830185610dd4565b82810360408401526112f68185610dd4565b95945050505050565b5f8251611310818460208701610db2565b9190910192915050565b5f6020828403121561132a575f80fd5b81518015158114610e11575f80fd5b8082018082111561135857634e487b7160e01b5f52601160045260245ffd5b9291505056fea2646970667358221220f222b78e5c3ee0ac0a6e915f5623ac3b2bb5a32af4e429d10fddb066ab8aff3c64736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106100c6575f3560e01c80636546928711610078578063654692871461020957806368175996146102365780636cc6cde1146102495780637aa77f2914610267578063a0af81f01461027c578063c21ae0611461029b578063c5d55288146102c6578063fc548f08146102e5575f80fd5b80630c340a24146100ca5780630c7ac7b61461011a578063311a6c561461013b57806334e2672d1461015c5780633fc8cef31461017b5780634660ebbe146101ae578063564a565d146101cd575b5f80fd5b3480156100d5575f80fd5b506100fd7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610125575f80fd5b5061012e610304565b6040516101119190610dff565b348015610146575f80fd5b5061015a610155366004610e18565b610390565b005b348015610167575f80fd5b5061015a610176366004610e7d565b610527565b348015610186575f80fd5b506100fd7f000000000000000000000000000000000000000000000000000000000000000081565b3480156101b9575f80fd5b5061015a6101c8366004610ed3565b610558565b3480156101d8575f80fd5b506101ec6101e7366004610eee565b610599565b604080519315158452602084019290925290820152606001610111565b348015610214575f80fd5b50610228610223366004610f05565b6105ce565b604051908152602001610111565b610228610244366004610e7d565b6108f7565b348015610254575f80fd5b505f546100fd906001600160a01b031681565b348015610272575f80fd5b5061022860025481565b348015610287575f80fd5b506001546100fd906001600160a01b031681565b3480156102a6575f80fd5b506102286102b5366004610eee565b60046020525f908152604090205481565b3480156102d1575f80fd5b5061015a6102e0366004610fea565b610b05565b3480156102f0575f80fd5b5061015a6102ff366004610ed3565b610b9d565b600380546103119061104a565b80601f016020809104026020016040519081016040528092919081815260200182805461033d9061104a565b80156103885780601f1061035f57610100808354040283529160200191610388565b820191905f5260205f20905b81548152906001019060200180831161036b57829003601f168201915b505050505081565b5f8281526004602052604081205460058054919291839081106103b5576103b5611082565b5f91825260208220915460039190910290910191506001600160a01b031633146104345760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806002015483111561047a5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b604482015260640161042b565b805460ff16156104d85760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b606482015260840161042b565b805460ff1916600190811782558101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b3033146105465760405162461bcd60e51b815260040161042b90611096565b6003610553828483611118565b505050565b3033146105775760405162461bcd60e51b815260040161042b90611096565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600581815481106105a8575f80fd5b5f91825260209091206003909102018054600182015460029092015460ff909116925083565b5f83836040516105df9291906111d2565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f27905f90a260058054604080516060810182525f8082526020820181815260029383018481526001860187559590915290517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db060038502908101805460ff19169215159290921790915590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2909301929092556106f87f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316333087610bdd565b6107365760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b604482015260640161042b565b5f5461076f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911686610cb4565b6107b75760405162461bcd60e51b8152602060048201526019602482015278105b1b1bddd85b98d9481a5b98dc99585cd94819985a5b1959603a1b604482015260640161042b565b5f54604051633d941b6d60e21b81526001600160a01b039091169063f6506db49061080d9085906003907f0000000000000000000000000000000000000000000000000000000000000000908a9060040161125a565b6020604051808303815f875af1158015610829573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061084d919061128e565b5f8181526004602090815260408083208590555192955090916108749189918991016111d2565b60408051601f198184030181529082905280516020909101205f5460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186916108e59186825260208201526060604082018190525f9082015260800190565b60405180910390a35050509392505050565b5f82826040516109089291906111d2565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f27905f90a260058054604080516060810182525f80825260208201818152600283850181815260018701885596835292517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06003808802918201805460ff19169315159390931790925591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db183015595517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015554915163c13517e160e01b815290936001600160a01b039092169163c13517e1913491610a1b918791906004016112a5565b60206040518083038185885af1158015610a37573d5f803e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610a5c919061128e565b5f818152600460209081526040808320859055519295509091610a839188918891016111d2565b60408051601f198184030181529082905280516020909101205f5460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e2718691610af49186825260208201526060604082018190525f9082015260800190565b60405180910390a350505092915050565b303314610b245760405162461bcd60e51b815260040161042b90611096565b6001546040516312a6505d60e21b81526001600160a01b0390911690634a99417490610b5690859085906004016112c5565b6020604051808303815f875af1158015610b72573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b96919061128e565b6002555050565b303314610bbc5760405162461bcd60e51b815260040161042b90611096565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610c4191906112ff565b5f604051808303815f865af19150503d805f8114610c7a576040519150601f19603f3d011682016040523d82523d5f602084013e610c7f565b606091505b5091509150818015610ca9575080511580610ca9575080806020019051810190610ca9919061131a565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063095ea7b39085908590849063dd62ed3e90604401602060405180830381865afa158015610d0d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d31919061128e565b610d3b9190611339565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610d83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610da7919061131a565b506001949350505050565b5f5b83811015610dcc578181015183820152602001610db4565b50505f910152565b5f8151808452610deb816020860160208601610db2565b601f01601f19169290920160200192915050565b602081525f610e116020830184610dd4565b9392505050565b5f8060408385031215610e29575f80fd5b50508035926020909101359150565b5f8083601f840112610e48575f80fd5b50813567ffffffffffffffff811115610e5f575f80fd5b602083019150836020828501011115610e76575f80fd5b9250929050565b5f8060208385031215610e8e575f80fd5b823567ffffffffffffffff811115610ea4575f80fd5b610eb085828601610e38565b90969095509350505050565b6001600160a01b0381168114610ed0575f80fd5b50565b5f60208284031215610ee3575f80fd5b8135610e1181610ebc565b5f60208284031215610efe575f80fd5b5035919050565b5f805f60408486031215610f17575f80fd5b833567ffffffffffffffff811115610f2d575f80fd5b610f3986828701610e38565b909790965060209590950135949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112610f70575f80fd5b813567ffffffffffffffff80821115610f8b57610f8b610f4d565b604051601f8301601f19908116603f01168101908282118183101715610fb357610fb3610f4d565b81604052838152866020858801011115610fcb575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f8060408385031215610ffb575f80fd5b823567ffffffffffffffff80821115611012575f80fd5b61101e86838701610f61565b93506020850135915080821115611033575f80fd5b5061104085828601610f61565b9150509250929050565b600181811c9082168061105e57607f821691505b60208210810361107c57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b6020808252601a908201527f4f6e6c792074686520676f7665726e6f7220616c6c6f7765642e000000000000604082015260600190565b601f82111561055357805f5260205f20601f840160051c810160208510156110f25750805b601f840160051c820191505b81811015611111575f81556001016110fe565b5050505050565b67ffffffffffffffff83111561113057611130610f4d565b6111448361113e835461104a565b836110cd565b5f601f841160018114611175575f851561115e5750838201355b5f19600387901b1c1916600186901b178355611111565b5f83815260208120601f198716915b828110156111a45786850135825560209485019460019092019101611184565b50868210156111c0575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b818382375f9101908152919050565b5f81546111ed8161104a565b80855260206001838116801561120a57600181146112245761124f565b60ff1985168884015283151560051b88018301955061124f565b865f52825f205f5b858110156112475781548a820186015290830190840161122c565b890184019650505b505050505092915050565b848152608060208201525f61127260808301866111e1565b6001600160a01b03949094166040830152506060015292915050565b5f6020828403121561129e575f80fd5b5051919050565b828152604060208201525f6112bd60408301846111e1565b949350505050565b606081525f6060820152608060208201525f6112e46080830185610dd4565b82810360408401526112f68185610dd4565b95945050505050565b5f8251611310818460208701610db2565b9190910192915050565b5f6020828403121561132a575f80fd5b81518015158114610e11575f80fd5b8082018082111561135857634e487b7160e01b5f52601160045260245ffd5b9291505056fea2646970667358221220f222b78e5c3ee0ac0a6e915f5623ac3b2bb5a32af4e429d10fddb066ab8aff3c64736f6c63430008180033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrator": "The arbitrator of the contract.", - "_arbitratorDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "The arbitrator to rule on created disputes.", - "_arbitratorExtraData": "The extra data for the arbitrator.", - "_templateData": "The dispute template data.", - "_templateDataMappings": "The dispute template data mappings.", - "_templateRegistry": "The dispute template registry.", - "_weth": "The WETH token." - } - }, - "createDispute(string)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_action": "The action that requires arbitration." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the dispute created." - } - }, - "createDispute(string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_action": "The action that requires arbitration.", - "_feeInWeth": "Amount of fees in WETH for the arbitrator." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the dispute created." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "ArbitrableExample An example of an arbitrable contract which connects to the arbitator that implements the updated interface.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 12148, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "arbitrator", - "offset": 0, - "slot": "0", - "type": "t_contract(IArbitratorV2)20599" - }, - { - "astId": 12151, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "templateRegistry", - "offset": 0, - "slot": "1", - "type": "t_contract(IDisputeTemplateRegistry)20770" - }, - { - "astId": 12153, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "templateId", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 12155, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "3", - "type": "t_bytes_storage" - }, - { - "astId": 12162, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "externalIDtoLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 12166, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "disputes", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(DisputeStruct)12139_storage)dyn_storage" - } - ], - "types": { - "t_array(t_struct(DisputeStruct)12139_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)12139_storage", - "encoding": "dynamic_array", - "label": "struct ArbitrableExample.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)20599": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)20770": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)12139_storage": { - "encoding": "inplace", - "label": "struct ArbitrableExample.DisputeStruct", - "members": [ - { - "astId": 12134, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "isRuled", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 12136, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "ruling", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 12138, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "2", - "type": "t_uint256" - } - ], - "numberOfBytes": "96" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/BlockHashRNG.json b/contracts/deployments/arbitrumSepoliaDevnet/BlockHashRNG.json deleted file mode 100644 index 293998a78..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/BlockHashRNG.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "address": "0x56d6d65Fe202232714794B5D5e4ed9894466Ee01", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_block", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_block", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x32c51b1394c621cbf7c57329ff44c105baa1e9fcad4c83a64aa4555755a73a1b", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x56d6d65Fe202232714794B5D5e4ed9894466Ee01", - "transactionIndex": 1, - "gasUsed": "131155", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa93f6b0360c4d5aec6c9375356a101a1dab80c14b1f5bd97d5ff0fc4a949125a", - "transactionHash": "0x32c51b1394c621cbf7c57329ff44c105baa1e9fcad4c83a64aa4555755a73a1b", - "logs": [], - "blockNumber": 3141082, - "cumulativeGasUsed": "131155", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cl\\u00e9ment Lesaege - \",\"details\":\"Random Number Generator returning the blockhash with a fallback behaviour. In case no one called it within the 256 blocks, it returns the previous blockhash. This contract must be used when returning 0 is a worse failure mode than returning another blockhash. Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.\",\"kind\":\"dev\",\"methods\":{\"receiveRandomness(uint256)\":{\"details\":\"Return the random number. If it has not been saved and is still computable compute it.\",\"params\":{\"_block\":\"Block the random number is linked to.\"},\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number.\",\"params\":{\"_block\":\"Block the random number is linked to.\"}}},\"title\":\"Random Number Generator using blockhash with fallback.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/rng/BlockhashRNG.sol\":\"BlockHashRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/rng/BlockhashRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./RNG.sol\\\";\\n\\n/// @title Random Number Generator using blockhash with fallback.\\n/// @author Cl\\u00e9ment Lesaege - \\n/// @dev\\n/// Random Number Generator returning the blockhash with a fallback behaviour.\\n/// In case no one called it within the 256 blocks, it returns the previous blockhash.\\n/// This contract must be used when returning 0 is a worse failure mode than returning another blockhash.\\n/// Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.\\ncontract BlockHashRNG is RNG {\\n mapping(uint256 => uint256) public randomNumbers; // randomNumbers[block] is the random number for this block, 0 otherwise.\\n\\n /// @dev Request a random number.\\n /// @param _block Block the random number is linked to.\\n function requestRandomness(uint256 _block) external override {\\n // nop\\n }\\n\\n /// @dev Return the random number. If it has not been saved and is still computable compute it.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 _block) external override returns (uint256 randomNumber) {\\n randomNumber = randomNumbers[_block];\\n if (randomNumber != 0) {\\n return randomNumber;\\n }\\n\\n if (_block < block.number) {\\n // The random number is not already set and can be.\\n if (blockhash(_block) != 0x0) {\\n // Normal case.\\n randomNumber = uint256(blockhash(_block));\\n } else {\\n // The contract was not called in time. Fallback to returning previous blockhash.\\n randomNumber = uint256(blockhash(block.number - 1));\\n }\\n }\\n randomNumbers[_block] = randomNumber;\\n }\\n}\\n\",\"keccak256\":\"0xbec8950b4a908f498273fb7c678f66ffbe08433009d5161545de9a3369eae1ea\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0x5afe7121f49aebe72218df356bd91b66c2171b9ad15e7945a15a091784291a43\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50610169806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b8181038181111561012d57634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220d8343029f3281984aa61880b071de45f3d714f660c2a6c1973b488429c50c84e64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b8181038181111561012d57634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220d8343029f3281984aa61880b071de45f3d714f660c2a6c1973b488429c50c84e64736f6c63430008120033", - "devdoc": { - "author": "Clément Lesaege - ", - "details": "Random Number Generator returning the blockhash with a fallback behaviour. In case no one called it within the 256 blocks, it returns the previous blockhash. This contract must be used when returning 0 is a worse failure mode than returning another blockhash. Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.", - "kind": "dev", - "methods": { - "receiveRandomness(uint256)": { - "details": "Return the random number. If it has not been saved and is still computable compute it.", - "params": { - "_block": "Block the random number is linked to." - }, - "returns": { - "randomNumber": "The random number or 0 if it is not ready or has not been requested." - } - }, - "requestRandomness(uint256)": { - "details": "Request a random number.", - "params": { - "_block": "Block the random number is linked to." - } - } - }, - "title": "Random Number Generator using blockhash with fallback.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 24139, - "contract": "src/rng/BlockhashRNG.sol:BlockHashRNG", - "label": "randomNumbers", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/ChainlinkRNG.json b/contracts/deployments/arbitrumSepoliaDevnet/ChainlinkRNG.json deleted file mode 100644 index 23e72e422..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/ChainlinkRNG.json +++ /dev/null @@ -1,749 +0,0 @@ -{ - "address": "0x7e40f5aC809521654A9c17e442F2a0a5a4d890FA", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_sortitionModule", - "type": "address" - }, - { - "internalType": "address", - "name": "_vrfCoordinator", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_keyHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_subscriptionId", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "_requestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "_callbackGasLimit", - "type": "uint32" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "have", - "type": "address" - }, - { - "internalType": "address", - "name": "want", - "type": "address" - } - ], - "name": "OnlyCoordinatorCanFulfill", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "have", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "coordinator", - "type": "address" - } - ], - "name": "OnlyOwnerOrCoordinator", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "vrfCoordinator", - "type": "address" - } - ], - "name": "CoordinatorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "randomWord", - "type": "uint256" - } - ], - "name": "RequestFulfilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "RequestSent", - "type": "event" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "callbackGasLimit", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_callbackGasLimit", - "type": "uint32" - } - ], - "name": "changeCallbackGasLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_keyHash", - "type": "bytes32" - } - ], - "name": "changeKeyHash", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_requestConfirmations", - "type": "uint16" - } - ], - "name": "changeRequestConfirmations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_subscriptionId", - "type": "uint256" - } - ], - "name": "changeSubscriptionId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vrfCoordinator", - "type": "address" - } - ], - "name": "changeVrfCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "keyHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastRequestId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "name": "randomNumbers", - "outputs": [ - { - "internalType": "uint256", - "name": "number", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "randomWords", - "type": "uint256[]" - } - ], - "name": "rawFulfillRandomWords", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "receiveRandomness", - "outputs": [ - { - "internalType": "uint256", - "name": "randomNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "requestConfirmations", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "requestRandomness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "s_vrfCoordinator", - "outputs": [ - { - "internalType": "contract IVRFCoordinatorV2Plus", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vrfCoordinator", - "type": "address" - } - ], - "name": "setCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "subscriptionId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x8509b0678c2e8806780c4cb13e9cc9be72b1c4ede2e9b37d5acea3bddf7d1e77", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x7e40f5aC809521654A9c17e442F2a0a5a4d890FA", - "transactionIndex": 1, - "gasUsed": "915546", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xbbf5958e6cce4714693a824e1b49b6f00547cc4cedb1c50a32ab0ae16137768b", - "transactionHash": "0x8509b0678c2e8806780c4cb13e9cc9be72b1c4ede2e9b37d5acea3bddf7d1e77", - "logs": [], - "blockNumber": 175286047, - "cumulativeGasUsed": "915546", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", - "0x1770bdc7eec7771f7ba4ffd640f34260d7f095b79c92d34a5b2551d6f6cfd2be", - "38502597312983100069991953687934627561654236680431968938019951490339399569548", - 200, - 100000 - ], - "numDeployments": 3, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sortitionModule\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_subscriptionId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"randomWord\",\"type\":\"uint256\"}],\"name\":\"RequestFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"RequestSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"callbackGasLimit\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"name\":\"changeCallbackGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"}],\"name\":\"changeKeyHash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"}],\"name\":\"changeRequestConfirmations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_subscriptionId\",\"type\":\"uint256\"}],\"name\":\"changeSubscriptionId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"changeVrfCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"keyHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestConfirmations\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contract IVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"subscriptionId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"RequestFulfilled(uint256,uint256)\":{\"params\":{\"randomWord\":\"The random value answering the request.\",\"requestId\":\"The ID of the request\"}},\"RequestSent(uint256)\":{\"details\":\"Emitted when a request is sent to the VRF Coordinator\",\"params\":{\"requestId\":\"The ID of the request\"}}},\"kind\":\"dev\",\"methods\":{\"changeCallbackGasLimit(uint32)\":{\"details\":\"Changes the callback gas limit of the contract.\",\"params\":{\"_callbackGasLimit\":\"The new callback gas limit.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"changeKeyHash(bytes32)\":{\"details\":\"Changes the key hash of the contract.\",\"params\":{\"_keyHash\":\"The new key hash.\"}},\"changeRequestConfirmations(uint16)\":{\"details\":\"Changes the request confirmations of the contract.\",\"params\":{\"_requestConfirmations\":\"The new request confirmations.\"}},\"changeSortitionModule(address)\":{\"details\":\"Changes the sortition module of the contract.\",\"params\":{\"_sortitionModule\":\"The new sortition module.\"}},\"changeSubscriptionId(uint256)\":{\"details\":\"Changes the subscription ID of the contract.\",\"params\":{\"_subscriptionId\":\"The new subscription ID.\"}},\"changeVrfCoordinator(address)\":{\"details\":\"Changes the VRF Coordinator of the contract.\",\"params\":{\"_vrfCoordinator\":\"The new VRF Coordinator.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number\",\"params\":{\"_callbackGasLimit\":\"The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function.\",\"_governor\":\"The Governor of the contract.\",\"_keyHash\":\"The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).\",\"_requestConfirmations\":\"How many confirmations the Chainlink node should wait before responding.\",\"_sortitionModule\":\"The address of the SortitionModule contract.\",\"_subscriptionId\":\"The unique identifier of the subscription used for funding requests.\",\"_vrfCoordinator\":\"The address of the VRFCoordinator contract.\"}},\"receiveRandomness(uint256)\":{\"details\":\"Return the random number.\",\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number. SortitionModule only.\"}},\"title\":\"Random Number Generator that uses Chainlink VRF v2.5 https://blog.chain.link/introducing-vrf-v2-5/\",\"version\":1},\"userdoc\":{\"events\":{\"RequestFulfilled(uint256,uint256)\":{\"notice\":\"Emitted when a request has been fulfilled.\"}},\"kind\":\"user\",\"methods\":{\"acceptOwnership()\":{\"notice\":\"Allows an ownership transfer to be completed by the recipient.\"},\"owner()\":{\"notice\":\"Get the current owner\"},\"setCoordinator(address)\":{\"notice\":\"Sets the VRF Coordinator addressThis method should only be callable by the coordinator or contract owner\"},\"transferOwnership(address)\":{\"notice\":\"Allows an owner to begin transferring ownership to a new address.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/rng/ChainlinkRNG.sol\":\"ChainlinkRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {ConfirmedOwnerWithProposal} from \\\"./ConfirmedOwnerWithProposal.sol\\\";\\n\\n/// @title The ConfirmedOwner contract\\n/// @notice A contract with helpers for basic contract ownership.\\ncontract ConfirmedOwner is ConfirmedOwnerWithProposal {\\n constructor(address newOwner) ConfirmedOwnerWithProposal(newOwner, address(0)) {}\\n}\\n\",\"keccak256\":\"0xdcb0e9135ddbe71ee27ba99fa06656960c66c964cf2ecb29696da1c1427d9861\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwnerWithProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {IOwnable} from \\\"../interfaces/IOwnable.sol\\\";\\n\\n/// @title The ConfirmedOwner contract\\n/// @notice A contract with helpers for basic contract ownership.\\ncontract ConfirmedOwnerWithProposal is IOwnable {\\n address private s_owner;\\n address private s_pendingOwner;\\n\\n event OwnershipTransferRequested(address indexed from, address indexed to);\\n event OwnershipTransferred(address indexed from, address indexed to);\\n\\n constructor(address newOwner, address pendingOwner) {\\n // solhint-disable-next-line gas-custom-errors\\n require(newOwner != address(0), \\\"Cannot set owner to zero\\\");\\n\\n s_owner = newOwner;\\n if (pendingOwner != address(0)) {\\n _transferOwnership(pendingOwner);\\n }\\n }\\n\\n /// @notice Allows an owner to begin transferring ownership to a new address.\\n function transferOwnership(address to) public override onlyOwner {\\n _transferOwnership(to);\\n }\\n\\n /// @notice Allows an ownership transfer to be completed by the recipient.\\n function acceptOwnership() external override {\\n // solhint-disable-next-line gas-custom-errors\\n require(msg.sender == s_pendingOwner, \\\"Must be proposed owner\\\");\\n\\n address oldOwner = s_owner;\\n s_owner = msg.sender;\\n s_pendingOwner = address(0);\\n\\n emit OwnershipTransferred(oldOwner, msg.sender);\\n }\\n\\n /// @notice Get the current owner\\n function owner() public view override returns (address) {\\n return s_owner;\\n }\\n\\n /// @notice validate, transfer ownership, and emit relevant events\\n function _transferOwnership(address to) private {\\n // solhint-disable-next-line gas-custom-errors\\n require(to != msg.sender, \\\"Cannot transfer to self\\\");\\n\\n s_pendingOwner = to;\\n\\n emit OwnershipTransferRequested(s_owner, to);\\n }\\n\\n /// @notice validate access\\n function _validateOwnership() internal view {\\n // solhint-disable-next-line gas-custom-errors\\n require(msg.sender == s_owner, \\\"Only callable by owner\\\");\\n }\\n\\n /// @notice Reverts if called by anyone other than the contract owner.\\n modifier onlyOwner() {\\n _validateOwnership();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x2422a055657a87e98be61f8f31abb1824ec50fd0f73949f4e3c6ac877efb6da8\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/shared/interfaces/IOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IOwnable {\\n function owner() external returns (address);\\n\\n function transferOwnership(address recipient) external;\\n\\n function acceptOwnership() external;\\n}\\n\",\"keccak256\":\"0x885de72b7b4e4f1bf8ba817a3f2bcc37fd9022d342c4ce76782151c30122d767\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport {IVRFCoordinatorV2Plus} from \\\"./interfaces/IVRFCoordinatorV2Plus.sol\\\";\\nimport {IVRFMigratableConsumerV2Plus} from \\\"./interfaces/IVRFMigratableConsumerV2Plus.sol\\\";\\nimport {ConfirmedOwner} from \\\"../../shared/access/ConfirmedOwner.sol\\\";\\n\\n/** ****************************************************************************\\n * @notice Interface for contracts using VRF randomness\\n * *****************************************************************************\\n * @dev PURPOSE\\n *\\n * @dev Reggie the Random Oracle (not his real job) wants to provide randomness\\n * @dev to Vera the verifier in such a way that Vera can be sure he's not\\n * @dev making his output up to suit himself. Reggie provides Vera a public key\\n * @dev to which he knows the secret key. Each time Vera provides a seed to\\n * @dev Reggie, he gives back a value which is computed completely\\n * @dev deterministically from the seed and the secret key.\\n *\\n * @dev Reggie provides a proof by which Vera can verify that the output was\\n * @dev correctly computed once Reggie tells it to her, but without that proof,\\n * @dev the output is indistinguishable to her from a uniform random sample\\n * @dev from the output space.\\n *\\n * @dev The purpose of this contract is to make it easy for unrelated contracts\\n * @dev to talk to Vera the verifier about the work Reggie is doing, to provide\\n * @dev simple access to a verifiable source of randomness. It ensures 2 things:\\n * @dev 1. The fulfillment came from the VRFCoordinatorV2Plus.\\n * @dev 2. The consumer contract implements fulfillRandomWords.\\n * *****************************************************************************\\n * @dev USAGE\\n *\\n * @dev Calling contracts must inherit from VRFConsumerBaseV2Plus, and can\\n * @dev initialize VRFConsumerBaseV2Plus's attributes in their constructor as\\n * @dev shown:\\n *\\n * @dev contract VRFConsumerV2Plus is VRFConsumerBaseV2Plus {\\n * @dev constructor(, address _vrfCoordinator, address _subOwner)\\n * @dev VRFConsumerBaseV2Plus(_vrfCoordinator, _subOwner) public {\\n * @dev \\n * @dev }\\n * @dev }\\n *\\n * @dev The oracle will have given you an ID for the VRF keypair they have\\n * @dev committed to (let's call it keyHash). Create a subscription, fund it\\n * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface\\n * @dev subscription management functions).\\n * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,\\n * @dev callbackGasLimit, numWords, extraArgs),\\n * @dev see (IVRFCoordinatorV2Plus for a description of the arguments).\\n *\\n * @dev Once the VRFCoordinatorV2Plus has received and validated the oracle's response\\n * @dev to your request, it will call your contract's fulfillRandomWords method.\\n *\\n * @dev The randomness argument to fulfillRandomWords is a set of random words\\n * @dev generated from your requestId and the blockHash of the request.\\n *\\n * @dev If your contract could have concurrent requests open, you can use the\\n * @dev requestId returned from requestRandomWords to track which response is associated\\n * @dev with which randomness request.\\n * @dev See \\\"SECURITY CONSIDERATIONS\\\" for principles to keep in mind,\\n * @dev if your contract could have multiple requests in flight simultaneously.\\n *\\n * @dev Colliding `requestId`s are cryptographically impossible as long as seeds\\n * @dev differ.\\n *\\n * *****************************************************************************\\n * @dev SECURITY CONSIDERATIONS\\n *\\n * @dev A method with the ability to call your fulfillRandomness method directly\\n * @dev could spoof a VRF response with any random value, so it's critical that\\n * @dev it cannot be directly called by anything other than this base contract\\n * @dev (specifically, by the VRFConsumerBaseV2Plus.rawFulfillRandomness method).\\n *\\n * @dev For your users to trust that your contract's random behavior is free\\n * @dev from malicious interference, it's best if you can write it so that all\\n * @dev behaviors implied by a VRF response are executed *during* your\\n * @dev fulfillRandomness method. If your contract must store the response (or\\n * @dev anything derived from it) and use it later, you must ensure that any\\n * @dev user-significant behavior which depends on that stored value cannot be\\n * @dev manipulated by a subsequent VRF request.\\n *\\n * @dev Similarly, both miners and the VRF oracle itself have some influence\\n * @dev over the order in which VRF responses appear on the blockchain, so if\\n * @dev your contract could have multiple VRF requests in flight simultaneously,\\n * @dev you must ensure that the order in which the VRF responses arrive cannot\\n * @dev be used to manipulate your contract's user-significant behavior.\\n *\\n * @dev Since the block hash of the block which contains the requestRandomness\\n * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful\\n * @dev miner could, in principle, fork the blockchain to evict the block\\n * @dev containing the request, forcing the request to be included in a\\n * @dev different block with a different hash, and therefore a different input\\n * @dev to the VRF. However, such an attack would incur a substantial economic\\n * @dev cost. This cost scales with the number of blocks the VRF oracle waits\\n * @dev until it calls responds to a request. It is for this reason that\\n * @dev that you can signal to an oracle you'd like them to wait longer before\\n * @dev responding to the request (however this is not enforced in the contract\\n * @dev and so remains effective only in the case of unmodified oracle software).\\n */\\nabstract contract VRFConsumerBaseV2Plus is IVRFMigratableConsumerV2Plus, ConfirmedOwner {\\n error OnlyCoordinatorCanFulfill(address have, address want);\\n error OnlyOwnerOrCoordinator(address have, address owner, address coordinator);\\n error ZeroAddress();\\n\\n // s_vrfCoordinator should be used by consumers to make requests to vrfCoordinator\\n // so that coordinator reference is updated after migration\\n IVRFCoordinatorV2Plus public s_vrfCoordinator;\\n\\n /**\\n * @param _vrfCoordinator address of VRFCoordinator contract\\n */\\n constructor(address _vrfCoordinator) ConfirmedOwner(msg.sender) {\\n if (_vrfCoordinator == address(0)) {\\n revert ZeroAddress();\\n }\\n s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);\\n }\\n\\n /**\\n * @notice fulfillRandomness handles the VRF response. Your contract must\\n * @notice implement it. See \\\"SECURITY CONSIDERATIONS\\\" above for important\\n * @notice principles to keep in mind when implementing your fulfillRandomness\\n * @notice method.\\n *\\n * @dev VRFConsumerBaseV2Plus expects its subcontracts to have a method with this\\n * @dev signature, and will call it once it has verified the proof\\n * @dev associated with the randomness. (It is triggered via a call to\\n * @dev rawFulfillRandomness, below.)\\n *\\n * @param requestId The Id initially returned by requestRandomness\\n * @param randomWords the VRF output expanded to the requested number of words\\n */\\n // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore\\n function fulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) internal virtual;\\n\\n // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF\\n // proof. rawFulfillRandomness then calls fulfillRandomness, after validating\\n // the origin of the call\\n function rawFulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) external {\\n if (msg.sender != address(s_vrfCoordinator)) {\\n revert OnlyCoordinatorCanFulfill(msg.sender, address(s_vrfCoordinator));\\n }\\n fulfillRandomWords(requestId, randomWords);\\n }\\n\\n /**\\n * @inheritdoc IVRFMigratableConsumerV2Plus\\n */\\n function setCoordinator(address _vrfCoordinator) external override onlyOwnerOrCoordinator {\\n if (_vrfCoordinator == address(0)) {\\n revert ZeroAddress();\\n }\\n s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);\\n\\n emit CoordinatorSet(_vrfCoordinator);\\n }\\n\\n modifier onlyOwnerOrCoordinator() {\\n if (msg.sender != owner() && msg.sender != address(s_vrfCoordinator)) {\\n revert OnlyOwnerOrCoordinator(msg.sender, owner(), address(s_vrfCoordinator));\\n }\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x0c92838396c5abe72754ebeae526a0434dd53fdaf63e6b98111aebd6114cfcc2\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {VRFV2PlusClient} from \\\"../libraries/VRFV2PlusClient.sol\\\";\\nimport {IVRFSubscriptionV2Plus} from \\\"./IVRFSubscriptionV2Plus.sol\\\";\\n\\n// Interface that enables consumers of VRFCoordinatorV2Plus to be future-proof for upgrades\\n// This interface is supported by subsequent versions of VRFCoordinatorV2Plus\\ninterface IVRFCoordinatorV2Plus is IVRFSubscriptionV2Plus {\\n /**\\n * @notice Request a set of random words.\\n * @param req - a struct containing following fields for randomness request:\\n * keyHash - Corresponds to a particular oracle job which uses\\n * that key for generating the VRF proof. Different keyHash's have different gas price\\n * ceilings, so you can select a specific one to bound your maximum per request cost.\\n * subId - The ID of the VRF subscription. Must be funded\\n * with the minimum subscription balance required for the selected keyHash.\\n * requestConfirmations - How many blocks you'd like the\\n * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS\\n * for why you may want to request more. The acceptable range is\\n * [minimumRequestBlockConfirmations, 200].\\n * callbackGasLimit - How much gas you'd like to receive in your\\n * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords\\n * may be slightly less than this amount because of gas used calling the function\\n * (argument decoding etc.), so you may need to request slightly more than you expect\\n * to have inside fulfillRandomWords. The acceptable range is\\n * [0, maxGasLimit]\\n * numWords - The number of uint256 random values you'd like to receive\\n * in your fulfillRandomWords callback. Note these numbers are expanded in a\\n * secure way by the VRFCoordinator from a single random value supplied by the oracle.\\n * extraArgs - abi-encoded extra args\\n * @return requestId - A unique identifier of the request. Can be used to match\\n * a request to a response in fulfillRandomWords.\\n */\\n function requestRandomWords(VRFV2PlusClient.RandomWordsRequest calldata req) external returns (uint256 requestId);\\n}\\n\",\"keccak256\":\"0x7dca2a64690ddd95ee05e422e1f61e7c1d701aaf5be1390ae12e9bd144266c36\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFMigratableConsumerV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @notice The IVRFMigratableConsumerV2Plus interface defines the\\n/// @notice method required to be implemented by all V2Plus consumers.\\n/// @dev This interface is designed to be used in VRFConsumerBaseV2Plus.\\ninterface IVRFMigratableConsumerV2Plus {\\n event CoordinatorSet(address vrfCoordinator);\\n\\n /// @notice Sets the VRF Coordinator address\\n /// @notice This method should only be callable by the coordinator or contract owner\\n function setCoordinator(address vrfCoordinator) external;\\n}\\n\",\"keccak256\":\"0x8be8744e3b8380dc85354cf110e8caef8f394266e79120ad675a7da835ed2a85\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFSubscriptionV2Plus.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @notice The IVRFSubscriptionV2Plus interface defines the subscription\\n/// @notice related methods implemented by the V2Plus coordinator.\\ninterface IVRFSubscriptionV2Plus {\\n /**\\n * @notice Add a consumer to a VRF subscription.\\n * @param subId - ID of the subscription\\n * @param consumer - New consumer which can use the subscription\\n */\\n function addConsumer(uint256 subId, address consumer) external;\\n\\n /**\\n * @notice Remove a consumer from a VRF subscription.\\n * @param subId - ID of the subscription\\n * @param consumer - Consumer to remove from the subscription\\n */\\n function removeConsumer(uint256 subId, address consumer) external;\\n\\n /**\\n * @notice Cancel a subscription\\n * @param subId - ID of the subscription\\n * @param to - Where to send the remaining LINK to\\n */\\n function cancelSubscription(uint256 subId, address to) external;\\n\\n /**\\n * @notice Accept subscription owner transfer.\\n * @param subId - ID of the subscription\\n * @dev will revert if original owner of subId has\\n * not requested that msg.sender become the new owner.\\n */\\n function acceptSubscriptionOwnerTransfer(uint256 subId) external;\\n\\n /**\\n * @notice Request subscription owner transfer.\\n * @param subId - ID of the subscription\\n * @param newOwner - proposed new owner of the subscription\\n */\\n function requestSubscriptionOwnerTransfer(uint256 subId, address newOwner) external;\\n\\n /**\\n * @notice Create a VRF subscription.\\n * @return subId - A unique subscription id.\\n * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.\\n * @dev Note to fund the subscription with LINK, use transferAndCall. For example\\n * @dev LINKTOKEN.transferAndCall(\\n * @dev address(COORDINATOR),\\n * @dev amount,\\n * @dev abi.encode(subId));\\n * @dev Note to fund the subscription with Native, use fundSubscriptionWithNative. Be sure\\n * @dev to send Native with the call, for example:\\n * @dev COORDINATOR.fundSubscriptionWithNative{value: amount}(subId);\\n */\\n function createSubscription() external returns (uint256 subId);\\n\\n /**\\n * @notice Get a VRF subscription.\\n * @param subId - ID of the subscription\\n * @return balance - LINK balance of the subscription in juels.\\n * @return nativeBalance - native balance of the subscription in wei.\\n * @return reqCount - Requests count of subscription.\\n * @return owner - owner of the subscription.\\n * @return consumers - list of consumer address which are able to use this subscription.\\n */\\n function getSubscription(\\n uint256 subId\\n )\\n external\\n view\\n returns (uint96 balance, uint96 nativeBalance, uint64 reqCount, address owner, address[] memory consumers);\\n\\n /*\\n * @notice Check to see if there exists a request commitment consumers\\n * for all consumers and keyhashes for a given sub.\\n * @param subId - ID of the subscription\\n * @return true if there exists at least one unfulfilled request for the subscription, false\\n * otherwise.\\n */\\n function pendingRequestExists(uint256 subId) external view returns (bool);\\n\\n /**\\n * @notice Paginate through all active VRF subscriptions.\\n * @param startIndex index of the subscription to start from\\n * @param maxCount maximum number of subscriptions to return, 0 to return all\\n * @dev the order of IDs in the list is **not guaranteed**, therefore, if making successive calls, one\\n * @dev should consider keeping the blockheight constant to ensure a holistic picture of the contract state\\n */\\n function getActiveSubscriptionIds(uint256 startIndex, uint256 maxCount) external view returns (uint256[] memory);\\n\\n /**\\n * @notice Fund a subscription with native.\\n * @param subId - ID of the subscription\\n * @notice This method expects msg.value to be greater than or equal to 0.\\n */\\n function fundSubscriptionWithNative(uint256 subId) external payable;\\n}\\n\",\"keccak256\":\"0x85b348297ce36794e3bf97a47c001fc216bd0ee243e91514a7b395f3fcd189b0\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n// End consumer library.\\nlibrary VRFV2PlusClient {\\n // extraArgs will evolve to support new features\\n bytes4 public constant EXTRA_ARGS_V1_TAG = bytes4(keccak256(\\\"VRF ExtraArgsV1\\\"));\\n struct ExtraArgsV1 {\\n bool nativePayment;\\n }\\n\\n struct RandomWordsRequest {\\n bytes32 keyHash;\\n uint256 subId;\\n uint16 requestConfirmations;\\n uint32 callbackGasLimit;\\n uint32 numWords;\\n bytes extraArgs;\\n }\\n\\n function _argsToBytes(ExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {\\n return abi.encodeWithSelector(EXTRA_ARGS_V1_TAG, extraArgs);\\n }\\n}\\n\",\"keccak256\":\"0x839ad7a737ef18147b518b4ec3cbaf4a49dc994db65cf8369ed4e69d169a98a6\",\"license\":\"MIT\"},\"src/rng/ChainlinkRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {VRFConsumerBaseV2Plus, IVRFCoordinatorV2Plus} from \\\"@chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol\\\";\\nimport {VRFV2PlusClient} from \\\"@chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol\\\";\\n\\nimport \\\"./RNG.sol\\\";\\n\\n/// @title Random Number Generator that uses Chainlink VRF v2.5\\n/// https://blog.chain.link/introducing-vrf-v2-5/\\ncontract ChainlinkRNG is RNG, VRFConsumerBaseV2Plus {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The address that can withdraw funds.\\n address public sortitionModule; // The address of the SortitionModule.\\n bytes32 public keyHash; // The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).\\n uint256 public subscriptionId; // The unique identifier of the subscription used for funding requests.\\n uint16 public requestConfirmations; // How many confirmations the Chainlink node should wait before responding.\\n // 22 bytes remaining in slot\\n uint32 public callbackGasLimit; // Gas limit for the Chainlink callback.\\n uint256 public lastRequestId; // The last request ID.\\n mapping(uint256 requestId => uint256 number) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a request is sent to the VRF Coordinator\\n /// @param requestId The ID of the request\\n event RequestSent(uint256 indexed requestId);\\n\\n /// Emitted when a request has been fulfilled.\\n /// @param requestId The ID of the request\\n /// @param randomWord The random value answering the request.\\n event RequestFulfilled(uint256 indexed requestId, uint256 randomWord);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor only\\\");\\n _;\\n }\\n\\n modifier onlyBySortitionModule() {\\n require(sortitionModule == msg.sender, \\\"SortitionModule only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n /// @param _governor The Governor of the contract.\\n /// @param _sortitionModule The address of the SortitionModule contract.\\n /// @param _vrfCoordinator The address of the VRFCoordinator contract.\\n /// @param _keyHash The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).\\n /// @param _subscriptionId The unique identifier of the subscription used for funding requests.\\n /// @param _requestConfirmations How many confirmations the Chainlink node should wait before responding.\\n /// @param _callbackGasLimit The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function.\\n /// @dev https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number\\n constructor(\\n address _governor,\\n address _sortitionModule,\\n address _vrfCoordinator,\\n bytes32 _keyHash,\\n uint256 _subscriptionId,\\n uint16 _requestConfirmations,\\n uint32 _callbackGasLimit\\n ) VRFConsumerBaseV2Plus(_vrfCoordinator) {\\n governor = _governor;\\n sortitionModule = _sortitionModule;\\n keyHash = _keyHash;\\n subscriptionId = _subscriptionId;\\n requestConfirmations = _requestConfirmations;\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the sortition module of the contract.\\n /// @param _sortitionModule The new sortition module.\\n function changeSortitionModule(address _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Changes the VRF Coordinator of the contract.\\n /// @param _vrfCoordinator The new VRF Coordinator.\\n function changeVrfCoordinator(address _vrfCoordinator) external onlyByGovernor {\\n s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);\\n emit CoordinatorSet(_vrfCoordinator);\\n }\\n\\n /// @dev Changes the key hash of the contract.\\n /// @param _keyHash The new key hash.\\n function changeKeyHash(bytes32 _keyHash) external onlyByGovernor {\\n keyHash = _keyHash;\\n }\\n\\n /// @dev Changes the subscription ID of the contract.\\n /// @param _subscriptionId The new subscription ID.\\n function changeSubscriptionId(uint256 _subscriptionId) external onlyByGovernor {\\n subscriptionId = _subscriptionId;\\n }\\n\\n /// @dev Changes the request confirmations of the contract.\\n /// @param _requestConfirmations The new request confirmations.\\n function changeRequestConfirmations(uint16 _requestConfirmations) external onlyByGovernor {\\n requestConfirmations = _requestConfirmations;\\n }\\n\\n /// @dev Changes the callback gas limit of the contract.\\n /// @param _callbackGasLimit The new callback gas limit.\\n function changeCallbackGasLimit(uint32 _callbackGasLimit) external onlyByGovernor {\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Request a random number. SortitionModule only.\\n function requestRandomness(uint256 /*_block*/) external override onlyBySortitionModule {\\n // Will revert if subscription is not set and funded.\\n uint256 requestId = s_vrfCoordinator.requestRandomWords(\\n VRFV2PlusClient.RandomWordsRequest({\\n keyHash: keyHash,\\n subId: subscriptionId,\\n requestConfirmations: requestConfirmations,\\n callbackGasLimit: callbackGasLimit,\\n numWords: 1,\\n extraArgs: VRFV2PlusClient._argsToBytes(\\n // Set nativePayment to true to pay for VRF requests with ETH instead of LINK\\n VRFV2PlusClient.ExtraArgsV1({nativePayment: true})\\n )\\n })\\n );\\n lastRequestId = requestId;\\n emit RequestSent(requestId);\\n }\\n\\n /// @dev Callback function called by the VRF Coordinator when the random value is generated.\\n /// @param _requestId The ID of the request.\\n /// @param _randomWords The random values answering the request.\\n function fulfillRandomWords(uint256 _requestId, uint256[] calldata _randomWords) internal override {\\n // Access control is handled by the parent VRFCoordinator.rawFulfillRandomWords()\\n randomNumbers[_requestId] = _randomWords[0];\\n emit RequestFulfilled(_requestId, _randomWords[0]);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Return the random number.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 /*_block*/) external view override returns (uint256 randomNumber) {\\n randomNumber = randomNumbers[lastRequestId];\\n }\\n}\\n\",\"keccak256\":\"0xf3731ed1ab167cc631d3223c61407e9dbced76bc993e95a621939400ff4d04f0\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0x0f6a8fb72ed7e5a602dc0aaf4f3a037ba9f1765b79b6320604ff810d578af2cf\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610f48380380610f4883398101604081905261002f9161021f565b8433806000816100865760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156100b6576100b68161015a565b5050506001600160a01b0381166100e05760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b03199081166001600160a01b03938416179091556003805482169983169990991790985560048054909816961695909517909555600591909155600655506007805461ffff90931665ffffffffffff19909316929092176201000063ffffffff909216919091021790556102ae565b336001600160a01b038216036101b25760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161007d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b038116811461021a57600080fd5b919050565b600080600080600080600060e0888a03121561023a57600080fd5b61024388610203565b965061025160208901610203565b955061025f60408901610203565b9450606088015193506080880151925060a088015161ffff8116811461028457600080fd5b60c089015190925063ffffffff8116811461029e57600080fd5b8091505092959891949750929550565b610c8b806102bd6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c806379ba5097116100c3578063e4c0aaf41161007c578063e4c0aaf4146102e5578063e86a51cb146102f8578063f2fde38b1461030b578063f50d390d1461031e578063f9f5dd9114610331578063fc2a88c31461034457600080fd5b806379ba5097146102725780638da5cb5b1461027a5780638ea981171461028b5780639eccacf61461029e578063b0049637146102b1578063b0fb162f146102c457600080fd5b80632e1daf2f116101155780632e1daf2f146101fd5780632f68f4821461021057806339b1e245146102235780635257cd901461023657806361728f39146102565780637363ae1f1461025f57600080fd5b806309c1ba2e146101525780630c340a241461016e57806313cf9054146101995780631fe543e3146101bd57806324f74697146101d2575b600080fd5b61015b60065481565b6040519081526020015b60405180910390f35b600354610181906001600160a01b031681565b6040516001600160a01b039091168152602001610165565b61015b6101a7366004610a4f565b5060085460009081526009602052604090205490565b6101d06101cb366004610a68565b61034d565b005b6007546101e89062010000900463ffffffff1681565b60405163ffffffff9091168152602001610165565b600454610181906001600160a01b031681565b6101d061021e366004610a4f565b6103a2565b6101d0610231366004610a4f565b6103d1565b61015b610244366004610a4f565b60096020526000908152604090205481565b61015b60055481565b6101d061026d366004610a4f565b610400565b6101d061055b565b6000546001600160a01b0316610181565b6101d0610299366004610ae9565b610605565b600254610181906001600160a01b031681565b6101d06102bf366004610ae9565b6106f7565b6007546102d29061ffff1681565b60405161ffff9091168152602001610165565b6101d06102f3366004610ae9565b610743565b6101d0610306366004610b19565b61078f565b6101d0610319366004610ae9565b6107dd565b6101d061032c366004610b3f565b6107f1565b6101d061033f366004610ae9565b610833565b61015b60085481565b6002546001600160a01b031633146103925760025460405163073e64fd60e21b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b61039d83838361085d565b505050565b6003546001600160a01b031633146103cc5760405162461bcd60e51b815260040161038990610b63565b600555565b6003546001600160a01b031633146103fb5760405162461bcd60e51b815260040161038990610b63565b600655565b6004546001600160a01b031633146104515760405162461bcd60e51b8152602060048201526014602482015273536f72746974696f6e4d6f64756c65206f6e6c7960601b6044820152606401610389565b6002546040805160c081018252600554815260065460208083019190915260075461ffff81168385015262010000900463ffffffff16606083015260016080830181905283519182019093529182526000926001600160a01b031691639b1c385e919060a08201906104c2906108e6565b8152506040518263ffffffff1660e01b81526004016104e19190610b8a565b6020604051808303816000875af1158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190610c26565b600881905560405190915081907f0cd21a41891ff04ecd9a8754bec97e2fb85d2a4e7694329d4dc364c796f23d0690600090a25050565b6001546001600160a01b031633146105ae5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610389565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000546001600160a01b0316331480159061062b57506002546001600160a01b03163314155b1561067c57336106436000546001600160a01b031690565b60025460405163061db9c160e01b81526001600160a01b0393841660048201529183166024830152919091166044820152606401610389565b6001600160a01b0381166106a35760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b6003546001600160a01b031633146107215760405162461bcd60e51b815260040161038990610b63565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331461076d5760405162461bcd60e51b815260040161038990610b63565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031633146107b95760405162461bcd60e51b815260040161038990610b63565b6007805463ffffffff909216620100000265ffffffff000019909216919091179055565b6107e5610957565b6107ee816109ac565b50565b6003546001600160a01b0316331461081b5760405162461bcd60e51b815260040161038990610b63565b6007805461ffff191661ffff92909216919091179055565b6003546001600160a01b031633146106a35760405162461bcd60e51b815260040161038990610b63565b8181600081811061087057610870610c3f565b905060200201356009600085815260200190815260200160002081905550827f5c69e7026b653d8606b5613bb00fd8c4b0504b1cbe8db600c406faac180924d5838360008181106108c3576108c3610c3f565b905060200201356040516108d991815260200190565b60405180910390a2505050565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161091f91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b6000546001600160a01b031633146109aa5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610389565b565b336001600160a01b038216036109fe5760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610389565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215610a6157600080fd5b5035919050565b600080600060408486031215610a7d57600080fd5b83359250602084013567ffffffffffffffff811115610a9b57600080fd5b8401601f81018613610aac57600080fd5b803567ffffffffffffffff811115610ac357600080fd5b8660208260051b8401011115610ad857600080fd5b939660209190910195509293505050565b600060208284031215610afb57600080fd5b81356001600160a01b0381168114610b1257600080fd5b9392505050565b600060208284031215610b2b57600080fd5b813563ffffffff81168114610b1257600080fd5b600060208284031215610b5157600080fd5b813561ffff81168114610b1257600080fd5b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b60208152815160208201526020820151604082015261ffff604083015116606082015263ffffffff606083015116608082015263ffffffff60808301511660a0820152600060a083015160c08084015280518060e085015260005b81811015610c03576020818401810151610100878401015201610be5565b5060006101008286010152610100601f19601f8301168501019250505092915050565b600060208284031215610c3857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220f4b2ae7146a32f0fc33c7584f1c5b3aabdd589295b6cd609697aa860d6d5e09d64736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c806379ba5097116100c3578063e4c0aaf41161007c578063e4c0aaf4146102e5578063e86a51cb146102f8578063f2fde38b1461030b578063f50d390d1461031e578063f9f5dd9114610331578063fc2a88c31461034457600080fd5b806379ba5097146102725780638da5cb5b1461027a5780638ea981171461028b5780639eccacf61461029e578063b0049637146102b1578063b0fb162f146102c457600080fd5b80632e1daf2f116101155780632e1daf2f146101fd5780632f68f4821461021057806339b1e245146102235780635257cd901461023657806361728f39146102565780637363ae1f1461025f57600080fd5b806309c1ba2e146101525780630c340a241461016e57806313cf9054146101995780631fe543e3146101bd57806324f74697146101d2575b600080fd5b61015b60065481565b6040519081526020015b60405180910390f35b600354610181906001600160a01b031681565b6040516001600160a01b039091168152602001610165565b61015b6101a7366004610a4f565b5060085460009081526009602052604090205490565b6101d06101cb366004610a68565b61034d565b005b6007546101e89062010000900463ffffffff1681565b60405163ffffffff9091168152602001610165565b600454610181906001600160a01b031681565b6101d061021e366004610a4f565b6103a2565b6101d0610231366004610a4f565b6103d1565b61015b610244366004610a4f565b60096020526000908152604090205481565b61015b60055481565b6101d061026d366004610a4f565b610400565b6101d061055b565b6000546001600160a01b0316610181565b6101d0610299366004610ae9565b610605565b600254610181906001600160a01b031681565b6101d06102bf366004610ae9565b6106f7565b6007546102d29061ffff1681565b60405161ffff9091168152602001610165565b6101d06102f3366004610ae9565b610743565b6101d0610306366004610b19565b61078f565b6101d0610319366004610ae9565b6107dd565b6101d061032c366004610b3f565b6107f1565b6101d061033f366004610ae9565b610833565b61015b60085481565b6002546001600160a01b031633146103925760025460405163073e64fd60e21b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b61039d83838361085d565b505050565b6003546001600160a01b031633146103cc5760405162461bcd60e51b815260040161038990610b63565b600555565b6003546001600160a01b031633146103fb5760405162461bcd60e51b815260040161038990610b63565b600655565b6004546001600160a01b031633146104515760405162461bcd60e51b8152602060048201526014602482015273536f72746974696f6e4d6f64756c65206f6e6c7960601b6044820152606401610389565b6002546040805160c081018252600554815260065460208083019190915260075461ffff81168385015262010000900463ffffffff16606083015260016080830181905283519182019093529182526000926001600160a01b031691639b1c385e919060a08201906104c2906108e6565b8152506040518263ffffffff1660e01b81526004016104e19190610b8a565b6020604051808303816000875af1158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190610c26565b600881905560405190915081907f0cd21a41891ff04ecd9a8754bec97e2fb85d2a4e7694329d4dc364c796f23d0690600090a25050565b6001546001600160a01b031633146105ae5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610389565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000546001600160a01b0316331480159061062b57506002546001600160a01b03163314155b1561067c57336106436000546001600160a01b031690565b60025460405163061db9c160e01b81526001600160a01b0393841660048201529183166024830152919091166044820152606401610389565b6001600160a01b0381166106a35760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be69060200160405180910390a150565b6003546001600160a01b031633146107215760405162461bcd60e51b815260040161038990610b63565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331461076d5760405162461bcd60e51b815260040161038990610b63565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031633146107b95760405162461bcd60e51b815260040161038990610b63565b6007805463ffffffff909216620100000265ffffffff000019909216919091179055565b6107e5610957565b6107ee816109ac565b50565b6003546001600160a01b0316331461081b5760405162461bcd60e51b815260040161038990610b63565b6007805461ffff191661ffff92909216919091179055565b6003546001600160a01b031633146106a35760405162461bcd60e51b815260040161038990610b63565b8181600081811061087057610870610c3f565b905060200201356009600085815260200190815260200160002081905550827f5c69e7026b653d8606b5613bb00fd8c4b0504b1cbe8db600c406faac180924d5838360008181106108c3576108c3610c3f565b905060200201356040516108d991815260200190565b60405180910390a2505050565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161091f91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b6000546001600160a01b031633146109aa5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610389565b565b336001600160a01b038216036109fe5760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610389565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215610a6157600080fd5b5035919050565b600080600060408486031215610a7d57600080fd5b83359250602084013567ffffffffffffffff811115610a9b57600080fd5b8401601f81018613610aac57600080fd5b803567ffffffffffffffff811115610ac357600080fd5b8660208260051b8401011115610ad857600080fd5b939660209190910195509293505050565b600060208284031215610afb57600080fd5b81356001600160a01b0381168114610b1257600080fd5b9392505050565b600060208284031215610b2b57600080fd5b813563ffffffff81168114610b1257600080fd5b600060208284031215610b5157600080fd5b813561ffff81168114610b1257600080fd5b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b60208152815160208201526020820151604082015261ffff604083015116606082015263ffffffff606083015116608082015263ffffffff60808301511660a0820152600060a083015160c08084015280518060e085015260005b81811015610c03576020818401810151610100878401015201610be5565b5060006101008286010152610100601f19601f8301168501019250505092915050565b600060208284031215610c3857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220f4b2ae7146a32f0fc33c7584f1c5b3aabdd589295b6cd609697aa860d6d5e09d64736f6c634300081c0033", - "devdoc": { - "events": { - "RequestFulfilled(uint256,uint256)": { - "params": { - "randomWord": "The random value answering the request.", - "requestId": "The ID of the request" - } - }, - "RequestSent(uint256)": { - "details": "Emitted when a request is sent to the VRF Coordinator", - "params": { - "requestId": "The ID of the request" - } - } - }, - "kind": "dev", - "methods": { - "changeCallbackGasLimit(uint32)": { - "details": "Changes the callback gas limit of the contract.", - "params": { - "_callbackGasLimit": "The new callback gas limit." - } - }, - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "changeKeyHash(bytes32)": { - "details": "Changes the key hash of the contract.", - "params": { - "_keyHash": "The new key hash." - } - }, - "changeRequestConfirmations(uint16)": { - "details": "Changes the request confirmations of the contract.", - "params": { - "_requestConfirmations": "The new request confirmations." - } - }, - "changeSortitionModule(address)": { - "details": "Changes the sortition module of the contract.", - "params": { - "_sortitionModule": "The new sortition module." - } - }, - "changeSubscriptionId(uint256)": { - "details": "Changes the subscription ID of the contract.", - "params": { - "_subscriptionId": "The new subscription ID." - } - }, - "changeVrfCoordinator(address)": { - "details": "Changes the VRF Coordinator of the contract.", - "params": { - "_vrfCoordinator": "The new VRF Coordinator." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface.https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number", - "params": { - "_callbackGasLimit": "The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function.", - "_governor": "The Governor of the contract.", - "_keyHash": "The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job).", - "_requestConfirmations": "How many confirmations the Chainlink node should wait before responding.", - "_sortitionModule": "The address of the SortitionModule contract.", - "_subscriptionId": "The unique identifier of the subscription used for funding requests.", - "_vrfCoordinator": "The address of the VRFCoordinator contract." - } - }, - "receiveRandomness(uint256)": { - "details": "Return the random number.", - "returns": { - "randomNumber": "The random number or 0 if it is not ready or has not been requested." - } - }, - "requestRandomness(uint256)": { - "details": "Request a random number. SortitionModule only." - } - }, - "title": "Random Number Generator that uses Chainlink VRF v2.5 https://blog.chain.link/introducing-vrf-v2-5/", - "version": 1 - }, - "userdoc": { - "events": { - "RequestFulfilled(uint256,uint256)": { - "notice": "Emitted when a request has been fulfilled." - } - }, - "kind": "user", - "methods": { - "acceptOwnership()": { - "notice": "Allows an ownership transfer to be completed by the recipient." - }, - "owner()": { - "notice": "Get the current owner" - }, - "setCoordinator(address)": { - "notice": "Sets the VRF Coordinator addressThis method should only be callable by the coordinator or contract owner" - }, - "transferOwnership(address)": { - "notice": "Allows an owner to begin transferring ownership to a new address." - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 29, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "s_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 31, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "s_pendingOwner", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 231, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "s_vrfCoordinator", - "offset": 0, - "slot": "2", - "type": "t_contract(IVRFCoordinatorV2Plus)380" - }, - { - "astId": 34918, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "governor", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 34920, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "sortitionModule", - "offset": 0, - "slot": "4", - "type": "t_address" - }, - { - "astId": 34922, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "keyHash", - "offset": 0, - "slot": "5", - "type": "t_bytes32" - }, - { - "astId": 34924, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "subscriptionId", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 34926, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "requestConfirmations", - "offset": 0, - "slot": "7", - "type": "t_uint16" - }, - { - "astId": 34928, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "callbackGasLimit", - "offset": 2, - "slot": "7", - "type": "t_uint32" - }, - { - "astId": 34930, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "lastRequestId", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 34934, - "contract": "src/rng/ChainlinkRNG.sol:ChainlinkRNG", - "label": "randomNumbers", - "offset": 0, - "slot": "9", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IVRFCoordinatorV2Plus)380": { - "encoding": "inplace", - "label": "contract IVRFCoordinatorV2Plus", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "encoding": "inplace", - "label": "uint32", - "numberOfBytes": "4" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/ChainlinkVRFCoordinator.json b/contracts/deployments/arbitrumSepoliaDevnet/ChainlinkVRFCoordinator.json deleted file mode 100644 index 0ad1f85b2..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/ChainlinkVRFCoordinator.json +++ /dev/null @@ -1,1753 +0,0 @@ -{ - "address": "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "blockhashStore", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "internalBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "externalBalance", - "type": "uint256" - } - ], - "name": "BalanceInvariantViolated", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "blockNum", - "type": "uint256" - } - ], - "name": "BlockhashNotInStore", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorAlreadyRegistered", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorNotRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "FailedToSendNative", - "type": "error" - }, - { - "inputs": [], - "name": "FailedToTransferLink", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "have", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "want", - "type": "uint32" - } - ], - "name": "GasLimitTooBig", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxGas", - "type": "uint256" - } - ], - "name": "GasPriceExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectCommitment", - "type": "error" - }, - { - "inputs": [], - "name": "IndexOutOfRange", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidCalldata", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "InvalidConsumer", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidExtraArgsTag", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "linkWei", - "type": "int256" - } - ], - "name": "InvalidLinkWeiPrice", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "premiumPercentage", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "max", - "type": "uint8" - } - ], - "name": "InvalidPremiumPercentage", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "have", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "min", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "max", - "type": "uint16" - } - ], - "name": "InvalidRequestConfirmations", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidSubscription", - "type": "error" - }, - { - "inputs": [], - "name": "LinkAlreadySet", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "flatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "flatFeeNativePPM", - "type": "uint32" - } - ], - "name": "LinkDiscountTooHigh", - "type": "error" - }, - { - "inputs": [], - "name": "LinkNotSet", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "have", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "max", - "type": "uint32" - } - ], - "name": "MsgDataTooBig", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "proposedOwner", - "type": "address" - } - ], - "name": "MustBeRequestedOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "MustBeSubOwner", - "type": "error" - }, - { - "inputs": [], - "name": "NoCorrespondingRequest", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - } - ], - "name": "NoSuchProvingKey", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "have", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "want", - "type": "uint32" - } - ], - "name": "NumWordsTooBig", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyCallableFromLink", - "type": "error" - }, - { - "inputs": [], - "name": "PaymentTooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "PendingRequestExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - } - ], - "name": "ProvingKeyAlreadyRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "Reentrant", - "type": "error" - }, - { - "inputs": [], - "name": "TooManyConsumers", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "maxGasLimit", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "stalenessSeconds", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "gasAfterPaymentCalculation", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "int256", - "name": "fallbackWeiPerUnitLink", - "type": "int256" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "fulfillmentFlatFeeNativePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "fulfillmentFlatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "nativePremiumPercentage", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "linkPremiumPercentage", - "type": "uint8" - } - ], - "name": "ConfigSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorDeregistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "coordinatorAddress", - "type": "address" - } - ], - "name": "CoordinatorRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "fallbackWeiPerUnitLink", - "type": "int256" - } - ], - "name": "FallbackWeiPerUnitLinkUsed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "FundsRecovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newCoordinator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "MigrationCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "NativeFundsRecovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "name": "ProvingKeyDeregistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "name": "ProvingKeyRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outputSeed", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "payment", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "nativePayment", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "success", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "onlyPremium", - "type": "bool" - } - ], - "name": "RandomWordsFulfilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "preSeed", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "callbackGasLimit", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "numWords", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "extraArgs", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RandomWordsRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountLink", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountNative", - "type": "uint256" - } - ], - "name": "SubscriptionCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "SubscriptionConsumerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "SubscriptionConsumerRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "SubscriptionCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "SubscriptionFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldNativeBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newNativeBalance", - "type": "uint256" - } - ], - "name": "SubscriptionFundedWithNative", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "SubscriptionOwnerTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "SubscriptionOwnerTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "BLOCKHASH_STORE", - "outputs": [ - { - "internalType": "contract BlockhashStoreInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LINK", - "outputs": [ - { - "internalType": "contract LinkTokenInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LINK_NATIVE_FEED", - "outputs": [ - { - "internalType": "contract AggregatorV3Interface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_CONSUMERS", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_NUM_WORDS", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_REQUEST_CONFIRMATIONS", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "acceptSubscriptionOwnerTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "addConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "cancelSubscription", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "createSubscription", - "outputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "deregisterMigratableCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[2]", - "name": "publicProvingKey", - "type": "uint256[2]" - } - ], - "name": "deregisterProvingKey", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256[2]", - "name": "pk", - "type": "uint256[2]" - }, - { - "internalType": "uint256[2]", - "name": "gamma", - "type": "uint256[2]" - }, - { - "internalType": "uint256", - "name": "c", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "s", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "seed", - "type": "uint256" - }, - { - "internalType": "address", - "name": "uWitness", - "type": "address" - }, - { - "internalType": "uint256[2]", - "name": "cGammaWitness", - "type": "uint256[2]" - }, - { - "internalType": "uint256[2]", - "name": "sHashWitness", - "type": "uint256[2]" - }, - { - "internalType": "uint256", - "name": "zInv", - "type": "uint256" - } - ], - "internalType": "struct VRF.Proof", - "name": "proof", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint64", - "name": "blockNum", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "callbackGasLimit", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "numWords", - "type": "uint32" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "bytes", - "name": "extraArgs", - "type": "bytes" - } - ], - "internalType": "struct VRFTypes.RequestCommitmentV2Plus", - "name": "rc", - "type": "tuple" - }, - { - "internalType": "bool", - "name": "onlyPremium", - "type": "bool" - } - ], - "name": "fulfillRandomWords", - "outputs": [ - { - "internalType": "uint96", - "name": "payment", - "type": "uint96" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "fundSubscriptionWithNative", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxCount", - "type": "uint256" - } - ], - "name": "getActiveSubscriptionIds", - "outputs": [ - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "getSubscription", - "outputs": [ - { - "internalType": "uint96", - "name": "balance", - "type": "uint96" - }, - { - "internalType": "uint96", - "name": "nativeBalance", - "type": "uint96" - }, - { - "internalType": "uint64", - "name": "reqCount", - "type": "uint64" - }, - { - "internalType": "address", - "name": "subOwner", - "type": "address" - }, - { - "internalType": "address[]", - "name": "consumers", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[2]", - "name": "publicKey", - "type": "uint256[2]" - } - ], - "name": "hashOfKey", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "newCoordinator", - "type": "address" - } - ], - "name": "migrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "ownerCancelSubscription", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - } - ], - "name": "pendingRequestExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "recoverFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - } - ], - "name": "recoverNativeFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "registerMigratableCoordinator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[2]", - "name": "publicProvingKey", - "type": "uint256[2]" - }, - { - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "name": "registerProvingKey", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "consumer", - "type": "address" - } - ], - "name": "removeConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "keyHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "requestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "callbackGasLimit", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "numWords", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "extraArgs", - "type": "bytes" - } - ], - "internalType": "struct VRFV2PlusClient.RandomWordsRequest", - "name": "req", - "type": "tuple" - } - ], - "name": "requestRandomWords", - "outputs": [ - { - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "subId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "requestSubscriptionOwnerTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "s_config", - "outputs": [ - { - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "maxGasLimit", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "reentrancyLock", - "type": "bool" - }, - { - "internalType": "uint32", - "name": "stalenessSeconds", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "gasAfterPaymentCalculation", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeNativePPM", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "internalType": "uint8", - "name": "nativePremiumPercentage", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "linkPremiumPercentage", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_currentSubNonce", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_fallbackWeiPerUnitLink", - "outputs": [ - { - "internalType": "int256", - "name": "", - "type": "int256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "s_provingKeyHashes", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "s_provingKeys", - "outputs": [ - { - "internalType": "bool", - "name": "exists", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "maxGas", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "s_requestCommitments", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_totalBalance", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "s_totalNativeBalance", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "minimumRequestConfirmations", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "maxGasLimit", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "stalenessSeconds", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "gasAfterPaymentCalculation", - "type": "uint32" - }, - { - "internalType": "int256", - "name": "fallbackWeiPerUnitLink", - "type": "int256" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeNativePPM", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "fulfillmentFlatFeeLinkDiscountPPM", - "type": "uint32" - }, - { - "internalType": "uint8", - "name": "nativePremiumPercentage", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "linkPremiumPercentage", - "type": "uint8" - } - ], - "name": "setConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "link", - "type": "address" - }, - { - "internalType": "address", - "name": "linkNativeFeed", - "type": "address" - } - ], - "name": "setLINKAndLINKNativeFeed", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawNative", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DAI.json b/contracts/deployments/arbitrumSepoliaDevnet/DAI.json deleted file mode 100644 index aeb0db522..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DAI.json +++ /dev/null @@ -1,458 +0,0 @@ -{ - "address": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ], - "transactionHash": "0x251195ad7dabd55250d3d7e56ca4fb46842bf6c03d03ae6ffcd65f5160ba6411", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "transactionIndex": 1, - "gasUsed": "621518", - "logsBloom": "0x00000020000000000000000000000000000000000040000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000002000000000000000000000000000000000000000000000080000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4d5427ba5759721f27265eca1417b6c5911724c4c21c2b0456713cb0dca99377", - "transactionHash": "0x251195ad7dabd55250d3d7e56ca4fb46842bf6c03d03ae6ffcd65f5160ba6411", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 3084543, - "transactionHash": "0x251195ad7dabd55250d3d7e56ca4fb46842bf6c03d03ae6ffcd65f5160ba6411", - "address": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", - "logIndex": 0, - "blockHash": "0x4d5427ba5759721f27265eca1417b6c5911724c4c21c2b0456713cb0dca99377" - } - ], - "blockNumber": 3084543, - "cumulativeGasUsed": "621518", - "status": 1, - "byzantium": true - }, - "args": [ - "DAI", - "DAI" - ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"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\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/TestERC20.sol\":\"TestERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"src/token/TestERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract TestERC20 is ERC20 {\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {\\n _mint(msg.sender, 1000000 ether);\\n }\\n}\\n\",\"keccak256\":\"0x9f67e6b63ca87e6c98b2986364ce16a747ce4098e9146fffb17ea13863c0b7e4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c5838038062000c5883398101604081905262000034916200020a565b8181600362000044838262000302565b50600462000053828262000302565b505050620000723369d3c21bcecceda10000006200007a60201b60201c565b5050620003f6565b6001600160a01b038216620000d55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620000e99190620003ce565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016d57600080fd5b81516001600160401b03808211156200018a576200018a62000145565b604051601f8301601f19908116603f01168101908282118183101715620001b557620001b562000145565b81604052838152602092508683858801011115620001d257600080fd5b600091505b83821015620001f65785820183015181830184015290820190620001d7565b600093810190920192909252949350505050565b600080604083850312156200021e57600080fd5b82516001600160401b03808211156200023657600080fd5b62000244868387016200015b565b935060208501519150808211156200025b57600080fd5b506200026a858286016200015b565b9150509250929050565b600181811c908216806200028957607f821691505b602082108103620002aa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200014057600081815260208120601f850160051c81016020861015620002d95750805b601f850160051c820191505b81811015620002fa57828155600101620002e5565b505050505050565b81516001600160401b038111156200031e576200031e62000145565b62000336816200032f845462000274565b84620002b0565b602080601f8311600181146200036e5760008415620003555750858301515b600019600386901b1c1916600185901b178555620002fa565b600085815260208120601f198616915b828110156200039f578886015182559484019460019091019084016200037e565b5085821015620003be5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620003f057634e487b7160e01b600052601160045260246000fd5b92915050565b61085280620004066000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea26469706673582212203a956e65a766c03ac95ae037cbdfb51b56810340c98132c2d2482405d386101b64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea26469706673582212203a956e65a766c03ac95ae037cbdfb51b56810340c98132c2d2482405d386101b64736f6c63430008120033", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 393, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 399, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 401, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 403, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 405, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DAIFaucet.json b/contracts/deployments/arbitrumSepoliaDevnet/DAIFaucet.json deleted file mode 100644 index 677639852..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DAIFaucet.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "address": "0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "amount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "changeAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xdf588e021ff6efc1b61abc01989d34c5a404b7cd4b6091425db964a334e4e547", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E", - "transactionIndex": 1, - "gasUsed": "435555", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2bfdb7df6af7cd9e6e96a159146ebe27fd2a1021f90f340503fb16acc5cf656a", - "transactionHash": "0xdf588e021ff6efc1b61abc01989d34c5a404b7cd4b6091425db964a334e4e547", - "logs": [], - "blockNumber": 3084545, - "cumulativeGasUsed": "435555", - "status": 1, - "byzantium": true - }, - "args": [ - "0x593e89704D285B0c3fbF157c7CF2537456CE64b5" - ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"amount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"changeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IERC20 public token;\\n address public governor;\\n mapping(address => bool) public withdrewAlready;\\n uint256 public amount = 10_000 ether;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeGovernor(address _governor) public onlyByGovernor {\\n governor = _governor;\\n }\\n\\n function changeAmount(uint256 _amount) public onlyByGovernor {\\n amount = _amount;\\n }\\n\\n function withdraw() public onlyByGovernor {\\n token.transfer(governor, token.balanceOf(address(this)));\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, amount);\\n withdrewAlready[msg.sender] = true;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x3a54681cc304ccbfdb42215104b63809919a432ac5d3986d3021a11fcc7a1cc3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405269021e19e0c9bab240000060035534801561001e57600080fd5b5060405161065538038061065583398101604081905261003d9161006b565b600080546001600160a01b039092166001600160a01b0319928316179055600180549091163317905561009b565b60006020828403121561007d57600080fd5b81516001600160a01b038116811461009457600080fd5b9392505050565b6105ab806100aa6000396000f3fe608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 24559, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)1042" - }, - { - "astId": 24561, - "contract": "src/token/Faucet.sol:Faucet", - "label": "governor", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 24565, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 24568, - "contract": "src/token/Faucet.sol:Faucet", - "label": "amount", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)1042": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json deleted file mode 100644 index 64c6ddddd..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json +++ /dev/null @@ -1,1209 +0,0 @@ -{ - "address": "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xddd435d6586de97d05fb1ca32d0fd490f427c086be46ab9f8622e55f7f039a05", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", - "transactionIndex": 2, - "gasUsed": "178492", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1f6c9d41489286adf1bc958881c75266eb876f784c07d3d303dc1e60445852a2", - "transactionHash": "0xddd435d6586de97d05fb1ca32d0fd490f427c086be46ab9f8622e55f7f039a05", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175286074, - "transactionHash": "0xddd435d6586de97d05fb1ca32d0fd490f427c086be46ab9f8622e55f7f039a05", - "address": "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0x1f6c9d41489286adf1bc958881c75266eb876f784c07d3d303dc1e60445852a2" - } - ], - "blockNumber": 175286074, - "cumulativeGasUsed": "205532", - "status": 1, - "byzantium": true - }, - "args": [ - "0xD76E74049003faCe2EBA0B6FB61DFC9941da959F", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 2, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c725b686c35c73323e89d3a1c5ad844b99f0379163dce99bcd79b25231551a8164736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c725b686c35c73323e89d3a1c5ad844b99f0379163dce99bcd79b25231551a8164736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0x3829A2486d53ee984a0ca2D76552715726b77138" - ] - }, - "implementation": "0xc4cC0274E55a9818f8cF42640B1De61d269425ad", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json deleted file mode 100644 index 19f34b347..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json +++ /dev/null @@ -1,1009 +0,0 @@ -{ - "address": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - "transactionIndex": 1, - "gasUsed": "189732", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000004000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1e4647532736ec4a239971727f05a17b1bb50fc89c0ec7a8da6e34f4f5bfcc90", - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 96308536, - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", - "address": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x1e4647532736ec4a239971727f05a17b1bb50fc89c0ec7a8da6e34f4f5bfcc90" - } - ], - "blockNumber": 96308536, - "cumulativeGasUsed": "189732", - "status": 1, - "byzantium": true - }, - "args": [ - "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicUniversityProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220a67e53546ab2c83f023c185d90506ad48d4e7af6339cf6db0c4ed97ec9ed376f64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220a67e53546ab2c83f023c185d90506ad48d4e7af6339cf6db0c4ed97ec9ed376f64736f6c63430008180033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x0000000000000000000000000000000000000000" - ] - }, - "implementation": "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Implementation.json deleted file mode 100644 index 3ac36edd4..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Implementation.json +++ /dev/null @@ -1,1540 +0,0 @@ -{ - "address": "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x89ac5a2ce88c22071edfaf2f092cb26862b52facde1274b9a495dccdd03a41d9", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - "transactionIndex": 2, - "gasUsed": "3665145", - "logsBloom": "0x00000800000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9c2007f9245166eb377461ad5c2dd50dfa7e21fc79284f7d7591fb8348960fe3", - "transactionHash": "0x89ac5a2ce88c22071edfaf2f092cb26862b52facde1274b9a495dccdd03a41d9", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 96308519, - "transactionHash": "0x89ac5a2ce88c22071edfaf2f092cb26862b52facde1274b9a495dccdd03a41d9", - "address": "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 6, - "blockHash": "0x9c2007f9245166eb377461ad5c2dd50dfa7e21fc79284f7d7591fb8348960fe3" - } - ], - "blockNumber": 96308519, - "cumulativeGasUsed": "3756092", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commit. Note that justification string is a part of the commit.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"initialize(address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"title\":\"DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":\"DisputeKitClassic\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./KlerosCoreBase.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) external reinitializer(1) {\\n _initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress\\n );\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x1dc9311f4df8d5c707be5fc0f0e87574b2ca4a4957eb0ffecdf2153a8eace1d2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2 {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function _initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) internal {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n new uint256[](0)\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n function draw(uint256 _disputeID, uint256 _iterations) external {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n _params.pnkPenaltiesInRound += penalty;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n sortitionModule.penalizeStake(account, penalty);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(penalty),\\n 0,\\n round.feeToken\\n );\\n\\n if (!disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive, unstake them.\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Give back the locked PNKs in case the juror fully unstaked earlier.\\n if (!sortitionModule.isJurorStaked(account)) {\\n pinakion.safeTransfer(account, pnkLocked);\\n }\\n\\n // Transfer the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs were already transferred to/from the staking contract.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (stakingResult != StakingResult.Successful) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibeInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error DepthLevelMax();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error ArraysLengthMismatch();\\n error StakingInTooManyCourts();\\n error StakingNotPossibeInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n}\\n\",\"keccak256\":\"0x7435f0d24fde25165d4de404cbd4040339be136bac507196bfed0bb1f9f493f4\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"../KlerosCore.sol\\\";\\nimport \\\"../interfaces/IDisputeKit.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is IDisputeKit, Initializable, UUPSProxiable {\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n function initialize(address _governor, KlerosCore _core) external reinitializer(1) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n // TODO: Handle the situation when no one has staked yet.\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n\\n if (_postDrawCheck(_coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commit. Note that justification string is a part of the commit.\\n function castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) external notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == keccak256(abi.encodePacked(_choice, _salt)),\\n \\\"The commit must match the choice in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, msg.sender, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).send(msg.value - contribution);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.send(amount); // Deliberate use of send to prevent reverting fallback. It's the user's responsibility to accept ETH.\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalVoted == round.votes.length;\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return Whether the address can be drawn or not.\\n function _postDrawCheck(uint256 _coreDisputeID, address _juror) internal view returns (bool) {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n uint256 lockedAmountPerJuror = core\\n .getRoundInfo(_coreDisputeID, core.getNumberOfRounds(_coreDisputeID) - 1)\\n .pnkAtStakePerJuror;\\n (uint256 totalStaked, uint256 totalLocked, , ) = core.sortitionModule().getJurorBalance(_juror, courtID);\\n return totalStaked >= totalLocked + lockedAmountPerJuror;\\n }\\n}\\n\",\"keccak256\":\"0xde57a6569422626bf1ec215f3442ede6c13df57f6f5d27da3bc8cd8bc3d313cd\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xb9590d05f9df08dd0ed027b2eb40c7b1885b7574a121b1b0b7da0920429bb4d5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked\\n}\\n\",\"keccak256\":\"0x486016fb74cc91439c2ec918e97a79190ab4eed223987d516986fff8eaeecfbf\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613ec76200010360003960008181611588015281816115b101526117a90152613ec76000f3fe6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613174565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613174565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613174565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131a2565b610785565b34801561029857600080fd5b506102ac6102a73660046131df565b610c10565b005b6102ac6102bc366004613218565b610d0d565b6102ac6102cf366004613327565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613174565b6117fa565b6040516101b3939291906133c6565b34801561032457600080fd5b506102ac610333366004613432565b6118c0565b34801561034457600080fd5b50610358610353366004613174565b611bc5565b6040516101b39190613484565b34801561037157600080fd5b506102216103803660046134c8565b611c89565b34801561039157600080fd5b506103a56103a0366004613503565b611dce565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613174565b611e86565b3480156103fe57600080fd5b506102ac61040d36600461352f565b611efd565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613587565b611fc9565b34801561045457600080fd5b506102ac61046336600461361f565b61269a565b34801561047457600080fd5b50610488610483366004613503565b6126e6565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461363c565b6127ac565b3480156104f657600080fd5b506101a7610505366004613503565b612981565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b366004613218565b612a1c565b34801561054c57600080fd5b5061022161055b366004613218565b612d25565b34801561056c57600080fd5b506102ac61057b36600461361f565b612e78565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136c3565b600091825260208220600590910201805490925082906105e6906001906136ef565b815481106105f6576105f66136c3565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136c3565b60009182526020822060059091020180549092508290610665906001906136ef565b81548110610675576106756136c3565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610716919061372e565b5090935060049250610726915050565b81600481111561073857610738613795565b0361077b57600061074888611bc5565b905080516001036107795780600081518110610766576107666136c3565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f7919061372e565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137ab565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136c3565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137c6565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613802565b610a939190613819565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136c3565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136c3565b9060005260206000200154815260200190815260200160002054610b28919061383b565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613802565b610b679190613819565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136c3565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b81526004016108469061384e565b600083815260036020526040812054600280549091908110610d8957610d896136c3565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613885565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137c6565b50509050868103610f30576127109150610fb1565b612710611388610f4086866136ef565b610f4a9190613802565b610f549190613819565b610f5e85426136ef565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc4906001906136ef565b81548110610fd457610fd46136c3565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138a9565b61106191906136ef565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138a9565b905060006127106111448784613802565b61114e9190613819565b611158908361383b565b60008c8152600686016020526040812054919250908211156112095760008c8152600686016020526040902054349061119190846136ef565b116111b65760008c81526006860160205260409020546111b190836136ef565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061383b565b909155505060008c81526006860160205260408120805483929061125a90849061383b565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061383b565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156115375782856009015461134991906136ef565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137ab565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161383b565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138a9565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b8152600401611504939291906138fc565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d83346136ef565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ec4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e728339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138a9565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e7283398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e728339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b031683604051611733919061399b565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e7283398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138c2565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138c2565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136c3565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611986919061372e565b5090935060019250611996915050565b8160048111156119a8576119a8613795565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136c3565b60009182526020822060059091020180549092508290611a88906001906136ef565b81548110611a9857611a986136c3565b90600052602060002090600c0201905060005b86811015611b5e573382898984818110611ac757611ac76136c3565b9050602002013581548110611ade57611ade6136c3565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139b7565b8582898984818110611b2957611b296136c3565b9050602002013581548110611b4057611b406136c3565b60009182526020909120600160049092020181019190915501611aab565b5086869050816005016000828254611b76919061383b565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bb3908b908b908b90613a20565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611beb57611beb6136c3565b60009182526020822060059091020180549092508290611c0d906001906136ef565b81548110611c1d57611c1d6136c3565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c7b57602002820191906000526020600020905b815481526020019060010190808311611c67575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cad57611cad6136c3565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce157611ce16136c3565b90600052602060002090600c02016000018681548110611d0357611d036136c3565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8591906137c6565b506003850154919350915060ff168015611da957508183600201541480611da95750805b15611dbc57612710945050505050611dc5565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611dff57611dff6136c3565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3357611e336136c3565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eaa57611eaa6136c3565b60009182526020822060059091020180549092508290611ecc906001906136ef565b81548110611edc57611edc6136c3565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f275760405162461bcd60e51b815260040161084690613a44565b6000836001600160a01b03168383604051611f42919061399b565b60006040518083038185875af1925050503d8060008114611f7f576040519150601f19603f3d011682016040523d82523d6000602084013e611f84565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611fed57611fed6136c3565b600091825260209091206002600590920201015460ff16156120215760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa15801561206b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208f919061372e565b509093506002925061209f915050565b8160048111156120b1576120b1613795565b1461210c5760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b8561214e5760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b600088815260036020526040812054600280549091908110612172576121726136c3565b9060005260206000209060050201905080600101548611156121cd5760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e0906001906136ef565b815481106121f0576121f06136c3565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa15801561224b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226f919061372e565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ee9190613a86565b505050505091505060005b8a8110156125605733848d8d84818110612315576123156136c3565b905060200201358154811061232c5761232c6136c3565b60009182526020909120600490910201546001600160a01b0316146123635760405162461bcd60e51b8152600401610846906139b7565b8115806123d6575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123ab576123ab6136c3565b90506020020135815481106123c2576123c26136c3565b906000526020600020906004020160010154145b6124485760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c8381811061245b5761245b6136c3565b9050602002013581548110612472576124726136c3565b600091825260209091206003600490920201015460ff16156124cb5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124df576124df6136c3565b90506020020135815481106124f6576124f66136c3565b60009182526020909120600260049092020101556001848d8d8481811061251f5761251f6136c3565b9050602002013581548110612536576125366136c3565b60009182526020909120600490910201600301805460ff19169115159190911790556001016122f9565b508a8a9050836004016000828254612578919061383b565b90915550506000898152600284016020526040812080548c929061259d90849061383b565b9091555050600183015489036125cc57600383015460ff16156125c75760038301805460ff191690555b612645565b60018301546000908152600284016020526040808220548b83529120540361260e57600383015460ff166125c75760038301805460ff19166001179055612645565b60018301546000908152600284016020526040808220548b83529120541115612645576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161268493929190613af0565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126c45760405162461bcd60e51b815260040161084690613a44565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612714576127146136c3565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612748576127486136c3565b90600052602060002090600c0201600001878154811061276a5761276a6136c3565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127d65760405162461bcd60e51b815260040161084690613b20565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612861858783613bb4565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128dc91906138a9565b6128e691906136ef565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061296f908a908a908a90613c74565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129a5576129a56136c3565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129d9576129d96136c3565b90600052602060002090600c020160000184815481106129fb576129fb6136c3565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a495760405162461bcd60e51b815260040161084690613b20565b600083815260036020526040902054600280548592908110612a6d57612a6d6136c3565b600091825260209091206002600590920201015460ff1615612aa15760405162461bcd60e51b81526004016108469061384e565b600084815260036020526040812054600280549091908110612ac557612ac56136c3565b60009182526020822060059091020180549092508290612ae7906001906136ef565b81548110612af757612af76136c3565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b809190613caa565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf3919061372e565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c7b9190613caa565b9650612c878988612ef1565b15612d1457604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d19565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d4957612d496136c3565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d7d57612d7d6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0091906137c6565b5091509150826004015460001480612e2f575080158015612e2f57506000828152600284016020526040902054155b15612e41576000945050505050612e72565b8015612e56575050600401549150612e729050565b506000908152600290910160205260409020549150612e729050565b92915050565b6000546001600160a01b03163314612ea25760405162461bcd60e51b815260040161084690613a44565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612eee5760405162461bcd60e51b815260040161084690613a44565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f63919061372e565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fe691906138a9565b612ff091906136ef565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613031573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130599190810190613d5a565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d99190613caa565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613130573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131549190613e3b565b5050915091508281613166919061383b565b909110159695505050505050565b60006020828403121561318657600080fd5b5035919050565b6001600160a01b0381168114612eee57600080fd5b600080600080608085870312156131b857600080fd5b8435935060208501356131ca8161318d565b93969395505050506040820135916060013590565b600080604083850312156131f257600080fd5b82356131fd8161318d565b9150602083013561320d8161318d565b809150509250929050565b6000806040838503121561322b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132735761327361323a565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132a1576132a161323a565b604052919050565b60006001600160401b038311156132c2576132c261323a565b6132d5601f8401601f1916602001613279565b90508281528383830111156132e957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261331157600080fd5b613320838335602085016132a9565b9392505050565b6000806040838503121561333a57600080fd5b82356133458161318d565b915060208301356001600160401b0381111561336057600080fd5b61336c85828601613300565b9150509250929050565b60005b83811015613391578181015183820152602001613379565b50506000910152565b600081518084526133b2816020860160208601613376565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dc5606083018461339a565b60008083601f8401126133f957600080fd5b5081356001600160401b0381111561341057600080fd5b6020830191508360208260051b850101111561342b57600080fd5b9250929050565b6000806000806060858703121561344857600080fd5b8435935060208501356001600160401b0381111561346557600080fd5b613471878288016133e7565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134bc578351835292840192918401916001016134a0565b50909695505050505050565b600080600080600060a086880312156134e057600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561351857600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561354457600080fd5b833561354f8161318d565b92506020840135915060408401356001600160401b0381111561357157600080fd5b61357d86828701613300565b9150509250925092565b60008060008060008060a087890312156135a057600080fd5b8635955060208701356001600160401b03808211156135be57600080fd5b6135ca8a838b016133e7565b9097509550604089013594506060890135935060808901359150808211156135f157600080fd5b508701601f8101891361360357600080fd5b613612898235602084016132a9565b9150509295509295509295565b60006020828403121561363157600080fd5b81356133208161318d565b60008060008060006080868803121561365457600080fd5b853594506020860135935060408601356001600160401b038082111561367957600080fd5b818801915088601f83011261368d57600080fd5b81358181111561369c57600080fd5b8960208285010111156136ae57600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e7257612e726136d9565b80516001600160601b038116811461371957600080fd5b919050565b8051801515811461371957600080fd5b600080600080600060a0868803121561374657600080fd5b61374f86613702565b9450602086015161375f8161318d565b60408701519094506005811061377457600080fd5b92506137826060870161371e565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137bd57600080fd5b6133208261371e565b6000806000606084860312156137db57600080fd5b835192506137eb6020850161371e565b91506137f96040850161371e565b90509250925092565b8082028115828204841417612e7257612e726136d9565b60008261383657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e7257612e726136d9565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b6000806040838503121561389857600080fd5b505080516020909101519092909150565b6000602082840312156138bb57600080fd5b5051919050565b600181811c908216806138d657607f821691505b6020821081036138f657634e487b7160e01b600052602260045260246000fd5b50919050565b83815260006020846020840152606060408401526000845461391d816138c2565b806060870152608060018084166000811461393f576001811461395b5761398b565b60ff19851660808a0152608084151560051b8a0101955061398b565b89600052602060002060005b858110156139825781548b8201860152908301908801613967565b8a016080019650505b50939a9950505050505050505050565b600082516139ad818460208701613376565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613a0757600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a346040830185876139ee565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613aa157600080fd5b613aaa88613702565b9650613ab86020890161371e565b955060408801519450606088015193506080880151925060a08801519150613ae260c0890161371e565b905092959891949750929550565b604081526000613b046040830185876139ee565b8281036020840152613b16818561339a565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611797576000816000526020600020601f850160051c81016020861015613b8d5750805b601f850160051c820191505b81811015613bac57828155600101613b99565b505050505050565b6001600160401b03831115613bcb57613bcb61323a565b613bdf83613bd983546138c2565b83613b64565b6000601f841160018114613c135760008515613bfb5750838201355b600019600387901b1c1916600186901b178355613c6d565b600083815260209020601f19861690835b82811015613c445786850135825560209485019460019092019101613c24565b5086821015613c615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613cbc57600080fd5b81516133208161318d565b600082601f830112613cd857600080fd5b815160206001600160401b03821115613cf357613cf361323a565b8160051b613d02828201613279565b9283528481018201928281019087851115613d1c57600080fd5b83870192505b84831015613d44578251613d358161318d565b82529183019190830190613d22565b979650505050505050565b80516137198161318d565b600060208284031215613d6c57600080fd5b81516001600160401b0380821115613d8357600080fd5b908301906101608286031215613d9857600080fd5b613da0613250565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613de857600080fd5b613df487828601613cc7565b60c08301525060e0838101519082015261010080840151908201526101209150613e1f828401613d4f565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e5157600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ece2f97e5f37049420403eea1739d27d704a432100da66c99ed49ffe1796440264736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613174565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613174565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613174565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131a2565b610785565b34801561029857600080fd5b506102ac6102a73660046131df565b610c10565b005b6102ac6102bc366004613218565b610d0d565b6102ac6102cf366004613327565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613174565b6117fa565b6040516101b3939291906133c6565b34801561032457600080fd5b506102ac610333366004613432565b6118c0565b34801561034457600080fd5b50610358610353366004613174565b611bc5565b6040516101b39190613484565b34801561037157600080fd5b506102216103803660046134c8565b611c89565b34801561039157600080fd5b506103a56103a0366004613503565b611dce565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613174565b611e86565b3480156103fe57600080fd5b506102ac61040d36600461352f565b611efd565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613587565b611fc9565b34801561045457600080fd5b506102ac61046336600461361f565b61269a565b34801561047457600080fd5b50610488610483366004613503565b6126e6565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461363c565b6127ac565b3480156104f657600080fd5b506101a7610505366004613503565b612981565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b366004613218565b612a1c565b34801561054c57600080fd5b5061022161055b366004613218565b612d25565b34801561056c57600080fd5b506102ac61057b36600461361f565b612e78565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136c3565b600091825260208220600590910201805490925082906105e6906001906136ef565b815481106105f6576105f66136c3565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136c3565b60009182526020822060059091020180549092508290610665906001906136ef565b81548110610675576106756136c3565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610716919061372e565b5090935060049250610726915050565b81600481111561073857610738613795565b0361077b57600061074888611bc5565b905080516001036107795780600081518110610766576107666136c3565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f7919061372e565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137ab565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136c3565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137c6565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613802565b610a939190613819565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136c3565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136c3565b9060005260206000200154815260200190815260200160002054610b28919061383b565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613802565b610b679190613819565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136c3565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b81526004016108469061384e565b600083815260036020526040812054600280549091908110610d8957610d896136c3565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613885565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137c6565b50509050868103610f30576127109150610fb1565b612710611388610f4086866136ef565b610f4a9190613802565b610f549190613819565b610f5e85426136ef565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc4906001906136ef565b81548110610fd457610fd46136c3565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138a9565b61106191906136ef565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138a9565b905060006127106111448784613802565b61114e9190613819565b611158908361383b565b60008c8152600686016020526040812054919250908211156112095760008c8152600686016020526040902054349061119190846136ef565b116111b65760008c81526006860160205260409020546111b190836136ef565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061383b565b909155505060008c81526006860160205260408120805483929061125a90849061383b565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061383b565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156115375782856009015461134991906136ef565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137ab565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161383b565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138a9565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b8152600401611504939291906138fc565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d83346136ef565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ec4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e728339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138a9565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e7283398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e728339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b031683604051611733919061399b565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e7283398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138c2565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138c2565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136c3565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611986919061372e565b5090935060019250611996915050565b8160048111156119a8576119a8613795565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136c3565b60009182526020822060059091020180549092508290611a88906001906136ef565b81548110611a9857611a986136c3565b90600052602060002090600c0201905060005b86811015611b5e573382898984818110611ac757611ac76136c3565b9050602002013581548110611ade57611ade6136c3565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139b7565b8582898984818110611b2957611b296136c3565b9050602002013581548110611b4057611b406136c3565b60009182526020909120600160049092020181019190915501611aab565b5086869050816005016000828254611b76919061383b565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bb3908b908b908b90613a20565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611beb57611beb6136c3565b60009182526020822060059091020180549092508290611c0d906001906136ef565b81548110611c1d57611c1d6136c3565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c7b57602002820191906000526020600020905b815481526020019060010190808311611c67575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cad57611cad6136c3565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce157611ce16136c3565b90600052602060002090600c02016000018681548110611d0357611d036136c3565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8591906137c6565b506003850154919350915060ff168015611da957508183600201541480611da95750805b15611dbc57612710945050505050611dc5565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611dff57611dff6136c3565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3357611e336136c3565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eaa57611eaa6136c3565b60009182526020822060059091020180549092508290611ecc906001906136ef565b81548110611edc57611edc6136c3565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f275760405162461bcd60e51b815260040161084690613a44565b6000836001600160a01b03168383604051611f42919061399b565b60006040518083038185875af1925050503d8060008114611f7f576040519150601f19603f3d011682016040523d82523d6000602084013e611f84565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611fed57611fed6136c3565b600091825260209091206002600590920201015460ff16156120215760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa15801561206b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208f919061372e565b509093506002925061209f915050565b8160048111156120b1576120b1613795565b1461210c5760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b8561214e5760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b600088815260036020526040812054600280549091908110612172576121726136c3565b9060005260206000209060050201905080600101548611156121cd5760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e0906001906136ef565b815481106121f0576121f06136c3565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa15801561224b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226f919061372e565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ee9190613a86565b505050505091505060005b8a8110156125605733848d8d84818110612315576123156136c3565b905060200201358154811061232c5761232c6136c3565b60009182526020909120600490910201546001600160a01b0316146123635760405162461bcd60e51b8152600401610846906139b7565b8115806123d6575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123ab576123ab6136c3565b90506020020135815481106123c2576123c26136c3565b906000526020600020906004020160010154145b6124485760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c8381811061245b5761245b6136c3565b9050602002013581548110612472576124726136c3565b600091825260209091206003600490920201015460ff16156124cb5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124df576124df6136c3565b90506020020135815481106124f6576124f66136c3565b60009182526020909120600260049092020101556001848d8d8481811061251f5761251f6136c3565b9050602002013581548110612536576125366136c3565b60009182526020909120600490910201600301805460ff19169115159190911790556001016122f9565b508a8a9050836004016000828254612578919061383b565b90915550506000898152600284016020526040812080548c929061259d90849061383b565b9091555050600183015489036125cc57600383015460ff16156125c75760038301805460ff191690555b612645565b60018301546000908152600284016020526040808220548b83529120540361260e57600383015460ff166125c75760038301805460ff19166001179055612645565b60018301546000908152600284016020526040808220548b83529120541115612645576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161268493929190613af0565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126c45760405162461bcd60e51b815260040161084690613a44565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612714576127146136c3565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612748576127486136c3565b90600052602060002090600c0201600001878154811061276a5761276a6136c3565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127d65760405162461bcd60e51b815260040161084690613b20565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612861858783613bb4565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128dc91906138a9565b6128e691906136ef565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061296f908a908a908a90613c74565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129a5576129a56136c3565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129d9576129d96136c3565b90600052602060002090600c020160000184815481106129fb576129fb6136c3565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a495760405162461bcd60e51b815260040161084690613b20565b600083815260036020526040902054600280548592908110612a6d57612a6d6136c3565b600091825260209091206002600590920201015460ff1615612aa15760405162461bcd60e51b81526004016108469061384e565b600084815260036020526040812054600280549091908110612ac557612ac56136c3565b60009182526020822060059091020180549092508290612ae7906001906136ef565b81548110612af757612af76136c3565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b809190613caa565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf3919061372e565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c7b9190613caa565b9650612c878988612ef1565b15612d1457604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d19565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d4957612d496136c3565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d7d57612d7d6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0091906137c6565b5091509150826004015460001480612e2f575080158015612e2f57506000828152600284016020526040902054155b15612e41576000945050505050612e72565b8015612e56575050600401549150612e729050565b506000908152600290910160205260409020549150612e729050565b92915050565b6000546001600160a01b03163314612ea25760405162461bcd60e51b815260040161084690613a44565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612eee5760405162461bcd60e51b815260040161084690613a44565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f63919061372e565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fe691906138a9565b612ff091906136ef565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613031573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130599190810190613d5a565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d99190613caa565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613130573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131549190613e3b565b5050915091508281613166919061383b565b909110159695505050505050565b60006020828403121561318657600080fd5b5035919050565b6001600160a01b0381168114612eee57600080fd5b600080600080608085870312156131b857600080fd5b8435935060208501356131ca8161318d565b93969395505050506040820135916060013590565b600080604083850312156131f257600080fd5b82356131fd8161318d565b9150602083013561320d8161318d565b809150509250929050565b6000806040838503121561322b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132735761327361323a565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132a1576132a161323a565b604052919050565b60006001600160401b038311156132c2576132c261323a565b6132d5601f8401601f1916602001613279565b90508281528383830111156132e957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261331157600080fd5b613320838335602085016132a9565b9392505050565b6000806040838503121561333a57600080fd5b82356133458161318d565b915060208301356001600160401b0381111561336057600080fd5b61336c85828601613300565b9150509250929050565b60005b83811015613391578181015183820152602001613379565b50506000910152565b600081518084526133b2816020860160208601613376565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dc5606083018461339a565b60008083601f8401126133f957600080fd5b5081356001600160401b0381111561341057600080fd5b6020830191508360208260051b850101111561342b57600080fd5b9250929050565b6000806000806060858703121561344857600080fd5b8435935060208501356001600160401b0381111561346557600080fd5b613471878288016133e7565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134bc578351835292840192918401916001016134a0565b50909695505050505050565b600080600080600060a086880312156134e057600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561351857600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561354457600080fd5b833561354f8161318d565b92506020840135915060408401356001600160401b0381111561357157600080fd5b61357d86828701613300565b9150509250925092565b60008060008060008060a087890312156135a057600080fd5b8635955060208701356001600160401b03808211156135be57600080fd5b6135ca8a838b016133e7565b9097509550604089013594506060890135935060808901359150808211156135f157600080fd5b508701601f8101891361360357600080fd5b613612898235602084016132a9565b9150509295509295509295565b60006020828403121561363157600080fd5b81356133208161318d565b60008060008060006080868803121561365457600080fd5b853594506020860135935060408601356001600160401b038082111561367957600080fd5b818801915088601f83011261368d57600080fd5b81358181111561369c57600080fd5b8960208285010111156136ae57600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e7257612e726136d9565b80516001600160601b038116811461371957600080fd5b919050565b8051801515811461371957600080fd5b600080600080600060a0868803121561374657600080fd5b61374f86613702565b9450602086015161375f8161318d565b60408701519094506005811061377457600080fd5b92506137826060870161371e565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137bd57600080fd5b6133208261371e565b6000806000606084860312156137db57600080fd5b835192506137eb6020850161371e565b91506137f96040850161371e565b90509250925092565b8082028115828204841417612e7257612e726136d9565b60008261383657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e7257612e726136d9565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b6000806040838503121561389857600080fd5b505080516020909101519092909150565b6000602082840312156138bb57600080fd5b5051919050565b600181811c908216806138d657607f821691505b6020821081036138f657634e487b7160e01b600052602260045260246000fd5b50919050565b83815260006020846020840152606060408401526000845461391d816138c2565b806060870152608060018084166000811461393f576001811461395b5761398b565b60ff19851660808a0152608084151560051b8a0101955061398b565b89600052602060002060005b858110156139825781548b8201860152908301908801613967565b8a016080019650505b50939a9950505050505050505050565b600082516139ad818460208701613376565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613a0757600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a346040830185876139ee565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613aa157600080fd5b613aaa88613702565b9650613ab86020890161371e565b955060408801519450606088015193506080880151925060a08801519150613ae260c0890161371e565b905092959891949750929550565b604081526000613b046040830185876139ee565b8281036020840152613b16818561339a565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611797576000816000526020600020601f850160051c81016020861015613b8d5750805b601f850160051c820191505b81811015613bac57828155600101613b99565b505050505050565b6001600160401b03831115613bcb57613bcb61323a565b613bdf83613bd983546138c2565b83613b64565b6000601f841160018114613c135760008515613bfb5750838201355b600019600387901b1c1916600186901b178355613c6d565b600083815260209020601f19861690835b82811015613c445786850135825560209485019460019092019101613c24565b5086821015613c615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613cbc57600080fd5b81516133208161318d565b600082601f830112613cd857600080fd5b815160206001600160401b03821115613cf357613cf361323a565b8160051b613d02828201613279565b9283528481018201928281019087851115613d1c57600080fd5b83870192505b84831015613d44578251613d358161318d565b82529183019190830190613d22565b979650505050505050565b80516137198161318d565b600060208284031215613d6c57600080fd5b81516001600160401b0380821115613d8357600080fd5b908301906101608286031215613d9857600080fd5b613da0613250565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613de857600080fd5b613df487828601613cc7565b60c08301525060e0838101519082015261010080840151908201526101209150613e1f828401613d4f565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e5157600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ece2f97e5f37049420403eea1739d27d704a432100da66c99ed49ffe1796440264736f6c63430008180033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commit. Note that justification string is a part of the commit.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "initialize(address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "title": "DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ], - "InvalidImplementation(address)": [ - { - "notice": "The `implementation` is not UUPS-compliant" - } - ] - }, - "events": { - "Upgraded(address)": { - "notice": "Emitted when the `implementation` has been successfully upgraded." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 17736, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 17739, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)7051" - }, - { - "astId": 17743, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)17675_storage)dyn_storage" - }, - { - "astId": 17747, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)17675_storage)dyn_storage": { - "base": "t_struct(Dispute)17675_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)17713_storage)dyn_storage": { - "base": "t_struct(Round)17713_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)17722_storage)dyn_storage": { - "base": "t_struct(Vote)17722_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)7051": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)17675_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassic.Dispute", - "members": [ - { - "astId": 17664, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)17713_storage)dyn_storage" - }, - { - "astId": 17666, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 17668, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 17672, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 17674, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)17713_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassic.Round", - "members": [ - { - "astId": 17679, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)17722_storage)dyn_storage" - }, - { - "astId": 17681, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 17685, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 17687, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 17689, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 17691, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 17695, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 17699, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 17705, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 17707, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 17710, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 17712, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)17722_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassic.Vote", - "members": [ - { - "astId": 17715, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 17717, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 17719, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 17721, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json deleted file mode 100644 index 90c310630..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - "transactionIndex": 1, - "gasUsed": "189732", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000004000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1e4647532736ec4a239971727f05a17b1bb50fc89c0ec7a8da6e34f4f5bfcc90", - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 96308536, - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", - "address": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x1e4647532736ec4a239971727f05a17b1bb50fc89c0ec7a8da6e34f4f5bfcc90" - } - ], - "blockNumber": 96308536, - "cumulativeGasUsed": "189732", - "status": 1, - "byzantium": true - }, - "args": [ - "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicUniversityProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220a67e53546ab2c83f023c185d90506ad48d4e7af6339cf6db0c4ed97ec9ed376f64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220a67e53546ab2c83f023c185d90506ad48d4e7af6339cf6db0c4ed97ec9ed376f64736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json deleted file mode 100644 index 39f0ecde3..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json +++ /dev/null @@ -1,1852 +0,0 @@ -{ - "address": "0xc4cC0274E55a9818f8cF42640B1De61d269425ad", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x4149c6d97f33a5198c03b3d25cc9eff18f21a31fb9b913e548c147dd8673c8af", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xc4cC0274E55a9818f8cF42640B1De61d269425ad", - "transactionIndex": 2, - "gasUsed": "3883385", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000004000000000000000000000000000000000000000000000000", - "blockHash": "0xeb27c3034461bca5d85683ab996e6fa547b791a3d6d3ad867f3e4401fd03b1c2", - "transactionHash": "0x4149c6d97f33a5198c03b3d25cc9eff18f21a31fb9b913e548c147dd8673c8af", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 179579705, - "transactionHash": "0x4149c6d97f33a5198c03b3d25cc9eff18f21a31fb9b913e548c147dd8673c8af", - "address": "0xc4cC0274E55a9818f8cF42640B1De61d269425ad", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 3, - "blockHash": "0xeb27c3034461bca5d85683ab996e6fa547b791a3d6d3ad867f3e4401fd03b1c2" - } - ], - "blockNumber": 179579705, - "cumulativeGasUsed": "3971991", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":\"DisputeKitClassic\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0xfe30d2fa9e1f882d77900894c0b4389e38f91b937e3c095f87bf255488cefd8b\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516143f36100fc600039600081816118130152818161183c0152611a3401526143f36000f3fe6080604052600436106102205760003560e01c80636d4cd8ea1161012e578063c0c53b8b116100ab578063f2f4eb261161006f578063f2f4eb2614610718578063f32ab92714610738578063f7e7d1fd1461076d578063f8abee101461078d578063fc6f8f16146107bd57600080fd5b8063c0c53b8b14610698578063d2b8035a146106b8578063da3beb8c146106d8578063e349ad301461058a578063e4c0aaf4146106f857600080fd5b8063a7cc08fe116100f2578063a7cc08fe146105e0578063b34bfaa81461062c578063b6ede54014610642578063ba66fde714610662578063be4676041461068257600080fd5b80636d4cd8ea1461054a578063751accd01461056a578063796490f91461058a5780637c04034e146105a05780638e426460146105c057600080fd5b80634b2f0ea0116101bc5780635a155ccd116101805780635a155ccd1461044f5780635c92e2f61461049057806365540b96146104b0578063675926f6146104dd57806369f3f041146104fd57600080fd5b80634b2f0ea0146103a45780634f1ef286146103b957806352d1902d146103cc57806354fd4d50146103e1578063564a565d1461042057600080fd5b80630855bbe9146102255780630baa64d11461025a5780630c340a241461027a5780631200aabc146102b25780631c3db16d146102ed5780631cc3423a1461032a5780632621b9a21461034a5780632d68efc914610364578063362c347914610384575b600080fd5b34801561023157600080fd5b50610245610240366004613814565b6107dd565b60405190151581526020015b60405180910390f35b34801561026657600080fd5b50610245610275366004613814565b6108a5565b34801561028657600080fd5b5060005461029a906001600160a01b031681565b6040516001600160a01b039091168152602001610251565b3480156102be57600080fd5b506102df6102cd366004613814565b60036020526000908152604090205481565b604051908152602001610251565b3480156102f957600080fd5b5061030d610308366004613814565b61091c565b604080519384529115156020840152151590820152606001610251565b34801561033657600080fd5b506102df6103453660046138d7565b610a8a565b34801561035657600080fd5b506004546102459060ff1681565b34801561037057600080fd5b5060075461029a906001600160a01b031681565b34801561039057600080fd5b506102df61039f36600461393b565b610aba565b6103b76103b2366004613978565b610f6f565b005b6103b76103c736600461399a565b6117ff565b3480156103d857600080fd5b506102df611a27565b3480156103ed57600080fd5b50610413604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102519190613a39565b34801561042c57600080fd5b5061044061043b366004613814565b611a85565b60405161025193929190613a4c565b34801561045b57600080fd5b5061024561046a366004613a6d565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b34801561049c57600080fd5b506103b76104ab366004613af1565b611b4b565b3480156104bc57600080fd5b506104d06104cb366004613814565b611b57565b6040516102519190613b43565b3480156104e957600080fd5b506102df6104f8366004613b86565b611c1b565b34801561050957600080fd5b5061051d610518366004613bc1565b611d5e565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610251565b34801561055657600080fd5b50610245610565366004613814565b611e16565b34801561057657600080fd5b506103b7610585366004613bed565b611f99565b34801561059657600080fd5b506102df61271081565b3480156105ac57600080fd5b506103b76105bb366004613c2f565b612065565b3480156105cc57600080fd5b506103b76105db366004613cb7565b61207c565b3480156105ec57600080fd5b506106006105fb366004613bc1565b6120c8565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610251565b34801561063857600080fd5b506102df614e2081565b34801561064e57600080fd5b506103b761065d366004613cd4565b61218e565b34801561066e57600080fd5b5061024561067d366004613bc1565b612381565b34801561068e57600080fd5b506102df61138881565b3480156106a457600080fd5b506103b76106b3366004613d5d565b61241c565b3480156106c457600080fd5b5061029a6106d3366004613978565b6124e6565b3480156106e457600080fd5b506102df6106f3366004613978565b612835565b34801561070457600080fd5b506103b7610713366004613cb7565b612988565b34801561072457600080fd5b5060015461029a906001600160a01b031681565b34801561074457600080fd5b50610758610753366004613978565b6129d4565b60408051928352602083019190915201610251565b34801561077957600080fd5b506103b7610788366004613cb7565b612a26565b34801561079957600080fd5b506102456107a8366004613814565b60066020526000908152604090205460ff1681565b3480156107c957600080fd5b506102df6107d8366004613814565b612af8565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190613d9d565b91509150600061085d85611b57565b90508051600014801561089c575061271061138861087b8585613dd7565b6108859190613dea565b61088f9190613e01565b6108998442613dd7565b10155b95945050505050565b6000818152600360205260408120546002805483929081106108c9576108c9613e23565b600091825260208220600590910201805490925082906108eb90600190613dd7565b815481106108fb576108fb613e23565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061094857610948613e23565b6000918252602082206005909102018054909250829061096a90600190613dd7565b8154811061097a5761097a613e23565b60009182526020909120600c90910201600381015460ff1694509050836109a55780600101546109a8565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156109f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1b9190613e65565b5090935060049250610a2b915050565b816004811115610a3d57610a3d613ece565b03610a80576000610a4d88611b57565b90508051600103610a7e5780600081518110610a6b57610a6b613e23565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2c9190613e65565b50935050505080610b845760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfb9190613ee4565b15610c395760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610b7b565b60008681526006602052604090205460ff16610c675760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110610c8b57610c8b613e23565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610cbf57610cbf613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3e9190613f36565b5050600087815260078401602052604090205490915060ff16610d88576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ecd565b808603610dfd576000868152600683016020526040902054610dab576000610df6565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610dec9190613dea565b610df69190613e01565b9450610ecd565b600081815260078301602052604090205460ff16610ecd5781600601600083600a01600181548110610e3157610e31613e23565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610e6757610e67613e23565b9060005260206000200154815260200190815260200160002054610e8b9190613f72565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610ec09190613dea565b610eca9190613e01565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610f6357600754610f14906001600160a01b038a811691889116612b24565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610f5a929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610f9357610f93613e23565b600091825260209091206002600590920201015460ff1615610fc75760405162461bcd60e51b8152600401610b7b90613f85565b600083815260036020526040812054600280549091908110610feb57610feb613e23565b90600052602060002090600502019050806001015483111561104f5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610b7b565b60008481526006602052604090205460ff1661107d5760405162461bcd60e51b8152600401610b7b90613eff565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190613d9d565b9150915081421015801561110157508042105b6111465760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610b7b565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab9190613f36565b505090508681036111c0576127109150611241565b6127106113886111d08686613dd7565b6111da9190613dea565b6111e49190613e01565b6111ee8542613dd7565b1061123b5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610b7b565b614e2091505b8454600090869061125490600190613dd7565b8154811061126457611264613e23565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156112c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e79190613fbc565b6112f19190613dd7565b60008a815260078401602052604090205490915060ff16156113555760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610b7b565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561139f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c39190613fbc565b905060006127106113d48784613dea565b6113de9190613e01565b6113e89083613f72565b60008c8152600686016020526040812054919250908211156114995760008c815260068601602052604090205434906114219084613dd7565b116114465760008c81526006860160205260409020546114419083613dd7565b611448565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611490929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906114c5908490613f72565b909155505060008c8152600686016020526040812080548392906114ea908490613f72565b909155505060008c815260068601602052604090205482116115bc5760008c81526006860160205260408120546009870180549192909161152c908490613f72565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156117c7578285600901546115d99190613dd7565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164b9190613ee4565b156116645760028a01805460ff19166001179055611747565b895460038b016000611677876001613f72565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b81526004016116f291815260200190565b602060405180830381865afa15801561170f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117339190613fbc565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117949392919061400f565b6000604051808303818588803b1580156117ad57600080fd5b505af11580156117c1573d6000803e3d6000fd5b50505050505b803411156117f0576117f06117dc8234613dd7565b6007543391906001600160a01b0316612b24565b50505050505050505050505050565b61180882612c0f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061188657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661187a60008051602061439e8339815191525490565b6001600160a01b031614155b156118a45760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118fe575060408051601f3d908101601f191682019092526118fb91810190613fbc565b60015b61192657604051630c76093760e01b81526001600160a01b0383166004820152602401610b7b565b60008051602061439e833981519152811461195757604051632a87526960e21b815260048101829052602401610b7b565b60008051602061439e8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a22576000836001600160a01b0316836040516119be91906140a9565b600060405180830381855af49150503d80600081146119f9576040519150601f19603f3d011682016040523d82523d6000602084013e6119fe565b606091505b5050905080611a20576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611a725760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061439e83398151915290565b60028181548110611a9557600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611ac890613fd5565b80601f0160208091040260200160405190810160405280929190818152602001828054611af490613fd5565b8015611b415780601f10611b1657610100808354040283529160200191611b41565b820191906000526020600020905b815481529060010190602001808311611b2457829003601f168201915b5050505050905083565b611a2084848484612c3c565b6000818152600360205260408120546002805460609392908110611b7d57611b7d613e23565b60009182526020822060059091020180549092508290611b9f90600190613dd7565b81548110611baf57611baf613e23565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c0d57602002820191906000526020600020905b815481526020019060010190808311611bf9575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c3f57611c3f613e23565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611c7357611c73613e23565b90600052602060002090600c02016000018681548110611c9557611c95613e23565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190613f36565b506003850154919350915060ff168015611d3b57508183600201541480611d3b5750805b15611d4e5761271094505050505061089c565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611d8f57611d8f613e23565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611dc357611dc3613e23565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e3a57611e3a613e23565b60009182526020822060059091020180549092508290611e5c90600190613dd7565b81548110611e6c57611e6c613e23565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ec7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eeb9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a91906140c5565b5050505050915050600081611f80578354611f86565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b03163314611fc35760405162461bcd60e51b8152600401610b7b90614131565b6000836001600160a01b03168383604051611fde91906140a9565b60006040518083038185875af1925050503d806000811461201b576040519150601f19603f3d011682016040523d82523d6000602084013e612020565b606091505b5050905080611a205760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610b7b565b61207486868686868633612f9f565b505050505050565b6000546001600160a01b031633146120a65760405162461bcd60e51b8152600401610b7b90614131565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a815260200190815260200160002054815481106120f6576120f6613e23565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061212a5761212a613e23565b90600052602060002090600c0201600001878154811061214c5761214c613e23565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146121b85760405162461bcd60e51b8152600401610b7b90614173565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612243858783614205565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ca9190613fbc565b6122d49190613dd7565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061236f908a908a908a906142c4565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123a5576123a5613e23565b600091825260208083208784526003600590930201918201905260408220548154919350839181106123d9576123d9613e23565b90600052602060002090600c020160000184815481106123fb576123fb613e23565b600091825260209091206004909102016003015460ff169695505050505050565b600160006124286136d0565b8054909150600160401b900460ff168061244f575080546001600160401b03808416911610155b1561246c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124988585856136f4565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146125135760405162461bcd60e51b8152600401610b7b90614173565b60008381526003602052604090205460028054859290811061253757612537613e23565b600091825260209091206002600590920201015460ff161561256b5760405162461bcd60e51b8152600401610b7b90613f85565b600084815260036020526040812054600280549192918390811061259157612591613e23565b60009182526020822060059091020180549092506125b190600190613dd7565b905060008260000182815481106125ca576125ca613e23565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561262f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265391906142fa565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c69190613e65565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561272a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061274e91906142fa565b98506001600160a01b03891661276a575050505050505061282e565b612775848c8b61373b565b1561282157604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612826565b600098505b505050505050505b5092915050565b60008281526003602052604081205460028054839290811061285957612859613e23565b6000918252602080832086845260036005909302019182019052604082205481549193508391811061288d5761288d613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa1580156128ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129109190613f36565b509150915082600401546000148061293f57508015801561293f57506000828152600284016020526040902054155b15612951576000945050505050612982565b80156129665750506004015491506129829050565b5060009081526002909101602052604090205491506129829050565b92915050565b6000546001600160a01b031633146129b25760405162461bcd60e51b8152600401610b7b90614131565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526003602052604081205460028054919291839081106129fa576129fa613e23565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612a326136d0565b8054909150600160401b900460ff1680612a59575080546001600160401b03808416911610155b15612a765760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b0d57612b0d613e23565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612b5357505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b8e57600080fd5b505af1158015612ba2573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612bf257600080fd5b505af1158015612c06573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612c395760405162461bcd60e51b8152600401610b7b90614131565b50565b600084815260036020526040902054600280548692908110612c6057612c60613e23565b600091825260209091206002600590920201015460ff1615612c945760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d029190613e65565b5090935060019250612d12915050565b816004811115612d2457612d24613ece565b14612d815760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610b7b565b82612dbe5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610b7b565b60008681526006602052604090205460ff16612dec5760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110612e1057612e10613e23565b60009182526020822060059091020180549092508290612e3290600190613dd7565b81548110612e4257612e42613e23565b90600052602060002090600c0201905060005b86811015612f38573382898984818110612e7157612e71613e23565b9050602002013581548110612e8857612e88613e23565b60009182526020909120600490910201546001600160a01b031614612eef5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610b7b565b8582898984818110612f0357612f03613e23565b9050602002013581548110612f1a57612f1a613e23565b60009182526020909120600160049092020181019190915501612e55565b5086869050816005016000828254612f509190613f72565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890612f8d908b908b908b90614349565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110612fc357612fc3613e23565b600091825260209091206002600590920201015460ff1615612ff75760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613041573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130659190613e65565b5090935060029250613075915050565b81600481111561308757613087613ece565b146130e25760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610b7b565b866131245760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610b7b565b60008981526006602052604090205460ff166131525760405162461bcd60e51b8152600401610b7b90613eff565b60008981526003602052604081205460028054909190811061317657613176613e23565b9060005260206000209060050201905080600101548711156131d15760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610b7b565b805460009082906131e490600190613dd7565b815481106131f4576131f4613e23565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d90613239908f9060040190815260200190565b60a060405180830381865afa158015613256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327a9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156132d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132f991906140c5565b5050505050915050600061330e8b8b8b610a8a565b905060005b8c811015613595576001600160a01b038916858f8f8481811061333857613338613e23565b905060200201358154811061334f5761334f613e23565b60009182526020909120600490910201546001600160a01b0316146133b65760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610b7b565b8215806133fd575081858f8f848181106133d2576133d2613e23565b90506020020135815481106133e9576133e9613e23565b906000526020600020906004020160010154145b61347d5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610b7b565b848e8e8381811061349057613490613e23565b90506020020135815481106134a7576134a7613e23565b600091825260209091206003600490920201015460ff16156135005760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610b7b565b8b858f8f8481811061351457613514613e23565b905060200201358154811061352b5761352b613e23565b60009182526020909120600260049092020101556001858f8f8481811061355457613554613e23565b905060200201358154811061356b5761356b613e23565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613313565b5050506004820180548b92506000906135af908490613f72565b90915550506000888152600282016020526040812080548b92906135d4908490613f72565b90915550506001810154880361360357600381015460ff16156135fe5760038101805460ff191690555b61367c565b60018101546000908152600282016020526040808220548a83529120540361364557600381015460ff166135fe5760038101805460ff1916600117905561367c565b60018101546000908152600282016020526040808220548a8352912054111561367c576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516136bb9392919061436d565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6136fc6137d3565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156137c957600083815260036020526040812054600280549192918390811061376f5761376f613e23565b600091825260208220600590910201805490925061378f90600190613dd7565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610ab3915050565b5060019392505050565b6137db6137fa565b6137f857604051631afcd79f60e31b815260040160405180910390fd5b565b60006138046136d0565b54600160401b900460ff16919050565b60006020828403121561382657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261385457600080fd5b8135602083016000806001600160401b038411156138745761387461382d565b50604051601f19601f85018116603f011681018181106001600160401b03821117156138a2576138a261382d565b6040528381529050808284018710156138ba57600080fd5b838360208301376000602085830101528094505050505092915050565b6000806000606084860312156138ec57600080fd5b833592506020840135915060408401356001600160401b0381111561391057600080fd5b61391c86828701613843565b9150509250925092565b6001600160a01b0381168114612c3957600080fd5b6000806000806080858703121561395157600080fd5b84359350602085013561396381613926565b93969395505050506040820135916060013590565b6000806040838503121561398b57600080fd5b50508035926020909101359150565b600080604083850312156139ad57600080fd5b82356139b881613926565b915060208301356001600160401b038111156139d357600080fd5b6139df85828601613843565b9150509250929050565b60005b83811015613a045781810151838201526020016139ec565b50506000910152565b60008151808452613a258160208601602086016139e9565b601f01601f19169290920160200192915050565b602081526000610ab36020830184613a0d565b838152821515602082015260606040820152600061089c6060830184613a0d565b600080600060608486031215613a8257600080fd5b83359250602084013591506040840135613a9b81613926565b809150509250925092565b60008083601f840112613ab857600080fd5b5081356001600160401b03811115613acf57600080fd5b6020830191508360208260051b8501011115613aea57600080fd5b9250929050565b60008060008060608587031215613b0757600080fd5b8435935060208501356001600160401b03811115613b2457600080fd5b613b3087828801613aa6565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613b7b578351835260209384019390920191600101613b5d565b509095945050505050565b600080600080600060a08688031215613b9e57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613bd657600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613c0257600080fd5b8335613c0d81613926565b92506020840135915060408401356001600160401b0381111561391057600080fd5b60008060008060008060a08789031215613c4857600080fd5b8635955060208701356001600160401b03811115613c6557600080fd5b613c7189828a01613aa6565b909650945050604087013592506060870135915060808701356001600160401b03811115613c9e57600080fd5b613caa89828a01613843565b9150509295509295509295565b600060208284031215613cc957600080fd5b8135610ab381613926565b600080600080600060808688031215613cec57600080fd5b853594506020860135935060408601356001600160401b03811115613d1057600080fd5b8601601f81018813613d2157600080fd5b80356001600160401b03811115613d3757600080fd5b886020828401011115613d4957600080fd5b959894975060200195606001359392505050565b600080600060608486031215613d7257600080fd5b8335613d7d81613926565b92506020840135613d8d81613926565b91506040840135613a9b81613926565b60008060408385031215613db057600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b8181038181111561298257612982613dc1565b808202811582820484141761298257612982613dc1565b600082613e1e57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b0381168114613e5057600080fd5b919050565b80518015158114613e5057600080fd5b600080600080600060a08688031215613e7d57600080fd5b613e8686613e39565b94506020860151613e9681613926565b604087015190945060058110613eab57600080fd5b9250613eb960608701613e55565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613ef657600080fd5b610ab382613e55565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b600080600060608486031215613f4b57600080fd5b83519250613f5b60208501613e55565b9150613f6960408501613e55565b90509250925092565b8082018082111561298257612982613dc1565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600060208284031215613fce57600080fd5b5051919050565b600181811c90821680613fe957607f821691505b60208210810361400957634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461402d81613fd5565b806060860152600182166000811461404c57600181146140685761409c565b60ff1983166080870152608082151560051b870101935061409c565b86600052602060002060005b8381101561409357815488820160800152600190910190602001614074565b87016080019450505b5091979650505050505050565b600082516140bb8184602087016139e9565b9190910192915050565b600080600080600080600060e0888a0312156140e057600080fd5b6140e988613e39565b96506140f760208901613e55565b604089015160608a015160808b015160a08c015193995091975095509350915061412360c08901613e55565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a2257806000526020600020601f840160051c810160208510156141de5750805b601f840160051c820191505b818110156141fe57600081556001016141ea565b5050505050565b6001600160401b0383111561421c5761421c61382d565b6142308361422a8354613fd5565b836141b7565b6000601f841160018114614264576000851561424c5750838201355b600019600387901b1c1916600186901b1783556141fe565b600083815260209020601f19861690835b828110156142955786850135825560209485019460019092019101614275565b50868210156142b25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60006020828403121561430c57600080fd5b8151610ab381613926565b81835260006001600160fb1b0383111561433057600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061435d604083018587614317565b9050826020830152949350505050565b604081526000614381604083018587614317565b82810360208401526143938185613a0d565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205273a7fd5d9b74f6a10c8e8ff9173490991e595b881e9a1f0a7986976eaa245264736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102205760003560e01c80636d4cd8ea1161012e578063c0c53b8b116100ab578063f2f4eb261161006f578063f2f4eb2614610718578063f32ab92714610738578063f7e7d1fd1461076d578063f8abee101461078d578063fc6f8f16146107bd57600080fd5b8063c0c53b8b14610698578063d2b8035a146106b8578063da3beb8c146106d8578063e349ad301461058a578063e4c0aaf4146106f857600080fd5b8063a7cc08fe116100f2578063a7cc08fe146105e0578063b34bfaa81461062c578063b6ede54014610642578063ba66fde714610662578063be4676041461068257600080fd5b80636d4cd8ea1461054a578063751accd01461056a578063796490f91461058a5780637c04034e146105a05780638e426460146105c057600080fd5b80634b2f0ea0116101bc5780635a155ccd116101805780635a155ccd1461044f5780635c92e2f61461049057806365540b96146104b0578063675926f6146104dd57806369f3f041146104fd57600080fd5b80634b2f0ea0146103a45780634f1ef286146103b957806352d1902d146103cc57806354fd4d50146103e1578063564a565d1461042057600080fd5b80630855bbe9146102255780630baa64d11461025a5780630c340a241461027a5780631200aabc146102b25780631c3db16d146102ed5780631cc3423a1461032a5780632621b9a21461034a5780632d68efc914610364578063362c347914610384575b600080fd5b34801561023157600080fd5b50610245610240366004613814565b6107dd565b60405190151581526020015b60405180910390f35b34801561026657600080fd5b50610245610275366004613814565b6108a5565b34801561028657600080fd5b5060005461029a906001600160a01b031681565b6040516001600160a01b039091168152602001610251565b3480156102be57600080fd5b506102df6102cd366004613814565b60036020526000908152604090205481565b604051908152602001610251565b3480156102f957600080fd5b5061030d610308366004613814565b61091c565b604080519384529115156020840152151590820152606001610251565b34801561033657600080fd5b506102df6103453660046138d7565b610a8a565b34801561035657600080fd5b506004546102459060ff1681565b34801561037057600080fd5b5060075461029a906001600160a01b031681565b34801561039057600080fd5b506102df61039f36600461393b565b610aba565b6103b76103b2366004613978565b610f6f565b005b6103b76103c736600461399a565b6117ff565b3480156103d857600080fd5b506102df611a27565b3480156103ed57600080fd5b50610413604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102519190613a39565b34801561042c57600080fd5b5061044061043b366004613814565b611a85565b60405161025193929190613a4c565b34801561045b57600080fd5b5061024561046a366004613a6d565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b34801561049c57600080fd5b506103b76104ab366004613af1565b611b4b565b3480156104bc57600080fd5b506104d06104cb366004613814565b611b57565b6040516102519190613b43565b3480156104e957600080fd5b506102df6104f8366004613b86565b611c1b565b34801561050957600080fd5b5061051d610518366004613bc1565b611d5e565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610251565b34801561055657600080fd5b50610245610565366004613814565b611e16565b34801561057657600080fd5b506103b7610585366004613bed565b611f99565b34801561059657600080fd5b506102df61271081565b3480156105ac57600080fd5b506103b76105bb366004613c2f565b612065565b3480156105cc57600080fd5b506103b76105db366004613cb7565b61207c565b3480156105ec57600080fd5b506106006105fb366004613bc1565b6120c8565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610251565b34801561063857600080fd5b506102df614e2081565b34801561064e57600080fd5b506103b761065d366004613cd4565b61218e565b34801561066e57600080fd5b5061024561067d366004613bc1565b612381565b34801561068e57600080fd5b506102df61138881565b3480156106a457600080fd5b506103b76106b3366004613d5d565b61241c565b3480156106c457600080fd5b5061029a6106d3366004613978565b6124e6565b3480156106e457600080fd5b506102df6106f3366004613978565b612835565b34801561070457600080fd5b506103b7610713366004613cb7565b612988565b34801561072457600080fd5b5060015461029a906001600160a01b031681565b34801561074457600080fd5b50610758610753366004613978565b6129d4565b60408051928352602083019190915201610251565b34801561077957600080fd5b506103b7610788366004613cb7565b612a26565b34801561079957600080fd5b506102456107a8366004613814565b60066020526000908152604090205460ff1681565b3480156107c957600080fd5b506102df6107d8366004613814565b612af8565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190613d9d565b91509150600061085d85611b57565b90508051600014801561089c575061271061138861087b8585613dd7565b6108859190613dea565b61088f9190613e01565b6108998442613dd7565b10155b95945050505050565b6000818152600360205260408120546002805483929081106108c9576108c9613e23565b600091825260208220600590910201805490925082906108eb90600190613dd7565b815481106108fb576108fb613e23565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061094857610948613e23565b6000918252602082206005909102018054909250829061096a90600190613dd7565b8154811061097a5761097a613e23565b60009182526020909120600c90910201600381015460ff1694509050836109a55780600101546109a8565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156109f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1b9190613e65565b5090935060049250610a2b915050565b816004811115610a3d57610a3d613ece565b03610a80576000610a4d88611b57565b90508051600103610a7e5780600081518110610a6b57610a6b613e23565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2c9190613e65565b50935050505080610b845760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfb9190613ee4565b15610c395760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610b7b565b60008681526006602052604090205460ff16610c675760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110610c8b57610c8b613e23565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610cbf57610cbf613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3e9190613f36565b5050600087815260078401602052604090205490915060ff16610d88576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ecd565b808603610dfd576000868152600683016020526040902054610dab576000610df6565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610dec9190613dea565b610df69190613e01565b9450610ecd565b600081815260078301602052604090205460ff16610ecd5781600601600083600a01600181548110610e3157610e31613e23565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610e6757610e67613e23565b9060005260206000200154815260200190815260200160002054610e8b9190613f72565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610ec09190613dea565b610eca9190613e01565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610f6357600754610f14906001600160a01b038a811691889116612b24565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610f5a929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610f9357610f93613e23565b600091825260209091206002600590920201015460ff1615610fc75760405162461bcd60e51b8152600401610b7b90613f85565b600083815260036020526040812054600280549091908110610feb57610feb613e23565b90600052602060002090600502019050806001015483111561104f5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610b7b565b60008481526006602052604090205460ff1661107d5760405162461bcd60e51b8152600401610b7b90613eff565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190613d9d565b9150915081421015801561110157508042105b6111465760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610b7b565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab9190613f36565b505090508681036111c0576127109150611241565b6127106113886111d08686613dd7565b6111da9190613dea565b6111e49190613e01565b6111ee8542613dd7565b1061123b5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610b7b565b614e2091505b8454600090869061125490600190613dd7565b8154811061126457611264613e23565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156112c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e79190613fbc565b6112f19190613dd7565b60008a815260078401602052604090205490915060ff16156113555760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610b7b565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561139f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c39190613fbc565b905060006127106113d48784613dea565b6113de9190613e01565b6113e89083613f72565b60008c8152600686016020526040812054919250908211156114995760008c815260068601602052604090205434906114219084613dd7565b116114465760008c81526006860160205260409020546114419083613dd7565b611448565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611490929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906114c5908490613f72565b909155505060008c8152600686016020526040812080548392906114ea908490613f72565b909155505060008c815260068601602052604090205482116115bc5760008c81526006860160205260408120546009870180549192909161152c908490613f72565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156117c7578285600901546115d99190613dd7565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164b9190613ee4565b156116645760028a01805460ff19166001179055611747565b895460038b016000611677876001613f72565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b81526004016116f291815260200190565b602060405180830381865afa15801561170f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117339190613fbc565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117949392919061400f565b6000604051808303818588803b1580156117ad57600080fd5b505af11580156117c1573d6000803e3d6000fd5b50505050505b803411156117f0576117f06117dc8234613dd7565b6007543391906001600160a01b0316612b24565b50505050505050505050505050565b61180882612c0f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061188657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661187a60008051602061439e8339815191525490565b6001600160a01b031614155b156118a45760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118fe575060408051601f3d908101601f191682019092526118fb91810190613fbc565b60015b61192657604051630c76093760e01b81526001600160a01b0383166004820152602401610b7b565b60008051602061439e833981519152811461195757604051632a87526960e21b815260048101829052602401610b7b565b60008051602061439e8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a22576000836001600160a01b0316836040516119be91906140a9565b600060405180830381855af49150503d80600081146119f9576040519150601f19603f3d011682016040523d82523d6000602084013e6119fe565b606091505b5050905080611a20576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611a725760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061439e83398151915290565b60028181548110611a9557600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611ac890613fd5565b80601f0160208091040260200160405190810160405280929190818152602001828054611af490613fd5565b8015611b415780601f10611b1657610100808354040283529160200191611b41565b820191906000526020600020905b815481529060010190602001808311611b2457829003601f168201915b5050505050905083565b611a2084848484612c3c565b6000818152600360205260408120546002805460609392908110611b7d57611b7d613e23565b60009182526020822060059091020180549092508290611b9f90600190613dd7565b81548110611baf57611baf613e23565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c0d57602002820191906000526020600020905b815481526020019060010190808311611bf9575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c3f57611c3f613e23565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611c7357611c73613e23565b90600052602060002090600c02016000018681548110611c9557611c95613e23565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190613f36565b506003850154919350915060ff168015611d3b57508183600201541480611d3b5750805b15611d4e5761271094505050505061089c565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611d8f57611d8f613e23565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611dc357611dc3613e23565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e3a57611e3a613e23565b60009182526020822060059091020180549092508290611e5c90600190613dd7565b81548110611e6c57611e6c613e23565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ec7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eeb9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a91906140c5565b5050505050915050600081611f80578354611f86565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b03163314611fc35760405162461bcd60e51b8152600401610b7b90614131565b6000836001600160a01b03168383604051611fde91906140a9565b60006040518083038185875af1925050503d806000811461201b576040519150601f19603f3d011682016040523d82523d6000602084013e612020565b606091505b5050905080611a205760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610b7b565b61207486868686868633612f9f565b505050505050565b6000546001600160a01b031633146120a65760405162461bcd60e51b8152600401610b7b90614131565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a815260200190815260200160002054815481106120f6576120f6613e23565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061212a5761212a613e23565b90600052602060002090600c0201600001878154811061214c5761214c613e23565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146121b85760405162461bcd60e51b8152600401610b7b90614173565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612243858783614205565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ca9190613fbc565b6122d49190613dd7565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061236f908a908a908a906142c4565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123a5576123a5613e23565b600091825260208083208784526003600590930201918201905260408220548154919350839181106123d9576123d9613e23565b90600052602060002090600c020160000184815481106123fb576123fb613e23565b600091825260209091206004909102016003015460ff169695505050505050565b600160006124286136d0565b8054909150600160401b900460ff168061244f575080546001600160401b03808416911610155b1561246c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124988585856136f4565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146125135760405162461bcd60e51b8152600401610b7b90614173565b60008381526003602052604090205460028054859290811061253757612537613e23565b600091825260209091206002600590920201015460ff161561256b5760405162461bcd60e51b8152600401610b7b90613f85565b600084815260036020526040812054600280549192918390811061259157612591613e23565b60009182526020822060059091020180549092506125b190600190613dd7565b905060008260000182815481106125ca576125ca613e23565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561262f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265391906142fa565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c69190613e65565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561272a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061274e91906142fa565b98506001600160a01b03891661276a575050505050505061282e565b612775848c8b61373b565b1561282157604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612826565b600098505b505050505050505b5092915050565b60008281526003602052604081205460028054839290811061285957612859613e23565b6000918252602080832086845260036005909302019182019052604082205481549193508391811061288d5761288d613e23565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa1580156128ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129109190613f36565b509150915082600401546000148061293f57508015801561293f57506000828152600284016020526040902054155b15612951576000945050505050612982565b80156129665750506004015491506129829050565b5060009081526002909101602052604090205491506129829050565b92915050565b6000546001600160a01b031633146129b25760405162461bcd60e51b8152600401610b7b90614131565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526003602052604081205460028054919291839081106129fa576129fa613e23565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612a326136d0565b8054909150600160401b900460ff1680612a59575080546001600160401b03808416911610155b15612a765760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b0d57612b0d613e23565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612b5357505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b8e57600080fd5b505af1158015612ba2573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612bf257600080fd5b505af1158015612c06573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612c395760405162461bcd60e51b8152600401610b7b90614131565b50565b600084815260036020526040902054600280548692908110612c6057612c60613e23565b600091825260209091206002600590920201015460ff1615612c945760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d029190613e65565b5090935060019250612d12915050565b816004811115612d2457612d24613ece565b14612d815760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610b7b565b82612dbe5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610b7b565b60008681526006602052604090205460ff16612dec5760405162461bcd60e51b8152600401610b7b90613eff565b600086815260036020526040812054600280549091908110612e1057612e10613e23565b60009182526020822060059091020180549092508290612e3290600190613dd7565b81548110612e4257612e42613e23565b90600052602060002090600c0201905060005b86811015612f38573382898984818110612e7157612e71613e23565b9050602002013581548110612e8857612e88613e23565b60009182526020909120600490910201546001600160a01b031614612eef5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610b7b565b8582898984818110612f0357612f03613e23565b9050602002013581548110612f1a57612f1a613e23565b60009182526020909120600160049092020181019190915501612e55565b5086869050816005016000828254612f509190613f72565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890612f8d908b908b908b90614349565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110612fc357612fc3613e23565b600091825260209091206002600590920201015460ff1615612ff75760405162461bcd60e51b8152600401610b7b90613f85565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613041573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130659190613e65565b5090935060029250613075915050565b81600481111561308757613087613ece565b146130e25760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610b7b565b866131245760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610b7b565b60008981526006602052604090205460ff166131525760405162461bcd60e51b8152600401610b7b90613eff565b60008981526003602052604081205460028054909190811061317657613176613e23565b9060005260206000209060050201905080600101548711156131d15760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610b7b565b805460009082906131e490600190613dd7565b815481106131f4576131f4613e23565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d90613239908f9060040190815260200190565b60a060405180830381865afa158015613256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327a9190613e65565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156132d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132f991906140c5565b5050505050915050600061330e8b8b8b610a8a565b905060005b8c811015613595576001600160a01b038916858f8f8481811061333857613338613e23565b905060200201358154811061334f5761334f613e23565b60009182526020909120600490910201546001600160a01b0316146133b65760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610b7b565b8215806133fd575081858f8f848181106133d2576133d2613e23565b90506020020135815481106133e9576133e9613e23565b906000526020600020906004020160010154145b61347d5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610b7b565b848e8e8381811061349057613490613e23565b90506020020135815481106134a7576134a7613e23565b600091825260209091206003600490920201015460ff16156135005760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610b7b565b8b858f8f8481811061351457613514613e23565b905060200201358154811061352b5761352b613e23565b60009182526020909120600260049092020101556001858f8f8481811061355457613554613e23565b905060200201358154811061356b5761356b613e23565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613313565b5050506004820180548b92506000906135af908490613f72565b90915550506000888152600282016020526040812080548b92906135d4908490613f72565b90915550506001810154880361360357600381015460ff16156135fe5760038101805460ff191690555b61367c565b60018101546000908152600282016020526040808220548a83529120540361364557600381015460ff166135fe5760038101805460ff1916600117905561367c565b60018101546000908152600282016020526040808220548a8352912054111561367c576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516136bb9392919061436d565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6136fc6137d3565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156137c957600083815260036020526040812054600280549192918390811061376f5761376f613e23565b600091825260208220600590910201805490925061378f90600190613dd7565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610ab3915050565b5060019392505050565b6137db6137fa565b6137f857604051631afcd79f60e31b815260040160405180910390fd5b565b60006138046136d0565b54600160401b900460ff16919050565b60006020828403121561382657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261385457600080fd5b8135602083016000806001600160401b038411156138745761387461382d565b50604051601f19601f85018116603f011681018181106001600160401b03821117156138a2576138a261382d565b6040528381529050808284018710156138ba57600080fd5b838360208301376000602085830101528094505050505092915050565b6000806000606084860312156138ec57600080fd5b833592506020840135915060408401356001600160401b0381111561391057600080fd5b61391c86828701613843565b9150509250925092565b6001600160a01b0381168114612c3957600080fd5b6000806000806080858703121561395157600080fd5b84359350602085013561396381613926565b93969395505050506040820135916060013590565b6000806040838503121561398b57600080fd5b50508035926020909101359150565b600080604083850312156139ad57600080fd5b82356139b881613926565b915060208301356001600160401b038111156139d357600080fd5b6139df85828601613843565b9150509250929050565b60005b83811015613a045781810151838201526020016139ec565b50506000910152565b60008151808452613a258160208601602086016139e9565b601f01601f19169290920160200192915050565b602081526000610ab36020830184613a0d565b838152821515602082015260606040820152600061089c6060830184613a0d565b600080600060608486031215613a8257600080fd5b83359250602084013591506040840135613a9b81613926565b809150509250925092565b60008083601f840112613ab857600080fd5b5081356001600160401b03811115613acf57600080fd5b6020830191508360208260051b8501011115613aea57600080fd5b9250929050565b60008060008060608587031215613b0757600080fd5b8435935060208501356001600160401b03811115613b2457600080fd5b613b3087828801613aa6565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613b7b578351835260209384019390920191600101613b5d565b509095945050505050565b600080600080600060a08688031215613b9e57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613bd657600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613c0257600080fd5b8335613c0d81613926565b92506020840135915060408401356001600160401b0381111561391057600080fd5b60008060008060008060a08789031215613c4857600080fd5b8635955060208701356001600160401b03811115613c6557600080fd5b613c7189828a01613aa6565b909650945050604087013592506060870135915060808701356001600160401b03811115613c9e57600080fd5b613caa89828a01613843565b9150509295509295509295565b600060208284031215613cc957600080fd5b8135610ab381613926565b600080600080600060808688031215613cec57600080fd5b853594506020860135935060408601356001600160401b03811115613d1057600080fd5b8601601f81018813613d2157600080fd5b80356001600160401b03811115613d3757600080fd5b886020828401011115613d4957600080fd5b959894975060200195606001359392505050565b600080600060608486031215613d7257600080fd5b8335613d7d81613926565b92506020840135613d8d81613926565b91506040840135613a9b81613926565b60008060408385031215613db057600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b8181038181111561298257612982613dc1565b808202811582820484141761298257612982613dc1565b600082613e1e57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b0381168114613e5057600080fd5b919050565b80518015158114613e5057600080fd5b600080600080600060a08688031215613e7d57600080fd5b613e8686613e39565b94506020860151613e9681613926565b604087015190945060058110613eab57600080fd5b9250613eb960608701613e55565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613ef657600080fd5b610ab382613e55565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b600080600060608486031215613f4b57600080fd5b83519250613f5b60208501613e55565b9150613f6960408501613e55565b90509250925092565b8082018082111561298257612982613dc1565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600060208284031215613fce57600080fd5b5051919050565b600181811c90821680613fe957607f821691505b60208210810361400957634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461402d81613fd5565b806060860152600182166000811461404c57600181146140685761409c565b60ff1983166080870152608082151560051b870101935061409c565b86600052602060002060005b8381101561409357815488820160800152600190910190602001614074565b87016080019450505b5091979650505050505050565b600082516140bb8184602087016139e9565b9190910192915050565b600080600080600080600060e0888a0312156140e057600080fd5b6140e988613e39565b96506140f760208901613e55565b604089015160608a015160808b015160a08c015193995091975095509350915061412360c08901613e55565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a2257806000526020600020601f840160051c810160208510156141de5750805b601f840160051c820191505b818110156141fe57600081556001016141ea565b5050505050565b6001600160401b0383111561421c5761421c61382d565b6142308361422a8354613fd5565b836141b7565b6000601f841160018114614264576000851561424c5750838201355b600019600387901b1c1916600186901b1783556141fe565b600083815260209020601f19861690835b828110156142955786850135825560209485019460019092019101614275565b50868210156142b25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60006020828403121561430c57600080fd5b8151610ab381613926565b81835260006001600160fb1b0383111561433057600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061435d604083018587614317565b9050826020830152949350505050565b604081526000614381604083018587614317565b82810360208401526143938185613a0d565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205273a7fd5d9b74f6a10c8e8ff9173490991e595b881e9a1f0a7986976eaa245264736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 6613, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6616, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)303" - }, - { - "astId": 6620, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)6552_storage)dyn_storage" - }, - { - "astId": 6624, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6626, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 6634, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 6638, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6640, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)6552_storage)dyn_storage": { - "base": "t_struct(Dispute)6552_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)6590_storage)dyn_storage": { - "base": "t_struct(Round)6590_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)6599_storage)dyn_storage": { - "base": "t_struct(Vote)6599_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)303": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)6552_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 6541, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)6590_storage)dyn_storage" - }, - { - "astId": 6543, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6545, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 6549, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6551, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)6590_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 6556, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)6599_storage)dyn_storage" - }, - { - "astId": 6558, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6562, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6564, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 6566, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6568, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 6572, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6576, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6582, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 6584, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 6587, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 6589, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)6599_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 6592, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6594, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 6596, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 6598, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json deleted file mode 100644 index 4244ee9a6..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xddd435d6586de97d05fb1ca32d0fd490f427c086be46ab9f8622e55f7f039a05", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", - "transactionIndex": 2, - "gasUsed": "178492", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1f6c9d41489286adf1bc958881c75266eb876f784c07d3d303dc1e60445852a2", - "transactionHash": "0xddd435d6586de97d05fb1ca32d0fd490f427c086be46ab9f8622e55f7f039a05", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175286074, - "transactionHash": "0xddd435d6586de97d05fb1ca32d0fd490f427c086be46ab9f8622e55f7f039a05", - "address": "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0x1f6c9d41489286adf1bc958881c75266eb876f784c07d3d303dc1e60445852a2" - } - ], - "blockNumber": 175286074, - "cumulativeGasUsed": "205532", - "status": 1, - "byzantium": true - }, - "args": [ - "0xD76E74049003faCe2EBA0B6FB61DFC9941da959F", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c725b686c35c73323e89d3a1c5ad844b99f0379163dce99bcd79b25231551a8164736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c725b686c35c73323e89d3a1c5ad844b99f0379163dce99bcd79b25231551a8164736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json deleted file mode 100644 index 7e322c6e0..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json +++ /dev/null @@ -1,1238 +0,0 @@ -{ - "address": "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "extraDataToTokenInfo", - "outputs": [ - { - "internalType": "address", - "name": "tokenGate", - "type": "address" - }, - { - "internalType": "bool", - "name": "isERC1155", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x2b88866107b599692b44d16247e2edad04c010db28b465ebec598fe304ee8179", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", - "transactionIndex": 1, - "gasUsed": "198526", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000004000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1a56f340e250ea8b08564ba8d0c52a7a1772cbd4aea06c22dc494aad1cd0e306", - "transactionHash": "0x2b88866107b599692b44d16247e2edad04c010db28b465ebec598fe304ee8179", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 175286139, - "transactionHash": "0x2b88866107b599692b44d16247e2edad04c010db28b465ebec598fe304ee8179", - "address": "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x1a56f340e250ea8b08564ba8d0c52a7a1772cbd4aea06c22dc494aad1cd0e306" - } - ], - "blockNumber": 175286139, - "cumulativeGasUsed": "198526", - "status": 1, - "byzantium": true - }, - "args": [ - "0x89BF27c2148873E0ae4d8c6253C2e4423dF959aF", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000001bd44c4a4511dbfa7dc1d5bc201635596e7200f9" - ], - "numDeployments": 3, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0x3829A2486d53ee984a0ca2D76552715726b77138" - ] - }, - "implementation": "0xA27EedcEA916BC1ab91720cE70c56666E854F55e", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json deleted file mode 100644 index 41a1c17c2..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json +++ /dev/null @@ -1,1312 +0,0 @@ -{ - "address": "0xd86b84eb36Cd48f3f384b4490F255b494385F429", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xd5d3539eb5177d722b08883ccc20611d6fcec5290c8d03edb8f1f96531503b67", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd86b84eb36Cd48f3f384b4490F255b494385F429", - "transactionIndex": 2, - "gasUsed": "198372", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000100000000000000000", - "blockHash": "0xf7ea7281647fcffe6def1674d78723b7c84df6822ae5d1688641b0f3546c137c", - "transactionHash": "0xd5d3539eb5177d722b08883ccc20611d6fcec5290c8d03edb8f1f96531503b67", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175286153, - "transactionHash": "0xd5d3539eb5177d722b08883ccc20611d6fcec5290c8d03edb8f1f96531503b67", - "address": "0xd86b84eb36Cd48f3f384b4490F255b494385F429", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 8, - "blockHash": "0xf7ea7281647fcffe6def1674d78723b7c84df6822ae5d1688641b0f3546c137c" - } - ], - "blockNumber": 175286153, - "cumulativeGasUsed": "447448", - "status": 1, - "byzantium": true - }, - "args": [ - "0xAcf0eAa29419EA5523d0b672267781b09e69eD1d", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000001bd44c4a4511dbfa7dc1d5bc201635596e7200f9" - ], - "numDeployments": 3, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0x3829A2486d53ee984a0ca2D76552715726b77138" - ] - }, - "implementation": "0x56199F9E5C0ef9251A251a41597A971141199EDF", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Implementation.json deleted file mode 100644 index 9985df52b..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Implementation.json +++ /dev/null @@ -1,1975 +0,0 @@ -{ - "address": "0x56199F9E5C0ef9251A251a41597A971141199EDF", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x06e5fa1c601a4db5a4855b05dbe74f88ea7c34e259ee5695cf57ab553b23d13b", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x56199F9E5C0ef9251A251a41597A971141199EDF", - "transactionIndex": 3, - "gasUsed": "4143927", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000200000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4e62bcd900a0bd849eeefecd3bda0ea28b2be4826630b74303bf93eaf8ed4823", - "transactionHash": "0x06e5fa1c601a4db5a4855b05dbe74f88ea7c34e259ee5695cf57ab553b23d13b", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 179579961, - "transactionHash": "0x06e5fa1c601a4db5a4855b05dbe74f88ea7c34e259ee5695cf57ab553b23d13b", - "address": "0x56199F9E5C0ef9251A251a41597A971141199EDF", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 5, - "blockHash": "0x4e62bcd900a0bd849eeefecd3bda0ea28b2be4826630b74303bf93eaf8ed4823" - } - ], - "blockNumber": 179579961, - "cumulativeGasUsed": "4468808", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 3, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"CommitCastShutter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"castCommitShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVoteShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"CommitCastShutter(uint256,address,bytes32,bytes32,bytes)\":{\"details\":\"Emitted when a vote is cast.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_juror\":\"The address of the juror casting the vote commitment.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash including the justification.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encoding\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitGatedShutter Added functionality: shielded voting. Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitGatedShutter.sol\":\"DisputeKitGatedShutter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitGatedShutter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\ninterface IBalanceHolder {\\n /// @dev Returns the number of tokens in `owner` account.\\n /// @dev Compatible with ERC-20 and ERC-721.\\n /// @param owner The address of the owner.\\n /// @return balance The number of tokens in `owner` account.\\n function balanceOf(address owner) external view returns (uint256 balance);\\n}\\n\\ninterface IBalanceHolderERC1155 {\\n /// @dev Returns the balance of an ERC-1155 token.\\n /// @param account The address of the token holder\\n /// @param id ID of the token\\n /// @return The token balance\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\\n/// @title DisputeKitGatedShutter\\n/// Added functionality: shielded voting.\\n/// Dispute kit implementation adapted from DisputeKitClassic\\n/// - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitGatedShutter is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a vote is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _commit The commitment hash.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n event CommitCastShutter(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n bytes32 indexed _commit,\\n bytes32 _identity,\\n bytes _encryptedVote\\n );\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash including the justification.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n function castCommitShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit,\\n bytes32 _identity,\\n bytes calldata _encryptedVote\\n ) external notJumped(_coreDisputeID) {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n emit CommitCastShutter(_coreDisputeID, msg.sender, _commit, _identity, _encryptedVote);\\n }\\n\\n function castVoteShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n address juror = dispute.rounds[dispute.rounds.length - 1].votes[_voteIDs[0]].account;\\n\\n // _castVote() ensures that all the _voteIDs do belong to `juror`\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, juror);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure override returns (bytes32) {\\n bytes32 justificationHash = keccak256(bytes(_justification));\\n return keccak256(abi.encode(_choice, _salt, justificationHash));\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Extracts token gating information from the extra data.\\n /// @param _extraData The extra data bytes array with the following encoding:\\n /// - bytes 0-31: uint96 courtID, not used here\\n /// - bytes 32-63: uint256 minJurors, not used here\\n /// - bytes 64-95: uint256 disputeKitID, not used here\\n /// - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160)\\n /// - bytes 128-159: uint256 tokenId\\n /// @return tokenGate The address of the token contract used for gating access.\\n /// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721.\\n /// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).\\n function _extraDataToTokenInfo(\\n bytes memory _extraData\\n ) internal pure returns (address tokenGate, bool isERC1155, uint256 tokenId) {\\n // Need at least 160 bytes to safely read the parameters\\n if (_extraData.length < 160) return (address(0), false, 0);\\n\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let packedTokenGateIsERC1155 := mload(add(_extraData, 0x80)) // 4th parameter at offset 128\\n tokenId := mload(add(_extraData, 0xA0)) // 5th parameter at offset 160 (moved up)\\n\\n // Unpack address from lower 160 bits and bool from bit 160\\n tokenGate := and(packedTokenGateIsERC1155, 0xffffffffffffffffffffffffffffffffffffffff)\\n isERC1155 := and(shr(160, packedTokenGateIsERC1155), 1)\\n }\\n }\\n\\n /// @inheritdoc DisputeKitClassicBase\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view override returns (bool) {\\n if (!super._postDrawCheck(_round, _coreDisputeID, _juror)) return false;\\n\\n // Get the local dispute and extract token info from extraData\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n (address tokenGate, bool isERC1155, uint256 tokenId) = _extraDataToTokenInfo(dispute.extraData);\\n\\n // If no token gate is specified, allow all jurors\\n if (tokenGate == address(0)) return true;\\n\\n // Check juror's token balance\\n if (isERC1155) {\\n return IBalanceHolderERC1155(tokenGate).balanceOf(_juror, tokenId) > 0;\\n } else {\\n return IBalanceHolder(tokenGate).balanceOf(_juror) > 0;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2b7c8f0af04be5a41d5e0a3a97b359867f6e79eb98da2303d33317fe147faef\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161489e6100fc60003960008181611937015281816119600152611b4f015261489e6000f3fe6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf414610753578063f2f4eb2614610773578063f32ab92714610793578063f7e7d1fd146107c8578063f8abee10146107e8578063fc6f8f161461081857600080fd5b8063be467604146106dd578063c0c53b8b146106f3578063d2b8035a14610713578063da3beb8c14610733578063e349ad30146105c557600080fd5b80638f06f112116100fd5780638f06f1121461061b578063a7cc08fe1461063b578063b34bfaa814610687578063b6ede5401461069d578063ba66fde7146106bd57600080fd5b80636d4cd8ea14610585578063751accd0146105a5578063796490f9146105c55780637c04034e146105db5780638e426460146105fb57600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd1461048a5780635c92e2f6146104cb57806365540b96146104eb578063675926f61461051857806369f3f0411461053857600080fd5b80634b2f0ea0146103e15780634f1ef286146103f457806352d1902d1461040757806354fd4d501461041c578063564a565d1461045b57600080fd5b80631c3db16d1161020e5780631c3db16d1461032a5780631cc3423a146103675780632621b9a2146103875780632d68efc9146103a1578063362c3479146103c157600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102ef575b600080fd5b34801561025757600080fd5b5061026b610266366004613bfc565b610838565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613ca1565b610900565b005b3480156102ae57600080fd5b5061026b6102bd366004613bfc565b6109be565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516102779190613d31565b3480156102fb57600080fd5b5061031c61030a366004613bfc565b60036020526000908152604090205481565b604051908152602001610277565b34801561033657600080fd5b5061034a610345366004613bfc565b610a35565b604080519384529115156020840152151590820152606001610277565b34801561037357600080fd5b5061031c610382366004613def565b610ba3565b34801561039357600080fd5b5060045461026b9060ff1681565b3480156103ad57600080fd5b506007546102e2906001600160a01b031681565b3480156103cd57600080fd5b5061031c6103dc366004613e53565b610be3565b6102a06103ef366004613e90565b611093565b6102a0610402366004613eb2565b611923565b34801561041357600080fd5b5061031c611b42565b34801561042857600080fd5b5061044e604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613f51565b34801561046757600080fd5b5061047b610476366004613bfc565b611ba0565b60405161027793929190613f64565b34801561049657600080fd5b5061026b6104a5366004613f85565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104d757600080fd5b506102a06104e6366004613fbe565b611c66565b3480156104f757600080fd5b5061050b610506366004613bfc565b611c72565b6040516102779190614010565b34801561052457600080fd5b5061031c610533366004614053565b611d36565b34801561054457600080fd5b5061055861055336600461408e565b611e79565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059157600080fd5b5061026b6105a0366004613bfc565b611f31565b3480156105b157600080fd5b506102a06105c03660046140ba565b6120b4565b3480156105d157600080fd5b5061031c61271081565b3480156105e757600080fd5b506102a06105f63660046140fc565b612180565b34801561060757600080fd5b506102a0610616366004614184565b612197565b34801561062757600080fd5b506102a06106363660046140fc565b6121e3565b34801561064757600080fd5b5061065b61065636600461408e565b6122a9565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069357600080fd5b5061031c614e2081565b3480156106a957600080fd5b506102a06106b83660046141a1565b61236f565b3480156106c957600080fd5b5061026b6106d836600461408e565b612562565b3480156106e957600080fd5b5061031c61138881565b3480156106ff57600080fd5b506102a061070e3660046141fb565b6125fd565b34801561071f57600080fd5b506102e261072e366004613e90565b6126c7565b34801561073f57600080fd5b5061031c61074e366004613e90565b612a16565b34801561075f57600080fd5b506102a061076e366004614184565b612b69565b34801561077f57600080fd5b506001546102e2906001600160a01b031681565b34801561079f57600080fd5b506107b36107ae366004613e90565b612bb5565b60408051928352602083019190915201610277565b3480156107d457600080fd5b506102a06107e3366004614184565b612c07565b3480156107f457600080fd5b5061026b610803366004613bfc565b60066020526000908152604090205460ff1681565b34801561082457600080fd5b5061031c610833366004613bfc565b612cd9565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a9919061423b565b9150915060006108b885611c72565b9050805160001480156108f757506127106113886108d68585614275565b6108e09190614288565b6108ea919061429f565b6108f48442614275565b10155b95945050505050565b600087815260036020526040902054600280548992908110610924576109246142c1565b600091825260209091206002600590920201015460ff16156109615760405162461bcd60e51b8152600401610958906142d7565b60405180910390fd5b61096d88888888612d05565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109ac93929190614337565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109e2576109e26142c1565b60009182526020822060059091020180549092508290610a0490600190614275565b81548110610a1457610a146142c1565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6157610a616142c1565b60009182526020822060059091020180549092508290610a8390600190614275565b81548110610a9357610a936142c1565b60009182526020909120600c90910201600381015460ff169450905083610abe578060010154610ac1565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061437d565b5090935060049250610b44915050565b816004811115610b5657610b566143e6565b03610b99576000610b6688611c72565b90508051600103610b975780600081518110610b8457610b846142c1565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c55919061437d565b50935050505080610ca85760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610958565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f91906143fc565b15610d5d5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610958565b60008681526006602052604090205460ff16610d8b5760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110610daf57610daf6142c1565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610de357610de36142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e62919061444e565b5050600087815260078401602052604090205490915060ff16610eac576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ff1565b808603610f21576000868152600683016020526040902054610ecf576000610f1a565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f109190614288565b610f1a919061429f565b9450610ff1565b600081815260078301602052604090205460ff16610ff15781600601600083600a01600181548110610f5557610f556142c1565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f8b57610f8b6142c1565b9060005260206000200154815260200190815260200160002054610faf919061448a565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fe49190614288565b610fee919061429f565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561108757600754611038906001600160a01b038a811691889116613068565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae898960405161107e929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110b7576110b76142c1565b600091825260209091206002600590920201015460ff16156110eb5760405162461bcd60e51b8152600401610958906142d7565b60008381526003602052604081205460028054909190811061110f5761110f6142c1565b9060005260206000209060050201905080600101548311156111735760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610958565b60008481526006602052604090205460ff166111a15760405162461bcd60e51b815260040161095890614417565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611212919061423b565b9150915081421015801561122557508042105b61126a5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610958565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cf919061444e565b505090508681036112e4576127109150611365565b6127106113886112f48686614275565b6112fe9190614288565b611308919061429f565b6113128542614275565b1061135f5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610958565b614e2091505b8454600090869061137890600190614275565b81548110611388576113886142c1565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140b919061449d565b6114159190614275565b60008a815260078401602052604090205490915060ff16156114795760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610958565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e7919061449d565b905060006127106114f88784614288565b611502919061429f565b61150c908361448a565b60008c8152600686016020526040812054919250908211156115bd5760008c815260068601602052604090205434906115459084614275565b1161156a5760008c81526006860160205260409020546115659083614275565b61156c565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115b4929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115e990849061448a565b909155505060008c81526006860160205260408120805483929061160e90849061448a565b909155505060008c815260068601602052604090205482116116e05760008c81526006860160205260408120546009870180549192909161165090849061448a565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118eb578285600901546116fd9190614275565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561174b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176f91906143fc565b156117885760028a01805460ff1916600117905561186b565b895460038b01600061179b87600161448a565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161181691815260200190565b602060405180830381865afa158015611833573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611857919061449d565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118b8939291906144f0565b6000604051808303818588803b1580156118d157600080fd5b505af11580156118e5573d6000803e3d6000fd5b50505050505b80341115611914576119146119008234614275565b6007543391906001600160a01b0316613068565b50505050505050505050505050565b61192c82613153565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661199e6000805160206148498339815191525490565b6001600160a01b031614155b156119c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a22575060408051601f3d908101601f19168201909252611a1f9181019061449d565b60015b611a415781604051630c76093760e01b81526004016109589190613d31565b6000805160206148498339815191528114611a7257604051632a87526960e21b815260048101829052602401610958565b6000805160206148498339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b3d576000836001600160a01b031683604051611ad9919061458a565b600060405180830381855af49150503d8060008114611b14576040519150601f19603f3d011682016040523d82523d6000602084013e611b19565b606091505b5050905080611b3b576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b8d5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061484983398151915290565b60028181548110611bb057600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611be3906144b6565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0f906144b6565b8015611c5c5780601f10611c3157610100808354040283529160200191611c5c565b820191906000526020600020905b815481529060010190602001808311611c3f57829003601f168201915b5050505050905083565b611b3b84848484612d05565b6000818152600360205260408120546002805460609392908110611c9857611c986142c1565b60009182526020822060059091020180549092508290611cba90600190614275565b81548110611cca57611cca6142c1565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d2857602002820191906000526020600020905b815481526020019060010190808311611d14575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d5a57611d5a6142c1565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611d8e57611d8e6142c1565b90600052602060002090600c02016000018681548110611db057611db06142c1565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e32919061444e565b506003850154919350915060ff168015611e5657508183600201541480611e565750805b15611e69576127109450505050506108f7565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611eaa57611eaa6142c1565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ede57611ede6142c1565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f5557611f556142c1565b60009182526020822060059091020180549092508290611f7790600190614275565b81548110611f8757611f876142c1565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611fe2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612006919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612061573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208591906145a6565b505050505091505060008161209b5783546120a1565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120de5760405162461bcd60e51b815260040161095890614612565b6000836001600160a01b031683836040516120f9919061458a565b60006040518083038185875af1925050503d8060008114612136576040519150601f19603f3d011682016040523d82523d6000602084013e61213b565b606091505b5050905080611b3b5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610958565b61218f86868686868633613180565b505050505050565b6000546001600160a01b031633146121c15760405162461bcd60e51b815260040161095890614612565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600086815260036020526040812054600280549091908110612207576122076142c1565b6000918252602082206005909102018054909250829061222990600190614275565b81548110612239576122396142c1565b90600052602060002090600c02016000018787600081811061225d5761225d6142c1565b9050602002013581548110612274576122746142c1565b60009182526020909120600490910201546001600160a01b0316905061229f88888888888887613180565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122d7576122d76142c1565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061230b5761230b6142c1565b90600052602060002090600c0201600001878154811061232d5761232d6142c1565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123995760405162461bcd60e51b815260040161095890614654565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124248587836146e6565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab919061449d565b6124b59190614275565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612550908a908a908a90614337565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612586576125866142c1565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ba576125ba6142c1565b90600052602060002090600c020160000184815481106125dc576125dc6142c1565b600091825260209091206004909102016003015460ff169695505050505050565b600160006126096138b1565b8054909150600160401b900460ff1680612630575080546001600160401b03808416911610155b1561264d5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556126798585856138d5565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146126f45760405162461bcd60e51b815260040161095890614654565b600083815260036020526040902054600280548592908110612718576127186142c1565b600091825260209091206002600590920201015460ff161561274c5760405162461bcd60e51b8152600401610958906142d7565b6000848152600360205260408120546002805491929183908110612772576127726142c1565b600091825260208220600590910201805490925061279290600190614275565b905060008260000182815481106127ab576127ab6142c1565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612810573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283491906147a5565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a7919061437d565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561290b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292f91906147a5565b98506001600160a01b03891661294b5750505050505050612a0f565b612956848c8b61391c565b15612a0257604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a07565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a3a57612a3a6142c1565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a6e57612a6e6142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612acd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af1919061444e565b5091509150826004015460001480612b20575080158015612b2057506000828152600284016020526040902054155b15612b32576000945050505050612b63565b8015612b47575050600401549150612b639050565b506000908152600290910160205260409020549150612b639050565b92915050565b6000546001600160a01b03163314612b935760405162461bcd60e51b815260040161095890614612565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bdb57612bdb6142c1565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c136138b1565b8054909150600160401b900460ff1680612c3a575080546001600160401b03808416911610155b15612c575760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612cee57612cee6142c1565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d2957612d296142c1565b600091825260209091206002600590920201015460ff1615612d5d5760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dcb919061437d565b5090935060019250612ddb915050565b816004811115612ded57612ded6143e6565b14612e4a5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610958565b82612e875760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610958565b60008681526006602052604090205460ff16612eb55760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110612ed957612ed96142c1565b60009182526020822060059091020180549092508290612efb90600190614275565b81548110612f0b57612f0b6142c1565b90600052602060002090600c0201905060005b86811015613001573382898984818110612f3a57612f3a6142c1565b9050602002013581548110612f5157612f516142c1565b60009182526020909120600490910201546001600160a01b031614612fb85760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610958565b8582898984818110612fcc57612fcc6142c1565b9050602002013581548110612fe357612fe36142c1565b60009182526020909120600160049092020181019190915501612f1e565b5086869050816005016000828254613019919061448a565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890613056908b908b908b906147f4565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501561309757505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130d257600080fd5b505af11580156130e6573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561313657600080fd5b505af115801561314a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b0316331461317d5760405162461bcd60e51b815260040161095890614612565b50565b6000878152600360205260409020546002805489929081106131a4576131a46142c1565b600091825260209091206002600590920201015460ff16156131d85760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613222573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613246919061437d565b5090935060029250613256915050565b816004811115613268576132686143e6565b146132c35760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610958565b866133055760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610958565b60008981526006602052604090205460ff166133335760405162461bcd60e51b815260040161095890614417565b600089815260036020526040812054600280549091908110613357576133576142c1565b9060005260206000209060050201905080600101548711156133b25760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610958565b805460009082906133c590600190614275565b815481106133d5576133d56142c1565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061341a908f9060040190815260200190565b60a060405180830381865afa158015613437573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345b919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134da91906145a6565b505050505091505060006134ef8b8b8b610ba3565b905060005b8c811015613776576001600160a01b038916858f8f84818110613519576135196142c1565b9050602002013581548110613530576135306142c1565b60009182526020909120600490910201546001600160a01b0316146135975760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610958565b8215806135de575081858f8f848181106135b3576135b36142c1565b90506020020135815481106135ca576135ca6142c1565b906000526020600020906004020160010154145b61365e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610958565b848e8e83818110613671576136716142c1565b9050602002013581548110613688576136886142c1565b600091825260209091206003600490920201015460ff16156136e15760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610958565b8b858f8f848181106136f5576136f56142c1565b905060200201358154811061370c5761370c6142c1565b60009182526020909120600260049092020101556001858f8f84818110613735576137356142c1565b905060200201358154811061374c5761374c6142c1565b60009182526020909120600490910201600301805460ff19169115159190911790556001016134f4565b5050506004820180548b925060009061379090849061448a565b90915550506000888152600282016020526040812080548b92906137b590849061448a565b9091555050600181015488036137e457600381015460ff16156137df5760038101805460ff191690555b61385d565b60018101546000908152600282016020526040808220548a83529120540361382657600381015460ff166137df5760038101805460ff1916600117905561385d565b60018101546000908152600282016020526040808220548a8352912054111561385d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161389c93929190614818565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138dd613ade565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b6000613929848484613b05565b61393557506000610bdc565b600083815260036020526040812054600280549192918390811061395b5761395b6142c1565b906000526020600020906005020190506000806000613a05846004018054613982906144b6565b80601f01602080910402602001604051908101604052809291908181526020018280546139ae906144b6565b80156139fb5780601f106139d0576101008083540402835291602001916139fb565b820191906000526020600020905b8154815290600101906020018083116139de57829003601f168201915b5050505050613b9d565b919450925090506001600160a01b038316613a2857600195505050505050610bdc565b8115613aaf57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa158015613a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa2919061449d565b1195505050505050610bdc565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613a61908b90600401613d31565b613ae6613be2565b613b0357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613b93576000838152600360205260408120546002805491929183908110613b3957613b396142c1565b6000918252602082206005909102018054909250613b5990600190614275565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610bdc915050565b5060019392505050565b600080600060a084511015613bba57506000915081905080613bdb565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000613bec6138b1565b54600160401b900460ff16919050565b600060208284031215613c0e57600080fd5b5035919050565b60008083601f840112613c2757600080fd5b5081356001600160401b03811115613c3e57600080fd5b6020830191508360208260051b8501011115613c5957600080fd5b9250929050565b60008083601f840112613c7257600080fd5b5081356001600160401b03811115613c8957600080fd5b602083019150836020828501011115613c5957600080fd5b600080600080600080600060a0888a031215613cbc57600080fd5b8735965060208801356001600160401b03811115613cd957600080fd5b613ce58a828b01613c15565b909750955050604088013593506060880135925060808801356001600160401b03811115613d1257600080fd5b613d1e8a828b01613c60565b989b979a50959850939692959293505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613d6c57600080fd5b8135602083016000806001600160401b03841115613d8c57613d8c613d45565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613dba57613dba613d45565b604052838152905080828401871015613dd257600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613e0457600080fd5b833592506020840135915060408401356001600160401b03811115613e2857600080fd5b613e3486828701613d5b565b9150509250925092565b6001600160a01b038116811461317d57600080fd5b60008060008060808587031215613e6957600080fd5b843593506020850135613e7b81613e3e565b93969395505050506040820135916060013590565b60008060408385031215613ea357600080fd5b50508035926020909101359150565b60008060408385031215613ec557600080fd5b8235613ed081613e3e565b915060208301356001600160401b03811115613eeb57600080fd5b613ef785828601613d5b565b9150509250929050565b60005b83811015613f1c578181015183820152602001613f04565b50506000910152565b60008151808452613f3d816020860160208601613f01565b601f01601f19169290920160200192915050565b602081526000610bdc6020830184613f25565b83815282151560208201526060604082015260006108f76060830184613f25565b600080600060608486031215613f9a57600080fd5b83359250602084013591506040840135613fb381613e3e565b809150509250925092565b60008060008060608587031215613fd457600080fd5b8435935060208501356001600160401b03811115613ff157600080fd5b613ffd87828801613c15565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b8181101561404857835183526020938401939092019160010161402a565b509095945050505050565b600080600080600060a0868803121561406b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806000606084860312156140a357600080fd5b505081359360208301359350604090920135919050565b6000806000606084860312156140cf57600080fd5b83356140da81613e3e565b92506020840135915060408401356001600160401b03811115613e2857600080fd5b60008060008060008060a0878903121561411557600080fd5b8635955060208701356001600160401b0381111561413257600080fd5b61413e89828a01613c15565b909650945050604087013592506060870135915060808701356001600160401b0381111561416b57600080fd5b61417789828a01613d5b565b9150509295509295509295565b60006020828403121561419657600080fd5b8135610bdc81613e3e565b6000806000806000608086880312156141b957600080fd5b853594506020860135935060408601356001600160401b038111156141dd57600080fd5b6141e988828901613c60565b96999598509660600135949350505050565b60008060006060848603121561421057600080fd5b833561421b81613e3e565b9250602084013561422b81613e3e565b91506040840135613fb381613e3e565b6000806040838503121561424e57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b6357612b6361425f565b8082028115828204841417612b6357612b6361425f565b6000826142bc57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8381526040602082015260006108f760408301848661430e565b80516001600160601b038116811461436857600080fd5b919050565b8051801515811461436857600080fd5b600080600080600060a0868803121561439557600080fd5b61439e86614351565b945060208601516143ae81613e3e565b6040870151909450600581106143c357600080fd5b92506143d16060870161436d565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561440e57600080fd5b610bdc8261436d565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561446357600080fd5b835192506144736020850161436d565b91506144816040850161436d565b90509250925092565b80820180821115612b6357612b6361425f565b6000602082840312156144af57600080fd5b5051919050565b600181811c908216806144ca57607f821691505b6020821081036144ea57634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461450e816144b6565b806060860152600182166000811461452d57600181146145495761457d565b60ff1983166080870152608082151560051b870101935061457d565b86600052602060002060005b8381101561457457815488820160800152600190910190602001614555565b87016080019450505b5091979650505050505050565b6000825161459c818460208701613f01565b9190910192915050565b600080600080600080600060e0888a0312156145c157600080fd5b6145ca88614351565b96506145d86020890161436d565b604089015160608a015160808b015160a08c015193995091975095509350915061460460c0890161436d565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b3d57806000526020600020601f840160051c810160208510156146bf5750805b601f840160051c820191505b818110156146df57600081556001016146cb565b5050505050565b6001600160401b038311156146fd576146fd613d45565b6147118361470b83546144b6565b83614698565b6000601f841160018114614745576000851561472d5750838201355b600019600387901b1c1916600186901b1783556146df565b600083815260209020601f19861690835b828110156147765786850135825560209485019460019092019101614756565b50868210156147935760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156147b757600080fd5b8151610bdc81613e3e565b81835260006001600160fb1b038311156147db57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006148086040830185876147c2565b9050826020830152949350505050565b60408152600061482c6040830185876147c2565b828103602084015261483e8185613f25565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220cd5d3742f8c0524170b60f04c4a752d412f4c6d549337356905de2b1c28294eb64736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf414610753578063f2f4eb2614610773578063f32ab92714610793578063f7e7d1fd146107c8578063f8abee10146107e8578063fc6f8f161461081857600080fd5b8063be467604146106dd578063c0c53b8b146106f3578063d2b8035a14610713578063da3beb8c14610733578063e349ad30146105c557600080fd5b80638f06f112116100fd5780638f06f1121461061b578063a7cc08fe1461063b578063b34bfaa814610687578063b6ede5401461069d578063ba66fde7146106bd57600080fd5b80636d4cd8ea14610585578063751accd0146105a5578063796490f9146105c55780637c04034e146105db5780638e426460146105fb57600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd1461048a5780635c92e2f6146104cb57806365540b96146104eb578063675926f61461051857806369f3f0411461053857600080fd5b80634b2f0ea0146103e15780634f1ef286146103f457806352d1902d1461040757806354fd4d501461041c578063564a565d1461045b57600080fd5b80631c3db16d1161020e5780631c3db16d1461032a5780631cc3423a146103675780632621b9a2146103875780632d68efc9146103a1578063362c3479146103c157600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102ef575b600080fd5b34801561025757600080fd5b5061026b610266366004613bfc565b610838565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613ca1565b610900565b005b3480156102ae57600080fd5b5061026b6102bd366004613bfc565b6109be565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516102779190613d31565b3480156102fb57600080fd5b5061031c61030a366004613bfc565b60036020526000908152604090205481565b604051908152602001610277565b34801561033657600080fd5b5061034a610345366004613bfc565b610a35565b604080519384529115156020840152151590820152606001610277565b34801561037357600080fd5b5061031c610382366004613def565b610ba3565b34801561039357600080fd5b5060045461026b9060ff1681565b3480156103ad57600080fd5b506007546102e2906001600160a01b031681565b3480156103cd57600080fd5b5061031c6103dc366004613e53565b610be3565b6102a06103ef366004613e90565b611093565b6102a0610402366004613eb2565b611923565b34801561041357600080fd5b5061031c611b42565b34801561042857600080fd5b5061044e604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613f51565b34801561046757600080fd5b5061047b610476366004613bfc565b611ba0565b60405161027793929190613f64565b34801561049657600080fd5b5061026b6104a5366004613f85565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104d757600080fd5b506102a06104e6366004613fbe565b611c66565b3480156104f757600080fd5b5061050b610506366004613bfc565b611c72565b6040516102779190614010565b34801561052457600080fd5b5061031c610533366004614053565b611d36565b34801561054457600080fd5b5061055861055336600461408e565b611e79565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059157600080fd5b5061026b6105a0366004613bfc565b611f31565b3480156105b157600080fd5b506102a06105c03660046140ba565b6120b4565b3480156105d157600080fd5b5061031c61271081565b3480156105e757600080fd5b506102a06105f63660046140fc565b612180565b34801561060757600080fd5b506102a0610616366004614184565b612197565b34801561062757600080fd5b506102a06106363660046140fc565b6121e3565b34801561064757600080fd5b5061065b61065636600461408e565b6122a9565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069357600080fd5b5061031c614e2081565b3480156106a957600080fd5b506102a06106b83660046141a1565b61236f565b3480156106c957600080fd5b5061026b6106d836600461408e565b612562565b3480156106e957600080fd5b5061031c61138881565b3480156106ff57600080fd5b506102a061070e3660046141fb565b6125fd565b34801561071f57600080fd5b506102e261072e366004613e90565b6126c7565b34801561073f57600080fd5b5061031c61074e366004613e90565b612a16565b34801561075f57600080fd5b506102a061076e366004614184565b612b69565b34801561077f57600080fd5b506001546102e2906001600160a01b031681565b34801561079f57600080fd5b506107b36107ae366004613e90565b612bb5565b60408051928352602083019190915201610277565b3480156107d457600080fd5b506102a06107e3366004614184565b612c07565b3480156107f457600080fd5b5061026b610803366004613bfc565b60066020526000908152604090205460ff1681565b34801561082457600080fd5b5061031c610833366004613bfc565b612cd9565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a9919061423b565b9150915060006108b885611c72565b9050805160001480156108f757506127106113886108d68585614275565b6108e09190614288565b6108ea919061429f565b6108f48442614275565b10155b95945050505050565b600087815260036020526040902054600280548992908110610924576109246142c1565b600091825260209091206002600590920201015460ff16156109615760405162461bcd60e51b8152600401610958906142d7565b60405180910390fd5b61096d88888888612d05565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109ac93929190614337565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109e2576109e26142c1565b60009182526020822060059091020180549092508290610a0490600190614275565b81548110610a1457610a146142c1565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6157610a616142c1565b60009182526020822060059091020180549092508290610a8390600190614275565b81548110610a9357610a936142c1565b60009182526020909120600c90910201600381015460ff169450905083610abe578060010154610ac1565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061437d565b5090935060049250610b44915050565b816004811115610b5657610b566143e6565b03610b99576000610b6688611c72565b90508051600103610b975780600081518110610b8457610b846142c1565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c55919061437d565b50935050505080610ca85760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610958565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f91906143fc565b15610d5d5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610958565b60008681526006602052604090205460ff16610d8b5760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110610daf57610daf6142c1565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610de357610de36142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e62919061444e565b5050600087815260078401602052604090205490915060ff16610eac576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ff1565b808603610f21576000868152600683016020526040902054610ecf576000610f1a565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f109190614288565b610f1a919061429f565b9450610ff1565b600081815260078301602052604090205460ff16610ff15781600601600083600a01600181548110610f5557610f556142c1565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f8b57610f8b6142c1565b9060005260206000200154815260200190815260200160002054610faf919061448a565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fe49190614288565b610fee919061429f565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561108757600754611038906001600160a01b038a811691889116613068565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae898960405161107e929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110b7576110b76142c1565b600091825260209091206002600590920201015460ff16156110eb5760405162461bcd60e51b8152600401610958906142d7565b60008381526003602052604081205460028054909190811061110f5761110f6142c1565b9060005260206000209060050201905080600101548311156111735760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610958565b60008481526006602052604090205460ff166111a15760405162461bcd60e51b815260040161095890614417565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611212919061423b565b9150915081421015801561122557508042105b61126a5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610958565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cf919061444e565b505090508681036112e4576127109150611365565b6127106113886112f48686614275565b6112fe9190614288565b611308919061429f565b6113128542614275565b1061135f5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610958565b614e2091505b8454600090869061137890600190614275565b81548110611388576113886142c1565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140b919061449d565b6114159190614275565b60008a815260078401602052604090205490915060ff16156114795760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610958565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e7919061449d565b905060006127106114f88784614288565b611502919061429f565b61150c908361448a565b60008c8152600686016020526040812054919250908211156115bd5760008c815260068601602052604090205434906115459084614275565b1161156a5760008c81526006860160205260409020546115659083614275565b61156c565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115b4929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115e990849061448a565b909155505060008c81526006860160205260408120805483929061160e90849061448a565b909155505060008c815260068601602052604090205482116116e05760008c81526006860160205260408120546009870180549192909161165090849061448a565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118eb578285600901546116fd9190614275565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561174b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176f91906143fc565b156117885760028a01805460ff1916600117905561186b565b895460038b01600061179b87600161448a565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161181691815260200190565b602060405180830381865afa158015611833573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611857919061449d565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118b8939291906144f0565b6000604051808303818588803b1580156118d157600080fd5b505af11580156118e5573d6000803e3d6000fd5b50505050505b80341115611914576119146119008234614275565b6007543391906001600160a01b0316613068565b50505050505050505050505050565b61192c82613153565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661199e6000805160206148498339815191525490565b6001600160a01b031614155b156119c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a22575060408051601f3d908101601f19168201909252611a1f9181019061449d565b60015b611a415781604051630c76093760e01b81526004016109589190613d31565b6000805160206148498339815191528114611a7257604051632a87526960e21b815260048101829052602401610958565b6000805160206148498339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b3d576000836001600160a01b031683604051611ad9919061458a565b600060405180830381855af49150503d8060008114611b14576040519150601f19603f3d011682016040523d82523d6000602084013e611b19565b606091505b5050905080611b3b576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b8d5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061484983398151915290565b60028181548110611bb057600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611be3906144b6565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0f906144b6565b8015611c5c5780601f10611c3157610100808354040283529160200191611c5c565b820191906000526020600020905b815481529060010190602001808311611c3f57829003601f168201915b5050505050905083565b611b3b84848484612d05565b6000818152600360205260408120546002805460609392908110611c9857611c986142c1565b60009182526020822060059091020180549092508290611cba90600190614275565b81548110611cca57611cca6142c1565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d2857602002820191906000526020600020905b815481526020019060010190808311611d14575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d5a57611d5a6142c1565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611d8e57611d8e6142c1565b90600052602060002090600c02016000018681548110611db057611db06142c1565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e32919061444e565b506003850154919350915060ff168015611e5657508183600201541480611e565750805b15611e69576127109450505050506108f7565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611eaa57611eaa6142c1565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ede57611ede6142c1565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f5557611f556142c1565b60009182526020822060059091020180549092508290611f7790600190614275565b81548110611f8757611f876142c1565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611fe2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612006919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612061573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208591906145a6565b505050505091505060008161209b5783546120a1565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120de5760405162461bcd60e51b815260040161095890614612565b6000836001600160a01b031683836040516120f9919061458a565b60006040518083038185875af1925050503d8060008114612136576040519150601f19603f3d011682016040523d82523d6000602084013e61213b565b606091505b5050905080611b3b5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610958565b61218f86868686868633613180565b505050505050565b6000546001600160a01b031633146121c15760405162461bcd60e51b815260040161095890614612565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600086815260036020526040812054600280549091908110612207576122076142c1565b6000918252602082206005909102018054909250829061222990600190614275565b81548110612239576122396142c1565b90600052602060002090600c02016000018787600081811061225d5761225d6142c1565b9050602002013581548110612274576122746142c1565b60009182526020909120600490910201546001600160a01b0316905061229f88888888888887613180565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122d7576122d76142c1565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061230b5761230b6142c1565b90600052602060002090600c0201600001878154811061232d5761232d6142c1565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123995760405162461bcd60e51b815260040161095890614654565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124248587836146e6565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab919061449d565b6124b59190614275565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612550908a908a908a90614337565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612586576125866142c1565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ba576125ba6142c1565b90600052602060002090600c020160000184815481106125dc576125dc6142c1565b600091825260209091206004909102016003015460ff169695505050505050565b600160006126096138b1565b8054909150600160401b900460ff1680612630575080546001600160401b03808416911610155b1561264d5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556126798585856138d5565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146126f45760405162461bcd60e51b815260040161095890614654565b600083815260036020526040902054600280548592908110612718576127186142c1565b600091825260209091206002600590920201015460ff161561274c5760405162461bcd60e51b8152600401610958906142d7565b6000848152600360205260408120546002805491929183908110612772576127726142c1565b600091825260208220600590910201805490925061279290600190614275565b905060008260000182815481106127ab576127ab6142c1565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612810573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283491906147a5565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a7919061437d565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561290b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292f91906147a5565b98506001600160a01b03891661294b5750505050505050612a0f565b612956848c8b61391c565b15612a0257604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a07565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a3a57612a3a6142c1565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a6e57612a6e6142c1565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612acd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af1919061444e565b5091509150826004015460001480612b20575080158015612b2057506000828152600284016020526040902054155b15612b32576000945050505050612b63565b8015612b47575050600401549150612b639050565b506000908152600290910160205260409020549150612b639050565b92915050565b6000546001600160a01b03163314612b935760405162461bcd60e51b815260040161095890614612565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bdb57612bdb6142c1565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c136138b1565b8054909150600160401b900460ff1680612c3a575080546001600160401b03808416911610155b15612c575760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612cee57612cee6142c1565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d2957612d296142c1565b600091825260209091206002600590920201015460ff1615612d5d5760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dcb919061437d565b5090935060019250612ddb915050565b816004811115612ded57612ded6143e6565b14612e4a5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610958565b82612e875760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610958565b60008681526006602052604090205460ff16612eb55760405162461bcd60e51b815260040161095890614417565b600086815260036020526040812054600280549091908110612ed957612ed96142c1565b60009182526020822060059091020180549092508290612efb90600190614275565b81548110612f0b57612f0b6142c1565b90600052602060002090600c0201905060005b86811015613001573382898984818110612f3a57612f3a6142c1565b9050602002013581548110612f5157612f516142c1565b60009182526020909120600490910201546001600160a01b031614612fb85760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610958565b8582898984818110612fcc57612fcc6142c1565b9050602002013581548110612fe357612fe36142c1565b60009182526020909120600160049092020181019190915501612f1e565b5086869050816005016000828254613019919061448a565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890613056908b908b908b906147f4565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501561309757505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130d257600080fd5b505af11580156130e6573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561313657600080fd5b505af115801561314a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b0316331461317d5760405162461bcd60e51b815260040161095890614612565b50565b6000878152600360205260409020546002805489929081106131a4576131a46142c1565b600091825260209091206002600590920201015460ff16156131d85760405162461bcd60e51b8152600401610958906142d7565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613222573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613246919061437d565b5090935060029250613256915050565b816004811115613268576132686143e6565b146132c35760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610958565b866133055760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610958565b60008981526006602052604090205460ff166133335760405162461bcd60e51b815260040161095890614417565b600089815260036020526040812054600280549091908110613357576133576142c1565b9060005260206000209060050201905080600101548711156133b25760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610958565b805460009082906133c590600190614275565b815481106133d5576133d56142c1565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061341a908f9060040190815260200190565b60a060405180830381865afa158015613437573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345b919061437d565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134da91906145a6565b505050505091505060006134ef8b8b8b610ba3565b905060005b8c811015613776576001600160a01b038916858f8f84818110613519576135196142c1565b9050602002013581548110613530576135306142c1565b60009182526020909120600490910201546001600160a01b0316146135975760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610958565b8215806135de575081858f8f848181106135b3576135b36142c1565b90506020020135815481106135ca576135ca6142c1565b906000526020600020906004020160010154145b61365e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610958565b848e8e83818110613671576136716142c1565b9050602002013581548110613688576136886142c1565b600091825260209091206003600490920201015460ff16156136e15760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610958565b8b858f8f848181106136f5576136f56142c1565b905060200201358154811061370c5761370c6142c1565b60009182526020909120600260049092020101556001858f8f84818110613735576137356142c1565b905060200201358154811061374c5761374c6142c1565b60009182526020909120600490910201600301805460ff19169115159190911790556001016134f4565b5050506004820180548b925060009061379090849061448a565b90915550506000888152600282016020526040812080548b92906137b590849061448a565b9091555050600181015488036137e457600381015460ff16156137df5760038101805460ff191690555b61385d565b60018101546000908152600282016020526040808220548a83529120540361382657600381015460ff166137df5760038101805460ff1916600117905561385d565b60018101546000908152600282016020526040808220548a8352912054111561385d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161389c93929190614818565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138dd613ade565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b6000613929848484613b05565b61393557506000610bdc565b600083815260036020526040812054600280549192918390811061395b5761395b6142c1565b906000526020600020906005020190506000806000613a05846004018054613982906144b6565b80601f01602080910402602001604051908101604052809291908181526020018280546139ae906144b6565b80156139fb5780601f106139d0576101008083540402835291602001916139fb565b820191906000526020600020905b8154815290600101906020018083116139de57829003601f168201915b5050505050613b9d565b919450925090506001600160a01b038316613a2857600195505050505050610bdc565b8115613aaf57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa158015613a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa2919061449d565b1195505050505050610bdc565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613a61908b90600401613d31565b613ae6613be2565b613b0357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613b93576000838152600360205260408120546002805491929183908110613b3957613b396142c1565b6000918252602082206005909102018054909250613b5990600190614275565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610bdc915050565b5060019392505050565b600080600060a084511015613bba57506000915081905080613bdb565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000613bec6138b1565b54600160401b900460ff16919050565b600060208284031215613c0e57600080fd5b5035919050565b60008083601f840112613c2757600080fd5b5081356001600160401b03811115613c3e57600080fd5b6020830191508360208260051b8501011115613c5957600080fd5b9250929050565b60008083601f840112613c7257600080fd5b5081356001600160401b03811115613c8957600080fd5b602083019150836020828501011115613c5957600080fd5b600080600080600080600060a0888a031215613cbc57600080fd5b8735965060208801356001600160401b03811115613cd957600080fd5b613ce58a828b01613c15565b909750955050604088013593506060880135925060808801356001600160401b03811115613d1257600080fd5b613d1e8a828b01613c60565b989b979a50959850939692959293505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613d6c57600080fd5b8135602083016000806001600160401b03841115613d8c57613d8c613d45565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613dba57613dba613d45565b604052838152905080828401871015613dd257600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613e0457600080fd5b833592506020840135915060408401356001600160401b03811115613e2857600080fd5b613e3486828701613d5b565b9150509250925092565b6001600160a01b038116811461317d57600080fd5b60008060008060808587031215613e6957600080fd5b843593506020850135613e7b81613e3e565b93969395505050506040820135916060013590565b60008060408385031215613ea357600080fd5b50508035926020909101359150565b60008060408385031215613ec557600080fd5b8235613ed081613e3e565b915060208301356001600160401b03811115613eeb57600080fd5b613ef785828601613d5b565b9150509250929050565b60005b83811015613f1c578181015183820152602001613f04565b50506000910152565b60008151808452613f3d816020860160208601613f01565b601f01601f19169290920160200192915050565b602081526000610bdc6020830184613f25565b83815282151560208201526060604082015260006108f76060830184613f25565b600080600060608486031215613f9a57600080fd5b83359250602084013591506040840135613fb381613e3e565b809150509250925092565b60008060008060608587031215613fd457600080fd5b8435935060208501356001600160401b03811115613ff157600080fd5b613ffd87828801613c15565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b8181101561404857835183526020938401939092019160010161402a565b509095945050505050565b600080600080600060a0868803121561406b57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806000606084860312156140a357600080fd5b505081359360208301359350604090920135919050565b6000806000606084860312156140cf57600080fd5b83356140da81613e3e565b92506020840135915060408401356001600160401b03811115613e2857600080fd5b60008060008060008060a0878903121561411557600080fd5b8635955060208701356001600160401b0381111561413257600080fd5b61413e89828a01613c15565b909650945050604087013592506060870135915060808701356001600160401b0381111561416b57600080fd5b61417789828a01613d5b565b9150509295509295509295565b60006020828403121561419657600080fd5b8135610bdc81613e3e565b6000806000806000608086880312156141b957600080fd5b853594506020860135935060408601356001600160401b038111156141dd57600080fd5b6141e988828901613c60565b96999598509660600135949350505050565b60008060006060848603121561421057600080fd5b833561421b81613e3e565b9250602084013561422b81613e3e565b91506040840135613fb381613e3e565b6000806040838503121561424e57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b6357612b6361425f565b8082028115828204841417612b6357612b6361425f565b6000826142bc57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8381526040602082015260006108f760408301848661430e565b80516001600160601b038116811461436857600080fd5b919050565b8051801515811461436857600080fd5b600080600080600060a0868803121561439557600080fd5b61439e86614351565b945060208601516143ae81613e3e565b6040870151909450600581106143c357600080fd5b92506143d16060870161436d565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561440e57600080fd5b610bdc8261436d565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561446357600080fd5b835192506144736020850161436d565b91506144816040850161436d565b90509250925092565b80820180821115612b6357612b6361425f565b6000602082840312156144af57600080fd5b5051919050565b600181811c908216806144ca57607f821691505b6020821081036144ea57634e487b7160e01b600052602260045260246000fd5b50919050565b83815282602082015260606040820152600080835461450e816144b6565b806060860152600182166000811461452d57600181146145495761457d565b60ff1983166080870152608082151560051b870101935061457d565b86600052602060002060005b8381101561457457815488820160800152600190910190602001614555565b87016080019450505b5091979650505050505050565b6000825161459c818460208701613f01565b9190910192915050565b600080600080600080600060e0888a0312156145c157600080fd5b6145ca88614351565b96506145d86020890161436d565b604089015160608a015160808b015160a08c015193995091975095509350915061460460c0890161436d565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b3d57806000526020600020601f840160051c810160208510156146bf5750805b601f840160051c820191505b818110156146df57600081556001016146cb565b5050505050565b6001600160401b038311156146fd576146fd613d45565b6147118361470b83546144b6565b83614698565b6000601f841160018114614745576000851561472d5750838201355b600019600387901b1c1916600186901b1783556146df565b600083815260209020601f19861690835b828110156147765786850135825560209485019460019092019101614756565b50868210156147935760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156147b757600080fd5b8151610bdc81613e3e565b81835260006001600160fb1b038311156147db57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006148086040830185876147c2565b9050826020830152949350505050565b60408152600061482c6040830185876147c2565b828103602084015261483e8185613f25565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220cd5d3742f8c0524170b60f04c4a752d412f4c6d549337356905de2b1c28294eb64736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "CommitCastShutter(uint256,address,bytes32,bytes32,bytes)": { - "details": "Emitted when a vote is cast.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_juror": "The address of the juror casting the vote commitment." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash including the justification.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encoding", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitGatedShutter Added functionality: shielded voting. Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 6613, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6616, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)303" - }, - { - "astId": 6620, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)6552_storage)dyn_storage" - }, - { - "astId": 6624, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6626, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 6634, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 6638, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6640, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)6552_storage)dyn_storage": { - "base": "t_struct(Dispute)6552_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)6590_storage)dyn_storage": { - "base": "t_struct(Round)6590_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)6599_storage)dyn_storage": { - "base": "t_struct(Vote)6599_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)303": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)6552_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 6541, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)6590_storage)dyn_storage" - }, - { - "astId": 6543, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6545, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 6549, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6551, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)6590_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 6556, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)6599_storage)dyn_storage" - }, - { - "astId": 6558, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6562, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6564, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 6566, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6568, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 6572, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6576, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6582, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 6584, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 6587, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 6589, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)6599_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 6592, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6594, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 6596, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 6598, - "contract": "src/arbitration/dispute-kits/DisputeKitGatedShutter.sol:DisputeKitGatedShutter", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json deleted file mode 100644 index 07d2b9f90..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xd86b84eb36Cd48f3f384b4490F255b494385F429", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xd5d3539eb5177d722b08883ccc20611d6fcec5290c8d03edb8f1f96531503b67", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd86b84eb36Cd48f3f384b4490F255b494385F429", - "transactionIndex": 2, - "gasUsed": "198372", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000100000000000000000", - "blockHash": "0xf7ea7281647fcffe6def1674d78723b7c84df6822ae5d1688641b0f3546c137c", - "transactionHash": "0xd5d3539eb5177d722b08883ccc20611d6fcec5290c8d03edb8f1f96531503b67", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175286153, - "transactionHash": "0xd5d3539eb5177d722b08883ccc20611d6fcec5290c8d03edb8f1f96531503b67", - "address": "0xd86b84eb36Cd48f3f384b4490F255b494385F429", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 8, - "blockHash": "0xf7ea7281647fcffe6def1674d78723b7c84df6822ae5d1688641b0f3546c137c" - } - ], - "blockNumber": 175286153, - "cumulativeGasUsed": "447448", - "status": 1, - "byzantium": true - }, - "args": [ - "0xAcf0eAa29419EA5523d0b672267781b09e69eD1d", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000001bd44c4a4511dbfa7dc1d5bc201635596e7200f9" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122014335073f133775bc3d53bdbd73e5b08fc775962b3f58fb9a922739829545a1f64736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Implementation.json deleted file mode 100644 index c703dd11f..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Implementation.json +++ /dev/null @@ -1,1892 +0,0 @@ -{ - "address": "0xA27EedcEA916BC1ab91720cE70c56666E854F55e", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "extraDataToTokenInfo", - "outputs": [ - { - "internalType": "address", - "name": "tokenGate", - "type": "address" - }, - { - "internalType": "bool", - "name": "isERC1155", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xaa25b92c25dfdd6a1b309e021af6a5431cb85af0de3950d46a891714ca31c388", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA27EedcEA916BC1ab91720cE70c56666E854F55e", - "transactionIndex": 7, - "gasUsed": "4030485", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2fbe4c1c013729058a07be1e79c96165712beeb9f80b9ee87a2c49ecf74613d4", - "transactionHash": "0xaa25b92c25dfdd6a1b309e021af6a5431cb85af0de3950d46a891714ca31c388", - "logs": [ - { - "transactionIndex": 7, - "blockNumber": 179579878, - "transactionHash": "0xaa25b92c25dfdd6a1b309e021af6a5431cb85af0de3950d46a891714ca31c388", - "address": "0xA27EedcEA916BC1ab91720cE70c56666E854F55e", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 21, - "blockHash": "0x2fbe4c1c013729058a07be1e79c96165712beeb9f80b9ee87a2c49ecf74613d4" - } - ], - "blockNumber": 179579878, - "cumulativeGasUsed": "4701761", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 3, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"extraDataToTokenInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"tokenGate\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isERC1155\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"extraDataToTokenInfo(bytes)\":{\"details\":\"Extracts token gating information from the extra data.\",\"params\":{\"_extraData\":\"The extra data bytes array with the following encoding: - bytes 0-31: uint96 courtID, not used here - bytes 32-63: uint256 minJurors, not used here - bytes 64-95: uint256 disputeKitID, not used here - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160) - bytes 128-159: uint256 tokenId\"},\"returns\":{\"isERC1155\":\"True if the token is an ERC-1155, false for ERC-20/ERC-721.\",\"tokenGate\":\"The address of the token contract used for gating access.\",\"tokenId\":\"The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitGated Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitGated.sol\":\"DisputeKitGated\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitGated.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\ninterface IBalanceHolder {\\n /// @dev Returns the number of tokens in `owner` account.\\n /// @dev Compatible with ERC-20 and ERC-721.\\n /// @param owner The address of the owner.\\n /// @return balance The number of tokens in `owner` account.\\n function balanceOf(address owner) external view returns (uint256 balance);\\n}\\n\\ninterface IBalanceHolderERC1155 {\\n /// @dev Returns the balance of an ERC-1155 token.\\n /// @param account The address of the token holder\\n /// @param id ID of the token\\n /// @return The token balance\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\\n/// @title DisputeKitGated\\n/// Dispute kit implementation adapted from DisputeKitClassic\\n/// - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitGated is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Extracts token gating information from the extra data.\\n /// @param _extraData The extra data bytes array with the following encoding:\\n /// - bytes 0-31: uint96 courtID, not used here\\n /// - bytes 32-63: uint256 minJurors, not used here\\n /// - bytes 64-95: uint256 disputeKitID, not used here\\n /// - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160)\\n /// - bytes 128-159: uint256 tokenId\\n /// @return tokenGate The address of the token contract used for gating access.\\n /// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721.\\n /// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).\\n function extraDataToTokenInfo(\\n bytes memory _extraData\\n ) public pure returns (address tokenGate, bool isERC1155, uint256 tokenId) {\\n // Need at least 160 bytes to safely read the parameters\\n if (_extraData.length < 160) return (address(0), false, 0);\\n\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let packedTokenGateIsERC1155 := mload(add(_extraData, 0x80)) // 4th parameter at offset 128\\n tokenId := mload(add(_extraData, 0xA0)) // 5th parameter at offset 160 (moved up)\\n\\n // Unpack address from lower 160 bits and bool from bit 160\\n tokenGate := and(packedTokenGateIsERC1155, 0xffffffffffffffffffffffffffffffffffffffff)\\n isERC1155 := and(shr(160, packedTokenGateIsERC1155), 1)\\n }\\n }\\n\\n /// @inheritdoc DisputeKitClassicBase\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view override returns (bool) {\\n if (!super._postDrawCheck(_round, _coreDisputeID, _juror)) return false;\\n\\n // Get the local dispute and extract token info from extraData\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n (address tokenGate, bool isERC1155, uint256 tokenId) = extraDataToTokenInfo(dispute.extraData);\\n\\n // If no token gate is specified, allow all jurors\\n if (tokenGate == address(0)) return true;\\n\\n // Check juror's token balance\\n if (isERC1155) {\\n return IBalanceHolderERC1155(tokenGate).balanceOf(_juror, tokenId) > 0;\\n } else {\\n return IBalanceHolder(tokenGate).balanceOf(_juror) > 0;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x449beea4cdeceb81cfc053987fd39c2f552fe3f5da03384c623b167f91f9307b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516146966100fc60003960008181611868015281816118910152611a8001526146966000f3fe60806040526004361061023b5760003560e01c8063751accd01161012e578063d2b8035a116100ab578063f2f4eb261161006f578063f2f4eb261461076d578063f32ab9271461078d578063f7e7d1fd146107c2578063f8abee10146107e2578063fc6f8f161461081257600080fd5b8063d2b8035a146106c8578063da3beb8c146106e8578063e349ad301461059a578063e4c0aaf414610708578063ec7b23fb1461072857600080fd5b8063b34bfaa8116100f2578063b34bfaa81461063c578063b6ede54014610652578063ba66fde714610672578063be46760414610692578063c0c53b8b146106a857600080fd5b8063751accd01461057a578063796490f91461059a5780637c04034e146105b05780638e426460146105d0578063a7cc08fe146105f057600080fd5b80634f1ef286116101bc5780635c92e2f6116101805780635c92e2f6146104a057806365540b96146104c0578063675926f6146104ed57806369f3f0411461050d5780636d4cd8ea1461055a57600080fd5b80634f1ef286146103c957806352d1902d146103dc57806354fd4d50146103f1578063564a565d146104305780635a155ccd1461045f57600080fd5b80631cc3423a116102035780631cc3423a1461033a5780632621b9a21461035a5780632d68efc914610374578063362c3479146103945780634b2f0ea0146103b457600080fd5b80630855bbe9146102405780630baa64d1146102755780630c340a24146102955780631200aabc146102c25780631c3db16d146102fd575b600080fd5b34801561024c57600080fd5b5061026061025b366004613a67565b610832565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b50610260610290366004613a67565b6108fa565b3480156102a157600080fd5b506000546102b5906001600160a01b031681565b60405161026c9190613a80565b3480156102ce57600080fd5b506102ef6102dd366004613a67565b60036020526000908152604090205481565b60405190815260200161026c565b34801561030957600080fd5b5061031d610318366004613a67565b610971565b60408051938452911515602084015215159082015260600161026c565b34801561034657600080fd5b506102ef610355366004613b3e565b610adf565b34801561036657600080fd5b506004546102609060ff1681565b34801561038057600080fd5b506007546102b5906001600160a01b031681565b3480156103a057600080fd5b506102ef6103af366004613ba2565b610b0f565b6103c76103c2366004613bdf565b610fc4565b005b6103c76103d7366004613c01565b611854565b3480156103e857600080fd5b506102ef611a73565b3480156103fd57600080fd5b50610423604051806040016040528060068152602001650302e31322e360d41b81525081565b60405161026c9190613ca0565b34801561043c57600080fd5b5061045061044b366004613a67565b611ad1565b60405161026c93929190613cb3565b34801561046b57600080fd5b5061026061047a366004613cd4565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104ac57600080fd5b506103c76104bb366004613d58565b611b97565b3480156104cc57600080fd5b506104e06104db366004613a67565b611ba3565b60405161026c9190613daa565b3480156104f957600080fd5b506102ef610508366004613ded565b611c67565b34801561051957600080fd5b5061052d610528366004613e28565b611daa565b604080519687529415156020870152938501929092526060840152608083015260a082015260c00161026c565b34801561056657600080fd5b50610260610575366004613a67565b611e62565b34801561058657600080fd5b506103c7610595366004613e54565b611fe5565b3480156105a657600080fd5b506102ef61271081565b3480156105bc57600080fd5b506103c76105cb366004613e96565b6120b1565b3480156105dc57600080fd5b506103c76105eb366004613f1e565b6120c8565b3480156105fc57600080fd5b5061061061060b366004613e28565b612114565b604080516001600160a01b0390951685526020850193909352918301521515606082015260800161026c565b34801561064857600080fd5b506102ef614e2081565b34801561065e57600080fd5b506103c761066d366004613f3b565b6121da565b34801561067e57600080fd5b5061026061068d366004613e28565b6123cd565b34801561069e57600080fd5b506102ef61138881565b3480156106b457600080fd5b506103c76106c3366004613fc4565b612468565b3480156106d457600080fd5b506102b56106e3366004613bdf565b612532565b3480156106f457600080fd5b506102ef610703366004613bdf565b612881565b34801561071457600080fd5b506103c7610723366004613f1e565b6129d4565b34801561073457600080fd5b50610748610743366004614004565b612a20565b604080516001600160a01b03909416845291151560208401529082015260600161026c565b34801561077957600080fd5b506001546102b5906001600160a01b031681565b34801561079957600080fd5b506107ad6107a8366004613bdf565b612a65565b6040805192835260208301919091520161026c565b3480156107ce57600080fd5b506103c76107dd366004613f1e565b612ab7565b3480156107ee57600080fd5b506102606107fd366004613a67565b60066020526000908152604090205460ff1681565b34801561081e57600080fd5b506102ef61082d366004613a67565b612b89565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190614040565b9150915060006108b285611ba3565b9050805160001480156108f157506127106113886108d0858561407a565b6108da919061408d565b6108e491906140a4565b6108ee844261407a565b10155b95945050505050565b60008181526003602052604081205460028054839290811061091e5761091e6140c6565b600091825260208220600590910201805490925082906109409060019061407a565b81548110610950576109506140c6565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061099d5761099d6140c6565b600091825260208220600590910201805490925082906109bf9060019061407a565b815481106109cf576109cf6140c6565b60009182526020909120600c90910201600381015460ff1694509050836109fa5780600101546109fd565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190614108565b5090935060049250610a80915050565b816004811115610a9257610a92614171565b03610ad5576000610aa288611ba3565b90508051600103610ad35780600081518110610ac057610ac06140c6565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b819190614108565b50935050505080610bd95760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c509190614187565b15610c8e5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610bd0565b60008681526006602052604090205460ff16610cbc5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110610ce057610ce06140c6565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610d1457610d146140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9391906141d9565b5050600087815260078401602052604090205490915060ff16610ddd576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610f22565b808603610e52576000868152600683016020526040902054610e00576000610e4b565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610e41919061408d565b610e4b91906140a4565b9450610f22565b600081815260078301602052604090205460ff16610f225781600601600083600a01600181548110610e8657610e866140c6565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610ebc57610ebc6140c6565b9060005260206000200154815260200190815260200160002054610ee09190614215565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610f15919061408d565b610f1f91906140a4565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610fb857600754610f69906001600160a01b038a811691889116612bb5565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610faf929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610fe857610fe86140c6565b600091825260209091206002600590920201015460ff161561101c5760405162461bcd60e51b8152600401610bd090614228565b600083815260036020526040812054600280549091908110611040576110406140c6565b9060005260206000209060050201905080600101548311156110a45760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610bd0565b60008481526006602052604090205460ff166110d25760405162461bcd60e51b8152600401610bd0906141a2565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa15801561111f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111439190614040565b9150915081421015801561115657508042105b61119b5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610bd0565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156111dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120091906141d9565b50509050868103611215576127109150611296565b612710611388611225868661407a565b61122f919061408d565b61123991906140a4565b611243854261407a565b106112905760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610bd0565b614e2091505b845460009086906112a99060019061407a565b815481106112b9576112b96140c6565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c919061425f565b611346919061407a565b60008a815260078401602052604090205490915060ff16156113aa5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610bd0565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156113f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611418919061425f565b90506000612710611429878461408d565b61143391906140a4565b61143d9083614215565b60008c8152600686016020526040812054919250908211156114ee5760008c81526006860160205260409020543490611476908461407a565b1161149b5760008c8152600686016020526040902054611496908361407a565b61149d565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516114e5929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061151a908490614215565b909155505060008c81526006860160205260408120805483929061153f908490614215565b909155505060008c815260068601602052604090205482116116115760008c815260068601602052604081205460098701805491929091611581908490614215565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a8501546001101561181c5782856009015461162e919061407a565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190614187565b156116b95760028a01805460ff1916600117905561179c565b895460038b0160006116cc876001614215565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161174791815260200190565b602060405180830381865afa158015611764573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611788919061425f565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117e9939291906142b2565b6000604051808303818588803b15801561180257600080fd5b505af1158015611816573d6000803e3d6000fd5b50505050505b8034111561184557611845611831823461407a565b6007543391906001600160a01b0316612bb5565b50505050505050505050505050565b61185d82612ca0565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806118db57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166118cf6000805160206146418339815191525490565b6001600160a01b031614155b156118f95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611953575060408051601f3d908101601f191682019092526119509181019061425f565b60015b6119725781604051630c76093760e01b8152600401610bd09190613a80565b60008051602061464183398151915281146119a357604051632a87526960e21b815260048101829052602401610bd0565b6000805160206146418339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a6e576000836001600160a01b031683604051611a0a919061434c565b600060405180830381855af49150503d8060008114611a45576040519150601f19603f3d011682016040523d82523d6000602084013e611a4a565b606091505b5050905080611a6c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611abe5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464183398151915290565b60028181548110611ae157600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611b1490614278565b80601f0160208091040260200160405190810160405280929190818152602001828054611b4090614278565b8015611b8d5780601f10611b6257610100808354040283529160200191611b8d565b820191906000526020600020905b815481529060010190602001808311611b7057829003601f168201915b5050505050905083565b611a6c84848484612ccd565b6000818152600360205260408120546002805460609392908110611bc957611bc96140c6565b60009182526020822060059091020180549092508290611beb9060019061407a565b81548110611bfb57611bfb6140c6565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c5957602002820191906000526020600020905b815481526020019060010190808311611c45575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c8b57611c8b6140c6565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611cbf57611cbf6140c6565b90600052602060002090600c02016000018681548110611ce157611ce16140c6565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6391906141d9565b506003850154919350915060ff168015611d8757508183600201541480611d875750805b15611d9a576127109450505050506108f1565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ddb57611ddb6140c6565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e0f57611e0f6140c6565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e8657611e866140c6565b60009182526020822060059091020180549092508290611ea89060019061407a565b81548110611eb857611eb86140c6565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611f13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f379190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb69190614368565b5050505050915050600081611fcc578354611fd2565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b0316331461200f5760405162461bcd60e51b8152600401610bd0906143d4565b6000836001600160a01b0316838360405161202a919061434c565b60006040518083038185875af1925050503d8060008114612067576040519150601f19603f3d011682016040523d82523d6000602084013e61206c565b606091505b5050905080611a6c5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610bd0565b6120c086868686868633613030565b505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b8152600401610bd0906143d4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612142576121426140c6565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612176576121766140c6565b90600052602060002090600c02016000018781548110612198576121986140c6565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146122045760405162461bcd60e51b8152600401610bd090614416565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161228f8587836144a8565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612316919061425f565b612320919061407a565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108906123bb908a908a908a90614567565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123f1576123f16140c6565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612425576124256140c6565b90600052602060002090600c02016000018481548110612447576124476140c6565b600091825260209091206004909102016003015460ff169695505050505050565b60016000612474613761565b8054909150600160401b900460ff168061249b575080546001600160401b03808416911610155b156124b85760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124e4858585613785565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b0316331461255f5760405162461bcd60e51b8152600401610bd090614416565b600083815260036020526040902054600280548592908110612583576125836140c6565b600091825260209091206002600590920201015460ff16156125b75760405162461bcd60e51b8152600401610bd090614228565b60008481526003602052604081205460028054919291839081106125dd576125dd6140c6565b60009182526020822060059091020180549092506125fd9060019061407a565b90506000826000018281548110612616576126166140c6565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f919061459d565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127129190614108565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061279a919061459d565b98506001600160a01b0389166127b6575050505050505061287a565b6127c1848c8b6137cc565b1561286d57604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612872565b600098505b505050505050505b5092915050565b6000828152600360205260408120546002805483929081106128a5576128a56140c6565b600091825260208083208684526003600590930201918201905260408220548154919350839181106128d9576128d96140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295c91906141d9565b509150915082600401546000148061298b57508015801561298b57506000828152600284016020526040902054155b1561299d5760009450505050506129ce565b80156129b25750506004015491506129ce9050565b5060009081526002909101602052604090205491506129ce9050565b92915050565b6000546001600160a01b031633146129fe5760405162461bcd60e51b8152600401610bd0906143d4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600060a084511015612a3d57506000915081905080612a5e565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000828152600360205260408120546002805491929183908110612a8b57612a8b6140c6565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612ac3613761565b8054909150600160401b900460ff1680612aea575080546001600160401b03808416911610155b15612b075760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b9e57612b9e6140c6565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612be457505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612c1f57600080fd5b505af1158015612c33573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612c8357600080fd5b505af1158015612c97573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612cca5760405162461bcd60e51b8152600401610bd0906143d4565b50565b600084815260036020526040902054600280548692908110612cf157612cf16140c6565b600091825260209091206002600590920201015460ff1615612d255760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d939190614108565b5090935060019250612da3915050565b816004811115612db557612db5614171565b14612e125760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610bd0565b82612e4f5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610bd0565b60008681526006602052604090205460ff16612e7d5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110612ea157612ea16140c6565b60009182526020822060059091020180549092508290612ec39060019061407a565b81548110612ed357612ed36140c6565b90600052602060002090600c0201905060005b86811015612fc9573382898984818110612f0257612f026140c6565b9050602002013581548110612f1957612f196140c6565b60009182526020909120600490910201546001600160a01b031614612f805760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610bd0565b8582898984818110612f9457612f946140c6565b9050602002013581548110612fab57612fab6140c6565b60009182526020909120600160049092020181019190915501612ee6565b5086869050816005016000828254612fe19190614215565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061301e908b908b908b906145ec565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110613054576130546140c6565b600091825260209091206002600590920201015460ff16156130885760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa1580156130d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f69190614108565b5090935060029250613106915050565b81600481111561311857613118614171565b146131735760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610bd0565b866131b55760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610bd0565b60008981526006602052604090205460ff166131e35760405162461bcd60e51b8152600401610bd0906141a2565b600089815260036020526040812054600280549091908110613207576132076140c6565b9060005260206000209060050201905080600101548711156132625760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610bd0565b805460009082906132759060019061407a565b81548110613285576132856140c6565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d906132ca908f9060040190815260200190565b60a060405180830381865afa1580156132e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061330b9190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015613366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061338a9190614368565b5050505050915050600061339f8b8b8b610adf565b905060005b8c811015613626576001600160a01b038916858f8f848181106133c9576133c96140c6565b90506020020135815481106133e0576133e06140c6565b60009182526020909120600490910201546001600160a01b0316146134475760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610bd0565b82158061348e575081858f8f84818110613463576134636140c6565b905060200201358154811061347a5761347a6140c6565b906000526020600020906004020160010154145b61350e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610bd0565b848e8e83818110613521576135216140c6565b9050602002013581548110613538576135386140c6565b600091825260209091206003600490920201015460ff16156135915760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610bd0565b8b858f8f848181106135a5576135a56140c6565b90506020020135815481106135bc576135bc6140c6565b60009182526020909120600260049092020101556001858f8f848181106135e5576135e56140c6565b90506020020135815481106135fc576135fc6140c6565b60009182526020909120600490910201600301805460ff19169115159190911790556001016133a4565b5050506004820180548b9250600090613640908490614215565b90915550506000888152600282016020526040812080548b9290613665908490614215565b90915550506001810154880361369457600381015460ff161561368f5760038101805460ff191690555b61370d565b60018101546000908152600282016020526040808220548a8352912054036136d657600381015460ff1661368f5760038101805460ff1916600117905561370d565b60018101546000908152600282016020526040808220548a8352912054111561370d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161374c93929190614610565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61378d61398e565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60006137d98484846139b5565b6137e557506000610b08565b600083815260036020526040812054600280549192918390811061380b5761380b6140c6565b9060005260206000209060050201905060008060006138b584600401805461383290614278565b80601f016020809104026020016040519081016040528092919081815260200182805461385e90614278565b80156138ab5780601f10613880576101008083540402835291602001916138ab565b820191906000526020600020905b81548152906001019060200180831161388e57829003601f168201915b5050505050612a20565b919450925090506001600160a01b0383166138d857600195505050505050610b08565b811561395f57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa15801561392e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613952919061425f565b1195505050505050610b08565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613911908b90600401613a80565b613996613a4d565b6139b357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613a435760008381526003602052604081205460028054919291839081106139e9576139e96140c6565b6000918252602082206005909102018054909250613a099060019061407a565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610b08915050565b5060019392505050565b6000613a57613761565b54600160401b900460ff16919050565b600060208284031215613a7957600080fd5b5035919050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613abb57600080fd5b8135602083016000806001600160401b03841115613adb57613adb613a94565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613b0957613b09613a94565b604052838152905080828401871015613b2157600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613b5357600080fd5b833592506020840135915060408401356001600160401b03811115613b7757600080fd5b613b8386828701613aaa565b9150509250925092565b6001600160a01b0381168114612cca57600080fd5b60008060008060808587031215613bb857600080fd5b843593506020850135613bca81613b8d565b93969395505050506040820135916060013590565b60008060408385031215613bf257600080fd5b50508035926020909101359150565b60008060408385031215613c1457600080fd5b8235613c1f81613b8d565b915060208301356001600160401b03811115613c3a57600080fd5b613c4685828601613aaa565b9150509250929050565b60005b83811015613c6b578181015183820152602001613c53565b50506000910152565b60008151808452613c8c816020860160208601613c50565b601f01601f19169290920160200192915050565b602081526000610b086020830184613c74565b83815282151560208201526060604082015260006108f16060830184613c74565b600080600060608486031215613ce957600080fd5b83359250602084013591506040840135613d0281613b8d565b809150509250925092565b60008083601f840112613d1f57600080fd5b5081356001600160401b03811115613d3657600080fd5b6020830191508360208260051b8501011115613d5157600080fd5b9250929050565b60008060008060608587031215613d6e57600080fd5b8435935060208501356001600160401b03811115613d8b57600080fd5b613d9787828801613d0d565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613de2578351835260209384019390920191600101613dc4565b509095945050505050565b600080600080600060a08688031215613e0557600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e3d57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613e6957600080fd5b8335613e7481613b8d565b92506020840135915060408401356001600160401b03811115613b7757600080fd5b60008060008060008060a08789031215613eaf57600080fd5b8635955060208701356001600160401b03811115613ecc57600080fd5b613ed889828a01613d0d565b909650945050604087013592506060870135915060808701356001600160401b03811115613f0557600080fd5b613f1189828a01613aaa565b9150509295509295509295565b600060208284031215613f3057600080fd5b8135610b0881613b8d565b600080600080600060808688031215613f5357600080fd5b853594506020860135935060408601356001600160401b03811115613f7757600080fd5b8601601f81018813613f8857600080fd5b80356001600160401b03811115613f9e57600080fd5b886020828401011115613fb057600080fd5b959894975060200195606001359392505050565b600080600060608486031215613fd957600080fd5b8335613fe481613b8d565b92506020840135613ff481613b8d565b91506040840135613d0281613b8d565b60006020828403121561401657600080fd5b81356001600160401b0381111561402c57600080fd5b61403884828501613aaa565b949350505050565b6000806040838503121561405357600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b818103818111156129ce576129ce614064565b80820281158282048414176129ce576129ce614064565b6000826140c157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b03811681146140f357600080fd5b919050565b805180151581146140f357600080fd5b600080600080600060a0868803121561412057600080fd5b614129866140dc565b9450602086015161413981613b8d565b60408701519094506005811061414e57600080fd5b925061415c606087016140f8565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561419957600080fd5b610b08826140f8565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b6000806000606084860312156141ee57600080fd5b835192506141fe602085016140f8565b915061420c604085016140f8565b90509250925092565b808201808211156129ce576129ce614064565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60006020828403121561427157600080fd5b5051919050565b600181811c9082168061428c57607f821691505b6020821081036142ac57634e487b7160e01b600052602260045260246000fd5b50919050565b8381528260208201526060604082015260008083546142d081614278565b80606086015260018216600081146142ef576001811461430b5761433f565b60ff1983166080870152608082151560051b870101935061433f565b86600052602060002060005b8381101561433657815488820160800152600190910190602001614317565b87016080019450505b5091979650505050505050565b6000825161435e818460208701613c50565b9190910192915050565b600080600080600080600060e0888a03121561438357600080fd5b61438c886140dc565b965061439a602089016140f8565b604089015160608a015160808b015160a08c01519399509197509550935091506143c660c089016140f8565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a6e57806000526020600020601f840160051c810160208510156144815750805b601f840160051c820191505b818110156144a1576000815560010161448d565b5050505050565b6001600160401b038311156144bf576144bf613a94565b6144d3836144cd8354614278565b8361445a565b6000601f84116001811461450757600085156144ef5750838201355b600019600387901b1c1916600186901b1783556144a1565b600083815260209020601f19861690835b828110156145385786850135825560209485019460019092019101614518565b50868210156145555760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b6000602082840312156145af57600080fd5b8151610b0881613b8d565b81835260006001600160fb1b038311156145d357600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146006040830185876145ba565b9050826020830152949350505050565b6040815260006146246040830185876145ba565b82810360208401526146368185613c74565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220809532e74c527307f7c4fb23228698c888252ec20a2012cf6adf507c53468b9f64736f6c634300081c0033", - "deployedBytecode": "0x60806040526004361061023b5760003560e01c8063751accd01161012e578063d2b8035a116100ab578063f2f4eb261161006f578063f2f4eb261461076d578063f32ab9271461078d578063f7e7d1fd146107c2578063f8abee10146107e2578063fc6f8f161461081257600080fd5b8063d2b8035a146106c8578063da3beb8c146106e8578063e349ad301461059a578063e4c0aaf414610708578063ec7b23fb1461072857600080fd5b8063b34bfaa8116100f2578063b34bfaa81461063c578063b6ede54014610652578063ba66fde714610672578063be46760414610692578063c0c53b8b146106a857600080fd5b8063751accd01461057a578063796490f91461059a5780637c04034e146105b05780638e426460146105d0578063a7cc08fe146105f057600080fd5b80634f1ef286116101bc5780635c92e2f6116101805780635c92e2f6146104a057806365540b96146104c0578063675926f6146104ed57806369f3f0411461050d5780636d4cd8ea1461055a57600080fd5b80634f1ef286146103c957806352d1902d146103dc57806354fd4d50146103f1578063564a565d146104305780635a155ccd1461045f57600080fd5b80631cc3423a116102035780631cc3423a1461033a5780632621b9a21461035a5780632d68efc914610374578063362c3479146103945780634b2f0ea0146103b457600080fd5b80630855bbe9146102405780630baa64d1146102755780630c340a24146102955780631200aabc146102c25780631c3db16d146102fd575b600080fd5b34801561024c57600080fd5b5061026061025b366004613a67565b610832565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b50610260610290366004613a67565b6108fa565b3480156102a157600080fd5b506000546102b5906001600160a01b031681565b60405161026c9190613a80565b3480156102ce57600080fd5b506102ef6102dd366004613a67565b60036020526000908152604090205481565b60405190815260200161026c565b34801561030957600080fd5b5061031d610318366004613a67565b610971565b60408051938452911515602084015215159082015260600161026c565b34801561034657600080fd5b506102ef610355366004613b3e565b610adf565b34801561036657600080fd5b506004546102609060ff1681565b34801561038057600080fd5b506007546102b5906001600160a01b031681565b3480156103a057600080fd5b506102ef6103af366004613ba2565b610b0f565b6103c76103c2366004613bdf565b610fc4565b005b6103c76103d7366004613c01565b611854565b3480156103e857600080fd5b506102ef611a73565b3480156103fd57600080fd5b50610423604051806040016040528060068152602001650302e31322e360d41b81525081565b60405161026c9190613ca0565b34801561043c57600080fd5b5061045061044b366004613a67565b611ad1565b60405161026c93929190613cb3565b34801561046b57600080fd5b5061026061047a366004613cd4565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104ac57600080fd5b506103c76104bb366004613d58565b611b97565b3480156104cc57600080fd5b506104e06104db366004613a67565b611ba3565b60405161026c9190613daa565b3480156104f957600080fd5b506102ef610508366004613ded565b611c67565b34801561051957600080fd5b5061052d610528366004613e28565b611daa565b604080519687529415156020870152938501929092526060840152608083015260a082015260c00161026c565b34801561056657600080fd5b50610260610575366004613a67565b611e62565b34801561058657600080fd5b506103c7610595366004613e54565b611fe5565b3480156105a657600080fd5b506102ef61271081565b3480156105bc57600080fd5b506103c76105cb366004613e96565b6120b1565b3480156105dc57600080fd5b506103c76105eb366004613f1e565b6120c8565b3480156105fc57600080fd5b5061061061060b366004613e28565b612114565b604080516001600160a01b0390951685526020850193909352918301521515606082015260800161026c565b34801561064857600080fd5b506102ef614e2081565b34801561065e57600080fd5b506103c761066d366004613f3b565b6121da565b34801561067e57600080fd5b5061026061068d366004613e28565b6123cd565b34801561069e57600080fd5b506102ef61138881565b3480156106b457600080fd5b506103c76106c3366004613fc4565b612468565b3480156106d457600080fd5b506102b56106e3366004613bdf565b612532565b3480156106f457600080fd5b506102ef610703366004613bdf565b612881565b34801561071457600080fd5b506103c7610723366004613f1e565b6129d4565b34801561073457600080fd5b50610748610743366004614004565b612a20565b604080516001600160a01b03909416845291151560208401529082015260600161026c565b34801561077957600080fd5b506001546102b5906001600160a01b031681565b34801561079957600080fd5b506107ad6107a8366004613bdf565b612a65565b6040805192835260208301919091520161026c565b3480156107ce57600080fd5b506103c76107dd366004613f1e565b612ab7565b3480156107ee57600080fd5b506102606107fd366004613a67565b60066020526000908152604090205460ff1681565b34801561081e57600080fd5b506102ef61082d366004613a67565b612b89565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190614040565b9150915060006108b285611ba3565b9050805160001480156108f157506127106113886108d0858561407a565b6108da919061408d565b6108e491906140a4565b6108ee844261407a565b10155b95945050505050565b60008181526003602052604081205460028054839290811061091e5761091e6140c6565b600091825260208220600590910201805490925082906109409060019061407a565b81548110610950576109506140c6565b60009182526020909120600c90910201805460059091015414949350505050565b600080600080600260036000878152602001908152602001600020548154811061099d5761099d6140c6565b600091825260208220600590910201805490925082906109bf9060019061407a565b815481106109cf576109cf6140c6565b60009182526020909120600c90910201600381015460ff1694509050836109fa5780600101546109fd565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190614108565b5090935060049250610a80915050565b816004811115610a9257610a92614171565b03610ad5576000610aa288611ba3565b90508051600103610ad35780600081518110610ac057610ac06140c6565b6020026020010151965060009550600194505b505b5050509193909250565b604080516020808201869052818301859052825180830384018152606090920190925280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b819190614108565b50935050505080610bd95760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c509190614187565b15610c8e5760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610bd0565b60008681526006602052604090205460ff16610cbc5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110610ce057610ce06140c6565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610d1457610d146140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9391906141d9565b5050600087815260078401602052604090205490915060ff16610ddd576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610f22565b808603610e52576000868152600683016020526040902054610e00576000610e4b565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610e41919061408d565b610e4b91906140a4565b9450610f22565b600081815260078301602052604090205460ff16610f225781600601600083600a01600181548110610e8657610e866140c6565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610ebc57610ebc6140c6565b9060005260206000200154815260200190815260200160002054610ee09190614215565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610f15919061408d565b610f1f91906140a4565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610fb857600754610f69906001600160a01b038a811691889116612bb5565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051610faf929190918252602082015260400190565b60405180910390a45b50505050949350505050565b600082815260036020526040902054600280548492908110610fe857610fe86140c6565b600091825260209091206002600590920201015460ff161561101c5760405162461bcd60e51b8152600401610bd090614228565b600083815260036020526040812054600280549091908110611040576110406140c6565b9060005260206000209060050201905080600101548311156110a45760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610bd0565b60008481526006602052604090205460ff166110d25760405162461bcd60e51b8152600401610bd0906141a2565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa15801561111f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111439190614040565b9150915081421015801561115657508042105b61119b5760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610bd0565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156111dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120091906141d9565b50509050868103611215576127109150611296565b612710611388611225868661407a565b61122f919061408d565b61123991906140a4565b611243854261407a565b106112905760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610bd0565b614e2091505b845460009086906112a99060019061407a565b815481106112b9576112b96140c6565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c919061425f565b611346919061407a565b60008a815260078401602052604090205490915060ff16156113aa5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610bd0565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156113f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611418919061425f565b90506000612710611429878461408d565b61143391906140a4565b61143d9083614215565b60008c8152600686016020526040812054919250908211156114ee5760008c81526006860160205260409020543490611476908461407a565b1161149b5760008c8152600686016020526040902054611496908361407a565b61149d565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516114e5929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061151a908490614215565b909155505060008c81526006860160205260408120805483929061153f908490614215565b909155505060008c815260068601602052604090205482116116115760008c815260068601602052604081205460098701805491929091611581908490614215565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a8501546001101561181c5782856009015461162e919061407a565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190614187565b156116b95760028a01805460ff1916600117905561179c565b895460038b0160006116cc876001614215565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161174791815260200190565b602060405180830381865afa158015611764573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611788919061425f565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016117e9939291906142b2565b6000604051808303818588803b15801561180257600080fd5b505af1158015611816573d6000803e3d6000fd5b50505050505b8034111561184557611845611831823461407a565b6007543391906001600160a01b0316612bb5565b50505050505050505050505050565b61185d82612ca0565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806118db57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166118cf6000805160206146418339815191525490565b6001600160a01b031614155b156118f95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611953575060408051601f3d908101601f191682019092526119509181019061425f565b60015b6119725781604051630c76093760e01b8152600401610bd09190613a80565b60008051602061464183398151915281146119a357604051632a87526960e21b815260048101829052602401610bd0565b6000805160206146418339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611a6e576000836001600160a01b031683604051611a0a919061434c565b600060405180830381855af49150503d8060008114611a45576040519150601f19603f3d011682016040523d82523d6000602084013e611a4a565b606091505b5050905080611a6c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611abe5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464183398151915290565b60028181548110611ae157600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611b1490614278565b80601f0160208091040260200160405190810160405280929190818152602001828054611b4090614278565b8015611b8d5780601f10611b6257610100808354040283529160200191611b8d565b820191906000526020600020905b815481529060010190602001808311611b7057829003601f168201915b5050505050905083565b611a6c84848484612ccd565b6000818152600360205260408120546002805460609392908110611bc957611bc96140c6565b60009182526020822060059091020180549092508290611beb9060019061407a565b81548110611bfb57611bfb6140c6565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c5957602002820191906000526020600020905b815481526020019060010190808311611c45575b505050505092505050919050565b600085815260036020526040812054600280548392908110611c8b57611c8b6140c6565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611cbf57611cbf6140c6565b90600052602060002090600c02016000018681548110611ce157611ce16140c6565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6391906141d9565b506003850154919350915060ff168015611d8757508183600201541480611d875750805b15611d9a576127109450505050506108f1565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ddb57611ddb6140c6565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e0f57611e0f6140c6565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611e8657611e866140c6565b60009182526020822060059091020180549092508290611ea89060019061407a565b81548110611eb857611eb86140c6565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611f13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f379190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015611f92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb69190614368565b5050505050915050600081611fcc578354611fd2565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b0316331461200f5760405162461bcd60e51b8152600401610bd0906143d4565b6000836001600160a01b0316838360405161202a919061434c565b60006040518083038185875af1925050503d8060008114612067576040519150601f19603f3d011682016040523d82523d6000602084013e61206c565b606091505b5050905080611a6c5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610bd0565b6120c086868686868633613030565b505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b8152600401610bd0906143d4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612142576121426140c6565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612176576121766140c6565b90600052602060002090600c02016000018781548110612198576121986140c6565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146122045760405162461bcd60e51b8152600401610bd090614416565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161228f8587836144a8565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612316919061425f565b612320919061407a565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108906123bb908a908a908a90614567565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106123f1576123f16140c6565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612425576124256140c6565b90600052602060002090600c02016000018481548110612447576124476140c6565b600091825260209091206004909102016003015460ff169695505050505050565b60016000612474613761565b8054909150600160401b900460ff168061249b575080546001600160401b03808416911610155b156124b85760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556124e4858585613785565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b0316331461255f5760405162461bcd60e51b8152600401610bd090614416565b600083815260036020526040902054600280548592908110612583576125836140c6565b600091825260209091206002600590920201015460ff16156125b75760405162461bcd60e51b8152600401610bd090614228565b60008481526003602052604081205460028054919291839081106125dd576125dd6140c6565b60009182526020822060059091020180549092506125fd9060019061407a565b90506000826000018281548110612616576126166140c6565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f919061459d565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156126ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127129190614108565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061279a919061459d565b98506001600160a01b0389166127b6575050505050505061287a565b6127c1848c8b6137cc565b1561286d57604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612872565b600098505b505050505050505b5092915050565b6000828152600360205260408120546002805483929081106128a5576128a56140c6565b600091825260208083208684526003600590930201918201905260408220548154919350839181106128d9576128d96140c6565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295c91906141d9565b509150915082600401546000148061298b57508015801561298b57506000828152600284016020526040902054155b1561299d5760009450505050506129ce565b80156129b25750506004015491506129ce9050565b5060009081526002909101602052604090205491506129ce9050565b92915050565b6000546001600160a01b031633146129fe5760405162461bcd60e51b8152600401610bd0906143d4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600060a084511015612a3d57506000915081905080612a5e565b505050608081015160a0808301516001600160a01b0383169290911c600116905b9193909250565b6000828152600360205260408120546002805491929183908110612a8b57612a8b6140c6565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612ac3613761565b8054909150600160401b900460ff1680612aea575080546001600160401b03808416911610155b15612b075760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612b9e57612b9e6140c6565b600091825260209091206005909102015492915050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015612be457505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612c1f57600080fd5b505af1158015612c33573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b158015612c8357600080fd5b505af1158015612c97573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b03163314612cca5760405162461bcd60e51b8152600401610bd0906143d4565b50565b600084815260036020526040902054600280548692908110612cf157612cf16140c6565b600091825260209091206002600590920201015460ff1615612d255760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d939190614108565b5090935060019250612da3915050565b816004811115612db557612db5614171565b14612e125760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610bd0565b82612e4f5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610bd0565b60008681526006602052604090205460ff16612e7d5760405162461bcd60e51b8152600401610bd0906141a2565b600086815260036020526040812054600280549091908110612ea157612ea16140c6565b60009182526020822060059091020180549092508290612ec39060019061407a565b81548110612ed357612ed36140c6565b90600052602060002090600c0201905060005b86811015612fc9573382898984818110612f0257612f026140c6565b9050602002013581548110612f1957612f196140c6565b60009182526020909120600490910201546001600160a01b031614612f805760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610bd0565b8582898984818110612f9457612f946140c6565b9050602002013581548110612fab57612fab6140c6565b60009182526020909120600160049092020181019190915501612ee6565b5086869050816005016000828254612fe19190614215565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061301e908b908b908b906145ec565b60405180910390a35050505050505050565b600087815260036020526040902054600280548992908110613054576130546140c6565b600091825260209091206002600590920201015460ff16156130885760405162461bcd60e51b8152600401610bd090614228565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa1580156130d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f69190614108565b5090935060029250613106915050565b81600481111561311857613118614171565b146131735760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610bd0565b866131b55760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610bd0565b60008981526006602052604090205460ff166131e35760405162461bcd60e51b8152600401610bd0906141a2565b600089815260036020526040812054600280549091908110613207576132076140c6565b9060005260206000209060050201905080600101548711156132625760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610bd0565b805460009082906132759060019061407a565b81548110613285576132856140c6565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d906132ca908f9060040190815260200190565b60a060405180830381865afa1580156132e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061330b9190614108565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015613366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061338a9190614368565b5050505050915050600061339f8b8b8b610adf565b905060005b8c811015613626576001600160a01b038916858f8f848181106133c9576133c96140c6565b90506020020135815481106133e0576133e06140c6565b60009182526020909120600490910201546001600160a01b0316146134475760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610bd0565b82158061348e575081858f8f84818110613463576134636140c6565b905060200201358154811061347a5761347a6140c6565b906000526020600020906004020160010154145b61350e5760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610bd0565b848e8e83818110613521576135216140c6565b9050602002013581548110613538576135386140c6565b600091825260209091206003600490920201015460ff16156135915760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610bd0565b8b858f8f848181106135a5576135a56140c6565b90506020020135815481106135bc576135bc6140c6565b60009182526020909120600260049092020101556001858f8f848181106135e5576135e56140c6565b90506020020135815481106135fc576135fc6140c6565b60009182526020909120600490910201600301805460ff19169115159190911790556001016133a4565b5050506004820180548b9250600090613640908490614215565b90915550506000888152600282016020526040812080548b9290613665908490614215565b90915550506001810154880361369457600381015460ff161561368f5760038101805460ff191690555b61370d565b60018101546000908152600282016020526040808220548a8352912054036136d657600381015460ff1661368f5760038101805460ff1916600117905561370d565b60018101546000908152600282016020526040808220548a8352912054111561370d576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b60405161374c93929190614610565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61378d61398e565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60006137d98484846139b5565b6137e557506000610b08565b600083815260036020526040812054600280549192918390811061380b5761380b6140c6565b9060005260206000209060050201905060008060006138b584600401805461383290614278565b80601f016020809104026020016040519081016040528092919081815260200182805461385e90614278565b80156138ab5780601f10613880576101008083540402835291602001916138ab565b820191906000526020600020905b81548152906001019060200180831161388e57829003601f168201915b5050505050612a20565b919450925090506001600160a01b0383166138d857600195505050505050610b08565b811561395f57604051627eeac760e11b81526001600160a01b038881166004830152602482018390526000919085169062fdd58e906044015b602060405180830381865afa15801561392e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613952919061425f565b1195505050505050610b08565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190613911908b90600401613a80565b613996613a4d565b6139b357604051631afcd79f60e31b815260040160405180910390fd5b565b60045460009060ff1615613a435760008381526003602052604081205460028054919291839081106139e9576139e96140c6565b6000918252602082206005909102018054909250613a099060019061407a565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610b08915050565b5060019392505050565b6000613a57613761565b54600160401b900460ff16919050565b600060208284031215613a7957600080fd5b5035919050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613abb57600080fd5b8135602083016000806001600160401b03841115613adb57613adb613a94565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613b0957613b09613a94565b604052838152905080828401871015613b2157600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613b5357600080fd5b833592506020840135915060408401356001600160401b03811115613b7757600080fd5b613b8386828701613aaa565b9150509250925092565b6001600160a01b0381168114612cca57600080fd5b60008060008060808587031215613bb857600080fd5b843593506020850135613bca81613b8d565b93969395505050506040820135916060013590565b60008060408385031215613bf257600080fd5b50508035926020909101359150565b60008060408385031215613c1457600080fd5b8235613c1f81613b8d565b915060208301356001600160401b03811115613c3a57600080fd5b613c4685828601613aaa565b9150509250929050565b60005b83811015613c6b578181015183820152602001613c53565b50506000910152565b60008151808452613c8c816020860160208601613c50565b601f01601f19169290920160200192915050565b602081526000610b086020830184613c74565b83815282151560208201526060604082015260006108f16060830184613c74565b600080600060608486031215613ce957600080fd5b83359250602084013591506040840135613d0281613b8d565b809150509250925092565b60008083601f840112613d1f57600080fd5b5081356001600160401b03811115613d3657600080fd5b6020830191508360208260051b8501011115613d5157600080fd5b9250929050565b60008060008060608587031215613d6e57600080fd5b8435935060208501356001600160401b03811115613d8b57600080fd5b613d9787828801613d0d565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613de2578351835260209384019390920191600101613dc4565b509095945050505050565b600080600080600060a08688031215613e0557600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e3d57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613e6957600080fd5b8335613e7481613b8d565b92506020840135915060408401356001600160401b03811115613b7757600080fd5b60008060008060008060a08789031215613eaf57600080fd5b8635955060208701356001600160401b03811115613ecc57600080fd5b613ed889828a01613d0d565b909650945050604087013592506060870135915060808701356001600160401b03811115613f0557600080fd5b613f1189828a01613aaa565b9150509295509295509295565b600060208284031215613f3057600080fd5b8135610b0881613b8d565b600080600080600060808688031215613f5357600080fd5b853594506020860135935060408601356001600160401b03811115613f7757600080fd5b8601601f81018813613f8857600080fd5b80356001600160401b03811115613f9e57600080fd5b886020828401011115613fb057600080fd5b959894975060200195606001359392505050565b600080600060608486031215613fd957600080fd5b8335613fe481613b8d565b92506020840135613ff481613b8d565b91506040840135613d0281613b8d565b60006020828403121561401657600080fd5b81356001600160401b0381111561402c57600080fd5b61403884828501613aaa565b949350505050565b6000806040838503121561405357600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b818103818111156129ce576129ce614064565b80820281158282048414176129ce576129ce614064565b6000826140c157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80516001600160601b03811681146140f357600080fd5b919050565b805180151581146140f357600080fd5b600080600080600060a0868803121561412057600080fd5b614129866140dc565b9450602086015161413981613b8d565b60408701519094506005811061414e57600080fd5b925061415c606087016140f8565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561419957600080fd5b610b08826140f8565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b6000806000606084860312156141ee57600080fd5b835192506141fe602085016140f8565b915061420c604085016140f8565b90509250925092565b808201808211156129ce576129ce614064565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60006020828403121561427157600080fd5b5051919050565b600181811c9082168061428c57607f821691505b6020821081036142ac57634e487b7160e01b600052602260045260246000fd5b50919050565b8381528260208201526060604082015260008083546142d081614278565b80606086015260018216600081146142ef576001811461430b5761433f565b60ff1983166080870152608082151560051b870101935061433f565b86600052602060002060005b8381101561433657815488820160800152600190910190602001614317565b87016080019450505b5091979650505050505050565b6000825161435e818460208701613c50565b9190910192915050565b600080600080600080600060e0888a03121561438357600080fd5b61438c886140dc565b965061439a602089016140f8565b604089015160608a015160808b015160a08c01519399509197509550935091506143c660c089016140f8565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611a6e57806000526020600020601f840160051c810160208510156144815750805b601f840160051c820191505b818110156144a1576000815560010161448d565b5050505050565b6001600160401b038311156144bf576144bf613a94565b6144d3836144cd8354614278565b8361445a565b6000601f84116001811461450757600085156144ef5750838201355b600019600387901b1c1916600186901b1783556144a1565b600083815260209020601f19861690835b828110156145385786850135825560209485019460019092019101614518565b50868210156145555760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b6000602082840312156145af57600080fd5b8151610b0881613b8d565b81835260006001600160fb1b038311156145d357600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146006040830185876145ba565b9050826020830152949350505050565b6040815260006146246040830185876145ba565b82810360208401526146368185613c74565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220809532e74c527307f7c4fb23228698c888252ec20a2012cf6adf507c53468b9f64736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "extraDataToTokenInfo(bytes)": { - "details": "Extracts token gating information from the extra data.", - "params": { - "_extraData": "The extra data bytes array with the following encoding: - bytes 0-31: uint96 courtID, not used here - bytes 32-63: uint256 minJurors, not used here - bytes 64-95: uint256 disputeKitID, not used here - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160) - bytes 128-159: uint256 tokenId" - }, - "returns": { - "isERC1155": "True if the token is an ERC-1155, false for ERC-20/ERC-721.", - "tokenGate": "The address of the token contract used for gating access.", - "tokenId": "The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721)." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encodingThe unused parameters may be used by overriding contracts.", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitGated Dispute kit implementation adapted from DisputeKitClassic - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 6613, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6616, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)303" - }, - { - "astId": 6620, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)6552_storage)dyn_storage" - }, - { - "astId": 6624, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6626, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 6634, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 6638, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6640, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)6552_storage)dyn_storage": { - "base": "t_struct(Dispute)6552_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)6590_storage)dyn_storage": { - "base": "t_struct(Round)6590_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)6599_storage)dyn_storage": { - "base": "t_struct(Vote)6599_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)303": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)6552_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 6541, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)6590_storage)dyn_storage" - }, - { - "astId": 6543, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6545, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 6549, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6551, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)6590_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 6556, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)6599_storage)dyn_storage" - }, - { - "astId": 6558, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6562, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6564, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 6566, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6568, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 6572, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6576, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6582, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 6584, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 6587, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 6589, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)6599_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 6592, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6594, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 6596, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 6598, - "contract": "src/arbitration/dispute-kits/DisputeKitGated.sol:DisputeKitGated", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json deleted file mode 100644 index 5088beb17..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x2b88866107b599692b44d16247e2edad04c010db28b465ebec598fe304ee8179", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", - "transactionIndex": 1, - "gasUsed": "198526", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000004000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1a56f340e250ea8b08564ba8d0c52a7a1772cbd4aea06c22dc494aad1cd0e306", - "transactionHash": "0x2b88866107b599692b44d16247e2edad04c010db28b465ebec598fe304ee8179", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 175286139, - "transactionHash": "0x2b88866107b599692b44d16247e2edad04c010db28b465ebec598fe304ee8179", - "address": "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x1a56f340e250ea8b08564ba8d0c52a7a1772cbd4aea06c22dc494aad1cd0e306" - } - ], - "blockNumber": 175286139, - "cumulativeGasUsed": "198526", - "status": 1, - "byzantium": true - }, - "args": [ - "0x89BF27c2148873E0ae4d8c6253C2e4423dF959aF", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000001bd44c4a4511dbfa7dc1d5bc201635596e7200f9" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitGatedProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220996d130d61aaeb26a9d0d04a99b8d31e12de6834d2200a693f04efa432fb1da264736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json deleted file mode 100644 index 60d6c10c3..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json +++ /dev/null @@ -1,1312 +0,0 @@ -{ - "address": "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x5d878ce4b9aa09064029160c890e1c6b7637303ec053fe0defaf597f14161b9d", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", - "transactionIndex": 2, - "gasUsed": "198466", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe27c44922389c9aca10217b21c6ba52520b90df7d24018af2f897437f2938955", - "transactionHash": "0x5d878ce4b9aa09064029160c890e1c6b7637303ec053fe0defaf597f14161b9d", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175286126, - "transactionHash": "0x5d878ce4b9aa09064029160c890e1c6b7637303ec053fe0defaf597f14161b9d", - "address": "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0xe27c44922389c9aca10217b21c6ba52520b90df7d24018af2f897437f2938955" - } - ], - "blockNumber": 175286126, - "cumulativeGasUsed": "372592", - "status": 1, - "byzantium": true - }, - "args": [ - "0x036d321AfD9Ca457Be9E523736bc9FbB79FA7efc", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000001bd44c4a4511dbfa7dc1d5bc201635596e7200f9" - ], - "numDeployments": 2, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0x3829A2486d53ee984a0ca2D76552715726b77138" - ] - }, - "implementation": "0x6582CE0FdB29B5673E6650e34728C784BafB2139", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Implementation.json deleted file mode 100644 index abf8a105a..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Implementation.json +++ /dev/null @@ -1,1975 +0,0 @@ -{ - "address": "0x6582CE0FdB29B5673E6650e34728C784BafB2139", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "ChoiceFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "CommitCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "CommitCastShutter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Contribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_contributor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "LOSER_APPEAL_PERIOD_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOSER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WINNER_STAKE_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "name": "alreadyDrawn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areCommitsAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "areVotesAllCast", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - } - ], - "name": "castCommit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "bytes32", - "name": "_commit", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_identity", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_encryptedVote", - "type": "bytes" - } - ], - "name": "castCommitShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "_voteIDs", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "castVoteShutter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "coreDisputeID", - "type": "uint256" - } - ], - "name": "coreDisputeIDToActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "coreDisputeIDToLocal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_nbVotes", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "jumped", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "fundAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getCoherentCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "getDegreeOfCoherence", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "getFundedChoices", - "outputs": [ - { - "internalType": "uint256[]", - "name": "fundedChoices", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - } - ], - "name": "getLocalDisputeRoundID", - "outputs": [ - { - "internalType": "uint256", - "name": "localDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "localRoundID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_localDisputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "totalVoted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCommited", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVoters", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "choiceCount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVoteInfo", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_justification", - "type": "string" - } - ], - "name": "hashVote", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - } - ], - "name": "isAppealFunded", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "isVoteActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "singleDrawPerJuror", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "_beneficiary", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_coreRoundID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choice", - "type": "uint256" - } - ], - "name": "withdrawFeesAndRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x4e461a0cc70201b7f6b702b6d4956f868c72bbb3a0013f41cb71be8ea04dc5d7", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x6582CE0FdB29B5673E6650e34728C784BafB2139", - "transactionIndex": 2, - "gasUsed": "4030626", - "logsBloom": "0x00000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0735174ec9be9f341f5d1558cf8b786100456636868afa09a10e59079ebde852", - "transactionHash": "0x4e461a0cc70201b7f6b702b6d4956f868c72bbb3a0013f41cb71be8ea04dc5d7", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 179579792, - "transactionHash": "0x4e461a0cc70201b7f6b702b6d4956f868c72bbb3a0013f41cb71be8ea04dc5d7", - "address": "0x6582CE0FdB29B5673E6650e34728C784BafB2139", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 2, - "blockHash": "0x0735174ec9be9f341f5d1558cf8b786100456636868afa09a10e59079ebde852" - } - ], - "blockNumber": 179579792, - "cumulativeGasUsed": "4074705", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"CommitCastShutter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"name\":\"alreadyDrawn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_identity\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_encryptedVote\",\"type\":\"bytes\"}],\"name\":\"castCommitShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVoteShutter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"CommitCastShutter(uint256,address,bytes32,bytes32,bytes)\":{\"details\":\"Emitted when a vote is cast.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_juror\":\"The address of the juror casting the vote commitment.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash including the justification.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_encryptedVote\":\"The Shutter encrypted vote.\",\"_identity\":\"The Shutter identity used for encryption.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"details\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Returns the number of rounds in a dispute.\",\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"details\":\"Returns the vote information for a given vote ID.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"commit\":\"The commit of the vote.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"Computes the hash of a vote using ABI encoding\",\"params\":{\"_choice\":\"The choice being voted for\",\"_justification\":\"The justification for the vote\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitShutter Added functionality: shielded voting. Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitShutter.sol\":\"DisputeKitShutter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool)))\\n public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function __DisputeKitClassicBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return drawnAddress;\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n bytes32 voteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == _juror, \\\"The juror has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == voteHash,\\n \\\"The vote hash must match the commitment in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n require(coreDisputeIDToActive[_coreDisputeID], \\\"Not active for core dispute ID\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @dev The unused parameters may be used by overriding contracts.\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// Note that this function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @dev Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @dev Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n result = !alreadyDrawn[localDisputeID][localRoundID][_juror];\\n } else {\\n result = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc418b9a76802db5d16819836734ecff8b76d5f37101819aee6fd1844dfe21dd9\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitShutter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitShutter\\n/// Added functionality: shielded voting.\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitShutter is DisputeKitClassicBase {\\n string public constant override version = \\\"0.12.0\\\";\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a vote is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _commit The commitment hash.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n event CommitCastShutter(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n bytes32 indexed _commit,\\n bytes32 _identity,\\n bytes _encryptedVote\\n );\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(address _governor, KlerosCore _core, address _wNative) external reinitializer(1) {\\n __DisputeKitClassicBase_initialize(_governor, _core, _wNative);\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(9) {\\n wNative = _wNative;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash including the justification.\\n /// @param _identity The Shutter identity used for encryption.\\n /// @param _encryptedVote The Shutter encrypted vote.\\n function castCommitShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit,\\n bytes32 _identity,\\n bytes calldata _encryptedVote\\n ) external notJumped(_coreDisputeID) {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n emit CommitCastShutter(_coreDisputeID, msg.sender, _commit, _identity, _encryptedVote);\\n }\\n\\n function castVoteShutter(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n address juror = dispute.rounds[dispute.rounds.length - 1].votes[_voteIDs[0]].account;\\n\\n // _castVote() ensures that all the _voteIDs do belong to `juror`\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, juror);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Computes the hash of a vote using ABI encoding\\n * @param _choice The choice being voted for\\n * @param _justification The justification for the vote\\n * @param _salt A random salt for commitment\\n * @return bytes32 The hash of the encoded vote parameters\\n */\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) public pure override returns (bytes32) {\\n bytes32 justificationHash = keccak256(bytes(_justification));\\n return keccak256(abi.encode(_choice, _salt, justificationHash));\\n }\\n}\\n\",\"keccak256\":\"0x22667ae7b4db6a3290463f2f42df92136c4f91190665a2f14523f05e1bbc50c5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516146976100fc600039600081816119420152818161196b0152611b6301526146976000f3fe6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf41461075e578063f2f4eb261461077e578063f32ab9271461079e578063f7e7d1fd146107d3578063f8abee10146107f3578063fc6f8f161461082357600080fd5b8063be467604146106e8578063c0c53b8b146106fe578063d2b8035a1461071e578063da3beb8c1461073e578063e349ad30146105d057600080fd5b80638f06f112116100fd5780638f06f11214610626578063a7cc08fe14610646578063b34bfaa814610692578063b6ede540146106a8578063ba66fde7146106c857600080fd5b80636d4cd8ea14610590578063751accd0146105b0578063796490f9146105d05780637c04034e146105e65780638e4264601461060657600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd146104955780635c92e2f6146104d657806365540b96146104f6578063675926f61461052357806369f3f0411461054357600080fd5b80634b2f0ea0146103ec5780634f1ef286146103ff57806352d1902d1461041257806354fd4d5014610427578063564a565d1461046657600080fd5b80631c3db16d1161020e5780631c3db16d146103355780631cc3423a146103725780632621b9a2146103925780632d68efc9146103ac578063362c3479146103cc57600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102fa575b600080fd5b34801561025757600080fd5b5061026b610266366004613a09565b610843565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613aae565b61090b565b005b3480156102ae57600080fd5b5061026b6102bd366004613a09565b6109c9565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561030657600080fd5b50610327610315366004613a09565b60036020526000908152604090205481565b604051908152602001610277565b34801561034157600080fd5b50610355610350366004613a09565b610a40565b604080519384529115156020840152151590820152606001610277565b34801561037e57600080fd5b5061032761038d366004613be8565b610bae565b34801561039e57600080fd5b5060045461026b9060ff1681565b3480156103b857600080fd5b506007546102e2906001600160a01b031681565b3480156103d857600080fd5b506103276103e7366004613c4c565b610bee565b6102a06103fa366004613c89565b61109e565b6102a061040d366004613cab565b61192e565b34801561041e57600080fd5b50610327611b56565b34801561043357600080fd5b50610459604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613d4a565b34801561047257600080fd5b50610486610481366004613a09565b611bb4565b60405161027793929190613d5d565b3480156104a157600080fd5b5061026b6104b0366004613d7e565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104e257600080fd5b506102a06104f1366004613db7565b611c7a565b34801561050257600080fd5b50610516610511366004613a09565b611c86565b6040516102779190613e09565b34801561052f57600080fd5b5061032761053e366004613e4c565b611d4a565b34801561054f57600080fd5b5061056361055e366004613e87565b611e8d565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059c57600080fd5b5061026b6105ab366004613a09565b611f45565b3480156105bc57600080fd5b506102a06105cb366004613eb3565b6120c8565b3480156105dc57600080fd5b5061032761271081565b3480156105f257600080fd5b506102a0610601366004613ef5565b612194565b34801561061257600080fd5b506102a0610621366004613f7d565b6121ab565b34801561063257600080fd5b506102a0610641366004613ef5565b6121f7565b34801561065257600080fd5b50610666610661366004613e87565b6122bd565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069e57600080fd5b50610327614e2081565b3480156106b457600080fd5b506102a06106c3366004613f9a565b612383565b3480156106d457600080fd5b5061026b6106e3366004613e87565b612576565b3480156106f457600080fd5b5061032761138881565b34801561070a57600080fd5b506102a0610719366004613ff4565b612611565b34801561072a57600080fd5b506102e2610739366004613c89565b6126db565b34801561074a57600080fd5b50610327610759366004613c89565b612a2a565b34801561076a57600080fd5b506102a0610779366004613f7d565b612b7d565b34801561078a57600080fd5b506001546102e2906001600160a01b031681565b3480156107aa57600080fd5b506107be6107b9366004613c89565b612bc9565b60408051928352602083019190915201610277565b3480156107df57600080fd5b506102a06107ee366004613f7d565b612c1b565b3480156107ff57600080fd5b5061026b61080e366004613a09565b60066020526000908152604090205460ff1681565b34801561082f57600080fd5b5061032761083e366004613a09565b612ced565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190614034565b9150915060006108c385611c86565b90508051600014801561090257506127106113886108e1858561406e565b6108eb9190614081565b6108f59190614098565b6108ff844261406e565b10155b95945050505050565b60008781526003602052604090205460028054899290811061092f5761092f6140ba565b600091825260209091206002600590920201015460ff161561096c5760405162461bcd60e51b8152600401610963906140d0565b60405180910390fd5b61097888888888612d19565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109b793929190614130565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109ed576109ed6140ba565b60009182526020822060059091020180549092508290610a0f9060019061406e565b81548110610a1f57610a1f6140ba565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6c57610a6c6140ba565b60009182526020822060059091020180549092508290610a8e9060019061406e565b81548110610a9e57610a9e6140ba565b60009182526020909120600c90910201600381015460ff169450905083610ac9578060010154610acc565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f9190614176565b5090935060049250610b4f915050565b816004811115610b6157610b616141df565b03610ba4576000610b7188611c86565b90508051600103610ba25780600081518110610b8f57610b8f6140ba565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c609190614176565b50935050505080610cb35760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610963565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a91906141f5565b15610d685760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610963565b60008681526006602052604090205460ff16610d965760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110610dba57610dba6140ba565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610dee57610dee6140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190614247565b5050600087815260078401602052604090205490915060ff16610eb7576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ffc565b808603610f2c576000868152600683016020526040902054610eda576000610f25565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f1b9190614081565b610f259190614098565b9450610ffc565b600081815260078301602052604090205460ff16610ffc5781600601600083600a01600181548110610f6057610f606140ba565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f9657610f966140ba565b9060005260206000200154815260200190815260200160002054610fba9190614283565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fef9190614081565b610ff99190614098565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561109257600754611043906001600160a01b038a81169188911661307c565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051611089929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110c2576110c26140ba565b600091825260209091206002600590920201015460ff16156110f65760405162461bcd60e51b8152600401610963906140d0565b60008381526003602052604081205460028054909190811061111a5761111a6140ba565b90600052602060002090600502019050806001015483111561117e5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610963565b60008481526006602052604090205460ff166111ac5760405162461bcd60e51b815260040161096390614210565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121d9190614034565b9150915081421015801561123057508042105b6112755760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610963565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112da9190614247565b505090508681036112ef576127109150611370565b6127106113886112ff868661406e565b6113099190614081565b6113139190614098565b61131d854261406e565b1061136a5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610963565b614e2091505b845460009086906113839060019061406e565b81548110611393576113936140ba565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114169190614296565b611420919061406e565b60008a815260078401602052604090205490915060ff16156114845760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610963565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f29190614296565b905060006127106115038784614081565b61150d9190614098565b6115179083614283565b60008c8152600686016020526040812054919250908211156115c85760008c81526006860160205260409020543490611550908461406e565b116115755760008c8152600686016020526040902054611570908361406e565b611577565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115bf929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115f4908490614283565b909155505060008c815260068601602052604081208054839290611619908490614283565b909155505060008c815260068601602052604090205482116116eb5760008c81526006860160205260408120546009870180549192909161165b908490614283565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118f657828560090154611708919061406e565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177a91906141f5565b156117935760028a01805460ff19166001179055611876565b895460038b0160006117a6876001614283565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161182191815260200190565b602060405180830381865afa15801561183e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118629190614296565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118c3939291906142e9565b6000604051808303818588803b1580156118dc57600080fd5b505af11580156118f0573d6000803e3d6000fd5b50505050505b8034111561191f5761191f61190b823461406e565b6007543391906001600160a01b031661307c565b50505050505050505050505050565b61193782613167565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119b557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166119a96000805160206146428339815191525490565b6001600160a01b031614155b156119d35760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a2d575060408051601f3d908101601f19168201909252611a2a91810190614296565b60015b611a5557604051630c76093760e01b81526001600160a01b0383166004820152602401610963565b6000805160206146428339815191528114611a8657604051632a87526960e21b815260048101829052602401610963565b6000805160206146428339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b51576000836001600160a01b031683604051611aed9190614383565b600060405180830381855af49150503d8060008114611b28576040519150601f19603f3d011682016040523d82523d6000602084013e611b2d565b606091505b5050905080611b4f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ba15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464283398151915290565b60028181548110611bc457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611bf7906142af565b80601f0160208091040260200160405190810160405280929190818152602001828054611c23906142af565b8015611c705780601f10611c4557610100808354040283529160200191611c70565b820191906000526020600020905b815481529060010190602001808311611c5357829003601f168201915b5050505050905083565b611b4f84848484612d19565b6000818152600360205260408120546002805460609392908110611cac57611cac6140ba565b60009182526020822060059091020180549092508290611cce9060019061406e565b81548110611cde57611cde6140ba565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d3c57602002820191906000526020600020905b815481526020019060010190808311611d28575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d6e57611d6e6140ba565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611da257611da26140ba565b90600052602060002090600c02016000018681548110611dc457611dc46140ba565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e469190614247565b506003850154919350915060ff168015611e6a57508183600201541480611e6a5750805b15611e7d57612710945050505050610902565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ebe57611ebe6140ba565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ef257611ef26140ba565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f6957611f696140ba565b60009182526020822060059091020180549092508290611f8b9060019061406e565b81548110611f9b57611f9b6140ba565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201a9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612075573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612099919061439f565b50505050509150506000816120af5783546120b5565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b81526004016109639061440b565b6000836001600160a01b0316838360405161210d9190614383565b60006040518083038185875af1925050503d806000811461214a576040519150601f19603f3d011682016040523d82523d6000602084013e61214f565b606091505b5050905080611b4f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610963565b6121a386868686868633613194565b505050505050565b6000546001600160a01b031633146121d55760405162461bcd60e51b81526004016109639061440b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008681526003602052604081205460028054909190811061221b5761221b6140ba565b6000918252602082206005909102018054909250829061223d9060019061406e565b8154811061224d5761224d6140ba565b90600052602060002090600c020160000187876000818110612271576122716140ba565b9050602002013581548110612288576122886140ba565b60009182526020909120600490910201546001600160a01b031690506122b388888888888887613194565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122eb576122eb6140ba565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061231f5761231f6140ba565b90600052602060002090600c02016000018781548110612341576123416140ba565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123ad5760405162461bcd60e51b81526004016109639061444d565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124388587836144df565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561249b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bf9190614296565b6124c9919061406e565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612564908a908a908a90614130565b60405180910390a25050505050505050565b60008381526003602052604081205460028054839290811061259a5761259a6140ba565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ce576125ce6140ba565b90600052602060002090600c020160000184815481106125f0576125f06140ba565b600091825260209091206004909102016003015460ff169695505050505050565b6001600061261d6138c5565b8054909150600160401b900460ff1680612644575080546001600160401b03808416911610155b156126615760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561268d8585856138e9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146127085760405162461bcd60e51b81526004016109639061444d565b60008381526003602052604090205460028054859290811061272c5761272c6140ba565b600091825260209091206002600590920201015460ff16156127605760405162461bcd60e51b8152600401610963906140d0565b6000848152600360205260408120546002805491929183908110612786576127866140ba565b60009182526020822060059091020180549092506127a69060019061406e565b905060008260000182815481106127bf576127bf6140ba565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612824573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612848919061459e565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128bb9190614176565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561291f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612943919061459e565b98506001600160a01b03891661295f5750505050505050612a23565b61296a848c8b613930565b15612a1657604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a1b565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a4e57612a4e6140ba565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a8257612a826140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b059190614247565b5091509150826004015460001480612b34575080158015612b3457506000828152600284016020526040902054155b15612b46576000945050505050612b77565b8015612b5b575050600401549150612b779050565b506000908152600290910160205260409020549150612b779050565b92915050565b6000546001600160a01b03163314612ba75760405162461bcd60e51b81526004016109639061440b565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bef57612bef6140ba565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c276138c5565b8054909150600160401b900460ff1680612c4e575080546001600160401b03808416911610155b15612c6b5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612d0257612d026140ba565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d3d57612d3d6140ba565b600091825260209091206002600590920201015460ff1615612d715760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddf9190614176565b5090935060019250612def915050565b816004811115612e0157612e016141df565b14612e5e5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610963565b82612e9b5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610963565b60008681526006602052604090205460ff16612ec95760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110612eed57612eed6140ba565b60009182526020822060059091020180549092508290612f0f9060019061406e565b81548110612f1f57612f1f6140ba565b90600052602060002090600c0201905060005b86811015613015573382898984818110612f4e57612f4e6140ba565b9050602002013581548110612f6557612f656140ba565b60009182526020909120600490910201546001600160a01b031614612fcc5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610963565b8582898984818110612fe057612fe06140ba565b9050602002013581548110612ff757612ff76140ba565b60009182526020909120600160049092020181019190915501612f32565b508686905081600501600082825461302d9190614283565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061306a908b908b908b906145ed565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f19350505050156130ab57505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130e657600080fd5b505af11580156130fa573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561314a57600080fd5b505af115801561315e573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146131915760405162461bcd60e51b81526004016109639061440b565b50565b6000878152600360205260409020546002805489929081106131b8576131b86140ba565b600091825260209091206002600590920201015460ff16156131ec5760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061325a9190614176565b509093506002925061326a915050565b81600481111561327c5761327c6141df565b146132d75760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610963565b866133195760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610963565b60008981526006602052604090205460ff166133475760405162461bcd60e51b815260040161096390614210565b60008981526003602052604081205460028054909190811061336b5761336b6140ba565b9060005260206000209060050201905080600101548711156133c65760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610963565b805460009082906133d99060019061406e565b815481106133e9576133e96140ba565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061342e908f9060040190815260200190565b60a060405180830381865afa15801561344b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346f9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ee919061439f565b505050505091505060006135038b8b8b610bae565b905060005b8c81101561378a576001600160a01b038916858f8f8481811061352d5761352d6140ba565b9050602002013581548110613544576135446140ba565b60009182526020909120600490910201546001600160a01b0316146135ab5760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610963565b8215806135f2575081858f8f848181106135c7576135c76140ba565b90506020020135815481106135de576135de6140ba565b906000526020600020906004020160010154145b6136725760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610963565b848e8e83818110613685576136856140ba565b905060200201358154811061369c5761369c6140ba565b600091825260209091206003600490920201015460ff16156136f55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610963565b8b858f8f84818110613709576137096140ba565b9050602002013581548110613720576137206140ba565b60009182526020909120600260049092020101556001858f8f84818110613749576137496140ba565b9050602002013581548110613760576137606140ba565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613508565b5050506004820180548b92506000906137a4908490614283565b90915550506000888152600282016020526040812080548b92906137c9908490614283565b9091555050600181015488036137f857600381015460ff16156137f35760038101805460ff191690555b613871565b60018101546000908152600282016020526040808220548a83529120540361383a57600381015460ff166137f35760038101805460ff19166001179055613871565b60018101546000908152600282016020526040808220548a83529120541115613871576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516138b093929190614611565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138f16139c8565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156139be576000838152600360205260408120546002805491929183908110613964576139646140ba565b60009182526020822060059091020180549092506139849060019061406e565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610be7915050565b5060019392505050565b6139d06139ef565b6139ed57604051631afcd79f60e31b815260040160405180910390fd5b565b60006139f96138c5565b54600160401b900460ff16919050565b600060208284031215613a1b57600080fd5b5035919050565b60008083601f840112613a3457600080fd5b5081356001600160401b03811115613a4b57600080fd5b6020830191508360208260051b8501011115613a6657600080fd5b9250929050565b60008083601f840112613a7f57600080fd5b5081356001600160401b03811115613a9657600080fd5b602083019150836020828501011115613a6657600080fd5b600080600080600080600060a0888a031215613ac957600080fd5b8735965060208801356001600160401b03811115613ae657600080fd5b613af28a828b01613a22565b909750955050604088013593506060880135925060808801356001600160401b03811115613b1f57600080fd5b613b2b8a828b01613a6d565b989b979a50959850939692959293505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613b6557600080fd5b8135602083016000806001600160401b03841115613b8557613b85613b3e565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613bb357613bb3613b3e565b604052838152905080828401871015613bcb57600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613bfd57600080fd5b833592506020840135915060408401356001600160401b03811115613c2157600080fd5b613c2d86828701613b54565b9150509250925092565b6001600160a01b038116811461319157600080fd5b60008060008060808587031215613c6257600080fd5b843593506020850135613c7481613c37565b93969395505050506040820135916060013590565b60008060408385031215613c9c57600080fd5b50508035926020909101359150565b60008060408385031215613cbe57600080fd5b8235613cc981613c37565b915060208301356001600160401b03811115613ce457600080fd5b613cf085828601613b54565b9150509250929050565b60005b83811015613d15578181015183820152602001613cfd565b50506000910152565b60008151808452613d36816020860160208601613cfa565b601f01601f19169290920160200192915050565b602081526000610be76020830184613d1e565b83815282151560208201526060604082015260006109026060830184613d1e565b600080600060608486031215613d9357600080fd5b83359250602084013591506040840135613dac81613c37565b809150509250925092565b60008060008060608587031215613dcd57600080fd5b8435935060208501356001600160401b03811115613dea57600080fd5b613df687828801613a22565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613e41578351835260209384019390920191600101613e23565b509095945050505050565b600080600080600060a08688031215613e6457600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e9c57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613ec857600080fd5b8335613ed381613c37565b92506020840135915060408401356001600160401b03811115613c2157600080fd5b60008060008060008060a08789031215613f0e57600080fd5b8635955060208701356001600160401b03811115613f2b57600080fd5b613f3789828a01613a22565b909650945050604087013592506060870135915060808701356001600160401b03811115613f6457600080fd5b613f7089828a01613b54565b9150509295509295509295565b600060208284031215613f8f57600080fd5b8135610be781613c37565b600080600080600060808688031215613fb257600080fd5b853594506020860135935060408601356001600160401b03811115613fd657600080fd5b613fe288828901613a6d565b96999598509660600135949350505050565b60008060006060848603121561400957600080fd5b833561401481613c37565b9250602084013561402481613c37565b91506040840135613dac81613c37565b6000806040838503121561404757600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b7757612b77614058565b8082028115828204841417612b7757612b77614058565b6000826140b557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152604060208201526000610902604083018486614107565b80516001600160601b038116811461416157600080fd5b919050565b8051801515811461416157600080fd5b600080600080600060a0868803121561418e57600080fd5b6141978661414a565b945060208601516141a781613c37565b6040870151909450600581106141bc57600080fd5b92506141ca60608701614166565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561420757600080fd5b610be782614166565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561425c57600080fd5b8351925061426c60208501614166565b915061427a60408501614166565b90509250925092565b80820180821115612b7757612b77614058565b6000602082840312156142a857600080fd5b5051919050565b600181811c908216806142c357607f821691505b6020821081036142e357634e487b7160e01b600052602260045260246000fd5b50919050565b838152826020820152606060408201526000808354614307816142af565b8060608601526001821660008114614326576001811461434257614376565b60ff1983166080870152608082151560051b8701019350614376565b86600052602060002060005b8381101561436d5781548882016080015260019091019060200161434e565b87016080019450505b5091979650505050505050565b60008251614395818460208701613cfa565b9190910192915050565b600080600080600080600060e0888a0312156143ba57600080fd5b6143c38861414a565b96506143d160208901614166565b604089015160608a015160808b015160a08c01519399509197509550935091506143fd60c08901614166565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b5157806000526020600020601f840160051c810160208510156144b85750805b601f840160051c820191505b818110156144d857600081556001016144c4565b5050505050565b6001600160401b038311156144f6576144f6613b3e565b61450a8361450483546142af565b83614491565b6000601f84116001811461453e57600085156145265750838201355b600019600387901b1c1916600186901b1783556144d8565b600083815260209020601f19861690835b8281101561456f578685013582556020948501946001909201910161454f565b508682101561458c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156145b057600080fd5b8151610be781613c37565b81835260006001600160fb1b038311156145d457600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146016040830185876145bb565b9050826020830152949350505050565b6040815260006146256040830185876145bb565b82810360208401526146378185613d1e565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204611969b7846b8f8df4dbeb55dc71bd009ee535c528de4a12223b6d97dbc9de164736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102465760003560e01c80636d4cd8ea11610139578063be467604116100b6578063e4c0aaf41161007a578063e4c0aaf41461075e578063f2f4eb261461077e578063f32ab9271461079e578063f7e7d1fd146107d3578063f8abee10146107f3578063fc6f8f161461082357600080fd5b8063be467604146106e8578063c0c53b8b146106fe578063d2b8035a1461071e578063da3beb8c1461073e578063e349ad30146105d057600080fd5b80638f06f112116100fd5780638f06f11214610626578063a7cc08fe14610646578063b34bfaa814610692578063b6ede540146106a8578063ba66fde7146106c857600080fd5b80636d4cd8ea14610590578063751accd0146105b0578063796490f9146105d05780637c04034e146105e65780638e4264601461060657600080fd5b80634b2f0ea0116101c75780635a155ccd1161018b5780635a155ccd146104955780635c92e2f6146104d657806365540b96146104f6578063675926f61461052357806369f3f0411461054357600080fd5b80634b2f0ea0146103ec5780634f1ef286146103ff57806352d1902d1461041257806354fd4d5014610427578063564a565d1461046657600080fd5b80631c3db16d1161020e5780631c3db16d146103355780631cc3423a146103725780632621b9a2146103925780632d68efc9146103ac578063362c3479146103cc57600080fd5b80630855bbe91461024b57806309cc41b8146102805780630baa64d1146102a25780630c340a24146102c25780631200aabc146102fa575b600080fd5b34801561025757600080fd5b5061026b610266366004613a09565b610843565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b366004613aae565b61090b565b005b3480156102ae57600080fd5b5061026b6102bd366004613a09565b6109c9565b3480156102ce57600080fd5b506000546102e2906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561030657600080fd5b50610327610315366004613a09565b60036020526000908152604090205481565b604051908152602001610277565b34801561034157600080fd5b50610355610350366004613a09565b610a40565b604080519384529115156020840152151590820152606001610277565b34801561037e57600080fd5b5061032761038d366004613be8565b610bae565b34801561039e57600080fd5b5060045461026b9060ff1681565b3480156103b857600080fd5b506007546102e2906001600160a01b031681565b3480156103d857600080fd5b506103276103e7366004613c4c565b610bee565b6102a06103fa366004613c89565b61109e565b6102a061040d366004613cab565b61192e565b34801561041e57600080fd5b50610327611b56565b34801561043357600080fd5b50610459604051806040016040528060068152602001650302e31322e360d41b81525081565b6040516102779190613d4a565b34801561047257600080fd5b50610486610481366004613a09565b611bb4565b60405161027793929190613d5d565b3480156104a157600080fd5b5061026b6104b0366004613d7e565b600560209081526000938452604080852082529284528284209052825290205460ff1681565b3480156104e257600080fd5b506102a06104f1366004613db7565b611c7a565b34801561050257600080fd5b50610516610511366004613a09565b611c86565b6040516102779190613e09565b34801561052f57600080fd5b5061032761053e366004613e4c565b611d4a565b34801561054f57600080fd5b5061056361055e366004613e87565b611e8d565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610277565b34801561059c57600080fd5b5061026b6105ab366004613a09565b611f45565b3480156105bc57600080fd5b506102a06105cb366004613eb3565b6120c8565b3480156105dc57600080fd5b5061032761271081565b3480156105f257600080fd5b506102a0610601366004613ef5565b612194565b34801561061257600080fd5b506102a0610621366004613f7d565b6121ab565b34801561063257600080fd5b506102a0610641366004613ef5565b6121f7565b34801561065257600080fd5b50610666610661366004613e87565b6122bd565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610277565b34801561069e57600080fd5b50610327614e2081565b3480156106b457600080fd5b506102a06106c3366004613f9a565b612383565b3480156106d457600080fd5b5061026b6106e3366004613e87565b612576565b3480156106f457600080fd5b5061032761138881565b34801561070a57600080fd5b506102a0610719366004613ff4565b612611565b34801561072a57600080fd5b506102e2610739366004613c89565b6126db565b34801561074a57600080fd5b50610327610759366004613c89565b612a2a565b34801561076a57600080fd5b506102a0610779366004613f7d565b612b7d565b34801561078a57600080fd5b506001546102e2906001600160a01b031681565b3480156107aa57600080fd5b506107be6107b9366004613c89565b612bc9565b60408051928352602083019190915201610277565b3480156107df57600080fd5b506102a06107ee366004613f7d565b612c1b565b3480156107ff57600080fd5b5061026b61080e366004613a09565b60066020526000908152604090205460ff1681565b34801561082f57600080fd5b5061032761083e366004613a09565b612ced565b60015460405163afe15cfb60e01b815260048101839052600091829182916001600160a01b03169063afe15cfb906024016040805180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190614034565b9150915060006108c385611c86565b90508051600014801561090257506127106113886108e1858561406e565b6108eb9190614081565b6108f59190614098565b6108ff844261406e565b10155b95945050505050565b60008781526003602052604090205460028054899290811061092f5761092f6140ba565b600091825260209091206002600590920201015460ff161561096c5760405162461bcd60e51b8152600401610963906140d0565b60405180910390fd5b61097888888888612d19565b84336001600160a01b0316897fbc1efa6396a4ba1a755245703b38c48fbe744ab5117d9f09f47d26ffc1df999e8787876040516109b793929190614130565b60405180910390a45050505050505050565b6000818152600360205260408120546002805483929081106109ed576109ed6140ba565b60009182526020822060059091020180549092508290610a0f9060019061406e565b81548110610a1f57610a1f6140ba565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610a6c57610a6c6140ba565b60009182526020822060059091020180549092508290610a8e9060019061406e565b81548110610a9e57610a9e6140ba565b60009182526020909120600c90910201600381015460ff169450905083610ac9578060010154610acc565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f9190614176565b5090935060049250610b4f915050565b816004811115610b6157610b616141df565b03610ba4576000610b7188611c86565b90508051600103610ba25780600081518110610b8f57610b8f6140ba565b6020026020010151965060009550600194505b505b5050509193909250565b80516020808301919091206040805180840187905280820186905260608082019390935281518082039093018352608001905280519101205b9392505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c609190614176565b50935050505080610cb35760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e00000000006044820152606401610963565b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a91906141f5565b15610d685760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610963565b60008681526006602052604090205460ff16610d965760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110610dba57610dba6140ba565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610dee57610dee6140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190614247565b5050600087815260078401602052604090205490915060ff16610eb7576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ffc565b808603610f2c576000868152600683016020526040902054610eda576000610f25565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610f1b9190614081565b610f259190614098565b9450610ffc565b600081815260078301602052604090205460ff16610ffc5781600601600083600a01600181548110610f6057610f606140ba565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610f9657610f966140ba565b9060005260206000200154815260200190815260200160002054610fba9190614283565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610fef9190614081565b610ff99190614098565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561109257600754611043906001600160a01b038a81169188911661307c565b876001600160a01b0316878a7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8989604051611089929190918252602082015260400190565b60405180910390a45b50505050949350505050565b6000828152600360205260409020546002805484929081106110c2576110c26140ba565b600091825260209091206002600590920201015460ff16156110f65760405162461bcd60e51b8152600401610963906140d0565b60008381526003602052604081205460028054909190811061111a5761111a6140ba565b90600052602060002090600502019050806001015483111561117e5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610963565b60008481526006602052604090205460ff166111ac5760405162461bcd60e51b815260040161096390614210565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa1580156111f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121d9190614034565b9150915081421015801561123057508042105b6112755760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610963565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa1580156112b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112da9190614247565b505090508681036112ef576127109150611370565b6127106113886112ff868661406e565b6113099190614081565b6113139190614098565b61131d854261406e565b1061136a5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610963565b614e2091505b845460009086906113839060019061406e565b81548110611393576113936140ba565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156113f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114169190614296565b611420919061406e565b60008a815260078401602052604090205490915060ff16156114845760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610963565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa1580156114ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f29190614296565b905060006127106115038784614081565b61150d9190614098565b6115179083614283565b60008c8152600686016020526040812054919250908211156115c85760008c81526006860160205260409020543490611550908461406e565b116115755760008c8152600686016020526040902054611570908361406e565b611577565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f856040516115bf929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f8452909152812080548392906115f4908490614283565b909155505060008c815260068601602052604081208054839290611619908490614283565b909155505060008c815260068601602052604090205482116116eb5760008c81526006860160205260408120546009870180549192909161165b908490614283565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156118f657828560090154611708919061406e565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177a91906141f5565b156117935760028a01805460ff19166001179055611876565b895460038b0160006117a6876001614283565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161182191815260200190565b602060405180830381865afa15801561183e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118629190614296565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016118c3939291906142e9565b6000604051808303818588803b1580156118dc57600080fd5b505af11580156118f0573d6000803e3d6000fd5b50505050505b8034111561191f5761191f61190b823461406e565b6007543391906001600160a01b031661307c565b50505050505050505050505050565b61193782613167565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119b557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166119a96000805160206146428339815191525490565b6001600160a01b031614155b156119d35760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a2d575060408051601f3d908101601f19168201909252611a2a91810190614296565b60015b611a5557604051630c76093760e01b81526001600160a01b0383166004820152602401610963565b6000805160206146428339815191528114611a8657604051632a87526960e21b815260048101829052602401610963565b6000805160206146428339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b51576000836001600160a01b031683604051611aed9190614383565b600060405180830381855af49150503d8060008114611b28576040519150601f19603f3d011682016040523d82523d6000602084013e611b2d565b606091505b5050905080611b4f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ba15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061464283398151915290565b60028181548110611bc457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff9091169291611bf7906142af565b80601f0160208091040260200160405190810160405280929190818152602001828054611c23906142af565b8015611c705780601f10611c4557610100808354040283529160200191611c70565b820191906000526020600020905b815481529060010190602001808311611c5357829003601f168201915b5050505050905083565b611b4f84848484612d19565b6000818152600360205260408120546002805460609392908110611cac57611cac6140ba565b60009182526020822060059091020180549092508290611cce9060019061406e565b81548110611cde57611cde6140ba565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d3c57602002820191906000526020600020905b815481526020019060010190808311611d28575b505050505092505050919050565b600085815260036020526040812054600280548392908110611d6e57611d6e6140ba565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611da257611da26140ba565b90600052602060002090600c02016000018681548110611dc457611dc46140ba565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e469190614247565b506003850154919350915060ff168015611e6a57508183600201541480611e6a5750805b15611e7d57612710945050505050610902565b5060009998505050505050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611ebe57611ebe6140ba565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611ef257611ef26140ba565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611f6957611f696140ba565b60009182526020822060059091020180549092508290611f8b9060019061406e565b81548110611f9b57611f9b6140ba565b60009182526020822060015460405163564a565d60e01b815260048101899052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015611ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201a9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa158015612075573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612099919061439f565b50505050509150506000816120af5783546120b5565b83600501545b6004909401549093149695505050505050565b6000546001600160a01b031633146120f25760405162461bcd60e51b81526004016109639061440b565b6000836001600160a01b0316838360405161210d9190614383565b60006040518083038185875af1925050503d806000811461214a576040519150601f19603f3d011682016040523d82523d6000602084013e61214f565b606091505b5050905080611b4f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610963565b6121a386868686868633613194565b505050505050565b6000546001600160a01b031633146121d55760405162461bcd60e51b81526004016109639061440b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008681526003602052604081205460028054909190811061221b5761221b6140ba565b6000918252602082206005909102018054909250829061223d9060019061406e565b8154811061224d5761224d6140ba565b90600052602060002090600c020160000187876000818110612271576122716140ba565b9050602002013581548110612288576122886140ba565b60009182526020909120600490910201546001600160a01b031690506122b388888888888887613194565b5050505050505050565b60008060008060006002600360008a815260200190815260200160002054815481106122eb576122eb6140ba565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061231f5761231f6140ba565b90600052602060002090600c02016000018781548110612341576123416140ba565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146123ad5760405162461bcd60e51b81526004016109639061444d565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016124388587836144df565b5060028101805460ff19169055805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561249b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bf9190614296565b6124c9919061406e565b81526020808201929092526040908101600090812093909355835460018082018655858552838520600c909202909101600b81018890556003808201805460ff1990811685179091558d87529085528386208890556006909452938290208054909316179091555188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612564908a908a908a90614130565b60405180910390a25050505050505050565b60008381526003602052604081205460028054839290811061259a5761259a6140ba565b600091825260208083208784526003600590930201918201905260408220548154919350839181106125ce576125ce6140ba565b90600052602060002090600c020160000184815481106125f0576125f06140ba565b600091825260209091206004909102016003015460ff169695505050505050565b6001600061261d6138c5565b8054909150600160401b900460ff1680612644575080546001600160401b03808416911610155b156126615760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561268d8585856138e9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001546000906001600160a01b031633146127085760405162461bcd60e51b81526004016109639061444d565b60008381526003602052604090205460028054859290811061272c5761272c6140ba565b600091825260209091206002600590920201015460ff16156127605760405162461bcd60e51b8152600401610963906140d0565b6000848152600360205260408120546002805491929183908110612786576127866140ba565b60009182526020822060059091020180549092506127a69060019061406e565b905060008260000182815481106127bf576127bf6140ba565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612824573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612848919061459e565b60015460405163564a565d60e01b8152600481018c90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128bb9190614176565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018f9052604482018e90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa15801561291f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612943919061459e565b98506001600160a01b03891661295f5750505050505050612a23565b61296a848c8b613930565b15612a1657604080516080810182526001600160a01b03808c1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff199586161790558c8252600581528582208b8352815285822092825291909152929092208054909216179055612a1b565b600098505b505050505050505b5092915050565b600082815260036020526040812054600280548392908110612a4e57612a4e6140ba565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612a8257612a826140ba565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b059190614247565b5091509150826004015460001480612b34575080158015612b3457506000828152600284016020526040902054155b15612b46576000945050505050612b77565b8015612b5b575050600401549150612b779050565b506000908152600290910160205260409020549150612b779050565b92915050565b6000546001600160a01b03163314612ba75760405162461bcd60e51b81526004016109639061440b565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600360205260408120546002805491929183908110612bef57612bef6140ba565b906000526020600020906005020160030160008481526020019081526020016000205490509250929050565b60096000612c276138c5565b8054909150600160401b900460ff1680612c4e575080546001600160401b03808416911610155b15612c6b5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600780546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600060028281548110612d0257612d026140ba565b600091825260209091206005909102015492915050565b600084815260036020526040902054600280548692908110612d3d57612d3d6140ba565b600091825260209091206002600590920201015460ff1615612d715760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddf9190614176565b5090935060019250612def915050565b816004811115612e0157612e016141df565b14612e5e5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610963565b82612e9b5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610963565b60008681526006602052604090205460ff16612ec95760405162461bcd60e51b815260040161096390614210565b600086815260036020526040812054600280549091908110612eed57612eed6140ba565b60009182526020822060059091020180549092508290612f0f9060019061406e565b81548110612f1f57612f1f6140ba565b90600052602060002090600c0201905060005b86811015613015573382898984818110612f4e57612f4e6140ba565b9050602002013581548110612f6557612f656140ba565b60009182526020909120600490910201546001600160a01b031614612fcc5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e006044820152606401610963565b8582898984818110612fe057612fe06140ba565b9050602002013581548110612ff757612ff76140ba565b60009182526020909120600160049092020181019190915501612f32565b508686905081600501600082825461302d9190614283565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089061306a908b908b908b906145ed565b60405180910390a35050505050505050565b6040516001600160a01b0384169083156108fc029084906000818181858888f19350505050156130ab57505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130e657600080fd5b505af11580156130fa573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790528516935063a9059cbb92506044019050600060405180830381600087803b15801561314a57600080fd5b505af115801561315e573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146131915760405162461bcd60e51b81526004016109639061440b565b50565b6000878152600360205260409020546002805489929081106131b8576131b86140ba565b600091825260209091206002600590920201015460ff16156131ec5760405162461bcd60e51b8152600401610963906140d0565b60015460405163564a565d60e01b8152600481018a90526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015613236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061325a9190614176565b509093506002925061326a915050565b81600481111561327c5761327c6141df565b146132d75760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610963565b866133195760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610963565b60008981526006602052604090205460ff166133475760405162461bcd60e51b815260040161096390614210565b60008981526003602052604081205460028054909190811061336b5761336b6140ba565b9060005260206000209060050201905080600101548711156133c65760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610963565b805460009082906133d99060019061406e565b815481106133e9576133e96140ba565b60009182526020822060015460405163564a565d60e01b8152600c90930290910193506001600160a01b03169063564a565d9061342e908f9060040190815260200190565b60a060405180830381865afa15801561344b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346f9190614176565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156134ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ee919061439f565b505050505091505060006135038b8b8b610bae565b905060005b8c81101561378a576001600160a01b038916858f8f8481811061352d5761352d6140ba565b9050602002013581548110613544576135446140ba565b60009182526020909120600490910201546001600160a01b0316146135ab5760405162461bcd60e51b815260206004820152601e60248201527f546865206a75726f722068617320746f206f776e2074686520766f74652e00006044820152606401610963565b8215806135f2575081858f8f848181106135c7576135c76140ba565b90506020020135815481106135de576135de6140ba565b906000526020600020906004020160010154145b6136725760405162461bcd60e51b8152602060048201526044602482018190527f54686520766f74652068617368206d757374206d617463682074686520636f6d908201527f6d69746d656e7420696e20636f7572747320776974682068696464656e20766f6064820152633a32b99760e11b608482015260a401610963565b848e8e83818110613685576136856140ba565b905060200201358154811061369c5761369c6140ba565b600091825260209091206003600490920201015460ff16156136f55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610963565b8b858f8f84818110613709576137096140ba565b9050602002013581548110613720576137206140ba565b60009182526020909120600260049092020101556001858f8f84818110613749576137496140ba565b9050602002013581548110613760576137606140ba565b60009182526020909120600490910201600301805460ff1916911515919091179055600101613508565b5050506004820180548b92506000906137a4908490614283565b90915550506000888152600282016020526040812080548b92906137c9908490614283565b9091555050600181015488036137f857600381015460ff16156137f35760038101805460ff191690555b613871565b60018101546000908152600282016020526040808220548a83529120540361383a57600381015460ff166137f35760038101805460ff19166001179055613871565b60018101546000908152600282016020526040808220548a83529120541115613871576001810188905560038101805460ff191690555b87856001600160a01b03168c7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48d8d8b6040516138b093929190614611565b60405180910390a45050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6138f16139c8565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560078054919093169116179055565b60045460009060ff16156139be576000838152600360205260408120546002805491929183908110613964576139646140ba565b60009182526020822060059091020180549092506139849060019061406e565b60009384526005602090815260408086209286529181528185206001600160a01b038816865290529092205460ff16159250610be7915050565b5060019392505050565b6139d06139ef565b6139ed57604051631afcd79f60e31b815260040160405180910390fd5b565b60006139f96138c5565b54600160401b900460ff16919050565b600060208284031215613a1b57600080fd5b5035919050565b60008083601f840112613a3457600080fd5b5081356001600160401b03811115613a4b57600080fd5b6020830191508360208260051b8501011115613a6657600080fd5b9250929050565b60008083601f840112613a7f57600080fd5b5081356001600160401b03811115613a9657600080fd5b602083019150836020828501011115613a6657600080fd5b600080600080600080600060a0888a031215613ac957600080fd5b8735965060208801356001600160401b03811115613ae657600080fd5b613af28a828b01613a22565b909750955050604088013593506060880135925060808801356001600160401b03811115613b1f57600080fd5b613b2b8a828b01613a6d565b989b979a50959850939692959293505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112613b6557600080fd5b8135602083016000806001600160401b03841115613b8557613b85613b3e565b50604051601f19601f85018116603f011681018181106001600160401b0382111715613bb357613bb3613b3e565b604052838152905080828401871015613bcb57600080fd5b838360208301376000602085830101528094505050505092915050565b600080600060608486031215613bfd57600080fd5b833592506020840135915060408401356001600160401b03811115613c2157600080fd5b613c2d86828701613b54565b9150509250925092565b6001600160a01b038116811461319157600080fd5b60008060008060808587031215613c6257600080fd5b843593506020850135613c7481613c37565b93969395505050506040820135916060013590565b60008060408385031215613c9c57600080fd5b50508035926020909101359150565b60008060408385031215613cbe57600080fd5b8235613cc981613c37565b915060208301356001600160401b03811115613ce457600080fd5b613cf085828601613b54565b9150509250929050565b60005b83811015613d15578181015183820152602001613cfd565b50506000910152565b60008151808452613d36816020860160208601613cfa565b601f01601f19169290920160200192915050565b602081526000610be76020830184613d1e565b83815282151560208201526060604082015260006109026060830184613d1e565b600080600060608486031215613d9357600080fd5b83359250602084013591506040840135613dac81613c37565b809150509250925092565b60008060008060608587031215613dcd57600080fd5b8435935060208501356001600160401b03811115613dea57600080fd5b613df687828801613a22565b9598909750949560400135949350505050565b602080825282518282018190526000918401906040840190835b81811015613e41578351835260209384019390920191600101613e23565b509095945050505050565b600080600080600060a08688031215613e6457600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600060608486031215613e9c57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613ec857600080fd5b8335613ed381613c37565b92506020840135915060408401356001600160401b03811115613c2157600080fd5b60008060008060008060a08789031215613f0e57600080fd5b8635955060208701356001600160401b03811115613f2b57600080fd5b613f3789828a01613a22565b909650945050604087013592506060870135915060808701356001600160401b03811115613f6457600080fd5b613f7089828a01613b54565b9150509295509295509295565b600060208284031215613f8f57600080fd5b8135610be781613c37565b600080600080600060808688031215613fb257600080fd5b853594506020860135935060408601356001600160401b03811115613fd657600080fd5b613fe288828901613a6d565b96999598509660600135949350505050565b60008060006060848603121561400957600080fd5b833561401481613c37565b9250602084013561402481613c37565b91506040840135613dac81613c37565b6000806040838503121561404757600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b81810381811115612b7757612b77614058565b8082028115828204841417612b7757612b77614058565b6000826140b557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152604060208201526000610902604083018486614107565b80516001600160601b038116811461416157600080fd5b919050565b8051801515811461416157600080fd5b600080600080600060a0868803121561418e57600080fd5b6141978661414a565b945060208601516141a781613c37565b6040870151909450600581106141bc57600080fd5b92506141ca60608701614166565b60809690960151949793965091949392915050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561420757600080fd5b610be782614166565b6020808252601e908201527f4e6f742061637469766520666f7220636f726520646973707574652049440000604082015260600190565b60008060006060848603121561425c57600080fd5b8351925061426c60208501614166565b915061427a60408501614166565b90509250925092565b80820180821115612b7757612b77614058565b6000602082840312156142a857600080fd5b5051919050565b600181811c908216806142c357607f821691505b6020821081036142e357634e487b7160e01b600052602260045260246000fd5b50919050565b838152826020820152606060408201526000808354614307816142af565b8060608601526001821660008114614326576001811461434257614376565b60ff1983166080870152608082151560051b8701019350614376565b86600052602060002060005b8381101561436d5781548882016080015260019091019060200161434e565b87016080019450505b5091979650505050505050565b60008251614395818460208701613cfa565b9190910192915050565b600080600080600080600060e0888a0312156143ba57600080fd5b6143c38861414a565b96506143d160208901614166565b604089015160608a015160808b015160a08c01519399509197509550935091506143fd60c08901614166565b905092959891949750929550565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611b5157806000526020600020601f840160051c810160208510156144b85750805b601f840160051c820191505b818110156144d857600081556001016144c4565b5050505050565b6001600160401b038311156144f6576144f6613b3e565b61450a8361450483546142af565b83614491565b6000601f84116001811461453e57600085156145265750838201355b600019600387901b1c1916600186901b1783556144d8565b600083815260209020601f19861690835b8281101561456f578685013582556020948501946001909201910161454f565b508682101561458c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156145b057600080fd5b8151610be781613c37565b81835260006001600160fb1b038311156145d457600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006146016040830185876145bb565b9050826020830152949350505050565b6040815260006146256040830185876145bb565b82810360208401526146378185613d1e565b969550505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204611969b7846b8f8df4dbeb55dc71bd009ee535c528de4a12223b6d97dbc9de164736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", - "params": { - "_choice": "The choice that is being funded.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", - "params": { - "_commit": "The commitment of the juror.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "The address of the juror casting the vote commitment.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "CommitCastShutter(uint256,address,bytes32,bytes32,bytes)": { - "details": "Emitted when a vote is cast.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_juror": "The address of the juror casting the vote commitment." - } - }, - "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", - "params": { - "_amount": "The amount contributed.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - }, - "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_extraData": "The extra data for the dispute.", - "_numberOfChoices": "The number of choices available in the dispute." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - }, - "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", - "params": { - "_choice": "The choice juror voted for.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_juror": "Address of the juror.", - "_justification": "Justification of the choice.", - "_voteIDs": "The identifiers of the votes in the dispute." - } - }, - "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", - "params": { - "_amount": "The amount withdrawn.", - "_choice": "The choice that is being funded.", - "_contributor": "The address of the contributor.", - "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_coreRoundID": "The identifier of the round in the Arbitrator contract." - } - } - }, - "kind": "dev", - "methods": { - "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their commits for the last round." - } - }, - "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round. Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "_0": "Whether all of the jurors have cast their votes for the last round." - } - }, - "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_voteIDs": "The IDs of the votes." - } - }, - "castCommitShutter(uint256,uint256[],bytes32,bytes32,bytes)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", - "params": { - "_commit": "The commitment hash including the justification.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_encryptedVote": "The Shutter encrypted vote.", - "_identity": "The Shutter identity used for encryption.", - "_voteIDs": "The IDs of the votes." - } - }, - "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", - "params": { - "_choice": "The choice.", - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_justification": "Justification of the choice.", - "_salt": "The salt for the commit if the votes were hidden.", - "_voteIDs": "The IDs of the votes." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", - "_numberOfChoices": "Number of choices of the dispute" - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." - }, - "returns": { - "drawnAddress": "The drawn address." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", - "params": { - "_choice": "A choice that receives funding.", - "_coreDisputeID": "Index of the dispute in Kleros Core." - } - }, - "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "The number of coherent jurors." - } - }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the vote." - }, - "returns": { - "_0": "The degree of coherence in basis points." - } - }, - "getLocalDisputeRoundID(uint256,uint256)": { - "details": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core." - }, - "returns": { - "localDisputeID": "The ID of the dispute in the Dispute Kit.", - "localRoundID": "The ID of the round in the Dispute Kit." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Returns the number of rounds in a dispute.", - "params": { - "_localDisputeID": "The ID of the dispute in the Dispute Kit." - }, - "returns": { - "_0": "The number of rounds in the dispute." - } - }, - "getVoteInfo(uint256,uint256,uint256)": { - "details": "Returns the vote information for a given vote ID.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_coreRoundID": "The ID of the round in Kleros Core.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The address of the juror who cast the vote.", - "commit": "The commit of the vote." - } - }, - "hashVote(uint256,uint256,string)": { - "details": "Computes the hash of a vote using ABI encoding", - "params": { - "_choice": "The choice being voted for", - "_justification": "The justification for the vote", - "_salt": "A random salt for commitment" - }, - "returns": { - "_0": "bytes32 The hash of the encoded vote parameters" - } - }, - "initialize(address,address,address)": { - "details": "Initializer.", - "params": { - "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isAppealFunded(uint256)": { - "details": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). Note that this function is to be called directly by the core contract and is not for off-chain usage.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." - }, - "returns": { - "_0": "Whether the appeal funding is finished." - } - }, - "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", - "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", - "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", - "_voteID": "The ID of the voter." - }, - "returns": { - "_0": "Whether the voter was active or not." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", - "params": { - "_beneficiary": "The address whose rewards to withdraw.", - "_choice": "The ruling option that the caller wants to withdraw from.", - "_coreDisputeID": "Index of the dispute in Kleros Core contract.", - "_coreRoundID": "The round in the Kleros Core contract the caller wants to withdraw from." - }, - "returns": { - "amount": "The withdrawn amount." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "DisputeKitShutter Added functionality: shielded voting. Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 6613, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6616, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)303" - }, - { - "astId": 6620, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)6552_storage)dyn_storage" - }, - { - "astId": 6624, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6626, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "singleDrawPerJuror", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 6634, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "alreadyDrawn", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))" - }, - { - "astId": 6638, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "coreDisputeIDToActive", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6640, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "wNative", - "offset": 0, - "slot": "7", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)6552_storage)dyn_storage": { - "base": "t_struct(Dispute)6552_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)6590_storage)dyn_storage": { - "base": "t_struct(Round)6590_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)6599_storage)dyn_storage": { - "base": "t_struct(Vote)6599_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassicBase.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)303": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)6552_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Dispute", - "members": [ - { - "astId": 6541, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)6590_storage)dyn_storage" - }, - { - "astId": 6543, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6545, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 6549, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6551, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)6590_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Round", - "members": [ - { - "astId": 6556, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)6599_storage)dyn_storage" - }, - { - "astId": 6558, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 6562, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6564, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 6566, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6568, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 6572, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 6576, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 6582, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 6584, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 6587, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 6589, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)6599_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassicBase.Vote", - "members": [ - { - "astId": 6592, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 6594, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 6596, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 6598, - "contract": "src/arbitration/dispute-kits/DisputeKitShutter.sol:DisputeKitShutter", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json deleted file mode 100644 index 3271ca119..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x5d878ce4b9aa09064029160c890e1c6b7637303ec053fe0defaf597f14161b9d", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", - "transactionIndex": 2, - "gasUsed": "198466", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe27c44922389c9aca10217b21c6ba52520b90df7d24018af2f897437f2938955", - "transactionHash": "0x5d878ce4b9aa09064029160c890e1c6b7637303ec053fe0defaf597f14161b9d", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175286126, - "transactionHash": "0x5d878ce4b9aa09064029160c890e1c6b7637303ec053fe0defaf597f14161b9d", - "address": "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0xe27c44922389c9aca10217b21c6ba52520b90df7d24018af2f897437f2938955" - } - ], - "blockNumber": 175286126, - "cumulativeGasUsed": "372592", - "status": 1, - "byzantium": true - }, - "args": [ - "0x036d321AfD9Ca457Be9E523736bc9FbB79FA7efc", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000001bd44c4a4511dbfa7dc1d5bc201635596e7200f9" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220b9dc2002a96470cf50e49e7a537fe7864644f7b84f7c205df33e04752d2c158364736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json deleted file mode 100644 index af5ad5101..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0x71f8537e925C753Fe88DA7e69Ae423f9f3a9A292", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "arbitratorDisputeIDToLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplate", - "type": "string" - }, - { - "internalType": "string", - "name": "_disputeTemplateDataMappings", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplateUri", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplateUri", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bytes", - "name": "arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x35d59c9b3f6f86c50bac87b5dad5ec9c9783a3b8aaa56cddfa34c47e848905f4", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x71f8537e925C753Fe88DA7e69Ae423f9f3a9A292", - "transactionIndex": 5, - "gasUsed": "903526", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb521335b95e38a6a911f6b7b1db532bed0e176d27dba028e36f73451505641a9", - "transactionHash": "0x35d59c9b3f6f86c50bac87b5dad5ec9c9783a3b8aaa56cddfa34c47e848905f4", - "logs": [], - "blockNumber": 175286175, - "cumulativeGasUsed": "3048815", - "status": 1, - "byzantium": true - }, - "args": [ - "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_arbitratorDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/DisputeResolver.sol\":\"DisputeResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity ^0.8.24;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal virtual returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0xbc262a895c231a24dca6c8da7d865eab29c84299e049e80d66226f891553e9d7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xd8122941175d1d5c2983e71717a2fdcc6fe94aa9de08f87eb7c44e3a5f1c2030\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6080604052348015600f57600080fd5b50604051610edf380380610edf833981016040819052602c91607e565b600080546001600160a01b03199081163317909155600180546001600160a01b039485169083161790556002805492909316911617905560b3565b6001600160a01b0381168114607b57600080fd5b50565b60008060408385031215609057600080fd5b82516099816067565b602084015190925060a8816067565b809150509250929050565b610e1d806100c26000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109ef565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7c565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b9e565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610bb4565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610bf6565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610bf6565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610bb4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610bb4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c30565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c66565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cce565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d8c565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c66565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610dc8565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b5081356001600160401b038111156109d057600080fd5b6020830191508360208285010111156109e857600080fd5b9250929050565b600080600080600060608688031215610a0757600080fd5b85356001600160401b03811115610a1d57600080fd5b610a29888289016109a7565b90965094505060208601356001600160401b03811115610a4857600080fd5b610a54888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9557600080fd5b86356001600160401b03811115610aab57600080fd5b610ab789828a016109a7565b90975095505060208701356001600160401b03811115610ad657600080fd5b610ae289828a016109a7565b90955093505060408701356001600160401b03811115610b0157600080fd5b8701601f81018913610b1257600080fd5b80356001600160401b03811115610b2b57610b2b610a66565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610b5957610b59610a66565b6040528181528282016020018b1015610b7157600080fd5b81602084016020830137600091810160200191909152969995985093969295946060939093013593505050565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610c0a57607f821691505b602082108103610c2a57634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c7857600080fd5b5051919050565b601f821115610cc957806000526020600020601f840160051c81016020851015610ca65750805b601f840160051c820191505b81811015610cc65760008155600101610cb2565b50505b505050565b81516001600160401b03811115610ce757610ce7610a66565b610cfb81610cf58454610bf6565b84610c7f565b6020601f821160018114610d2f5760008315610d175750848201515b600019600385901b1c1916600184901b178455610cc6565b600084815260208120601f198516915b82811015610d5f5787850151825560209485019460019092019101610d3f565b5084821015610d7d5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6060815260006060820152608060208201526000610dad6080830185610932565b8281036040840152610dbf8185610932565b95945050505050565b838152826020820152606060408201526000610dbf606083018461093256fea26469706673582212209d7f235af5f24d70d0fca9b3c43f6941ec8835b79fc59f659ae115d8e25c1cb764736f6c634300081c0033", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109ef565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7c565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b9e565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610bb4565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610bf6565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610bf6565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610bb4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610bb4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c30565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c66565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cce565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d8c565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c66565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610dc8565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b5081356001600160401b038111156109d057600080fd5b6020830191508360208285010111156109e857600080fd5b9250929050565b600080600080600060608688031215610a0757600080fd5b85356001600160401b03811115610a1d57600080fd5b610a29888289016109a7565b90965094505060208601356001600160401b03811115610a4857600080fd5b610a54888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9557600080fd5b86356001600160401b03811115610aab57600080fd5b610ab789828a016109a7565b90975095505060208701356001600160401b03811115610ad657600080fd5b610ae289828a016109a7565b90955093505060408701356001600160401b03811115610b0157600080fd5b8701601f81018913610b1257600080fd5b80356001600160401b03811115610b2b57610b2b610a66565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610b5957610b59610a66565b6040528181528282016020018b1015610b7157600080fd5b81602084016020830137600091810160200191909152969995985093969295946060939093013593505050565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610c0a57607f821691505b602082108103610c2a57634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c7857600080fd5b5051919050565b601f821115610cc957806000526020600020601f840160051c81016020851015610ca65750805b601f840160051c820191505b81811015610cc65760008155600101610cb2565b50505b505050565b81516001600160401b03811115610ce757610ce7610a66565b610cfb81610cf58454610bf6565b84610c7f565b6020601f821160018114610d2f5760008315610d175750848201515b600019600385901b1c1916600184901b178455610cc6565b600084815260208120601f198516915b82811015610d5f5787850151825560209485019460019092019101610d3f565b5084821015610d7d5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6060815260006060820152608060208201526000610dad6080830185610932565b8281036040840152610dbf8185610932565b95945050505050565b838152826020820152606060408201526000610dbf606083018461093256fea26469706673582212209d7f235af5f24d70d0fca9b3c43f6941ec8835b79fc59f659ae115d8e25c1cb764736f6c634300081c0033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrator": "The arbitrator of the contract.", - "_arbitratorDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "Target global arbitrator for any disputes." - } - }, - "createDisputeForTemplate(bytes,string,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplate": "Dispute template.", - "_disputeTemplateDataMappings": "The data mappings.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "createDisputeForTemplateUri(bytes,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 19090, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 19093, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)25968" - }, - { - "astId": 19096, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)26147" - }, - { - "astId": 19100, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)19088_storage)dyn_storage" - }, - { - "astId": 19104, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)19088_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)19088_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)25968": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)26147": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)19088_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 19081, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 19083, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 19085, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 19087, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json deleted file mode 100644 index 8f5e66a1e..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0xAEB1bbaE58125BA5F32349c69e4274d15dfD6EC3", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "arbitratorDisputeIDToLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplate", - "type": "string" - }, - { - "internalType": "string", - "name": "_disputeTemplateDataMappings", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplateUri", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplateUri", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bytes", - "name": "arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x527f62b45cc4c848902807f14077f3e7befc35321742e55e6926d2454031c40c", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xAEB1bbaE58125BA5F32349c69e4274d15dfD6EC3", - "transactionIndex": 4, - "gasUsed": "906867", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x22ec4e09526461ae2a7171b89306a126f93312f1d5600ba28bbf6061a70cc32d", - "transactionHash": "0x527f62b45cc4c848902807f14077f3e7befc35321742e55e6926d2454031c40c", - "logs": [], - "blockNumber": 175286738, - "cumulativeGasUsed": "1639898", - "status": 1, - "byzantium": true - }, - "args": [ - "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_arbitratorDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/DisputeResolverRuler.sol\":\"DisputeResolverRuler\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity ^0.8.24;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal virtual returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0xbc262a895c231a24dca6c8da7d865eab29c84299e049e80d66226f891553e9d7\",\"license\":\"MIT\"},\"src/arbitration/devtools/DisputeResolverRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\nimport {DisputeResolver, IArbitratorV2, IDisputeTemplateRegistry} from \\\"../arbitrables/DisputeResolver.sol\\\";\\n\\npragma solidity ^0.8.24;\\n\\ninterface IKlerosCoreRulerFragment {\\n function getNextDisputeID() external view returns (uint256);\\n}\\n\\n/// @title DisputeResolverRuler\\n/// It extends DisputeResolver for testing purposes of the automatic ruling modes.\\n/// The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\\ncontract DisputeResolverRuler is DisputeResolver {\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n IDisputeTemplateRegistry _templateRegistry\\n ) DisputeResolver(_arbitrator, _templateRegistry) {\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal override returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n uint256 localDisputeID = disputes.length;\\n DisputeStruct storage dispute = disputes.push();\\n dispute.arbitratorExtraData = _arbitratorExtraData;\\n dispute.numberOfRulingOptions = _numberOfRulingOptions;\\n\\n // Keep track of the upcoming dispute ID before dispute creation, so rule() can be called immediately after.\\n arbitratorDisputeID = IKlerosCoreRulerFragment(address(arbitrator)).getNextDisputeID();\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n\\n arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n }\\n}\\n\",\"keccak256\":\"0x939c2545b66b4c76ecbfb800eefaddde71518a58b16f87c9f194381d02eeac12\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xd8122941175d1d5c2983e71717a2fdcc6fe94aa9de08f87eb7c44e3a5f1c2030\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6080604052348015600f57600080fd5b50604051610ef6380380610ef6833981016040819052602c916086565b60008054600180546001600160a01b03199081166001600160a01b03968716179091556002805482169490951693909317909355918116339182161717905560bb565b6001600160a01b0381168114608357600080fd5b50565b60008060408385031215609857600080fd5b825160a181606f565b602084015190925060b081606f565b809150509250929050565b610e2c806100ca6000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108c9565b610231565b005b34801561010c57600080fd5b506100fe61011b366004610903565b6103d1565b34801561012c57600080fd5b5061014061013b366004610927565b61041d565b6040516100d59493929190610986565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109fd565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a8a565b61055a565b3480156101d057600080fd5b506101836101df366004610927565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c366004610903565b6105b9565b34801561021d57600080fd5b506100fe61022c366004610903565b610605565b600082815260046020526040812054600380549192918390811061025757610257610bac565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610bc2565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610c04565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610c04565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610bc2565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610bc2565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60038054600181018255600091909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106f1898b83610c8d565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa158015610743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107679190610d4c565b600081815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a994174916107af918c918c9101610d65565b6020604051808303816000875af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190610d4c565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061083a90879086908c90610da1565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906108789089908f908f90600401610dc0565b60206040518083038185885af1158015610896573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108bb9190610d4c565b505050509695505050505050565b600080604083850312156108dc57600080fd5b50508035926020909101359150565b6001600160a01b038116811461090057600080fd5b50565b60006020828403121561091557600080fd5b8135610920816108eb565b9392505050565b60006020828403121561093957600080fd5b5035919050565b6000815180845260005b818110156109665760208185018101518683018201520161094a565b506000602082860101526020601f19601f83011685010191505092915050565b6080815260006109996080830187610940565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109c757600080fd5b5081356001600160401b038111156109de57600080fd5b6020830191508360208285010111156109f657600080fd5b9250929050565b600080600080600060608688031215610a1557600080fd5b85356001600160401b03811115610a2b57600080fd5b610a37888289016109b5565b90965094505060208601356001600160401b03811115610a5657600080fd5b610a62888289016109b5565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610aa357600080fd5b86356001600160401b03811115610ab957600080fd5b610ac589828a016109b5565b90975095505060208701356001600160401b03811115610ae457600080fd5b610af089828a016109b5565b90955093505060408701356001600160401b03811115610b0f57600080fd5b8701601f81018913610b2057600080fd5b80356001600160401b03811115610b3957610b39610a74565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610b6757610b67610a74565b6040528181528282016020018b1015610b7f57600080fd5b81602084016020830137600091810160200191909152969995985093969295946060939093013593505050565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610c1857607f821691505b602082108103610c3857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c8857806000526020600020601f840160051c81016020851015610c655750805b601f840160051c820191505b81811015610c855760008155600101610c71565b50505b505050565b6001600160401b03831115610ca457610ca4610a74565b610cb883610cb28354610c04565b83610c3e565b6000601f841160018114610cec5760008515610cd45750838201355b600019600387901b1c1916600186901b178355610c85565b600083815260209020601f19861690835b82811015610d1d5786850135825560209485019460019092019101610cfd565b5086821015610d3a5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060208284031215610d5e57600080fd5b5051919050565b6060815260006060820152608060208201526000610d866080830185610940565b8281036040840152610d988185610940565b95945050505050565b838152826020820152606060408201526000610d986060830184610940565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f191601019291505056fea26469706673582212207a0f2e944bb5e1e1e6f94e348f337a47fad044ed8ae74f39092cdc22bb00548a64736f6c634300081c0033", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108c9565b610231565b005b34801561010c57600080fd5b506100fe61011b366004610903565b6103d1565b34801561012c57600080fd5b5061014061013b366004610927565b61041d565b6040516100d59493929190610986565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109fd565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a8a565b61055a565b3480156101d057600080fd5b506101836101df366004610927565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c366004610903565b6105b9565b34801561021d57600080fd5b506100fe61022c366004610903565b610605565b600082815260046020526040812054600380549192918390811061025757610257610bac565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610bc2565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610c04565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610c04565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610bc2565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610bc2565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60038054600181018255600091909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106f1898b83610c8d565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa158015610743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107679190610d4c565b600081815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a994174916107af918c918c9101610d65565b6020604051808303816000875af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190610d4c565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061083a90879086908c90610da1565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906108789089908f908f90600401610dc0565b60206040518083038185885af1158015610896573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108bb9190610d4c565b505050509695505050505050565b600080604083850312156108dc57600080fd5b50508035926020909101359150565b6001600160a01b038116811461090057600080fd5b50565b60006020828403121561091557600080fd5b8135610920816108eb565b9392505050565b60006020828403121561093957600080fd5b5035919050565b6000815180845260005b818110156109665760208185018101518683018201520161094a565b506000602082860101526020601f19601f83011685010191505092915050565b6080815260006109996080830187610940565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109c757600080fd5b5081356001600160401b038111156109de57600080fd5b6020830191508360208285010111156109f657600080fd5b9250929050565b600080600080600060608688031215610a1557600080fd5b85356001600160401b03811115610a2b57600080fd5b610a37888289016109b5565b90965094505060208601356001600160401b03811115610a5657600080fd5b610a62888289016109b5565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610aa357600080fd5b86356001600160401b03811115610ab957600080fd5b610ac589828a016109b5565b90975095505060208701356001600160401b03811115610ae457600080fd5b610af089828a016109b5565b90955093505060408701356001600160401b03811115610b0f57600080fd5b8701601f81018913610b2057600080fd5b80356001600160401b03811115610b3957610b39610a74565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610b6757610b67610a74565b6040528181528282016020018b1015610b7f57600080fd5b81602084016020830137600091810160200191909152969995985093969295946060939093013593505050565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610c1857607f821691505b602082108103610c3857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c8857806000526020600020601f840160051c81016020851015610c655750805b601f840160051c820191505b81811015610c855760008155600101610c71565b50505b505050565b6001600160401b03831115610ca457610ca4610a74565b610cb883610cb28354610c04565b83610c3e565b6000601f841160018114610cec5760008515610cd45750838201355b600019600387901b1c1916600186901b178355610c85565b600083815260209020601f19861690835b82811015610d1d5786850135825560209485019460019092019101610cfd565b5086821015610d3a5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060208284031215610d5e57600080fd5b5051919050565b6060815260006060820152608060208201526000610d866080830185610940565b8281036040840152610d988185610940565b95945050505050565b838152826020820152606060408201526000610d986060830184610940565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f191601019291505056fea26469706673582212207a0f2e944bb5e1e1e6f94e348f337a47fad044ed8ae74f39092cdc22bb00548a64736f6c634300081c0033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrator": "The arbitrator of the contract.", - "_arbitratorDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "Target global arbitrator for any disputes." - } - }, - "createDisputeForTemplate(bytes,string,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplate": "Dispute template.", - "_disputeTemplateDataMappings": "The data mappings.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "createDisputeForTemplateUri(bytes,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 19090, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 19093, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)25968" - }, - { - "astId": 19096, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)26147" - }, - { - "astId": 19100, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)19088_storage)dyn_storage" - }, - { - "astId": 19104, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)19088_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)19088_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)25968": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)26147": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)19088_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 19081, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 19083, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 19085, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 19087, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json deleted file mode 100644 index df70ac2d7..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "arbitratorDisputeIDToLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplate", - "type": "string" - }, - { - "internalType": "string", - "name": "_disputeTemplateDataMappings", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplateUri", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplateUri", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bytes", - "name": "arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_arbitratorDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x6e6144da838df488664fec992cf96ff6d6d7e6d6b2239d15dbaa4db970be6116", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", - "transactionIndex": 1, - "gasUsed": "935568", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x581b5decfadcbf1085c9383e7378b7f2738f8a0050031424ce6c036cf809ff5d", - "transactionHash": "0x6e6144da838df488664fec992cf96ff6d6d7e6d6b2239d15dbaa4db970be6116", - "logs": [], - "blockNumber": 96308731, - "cumulativeGasUsed": "935568", - "status": 1, - "byzantium": true - }, - "args": [ - "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "0x596D3B09E684D62217682216e9b7a0De75933391" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_arbitratorDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/DisputeResolver.sol\":\"DisputeResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal virtual returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0xee61f409399f0e66be187def6fcbe2e23717475b2b752d913dfac0a32c7dca1a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xb46ff71c32a524a865fe8ca99d94c9daeb690bc9d7d49d963a45b06f60af19f3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610ed7380380610ed783398101604081905261002f91610083565b600080546001600160a01b03199081163317909155600180546001600160a01b03948516908316179055600280549290931691161790556100bd565b6001600160a01b038116811461008057600080fd5b50565b6000806040838503121561009657600080fd5b82516100a18161006b565b60208401519092506100b28161006b565b809150509250929050565b610e0b806100cc6000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea264697066735822122028e3f1561d663e8479b35f936c2645829463b01bf5fedd3e120b732867bda19a64736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea264697066735822122028e3f1561d663e8479b35f936c2645829463b01bf5fedd3e120b732867bda19a64736f6c63430008180033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrator": "The arbitrator of the contract.", - "_arbitratorDisputeID": "The identifier of the dispute in the Arbitrator contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "Target global arbitrator for any disputes." - } - }, - "createDisputeForTemplate(bytes,string,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplate": "Dispute template.", - "_disputeTemplateDataMappings": "The data mappings.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "createDisputeForTemplateUri(bytes,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 14991, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 14994, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)23044" - }, - { - "astId": 14997, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)23215" - }, - { - "astId": 15001, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage" - }, - { - "astId": 15005, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)14989_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)23044": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)23215": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)14989_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 14982, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 14984, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 14986, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 14988, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json deleted file mode 100644 index f0f16e9d6..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "address": "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "DisputeTemplate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "setDisputeTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "templateId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templates", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x42d5be81f24d29079665466f5d2c1e1f90e14658916610f60650f9fddb9756c0", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", - "transactionIndex": 1, - "gasUsed": "175512", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000800000000000000000000000080000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4d8dc758475b63a2fe98693450ba52528c06e78722207f8bc258d0ac9e2843f8", - "transactionHash": "0x42d5be81f24d29079665466f5d2c1e1f90e14658916610f60650f9fddb9756c0", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 175286171, - "transactionHash": "0x42d5be81f24d29079665466f5d2c1e1f90e14658916610f60650f9fddb9756c0", - "address": "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x4d8dc758475b63a2fe98693450ba52528c06e78722207f8bc258d0ac9e2843f8" - } - ], - "blockNumber": 175286171, - "cumulativeGasUsed": "175512", - "status": 1, - "byzantium": true - }, - "args": [ - "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeTemplateRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c5a63c370bd1e5c29d148b45ecb1c6ba27ace4fde028c998100ed1a65bdeedc564736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c5a63c370bd1e5c29d148b45ecb1c6ba27ace4fde028c998100ed1a65bdeedc564736f6c634300081c0033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] - }, - "implementation": "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json deleted file mode 100644 index b508f1b0a..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json +++ /dev/null @@ -1,423 +0,0 @@ -{ - "address": "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "DisputeTemplate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "setDisputeTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "templateId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templates", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x9a20123a7ccae03fb699498162f2ec39137add58a29d39394cf4a9592db8b5c5", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", - "transactionIndex": 3, - "gasUsed": "639106", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000802000000000000000000000080000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000400000000000000000000000000000000000", - "blockHash": "0x3b0614d00c9bf7166c9fa2815325853d85094aa3e8964b3642cae46f76390a5e", - "transactionHash": "0x9a20123a7ccae03fb699498162f2ec39137add58a29d39394cf4a9592db8b5c5", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 175286166, - "transactionHash": "0x9a20123a7ccae03fb699498162f2ec39137add58a29d39394cf4a9592db8b5c5", - "address": "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 6, - "blockHash": "0x3b0614d00c9bf7166c9fa2815325853d85094aa3e8964b3642cae46f76390a5e" - } - ], - "blockNumber": 175286166, - "cumulativeGasUsed": "845628", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"DisputeTemplate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"setDisputeTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"templateId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"DisputeTemplate(uint256,string,string,string)\":{\"details\":\"To be emitted when a new dispute template is created.\",\"params\":{\"_templateData\":\"The template data.\",\"_templateDataMappings\":\"The data mappings.\",\"_templateId\":\"The identifier of the dispute template.\",\"_templateTag\":\"An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"details\":\"Initializer\",\"params\":{\"_governor\":\"Governor of the contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setDisputeTemplate(string,string,string)\":{\"details\":\"Registers a new dispute template.\",\"params\":{\"_templateData\":\"The data of the template.\",\"_templateDataMappings\":\"The data mappings of the template.\",\"_templateTag\":\"The tag of the template (optional).\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"governor\":{\"details\":\"The governor of the contract.\"},\"templates\":{\"details\":\"The number of templates.\"},\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Dispute Template Registry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/DisputeTemplateRegistry.sol\":\"DisputeTemplateRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/arbitration/DisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\nimport \\\"./interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\n/// @title Dispute Template Registry\\n/// @dev A contract to maintain a registry of dispute templates.\\ncontract DisputeTemplateRegistry is IDisputeTemplateRegistry, UUPSProxiable, Initializable {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev The governor of the contract.\\n address public governor;\\n\\n /// @dev The number of templates.\\n uint256 public templates;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer\\n /// @param _governor Governor of the contract.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Registers a new dispute template.\\n /// @param _templateTag The tag of the template (optional).\\n /// @param _templateData The data of the template.\\n /// @param _templateDataMappings The data mappings of the template.\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId) {\\n templateId = templates++;\\n emit DisputeTemplate(templateId, _templateTag, _templateData, _templateDataMappings);\\n }\\n}\\n\",\"keccak256\":\"0xc390ff7265e1cd07f6b1ea53145ee0065e929f3281e42ea82b73227f5ee7d652\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xd8122941175d1d5c2983e71717a2fdcc6fe94aa9de08f87eb7c44e3a5f1c2030\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610a216100fc600039600081816103010152818161032a01526105270152610a216000f3fe6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078e565b610280565b6100f161012136600461083b565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108ec565b34801561018557600080fd5b506100f16101943660046108ff565b610578565b3480156101a557600080fd5b506100f16101b43660046108ff565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361091a565b919050559050836040516102a59190610941565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de92919061095d565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109cc8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061098b565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109cc833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109cc8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610941565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109cc83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b8152600401610410906109a4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b8152600401610410906109a4565b50565b634e487b7160e01b600052604160045260246000fd5b6000806001600160401b03841115610709576107096106d9565b50604051601f19601f85018116603f011681018181106001600160401b0382111715610737576107376106d9565b60405283815290508082840185101561074f57600080fd5b83836020830137600060208583010152509392505050565b600082601f83011261077857600080fd5b610787838335602085016106ef565b9392505050565b6000806000606084860312156107a357600080fd5b83356001600160401b038111156107b957600080fd5b6107c586828701610767565b93505060208401356001600160401b038111156107e157600080fd5b6107ed86828701610767565b92505060408401356001600160401b0381111561080957600080fd5b61081586828701610767565b9150509250925092565b80356001600160a01b038116811461083657600080fd5b919050565b6000806040838503121561084e57600080fd5b6108578361081f565b915060208301356001600160401b0381111561087257600080fd5b8301601f8101851361088357600080fd5b610892858235602084016106ef565b9150509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b600081518084526108d881602086016020860161089c565b601f01601f19169290920160200192915050565b60208152600061078760208301846108c0565b60006020828403121561091157600080fd5b6107878261081f565b60006001820161093a57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161095381846020870161089c565b9190910192915050565b60408152600061097060408301856108c0565b828103602084015261098281856108c0565b95945050505050565b60006020828403121561099d57600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220824b519bc278f6320d49ad83ae79b1c15de9785d55c72ae6d946281532e8e72264736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078e565b610280565b6100f161012136600461083b565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108ec565b34801561018557600080fd5b506100f16101943660046108ff565b610578565b3480156101a557600080fd5b506100f16101b43660046108ff565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361091a565b919050559050836040516102a59190610941565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de92919061095d565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109cc8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061098b565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109cc833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109cc8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610941565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109cc83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b8152600401610410906109a4565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b8152600401610410906109a4565b50565b634e487b7160e01b600052604160045260246000fd5b6000806001600160401b03841115610709576107096106d9565b50604051601f19601f85018116603f011681018181106001600160401b0382111715610737576107376106d9565b60405283815290508082840185101561074f57600080fd5b83836020830137600060208583010152509392505050565b600082601f83011261077857600080fd5b610787838335602085016106ef565b9392505050565b6000806000606084860312156107a357600080fd5b83356001600160401b038111156107b957600080fd5b6107c586828701610767565b93505060208401356001600160401b038111156107e157600080fd5b6107ed86828701610767565b92505060408401356001600160401b0381111561080957600080fd5b61081586828701610767565b9150509250925092565b80356001600160a01b038116811461083657600080fd5b919050565b6000806040838503121561084e57600080fd5b6108578361081f565b915060208301356001600160401b0381111561087257600080fd5b8301601f8101851361088357600080fd5b610892858235602084016106ef565b9150509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b600081518084526108d881602086016020860161089c565b601f01601f19169290920160200192915050565b60208152600061078760208301846108c0565b60006020828403121561091157600080fd5b6107878261081f565b60006001820161093a57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161095381846020870161089c565b9190910192915050565b60408152600061097060408301856108c0565b828103602084015261098281856108c0565b95945050505050565b60006020828403121561099d57600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220824b519bc278f6320d49ad83ae79b1c15de9785d55c72ae6d946281532e8e72264736f6c634300081c0033", - "devdoc": { - "details": "A contract to maintain a registry of dispute templates.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "DisputeTemplate(uint256,string,string,string)": { - "details": "To be emitted when a new dispute template is created.", - "params": { - "_templateData": "The template data.", - "_templateDataMappings": "The data mappings.", - "_templateId": "The identifier of the dispute template.", - "_templateTag": "An optional tag for the dispute template, such as \"registration\" or \"removal\"." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "initialize(address)": { - "details": "Initializer", - "params": { - "_governor": "Governor of the contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setDisputeTemplate(string,string,string)": { - "details": "Registers a new dispute template.", - "params": { - "_templateData": "The data of the template.", - "_templateDataMappings": "The data mappings of the template.", - "_templateTag": "The tag of the template (optional)." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "governor": { - "details": "The governor of the contract." - }, - "templates": { - "details": "The number of templates." - }, - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "Dispute Template Registry", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 10943, - "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 10946, - "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", - "label": "templates", - "offset": 0, - "slot": "1", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json deleted file mode 100644 index 3e0b2d2e5..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x42d5be81f24d29079665466f5d2c1e1f90e14658916610f60650f9fddb9756c0", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", - "transactionIndex": 1, - "gasUsed": "175512", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000800000000000000000000000080000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4d8dc758475b63a2fe98693450ba52528c06e78722207f8bc258d0ac9e2843f8", - "transactionHash": "0x42d5be81f24d29079665466f5d2c1e1f90e14658916610f60650f9fddb9756c0", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 175286171, - "transactionHash": "0x42d5be81f24d29079665466f5d2c1e1f90e14658916610f60650f9fddb9756c0", - "address": "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x4d8dc758475b63a2fe98693450ba52528c06e78722207f8bc258d0ac9e2843f8" - } - ], - "blockNumber": 175286171, - "cumulativeGasUsed": "175512", - "status": 1, - "byzantium": true - }, - "args": [ - "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeTemplateRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c5a63c370bd1e5c29d148b45ecb1c6ba27ace4fde028c998100ed1a65bdeedc564736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220c5a63c370bd1e5c29d148b45ecb1c6ba27ace4fde028c998100ed1a65bdeedc564736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json deleted file mode 100644 index 844ea365d..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json +++ /dev/null @@ -1,276 +0,0 @@ -{ - "address": "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_party", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "Evidence", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "submitEvidence", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x78c07b515b03fa357981a5cd203bed46a67dabc443979509d74169f6c3d58163", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", - "transactionIndex": 4, - "gasUsed": "175478", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000800000100000000000000000080000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7029cf6539ff491fb7da410a08e2aa25b6907c4ee30825984f246a548cda84c9", - "transactionHash": "0x78c07b515b03fa357981a5cd203bed46a67dabc443979509d74169f6c3d58163", - "logs": [ - { - "transactionIndex": 4, - "blockNumber": 175286065, - "transactionHash": "0x78c07b515b03fa357981a5cd203bed46a67dabc443979509d74169f6c3d58163", - "address": "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 9, - "blockHash": "0x7029cf6539ff491fb7da410a08e2aa25b6907c4ee30825984f246a548cda84c9" - } - ], - "blockNumber": 175286065, - "cumulativeGasUsed": "644953", - "status": 1, - "byzantium": true - }, - "args": [ - "0x450Aa35da0ad8B282C5d910254055651417C2200", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"EvidenceModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fbfd4692b0a069d62b438e1b0eef66c33d7285b74fd57f4afd10271ab81b1e3864736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fbfd4692b0a069d62b438e1b0eef66c33d7285b74fd57f4afd10271ab81b1e3864736f6c634300081c0033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] - }, - "implementation": "0x450Aa35da0ad8B282C5d910254055651417C2200", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json deleted file mode 100644 index c92765f17..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "address": "0x450Aa35da0ad8B282C5d910254055651417C2200", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_party", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "Evidence", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "submitEvidence", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xb91b3c71dfdbe338ad948e9818898f1aca58119080c2de59c3487839e32378ba", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x450Aa35da0ad8B282C5d910254055651417C2200", - "transactionIndex": 2, - "gasUsed": "576709", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000010000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xbeedbabfb8c0a84bc0fff0e4578c98482a0141146d446283697311b5f3a1117f", - "transactionHash": "0xb91b3c71dfdbe338ad948e9818898f1aca58119080c2de59c3487839e32378ba", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175286061, - "transactionHash": "0xb91b3c71dfdbe338ad948e9818898f1aca58119080c2de59c3487839e32378ba", - "address": "0x450Aa35da0ad8B282C5d910254055651417C2200", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 4, - "blockHash": "0xbeedbabfb8c0a84bc0fff0e4578c98482a0141146d446283697311b5f3a1117f" - } - ], - "blockNumber": 175286061, - "cumulativeGasUsed": "905683", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_party\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"Evidence\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Evidence(uint256,address,string)\":{\"details\":\"To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\",\"params\":{\"_evidence\":\"Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\",\"_party\":\"The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"details\":\"Initializer.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"submitEvidence(uint256,string)\":{\"details\":\"Submits evidence for a dispute.\",\"params\":{\"_evidence\":\"Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Evidence Module\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/evidence/EvidenceModule.sol\":\"EvidenceModule\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/evidence/EvidenceModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport \\\"../interfaces/IEvidence.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title Evidence Module\\ncontract EvidenceModule is IEvidence, Initializable, UUPSProxiable {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submits evidence for a dispute.\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\\n /// @param _evidence Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\\n function submitEvidence(uint256 _externalDisputeID, string calldata _evidence) external {\\n emit Evidence(_externalDisputeID, msg.sender, _evidence);\\n }\\n}\\n\",\"keccak256\":\"0x0655c61ec47d3a2e086dd5f74f5e4a1edc6384a2384a682738a01d3f755d6676\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IEvidence.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title IEvidence\\ninterface IEvidence {\\n /// @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\\n /// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\\n /// @param _evidence Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\\n event Evidence(uint256 indexed _externalDisputeID, address indexed _party, string _evidence);\\n}\\n\",\"keccak256\":\"0xf901e232e15cb4ce322864ae66a499900791bc1bbe98e5e58106bc6349b6e16d\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516109006100fc6000396000818161024801528181610271015261046e01526109006000f3fe6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068a565b610234565b3480156100d857600080fd5b506100e1610461565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610775565b34801561013957600080fd5b506100b76101483660046107a8565b6104bf565b34801561015957600080fd5b506100b7610168366004610824565b610508565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b6575080546001600160401b03808416911610155b156101d35760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023d826105f0565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102af6000805160206108ab8339815191525490565b6001600160a01b031614155b156102d95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610333575060408051601f3d908101601f1916820190925261033091810190610846565b60015b61036057604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108ab833981519152811461039157604051632a87526960e21b815260048101829052602401610357565b6000805160206108ab8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045c576000836001600160a01b0316836040516103f8919061085f565b600060405180830381855af49150503d8060008114610433576040519150601f19603f3d011682016040523d82523d6000602084013e610438565b606091505b505090508061045a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ac5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108ab83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fb92919061087b565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610551575080546001600160401b03808416911610155b1561056e5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106555760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610357565b50565b80356001600160a01b038116811461066f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561069d57600080fd5b6106a683610658565b915060208301356001600160401b038111156106c157600080fd5b8301601f810185136106d257600080fd5b80356001600160401b038111156106eb576106eb610674565b604051601f8201601f19908116603f011681016001600160401b038111828210171561071957610719610674565b60405281815282820160200187101561073157600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b8381101561076c578181015183820152602001610754565b50506000910152565b6020815260008251806020840152610794816040850160208701610751565b601f01601f19169190910160400192915050565b6000806000604084860312156107bd57600080fd5b8335925060208401356001600160401b038111156107da57600080fd5b8401601f810186136107eb57600080fd5b80356001600160401b0381111561080157600080fd5b86602082840101111561081357600080fd5b939660209190910195509293505050565b60006020828403121561083657600080fd5b61083f82610658565b9392505050565b60006020828403121561085857600080fd5b5051919050565b60008251610871818460208701610751565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220628145de46593bc4870fe957425a4010d1b9984623ab37ad87d6400f11f2884264736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068a565b610234565b3480156100d857600080fd5b506100e1610461565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610775565b34801561013957600080fd5b506100b76101483660046107a8565b6104bf565b34801561015957600080fd5b506100b7610168366004610824565b610508565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b6575080546001600160401b03808416911610155b156101d35760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023d826105f0565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102af6000805160206108ab8339815191525490565b6001600160a01b031614155b156102d95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610333575060408051601f3d908101601f1916820190925261033091810190610846565b60015b61036057604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108ab833981519152811461039157604051632a87526960e21b815260048101829052602401610357565b6000805160206108ab8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045c576000836001600160a01b0316836040516103f8919061085f565b600060405180830381855af49150503d8060008114610433576040519150601f19603f3d011682016040523d82523d6000602084013e610438565b606091505b505090508061045a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ac5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108ab83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fb92919061087b565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610551575080546001600160401b03808416911610155b1561056e5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106555760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610357565b50565b80356001600160a01b038116811461066f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561069d57600080fd5b6106a683610658565b915060208301356001600160401b038111156106c157600080fd5b8301601f810185136106d257600080fd5b80356001600160401b038111156106eb576106eb610674565b604051601f8201601f19908116603f011681016001600160401b038111828210171561071957610719610674565b60405281815282820160200187101561073157600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b8381101561076c578181015183820152602001610754565b50506000910152565b6020815260008251806020840152610794816040850160208701610751565b601f01601f19169190910160400192915050565b6000806000604084860312156107bd57600080fd5b8335925060208401356001600160401b038111156107da57600080fd5b8401601f810186136107eb57600080fd5b80356001600160401b0381111561080157600080fd5b86602082840101111561081357600080fd5b939660209190910195509293505050565b60006020828403121561083657600080fd5b61083f82610658565b9392505050565b60006020828403121561085857600080fd5b5051919050565b60008251610871818460208701610751565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220628145de46593bc4870fe957425a4010d1b9984623ab37ad87d6400f11f2884264736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Evidence(uint256,address,string)": { - "details": "To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).", - "params": { - "_evidence": "Stringified evidence object, example: '{\"name\" : \"Justification\", \"description\" : \"Description\", \"fileURI\" : \"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\"}'.", - "_externalDisputeID": "Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.", - "_party": "The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "initialize(address)": { - "details": "Initializer.", - "params": { - "_governor": "The governor's address." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "submitEvidence(uint256,string)": { - "details": "Submits evidence for a dispute.", - "params": { - "_evidence": "Stringified evidence object, example: '{\"name\" : \"Justification\", \"description\" : \"Description\", \"fileURI\" : \"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\"}'.", - "_externalDisputeID": "Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "Evidence Module", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 24479, - "contract": "src/arbitration/evidence/EvidenceModule.sol:EvidenceModule", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json deleted file mode 100644 index 2731e09d5..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x78c07b515b03fa357981a5cd203bed46a67dabc443979509d74169f6c3d58163", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", - "transactionIndex": 4, - "gasUsed": "175478", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000800000100000000000000000080000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7029cf6539ff491fb7da410a08e2aa25b6907c4ee30825984f246a548cda84c9", - "transactionHash": "0x78c07b515b03fa357981a5cd203bed46a67dabc443979509d74169f6c3d58163", - "logs": [ - { - "transactionIndex": 4, - "blockNumber": 175286065, - "transactionHash": "0x78c07b515b03fa357981a5cd203bed46a67dabc443979509d74169f6c3d58163", - "address": "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 9, - "blockHash": "0x7029cf6539ff491fb7da410a08e2aa25b6907c4ee30825984f246a548cda84c9" - } - ], - "blockNumber": 175286065, - "cumulativeGasUsed": "644953", - "status": 1, - "byzantium": true - }, - "args": [ - "0x450Aa35da0ad8B282C5d910254055651417C2200", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"EvidenceModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fbfd4692b0a069d62b438e1b0eef66c33d7285b74fd57f4afd10271ab81b1e3864736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fbfd4692b0a069d62b438e1b0eef66c33d7285b74fd57f4afd10271ab81b1e3864736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json deleted file mode 100644 index 4d742fa0e..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json +++ /dev/null @@ -1,2056 +0,0 @@ -{ - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "AppealPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "CannotDisableClassicDK", - "type": "error" - }, - { - "inputs": [], - "name": "CommitPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitNotSupportedByCourt", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitOnly", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "DisputePeriodIsFinal", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeStillDrawing", - "type": "error" - }, - { - "inputs": [], - "name": "EvidenceNotPassedAndNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GuardianOrGovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDisputKitParent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "MinStakeLowerThanParentCourt", - "type": "error" - }, - { - "inputs": [], - "name": "MustSupportDisputeKitClassic", - "type": "error" - }, - { - "inputs": [], - "name": "NotEvidencePeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotExecutionPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "SortitionModuleOnly", - "type": "error" - }, - { - "inputs": [], - "name": "StakingInTooManyCourts", - "type": "error" - }, - { - "inputs": [], - "name": "StakingLessThanCourtMinStake", - "type": "error" - }, - { - "inputs": [], - "name": "StakingNotPossibleInThisCourt", - "type": "error" - }, - { - "inputs": [], - "name": "StakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "StakingZeroWhenNoStake", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnstakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "inputs": [], - "name": "UnsupportedDisputeKit", - "type": "error" - }, - { - "inputs": [], - "name": "VotePeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "WhenNotPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WhenPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WrongDisputeKitIndex", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "DisputeKitCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "DisputeKitEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_fromDisputeKitID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toDisputeKitID", - "type": "uint256" - } - ], - "name": "DisputeKitJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreBase.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "addNewDisputeKit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_guardian", - "type": "address" - } - ], - "name": "changeGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - } - ], - "name": "changeJurorProsecutionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeKits", - "outputs": [ - { - "internalType": "contract IDisputeKit", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreBase.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "uint256", - "name": "nbDrawnJurors", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256[]", - "name": "_disputeKitIDs", - "type": "uint256[]" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "enableDisputeKits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getDisputeKitsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getPnkAtStakePerJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "disputeKitID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkAtStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "repartitions", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkPenalties", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "drawnJurors", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumPnkRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "drawIterations", - "type": "uint256" - } - ], - "internalType": "struct KlerosCoreBase.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_guardian", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "_disputeKit", - "type": "address" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModuleAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "isDisputeKitJumping", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - } - ], - "name": "isSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorProsecutionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "passPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStakeBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "contract ISortitionModule", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "transactionIndex": 2, - "gasUsed": "579894", - "logsBloom": "0x00000000000000000000000020000000000008000000000000000000020000000000000000000000000008000000000000000200000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000400020000000000000010000800402000000000000000000000000004000000800000000000000800000000000000000000000080000000000004000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001000000200000000000000000000000000000000000000000000000000", - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b", - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175286093, - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000eeebbbff8f377dcfc7d4f7876c531db0d22720e1" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b" - }, - { - "transactionIndex": 2, - "blockNumber": 175286093, - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "topics": [ - "0x550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b" - }, - { - "transactionIndex": 2, - "blockNumber": 175286093, - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b" - }, - { - "transactionIndex": 2, - "blockNumber": 175286093, - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b" - } - ], - "blockNumber": 175286093, - "cumulativeGasUsed": "626786", - "status": 1, - "byzantium": true - }, - "args": [ - "0x0d91F523fA287A74698A0e6Cd6A2436E91b9BEB9", - "0x7b4f3cc5000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa2250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eeebbbff8f377dcfc7d4f7876c531db0d22720e1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000002000000000000000000000000006f24a90fbbeabb2b4343bb9c1ed8ee6acaa5066300000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 2, - "solcInputHash": "55ee2edfcfbef3e6f4c10ec53a4be5f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122013d7994215e0250a3caf5a61db41d7e3f7d36bd4d6c352ddb4eb5213b4783ea264736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122013d7994215e0250a3caf5a61db41d7e3f7d36bd4d6c352ddb4eb5213b4783ea264736f6c634300081c0033", - "execute": { - "methodName": "reinitialize", - "args": [ - "0x3829A2486d53ee984a0ca2D76552715726b77138" - ] - }, - "implementation": "0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json deleted file mode 100644 index c3a355de9..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json +++ /dev/null @@ -1,1622 +0,0 @@ -{ - "address": "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NoRulerSet", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulerOnly", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "RulingModeNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "mode", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "AutoRuled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreRuler.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_oldRuler", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "RulerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct KlerosCoreRuler.RulerSettings", - "name": "_settings", - "type": "tuple" - } - ], - "name": "RulerSettingsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "changeRuler", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "_presetOverridden", - "type": "bool" - } - ], - "name": "changeRulingModeToAutomaticPreset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToAutomaticRandom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToManual", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreRuler.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getNextDisputeID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - } - ], - "internalType": "struct KlerosCoreRuler.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "rulers", - "outputs": [ - { - "internalType": "address", - "name": "ruler", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "name": "rulingResults", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "settings", - "outputs": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xc503704bbd721158002b2f03148150f54a934741b23574787474588322d1d5f8", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - "transactionIndex": 1, - "gasUsed": "310077", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000100004000000000000000000000000000040008000000000000000000000000020000000000000080000800000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000000000000000000000000000000000000000000000000000000042000000", - "blockHash": "0xaa9f9cf50b84c74628f2df98dc1e1c090427a181fafc9d1b6b8f5ff17f49e475", - "transactionHash": "0xc503704bbd721158002b2f03148150f54a934741b23574787474588322d1d5f8", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 175286718, - "transactionHash": "0xc503704bbd721158002b2f03148150f54a934741b23574787474588322d1d5f8", - "address": "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - "topics": [ - "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 0, - "blockHash": "0xaa9f9cf50b84c74628f2df98dc1e1c090427a181fafc9d1b6b8f5ff17f49e475" - }, - { - "transactionIndex": 1, - "blockNumber": 175286718, - "transactionHash": "0xc503704bbd721158002b2f03148150f54a934741b23574787474588322d1d5f8", - "address": "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0xaa9f9cf50b84c74628f2df98dc1e1c090427a181fafc9d1b6b8f5ff17f49e475" - } - ], - "blockNumber": 175286718, - "cumulativeGasUsed": "310077", - "status": 1, - "byzantium": true - }, - "args": [ - "0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF", - "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreRulerProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204d82e24ac13242090d48f2411d7306e8cf3dde46882ce606cf3b6aafa5d3ba9c64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204d82e24ac13242090d48f2411d7306e8cf3dde46882ce606cf3b6aafa5d3ba9c64736f6c634300081c0033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x34B944D42cAcfC8266955D07A80181D2054aa225", - [ - 0, - 10000, - "100000000000000000", - 16 - ] - ] - }, - "implementation": "0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json deleted file mode 100644 index 06c58197d..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json +++ /dev/null @@ -1,2246 +0,0 @@ -{ - "address": "0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NoRulerSet", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulerOnly", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "RulingModeNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "mode", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "AutoRuled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreRuler.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_oldRuler", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "RulerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct KlerosCoreRuler.RulerSettings", - "name": "_settings", - "type": "tuple" - } - ], - "name": "RulerSettingsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "changeRuler", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "_presetOverridden", - "type": "bool" - } - ], - "name": "changeRulingModeToAutomaticPreset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToAutomaticRandom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToManual", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreRuler.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getNextDisputeID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - } - ], - "internalType": "struct KlerosCoreRuler.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "rulers", - "outputs": [ - { - "internalType": "address", - "name": "ruler", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "name": "rulingResults", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "settings", - "outputs": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x839a753ac2abfc5ab785467340ba05842cdc78e8904b2e5a73b33ca81dd02df5", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF", - "transactionIndex": 3, - "gasUsed": "3008714", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000008000000", - "blockHash": "0x9963c13972d1ac6da95bb5b070149a78dcd17a022685fc34f4d20d9c1b10834d", - "transactionHash": "0x839a753ac2abfc5ab785467340ba05842cdc78e8904b2e5a73b33ca81dd02df5", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 175286714, - "transactionHash": "0x839a753ac2abfc5ab785467340ba05842cdc78e8904b2e5a73b33ca81dd02df5", - "address": "0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 6, - "blockHash": "0x9963c13972d1ac6da95bb5b070149a78dcd17a022685fc34f4d20d9c1b10834d" - } - ], - "blockNumber": 175286714, - "cumulativeGasUsed": "3687929", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOrInstructorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoRulerSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingModeNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"mode\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"AutoRuled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreRuler.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_oldRuler\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"RulerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"struct KlerosCoreRuler.RulerSettings\",\"name\":\"_settings\",\"type\":\"tuple\"}],\"name\":\"RulerSettingsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"changeRuler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_presetOverridden\",\"type\":\"bool\"}],\"name\":\"changeRulingModeToAutomaticPreset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToAutomaticRandom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToManual\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreRuler.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNextDisputeID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"}],\"internalType\":\"struct KlerosCoreRuler.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"rulers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ruler\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"name\":\"rulingResults\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"settings\",\"outputs\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"appeal(uint256,uint256,bytes,bool)\":{\"details\":\"Appeals the ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"}},\"appealCost(uint256,bool)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])\":{\"details\":\"Creates a court under a specified parent court.\",\"params\":{\"_alpha\":\"The `alpha` property value of the court.\",\"_feeForJuror\":\"The `feeForJuror` property value of the court.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the court.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the court.\",\"_minStake\":\"The `minStake` property value of the court.\",\"_parent\":\"The `parent` property value of the court.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the court.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"execute(uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The appeal round.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"executeRuling(uint256,uint256,bool,bool)\":{\"details\":\"Executes a specified dispute's ruling.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getNumberOfVotes(uint256)\":{\"details\":\"Gets the number of votes permitted for the specified dispute in the latest round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"initialize(address,address,uint256[4])\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_governor\":\"The governor's address.\",\"_pinakion\":\"The address of the token contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"KlerosCoreRuler Core arbitrator contract for development and testing purposes.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/KlerosCoreRuler.sol\":\"KlerosCoreRuler\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/devtools/KlerosCoreRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreRuler\\n/// Core arbitrator contract for development and testing purposes.\\ncontract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum RulingMode {\\n uninitialized,\\n manual, // executeRuling() is called manually.\\n automaticRandom, // The ruling is given randomly automatically.\\n automaticPreset // The ruling is given automatically with a preset value.\\n }\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct RulerSettings {\\n RulingMode rulingMode; // The ruling mode of the arbitrator.\\n uint256 presetRuling; // The ruling to give in case of automatic ruling mode.\\n bool presetTied; // Whether the ruling is tied or not.\\n bool presetOverridden; // Whether the ruling is overridden or not.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n struct RulingResult {\\n uint256 ruling;\\n bool tied;\\n bool overridden;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n IERC20 public pinakion; // The Pinakion token contract.\\n Court[] public courts; // The courts.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n mapping(IArbitrableV2 arbitrable => address ruler) public rulers; // The ruler of each arbitrable contract.\\n mapping(IArbitrableV2 arbitrable => RulerSettings) public settings; // The settings of each arbitrable contract.\\n mapping(uint256 disputeID => RulingResult) public rulingResults; // The ruling results of each dispute.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event AutoRuled(\\n IArbitrableV2 indexed _arbitrable,\\n RulingMode indexed mode,\\n uint256 indexed _disputeID,\\n uint256 _ruling,\\n bool tied,\\n bool overridden\\n );\\n event RulerSettingsChanged(IArbitrableV2 indexed _arbitrable, RulerSettings _settings);\\n event RulerChanged(IArbitrableV2 indexed _arbitrable, address indexed _oldRuler, address indexed _newRuler);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n function initialize(\\n address _governor,\\n IERC20 _pinakion,\\n uint256[4] memory _courtParameters\\n ) external reinitializer(1) {\\n governor = _governor;\\n pinakion = _pinakion;\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = false;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = [0, 0, 0, 0];\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n court.hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n court.timesPerPeriod\\n );\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function changeRulingModeToManual(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.manual;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticRandom(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticRandom;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticPreset(\\n IArbitrableV2 _arbitrable,\\n uint256 _presetRuling,\\n bool _presetTied,\\n bool _presetOverridden\\n ) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticPreset;\\n arbitratedSettings.presetRuling = _presetRuling;\\n arbitratedSettings.presetTied = _presetTied;\\n arbitratedSettings.presetOverridden = _presetOverridden;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRuler(IArbitrableV2 _arbitrable, address _newRuler) external {\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n rulers[_arbitrable] = _newRuler;\\n emit RulerChanged(_arbitrable, msg.sender, _newRuler);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , ) = _unpackExtraData(_extraData);\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n\\n Round storage round = dispute.rounds.push();\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n _autoRule(disputeID, _numberOfChoices);\\n\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n function _autoRule(uint256 _disputeID, uint256 _numberOfChoices) internal {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 roundID = dispute.rounds.length - 1;\\n RulerSettings storage arbitratedSettings = settings[dispute.arbitrated];\\n if (arbitratedSettings.rulingMode == RulingMode.uninitialized) revert RulingModeNotSet();\\n if (arbitratedSettings.rulingMode == RulingMode.manual) {\\n // NOP\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticPreset) {\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticPreset,\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.executeRuling(\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.execute(_disputeID, roundID);\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticRandom) {\\n uint256 pseudoRandomNumber = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1)))) %\\n _numberOfChoices; // Not secure but it's just a dev tool for testing, sue me\\n bool tied = pseudoRandomNumber & 4 == 0;\\n bool overridden = pseudoRandomNumber & 2 == 0;\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticRandom,\\n _disputeID,\\n pseudoRandomNumber,\\n tied,\\n overridden\\n );\\n this.executeRuling(_disputeID, pseudoRandomNumber, tied, overridden);\\n this.execute(_disputeID, roundID);\\n }\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _jump Whether to jump to the parent court or not.\\n function appeal(\\n uint256 _disputeID,\\n uint256 _numberOfChoices,\\n bytes memory /*_extraData*/,\\n bool _jump\\n ) external payable {\\n if (msg.value < appealCost(_disputeID, _jump)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (rulers[dispute.arbitrated] != msg.sender) revert RulerOnly();\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n uint96 newCourtID = dispute.courtID;\\n\\n if (_jump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n\\n Round storage extraRound = dispute.rounds.push();\\n extraRound.totalFeesForJurors = msg.value;\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n\\n _autoRule(_disputeID, _numberOfChoices);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n function execute(uint256 _disputeID, uint256 _round) external {\\n Dispute storage dispute = disputes[_disputeID];\\n address account = rulers[dispute.arbitrated];\\n if (account == address(0)) revert NoRulerSet();\\n\\n // Transfer the fees back to the ruler\\n Round storage round = dispute.rounds[_round];\\n uint256 feeReward = round.totalFeesForJurors;\\n round.sumFeeRewardPaid += feeReward;\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(account, _disputeID, _round, 1, int256(0), int256(feeReward), round.feeToken);\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID, uint256 _ruling, bool tied, bool overridden) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n if (msg.sender != rulers[dispute.arbitrated] && msg.sender != address(this)) revert RulerOnly();\\n\\n rulingResults[_disputeID] = RulingResult(_ruling, tied, overridden);\\n dispute.ruled = true;\\n dispute.arbitrated.rule(_disputeID, _ruling);\\n\\n emit Ruling(dispute.arbitrated, _disputeID, _ruling);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _unpackExtraData(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _jump Whether to jump to the parent court or not.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID, bool _jump) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n uint256 nbVotes = round.totalFeesForJurors / court.feeForJuror;\\n if (_jump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n RulingResult storage rulingResult = rulingResults[_disputeID];\\n return (rulingResult.ruling, rulingResult.tied, rulingResult.overridden);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n function getNextDisputeID() external view returns (uint256) {\\n return disputes.length;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n return dispute.rounds[dispute.rounds.length - 1].totalFeesForJurors / court.feeForJuror;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _unpackExtraData(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GovernorOrInstructorOnly();\\n error RulerOnly();\\n error NoRulerSet();\\n error RulingModeNotSet();\\n error UnsuccessfulCall();\\n error InvalidForkingCourtAsParent();\\n error ArbitrationFeesNotEnough();\\n error TokenNotAccepted();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error RulingAlreadyExecuted();\\n error TransferFailed();\\n}\\n\",\"keccak256\":\"0xd9ba64c9b6a282221dccb80ffc28f8870f256c8119467d9d371e303a8ae3e57a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516134fc6100fc60003960008181611485015281816114ae01526116ab01526134fc6000f3fe60806040526004361061021f5760003560e01c80635601eaea1161012e578063d98493f6116100ab578063e6d49cdf1161006f578063e6d49cdf146107b0578063f6506db4146107f0578063f7434ea914610810578063fbf405b014610830578063fc6f8f161461085057600080fd5b8063d98493f6146106ee578063d9ee095f1461070e578063db8a173b14610721578063e2373ab314610736578063e4c0aaf41461079057600080fd5b806382d02237116100f257806382d022371461063057806386541b24146106505780638a9bb02a14610670578063c13517e1146106bb578063c71f4253146106ce57600080fd5b80635601eaea14610580578063564a565d146105a05780636736b70c146105d0578063751accd0146105f05780637934c0be1461061057600080fd5b80632177470c116101bc578063472abf6811610180578063472abf68146104e557806347cdcc1d146104fa5780634f1ef2861461051a57806352d1902d1461052d57806354fd4d501461054257600080fd5b80632177470c14610422578063379f0a17146104425780633cfd118414610478578063405d51ae146104a557806343818d66146104c557600080fd5b8062f5822c1461022457806301fcf74d146102465780630219da791461027957806305d3177d146102ec5780630c340a241461030c5780630e3993a4146103445780631860592b146103645780631c3db16d146103845780631f5a0dd2146103c1575b600080fd5b34801561023057600080fd5b5061024461023f366004612a50565b610870565b005b34801561025257600080fd5b50610266610261366004612a82565b6108bd565b6040519081526020015b60405180910390f35b34801561028557600080fd5b506102c4610294366004612a50565b60046020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff1690820152606001610270565b3480156102f857600080fd5b50610244610307366004612b35565b610a19565b34801561031857600080fd5b5060005461032c906001600160a01b031681565b6040516001600160a01b039091168152602001610270565b34801561035057600080fd5b5061024461035f366004612a50565b610c72565b34801561037057600080fd5b5061026661037f366004612b7d565b610d7d565b34801561039057600080fd5b506103a461039f366004612ba9565b610dd7565b604080519384529115156020840152151590820152606001610270565b3480156103cd57600080fd5b506103e16103dc366004612ba9565b610e01565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610270565b34801561042e57600080fd5b5061024461043d366004612bc2565b610e60565b34801561044e57600080fd5b5061032c61045d366004612a50565b6005602052600090815260409020546001600160a01b031681565b34801561048457600080fd5b50610498610493366004612c28565b611028565b6040516102709190612c66565b3480156104b157600080fd5b506102446104c0366004612c74565b611092565b3480156104d157600080fd5b506102446104e0366004612a50565b611252565b3480156104f157600080fd5b50610244611317565b34801561050657600080fd5b50610244610515366004612ce2565b6113de565b610244610528366004612d9d565b611471565b34801561053957600080fd5b5061026661169e565b34801561054e57600080fd5b50610573604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516102709190612e10565b34801561058c57600080fd5b5061024461059b366004612e43565b6116fc565b3480156105ac57600080fd5b506105c06105bb366004612ba9565b61186e565b6040516102709493929190612e8f565b3480156105dc57600080fd5b506102446105eb366004612ecc565b6118c3565b3480156105fc57600080fd5b5061024461060b366004612f04565b6119d4565b34801561061c57600080fd5b5061024461062b366004612f5c565b611a7e565b34801561063c57600080fd5b5061024461064b366004612f8a565b611afd565b34801561065c57600080fd5b5061024461066b366004612c74565b611bba565b34801561067c57600080fd5b5061069061068b366004612e43565b611cae565b604080518251815260208084015190820152918101516001600160a01b031690820152606001610270565b6102666106c9366004612fe7565b611d5b565b3480156106da57600080fd5b506102666106e9366004612ba9565b611d93565b3480156106fa57600080fd5b5061026661070936600461305f565b611e3d565b61024461071c3660046130aa565b611e82565b34801561072d57600080fd5b50600354610266565b34801561074257600080fd5b50610780610751366004612a50565b60066020526000908152604090208054600182015460029092015460ff91821692918181169161010090041684565b6040516102709493929190613111565b34801561079c57600080fd5b506102446107ab366004612a50565b6120cf565b3480156107bc57600080fd5b506103a46107cb366004612ba9565b6007602052600090815260409020805460019091015460ff8082169161010090041683565b3480156107fc57600080fd5b5061026661080b36600461313c565b61211c565b34801561081c57600080fd5b5061026661082b3660046131a2565b612200565b34801561083c57600080fd5b5060015461032c906001600160a01b031681565b34801561085c57600080fd5b5061026661086b366004612ba9565b61224c565b6000546001600160a01b0316331461089b5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600080600384815481106108d3576108d36131d6565b60009182526020822060026003909202019081018054919350906108f990600190613202565b81548110610909576109096131d6565b6000918252602082208454600280546003909402909201945090916001600160601b0390911690811061093e5761093e6131d6565b90600052602060002090600b02019050600081600401548360000154610964919061322b565b905085156109e75783546001600160601b03166000190161098e576001600160ff1b039450610a0f565b61099981600261323f565b6109a4906001613256565b82546002805490916001600160601b03169081106109c4576109c46131d6565b90600052602060002090600b0201600401546109e0919061323f565b9450610a0f565b6109f281600261323f565b6109fd906001613256565b8260040154610a0c919061323f565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610a62575080546001600160401b03808416911610155b15610a7f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610b38578160200160208202803683370190505b508051610b4f91600184019160209091019061295d565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184526000808252948101859052928301849052820192909252610bb5916006840191906129a8565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610c1b95600160601b90930460ff1694919390929060068b0190613269565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b0381811660009081526005602052604090205416610cba576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b03818116600090815260056020526040902054163314610cf4576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610d7191906132c4565b60405180910390a25050565b6001600160a01b03821660009081526004602052604081205461010081046001600160401b031690610dba90600160481b900460ff16600a6133f0565b610dc4908461323f565b610dce919061322b565b90505b92915050565b6000818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610e1157600080fd5b60009182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600060038581548110610e7557610e756131d6565b906000526020600020906003020190508060010160019054906101000a900460ff1615610eb55760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b03908116600090815260056020526040902054163314801590610ee85750333014155b15610f06576040516301627e2760e61b815260040160405180910390fd5b60408051606081018252858152841515602080830191825285151583850190815260008a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b6110306129db565b6002826001600160601b03168154811061104c5761104c6131d6565b6000918252602090912060408051608081019182905292600b029091016006019060049082845b8154815260200190600101908083116110735750505050509050919050565b6000546001600160a01b031633146110bd5760405163c383977560e01b815260040160405180910390fd5b6001600160601b0387166110e457604051631ef4f64960e01b815260040160405180910390fd5b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b16178155909160405190808252806020026020018201604052801561115d578160200160208202803683370190505b50805161117491600184019160209091019061295d565b50805460ff60601b1916600160601b8915150217815560028101879055600381018690556004808201869055600582018590556111b790600683019085906129f9565b506002896001600160601b0316815481106111d4576111d46131d6565b600091825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a7619061123f908c908c908c908c908c908c906133ff565b60405180910390a3505050505050505050565b6001600160a01b038181166000908152600560205260409020541661129a576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181166000908152600560205260409020541633146112d4576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610d33565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680611360575080546001600160401b03808416911610155b1561137d5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001600160a01b03828116600090815260056020526040902054163314611418576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0382811660008181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b61147a8261227b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806114f857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166114ec6000805160206134a78339815191525490565b6001600160a01b031614155b156115165760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611570575060408051601f3d908101601f1916820190925261156d91810190613432565b60015b61159d57604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206134a783398151915281146115ce57604051632a87526960e21b815260048101829052602401611594565b6000805160206134a78339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611699576000836001600160a01b031683604051611635919061344b565b600060405180830381855af49150503d8060008114611670576040519150601f19603f3d011682016040523d82523d6000602084013e611675565b606091505b5050905080611697576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116e95760405163703e46dd60e11b815260040160405180910390fd5b506000805160206134a783398151915290565b600060038381548110611711576117116131d6565b60009182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806117665760405163f4612fe560e01b815260040160405180910390fd5b600082600201848154811061177d5761177d6131d6565b90600052602060002090600302019050600081600001549050808260010160008282546117aa9190613256565b909155505060028201546001600160a01b03166117ec576040516001600160a01b0384169082156108fc029083906000818181858888f1935050505050611807565b6002820154611805906001600160a01b031684836122a9565b505b60028201546040805160018152600060208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b6003818154811061187e57600080fd5b6000918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b038481166000908152600560205260409020541661190b576001600160a01b038416600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b03848116600090815260056020526040902054163314611945576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b03841660008181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f4906119c59084906132c4565b60405180910390a25050505050565b6000546001600160a01b031633146119ff5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611a1a919061344b565b60006040518083038185875af1925050503d8060008114611a57576040519150601f19603f3d011682016040523d82523d6000602084013e611a5c565b606091505b5050905080611697576040516322092f2f60e11b815260040160405180910390fd5b6000546001600160a01b03163314611aa95760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611b285760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611be55760405163c383977560e01b815260040160405180910390fd5b60006002886001600160601b031681548110611c0357611c036131d6565b60009182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611c5890600683019084906129f9565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611c9c969594939291906133ff565b60405180910390a25050505050505050565b611cdb6040518060600160405280600081526020016000815260200160006001600160a01b031681525090565b60038381548110611cee57611cee6131d6565b90600052602060002090600302016002018281548110611d1057611d106131d6565b6000918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b6000611d6682612200565b341015611d8657604051630e3360f160e21b815260040160405180910390fd5b610dce8383600034612372565b60008060038381548110611da957611da96131d6565b600091825260208220600390910201805460028054929450916001600160601b03909116908110611ddc57611ddc6131d6565b90600052602060002090600b0201905080600401548260020160018460020180549050611e099190613202565b81548110611e1957611e196131d6565b906000526020600020906003020160000154611e35919061322b565b949350505050565b6000611e358261037f86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220092505050565b611e8c84826108bd565b341015611eac57604051633191f8f160e01b815260040160405180910390fd5b600060038581548110611ec157611ec16131d6565b6000918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611f17576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611f3257611f32612e65565b14611f50576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215612002576002816001600160601b031681548110611f7d57611f7d6131d6565b60009182526020909120600b909102015482546001600160601b03918216925016811461200257815460028301546001600160601b0390911690611fc390600190613202565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff191690556002830180549182018155600090815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b9160006040516120b49190613467565b60405180910390a26120c68787612467565b50505050505050565b6000546001600160a01b031633146120fa5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526004602052604081205460ff166121555760405163e51cf7bf60e01b815260040160405180910390fd5b612160858585611e3d565b82101561218057604051630e3360f160e21b815260040160405180910390fd5b6121956001600160a01b03841633308561280c565b6121b2576040516312171d8360e31b815260040160405180910390fd5b6121f68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506123729050565b9695505050505050565b600080600061220e846128e8565b5091509150806002836001600160601b031681548110612230576122306131d6565b90600052602060002090600b020160040154611e35919061323f565b600060038281548110612261576122616131d6565b600091825260209091206002600390920201015492915050565b6000546001600160a01b031633146122a65760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b17905251612306919061344b565b6000604051808303816000865af19150503d8060008114612343576040519150601f19603f3d011682016040523d82523d6000602084013e612348565b606091505b50915091508180156121f65750805115806121f65750808060200190518101906121f69190613475565b60008061237e856128e8565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d018054928301815560009081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a161790559094509192509061242f8489612467565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a3505050949350505050565b60006003838154811061247c5761247c6131d6565b906000526020600020906003020190506000600182600201805490506124a29190613202565b8254600160601b90046001600160a01b03166000908152600660205260408120919250815460ff1660038111156124db576124db612e65565b036124f95760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff16600381111561251157612511612e65565b14612805576003815460ff16600381111561252e5761252e612e65565b0361267d578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c90608401600060405180830381600087803b15801561260857600080fd5b505af115801561261c573d6000803e3d6000fd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea9150604401600060405180830381600087803b15801561266057600080fd5b505af1158015612674573d6000803e3d6000fd5b50505050612805565b6002815460ff16600381111561269557612695612e65565b03612805576000846126a8600143613202565b6040805191406020830152016040516020818303038152906040528051906020012060001c6126d79190613492565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c90608401600060405180830381600087803b15801561279157600080fd5b505af11580156127a5573d6000803e3d6000fd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea9150604401600060405180830381600087803b1580156127e957600080fd5b505af11580156127fd573d6000803e3d6000fd5b505050505050505b5050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251612871919061344b565b6000604051808303816000865af19150503d80600081146128ae576040519150601f19603f3d011682016040523d82523d6000602084013e6128b3565b606091505b50915091508180156128dd5750805115806128dd5750808060200190518101906128dd9190613475565b979650505050505050565b6000806000604084511061294e575050506020810151604082015160608301516001600160601b038316158061292957506002546001600160601b03841610155b1561293357600192505b8160000361294057600391505b80612949575060015b610dfa565b50600193600393508492509050565b828054828255906000526020600020908101928215612998579160200282015b8281111561299857825182559160200191906001019061297d565b506129a4929150612a26565b5090565b8260048101928215612998579160200282015b82811115612998578251829060ff169055916020019190600101906129bb565b60405180608001604052806004906020820280368337509192915050565b8260048101928215612998579160200282018281111561299857825182559160200191906001019061297d565b5b808211156129a45760008155600101612a27565b6001600160a01b03811681146122a657600080fd5b600060208284031215612a6257600080fd5b8135612a6d81612a3b565b9392505050565b80151581146122a657600080fd5b60008060408385031215612a9557600080fd5b823591506020830135612aa781612a74565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612ad957600080fd5b604051608081016001600160401b0381118282101715612afb57612afb612ab2565b604052806080840185811115612b1057600080fd5b845b81811015612b2a578035835260209283019201612b12565b509195945050505050565b600080600060c08486031215612b4a57600080fd5b8335612b5581612a3b565b92506020840135612b6581612a3b565b9150612b748560408601612ac8565b90509250925092565b60008060408385031215612b9057600080fd5b8235612b9b81612a3b565b946020939093013593505050565b600060208284031215612bbb57600080fd5b5035919050565b60008060008060808587031215612bd857600080fd5b84359350602085013592506040850135612bf181612a74565b91506060850135612c0181612a74565b939692955090935050565b80356001600160601b0381168114612c2357600080fd5b919050565b600060208284031215612c3a57600080fd5b610dce82612c0c565b8060005b6004811015611697578151845260209384019390910190600101612c47565b60808101610dd18284612c43565b6000806000806000806000610140888a031215612c9057600080fd5b612c9988612c0c565b96506020880135612ca981612a74565b955060408801359450606088013593506080880135925060a08801359150612cd48960c08a01612ac8565b905092959891949750929550565b60008060408385031215612cf557600080fd5b8235612d0081612a3b565b91506020830135612aa781612a3b565b600082601f830112612d2157600080fd5b81356001600160401b03811115612d3a57612d3a612ab2565b604051601f8201601f19908116603f011681016001600160401b0381118282101715612d6857612d68612ab2565b604052818152838201602001851015612d8057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612db057600080fd5b8235612dbb81612a3b565b915060208301356001600160401b03811115612dd657600080fd5b612de285828601612d10565b9150509250929050565b60005b83811015612e07578181015183820152602001612def565b50506000910152565b6020815260008251806020840152612e2f816040850160208701612dec565b601f01601f19169190910160400192915050565b60008060408385031215612e5657600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60058110612e8b57612e8b612e65565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612ebb6040830185612e7b565b821515606083015295945050505050565b60008060008060808587031215612ee257600080fd5b8435612eed81612a3b565b9350602085013592506040850135612bf181612a74565b600080600060608486031215612f1957600080fd5b8335612f2481612a3b565b92506020840135915060408401356001600160401b03811115612f4657600080fd5b612f5286828701612d10565b9150509250925092565b60008060408385031215612f6f57600080fd5b8235612f7a81612a3b565b91506020830135612aa781612a74565b600080600060608486031215612f9f57600080fd5b8335612faa81612a3b565b925060208401356001600160401b0381168114612fc657600080fd5b9150604084013560ff81168114612fdc57600080fd5b809150509250925092565b60008060408385031215612ffa57600080fd5b8235915060208301356001600160401b03811115612dd657600080fd5b60008083601f84011261302957600080fd5b5081356001600160401b0381111561304057600080fd5b60208301915083602082850101111561305857600080fd5b9250929050565b60008060006040848603121561307457600080fd5b83356001600160401b0381111561308a57600080fd5b61309686828701613017565b9094509250506020840135612fdc81612a3b565b600080600080608085870312156130c057600080fd5b843593506020850135925060408501356001600160401b038111156130e457600080fd5b6130f087828801612d10565b9250506060850135612c0181612a74565b60048110612e8b57612e8b612e65565b6080810161311f8287613101565b602082019490945291151560408301521515606090910152919050565b60008060008060006080868803121561315457600080fd5b8535945060208601356001600160401b0381111561317157600080fd5b61317d88828901613017565b909550935050604086013561319181612a3b565b949793965091946060013592915050565b6000602082840312156131b457600080fd5b81356001600160401b038111156131ca57600080fd5b611e3584828501612d10565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610dd157610dd16131ec565b634e487b7160e01b600052601260045260246000fd5b60008261323a5761323a613215565b500490565b8082028115828204841417610dd157610dd16131ec565b80820180821115610dd157610dd16131ec565b600061012082019050871515825286602083015285604083015284606083015283608083015260a082018360005b60048110156132b6578154835260209092019160019182019101613297565b505050979650505050505050565b60006080820190506132da8260ff855416613101565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b6001815b600184111561334457808504811115613328576133286131ec565b600184161561333657908102905b60019390931c92800261330d565b935093915050565b60008261335b57506001610dd1565b8161336857506000610dd1565b816001811461337e5760028114613388576133a4565b6001915050610dd1565b60ff841115613399576133996131ec565b50506001821b610dd1565b5060208310610133831016604e8410600b84101617156133c7575081810a610dd1565b6133d46000198484613309565b80600019048211156133e8576133e86131ec565b029392505050565b6000610dce60ff84168361334c565b60006101208201905087151582528660208301528560408301528460608301528360808301526128dd60a0830184612c43565b60006020828403121561344457600080fd5b5051919050565b6000825161345d818460208701612dec565b9190910192915050565b60208101610dd18284612e7b565b60006020828403121561348757600080fd5b8151612a6d81612a74565b6000826134a1576134a1613215565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122052b3e255d0667dd5efed0f8be242f6164addb8fe52dfaf92a532eb62e35b66f364736f6c634300081c0033", - "deployedBytecode": "0x60806040526004361061021f5760003560e01c80635601eaea1161012e578063d98493f6116100ab578063e6d49cdf1161006f578063e6d49cdf146107b0578063f6506db4146107f0578063f7434ea914610810578063fbf405b014610830578063fc6f8f161461085057600080fd5b8063d98493f6146106ee578063d9ee095f1461070e578063db8a173b14610721578063e2373ab314610736578063e4c0aaf41461079057600080fd5b806382d02237116100f257806382d022371461063057806386541b24146106505780638a9bb02a14610670578063c13517e1146106bb578063c71f4253146106ce57600080fd5b80635601eaea14610580578063564a565d146105a05780636736b70c146105d0578063751accd0146105f05780637934c0be1461061057600080fd5b80632177470c116101bc578063472abf6811610180578063472abf68146104e557806347cdcc1d146104fa5780634f1ef2861461051a57806352d1902d1461052d57806354fd4d501461054257600080fd5b80632177470c14610422578063379f0a17146104425780633cfd118414610478578063405d51ae146104a557806343818d66146104c557600080fd5b8062f5822c1461022457806301fcf74d146102465780630219da791461027957806305d3177d146102ec5780630c340a241461030c5780630e3993a4146103445780631860592b146103645780631c3db16d146103845780631f5a0dd2146103c1575b600080fd5b34801561023057600080fd5b5061024461023f366004612a50565b610870565b005b34801561025257600080fd5b50610266610261366004612a82565b6108bd565b6040519081526020015b60405180910390f35b34801561028557600080fd5b506102c4610294366004612a50565b60046020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff1690820152606001610270565b3480156102f857600080fd5b50610244610307366004612b35565b610a19565b34801561031857600080fd5b5060005461032c906001600160a01b031681565b6040516001600160a01b039091168152602001610270565b34801561035057600080fd5b5061024461035f366004612a50565b610c72565b34801561037057600080fd5b5061026661037f366004612b7d565b610d7d565b34801561039057600080fd5b506103a461039f366004612ba9565b610dd7565b604080519384529115156020840152151590820152606001610270565b3480156103cd57600080fd5b506103e16103dc366004612ba9565b610e01565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610270565b34801561042e57600080fd5b5061024461043d366004612bc2565b610e60565b34801561044e57600080fd5b5061032c61045d366004612a50565b6005602052600090815260409020546001600160a01b031681565b34801561048457600080fd5b50610498610493366004612c28565b611028565b6040516102709190612c66565b3480156104b157600080fd5b506102446104c0366004612c74565b611092565b3480156104d157600080fd5b506102446104e0366004612a50565b611252565b3480156104f157600080fd5b50610244611317565b34801561050657600080fd5b50610244610515366004612ce2565b6113de565b610244610528366004612d9d565b611471565b34801561053957600080fd5b5061026661169e565b34801561054e57600080fd5b50610573604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516102709190612e10565b34801561058c57600080fd5b5061024461059b366004612e43565b6116fc565b3480156105ac57600080fd5b506105c06105bb366004612ba9565b61186e565b6040516102709493929190612e8f565b3480156105dc57600080fd5b506102446105eb366004612ecc565b6118c3565b3480156105fc57600080fd5b5061024461060b366004612f04565b6119d4565b34801561061c57600080fd5b5061024461062b366004612f5c565b611a7e565b34801561063c57600080fd5b5061024461064b366004612f8a565b611afd565b34801561065c57600080fd5b5061024461066b366004612c74565b611bba565b34801561067c57600080fd5b5061069061068b366004612e43565b611cae565b604080518251815260208084015190820152918101516001600160a01b031690820152606001610270565b6102666106c9366004612fe7565b611d5b565b3480156106da57600080fd5b506102666106e9366004612ba9565b611d93565b3480156106fa57600080fd5b5061026661070936600461305f565b611e3d565b61024461071c3660046130aa565b611e82565b34801561072d57600080fd5b50600354610266565b34801561074257600080fd5b50610780610751366004612a50565b60066020526000908152604090208054600182015460029092015460ff91821692918181169161010090041684565b6040516102709493929190613111565b34801561079c57600080fd5b506102446107ab366004612a50565b6120cf565b3480156107bc57600080fd5b506103a46107cb366004612ba9565b6007602052600090815260409020805460019091015460ff8082169161010090041683565b3480156107fc57600080fd5b5061026661080b36600461313c565b61211c565b34801561081c57600080fd5b5061026661082b3660046131a2565b612200565b34801561083c57600080fd5b5060015461032c906001600160a01b031681565b34801561085c57600080fd5b5061026661086b366004612ba9565b61224c565b6000546001600160a01b0316331461089b5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600080600384815481106108d3576108d36131d6565b60009182526020822060026003909202019081018054919350906108f990600190613202565b81548110610909576109096131d6565b6000918252602082208454600280546003909402909201945090916001600160601b0390911690811061093e5761093e6131d6565b90600052602060002090600b02019050600081600401548360000154610964919061322b565b905085156109e75783546001600160601b03166000190161098e576001600160ff1b039450610a0f565b61099981600261323f565b6109a4906001613256565b82546002805490916001600160601b03169081106109c4576109c46131d6565b90600052602060002090600b0201600401546109e0919061323f565b9450610a0f565b6109f281600261323f565b6109fd906001613256565b8260040154610a0c919061323f565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610a62575080546001600160401b03808416911610155b15610a7f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610b38578160200160208202803683370190505b508051610b4f91600184019160209091019061295d565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184526000808252948101859052928301849052820192909252610bb5916006840191906129a8565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610c1b95600160601b90930460ff1694919390929060068b0190613269565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b0381811660009081526005602052604090205416610cba576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b03818116600090815260056020526040902054163314610cf4576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610d7191906132c4565b60405180910390a25050565b6001600160a01b03821660009081526004602052604081205461010081046001600160401b031690610dba90600160481b900460ff16600a6133f0565b610dc4908461323f565b610dce919061322b565b90505b92915050565b6000818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610e1157600080fd5b60009182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600060038581548110610e7557610e756131d6565b906000526020600020906003020190508060010160019054906101000a900460ff1615610eb55760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b03908116600090815260056020526040902054163314801590610ee85750333014155b15610f06576040516301627e2760e61b815260040160405180910390fd5b60408051606081018252858152841515602080830191825285151583850190815260008a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b6110306129db565b6002826001600160601b03168154811061104c5761104c6131d6565b6000918252602090912060408051608081019182905292600b029091016006019060049082845b8154815260200190600101908083116110735750505050509050919050565b6000546001600160a01b031633146110bd5760405163c383977560e01b815260040160405180910390fd5b6001600160601b0387166110e457604051631ef4f64960e01b815260040160405180910390fd5b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b16178155909160405190808252806020026020018201604052801561115d578160200160208202803683370190505b50805161117491600184019160209091019061295d565b50805460ff60601b1916600160601b8915150217815560028101879055600381018690556004808201869055600582018590556111b790600683019085906129f9565b506002896001600160601b0316815481106111d4576111d46131d6565b600091825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a7619061123f908c908c908c908c908c908c906133ff565b60405180910390a3505050505050505050565b6001600160a01b038181166000908152600560205260409020541661129a576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181166000908152600560205260409020541633146112d4576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610d33565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680611360575080546001600160401b03808416911610155b1561137d5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001600160a01b03828116600090815260056020526040902054163314611418576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0382811660008181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b61147a8261227b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806114f857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166114ec6000805160206134a78339815191525490565b6001600160a01b031614155b156115165760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611570575060408051601f3d908101601f1916820190925261156d91810190613432565b60015b61159d57604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206134a783398151915281146115ce57604051632a87526960e21b815260048101829052602401611594565b6000805160206134a78339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611699576000836001600160a01b031683604051611635919061344b565b600060405180830381855af49150503d8060008114611670576040519150601f19603f3d011682016040523d82523d6000602084013e611675565b606091505b5050905080611697576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116e95760405163703e46dd60e11b815260040160405180910390fd5b506000805160206134a783398151915290565b600060038381548110611711576117116131d6565b60009182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806117665760405163f4612fe560e01b815260040160405180910390fd5b600082600201848154811061177d5761177d6131d6565b90600052602060002090600302019050600081600001549050808260010160008282546117aa9190613256565b909155505060028201546001600160a01b03166117ec576040516001600160a01b0384169082156108fc029083906000818181858888f1935050505050611807565b6002820154611805906001600160a01b031684836122a9565b505b60028201546040805160018152600060208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b6003818154811061187e57600080fd5b6000918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b038481166000908152600560205260409020541661190b576001600160a01b038416600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b03848116600090815260056020526040902054163314611945576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b03841660008181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f4906119c59084906132c4565b60405180910390a25050505050565b6000546001600160a01b031633146119ff5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611a1a919061344b565b60006040518083038185875af1925050503d8060008114611a57576040519150601f19603f3d011682016040523d82523d6000602084013e611a5c565b606091505b5050905080611697576040516322092f2f60e11b815260040160405180910390fd5b6000546001600160a01b03163314611aa95760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611b285760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611be55760405163c383977560e01b815260040160405180910390fd5b60006002886001600160601b031681548110611c0357611c036131d6565b60009182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611c5890600683019084906129f9565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611c9c969594939291906133ff565b60405180910390a25050505050505050565b611cdb6040518060600160405280600081526020016000815260200160006001600160a01b031681525090565b60038381548110611cee57611cee6131d6565b90600052602060002090600302016002018281548110611d1057611d106131d6565b6000918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b6000611d6682612200565b341015611d8657604051630e3360f160e21b815260040160405180910390fd5b610dce8383600034612372565b60008060038381548110611da957611da96131d6565b600091825260208220600390910201805460028054929450916001600160601b03909116908110611ddc57611ddc6131d6565b90600052602060002090600b0201905080600401548260020160018460020180549050611e099190613202565b81548110611e1957611e196131d6565b906000526020600020906003020160000154611e35919061322b565b949350505050565b6000611e358261037f86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220092505050565b611e8c84826108bd565b341015611eac57604051633191f8f160e01b815260040160405180910390fd5b600060038581548110611ec157611ec16131d6565b6000918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611f17576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611f3257611f32612e65565b14611f50576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215612002576002816001600160601b031681548110611f7d57611f7d6131d6565b60009182526020909120600b909102015482546001600160601b03918216925016811461200257815460028301546001600160601b0390911690611fc390600190613202565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff191690556002830180549182018155600090815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b9160006040516120b49190613467565b60405180910390a26120c68787612467565b50505050505050565b6000546001600160a01b031633146120fa5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526004602052604081205460ff166121555760405163e51cf7bf60e01b815260040160405180910390fd5b612160858585611e3d565b82101561218057604051630e3360f160e21b815260040160405180910390fd5b6121956001600160a01b03841633308561280c565b6121b2576040516312171d8360e31b815260040160405180910390fd5b6121f68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506123729050565b9695505050505050565b600080600061220e846128e8565b5091509150806002836001600160601b031681548110612230576122306131d6565b90600052602060002090600b020160040154611e35919061323f565b600060038281548110612261576122616131d6565b600091825260209091206002600390920201015492915050565b6000546001600160a01b031633146122a65760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b17905251612306919061344b565b6000604051808303816000865af19150503d8060008114612343576040519150601f19603f3d011682016040523d82523d6000602084013e612348565b606091505b50915091508180156121f65750805115806121f65750808060200190518101906121f69190613475565b60008061237e856128e8565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d018054928301815560009081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a161790559094509192509061242f8489612467565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a3505050949350505050565b60006003838154811061247c5761247c6131d6565b906000526020600020906003020190506000600182600201805490506124a29190613202565b8254600160601b90046001600160a01b03166000908152600660205260408120919250815460ff1660038111156124db576124db612e65565b036124f95760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff16600381111561251157612511612e65565b14612805576003815460ff16600381111561252e5761252e612e65565b0361267d578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c90608401600060405180830381600087803b15801561260857600080fd5b505af115801561261c573d6000803e3d6000fd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea9150604401600060405180830381600087803b15801561266057600080fd5b505af1158015612674573d6000803e3d6000fd5b50505050612805565b6002815460ff16600381111561269557612695612e65565b03612805576000846126a8600143613202565b6040805191406020830152016040516020818303038152906040528051906020012060001c6126d79190613492565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c90608401600060405180830381600087803b15801561279157600080fd5b505af11580156127a5573d6000803e3d6000fd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea9150604401600060405180830381600087803b1580156127e957600080fd5b505af11580156127fd573d6000803e3d6000fd5b505050505050505b5050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251612871919061344b565b6000604051808303816000865af19150503d80600081146128ae576040519150601f19603f3d011682016040523d82523d6000602084013e6128b3565b606091505b50915091508180156128dd5750805115806128dd5750808060200190518101906128dd9190613475565b979650505050505050565b6000806000604084511061294e575050506020810151604082015160608301516001600160601b038316158061292957506002546001600160601b03841610155b1561293357600192505b8160000361294057600391505b80612949575060015b610dfa565b50600193600393508492509050565b828054828255906000526020600020908101928215612998579160200282015b8281111561299857825182559160200191906001019061297d565b506129a4929150612a26565b5090565b8260048101928215612998579160200282015b82811115612998578251829060ff169055916020019190600101906129bb565b60405180608001604052806004906020820280368337509192915050565b8260048101928215612998579160200282018281111561299857825182559160200191906001019061297d565b5b808211156129a45760008155600101612a27565b6001600160a01b03811681146122a657600080fd5b600060208284031215612a6257600080fd5b8135612a6d81612a3b565b9392505050565b80151581146122a657600080fd5b60008060408385031215612a9557600080fd5b823591506020830135612aa781612a74565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612ad957600080fd5b604051608081016001600160401b0381118282101715612afb57612afb612ab2565b604052806080840185811115612b1057600080fd5b845b81811015612b2a578035835260209283019201612b12565b509195945050505050565b600080600060c08486031215612b4a57600080fd5b8335612b5581612a3b565b92506020840135612b6581612a3b565b9150612b748560408601612ac8565b90509250925092565b60008060408385031215612b9057600080fd5b8235612b9b81612a3b565b946020939093013593505050565b600060208284031215612bbb57600080fd5b5035919050565b60008060008060808587031215612bd857600080fd5b84359350602085013592506040850135612bf181612a74565b91506060850135612c0181612a74565b939692955090935050565b80356001600160601b0381168114612c2357600080fd5b919050565b600060208284031215612c3a57600080fd5b610dce82612c0c565b8060005b6004811015611697578151845260209384019390910190600101612c47565b60808101610dd18284612c43565b6000806000806000806000610140888a031215612c9057600080fd5b612c9988612c0c565b96506020880135612ca981612a74565b955060408801359450606088013593506080880135925060a08801359150612cd48960c08a01612ac8565b905092959891949750929550565b60008060408385031215612cf557600080fd5b8235612d0081612a3b565b91506020830135612aa781612a3b565b600082601f830112612d2157600080fd5b81356001600160401b03811115612d3a57612d3a612ab2565b604051601f8201601f19908116603f011681016001600160401b0381118282101715612d6857612d68612ab2565b604052818152838201602001851015612d8057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612db057600080fd5b8235612dbb81612a3b565b915060208301356001600160401b03811115612dd657600080fd5b612de285828601612d10565b9150509250929050565b60005b83811015612e07578181015183820152602001612def565b50506000910152565b6020815260008251806020840152612e2f816040850160208701612dec565b601f01601f19169190910160400192915050565b60008060408385031215612e5657600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60058110612e8b57612e8b612e65565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612ebb6040830185612e7b565b821515606083015295945050505050565b60008060008060808587031215612ee257600080fd5b8435612eed81612a3b565b9350602085013592506040850135612bf181612a74565b600080600060608486031215612f1957600080fd5b8335612f2481612a3b565b92506020840135915060408401356001600160401b03811115612f4657600080fd5b612f5286828701612d10565b9150509250925092565b60008060408385031215612f6f57600080fd5b8235612f7a81612a3b565b91506020830135612aa781612a74565b600080600060608486031215612f9f57600080fd5b8335612faa81612a3b565b925060208401356001600160401b0381168114612fc657600080fd5b9150604084013560ff81168114612fdc57600080fd5b809150509250925092565b60008060408385031215612ffa57600080fd5b8235915060208301356001600160401b03811115612dd657600080fd5b60008083601f84011261302957600080fd5b5081356001600160401b0381111561304057600080fd5b60208301915083602082850101111561305857600080fd5b9250929050565b60008060006040848603121561307457600080fd5b83356001600160401b0381111561308a57600080fd5b61309686828701613017565b9094509250506020840135612fdc81612a3b565b600080600080608085870312156130c057600080fd5b843593506020850135925060408501356001600160401b038111156130e457600080fd5b6130f087828801612d10565b9250506060850135612c0181612a74565b60048110612e8b57612e8b612e65565b6080810161311f8287613101565b602082019490945291151560408301521515606090910152919050565b60008060008060006080868803121561315457600080fd5b8535945060208601356001600160401b0381111561317157600080fd5b61317d88828901613017565b909550935050604086013561319181612a3b565b949793965091946060013592915050565b6000602082840312156131b457600080fd5b81356001600160401b038111156131ca57600080fd5b611e3584828501612d10565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610dd157610dd16131ec565b634e487b7160e01b600052601260045260246000fd5b60008261323a5761323a613215565b500490565b8082028115828204841417610dd157610dd16131ec565b80820180821115610dd157610dd16131ec565b600061012082019050871515825286602083015285604083015284606083015283608083015260a082018360005b60048110156132b6578154835260209092019160019182019101613297565b505050979650505050505050565b60006080820190506132da8260ff855416613101565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b6001815b600184111561334457808504811115613328576133286131ec565b600184161561333657908102905b60019390931c92800261330d565b935093915050565b60008261335b57506001610dd1565b8161336857506000610dd1565b816001811461337e5760028114613388576133a4565b6001915050610dd1565b60ff841115613399576133996131ec565b50506001821b610dd1565b5060208310610133831016604e8410600b84101617156133c7575081810a610dd1565b6133d46000198484613309565b80600019048211156133e8576133e86131ec565b029392505050565b6000610dce60ff84168361334c565b60006101208201905087151582528660208301528560408301528460608301528360808301526128dd60a0830184612c43565b60006020828403121561344457600080fd5b5051919050565b6000825161345d818460208701612dec565b9190910192915050565b60208101610dd18284612e7b565b60006020828403121561348757600080fd5b8151612a6d81612a74565b6000826134a1576134a1613215565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122052b3e255d0667dd5efed0f8be242f6164addb8fe52dfaf92a532eb62e35b66f364736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "AcceptedFeeToken(address,bool)": { - "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", - "params": { - "_accepted": "Whether the token is accepted or not.", - "_token": "The ERC20 token." - } - }, - "DisputeCreation(uint256,address)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_arbitrable": "The contract which created the dispute.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "NewCurrencyRate(address,uint64,uint8)": { - "details": "To be emitted when the fee for a particular ERC20 token is updated.", - "params": { - "_feeToken": "The ERC20 token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrable": "The arbitrable receiving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "appeal(uint256,uint256,bytes,bool)": { - "details": "Appeals the ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute.", - "_jump": "Whether to jump to the parent court or not." - } - }, - "appealCost(uint256,bool)": { - "details": "Gets the cost of appealing a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute.", - "_jump": "Whether to jump to the parent court or not." - }, - "returns": { - "cost": "The appeal cost." - } - }, - "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." - }, - "returns": { - "cost": "The arbitration cost in ETH." - } - }, - "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeToken": "The ERC20 token used to pay fees." - }, - "returns": { - "cost": "The arbitration cost in `_feeToken`." - } - }, - "changeAcceptedFeeTokens(address,bool)": { - "details": "Changes the supported fee tokens.", - "params": { - "_accepted": "Whether the token is supported or not as a method of fee payment.", - "_feeToken": "The fee token." - } - }, - "changeCurrencyRates(address,uint64,uint8)": { - "details": "Changes the currency rate of a fee token.", - "params": { - "_feeToken": "The fee token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "changePinakion(address)": { - "details": "Changes the `pinakion` storage variable.", - "params": { - "_pinakion": "The new value for the `pinakion` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])": { - "details": "Creates a court under a specified parent court.", - "params": { - "_alpha": "The `alpha` property value of the court.", - "_feeForJuror": "The `feeForJuror` property value of the court.", - "_hiddenVotes": "The `hiddenVotes` property value of the court.", - "_jurorsForCourtJump": "The `jurorsForCourtJump` property value of the court.", - "_minStake": "The `minStake` property value of the court.", - "_parent": "The `parent` property value of the court.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the court." - } - }, - "createDispute(uint256,bytes)": { - "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "createDispute(uint256,bytes,address,uint256)": { - "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeAmount": "Amount of the ERC20 token used to pay fees.", - "_feeToken": "The ERC20 token used to pay fees.", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "execute(uint256,uint256)": { - "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.", - "params": { - "_disputeID": "The ID of the dispute.", - "_round": "The appeal round." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "executeRuling(uint256,uint256,bool,bool)": { - "details": "Executes a specified dispute's ruling.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getNumberOfVotes(uint256)": { - "details": "Gets the number of votes permitted for the specified dispute in the latest round.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "initialize(address,address,uint256[4])": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", - "_governor": "The governor's address.", - "_pinakion": "The address of the token contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "KlerosCoreRuler Core arbitrator contract for development and testing purposes.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 19622, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 19625, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "pinakion", - "offset": 0, - "slot": "1", - "type": "t_contract(IERC20)2923" - }, - { - "astId": 19629, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "courts", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Court)19573_storage)dyn_storage" - }, - { - "astId": 19633, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(Dispute)19588_storage)dyn_storage" - }, - { - "astId": 19639, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "currencyRates", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_contract(IERC20)2923,t_struct(CurrencyRate)19603_storage)" - }, - { - "astId": 19644, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rulers", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_contract(IArbitrableV2)25870,t_address)" - }, - { - "astId": 19650, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "settings", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_contract(IArbitrableV2)25870,t_struct(RulerSettings)19551_storage)" - }, - { - "astId": 19655, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rulingResults", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_struct(RulingResult)19610_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Court)19573_storage)dyn_storage": { - "base": "t_struct(Court)19573_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreRuler.Court[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Dispute)19588_storage)dyn_storage": { - "base": "t_struct(Dispute)19588_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreRuler.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)19596_storage)dyn_storage": { - "base": "t_struct(Round)19596_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreRuler.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)4_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[4]", - "numberOfBytes": "128" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IArbitrableV2)25870": { - "encoding": "inplace", - "label": "contract IArbitrableV2", - "numberOfBytes": "20" - }, - "t_contract(IERC20)2923": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_enum(Period)19541": { - "encoding": "inplace", - "label": "enum KlerosCoreRuler.Period", - "numberOfBytes": "1" - }, - "t_enum(RulingMode)19535": { - "encoding": "inplace", - "label": "enum KlerosCoreRuler.RulingMode", - "numberOfBytes": "1" - }, - "t_mapping(t_contract(IArbitrableV2)25870,t_address)": { - "encoding": "mapping", - "key": "t_contract(IArbitrableV2)25870", - "label": "mapping(contract IArbitrableV2 => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_mapping(t_contract(IArbitrableV2)25870,t_struct(RulerSettings)19551_storage)": { - "encoding": "mapping", - "key": "t_contract(IArbitrableV2)25870", - "label": "mapping(contract IArbitrableV2 => struct KlerosCoreRuler.RulerSettings)", - "numberOfBytes": "32", - "value": "t_struct(RulerSettings)19551_storage" - }, - "t_mapping(t_contract(IERC20)2923,t_struct(CurrencyRate)19603_storage)": { - "encoding": "mapping", - "key": "t_contract(IERC20)2923", - "label": "mapping(contract IERC20 => struct KlerosCoreRuler.CurrencyRate)", - "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)19603_storage" - }, - "t_mapping(t_uint256,t_struct(RulingResult)19610_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct KlerosCoreRuler.RulingResult)", - "numberOfBytes": "32", - "value": "t_struct(RulingResult)19610_storage" - }, - "t_struct(Court)19573_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.Court", - "members": [ - { - "astId": 19553, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "parent", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 19555, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "hiddenVotes", - "offset": 12, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 19558, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "children", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 19560, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "minStake", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 19562, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "alpha", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 19564, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "feeForJuror", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 19566, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "jurorsForCourtJump", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 19570, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "timesPerPeriod", - "offset": 0, - "slot": "6", - "type": "t_array(t_uint256)4_storage" - }, - { - "astId": 19572, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "disabled", - "offset": 0, - "slot": "10", - "type": "t_bool" - } - ], - "numberOfBytes": "352" - }, - "t_struct(CurrencyRate)19603_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.CurrencyRate", - "members": [ - { - "astId": 19598, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "feePaymentAccepted", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 19600, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rateInEth", - "offset": 1, - "slot": "0", - "type": "t_uint64" - }, - { - "astId": 19602, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rateDecimals", - "offset": 9, - "slot": "0", - "type": "t_uint8" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Dispute)19588_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.Dispute", - "members": [ - { - "astId": 19575, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "courtID", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 19578, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "arbitrated", - "offset": 12, - "slot": "0", - "type": "t_contract(IArbitrableV2)25870" - }, - { - "astId": 19581, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "period", - "offset": 0, - "slot": "1", - "type": "t_enum(Period)19541" - }, - { - "astId": 19583, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "ruled", - "offset": 1, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 19587, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rounds", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Round)19596_storage)dyn_storage" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Round)19596_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.Round", - "members": [ - { - "astId": 19590, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "totalFeesForJurors", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 19592, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "sumFeeRewardPaid", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 19595, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "feeToken", - "offset": 0, - "slot": "2", - "type": "t_contract(IERC20)2923" - } - ], - "numberOfBytes": "96" - }, - "t_struct(RulerSettings)19551_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.RulerSettings", - "members": [ - { - "astId": 19544, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rulingMode", - "offset": 0, - "slot": "0", - "type": "t_enum(RulingMode)19535" - }, - { - "astId": 19546, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "presetRuling", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 19548, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "presetTied", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 19550, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "presetOverridden", - "offset": 1, - "slot": "2", - "type": "t_bool" - } - ], - "numberOfBytes": "96" - }, - "t_struct(RulingResult)19610_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.RulingResult", - "members": [ - { - "astId": 19605, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "ruling", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 19607, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "tied", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 19609, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "overridden", - "offset": 1, - "slot": "1", - "type": "t_bool" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint64": { - "encoding": "inplace", - "label": "uint64", - "numberOfBytes": "8" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json deleted file mode 100644 index f9ca5bfe4..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "address": "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xc503704bbd721158002b2f03148150f54a934741b23574787474588322d1d5f8", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - "transactionIndex": 1, - "gasUsed": "310077", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000100004000000000000000000000000000040008000000000000000000000000020000000000000080000800000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000000000000000000000000000000000000000000000000000000042000000", - "blockHash": "0xaa9f9cf50b84c74628f2df98dc1e1c090427a181fafc9d1b6b8f5ff17f49e475", - "transactionHash": "0xc503704bbd721158002b2f03148150f54a934741b23574787474588322d1d5f8", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 175286718, - "transactionHash": "0xc503704bbd721158002b2f03148150f54a934741b23574787474588322d1d5f8", - "address": "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - "topics": [ - "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 0, - "blockHash": "0xaa9f9cf50b84c74628f2df98dc1e1c090427a181fafc9d1b6b8f5ff17f49e475" - }, - { - "transactionIndex": 1, - "blockNumber": 175286718, - "transactionHash": "0xc503704bbd721158002b2f03148150f54a934741b23574787474588322d1d5f8", - "address": "0x0630e4248a17b506809009F5D88E2f5bEE584c83", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0xaa9f9cf50b84c74628f2df98dc1e1c090427a181fafc9d1b6b8f5ff17f49e475" - } - ], - "blockNumber": 175286718, - "cumulativeGasUsed": "310077", - "status": 1, - "byzantium": true - }, - "args": [ - "0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF", - "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreRulerProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204d82e24ac13242090d48f2411d7306e8cf3dde46882ce606cf3b6aafa5d3ba9c64736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204d82e24ac13242090d48f2411d7306e8cf3dde46882ce606cf3b6aafa5d3ba9c64736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json deleted file mode 100644 index b3e194c89..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "address": "0xF924ac62b20901914c101Fa089Da1FB6A0585138", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IKlerosCore", - "name": "_core", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IKlerosCore", - "name": "_core", - "type": "address" - } - ], - "name": "changeCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract IKlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "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" - } - ], - "transactionHash": "0x933145bec723111451822338b8f0c3aaeba3bd4ae1ab8121edf9fed48baf5f15", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xF924ac62b20901914c101Fa089Da1FB6A0585138", - "transactionIndex": 2, - "gasUsed": "346625", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xab7b999c40e22ebbbf75ff84c17d2b25cd49aec5052ada838272e1a902b49a64", - "transactionHash": "0x933145bec723111451822338b8f0c3aaeba3bd4ae1ab8121edf9fed48baf5f15", - "logs": [], - "blockNumber": 175286161, - "cumulativeGasUsed": "784743", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"balanceOf(address)\":{\"details\":\"Returns the amount of PNK staked in KlerosV2 for a particular address. Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\",\"params\":{\"_account\":\"The address to query.\"},\"returns\":{\"totalStaked\":\"Total amount staked in V2 by the address.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_core\":\"KlerosCore to read the balance from.\",\"_governor\":\"The governor of the contract.\"}}},\"title\":\"KlerosCoreSnapshotProxy Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":\"KlerosCoreSnapshotProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface IKlerosCore {\\n function sortitionModule() external view returns (ISortitionModule);\\n}\\n\\n/// @title KlerosCoreSnapshotProxy\\n/// Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\\ncontract KlerosCoreSnapshotProxy {\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n IKlerosCore public core;\\n address public governor;\\n string public constant name = \\\"Staked Pinakion\\\";\\n string public constant symbol = \\\"stPNK\\\";\\n uint8 public constant decimals = 18;\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _governor The governor of the contract.\\n /// @param _core KlerosCore to read the balance from.\\n constructor(address _governor, IKlerosCore _core) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(IKlerosCore _core) external onlyByGovernor {\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Returns the amount of PNK staked in KlerosV2 for a particular address.\\n /// Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\\n /// @param _account The address to query.\\n /// @return totalStaked Total amount staked in V2 by the address.\\n function balanceOf(address _account) external view returns (uint256 totalStaked) {\\n (totalStaked, , , ) = core.sortitionModule().getJurorBalance(_account, 0);\\n }\\n}\\n\",\"keccak256\":\"0xf1001476b56a022a55a3ed5a5388fbbf88450527a1fd342276ccbc3749ea6497\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6080604052348015600f57600080fd5b50604051610528380380610528833981016040819052602c916073565b600180546001600160a01b039384166001600160a01b0319918216179091556000805492909316911617905560a8565b6001600160a01b0381168114607057600080fd5b50565b60008060408385031215608557600080fd5b8251608e81605c565b6020840151909250609d81605c565b809150509250929050565b610471806100b76000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610382565b610186565b6040519081526020016100b8565b61013a610135366004610382565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610382565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a6565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c3565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103f9565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103f9565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b602081526000825180602084015260005b8181101561034a576020818601810151604086840101520161032d565b506000604082850101526040601f19601f83011684010191505092915050565b6001600160a01b038116811461037f57600080fd5b50565b60006020828403121561039457600080fd5b813561039f8161036a565b9392505050565b6000602082840312156103b857600080fd5b815161039f8161036a565b600080600080608085870312156103d957600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea264697066735822122073f21c8b6d33447b7835b4d1b407d310308303081d207c1d27192909f7cbaf6264736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610382565b610186565b6040519081526020016100b8565b61013a610135366004610382565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610382565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a6565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c3565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103f9565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103f9565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b602081526000825180602084015260005b8181101561034a576020818601810151604086840101520161032d565b506000604082850101526040601f19601f83011684010191505092915050565b6001600160a01b038116811461037f57600080fd5b50565b60006020828403121561039457600080fd5b813561039f8161036a565b9392505050565b6000602082840312156103b857600080fd5b815161039f8161036a565b600080600080608085870312156103d957600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea264697066735822122073f21c8b6d33447b7835b4d1b407d310308303081d207c1d27192909f7cbaf6264736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": { - "balanceOf(address)": { - "details": "Returns the amount of PNK staked in KlerosV2 for a particular address. Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.", - "params": { - "_account": "The address to query." - }, - "returns": { - "totalStaked": "Total amount staked in V2 by the address." - } - }, - "changeCore(address)": { - "details": "Changes the `core` storage variable.", - "params": { - "_core": "The new value for the `core` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_core": "KlerosCore to read the balance from.", - "_governor": "The governor of the contract." - } - } - }, - "title": "KlerosCoreSnapshotProxy Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 30835, - "contract": "src/arbitration/view/KlerosCoreSnapshotProxy.sol:KlerosCoreSnapshotProxy", - "label": "core", - "offset": 0, - "slot": "0", - "type": "t_contract(IKlerosCore)30831" - }, - { - "astId": 30837, - "contract": "src/arbitration/view/KlerosCoreSnapshotProxy.sol:KlerosCoreSnapshotProxy", - "label": "governor", - "offset": 0, - "slot": "1", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_contract(IKlerosCore)30831": { - "encoding": "inplace", - "label": "contract IKlerosCore", - "numberOfBytes": "20" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json deleted file mode 100644 index b6b4080c4..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json +++ /dev/null @@ -1,1948 +0,0 @@ -{ - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AllJurorsDrawn", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "AppealPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "ArraysLengthMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "CannotDisableClassicDK", - "type": "error" - }, - { - "inputs": [], - "name": "CommitPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "DepthLevelMax", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitNotSupportedByCourt", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitOnly", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "DisputePeriodIsFinal", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeStillDrawing", - "type": "error" - }, - { - "inputs": [], - "name": "EvidenceNotPassedAndNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDisputKitParent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "MinStakeLowerThanParentCourt", - "type": "error" - }, - { - "inputs": [], - "name": "MustSupportDisputeKitClassic", - "type": "error" - }, - { - "inputs": [], - "name": "NoJurorDrawn", - "type": "error" - }, - { - "inputs": [], - "name": "NotEvidencePeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotExecutionPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "SortitionModuleOnly", - "type": "error" - }, - { - "inputs": [], - "name": "StakingInTooManyCourts", - "type": "error" - }, - { - "inputs": [], - "name": "StakingLessThanCourtMinStake", - "type": "error" - }, - { - "inputs": [], - "name": "StakingNotPossibeInThisCourt", - "type": "error" - }, - { - "inputs": [], - "name": "StakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnstakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "inputs": [], - "name": "UnsupportedDisputeKit", - "type": "error" - }, - { - "inputs": [], - "name": "VotePeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "WrongDisputeKitIndex", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "DisputeKitCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "DisputeKitEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_fromDisputeKitID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toDisputeKitID", - "type": "uint256" - } - ], - "name": "DisputeKitJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreUniversity.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "addNewDisputeKit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_instructor", - "type": "address" - } - ], - "name": "changeInstructor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - } - ], - "name": "changeJurorProsecutionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ISortitionModuleUniversity", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeKits", - "outputs": [ - { - "internalType": "contract IDisputeKit", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreUniversity.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "draw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256[]", - "name": "_disputeKitIDs", - "type": "uint256[]" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "enableDisputeKits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getDisputeKitsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "disputeKitID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkAtStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "repartitions", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkPenalties", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "drawnJurors", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumPnkRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "drawIterations", - "type": "uint256" - } - ], - "internalType": "struct KlerosCoreUniversity.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_instructor", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "_disputeKit", - "type": "address" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "contract ISortitionModuleUniversity", - "name": "_sortitionModuleAddress", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "instructor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "isDisputeKitJumping", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - } - ], - "name": "isSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorProsecutionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "passPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_alreadyTransferred", - "type": "bool" - } - ], - "name": "setStakeBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "contract ISortitionModuleUniversity", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "transactionIndex": 1, - "gasUsed": "484460", - "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000080000000000000040000000000000000000000000000020000000000000010200800402000000000000008000000000000008000000000000000000800000000000000000000000080000000000000000000000000000000800008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000008000000000200000000000000000000", - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8", - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000d6e96b7c993763b5cdda1139c7387b82a7c8b8b5" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" - }, - { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 1, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" - }, - { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" - }, - { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" - } - ], - "blockNumber": 96308609, - "cumulativeGasUsed": "484460", - "status": 1, - "byzantium": true - }, - "args": [ - "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - "0xe399d29b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa2250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d6e96b7c993763b5cdda1139c7387b82a7c8b8b5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000004b2c2d048921f694cce3aea35698c6b1f5fcbb79" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreUniversityProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220025ed3e852b24305c0ac2e202b83cf5fed6ae313e772bad4b0c1340efea75f0764736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220025ed3e852b24305c0ac2e202b83cf5fed6ae313e772bad4b0c1340efea75f0764736f6c63430008180033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x34B944D42cAcfC8266955D07A80181D2054aa225", - "0x0000000000000000000000000000000000000000", - "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - false, - [ - "200000000000000000000", - 10000, - "100000000000000000", - 256 - ], - [ - 0, - 0, - 0, - 10 - ], - "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79" - ] - }, - "implementation": "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Implementation.json deleted file mode 100644 index c8261658d..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Implementation.json +++ /dev/null @@ -1,2645 +0,0 @@ -{ - "address": "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AllJurorsDrawn", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "AppealPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "ArraysLengthMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "CannotDisableClassicDK", - "type": "error" - }, - { - "inputs": [], - "name": "CommitPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "DepthLevelMax", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitNotSupportedByCourt", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitOnly", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "DisputePeriodIsFinal", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeStillDrawing", - "type": "error" - }, - { - "inputs": [], - "name": "EvidenceNotPassedAndNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDisputKitParent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "MinStakeLowerThanParentCourt", - "type": "error" - }, - { - "inputs": [], - "name": "MustSupportDisputeKitClassic", - "type": "error" - }, - { - "inputs": [], - "name": "NoJurorDrawn", - "type": "error" - }, - { - "inputs": [], - "name": "NotEvidencePeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotExecutionPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "SortitionModuleOnly", - "type": "error" - }, - { - "inputs": [], - "name": "StakingInTooManyCourts", - "type": "error" - }, - { - "inputs": [], - "name": "StakingLessThanCourtMinStake", - "type": "error" - }, - { - "inputs": [], - "name": "StakingNotPossibeInThisCourt", - "type": "error" - }, - { - "inputs": [], - "name": "StakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnstakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "inputs": [], - "name": "UnsupportedDisputeKit", - "type": "error" - }, - { - "inputs": [], - "name": "VotePeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "WrongDisputeKitIndex", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "DisputeKitCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "DisputeKitEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_fromDisputeKitID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toDisputeKitID", - "type": "uint256" - } - ], - "name": "DisputeKitJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreUniversity.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "addNewDisputeKit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_instructor", - "type": "address" - } - ], - "name": "changeInstructor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - } - ], - "name": "changeJurorProsecutionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ISortitionModuleUniversity", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeKits", - "outputs": [ - { - "internalType": "contract IDisputeKit", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreUniversity.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "draw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256[]", - "name": "_disputeKitIDs", - "type": "uint256[]" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "enableDisputeKits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getDisputeKitsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "disputeKitID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkAtStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "repartitions", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkPenalties", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "drawnJurors", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumPnkRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "drawIterations", - "type": "uint256" - } - ], - "internalType": "struct KlerosCoreUniversity.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_instructor", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "_disputeKit", - "type": "address" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "contract ISortitionModuleUniversity", - "name": "_sortitionModuleAddress", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "instructor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "isDisputeKitJumping", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - } - ], - "name": "isSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorProsecutionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "passPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_alreadyTransferred", - "type": "bool" - } - ], - "name": "setStakeBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "contract ISortitionModuleUniversity", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0xf99e544be3b28ba3d5d7dc89481e4698807522d7dd1d431faf2305c6cbb9265f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - "transactionIndex": 2, - "gasUsed": "5019437", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000008000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x02db98181f92e8759b1936b6812ee2468550ddd547787f25f966d5f49f589fc4", - "transactionHash": "0xf99e544be3b28ba3d5d7dc89481e4698807522d7dd1d431faf2305c6cbb9265f", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 96308594, - "transactionHash": "0xf99e544be3b28ba3d5d7dc89481e4698807522d7dd1d431faf2305c6cbb9265f", - "address": "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 1, - "blockHash": "0x02db98181f92e8759b1936b6812ee2468550ddd547787f25f966d5f49f589fc4" - } - ], - "blockNumber": 96308594, - "cumulativeGasUsed": "5609813", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AllJurorsDrawn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArraysLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotDisableClassicDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DepthLevelMax\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitNotSupportedByCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputePeriodIsFinal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeStillDrawing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EvidenceNotPassedAndNotAppeal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOrInstructorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InstructorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoJurorDrawn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingInTooManyCourts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingLessThanCourtMinStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingNotPossibeInThisCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnstakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedDisputeKit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotePeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreUniversity.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_instructor\",\"type\":\"address\"}],\"name\":\"changeInstructor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModuleUniversity\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreUniversity.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"draw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreUniversity.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_instructor\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"contract ISortitionModuleUniversity\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"instructor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModuleUniversity\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeInstructor(address)\":{\"details\":\"Changes the `instructor` storage variable.\",\"params\":{\"_instructor\":\"The new value for the `instructor` storage variable.\"}},\"changeJurorProsecutionModule(address)\":{\"details\":\"Changes the `jurorProsecutionModule` storage variable.\",\"params\":{\"_jurorProsecutionModule\":\"The new value for the `jurorProsecutionModule` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"changeSortitionModule(address)\":{\"details\":\"Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.\",\"params\":{\"_sortitionModule\":\"The new value for the `sortitionModule` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])\":{\"details\":\"Creates a court under a specified parent court.\",\"params\":{\"_alpha\":\"The `alpha` property value of the court.\",\"_feeForJuror\":\"The `feeForJuror` property value of the court.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the court.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the court.\",\"_minStake\":\"The `minStake` property value of the court.\",\"_parent\":\"The `parent` property value of the court.\",\"_supportedDisputeKits\":\"Indexes of dispute kits that this court will support.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the court.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,address)\":{\"details\":\"Draws one juror for the dispute until the number votes paid for is reached.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_juror\":\"The address of the juror to draw.\"}},\"enableDisputeKits(uint96,uint256[],bool)\":{\"details\":\"Adds/removes court's support for specified dispute kits.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_disputeKitIDs\":\"The IDs of dispute kits which support should be added/removed.\",\"_enable\":\"Whether add or remove the dispute kits from the court.\"}},\"execute(uint256,uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\",\"_round\":\"The appeal round.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"executeRuling(uint256)\":{\"details\":\"Executes a specified dispute's ruling.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getNumberOfVotes(uint256)\":{\"details\":\"Gets the number of votes permitted for the specified dispute in the latest round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getTimesPerPeriod(uint96)\":{\"details\":\"Gets the timesPerPeriod array for a given court.\",\"params\":{\"_courtID\":\"The ID of the court to get the times from.\"},\"returns\":{\"timesPerPeriod\":\"The timesPerPeriod array for the given court.\"}},\"initialize(address,address,address,address,address,bool,uint256[4],uint256[4],address)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_disputeKit\":\"The address of the default dispute kit.\",\"_governor\":\"The governor's address.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_instructor\":\"The address of the instructor.\",\"_jurorProsecutionModule\":\"The address of the juror prosecution module.\",\"_pinakion\":\"The address of the token contract.\",\"_sortitionModuleAddress\":\"The sortition module responsible for sortition of the jurors.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the general court.\"}},\"isDisputeKitJumping(uint256)\":{\"details\":\"Returns true if the dispute kit will be switched to a parent DK.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"Whether DK will be switched or not.\"}},\"passPeriod(uint256)\":{\"details\":\"Passes the period of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setStake(uint96,uint256)\":{\"details\":\"Sets the caller's stake in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake. Note that the existing delayed stake will be nullified as non-relevant.\"}},\"setStakeBySortitionModule(address,uint96,uint256,bool)\":{\"details\":\"Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\",\"params\":{\"_account\":\"The account whose stake is being set.\",\"_alreadyTransferred\":\"Whether the PNKs have already been transferred to the contract.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"title\":\"KlerosCoreUniversity Core arbitrator contract for educational purposes.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/university/KlerosCoreUniversity.sol\":\"KlerosCoreUniversity\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xb9590d05f9df08dd0ed027b2eb40c7b1885b7574a121b1b0b7da0920429bb4d5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/arbitration/university/ISortitionModuleUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface ISortitionModuleUniversity is ISortitionModule {\\n function setTransientJuror(address _juror) external;\\n}\\n\",\"keccak256\":\"0x57fee0787ae90af01c57a7d2850f8e4ade1ca72163a388341cac017bfdbf163a\",\"license\":\"MIT\"},\"src/arbitration/university/KlerosCoreUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"../interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModuleUniversity} from \\\"./ISortitionModuleUniversity.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title KlerosCoreUniversity\\n/// Core arbitrator contract for educational purposes.\\ncontract KlerosCoreUniversity is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public instructor; // The instructor who is allowed to choose the jurors.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModuleUniversity public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByInstructor() {\\n if (instructor != msg.sender) revert InstructorOnly();\\n _;\\n }\\n\\n modifier onlyByGovernorOrInstructor() {\\n if (msg.sender != governor && msg.sender != instructor) revert GovernorOrInstructorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _instructor The address of the instructor.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _governor,\\n address _instructor,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n ISortitionModuleUniversity _sortitionModuleAddress\\n ) external reinitializer(1) {\\n governor = _governor;\\n instructor = _instructor;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n new uint256[](0)\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `instructor` storage variable.\\n /// @param _instructor The new value for the `instructor` storage variable.\\n function changeInstructor(address _instructor) external onlyByGovernorOrInstructor {\\n instructor = _instructor;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModuleUniversity _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws one juror for the dispute until the number votes paid for is reached.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _juror The address of the juror to draw.\\n function draw(uint256 _disputeID, address _juror) external onlyByGovernorOrInstructor {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n if (round.drawnJurors.length >= round.nbVotes) revert AllJurorsDrawn();\\n\\n sortitionModule.setTransientJuror(_juror);\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n uint256 iteration = round.drawIterations + 1;\\n address drawnAddress = disputeKit.draw(_disputeID, iteration);\\n if (drawnAddress == address(0)) {\\n revert NoJurorDrawn();\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n round.drawIterations = iteration;\\n }\\n sortitionModule.setTransientJuror(address(0));\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n _params.pnkPenaltiesInRound += penalty;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n sortitionModule.penalizeStake(account, penalty);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(penalty),\\n 0,\\n round.feeToken\\n );\\n\\n if (!disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive, unstake them.\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Give back the locked PNKs in case the juror fully unstaked earlier.\\n if (!sortitionModule.isJurorStaked(account)) {\\n pinakion.safeTransfer(account, pnkLocked);\\n }\\n\\n // Transfer the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs were already transferred to/from the staking contract.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (stakingResult != StakingResult.Successful) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibeInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error InstructorOnly();\\n error GovernorOrInstructorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error DepthLevelMax();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error ArraysLengthMismatch();\\n error StakingInTooManyCourts();\\n error StakingNotPossibeInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error AllJurorsDrawn();\\n error NoJurorDrawn();\\n}\\n\",\"keccak256\":\"0xd636c2294d15110a20dcf97d67f2989e14233cd1de353032807ad44a8e828e49\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked\\n}\\n\",\"keccak256\":\"0x486016fb74cc91439c2ec918e97a79190ab4eed223987d516986fff8eaeecfbf\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161566962000103600039600081816115e10152818161160a015261180101526156696000f3fe60806040526004361061027c5760003560e01c80638a9bb02a1161014f578063d07368bd116100c1578063f6506db41161007a578063f6506db414610867578063f7434ea914610887578063fbb519e7146108a7578063fbf405b0146108c7578063fc6f8f16146108e7578063fe524c391461090757600080fd5b8063d07368bd146107b2578063d4d1d76a146107d2578063d874514b146107e7578063d98493f614610807578063e399d29b14610827578063e4c0aaf41461084757600080fd5b8063b702a87911610113578063b702a8791461070c578063c13517e11461072c578063c258bb191461073f578063c35699021461075f578063c71f425314610772578063cf0c38f81461079257600080fd5b80638a9bb02a1461064a5780638bb0487514610677578063acdbf51d14610697578063afe15cfb146106b7578063b0049637146106ec57600080fd5b80632e1daf2f116101f357806371ae413d116101ac57806371ae413d1461058a578063751accd0146105aa5780637717a6e8146105ca5780637934c0be146105ea57806382d022371461060a57806386541b241461062a57600080fd5b80632e1daf2f146104c45780633cfd1184146104e45780634f1ef2861461051157806352d1902d14610524578063564a565d1461053957806359ec827e1461056a57600080fd5b8063115d537611610245578063115d5376146103885780631860592b146103a857806319b81529146103d65780631c3db16d146104065780631f5a0dd2146104435780632d29a47b146104a457600080fd5b8062f5822c146102815780630219da79146102a357806309cfdc9c1461031b5780630b7414bc1461033b5780630c340a241461035b575b600080fd5b34801561028d57600080fd5b506102a161029c366004614846565b610927565b005b3480156102af57600080fd5b506102ee6102be366004614846565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561032757600080fd5b506102a1610336366004614846565b610974565b34801561034757600080fd5b506102a161035636600461494e565b6109da565b34801561036757600080fd5b5060005461037b906001600160a01b031681565b60405161031291906149af565b34801561039457600080fd5b506102a16103a33660046149c3565b610b11565b3480156103b457600080fd5b506103c86103c33660046149dc565b611048565b604051908152602001610312565b3480156103e257600080fd5b506103f66103f13660046149c3565b6110a2565b6040519015158152602001610312565b34801561041257600080fd5b506104266104213660046149c3565b61119b565b604080519384529115156020840152151590820152606001610312565b34801561044f57600080fd5b5061046361045e3660046149c3565b61129c565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610312565b3480156104b057600080fd5b506102a16104bf366004614a08565b6112fb565b3480156104d057600080fd5b5060045461037b906001600160a01b031681565b3480156104f057600080fd5b506105046104ff366004614a34565b611563565b6040516103129190614a72565b6102a161051f366004614aef565b6115cd565b34801561053057600080fd5b506103c86117f4565b34801561054557600080fd5b506105596105543660046149c3565b611852565b604051610312959493929190614b76565b34801561057657600080fd5b506103c86105853660046149c3565b6118ae565b34801561059657600080fd5b5060015461037b906001600160a01b031681565b3480156105b657600080fd5b506102a16105c5366004614bb5565b611a03565b3480156105d657600080fd5b506102a16105e5366004614c0d565b611aad565b3480156105f657600080fd5b506102a1610605366004614c29565b611abb565b34801561061657600080fd5b506102a1610625366004614c62565b611b3a565b34801561063657600080fd5b506102a1610645366004614d21565b611bf7565b34801561065657600080fd5b5061066a610665366004614d8f565b611dd4565b6040516103129190614df6565b34801561068357600080fd5b506102a16106923660046149c3565b611f60565b3480156106a357600080fd5b5061037b6106b23660046149c3565b6120c4565b3480156106c357600080fd5b506106d76106d23660046149c3565b6120ee565b60408051928352602083019190915201610312565b3480156106f857600080fd5b506102a1610707366004614846565b61219a565b34801561071857600080fd5b506102a1610727366004614e9b565b6121e7565b6103c861073a366004614ec0565b6125fa565b34801561074b57600080fd5b506102a161075a366004614846565b612632565b6102a161076d366004614ef0565b61267f565b34801561077e57600080fd5b506103c861078d3660046149c3565b612b53565b34801561079e57600080fd5b5060035461037b906001600160a01b031681565b3480156107be57600080fd5b506102a16107cd366004614846565b612bbb565b3480156107de57600080fd5b506006546103c8565b3480156107f357600080fd5b506102a1610802366004614f29565b612c64565b34801561081357600080fd5b506103c861082236600461500a565b612f62565b34801561083357600080fd5b506102a1610842366004615055565b612faf565b34801561085357600080fd5b506102a1610862366004614846565b61329f565b34801561087357600080fd5b506103c8610882366004615110565b6132ec565b34801561089357600080fd5b506103c86108a2366004615176565b6133d2565b3480156108b357600080fd5b506102a16108c23660046151aa565b61341e565b3480156108d357600080fd5b5060025461037b906001600160a01b031681565b3480156108f357600080fd5b506103c86109023660046149c3565b61345e565b34801561091357600080fd5b506103f6610922366004614c0d565b61348d565b6000546001600160a01b031633146109525760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480159061099a57506001546001600160a01b03163314155b156109b857604051633244d29960e21b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a055760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0b578115610aa457828181518110610a2957610a296151fb565b602002602001015160001480610a5c57506006548351849083908110610a5157610a516151fb565b602002602001015110155b15610a7a57604051633d58a98960e11b815260040160405180910390fd5b610a9f84848381518110610a9057610a906151fb565b602002602001015160016134d5565b610b03565b6001838281518110610ab857610ab86151fb565b602002602001015103610ade576040516356d111fd60e11b815260040160405180910390fd5b610b0384848381518110610af457610af46151fb565b602002602001015160006134d5565b600101610a08565b50505050565b600060078281548110610b2657610b266151fb565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610b5957610b596151fb565b6000918252602082206003850154600c909202019250610b7b90600190615227565b90506000836003018281548110610b9457610b946151fb565b600091825260208220600b909102019150600185015460ff166004811115610bbe57610bbe614b3e565b03610c995781158015610c0d57506001840154600684019060ff166004811115610bea57610bea614b3e565b60048110610bfa57610bfa6151fb565b01546002850154610c0b9042615227565b105b15610c2b57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610c53576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610c6a576002610c6d565b60015b60018086018054909160ff1990911690836004811115610c8f57610c8f614b3e565b0217905550610ffa565b60018085015460ff166004811115610cb357610cb3614b3e565b03610dc3576001840154600684019060ff166004811115610cd657610cd6614b3e565b60048110610ce657610ce66151fb565b01546002850154610cf79042615227565b108015610d8e57506006816000015481548110610d1657610d166151fb565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610d68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8c919061523a565b155b15610dac57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610c8f565b6002600185015460ff166004811115610dde57610dde614b3e565b03610f2c576001840154600684019060ff166004811115610e0157610e01614b3e565b60048110610e1157610e116151fb565b01546002850154610e229042615227565b108015610eb957506006816000015481548110610e4157610e416151fb565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb7919061523a565b155b15610ed757604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3610ffa565b6003600185015460ff166004811115610f4757610f47614b3e565b03610fc1576001840154600684019060ff166004811115610f6a57610f6a614b3e565b60048110610f7a57610f7a6151fb565b01546002850154610f8b9042615227565b1015610faa57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610c8f565b6004600185015460ff166004811115610fdc57610fdc614b3e565b03610ffa576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110399160ff1690615257565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061108590600160481b900460ff16600a615349565b61108f9084615358565b6110999190615385565b90505b92915050565b600080600783815481106110b8576110b86151fb565b60009182526020822060036004909202019081018054919350906110de90600190615227565b815481106110ee576110ee6151fb565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611123576111236151fb565b90600052602060002090600c0201905080600501548260030154101561114e57506000949350505050565b80546005805490916001600160601b031690811061116e5761116e6151fb565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b600080600080600785815481106111b4576111b46151fb565b60009182526020822060036004909202019081018054919350906111da90600190615227565b815481106111ea576111ea6151fb565b90600052602060002090600b0201905060006006826000015481548110611213576112136151fb565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611268573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128c9190615399565b9199909850909650945050505050565b600581815481106112ac57600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60008060078581548110611311576113116151fb565b600091825260209091206004918202019150600182015460ff16600481111561133c5761133c614b3e565b1461135a57604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061136f5761136f6151fb565b6000918252602082206004600b9092020190810154909350915061139384836153d1565b60058401546006850154600286015492935090916000906113b5908390615385565b905060008660010154905060008060068960000154815481106113da576113da6151fb565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611436573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145a91906153e4565b915050806000036114765783861115611471578395505b611496565b611481846002615358565b86111561149657611493846002615358565b95505b60048801869055865b8681101561154257848110156114f8576114f16040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061355d565b955061153a565b61153a6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a2e565b60010161149f565b508488600501541461155657600588018590555b5050505050505050505050565b61156b614786565b6005826001600160601b031681548110611587576115876151fb565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116115ae5750505050509050919050565b6115d682613f70565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061165457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116486000805160206156148339815191525490565b6001600160a01b031614155b156116725760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156116cc575060408051601f3d908101601f191682019092526116c9918101906153e4565b60015b6116f45781604051630c76093760e01b81526004016116eb91906149af565b60405180910390fd5b600080516020615614833981519152811461172557604051632a87526960e21b8152600481018290526024016116eb565b6000805160206156148339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156117ee576000836001600160a01b03168360405161178c9190615421565b600060405180830381855af49150503d80600081146117c7576040519150601f19603f3d011682016040523d82523d6000602084013e6117cc565b606091505b5050905080610b0b576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461183f5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061561483398151915290565b6007818154811061186257600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b600080600783815481106118c4576118c46151fb565b60009182526020822060036004909202019081018054919350906118ea90600190615227565b815481106118fa576118fa6151fb565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061192f5761192f6151fb565b90600052602060002090600c0201905080600501548260030154106119ce5782546001600160601b031660001901611970576001600160ff1b0393506119fb565b6003820154611980906002615358565b61198b9060016153d1565b81546005805490916001600160601b03169081106119ab576119ab6151fb565b90600052602060002090600c0201600401546119c79190615358565b93506119fb565b60038201546119de906002615358565b6119e99060016153d1565b81600401546119f89190615358565b93505b505050919050565b6000546001600160a01b03163314611a2e5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611a499190615421565b60006040518083038185875af1925050503d8060008114611a86576040519150601f19603f3d011682016040523d82523d6000602084013e611a8b565b606091505b5050905080610b0b576040516322092f2f60e11b815260040160405180910390fd5b6117ee338383600080613f9e565b6000546001600160a01b03163314611ae65760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611b655760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611c225760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611c4057611c406151fb565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611ca2575080546005805488926001600160601b0316908110611c8e57611c8e6151fb565b90600052602060002090600c020160020154115b15611cc057604051639717078960e01b815260040160405180910390fd5b60005b6001820154811015611d3b57866005836001018381548110611ce757611ce76151fb565b906000526020600020015481548110611d0257611d026151fb565b90600052602060002090600c0201600201541015611d3357604051639717078960e01b815260040160405180910390fd5b600101611cc3565b5060028101869055805460ff60601b1916600160601b8815150217815560038101859055600480820185905560058201849055611d7e90600683019084906147a4565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611dc29695949392919061543d565b60405180910390a25050505050505050565b611e3a60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b60078381548110611e4d57611e4d6151fb565b90600052602060002090600402016003018281548110611e6f57611e6f6151fb565b90600052602060002090600b02016040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201805480602002602001604051908101604052809291908181526020018280548015611f1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f00575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b600060078281548110611f7557611f756151fb565b600091825260209091206004918202019150600182015460ff166004811115611fa057611fa0614b3e565b14611fbe57604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff1615611fe95760405163c977f8d360e01b815260040160405180910390fd5b6000611ff48361119b565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b1580156120a757600080fd5b505af11580156120bb573d6000803e3d6000fd5b50505050505050565b600681815481106120d457600080fd5b6000918252602090912001546001600160a01b0316905081565b600080600060078481548110612106576121066151fb565b6000918252602090912060049091020190506003600182015460ff16600481111561213357612133614b3e565b0361218b576002810154815460058054929550916001600160601b03909116908110612161576121616151fb565b600091825260209091206009600c909202010154600282015461218491906153d1565b9150612194565b60009250600091505b50915091565b6000546001600160a01b031633146121c55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480159061220d57506001546001600160a01b03163314155b1561222b57604051633244d29960e21b815260040160405180910390fd5b600060078381548110612240576122406151fb565b906000526020600020906004020190506000600182600301805490506122669190615227565b9050600082600301828154811061227f5761227f6151fb565b600091825260208220600b909102019150600184015460ff1660048111156122a9576122a9614b3e565b146122c757604051638285c4ef60e01b815260040160405180910390fd5b60038101546006820154106122ef57604051634df06de360e01b815260040160405180910390fd5b60048054604051633c694c4160e21b81526001600160a01b039091169163f1a531049161231e918891016149af565b600060405180830381600087803b15801561233857600080fd5b505af115801561234c573d6000803e3d6000fd5b5050505060006006826000015481548110612369576123696151fb565b6000918252602082200154600a8401546001600160a01b0390911692506123919060016153d1565b60405163695c01ad60e11b815260048101899052602481018290529091506000906001600160a01b0384169063d2b8035a906044016020604051808303816000875af11580156123e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124099190615470565b90506001600160a01b03811661243257604051632e38b8f760e11b815260040160405180910390fd5b6004805460018601546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261246892869290910161548d565b600060405180830381600087803b15801561248257600080fd5b505af1158015612496573d6000803e3d6000fd5b50505060068501546040518a92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916124e3918a8252602082015260400190565b60405180910390a36006840180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600385015490540361258a5760048054604051632e96bc2360e11b81529182018a9052602482018790526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561257157600080fd5b505af1158015612585573d6000803e3d6000fd5b505050505b50600a8301555060048054604051633c694c4160e21b81526001600160a01b039091169163f1a53104916125c191600091016149af565b600060405180830381600087803b1580156125db57600080fd5b505af11580156125ef573d6000803e3d6000fd5b505050505050505050565b6000612605826133d2565b34101561262557604051630e3360f160e21b815260040160405180910390fd5b6110998383600034614158565b6000546001600160a01b0316331461265d5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612688836118ae565b3410156126a857604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106126bd576126bd6151fb565b6000918252602090912060049091020190506003600182015460ff1660048111156126ea576126ea614b3e565b14612708576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061271e90600190615227565b8154811061272e5761272e6151fb565b90600052602060002090600b020190506006816000015481548110612755576127556151fb565b6000918252602090912001546001600160a01b031633146127895760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106127cc576127cc6151fb565b90600052602060002090600c0201600501548460030154106128d5576005836001600160601b031681548110612804576128046151fb565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612837576128376151fb565b60009182526020808320858452600a600c90930201919091019052604090205460ff1661286357600191505b84546001600160601b038481169116146128d557845460038601546001600160601b039091169061289690600190615227565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612918576129186151fb565b90600052602060002090600c020190508060040154346129389190615385565b8260030181905550612710816003015482600201546129579190615358565b6129619190615385565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c9161299891615227565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b1580156129d657600080fd5b505af11580156129ea573d6000803e3d6000fd5b505086548454149150612ad090505784546003870154612a0c90600190615227565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612a5a57612a5a6151fb565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612a9d918d918d918d91906004016154a6565b600060405180830381600087803b158015612ab757600080fd5b505af1158015612acb573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612b409190615257565b60405180910390a2505050505050505050565b60008060078381548110612b6957612b696151fb565b906000526020600020906004020190508060030160018260030180549050612b919190615227565b81548110612ba157612ba16151fb565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612be65760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b6000546001600160a01b03163314612c8f5760405163c383977560e01b815260040160405180910390fd5b856005896001600160601b031681548110612cac57612cac6151fb565b90600052602060002090600c0201600201541115612cdd57604051639717078960e01b815260040160405180910390fd5b8051600003612cff5760405163402585f560e01b815260040160405180910390fd5b6001600160601b038816612d2657604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612e1557838181518110612d7957612d796151fb565b602002602001015160001480612dac57506006548451859083908110612da157612da16151fb565b602002602001015110155b15612dca57604051633d58a98960e11b815260040160405180910390fd5b600182600a016000868481518110612de457612de46151fb565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101612d5e565b5060016000908152600a8201602052604090205460ff16612e49576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038b161781556040805160008152602081019182905251612e819160018401916147e2565b50805460ff60601b1916600160601b8a1515021781556002810188905560038101879055600480820187905560058201869055612ec490600683019086906147a4565b5060058a6001600160601b031681548110612ee157612ee16151fb565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038b169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d90612f4e908d908d908d908d908d908d908d906154ef565b60405180910390a350505050505050505050565b6000612fa7826103c386868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133d292505050565b949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680612ff8575080546001600160401b03808416911610155b156130155760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b03808e166001600160a01b0319928316178355600180548e8316908416178155600280548e8416908516178155600380548e8516908616179055600480548985169086161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054928c1692909316821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a360058054600082815260028201909255600c6001909101027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810180546001600160601b031916815560408051938452602084019081905292519092613174927f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db101916147e2565b50805460ff60601b1916600160601b8815150217815585516002820155602086015160038201556040860151600480830191909155606087015160058301556131c390600683019087906147a4565b50805486516020808901516040808b015160608c0151825160008082529581019093526001600160601b03909616956001957f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d958f959194919392918e915060405161323597969594939291906154ef565b60405180910390a361324a60018060016134d5565b50805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050505050565b6000546001600160a01b031633146132ca5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166133255760405163e51cf7bf60e01b815260040160405180910390fd5b613330858585612f62565b82101561335057604051630e3360f160e21b815260040160405180910390fd5b6133656001600160a01b03841633308561443f565b613382576040516312171d8360e31b815260040160405180910390fd5b6133c68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506141589050565b90505b95945050505050565b60008060006133e08461451b565b5091509150806005836001600160601b031681548110613402576134026151fb565b90600052602060002090600c020160040154612fa79190615358565b6004546001600160a01b0316331461344957604051639d6cab9960e01b815260040160405180910390fd5b613457848484846001613f9e565b5050505050565b600060078281548110613473576134736151fb565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134ab576134ab6151fb565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134f2576134f26151fb565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b6000806007836000015181548110613577576135776151fb565b906000526020600020906004020190506000816003018460200151815481106135a2576135a26151fb565b90600052602060002090600b02019050600060068260000154815481106135cb576135cb6151fb565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613651573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061367591906153e4565b905061271081111561368657506127105b60006127106136958382615227565b85600101546136a49190615358565b6136ae9190615385565b9050808760c0018181516136c291906153d1565b90525060e08701516006850180546000929081106136e2576136e26151fb565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161372391859187910161548d565b600060405180830381600087803b15801561373d57600080fd5b505af1158015613751573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061378691859187910161548d565b600060405180830381600087803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137f48761556e565b60098b01546040516138169392916000916001600160a01b039091169061558a565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa15801561387d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138a1919061523a565b613907576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138d4918591016149af565b600060405180830381600087803b1580156138ee57600080fd5b505af1158015613902573d6000803e3d6000fd5b505050505b600188606001516139189190615227565b8860e0015114801561392c57506040880151155b15613a1d5760098501546001600160a01b0316613975576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f193505050505061399c565b6000546002860154600987015461399a926001600160a01b03918216929116906145a2565b505b60005460c08901516002546139bf926001600160a01b03918216929116906145a2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a1493909290916001600160a01b03909116906155ae565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a4757613a476151fb565b90600052602060002090600402019050600081600301836020015181548110613a7257613a726151fb565b90600052602060002090600b0201905060006006826000015481548110613a9b57613a9b6151fb565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613ada916155cd565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b5e91906153e4565b9050612710811115613b6f57506127105b60008360060186606001518760e00151613b8991906155cd565b81548110613b9957613b996151fb565b600091825260208220015460018601546001600160a01b03909116925061271090613bc5908590615358565b613bcf9190615385565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613c0191869186910161548d565b600060405180830381600087803b158015613c1b57600080fd5b505af1158015613c2f573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c62918691016149af565b602060405180830381865afa158015613c7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ca3919061523a565b613cc057600254613cbe906001600160a01b031683836145a2565b505b60006127108489604001518a60c00151613cda9190615385565b613ce49190615358565b613cee9190615385565b905080866008016000828254613d0491906153d1565b925050819055506000612710858a604001518960020154613d259190615385565b613d2f9190615358565b613d399190615385565b905080876007016000828254613d4f91906153d1565b9091555050600254613d6b906001600160a01b031685846145a2565b5060098701546001600160a01b0316613da9576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613dc4565b6009870154613dc2906001600160a01b031685836145a2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e14928c928a928a929091169061558a565b60405180910390a4600189606001516002613e2f9190615358565b613e399190615227565b8960e00151036125ef57600087600801548a60c00151613e599190615227565b9050600088600701548960020154613e719190615227565b905081151580613e8057508015155b15611556578115613eaa57600054600254613ea8916001600160a01b039182169116846145a2565b505b8015613f115760098901546001600160a01b0316613ef057600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f11565b60005460098a0154613f0f916001600160a01b039182169116836145a2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf491613f5b91879187916001600160a01b03909116906155ae565b60405180910390a35050505050505050505050565b6000546001600160a01b03163314613f9b5760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fc057506005546001600160601b038616115b15613fd857613fd082600461466f565b5060006133c9565b831580159061401357506005856001600160601b031681548110613ffe57613ffe6151fb565b90600052602060002090600c02016002015484105b1561402357613fd082600561466f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140ba91906155e1565b9194509250905060008160078111156140d5576140d5614b3e565b146140f0576140e4858261466f565b600093505050506133c9565b821561411d5760025461410e906001600160a01b03168a308661443f565b61411d576140e485600161466f565b81156141495760025461413a906001600160a01b03168a846145a2565b614149576140e485600261466f565b50600198975050505050505050565b60008060006141668661451b565b92505091506005826001600160601b031681548110614187576141876151fb565b60009182526020808320848452600a600c90930201919091019052604090205460ff166141c75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614252576142526151fb565b6000918252602082200154600580546001600160a01b039092169350906001600160601b038716908110614288576142886151fb565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156142d3576142ce8a8460040154611048565b6142d9565b82600401545b90506142e5818a615385565b60038084019190915586835583015460028401546127109161430691615358565b6143109190615385565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b15801561438357600080fd5b505af1158015614397573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016143d194939291906154a6565b600060405180830381600087803b1580156143eb57600080fd5b505af11580156143ff573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516144a49190615421565b6000604051808303816000865af19150503d80600081146144e1576040519150601f19603f3d011682016040523d82523d6000602084013e6144e6565b606091505b5091509150818015614510575080511580614510575080806020019051810190614510919061523a565b979650505050505050565b60008060006040845110614590575050506020810151604082015160608301516001600160601b038316158061455c57506005546001600160601b03841610155b1561456657600192505b8160000361457357600391505b80158061458257506006548110155b1561458b575060015b61459b565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016145c492919061548d565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516145f99190615421565b6000604051808303816000865af19150503d8060008114614636576040519150601f19603f3d011682016040523d82523d6000602084013e61463b565b606091505b5091509150818015614665575080511580614665575080806020019051810190614665919061523a565b9695505050505050565b600182600181111561468357614683614b3e565b0361468c575050565b60018160078111156146a0576146a0614b3e565b036146be57604051630f323ed960e11b815260040160405180910390fd5b60028160078111156146d2576146d2614b3e565b036146f05760405163e45e13a360e01b815260040160405180910390fd5b600381600781111561470457614704614b3e565b0361472257604051631d91d0ed60e31b815260040160405180910390fd5b600481600781111561473657614736614b3e565b03614754576040516321f1774b60e11b815260040160405180910390fd5b600581600781111561476857614768614b3e565b036117f057604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b82600481019282156147d2579160200282015b828111156147d25782518255916020019190600101906147b7565b506147de92915061481c565b5090565b8280548282559060005260206000209081019282156147d257916020028201828111156147d25782518255916020019190600101906147b7565b5b808211156147de576000815560010161481d565b6001600160a01b0381168114613f9b57600080fd5b60006020828403121561485857600080fd5b813561486381614831565b9392505050565b80356001600160601b038116811461488157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156148c4576148c4614886565b604052919050565b600082601f8301126148dd57600080fd5b813560206001600160401b038211156148f8576148f8614886565b8160051b61490782820161489c565b928352848101820192828101908785111561492157600080fd5b83870192505b8483101561451057823582529183019190830190614927565b8015158114613f9b57600080fd5b60008060006060848603121561496357600080fd5b61496c8461486a565b925060208401356001600160401b0381111561498757600080fd5b614993868287016148cc565b92505060408401356149a481614940565b809150509250925092565b6001600160a01b0391909116815260200190565b6000602082840312156149d557600080fd5b5035919050565b600080604083850312156149ef57600080fd5b82356149fa81614831565b946020939093013593505050565b600080600060608486031215614a1d57600080fd5b505081359360208301359350604090920135919050565b600060208284031215614a4657600080fd5b6110998261486a565b8060005b6004811015610b0b578151845260209384019390910190600101614a53565b6080810161109c8284614a4f565b600082601f830112614a9157600080fd5b81356001600160401b03811115614aaa57614aaa614886565b614abd601f8201601f191660200161489c565b818152846020838601011115614ad257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614b0257600080fd5b8235614b0d81614831565b915060208301356001600160401b03811115614b2857600080fd5b614b3485828601614a80565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60058110614b7257634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614ba26040830186614b54565b9215156060820152608001529392505050565b600080600060608486031215614bca57600080fd5b8335614bd581614831565b92506020840135915060408401356001600160401b03811115614bf757600080fd5b614c0386828701614a80565b9150509250925092565b60008060408385031215614c2057600080fd5b6149fa8361486a565b60008060408385031215614c3c57600080fd5b8235614c4781614831565b91506020830135614c5781614940565b809150509250929050565b600080600060608486031215614c7757600080fd5b8335614c8281614831565b925060208401356001600160401b0381168114614c9e57600080fd5b9150604084013560ff811681146149a457600080fd5b600082601f830112614cc557600080fd5b604051608081018181106001600160401b0382111715614ce757614ce7614886565b604052806080840185811115614cfc57600080fd5b845b81811015614d16578035835260209283019201614cfe565b509195945050505050565b6000806000806000806000610140888a031215614d3d57600080fd5b614d468861486a565b96506020880135614d5681614940565b955060408801359450606088013593506080880135925060a08801359150614d818960c08a01614cb4565b905092959891949750929550565b60008060408385031215614da257600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b83811015614deb5781516001600160a01b031687529582019590820190600101614dc6565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152614e51610180850183614db1565b60e08601516101008681019190915286015161012080870191909152860151909250610140614e8a818701836001600160a01b03169052565b959095015193019290925250919050565b60008060408385031215614eae57600080fd5b823591506020830135614c5781614831565b60008060408385031215614ed357600080fd5b8235915060208301356001600160401b03811115614b2857600080fd5b600080600060608486031215614f0557600080fd5b833592506020840135915060408401356001600160401b03811115614bf757600080fd5b600080600080600080600080610160898b031215614f4657600080fd5b614f4f8961486a565b97506020890135614f5f81614940565b965060408901359550606089013594506080890135935060a08901359250614f8a8a60c08b01614cb4565b91506101408901356001600160401b03811115614fa657600080fd5b614fb28b828c016148cc565b9150509295985092959890939650565b60008083601f840112614fd457600080fd5b5081356001600160401b03811115614feb57600080fd5b60208301915083602082850101111561500357600080fd5b9250929050565b60008060006040848603121561501f57600080fd5b83356001600160401b0381111561503557600080fd5b61504186828701614fc2565b90945092505060208401356149a481614831565b60008060008060008060008060006101e08a8c03121561507457600080fd5b893561507f81614831565b985060208a013561508f81614831565b975060408a013561509f81614831565b965060608a01356150af81614831565b955060808a01356150bf81614831565b945060a08a01356150cf81614940565b93506150de8b60c08c01614cb4565b92506150ee8b6101408c01614cb4565b91506101c08a01356150ff81614831565b809150509295985092959850929598565b60008060008060006080868803121561512857600080fd5b8535945060208601356001600160401b0381111561514557600080fd5b61515188828901614fc2565b909550935050604086013561516581614831565b949793965091946060013592915050565b60006020828403121561518857600080fd5b81356001600160401b0381111561519e57600080fd5b612fa784828501614a80565b600080600080608085870312156151c057600080fd5b84356151cb81614831565b93506151d96020860161486a565b92506040850135915060608501356151f081614940565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561109c5761109c615211565b60006020828403121561524c57600080fd5b815161486381614940565b6020810161109c8284614b54565b600181815b808511156152a057816000190482111561528657615286615211565b8085161561529357918102915b93841c939080029061526a565b509250929050565b6000826152b75750600161109c565b816152c45750600061109c565b81600181146152da57600281146152e457615300565b600191505061109c565b60ff8411156152f5576152f5615211565b50506001821b61109c565b5060208310610133831016604e8410600b8410161715615323575081810a61109c565b61532d8383615265565b806000190482111561534157615341615211565b029392505050565b600061109960ff8416836152a8565b808202811582820484141761109c5761109c615211565b634e487b7160e01b600052601260045260246000fd5b6000826153945761539461536f565b500490565b6000806000606084860312156153ae57600080fd5b8351925060208401516153c081614940565b60408501519092506149a481614940565b8082018082111561109c5761109c615211565b6000602082840312156153f657600080fd5b5051919050565b60005b83811015615418578181015183820152602001615400565b50506000910152565b600082516154338184602087016153fd565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261451060a0830184614a4f565b60006020828403121561548257600080fd5b815161486381614831565b6001600160a01b03929092168252602082015260400190565b84815283602082015260806040820152600083518060808401526154d18160a08501602088016153fd565b606083019390935250601f91909101601f19160160a0019392505050565b60006101408083018a1515845260208a602086015289604086015288606086015287608086015261552360a0860188614a4f565b610120850192909252845190819052610160840191602086019160005b8181101561555c57835185529382019392820192600101615540565b50929c9b505050505050505050505050565b6000600160ff1b820161558357615583615211565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b6000826155dc576155dc61536f565b500690565b6000806000606084860312156155f657600080fd5b83519250602084015191506040840151600881106149a457600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122088332e4bd463fd5a2a31ab980f2b2ead694ff8b8a10a33684171a45128537f0a64736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061027c5760003560e01c80638a9bb02a1161014f578063d07368bd116100c1578063f6506db41161007a578063f6506db414610867578063f7434ea914610887578063fbb519e7146108a7578063fbf405b0146108c7578063fc6f8f16146108e7578063fe524c391461090757600080fd5b8063d07368bd146107b2578063d4d1d76a146107d2578063d874514b146107e7578063d98493f614610807578063e399d29b14610827578063e4c0aaf41461084757600080fd5b8063b702a87911610113578063b702a8791461070c578063c13517e11461072c578063c258bb191461073f578063c35699021461075f578063c71f425314610772578063cf0c38f81461079257600080fd5b80638a9bb02a1461064a5780638bb0487514610677578063acdbf51d14610697578063afe15cfb146106b7578063b0049637146106ec57600080fd5b80632e1daf2f116101f357806371ae413d116101ac57806371ae413d1461058a578063751accd0146105aa5780637717a6e8146105ca5780637934c0be146105ea57806382d022371461060a57806386541b241461062a57600080fd5b80632e1daf2f146104c45780633cfd1184146104e45780634f1ef2861461051157806352d1902d14610524578063564a565d1461053957806359ec827e1461056a57600080fd5b8063115d537611610245578063115d5376146103885780631860592b146103a857806319b81529146103d65780631c3db16d146104065780631f5a0dd2146104435780632d29a47b146104a457600080fd5b8062f5822c146102815780630219da79146102a357806309cfdc9c1461031b5780630b7414bc1461033b5780630c340a241461035b575b600080fd5b34801561028d57600080fd5b506102a161029c366004614846565b610927565b005b3480156102af57600080fd5b506102ee6102be366004614846565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561032757600080fd5b506102a1610336366004614846565b610974565b34801561034757600080fd5b506102a161035636600461494e565b6109da565b34801561036757600080fd5b5060005461037b906001600160a01b031681565b60405161031291906149af565b34801561039457600080fd5b506102a16103a33660046149c3565b610b11565b3480156103b457600080fd5b506103c86103c33660046149dc565b611048565b604051908152602001610312565b3480156103e257600080fd5b506103f66103f13660046149c3565b6110a2565b6040519015158152602001610312565b34801561041257600080fd5b506104266104213660046149c3565b61119b565b604080519384529115156020840152151590820152606001610312565b34801561044f57600080fd5b5061046361045e3660046149c3565b61129c565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610312565b3480156104b057600080fd5b506102a16104bf366004614a08565b6112fb565b3480156104d057600080fd5b5060045461037b906001600160a01b031681565b3480156104f057600080fd5b506105046104ff366004614a34565b611563565b6040516103129190614a72565b6102a161051f366004614aef565b6115cd565b34801561053057600080fd5b506103c86117f4565b34801561054557600080fd5b506105596105543660046149c3565b611852565b604051610312959493929190614b76565b34801561057657600080fd5b506103c86105853660046149c3565b6118ae565b34801561059657600080fd5b5060015461037b906001600160a01b031681565b3480156105b657600080fd5b506102a16105c5366004614bb5565b611a03565b3480156105d657600080fd5b506102a16105e5366004614c0d565b611aad565b3480156105f657600080fd5b506102a1610605366004614c29565b611abb565b34801561061657600080fd5b506102a1610625366004614c62565b611b3a565b34801561063657600080fd5b506102a1610645366004614d21565b611bf7565b34801561065657600080fd5b5061066a610665366004614d8f565b611dd4565b6040516103129190614df6565b34801561068357600080fd5b506102a16106923660046149c3565b611f60565b3480156106a357600080fd5b5061037b6106b23660046149c3565b6120c4565b3480156106c357600080fd5b506106d76106d23660046149c3565b6120ee565b60408051928352602083019190915201610312565b3480156106f857600080fd5b506102a1610707366004614846565b61219a565b34801561071857600080fd5b506102a1610727366004614e9b565b6121e7565b6103c861073a366004614ec0565b6125fa565b34801561074b57600080fd5b506102a161075a366004614846565b612632565b6102a161076d366004614ef0565b61267f565b34801561077e57600080fd5b506103c861078d3660046149c3565b612b53565b34801561079e57600080fd5b5060035461037b906001600160a01b031681565b3480156107be57600080fd5b506102a16107cd366004614846565b612bbb565b3480156107de57600080fd5b506006546103c8565b3480156107f357600080fd5b506102a1610802366004614f29565b612c64565b34801561081357600080fd5b506103c861082236600461500a565b612f62565b34801561083357600080fd5b506102a1610842366004615055565b612faf565b34801561085357600080fd5b506102a1610862366004614846565b61329f565b34801561087357600080fd5b506103c8610882366004615110565b6132ec565b34801561089357600080fd5b506103c86108a2366004615176565b6133d2565b3480156108b357600080fd5b506102a16108c23660046151aa565b61341e565b3480156108d357600080fd5b5060025461037b906001600160a01b031681565b3480156108f357600080fd5b506103c86109023660046149c3565b61345e565b34801561091357600080fd5b506103f6610922366004614c0d565b61348d565b6000546001600160a01b031633146109525760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480159061099a57506001546001600160a01b03163314155b156109b857604051633244d29960e21b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a055760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0b578115610aa457828181518110610a2957610a296151fb565b602002602001015160001480610a5c57506006548351849083908110610a5157610a516151fb565b602002602001015110155b15610a7a57604051633d58a98960e11b815260040160405180910390fd5b610a9f84848381518110610a9057610a906151fb565b602002602001015160016134d5565b610b03565b6001838281518110610ab857610ab86151fb565b602002602001015103610ade576040516356d111fd60e11b815260040160405180910390fd5b610b0384848381518110610af457610af46151fb565b602002602001015160006134d5565b600101610a08565b50505050565b600060078281548110610b2657610b266151fb565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610b5957610b596151fb565b6000918252602082206003850154600c909202019250610b7b90600190615227565b90506000836003018281548110610b9457610b946151fb565b600091825260208220600b909102019150600185015460ff166004811115610bbe57610bbe614b3e565b03610c995781158015610c0d57506001840154600684019060ff166004811115610bea57610bea614b3e565b60048110610bfa57610bfa6151fb565b01546002850154610c0b9042615227565b105b15610c2b57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610c53576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610c6a576002610c6d565b60015b60018086018054909160ff1990911690836004811115610c8f57610c8f614b3e565b0217905550610ffa565b60018085015460ff166004811115610cb357610cb3614b3e565b03610dc3576001840154600684019060ff166004811115610cd657610cd6614b3e565b60048110610ce657610ce66151fb565b01546002850154610cf79042615227565b108015610d8e57506006816000015481548110610d1657610d166151fb565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610d68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8c919061523a565b155b15610dac57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610c8f565b6002600185015460ff166004811115610dde57610dde614b3e565b03610f2c576001840154600684019060ff166004811115610e0157610e01614b3e565b60048110610e1157610e116151fb565b01546002850154610e229042615227565b108015610eb957506006816000015481548110610e4157610e416151fb565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb7919061523a565b155b15610ed757604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3610ffa565b6003600185015460ff166004811115610f4757610f47614b3e565b03610fc1576001840154600684019060ff166004811115610f6a57610f6a614b3e565b60048110610f7a57610f7a6151fb565b01546002850154610f8b9042615227565b1015610faa57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610c8f565b6004600185015460ff166004811115610fdc57610fdc614b3e565b03610ffa576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110399160ff1690615257565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061108590600160481b900460ff16600a615349565b61108f9084615358565b6110999190615385565b90505b92915050565b600080600783815481106110b8576110b86151fb565b60009182526020822060036004909202019081018054919350906110de90600190615227565b815481106110ee576110ee6151fb565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611123576111236151fb565b90600052602060002090600c0201905080600501548260030154101561114e57506000949350505050565b80546005805490916001600160601b031690811061116e5761116e6151fb565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b600080600080600785815481106111b4576111b46151fb565b60009182526020822060036004909202019081018054919350906111da90600190615227565b815481106111ea576111ea6151fb565b90600052602060002090600b0201905060006006826000015481548110611213576112136151fb565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611268573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128c9190615399565b9199909850909650945050505050565b600581815481106112ac57600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60008060078581548110611311576113116151fb565b600091825260209091206004918202019150600182015460ff16600481111561133c5761133c614b3e565b1461135a57604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061136f5761136f6151fb565b6000918252602082206004600b9092020190810154909350915061139384836153d1565b60058401546006850154600286015492935090916000906113b5908390615385565b905060008660010154905060008060068960000154815481106113da576113da6151fb565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611436573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145a91906153e4565b915050806000036114765783861115611471578395505b611496565b611481846002615358565b86111561149657611493846002615358565b95505b60048801869055865b8681101561154257848110156114f8576114f16040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061355d565b955061153a565b61153a6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a2e565b60010161149f565b508488600501541461155657600588018590555b5050505050505050505050565b61156b614786565b6005826001600160601b031681548110611587576115876151fb565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116115ae5750505050509050919050565b6115d682613f70565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061165457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116486000805160206156148339815191525490565b6001600160a01b031614155b156116725760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156116cc575060408051601f3d908101601f191682019092526116c9918101906153e4565b60015b6116f45781604051630c76093760e01b81526004016116eb91906149af565b60405180910390fd5b600080516020615614833981519152811461172557604051632a87526960e21b8152600481018290526024016116eb565b6000805160206156148339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156117ee576000836001600160a01b03168360405161178c9190615421565b600060405180830381855af49150503d80600081146117c7576040519150601f19603f3d011682016040523d82523d6000602084013e6117cc565b606091505b5050905080610b0b576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461183f5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061561483398151915290565b6007818154811061186257600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b600080600783815481106118c4576118c46151fb565b60009182526020822060036004909202019081018054919350906118ea90600190615227565b815481106118fa576118fa6151fb565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061192f5761192f6151fb565b90600052602060002090600c0201905080600501548260030154106119ce5782546001600160601b031660001901611970576001600160ff1b0393506119fb565b6003820154611980906002615358565b61198b9060016153d1565b81546005805490916001600160601b03169081106119ab576119ab6151fb565b90600052602060002090600c0201600401546119c79190615358565b93506119fb565b60038201546119de906002615358565b6119e99060016153d1565b81600401546119f89190615358565b93505b505050919050565b6000546001600160a01b03163314611a2e5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611a499190615421565b60006040518083038185875af1925050503d8060008114611a86576040519150601f19603f3d011682016040523d82523d6000602084013e611a8b565b606091505b5050905080610b0b576040516322092f2f60e11b815260040160405180910390fd5b6117ee338383600080613f9e565b6000546001600160a01b03163314611ae65760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611b655760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611c225760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611c4057611c406151fb565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611ca2575080546005805488926001600160601b0316908110611c8e57611c8e6151fb565b90600052602060002090600c020160020154115b15611cc057604051639717078960e01b815260040160405180910390fd5b60005b6001820154811015611d3b57866005836001018381548110611ce757611ce76151fb565b906000526020600020015481548110611d0257611d026151fb565b90600052602060002090600c0201600201541015611d3357604051639717078960e01b815260040160405180910390fd5b600101611cc3565b5060028101869055805460ff60601b1916600160601b8815150217815560038101859055600480820185905560058201849055611d7e90600683019084906147a4565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611dc29695949392919061543d565b60405180910390a25050505050505050565b611e3a60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b60078381548110611e4d57611e4d6151fb565b90600052602060002090600402016003018281548110611e6f57611e6f6151fb565b90600052602060002090600b02016040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201805480602002602001604051908101604052809291908181526020018280548015611f1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f00575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b600060078281548110611f7557611f756151fb565b600091825260209091206004918202019150600182015460ff166004811115611fa057611fa0614b3e565b14611fbe57604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff1615611fe95760405163c977f8d360e01b815260040160405180910390fd5b6000611ff48361119b565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b1580156120a757600080fd5b505af11580156120bb573d6000803e3d6000fd5b50505050505050565b600681815481106120d457600080fd5b6000918252602090912001546001600160a01b0316905081565b600080600060078481548110612106576121066151fb565b6000918252602090912060049091020190506003600182015460ff16600481111561213357612133614b3e565b0361218b576002810154815460058054929550916001600160601b03909116908110612161576121616151fb565b600091825260209091206009600c909202010154600282015461218491906153d1565b9150612194565b60009250600091505b50915091565b6000546001600160a01b031633146121c55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480159061220d57506001546001600160a01b03163314155b1561222b57604051633244d29960e21b815260040160405180910390fd5b600060078381548110612240576122406151fb565b906000526020600020906004020190506000600182600301805490506122669190615227565b9050600082600301828154811061227f5761227f6151fb565b600091825260208220600b909102019150600184015460ff1660048111156122a9576122a9614b3e565b146122c757604051638285c4ef60e01b815260040160405180910390fd5b60038101546006820154106122ef57604051634df06de360e01b815260040160405180910390fd5b60048054604051633c694c4160e21b81526001600160a01b039091169163f1a531049161231e918891016149af565b600060405180830381600087803b15801561233857600080fd5b505af115801561234c573d6000803e3d6000fd5b5050505060006006826000015481548110612369576123696151fb565b6000918252602082200154600a8401546001600160a01b0390911692506123919060016153d1565b60405163695c01ad60e11b815260048101899052602481018290529091506000906001600160a01b0384169063d2b8035a906044016020604051808303816000875af11580156123e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124099190615470565b90506001600160a01b03811661243257604051632e38b8f760e11b815260040160405180910390fd5b6004805460018601546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261246892869290910161548d565b600060405180830381600087803b15801561248257600080fd5b505af1158015612496573d6000803e3d6000fd5b50505060068501546040518a92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916124e3918a8252602082015260400190565b60405180910390a36006840180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600385015490540361258a5760048054604051632e96bc2360e11b81529182018a9052602482018790526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561257157600080fd5b505af1158015612585573d6000803e3d6000fd5b505050505b50600a8301555060048054604051633c694c4160e21b81526001600160a01b039091169163f1a53104916125c191600091016149af565b600060405180830381600087803b1580156125db57600080fd5b505af11580156125ef573d6000803e3d6000fd5b505050505050505050565b6000612605826133d2565b34101561262557604051630e3360f160e21b815260040160405180910390fd5b6110998383600034614158565b6000546001600160a01b0316331461265d5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612688836118ae565b3410156126a857604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106126bd576126bd6151fb565b6000918252602090912060049091020190506003600182015460ff1660048111156126ea576126ea614b3e565b14612708576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061271e90600190615227565b8154811061272e5761272e6151fb565b90600052602060002090600b020190506006816000015481548110612755576127556151fb565b6000918252602090912001546001600160a01b031633146127895760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106127cc576127cc6151fb565b90600052602060002090600c0201600501548460030154106128d5576005836001600160601b031681548110612804576128046151fb565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612837576128376151fb565b60009182526020808320858452600a600c90930201919091019052604090205460ff1661286357600191505b84546001600160601b038481169116146128d557845460038601546001600160601b039091169061289690600190615227565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612918576129186151fb565b90600052602060002090600c020190508060040154346129389190615385565b8260030181905550612710816003015482600201546129579190615358565b6129619190615385565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c9161299891615227565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b1580156129d657600080fd5b505af11580156129ea573d6000803e3d6000fd5b505086548454149150612ad090505784546003870154612a0c90600190615227565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612a5a57612a5a6151fb565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612a9d918d918d918d91906004016154a6565b600060405180830381600087803b158015612ab757600080fd5b505af1158015612acb573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612b409190615257565b60405180910390a2505050505050505050565b60008060078381548110612b6957612b696151fb565b906000526020600020906004020190508060030160018260030180549050612b919190615227565b81548110612ba157612ba16151fb565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612be65760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b6000546001600160a01b03163314612c8f5760405163c383977560e01b815260040160405180910390fd5b856005896001600160601b031681548110612cac57612cac6151fb565b90600052602060002090600c0201600201541115612cdd57604051639717078960e01b815260040160405180910390fd5b8051600003612cff5760405163402585f560e01b815260040160405180910390fd5b6001600160601b038816612d2657604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612e1557838181518110612d7957612d796151fb565b602002602001015160001480612dac57506006548451859083908110612da157612da16151fb565b602002602001015110155b15612dca57604051633d58a98960e11b815260040160405180910390fd5b600182600a016000868481518110612de457612de46151fb565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101612d5e565b5060016000908152600a8201602052604090205460ff16612e49576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038b161781556040805160008152602081019182905251612e819160018401916147e2565b50805460ff60601b1916600160601b8a1515021781556002810188905560038101879055600480820187905560058201869055612ec490600683019086906147a4565b5060058a6001600160601b031681548110612ee157612ee16151fb565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038b169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d90612f4e908d908d908d908d908d908d908d906154ef565b60405180910390a350505050505050505050565b6000612fa7826103c386868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133d292505050565b949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680612ff8575080546001600160401b03808416911610155b156130155760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b03808e166001600160a01b0319928316178355600180548e8316908416178155600280548e8416908516178155600380548e8516908616179055600480548985169086161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054928c1692909316821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a360058054600082815260028201909255600c6001909101027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810180546001600160601b031916815560408051938452602084019081905292519092613174927f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db101916147e2565b50805460ff60601b1916600160601b8815150217815585516002820155602086015160038201556040860151600480830191909155606087015160058301556131c390600683019087906147a4565b50805486516020808901516040808b015160608c0151825160008082529581019093526001600160601b03909616956001957f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d958f959194919392918e915060405161323597969594939291906154ef565b60405180910390a361324a60018060016134d5565b50805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050505050565b6000546001600160a01b031633146132ca5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166133255760405163e51cf7bf60e01b815260040160405180910390fd5b613330858585612f62565b82101561335057604051630e3360f160e21b815260040160405180910390fd5b6133656001600160a01b03841633308561443f565b613382576040516312171d8360e31b815260040160405180910390fd5b6133c68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506141589050565b90505b95945050505050565b60008060006133e08461451b565b5091509150806005836001600160601b031681548110613402576134026151fb565b90600052602060002090600c020160040154612fa79190615358565b6004546001600160a01b0316331461344957604051639d6cab9960e01b815260040160405180910390fd5b613457848484846001613f9e565b5050505050565b600060078281548110613473576134736151fb565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134ab576134ab6151fb565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134f2576134f26151fb565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b6000806007836000015181548110613577576135776151fb565b906000526020600020906004020190506000816003018460200151815481106135a2576135a26151fb565b90600052602060002090600b02019050600060068260000154815481106135cb576135cb6151fb565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613651573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061367591906153e4565b905061271081111561368657506127105b60006127106136958382615227565b85600101546136a49190615358565b6136ae9190615385565b9050808760c0018181516136c291906153d1565b90525060e08701516006850180546000929081106136e2576136e26151fb565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161372391859187910161548d565b600060405180830381600087803b15801561373d57600080fd5b505af1158015613751573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061378691859187910161548d565b600060405180830381600087803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137f48761556e565b60098b01546040516138169392916000916001600160a01b039091169061558a565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa15801561387d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138a1919061523a565b613907576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138d4918591016149af565b600060405180830381600087803b1580156138ee57600080fd5b505af1158015613902573d6000803e3d6000fd5b505050505b600188606001516139189190615227565b8860e0015114801561392c57506040880151155b15613a1d5760098501546001600160a01b0316613975576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f193505050505061399c565b6000546002860154600987015461399a926001600160a01b03918216929116906145a2565b505b60005460c08901516002546139bf926001600160a01b03918216929116906145a2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a1493909290916001600160a01b03909116906155ae565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a4757613a476151fb565b90600052602060002090600402019050600081600301836020015181548110613a7257613a726151fb565b90600052602060002090600b0201905060006006826000015481548110613a9b57613a9b6151fb565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613ada916155cd565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b5e91906153e4565b9050612710811115613b6f57506127105b60008360060186606001518760e00151613b8991906155cd565b81548110613b9957613b996151fb565b600091825260208220015460018601546001600160a01b03909116925061271090613bc5908590615358565b613bcf9190615385565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613c0191869186910161548d565b600060405180830381600087803b158015613c1b57600080fd5b505af1158015613c2f573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c62918691016149af565b602060405180830381865afa158015613c7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ca3919061523a565b613cc057600254613cbe906001600160a01b031683836145a2565b505b60006127108489604001518a60c00151613cda9190615385565b613ce49190615358565b613cee9190615385565b905080866008016000828254613d0491906153d1565b925050819055506000612710858a604001518960020154613d259190615385565b613d2f9190615358565b613d399190615385565b905080876007016000828254613d4f91906153d1565b9091555050600254613d6b906001600160a01b031685846145a2565b5060098701546001600160a01b0316613da9576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613dc4565b6009870154613dc2906001600160a01b031685836145a2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e14928c928a928a929091169061558a565b60405180910390a4600189606001516002613e2f9190615358565b613e399190615227565b8960e00151036125ef57600087600801548a60c00151613e599190615227565b9050600088600701548960020154613e719190615227565b905081151580613e8057508015155b15611556578115613eaa57600054600254613ea8916001600160a01b039182169116846145a2565b505b8015613f115760098901546001600160a01b0316613ef057600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f11565b60005460098a0154613f0f916001600160a01b039182169116836145a2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf491613f5b91879187916001600160a01b03909116906155ae565b60405180910390a35050505050505050505050565b6000546001600160a01b03163314613f9b5760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fc057506005546001600160601b038616115b15613fd857613fd082600461466f565b5060006133c9565b831580159061401357506005856001600160601b031681548110613ffe57613ffe6151fb565b90600052602060002090600c02016002015484105b1561402357613fd082600561466f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140ba91906155e1565b9194509250905060008160078111156140d5576140d5614b3e565b146140f0576140e4858261466f565b600093505050506133c9565b821561411d5760025461410e906001600160a01b03168a308661443f565b61411d576140e485600161466f565b81156141495760025461413a906001600160a01b03168a846145a2565b614149576140e485600261466f565b50600198975050505050505050565b60008060006141668661451b565b92505091506005826001600160601b031681548110614187576141876151fb565b60009182526020808320848452600a600c90930201919091019052604090205460ff166141c75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614252576142526151fb565b6000918252602082200154600580546001600160a01b039092169350906001600160601b038716908110614288576142886151fb565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156142d3576142ce8a8460040154611048565b6142d9565b82600401545b90506142e5818a615385565b60038084019190915586835583015460028401546127109161430691615358565b6143109190615385565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b15801561438357600080fd5b505af1158015614397573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016143d194939291906154a6565b600060405180830381600087803b1580156143eb57600080fd5b505af11580156143ff573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516144a49190615421565b6000604051808303816000865af19150503d80600081146144e1576040519150601f19603f3d011682016040523d82523d6000602084013e6144e6565b606091505b5091509150818015614510575080511580614510575080806020019051810190614510919061523a565b979650505050505050565b60008060006040845110614590575050506020810151604082015160608301516001600160601b038316158061455c57506005546001600160601b03841610155b1561456657600192505b8160000361457357600391505b80158061458257506006548110155b1561458b575060015b61459b565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016145c492919061548d565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516145f99190615421565b6000604051808303816000865af19150503d8060008114614636576040519150601f19603f3d011682016040523d82523d6000602084013e61463b565b606091505b5091509150818015614665575080511580614665575080806020019051810190614665919061523a565b9695505050505050565b600182600181111561468357614683614b3e565b0361468c575050565b60018160078111156146a0576146a0614b3e565b036146be57604051630f323ed960e11b815260040160405180910390fd5b60028160078111156146d2576146d2614b3e565b036146f05760405163e45e13a360e01b815260040160405180910390fd5b600381600781111561470457614704614b3e565b0361472257604051631d91d0ed60e31b815260040160405180910390fd5b600481600781111561473657614736614b3e565b03614754576040516321f1774b60e11b815260040160405180910390fd5b600581600781111561476857614768614b3e565b036117f057604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b82600481019282156147d2579160200282015b828111156147d25782518255916020019190600101906147b7565b506147de92915061481c565b5090565b8280548282559060005260206000209081019282156147d257916020028201828111156147d25782518255916020019190600101906147b7565b5b808211156147de576000815560010161481d565b6001600160a01b0381168114613f9b57600080fd5b60006020828403121561485857600080fd5b813561486381614831565b9392505050565b80356001600160601b038116811461488157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156148c4576148c4614886565b604052919050565b600082601f8301126148dd57600080fd5b813560206001600160401b038211156148f8576148f8614886565b8160051b61490782820161489c565b928352848101820192828101908785111561492157600080fd5b83870192505b8483101561451057823582529183019190830190614927565b8015158114613f9b57600080fd5b60008060006060848603121561496357600080fd5b61496c8461486a565b925060208401356001600160401b0381111561498757600080fd5b614993868287016148cc565b92505060408401356149a481614940565b809150509250925092565b6001600160a01b0391909116815260200190565b6000602082840312156149d557600080fd5b5035919050565b600080604083850312156149ef57600080fd5b82356149fa81614831565b946020939093013593505050565b600080600060608486031215614a1d57600080fd5b505081359360208301359350604090920135919050565b600060208284031215614a4657600080fd5b6110998261486a565b8060005b6004811015610b0b578151845260209384019390910190600101614a53565b6080810161109c8284614a4f565b600082601f830112614a9157600080fd5b81356001600160401b03811115614aaa57614aaa614886565b614abd601f8201601f191660200161489c565b818152846020838601011115614ad257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614b0257600080fd5b8235614b0d81614831565b915060208301356001600160401b03811115614b2857600080fd5b614b3485828601614a80565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60058110614b7257634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614ba26040830186614b54565b9215156060820152608001529392505050565b600080600060608486031215614bca57600080fd5b8335614bd581614831565b92506020840135915060408401356001600160401b03811115614bf757600080fd5b614c0386828701614a80565b9150509250925092565b60008060408385031215614c2057600080fd5b6149fa8361486a565b60008060408385031215614c3c57600080fd5b8235614c4781614831565b91506020830135614c5781614940565b809150509250929050565b600080600060608486031215614c7757600080fd5b8335614c8281614831565b925060208401356001600160401b0381168114614c9e57600080fd5b9150604084013560ff811681146149a457600080fd5b600082601f830112614cc557600080fd5b604051608081018181106001600160401b0382111715614ce757614ce7614886565b604052806080840185811115614cfc57600080fd5b845b81811015614d16578035835260209283019201614cfe565b509195945050505050565b6000806000806000806000610140888a031215614d3d57600080fd5b614d468861486a565b96506020880135614d5681614940565b955060408801359450606088013593506080880135925060a08801359150614d818960c08a01614cb4565b905092959891949750929550565b60008060408385031215614da257600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b83811015614deb5781516001600160a01b031687529582019590820190600101614dc6565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152614e51610180850183614db1565b60e08601516101008681019190915286015161012080870191909152860151909250610140614e8a818701836001600160a01b03169052565b959095015193019290925250919050565b60008060408385031215614eae57600080fd5b823591506020830135614c5781614831565b60008060408385031215614ed357600080fd5b8235915060208301356001600160401b03811115614b2857600080fd5b600080600060608486031215614f0557600080fd5b833592506020840135915060408401356001600160401b03811115614bf757600080fd5b600080600080600080600080610160898b031215614f4657600080fd5b614f4f8961486a565b97506020890135614f5f81614940565b965060408901359550606089013594506080890135935060a08901359250614f8a8a60c08b01614cb4565b91506101408901356001600160401b03811115614fa657600080fd5b614fb28b828c016148cc565b9150509295985092959890939650565b60008083601f840112614fd457600080fd5b5081356001600160401b03811115614feb57600080fd5b60208301915083602082850101111561500357600080fd5b9250929050565b60008060006040848603121561501f57600080fd5b83356001600160401b0381111561503557600080fd5b61504186828701614fc2565b90945092505060208401356149a481614831565b60008060008060008060008060006101e08a8c03121561507457600080fd5b893561507f81614831565b985060208a013561508f81614831565b975060408a013561509f81614831565b965060608a01356150af81614831565b955060808a01356150bf81614831565b945060a08a01356150cf81614940565b93506150de8b60c08c01614cb4565b92506150ee8b6101408c01614cb4565b91506101c08a01356150ff81614831565b809150509295985092959850929598565b60008060008060006080868803121561512857600080fd5b8535945060208601356001600160401b0381111561514557600080fd5b61515188828901614fc2565b909550935050604086013561516581614831565b949793965091946060013592915050565b60006020828403121561518857600080fd5b81356001600160401b0381111561519e57600080fd5b612fa784828501614a80565b600080600080608085870312156151c057600080fd5b84356151cb81614831565b93506151d96020860161486a565b92506040850135915060608501356151f081614940565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561109c5761109c615211565b60006020828403121561524c57600080fd5b815161486381614940565b6020810161109c8284614b54565b600181815b808511156152a057816000190482111561528657615286615211565b8085161561529357918102915b93841c939080029061526a565b509250929050565b6000826152b75750600161109c565b816152c45750600061109c565b81600181146152da57600281146152e457615300565b600191505061109c565b60ff8411156152f5576152f5615211565b50506001821b61109c565b5060208310610133831016604e8410600b8410161715615323575081810a61109c565b61532d8383615265565b806000190482111561534157615341615211565b029392505050565b600061109960ff8416836152a8565b808202811582820484141761109c5761109c615211565b634e487b7160e01b600052601260045260246000fd5b6000826153945761539461536f565b500490565b6000806000606084860312156153ae57600080fd5b8351925060208401516153c081614940565b60408501519092506149a481614940565b8082018082111561109c5761109c615211565b6000602082840312156153f657600080fd5b5051919050565b60005b83811015615418578181015183820152602001615400565b50506000910152565b600082516154338184602087016153fd565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261451060a0830184614a4f565b60006020828403121561548257600080fd5b815161486381614831565b6001600160a01b03929092168252602082015260400190565b84815283602082015260806040820152600083518060808401526154d18160a08501602088016153fd565b606083019390935250601f91909101601f19160160a0019392505050565b60006101408083018a1515845260208a602086015289604086015288606086015287608086015261552360a0860188614a4f565b610120850192909252845190819052610160840191602086019160005b8181101561555c57835185529382019392820192600101615540565b50929c9b505050505050505050505050565b6000600160ff1b820161558357615583615211565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b6000826155dc576155dc61536f565b500690565b6000806000606084860312156155f657600080fd5b83519250602084015191506040840151600881106149a457600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122088332e4bd463fd5a2a31ab980f2b2ead694ff8b8a10a33684171a45128537f0a64736f6c63430008180033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "AcceptedFeeToken(address,bool)": { - "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", - "params": { - "_accepted": "Whether the token is accepted or not.", - "_token": "The ERC20 token." - } - }, - "DisputeCreation(uint256,address)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_arbitrable": "The contract which created the dispute.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "NewCurrencyRate(address,uint64,uint8)": { - "details": "To be emitted when the fee for a particular ERC20 token is updated.", - "params": { - "_feeToken": "The ERC20 token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrable": "The arbitrable receiving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - }, - "Upgraded(address)": { - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "addNewDisputeKit(address)": { - "details": "Add a new supported dispute kit module to the court.", - "params": { - "_disputeKitAddress": "The address of the dispute kit contract." - } - }, - "appeal(uint256,uint256,bytes)": { - "details": "Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.", - "params": { - "_disputeID": "The ID of the dispute.", - "_extraData": "Extradata for the dispute. Can be required during court jump.", - "_numberOfChoices": "Number of choices for the dispute. Can be required during court jump." - } - }, - "appealCost(uint256)": { - "details": "Gets the cost of appealing a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "cost": "The appeal cost." - } - }, - "appealPeriod(uint256)": { - "details": "Gets the start and the end of a specified dispute's current appeal period.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "end": "The end of the appeal period.", - "start": "The start of the appeal period." - } - }, - "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." - }, - "returns": { - "cost": "The arbitration cost in ETH." - } - }, - "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeToken": "The ERC20 token used to pay fees." - }, - "returns": { - "cost": "The arbitration cost in `_feeToken`." - } - }, - "changeAcceptedFeeTokens(address,bool)": { - "details": "Changes the supported fee tokens.", - "params": { - "_accepted": "Whether the token is supported or not as a method of fee payment.", - "_feeToken": "The fee token." - } - }, - "changeCurrencyRates(address,uint64,uint8)": { - "details": "Changes the currency rate of a fee token.", - "params": { - "_feeToken": "The fee token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "changeInstructor(address)": { - "details": "Changes the `instructor` storage variable.", - "params": { - "_instructor": "The new value for the `instructor` storage variable." - } - }, - "changeJurorProsecutionModule(address)": { - "details": "Changes the `jurorProsecutionModule` storage variable.", - "params": { - "_jurorProsecutionModule": "The new value for the `jurorProsecutionModule` storage variable." - } - }, - "changePinakion(address)": { - "details": "Changes the `pinakion` storage variable.", - "params": { - "_pinakion": "The new value for the `pinakion` storage variable." - } - }, - "changeSortitionModule(address)": { - "details": "Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.", - "params": { - "_sortitionModule": "The new value for the `sortitionModule` storage variable." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." - }, - "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])": { - "details": "Creates a court under a specified parent court.", - "params": { - "_alpha": "The `alpha` property value of the court.", - "_feeForJuror": "The `feeForJuror` property value of the court.", - "_hiddenVotes": "The `hiddenVotes` property value of the court.", - "_jurorsForCourtJump": "The `jurorsForCourtJump` property value of the court.", - "_minStake": "The `minStake` property value of the court.", - "_parent": "The `parent` property value of the court.", - "_supportedDisputeKits": "Indexes of dispute kits that this court will support.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the court." - } - }, - "createDispute(uint256,bytes)": { - "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "createDispute(uint256,bytes,address,uint256)": { - "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeAmount": "Amount of the ERC20 token used to pay fees.", - "_feeToken": "The ERC20 token used to pay fees.", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,address)": { - "details": "Draws one juror for the dispute until the number votes paid for is reached.", - "params": { - "_disputeID": "The ID of the dispute.", - "_juror": "The address of the juror to draw." - } - }, - "enableDisputeKits(uint96,uint256[],bool)": { - "details": "Adds/removes court's support for specified dispute kits.", - "params": { - "_courtID": "The ID of the court.", - "_disputeKitIDs": "The IDs of dispute kits which support should be added/removed.", - "_enable": "Whether add or remove the dispute kits from the court." - } - }, - "execute(uint256,uint256,uint256)": { - "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.", - "params": { - "_disputeID": "The ID of the dispute.", - "_iterations": "The number of iterations to run.", - "_round": "The appeal round." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "executeRuling(uint256)": { - "details": "Executes a specified dispute's ruling.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getNumberOfVotes(uint256)": { - "details": "Gets the number of votes permitted for the specified dispute in the latest round.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getTimesPerPeriod(uint96)": { - "details": "Gets the timesPerPeriod array for a given court.", - "params": { - "_courtID": "The ID of the court to get the times from." - }, - "returns": { - "timesPerPeriod": "The timesPerPeriod array for the given court." - } - }, - "initialize(address,address,address,address,address,bool,uint256[4],uint256[4],address)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", - "_disputeKit": "The address of the default dispute kit.", - "_governor": "The governor's address.", - "_hiddenVotes": "The `hiddenVotes` property value of the general court.", - "_instructor": "The address of the instructor.", - "_jurorProsecutionModule": "The address of the juror prosecution module.", - "_pinakion": "The address of the token contract.", - "_sortitionModuleAddress": "The sortition module responsible for sortition of the jurors.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the general court." - } - }, - "isDisputeKitJumping(uint256)": { - "details": "Returns true if the dispute kit will be switched to a parent DK.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "_0": "Whether DK will be switched or not." - } - }, - "passPeriod(uint256)": { - "details": "Passes the period of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setStake(uint96,uint256)": { - "details": "Sets the caller's stake in a court.", - "params": { - "_courtID": "The ID of the court.", - "_newStake": "The new stake. Note that the existing delayed stake will be nullified as non-relevant." - } - }, - "setStakeBySortitionModule(address,uint96,uint256,bool)": { - "details": "Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.", - "params": { - "_account": "The account whose stake is being set.", - "_alreadyTransferred": "Whether the PNKs have already been transferred to the contract.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "title": "KlerosCoreUniversity Core arbitrator contract for educational purposes.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ], - "InvalidImplementation(address)": [ - { - "notice": "The `implementation` is not UUPS-compliant" - } - ] - }, - "events": { - "Upgraded(address)": { - "notice": "Emitted when the `implementation` has been successfully upgraded." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 23505, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 23507, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "instructor", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 23510, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "pinakion", - "offset": 0, - "slot": "2", - "type": "t_contract(IERC20)1229" - }, - { - "astId": 23512, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "jurorProsecutionModule", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 23515, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "sortitionModule", - "offset": 0, - "slot": "4", - "type": "t_contract(ISortitionModuleUniversity)23364" - }, - { - "astId": 23519, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "courts", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(Court)23424_storage)dyn_storage" - }, - { - "astId": 23523, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "disputeKits", - "offset": 0, - "slot": "6", - "type": "t_array(t_contract(IDisputeKit)23189)dyn_storage" - }, - { - "astId": 23527, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "disputes", - "offset": 0, - "slot": "7", - "type": "t_array(t_struct(Dispute)23441_storage)dyn_storage" - }, - { - "astId": 23533, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "currencyRates", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)23490_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "base": "t_address", - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_contract(IDisputeKit)23189)dyn_storage": { - "base": "t_contract(IDisputeKit)23189", - "encoding": "dynamic_array", - "label": "contract IDisputeKit[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Court)23424_storage)dyn_storage": { - "base": "t_struct(Court)23424_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreUniversity.Court[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Dispute)23441_storage)dyn_storage": { - "base": "t_struct(Dispute)23441_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreUniversity.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)23466_storage)dyn_storage": { - "base": "t_struct(Round)23466_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreUniversity.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)4_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[4]", - "numberOfBytes": "128" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IArbitrableV2)22946": { - "encoding": "inplace", - "label": "contract IArbitrableV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeKit)23189": { - "encoding": "inplace", - "label": "contract IDisputeKit", - "numberOfBytes": "20" - }, - "t_contract(IERC20)1229": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_contract(ISortitionModuleUniversity)23364": { - "encoding": "inplace", - "label": "contract ISortitionModuleUniversity", - "numberOfBytes": "20" - }, - "t_enum(Period)23398": { - "encoding": "inplace", - "label": "enum KlerosCoreUniversity.Period", - "numberOfBytes": "1" - }, - "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)23490_storage)": { - "encoding": "mapping", - "key": "t_contract(IERC20)1229", - "label": "mapping(contract IERC20 => struct KlerosCoreUniversity.CurrencyRate)", - "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)23490_storage" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_struct(Court)23424_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreUniversity.Court", - "members": [ - { - "astId": 23400, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "parent", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 23402, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "hiddenVotes", - "offset": 12, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 23405, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "children", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 23407, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "minStake", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 23409, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "alpha", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 23411, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "feeForJuror", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 23413, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "jurorsForCourtJump", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 23417, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "timesPerPeriod", - "offset": 0, - "slot": "6", - "type": "t_array(t_uint256)4_storage" - }, - { - "astId": 23421, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "supportedDisputeKits", - "offset": 0, - "slot": "10", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 23423, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "disabled", - "offset": 0, - "slot": "11", - "type": "t_bool" - } - ], - "numberOfBytes": "384" - }, - "t_struct(CurrencyRate)23490_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreUniversity.CurrencyRate", - "members": [ - { - "astId": 23485, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "feePaymentAccepted", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 23487, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "rateInEth", - "offset": 1, - "slot": "0", - "type": "t_uint64" - }, - { - "astId": 23489, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "rateDecimals", - "offset": 9, - "slot": "0", - "type": "t_uint8" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Dispute)23441_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreUniversity.Dispute", - "members": [ - { - "astId": 23426, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "courtID", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 23429, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "arbitrated", - "offset": 12, - "slot": "0", - "type": "t_contract(IArbitrableV2)22946" - }, - { - "astId": 23432, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "period", - "offset": 0, - "slot": "1", - "type": "t_enum(Period)23398" - }, - { - "astId": 23434, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "ruled", - "offset": 1, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 23436, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "lastPeriodChange", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 23440, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "rounds", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(Round)23466_storage)dyn_storage" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Round)23466_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreUniversity.Round", - "members": [ - { - "astId": 23443, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "disputeKitID", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 23445, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "pnkAtStakePerJuror", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 23447, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "totalFeesForJurors", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 23449, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "nbVotes", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 23451, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "repartitions", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 23453, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "pnkPenalties", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 23456, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "drawnJurors", - "offset": 0, - "slot": "6", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 23458, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "sumFeeRewardPaid", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 23460, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "sumPnkRewardPaid", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 23463, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "feeToken", - "offset": 0, - "slot": "9", - "type": "t_contract(IERC20)1229" - }, - { - "astId": 23465, - "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "drawIterations", - "offset": 0, - "slot": "10", - "type": "t_uint256" - } - ], - "numberOfBytes": "352" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint64": { - "encoding": "inplace", - "label": "uint64", - "numberOfBytes": "8" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json deleted file mode 100644 index ca2512f0b..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "transactionIndex": 1, - "gasUsed": "484460", - "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000080000000000000040000000000000000000000000000020000000000000010200800402000000000000008000000000000008000000000000000000800000000000000000000000080000000000000000000000000000000800008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000008000000000200000000000000000000", - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8", - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000d6e96b7c993763b5cdda1139c7387b82a7c8b8b5" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" - }, - { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 1, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" - }, - { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" - }, - { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" - } - ], - "blockNumber": 96308609, - "cumulativeGasUsed": "484460", - "status": 1, - "byzantium": true - }, - "args": [ - "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - "0xe399d29b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa2250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d6e96b7c993763b5cdda1139c7387b82a7c8b8b5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000004b2c2d048921f694cce3aea35698c6b1f5fcbb79" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreUniversityProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220025ed3e852b24305c0ac2e202b83cf5fed6ae313e772bad4b0c1340efea75f0764736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220025ed3e852b24305c0ac2e202b83cf5fed6ae313e772bad4b0c1340efea75f0764736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json deleted file mode 100644 index 9c23c41b6..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json +++ /dev/null @@ -1,2849 +0,0 @@ -{ - "address": "0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "AppealPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "CannotDisableClassicDK", - "type": "error" - }, - { - "inputs": [], - "name": "CommitPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitNotSupportedByCourt", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeKitOnly", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "DisputePeriodIsFinal", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeStillDrawing", - "type": "error" - }, - { - "inputs": [], - "name": "EvidenceNotPassedAndNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GuardianOrGovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDisputKitParent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "MinStakeLowerThanParentCourt", - "type": "error" - }, - { - "inputs": [], - "name": "MustSupportDisputeKitClassic", - "type": "error" - }, - { - "inputs": [], - "name": "NotEvidencePeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotExecutionPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "SortitionModuleOnly", - "type": "error" - }, - { - "inputs": [], - "name": "StakingInTooManyCourts", - "type": "error" - }, - { - "inputs": [], - "name": "StakingLessThanCourtMinStake", - "type": "error" - }, - { - "inputs": [], - "name": "StakingNotPossibleInThisCourt", - "type": "error" - }, - { - "inputs": [], - "name": "StakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "StakingZeroWhenNoStake", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotAccepted", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "inputs": [], - "name": "UnstakingTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UnsuccessfulCall", - "type": "error" - }, - { - "inputs": [], - "name": "UnsupportedDisputeKit", - "type": "error" - }, - { - "inputs": [], - "name": "VotePeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "WhenNotPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WhenPausedOnly", - "type": "error" - }, - { - "inputs": [], - "name": "WrongDisputeKitIndex", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "CourtCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_fromCourtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "_toCourtID", - "type": "uint96" - } - ], - "name": "CourtJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "CourtModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "DisputeKitCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "DisputeKitEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_fromDisputeKitID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toDisputeKitID", - "type": "uint256" - } - ], - "name": "DisputeKitJump", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_pnkAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "LeftoverRewardSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCoreBase.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - } - ], - "name": "addNewDisputeKit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_guardian", - "type": "address" - } - ], - "name": "changeGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - } - ], - "name": "changeJurorProsecutionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModule", - "type": "address" - } - ], - "name": "changeSortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountInEth", - "type": "uint256" - } - ], - "name": "convertEthToTokenAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "_supportedDisputeKits", - "type": "uint256[]" - } - ], - "name": "createCourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeAmount", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "currencyRates", - "outputs": [ - { - "internalType": "bool", - "name": "feePaymentAccepted", - "type": "bool" - }, - { - "internalType": "uint64", - "name": "rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rateDecimals", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeKits", - "outputs": [ - { - "internalType": "contract IDisputeKit", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreBase.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "uint256", - "name": "nbDrawnJurors", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256[]", - "name": "_disputeKitIDs", - "type": "uint256[]" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "enableDisputeKits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getDisputeKitsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getPnkAtStakePerJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "disputeKitID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkAtStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "repartitions", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkPenalties", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "drawnJurors", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumPnkRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "drawIterations", - "type": "uint256" - } - ], - "internalType": "struct KlerosCoreBase.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_guardian", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "_disputeKit", - "type": "address" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "_sortitionExtraData", - "type": "bytes" - }, - { - "internalType": "contract ISortitionModule", - "name": "_sortitionModuleAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "isDisputeKitJumping", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_disputeKitID", - "type": "uint256" - } - ], - "name": "isSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorProsecutionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "passPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_wNative", - "type": "address" - } - ], - "name": "reinitialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStakeBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sortitionModule", - "outputs": [ - { - "internalType": "contract ISortitionModule", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferBySortitionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wNative", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x4422bc58d141846815e8b919c002f5e4bd7ee5ebb75eb7f228624def4acb97f4", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E", - "transactionIndex": 3, - "gasUsed": "5292660", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000002000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000004000000000000000000000000000000000000000000000000000000000000200000000000000000000000", - "blockHash": "0xb4ccf2fafa86a807c80b44529d5850dbe8ebc04ce1dcccb2636c21e9f79e8ee4", - "transactionHash": "0x4422bc58d141846815e8b919c002f5e4bd7ee5ebb75eb7f228624def4acb97f4", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 179580069, - "transactionHash": "0x4422bc58d141846815e8b919c002f5e4bd7ee5ebb75eb7f228624def4acb97f4", - "address": "0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 8, - "blockHash": "0xb4ccf2fafa86a807c80b44529d5850dbe8ebc04ce1dcccb2636c21e9f79e8ee4" - } - ], - "blockNumber": 179580069, - "cumulativeGasUsed": "5524877", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "726fe29d8d9c48c46571792cebc6e314", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotDisableClassicDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitNotSupportedByCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputePeriodIsFinal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeStillDrawing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EvidenceNotPassedAndNotAppeal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GuardianOrGovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingInTooManyCourts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingLessThanCourtMinStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingNotPossibleInThisCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingZeroWhenNoStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnstakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedDisputeKit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotePeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenNotPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"}],\"name\":\"changeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nbDrawnJurors\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getPnkAtStakePerJuror\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreBase.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"}],\"name\":\"reinitialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeGuardian(address)\":{\"details\":\"Changes the `guardian` storage variable.\",\"params\":{\"_guardian\":\"The new value for the `guardian` storage variable.\"}},\"changeJurorProsecutionModule(address)\":{\"details\":\"Changes the `jurorProsecutionModule` storage variable.\",\"params\":{\"_jurorProsecutionModule\":\"The new value for the `jurorProsecutionModule` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"changeSortitionModule(address)\":{\"details\":\"Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.\",\"params\":{\"_sortitionModule\":\"The new value for the `sortitionModule` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],bytes,uint256[])\":{\"details\":\"Creates a court under a specified parent court.\",\"params\":{\"_alpha\":\"The `alpha` property value of the court.\",\"_feeForJuror\":\"The `feeForJuror` property value of the court.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the court.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the court.\",\"_minStake\":\"The `minStake` property value of the court.\",\"_parent\":\"The `parent` property value of the court.\",\"_sortitionExtraData\":\"Extra data for sortition module.\",\"_supportedDisputeKits\":\"Indexes of dispute kits that this court will support.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the court.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws jurors for the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\"},\"returns\":{\"nbDrawnJurors\":\"The total number of jurors drawn in the round.\"}},\"enableDisputeKits(uint96,uint256[],bool)\":{\"details\":\"Adds/removes court's support for specified dispute kits.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_disputeKitIDs\":\"The IDs of dispute kits which support should be added/removed.\",\"_enable\":\"Whether add or remove the dispute kits from the court.\"}},\"execute(uint256,uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts. Note: Reward distributions are forbidden during pause.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\",\"_round\":\"The appeal round.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"executeRuling(uint256)\":{\"details\":\"Executes a specified dispute's ruling.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getNumberOfRounds(uint256)\":{\"details\":\"Gets the number of rounds for a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"The number of rounds.\"}},\"getNumberOfVotes(uint256)\":{\"details\":\"Gets the number of votes permitted for the specified dispute in the latest round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getPnkAtStakePerJuror(uint256,uint256)\":{\"details\":\"Gets the PNK at stake per juror for a specified dispute and round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The round to get the info for.\"},\"returns\":{\"_0\":\"pnkAtStakePerJuror The PNK at stake per juror.\"}},\"getRoundInfo(uint256,uint256)\":{\"details\":\"Gets the round info for a specified dispute and round.This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The round to get the info for.\"},\"returns\":{\"_0\":\"round The round info.\"}},\"getTimesPerPeriod(uint96)\":{\"details\":\"Gets the timesPerPeriod array for a given court.\",\"params\":{\"_courtID\":\"The ID of the court to get the times from.\"},\"returns\":{\"timesPerPeriod\":\"The timesPerPeriod array for the given court.\"}},\"initialize(address,address,address,address,address,bool,uint256[4],uint256[4],bytes,address,address)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_disputeKit\":\"The address of the default dispute kit.\",\"_governor\":\"The governor's address.\",\"_guardian\":\"The guardian's address.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_jurorProsecutionModule\":\"The address of the juror prosecution module.\",\"_pinakion\":\"The address of the token contract.\",\"_sortitionExtraData\":\"The extra data for sortition module.\",\"_sortitionModuleAddress\":\"The sortition module responsible for sortition of the jurors.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the general court.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isDisputeKitJumping(uint256)\":{\"details\":\"Returns true if the dispute kit will be switched to a parent DK.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"Whether DK will be switched or not.\"}},\"isSupported(uint96,uint256)\":{\"details\":\"Checks if a given dispute kit is supported by a given court.\",\"params\":{\"_courtID\":\"The ID of the court to check the support for.\",\"_disputeKitID\":\"The ID of the dispute kit to check the support for.\"},\"returns\":{\"_0\":\"Whether the dispute kit is supported or not.\"}},\"passPeriod(uint256)\":{\"details\":\"Passes the period of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"pause()\":{\"details\":\"Pause staking and reward execution. Can only be done by guardian or governor.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setStake(uint96,uint256)\":{\"details\":\"Sets the caller's stake in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake. Note that the existing delayed stake will be nullified as non-relevant.\"}},\"setStakeBySortitionModule(address,uint96,uint256)\":{\"details\":\"Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\",\"params\":{\"_account\":\"The account whose stake is being set.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"}},\"transferBySortitionModule(address,uint256)\":{\"details\":\"Transfers PNK to the juror by SortitionModule.\",\"params\":{\"_account\":\"The account of the juror whose PNK to transfer.\",\"_amount\":\"The amount to transfer.\"}},\"unpause()\":{\"details\":\"Unpause staking and reward execution. Can only be done by governor.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"KlerosCore Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/KlerosCore.sol\":\"KlerosCore\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.10.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress,\\n _wNative\\n );\\n }\\n\\n function reinitialize(address _wNative) external reinitializer(6) {\\n wNative = _wNative;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x53d3398fecd14dc49f67494e498534551a19625e6fea1958c8fb0566d1aa6476\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n _transferFeeToken(round.feeToken, payable(governor), round.totalFeesForJurors);\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, degreeOfCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, degreeOfCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, degreeOfCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(governor), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @dev Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _degreeOfCoherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _degreeOfCoherence) internal pure returns (uint256) {\\n return (_amount * _degreeOfCoherence) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ALPHA_DIVISOR;\\n }\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x760819e151abfb5280e00431b27d2f5b36b6c8dcb1f4c87f96769c8cbc4c99b7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value);\\n }\\n}\\n\",\"keccak256\":\"0x5fdcdc2ccdeaabcfb80dcb3c2fe1cc749ff76a1e396d6aba6e77ec30a7c2f7f9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051615d166100fc600039600081816119be015281816119e70152611bdc0152615d166000f3fe6080604052600436106102d45760003560e01c80637934c0be1161017b578063c3569902116100d7578063e4c0aaf411610085578063e4c0aaf4146109a7578063f6506db4146109c7578063f7434ea9146109e7578063f7e7d1fd14610a07578063fbf405b014610a27578063fc6f8f1614610a47578063fe524c3914610a6757600080fd5b8063c3569902146108df578063c71f4253146108f2578063cf0c38f814610912578063d07368bd14610932578063d2b8035a14610952578063d4d1d76a14610972578063d98493f61461098757600080fd5b80638bb04875116101345780638bb04875146107f7578063a072b86c14610817578063acdbf51d14610837578063afe15cfb14610857578063b00496371461088c578063c13517e1146108ac578063c258bb19146108bf57600080fd5b80637934c0be1461073557806382d02237146107555780638456cb591461077557806386541b241461078a57806386cdecef146107aa5780638a9bb02a146107ca57600080fd5b80632e1daf2f1161023557806352d1902d116101e357806352d1902d1461063657806354fd4d501461064b578063564a565d1461068a57806359ec827e146106bb5780635c975abb146106db578063751accd0146106f55780637717a6e81461071557600080fd5b80632e1daf2f146105615780632fcb4f04146105815780633cfd1184146105a15780633f4ba83a146105ce57806342c37fa3146105e3578063452a9320146106035780634f1ef2861461062357600080fd5b80631860592b116102925780631860592b1461040057806319b815291461042e5780631c3db16d1461045e5780631f5a0dd21461049b5780632c053739146104fc5780632d29a47b1461051c5780632d68efc91461053c57600080fd5b8062f5822c146102d95780630219da79146102fb5780630761c14d146103735780630b7414bc146103935780630c340a24146103b3578063115d5376146103e0575b600080fd5b3480156102e557600080fd5b506102f96102f4366004614e43565b610a87565b005b34801561030757600080fd5b50610346610316366004614e43565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037f57600080fd5b506102f961038e366004614e7e565b610ad4565b34801561039f57600080fd5b506102f96103ae366004614f94565b610b12565b3480156103bf57600080fd5b506000546103d3906001600160a01b031681565b60405161036a9190614ff5565b3480156103ec57600080fd5b506102f96103fb366004615009565b610c43565b34801561040c57600080fd5b5061042061041b366004615022565b611210565b60405190815260200161036a565b34801561043a57600080fd5b5061044e610449366004615009565b61126a565b604051901515815260200161036a565b34801561046a57600080fd5b5061047e610479366004615009565b611363565b60408051938452911515602084015215159082015260600161036a565b3480156104a757600080fd5b506104bb6104b6366004615009565b611464565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161036a565b34801561050857600080fd5b506102f961051736600461512a565b6114c3565b34801561052857600080fd5b506102f9610537366004615217565b61159d565b34801561054857600080fd5b506009546103d39061010090046001600160a01b031681565b34801561056d57600080fd5b506004546103d3906001600160a01b031681565b34801561058d57600080fd5b506102f961059c366004614e43565b611829565b3480156105ad57600080fd5b506105c16105bc366004615243565b611876565b60405161036a9190615281565b3480156105da57600080fd5b506102f96118e0565b3480156105ef57600080fd5b506102f96105fe366004615022565b611963565b34801561060f57600080fd5b506001546103d3906001600160a01b031681565b6102f961063136600461528f565b6119aa565b34801561064257600080fd5b50610420611bcf565b34801561065757600080fd5b5061067d604051806040016040528060068152602001650302e31302e360d41b81525081565b60405161036a919061532e565b34801561069657600080fd5b506106aa6106a5366004615009565b611c2d565b60405161036a959493929190615379565b3480156106c757600080fd5b506104206106d6366004615009565b611c89565b3480156106e757600080fd5b5060095461044e9060ff1681565b34801561070157600080fd5b506102f96107103660046153b8565b611dde565b34801561072157600080fd5b506102f9610730366004615410565b611e88565b34801561074157600080fd5b506102f961075036600461542c565b611eb9565b34801561076157600080fd5b506102f9610770366004615465565b611f38565b34801561078157600080fd5b506102f9611ff5565b34801561079657600080fd5b506102f96107a53660046154b7565b612095565b3480156107b657600080fd5b506104206107c5366004615525565b612272565b3480156107d657600080fd5b506107ea6107e5366004615525565b6122c3565b60405161036a919061558c565b34801561080357600080fd5b506102f9610812366004615009565b61244f565b34801561082357600080fd5b506102f9610832366004615632565b6125b4565b34801561084357600080fd5b506103d3610852366004615009565b6128ec565b34801561086357600080fd5b50610877610872366004615009565b612916565b6040805192835260208301919091520161036a565b34801561089857600080fd5b506102f96108a7366004614e43565b6129c2565b6104206108ba3660046156f6565b612a0f565b3480156108cb57600080fd5b506102f96108da366004614e43565b612a47565b6102f96108ed366004615726565b612a94565b3480156108fe57600080fd5b5061042061090d366004615009565b612f59565b34801561091e57600080fd5b506003546103d3906001600160a01b031681565b34801561093e57600080fd5b506102f961094d366004614e43565b612fc1565b34801561095e57600080fd5b5061042061096d366004615525565b61306a565b34801561097e57600080fd5b50600654610420565b34801561099357600080fd5b506104206109a23660046157a7565b613389565b3480156109b357600080fd5b506102f96109c2366004614e43565b6133d6565b3480156109d357600080fd5b506104206109e23660046157f2565b613423565b3480156109f357600080fd5b50610420610a02366004615858565b613507565b348015610a1357600080fd5b506102f9610a22366004614e43565b613553565b348015610a3357600080fd5b506002546103d3906001600160a01b031681565b348015610a5357600080fd5b50610420610a62366004615009565b61362a565b348015610a7357600080fd5b5061044e610a82366004615410565b613659565b6000546001600160a01b03163314610ab25760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314610aff57604051639d6cab9960e01b815260040160405180910390fd5b610b0c83838360016136a1565b50505050565b6000546001600160a01b03163314610b3d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0c578115610bdc57828181518110610b6157610b6161588c565b602002602001015160001480610b9457506006548351849083908110610b8957610b8961588c565b602002602001015110155b15610bb257604051633d58a98960e11b815260040160405180910390fd5b610bd784848381518110610bc857610bc861588c565b6020026020010151600161391d565b610c3b565b6001838281518110610bf057610bf061588c565b602002602001015103610c16576040516356d111fd60e11b815260040160405180910390fd5b610c3b84848381518110610c2c57610c2c61588c565b6020026020010151600061391d565b600101610b40565b600060078281548110610c5857610c5861588c565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c8b57610c8b61588c565b6000918252602082206003850154600c909202019250610cad906001906158b8565b90506000836003018281548110610cc657610cc661588c565b600091825260208220600b909102019150600185015460ff166004811115610cf057610cf0615341565b03610dcb5781158015610d3f57506001840154600684019060ff166004811115610d1c57610d1c615341565b60048110610d2c57610d2c61588c565b01546002850154610d3d90426158b8565b105b15610d5d57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d85576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d9c576002610d9f565b60015b60018086018054909160ff1990911690836004811115610dc157610dc1615341565b02179055506111c2565b60018085015460ff166004811115610de557610de5615341565b03610ef5576001840154600684019060ff166004811115610e0857610e08615341565b60048110610e1857610e1861588c565b01546002850154610e2990426158b8565b108015610ec057506006816000015481548110610e4857610e4861588c565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebe91906158cb565b155b15610ede57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610dc1565b6002600185015460ff166004811115610f1057610f10615341565b0361105e576001840154600684019060ff166004811115610f3357610f33615341565b60048110610f4357610f4361588c565b01546002850154610f5490426158b8565b108015610feb57506006816000015481548110610f7357610f7361588c565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610fc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe991906158cb565b155b1561100957604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36111c2565b6003600185015460ff16600481111561107957611079615341565b03611189576001840154600684019060ff16600481111561109c5761109c615341565b600481106110ac576110ac61588c565b015460028501546110bd90426158b8565b108015611154575060068160000154815481106110dc576110dc61588c565b600091825260209091200154604051630855bbe960e01b8152600481018790526001600160a01b0390911690630855bbe990602401602060405180830381865afa15801561112e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115291906158cb565b155b1561117257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610dc1565b6004600185015460ff1660048111156111a4576111a4615341565b036111c2576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916112019160ff16906158e8565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061124d90600160481b900460ff16600a6159dd565b61125790846159ec565b6112619190615a19565b90505b92915050565b600080600783815481106112805761128061588c565b60009182526020822060036004909202019081018054919350906112a6906001906158b8565b815481106112b6576112b661588c565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106112eb576112eb61588c565b90600052602060002090600c0201905080600501548260030154101561131657506000949350505050565b80546005805490916001600160601b03169081106113365761133661588c565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061137c5761137c61588c565b60009182526020822060036004909202019081018054919350906113a2906001906158b8565b815481106113b2576113b261588c565b90600052602060002090600b02019050600060068260000154815481106113db576113db61588c565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611430573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114549190615a2d565b9199909850909650945050505050565b6005818154811061147457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600160006114cf6139a5565b8054909150600160401b900460ff16806114f6575080546001600160401b03808416911610155b156115135760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556115478d8d8d8d8d8d8d8d8d8d8d6139c9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff16156115c157604051636f1dac1d60e01b815260040160405180910390fd5b600080600785815481106115d7576115d761588c565b600091825260209091206004918202019150600182015460ff16600481111561160257611602615341565b1461162057604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106116355761163561588c565b6000918252602082206004600b909202019081015490935091506116598483615a66565b600584015460068501546002860154929350909160009061167b908390615a19565b905060008660010154905060008060068960000154815481106116a0576116a061588c565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156116fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117209190615a79565b9150508060000361173c5783861115611737578395505b61175c565b6117478460026159ec565b86111561175c576117598460026159ec565b95505b60048801869055865b8681101561180857848110156117be576117b76040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613d0c565b9550611800565b6118006040518061010001604052808e81526020018d8152602001848152602001878152602001868152602001858152602001888152602001838152506141ba565b600101611765565b508488600501541461181c57600588018590555b5050505050505050505050565b6000546001600160a01b031633146118545760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61187e614d73565b6005826001600160601b03168154811061189a5761189a61588c565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116118c15750505050509050919050565b6000546001600160a01b0316331461190b5760405163c383977560e01b815260040160405180910390fd5b60095460ff1661192e5760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6004546001600160a01b0316331461198e57604051639d6cab9960e01b815260040160405180910390fd5b6002546119a5906001600160a01b031683836145b7565b505050565b6119b38261467a565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480611a3157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611a25600080516020615cc18339815191525490565b6001600160a01b031614155b15611a4f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611aa9575060408051601f3d908101601f19168201909252611aa691810190615a79565b60015b611ad15781604051630c76093760e01b8152600401611ac89190614ff5565b60405180910390fd5b600080516020615cc18339815191528114611b0257604051632a87526960e21b815260048101829052602401611ac8565b600080516020615cc18339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156119a5576000836001600160a01b031683604051611b699190615a92565b600060405180830381855af49150503d8060008114611ba4576040519150601f19603f3d011682016040523d82523d6000602084013e611ba9565b606091505b5050905080610b0c576040516339b21b5d60e11b815260040160405180910390fd5b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c1a5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615cc183398151915290565b60078181548110611c3d57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611c9f57611c9f61588c565b6000918252602082206003600490920201908101805491935090611cc5906001906158b8565b81548110611cd557611cd561588c565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611d0a57611d0a61588c565b90600052602060002090600c020190508060050154826003015410611da95782546001600160601b031660001901611d4b576001600160ff1b039350611dd6565b6003820154611d5b9060026159ec565b611d66906001615a66565b81546005805490916001600160601b0316908110611d8657611d8661588c565b90600052602060002090600c020160040154611da291906159ec565b9350611dd6565b6003820154611db99060026159ec565b611dc4906001615a66565b8160040154611dd391906159ec565b93505b505050919050565b6000546001600160a01b03163314611e095760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611e249190615a92565b60006040518083038185875af1925050503d8060008114611e61576040519150601f19603f3d011682016040523d82523d6000602084013e611e66565b606091505b5050905080610b0c576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611eac57604051636f1dac1d60e01b815260040160405180910390fd5b6119a533838360006136a1565b6000546001600160a01b03163314611ee45760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f635760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b0316331480159061201b57506000546001600160a01b03163314155b1561203957604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561205d57604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146120c05760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106120de576120de61588c565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015612140575080546005805488926001600160601b031690811061212c5761212c61588c565b90600052602060002090600c020160020154115b1561215e57604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156121d9578660058360010183815481106121855761218561588c565b9060005260206000200154815481106121a0576121a061588c565b90600052602060002090600c02016002015410156121d157604051639717078960e01b815260040160405180910390fd5b600101612161565b5060028101869055805460ff60601b1916600160601b881515021781556003810185905560048082018590556005820184905561221c9060068301908490614d91565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161226096959493929190615aae565b60405180910390a25050505050505050565b6000600783815481106122875761228761588c565b906000526020600020906004020160030182815481106122a9576122a961588c565b90600052602060002090600b020160010154905092915050565b61232960405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6007838154811061233c5761233c61588c565b9060005260206000209060040201600301828154811061235e5761235e61588c565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561240d57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116123ef575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106124645761246461588c565b600091825260209091206004918202019150600182015460ff16600481111561248f5761248f615341565b146124ad57604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156124d85760405163c977f8d360e01b815260040160405180910390fd5b60006124e383611363565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c56906044015b600060405180830381600087803b15801561259757600080fd5b505af11580156125ab573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125df5760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106125fc576125fc61588c565b90600052602060002090600c020160020154111561262d57604051639717078960e01b815260040160405180910390fd5b805160000361264f5760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661267657604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612738578381815181106126c9576126c961588c565b6020026020010151600014806126fc575060065484518590839081106126f1576126f161588c565b602002602001015110155b1561271a57604051633d58a98960e11b815260040160405180910390fd5b61273083858381518110610bc857610bc861588c565b6001016126ae565b5060016000908152600a8201602052604090205460ff1661276c576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516127a4916001840191614dcf565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556127e79060068301908790614d91565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612819918691899101615ae1565b600060405180830381600087803b15801561283357600080fd5b505af1158015612847573d6000803e3d6000fd5b5050505060058b6001600160601b0316815481106128675761286761588c565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906128d7908e908e908e908e908e908e908d90615afa565b60405180910390a35050505050505050505050565b600681815481106128fc57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060006007848154811061292e5761292e61588c565b6000918252602090912060049091020190506003600182015460ff16600481111561295b5761295b615341565b036129b3576002810154815460058054929550916001600160601b039091169081106129895761298961588c565b600091825260209091206009600c90920201015460028201546129ac9190615a66565b91506129bc565b60009250600091505b50915091565b6000546001600160a01b031633146129ed5760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612a1a82613507565b341015612a3a57604051630e3360f160e21b815260040160405180910390fd5b61126183836000346146a8565b6000546001600160a01b03163314612a725760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a9d83611c89565b341015612abd57604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612ad257612ad261588c565b6000918252602090912060049091020190506003600182015460ff166004811115612aff57612aff615341565b14612b1d576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612b33906001906158b8565b81548110612b4357612b4361588c565b90600052602060002090600b020190506006816000015481548110612b6a57612b6a61588c565b6000918252602090912001546001600160a01b03163314612b9e5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612be157612be161588c565b90600052602060002090600c020160050154846003015410612cea576005836001600160601b031681548110612c1957612c1961588c565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612c4c57612c4c61588c565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c7857600191505b84546001600160601b03848116911614612cea57845460038601546001600160601b0390911690612cab906001906158b8565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612d2d57612d2d61588c565b90600052602060002090600c02019050806004015434612d4d9190615a19565b8260030181905550612d6781600201548260030154614983565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d9e916158b8565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612ddc57600080fd5b505af1158015612df0573d6000803e3d6000fd5b505086548454149150612ed690505784546003870154612e12906001906158b8565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e6057612e6061588c565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612ea3918d918d918d9190600401615b77565b600060405180830381600087803b158015612ebd57600080fd5b505af1158015612ed1573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612f4691906158e8565b60405180910390a2505050505050505050565b60008060078381548110612f6f57612f6f61588c565b906000526020600020906004020190508060030160018260030180549050612f9791906158b8565b81548110612fa757612fa761588c565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612fec5760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600080600784815481106130805761308061588c565b906000526020600020906004020190506000600182600301805490506130a691906158b8565b905060008260030182815481106130bf576130bf61588c565b600091825260208220600b909102019150600184015460ff1660048111156130e9576130e9615341565b1461310757604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106131205761312061588c565b6000918252602082200154600a8401546001600160a01b039091169250905b8781108015613155575060038401546006850154105b1561335d5760006001600160a01b03841663d2b8035a8b8461317681615ba7565b95506131829087615a66565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af11580156131c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e99190615bc0565b90506001600160a01b0381166131ff575061313f565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e92613235928692909101615bdd565b600060405180830381600087803b15801561324f57600080fd5b505af1158015613263573d6000803e3d6000fd5b50505060068601546040518c92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916132b0918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036133575760048054604051632e96bc2360e11b81529182018c9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561333e57600080fd5b505af1158015613352573d6000803e3d6000fd5b505050505b5061313f565b8084600a0160008282546133719190615a66565b90915550505060069092015494505050505092915050565b60006133ce8261041b86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061350792505050565b949350505050565b6000546001600160a01b031633146134015760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff1661345c5760405163e51cf7bf60e01b815260040160405180910390fd5b613467858585613389565b82101561348757604051630e3360f160e21b815260040160405180910390fd5b61349c6001600160a01b038416333085614992565b6134b9576040516312171d8360e31b815260040160405180910390fd5b6134fd8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506146a89050565b9695505050505050565b600080600061351584614a6e565b5091509150806005836001600160601b0316815481106135375761353761588c565b90600052602060002090600c0201600401546133ce91906159ec565b6006600061355f6139a5565b8054909150600160401b900460ff1680613586575080546001600160401b03808416911610155b156135a35760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff19909216821717825560098054610100600160a81b0319166101006001600160a01b03871602179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60006007828154811061363f5761363f61588c565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106136775761367761588c565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b60006001600160601b03841615806136c457506005546001600160601b03851610155b156136dc576136d4826005614af5565b5060006133ce565b821580159061371757506005846001600160601b0316815481106137025761370261588c565b90600052602060002090600c02016002015483105b15613727576136d4826006614af5565b600480546040516303d9595760e31b81526001600160a01b03888116938201939093526001600160601b03871660248201526044810186905260009283928392911690631ecacab8906064016060604051808303816000875af1158015613792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137b69190615bf6565b9194509250905060008160098111156137d1576137d1615341565b141580156137f1575060018160098111156137ee576137ee615341565b14155b1561380c576138008582614af5565b600093505050506133ce565b600181600981111561382057613820615341565b0361383157600193505050506133ce565b821561385e5760025461384f906001600160a01b0316893086614992565b61385e57613800856002614af5565b811561388a5760025461387b906001600160a01b031689846145b7565b61388a57613800856003614af5565b600480546040516355601d6960e11b81526001600160a01b038b8116938201939093526001600160601b038a16602482015260448101869052606481018590526084810189905291169063aac03ad29060a401600060405180830381600087803b1580156138f757600080fd5b505af115801561390b573d6000803e3d6000fd5b5060019b9a5050505050505050505050565b806005846001600160601b03168154811061393a5761393a61588c565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6139d1614c3e565b600080546001600160a01b03199081166001600160a01b038e81169190911783556001805483168e83161781556002805484168e84161781556003805485168e851617905560048054851688851617905560098054610100600160a81b031916610100888616021790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918b1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c92613adc92889101615ae1565b600060405180830381600087803b158015613af657600080fd5b505af1158015613b0a573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b031916815560408051838152602081019091529093509150508051613b78916001840191602090910190614dcf565b50805460ff60601b1916600160601b881515021781558551600282015560208601516003820155604086015160048083019190915560608701516005830155613bc79060068301908790614d91565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91613bfa91600191899101615ae1565b600060405180830381600087803b158015613c1457600080fd5b505af1158015613c28573d6000803e3d6000fd5b506000925060019150613c389050565b604051908082528060200260200182016040528015613c61578160200160208202803683370190505b509050600181600081518110613c7957613c7961588c565b602090810291909101015281546001600160601b031660017f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee68a8a600060200201518b600160200201518c600260200201518d600360200201518d89604051613ce89796959493929190615afa565b60405180910390a3613cfd600180600161391d565b50505050505050505050505050565b6000806007836000015181548110613d2657613d2661588c565b90600052602060002090600402019050600081600301846020015181548110613d5157613d5161588c565b90600052602060002090600b0201905060006006826000015481548110613d7a57613d7a61588c565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e249190615a79565b9050612710811115613e3557506127105b6000612710613e4483826158b8565b8560010154613e5391906159ec565b613e5d9190615a19565b90506000846006018860e0015181548110613e7a57613e7a61588c565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613ebb918591879101615bdd565b600060405180830381600087803b158015613ed557600080fd5b505af1158015613ee9573d6000803e3d6000fd5b505060048054604051633c85b79360e21b8152600094508493506001600160a01b039091169163f216de4c91613f23918791899101615bdd565b60408051808303816000875af1158015613f41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f659190615c29565b91509150808a60c001818151613f7b9190615a66565b90525060208a01518a516001600160a01b0385167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e788613fba86615c4d565b60098d0154604051613fdc9392916000916001600160a01b0390911690615c69565b60405180910390a48115806140715750895160208b015160e08c015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0387169063ba66fde790606401602060405180830381865afa15801561404b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061406f91906158cb565b155b156140d8576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916140a591879101614ff5565b600060405180830381600087803b1580156140bf57600080fd5b505af11580156140d3573d6000803e3d6000fd5b505050505b60018a606001516140e991906158b8565b8a60e001511480156140fd575060408a0151155b156141a75760098701546000546002890154614126926001600160a01b03908116921690614c65565b60005460c08b0151600254614149926001600160a01b03918216929116906145b7565b5060208a01518a5160c08c015160028a015460098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361419e93909290916001600160a01b0390911690615c8d565b60405180910390a35b50505060c0909601519695505050505050565b600060078260000151815481106141d3576141d361588c565b906000526020600020906004020190506000816003018360200151815481106141fe576141fe61588c565b90600052602060002090600b02019050600060068260000154815481106142275761422761588c565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f69390929161426691615cac565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa1580156142c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142ea9190615a79565b90506127108111156142fb57506127105b60008360060186606001518760e001516143159190615cac565b815481106143255761432561588c565b600091825260208220015460018601546001600160a01b03909116925061434c9084614983565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c79161437e918691869101615bdd565b600060405180830381600087803b15801561439857600080fd5b505af11580156143ac573d6000803e3d6000fd5b5050505060006143cf88604001518960c001516143c99190615a19565b85614983565b9050808660080160008282546143e59190615a66565b92505081905550600061440b896040015188600201546144059190615a19565b86614983565b9050808760070160008282546144219190615a66565b909155505060025461443d906001600160a01b031685846145b7565b506009870154614457906001600160a01b03168583614c65565b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7926144a7928c928a928a9290911690615c69565b60405180910390a46001896060015160026144c291906159ec565b6144cc91906158b8565b8960e00151036145ac57600087600801548a60c001516144ec91906158b8565b905060008860070154896002015461450491906158b8565b90508115158061451357508015155b1561181c57811561453d5760005460025461453b916001600160a01b039182169116846145b7565b505b8015614562576009890154600054614562916001600160a01b03908116911683614c65565b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916128d791879187916001600160a01b0390911690615c8d565b505050505050505050565b6000806000856001600160a01b031685856040516024016145d9929190615bdd565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b1790525161460e9190615a92565b6000604051808303816000865af19150503d806000811461464b576040519150601f19603f3d011682016040523d82523d6000602084013e614650565b606091505b50915091508180156134fd5750805115806134fd5750808060200190518101906134fd91906158cb565b6000546001600160a01b031633146146a55760405163c383977560e01b815260040160405180910390fd5b50565b60008060006146b686614a6e565b92505091506005826001600160601b0316815481106146d7576146d761588c565b60009182526020808320848452600a600c90930201919091019052604090205460ff166147175760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106147a2576147a261588c565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106147d8576147d861588c565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156148235761481e8a8460040154611210565b614829565b82600401545b9050614835818a615a19565b6003808401919091558683556002840154908401546148549190614983565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156148c757600080fd5b505af11580156148db573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016149159493929190615b77565b600060405180830381600087803b15801561492f57600080fd5b505af1158015614943573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b600061271061125783856159ec565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516149f79190615a92565b6000604051808303816000865af19150503d8060008114614a34576040519150601f19603f3d011682016040523d82523d6000602084013e614a39565b606091505b5091509150818015614a63575080511580614a63575080806020019051810190614a6391906158cb565b979650505050505050565b60008060006040845110614ae3575050506020810151604082015160608301516001600160601b0383161580614aaf57506005546001600160601b03841610155b15614ab957600192505b81600003614ac657600391505b801580614ad557506006548110155b15614ade575060015b614aee565b506001915060039050815b9193909250565b6001826001811115614b0957614b09615341565b03614b12575050565b6002816009811115614b2657614b26615341565b03614b4457604051630f323ed960e11b815260040160405180910390fd5b6003816009811115614b5857614b58615341565b03614b765760405163e45e13a360e01b815260040160405180910390fd5b6004816009811115614b8a57614b8a615341565b03614ba857604051631d91d0ed60e31b815260040160405180910390fd5b6005816009811115614bbc57614bbc615341565b03614bda57604051637c84af5160e01b815260040160405180910390fd5b6006816009811115614bee57614bee615341565b03614c0c57604051630caac6b360e31b815260040160405180910390fd5b6009816009811115614c2057614c20615341565b03611bcb57604051633e57962f60e21b815260040160405180910390fd5b614c46614ca8565b614c6357604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b038316614c94576009546119a5906001600160a01b0384811691849161010090910416614cc2565b610b0c6001600160a01b03841683836145b7565b6000614cb26139a5565b54600160401b900460ff16919050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015614cf157505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015614d2c57600080fd5b505af1158015614d40573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516935063a9059cbb925061257d915086908690600401615bdd565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614dbf579160200282015b82811115614dbf578251825591602001919060010190614da4565b50614dcb929150614e09565b5090565b828054828255906000526020600020908101928215614dbf5791602002820182811115614dbf578251825591602001919060010190614da4565b5b80821115614dcb5760008155600101614e0a565b6001600160a01b03811681146146a557600080fd5b8035614e3e81614e1e565b919050565b600060208284031215614e5557600080fd5b8135614e6081614e1e565b9392505050565b80356001600160601b0381168114614e3e57600080fd5b600080600060608486031215614e9357600080fd5b8335614e9e81614e1e565b9250614eac60208501614e67565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614efb57614efb614ebd565b604052919050565b600082601f830112614f1457600080fd5b81356001600160401b03811115614f2d57614f2d614ebd565b8060051b614f3d60208201614ed3565b91825260208185018101929081019086841115614f5957600080fd5b6020860192505b838310156134fd578235825260209283019290910190614f60565b80151581146146a557600080fd5b8035614e3e81614f7b565b600080600060608486031215614fa957600080fd5b614fb284614e67565b925060208401356001600160401b03811115614fcd57600080fd5b614fd986828701614f03565b9250506040840135614fea81614f7b565b809150509250925092565b6001600160a01b0391909116815260200190565b60006020828403121561501b57600080fd5b5035919050565b6000806040838503121561503557600080fd5b823561504081614e1e565b946020939093013593505050565b600082601f83011261505f57600080fd5b604051608081016001600160401b038111828210171561508157615081614ebd565b60405280608084018581111561509657600080fd5b845b818110156150b0578035835260209283019201615098565b509195945050505050565b600082601f8301126150cc57600080fd5b81356001600160401b038111156150e5576150e5614ebd565b6150f8601f8201601f1916602001614ed3565b81815284602083860101111561510d57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e03121561514c57600080fd5b8b3561515781614e1e565b9a5060208c013561516781614e1e565b995061517560408d01614e33565b985061518360608d01614e33565b975061519160808d01614e33565b965061519f60a08d01614f89565b95506151ae8d60c08e0161504e565b94506151be8d6101408e0161504e565b93506101c08c01356001600160401b038111156151da57600080fd5b6151e68e828f016150bb565b9350506151f66101e08d01614e33565b91506152056102008d01614e33565b90509295989b509295989b9093969950565b60008060006060848603121561522c57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561525557600080fd5b61126182614e67565b8060005b6004811015610b0c578151845260209384019390910190600101615262565b60808101611264828461525e565b600080604083850312156152a257600080fd5b82356152ad81614e1e565b915060208301356001600160401b038111156152c857600080fd5b6152d4858286016150bb565b9150509250929050565b60005b838110156152f95781810151838201526020016152e1565b50506000910152565b6000815180845261531a8160208601602086016152de565b601f01601f19169290920160200192915050565b6020815260006112616020830184615302565b634e487b7160e01b600052602160045260246000fd5b6005811061537557634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016153a56040830186615357565b9215156060820152608001529392505050565b6000806000606084860312156153cd57600080fd5b83356153d881614e1e565b92506020840135915060408401356001600160401b038111156153fa57600080fd5b615406868287016150bb565b9150509250925092565b6000806040838503121561542357600080fd5b61504083614e67565b6000806040838503121561543f57600080fd5b823561544a81614e1e565b9150602083013561545a81614f7b565b809150509250929050565b60008060006060848603121561547a57600080fd5b833561548581614e1e565b925060208401356001600160401b03811681146154a157600080fd5b9150604084013560ff81168114614fea57600080fd5b6000806000806000806000610140888a0312156154d357600080fd5b6154dc88614e67565b965060208801356154ec81614f7b565b955060408801359450606088013593506080880135925060a088013591506155178960c08a0161504e565b905092959891949750929550565b6000806040838503121561553857600080fd5b50508035926020909101359150565b600081518084526020840193506020830160005b828110156155825781516001600160a01b031686526020958601959091019060010161555b565b5093949350505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c083015161016060e08401526155e6610180840182615547565b905060e084015161010084015261010084015161012084015261012084015161561b6101408501826001600160a01b03169052565b506101408401516101608401528091505092915050565b60008060008060008060008060006101808a8c03121561565157600080fd5b61565a8a614e67565b985060208a013561566a81614f7b565b975060408a0135965060608a0135955060808a0135945060a08a013593506156958b60c08c0161504e565b92506101408a01356001600160401b038111156156b157600080fd5b6156bd8c828d016150bb565b9250506101608a01356001600160401b038111156156da57600080fd5b6156e68c828d01614f03565b9150509295985092959850929598565b6000806040838503121561570957600080fd5b8235915060208301356001600160401b038111156152c857600080fd5b60008060006060848603121561573b57600080fd5b833592506020840135915060408401356001600160401b038111156153fa57600080fd5b60008083601f84011261577157600080fd5b5081356001600160401b0381111561578857600080fd5b6020830191508360208285010111156157a057600080fd5b9250929050565b6000806000604084860312156157bc57600080fd5b83356001600160401b038111156157d257600080fd5b6157de8682870161575f565b9094509250506020840135614fea81614e1e565b60008060008060006080868803121561580a57600080fd5b8535945060208601356001600160401b0381111561582757600080fd5b6158338882890161575f565b909550935050604086013561584781614e1e565b949793965091946060013592915050565b60006020828403121561586a57600080fd5b81356001600160401b0381111561588057600080fd5b6133ce848285016150bb565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611264576112646158a2565b6000602082840312156158dd57600080fd5b8151614e6081614f7b565b602081016112648284615357565b6001815b600184111561593157808504811115615915576159156158a2565b600184161561592357908102905b60019390931c9280026158fa565b935093915050565b60008261594857506001611264565b8161595557506000611264565b816001811461596b576002811461597557615991565b6001915050611264565b60ff841115615986576159866158a2565b50506001821b611264565b5060208310610133831016604e8410600b84101617156159b4575081810a611264565b6159c160001984846158f6565b80600019048211156159d5576159d56158a2565b029392505050565b600061126160ff841683615939565b8082028115828204841417611264576112646158a2565b634e487b7160e01b600052601260045260246000fd5b600082615a2857615a28615a03565b500490565b600080600060608486031215615a4257600080fd5b83516020850151909350615a5581614f7b565b6040850151909250614fea81614f7b565b80820180821115611264576112646158a2565b600060208284031215615a8b57600080fd5b5051919050565b60008251615aa48184602087016152de565b9190910192915050565b6000610120820190508715158252866020830152856040830152846060830152836080830152614a6360a083018461525e565b8281526040602082015260006133ce6040830184615302565b600061014082018915158352886020840152876040840152866060840152856080840152615b2b60a084018661525e565b610140610120840152835190819052602084019061016084019060005b81811015615b66578351835260209384019390920191600101615b48565b50909b9a5050505050505050505050565b848152836020820152608060408201526000615b966080830185615302565b905082606083015295945050505050565b600060018201615bb957615bb96158a2565b5060010190565b600060208284031215615bd257600080fd5b8151614e6081614e1e565b6001600160a01b03929092168252602082015260400190565b600080600060608486031215615c0b57600080fd5b8351602085015160408601519194509250600a8110614fea57600080fd5b60008060408385031215615c3c57600080fd5b505080516020909101519092909150565b6000600160ff1b8201615c6257615c626158a2565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615cbb57615cbb615a03565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220a4155dec443a9c5d136f16c8c11bf35431e34b7e440060d5ff361d5e1f88354264736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102d45760003560e01c80637934c0be1161017b578063c3569902116100d7578063e4c0aaf411610085578063e4c0aaf4146109a7578063f6506db4146109c7578063f7434ea9146109e7578063f7e7d1fd14610a07578063fbf405b014610a27578063fc6f8f1614610a47578063fe524c3914610a6757600080fd5b8063c3569902146108df578063c71f4253146108f2578063cf0c38f814610912578063d07368bd14610932578063d2b8035a14610952578063d4d1d76a14610972578063d98493f61461098757600080fd5b80638bb04875116101345780638bb04875146107f7578063a072b86c14610817578063acdbf51d14610837578063afe15cfb14610857578063b00496371461088c578063c13517e1146108ac578063c258bb19146108bf57600080fd5b80637934c0be1461073557806382d02237146107555780638456cb591461077557806386541b241461078a57806386cdecef146107aa5780638a9bb02a146107ca57600080fd5b80632e1daf2f1161023557806352d1902d116101e357806352d1902d1461063657806354fd4d501461064b578063564a565d1461068a57806359ec827e146106bb5780635c975abb146106db578063751accd0146106f55780637717a6e81461071557600080fd5b80632e1daf2f146105615780632fcb4f04146105815780633cfd1184146105a15780633f4ba83a146105ce57806342c37fa3146105e3578063452a9320146106035780634f1ef2861461062357600080fd5b80631860592b116102925780631860592b1461040057806319b815291461042e5780631c3db16d1461045e5780631f5a0dd21461049b5780632c053739146104fc5780632d29a47b1461051c5780632d68efc91461053c57600080fd5b8062f5822c146102d95780630219da79146102fb5780630761c14d146103735780630b7414bc146103935780630c340a24146103b3578063115d5376146103e0575b600080fd5b3480156102e557600080fd5b506102f96102f4366004614e43565b610a87565b005b34801561030757600080fd5b50610346610316366004614e43565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037f57600080fd5b506102f961038e366004614e7e565b610ad4565b34801561039f57600080fd5b506102f96103ae366004614f94565b610b12565b3480156103bf57600080fd5b506000546103d3906001600160a01b031681565b60405161036a9190614ff5565b3480156103ec57600080fd5b506102f96103fb366004615009565b610c43565b34801561040c57600080fd5b5061042061041b366004615022565b611210565b60405190815260200161036a565b34801561043a57600080fd5b5061044e610449366004615009565b61126a565b604051901515815260200161036a565b34801561046a57600080fd5b5061047e610479366004615009565b611363565b60408051938452911515602084015215159082015260600161036a565b3480156104a757600080fd5b506104bb6104b6366004615009565b611464565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161036a565b34801561050857600080fd5b506102f961051736600461512a565b6114c3565b34801561052857600080fd5b506102f9610537366004615217565b61159d565b34801561054857600080fd5b506009546103d39061010090046001600160a01b031681565b34801561056d57600080fd5b506004546103d3906001600160a01b031681565b34801561058d57600080fd5b506102f961059c366004614e43565b611829565b3480156105ad57600080fd5b506105c16105bc366004615243565b611876565b60405161036a9190615281565b3480156105da57600080fd5b506102f96118e0565b3480156105ef57600080fd5b506102f96105fe366004615022565b611963565b34801561060f57600080fd5b506001546103d3906001600160a01b031681565b6102f961063136600461528f565b6119aa565b34801561064257600080fd5b50610420611bcf565b34801561065757600080fd5b5061067d604051806040016040528060068152602001650302e31302e360d41b81525081565b60405161036a919061532e565b34801561069657600080fd5b506106aa6106a5366004615009565b611c2d565b60405161036a959493929190615379565b3480156106c757600080fd5b506104206106d6366004615009565b611c89565b3480156106e757600080fd5b5060095461044e9060ff1681565b34801561070157600080fd5b506102f96107103660046153b8565b611dde565b34801561072157600080fd5b506102f9610730366004615410565b611e88565b34801561074157600080fd5b506102f961075036600461542c565b611eb9565b34801561076157600080fd5b506102f9610770366004615465565b611f38565b34801561078157600080fd5b506102f9611ff5565b34801561079657600080fd5b506102f96107a53660046154b7565b612095565b3480156107b657600080fd5b506104206107c5366004615525565b612272565b3480156107d657600080fd5b506107ea6107e5366004615525565b6122c3565b60405161036a919061558c565b34801561080357600080fd5b506102f9610812366004615009565b61244f565b34801561082357600080fd5b506102f9610832366004615632565b6125b4565b34801561084357600080fd5b506103d3610852366004615009565b6128ec565b34801561086357600080fd5b50610877610872366004615009565b612916565b6040805192835260208301919091520161036a565b34801561089857600080fd5b506102f96108a7366004614e43565b6129c2565b6104206108ba3660046156f6565b612a0f565b3480156108cb57600080fd5b506102f96108da366004614e43565b612a47565b6102f96108ed366004615726565b612a94565b3480156108fe57600080fd5b5061042061090d366004615009565b612f59565b34801561091e57600080fd5b506003546103d3906001600160a01b031681565b34801561093e57600080fd5b506102f961094d366004614e43565b612fc1565b34801561095e57600080fd5b5061042061096d366004615525565b61306a565b34801561097e57600080fd5b50600654610420565b34801561099357600080fd5b506104206109a23660046157a7565b613389565b3480156109b357600080fd5b506102f96109c2366004614e43565b6133d6565b3480156109d357600080fd5b506104206109e23660046157f2565b613423565b3480156109f357600080fd5b50610420610a02366004615858565b613507565b348015610a1357600080fd5b506102f9610a22366004614e43565b613553565b348015610a3357600080fd5b506002546103d3906001600160a01b031681565b348015610a5357600080fd5b50610420610a62366004615009565b61362a565b348015610a7357600080fd5b5061044e610a82366004615410565b613659565b6000546001600160a01b03163314610ab25760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314610aff57604051639d6cab9960e01b815260040160405180910390fd5b610b0c83838360016136a1565b50505050565b6000546001600160a01b03163314610b3d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0c578115610bdc57828181518110610b6157610b6161588c565b602002602001015160001480610b9457506006548351849083908110610b8957610b8961588c565b602002602001015110155b15610bb257604051633d58a98960e11b815260040160405180910390fd5b610bd784848381518110610bc857610bc861588c565b6020026020010151600161391d565b610c3b565b6001838281518110610bf057610bf061588c565b602002602001015103610c16576040516356d111fd60e11b815260040160405180910390fd5b610c3b84848381518110610c2c57610c2c61588c565b6020026020010151600061391d565b600101610b40565b600060078281548110610c5857610c5861588c565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c8b57610c8b61588c565b6000918252602082206003850154600c909202019250610cad906001906158b8565b90506000836003018281548110610cc657610cc661588c565b600091825260208220600b909102019150600185015460ff166004811115610cf057610cf0615341565b03610dcb5781158015610d3f57506001840154600684019060ff166004811115610d1c57610d1c615341565b60048110610d2c57610d2c61588c565b01546002850154610d3d90426158b8565b105b15610d5d57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d85576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d9c576002610d9f565b60015b60018086018054909160ff1990911690836004811115610dc157610dc1615341565b02179055506111c2565b60018085015460ff166004811115610de557610de5615341565b03610ef5576001840154600684019060ff166004811115610e0857610e08615341565b60048110610e1857610e1861588c565b01546002850154610e2990426158b8565b108015610ec057506006816000015481548110610e4857610e4861588c565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebe91906158cb565b155b15610ede57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610dc1565b6002600185015460ff166004811115610f1057610f10615341565b0361105e576001840154600684019060ff166004811115610f3357610f33615341565b60048110610f4357610f4361588c565b01546002850154610f5490426158b8565b108015610feb57506006816000015481548110610f7357610f7361588c565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610fc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe991906158cb565b155b1561100957604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36111c2565b6003600185015460ff16600481111561107957611079615341565b03611189576001840154600684019060ff16600481111561109c5761109c615341565b600481106110ac576110ac61588c565b015460028501546110bd90426158b8565b108015611154575060068160000154815481106110dc576110dc61588c565b600091825260209091200154604051630855bbe960e01b8152600481018790526001600160a01b0390911690630855bbe990602401602060405180830381865afa15801561112e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115291906158cb565b155b1561117257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610dc1565b6004600185015460ff1660048111156111a4576111a4615341565b036111c2576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916112019160ff16906158e8565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061124d90600160481b900460ff16600a6159dd565b61125790846159ec565b6112619190615a19565b90505b92915050565b600080600783815481106112805761128061588c565b60009182526020822060036004909202019081018054919350906112a6906001906158b8565b815481106112b6576112b661588c565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106112eb576112eb61588c565b90600052602060002090600c0201905080600501548260030154101561131657506000949350505050565b80546005805490916001600160601b03169081106113365761133661588c565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061137c5761137c61588c565b60009182526020822060036004909202019081018054919350906113a2906001906158b8565b815481106113b2576113b261588c565b90600052602060002090600b02019050600060068260000154815481106113db576113db61588c565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611430573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114549190615a2d565b9199909850909650945050505050565b6005818154811061147457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600160006114cf6139a5565b8054909150600160401b900460ff16806114f6575080546001600160401b03808416911610155b156115135760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556115478d8d8d8d8d8d8d8d8d8d8d6139c9565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff16156115c157604051636f1dac1d60e01b815260040160405180910390fd5b600080600785815481106115d7576115d761588c565b600091825260209091206004918202019150600182015460ff16600481111561160257611602615341565b1461162057604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106116355761163561588c565b6000918252602082206004600b909202019081015490935091506116598483615a66565b600584015460068501546002860154929350909160009061167b908390615a19565b905060008660010154905060008060068960000154815481106116a0576116a061588c565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156116fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117209190615a79565b9150508060000361173c5783861115611737578395505b61175c565b6117478460026159ec565b86111561175c576117598460026159ec565b95505b60048801869055865b8681101561180857848110156117be576117b76040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613d0c565b9550611800565b6118006040518061010001604052808e81526020018d8152602001848152602001878152602001868152602001858152602001888152602001838152506141ba565b600101611765565b508488600501541461181c57600588018590555b5050505050505050505050565b6000546001600160a01b031633146118545760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61187e614d73565b6005826001600160601b03168154811061189a5761189a61588c565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116118c15750505050509050919050565b6000546001600160a01b0316331461190b5760405163c383977560e01b815260040160405180910390fd5b60095460ff1661192e5760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6004546001600160a01b0316331461198e57604051639d6cab9960e01b815260040160405180910390fd5b6002546119a5906001600160a01b031683836145b7565b505050565b6119b38261467a565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480611a3157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611a25600080516020615cc18339815191525490565b6001600160a01b031614155b15611a4f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611aa9575060408051601f3d908101601f19168201909252611aa691810190615a79565b60015b611ad15781604051630c76093760e01b8152600401611ac89190614ff5565b60405180910390fd5b600080516020615cc18339815191528114611b0257604051632a87526960e21b815260048101829052602401611ac8565b600080516020615cc18339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156119a5576000836001600160a01b031683604051611b699190615a92565b600060405180830381855af49150503d8060008114611ba4576040519150601f19603f3d011682016040523d82523d6000602084013e611ba9565b606091505b5050905080610b0c576040516339b21b5d60e11b815260040160405180910390fd5b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c1a5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615cc183398151915290565b60078181548110611c3d57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611c9f57611c9f61588c565b6000918252602082206003600490920201908101805491935090611cc5906001906158b8565b81548110611cd557611cd561588c565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611d0a57611d0a61588c565b90600052602060002090600c020190508060050154826003015410611da95782546001600160601b031660001901611d4b576001600160ff1b039350611dd6565b6003820154611d5b9060026159ec565b611d66906001615a66565b81546005805490916001600160601b0316908110611d8657611d8661588c565b90600052602060002090600c020160040154611da291906159ec565b9350611dd6565b6003820154611db99060026159ec565b611dc4906001615a66565b8160040154611dd391906159ec565b93505b505050919050565b6000546001600160a01b03163314611e095760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611e249190615a92565b60006040518083038185875af1925050503d8060008114611e61576040519150601f19603f3d011682016040523d82523d6000602084013e611e66565b606091505b5050905080610b0c576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611eac57604051636f1dac1d60e01b815260040160405180910390fd5b6119a533838360006136a1565b6000546001600160a01b03163314611ee45760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f635760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b0316331480159061201b57506000546001600160a01b03163314155b1561203957604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561205d57604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146120c05760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106120de576120de61588c565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015612140575080546005805488926001600160601b031690811061212c5761212c61588c565b90600052602060002090600c020160020154115b1561215e57604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156121d9578660058360010183815481106121855761218561588c565b9060005260206000200154815481106121a0576121a061588c565b90600052602060002090600c02016002015410156121d157604051639717078960e01b815260040160405180910390fd5b600101612161565b5060028101869055805460ff60601b1916600160601b881515021781556003810185905560048082018590556005820184905561221c9060068301908490614d91565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161226096959493929190615aae565b60405180910390a25050505050505050565b6000600783815481106122875761228761588c565b906000526020600020906004020160030182815481106122a9576122a961588c565b90600052602060002090600b020160010154905092915050565b61232960405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6007838154811061233c5761233c61588c565b9060005260206000209060040201600301828154811061235e5761235e61588c565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561240d57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116123ef575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106124645761246461588c565b600091825260209091206004918202019150600182015460ff16600481111561248f5761248f615341565b146124ad57604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156124d85760405163c977f8d360e01b815260040160405180910390fd5b60006124e383611363565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c56906044015b600060405180830381600087803b15801561259757600080fd5b505af11580156125ab573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125df5760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106125fc576125fc61588c565b90600052602060002090600c020160020154111561262d57604051639717078960e01b815260040160405180910390fd5b805160000361264f5760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661267657604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612738578381815181106126c9576126c961588c565b6020026020010151600014806126fc575060065484518590839081106126f1576126f161588c565b602002602001015110155b1561271a57604051633d58a98960e11b815260040160405180910390fd5b61273083858381518110610bc857610bc861588c565b6001016126ae565b5060016000908152600a8201602052604090205460ff1661276c576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516127a4916001840191614dcf565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556127e79060068301908790614d91565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612819918691899101615ae1565b600060405180830381600087803b15801561283357600080fd5b505af1158015612847573d6000803e3d6000fd5b5050505060058b6001600160601b0316815481106128675761286761588c565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906128d7908e908e908e908e908e908e908d90615afa565b60405180910390a35050505050505050505050565b600681815481106128fc57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060006007848154811061292e5761292e61588c565b6000918252602090912060049091020190506003600182015460ff16600481111561295b5761295b615341565b036129b3576002810154815460058054929550916001600160601b039091169081106129895761298961588c565b600091825260209091206009600c90920201015460028201546129ac9190615a66565b91506129bc565b60009250600091505b50915091565b6000546001600160a01b031633146129ed5760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612a1a82613507565b341015612a3a57604051630e3360f160e21b815260040160405180910390fd5b61126183836000346146a8565b6000546001600160a01b03163314612a725760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a9d83611c89565b341015612abd57604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612ad257612ad261588c565b6000918252602090912060049091020190506003600182015460ff166004811115612aff57612aff615341565b14612b1d576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612b33906001906158b8565b81548110612b4357612b4361588c565b90600052602060002090600b020190506006816000015481548110612b6a57612b6a61588c565b6000918252602090912001546001600160a01b03163314612b9e5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612be157612be161588c565b90600052602060002090600c020160050154846003015410612cea576005836001600160601b031681548110612c1957612c1961588c565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612c4c57612c4c61588c565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c7857600191505b84546001600160601b03848116911614612cea57845460038601546001600160601b0390911690612cab906001906158b8565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612d2d57612d2d61588c565b90600052602060002090600c02019050806004015434612d4d9190615a19565b8260030181905550612d6781600201548260030154614983565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d9e916158b8565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612ddc57600080fd5b505af1158015612df0573d6000803e3d6000fd5b505086548454149150612ed690505784546003870154612e12906001906158b8565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e6057612e6061588c565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612ea3918d918d918d9190600401615b77565b600060405180830381600087803b158015612ebd57600080fd5b505af1158015612ed1573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612f4691906158e8565b60405180910390a2505050505050505050565b60008060078381548110612f6f57612f6f61588c565b906000526020600020906004020190508060030160018260030180549050612f9791906158b8565b81548110612fa757612fa761588c565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612fec5760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600080600784815481106130805761308061588c565b906000526020600020906004020190506000600182600301805490506130a691906158b8565b905060008260030182815481106130bf576130bf61588c565b600091825260208220600b909102019150600184015460ff1660048111156130e9576130e9615341565b1461310757604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106131205761312061588c565b6000918252602082200154600a8401546001600160a01b039091169250905b8781108015613155575060038401546006850154105b1561335d5760006001600160a01b03841663d2b8035a8b8461317681615ba7565b95506131829087615a66565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af11580156131c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e99190615bc0565b90506001600160a01b0381166131ff575061313f565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e92613235928692909101615bdd565b600060405180830381600087803b15801561324f57600080fd5b505af1158015613263573d6000803e3d6000fd5b50505060068601546040518c92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916132b0918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036133575760048054604051632e96bc2360e11b81529182018c9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561333e57600080fd5b505af1158015613352573d6000803e3d6000fd5b505050505b5061313f565b8084600a0160008282546133719190615a66565b90915550505060069092015494505050505092915050565b60006133ce8261041b86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061350792505050565b949350505050565b6000546001600160a01b031633146134015760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff1661345c5760405163e51cf7bf60e01b815260040160405180910390fd5b613467858585613389565b82101561348757604051630e3360f160e21b815260040160405180910390fd5b61349c6001600160a01b038416333085614992565b6134b9576040516312171d8360e31b815260040160405180910390fd5b6134fd8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506146a89050565b9695505050505050565b600080600061351584614a6e565b5091509150806005836001600160601b0316815481106135375761353761588c565b90600052602060002090600c0201600401546133ce91906159ec565b6006600061355f6139a5565b8054909150600160401b900460ff1680613586575080546001600160401b03808416911610155b156135a35760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff19909216821717825560098054610100600160a81b0319166101006001600160a01b03871602179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b60006007828154811061363f5761363f61588c565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106136775761367761588c565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b60006001600160601b03841615806136c457506005546001600160601b03851610155b156136dc576136d4826005614af5565b5060006133ce565b821580159061371757506005846001600160601b0316815481106137025761370261588c565b90600052602060002090600c02016002015483105b15613727576136d4826006614af5565b600480546040516303d9595760e31b81526001600160a01b03888116938201939093526001600160601b03871660248201526044810186905260009283928392911690631ecacab8906064016060604051808303816000875af1158015613792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137b69190615bf6565b9194509250905060008160098111156137d1576137d1615341565b141580156137f1575060018160098111156137ee576137ee615341565b14155b1561380c576138008582614af5565b600093505050506133ce565b600181600981111561382057613820615341565b0361383157600193505050506133ce565b821561385e5760025461384f906001600160a01b0316893086614992565b61385e57613800856002614af5565b811561388a5760025461387b906001600160a01b031689846145b7565b61388a57613800856003614af5565b600480546040516355601d6960e11b81526001600160a01b038b8116938201939093526001600160601b038a16602482015260448101869052606481018590526084810189905291169063aac03ad29060a401600060405180830381600087803b1580156138f757600080fd5b505af115801561390b573d6000803e3d6000fd5b5060019b9a5050505050505050505050565b806005846001600160601b03168154811061393a5761393a61588c565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b6139d1614c3e565b600080546001600160a01b03199081166001600160a01b038e81169190911783556001805483168e83161781556002805484168e84161781556003805485168e851617905560048054851688851617905560098054610100600160a81b031916610100888616021790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918b1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c92613adc92889101615ae1565b600060405180830381600087803b158015613af657600080fd5b505af1158015613b0a573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b031916815560408051838152602081019091529093509150508051613b78916001840191602090910190614dcf565b50805460ff60601b1916600160601b881515021781558551600282015560208601516003820155604086015160048083019190915560608701516005830155613bc79060068301908790614d91565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91613bfa91600191899101615ae1565b600060405180830381600087803b158015613c1457600080fd5b505af1158015613c28573d6000803e3d6000fd5b506000925060019150613c389050565b604051908082528060200260200182016040528015613c61578160200160208202803683370190505b509050600181600081518110613c7957613c7961588c565b602090810291909101015281546001600160601b031660017f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee68a8a600060200201518b600160200201518c600260200201518d600360200201518d89604051613ce89796959493929190615afa565b60405180910390a3613cfd600180600161391d565b50505050505050505050505050565b6000806007836000015181548110613d2657613d2661588c565b90600052602060002090600402019050600081600301846020015181548110613d5157613d5161588c565b90600052602060002090600b0201905060006006826000015481548110613d7a57613d7a61588c565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e249190615a79565b9050612710811115613e3557506127105b6000612710613e4483826158b8565b8560010154613e5391906159ec565b613e5d9190615a19565b90506000846006018860e0015181548110613e7a57613e7a61588c565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613ebb918591879101615bdd565b600060405180830381600087803b158015613ed557600080fd5b505af1158015613ee9573d6000803e3d6000fd5b505060048054604051633c85b79360e21b8152600094508493506001600160a01b039091169163f216de4c91613f23918791899101615bdd565b60408051808303816000875af1158015613f41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f659190615c29565b91509150808a60c001818151613f7b9190615a66565b90525060208a01518a516001600160a01b0385167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e788613fba86615c4d565b60098d0154604051613fdc9392916000916001600160a01b0390911690615c69565b60405180910390a48115806140715750895160208b015160e08c015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0387169063ba66fde790606401602060405180830381865afa15801561404b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061406f91906158cb565b155b156140d8576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916140a591879101614ff5565b600060405180830381600087803b1580156140bf57600080fd5b505af11580156140d3573d6000803e3d6000fd5b505050505b60018a606001516140e991906158b8565b8a60e001511480156140fd575060408a0151155b156141a75760098701546000546002890154614126926001600160a01b03908116921690614c65565b60005460c08b0151600254614149926001600160a01b03918216929116906145b7565b5060208a01518a5160c08c015160028a015460098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361419e93909290916001600160a01b0390911690615c8d565b60405180910390a35b50505060c0909601519695505050505050565b600060078260000151815481106141d3576141d361588c565b906000526020600020906004020190506000816003018360200151815481106141fe576141fe61588c565b90600052602060002090600b02019050600060068260000154815481106142275761422761588c565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f69390929161426691615cac565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa1580156142c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142ea9190615a79565b90506127108111156142fb57506127105b60008360060186606001518760e001516143159190615cac565b815481106143255761432561588c565b600091825260208220015460018601546001600160a01b03909116925061434c9084614983565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c79161437e918691869101615bdd565b600060405180830381600087803b15801561439857600080fd5b505af11580156143ac573d6000803e3d6000fd5b5050505060006143cf88604001518960c001516143c99190615a19565b85614983565b9050808660080160008282546143e59190615a66565b92505081905550600061440b896040015188600201546144059190615a19565b86614983565b9050808760070160008282546144219190615a66565b909155505060025461443d906001600160a01b031685846145b7565b506009870154614457906001600160a01b03168583614c65565b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7926144a7928c928a928a9290911690615c69565b60405180910390a46001896060015160026144c291906159ec565b6144cc91906158b8565b8960e00151036145ac57600087600801548a60c001516144ec91906158b8565b905060008860070154896002015461450491906158b8565b90508115158061451357508015155b1561181c57811561453d5760005460025461453b916001600160a01b039182169116846145b7565b505b8015614562576009890154600054614562916001600160a01b03908116911683614c65565b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916128d791879187916001600160a01b0390911690615c8d565b505050505050505050565b6000806000856001600160a01b031685856040516024016145d9929190615bdd565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b1790525161460e9190615a92565b6000604051808303816000865af19150503d806000811461464b576040519150601f19603f3d011682016040523d82523d6000602084013e614650565b606091505b50915091508180156134fd5750805115806134fd5750808060200190518101906134fd91906158cb565b6000546001600160a01b031633146146a55760405163c383977560e01b815260040160405180910390fd5b50565b60008060006146b686614a6e565b92505091506005826001600160601b0316815481106146d7576146d761588c565b60009182526020808320848452600a600c90930201919091019052604090205460ff166147175760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106147a2576147a261588c565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106147d8576147d861588c565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156148235761481e8a8460040154611210565b614829565b82600401545b9050614835818a615a19565b6003808401919091558683556002840154908401546148549190614983565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156148c757600080fd5b505af11580156148db573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016149159493929190615b77565b600060405180830381600087803b15801561492f57600080fd5b505af1158015614943573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b600061271061125783856159ec565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516149f79190615a92565b6000604051808303816000865af19150503d8060008114614a34576040519150601f19603f3d011682016040523d82523d6000602084013e614a39565b606091505b5091509150818015614a63575080511580614a63575080806020019051810190614a6391906158cb565b979650505050505050565b60008060006040845110614ae3575050506020810151604082015160608301516001600160601b0383161580614aaf57506005546001600160601b03841610155b15614ab957600192505b81600003614ac657600391505b801580614ad557506006548110155b15614ade575060015b614aee565b506001915060039050815b9193909250565b6001826001811115614b0957614b09615341565b03614b12575050565b6002816009811115614b2657614b26615341565b03614b4457604051630f323ed960e11b815260040160405180910390fd5b6003816009811115614b5857614b58615341565b03614b765760405163e45e13a360e01b815260040160405180910390fd5b6004816009811115614b8a57614b8a615341565b03614ba857604051631d91d0ed60e31b815260040160405180910390fd5b6005816009811115614bbc57614bbc615341565b03614bda57604051637c84af5160e01b815260040160405180910390fd5b6006816009811115614bee57614bee615341565b03614c0c57604051630caac6b360e31b815260040160405180910390fd5b6009816009811115614c2057614c20615341565b03611bcb57604051633e57962f60e21b815260040160405180910390fd5b614c46614ca8565b614c6357604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b038316614c94576009546119a5906001600160a01b0384811691849161010090910416614cc2565b610b0c6001600160a01b03841683836145b7565b6000614cb26139a5565b54600160401b900460ff16919050565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015614cf157505050565b806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015614d2c57600080fd5b505af1158015614d40573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516935063a9059cbb925061257d915086908690600401615bdd565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614dbf579160200282015b82811115614dbf578251825591602001919060010190614da4565b50614dcb929150614e09565b5090565b828054828255906000526020600020908101928215614dbf5791602002820182811115614dbf578251825591602001919060010190614da4565b5b80821115614dcb5760008155600101614e0a565b6001600160a01b03811681146146a557600080fd5b8035614e3e81614e1e565b919050565b600060208284031215614e5557600080fd5b8135614e6081614e1e565b9392505050565b80356001600160601b0381168114614e3e57600080fd5b600080600060608486031215614e9357600080fd5b8335614e9e81614e1e565b9250614eac60208501614e67565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614efb57614efb614ebd565b604052919050565b600082601f830112614f1457600080fd5b81356001600160401b03811115614f2d57614f2d614ebd565b8060051b614f3d60208201614ed3565b91825260208185018101929081019086841115614f5957600080fd5b6020860192505b838310156134fd578235825260209283019290910190614f60565b80151581146146a557600080fd5b8035614e3e81614f7b565b600080600060608486031215614fa957600080fd5b614fb284614e67565b925060208401356001600160401b03811115614fcd57600080fd5b614fd986828701614f03565b9250506040840135614fea81614f7b565b809150509250925092565b6001600160a01b0391909116815260200190565b60006020828403121561501b57600080fd5b5035919050565b6000806040838503121561503557600080fd5b823561504081614e1e565b946020939093013593505050565b600082601f83011261505f57600080fd5b604051608081016001600160401b038111828210171561508157615081614ebd565b60405280608084018581111561509657600080fd5b845b818110156150b0578035835260209283019201615098565b509195945050505050565b600082601f8301126150cc57600080fd5b81356001600160401b038111156150e5576150e5614ebd565b6150f8601f8201601f1916602001614ed3565b81815284602083860101111561510d57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e03121561514c57600080fd5b8b3561515781614e1e565b9a5060208c013561516781614e1e565b995061517560408d01614e33565b985061518360608d01614e33565b975061519160808d01614e33565b965061519f60a08d01614f89565b95506151ae8d60c08e0161504e565b94506151be8d6101408e0161504e565b93506101c08c01356001600160401b038111156151da57600080fd5b6151e68e828f016150bb565b9350506151f66101e08d01614e33565b91506152056102008d01614e33565b90509295989b509295989b9093969950565b60008060006060848603121561522c57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561525557600080fd5b61126182614e67565b8060005b6004811015610b0c578151845260209384019390910190600101615262565b60808101611264828461525e565b600080604083850312156152a257600080fd5b82356152ad81614e1e565b915060208301356001600160401b038111156152c857600080fd5b6152d4858286016150bb565b9150509250929050565b60005b838110156152f95781810151838201526020016152e1565b50506000910152565b6000815180845261531a8160208601602086016152de565b601f01601f19169290920160200192915050565b6020815260006112616020830184615302565b634e487b7160e01b600052602160045260246000fd5b6005811061537557634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016153a56040830186615357565b9215156060820152608001529392505050565b6000806000606084860312156153cd57600080fd5b83356153d881614e1e565b92506020840135915060408401356001600160401b038111156153fa57600080fd5b615406868287016150bb565b9150509250925092565b6000806040838503121561542357600080fd5b61504083614e67565b6000806040838503121561543f57600080fd5b823561544a81614e1e565b9150602083013561545a81614f7b565b809150509250929050565b60008060006060848603121561547a57600080fd5b833561548581614e1e565b925060208401356001600160401b03811681146154a157600080fd5b9150604084013560ff81168114614fea57600080fd5b6000806000806000806000610140888a0312156154d357600080fd5b6154dc88614e67565b965060208801356154ec81614f7b565b955060408801359450606088013593506080880135925060a088013591506155178960c08a0161504e565b905092959891949750929550565b6000806040838503121561553857600080fd5b50508035926020909101359150565b600081518084526020840193506020830160005b828110156155825781516001600160a01b031686526020958601959091019060010161555b565b5093949350505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c083015161016060e08401526155e6610180840182615547565b905060e084015161010084015261010084015161012084015261012084015161561b6101408501826001600160a01b03169052565b506101408401516101608401528091505092915050565b60008060008060008060008060006101808a8c03121561565157600080fd5b61565a8a614e67565b985060208a013561566a81614f7b565b975060408a0135965060608a0135955060808a0135945060a08a013593506156958b60c08c0161504e565b92506101408a01356001600160401b038111156156b157600080fd5b6156bd8c828d016150bb565b9250506101608a01356001600160401b038111156156da57600080fd5b6156e68c828d01614f03565b9150509295985092959850929598565b6000806040838503121561570957600080fd5b8235915060208301356001600160401b038111156152c857600080fd5b60008060006060848603121561573b57600080fd5b833592506020840135915060408401356001600160401b038111156153fa57600080fd5b60008083601f84011261577157600080fd5b5081356001600160401b0381111561578857600080fd5b6020830191508360208285010111156157a057600080fd5b9250929050565b6000806000604084860312156157bc57600080fd5b83356001600160401b038111156157d257600080fd5b6157de8682870161575f565b9094509250506020840135614fea81614e1e565b60008060008060006080868803121561580a57600080fd5b8535945060208601356001600160401b0381111561582757600080fd5b6158338882890161575f565b909550935050604086013561584781614e1e565b949793965091946060013592915050565b60006020828403121561586a57600080fd5b81356001600160401b0381111561588057600080fd5b6133ce848285016150bb565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611264576112646158a2565b6000602082840312156158dd57600080fd5b8151614e6081614f7b565b602081016112648284615357565b6001815b600184111561593157808504811115615915576159156158a2565b600184161561592357908102905b60019390931c9280026158fa565b935093915050565b60008261594857506001611264565b8161595557506000611264565b816001811461596b576002811461597557615991565b6001915050611264565b60ff841115615986576159866158a2565b50506001821b611264565b5060208310610133831016604e8410600b84101617156159b4575081810a611264565b6159c160001984846158f6565b80600019048211156159d5576159d56158a2565b029392505050565b600061126160ff841683615939565b8082028115828204841417611264576112646158a2565b634e487b7160e01b600052601260045260246000fd5b600082615a2857615a28615a03565b500490565b600080600060608486031215615a4257600080fd5b83516020850151909350615a5581614f7b565b6040850151909250614fea81614f7b565b80820180821115611264576112646158a2565b600060208284031215615a8b57600080fd5b5051919050565b60008251615aa48184602087016152de565b9190910192915050565b6000610120820190508715158252866020830152856040830152846060830152836080830152614a6360a083018461525e565b8281526040602082015260006133ce6040830184615302565b600061014082018915158352886020840152876040840152866060840152856080840152615b2b60a084018661525e565b610140610120840152835190819052602084019061016084019060005b81811015615b66578351835260209384019390920191600101615b48565b50909b9a5050505050505050505050565b848152836020820152608060408201526000615b966080830185615302565b905082606083015295945050505050565b600060018201615bb957615bb96158a2565b5060010190565b600060208284031215615bd257600080fd5b8151614e6081614e1e565b6001600160a01b03929092168252602082015260400190565b600080600060608486031215615c0b57600080fd5b8351602085015160408601519194509250600a8110614fea57600080fd5b60008060408385031215615c3c57600080fd5b505080516020909101519092909150565b6000600160ff1b8201615c6257615c626158a2565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615cbb57615cbb615a03565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220a4155dec443a9c5d136f16c8c11bf35431e34b7e440060d5ff361d5e1f88354264736f6c634300081c0033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "AcceptedFeeToken(address,bool)": { - "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", - "params": { - "_accepted": "Whether the token is accepted or not.", - "_token": "The ERC20 token." - } - }, - "DisputeCreation(uint256,address)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_arbitrable": "The contract which created the dispute.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "NewCurrencyRate(address,uint64,uint8)": { - "details": "To be emitted when the fee for a particular ERC20 token is updated.", - "params": { - "_feeToken": "The ERC20 token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrable": "The arbitrable receiving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "addNewDisputeKit(address)": { - "details": "Add a new supported dispute kit module to the court.", - "params": { - "_disputeKitAddress": "The address of the dispute kit contract." - } - }, - "appeal(uint256,uint256,bytes)": { - "details": "Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.", - "params": { - "_disputeID": "The ID of the dispute.", - "_extraData": "Extradata for the dispute. Can be required during court jump.", - "_numberOfChoices": "Number of choices for the dispute. Can be required during court jump." - } - }, - "appealCost(uint256)": { - "details": "Gets the cost of appealing a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "cost": "The appeal cost." - } - }, - "appealPeriod(uint256)": { - "details": "Gets the start and the end of a specified dispute's current appeal period.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "end": "The end of the appeal period.", - "start": "The start of the appeal period." - } - }, - "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." - }, - "returns": { - "cost": "The arbitration cost in ETH." - } - }, - "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeToken": "The ERC20 token used to pay fees." - }, - "returns": { - "cost": "The arbitration cost in `_feeToken`." - } - }, - "changeAcceptedFeeTokens(address,bool)": { - "details": "Changes the supported fee tokens.", - "params": { - "_accepted": "Whether the token is supported or not as a method of fee payment.", - "_feeToken": "The fee token." - } - }, - "changeCurrencyRates(address,uint64,uint8)": { - "details": "Changes the currency rate of a fee token.", - "params": { - "_feeToken": "The fee token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "changeGuardian(address)": { - "details": "Changes the `guardian` storage variable.", - "params": { - "_guardian": "The new value for the `guardian` storage variable." - } - }, - "changeJurorProsecutionModule(address)": { - "details": "Changes the `jurorProsecutionModule` storage variable.", - "params": { - "_jurorProsecutionModule": "The new value for the `jurorProsecutionModule` storage variable." - } - }, - "changePinakion(address)": { - "details": "Changes the `pinakion` storage variable.", - "params": { - "_pinakion": "The new value for the `pinakion` storage variable." - } - }, - "changeSortitionModule(address)": { - "details": "Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.", - "params": { - "_sortitionModule": "The new value for the `sortitionModule` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],bytes,uint256[])": { - "details": "Creates a court under a specified parent court.", - "params": { - "_alpha": "The `alpha` property value of the court.", - "_feeForJuror": "The `feeForJuror` property value of the court.", - "_hiddenVotes": "The `hiddenVotes` property value of the court.", - "_jurorsForCourtJump": "The `jurorsForCourtJump` property value of the court.", - "_minStake": "The `minStake` property value of the court.", - "_parent": "The `parent` property value of the court.", - "_sortitionExtraData": "Extra data for sortition module.", - "_supportedDisputeKits": "Indexes of dispute kits that this court will support.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the court." - } - }, - "createDispute(uint256,bytes)": { - "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "createDispute(uint256,bytes,address,uint256)": { - "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeAmount": "Amount of the ERC20 token used to pay fees.", - "_feeToken": "The ERC20 token used to pay fees.", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "overridden": "Whether the ruling was overridden by appeal funding or not.", - "ruling": "The current ruling.", - "tied": "Whether it's a tie or not." - } - }, - "draw(uint256,uint256)": { - "details": "Draws jurors for the dispute. Can be called in parts.", - "params": { - "_disputeID": "The ID of the dispute.", - "_iterations": "The number of iterations to run." - }, - "returns": { - "nbDrawnJurors": "The total number of jurors drawn in the round." - } - }, - "enableDisputeKits(uint96,uint256[],bool)": { - "details": "Adds/removes court's support for specified dispute kits.", - "params": { - "_courtID": "The ID of the court.", - "_disputeKitIDs": "The IDs of dispute kits which support should be added/removed.", - "_enable": "Whether add or remove the dispute kits from the court." - } - }, - "execute(uint256,uint256,uint256)": { - "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts. Note: Reward distributions are forbidden during pause.", - "params": { - "_disputeID": "The ID of the dispute.", - "_iterations": "The number of iterations to run.", - "_round": "The appeal round." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "executeRuling(uint256)": { - "details": "Executes a specified dispute's ruling.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getNumberOfRounds(uint256)": { - "details": "Gets the number of rounds for a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "_0": "The number of rounds." - } - }, - "getNumberOfVotes(uint256)": { - "details": "Gets the number of votes permitted for the specified dispute in the latest round.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "getPnkAtStakePerJuror(uint256,uint256)": { - "details": "Gets the PNK at stake per juror for a specified dispute and round.", - "params": { - "_disputeID": "The ID of the dispute.", - "_round": "The round to get the info for." - }, - "returns": { - "_0": "pnkAtStakePerJuror The PNK at stake per juror." - } - }, - "getRoundInfo(uint256,uint256)": { - "details": "Gets the round info for a specified dispute and round.This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.", - "params": { - "_disputeID": "The ID of the dispute.", - "_round": "The round to get the info for." - }, - "returns": { - "_0": "round The round info." - } - }, - "getTimesPerPeriod(uint96)": { - "details": "Gets the timesPerPeriod array for a given court.", - "params": { - "_courtID": "The ID of the court to get the times from." - }, - "returns": { - "timesPerPeriod": "The timesPerPeriod array for the given court." - } - }, - "initialize(address,address,address,address,address,bool,uint256[4],uint256[4],bytes,address,address)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", - "_disputeKit": "The address of the default dispute kit.", - "_governor": "The governor's address.", - "_guardian": "The guardian's address.", - "_hiddenVotes": "The `hiddenVotes` property value of the general court.", - "_jurorProsecutionModule": "The address of the juror prosecution module.", - "_pinakion": "The address of the token contract.", - "_sortitionExtraData": "The extra data for sortition module.", - "_sortitionModuleAddress": "The sortition module responsible for sortition of the jurors.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the general court.", - "_wNative": "The wrapped native token address, typically wETH." - } - }, - "isDisputeKitJumping(uint256)": { - "details": "Returns true if the dispute kit will be switched to a parent DK.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "_0": "Whether DK will be switched or not." - } - }, - "isSupported(uint96,uint256)": { - "details": "Checks if a given dispute kit is supported by a given court.", - "params": { - "_courtID": "The ID of the court to check the support for.", - "_disputeKitID": "The ID of the dispute kit to check the support for." - }, - "returns": { - "_0": "Whether the dispute kit is supported or not." - } - }, - "passPeriod(uint256)": { - "details": "Passes the period of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - } - }, - "pause()": { - "details": "Pause staking and reward execution. Can only be done by guardian or governor." - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setStake(uint96,uint256)": { - "details": "Sets the caller's stake in a court.", - "params": { - "_courtID": "The ID of the court.", - "_newStake": "The new stake. Note that the existing delayed stake will be nullified as non-relevant." - } - }, - "setStakeBySortitionModule(address,uint96,uint256)": { - "details": "Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.", - "params": { - "_account": "The account whose stake is being set.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake." - } - }, - "transferBySortitionModule(address,uint256)": { - "details": "Transfers PNK to the juror by SortitionModule.", - "params": { - "_account": "The account of the juror whose PNK to transfer.", - "_amount": "The amount to transfer." - } - }, - "unpause()": { - "details": "Unpause staking and reward execution. Can only be done by governor." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "KlerosCore Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 449, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 451, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "guardian", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 454, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "pinakion", - "offset": 0, - "slot": "2", - "type": "t_contract(IERC20)77" - }, - { - "astId": 456, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "jurorProsecutionModule", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 459, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "sortitionModule", - "offset": 0, - "slot": "4", - "type": "t_contract(ISortitionModule)9946" - }, - { - "astId": 463, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "courts", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(Court)368_storage)dyn_storage" - }, - { - "astId": 467, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "disputeKits", - "offset": 0, - "slot": "6", - "type": "t_array(t_contract(IDisputeKit)9795)dyn_storage" - }, - { - "astId": 471, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "disputes", - "offset": 0, - "slot": "7", - "type": "t_array(t_struct(Dispute)385_storage)dyn_storage" - }, - { - "astId": 477, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "currencyRates", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_contract(IERC20)77,t_struct(CurrencyRate)434_storage)" - }, - { - "astId": 479, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "paused", - "offset": 0, - "slot": "9", - "type": "t_bool" - }, - { - "astId": 481, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "wNative", - "offset": 1, - "slot": "9", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "base": "t_address", - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_contract(IDisputeKit)9795)dyn_storage": { - "base": "t_contract(IDisputeKit)9795", - "encoding": "dynamic_array", - "label": "contract IDisputeKit[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Court)368_storage)dyn_storage": { - "base": "t_struct(Court)368_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Court[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Dispute)385_storage)dyn_storage": { - "base": "t_struct(Dispute)385_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)410_storage)dyn_storage": { - "base": "t_struct(Round)410_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)4_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[4]", - "numberOfBytes": "128" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IArbitrableV2)9544": { - "encoding": "inplace", - "label": "contract IArbitrableV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeKit)9795": { - "encoding": "inplace", - "label": "contract IDisputeKit", - "numberOfBytes": "20" - }, - "t_contract(IERC20)77": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_contract(ISortitionModule)9946": { - "encoding": "inplace", - "label": "contract ISortitionModule", - "numberOfBytes": "20" - }, - "t_enum(Period)342": { - "encoding": "inplace", - "label": "enum KlerosCoreBase.Period", - "numberOfBytes": "1" - }, - "t_mapping(t_contract(IERC20)77,t_struct(CurrencyRate)434_storage)": { - "encoding": "mapping", - "key": "t_contract(IERC20)77", - "label": "mapping(contract IERC20 => struct KlerosCoreBase.CurrencyRate)", - "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)434_storage" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_struct(Court)368_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Court", - "members": [ - { - "astId": 344, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "parent", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 346, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "hiddenVotes", - "offset": 12, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 349, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "children", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 351, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "minStake", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 353, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "alpha", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 355, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "feeForJuror", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 357, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "jurorsForCourtJump", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 361, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "timesPerPeriod", - "offset": 0, - "slot": "6", - "type": "t_array(t_uint256)4_storage" - }, - { - "astId": 365, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "supportedDisputeKits", - "offset": 0, - "slot": "10", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 367, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "disabled", - "offset": 0, - "slot": "11", - "type": "t_bool" - } - ], - "numberOfBytes": "384" - }, - "t_struct(CurrencyRate)434_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.CurrencyRate", - "members": [ - { - "astId": 429, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "feePaymentAccepted", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 431, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "rateInEth", - "offset": 1, - "slot": "0", - "type": "t_uint64" - }, - { - "astId": 433, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "rateDecimals", - "offset": 9, - "slot": "0", - "type": "t_uint8" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Dispute)385_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Dispute", - "members": [ - { - "astId": 370, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "courtID", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 373, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "arbitrated", - "offset": 12, - "slot": "0", - "type": "t_contract(IArbitrableV2)9544" - }, - { - "astId": 376, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "period", - "offset": 0, - "slot": "1", - "type": "t_enum(Period)342" - }, - { - "astId": 378, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "ruled", - "offset": 1, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 380, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "lastPeriodChange", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 384, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "rounds", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(Round)410_storage)dyn_storage" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Round)410_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Round", - "members": [ - { - "astId": 387, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "disputeKitID", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 389, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "pnkAtStakePerJuror", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 391, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "totalFeesForJurors", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 393, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "nbVotes", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 395, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "repartitions", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 397, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "pnkPenalties", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 400, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "drawnJurors", - "offset": 0, - "slot": "6", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 402, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "sumFeeRewardPaid", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 404, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "sumPnkRewardPaid", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 407, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "feeToken", - "offset": 0, - "slot": "9", - "type": "t_contract(IERC20)77" - }, - { - "astId": 409, - "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "drawIterations", - "offset": 0, - "slot": "10", - "type": "t_uint256" - } - ], - "numberOfBytes": "352" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint64": { - "encoding": "inplace", - "label": "uint64", - "numberOfBytes": "8" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json deleted file mode 100644 index 7b0fa00d0..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "transactionIndex": 2, - "gasUsed": "579894", - "logsBloom": "0x00000000000000000000000020000000000008000000000000000000020000000000000000000000000008000000000000000200000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000400020000000000000010000800402000000000000000000000000004000000800000000000000800000000000000000000000080000000000004000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001000000200000000000000000000000000000000000000000000000000", - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b", - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175286093, - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000eeebbbff8f377dcfc7d4f7876c531db0d22720e1" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b" - }, - { - "transactionIndex": 2, - "blockNumber": 175286093, - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "topics": [ - "0x550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b" - }, - { - "transactionIndex": 2, - "blockNumber": 175286093, - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b" - }, - { - "transactionIndex": 2, - "blockNumber": 175286093, - "transactionHash": "0x0ae7adc55a2c6b31434c898d9a8dafc2a6e074bed9b39bd33e484141a8adbf2d", - "address": "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0xc9efac5f4036a1285e678e1a2b602cf6dd86473dec70415d18d97ae37652644b" - } - ], - "blockNumber": 175286093, - "cumulativeGasUsed": "626786", - "status": 1, - "byzantium": true - }, - "args": [ - "0x0d91F523fA287A74698A0e6Cd6A2436E91b9BEB9", - "0x7b4f3cc5000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa2250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eeebbbff8f377dcfc7d4f7876c531db0d22720e1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000002000000000000000000000000006f24a90fbbeabb2b4343bb9c1ed8ee6acaa5066300000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122013d7994215e0250a3caf5a61db41d7e3f7d36bd4d6c352ddb4eb5213b4783ea264736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122013d7994215e0250a3caf5a61db41d7e3f7d36bd4d6c352ddb4eb5213b4783ea264736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosV2NeoEarlyUser.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosV2NeoEarlyUser.json deleted file mode 100644 index 64ab1ae2f..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosV2NeoEarlyUser.json +++ /dev/null @@ -1,594 +0,0 @@ -{ - "address": "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "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": "address", - "name": "_newOwner", - "type": "address" - } - ], - "name": "changeOwner", - "outputs": [], - "stateMutability": "nonpayable", - "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": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "safeMint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "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" - } - ], - "transactionHash": "0x2dcc10115b4aa779adb3a473c51b9ca97f18d2e7511977d400c42c484831322c", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", - "transactionIndex": 5, - "gasUsed": "1949558", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7597d86cf77afb8f7808362cf2fb41021c4b9670d7e2ccb04220d1169774c656", - "transactionHash": "0x2dcc10115b4aa779adb3a473c51b9ca97f18d2e7511977d400c42c484831322c", - "logs": [], - "blockNumber": 21128478, - "cumulativeGasUsed": "18973249", - "status": 1, - "byzantium": true - }, - "args": [ - "Kleros V2 Neo Early User", - "KlerosV2NeoEarlyUser" - ], - "numDeployments": 1, - "solcInputHash": "db363a789eea4155c2105a5d4adf4ddb", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"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\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"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\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `owner` enables `approved` to manage the `tokenId` token.\"},\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `tokenId` token is transferred from `from` to `to`.\"}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/TestERC721.sol\":\"TestERC721\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"src/token/TestERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\n\\ncontract TestERC721 is ERC721 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public owner;\\n uint256 private _nextTokenId;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {\\n owner = msg.sender;\\n }\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier ownerOnly() {\\n require(msg.sender == owner, \\\"Owner only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeOwner(address _newOwner) external ownerOnly {\\n owner = _newOwner;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function safeMint(address to) external ownerOnly {\\n uint256 tokenId = _nextTokenId++;\\n _safeMint(to, tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x5ad5b5aef2598b16a383ffc1c6ac688321326538bccc2d047369290a2e707dcb\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040516200168638038062001686833981016040819052620000349162000136565b818160006200004483826200022f565b5060016200005382826200022f565b5050600680546001600160a01b0319163317905550620002fb915050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200009957600080fd5b81516001600160401b0380821115620000b657620000b662000071565b604051601f8301601f19908116603f01168101908282118183101715620000e157620000e162000071565b81604052838152602092508683858801011115620000fe57600080fd5b600091505b8382101562000122578582018301518183018401529082019062000103565b600093810190920192909252949350505050565b600080604083850312156200014a57600080fd5b82516001600160401b03808211156200016257600080fd5b620001708683870162000087565b935060208501519150808211156200018757600080fd5b50620001968582860162000087565b9150509250929050565b600181811c90821680620001b557607f821691505b602082108103620001d657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200022a57600081815260208120601f850160051c81016020861015620002055750805b601f850160051c820191505b81811015620002265782815560010162000211565b5050505b505050565b81516001600160401b038111156200024b576200024b62000071565b62000263816200025c8454620001a0565b84620001dc565b602080601f8311600181146200029b5760008415620002825750858301515b600019600386901b1c1916600185901b17855562000226565b600085815260208120601f198616915b82811015620002cc57888601518255948401946001909101908401620002ab565b5085821015620002eb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61137b806200030b6000396000f3fe608060405234801561001057600080fd5b50600436106100e05760003560e01c806370a082311161008757806370a08231146101ae5780638da5cb5b146101cf57806395d89b41146101e2578063a22cb465146101ea578063a6f9dae1146101fd578063b88d4fde14610210578063c87b56dd14610223578063e985e9c51461023657600080fd5b806301ffc9a7146100e557806306fdde031461010d578063081812fc14610122578063095ea7b31461014d57806323b872dd1461016257806340d097c31461017557806342842e0e146101885780636352211e1461019b575b600080fd5b6100f86100f3366004610e53565b610249565b60405190151581526020015b60405180910390f35b61011561029b565b6040516101049190610ec0565b610135610130366004610ed3565b61032d565b6040516001600160a01b039091168152602001610104565b61016061015b366004610f08565b610354565b005b610160610170366004610f32565b61046e565b610160610183366004610f6e565b61049f565b610160610196366004610f32565b6104ee565b6101356101a9366004610ed3565b610509565b6101c16101bc366004610f6e565b61053e565b604051908152602001610104565b600654610135906001600160a01b031681565b6101156105c4565b6101606101f8366004610f89565b6105d3565b61016061020b366004610f6e565b6105de565b61016061021e366004610fdb565b61062a565b610115610231366004610ed3565b610662565b6100f86102443660046110b7565b6106d6565b60006001600160e01b031982166380ac58cd60e01b148061027a57506001600160e01b03198216635b5e139f60e01b145b8061029557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600080546102aa906110ea565b80601f01602080910402602001604051908101604052809291908181526020018280546102d6906110ea565b80156103235780601f106102f857610100808354040283529160200191610323565b820191906000526020600020905b81548152906001019060200180831161030657829003601f168201915b5050505050905090565b600061033882610704565b506000908152600460205260409020546001600160a01b031690565b600061035f82610509565b9050806001600160a01b0316836001600160a01b0316036103d15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103ed57506103ed81336106d6565b61045f5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103c8565b610469838361072c565b505050565b610478338261079a565b6104945760405162461bcd60e51b81526004016103c890611124565b6104698383836107f9565b6006546001600160a01b031633146104c95760405162461bcd60e51b81526004016103c890611171565b60078054600091826104da83611195565b9190505590506104ea828261095d565b5050565b6104698383836040518060200160405280600081525061062a565b6000818152600260205260408120546001600160a01b0316806102955760405162461bcd60e51b81526004016103c8906111bc565b60006001600160a01b0382166105a85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103c8565b506001600160a01b031660009081526003602052604090205490565b6060600180546102aa906110ea565b6104ea338383610977565b6006546001600160a01b031633146106085760405162461bcd60e51b81526004016103c890611171565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b610634338361079a565b6106505760405162461bcd60e51b81526004016103c890611124565b61065c84848484610a41565b50505050565b606061066d82610704565b600061068460408051602081019091526000815290565b905060008151116106a457604051806020016040528060008152506106cf565b806106ae84610a74565b6040516020016106bf9291906111ee565b6040516020818303038152906040525b9392505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61070d81610b07565b6107295760405162461bcd60e51b81526004016103c8906111bc565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061076182610509565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806107a683610509565b9050806001600160a01b0316846001600160a01b031614806107cd57506107cd81856106d6565b806107f15750836001600160a01b03166107e68461032d565b6001600160a01b0316145b949350505050565b826001600160a01b031661080c82610509565b6001600160a01b0316146108325760405162461bcd60e51b81526004016103c89061121d565b6001600160a01b0382166108945760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103c8565b826001600160a01b03166108a782610509565b6001600160a01b0316146108cd5760405162461bcd60e51b81526004016103c89061121d565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6104ea828260405180602001604052806000815250610b24565b816001600160a01b0316836001600160a01b0316036109d45760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016103c8565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610a4c8484846107f9565b610a5884848484610b57565b61065c5760405162461bcd60e51b81526004016103c890611262565b60606000610a8183610c58565b600101905060008167ffffffffffffffff811115610aa157610aa1610fc5565b6040519080825280601f01601f191660200182016040528015610acb576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610ad557509392505050565b6000908152600260205260409020546001600160a01b0316151590565b610b2e8383610d30565b610b3b6000848484610b57565b6104695760405162461bcd60e51b81526004016103c890611262565b60006001600160a01b0384163b15610c4d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610b9b9033908990889088906004016112b4565b6020604051808303816000875af1925050508015610bd6575060408051601f3d908101601f19168201909252610bd3918101906112f1565b60015b610c33573d808015610c04576040519150601f19603f3d011682016040523d82523d6000602084013e610c09565b606091505b508051600003610c2b5760405162461bcd60e51b81526004016103c890611262565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107f1565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610c975772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610cc3576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610ce157662386f26fc10000830492506010015b6305f5e1008310610cf9576305f5e100830492506008015b6127108310610d0d57612710830492506004015b60648310610d1f576064830492506002015b600a83106102955760010192915050565b6001600160a01b038216610d865760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016103c8565b610d8f81610b07565b15610dac5760405162461bcd60e51b81526004016103c89061130e565b610db581610b07565b15610dd25760405162461bcd60e51b81526004016103c89061130e565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461072957600080fd5b600060208284031215610e6557600080fd5b81356106cf81610e3d565b60005b83811015610e8b578181015183820152602001610e73565b50506000910152565b60008151808452610eac816020860160208601610e70565b601f01601f19169290920160200192915050565b6020815260006106cf6020830184610e94565b600060208284031215610ee557600080fd5b5035919050565b80356001600160a01b0381168114610f0357600080fd5b919050565b60008060408385031215610f1b57600080fd5b610f2483610eec565b946020939093013593505050565b600080600060608486031215610f4757600080fd5b610f5084610eec565b9250610f5e60208501610eec565b9150604084013590509250925092565b600060208284031215610f8057600080fd5b6106cf82610eec565b60008060408385031215610f9c57600080fd5b610fa583610eec565b915060208301358015158114610fba57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610ff157600080fd5b610ffa85610eec565b935061100860208601610eec565b925060408501359150606085013567ffffffffffffffff8082111561102c57600080fd5b818701915087601f83011261104057600080fd5b81358181111561105257611052610fc5565b604051601f8201601f19908116603f0116810190838211818310171561107a5761107a610fc5565b816040528281528a602084870101111561109357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156110ca57600080fd5b6110d383610eec565b91506110e160208401610eec565b90509250929050565b600181811c908216806110fe57607f821691505b60208210810361111e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b6020808252600a90820152694f776e6572206f6e6c7960b01b604082015260600190565b6000600182016111b557634e487b7160e01b600052601160045260246000fd5b5060010190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b60008351611200818460208801610e70565b835190830190611214818360208801610e70565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906112e790830184610e94565b9695505050505050565b60006020828403121561130357600080fd5b81516106cf81610e3d565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060408201526060019056fea2646970667358221220124927ec635664d406c8f2c9da77971edac68ac87ad1da1b200f6538c3bd88a864736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100e05760003560e01c806370a082311161008757806370a08231146101ae5780638da5cb5b146101cf57806395d89b41146101e2578063a22cb465146101ea578063a6f9dae1146101fd578063b88d4fde14610210578063c87b56dd14610223578063e985e9c51461023657600080fd5b806301ffc9a7146100e557806306fdde031461010d578063081812fc14610122578063095ea7b31461014d57806323b872dd1461016257806340d097c31461017557806342842e0e146101885780636352211e1461019b575b600080fd5b6100f86100f3366004610e53565b610249565b60405190151581526020015b60405180910390f35b61011561029b565b6040516101049190610ec0565b610135610130366004610ed3565b61032d565b6040516001600160a01b039091168152602001610104565b61016061015b366004610f08565b610354565b005b610160610170366004610f32565b61046e565b610160610183366004610f6e565b61049f565b610160610196366004610f32565b6104ee565b6101356101a9366004610ed3565b610509565b6101c16101bc366004610f6e565b61053e565b604051908152602001610104565b600654610135906001600160a01b031681565b6101156105c4565b6101606101f8366004610f89565b6105d3565b61016061020b366004610f6e565b6105de565b61016061021e366004610fdb565b61062a565b610115610231366004610ed3565b610662565b6100f86102443660046110b7565b6106d6565b60006001600160e01b031982166380ac58cd60e01b148061027a57506001600160e01b03198216635b5e139f60e01b145b8061029557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600080546102aa906110ea565b80601f01602080910402602001604051908101604052809291908181526020018280546102d6906110ea565b80156103235780601f106102f857610100808354040283529160200191610323565b820191906000526020600020905b81548152906001019060200180831161030657829003601f168201915b5050505050905090565b600061033882610704565b506000908152600460205260409020546001600160a01b031690565b600061035f82610509565b9050806001600160a01b0316836001600160a01b0316036103d15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103ed57506103ed81336106d6565b61045f5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103c8565b610469838361072c565b505050565b610478338261079a565b6104945760405162461bcd60e51b81526004016103c890611124565b6104698383836107f9565b6006546001600160a01b031633146104c95760405162461bcd60e51b81526004016103c890611171565b60078054600091826104da83611195565b9190505590506104ea828261095d565b5050565b6104698383836040518060200160405280600081525061062a565b6000818152600260205260408120546001600160a01b0316806102955760405162461bcd60e51b81526004016103c8906111bc565b60006001600160a01b0382166105a85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103c8565b506001600160a01b031660009081526003602052604090205490565b6060600180546102aa906110ea565b6104ea338383610977565b6006546001600160a01b031633146106085760405162461bcd60e51b81526004016103c890611171565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b610634338361079a565b6106505760405162461bcd60e51b81526004016103c890611124565b61065c84848484610a41565b50505050565b606061066d82610704565b600061068460408051602081019091526000815290565b905060008151116106a457604051806020016040528060008152506106cf565b806106ae84610a74565b6040516020016106bf9291906111ee565b6040516020818303038152906040525b9392505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61070d81610b07565b6107295760405162461bcd60e51b81526004016103c8906111bc565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061076182610509565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806107a683610509565b9050806001600160a01b0316846001600160a01b031614806107cd57506107cd81856106d6565b806107f15750836001600160a01b03166107e68461032d565b6001600160a01b0316145b949350505050565b826001600160a01b031661080c82610509565b6001600160a01b0316146108325760405162461bcd60e51b81526004016103c89061121d565b6001600160a01b0382166108945760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103c8565b826001600160a01b03166108a782610509565b6001600160a01b0316146108cd5760405162461bcd60e51b81526004016103c89061121d565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6104ea828260405180602001604052806000815250610b24565b816001600160a01b0316836001600160a01b0316036109d45760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016103c8565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610a4c8484846107f9565b610a5884848484610b57565b61065c5760405162461bcd60e51b81526004016103c890611262565b60606000610a8183610c58565b600101905060008167ffffffffffffffff811115610aa157610aa1610fc5565b6040519080825280601f01601f191660200182016040528015610acb576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610ad557509392505050565b6000908152600260205260409020546001600160a01b0316151590565b610b2e8383610d30565b610b3b6000848484610b57565b6104695760405162461bcd60e51b81526004016103c890611262565b60006001600160a01b0384163b15610c4d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610b9b9033908990889088906004016112b4565b6020604051808303816000875af1925050508015610bd6575060408051601f3d908101601f19168201909252610bd3918101906112f1565b60015b610c33573d808015610c04576040519150601f19603f3d011682016040523d82523d6000602084013e610c09565b606091505b508051600003610c2b5760405162461bcd60e51b81526004016103c890611262565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107f1565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610c975772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610cc3576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610ce157662386f26fc10000830492506010015b6305f5e1008310610cf9576305f5e100830492506008015b6127108310610d0d57612710830492506004015b60648310610d1f576064830492506002015b600a83106102955760010192915050565b6001600160a01b038216610d865760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016103c8565b610d8f81610b07565b15610dac5760405162461bcd60e51b81526004016103c89061130e565b610db581610b07565b15610dd25760405162461bcd60e51b81526004016103c89061130e565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461072957600080fd5b600060208284031215610e6557600080fd5b81356106cf81610e3d565b60005b83811015610e8b578181015183820152602001610e73565b50506000910152565b60008151808452610eac816020860160208601610e70565b601f01601f19169290920160200192915050565b6020815260006106cf6020830184610e94565b600060208284031215610ee557600080fd5b5035919050565b80356001600160a01b0381168114610f0357600080fd5b919050565b60008060408385031215610f1b57600080fd5b610f2483610eec565b946020939093013593505050565b600080600060608486031215610f4757600080fd5b610f5084610eec565b9250610f5e60208501610eec565b9150604084013590509250925092565b600060208284031215610f8057600080fd5b6106cf82610eec565b60008060408385031215610f9c57600080fd5b610fa583610eec565b915060208301358015158114610fba57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610ff157600080fd5b610ffa85610eec565b935061100860208601610eec565b925060408501359150606085013567ffffffffffffffff8082111561102c57600080fd5b818701915087601f83011261104057600080fd5b81358181111561105257611052610fc5565b604051601f8201601f19908116603f0116810190838211818310171561107a5761107a610fc5565b816040528281528a602084870101111561109357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156110ca57600080fd5b6110d383610eec565b91506110e160208401610eec565b90509250929050565b600181811c908216806110fe57607f821691505b60208210810361111e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b6020808252600a90820152694f776e6572206f6e6c7960b01b604082015260600190565b6000600182016111b557634e487b7160e01b600052601160045260246000fd5b5060010190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b60008351611200818460208801610e70565b835190830190611214818360208801610e70565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906112e790830184610e94565b9695505050505050565b60006020828403121561130357600080fd5b81516106cf81610e3d565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060408201526060019056fea2646970667358221220124927ec635664d406c8f2c9da77971edac68ac87ad1da1b200f6538c3bd88a864736f6c63430008120033", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when `owner` enables `approved` to manage the `tokenId` token." - }, - "ApprovalForAll(address,address,bool)": { - "details": "Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `tokenId` token is transferred from `from` to `to`." - } - }, - "kind": "dev", - "methods": { - "approve(address,uint256)": { - "details": "See {IERC721-approve}." - }, - "balanceOf(address)": { - "details": "See {IERC721-balanceOf}." - }, - "getApproved(uint256)": { - "details": "See {IERC721-getApproved}." - }, - "isApprovedForAll(address,address)": { - "details": "See {IERC721-isApprovedForAll}." - }, - "name()": { - "details": "See {IERC721Metadata-name}." - }, - "ownerOf(uint256)": { - "details": "See {IERC721-ownerOf}." - }, - "safeTransferFrom(address,address,uint256)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "safeTransferFrom(address,address,uint256,bytes)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "setApprovalForAll(address,bool)": { - "details": "See {IERC721-setApprovalForAll}." - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "symbol()": { - "details": "See {IERC721Metadata-symbol}." - }, - "tokenURI(uint256)": { - "details": "See {IERC721Metadata-tokenURI}." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC721-transferFrom}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1137, - "contract": "src/token/TestERC721.sol:TestERC721", - "label": "_name", - "offset": 0, - "slot": "0", - "type": "t_string_storage" - }, - { - "astId": 1139, - "contract": "src/token/TestERC721.sol:TestERC721", - "label": "_symbol", - "offset": 0, - "slot": "1", - "type": "t_string_storage" - }, - { - "astId": 1143, - "contract": "src/token/TestERC721.sol:TestERC721", - "label": "_owners", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 1147, - "contract": "src/token/TestERC721.sol:TestERC721", - "label": "_balances", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 1151, - "contract": "src/token/TestERC721.sol:TestERC721", - "label": "_tokenApprovals", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 1157, - "contract": "src/token/TestERC721.sol:TestERC721", - "label": "_operatorApprovals", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" - }, - { - "astId": 31164, - "contract": "src/token/TestERC721.sol:TestERC721", - "label": "owner", - "offset": 0, - "slot": "6", - "type": "t_address" - }, - { - "astId": 31166, - "contract": "src/token/TestERC721.sol:TestERC721", - "label": "_nextTokenId", - "offset": 0, - "slot": "7", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_address)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/PNK.json b/contracts/deployments/arbitrumSepoliaDevnet/PNK.json deleted file mode 100644 index 5a97a10ee..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/PNK.json +++ /dev/null @@ -1,280 +0,0 @@ -{ - "address": "0x34B944D42cAcfC8266955D07A80181D2054aa225", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ] -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/PNKFaucet.json b/contracts/deployments/arbitrumSepoliaDevnet/PNKFaucet.json deleted file mode 100644 index e3492bd6d..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/PNKFaucet.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "address": "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "amount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "changeAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x928dc17d6759de6301100a914cb3f8d03df88611941b6e29eb9d123ccbf868f3", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", - "transactionIndex": 1, - "gasUsed": "14689170", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3fc1286a38313be24381d53c5b137138cd89d35b8ed3b77d8ea46920b12a5f87", - "transactionHash": "0x928dc17d6759de6301100a914cb3f8d03df88611941b6e29eb9d123ccbf868f3", - "logs": [], - "blockNumber": 3121428, - "cumulativeGasUsed": "14689170", - "status": 1, - "byzantium": true - }, - "args": [ - "0x34B944D42cAcfC8266955D07A80181D2054aa225" - ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"amount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"changeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IERC20 public token;\\n address public governor;\\n mapping(address => bool) public withdrewAlready;\\n uint256 public amount = 10_000 ether;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeGovernor(address _governor) public onlyByGovernor {\\n governor = _governor;\\n }\\n\\n function changeAmount(uint256 _amount) public onlyByGovernor {\\n amount = _amount;\\n }\\n\\n function withdraw() public onlyByGovernor {\\n token.transfer(governor, token.balanceOf(address(this)));\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, amount);\\n withdrewAlready[msg.sender] = true;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x3a54681cc304ccbfdb42215104b63809919a432ac5d3986d3021a11fcc7a1cc3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405269021e19e0c9bab240000060035534801561001e57600080fd5b5060405161065538038061065583398101604081905261003d9161006b565b600080546001600160a01b039092166001600160a01b0319928316179055600180549091163317905561009b565b60006020828403121561007d57600080fd5b81516001600160a01b038116811461009457600080fd5b9392505050565b6105ab806100aa6000396000f3fe608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 24559, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)1042" - }, - { - "astId": 24561, - "contract": "src/token/Faucet.sol:Faucet", - "label": "governor", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 24565, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 24568, - "contract": "src/token/Faucet.sol:Faucet", - "label": "amount", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)1042": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/PinakionV2.json b/contracts/deployments/arbitrumSepoliaDevnet/PinakionV2.json deleted file mode 120000 index 0f29cb015..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/PinakionV2.json +++ /dev/null @@ -1 +0,0 @@ -PNK.json \ No newline at end of file diff --git a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json deleted file mode 100644 index 3d4f0b7aa..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json +++ /dev/null @@ -1,313 +0,0 @@ -{ - "address": "0xd8681dBF525ecBda2F799BFddB96840065075e8A", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "PolicyUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "policies", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "setPolicy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x79b2a194f0db11def52d521c097557f81e2102fd56f21383354019fe9d2788bf", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd8681dBF525ecBda2F799BFddB96840065075e8A", - "transactionIndex": 3, - "gasUsed": "175490", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000004000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x241c3a2a151d47c8cc36324346aa6a7f7eb1706c0faf141da9b2e55894596fbf", - "transactionHash": "0x79b2a194f0db11def52d521c097557f81e2102fd56f21383354019fe9d2788bf", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 175286057, - "transactionHash": "0x79b2a194f0db11def52d521c097557f81e2102fd56f21383354019fe9d2788bf", - "address": "0xd8681dBF525ecBda2F799BFddB96840065075e8A", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 7, - "blockHash": "0x241c3a2a151d47c8cc36324346aa6a7f7eb1706c0faf141da9b2e55894596fbf" - } - ], - "blockNumber": 175286057, - "cumulativeGasUsed": "432711", - "status": 1, - "byzantium": true - }, - "args": [ - "0x472846F88D1356bb483a88f97B55026654Fc5deD", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"PolicyRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220e887411b8ec9a04afaa5d676d9ba672d1419a76d2208129b6c7942c8f4927a6864736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220e887411b8ec9a04afaa5d676d9ba672d1419a76d2208129b6c7942c8f4927a6864736f6c634300081c0033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] - }, - "implementation": "0x472846F88D1356bb483a88f97B55026654Fc5deD", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json deleted file mode 100644 index b969cd3f4..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0x472846F88D1356bb483a88f97B55026654Fc5deD", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "PolicyUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "policies", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_courtName", - "type": "string" - }, - { - "internalType": "string", - "name": "_policy", - "type": "string" - } - ], - "name": "setPolicy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x6a69636639b93bbb433fa6ef6a44cb48aa99efadda083afb8b98f1d84aedeca7", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x472846F88D1356bb483a88f97B55026654Fc5deD", - "transactionIndex": 1, - "gasUsed": "783071", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000800000000000000000080000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x03b3b099b0a1399de7ef67f987ee51a546d6cada9b8aa611a7542693e3bf3a30", - "transactionHash": "0x6a69636639b93bbb433fa6ef6a44cb48aa99efadda083afb8b98f1d84aedeca7", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 175286053, - "transactionHash": "0x6a69636639b93bbb433fa6ef6a44cb48aa99efadda083afb8b98f1d84aedeca7", - "address": "0x472846F88D1356bb483a88f97B55026654Fc5deD", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x03b3b099b0a1399de7ef67f987ee51a546d6cada9b8aa611a7542693e3bf3a30" - } - ], - "blockNumber": 175286053, - "cumulativeGasUsed": "783071", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"PolicyUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"policies\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"setPolicy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a policy for each court.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"PolicyUpdate(uint256,string,string)\":{\"details\":\"Emitted when a policy is updated.\",\"params\":{\"_courtID\":\"The ID of the policy's court.\",\"_courtName\":\"The name of the policy's court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"details\":\"Constructs the `PolicyRegistry` contract.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setPolicy(uint256,string,string)\":{\"details\":\"Sets the policy for the specified court.\",\"params\":{\"_courtID\":\"The ID of the specified court.\",\"_courtName\":\"The name of the specified court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"PolicyRegistry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/PolicyRegistry.sol\":\"PolicyRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/arbitration/PolicyRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title PolicyRegistry\\n/// @dev A contract to maintain a policy for each court.\\ncontract PolicyRegistry is UUPSProxiable, Initializable {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a policy is updated.\\n /// @param _courtID The ID of the policy's court.\\n /// @param _courtName The name of the policy's court.\\n /// @param _policy The URI of the policy JSON.\\n event PolicyUpdate(uint256 indexed _courtID, string _courtName, string _policy);\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor;\\n mapping(uint256 => string) public policies;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Requires that the sender is the governor.\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"No allowed: governor only\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Constructs the `PolicyRegistry` contract.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the policy for the specified court.\\n /// @param _courtID The ID of the specified court.\\n /// @param _courtName The name of the specified court.\\n /// @param _policy The URI of the policy JSON.\\n function setPolicy(uint256 _courtID, string calldata _courtName, string calldata _policy) external onlyByGovernor {\\n policies[_courtID] = _policy;\\n emit PolicyUpdate(_courtID, _courtName, policies[_courtID]);\\n }\\n}\\n\",\"keccak256\":\"0x00d08ab570b1050d13002f375e0ef28e16dbeb540cca4ba86bfc42de552033e9\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610cbc6100fc6000396000818161029e015281816102c701526104c40152610cbc6000f3fe6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c6565b34801561014f57600080fd5b506100cd61015e366004610941565b610515565b34801561016f57600080fd5b506100cd61017e3660046109be565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109e0565b610696565b3480156101af57600080fd5b506100cd6101be3660046109be565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c678339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109f9565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6783398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c678339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a12565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6783398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a2e565b6000858152600160205260409020610558828483610ae9565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba8565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a61565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a61565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a2e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a2e565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b0381111561081257600080fd5b8301601f8101851361082357600080fd5b80356001600160401b0381111561083c5761083c6107c5565b604051601f8201601f19908116603f011681016001600160401b038111828210171561086a5761086a6107c5565b60405281815282820160200187101561088257600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156108bd5781810151838201526020016108a5565b50506000910152565b60208152600082518060208401526108e58160408501602087016108a2565b601f01601f19169190910160400192915050565b60008083601f84011261090b57600080fd5b5081356001600160401b0381111561092257600080fd5b60208301915083602082850101111561093a57600080fd5b9250929050565b60008060008060006060868803121561095957600080fd5b8535945060208601356001600160401b0381111561097657600080fd5b610982888289016108f9565b90955093505060408601356001600160401b038111156109a157600080fd5b6109ad888289016108f9565b969995985093965092949392505050565b6000602082840312156109d057600080fd5b6109d9826107a9565b9392505050565b6000602082840312156109f257600080fd5b5035919050565b600060208284031215610a0b57600080fd5b5051919050565b60008251610a248184602087016108a2565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a7557607f821691505b602082108103610a9557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b257806000526020600020601f840160051c81016020851015610ac25750805b601f840160051c820191505b81811015610ae25760008155600101610ace565b5050505050565b6001600160401b03831115610b0057610b006107c5565b610b1483610b0e8354610a61565b83610a9b565b6000601f841160018114610b485760008515610b305750838201355b600019600387901b1c1916600186901b178355610ae2565b600083815260209020601f19861690835b82811015610b795786850135825560209485019460019092019101610b59565b5086821015610b965760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60408152826040820152828460608301376000606084830101526000601f19601f8501168201606083820301602084015260008454610be681610a61565b8060608501526001821660008114610c055760018114610c2457610c58565b60ff19831660808601526020606083151560051b870101019350610c58565b87600052602060002060005b83811015610c4f57815460808883010152600190910190602001610c30565b86016080019450505b50919897505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220684075982165516118648b659dcb0926b6b6a10f8691c384b0cd4c665fe90b6164736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c6565b34801561014f57600080fd5b506100cd61015e366004610941565b610515565b34801561016f57600080fd5b506100cd61017e3660046109be565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109e0565b610696565b3480156101af57600080fd5b506100cd6101be3660046109be565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c678339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109f9565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6783398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c678339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a12565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6783398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a2e565b6000858152600160205260409020610558828483610ae9565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba8565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a61565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a61565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a2e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a2e565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b0381111561081257600080fd5b8301601f8101851361082357600080fd5b80356001600160401b0381111561083c5761083c6107c5565b604051601f8201601f19908116603f011681016001600160401b038111828210171561086a5761086a6107c5565b60405281815282820160200187101561088257600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156108bd5781810151838201526020016108a5565b50506000910152565b60208152600082518060208401526108e58160408501602087016108a2565b601f01601f19169190910160400192915050565b60008083601f84011261090b57600080fd5b5081356001600160401b0381111561092257600080fd5b60208301915083602082850101111561093a57600080fd5b9250929050565b60008060008060006060868803121561095957600080fd5b8535945060208601356001600160401b0381111561097657600080fd5b610982888289016108f9565b90955093505060408601356001600160401b038111156109a157600080fd5b6109ad888289016108f9565b969995985093965092949392505050565b6000602082840312156109d057600080fd5b6109d9826107a9565b9392505050565b6000602082840312156109f257600080fd5b5035919050565b600060208284031215610a0b57600080fd5b5051919050565b60008251610a248184602087016108a2565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a7557607f821691505b602082108103610a9557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b257806000526020600020601f840160051c81016020851015610ac25750805b601f840160051c820191505b81811015610ae25760008155600101610ace565b5050505050565b6001600160401b03831115610b0057610b006107c5565b610b1483610b0e8354610a61565b83610a9b565b6000601f841160018114610b485760008515610b305750838201355b600019600387901b1c1916600186901b178355610ae2565b600083815260209020601f19861690835b82811015610b795786850135825560209485019460019092019101610b59565b5086821015610b965760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60408152826040820152828460608301376000606084830101526000601f19601f8501168201606083820301602084015260008454610be681610a61565b8060608501526001821660008114610c055760018114610c2457610c58565b60ff19831660808601526020606083151560051b870101019350610c58565b87600052602060002060005b83811015610c4f57815460808883010152600190910190602001610c30565b86016080019450505b50919897505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220684075982165516118648b659dcb0926b6b6a10f8691c384b0cd4c665fe90b6164736f6c634300081c0033", - "devdoc": { - "details": "A contract to maintain a policy for each court.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "PolicyUpdate(uint256,string,string)": { - "details": "Emitted when a policy is updated.", - "params": { - "_courtID": "The ID of the policy's court.", - "_courtName": "The name of the policy's court.", - "_policy": "The URI of the policy JSON." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "initialize(address)": { - "details": "Constructs the `PolicyRegistry` contract.", - "params": { - "_governor": "The governor's address." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setPolicy(uint256,string,string)": { - "details": "Sets the policy for the specified court.", - "params": { - "_courtID": "The ID of the specified court.", - "_courtName": "The name of the specified court.", - "_policy": "The URI of the policy JSON." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "PolicyRegistry", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 16392, - "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 16396, - "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", - "label": "policies", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_uint256,t_string_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_string_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => string)", - "numberOfBytes": "32", - "value": "t_string_storage" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json deleted file mode 100644 index c672a02c9..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0xd8681dBF525ecBda2F799BFddB96840065075e8A", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x79b2a194f0db11def52d521c097557f81e2102fd56f21383354019fe9d2788bf", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd8681dBF525ecBda2F799BFddB96840065075e8A", - "transactionIndex": 3, - "gasUsed": "175490", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000004000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x241c3a2a151d47c8cc36324346aa6a7f7eb1706c0faf141da9b2e55894596fbf", - "transactionHash": "0x79b2a194f0db11def52d521c097557f81e2102fd56f21383354019fe9d2788bf", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 175286057, - "transactionHash": "0x79b2a194f0db11def52d521c097557f81e2102fd56f21383354019fe9d2788bf", - "address": "0xd8681dBF525ecBda2F799BFddB96840065075e8A", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 7, - "blockHash": "0x241c3a2a151d47c8cc36324346aa6a7f7eb1706c0faf141da9b2e55894596fbf" - } - ], - "blockNumber": 175286057, - "cumulativeGasUsed": "432711", - "status": 1, - "byzantium": true - }, - "args": [ - "0x472846F88D1356bb483a88f97B55026654Fc5deD", - "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"PolicyRegistryProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220e887411b8ec9a04afaa5d676d9ba672d1419a76d2208129b6c7942c8f4927a6864736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220e887411b8ec9a04afaa5d676d9ba672d1419a76d2208129b6c7942c8f4927a6864736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/RandomizerOracle.json b/contracts/deployments/arbitrumSepoliaDevnet/RandomizerOracle.json deleted file mode 100644 index 0ed65f9d1..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/RandomizerOracle.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "address": "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", - "abi": [] -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json deleted file mode 100644 index a92bd9df9..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json +++ /dev/null @@ -1,1106 +0,0 @@ -{ - "address": "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNK", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNKWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum ISortitionModule.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "StakeDelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_unlock", - "type": "bool" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amountAllCourts", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - } - ], - "name": "changeMaxDrawingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - } - ], - "name": "changeMinStakingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "changeRandomNumberGenerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDisputeHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createTree", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeReadIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeWriteIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "delayedStakes", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "alreadyTransferred", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "disputesWithoutJurors", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "executeDelayedStakes", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getJurorBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalLocked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stakedInCourt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbCourts", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorCourtIDs", - "outputs": [ - { - "internalType": "uint96[]", - "name": "", - "type": "uint96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorLeftoverPNK", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - }, - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize4", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "isJurorStaked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "jurors", - "outputs": [ - { - "internalType": "uint256", - "name": "stakedPnk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedPnk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPhaseChange", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "jurorAccount", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtId", - "type": "uint96" - } - ], - "name": "latestDelayedStakeIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "lockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxDrawingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minStakingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" - } - ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "passPhase", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availablePenalty", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "phase", - "outputs": [ - { - "internalType": "enum ISortitionModule.Phase", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "postDrawHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumberRequestBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rng", - "outputs": [ - { - "internalType": "contract RNG", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rngLookahead", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "setJurorInactive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_ID", - "type": "bytes32" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "validateStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "withdrawLeftoverPNK", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x9578634d10e5620603f87662e9739fb13f6913ed7f669662f15188dfe9cf8a0b", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", - "transactionIndex": 1, - "gasUsed": "332814", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100004000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3ea136a5325825c86d23b94003b2a561cfa59dd0cd87bc49909dad568b5eb697", - "transactionHash": "0x9578634d10e5620603f87662e9739fb13f6913ed7f669662f15188dfe9cf8a0b", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 175286083, - "transactionHash": "0x9578634d10e5620603f87662e9739fb13f6913ed7f669662f15188dfe9cf8a0b", - "address": "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x3ea136a5325825c86d23b94003b2a561cfa59dd0cd87bc49909dad568b5eb697" - } - ], - "blockNumber": 175286083, - "cumulativeGasUsed": "332814", - "status": 1, - "byzantium": true - }, - "args": [ - "0xBe984dc03B4A8d5135BCc07b46fdB867e02BA1F3", - "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000001bd44c4a4511dbfa7dc1d5bc201635596e7200f900000000000000000000000000000000000000000000000000000000000000b400000000000000000000000000000000000000000000000000000000000002580000000000000000000000007e40f5ac809521654a9c17e442f2a0a5a4d890fa0000000000000000000000000000000000000000000000000000000000000014" - ], - "numDeployments": 2, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f2e3563554b18c2c9587081d72ef7797df12f887fb52d3ccfb244524903568c364736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f2e3563554b18c2c9587081d72ef7797df12f887fb52d3ccfb244524903568c364736f6c634300081c0033", - "execute": { - "methodName": "initialize4", - "args": [] - }, - "implementation": "0x8a26445989c944C58503275ad87Ab4d7b17d4F1e", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json deleted file mode 100644 index 1ce05ea30..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json +++ /dev/null @@ -1,629 +0,0 @@ -{ - "address": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum ISortitionModule.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_unlock", - "type": "bool" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCoreUniversity", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDisputeHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createTree", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "disputesWithoutJurors", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getJurorBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalLocked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stakedInCourt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbCourts", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorCourtIDs", - "outputs": [ - { - "internalType": "uint96[]", - "name": "", - "type": "uint96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCoreUniversity", - "name": "_core", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "isJurorStaked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "jurors", - "outputs": [ - { - "internalType": "uint256", - "name": "stakedPnk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedPnk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "lockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" - } - ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "postDrawHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "setJurorInactive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_alreadyTransferred", - "type": "bool" - } - ], - "name": "setStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "setTransientJuror", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - "transactionIndex": 1, - "gasUsed": "210047", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010800000020000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6a08d6d6cf180ae6bf3126f86fbedfd17212528b22a7a9403addd2dd6b1109c3", - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 96308572, - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", - "address": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x6a08d6d6cf180ae6bf3126f86fbedfd17212528b22a7a9403addd2dd6b1109c3" - } - ], - "blockNumber": 96308572, - "cumulativeGasUsed": "210047", - "status": 1, - "byzantium": true - }, - "args": [ - "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000005ab37f38778bc175852fa353056591d91c744ce6" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleUniversityProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220cbf6c95b71e3c03306025a1af7f6aa4f021b4a8c8f5a8c68988b35c4442edb4964736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220cbf6c95b71e3c03306025a1af7f6aa4f021b4a8c8f5a8c68988b35c4442edb4964736f6c63430008180033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x5AB37F38778Bc175852fA353056591D91c744ce6" - ] - }, - "implementation": "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Implementation.json deleted file mode 100644 index 21360963b..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Implementation.json +++ /dev/null @@ -1,842 +0,0 @@ -{ - "address": "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum ISortitionModule.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_unlock", - "type": "bool" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCoreUniversity", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDisputeHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createTree", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "disputesWithoutJurors", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getJurorBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalLocked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stakedInCourt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbCourts", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorCourtIDs", - "outputs": [ - { - "internalType": "uint96[]", - "name": "", - "type": "uint96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCoreUniversity", - "name": "_core", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "isJurorStaked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "jurors", - "outputs": [ - { - "internalType": "uint256", - "name": "stakedPnk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedPnk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "lockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" - } - ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "postDrawHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "setJurorInactive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_alreadyTransferred", - "type": "bool" - } - ], - "name": "setStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "setTransientJuror", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0x204b96d9a80952f3d7f84a74ce0fe11b7a03ce93187949d2da7e793d56552c61", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", - "transactionIndex": 1, - "gasUsed": "1471948", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000004000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa593072d9d6d0d0c6ee98e672a112e47e0501bc4d4bca56a6a66060d7427021a", - "transactionHash": "0x204b96d9a80952f3d7f84a74ce0fe11b7a03ce93187949d2da7e793d56552c61", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 96308555, - "transactionHash": "0x204b96d9a80952f3d7f84a74ce0fe11b7a03ce93187949d2da7e793d56552c61", - "address": "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0xa593072d9d6d0d0c6ee98e672a112e47e0501bc4d4bca56a6a66060d7427021a" - } - ], - "blockNumber": 96308555, - "cumulativeGasUsed": "1471948", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"_phase\",\"type\":\"uint8\"}],\"name\":\"NewPhase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_unlock\",\"type\":\"bool\"}],\"name\":\"StakeLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCoreUniversity\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCoreUniversity\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"isJurorStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedPnk\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedPnk\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"setTransientJuror\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"An adapted version of the SortitionModule contract for educational purposes.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"draw(bytes32,uint256,uint256)\":{\"details\":\"Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.\",\"returns\":{\"drawnAddress\":\"The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended.\"}},\"getJurorBalance(address,uint96)\":{\"details\":\"Gets the stake of a juror in a court. Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in but acceptable for this educational implementation.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_juror\":\"The address of the juror.\"},\"returns\":{\"nbCourts\":\"The number of courts the juror has staked in.\",\"stakedInCourt\":\"The amount of tokens staked by the juror in the court.\",\"totalLocked\":\"The total amount of tokens locked by the juror in the court.\",\"totalStaked\":\"The total amount of tokens staked by the juror in the court.\"}},\"getJurorCourtIDs(address)\":{\"details\":\"Gets the court identifiers where a specific `_juror` has staked.\",\"params\":{\"_juror\":\"The address of the juror.\"}},\"initialize(address,address)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\"}},\"notifyRandomNumber(uint256)\":{\"details\":\"Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\",\"params\":{\"_randomNumber\":\"Random number returned by RNG contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setJurorInactive(address)\":{\"details\":\"Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The juror to unstake.\"}},\"setStake(address,uint96,uint256,bool)\":{\"details\":\"Sets the specified juror's stake in a court. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The address of the juror.\",\"_alreadyTransferred\":\"True if the tokens were already transferred from juror. Only relevant for delayed stakes.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"},\"returns\":{\"pnkDeposit\":\"The amount of PNK to be deposited.\",\"pnkWithdrawal\":\"The amount of PNK to be withdrawn.\",\"stakingResult\":\"The result of the staking operation.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"title\":\"SortitionModuleUniversity\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/university/SortitionModuleUniversity.sol\":\"SortitionModuleUniversity\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xb9590d05f9df08dd0ed027b2eb40c7b1885b7574a121b1b0b7da0920429bb4d5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/arbitration/university/ISortitionModuleUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface ISortitionModuleUniversity is ISortitionModule {\\n function setTransientJuror(address _juror) external;\\n}\\n\",\"keccak256\":\"0x57fee0787ae90af01c57a7d2850f8e4ade1ca72163a388341cac017bfdbf163a\",\"license\":\"MIT\"},\"src/arbitration/university/KlerosCoreUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"../interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModuleUniversity} from \\\"./ISortitionModuleUniversity.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title KlerosCoreUniversity\\n/// Core arbitrator contract for educational purposes.\\ncontract KlerosCoreUniversity is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public instructor; // The instructor who is allowed to choose the jurors.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModuleUniversity public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByInstructor() {\\n if (instructor != msg.sender) revert InstructorOnly();\\n _;\\n }\\n\\n modifier onlyByGovernorOrInstructor() {\\n if (msg.sender != governor && msg.sender != instructor) revert GovernorOrInstructorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _instructor The address of the instructor.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _governor,\\n address _instructor,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n ISortitionModuleUniversity _sortitionModuleAddress\\n ) external reinitializer(1) {\\n governor = _governor;\\n instructor = _instructor;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n new uint256[](0)\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `instructor` storage variable.\\n /// @param _instructor The new value for the `instructor` storage variable.\\n function changeInstructor(address _instructor) external onlyByGovernorOrInstructor {\\n instructor = _instructor;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModuleUniversity _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws one juror for the dispute until the number votes paid for is reached.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _juror The address of the juror to draw.\\n function draw(uint256 _disputeID, address _juror) external onlyByGovernorOrInstructor {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n if (round.drawnJurors.length >= round.nbVotes) revert AllJurorsDrawn();\\n\\n sortitionModule.setTransientJuror(_juror);\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n uint256 iteration = round.drawIterations + 1;\\n address drawnAddress = disputeKit.draw(_disputeID, iteration);\\n if (drawnAddress == address(0)) {\\n revert NoJurorDrawn();\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n round.drawIterations = iteration;\\n }\\n sortitionModule.setTransientJuror(address(0));\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n _params.pnkPenaltiesInRound += penalty;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n sortitionModule.penalizeStake(account, penalty);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(penalty),\\n 0,\\n round.feeToken\\n );\\n\\n if (!disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive, unstake them.\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Give back the locked PNKs in case the juror fully unstaked earlier.\\n if (!sortitionModule.isJurorStaked(account)) {\\n pinakion.safeTransfer(account, pnkLocked);\\n }\\n\\n // Transfer the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs were already transferred to/from the staking contract.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (stakingResult != StakingResult.Successful) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibeInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error InstructorOnly();\\n error GovernorOrInstructorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error DepthLevelMax();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error ArraysLengthMismatch();\\n error StakingInTooManyCourts();\\n error StakingNotPossibeInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error AllJurorsDrawn();\\n error NoJurorDrawn();\\n}\\n\",\"keccak256\":\"0xd636c2294d15110a20dcf97d67f2989e14233cd1de353032807ad44a8e828e49\",\"license\":\"MIT\"},\"src/arbitration/university/SortitionModuleUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @custom:authors: [@epiqueras, @unknownunknown1, @jaybuidl, @shotaronowhere]\\n * @custom:reviewers: []\\n * @custom:auditors: []\\n * @custom:bounties: []\\n * @custom:deployments: []\\n */\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./KlerosCoreUniversity.sol\\\";\\nimport \\\"./ISortitionModuleUniversity.sol\\\";\\nimport \\\"../interfaces/IDisputeKit.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title SortitionModuleUniversity\\n/// @dev An adapted version of the SortitionModule contract for educational purposes.\\ncontract SortitionModuleUniversity is ISortitionModuleUniversity, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct Juror {\\n mapping(uint96 => uint256) stakesByCourtID; // The stakes of the juror in particular courts.\\n uint96[] courtIDs; // The IDs of courts where the juror's stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`.\\n uint256 stakedPnk; // The juror's total amount of tokens staked in subcourts. Reflects actual pnk balance.\\n uint256 lockedPnk; // The juror's total amount of tokens locked in disputes. Can reflect actual pnk balance when stakedPnk are fully withdrawn.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n KlerosCoreUniversity public core; // The core arbitrator contract.\\n uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\n mapping(address account => Juror) public jurors; // The jurors.\\n address private transientJuror; // The juror address used between calls within the same transaction.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount);\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _core The KlerosCore.\\n function initialize(address _governor, KlerosCoreUniversity _core) external reinitializer(1) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function setTransientJuror(address _juror) external override onlyByCore {\\n transientJuror = _juror;\\n }\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external {\\n // NOP\\n }\\n\\n function createDisputeHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors++;\\n }\\n\\n function postDrawHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors--;\\n }\\n\\n /// @dev Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\\n /// @param _randomNumber Random number returned by RNG contract.\\n function notifyRandomNumber(uint256 _randomNumber) public override {}\\n\\n /// @dev Sets the specified juror's stake in a court.\\n /// `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred True if the tokens were already transferred from juror. Only relevant for delayed stakes.\\n /// @return pnkDeposit The amount of PNK to be deposited.\\n /// @return pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @return stakingResult The result of the staking operation.\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n Juror storage juror = jurors[_account];\\n uint256 currentStake = _stakeOf(_account, _courtID);\\n\\n uint256 nbCourts = juror.courtIDs.length;\\n if (_newStake == 0 && (nbCourts >= MAX_STAKE_PATHS || currentStake == 0)) {\\n return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed.\\n }\\n\\n if (_newStake >= currentStake) {\\n if (!_alreadyTransferred) {\\n pnkDeposit = _increaseStake(juror, _courtID, _newStake, currentStake);\\n }\\n } else {\\n pnkWithdrawal += _decreaseStake(juror, _courtID, _newStake, currentStake);\\n }\\n\\n bool finished = false;\\n uint96 currentCourtID = _courtID;\\n while (!finished) {\\n // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn.\\n juror.stakesByCourtID[currentCourtID] += _newStake;\\n juror.stakesByCourtID[currentCourtID] -= currentStake;\\n if (currentCourtID == GENERAL_COURT) {\\n finished = true;\\n } else {\\n (currentCourtID, , , , , , ) = core.courts(currentCourtID);\\n }\\n }\\n emit StakeSet(_account, _courtID, _newStake);\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n function _increaseStake(\\n Juror storage juror,\\n uint96 _courtID,\\n uint256 _newStake,\\n uint256 _currentStake\\n ) internal returns (uint256 transferredAmount) {\\n // Stake increase\\n // When stakedPnk becomes lower than lockedPnk count the locked tokens in when transferring tokens from juror.\\n // (E.g. stakedPnk = 0, lockedPnk = 150) which can happen if the juror unstaked fully while having some tokens locked.\\n uint256 previouslyLocked = (juror.lockedPnk >= juror.stakedPnk) ? juror.lockedPnk - juror.stakedPnk : 0; // underflow guard\\n transferredAmount = (_newStake >= _currentStake + previouslyLocked) // underflow guard\\n ? _newStake - _currentStake - previouslyLocked\\n : 0;\\n if (_currentStake == 0) {\\n juror.courtIDs.push(_courtID);\\n }\\n // stakedPnk can become async with _currentStake (e.g. after penalty).\\n juror.stakedPnk = (juror.stakedPnk >= _currentStake) ? juror.stakedPnk - _currentStake + _newStake : _newStake;\\n }\\n\\n function _decreaseStake(\\n Juror storage juror,\\n uint96 _courtID,\\n uint256 _newStake,\\n uint256 _currentStake\\n ) internal returns (uint256 transferredAmount) {\\n // Stakes can be partially delayed only when stake is increased.\\n // Stake decrease: make sure locked tokens always stay in the contract. They can only be released during Execution.\\n if (juror.stakedPnk >= _currentStake - _newStake + juror.lockedPnk) {\\n // We have enough pnk staked to afford withdrawal while keeping locked tokens.\\n transferredAmount = _currentStake - _newStake;\\n } else if (juror.stakedPnk >= juror.lockedPnk) {\\n // Can't afford withdrawing the current stake fully. Take whatever is available while keeping locked tokens.\\n transferredAmount = juror.stakedPnk - juror.lockedPnk;\\n }\\n if (_newStake == 0) {\\n for (uint256 i = juror.courtIDs.length; i > 0; i--) {\\n if (juror.courtIDs[i - 1] == _courtID) {\\n juror.courtIDs[i - 1] = juror.courtIDs[juror.courtIDs.length - 1];\\n juror.courtIDs.pop();\\n break;\\n }\\n }\\n }\\n // stakedPnk can become async with _currentStake (e.g. after penalty).\\n juror.stakedPnk = (juror.stakedPnk >= _currentStake) ? juror.stakedPnk - _currentStake + _newStake : _newStake;\\n }\\n\\n function lockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n jurors[_account].lockedPnk += _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, false);\\n }\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n jurors[_account].lockedPnk -= _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, true);\\n }\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n Juror storage juror = jurors[_account];\\n if (juror.stakedPnk >= _relativeAmount) {\\n juror.stakedPnk -= _relativeAmount;\\n } else {\\n juror.stakedPnk = 0; // stakedPnk might become lower after manual unstaking, but lockedPnk will always cover the difference.\\n }\\n }\\n\\n /// @dev Unstakes the inactive juror from all courts.\\n /// `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The juror to unstake.\\n function setJurorInactive(address _account) external override onlyByCore {\\n uint96[] memory courtIDs = getJurorCourtIDs(_account);\\n for (uint256 j = courtIDs.length; j > 0; j--) {\\n core.setStakeBySortitionModule(_account, courtIDs[j - 1], 0, false);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Draw an ID from a tree using a number.\\n /// Note that this function reverts if the sum of all values in the tree is 0.\\n /// @return drawnAddress The drawn address.\\n /// `O(k * log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function draw(bytes32, uint256, uint256) public view override returns (address drawnAddress) {\\n drawnAddress = transientJuror;\\n }\\n\\n /// @dev Gets the stake of a juror in a court.\\n /// Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in\\n /// but acceptable for this educational implementation.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return totalStaked The total amount of tokens staked by the juror in the court.\\n /// @return totalLocked The total amount of tokens locked by the juror in the court.\\n /// @return stakedInCourt The amount of tokens staked by the juror in the court.\\n /// @return nbCourts The number of courts the juror has staked in.\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n )\\n external\\n view\\n override\\n returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts)\\n {\\n Juror storage juror = jurors[_juror];\\n totalStaked = juror.stakedPnk;\\n totalLocked = juror.lockedPnk;\\n nbCourts = juror.courtIDs.length;\\n for (uint256 i = 0; i < nbCourts; i++) {\\n if (juror.courtIDs[i] == _courtID) {\\n stakedInCourt = juror.stakesByCourtID[_courtID];\\n break;\\n }\\n }\\n }\\n\\n /// @dev Gets the court identifiers where a specific `_juror` has staked.\\n /// @param _juror The address of the juror.\\n function getJurorCourtIDs(address _juror) public view override returns (uint96[] memory) {\\n return jurors[_juror].courtIDs;\\n }\\n\\n function isJurorStaked(address _juror) external view override returns (bool) {\\n return jurors[_juror].stakedPnk > 0;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Gets the stake of a juror in a court.\\n /// Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in\\n /// but acceptable for this educational implementation.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return stakedInCourt The amount of tokens staked by the juror in the court.\\n function _stakeOf(address _juror, uint96 _courtID) internal view returns (uint256 stakedInCourt) {\\n Juror storage juror = jurors[_juror];\\n for (uint256 i = 0; i < juror.courtIDs.length; i++) {\\n if (juror.courtIDs[i] == _courtID) {\\n stakedInCourt = juror.stakesByCourtID[_courtID];\\n break;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x505563930b74c834195c7ae32792ee2b15e6478d404a9ff612133ad23080026b\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked\\n}\\n\",\"keccak256\":\"0x486016fb74cc91439c2ec918e97a79190ab4eed223987d516986fff8eaeecfbf\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161183f6100fc60003960008181610637015281816106600152610858015261183f6000f3fe60806040526004361061012a5760003560e01c80635d2d7846116100ab578063d09f392d1161006f578063d09f392d1461036c578063d1c1df481461038c578063dca5f6b0146103cc578063f1a5310414610418578063f216de4c14610438578063f2f4eb261461045857600080fd5b80635d2d7846146102925780636624192f146102b2578063965af6c7146102fd578063a5861b901461031d578063b5d69e991461034c57600080fd5b8063485cc955116100f2578063485cc955146101ef5780634c70a0d61461020f5780634f1ef2861461023d57806352d1902d14610250578063543f8a361461026557600080fd5b8063034327441461012f5780630c340a241461015857806321e1625e1461019057806321ea9b3f146101b2578063477a655c146101d0575b600080fd5b34801561013b57600080fd5b5061014560025481565b6040519081526020015b60405180910390f35b34801561016457600080fd5b50600054610178906001600160a01b031681565b6040516001600160a01b03909116815260200161014f565b34801561019c57600080fd5b506101b06101ab36600461130b565b610478565b005b3480156101be57600080fd5b506101b06101cd366004611337565b50565b3480156101dc57600080fd5b506101b06101eb3660046113f3565b5050565b3480156101fb57600080fd5b506101b061020a36600461143a565b610524565b34801561021b57600080fd5b5061017861022a366004611473565b50506004546001600160a01b0316919050565b6101b061024b36600461149f565b610623565b34801561025c57600080fd5b5061014561084b565b34801561027157600080fd5b506102856102803660046114d9565b6108a9565b60405161014f91906114fd565b34801561029e57600080fd5b506101b06102ad36600461154a565b61094a565b3480156102be57600080fd5b506102ed6102cd3660046114d9565b6001600160a01b0316600090815260036020526040902060020154151590565b604051901515815260200161014f565b34801561030957600080fd5b506101b061031836600461130b565b61098d565b34801561032957600080fd5b5061033d61033836600461158f565b610a28565b60405161014f939291906115e2565b34801561035857600080fd5b506101b06103673660046114d9565b610c4f565b34801561037857600080fd5b506101b061038736600461154a565b610d55565b34801561039857600080fd5b506103ac6103a736600461161c565b610d8f565b60408051948552602085019390935291830152606082015260800161014f565b3480156103d857600080fd5b506104036103e73660046114d9565b6003602081905260009182526040909120600281015491015482565b6040805192835260208301919091520161014f565b34801561042457600080fd5b506101b06104333660046114d9565b610e45565b34801561044457600080fd5b506101b061045336600461130b565b610e91565b34801561046457600080fd5b50600154610178906001600160a01b031681565b6001546001600160a01b031633146104ab5760405162461bcd60e51b81526004016104a29061164a565b60405180910390fd5b6001600160a01b038216600090815260036020819052604082200180548392906104d69084906116a4565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff168061056e5750805467ffffffffffffffff808416911610155b1561058b5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b61062c82610f09565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806106aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661069e6000805160206117ea8339815191525490565b6001600160a01b031614155b156106c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610722575060408051601f3d908101601f1916820190925261071f918101906116bd565b60015b61074a57604051630c76093760e01b81526001600160a01b03831660048201526024016104a2565b6000805160206117ea833981519152811461077b57604051632a87526960e21b8152600481018290526024016104a2565b6000805160206117ea8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610846576000836001600160a01b0316836040516107e291906116d6565b600060405180830381855af49150503d806000811461081d576040519150601f19603f3d011682016040523d82523d6000602084013e610822565b606091505b5050905080610844576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108965760405163703e46dd60e11b815260040160405180910390fd5b506000805160206117ea83398151915290565b6001600160a01b03811660009081526003602090815260409182902060010180548351818402810184019094528084526060939283018282801561093e57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116108fb5790505b50505050509050919050565b6001546001600160a01b031633146109745760405162461bcd60e51b81526004016104a29061164a565b6002805490600061098483611705565b91905055505050565b6001546001600160a01b031633146109b75760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038216600090815260036020819052604082200180548392906109e290849061171c565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610518565b600154600090819081906001600160a01b03163314610a595760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038716600090815260036020526040812090610a7c8989610f6e565b600183015490915087158015610a9b5750600481101580610a9b575081155b15610ab3576000806003955095509550505050610c45565b818810610ad35786610ace57610acb838a8a8561100f565b95505b610aec565b610adf838a8a856110f3565b610ae990866116a4565b94505b6000895b81610bee576001600160601b038116600090815260208690526040812080548c9290610b1d9084906116a4565b90915550506001600160601b03811660009081526020869052604081208054869290610b4a90849061171c565b90915550506000196001600160601b03821601610b6a5760019150610af0565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdf919061172f565b50949550610af0945050505050565b604080516001600160601b038d168152602081018c90526001600160a01b038e16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a25060009450505050505b9450945094915050565b6001546001600160a01b03163314610c795760405162461bcd60e51b81526004016104a29061164a565b6000610c84826108a9565b80519091505b801561084657600180546001600160a01b03169063fbb519e79085908590610cb2908661171c565b81518110610cc257610cc26117a4565b60209081029190910101516040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526001600160601b031660248201526000604482018190526064820152608401600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050508080610d4d90611705565b915050610c8a565b6001546001600160a01b03163314610d7f5760405162461bcd60e51b81526004016104a29061164a565b60028054906000610984836117ba565b6001600160a01b038216600090815260036020819052604082206002810154918101546001820154929390929091825b82811015610e3a57866001600160601b0316826001018281548110610de657610de66117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603610e32576001600160601b0387166000908152602083905260409020549350610e3a565b600101610dbf565b505092959194509250565b6001546001600160a01b03163314610e6f5760405162461bcd60e51b81526004016104a29061164a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610ebb5760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038216600090815260036020526040902060028101548211610efd5781816002016000828254610ef2919061171c565b909155506108469050565b60006002820155505050565b6000546001600160a01b031633146101cd5760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b60648201526084016104a2565b6001600160a01b0382166000908152600360205260408120815b600182015481101561100757836001600160601b0316826001018281548110610fb357610fb36117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603610fff576001600160601b0384166000908152602083905260409020549250611007565b600101610f88565b505092915050565b60008085600201548660030154101561102957600061103d565b8560020154866003015461103d919061171c565b905061104981846116a4565b84101561105757600061106c565b80611062848661171c565b61106c919061171c565b9150826000036110b557600186810180548083018255600091825260209091206002820401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866002015410156110c757836110e2565b838387600201546110d8919061171c565b6110e291906116a4565b866002018190555050949350505050565b6003840154600090611105848461171c565b61110f91906116a4565b85600201541061112a57611123838361171c565b9050611150565b8460030154856002015410611150578460030154856002015461114d919061171c565b90505b826000036112b95760018501545b80156112b757846001600160601b03168660010160018361117f919061171c565b8154811061118f5761118f6117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036112a5576001808701805490916111cd9161171c565b815481106111dd576111dd6117a4565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087810190611213908461171c565b81548110611223576112236117a4565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b031602179055508560010180548061126f5761126f6117d3565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556112b7565b806112af81611705565b91505061115e565b505b81856002015410156112cb57826112e6565b828286600201546112dc919061171c565b6112e691906116a4565b8560020181905550949350505050565b6001600160a01b03811681146101cd57600080fd5b6000806040838503121561131e57600080fd5b8235611329816112f6565b946020939093013593505050565b60006020828403121561134957600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261137757600080fd5b813567ffffffffffffffff8082111561139257611392611350565b604051601f8301601f19908116603f011681019082821181831017156113ba576113ba611350565b816040528381528660208588010111156113d357600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561140657600080fd5b82359150602083013567ffffffffffffffff81111561142457600080fd5b61143085828601611366565b9150509250929050565b6000806040838503121561144d57600080fd5b8235611458816112f6565b91506020830135611468816112f6565b809150509250929050565b60008060006060848603121561148857600080fd5b505081359360208301359350604090920135919050565b600080604083850312156114b257600080fd5b82356114bd816112f6565b9150602083013567ffffffffffffffff81111561142457600080fd5b6000602082840312156114eb57600080fd5b81356114f6816112f6565b9392505050565b6020808252825182820181905260009190848201906040850190845b8181101561153e5783516001600160601b031683529284019291840191600101611519565b50909695505050505050565b6000806040838503121561155d57600080fd5b50508035926020909101359150565b6001600160601b03811681146101cd57600080fd5b80151581146101cd57600080fd5b600080600080608085870312156115a557600080fd5b84356115b0816112f6565b935060208501356115c08161156c565b92506040850135915060608501356115d781611581565b939692955090935050565b83815260208101839052606081016008831061160e57634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6000806040838503121561162f57600080fd5b823561163a816112f6565b915060208301356114688161156c565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156116b7576116b761168e565b92915050565b6000602082840312156116cf57600080fd5b5051919050565b6000825160005b818110156116f757602081860181015185830152016116dd565b506000920191825250919050565b6000816117145761171461168e565b506000190190565b818103818111156116b7576116b761168e565b600080600080600080600060e0888a03121561174a57600080fd5b87516117558161156c565b602089015190975061176681611581565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161179481611581565b8091505092959891949750929550565b634e487b7160e01b600052603260045260246000fd5b6000600182016117cc576117cc61168e565b5060010190565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200166151e57cedd4332854be3f1b542627de717718d9832e670b79904c4b162d864736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061012a5760003560e01c80635d2d7846116100ab578063d09f392d1161006f578063d09f392d1461036c578063d1c1df481461038c578063dca5f6b0146103cc578063f1a5310414610418578063f216de4c14610438578063f2f4eb261461045857600080fd5b80635d2d7846146102925780636624192f146102b2578063965af6c7146102fd578063a5861b901461031d578063b5d69e991461034c57600080fd5b8063485cc955116100f2578063485cc955146101ef5780634c70a0d61461020f5780634f1ef2861461023d57806352d1902d14610250578063543f8a361461026557600080fd5b8063034327441461012f5780630c340a241461015857806321e1625e1461019057806321ea9b3f146101b2578063477a655c146101d0575b600080fd5b34801561013b57600080fd5b5061014560025481565b6040519081526020015b60405180910390f35b34801561016457600080fd5b50600054610178906001600160a01b031681565b6040516001600160a01b03909116815260200161014f565b34801561019c57600080fd5b506101b06101ab36600461130b565b610478565b005b3480156101be57600080fd5b506101b06101cd366004611337565b50565b3480156101dc57600080fd5b506101b06101eb3660046113f3565b5050565b3480156101fb57600080fd5b506101b061020a36600461143a565b610524565b34801561021b57600080fd5b5061017861022a366004611473565b50506004546001600160a01b0316919050565b6101b061024b36600461149f565b610623565b34801561025c57600080fd5b5061014561084b565b34801561027157600080fd5b506102856102803660046114d9565b6108a9565b60405161014f91906114fd565b34801561029e57600080fd5b506101b06102ad36600461154a565b61094a565b3480156102be57600080fd5b506102ed6102cd3660046114d9565b6001600160a01b0316600090815260036020526040902060020154151590565b604051901515815260200161014f565b34801561030957600080fd5b506101b061031836600461130b565b61098d565b34801561032957600080fd5b5061033d61033836600461158f565b610a28565b60405161014f939291906115e2565b34801561035857600080fd5b506101b06103673660046114d9565b610c4f565b34801561037857600080fd5b506101b061038736600461154a565b610d55565b34801561039857600080fd5b506103ac6103a736600461161c565b610d8f565b60408051948552602085019390935291830152606082015260800161014f565b3480156103d857600080fd5b506104036103e73660046114d9565b6003602081905260009182526040909120600281015491015482565b6040805192835260208301919091520161014f565b34801561042457600080fd5b506101b06104333660046114d9565b610e45565b34801561044457600080fd5b506101b061045336600461130b565b610e91565b34801561046457600080fd5b50600154610178906001600160a01b031681565b6001546001600160a01b031633146104ab5760405162461bcd60e51b81526004016104a29061164a565b60405180910390fd5b6001600160a01b038216600090815260036020819052604082200180548392906104d69084906116a4565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff168061056e5750805467ffffffffffffffff808416911610155b1561058b5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b61062c82610f09565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806106aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661069e6000805160206117ea8339815191525490565b6001600160a01b031614155b156106c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610722575060408051601f3d908101601f1916820190925261071f918101906116bd565b60015b61074a57604051630c76093760e01b81526001600160a01b03831660048201526024016104a2565b6000805160206117ea833981519152811461077b57604051632a87526960e21b8152600481018290526024016104a2565b6000805160206117ea8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610846576000836001600160a01b0316836040516107e291906116d6565b600060405180830381855af49150503d806000811461081d576040519150601f19603f3d011682016040523d82523d6000602084013e610822565b606091505b5050905080610844576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108965760405163703e46dd60e11b815260040160405180910390fd5b506000805160206117ea83398151915290565b6001600160a01b03811660009081526003602090815260409182902060010180548351818402810184019094528084526060939283018282801561093e57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116108fb5790505b50505050509050919050565b6001546001600160a01b031633146109745760405162461bcd60e51b81526004016104a29061164a565b6002805490600061098483611705565b91905055505050565b6001546001600160a01b031633146109b75760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038216600090815260036020819052604082200180548392906109e290849061171c565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610518565b600154600090819081906001600160a01b03163314610a595760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038716600090815260036020526040812090610a7c8989610f6e565b600183015490915087158015610a9b5750600481101580610a9b575081155b15610ab3576000806003955095509550505050610c45565b818810610ad35786610ace57610acb838a8a8561100f565b95505b610aec565b610adf838a8a856110f3565b610ae990866116a4565b94505b6000895b81610bee576001600160601b038116600090815260208690526040812080548c9290610b1d9084906116a4565b90915550506001600160601b03811660009081526020869052604081208054869290610b4a90849061171c565b90915550506000196001600160601b03821601610b6a5760019150610af0565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdf919061172f565b50949550610af0945050505050565b604080516001600160601b038d168152602081018c90526001600160a01b038e16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a25060009450505050505b9450945094915050565b6001546001600160a01b03163314610c795760405162461bcd60e51b81526004016104a29061164a565b6000610c84826108a9565b80519091505b801561084657600180546001600160a01b03169063fbb519e79085908590610cb2908661171c565b81518110610cc257610cc26117a4565b60209081029190910101516040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526001600160601b031660248201526000604482018190526064820152608401600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050508080610d4d90611705565b915050610c8a565b6001546001600160a01b03163314610d7f5760405162461bcd60e51b81526004016104a29061164a565b60028054906000610984836117ba565b6001600160a01b038216600090815260036020819052604082206002810154918101546001820154929390929091825b82811015610e3a57866001600160601b0316826001018281548110610de657610de66117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603610e32576001600160601b0387166000908152602083905260409020549350610e3a565b600101610dbf565b505092959194509250565b6001546001600160a01b03163314610e6f5760405162461bcd60e51b81526004016104a29061164a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610ebb5760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038216600090815260036020526040902060028101548211610efd5781816002016000828254610ef2919061171c565b909155506108469050565b60006002820155505050565b6000546001600160a01b031633146101cd5760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b60648201526084016104a2565b6001600160a01b0382166000908152600360205260408120815b600182015481101561100757836001600160601b0316826001018281548110610fb357610fb36117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603610fff576001600160601b0384166000908152602083905260409020549250611007565b600101610f88565b505092915050565b60008085600201548660030154101561102957600061103d565b8560020154866003015461103d919061171c565b905061104981846116a4565b84101561105757600061106c565b80611062848661171c565b61106c919061171c565b9150826000036110b557600186810180548083018255600091825260209091206002820401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866002015410156110c757836110e2565b838387600201546110d8919061171c565b6110e291906116a4565b866002018190555050949350505050565b6003840154600090611105848461171c565b61110f91906116a4565b85600201541061112a57611123838361171c565b9050611150565b8460030154856002015410611150578460030154856002015461114d919061171c565b90505b826000036112b95760018501545b80156112b757846001600160601b03168660010160018361117f919061171c565b8154811061118f5761118f6117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036112a5576001808701805490916111cd9161171c565b815481106111dd576111dd6117a4565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087810190611213908461171c565b81548110611223576112236117a4565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b031602179055508560010180548061126f5761126f6117d3565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556112b7565b806112af81611705565b91505061115e565b505b81856002015410156112cb57826112e6565b828286600201546112dc919061171c565b6112e691906116a4565b8560020181905550949350505050565b6001600160a01b03811681146101cd57600080fd5b6000806040838503121561131e57600080fd5b8235611329816112f6565b946020939093013593505050565b60006020828403121561134957600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261137757600080fd5b813567ffffffffffffffff8082111561139257611392611350565b604051601f8301601f19908116603f011681019082821181831017156113ba576113ba611350565b816040528381528660208588010111156113d357600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561140657600080fd5b82359150602083013567ffffffffffffffff81111561142457600080fd5b61143085828601611366565b9150509250929050565b6000806040838503121561144d57600080fd5b8235611458816112f6565b91506020830135611468816112f6565b809150509250929050565b60008060006060848603121561148857600080fd5b505081359360208301359350604090920135919050565b600080604083850312156114b257600080fd5b82356114bd816112f6565b9150602083013567ffffffffffffffff81111561142457600080fd5b6000602082840312156114eb57600080fd5b81356114f6816112f6565b9392505050565b6020808252825182820181905260009190848201906040850190845b8181101561153e5783516001600160601b031683529284019291840191600101611519565b50909695505050505050565b6000806040838503121561155d57600080fd5b50508035926020909101359150565b6001600160601b03811681146101cd57600080fd5b80151581146101cd57600080fd5b600080600080608085870312156115a557600080fd5b84356115b0816112f6565b935060208501356115c08161156c565b92506040850135915060608501356115d781611581565b939692955090935050565b83815260208101839052606081016008831061160e57634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6000806040838503121561162f57600080fd5b823561163a816112f6565b915060208301356114688161156c565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156116b7576116b761168e565b92915050565b6000602082840312156116cf57600080fd5b5051919050565b6000825160005b818110156116f757602081860181015185830152016116dd565b506000920191825250919050565b6000816117145761171461168e565b506000190190565b818103818111156116b7576116b761168e565b600080600080600080600060e0888a03121561174a57600080fd5b87516117558161156c565b602089015190975061176681611581565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161179481611581565b8091505092959891949750929550565b634e487b7160e01b600052603260045260246000fd5b6000600182016117cc576117cc61168e565b5060010190565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200166151e57cedd4332854be3f1b542627de717718d9832e670b79904c4b162d864736f6c63430008180033", - "devdoc": { - "details": "An adapted version of the SortitionModule contract for educational purposes.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "Upgraded(address)": { - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." - }, - "draw(bytes32,uint256,uint256)": { - "details": "Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.", - "returns": { - "drawnAddress": "The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended." - } - }, - "getJurorBalance(address,uint96)": { - "details": "Gets the stake of a juror in a court. Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in but acceptable for this educational implementation.", - "params": { - "_courtID": "The ID of the court.", - "_juror": "The address of the juror." - }, - "returns": { - "nbCourts": "The number of courts the juror has staked in.", - "stakedInCourt": "The amount of tokens staked by the juror in the court.", - "totalLocked": "The total amount of tokens locked by the juror in the court.", - "totalStaked": "The total amount of tokens staked by the juror in the court." - } - }, - "getJurorCourtIDs(address)": { - "details": "Gets the court identifiers where a specific `_juror` has staked.", - "params": { - "_juror": "The address of the juror." - } - }, - "initialize(address,address)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_core": "The KlerosCore." - } - }, - "notifyRandomNumber(uint256)": { - "details": "Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().", - "params": { - "_randomNumber": "Random number returned by RNG contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setJurorInactive(address)": { - "details": "Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", - "params": { - "_account": "The juror to unstake." - } - }, - "setStake(address,uint96,uint256,bool)": { - "details": "Sets the specified juror's stake in a court. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", - "params": { - "_account": "The address of the juror.", - "_alreadyTransferred": "True if the tokens were already transferred from juror. Only relevant for delayed stakes.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake." - }, - "returns": { - "pnkDeposit": "The amount of PNK to be deposited.", - "pnkWithdrawal": "The amount of PNK to be withdrawn.", - "stakingResult": "The result of the staking operation." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - } - }, - "title": "SortitionModuleUniversity", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ], - "InvalidImplementation(address)": [ - { - "notice": "The `implementation` is not UUPS-compliant" - } - ] - }, - "events": { - "Upgraded(address)": { - "notice": "Emitted when the `implementation` has been successfully upgraded." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 26933, - "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 26936, - "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCoreUniversity)26904" - }, - { - "astId": 26938, - "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "disputesWithoutJurors", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 26943, - "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "jurors", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_address,t_struct(Juror)26931_storage)" - }, - { - "astId": 26945, - "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "transientJuror", - "offset": 0, - "slot": "4", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_uint96)dyn_storage": { - "base": "t_uint96", - "encoding": "dynamic_array", - "label": "uint96[]", - "numberOfBytes": "32" - }, - "t_contract(KlerosCoreUniversity)26904": { - "encoding": "inplace", - "label": "contract KlerosCoreUniversity", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_struct(Juror)26931_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct SortitionModuleUniversity.Juror)", - "numberOfBytes": "32", - "value": "t_struct(Juror)26931_storage" - }, - "t_mapping(t_uint96,t_uint256)": { - "encoding": "mapping", - "key": "t_uint96", - "label": "mapping(uint96 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Juror)26931_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleUniversity.Juror", - "members": [ - { - "astId": 26923, - "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "stakesByCourtID", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_uint96,t_uint256)" - }, - { - "astId": 26926, - "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "courtIDs", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint96)dyn_storage" - }, - { - "astId": 26928, - "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "stakedPnk", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 26930, - "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "lockedPnk", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json deleted file mode 100644 index e098e68d0..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - "transactionIndex": 1, - "gasUsed": "210047", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010800000020000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6a08d6d6cf180ae6bf3126f86fbedfd17212528b22a7a9403addd2dd6b1109c3", - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 96308572, - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", - "address": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x6a08d6d6cf180ae6bf3126f86fbedfd17212528b22a7a9403addd2dd6b1109c3" - } - ], - "blockNumber": 96308572, - "cumulativeGasUsed": "210047", - "status": 1, - "byzantium": true - }, - "args": [ - "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000005ab37f38778bc175852fa353056591d91c744ce6" - ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleUniversityProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220cbf6c95b71e3c03306025a1af7f6aa4f021b4a8c8f5a8c68988b35c4442edb4964736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220cbf6c95b71e3c03306025a1af7f6aa4f021b4a8c8f5a8c68988b35c4442edb4964736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json deleted file mode 100644 index 1789a8838..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json +++ /dev/null @@ -1,1679 +0,0 @@ -{ - "address": "0x8a26445989c944C58503275ad87Ab4d7b17d4F1e", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNK", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "LeftoverPNKWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum ISortitionModule.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "StakeDelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "_unlock", - "type": "bool" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amountAllCourts", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - } - ], - "name": "changeMaxDrawingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - } - ], - "name": "changeMinStakingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "changeRandomNumberGenerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "core", - "outputs": [ - { - "internalType": "contract KlerosCore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDisputeHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createTree", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeReadIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delayedStakeWriteIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "delayedStakes", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "alreadyTransferred", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "disputesWithoutJurors", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_coreDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [ - { - "internalType": "address", - "name": "drawnAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "executeDelayedStakes", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getJurorBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalLocked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stakedInCourt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbCourts", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorCourtIDs", - "outputs": [ - { - "internalType": "uint96[]", - "name": "", - "type": "uint96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorLeftoverPNK", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract KlerosCore", - "name": "_core", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - }, - { - "internalType": "contract RNG", - "name": "_rng", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rngLookahead", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize4", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - } - ], - "name": "isJurorStaked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "jurors", - "outputs": [ - { - "internalType": "uint256", - "name": "stakedPnk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedPnk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPhaseChange", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "jurorAccount", - "type": "address" - }, - { - "internalType": "uint96", - "name": "courtId", - "type": "uint96" - } - ], - "name": "latestDelayedStakeIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "lockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxDrawingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minStakingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" - } - ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "passPhase", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availablePenalty", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "phase", - "outputs": [ - { - "internalType": "enum ISortitionModule.Phase", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "postDrawHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "randomNumberRequestBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rng", - "outputs": [ - { - "internalType": "contract RNG", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rngLookahead", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "setJurorInactive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_ID", - "type": "bytes32" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_newStake", - "type": "uint256" - } - ], - "name": "validateStake", - "outputs": [ - { - "internalType": "uint256", - "name": "pnkDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pnkWithdrawal", - "type": "uint256" - }, - { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "withdrawLeftoverPNK", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x9460ccf2d0ea245293561dd3e4edb127a2a436440d19f6a526ecc1cad9452e5f", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x8a26445989c944C58503275ad87Ab4d7b17d4F1e", - "transactionIndex": 2, - "gasUsed": "2691150", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000800000000000000000000000000000000000000000000000000", - "blockHash": "0x217c52c28049c97c6be63414abd08a57188b03cdc2e7a16e4d0c744733e59705", - "transactionHash": "0x9460ccf2d0ea245293561dd3e4edb127a2a436440d19f6a526ecc1cad9452e5f", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 175309486, - "transactionHash": "0x9460ccf2d0ea245293561dd3e4edb127a2a436440d19f6a526ecc1cad9452e5f", - "address": "0x8a26445989c944C58503275ad87Ab4d7b17d4F1e", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 2, - "blockHash": "0x217c52c28049c97c6be63414abd08a57188b03cdc2e7a16e4d0c744733e59705" - } - ], - "blockNumber": 175309486, - "cumulativeGasUsed": "2824989", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "f4735958fa6999318407ac2ba3cb7822", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LeftoverPNK\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LeftoverPNKWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"_phase\",\"type\":\"uint8\"}],\"name\":\"NewPhase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_unlock\",\"type\":\"bool\"}],\"name\":\"StakeLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amountAllCourts\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorLeftoverPNK\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"isJurorStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedPnk\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedPnk\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"jurorAccount\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtId\",\"type\":\"uint96\"}],\"name\":\"latestDelayedStakeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"availablePenalty\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumberRequestBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngLookahead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"validateStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"withdrawLeftoverPNK\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A factory of trees that keeps track of staked values for sortition.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LeftoverPNK(address,uint256)\":{\"details\":\"Emitted when leftover PNK is available.\",\"params\":{\"_account\":\"The account of the juror.\",\"_amount\":\"The amount of PNK available.\"}},\"LeftoverPNKWithdrawn(address,uint256)\":{\"details\":\"Emitted when leftover PNK is withdrawn.\",\"params\":{\"_account\":\"The account of the juror withdrawing PNK.\",\"_amount\":\"The amount of PNK withdrawn.\"}},\"StakeDelayed(address,uint96,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_courtID\":\"The ID of the court.\"}},\"StakeLocked(address,uint256,bool)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_relativeAmount\":\"The amount of tokens locked.\",\"_unlock\":\"Whether the stake is locked or unlocked.\"}},\"StakeSet(address,uint256,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_amountAllCourts\":\"The amount of tokens staked in all courts.\",\"_courtID\":\"The ID of the court.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"changeMaxDrawingTime(uint256)\":{\"details\":\"Changes the `maxDrawingTime` storage variable.\",\"params\":{\"_maxDrawingTime\":\"The new value for the `maxDrawingTime` storage variable.\"}},\"changeMinStakingTime(uint256)\":{\"details\":\"Changes the `minStakingTime` storage variable.\",\"params\":{\"_minStakingTime\":\"The new value for the `minStakingTime` storage variable.\"}},\"changeRandomNumberGenerator(address,uint256)\":{\"details\":\"Changes the `_rng` and `_rngLookahead` storage variables.\",\"params\":{\"_rng\":\"The new value for the `RNGenerator` storage variable.\",\"_rngLookahead\":\"The new value for the `rngLookahead` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createTree(bytes32,bytes)\":{\"details\":\"Create a sortition sum tree at the specified key.\",\"params\":{\"_extraData\":\"Extra data that contains the number of children each node in the tree should have.\",\"_key\":\"The key of the new tree.\"}},\"draw(bytes32,uint256,uint256)\":{\"details\":\"Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.\",\"params\":{\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\",\"_key\":\"The key of the tree.\",\"_nonce\":\"Nonce to hash with random number.\"},\"returns\":{\"drawnAddress\":\"The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended.\"}},\"executeDelayedStakes(uint256)\":{\"details\":\"Executes the next delayed stakes.\",\"params\":{\"_iterations\":\"The number of delayed stakes to execute.\"}},\"getJurorCourtIDs(address)\":{\"details\":\"Gets the court identifiers where a specific `_juror` has staked.\",\"params\":{\"_juror\":\"The address of the juror.\"}},\"initialize(address,address,uint256,uint256,address,uint256)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_governor\":\"The governor.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_minStakingTime\":\"Minimal time to stake\",\"_rng\":\"The random number generator.\",\"_rngLookahead\":\"Lookahead value for rng.\"}},\"notifyRandomNumber(uint256)\":{\"details\":\"Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\",\"params\":{\"_randomNumber\":\"Random number returned by RNG contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setJurorInactive(address)\":{\"details\":\"Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The juror to unstake.\"}},\"setStake(address,uint96,uint256,uint256,uint256)\":{\"details\":\"Update the state of the stakes, called by KC at the end of setStake flow. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\",\"_pnkDeposit\":\"The amount of PNK to be deposited.\",\"_pnkWithdrawal\":\"The amount of PNK to be withdrawn.\"}},\"stakeOf(address,uint96)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_juror\":\"The address of the juror.\"},\"returns\":{\"_0\":\"value The stake of the juror in the court.\"}},\"stakeOf(bytes32,bytes32)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_ID\":\"The stake path ID, corresponding to a juror.\",\"_key\":\"The key of the tree, corresponding to a court.\"},\"returns\":{\"_0\":\"The stake of the juror in the court.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"validateStake(address,uint96,uint256)\":{\"details\":\"Validate the specified juror's new stake for a court. Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"},\"returns\":{\"pnkDeposit\":\"The amount of PNK to be deposited.\",\"pnkWithdrawal\":\"The amount of PNK to be withdrawn.\",\"stakingResult\":\"The result of the staking operation.\"}},\"withdrawLeftoverPNK(address)\":{\"details\":\"Gives back the locked PNKs in case the juror fully unstaked earlier. Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). In this case the juror can use this function to withdraw the leftover tokens. Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\",\"params\":{\"_account\":\"The juror whose PNK to withdraw.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"SortitionModule\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"events\":{\"StakeDelayed(address,uint96,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed.\"},\"StakeLocked(address,uint256,bool)\":{\"notice\":\"Emitted when a juror's stake is locked.\"},\"StakeSet(address,uint256,uint256,uint256)\":{\"notice\":\"Emitted when a juror stakes in a court.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/SortitionModule.sol\":\"SortitionModule\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase {\\n string public constant override version = \\\"0.9.4\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) external reinitializer(1) {\\n __KlerosCoreBase_initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress\\n );\\n }\\n\\n function initialize5() external reinitializer(5) {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0xd09847c220b2727d8e68ef98b0b7ae6e9f678637626b4265abd4ef4fca9411b9\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __KlerosCoreBase_initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) internal onlyInitializing {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, OnError.Return);\\n }\\n\\n /// @dev Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n (uint256 pnkBalance, uint256 availablePenalty) = sortitionModule.penalizeStake(account, penalty);\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n // Unstake the juror from all courts if he was inactive or his balance can't cover penalties anymore.\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Transfer the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @dev Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @dev Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @dev Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @dev Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(address _account, uint96 _courtID, uint256 _newStake, OnError _onError) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x03e225e6c6c144dcbc7db8641d46a3b7a43b6222b83ea8b15c4cde58ef2cadd2\",\"license\":\"MIT\"},\"src/arbitration/SortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {SortitionModuleBase, KlerosCore, RNG} from \\\"./SortitionModuleBase.sol\\\";\\n\\n/// @title SortitionModule\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModule is SortitionModuleBase {\\n string public constant override version = \\\"0.9.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor.\\n /// @param _core The KlerosCore.\\n /// @param _minStakingTime Minimal time to stake\\n /// @param _maxDrawingTime Time after which the drawing phase can be switched\\n /// @param _rng The random number generator.\\n /// @param _rngLookahead Lookahead value for rng.\\n function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) external reinitializer(1) {\\n __SortitionModuleBase_initialize(_governor, _core, _minStakingTime, _maxDrawingTime, _rng, _rngLookahead);\\n }\\n\\n function initialize4() external reinitializer(4) {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view virtual override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0xc527c995e140a3092ed63f7a30043bd7f27190def9dd20499beeb4d8e009fb1c\",\"license\":\"MIT\"},\"src/arbitration/SortitionModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore} from \\\"./KlerosCore.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {RNG} from \\\"../rng/RNG.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title SortitionModuleBase\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\nabstract contract SortitionModuleBase is ISortitionModule, Initializable, UUPSProxiable {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct SortitionSumTree {\\n uint256 K; // The maximum number of children per node.\\n // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around.\\n uint256[] stack;\\n uint256[] nodes;\\n // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node.\\n mapping(bytes32 => uint256) IDsToNodeIndexes;\\n mapping(uint256 => bytes32) nodeIndexesToIDs;\\n }\\n\\n struct DelayedStake {\\n address account; // The address of the juror.\\n uint96 courtID; // The ID of the court.\\n uint256 stake; // The new stake.\\n bool alreadyTransferred; // DEPRECATED. True if tokens were already transferred before delayed stake's execution.\\n }\\n\\n struct Juror {\\n uint96[] courtIDs; // The IDs of courts where the juror's stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`.\\n uint256 stakedPnk; // The juror's total amount of tokens staked in subcourts. Reflects actual pnk balance.\\n uint256 lockedPnk; // The juror's total amount of tokens locked in disputes.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The core arbitrator contract.\\n Phase public phase; // The current phase.\\n uint256 public minStakingTime; // The time after which the phase can be switched to Drawing if there are open disputes.\\n uint256 public maxDrawingTime; // The time after which the phase can be switched back to Staking.\\n uint256 public lastPhaseChange; // The last time the phase was changed.\\n uint256 public randomNumberRequestBlock; // Number of the block when RNG request was made.\\n uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\n RNG public rng; // The random number generator.\\n uint256 public randomNumber; // Random number returned by RNG.\\n uint256 public rngLookahead; // Minimal block distance between requesting and obtaining a random number.\\n uint256 public delayedStakeWriteIndex; // The index of the last `delayedStake` item that was written to the array. 0 index is skipped.\\n uint256 public delayedStakeReadIndex; // The index of the next `delayedStake` item that should be processed. Starts at 1 because 0 index is skipped.\\n mapping(bytes32 treeHash => SortitionSumTree) sortitionSumTrees; // The mapping trees by keys.\\n mapping(address account => Juror) public jurors; // The jurors.\\n mapping(uint256 => DelayedStake) public delayedStakes; // Stores the stakes that were changed during Drawing phase, to update them when the phase is switched to Staking.\\n mapping(address jurorAccount => mapping(uint96 courtId => uint256)) public latestDelayedStakeIndex; // DEPRECATED. Maps the juror to its latest delayed stake. If there is already a delayed stake for this juror then it'll be replaced. latestDelayedStakeIndex[juror][courtID].\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice Emitted when a juror stakes in a court.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n /// @param _amountAllCourts The amount of tokens staked in all courts.\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts);\\n\\n /// @notice Emitted when a juror's stake is delayed.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n event StakeDelayed(address indexed _address, uint96 indexed _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is locked.\\n /// @param _address The address of the juror.\\n /// @param _relativeAmount The amount of tokens locked.\\n /// @param _unlock Whether the stake is locked or unlocked.\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n /// @dev Emitted when leftover PNK is available.\\n /// @param _account The account of the juror.\\n /// @param _amount The amount of PNK available.\\n event LeftoverPNK(address indexed _account, uint256 _amount);\\n\\n /// @dev Emitted when leftover PNK is withdrawn.\\n /// @param _account The account of the juror withdrawing PNK.\\n /// @param _amount The amount of PNK withdrawn.\\n event LeftoverPNKWithdrawn(address indexed _account, uint256 _amount);\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __SortitionModuleBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n minStakingTime = _minStakingTime;\\n maxDrawingTime = _maxDrawingTime;\\n lastPhaseChange = block.timestamp;\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n delayedStakeReadIndex = 1;\\n }\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `minStakingTime` storage variable.\\n /// @param _minStakingTime The new value for the `minStakingTime` storage variable.\\n function changeMinStakingTime(uint256 _minStakingTime) external onlyByGovernor {\\n minStakingTime = _minStakingTime;\\n }\\n\\n /// @dev Changes the `maxDrawingTime` storage variable.\\n /// @param _maxDrawingTime The new value for the `maxDrawingTime` storage variable.\\n function changeMaxDrawingTime(uint256 _maxDrawingTime) external onlyByGovernor {\\n maxDrawingTime = _maxDrawingTime;\\n }\\n\\n /// @dev Changes the `_rng` and `_rngLookahead` storage variables.\\n /// @param _rng The new value for the `RNGenerator` storage variable.\\n /// @param _rngLookahead The new value for the `rngLookahead` storage variable.\\n function changeRandomNumberGenerator(RNG _rng, uint256 _rngLookahead) external onlyByGovernor {\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n if (phase == Phase.generating) {\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function passPhase() external {\\n if (phase == Phase.staking) {\\n require(\\n block.timestamp - lastPhaseChange >= minStakingTime,\\n \\\"The minimum staking time has not passed yet.\\\"\\n );\\n require(disputesWithoutJurors > 0, \\\"There are no disputes that need jurors.\\\");\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n phase = Phase.generating;\\n } else if (phase == Phase.generating) {\\n randomNumber = rng.receiveRandomness(randomNumberRequestBlock + rngLookahead);\\n require(randomNumber != 0, \\\"Random number is not ready yet\\\");\\n phase = Phase.drawing;\\n } else if (phase == Phase.drawing) {\\n require(\\n disputesWithoutJurors == 0 || block.timestamp - lastPhaseChange >= maxDrawingTime,\\n \\\"There are still disputes without jurors and the maximum drawing time has not passed yet.\\\"\\n );\\n phase = Phase.staking;\\n }\\n\\n lastPhaseChange = block.timestamp;\\n emit NewPhase(phase);\\n }\\n\\n /// @dev Create a sortition sum tree at the specified key.\\n /// @param _key The key of the new tree.\\n /// @param _extraData Extra data that contains the number of children each node in the tree should have.\\n function createTree(bytes32 _key, bytes memory _extraData) external override onlyByCore {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 K = _extraDataToTreeK(_extraData);\\n require(tree.K == 0, \\\"Tree already exists.\\\");\\n require(K > 1, \\\"K must be greater than one.\\\");\\n tree.K = K;\\n tree.nodes.push(0);\\n }\\n\\n /// @dev Executes the next delayed stakes.\\n /// @param _iterations The number of delayed stakes to execute.\\n function executeDelayedStakes(uint256 _iterations) external {\\n require(phase == Phase.staking, \\\"Should be in Staking phase.\\\");\\n require(delayedStakeWriteIndex >= delayedStakeReadIndex, \\\"No delayed stake to execute.\\\");\\n\\n uint256 actualIterations = (delayedStakeReadIndex + _iterations) - 1 > delayedStakeWriteIndex\\n ? (delayedStakeWriteIndex - delayedStakeReadIndex) + 1\\n : _iterations;\\n uint256 newDelayedStakeReadIndex = delayedStakeReadIndex + actualIterations;\\n\\n for (uint256 i = delayedStakeReadIndex; i < newDelayedStakeReadIndex; i++) {\\n DelayedStake storage delayedStake = delayedStakes[i];\\n core.setStakeBySortitionModule(delayedStake.account, delayedStake.courtID, delayedStake.stake);\\n delete delayedStakes[i];\\n }\\n delayedStakeReadIndex = newDelayedStakeReadIndex;\\n }\\n\\n function createDisputeHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors++;\\n }\\n\\n function postDrawHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors--;\\n }\\n\\n /// @dev Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\\n /// @param _randomNumber Random number returned by RNG contract.\\n function notifyRandomNumber(uint256 _randomNumber) public override {}\\n\\n /// @dev Validate the specified juror's new stake for a court.\\n /// Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @return pnkDeposit The amount of PNK to be deposited.\\n /// @return pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @return stakingResult The result of the staking operation.\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n (pnkDeposit, pnkWithdrawal, stakingResult) = _validateStake(_account, _courtID, _newStake);\\n }\\n\\n function _validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) internal virtual returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n Juror storage juror = jurors[_account];\\n uint256 currentStake = stakeOf(_account, _courtID);\\n\\n uint256 nbCourts = juror.courtIDs.length;\\n if (currentStake == 0 && nbCourts >= MAX_STAKE_PATHS) {\\n return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed.\\n }\\n\\n if (currentStake == 0 && _newStake == 0) {\\n return (0, 0, StakingResult.CannotStakeZeroWhenNoStake); // Forbid staking 0 amount when current stake is 0 to avoid flaky behaviour.\\n }\\n\\n if (phase != Phase.staking) {\\n // Store the stake change as delayed, to be applied when the phase switches back to Staking.\\n DelayedStake storage delayedStake = delayedStakes[++delayedStakeWriteIndex];\\n delayedStake.account = _account;\\n delayedStake.courtID = _courtID;\\n delayedStake.stake = _newStake;\\n emit StakeDelayed(_account, _courtID, _newStake);\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Delayed);\\n }\\n\\n // Current phase is Staking: set stakes.\\n if (_newStake >= currentStake) {\\n pnkDeposit = _newStake - currentStake;\\n } else {\\n pnkWithdrawal = currentStake - _newStake;\\n // Ensure locked tokens remain in the contract. They can only be released during Execution.\\n uint256 possibleWithdrawal = juror.stakedPnk > juror.lockedPnk ? juror.stakedPnk - juror.lockedPnk : 0;\\n if (pnkWithdrawal > possibleWithdrawal) {\\n pnkWithdrawal = possibleWithdrawal;\\n }\\n }\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n /// @dev Update the state of the stakes, called by KC at the end of setStake flow.\\n /// `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _pnkDeposit The amount of PNK to be deposited.\\n /// @param _pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @param _newStake The new stake.\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external override onlyByCore {\\n _setStake(_account, _courtID, _pnkDeposit, _pnkWithdrawal, _newStake);\\n }\\n\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) internal virtual {\\n Juror storage juror = jurors[_account];\\n if (_pnkDeposit > 0) {\\n uint256 currentStake = stakeOf(_account, _courtID);\\n if (currentStake == 0) {\\n juror.courtIDs.push(_courtID);\\n }\\n // Increase juror's balance by deposited amount.\\n juror.stakedPnk += _pnkDeposit;\\n } else {\\n juror.stakedPnk -= _pnkWithdrawal;\\n if (_newStake == 0) {\\n // Cleanup\\n for (uint256 i = juror.courtIDs.length; i > 0; i--) {\\n if (juror.courtIDs[i - 1] == _courtID) {\\n juror.courtIDs[i - 1] = juror.courtIDs[juror.courtIDs.length - 1];\\n juror.courtIDs.pop();\\n break;\\n }\\n }\\n }\\n }\\n\\n // Update the sortition sum tree.\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_account, _courtID);\\n bool finished = false;\\n uint96 currenCourtID = _courtID;\\n while (!finished) {\\n // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn.\\n _set(bytes32(uint256(currenCourtID)), _newStake, stakePathID);\\n if (currenCourtID == GENERAL_COURT) {\\n finished = true;\\n } else {\\n (currenCourtID, , , , , , ) = core.courts(currenCourtID); // Get the parent court.\\n }\\n }\\n emit StakeSet(_account, _courtID, _newStake, juror.stakedPnk);\\n }\\n\\n function lockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n jurors[_account].lockedPnk += _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, false);\\n }\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n Juror storage juror = jurors[_account];\\n juror.lockedPnk -= _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, true);\\n\\n uint256 amount = getJurorLeftoverPNK(_account);\\n if (amount > 0) {\\n emit LeftoverPNK(_account, amount);\\n }\\n }\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external override onlyByCore returns (uint256 pnkBalance, uint256 availablePenalty) {\\n Juror storage juror = jurors[_account];\\n uint256 stakedPnk = juror.stakedPnk;\\n\\n if (stakedPnk >= _relativeAmount) {\\n availablePenalty = _relativeAmount;\\n juror.stakedPnk -= _relativeAmount;\\n } else {\\n availablePenalty = stakedPnk;\\n juror.stakedPnk = 0;\\n }\\n\\n pnkBalance = juror.stakedPnk;\\n return (pnkBalance, availablePenalty);\\n }\\n\\n /// @dev Unstakes the inactive juror from all courts.\\n /// `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The juror to unstake.\\n function setJurorInactive(address _account) external override onlyByCore {\\n uint96[] memory courtIDs = getJurorCourtIDs(_account);\\n for (uint256 j = courtIDs.length; j > 0; j--) {\\n core.setStakeBySortitionModule(_account, courtIDs[j - 1], 0);\\n }\\n }\\n\\n /// @dev Gives back the locked PNKs in case the juror fully unstaked earlier.\\n /// Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance\\n /// while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked).\\n /// In this case the juror can use this function to withdraw the leftover tokens.\\n /// Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\\n /// @param _account The juror whose PNK to withdraw.\\n function withdrawLeftoverPNK(address _account) external override {\\n // Can withdraw the leftover PNK if fully unstaked, has no tokens locked and has positive balance.\\n // This withdrawal can't be triggered by calling setStake() in KlerosCore because current stake is technically 0, thus it is done via separate function.\\n uint256 amount = getJurorLeftoverPNK(_account);\\n require(amount > 0, \\\"Not eligible for withdrawal.\\\");\\n jurors[_account].stakedPnk = 0;\\n core.transferBySortitionModule(_account, amount);\\n emit LeftoverPNKWithdrawn(_account, amount);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Draw an ID from a tree using a number.\\n /// Note that this function reverts if the sum of all values in the tree is 0.\\n /// @param _key The key of the tree.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _nonce Nonce to hash with random number.\\n /// @return drawnAddress The drawn address.\\n /// `O(k * log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function draw(\\n bytes32 _key,\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) public view override returns (address drawnAddress) {\\n require(phase == Phase.drawing, \\\"Wrong phase.\\\");\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n if (tree.nodes[0] == 0) {\\n return address(0); // No jurors staked.\\n }\\n\\n uint256 currentDrawnNumber = uint256(keccak256(abi.encodePacked(randomNumber, _coreDisputeID, _nonce))) %\\n tree.nodes[0];\\n\\n // While it still has children\\n uint256 treeIndex = 0;\\n while ((tree.K * treeIndex) + 1 < tree.nodes.length) {\\n for (uint256 i = 1; i <= tree.K; i++) {\\n // Loop over children.\\n uint256 nodeIndex = (tree.K * treeIndex) + i;\\n uint256 nodeValue = tree.nodes[nodeIndex];\\n\\n if (currentDrawnNumber >= nodeValue) {\\n // Go to the next child.\\n currentDrawnNumber -= nodeValue;\\n } else {\\n // Pick this child.\\n treeIndex = nodeIndex;\\n break;\\n }\\n }\\n }\\n drawnAddress = _stakePathIDToAccount(tree.nodeIndexesToIDs[treeIndex]);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return value The stake of the juror in the court.\\n function stakeOf(address _juror, uint96 _courtID) public view returns (uint256) {\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_juror, _courtID);\\n return stakeOf(bytes32(uint256(_courtID)), stakePathID);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _key The key of the tree, corresponding to a court.\\n /// @param _ID The stake path ID, corresponding to a juror.\\n /// @return The stake of the juror in the court.\\n function stakeOf(bytes32 _key, bytes32 _ID) public view returns (uint256) {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint treeIndex = tree.IDsToNodeIndexes[_ID];\\n if (treeIndex == 0) {\\n return 0;\\n }\\n return tree.nodes[treeIndex];\\n }\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n )\\n external\\n view\\n override\\n returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts)\\n {\\n Juror storage juror = jurors[_juror];\\n totalStaked = juror.stakedPnk;\\n totalLocked = juror.lockedPnk;\\n stakedInCourt = stakeOf(_juror, _courtID);\\n nbCourts = juror.courtIDs.length;\\n }\\n\\n /// @dev Gets the court identifiers where a specific `_juror` has staked.\\n /// @param _juror The address of the juror.\\n function getJurorCourtIDs(address _juror) public view override returns (uint96[] memory) {\\n return jurors[_juror].courtIDs;\\n }\\n\\n function isJurorStaked(address _juror) external view override returns (bool) {\\n return jurors[_juror].stakedPnk > 0;\\n }\\n\\n function getJurorLeftoverPNK(address _juror) public view override returns (uint256) {\\n Juror storage juror = jurors[_juror];\\n if (juror.courtIDs.length == 0 && juror.lockedPnk == 0) {\\n return juror.stakedPnk;\\n } else {\\n return 0;\\n }\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Update all the parents of a node.\\n /// @param _key The key of the tree to update.\\n /// @param _treeIndex The index of the node to start from.\\n /// @param _plusOrMinus Whether to add (true) or substract (false).\\n /// @param _value The value to add or substract.\\n /// `O(log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function _updateParents(bytes32 _key, uint256 _treeIndex, bool _plusOrMinus, uint256 _value) private {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n uint256 parentIndex = _treeIndex;\\n while (parentIndex != 0) {\\n parentIndex = (parentIndex - 1) / tree.K;\\n tree.nodes[parentIndex] = _plusOrMinus\\n ? tree.nodes[parentIndex] + _value\\n : tree.nodes[parentIndex] - _value;\\n }\\n }\\n\\n /// @dev Retrieves a juror's address from the stake path ID.\\n /// @param _stakePathID The stake path ID to unpack.\\n /// @return account The account.\\n function _stakePathIDToAccount(bytes32 _stakePathID) internal pure returns (address account) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(add(ptr, 0x0c), i), byte(i, _stakePathID))\\n }\\n account := mload(ptr)\\n }\\n }\\n\\n function _extraDataToTreeK(bytes memory _extraData) internal pure returns (uint256 K) {\\n if (_extraData.length >= 32) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n K := mload(add(_extraData, 0x20))\\n }\\n } else {\\n K = DEFAULT_K;\\n }\\n }\\n\\n /// @dev Set a value in a tree.\\n /// @param _key The key of the tree.\\n /// @param _value The new value.\\n /// @param _ID The ID of the value.\\n /// `O(log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function _set(bytes32 _key, uint256 _value, bytes32 _ID) internal {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n if (treeIndex == 0) {\\n // No existing node.\\n if (_value != 0) {\\n // Non zero value.\\n // Append.\\n // Add node.\\n if (tree.stack.length == 0) {\\n // No vacant spots.\\n // Get the index and append the value.\\n treeIndex = tree.nodes.length;\\n tree.nodes.push(_value);\\n\\n // Potentially append a new node and make the parent a sum node.\\n if (treeIndex != 1 && (treeIndex - 1) % tree.K == 0) {\\n // Is first child.\\n uint256 parentIndex = treeIndex / tree.K;\\n bytes32 parentID = tree.nodeIndexesToIDs[parentIndex];\\n uint256 newIndex = treeIndex + 1;\\n tree.nodes.push(tree.nodes[parentIndex]);\\n delete tree.nodeIndexesToIDs[parentIndex];\\n tree.IDsToNodeIndexes[parentID] = newIndex;\\n tree.nodeIndexesToIDs[newIndex] = parentID;\\n }\\n } else {\\n // Some vacant spot.\\n // Pop the stack and append the value.\\n treeIndex = tree.stack[tree.stack.length - 1];\\n tree.stack.pop();\\n tree.nodes[treeIndex] = _value;\\n }\\n\\n // Add label.\\n tree.IDsToNodeIndexes[_ID] = treeIndex;\\n tree.nodeIndexesToIDs[treeIndex] = _ID;\\n\\n _updateParents(_key, treeIndex, true, _value);\\n }\\n } else {\\n // Existing node.\\n if (_value == 0) {\\n // Zero value.\\n // Remove.\\n // Remember value and set to 0.\\n uint256 value = tree.nodes[treeIndex];\\n tree.nodes[treeIndex] = 0;\\n\\n // Push to stack.\\n tree.stack.push(treeIndex);\\n\\n // Clear label.\\n delete tree.IDsToNodeIndexes[_ID];\\n delete tree.nodeIndexesToIDs[treeIndex];\\n\\n _updateParents(_key, treeIndex, false, value);\\n } else if (_value != tree.nodes[treeIndex]) {\\n // New, non zero value.\\n // Set.\\n bool plusOrMinus = tree.nodes[treeIndex] <= _value;\\n uint256 plusOrMinusValue = plusOrMinus\\n ? _value - tree.nodes[treeIndex]\\n : tree.nodes[treeIndex] - _value;\\n tree.nodes[treeIndex] = _value;\\n\\n _updateParents(_key, treeIndex, plusOrMinus, plusOrMinusValue);\\n }\\n }\\n }\\n\\n /// @dev Packs an account and a court ID into a stake path ID.\\n /// @param _account The address of the juror to pack.\\n /// @param _courtID The court ID to pack.\\n /// @return stakePathID The stake path ID.\\n function _accountAndCourtIDToStakePathID(\\n address _account,\\n uint96 _courtID\\n ) internal pure returns (bytes32 stakePathID) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(add(0x0c, i), _account))\\n }\\n for {\\n let i := 0x14\\n } lt(i, 0x20) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(i, _courtID))\\n }\\n stakePathID := mload(ptr)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x550f0c0bea80f7457f76f50e27dfa1b8632fe9eb28d4e57f8b2bed9a10a31696\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x054fd09cc201ddca3d92a07169fb86b9db21a510a2a0f15ac4b6dffd900079fe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xfc7cc82c1431720da41aeb1a181171f10466b5d0d280db7aa37c451681185493\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xad1cdad6c218690affcadc268f984985b20e5fe0af3242a14867879b8cf86cf9\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(\\n address _account,\\n uint256 _relativeAmount\\n ) external returns (uint256 pnkBalance, uint256 availablePenalty);\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function withdrawLeftoverPNK(address _account) external;\\n}\\n\",\"keccak256\":\"0xc4325f9ffdfa815b2683f897b93944d473b736f02810fb7551afea70753129bc\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x695244532a711d08d522f9db0e86f7824bcdacf20027beab277b330076b1cf09\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x285ebcc4de7d7266ebfa1357f579e4df064801e040efc79dcf12b0555d16c652\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x252f8c2ff9755c7b0b8db037a1c175311569f337640cac1201834b22b2c6b431\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa99860dabe44d80278736924130f6e1208656e29b01eeffbc1e52ac81c26b6b3\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0x0f6a8fb72ed7e5a602dc0aaf4f3a037ba9f1765b79b6320604ff810d578af2cf\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051612f3f6100fc60003960008181611389015281816113b201526115aa0152612f3f6000f3fe6080604052600436106102725760003560e01c80637dc38f141161014f578063caeb50ed116100c1578063dd5e5cb51161007a578063dd5e5cb5146107b9578063e4c0aaf4146107d9578063e534710d146107f9578063f216de4c14610831578063f2f4eb2614610851578063f6b4d82d1461087157600080fd5b8063caeb50ed146106c2578063ccbac9f5146106d7578063d09f392d146106ed578063d1c1df481461070d578063d605787b1461074d578063dca5f6b01461076d57600080fd5b8063aac03ad211610113578063aac03ad214610612578063b1c9fe6e14610632578063b5d69e9914610660578063b888adfa14610680578063c057eca714610696578063c1572618146106ac57600080fd5b80637dc38f141461057c578063823cfd7014610592578063965af6c7146105b25780639fbb56f1146105d2578063a2473cc1146105f257600080fd5b80634dbbebbc116101e857806354fd4d50116101ac57806354fd4d501461047d57806356acb050146104bb5780635d2d7846146104d15780636624192f146104f157806369f458771461053c57806376fa9fc51461055c57600080fd5b80634dbbebbc146103e85780634f1ef2861461040857806352d1902d1461041b578063543f8a361461043057806354812d171461045d57600080fd5b80631ecacab81161023a5780631ecacab81461031b57806321e1625e1461034a57806321ea9b3f1461036a57806335975f4a14610388578063477a655c146103a85780634c70a0d6146103c857600080fd5b806303432744146102775780630b274f2e146102a05780630c340a24146102b75780630e083ec9146102ef5780631b92bbbe14610305575b600080fd5b34801561028357600080fd5b5061028d60065481565b6040519081526020015b60405180910390f35b3480156102ac57600080fd5b506102b56108ff565b005b3480156102c357600080fd5b506000546102d7906001600160a01b031681565b6040516001600160a01b039091168152602001610297565b3480156102fb57600080fd5b5061028d600a5481565b34801561031157600080fd5b5061028d60035481565b34801561032757600080fd5b5061033b610336366004612896565b610cd7565b604051610297939291906128ed565b34801561035657600080fd5b506102b5610365366004612919565b610d22565b34801561037657600080fd5b506102b5610385366004612945565b50565b34801561039457600080fd5b506102b56103a3366004612945565b610dc5565b3480156103b457600080fd5b506102b56103c3366004612a01565b610fb1565b3480156103d457600080fd5b506102d76103e3366004612a47565b6110a8565b3480156103f457600080fd5b506102b5610403366004612919565b61128c565b6102b5610416366004612a73565b611375565b34801561042757600080fd5b5061028d61159d565b34801561043c57600080fd5b5061045061044b366004612aac565b6115fb565b6040516102979190612ac9565b34801561046957600080fd5b506102b5610478366004612b15565b611699565b34801561048957600080fd5b506104ae604051806040016040528060058152602001640302e392e360dc1b81525081565b6040516102979190612ba0565b3480156104c757600080fd5b5061028d600b5481565b3480156104dd57600080fd5b506102b56104ec366004612bd3565b611769565b3480156104fd57600080fd5b5061052c61050c366004612aac565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610297565b34801561054857600080fd5b506102b5610557366004612aac565b6117ac565b34801561056857600080fd5b5061028d610577366004612bd3565b6118c3565b34801561058857600080fd5b5061028d60095481565b34801561059e57600080fd5b506102b56105ad366004612945565b61191e565b3480156105be57600080fd5b506102b56105cd366004612919565b61194d565b3480156105de57600080fd5b5061028d6105ed366004612aac565b611a49565b3480156105fe57600080fd5b5061028d61060d366004612bf5565b611a8a565b34801561061e57600080fd5b506102b561062d366004612c2e565b611ab4565b34801561063e57600080fd5b5060015461065390600160a01b900460ff1681565b6040516102979190612c7f565b34801561066c57600080fd5b506102b561067b366004612aac565b611af2565b34801561068c57600080fd5b5061028d60045481565b3480156106a257600080fd5b5061028d60025481565b3480156106b857600080fd5b5061028d60055481565b3480156106ce57600080fd5b506102b5611bd2565b3480156106e357600080fd5b5061028d60085481565b3480156106f957600080fd5b506102b5610708366004612bd3565b611c83565b34801561071957600080fd5b5061072d610728366004612bf5565b611cbd565b604080519485526020850193909352918301526060820152608001610297565b34801561075957600080fd5b506007546102d7906001600160a01b031681565b34801561077957600080fd5b506107a4610788366004612aac565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610297565b3480156107c557600080fd5b506102b56107d4366004612945565b611cfc565b3480156107e557600080fd5b506102b56107f4366004612aac565b611d2b565b34801561080557600080fd5b5061028d610814366004612bf5565b600f60209081526000928352604080842090915290825290205481565b34801561083d57600080fd5b506107a461084c366004612919565b611d77565b34801561085d57600080fd5b506001546102d7906001600160a01b031681565b34801561087d57600080fd5b506108cb61088c366004612945565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b604080516001600160a01b0390951685526001600160601b0390931660208501529183015215156060820152608001610297565b6000600154600160a01b900460ff16600281111561091f5761091f6128d7565b03610a92576002546004546109349042612caf565b101561099c5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109fe5760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b6064820152608401610993565b6007546009546001600160a01b0390911690637363ae1f90610a209043612cc2565b6040518263ffffffff1660e01b8152600401610a3e91815260200190565b600060405180830381600087803b158015610a5857600080fd5b505af1158015610a6c573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c8c565b60018054600160a01b900460ff166002811115610ab157610ab16128d7565b03610ba9576007546009546005546001600160a01b03909216916313cf905491610ada91612cc2565b6040518263ffffffff1660e01b8152600401610af891815260200190565b6020604051808303816000875af1158015610b17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3b9190612cd5565b6008819055600003610b8f5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f742072656164792079657400006044820152606401610993565b600180546002919060ff60a01b1916600160a01b83610a88565b6002600154600160a01b900460ff166002811115610bc957610bc96128d7565b03610c8c576006541580610beb5750600354600454610be89042612caf565b10155b610c7e5760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a401610993565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610ccd91600160a01b90910460ff1690612c7f565b60405180910390a1565b600154600090819081906001600160a01b03163314610d085760405162461bcd60e51b815260040161099390612cee565b610d13868686611e05565b91989097509095509350505050565b6001546001600160a01b03163314610d4c5760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0382166000908152600d602052604081206002018054839290610d77908490612cc2565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610de557610de56128d7565b14610e325760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e00000000006044820152606401610993565b600b54600a541015610e865760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e000000006044820152606401610993565b6000600a54600183600b54610e9b9190612cc2565b610ea59190612caf565b11610eb05781610ecb565b600b54600a54610ec09190612caf565b610ecb906001612cc2565b9050600081600b54610edd9190612cc2565b600b549091505b81811015610fa9576000818152600e602052604090819020600180548254918301549351630761c14d60e01b815292936001600160a01b0391821693630761c14d93610f4793811692600160a01b9091046001600160601b031691600401612d32565b600060405180830381600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b5050506000838152600e60205260408120818155600180820192909255600201805460ff191690559092019150610ee49050565b50600b555050565b6001546001600160a01b03163314610fdb5760405162461bcd60e51b815260040161099390612cee565b6000828152600c6020526040812090610ff383611fa8565b82549091501561103c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b6044820152606401610993565b6001811161108c5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e00000000006044820152606401610993565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff1660028111156110ca576110ca6128d7565b146111065760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b6044820152606401610993565b6000848152600c602052604081206002810180549192909161112a5761112a612d5c565b9060005260206000200154600003611146576000915050611285565b60008160020160008154811061115e5761115e612d5c565b90600052602060002001546008548686604051602001611191939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111b49190612d88565b905060005b600283015483546111cb908390612d9c565b6111d6906001612cc2565b10156112655760015b8354811161125f576000818386600001546111fa9190612d9c565b6112049190612cc2565b9050600085600201828154811061121d5761121d612d5c565b906000526020600020015490508085106112425761123b8186612caf565b945061124a565b50915061125f565b5050808061125790612db3565b9150506111df565b506111b9565b600081815260048401602052604090205461127f90611fc4565b93505050505b9392505050565b6000546001600160a01b031633146112b65760405162461bcd60e51b815260040161099390612dcc565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156112f5576112f56128d7565b03611371576007546009546001600160a01b0390911690637363ae1f9061131c9043612cc2565b6040518263ffffffff1660e01b815260040161133a91815260200190565b600060405180830381600087803b15801561135457600080fd5b505af1158015611368573d6000803e3d6000fd5b50504360055550505b5050565b61137e82611fef565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113fc57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113f0600080516020612eea8339815191525490565b6001600160a01b031614155b1561141a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611474575060408051601f3d908101601f1916820190925261147191810190612cd5565b60015b61149c57604051630c76093760e01b81526001600160a01b0383166004820152602401610993565b600080516020612eea83398151915281146114cd57604051632a87526960e21b815260048101829052602401610993565b600080516020612eea8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611598576000836001600160a01b0316836040516115349190612e0e565b600060405180830381855af49150503d806000811461156f576040519150601f19603f3d011682016040523d82523d6000602084013e611574565b606091505b5050905080611596576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115e85760405163703e46dd60e11b815260040160405180910390fd5b50600080516020612eea83398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561168d57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161164a5790505b50505050509050919050565b600160006116a5612019565b8054909150600160401b900460ff16806116cc575080546001600160401b03808416911610155b156116e95760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561171888888888888861203d565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146117935760405162461bcd60e51b815260040161099390612cee565b600680549060006117a383612e2a565b91905055505050565b60006117b782611a49565b9050600081116118095760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656c696769626c6520666f72207769746864726177616c2e000000006044820152606401610993565b6001600160a01b038281166000818152600d6020526040808220600190810192909255905490516342c37fa360e01b8152600481019290925260248201849052909116906342c37fa390604401600060405180830381600087803b15801561187057600080fd5b505af1158015611884573d6000803e3d6000fd5b50505050816001600160a01b03167f71bb1b604559acc3db697ccf2aa4228d727cd5b133d6ffa419518d51c117c95c82604051610db991815260200190565b6000828152600c60209081526040808320848452600381019092528220548083036118f357600092505050611918565b81600201818154811061190857611908612d5c565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146119485760405162461bcd60e51b815260040161099390612dcc565b600255565b6001546001600160a01b031633146119775760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0382166000908152600d60205260408120600281018054919284926119a4908490612caf565b909155505060408051838152600160208201526001600160a01b038516917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b0910160405180910390a260006119f884611a49565b9050801561159657836001600160a01b03167f819a3744490c627e221b71743857691f9c23bf56a1ecc5351f886cfd4c3187d982604051611a3b91815260200190565b60405180910390a250505050565b6001600160a01b0381166000908152600d602052604081208054158015611a7257506002810154155b15611a81576001015492915050565b50600092915050565b600080611a97848461209d565b9050611aac6001600160601b038416826118c3565b949350505050565b6001546001600160a01b03163314611ade5760405162461bcd60e51b815260040161099390612cee565b611aeb85858585856120e5565b5050505050565b6001546001600160a01b03163314611b1c5760405162461bcd60e51b815260040161099390612cee565b6000611b27826115fb565b80519091505b801561159857600180546001600160a01b031690630761c14d9085908590611b559086612caf565b81518110611b6557611b65612d5c565b602002602001015160006040518463ffffffff1660e01b8152600401611b8d93929190612d32565b600060405180830381600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050508080611bca90612e2a565b915050611b2d565b60046000611bde612019565b8054909150600160401b900460ff1680611c05575080546001600160401b03808416911610155b15611c225760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611cad5760405162461bcd60e51b815260040161099390612cee565b600680549060006117a383612db3565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611cef8787611a8a565b9054949793965094505050565b6000546001600160a01b03163314611d265760405162461bcd60e51b815260040161099390612dcc565b600355565b6000546001600160a01b03163314611d555760405162461bcd60e51b815260040161099390612dcc565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60015460009081906001600160a01b03163314611da65760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0384166000908152600d602052604090206001810154848110611dec5784925084826001016000828254611de19190612caf565b90915550611df79050565b600060018301559150815b506001015491509250929050565b6001600160a01b0383166000908152600d602052604081208190819081611e2c8888611a8a565b825490915081158015611e40575060048110155b15611e58576000806004955095509550505050611f9f565b81158015611e64575086155b15611e7c576000806009955095509550505050611f9f565b6000600154600160a01b900460ff166002811115611e9c57611e9c6128d7565b14611f37576000600e6000600a60008154611eb690612db3565b9182905550815260208082019290925260409081016000206001600160601b038c16600160a01b81026001600160a01b038f169081178355600183018d905592518c8152919450927fa59837f9df3fb816613d84e8fefe31ec8d6e67ff43df6533e3f793a3f53aade9910160405180910390a35060019350611f9f92505050565b818710611f4f57611f488288612caf565b9550611f97565b611f598783612caf565b945060008360020154846001015411611f73576000611f87565b83600201548460010154611f879190612caf565b905080861115611f95578095505b505b506000925050505b93509350939050565b60006020825110611fbb57506020015190565b5060065b919050565b600060405160005b6014811015611fe75783811a81600c84010153600101611fcc565b505192915050565b6000546001600160a01b031633146103855760405162461bcd60e51b815260040161099390612dcc565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61204561241b565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b60148110156120c0578481600c011a818301536001016120a5565b5060145b60208110156120dc5783811a818301536001016120c4565b50519392505050565b6001600160a01b0385166000908152600d60205260409020831561217457600061210f8787611a8a565b905080600003612154578154600180820184556000848152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918916021790555b848260010160008282546121689190612cc2565b909155506122eb915050565b828160010160008282546121889190612caf565b909155505060008290036122eb5780545b80156122e9576001600160601b038616826121b5600184612caf565b815481106121c5576121c5612d5c565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036122d7578154829061220190600190612caf565b8154811061221157612211612d5c565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122459084612caf565b8154811061225557612255612d5c565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122a1576122a1612e41565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556122e9565b806122e181612e2a565b915050612199565b505b60006122f7878761209d565b90506000865b816123b5576123166001600160601b0382168685612442565b6000196001600160601b0382160161233157600191506122fd565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015612382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a69190612e67565b509495506122fd945050505050565b6001840154604080516001600160601b038b16815260208101889052908101919091526001600160a01b038a16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2505050505050505050565b612423612795565b61244057604051631afcd79f60e31b815260040160405180910390fd5b565b6000838152600c6020908152604080832084845260038101909252822054909181900361260f57831561260a57600182015460000361255d5750600281018054600180820183556000928352602090922081018590559081148015906124bc575081546124b0600183612caf565b6124ba9190612d88565b155b156125585781546000906124d09083612ed5565b60008181526004850160205260408120549192506124ef846001612cc2565b90508460020185600201848154811061250a5761250a612d5c565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6125d8565b60018083018054909161256f91612caf565b8154811061257f5761257f612d5c565b906000526020600020015490508160010180548061259f5761259f612e41565b60019003818190600052602060002001600090559055838260020182815481106125cb576125cb612d5c565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561260a85826001876127af565b611aeb565b836000036126ad57600082600201828154811061262e5761262e612d5c565b90600052602060002001549050600083600201838154811061265257612652612d5c565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556126a79087908490846127af565b50611aeb565b8160020181815481106126c2576126c2612d5c565b90600052602060002001548414611aeb576000848360020183815481106126eb576126eb612d5c565b906000526020600020015411159050600081612731578584600201848154811061271757612717612d5c565b906000526020600020015461272c9190612caf565b61275c565b83600201838154811061274657612746612d5c565b90600052602060002001548661275c9190612caf565b90508584600201848154811061277457612774612d5c565b60009182526020909120015561278c878484846127af565b50505050505050565b600061279f612019565b54600160401b900460ff16919050565b6000848152600c60205260409020835b80156128645781546127d2600183612caf565b6127dc9190612ed5565b90508361281357828260020182815481106127f9576127f9612d5c565b906000526020600020015461280e9190612caf565b61283e565b8282600201828154811061282957612829612d5c565b906000526020600020015461283e9190612cc2565b82600201828154811061285357612853612d5c565b6000918252602090912001556127bf565b505050505050565b6001600160a01b038116811461038557600080fd5b6001600160601b038116811461038557600080fd5b6000806000606084860312156128ab57600080fd5b83356128b68161286c565b925060208401356128c681612881565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b8381526020810183905260608101600a831061290b5761290b6128d7565b826040830152949350505050565b6000806040838503121561292c57600080fd5b82356129378161286c565b946020939093013593505050565b60006020828403121561295757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298557600080fd5b81356001600160401b0381111561299e5761299e61295e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156129cc576129cc61295e565b6040528181528382016020018510156129e457600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612a1457600080fd5b8235915060208301356001600160401b03811115612a3157600080fd5b612a3d85828601612974565b9150509250929050565b600080600060608486031215612a5c57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612a8657600080fd5b8235612a918161286c565b915060208301356001600160401b03811115612a3157600080fd5b600060208284031215612abe57600080fd5b81356112858161286c565b602080825282518282018190526000918401906040840190835b81811015612b0a5783516001600160601b0316835260209384019390920191600101612ae3565b509095945050505050565b60008060008060008060c08789031215612b2e57600080fd5b8635612b398161286c565b95506020870135612b498161286c565b945060408701359350606087013592506080870135612b678161286c565b9598949750929591949360a090920135925050565b60005b83811015612b97578181015183820152602001612b7f565b50506000910152565b6020815260008251806020840152612bbf816040850160208701612b7c565b601f01601f19169190910160400192915050565b60008060408385031215612be657600080fd5b50508035926020909101359150565b60008060408385031215612c0857600080fd5b8235612c138161286c565b91506020830135612c2381612881565b809150509250929050565b600080600080600060a08688031215612c4657600080fd5b8535612c518161286c565b94506020860135612c6181612881565b94979496505050506040830135926060810135926080909101359150565b6020810160038310612c9357612c936128d7565b91905290565b634e487b7160e01b600052601160045260246000fd5b8181038181111561191857611918612c99565b8082018082111561191857611918612c99565b600060208284031215612ce757600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b6001600160a01b039390931683526001600160601b03919091166020830152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612d9757612d97612d72565b500690565b808202811582820484141761191857611918612c99565b600060018201612dc557612dc5612c99565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251612e20818460208701612b7c565b9190910192915050565b600081612e3957612e39612c99565b506000190190565b634e487b7160e01b600052603160045260246000fd5b80518015158114611fbf57600080fd5b600080600080600080600060e0888a031215612e8257600080fd5b8751612e8d81612881565b9650612e9b60208901612e57565b604089015160608a015160808b015160a08c0151939950919750955093509150612ec760c08901612e57565b905092959891949750929550565b600082612ee457612ee4612d72565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200186314699ae77a443609cfb006b9ef79adca12e964bddf2a243cc7bcac06f9264736f6c634300081c0033", - "deployedBytecode": "0x6080604052600436106102725760003560e01c80637dc38f141161014f578063caeb50ed116100c1578063dd5e5cb51161007a578063dd5e5cb5146107b9578063e4c0aaf4146107d9578063e534710d146107f9578063f216de4c14610831578063f2f4eb2614610851578063f6b4d82d1461087157600080fd5b8063caeb50ed146106c2578063ccbac9f5146106d7578063d09f392d146106ed578063d1c1df481461070d578063d605787b1461074d578063dca5f6b01461076d57600080fd5b8063aac03ad211610113578063aac03ad214610612578063b1c9fe6e14610632578063b5d69e9914610660578063b888adfa14610680578063c057eca714610696578063c1572618146106ac57600080fd5b80637dc38f141461057c578063823cfd7014610592578063965af6c7146105b25780639fbb56f1146105d2578063a2473cc1146105f257600080fd5b80634dbbebbc116101e857806354fd4d50116101ac57806354fd4d501461047d57806356acb050146104bb5780635d2d7846146104d15780636624192f146104f157806369f458771461053c57806376fa9fc51461055c57600080fd5b80634dbbebbc146103e85780634f1ef2861461040857806352d1902d1461041b578063543f8a361461043057806354812d171461045d57600080fd5b80631ecacab81161023a5780631ecacab81461031b57806321e1625e1461034a57806321ea9b3f1461036a57806335975f4a14610388578063477a655c146103a85780634c70a0d6146103c857600080fd5b806303432744146102775780630b274f2e146102a05780630c340a24146102b75780630e083ec9146102ef5780631b92bbbe14610305575b600080fd5b34801561028357600080fd5b5061028d60065481565b6040519081526020015b60405180910390f35b3480156102ac57600080fd5b506102b56108ff565b005b3480156102c357600080fd5b506000546102d7906001600160a01b031681565b6040516001600160a01b039091168152602001610297565b3480156102fb57600080fd5b5061028d600a5481565b34801561031157600080fd5b5061028d60035481565b34801561032757600080fd5b5061033b610336366004612896565b610cd7565b604051610297939291906128ed565b34801561035657600080fd5b506102b5610365366004612919565b610d22565b34801561037657600080fd5b506102b5610385366004612945565b50565b34801561039457600080fd5b506102b56103a3366004612945565b610dc5565b3480156103b457600080fd5b506102b56103c3366004612a01565b610fb1565b3480156103d457600080fd5b506102d76103e3366004612a47565b6110a8565b3480156103f457600080fd5b506102b5610403366004612919565b61128c565b6102b5610416366004612a73565b611375565b34801561042757600080fd5b5061028d61159d565b34801561043c57600080fd5b5061045061044b366004612aac565b6115fb565b6040516102979190612ac9565b34801561046957600080fd5b506102b5610478366004612b15565b611699565b34801561048957600080fd5b506104ae604051806040016040528060058152602001640302e392e360dc1b81525081565b6040516102979190612ba0565b3480156104c757600080fd5b5061028d600b5481565b3480156104dd57600080fd5b506102b56104ec366004612bd3565b611769565b3480156104fd57600080fd5b5061052c61050c366004612aac565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610297565b34801561054857600080fd5b506102b5610557366004612aac565b6117ac565b34801561056857600080fd5b5061028d610577366004612bd3565b6118c3565b34801561058857600080fd5b5061028d60095481565b34801561059e57600080fd5b506102b56105ad366004612945565b61191e565b3480156105be57600080fd5b506102b56105cd366004612919565b61194d565b3480156105de57600080fd5b5061028d6105ed366004612aac565b611a49565b3480156105fe57600080fd5b5061028d61060d366004612bf5565b611a8a565b34801561061e57600080fd5b506102b561062d366004612c2e565b611ab4565b34801561063e57600080fd5b5060015461065390600160a01b900460ff1681565b6040516102979190612c7f565b34801561066c57600080fd5b506102b561067b366004612aac565b611af2565b34801561068c57600080fd5b5061028d60045481565b3480156106a257600080fd5b5061028d60025481565b3480156106b857600080fd5b5061028d60055481565b3480156106ce57600080fd5b506102b5611bd2565b3480156106e357600080fd5b5061028d60085481565b3480156106f957600080fd5b506102b5610708366004612bd3565b611c83565b34801561071957600080fd5b5061072d610728366004612bf5565b611cbd565b604080519485526020850193909352918301526060820152608001610297565b34801561075957600080fd5b506007546102d7906001600160a01b031681565b34801561077957600080fd5b506107a4610788366004612aac565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610297565b3480156107c557600080fd5b506102b56107d4366004612945565b611cfc565b3480156107e557600080fd5b506102b56107f4366004612aac565b611d2b565b34801561080557600080fd5b5061028d610814366004612bf5565b600f60209081526000928352604080842090915290825290205481565b34801561083d57600080fd5b506107a461084c366004612919565b611d77565b34801561085d57600080fd5b506001546102d7906001600160a01b031681565b34801561087d57600080fd5b506108cb61088c366004612945565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b604080516001600160a01b0390951685526001600160601b0390931660208501529183015215156060820152608001610297565b6000600154600160a01b900460ff16600281111561091f5761091f6128d7565b03610a92576002546004546109349042612caf565b101561099c5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109fe5760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b6064820152608401610993565b6007546009546001600160a01b0390911690637363ae1f90610a209043612cc2565b6040518263ffffffff1660e01b8152600401610a3e91815260200190565b600060405180830381600087803b158015610a5857600080fd5b505af1158015610a6c573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c8c565b60018054600160a01b900460ff166002811115610ab157610ab16128d7565b03610ba9576007546009546005546001600160a01b03909216916313cf905491610ada91612cc2565b6040518263ffffffff1660e01b8152600401610af891815260200190565b6020604051808303816000875af1158015610b17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3b9190612cd5565b6008819055600003610b8f5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f742072656164792079657400006044820152606401610993565b600180546002919060ff60a01b1916600160a01b83610a88565b6002600154600160a01b900460ff166002811115610bc957610bc96128d7565b03610c8c576006541580610beb5750600354600454610be89042612caf565b10155b610c7e5760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a401610993565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610ccd91600160a01b90910460ff1690612c7f565b60405180910390a1565b600154600090819081906001600160a01b03163314610d085760405162461bcd60e51b815260040161099390612cee565b610d13868686611e05565b91989097509095509350505050565b6001546001600160a01b03163314610d4c5760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0382166000908152600d602052604081206002018054839290610d77908490612cc2565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610de557610de56128d7565b14610e325760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e00000000006044820152606401610993565b600b54600a541015610e865760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e000000006044820152606401610993565b6000600a54600183600b54610e9b9190612cc2565b610ea59190612caf565b11610eb05781610ecb565b600b54600a54610ec09190612caf565b610ecb906001612cc2565b9050600081600b54610edd9190612cc2565b600b549091505b81811015610fa9576000818152600e602052604090819020600180548254918301549351630761c14d60e01b815292936001600160a01b0391821693630761c14d93610f4793811692600160a01b9091046001600160601b031691600401612d32565b600060405180830381600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b5050506000838152600e60205260408120818155600180820192909255600201805460ff191690559092019150610ee49050565b50600b555050565b6001546001600160a01b03163314610fdb5760405162461bcd60e51b815260040161099390612cee565b6000828152600c6020526040812090610ff383611fa8565b82549091501561103c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b6044820152606401610993565b6001811161108c5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e00000000006044820152606401610993565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff1660028111156110ca576110ca6128d7565b146111065760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b6044820152606401610993565b6000848152600c602052604081206002810180549192909161112a5761112a612d5c565b9060005260206000200154600003611146576000915050611285565b60008160020160008154811061115e5761115e612d5c565b90600052602060002001546008548686604051602001611191939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111b49190612d88565b905060005b600283015483546111cb908390612d9c565b6111d6906001612cc2565b10156112655760015b8354811161125f576000818386600001546111fa9190612d9c565b6112049190612cc2565b9050600085600201828154811061121d5761121d612d5c565b906000526020600020015490508085106112425761123b8186612caf565b945061124a565b50915061125f565b5050808061125790612db3565b9150506111df565b506111b9565b600081815260048401602052604090205461127f90611fc4565b93505050505b9392505050565b6000546001600160a01b031633146112b65760405162461bcd60e51b815260040161099390612dcc565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156112f5576112f56128d7565b03611371576007546009546001600160a01b0390911690637363ae1f9061131c9043612cc2565b6040518263ffffffff1660e01b815260040161133a91815260200190565b600060405180830381600087803b15801561135457600080fd5b505af1158015611368573d6000803e3d6000fd5b50504360055550505b5050565b61137e82611fef565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113fc57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113f0600080516020612eea8339815191525490565b6001600160a01b031614155b1561141a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611474575060408051601f3d908101601f1916820190925261147191810190612cd5565b60015b61149c57604051630c76093760e01b81526001600160a01b0383166004820152602401610993565b600080516020612eea83398151915281146114cd57604051632a87526960e21b815260048101829052602401610993565b600080516020612eea8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611598576000836001600160a01b0316836040516115349190612e0e565b600060405180830381855af49150503d806000811461156f576040519150601f19603f3d011682016040523d82523d6000602084013e611574565b606091505b5050905080611596576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115e85760405163703e46dd60e11b815260040160405180910390fd5b50600080516020612eea83398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561168d57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161164a5790505b50505050509050919050565b600160006116a5612019565b8054909150600160401b900460ff16806116cc575080546001600160401b03808416911610155b156116e95760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561171888888888888861203d565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146117935760405162461bcd60e51b815260040161099390612cee565b600680549060006117a383612e2a565b91905055505050565b60006117b782611a49565b9050600081116118095760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656c696769626c6520666f72207769746864726177616c2e000000006044820152606401610993565b6001600160a01b038281166000818152600d6020526040808220600190810192909255905490516342c37fa360e01b8152600481019290925260248201849052909116906342c37fa390604401600060405180830381600087803b15801561187057600080fd5b505af1158015611884573d6000803e3d6000fd5b50505050816001600160a01b03167f71bb1b604559acc3db697ccf2aa4228d727cd5b133d6ffa419518d51c117c95c82604051610db991815260200190565b6000828152600c60209081526040808320848452600381019092528220548083036118f357600092505050611918565b81600201818154811061190857611908612d5c565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146119485760405162461bcd60e51b815260040161099390612dcc565b600255565b6001546001600160a01b031633146119775760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0382166000908152600d60205260408120600281018054919284926119a4908490612caf565b909155505060408051838152600160208201526001600160a01b038516917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b0910160405180910390a260006119f884611a49565b9050801561159657836001600160a01b03167f819a3744490c627e221b71743857691f9c23bf56a1ecc5351f886cfd4c3187d982604051611a3b91815260200190565b60405180910390a250505050565b6001600160a01b0381166000908152600d602052604081208054158015611a7257506002810154155b15611a81576001015492915050565b50600092915050565b600080611a97848461209d565b9050611aac6001600160601b038416826118c3565b949350505050565b6001546001600160a01b03163314611ade5760405162461bcd60e51b815260040161099390612cee565b611aeb85858585856120e5565b5050505050565b6001546001600160a01b03163314611b1c5760405162461bcd60e51b815260040161099390612cee565b6000611b27826115fb565b80519091505b801561159857600180546001600160a01b031690630761c14d9085908590611b559086612caf565b81518110611b6557611b65612d5c565b602002602001015160006040518463ffffffff1660e01b8152600401611b8d93929190612d32565b600060405180830381600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050508080611bca90612e2a565b915050611b2d565b60046000611bde612019565b8054909150600160401b900460ff1680611c05575080546001600160401b03808416911610155b15611c225760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611cad5760405162461bcd60e51b815260040161099390612cee565b600680549060006117a383612db3565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611cef8787611a8a565b9054949793965094505050565b6000546001600160a01b03163314611d265760405162461bcd60e51b815260040161099390612dcc565b600355565b6000546001600160a01b03163314611d555760405162461bcd60e51b815260040161099390612dcc565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60015460009081906001600160a01b03163314611da65760405162461bcd60e51b815260040161099390612cee565b6001600160a01b0384166000908152600d602052604090206001810154848110611dec5784925084826001016000828254611de19190612caf565b90915550611df79050565b600060018301559150815b506001015491509250929050565b6001600160a01b0383166000908152600d602052604081208190819081611e2c8888611a8a565b825490915081158015611e40575060048110155b15611e58576000806004955095509550505050611f9f565b81158015611e64575086155b15611e7c576000806009955095509550505050611f9f565b6000600154600160a01b900460ff166002811115611e9c57611e9c6128d7565b14611f37576000600e6000600a60008154611eb690612db3565b9182905550815260208082019290925260409081016000206001600160601b038c16600160a01b81026001600160a01b038f169081178355600183018d905592518c8152919450927fa59837f9df3fb816613d84e8fefe31ec8d6e67ff43df6533e3f793a3f53aade9910160405180910390a35060019350611f9f92505050565b818710611f4f57611f488288612caf565b9550611f97565b611f598783612caf565b945060008360020154846001015411611f73576000611f87565b83600201548460010154611f879190612caf565b905080861115611f95578095505b505b506000925050505b93509350939050565b60006020825110611fbb57506020015190565b5060065b919050565b600060405160005b6014811015611fe75783811a81600c84010153600101611fcc565b505192915050565b6000546001600160a01b031633146103855760405162461bcd60e51b815260040161099390612dcc565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61204561241b565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b60148110156120c0578481600c011a818301536001016120a5565b5060145b60208110156120dc5783811a818301536001016120c4565b50519392505050565b6001600160a01b0385166000908152600d60205260409020831561217457600061210f8787611a8a565b905080600003612154578154600180820184556000848152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918916021790555b848260010160008282546121689190612cc2565b909155506122eb915050565b828160010160008282546121889190612caf565b909155505060008290036122eb5780545b80156122e9576001600160601b038616826121b5600184612caf565b815481106121c5576121c5612d5c565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036122d7578154829061220190600190612caf565b8154811061221157612211612d5c565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122459084612caf565b8154811061225557612255612d5c565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122a1576122a1612e41565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556122e9565b806122e181612e2a565b915050612199565b505b60006122f7878761209d565b90506000865b816123b5576123166001600160601b0382168685612442565b6000196001600160601b0382160161233157600191506122fd565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015612382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a69190612e67565b509495506122fd945050505050565b6001840154604080516001600160601b038b16815260208101889052908101919091526001600160a01b038a16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2505050505050505050565b612423612795565b61244057604051631afcd79f60e31b815260040160405180910390fd5b565b6000838152600c6020908152604080832084845260038101909252822054909181900361260f57831561260a57600182015460000361255d5750600281018054600180820183556000928352602090922081018590559081148015906124bc575081546124b0600183612caf565b6124ba9190612d88565b155b156125585781546000906124d09083612ed5565b60008181526004850160205260408120549192506124ef846001612cc2565b90508460020185600201848154811061250a5761250a612d5c565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6125d8565b60018083018054909161256f91612caf565b8154811061257f5761257f612d5c565b906000526020600020015490508160010180548061259f5761259f612e41565b60019003818190600052602060002001600090559055838260020182815481106125cb576125cb612d5c565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561260a85826001876127af565b611aeb565b836000036126ad57600082600201828154811061262e5761262e612d5c565b90600052602060002001549050600083600201838154811061265257612652612d5c565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556126a79087908490846127af565b50611aeb565b8160020181815481106126c2576126c2612d5c565b90600052602060002001548414611aeb576000848360020183815481106126eb576126eb612d5c565b906000526020600020015411159050600081612731578584600201848154811061271757612717612d5c565b906000526020600020015461272c9190612caf565b61275c565b83600201838154811061274657612746612d5c565b90600052602060002001548661275c9190612caf565b90508584600201848154811061277457612774612d5c565b60009182526020909120015561278c878484846127af565b50505050505050565b600061279f612019565b54600160401b900460ff16919050565b6000848152600c60205260409020835b80156128645781546127d2600183612caf565b6127dc9190612ed5565b90508361281357828260020182815481106127f9576127f9612d5c565b906000526020600020015461280e9190612caf565b61283e565b8282600201828154811061282957612829612d5c565b906000526020600020015461283e9190612cc2565b82600201828154811061285357612853612d5c565b6000918252602090912001556127bf565b505050505050565b6001600160a01b038116811461038557600080fd5b6001600160601b038116811461038557600080fd5b6000806000606084860312156128ab57600080fd5b83356128b68161286c565b925060208401356128c681612881565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b8381526020810183905260608101600a831061290b5761290b6128d7565b826040830152949350505050565b6000806040838503121561292c57600080fd5b82356129378161286c565b946020939093013593505050565b60006020828403121561295757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298557600080fd5b81356001600160401b0381111561299e5761299e61295e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156129cc576129cc61295e565b6040528181528382016020018510156129e457600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612a1457600080fd5b8235915060208301356001600160401b03811115612a3157600080fd5b612a3d85828601612974565b9150509250929050565b600080600060608486031215612a5c57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612a8657600080fd5b8235612a918161286c565b915060208301356001600160401b03811115612a3157600080fd5b600060208284031215612abe57600080fd5b81356112858161286c565b602080825282518282018190526000918401906040840190835b81811015612b0a5783516001600160601b0316835260209384019390920191600101612ae3565b509095945050505050565b60008060008060008060c08789031215612b2e57600080fd5b8635612b398161286c565b95506020870135612b498161286c565b945060408701359350606087013592506080870135612b678161286c565b9598949750929591949360a090920135925050565b60005b83811015612b97578181015183820152602001612b7f565b50506000910152565b6020815260008251806020840152612bbf816040850160208701612b7c565b601f01601f19169190910160400192915050565b60008060408385031215612be657600080fd5b50508035926020909101359150565b60008060408385031215612c0857600080fd5b8235612c138161286c565b91506020830135612c2381612881565b809150509250929050565b600080600080600060a08688031215612c4657600080fd5b8535612c518161286c565b94506020860135612c6181612881565b94979496505050506040830135926060810135926080909101359150565b6020810160038310612c9357612c936128d7565b91905290565b634e487b7160e01b600052601160045260246000fd5b8181038181111561191857611918612c99565b8082018082111561191857611918612c99565b600060208284031215612ce757600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b6001600160a01b039390931683526001600160601b03919091166020830152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612d9757612d97612d72565b500690565b808202811582820484141761191857611918612c99565b600060018201612dc557612dc5612c99565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251612e20818460208701612b7c565b9190910192915050565b600081612e3957612e39612c99565b506000190190565b634e487b7160e01b600052603160045260246000fd5b80518015158114611fbf57600080fd5b600080600080600080600060e0888a031215612e8257600080fd5b8751612e8d81612881565b9650612e9b60208901612e57565b604089015160608a015160808b015160a08c0151939950919750955093509150612ec760c08901612e57565b905092959891949750929550565b600082612ee457612ee4612d72565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200186314699ae77a443609cfb006b9ef79adca12e964bddf2a243cc7bcac06f9264736f6c634300081c0033", - "devdoc": { - "details": "A factory of trees that keeps track of staked values for sortition.", - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "InvalidImplementation(address)": [ - { - "details": "The `implementation` is not UUPS-compliant" - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "LeftoverPNK(address,uint256)": { - "details": "Emitted when leftover PNK is available.", - "params": { - "_account": "The account of the juror.", - "_amount": "The amount of PNK available." - } - }, - "LeftoverPNKWithdrawn(address,uint256)": { - "details": "Emitted when leftover PNK is withdrawn.", - "params": { - "_account": "The account of the juror withdrawing PNK.", - "_amount": "The amount of PNK withdrawn." - } - }, - "StakeDelayed(address,uint96,uint256)": { - "params": { - "_address": "The address of the juror.", - "_amount": "The amount of tokens staked in the court.", - "_courtID": "The ID of the court." - } - }, - "StakeLocked(address,uint256,bool)": { - "params": { - "_address": "The address of the juror.", - "_relativeAmount": "The amount of tokens locked.", - "_unlock": "Whether the stake is locked or unlocked." - } - }, - "StakeSet(address,uint256,uint256,uint256)": { - "params": { - "_address": "The address of the juror.", - "_amount": "The amount of tokens staked in the court.", - "_amountAllCourts": "The amount of tokens staked in all courts.", - "_courtID": "The ID of the court." - } - }, - "Upgraded(address)": { - "details": "Emitted when the `implementation` has been successfully upgraded.", - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor of the contract.", - "params": { - "_governor": "The new governor." - } - }, - "changeMaxDrawingTime(uint256)": { - "details": "Changes the `maxDrawingTime` storage variable.", - "params": { - "_maxDrawingTime": "The new value for the `maxDrawingTime` storage variable." - } - }, - "changeMinStakingTime(uint256)": { - "details": "Changes the `minStakingTime` storage variable.", - "params": { - "_minStakingTime": "The new value for the `minStakingTime` storage variable." - } - }, - "changeRandomNumberGenerator(address,uint256)": { - "details": "Changes the `_rng` and `_rngLookahead` storage variables.", - "params": { - "_rng": "The new value for the `RNGenerator` storage variable.", - "_rngLookahead": "The new value for the `rngLookahead` storage variable." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "createTree(bytes32,bytes)": { - "details": "Create a sortition sum tree at the specified key.", - "params": { - "_extraData": "Extra data that contains the number of children each node in the tree should have.", - "_key": "The key of the new tree." - } - }, - "draw(bytes32,uint256,uint256)": { - "details": "Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.", - "params": { - "_coreDisputeID": "Index of the dispute in Kleros Core.", - "_key": "The key of the tree.", - "_nonce": "Nonce to hash with random number." - }, - "returns": { - "drawnAddress": "The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended." - } - }, - "executeDelayedStakes(uint256)": { - "details": "Executes the next delayed stakes.", - "params": { - "_iterations": "The number of delayed stakes to execute." - } - }, - "getJurorCourtIDs(address)": { - "details": "Gets the court identifiers where a specific `_juror` has staked.", - "params": { - "_juror": "The address of the juror." - } - }, - "initialize(address,address,uint256,uint256,address,uint256)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_core": "The KlerosCore.", - "_governor": "The governor.", - "_maxDrawingTime": "Time after which the drawing phase can be switched", - "_minStakingTime": "Minimal time to stake", - "_rng": "The random number generator.", - "_rngLookahead": "Lookahead value for rng." - } - }, - "notifyRandomNumber(uint256)": { - "details": "Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().", - "params": { - "_randomNumber": "Random number returned by RNG contract." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "setJurorInactive(address)": { - "details": "Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", - "params": { - "_account": "The juror to unstake." - } - }, - "setStake(address,uint96,uint256,uint256,uint256)": { - "details": "Update the state of the stakes, called by KC at the end of setStake flow. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", - "params": { - "_account": "The address of the juror.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake.", - "_pnkDeposit": "The amount of PNK to be deposited.", - "_pnkWithdrawal": "The amount of PNK to be withdrawn." - } - }, - "stakeOf(address,uint96)": { - "details": "Get the stake of a juror in a court.", - "params": { - "_courtID": "The ID of the court.", - "_juror": "The address of the juror." - }, - "returns": { - "_0": "value The stake of the juror in the court." - } - }, - "stakeOf(bytes32,bytes32)": { - "details": "Get the stake of a juror in a court.", - "params": { - "_ID": "The stake path ID, corresponding to a juror.", - "_key": "The key of the tree, corresponding to a court." - }, - "returns": { - "_0": "The stake of the juror in the court." - } - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "validateStake(address,uint96,uint256)": { - "details": "Validate the specified juror's new stake for a court. Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.", - "params": { - "_account": "The address of the juror.", - "_courtID": "The ID of the court.", - "_newStake": "The new stake." - }, - "returns": { - "pnkDeposit": "The amount of PNK to be deposited.", - "pnkWithdrawal": "The amount of PNK to be withdrawn.", - "stakingResult": "The result of the staking operation." - } - }, - "withdrawLeftoverPNK(address)": { - "details": "Gives back the locked PNKs in case the juror fully unstaked earlier. Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). In this case the juror can use this function to withdraw the leftover tokens. Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.", - "params": { - "_account": "The juror whose PNK to withdraw." - } - } - }, - "stateVariables": { - "version": { - "details": "Returns the version of the implementation.", - "return": "Version string.", - "returns": { - "_0": "Version string." - } - } - }, - "title": "SortitionModule", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ] - }, - "events": { - "StakeDelayed(address,uint96,uint256)": { - "notice": "Emitted when a juror's stake is delayed." - }, - "StakeLocked(address,uint256,bool)": { - "notice": "Emitted when a juror's stake is locked." - }, - "StakeSet(address,uint256,uint256,uint256)": { - "notice": "Emitted when a juror stakes in a court." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 3983, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 3986, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)165" - }, - { - "astId": 3989, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "phase", - "offset": 20, - "slot": "1", - "type": "t_enum(Phase)8980" - }, - { - "astId": 3991, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "minStakingTime", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 3993, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "maxDrawingTime", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 3995, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "lastPhaseChange", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 3997, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "randomNumberRequestBlock", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 3999, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "disputesWithoutJurors", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 4002, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "rng", - "offset": 0, - "slot": "7", - "type": "t_contract(RNG)9731" - }, - { - "astId": 4004, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "randomNumber", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 4006, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "rngLookahead", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 4008, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "delayedStakeWriteIndex", - "offset": 0, - "slot": "10", - "type": "t_uint256" - }, - { - "astId": 4010, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "delayedStakeReadIndex", - "offset": 0, - "slot": "11", - "type": "t_uint256" - }, - { - "astId": 4015, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "sortitionSumTrees", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)3964_storage)" - }, - { - "astId": 4020, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "jurors", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_address,t_struct(Juror)3981_storage)" - }, - { - "astId": 4025, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "delayedStakes", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_uint256,t_struct(DelayedStake)3973_storage)" - }, - { - "astId": 4031, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "latestDelayedStakeIndex", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_address,t_mapping(t_uint96,t_uint256))" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_array(t_uint96)dyn_storage": { - "base": "t_uint96", - "encoding": "dynamic_array", - "label": "uint96[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)165": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_contract(RNG)9731": { - "encoding": "inplace", - "label": "contract RNG", - "numberOfBytes": "20" - }, - "t_enum(Phase)8980": { - "encoding": "inplace", - "label": "enum ISortitionModule.Phase", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_mapping(t_uint96,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint96 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint96,t_uint256)" - }, - "t_mapping(t_address,t_struct(Juror)3981_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct SortitionModuleBase.Juror)", - "numberOfBytes": "32", - "value": "t_struct(Juror)3981_storage" - }, - "t_mapping(t_bytes32,t_struct(SortitionSumTree)3964_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct SortitionModuleBase.SortitionSumTree)", - "numberOfBytes": "32", - "value": "t_struct(SortitionSumTree)3964_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_bytes32)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bytes32)", - "numberOfBytes": "32", - "value": "t_bytes32" - }, - "t_mapping(t_uint256,t_struct(DelayedStake)3973_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct SortitionModuleBase.DelayedStake)", - "numberOfBytes": "32", - "value": "t_struct(DelayedStake)3973_storage" - }, - "t_mapping(t_uint96,t_uint256)": { - "encoding": "mapping", - "key": "t_uint96", - "label": "mapping(uint96 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DelayedStake)3973_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.DelayedStake", - "members": [ - { - "astId": 3966, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 3968, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "courtID", - "offset": 20, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 3970, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "stake", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 3972, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "alreadyTransferred", - "offset": 0, - "slot": "2", - "type": "t_bool" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Juror)3981_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.Juror", - "members": [ - { - "astId": 3976, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "courtIDs", - "offset": 0, - "slot": "0", - "type": "t_array(t_uint96)dyn_storage" - }, - { - "astId": 3978, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "stakedPnk", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 3980, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "lockedPnk", - "offset": 0, - "slot": "2", - "type": "t_uint256" - } - ], - "numberOfBytes": "96" - }, - "t_struct(SortitionSumTree)3964_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.SortitionSumTree", - "members": [ - { - "astId": 3949, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "K", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 3952, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "stack", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 3955, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "nodes", - "offset": 0, - "slot": "2", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 3959, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "IDsToNodeIndexes", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_bytes32,t_uint256)" - }, - { - "astId": 3963, - "contract": "src/arbitration/SortitionModule.sol:SortitionModule", - "label": "nodeIndexesToIDs", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_bytes32)" - } - ], - "numberOfBytes": "160" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json deleted file mode 100644 index 722ae5daf..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "address": "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x9578634d10e5620603f87662e9739fb13f6913ed7f669662f15188dfe9cf8a0b", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", - "transactionIndex": 1, - "gasUsed": "332814", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100004000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3ea136a5325825c86d23b94003b2a561cfa59dd0cd87bc49909dad568b5eb697", - "transactionHash": "0x9578634d10e5620603f87662e9739fb13f6913ed7f669662f15188dfe9cf8a0b", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 175286083, - "transactionHash": "0x9578634d10e5620603f87662e9739fb13f6913ed7f669662f15188dfe9cf8a0b", - "address": "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x3ea136a5325825c86d23b94003b2a561cfa59dd0cd87bc49909dad568b5eb697" - } - ], - "blockNumber": 175286083, - "cumulativeGasUsed": "332814", - "status": 1, - "byzantium": true - }, - "args": [ - "0xBe984dc03B4A8d5135BCc07b46fdB867e02BA1F3", - "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000001bd44c4a4511dbfa7dc1d5bc201635596e7200f900000000000000000000000000000000000000000000000000000000000000b400000000000000000000000000000000000000000000000000000000000002580000000000000000000000007e40f5ac809521654a9c17e442f2a0a5a4d890fa0000000000000000000000000000000000000000000000000000000000000014" - ], - "numDeployments": 1, - "solcInputHash": "3f11dda26fe559c44d21b324a34af1b7", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0xc4b339597d3141b25664fd25d91a78bed6d61220fa0ea63f0116be7a0cc53fbf\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x0c2cf69714fddf4aaae7dadd53afe0c376178953313ce5b3af72b834e46b2c77\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030838038061030883398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b0316826040516100779190610225565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b50505050610241565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b0381111561019757600080fd5b8301601f810185136101a857600080fd5b80516001600160401b038111156101c1576101c1610117565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101ef576101ef610117565b60405281815282820160200187101561020757600080fd5b61021882602083016020860161012d565b8093505050509250929050565b6000825161023781846020870161012d565b9190910192915050565b60b98061024f6000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f2e3563554b18c2c9587081d72ef7797df12f887fb52d3ccfb244524903568c364736f6c634300081c0033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f2e3563554b18c2c9587081d72ef7797df12f887fb52d3ccfb244524903568c364736f6c634300081c0033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/TransactionBatcher.json b/contracts/deployments/arbitrumSepoliaDevnet/TransactionBatcher.json deleted file mode 100644 index 6372364e0..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/TransactionBatcher.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "address": "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", - "abi": [ - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "datas", - "type": "bytes[]" - } - ], - "name": "batchSend", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "datas", - "type": "bytes[]" - } - ], - "name": "batchSendUnchecked", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0x3c4a6f233fda3dc940b9aba1e04ee5993b515e4834b73365c4cd613718db46b2", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", - "transactionIndex": 2, - "gasUsed": "3685628", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe9853220bdd1f19aee5024da03ad2d91d98090a74ab599bdcf2af279f02d9744", - "transactionHash": "0x3c4a6f233fda3dc940b9aba1e04ee5993b515e4834b73365c4cd613718db46b2", - "logs": [], - "blockNumber": 66236728, - "cumulativeGasUsed": "5055051", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "036e2ca71d8ebdd78fd6317e15ba1f3c", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSendUnchecked\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/utils/TransactionBatcher.sol\":\"TransactionBatcher\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/utils/TransactionBatcher.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from https://github.com/daostack/web3-transaction-batcher/blob/1b88d2ea062f8f2d9fdfdf9bbe85d2bbef780151/contracts/Batcher.sol\\n\\ncontract TransactionBatcher {\\n\\n function batchSend(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n (bool success,) = targets[i].call{value: values[i]}(datas[i]);\\n if (!success) revert('transaction failed'); // All the calls must succeed.\\n }\\n }\\n\\n function batchSendUnchecked(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n targets[i].call{value: values[i]}(datas[i]); // Intentionally ignoring return value.\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1983237012c29ef487ca47d60b197eb30d5b072ffec3078685d43fcc5fcc10a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561000f575f80fd5b506105238061001d5f395ff3fe608060405260043610610028575f3560e01c8063a8f0802e1461002c578063cef591aa14610041575b5f80fd5b61003f61003a3660046103c4565b610054565b005b61003f61004f3660046103c4565b61015c565b5f5b8351811015610156575f848281518110610072576100726104ad565b60200260200101516001600160a01b0316848381518110610095576100956104ad565b60200260200101518484815181106100af576100af6104ad565b60200260200101516040516100c491906104c1565b5f6040518083038185875af1925050503d805f81146100fe576040519150601f19603f3d011682016040523d82523d5f602084013e610103565b606091505b505090508061014d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd858dd1a5bdb8819985a5b195960721b604482015260640160405180910390fd5b50600101610056565b50505050565b5f5b835181101561015657838181518110610179576101796104ad565b60200260200101516001600160a01b031683828151811061019c5761019c6104ad565b60200260200101518383815181106101b6576101b66104ad565b60200260200101516040516101cb91906104c1565b5f6040518083038185875af1925050503d805f8114610205576040519150601f19603f3d011682016040523d82523d5f602084013e61020a565b606091505b50505060010161015e565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561025257610252610215565b604052919050565b5f67ffffffffffffffff82111561027357610273610215565b5060051b60200190565b5f82601f83011261028c575f80fd5b813560206102a161029c8361025a565b610229565b8083825260208201915060208460051b8701019350868411156102c2575f80fd5b602086015b848110156102de57803583529183019183016102c7565b509695505050505050565b5f601f83601f8401126102fa575f80fd5b8235602061030a61029c8361025a565b82815260059290921b85018101918181019087841115610328575f80fd5b8287015b848110156103b857803567ffffffffffffffff8082111561034b575f80fd5b818a0191508a603f83011261035e575f80fd5b8582013560408282111561037457610374610215565b610385828b01601f19168901610229565b92508183528c8183860101111561039a575f80fd5b8181850189850137505f90820187015284525091830191830161032c565b50979650505050505050565b5f805f606084860312156103d6575f80fd5b833567ffffffffffffffff808211156103ed575f80fd5b818601915086601f830112610400575f80fd5b8135602061041061029c8361025a565b82815260059290921b8401810191818101908a84111561042e575f80fd5b948201945b838610156104605785356001600160a01b0381168114610451575f80fd5b82529482019490820190610433565b97505087013592505080821115610475575f80fd5b6104818783880161027d565b93506040860135915080821115610496575f80fd5b506104a3868287016102e9565b9150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b818110156104e057602081860181015185830152016104c6565b505f92019182525091905056fea264697066735822122089797200888ad757484ded7bc0ffbb0769e9e974d73188d61385b7f6675e9f2064736f6c63430008180033", - "deployedBytecode": "0x608060405260043610610028575f3560e01c8063a8f0802e1461002c578063cef591aa14610041575b5f80fd5b61003f61003a3660046103c4565b610054565b005b61003f61004f3660046103c4565b61015c565b5f5b8351811015610156575f848281518110610072576100726104ad565b60200260200101516001600160a01b0316848381518110610095576100956104ad565b60200260200101518484815181106100af576100af6104ad565b60200260200101516040516100c491906104c1565b5f6040518083038185875af1925050503d805f81146100fe576040519150601f19603f3d011682016040523d82523d5f602084013e610103565b606091505b505090508061014d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd858dd1a5bdb8819985a5b195960721b604482015260640160405180910390fd5b50600101610056565b50505050565b5f5b835181101561015657838181518110610179576101796104ad565b60200260200101516001600160a01b031683828151811061019c5761019c6104ad565b60200260200101518383815181106101b6576101b66104ad565b60200260200101516040516101cb91906104c1565b5f6040518083038185875af1925050503d805f8114610205576040519150601f19603f3d011682016040523d82523d5f602084013e61020a565b606091505b50505060010161015e565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561025257610252610215565b604052919050565b5f67ffffffffffffffff82111561027357610273610215565b5060051b60200190565b5f82601f83011261028c575f80fd5b813560206102a161029c8361025a565b610229565b8083825260208201915060208460051b8701019350868411156102c2575f80fd5b602086015b848110156102de57803583529183019183016102c7565b509695505050505050565b5f601f83601f8401126102fa575f80fd5b8235602061030a61029c8361025a565b82815260059290921b85018101918181019087841115610328575f80fd5b8287015b848110156103b857803567ffffffffffffffff8082111561034b575f80fd5b818a0191508a603f83011261035e575f80fd5b8582013560408282111561037457610374610215565b610385828b01601f19168901610229565b92508183528c8183860101111561039a575f80fd5b8181850189850137505f90820187015284525091830191830161032c565b50979650505050505050565b5f805f606084860312156103d6575f80fd5b833567ffffffffffffffff808211156103ed575f80fd5b818601915086601f830112610400575f80fd5b8135602061041061029c8361025a565b82815260059290921b8401810191818101908a84111561042e575f80fd5b948201945b838610156104605785356001600160a01b0381168114610451575f80fd5b82529482019490820190610433565b97505087013592505080821115610475575f80fd5b6104818783880161027d565b93506040860135915080821115610496575f80fd5b506104a3868287016102e9565b9150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b818110156104e057602081860181015185830152016104c6565b505f92019182525091905056fea264697066735822122089797200888ad757484ded7bc0ffbb0769e9e974d73188d61385b7f6675e9f2064736f6c63430008180033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/WETH.json b/contracts/deployments/arbitrumSepoliaDevnet/WETH.json deleted file mode 100644 index 88c25ffd4..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/WETH.json +++ /dev/null @@ -1,458 +0,0 @@ -{ - "address": "0x3829A2486d53ee984a0ca2D76552715726b77138", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ], - "transactionHash": "0xf0f89ebb30e850b7c573ab0fa6b56ee46381de866cddc3afbaf3dbb60f632e17", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x3829A2486d53ee984a0ca2D76552715726b77138", - "transactionIndex": 1, - "gasUsed": "621542", - "logsBloom": "0x00000020000000000000000000000000000000000040000000000000000008000000000000000000000000000000000000000000000080000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3706ffb00d4b8e4f33496fbf5465bcd47767393e5e57a2d231c98109bed29ad2", - "transactionHash": "0xf0f89ebb30e850b7c573ab0fa6b56ee46381de866cddc3afbaf3dbb60f632e17", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 3084557, - "transactionHash": "0xf0f89ebb30e850b7c573ab0fa6b56ee46381de866cddc3afbaf3dbb60f632e17", - "address": "0x3829A2486d53ee984a0ca2D76552715726b77138", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", - "logIndex": 0, - "blockHash": "0x3706ffb00d4b8e4f33496fbf5465bcd47767393e5e57a2d231c98109bed29ad2" - } - ], - "blockNumber": 3084557, - "cumulativeGasUsed": "621542", - "status": 1, - "byzantium": true - }, - "args": [ - "WETH", - "WETH" - ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"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\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/TestERC20.sol\":\"TestERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"src/token/TestERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract TestERC20 is ERC20 {\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {\\n _mint(msg.sender, 1000000 ether);\\n }\\n}\\n\",\"keccak256\":\"0x9f67e6b63ca87e6c98b2986364ce16a747ce4098e9146fffb17ea13863c0b7e4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c5838038062000c5883398101604081905262000034916200020a565b8181600362000044838262000302565b50600462000053828262000302565b505050620000723369d3c21bcecceda10000006200007a60201b60201c565b5050620003f6565b6001600160a01b038216620000d55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620000e99190620003ce565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016d57600080fd5b81516001600160401b03808211156200018a576200018a62000145565b604051601f8301601f19908116603f01168101908282118183101715620001b557620001b562000145565b81604052838152602092508683858801011115620001d257600080fd5b600091505b83821015620001f65785820183015181830184015290820190620001d7565b600093810190920192909252949350505050565b600080604083850312156200021e57600080fd5b82516001600160401b03808211156200023657600080fd5b62000244868387016200015b565b935060208501519150808211156200025b57600080fd5b506200026a858286016200015b565b9150509250929050565b600181811c908216806200028957607f821691505b602082108103620002aa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200014057600081815260208120601f850160051c81016020861015620002d95750805b601f850160051c820191505b81811015620002fa57828155600101620002e5565b505050505050565b81516001600160401b038111156200031e576200031e62000145565b62000336816200032f845462000274565b84620002b0565b602080601f8311600181146200036e5760008415620003555750858301515b600019600386901b1c1916600185901b178555620002fa565b600085815260208120601f198616915b828110156200039f578886015182559484019460019091019084016200037e565b5085821015620003be5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620003f057634e487b7160e01b600052601160045260246000fd5b92915050565b61085280620004066000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea26469706673582212203a956e65a766c03ac95ae037cbdfb51b56810340c98132c2d2482405d386101b64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea26469706673582212203a956e65a766c03ac95ae037cbdfb51b56810340c98132c2d2482405d386101b64736f6c63430008120033", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 393, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 399, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 401, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 403, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 405, - "contract": "src/token/TestERC20.sol:TestERC20", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/WETHFaucet.json b/contracts/deployments/arbitrumSepoliaDevnet/WETHFaucet.json deleted file mode 100644 index fe929d76f..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/WETHFaucet.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "address": "0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "amount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "changeAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x0423f037522d0e7b089888b96380759c03ed6c37194b1430dd9dbb9553bb21f4", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd", - "transactionIndex": 1, - "gasUsed": "435555", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x10da554e89dfb82bec4585c6d18d57a32834b446e09bcae17fdc8594e8f3ed81", - "transactionHash": "0x0423f037522d0e7b089888b96380759c03ed6c37194b1430dd9dbb9553bb21f4", - "logs": [], - "blockNumber": 3084559, - "cumulativeGasUsed": "435555", - "status": 1, - "byzantium": true - }, - "args": [ - "0x3829A2486d53ee984a0ca2D76552715726b77138" - ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"amount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"changeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IERC20 public token;\\n address public governor;\\n mapping(address => bool) public withdrewAlready;\\n uint256 public amount = 10_000 ether;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeGovernor(address _governor) public onlyByGovernor {\\n governor = _governor;\\n }\\n\\n function changeAmount(uint256 _amount) public onlyByGovernor {\\n amount = _amount;\\n }\\n\\n function withdraw() public onlyByGovernor {\\n token.transfer(governor, token.balanceOf(address(this)));\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, amount);\\n withdrewAlready[msg.sender] = true;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x3a54681cc304ccbfdb42215104b63809919a432ac5d3986d3021a11fcc7a1cc3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405269021e19e0c9bab240000060035534801561001e57600080fd5b5060405161065538038061065583398101604081905261003d9161006b565b600080546001600160a01b039092166001600160a01b0319928316179055600180549091163317905561009b565b60006020828403121561007d57600080fd5b81516001600160a01b038116811461009457600080fd5b9392505050565b6105ab806100aa6000396000f3fe608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100835760003560e01c80630c340a2414610088578063338cdca1146100b15780633ccfd60b146100bb5780635c320516146100c3578063aa8c217c146100d6578063b69ef8a8146100ed578063d61c40dc146100f5578063e4c0aaf414610128578063fc0c546a1461013b575b600080fd5b60015461009b906001600160a01b031681565b6040516100a8919061049b565b60405180910390f35b6100b961014e565b005b6100b961028f565b6100b96100d13660046104af565b6103a9565b6100df60035481565b6040519081526020016100a8565b6100df6103d8565b6101186101033660046104c8565b60026020526000908152604090205460ff1681565b60405190151581526020016100a8565b6100b96101363660046104c8565b61044f565b60005461009b906001600160a01b031681565b3360009081526002602052604090205460ff16156101f95760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a4015b60405180910390fd5b60005460035460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027291906104f8565b50336000908152600260205260409020805460ff19166001179055565b6001546001600160a01b031633146102b95760405162461bcd60e51b81526004016101f09061051a565b6000546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb92169083906370a08231906102f690309060040161049b565b602060405180830381865afa158015610313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610337919061055c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906104f8565b50565b6001546001600160a01b031633146103d35760405162461bcd60e51b81526004016101f09061051a565b600355565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061040990309060040161049b565b602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a919061055c565b905090565b6001546001600160a01b031633146104795760405162461bcd60e51b81526004016101f09061051a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391909116815260200190565b6000602082840312156104c157600080fd5b5035919050565b6000602082840312156104da57600080fd5b81356001600160a01b03811681146104f157600080fd5b9392505050565b60006020828403121561050a57600080fd5b815180151581146104f157600080fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60006020828403121561056e57600080fd5b505191905056fea26469706673582212204f7fd812260eacd88f23b436eb40b4943480e914005f0a0f2738f0d3c9696a5964736f6c63430008120033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 24559, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)1042" - }, - { - "astId": 24561, - "contract": "src/token/Faucet.sol:Faucet", - "label": "governor", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 24565, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 24568, - "contract": "src/token/Faucet.sol:Faucet", - "label": "amount", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)1042": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiado/.chainId b/contracts/deployments/chiado/.chainId deleted file mode 100644 index 6cd35a3ed..000000000 --- a/contracts/deployments/chiado/.chainId +++ /dev/null @@ -1 +0,0 @@ -10200 \ No newline at end of file diff --git a/contracts/deployments/chiado/ArbitrableExample.json b/contracts/deployments/chiado/ArbitrableExample.json deleted file mode 100644 index 76e24b60d..000000000 --- a/contracts/deployments/chiado/ArbitrableExample.json +++ /dev/null @@ -1,618 +0,0 @@ -{ - "address": "0x438ca5337AE771dF926B7f4fDE1A21D72a315bDC", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - }, - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_weth", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "string", - "name": "_action", - "type": "string" - } - ], - "name": "Action", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitrableDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "arbitratorExtraData", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - } - ], - "name": "changeArbitratorExtraData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "changeDisputeTemplate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_action", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_feeInWeth", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_action", - "type": "string" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "externalIDtoLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "weth", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xb80cf6c0fdeb89b1d06dd578eb16605fcd7292efa8a03ce26b6202d878c9219e", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x438ca5337AE771dF926B7f4fDE1A21D72a315bDC", - "transactionIndex": 1, - "gasUsed": "1330807", - "logsBloom": "0x00200000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000140000000000000400000000000000000000000000000000040000000000000000000000000000000000000000000000000000080000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000002000000400000000000100000000000000000000000000000000000000", - "blockHash": "0x569ff7342255f7286ee23ac31d3104c4e0318d9476d04c139242fa775927f4ae", - "transactionHash": "0xb80cf6c0fdeb89b1d06dd578eb16605fcd7292efa8a03ce26b6202d878c9219e", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 5418565, - "transactionHash": "0xb80cf6c0fdeb89b1d06dd578eb16605fcd7292efa8a03ce26b6202d878c9219e", - "address": "0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385", - "topics": [ - "0x00f7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff9924", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c6469737075746554656d706c6174654d617070696e673a20544f444f00000000", - "logIndex": 0, - "blockHash": "0x569ff7342255f7286ee23ac31d3104c4e0318d9476d04c139242fa775927f4ae" - } - ], - "blockNumber": 5418565, - "cumulativeGasUsed": "1358031", - "status": 1, - "byzantium": true - }, - "args": [ - "0x2824bdcc752b1272D56A84be03A74Ee856C06e43", - { - "$schema": "../NewDisputeTemplate.schema.json", - "title": "Let's do this", - "description": "We want to do this: %s", - "question": "Does it comply with the policy?", - "answers": [ - { - "title": "Yes", - "description": "Select this if you agree that it must be done." - }, - { - "title": "No", - "description": "Select this if you do not agree that it must be done." - } - ], - "policyURI": "/ipfs/Qmdvk...rSD6cE/policy.pdf", - "frontendUrl": "https://kleros-v2.netlify.app/#/cases/%s/overview", - "arbitratorChainID": "421613", - "arbitratorAddress": "0xD08Ab99480d02bf9C092828043f611BcDFEA917b", - "category": "Others", - "specification": "KIP001", - "lang": "en_US" - }, - "disputeTemplateMapping: TODO", - "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", - "0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385", - "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8" - ], - "numDeployments": 5, - "solcInputHash": "7e0c306a4451043d6e53d94781f5594c", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_action\",\"type\":\"string\"}],\"name\":\"Action\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitrableDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbitratorExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"}],\"name\":\"changeArbitratorExtraData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"changeDisputeTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_action\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_feeInWeth\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_action\",\"type\":\"string\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"externalIDtoLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrableDisputeID\":\"The identifier of the dispute in the Arbitrable contract.\",\"_arbitrator\":\"The arbitrator of the contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"The arbitrator to rule on created disputes.\",\"_arbitratorExtraData\":\"The extra data for the arbitrator.\",\"_templateData\":\"The dispute template data.\",\"_templateDataMappings\":\"The dispute template data mappings.\",\"_templateRegistry\":\"The dispute template registry.\",\"_weth\":\"The WETH token.\"}},\"createDispute(string)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_action\":\"The action that requires arbitration.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the dispute created.\"}},\"createDispute(string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_action\":\"The action that requires arbitration.\",\"_feeInWeth\":\"Amount of fees in WETH for the arbitrator.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the dispute created.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_externalDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"ArbitrableExample An example of an arbitrable contract which connects to the arbitator that implements the updated interface.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/ArbitrableExample.sol\":\"ArbitrableExample\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/ArbitrableExample.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\nimport \\\"../../libraries/SafeERC20.sol\\\";\\n\\n/// @title ArbitrableExample\\n/// An example of an arbitrable contract which connects to the arbitator that implements the updated interface.\\ncontract ArbitrableExample is IArbitrableV2 {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bool isRuled; // Whether the dispute has been ruled or not.\\n uint256 ruling; // Ruling given by the arbitrator.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n event Action(string indexed _action);\\n\\n address public immutable governor;\\n IArbitratorV2 public arbitrator; // Arbitrator is set in constructor.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n uint256 public templateId; // The current dispute template identifier.\\n bytes public arbitratorExtraData; // Extra data to set up the arbitration.\\n IERC20 public immutable weth; // The WETH token.\\n mapping(uint256 => uint256) public externalIDtoLocalID; // Maps external (arbitrator side) dispute IDs to local dispute IDs.\\n DisputeStruct[] public disputes; // Stores the disputes' info. disputes[disputeID].\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(this) == msg.sender, \\\"Only the governor allowed.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator The arbitrator to rule on created disputes.\\n /// @param _templateData The dispute template data.\\n /// @param _templateDataMappings The dispute template data mappings.\\n /// @param _arbitratorExtraData The extra data for the arbitrator.\\n /// @param _templateRegistry The dispute template registry.\\n /// @param _weth The WETH token.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n string memory _templateData,\\n string memory _templateDataMappings,\\n bytes memory _arbitratorExtraData,\\n IDisputeTemplateRegistry _templateRegistry,\\n IERC20 _weth\\n ) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n arbitratorExtraData = _arbitratorExtraData;\\n templateRegistry = _templateRegistry;\\n weth = _weth;\\n\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external onlyByGovernor {\\n arbitrator = _arbitrator;\\n }\\n\\n function changeArbitratorExtraData(bytes calldata _arbitratorExtraData) external onlyByGovernor {\\n arbitratorExtraData = _arbitratorExtraData;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external onlyByGovernor {\\n templateRegistry = _templateRegistry;\\n }\\n\\n function changeDisputeTemplate(\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external onlyByGovernor {\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _action The action that requires arbitration.\\n /// @return disputeID Dispute id (on arbitrator side) of the dispute created.\\n function createDispute(string calldata _action) external payable returns (uint256 disputeID) {\\n emit Action(_action);\\n\\n uint256 numberOfRulingOptions = 2;\\n uint256 localDisputeID = disputes.length;\\n disputes.push(DisputeStruct({isRuled: false, ruling: 0, numberOfRulingOptions: numberOfRulingOptions}));\\n\\n disputeID = arbitrator.createDispute{value: msg.value}(numberOfRulingOptions, arbitratorExtraData);\\n externalIDtoLocalID[disputeID] = localDisputeID;\\n\\n uint256 externalDisputeID = uint256(keccak256(abi.encodePacked(_action)));\\n emit DisputeRequest(arbitrator, disputeID, externalDisputeID, templateId, \\\"\\\");\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _action The action that requires arbitration.\\n /// @param _feeInWeth Amount of fees in WETH for the arbitrator.\\n /// @return disputeID Dispute id (on arbitrator side) of the dispute created.\\n function createDispute(string calldata _action, uint256 _feeInWeth) external returns (uint256 disputeID) {\\n emit Action(_action);\\n\\n uint256 numberOfRulingOptions = 2;\\n uint256 localDisputeID = disputes.length;\\n disputes.push(DisputeStruct({isRuled: false, ruling: 0, numberOfRulingOptions: numberOfRulingOptions}));\\n\\n require(weth.safeTransferFrom(msg.sender, address(this), _feeInWeth), \\\"Transfer failed\\\");\\n require(weth.increaseAllowance(address(arbitrator), _feeInWeth), \\\"Allowance increase failed\\\");\\n\\n disputeID = arbitrator.createDispute(numberOfRulingOptions, arbitratorExtraData, weth, _feeInWeth);\\n externalIDtoLocalID[disputeID] = localDisputeID;\\n\\n uint256 externalDisputeID = uint256(keccak256(abi.encodePacked(_action)));\\n emit DisputeRequest(arbitrator, disputeID, externalDisputeID, templateId, \\\"\\\");\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _externalDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _externalDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = externalIDtoLocalID[_externalDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(dispute.isRuled == false, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _externalDisputeID, dispute.ruling);\\n }\\n}\\n\",\"keccak256\":\"0x19d38e04eed4156c108539f5ac7c98af87d1d457ef40b5d52bd1aa592c8b0df3\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x4b1b3f98d13e4a9a1c546dd45f98490f86e871cfc4b4be9a3fe4d29b3c99649c\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x37a19df56a98cd466fb6e70b8c56e13bfc439221bfabd8c5108d36d0e3ffc0e5\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200191a3803806200191a83398101604081905262000034916200020f565b33608052600080546001600160a01b0319166001600160a01b03881617905560036200006184826200037e565b50600180546001600160a01b0319166001600160a01b0384811691821790925590821660a0526040516312a6505d60e21b8152634a99417490620000ac908890889060040162000478565b6020604051808303816000875af1158015620000cc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000f29190620004b8565b60025550620004d2945050505050565b6001600160a01b03811681146200011857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200014e57818101518382015260200162000134565b50506000910152565b60006001600160401b03808411156200017457620001746200011b565b604051601f8501601f19908116603f011681019082821181831017156200019f576200019f6200011b565b81604052809350858152868686011115620001b957600080fd5b620001c986602083018762000131565b5050509392505050565b600082601f830112620001e557600080fd5b620001f68383516020850162000157565b9392505050565b80516200020a8162000102565b919050565b60008060008060008060c087890312156200022957600080fd5b8651620002368162000102565b60208801519096506001600160401b03808211156200025457600080fd5b620002628a838b01620001d3565b965060408901519150808211156200027957600080fd5b620002878a838b01620001d3565b955060608901519150808211156200029e57600080fd5b508701601f81018913620002b157600080fd5b620002c28982516020840162000157565b935050620002d360808801620001fd565b9150620002e360a08801620001fd565b90509295509295509295565b600181811c908216806200030457607f821691505b6020821081036200032557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200037957600081815260208120601f850160051c81016020861015620003545750805b601f850160051c820191505b81811015620003755782815560010162000360565b5050505b505050565b81516001600160401b038111156200039a576200039a6200011b565b620003b281620003ab8454620002ef565b846200032b565b602080601f831160018114620003ea5760008415620003d15750858301515b600019600386901b1c1916600185901b17855562000375565b600085815260208120601f198616915b828110156200041b57888601518255948401946001909101908401620003fa565b50858210156200043a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600081518084526200046481602086016020860162000131565b601f01601f19169290920160200192915050565b60608152600060608201526080602082015260006200049b60808301856200044a565b8281036040840152620004af81856200044a565b95945050505050565b600060208284031215620004cb57600080fd5b5051919050565b60805160a05161140e6200050c60003960008181610194015281816106e40152818161076301526108010152600060df015261140e6000f3fe6080604052600436106100c85760003560e01c8063654692871161007a578063654692871461021357806368175996146102415780636cc6cde1146102545780637aa77f2914610274578063a0af81f01461028a578063c21ae061146102aa578063c5d55288146102d7578063fc548f08146102f757600080fd5b80630c340a24146100cd5780630c7ac7b61461011e578063311a6c561461014057806334e2672d146101625780633fc8cef3146101825780634660ebbe146101b6578063564a565d146101d6575b600080fd5b3480156100d957600080fd5b506101017f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012a57600080fd5b50610133610317565b6040516101159190610e3d565b34801561014c57600080fd5b5061016061015b366004610e57565b6103a5565b005b34801561016e57600080fd5b5061016061017d366004610ec2565b61053e565b34801561018e57600080fd5b506101017f000000000000000000000000000000000000000000000000000000000000000081565b3480156101c257600080fd5b506101606101d1366004610f1c565b61056f565b3480156101e257600080fd5b506101f66101f1366004610f39565b6105b0565b604080519315158452602084019290925290820152606001610115565b34801561021f57600080fd5b5061023361022e366004610f52565b6105e7565b604051908152602001610115565b61023361024f366004610ec2565b61091b565b34801561026057600080fd5b50600054610101906001600160a01b031681565b34801561028057600080fd5b5061023360025481565b34801561029657600080fd5b50600154610101906001600160a01b031681565b3480156102b657600080fd5b506102336102c5366004610f39565b60046020526000908152604090205481565b3480156102e357600080fd5b506101606102f2366004611041565b610b31565b34801561030357600080fd5b50610160610312366004610f1c565b610bcc565b60038054610324906110a5565b80601f0160208091040260200160405190810160405280929190818152602001828054610350906110a5565b801561039d5780601f106103725761010080835404028352916020019161039d565b820191906000526020600020905b81548152906001019060200180831161038057829003601f168201915b505050505081565b60008281526004602052604081205460058054919291839081106103cb576103cb6110df565b600091825260208220915460039190910290910191506001600160a01b0316331461044b5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b80600201548311156104915760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b6044820152606401610442565b805460ff16156104ef5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b6064820152608401610442565b805460ff1916600190811782558101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b30331461055d5760405162461bcd60e51b8152600401610442906110f5565b600361056a82848361117a565b505050565b30331461058e5760405162461bcd60e51b8152600401610442906110f5565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600581815481106105c057600080fd5b600091825260209091206003909102018054600182015460029092015460ff909116925083565b600083836040516105f992919061123b565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f2790600090a2600580546040805160608101825260008082526020820181815260029383018481526001860187559590915290517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db060038502908101805460ff19169215159290921790915590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2909301929092556107147f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316333087610c0d565b6107525760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610442565b60005461078c906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911686610ce9565b6107d45760405162461bcd60e51b8152602060048201526019602482015278105b1b1bddd85b98d9481a5b98dc99585cd94819985a5b1959603a1b6044820152606401610442565b600054604051633d941b6d60e21b81526001600160a01b039091169063f6506db49061082b9085906003907f0000000000000000000000000000000000000000000000000000000000000000908a906004016112c8565b6020604051808303816000875af115801561084a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086e91906112fd565b600081815260046020908152604080832085905551929550909161089691899189910161123b565b60408051601f1981840301815290829052805160209091012060005460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869161090991868252602082015260606040820181905260009082015260800190565b60405180910390a35050509392505050565b6000828260405161092d92919061123b565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f2790600090a26005805460408051606081018252600080825260208201818152600283850181815260018701885596835292517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06003808802918201805460ff19169315159390931790925591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db183015595517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015554915163c13517e160e01b815290936001600160a01b039092169163c13517e1913491610a4291879190600401611316565b60206040518083038185885af1158015610a60573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8591906112fd565b6000818152600460209081526040808320859055519295509091610aad91889188910161123b565b60408051601f1981840301815290829052805160209091012060005460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e2718691610b2091868252602082015260606040820181905260009082015260800190565b60405180910390a350505092915050565b303314610b505760405162461bcd60e51b8152600401610442906110f5565b6001546040516312a6505d60e21b81526001600160a01b0390911690634a99417490610b829085908590600401611337565b6020604051808303816000875af1158015610ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc591906112fd565b6002555050565b303314610beb5760405162461bcd60e51b8152600401610442906110f5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610c729190611373565b6000604051808303816000865af19150503d8060008114610caf576040519150601f19603f3d011682016040523d82523d6000602084013e610cb4565b606091505b5091509150818015610cde575080511580610cde575080806020019051810190610cde919061138f565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063095ea7b39085908590849063dd62ed3e90604401602060405180830381865afa158015610d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6991906112fd565b610d7391906113b1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de2919061138f565b506001949350505050565b60005b83811015610e08578181015183820152602001610df0565b50506000910152565b60008151808452610e29816020860160208601610ded565b601f01601f19169290920160200192915050565b602081526000610e506020830184610e11565b9392505050565b60008060408385031215610e6a57600080fd5b50508035926020909101359150565b60008083601f840112610e8b57600080fd5b50813567ffffffffffffffff811115610ea357600080fd5b602083019150836020828501011115610ebb57600080fd5b9250929050565b60008060208385031215610ed557600080fd5b823567ffffffffffffffff811115610eec57600080fd5b610ef885828601610e79565b90969095509350505050565b6001600160a01b0381168114610f1957600080fd5b50565b600060208284031215610f2e57600080fd5b8135610e5081610f04565b600060208284031215610f4b57600080fd5b5035919050565b600080600060408486031215610f6757600080fd5b833567ffffffffffffffff811115610f7e57600080fd5b610f8a86828701610e79565b909790965060209590950135949350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610fc557600080fd5b813567ffffffffffffffff80821115610fe057610fe0610f9e565b604051601f8301601f19908116603f0116810190828211818310171561100857611008610f9e565b8160405283815286602085880101111561102157600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561105457600080fd5b823567ffffffffffffffff8082111561106c57600080fd5b61107886838701610fb4565b9350602085013591508082111561108e57600080fd5b5061109b85828601610fb4565b9150509250929050565b600181811c908216806110b957607f821691505b6020821081036110d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b6020808252601a908201527f4f6e6c792074686520676f7665726e6f7220616c6c6f7765642e000000000000604082015260600190565b601f82111561056a57600081815260208120601f850160051c810160208610156111535750805b601f850160051c820191505b818110156111725782815560010161115f565b505050505050565b67ffffffffffffffff83111561119257611192610f9e565b6111a6836111a083546110a5565b8361112c565b6000601f8411600181146111da57600085156111c25750838201355b600019600387901b1c1916600186901b178355611234565b600083815260209020601f19861690835b8281101561120b57868501358255602094850194600190920191016111eb565b50868210156112285760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b8183823760009101908152919050565b60008154611258816110a5565b808552602060018381168015611275576001811461128f576112bd565b60ff1985168884015283151560051b8801830195506112bd565b866000528260002060005b858110156112b55781548a820186015290830190840161129a565b890184019650505b505050505092915050565b8481526080602082015260006112e1608083018661124b565b6001600160a01b03949094166040830152506060015292915050565b60006020828403121561130f57600080fd5b5051919050565b82815260406020820152600061132f604083018461124b565b949350505050565b60608152600060608201526080602082015260006113586080830185610e11565b828103604084015261136a8185610e11565b95945050505050565b60008251611385818460208701610ded565b9190910192915050565b6000602082840312156113a157600080fd5b81518015158114610e5057600080fd5b808201808211156113d257634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220c6a6daf2f56ede86acd165f440073734a6ccd3c00dadf35865db2d523df0840d64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106100c85760003560e01c8063654692871161007a578063654692871461021357806368175996146102415780636cc6cde1146102545780637aa77f2914610274578063a0af81f01461028a578063c21ae061146102aa578063c5d55288146102d7578063fc548f08146102f757600080fd5b80630c340a24146100cd5780630c7ac7b61461011e578063311a6c561461014057806334e2672d146101625780633fc8cef3146101825780634660ebbe146101b6578063564a565d146101d6575b600080fd5b3480156100d957600080fd5b506101017f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012a57600080fd5b50610133610317565b6040516101159190610e3d565b34801561014c57600080fd5b5061016061015b366004610e57565b6103a5565b005b34801561016e57600080fd5b5061016061017d366004610ec2565b61053e565b34801561018e57600080fd5b506101017f000000000000000000000000000000000000000000000000000000000000000081565b3480156101c257600080fd5b506101606101d1366004610f1c565b61056f565b3480156101e257600080fd5b506101f66101f1366004610f39565b6105b0565b604080519315158452602084019290925290820152606001610115565b34801561021f57600080fd5b5061023361022e366004610f52565b6105e7565b604051908152602001610115565b61023361024f366004610ec2565b61091b565b34801561026057600080fd5b50600054610101906001600160a01b031681565b34801561028057600080fd5b5061023360025481565b34801561029657600080fd5b50600154610101906001600160a01b031681565b3480156102b657600080fd5b506102336102c5366004610f39565b60046020526000908152604090205481565b3480156102e357600080fd5b506101606102f2366004611041565b610b31565b34801561030357600080fd5b50610160610312366004610f1c565b610bcc565b60038054610324906110a5565b80601f0160208091040260200160405190810160405280929190818152602001828054610350906110a5565b801561039d5780601f106103725761010080835404028352916020019161039d565b820191906000526020600020905b81548152906001019060200180831161038057829003601f168201915b505050505081565b60008281526004602052604081205460058054919291839081106103cb576103cb6110df565b600091825260208220915460039190910290910191506001600160a01b0316331461044b5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b80600201548311156104915760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b6044820152606401610442565b805460ff16156104ef5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b6064820152608401610442565b805460ff1916600190811782558101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b30331461055d5760405162461bcd60e51b8152600401610442906110f5565b600361056a82848361117a565b505050565b30331461058e5760405162461bcd60e51b8152600401610442906110f5565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600581815481106105c057600080fd5b600091825260209091206003909102018054600182015460029092015460ff909116925083565b600083836040516105f992919061123b565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f2790600090a2600580546040805160608101825260008082526020820181815260029383018481526001860187559590915290517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db060038502908101805460ff19169215159290921790915590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2909301929092556107147f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316333087610c0d565b6107525760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610442565b60005461078c906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911686610ce9565b6107d45760405162461bcd60e51b8152602060048201526019602482015278105b1b1bddd85b98d9481a5b98dc99585cd94819985a5b1959603a1b6044820152606401610442565b600054604051633d941b6d60e21b81526001600160a01b039091169063f6506db49061082b9085906003907f0000000000000000000000000000000000000000000000000000000000000000908a906004016112c8565b6020604051808303816000875af115801561084a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086e91906112fd565b600081815260046020908152604080832085905551929550909161089691899189910161123b565b60408051601f1981840301815290829052805160209091012060005460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869161090991868252602082015260606040820181905260009082015260800190565b60405180910390a35050509392505050565b6000828260405161092d92919061123b565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f2790600090a26005805460408051606081018252600080825260208201818152600283850181815260018701885596835292517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06003808802918201805460ff19169315159390931790925591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db183015595517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015554915163c13517e160e01b815290936001600160a01b039092169163c13517e1913491610a4291879190600401611316565b60206040518083038185885af1158015610a60573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8591906112fd565b6000818152600460209081526040808320859055519295509091610aad91889188910161123b565b60408051601f1981840301815290829052805160209091012060005460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e2718691610b2091868252602082015260606040820181905260009082015260800190565b60405180910390a350505092915050565b303314610b505760405162461bcd60e51b8152600401610442906110f5565b6001546040516312a6505d60e21b81526001600160a01b0390911690634a99417490610b829085908590600401611337565b6020604051808303816000875af1158015610ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc591906112fd565b6002555050565b303314610beb5760405162461bcd60e51b8152600401610442906110f5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610c729190611373565b6000604051808303816000865af19150503d8060008114610caf576040519150601f19603f3d011682016040523d82523d6000602084013e610cb4565b606091505b5091509150818015610cde575080511580610cde575080806020019051810190610cde919061138f565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063095ea7b39085908590849063dd62ed3e90604401602060405180830381865afa158015610d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6991906112fd565b610d7391906113b1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de2919061138f565b506001949350505050565b60005b83811015610e08578181015183820152602001610df0565b50506000910152565b60008151808452610e29816020860160208601610ded565b601f01601f19169290920160200192915050565b602081526000610e506020830184610e11565b9392505050565b60008060408385031215610e6a57600080fd5b50508035926020909101359150565b60008083601f840112610e8b57600080fd5b50813567ffffffffffffffff811115610ea357600080fd5b602083019150836020828501011115610ebb57600080fd5b9250929050565b60008060208385031215610ed557600080fd5b823567ffffffffffffffff811115610eec57600080fd5b610ef885828601610e79565b90969095509350505050565b6001600160a01b0381168114610f1957600080fd5b50565b600060208284031215610f2e57600080fd5b8135610e5081610f04565b600060208284031215610f4b57600080fd5b5035919050565b600080600060408486031215610f6757600080fd5b833567ffffffffffffffff811115610f7e57600080fd5b610f8a86828701610e79565b909790965060209590950135949350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610fc557600080fd5b813567ffffffffffffffff80821115610fe057610fe0610f9e565b604051601f8301601f19908116603f0116810190828211818310171561100857611008610f9e565b8160405283815286602085880101111561102157600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561105457600080fd5b823567ffffffffffffffff8082111561106c57600080fd5b61107886838701610fb4565b9350602085013591508082111561108e57600080fd5b5061109b85828601610fb4565b9150509250929050565b600181811c908216806110b957607f821691505b6020821081036110d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b6020808252601a908201527f4f6e6c792074686520676f7665726e6f7220616c6c6f7765642e000000000000604082015260600190565b601f82111561056a57600081815260208120601f850160051c810160208610156111535750805b601f850160051c820191505b818110156111725782815560010161115f565b505050505050565b67ffffffffffffffff83111561119257611192610f9e565b6111a6836111a083546110a5565b8361112c565b6000601f8411600181146111da57600085156111c25750838201355b600019600387901b1c1916600186901b178355611234565b600083815260209020601f19861690835b8281101561120b57868501358255602094850194600190920191016111eb565b50868210156112285760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b8183823760009101908152919050565b60008154611258816110a5565b808552602060018381168015611275576001811461128f576112bd565b60ff1985168884015283151560051b8801830195506112bd565b866000528260002060005b858110156112b55781548a820186015290830190840161129a565b890184019650505b505050505092915050565b8481526080602082015260006112e1608083018661124b565b6001600160a01b03949094166040830152506060015292915050565b60006020828403121561130f57600080fd5b5051919050565b82815260406020820152600061132f604083018461124b565b949350505050565b60608152600060608201526080602082015260006113586080830185610e11565b828103604084015261136a8185610e11565b95945050505050565b60008251611385818460208701610ded565b9190910192915050565b6000602082840312156113a157600080fd5b81518015158114610e5057600080fd5b808201808211156113d257634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220c6a6daf2f56ede86acd165f440073734a6ccd3c00dadf35865db2d523df0840d64736f6c63430008120033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrableDisputeID": "The identifier of the dispute in the Arbitrable contract.", - "_arbitrator": "The arbitrator of the contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "The arbitrator to rule on created disputes.", - "_arbitratorExtraData": "The extra data for the arbitrator.", - "_templateData": "The dispute template data.", - "_templateDataMappings": "The dispute template data mappings.", - "_templateRegistry": "The dispute template registry.", - "_weth": "The WETH token." - } - }, - "createDispute(string)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_action": "The action that requires arbitration." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the dispute created." - } - }, - "createDispute(string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_action": "The action that requires arbitration.", - "_feeInWeth": "Amount of fees in WETH for the arbitrator." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the dispute created." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_externalDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "ArbitrableExample An example of an arbitrable contract which connects to the arbitator that implements the updated interface.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 9463, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "arbitrator", - "offset": 0, - "slot": "0", - "type": "t_contract(IArbitratorV2)15461" - }, - { - "astId": 9466, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "templateRegistry", - "offset": 0, - "slot": "1", - "type": "t_contract(IDisputeTemplateRegistry)15627" - }, - { - "astId": 9468, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "templateId", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 9470, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "3", - "type": "t_bytes_storage" - }, - { - "astId": 9477, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "externalIDtoLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 9481, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "disputes", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(DisputeStruct)9454_storage)dyn_storage" - } - ], - "types": { - "t_array(t_struct(DisputeStruct)9454_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)9454_storage", - "encoding": "dynamic_array", - "label": "struct ArbitrableExample.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)15461": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)15627": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)9454_storage": { - "encoding": "inplace", - "label": "struct ArbitrableExample.DisputeStruct", - "members": [ - { - "astId": 9449, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "isRuled", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 9451, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "ruling", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 9453, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "2", - "type": "t_uint256" - } - ], - "numberOfBytes": "96" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiado/DisputeResolver.json b/contracts/deployments/chiado/DisputeResolver.json deleted file mode 100644 index 4807f0d9c..000000000 --- a/contracts/deployments/chiado/DisputeResolver.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0x5f79737f65320bA12440aA88087281cC8e71A781", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitrableDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "arbitratorDisputeIDToLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplate", - "type": "string" - }, - { - "internalType": "string", - "name": "_disputeTemplateDataMappings", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplateUri", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplateUri", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bytes", - "name": "arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x4532fb85a0577c9da7d7e5c3c26cd851442a8c0fd7306b2783a9512ac9748097", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x5f79737f65320bA12440aA88087281cC8e71A781", - "transactionIndex": 0, - "gasUsed": "899270", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc5e232944a325ba4ab9969ea04643980f1ec34644cf1135952d3ceeb490dd2c2", - "transactionHash": "0x4532fb85a0577c9da7d7e5c3c26cd851442a8c0fd7306b2783a9512ac9748097", - "logs": [], - "blockNumber": 5418567, - "cumulativeGasUsed": "899270", - "status": 1, - "byzantium": true - }, - "args": [ - "0x2824bdcc752b1272D56A84be03A74Ee856C06e43", - "0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385" - ], - "numDeployments": 4, - "solcInputHash": "7e0c306a4451043d6e53d94781f5594c", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitrableDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrableDisputeID\":\"The identifier of the dispute in the Arbitrable contract.\",\"_arbitrator\":\"The arbitrator of the contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_externalDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/DisputeResolver.sol\":\"DisputeResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@ferittuncer, @unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity 0.8.18;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _externalDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _externalDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_externalDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _externalDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal returns (uint256 disputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n disputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[disputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, disputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0x6a73611696ae6b6f128c1c3d6f355f691f93b374243f41e6a9b0795bbfb8fb13\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x4b1b3f98d13e4a9a1c546dd45f98490f86e871cfc4b4be9a3fe4d29b3c99649c\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610ed5380380610ed583398101604081905261002f91610083565b600080546001600160a01b03199081163317909155600180546001600160a01b03948516908316179055600280549290931691161790556100bd565b6001600160a01b038116811461008057600080fd5b50565b6000806040838503121561009657600080fd5b82516100a18161006b565b60208401519092506100b28161006b565b809150509250929050565b610e09806100cc6000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cb8565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d78565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db4565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb357600081815260208120601f850160051c81016020861015610c905750805b601f850160051c820191505b81811015610caf57828155600101610c9c565b5050505b505050565b815167ffffffffffffffff811115610cd257610cd2610a64565b610ce681610ce08454610be0565b84610c69565b602080601f831160018114610d1b5760008415610d035750858301515b600019600386901b1c1916600185901b178555610caf565b600085815260208120601f198616915b82811015610d4a57888601518255948401946001909101908401610d2b565b5085821015610d685787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d996080830185610932565b8281036040840152610dab8185610932565b95945050505050565b838152826020820152606060408201526000610dab606083018461093256fea2646970667358221220c324d7140e9a3d1af3d79e61c385889111fcf915450df6674ffa003e40949e0964736f6c63430008120033", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cb8565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d78565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db4565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb357600081815260208120601f850160051c81016020861015610c905750805b601f850160051c820191505b81811015610caf57828155600101610c9c565b5050505b505050565b815167ffffffffffffffff811115610cd257610cd2610a64565b610ce681610ce08454610be0565b84610c69565b602080601f831160018114610d1b5760008415610d035750858301515b600019600386901b1c1916600185901b178555610caf565b600085815260208120601f198616915b82811015610d4a57888601518255948401946001909101908401610d2b565b5085821015610d685787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d996080830185610932565b8281036040840152610dab8185610932565b95945050505050565b838152826020820152606060408201526000610dab606083018461093256fea2646970667358221220c324d7140e9a3d1af3d79e61c385889111fcf915450df6674ffa003e40949e0964736f6c63430008120033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrableDisputeID": "The identifier of the dispute in the Arbitrable contract.", - "_arbitrator": "The arbitrator of the contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "Target global arbitrator for any disputes." - } - }, - "createDisputeForTemplate(bytes,string,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplate": "Dispute template.", - "_disputeTemplateDataMappings": "The data mappings.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "createDisputeForTemplateUri(bytes,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_externalDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 9861, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 9864, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)15461" - }, - { - "astId": 9867, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)15627" - }, - { - "astId": 9871, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)9859_storage)dyn_storage" - }, - { - "astId": 9875, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)9859_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)9859_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)15461": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)15627": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)9859_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 9852, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 9854, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 9856, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 9858, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiado/DisputeTemplateRegistry.json b/contracts/deployments/chiado/DisputeTemplateRegistry.json deleted file mode 100644 index f764e6783..000000000 --- a/contracts/deployments/chiado/DisputeTemplateRegistry.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "address": "0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "DisputeTemplate", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "setDisputeTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "templateId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templates", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x1ec95f806701a927a4fbbb0e427975d8568d3aefc30f88e2df6e6b43e9657e79", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385", - "transactionIndex": 1, - "gasUsed": "215830", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1f68cb3d8a496c982d20f9245d8121f5c90b4e289586ae7be79937fe2728f318", - "transactionHash": "0x1ec95f806701a927a4fbbb0e427975d8568d3aefc30f88e2df6e6b43e9657e79", - "logs": [], - "blockNumber": 5398792, - "cumulativeGasUsed": "242422", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "5cbc9a57c66318424bb771eed7e7b88c", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"DisputeTemplate\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"setDisputeTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"templateId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"events\":{\"DisputeTemplate(uint256,string,string,string)\":{\"details\":\"To be emitted when a new dispute template is created.\",\"params\":{\"_templateData\":\"The template data.\",\"_templateDataMappings\":\"The data mappings.\",\"_templateId\":\"The identifier of the dispute template.\",\"_templateTag\":\"An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\"}}},\"kind\":\"dev\",\"methods\":{},\"title\":\"Dispute Template Registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/DisputeTemplateRegistry.sol\":\"DisputeTemplateRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/arbitration/DisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\n\\nimport \\\"./interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\n/// @title Dispute Template Registry\\n/// @dev A contract to maintain a registry of dispute templates.\\ncontract DisputeTemplateRegistry is IDisputeTemplateRegistry {\\n uint256 public templates;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId) {\\n templateId = templates++;\\n emit DisputeTemplate(templateId, _templateTag, _templateData, _templateDataMappings);\\n }\\n}\\n\",\"keccak256\":\"0xbc2d8ff9784d93f932199993fd58aab88fbc367268a10ffb7fe07a85826960c1\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x4b1b3f98d13e4a9a1c546dd45f98490f86e871cfc4b4be9a3fe4d29b3c99649c\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506102f1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633a283d7d1461003b5780634a99417414610056575b600080fd5b61004460005481565b60405190815260200160405180910390f35b610044610064366004610172565b600080548180610073836101fa565b919050559050836040516100879190610245565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516100c092919061028d565b60405180910390a39392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126100f657600080fd5b813567ffffffffffffffff80821115610111576101116100cf565b604051601f8301601f19908116603f01168101908282118183101715610139576101396100cf565b8160405283815286602085880101111561015257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561018757600080fd5b833567ffffffffffffffff8082111561019f57600080fd5b6101ab878388016100e5565b945060208601359150808211156101c157600080fd5b6101cd878388016100e5565b935060408601359150808211156101e357600080fd5b506101f0868287016100e5565b9150509250925092565b60006001820161021a57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b8381101561023c578181015183820152602001610224565b50506000910152565b60008251610257818460208701610221565b9190910192915050565b60008151808452610279816020860160208601610221565b601f01601f19169290920160200192915050565b6040815260006102a06040830185610261565b82810360208401526102b28185610261565b9594505050505056fea26469706673582212208e28c2a1ac6bf992487f46d3bb5b26e186ac986099d0d98440c6107f111f92ab64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80633a283d7d1461003b5780634a99417414610056575b600080fd5b61004460005481565b60405190815260200160405180910390f35b610044610064366004610172565b600080548180610073836101fa565b919050559050836040516100879190610245565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516100c092919061028d565b60405180910390a39392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126100f657600080fd5b813567ffffffffffffffff80821115610111576101116100cf565b604051601f8301601f19908116603f01168101908282118183101715610139576101396100cf565b8160405283815286602085880101111561015257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561018757600080fd5b833567ffffffffffffffff8082111561019f57600080fd5b6101ab878388016100e5565b945060208601359150808211156101c157600080fd5b6101cd878388016100e5565b935060408601359150808211156101e357600080fd5b506101f0868287016100e5565b9150509250925092565b60006001820161021a57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b8381101561023c578181015183820152602001610224565b50506000910152565b60008251610257818460208701610221565b9190910192915050565b60008151808452610279816020860160208601610221565b601f01601f19169290920160200192915050565b6040815260006102a06040830185610261565b82810360208401526102b28185610261565b9594505050505056fea26469706673582212208e28c2a1ac6bf992487f46d3bb5b26e186ac986099d0d98440c6107f111f92ab64736f6c63430008120033", - "devdoc": { - "details": "A contract to maintain a registry of dispute templates.", - "events": { - "DisputeTemplate(uint256,string,string,string)": { - "details": "To be emitted when a new dispute template is created.", - "params": { - "_templateData": "The template data.", - "_templateDataMappings": "The data mappings.", - "_templateId": "The identifier of the dispute template.", - "_templateTag": "An optional tag for the dispute template, such as \"registration\" or \"removal\"." - } - } - }, - "kind": "dev", - "methods": {}, - "title": "Dispute Template Registry", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 2685, - "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", - "label": "templates", - "offset": 0, - "slot": "0", - "type": "t_uint256" - } - ], - "types": { - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiado/ForeignGatewayOnGnosis.json b/contracts/deployments/chiado/ForeignGatewayOnGnosis.json deleted file mode 100644 index 5ce9977a8..000000000 --- a/contracts/deployments/chiado/ForeignGatewayOnGnosis.json +++ /dev/null @@ -1,930 +0,0 @@ -{ - "address": "0x2824bdcc752b1272D56A84be03A74Ee856C06e43", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_veaOutbox", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_homeChainID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_homeGateway", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - } - ], - "name": "ArbitrationCostModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "_foreignBlockHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "_foreignArbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_foreignDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "CrossChainDisputeOutgoing", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_NB_OF_JURORS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - } - ], - "name": "changeCourtJurorFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_homeGateway", - "type": "address" - } - ], - "name": "changeHomeGateway", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_veaOutbox", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_gracePeriod", - "type": "uint256" - } - ], - "name": "changeVea", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "deprecatedVeaOutbox", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "deprecatedVeaOutboxExpiration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - } - ], - "name": "disputeHashToForeignID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "disputeHashtoDisputeData", - "outputs": [ - { - "internalType": "uint248", - "name": "id", - "type": "uint248" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "address", - "name": "arbitrable", - "type": "address" - }, - { - "internalType": "uint256", - "name": "paid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "relayer", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "name": "feeForJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "homeChainID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "homeGateway", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_messageSender", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_relayer", - "type": "address" - } - ], - "name": "relayRule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "senderGateway", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "veaOutbox", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xcdaf2b7fd205cf50779b9748b4a48ecc5b251dd04a2d02c7318b7c82882e0d3c", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x2824bdcc752b1272D56A84be03A74Ee856C06e43", - "transactionIndex": 1, - "gasUsed": "1061402", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x338c2e86e97f6bee552f0c10e8bd1708cee7bac9e03a0bd3e7ea3f9632083211", - "transactionHash": "0xcdaf2b7fd205cf50779b9748b4a48ecc5b251dd04a2d02c7318b7c82882e0d3c", - "logs": [], - "blockNumber": 5418560, - "cumulativeGasUsed": "1089266", - "status": 1, - "byzantium": true - }, - "args": [ - "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "0xdFd7aDEb43d46FA3f16FB3e27F7fe85c3f5BD89D", - "0x0000000000000000000000000000000000000000000000000000000000066eed", - "0xdd69c7e8d5B3a6185DE84bBbCacb480153E4e1d8" - ], - "numDeployments": 6, - "solcInputHash": "7e0c306a4451043d6e53d94781f5594c", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutbox\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_homeChainID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_homeGateway\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"}],\"name\":\"ArbitrationCostModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_foreignBlockHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_foreignArbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_foreignDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"CrossChainDisputeOutgoing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_NB_OF_JURORS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"}],\"name\":\"changeCourtJurorFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_homeGateway\",\"type\":\"address\"}],\"name\":\"changeHomeGateway\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_veaOutbox\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gracePeriod\",\"type\":\"uint256\"}],\"name\":\"changeVea\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deprecatedVeaOutbox\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deprecatedVeaOutboxExpiration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_disputeHash\",\"type\":\"bytes32\"}],\"name\":\"disputeHashToForeignID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"disputeHashtoDisputeData\",\"outputs\":[{\"internalType\":\"uint248\",\"name\":\"id\",\"type\":\"uint248\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"arbitrable\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"name\":\"feeForJuror\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"homeChainID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"homeGateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_messageSender\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_disputeHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_relayer\",\"type\":\"address\"}],\"name\":\"relayRule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"senderGateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutbox\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_disputeHash\",\"type\":\"bytes32\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"CrossChainDisputeOutgoing(bytes32,address,uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is sent to the IHomeGateway.\",\"params\":{\"_choices\":\"The number of choices the arbitrator can choose from in this dispute.\",\"_extraData\":\"Any extra data to attach.\",\"_foreignArbitrable\":\"The address of the Arbitrable contract.\",\"_foreignBlockHash\":\"foreignBlockHash\",\"_foreignDisputeID\":\"The identifier of the dispute in the Arbitrable contract.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in the native currency, typically ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"_0\":\"The arbitration cost in `_feeToken`.\"}},\"changeCourtJurorFee(uint96,uint256)\":{\"details\":\"Changes the `feeForJuror` property value of a specified court.\",\"params\":{\"_courtID\":\"The ID of the court on the v2 arbitrator. Not to be confused with the courtID on KlerosLiquid.\",\"_feeForJuror\":\"The new value for the `feeForJuror` property value.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"changeHomeGateway(address)\":{\"details\":\"Changes the home gateway.\",\"params\":{\"_homeGateway\":\"The address of the new home gateway.\"}},\"changeVea(address,uint256)\":{\"details\":\"Changes the outbox.\",\"params\":{\"_gracePeriod\":\"The duration to accept messages from the deprecated bridge (if at all).\",\"_veaOutbox\":\"The address of the new outbox.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"_0\":\"The identifier of the dispute created.\"}},\"disputeHashToForeignID(bytes32)\":{\"details\":\"Looks up the local foreign disputeID for a disputeHash\",\"params\":{\"_disputeHash\":\"dispute hash\"}},\"withdrawFees(bytes32)\":{\"params\":{\"_disputeHash\":\"The dispute hash for which to withdraw the fees.\"}}},\"stateVariables\":{\"homeChainID\":{\"return\":\"The chain ID where the corresponding home gateway is deployed.\",\"returns\":{\"_0\":\"The chain ID where the corresponding home gateway is deployed.\"}},\"homeGateway\":{\"return\":\"The address of the corresponding home gateway.\",\"returns\":{\"_0\":\"The address of the corresponding home gateway.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"relayRule(address,bytes32,uint256,address)\":{\"notice\":\"Relay the rule call from the home gateway to the arbitrable.\"},\"withdrawFees(bytes32)\":{\"notice\":\"Reimburses the dispute fees to the relayer who paid for these fees on the home chain.\"}},\"notice\":\"Foreign Gateway Counterpart of `HomeGateway`\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gateway/ForeignGateway.sol\":\"ForeignGateway\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@kleros/vea-contracts/src/interfaces/gateways/IReceiverGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IReceiverGateway {\\n function veaOutbox() external view returns (address);\\n\\n function senderGateway() external view returns (address);\\n}\\n\",\"keccak256\":\"0xde6bdbe57ced7c1e79d62dca23aa8c2322e031da91ceac22cefd185f1e3740ef\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"src/gateway/ForeignGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere, @shalzz]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./interfaces/IForeignGateway.sol\\\";\\n\\n/// Foreign Gateway\\n/// Counterpart of `HomeGateway`\\ncontract ForeignGateway is IForeignGateway {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeData {\\n uint248 id;\\n bool ruled;\\n address arbitrable;\\n uint256 paid;\\n address relayer;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event ArbitrationCostModified(uint96 indexed _courtID, uint256 _feeForJuror);\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\n uint256 internal localDisputeID = 1; // The disputeID must start from 1 as the KlerosV1 proxy governor depends on this implementation. We now also depend on localDisputeID not ever being zero.\\n mapping(uint96 => uint256) public feeForJuror; // feeForJuror[v2CourtID], it mirrors the value on KlerosCore.\\n address public governor;\\n address public veaOutbox;\\n uint256 public immutable override homeChainID;\\n address public override homeGateway;\\n address public deprecatedVeaOutbox;\\n uint256 public deprecatedVeaOutboxExpiration;\\n mapping(bytes32 => DisputeData) public disputeHashtoDisputeData;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyFromVea(address _messageSender) {\\n require(\\n veaOutbox == msg.sender ||\\n (block.timestamp < deprecatedVeaOutboxExpiration && deprecatedVeaOutbox == msg.sender),\\n \\\"Access not allowed: Vea Outbox only.\\\"\\n );\\n require(_messageSender == homeGateway, \\\"Access not allowed: HomeGateway only.\\\");\\n _;\\n }\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n constructor(address _governor, address _veaOutbox, uint256 _homeChainID, address _homeGateway) {\\n governor = _governor;\\n veaOutbox = _veaOutbox;\\n homeChainID = _homeChainID;\\n homeGateway = _homeGateway;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n /// @dev Changes the outbox.\\n /// @param _veaOutbox The address of the new outbox.\\n /// @param _gracePeriod The duration to accept messages from the deprecated bridge (if at all).\\n function changeVea(address _veaOutbox, uint256 _gracePeriod) external onlyByGovernor {\\n // grace period to relay the remaining messages which are still going through the deprecated bridge.\\n deprecatedVeaOutboxExpiration = block.timestamp + _gracePeriod;\\n deprecatedVeaOutbox = veaOutbox;\\n veaOutbox = _veaOutbox;\\n }\\n\\n /// @dev Changes the home gateway.\\n /// @param _homeGateway The address of the new home gateway.\\n function changeHomeGateway(address _homeGateway) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n homeGateway = _homeGateway;\\n }\\n\\n /// @dev Changes the `feeForJuror` property value of a specified court.\\n /// @param _courtID The ID of the court on the v2 arbitrator. Not to be confused with the courtID on KlerosLiquid.\\n /// @param _feeForJuror The new value for the `feeForJuror` property value.\\n function changeCourtJurorFee(uint96 _courtID, uint256 _feeForJuror) external onlyByGovernor {\\n feeForJuror[_courtID] = _feeForJuror;\\n emit ArbitrationCostModified(_courtID, _feeForJuror);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _choices,\\n bytes calldata _extraData\\n ) external payable override returns (uint256 disputeID) {\\n require(msg.value >= arbitrationCost(_extraData), \\\"Not paid enough for arbitration\\\");\\n\\n disputeID = localDisputeID++;\\n uint256 chainID;\\n assembly {\\n chainID := chainid()\\n }\\n bytes32 disputeHash = keccak256(\\n abi.encodePacked(\\n \\\"createDispute\\\",\\n blockhash(block.number - 1),\\n chainID,\\n msg.sender,\\n disputeID,\\n _choices,\\n _extraData\\n )\\n );\\n\\n disputeHashtoDisputeData[disputeHash] = DisputeData({\\n id: uint248(disputeID),\\n arbitrable: msg.sender,\\n paid: msg.value,\\n relayer: address(0),\\n ruled: false\\n });\\n\\n emit CrossChainDisputeOutgoing(blockhash(block.number - 1), msg.sender, disputeID, _choices, _extraData);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 /*_choices*/,\\n bytes calldata /*_extraData*/,\\n IERC20 /*_feeToken*/,\\n uint256 /*_feeAmount*/\\n ) external pure override returns (uint256) {\\n revert(\\\"Not supported\\\");\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(bytes calldata _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors) = extraDataToCourtIDMinJurors(_extraData);\\n cost = feeForJuror[courtID] * minJurors;\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(\\n bytes calldata /*_extraData*/,\\n IERC20 /*_feeToken*/\\n ) public pure override returns (uint256 /*cost*/) {\\n revert(\\\"Not supported\\\");\\n }\\n\\n /// @inheritdoc IForeignGateway\\n function relayRule(\\n address _messageSender,\\n bytes32 _disputeHash,\\n uint256 _ruling,\\n address _relayer\\n ) external override onlyFromVea(_messageSender) {\\n DisputeData storage dispute = disputeHashtoDisputeData[_disputeHash];\\n\\n require(dispute.id != 0, \\\"Dispute does not exist\\\");\\n require(!dispute.ruled, \\\"Cannot rule twice\\\");\\n\\n dispute.ruled = true;\\n dispute.relayer = _relayer;\\n\\n IArbitrableV2 arbitrable = IArbitrableV2(dispute.arbitrable);\\n arbitrable.rule(dispute.id, _ruling);\\n }\\n\\n /// @inheritdoc IForeignGateway\\n function withdrawFees(bytes32 _disputeHash) external override {\\n DisputeData storage dispute = disputeHashtoDisputeData[_disputeHash];\\n require(dispute.id != 0, \\\"Dispute does not exist\\\");\\n require(dispute.ruled, \\\"Not ruled yet\\\");\\n\\n uint256 amount = dispute.paid;\\n dispute.paid = 0;\\n payable(dispute.relayer).transfer(amount);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @inheritdoc IForeignGateway\\n function disputeHashToForeignID(bytes32 _disputeHash) external view override returns (uint256) {\\n return disputeHashtoDisputeData[_disputeHash].id;\\n }\\n\\n /// @inheritdoc IReceiverGateway\\n function senderGateway() external view override returns (address) {\\n return homeGateway;\\n }\\n\\n function currentRuling(\\n uint256 /*_disputeID*/\\n ) public pure returns (uint256 /*ruling*/, bool /*tied*/, bool /*overridden*/) {\\n revert(\\\"Not supported\\\");\\n }\\n\\n // ************************ //\\n // * Internal * //\\n // ************************ //\\n\\n function extraDataToCourtIDMinJurors(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors) {\\n // Note that here we ignore DisputeKitID\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n }\\n if (feeForJuror[courtID] == 0) courtID = 0;\\n if (minJurors == 0) minJurors = DEFAULT_NB_OF_JURORS;\\n } else {\\n courtID = 0;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x22ebbed56967cbb41908e6636be3c06b4c528bcb9f1f7556fecdf98945d717a8\",\"license\":\"MIT\"},\"src/gateway/interfaces/IForeignGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere, @shalzz]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitration/interfaces/IArbitratorV2.sol\\\";\\nimport \\\"@kleros/vea-contracts/src/interfaces/gateways/IReceiverGateway.sol\\\";\\n\\ninterface IForeignGateway is IArbitratorV2, IReceiverGateway {\\n /// @dev To be emitted when a dispute is sent to the IHomeGateway.\\n /// @param _foreignBlockHash foreignBlockHash\\n /// @param _foreignArbitrable The address of the Arbitrable contract.\\n /// @param _foreignDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _choices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Any extra data to attach.\\n event CrossChainDisputeOutgoing(\\n bytes32 _foreignBlockHash,\\n address indexed _foreignArbitrable,\\n uint256 indexed _foreignDisputeID,\\n uint256 _choices,\\n bytes _extraData\\n );\\n\\n /// Relay the rule call from the home gateway to the arbitrable.\\n function relayRule(address _messageSender, bytes32 _disputeHash, uint256 _ruling, address _forwarder) external;\\n\\n /// Reimburses the dispute fees to the relayer who paid for these fees on the home chain.\\n /// @param _disputeHash The dispute hash for which to withdraw the fees.\\n function withdrawFees(bytes32 _disputeHash) external;\\n\\n /// @dev Looks up the local foreign disputeID for a disputeHash\\n /// @param _disputeHash dispute hash\\n function disputeHashToForeignID(bytes32 _disputeHash) external view returns (uint256);\\n\\n /// @return The chain ID where the corresponding home gateway is deployed.\\n function homeChainID() external view returns (uint256);\\n\\n /// @return The address of the corresponding home gateway.\\n function homeGateway() external view returns (address);\\n}\\n\",\"keccak256\":\"0xf59d1a9cd8b601f82ea3871d48bd9181e012a650e8f075e2c23c04df00ca6fe8\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052600160005534801561001557600080fd5b5060405161118b38038061118b83398101604081905261003491610098565b600280546001600160a01b039586166001600160a01b0319918216179091556003805494861694821694909417909355608091909152600480549190931691161790556100e5565b80516001600160a01b038116811461009357600080fd5b919050565b600080600080608085870312156100ae57600080fd5b6100b78561007c565b93506100c56020860161007c565b9250604085015191506100da6060860161007c565b905092959194509250565b60805161108b61010060003960006101e8015261108b6000f3fe6080604052600436106101355760003560e01c8063a60a4db5116100ab578063d98493f61161006f578063d98493f614610419578063dea580b914610439578063e4c0aaf414610459578063ebb7119414610479578063f6506db414610499578063f7434ea9146104b457600080fd5b8063a60a4db514610311578063bcb1a16614610331578063c13517e114610346578063ce0aaf9514610359578063d3c617ff1461037757600080fd5b806336e41d3d116100fd57806336e41d3d1461024e57806345c9044114610264578063492d85d4146102915780634d53c2a5146102b157806367c51947146102d157806393626084146102f157600080fd5b80630c340a241461013a5780631c3db16d146101775780631debaba6146101b45780631fc6b556146101d65780632e1db89014610218575b600080fd5b34801561014657600080fd5b5060025461015a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561018357600080fd5b50610197610192366004610c01565b6104d4565b60408051938452911515602084015215159082015260600161016e565b3480156101c057600080fd5b506101d46101cf366004610c32565b6104fa565b005b3480156101e257600080fd5b5061020a7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161016e565b34801561022457600080fd5b5061020a610233366004610c01565b6000908152600760205260409020546001600160f81b031690565b34801561025a57600080fd5b5061020a60065481565b34801561027057600080fd5b5061020a61027f366004610c7a565b60016020526000908152604090205481565b34801561029d57600080fd5b506101d46102ac366004610c9c565b610562565b3480156102bd57600080fd5b5060045461015a906001600160a01b031681565b3480156102dd57600080fd5b506101d46102ec366004610cb9565b6105ae565b3480156102fd57600080fd5b5060055461015a906001600160a01b031681565b34801561031d57600080fd5b506101d461032c366004610cd5565b610631565b34801561033d57600080fd5b5061020a600381565b61020a610354366004610d68565b61084e565b34801561036557600080fd5b506004546001600160a01b031661015a565b34801561038357600080fd5b506103db610392366004610c01565b60076020526000908152604090208054600182015460028301546003909301546001600160f81b03831693600160f81b90930460ff16926001600160a01b039283169290911685565b604080516001600160f81b03909616865293151560208601526001600160a01b0392831693850193909352606084015216608082015260a00161016e565b34801561042557600080fd5b5061020a610434366004610db4565b6109ea565b34801561044557600080fd5b5060035461015a906001600160a01b031681565b34801561046557600080fd5b506101d4610474366004610c9c565b610a04565b34801561048557600080fd5b506101d4610494366004610c01565b610a50565b3480156104a557600080fd5b5061020a610434366004610e0b565b3480156104c057600080fd5b5061020a6104cf366004610e72565b610b22565b600080600060405162461bcd60e51b81526004016104f190610eb4565b60405180910390fd5b6002546001600160a01b031633146105245760405162461bcd60e51b81526004016104f190610edb565b61052e8142610f33565b6006555060038054600580546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6002546001600160a01b0316331461058c5760405162461bcd60e51b81526004016104f190610edb565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146105d85760405162461bcd60e51b81526004016104f190610edb565b6001600160601b03821660008181526001602052604090819020839055517f20a6ef9c48f3a1ae927e70bc34e82d974c53d3c98c8fd9e731c4bacd5842c596906106259084815260200190565b60405180910390a25050565b60035484906001600160a01b031633148061066257506006544210801561066257506005546001600160a01b031633145b6106ba5760405162461bcd60e51b8152602060048201526024808201527f416363657373206e6f7420616c6c6f7765643a20566561204f7574626f78206f60448201526337363c9760e11b60648201526084016104f1565b6004546001600160a01b038281169116146107255760405162461bcd60e51b815260206004820152602560248201527f416363657373206e6f7420616c6c6f7765643a20486f6d65476174657761792060448201526437b7363c9760d91b60648201526084016104f1565b6000848152600760205260408120805490916001600160f81b0390911690036107605760405162461bcd60e51b81526004016104f190610f4c565b8054600160f81b900460ff16156107ad5760405162461bcd60e51b815260206004820152601160248201527043616e6e6f742072756c6520747769636560781b60448201526064016104f1565b80546001600160f81b0316600160f81b811782556003820180546001600160a01b038681166001600160a01b031990921691909117909155600183015460405163188d362b60e11b81526004810193909352602483018790521690819063311a6c5690604401600060405180830381600087803b15801561082d57600080fd5b505af1158015610841573d6000803e3d6000fd5b5050505050505050505050565b600061085a8383610b22565b3410156108a95760405162461bcd60e51b815260206004820152601f60248201527f4e6f74207061696420656e6f75676820666f72206172626974726174696f6e0060448201526064016104f1565b6000805490806108b883610f7c565b9091555090504660006108cc600143610f95565b408233858989896040516020016108e99796959493929190610fa8565b60408051601f19818403018152828252805160209182012060a0840183526001600160f81b0380881685526000858401818152338787018181523460608a0190815260808a01858152878652600790985297909320975191511515600160f81b029190931617865551600186810180546001600160a01b039384166001600160a01b031991821617909155955160028801559351600390960180549690911695909416949094179092559092508491907f03e54fa10baada663d819e5d7e4533535bfb6d4407abe51045be84e6c8de0203906109c59043610f95565b408989896040516109d99493929190611001565b60405180910390a350509392505050565b600060405162461bcd60e51b81526004016104f190610eb4565b6002546001600160a01b03163314610a2e5760405162461bcd60e51b81526004016104f190610edb565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600760205260408120805490916001600160f81b039091169003610a8b5760405162461bcd60e51b81526004016104f190610f4c565b8054600160f81b900460ff16610ad35760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c9d5b1959081e595d609a1b60448201526064016104f1565b600281018054600091829055600383015460405191926001600160a01b039091169183156108fc0291849190818181858888f19350505050158015610b1c573d6000803e3d6000fd5b50505050565b6000806000610b6685858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610b9892505050565b6001600160601b0382166000908152600160205260409020549193509150610b8f90829061103e565b95945050505050565b6000806040835110610bf557602083015191506040830151905060016000836001600160601b03166001600160601b0316815260200190815260200160002054600003610be457600091505b80600003610bf0575060035b915091565b50600090506003915091565b600060208284031215610c1357600080fd5b5035919050565b6001600160a01b0381168114610c2f57600080fd5b50565b60008060408385031215610c4557600080fd5b8235610c5081610c1a565b946020939093013593505050565b80356001600160601b0381168114610c7557600080fd5b919050565b600060208284031215610c8c57600080fd5b610c9582610c5e565b9392505050565b600060208284031215610cae57600080fd5b8135610c9581610c1a565b60008060408385031215610ccc57600080fd5b610c5083610c5e565b60008060008060808587031215610ceb57600080fd5b8435610cf681610c1a565b935060208501359250604085013591506060850135610d1481610c1a565b939692955090935050565b60008083601f840112610d3157600080fd5b50813567ffffffffffffffff811115610d4957600080fd5b602083019150836020828501011115610d6157600080fd5b9250929050565b600080600060408486031215610d7d57600080fd5b83359250602084013567ffffffffffffffff811115610d9b57600080fd5b610da786828701610d1f565b9497909650939450505050565b600080600060408486031215610dc957600080fd5b833567ffffffffffffffff811115610de057600080fd5b610dec86828701610d1f565b9094509250506020840135610e0081610c1a565b809150509250925092565b600080600080600060808688031215610e2357600080fd5b85359450602086013567ffffffffffffffff811115610e4157600080fd5b610e4d88828901610d1f565b9095509350506040860135610e6181610c1a565b949793965091946060013592915050565b60008060208385031215610e8557600080fd5b823567ffffffffffffffff811115610e9c57600080fd5b610ea885828601610d1f565b90969095509350505050565b6020808252600d908201526c139bdd081cdd5c1c1bdc9d1959609a1b604082015260600190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f4657610f46610f1d565b92915050565b602080825260169082015275111a5cdc1d5d1948191bd95cc81b9bdd08195e1a5cdd60521b604082015260600190565b600060018201610f8e57610f8e610f1d565b5060010190565b81810381811115610f4657610f46610f1d565b6c6372656174654469737075746560981b815287600d82015286602d8201526001600160601b03198660601b16604d820152846061820152836081820152818360a18301376000910160a1019081529695505050505050565b84815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b8082028115828204841417610f4657610f46610f1d56fea2646970667358221220888d17a28a1ff1af1dfc3a7bd01b535245108bd5fc246f795eff76271d0a0cbc64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101355760003560e01c8063a60a4db5116100ab578063d98493f61161006f578063d98493f614610419578063dea580b914610439578063e4c0aaf414610459578063ebb7119414610479578063f6506db414610499578063f7434ea9146104b457600080fd5b8063a60a4db514610311578063bcb1a16614610331578063c13517e114610346578063ce0aaf9514610359578063d3c617ff1461037757600080fd5b806336e41d3d116100fd57806336e41d3d1461024e57806345c9044114610264578063492d85d4146102915780634d53c2a5146102b157806367c51947146102d157806393626084146102f157600080fd5b80630c340a241461013a5780631c3db16d146101775780631debaba6146101b45780631fc6b556146101d65780632e1db89014610218575b600080fd5b34801561014657600080fd5b5060025461015a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561018357600080fd5b50610197610192366004610c01565b6104d4565b60408051938452911515602084015215159082015260600161016e565b3480156101c057600080fd5b506101d46101cf366004610c32565b6104fa565b005b3480156101e257600080fd5b5061020a7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161016e565b34801561022457600080fd5b5061020a610233366004610c01565b6000908152600760205260409020546001600160f81b031690565b34801561025a57600080fd5b5061020a60065481565b34801561027057600080fd5b5061020a61027f366004610c7a565b60016020526000908152604090205481565b34801561029d57600080fd5b506101d46102ac366004610c9c565b610562565b3480156102bd57600080fd5b5060045461015a906001600160a01b031681565b3480156102dd57600080fd5b506101d46102ec366004610cb9565b6105ae565b3480156102fd57600080fd5b5060055461015a906001600160a01b031681565b34801561031d57600080fd5b506101d461032c366004610cd5565b610631565b34801561033d57600080fd5b5061020a600381565b61020a610354366004610d68565b61084e565b34801561036557600080fd5b506004546001600160a01b031661015a565b34801561038357600080fd5b506103db610392366004610c01565b60076020526000908152604090208054600182015460028301546003909301546001600160f81b03831693600160f81b90930460ff16926001600160a01b039283169290911685565b604080516001600160f81b03909616865293151560208601526001600160a01b0392831693850193909352606084015216608082015260a00161016e565b34801561042557600080fd5b5061020a610434366004610db4565b6109ea565b34801561044557600080fd5b5060035461015a906001600160a01b031681565b34801561046557600080fd5b506101d4610474366004610c9c565b610a04565b34801561048557600080fd5b506101d4610494366004610c01565b610a50565b3480156104a557600080fd5b5061020a610434366004610e0b565b3480156104c057600080fd5b5061020a6104cf366004610e72565b610b22565b600080600060405162461bcd60e51b81526004016104f190610eb4565b60405180910390fd5b6002546001600160a01b031633146105245760405162461bcd60e51b81526004016104f190610edb565b61052e8142610f33565b6006555060038054600580546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6002546001600160a01b0316331461058c5760405162461bcd60e51b81526004016104f190610edb565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146105d85760405162461bcd60e51b81526004016104f190610edb565b6001600160601b03821660008181526001602052604090819020839055517f20a6ef9c48f3a1ae927e70bc34e82d974c53d3c98c8fd9e731c4bacd5842c596906106259084815260200190565b60405180910390a25050565b60035484906001600160a01b031633148061066257506006544210801561066257506005546001600160a01b031633145b6106ba5760405162461bcd60e51b8152602060048201526024808201527f416363657373206e6f7420616c6c6f7765643a20566561204f7574626f78206f60448201526337363c9760e11b60648201526084016104f1565b6004546001600160a01b038281169116146107255760405162461bcd60e51b815260206004820152602560248201527f416363657373206e6f7420616c6c6f7765643a20486f6d65476174657761792060448201526437b7363c9760d91b60648201526084016104f1565b6000848152600760205260408120805490916001600160f81b0390911690036107605760405162461bcd60e51b81526004016104f190610f4c565b8054600160f81b900460ff16156107ad5760405162461bcd60e51b815260206004820152601160248201527043616e6e6f742072756c6520747769636560781b60448201526064016104f1565b80546001600160f81b0316600160f81b811782556003820180546001600160a01b038681166001600160a01b031990921691909117909155600183015460405163188d362b60e11b81526004810193909352602483018790521690819063311a6c5690604401600060405180830381600087803b15801561082d57600080fd5b505af1158015610841573d6000803e3d6000fd5b5050505050505050505050565b600061085a8383610b22565b3410156108a95760405162461bcd60e51b815260206004820152601f60248201527f4e6f74207061696420656e6f75676820666f72206172626974726174696f6e0060448201526064016104f1565b6000805490806108b883610f7c565b9091555090504660006108cc600143610f95565b408233858989896040516020016108e99796959493929190610fa8565b60408051601f19818403018152828252805160209182012060a0840183526001600160f81b0380881685526000858401818152338787018181523460608a0190815260808a01858152878652600790985297909320975191511515600160f81b029190931617865551600186810180546001600160a01b039384166001600160a01b031991821617909155955160028801559351600390960180549690911695909416949094179092559092508491907f03e54fa10baada663d819e5d7e4533535bfb6d4407abe51045be84e6c8de0203906109c59043610f95565b408989896040516109d99493929190611001565b60405180910390a350509392505050565b600060405162461bcd60e51b81526004016104f190610eb4565b6002546001600160a01b03163314610a2e5760405162461bcd60e51b81526004016104f190610edb565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600760205260408120805490916001600160f81b039091169003610a8b5760405162461bcd60e51b81526004016104f190610f4c565b8054600160f81b900460ff16610ad35760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c9d5b1959081e595d609a1b60448201526064016104f1565b600281018054600091829055600383015460405191926001600160a01b039091169183156108fc0291849190818181858888f19350505050158015610b1c573d6000803e3d6000fd5b50505050565b6000806000610b6685858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610b9892505050565b6001600160601b0382166000908152600160205260409020549193509150610b8f90829061103e565b95945050505050565b6000806040835110610bf557602083015191506040830151905060016000836001600160601b03166001600160601b0316815260200190815260200160002054600003610be457600091505b80600003610bf0575060035b915091565b50600090506003915091565b600060208284031215610c1357600080fd5b5035919050565b6001600160a01b0381168114610c2f57600080fd5b50565b60008060408385031215610c4557600080fd5b8235610c5081610c1a565b946020939093013593505050565b80356001600160601b0381168114610c7557600080fd5b919050565b600060208284031215610c8c57600080fd5b610c9582610c5e565b9392505050565b600060208284031215610cae57600080fd5b8135610c9581610c1a565b60008060408385031215610ccc57600080fd5b610c5083610c5e565b60008060008060808587031215610ceb57600080fd5b8435610cf681610c1a565b935060208501359250604085013591506060850135610d1481610c1a565b939692955090935050565b60008083601f840112610d3157600080fd5b50813567ffffffffffffffff811115610d4957600080fd5b602083019150836020828501011115610d6157600080fd5b9250929050565b600080600060408486031215610d7d57600080fd5b83359250602084013567ffffffffffffffff811115610d9b57600080fd5b610da786828701610d1f565b9497909650939450505050565b600080600060408486031215610dc957600080fd5b833567ffffffffffffffff811115610de057600080fd5b610dec86828701610d1f565b9094509250506020840135610e0081610c1a565b809150509250925092565b600080600080600060808688031215610e2357600080fd5b85359450602086013567ffffffffffffffff811115610e4157600080fd5b610e4d88828901610d1f565b9095509350506040860135610e6181610c1a565b949793965091946060013592915050565b60008060208385031215610e8557600080fd5b823567ffffffffffffffff811115610e9c57600080fd5b610ea885828601610d1f565b90969095509350505050565b6020808252600d908201526c139bdd081cdd5c1c1bdc9d1959609a1b604082015260600190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f4657610f46610f1d565b92915050565b602080825260169082015275111a5cdc1d5d1948191bd95cc81b9bdd08195e1a5cdd60521b604082015260600190565b600060018201610f8e57610f8e610f1d565b5060010190565b81810381811115610f4657610f46610f1d565b6c6372656174654469737075746560981b815287600d82015286602d8201526001600160601b03198660601b16604d820152846061820152836081820152818360a18301376000910160a1019081529695505050505050565b84815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b8082028115828204841417610f4657610f46610f1d56fea2646970667358221220888d17a28a1ff1af1dfc3a7bd01b535245108bd5fc246f795eff76271d0a0cbc64736f6c63430008120033", - "devdoc": { - "events": { - "AcceptedFeeToken(address,bool)": { - "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", - "params": { - "_accepted": "Whether the token is accepted or not.", - "_token": "The ERC20 token." - } - }, - "CrossChainDisputeOutgoing(bytes32,address,uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is sent to the IHomeGateway.", - "params": { - "_choices": "The number of choices the arbitrator can choose from in this dispute.", - "_extraData": "Any extra data to attach.", - "_foreignArbitrable": "The address of the Arbitrable contract.", - "_foreignBlockHash": "foreignBlockHash", - "_foreignDisputeID": "The identifier of the dispute in the Arbitrable contract." - } - }, - "DisputeCreation(uint256,address)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_arbitrable": "The contract which created the dispute.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract." - } - }, - "NewCurrencyRate(address,uint64,uint8)": { - "details": "To be emitted when the fee for a particular ERC20 token is updated.", - "params": { - "_feeToken": "The ERC20 token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrable": "The arbitrable receiving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in the native currency, typically ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." - }, - "returns": { - "cost": "The arbitration cost in ETH." - } - }, - "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeToken": "The ERC20 token used to pay fees." - }, - "returns": { - "_0": "The arbitration cost in `_feeToken`." - } - }, - "changeCourtJurorFee(uint96,uint256)": { - "details": "Changes the `feeForJuror` property value of a specified court.", - "params": { - "_courtID": "The ID of the court on the v2 arbitrator. Not to be confused with the courtID on KlerosLiquid.", - "_feeForJuror": "The new value for the `feeForJuror` property value." - } - }, - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "changeHomeGateway(address)": { - "details": "Changes the home gateway.", - "params": { - "_homeGateway": "The address of the new home gateway." - } - }, - "changeVea(address,uint256)": { - "details": "Changes the outbox.", - "params": { - "_gracePeriod": "The duration to accept messages from the deprecated bridge (if at all).", - "_veaOutbox": "The address of the new outbox." - } - }, - "createDispute(uint256,bytes)": { - "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "createDispute(uint256,bytes,address,uint256)": { - "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeAmount": "Amount of the ERC20 token used to pay fees.", - "_feeToken": "The ERC20 token used to pay fees.", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "_0": "The identifier of the dispute created." - } - }, - "disputeHashToForeignID(bytes32)": { - "details": "Looks up the local foreign disputeID for a disputeHash", - "params": { - "_disputeHash": "dispute hash" - } - }, - "withdrawFees(bytes32)": { - "params": { - "_disputeHash": "The dispute hash for which to withdraw the fees." - } - } - }, - "stateVariables": { - "homeChainID": { - "return": "The chain ID where the corresponding home gateway is deployed.", - "returns": { - "_0": "The chain ID where the corresponding home gateway is deployed." - } - }, - "homeGateway": { - "return": "The address of the corresponding home gateway.", - "returns": { - "_0": "The address of the corresponding home gateway." - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "relayRule(address,bytes32,uint256,address)": { - "notice": "Relay the rule call from the home gateway to the arbitrable." - }, - "withdrawFees(bytes32)": { - "notice": "Reimburses the dispute fees to the relayer who paid for these fees on the home chain." - } - }, - "notice": "Foreign Gateway Counterpart of `HomeGateway`", - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 15750, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "localDisputeID", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 15754, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "feeForJuror", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_uint96,t_uint256)" - }, - { - "astId": 15756, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "governor", - "offset": 0, - "slot": "2", - "type": "t_address" - }, - { - "astId": 15758, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "veaOutbox", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 15764, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "homeGateway", - "offset": 0, - "slot": "4", - "type": "t_address" - }, - { - "astId": 15766, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "deprecatedVeaOutbox", - "offset": 0, - "slot": "5", - "type": "t_address" - }, - { - "astId": 15768, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "deprecatedVeaOutboxExpiration", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 15773, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "disputeHashtoDisputeData", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_bytes32,t_struct(DisputeData)15738_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(DisputeData)15738_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct ForeignGateway.DisputeData)", - "numberOfBytes": "32", - "value": "t_struct(DisputeData)15738_storage" - }, - "t_mapping(t_uint96,t_uint256)": { - "encoding": "mapping", - "key": "t_uint96", - "label": "mapping(uint96 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeData)15738_storage": { - "encoding": "inplace", - "label": "struct ForeignGateway.DisputeData", - "members": [ - { - "astId": 15729, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "id", - "offset": 0, - "slot": "0", - "type": "t_uint248" - }, - { - "astId": 15731, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "ruled", - "offset": 31, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 15733, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "arbitrable", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 15735, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "paid", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 15737, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "relayer", - "offset": 0, - "slot": "3", - "type": "t_address" - } - ], - "numberOfBytes": "128" - }, - "t_uint248": { - "encoding": "inplace", - "label": "uint248", - "numberOfBytes": "31" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/chiado/SortitionSumTreeFactory.json b/contracts/deployments/chiado/SortitionSumTreeFactory.json deleted file mode 100644 index 4c58b9303..000000000 --- a/contracts/deployments/chiado/SortitionSumTreeFactory.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "address": "0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636", - "abi": [], - "transactionHash": "0x405e9f06449c4d61948ed7f0c9c6cf3f6a9bab4fd8b42db9c1232d41f07ee7d9", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636", - "transactionIndex": 0, - "gasUsed": "636060", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xced975b8d1ee04c3fb122c9d467d1d6bc3ea17b087b9b223c84ecbcfe267e271", - "transactionHash": "0x405e9f06449c4d61948ed7f0c9c6cf3f6a9bab4fd8b42db9c1232d41f07ee7d9", - "logs": [], - "blockNumber": 2252213, - "cumulativeGasUsed": "636060", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "c9b600ff9291ca791c04d618ea467929", - "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Enrique Piqueras - \",\"details\":\"A factory of trees that keep track of staked values for sortition.\",\"kind\":\"dev\",\"methods\":{\"createTree(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,uint256)\":{\"details\":\"Create a sortition sum tree at the specified key.\",\"params\":{\"_K\":\"The number of children each node in the tree should have.\",\"_key\":\"The key of the new tree.\"}},\"draw(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,uint256)\":{\"details\":\"Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.\",\"params\":{\"_drawnNumber\":\"The drawn number.\",\"_key\":\"The key of the tree.\"},\"returns\":{\"ID\":\"The drawn ID. `O(k * log_k(n))` where `k` is the maximum number of childs per node in the tree, and `n` is the maximum number of nodes ever appended.\"}},\"queryLeafs(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,uint256,uint256)\":{\"details\":\"Query the leaves of a tree. Note that if `startIndex == 0`, the tree is empty and the root node will be returned.\",\"params\":{\"_count\":\"The number of items to return.\",\"_cursor\":\"The pagination cursor.\",\"_key\":\"The key of the tree to get the leaves from.\"},\"returns\":{\"hasMore\":\"Whether there are more for pagination. `O(n)` where `n` is the maximum number of nodes ever appended.\",\"startIndex\":\"The index at which leaves start.\",\"values\":\"The values of the returned leaves.\"}},\"set(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,uint256,bytes32)\":{\"details\":\"Set a value of a tree.\",\"params\":{\"_ID\":\"The ID of the value. `O(log_k(n))` where `k` is the maximum number of childs per node in the tree, and `n` is the maximum number of nodes ever appended.\",\"_key\":\"The key of the tree.\",\"_value\":\"The new value.\"}},\"stakeOf(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,bytes32)\":{\"details\":\"Gets a specified ID's associated value.\",\"params\":{\"_ID\":\"The ID of the value.\",\"_key\":\"The key of the tree.\"},\"returns\":{\"value\":\"The associated value.\"}}},\"title\":\"SortitionSumTreeFactory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/libraries/SortitionSumTreeFactory.sol\":\"SortitionSumTreeFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/libraries/SortitionSumTreeFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@epiqueras, @unknownunknown1]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity ^0.8;\\n\\n/**\\n * @title SortitionSumTreeFactory\\n * @author Enrique Piqueras - \\n * @dev A factory of trees that keep track of staked values for sortition.\\n */\\nlibrary SortitionSumTreeFactory {\\n /* Structs */\\n\\n struct SortitionSumTree {\\n uint K; // The maximum number of childs per node.\\n // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around.\\n uint[] stack;\\n uint[] nodes;\\n // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node.\\n mapping(bytes32 => uint) IDsToNodeIndexes;\\n mapping(uint => bytes32) nodeIndexesToIDs;\\n }\\n\\n /* Storage */\\n\\n struct SortitionSumTrees {\\n mapping(bytes32 => SortitionSumTree) sortitionSumTrees;\\n }\\n\\n /* Public */\\n\\n /**\\n * @dev Create a sortition sum tree at the specified key.\\n * @param _key The key of the new tree.\\n * @param _K The number of children each node in the tree should have.\\n */\\n function createTree(SortitionSumTrees storage self, bytes32 _key, uint _K) public {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n require(tree.K == 0, \\\"Tree already exists.\\\");\\n require(_K > 1, \\\"K must be greater than one.\\\");\\n tree.K = _K;\\n tree.nodes.push(0);\\n }\\n\\n /**\\n * @dev Set a value of a tree.\\n * @param _key The key of the tree.\\n * @param _value The new value.\\n * @param _ID The ID of the value.\\n * `O(log_k(n))` where\\n * `k` is the maximum number of childs per node in the tree,\\n * and `n` is the maximum number of nodes ever appended.\\n */\\n function set(SortitionSumTrees storage self, bytes32 _key, uint _value, bytes32 _ID) public {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n uint treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n if (treeIndex == 0) {\\n // No existing node.\\n if (_value != 0) {\\n // Non zero value.\\n // Append.\\n // Add node.\\n if (tree.stack.length == 0) {\\n // No vacant spots.\\n // Get the index and append the value.\\n treeIndex = tree.nodes.length;\\n tree.nodes.push(_value);\\n\\n // Potentially append a new node and make the parent a sum node.\\n if (treeIndex != 1 && (treeIndex - 1) % tree.K == 0) {\\n // Is first child.\\n uint parentIndex = treeIndex / tree.K;\\n bytes32 parentID = tree.nodeIndexesToIDs[parentIndex];\\n uint newIndex = treeIndex + 1;\\n tree.nodes.push(tree.nodes[parentIndex]);\\n delete tree.nodeIndexesToIDs[parentIndex];\\n tree.IDsToNodeIndexes[parentID] = newIndex;\\n tree.nodeIndexesToIDs[newIndex] = parentID;\\n }\\n } else {\\n // Some vacant spot.\\n // Pop the stack and append the value.\\n treeIndex = tree.stack[tree.stack.length - 1];\\n tree.stack.pop();\\n tree.nodes[treeIndex] = _value;\\n }\\n\\n // Add label.\\n tree.IDsToNodeIndexes[_ID] = treeIndex;\\n tree.nodeIndexesToIDs[treeIndex] = _ID;\\n\\n updateParents(self, _key, treeIndex, true, _value);\\n }\\n } else {\\n // Existing node.\\n if (_value == 0) {\\n // Zero value.\\n // Remove.\\n // Remember value and set to 0.\\n uint value = tree.nodes[treeIndex];\\n tree.nodes[treeIndex] = 0;\\n\\n // Push to stack.\\n tree.stack.push(treeIndex);\\n\\n // Clear label.\\n delete tree.IDsToNodeIndexes[_ID];\\n delete tree.nodeIndexesToIDs[treeIndex];\\n\\n updateParents(self, _key, treeIndex, false, value);\\n } else if (_value != tree.nodes[treeIndex]) {\\n // New, non zero value.\\n // Set.\\n bool plusOrMinus = tree.nodes[treeIndex] <= _value;\\n uint plusOrMinusValue = plusOrMinus ? _value - tree.nodes[treeIndex] : tree.nodes[treeIndex] - _value;\\n tree.nodes[treeIndex] = _value;\\n\\n updateParents(self, _key, treeIndex, plusOrMinus, plusOrMinusValue);\\n }\\n }\\n }\\n\\n /* Public Views */\\n\\n /**\\n * @dev Query the leaves of a tree. Note that if `startIndex == 0`, the tree is empty and the root node will be returned.\\n * @param _key The key of the tree to get the leaves from.\\n * @param _cursor The pagination cursor.\\n * @param _count The number of items to return.\\n * @return startIndex The index at which leaves start.\\n * @return values The values of the returned leaves.\\n * @return hasMore Whether there are more for pagination.\\n * `O(n)` where\\n * `n` is the maximum number of nodes ever appended.\\n */\\n function queryLeafs(\\n SortitionSumTrees storage self,\\n bytes32 _key,\\n uint _cursor,\\n uint _count\\n ) public view returns (uint startIndex, uint[] memory values, bool hasMore) {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n\\n // Find the start index.\\n for (uint i = 0; i < tree.nodes.length; i++) {\\n if ((tree.K * i) + 1 >= tree.nodes.length) {\\n startIndex = i;\\n break;\\n }\\n }\\n\\n // Get the values.\\n uint loopStartIndex = startIndex + _cursor;\\n values = new uint[](loopStartIndex + _count > tree.nodes.length ? tree.nodes.length - loopStartIndex : _count);\\n uint valuesIndex = 0;\\n for (uint j = loopStartIndex; j < tree.nodes.length; j++) {\\n if (valuesIndex < _count) {\\n values[valuesIndex] = tree.nodes[j];\\n valuesIndex++;\\n } else {\\n hasMore = true;\\n break;\\n }\\n }\\n }\\n\\n /**\\n * @dev Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.\\n * @param _key The key of the tree.\\n * @param _drawnNumber The drawn number.\\n * @return ID The drawn ID.\\n * `O(k * log_k(n))` where\\n * `k` is the maximum number of childs per node in the tree,\\n * and `n` is the maximum number of nodes ever appended.\\n */\\n function draw(SortitionSumTrees storage self, bytes32 _key, uint _drawnNumber) public view returns (bytes32 ID) {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n uint treeIndex = 0;\\n uint currentDrawnNumber = _drawnNumber % tree.nodes[0];\\n\\n while (\\n (tree.K * treeIndex) + 1 < tree.nodes.length // While it still has children.\\n )\\n for (uint i = 1; i <= tree.K; i++) {\\n // Loop over children.\\n uint nodeIndex = (tree.K * treeIndex) + i;\\n uint nodeValue = tree.nodes[nodeIndex];\\n\\n if (currentDrawnNumber >= nodeValue)\\n currentDrawnNumber -= nodeValue; // Go to the next child.\\n else {\\n // Pick this child.\\n treeIndex = nodeIndex;\\n break;\\n }\\n }\\n\\n ID = tree.nodeIndexesToIDs[treeIndex];\\n }\\n\\n /** @dev Gets a specified ID's associated value.\\n * @param _key The key of the tree.\\n * @param _ID The ID of the value.\\n * @return value The associated value.\\n */\\n function stakeOf(SortitionSumTrees storage self, bytes32 _key, bytes32 _ID) public view returns (uint value) {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n uint treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n if (treeIndex == 0) value = 0;\\n else value = tree.nodes[treeIndex];\\n }\\n\\n /* Private */\\n\\n /**\\n * @dev Update all the parents of a node.\\n * @param _key The key of the tree to update.\\n * @param _treeIndex The index of the node to start from.\\n * @param _plusOrMinus Wether to add (true) or substract (false).\\n * @param _value The value to add or substract.\\n * `O(log_k(n))` where\\n * `k` is the maximum number of childs per node in the tree,\\n * and `n` is the maximum number of nodes ever appended.\\n */\\n function updateParents(\\n SortitionSumTrees storage self,\\n bytes32 _key,\\n uint _treeIndex,\\n bool _plusOrMinus,\\n uint _value\\n ) private {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n\\n uint parentIndex = _treeIndex;\\n while (parentIndex != 0) {\\n parentIndex = (parentIndex - 1) / tree.K;\\n tree.nodes[parentIndex] = _plusOrMinus\\n ? tree.nodes[parentIndex] + _value\\n : tree.nodes[parentIndex] - _value;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x053af9495cb8382dfc1e1503d8f3dab3d356d664efdbdf534f146ab8f3834e95\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x610a8c61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c80632e25c38a1461006657806365b81f4f146100885780637521ccb1146100b357806388c1d467146100d45780639075789e146100e7575b600080fd5b81801561007257600080fd5b506100866100813660046108a0565b610107565b005b61009b6100963660046108a0565b610455565b6040516100aa939291906108d2565b60405180910390f35b6100c66100c136600461092b565b6105c0565b6040519081526020016100aa565b6100c66100e236600461092b565b610616565b8180156100f357600080fd5b5061008661010236600461092b565b61071c565b6000838152602085815260408083208484526003810190925290912054806102cd5783156102c857600182015461021a5750600281018054600180820183556000928352602090922081018590559081148015906101795750815461016d60018361096d565b610177919061099a565b155b1561021557815460009061018d90836109ae565b60008181526004850160205260408120549192506101ac8460016109c2565b9050846002018560020184815481106101c7576101c76109da565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b610295565b60018083018054909161022c9161096d565b8154811061023c5761023c6109da565b906000526020600020015490508160010180548061025c5761025c6109f0565b6001900381819060005260206000200160009055905583826002018281548110610288576102886109da565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556102c88686836001886107e2565b61044d565b8361036a5760008260020182815481106102e9576102e96109da565b90600052602060002001549050600083600201838154811061030d5761030d6109da565b600091825260208083209091019290925560018086018054918201815582528282200184905585815260038501825260408082208290558482526004860190925290812081905561036490889088908590856107e2565b5061044d565b81600201818154811061037f5761037f6109da565b9060005260206000200154841461044d576000848360020183815481106103a8576103a86109da565b9060005260206000200154111590506000816103ee57858460020184815481106103d4576103d46109da565b90600052602060002001546103e9919061096d565b610419565b836002018381548110610403576104036109da565b906000526020600020015486610419919061096d565b905085846002018481548110610431576104316109da565b60009182526020909120015561044a88888585856107e2565b50505b505050505050565b60008381526020859052604081206060908290815b60028201548110156104b25760028201548254610488908390610a06565b6104939060016109c2565b106104a0578094506104b2565b806104aa81610a25565b91505061046a565b5060006104bf87866109c2565b60028301549091506104d187836109c2565b116104dc57856104ec565b60028201546104ec90829061096d565b67ffffffffffffffff81111561050457610504610a40565b60405190808252806020026020018201604052801561052d578160200160208202803683370190505b5093506000815b60028401548110156105b257878210156105975783600201818154811061055d5761055d6109da565b906000526020600020015486838151811061057a5761057a6109da565b60209081029190910101528161058f81610a25565b9250506105a0565b600194506105b2565b806105aa81610a25565b915050610534565b505050509450945094915050565b60008281526020848152604080832084845260038101909252822054806105ea576000925061060d565b8160020181815481106105ff576105ff6109da565b906000526020600020015492505b50509392505050565b600082815260208490526040812060028101805483918291829061063c5761063c6109da565b906000526020600020015485610652919061099a565b90505b60028301548354610667908490610a06565b6106729060016109c2565b10156107015760015b835481116106fb576000818486600001546106969190610a06565b6106a091906109c2565b905060008560020182815481106106b9576106b96109da565b906000526020600020015490508084106106de576106d7818561096d565b93506106e6565b5092506106fb565b505080806106f390610a25565b91505061067b565b50610655565b50600090815260049091016020526040902054949350505050565b60008281526020849052604090208054156107755760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064015b60405180910390fd5b600182116107c55760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e0000000000604482015260640161076c565b908155600201805460018101825560009182526020822001555050565b6000848152602086905260409020835b801561089757815461080560018361096d565b61080f91906109ae565b905083610846578282600201828154811061082c5761082c6109da565b9060005260206000200154610841919061096d565b610871565b8282600201828154811061085c5761085c6109da565b906000526020600020015461087191906109c2565b826002018281548110610886576108866109da565b6000918252602090912001556107f2565b50505050505050565b600080600080608085870312156108b657600080fd5b5050823594602084013594506040840135936060013592509050565b6000606082018583526020606081850152818651808452608086019150828801935060005b81811015610913578451835293830193918301916001016108f7565b50508093505050508215156040830152949350505050565b60008060006060848603121561094057600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561097f5761097f610957565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826109a9576109a9610984565b500690565b6000826109bd576109bd610984565b500490565b600082198211156109d5576109d5610957565b500190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615610a2057610a20610957565b500290565b6000600019821415610a3957610a39610957565b5060010190565b634e487b7160e01b600052604160045260246000fdfea2646970667358221220ed612533fe19900f6f7bcb3715e15197fada76852ddc384bf142ca0012dbbcf664736f6c63430008090033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c80632e25c38a1461006657806365b81f4f146100885780637521ccb1146100b357806388c1d467146100d45780639075789e146100e7575b600080fd5b81801561007257600080fd5b506100866100813660046108a0565b610107565b005b61009b6100963660046108a0565b610455565b6040516100aa939291906108d2565b60405180910390f35b6100c66100c136600461092b565b6105c0565b6040519081526020016100aa565b6100c66100e236600461092b565b610616565b8180156100f357600080fd5b5061008661010236600461092b565b61071c565b6000838152602085815260408083208484526003810190925290912054806102cd5783156102c857600182015461021a5750600281018054600180820183556000928352602090922081018590559081148015906101795750815461016d60018361096d565b610177919061099a565b155b1561021557815460009061018d90836109ae565b60008181526004850160205260408120549192506101ac8460016109c2565b9050846002018560020184815481106101c7576101c76109da565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b610295565b60018083018054909161022c9161096d565b8154811061023c5761023c6109da565b906000526020600020015490508160010180548061025c5761025c6109f0565b6001900381819060005260206000200160009055905583826002018281548110610288576102886109da565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556102c88686836001886107e2565b61044d565b8361036a5760008260020182815481106102e9576102e96109da565b90600052602060002001549050600083600201838154811061030d5761030d6109da565b600091825260208083209091019290925560018086018054918201815582528282200184905585815260038501825260408082208290558482526004860190925290812081905561036490889088908590856107e2565b5061044d565b81600201818154811061037f5761037f6109da565b9060005260206000200154841461044d576000848360020183815481106103a8576103a86109da565b9060005260206000200154111590506000816103ee57858460020184815481106103d4576103d46109da565b90600052602060002001546103e9919061096d565b610419565b836002018381548110610403576104036109da565b906000526020600020015486610419919061096d565b905085846002018481548110610431576104316109da565b60009182526020909120015561044a88888585856107e2565b50505b505050505050565b60008381526020859052604081206060908290815b60028201548110156104b25760028201548254610488908390610a06565b6104939060016109c2565b106104a0578094506104b2565b806104aa81610a25565b91505061046a565b5060006104bf87866109c2565b60028301549091506104d187836109c2565b116104dc57856104ec565b60028201546104ec90829061096d565b67ffffffffffffffff81111561050457610504610a40565b60405190808252806020026020018201604052801561052d578160200160208202803683370190505b5093506000815b60028401548110156105b257878210156105975783600201818154811061055d5761055d6109da565b906000526020600020015486838151811061057a5761057a6109da565b60209081029190910101528161058f81610a25565b9250506105a0565b600194506105b2565b806105aa81610a25565b915050610534565b505050509450945094915050565b60008281526020848152604080832084845260038101909252822054806105ea576000925061060d565b8160020181815481106105ff576105ff6109da565b906000526020600020015492505b50509392505050565b600082815260208490526040812060028101805483918291829061063c5761063c6109da565b906000526020600020015485610652919061099a565b90505b60028301548354610667908490610a06565b6106729060016109c2565b10156107015760015b835481116106fb576000818486600001546106969190610a06565b6106a091906109c2565b905060008560020182815481106106b9576106b96109da565b906000526020600020015490508084106106de576106d7818561096d565b93506106e6565b5092506106fb565b505080806106f390610a25565b91505061067b565b50610655565b50600090815260049091016020526040902054949350505050565b60008281526020849052604090208054156107755760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064015b60405180910390fd5b600182116107c55760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e0000000000604482015260640161076c565b908155600201805460018101825560009182526020822001555050565b6000848152602086905260409020835b801561089757815461080560018361096d565b61080f91906109ae565b905083610846578282600201828154811061082c5761082c6109da565b9060005260206000200154610841919061096d565b610871565b8282600201828154811061085c5761085c6109da565b906000526020600020015461087191906109c2565b826002018281548110610886576108866109da565b6000918252602090912001556107f2565b50505050505050565b600080600080608085870312156108b657600080fd5b5050823594602084013594506040840135936060013592509050565b6000606082018583526020606081850152818651808452608086019150828801935060005b81811015610913578451835293830193918301916001016108f7565b50508093505050508215156040830152949350505050565b60008060006060848603121561094057600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561097f5761097f610957565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826109a9576109a9610984565b500690565b6000826109bd576109bd610984565b500490565b600082198211156109d5576109d5610957565b500190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615610a2057610a20610957565b500290565b6000600019821415610a3957610a39610957565b5060010190565b634e487b7160e01b600052604160045260246000fdfea2646970667358221220ed612533fe19900f6f7bcb3715e15197fada76852ddc384bf142ca0012dbbcf664736f6c63430008090033", - "devdoc": { - "author": "Enrique Piqueras - ", - "details": "A factory of trees that keep track of staked values for sortition.", - "kind": "dev", - "methods": { - "createTree(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,uint256)": { - "details": "Create a sortition sum tree at the specified key.", - "params": { - "_K": "The number of children each node in the tree should have.", - "_key": "The key of the new tree." - } - }, - "draw(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,uint256)": { - "details": "Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.", - "params": { - "_drawnNumber": "The drawn number.", - "_key": "The key of the tree." - }, - "returns": { - "ID": "The drawn ID. `O(k * log_k(n))` where `k` is the maximum number of childs per node in the tree, and `n` is the maximum number of nodes ever appended." - } - }, - "queryLeafs(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,uint256,uint256)": { - "details": "Query the leaves of a tree. Note that if `startIndex == 0`, the tree is empty and the root node will be returned.", - "params": { - "_count": "The number of items to return.", - "_cursor": "The pagination cursor.", - "_key": "The key of the tree to get the leaves from." - }, - "returns": { - "hasMore": "Whether there are more for pagination. `O(n)` where `n` is the maximum number of nodes ever appended.", - "startIndex": "The index at which leaves start.", - "values": "The values of the returned leaves." - } - }, - "set(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,uint256,bytes32)": { - "details": "Set a value of a tree.", - "params": { - "_ID": "The ID of the value. `O(log_k(n))` where `k` is the maximum number of childs per node in the tree, and `n` is the maximum number of nodes ever appended.", - "_key": "The key of the tree.", - "_value": "The new value." - } - }, - "stakeOf(SortitionSumTreeFactory.SortitionSumTrees storage,bytes32,bytes32)": { - "details": "Gets a specified ID's associated value.", - "params": { - "_ID": "The ID of the value.", - "_key": "The key of the tree." - }, - "returns": { - "value": "The associated value." - } - } - }, - "title": "SortitionSumTreeFactory", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/chiado/TokenBridge.json b/contracts/deployments/chiado/TokenBridge.json deleted file mode 100644 index b948fcc54..000000000 --- a/contracts/deployments/chiado/TokenBridge.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "address": "0xbb3c86f9918C3C1d83668fA84e79E876d147fFf2", - "abi": [] -} diff --git a/contracts/deployments/chiado/WETH.json b/contracts/deployments/chiado/WETH.json deleted file mode 100644 index 23a52d4df..000000000 --- a/contracts/deployments/chiado/WETH.json +++ /dev/null @@ -1,444 +0,0 @@ -{ - "address": "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ], - "transactionHash": "0x57090c7c0edd4f488d92d65d10d04f803f1d2658828607b339ab8f6cd676f7bd", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8", - "transactionIndex": 0, - "gasUsed": "616183", - "logsBloom": "0x00000000000000000000000000000000000000000000100000000000000000000000000200000000010000000000000001000000000000000000000000000000000000000000000000000008000040000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0b5d4a38d69dfb9c7f93cfb222f9ebfcca7355d9a5997f865a92d0fd8318ac5a", - "transactionHash": "0x57090c7c0edd4f488d92d65d10d04f803f1d2658828607b339ab8f6cd676f7bd", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 4423420, - "transactionHash": "0x57090c7c0edd4f488d92d65d10d04f803f1d2658828607b339ab8f6cd676f7bd", - "address": "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f50e77f2a2b6138d16c6c7511562e5c33c4b15a3" - ], - "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", - "logIndex": 0, - "blockHash": "0x0b5d4a38d69dfb9c7f93cfb222f9ebfcca7355d9a5997f865a92d0fd8318ac5a" - } - ], - "blockNumber": 4423420, - "cumulativeGasUsed": "616183", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 3, - "solcInputHash": "36e3015201aa6368fd28e007dfb67b68", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"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\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/WETH.sol\":\"WETH\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"src/token/WETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract WETH is ERC20 {\\n constructor() ERC20(\\\"Wrapped ETH\\\", \\\"WETH\\\") {\\n _mint(msg.sender, 1000000 ether);\\n }\\n}\\n\",\"keccak256\":\"0xee41099235b80965c307cddbe273692a3e5317ee44c7cbdeaeab22e68b55d24b\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040518060400160405280600b81526020016a0aee4c2e0e0cac8408aa8960ab1b815250604051806040016040528060048152602001630ae8aa8960e31b815250816003908162000064919062000207565b50600462000073828262000207565b505050620000923369d3c21bcecceda10000006200009860201b60201c565b620002fb565b6001600160a01b038216620000f35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620001079190620002d3565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200018e57607f821691505b602082108103620001af57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200015e57600081815260208120601f850160051c81016020861015620001de5750805b601f850160051c820191505b81811015620001ff57828155600101620001ea565b505050505050565b81516001600160401b0381111562000223576200022362000163565b6200023b8162000234845462000179565b84620001b5565b602080601f8311600181146200027357600084156200025a5750858301515b600019600386901b1c1916600185901b178555620001ff565b600085815260208120601f198616915b82811015620002a45788860151825594840194600190910190840162000283565b5085821015620002c35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620002f557634e487b7160e01b600052601160045260246000fd5b92915050565b610852806200030b6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea2646970667358221220e1d527c750571d35e5d16511e833b7b399408fe6b53314379368c49007623f1e64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea2646970667358221220e1d527c750571d35e5d16511e833b7b399408fe6b53314379368c49007623f1e64736f6c63430008120033", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 197, - "contract": "src/token/WETH.sol:WETH", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 203, - "contract": "src/token/WETH.sol:WETH", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 205, - "contract": "src/token/WETH.sol:WETH", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 207, - "contract": "src/token/WETH.sol:WETH", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 209, - "contract": "src/token/WETH.sol:WETH", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiado/WETHFaucet.json b/contracts/deployments/chiado/WETHFaucet.json deleted file mode 100644 index 8cf43683b..000000000 --- a/contracts/deployments/chiado/WETHFaucet.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "address": "0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x9a86ee614df7494319cd67b7c2140646d053530aff41dd8c45444f6624d41fc5", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F", - "transactionIndex": 0, - "gasUsed": "253721", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xf99610b5a422ae735fcd92fdaf1dc89b4655f9d7a4569a570a18c4404ab08c30", - "transactionHash": "0x9a86ee614df7494319cd67b7c2140646d053530aff41dd8c45444f6624d41fc5", - "logs": [], - "blockNumber": 4423421, - "cumulativeGasUsed": "253721", - "status": 1, - "byzantium": true - }, - "args": [ - "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8" - ], - "numDeployments": 3, - "solcInputHash": "36e3015201aa6368fd28e007dfb67b68", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n IERC20 public token;\\n mapping(address => bool) public withdrewAlready;\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n }\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, 10000 ether);\\n withdrewAlready[msg.sender] = true;\\n }\\n}\\n\",\"keccak256\":\"0xac876a15a73b0ab2161f4e42850028fbc6db4a899f83052c0d4f97050b2d1650\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516103c23803806103c283398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b61032f806100936000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063338cdca114610051578063b69ef8a81461005b578063d61c40dc14610076578063fc0c546a146100a9575b600080fd5b6100596100d4565b005b61006361021c565b6040519081526020015b60405180910390f35b61009961008436600461028e565b60016020526000908152604090205460ff1681565b604051901515815260200161006d565b6000546100bc906001600160a01b031681565b6040516001600160a01b03909116815260200161006d565b3360009081526001602052604090205460ff161561017e5760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a40160405180910390fd5b60005460405163a9059cbb60e01b815233600482015269021e19e0c9bab240000060248201526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156101d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fc91906102be565b50336000908152600160208190526040909120805460ff19169091179055565b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610265573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028991906102e0565b905090565b6000602082840312156102a057600080fd5b81356001600160a01b03811681146102b757600080fd5b9392505050565b6000602082840312156102d057600080fd5b815180151581146102b757600080fd5b6000602082840312156102f257600080fd5b505191905056fea2646970667358221220885a998acda2ccef49efd5707e9579a53bbed80122cfef4ce320a92f34aba57664736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063338cdca114610051578063b69ef8a81461005b578063d61c40dc14610076578063fc0c546a146100a9575b600080fd5b6100596100d4565b005b61006361021c565b6040519081526020015b60405180910390f35b61009961008436600461028e565b60016020526000908152604090205460ff1681565b604051901515815260200161006d565b6000546100bc906001600160a01b031681565b6040516001600160a01b03909116815260200161006d565b3360009081526001602052604090205460ff161561017e5760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a40160405180910390fd5b60005460405163a9059cbb60e01b815233600482015269021e19e0c9bab240000060248201526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156101d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fc91906102be565b50336000908152600160208190526040909120805460ff19169091179055565b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610265573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028991906102e0565b905090565b6000602082840312156102a057600080fd5b81356001600160a01b03811681146102b757600080fd5b9392505050565b6000602082840312156102d057600080fd5b815180151581146102b757600080fd5b6000602082840312156102f257600080fd5b505191905056fea2646970667358221220885a998acda2ccef49efd5707e9579a53bbed80122cfef4ce320a92f34aba57664736f6c63430008120033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 14749, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)846" - }, - { - "astId": 14753, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)846": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - } - } - } -} diff --git a/contracts/deployments/chiado/WPNKFaucet.json b/contracts/deployments/chiado/WPNKFaucet.json deleted file mode 100644 index f8b4d15be..000000000 --- a/contracts/deployments/chiado/WPNKFaucet.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "address": "0x5898aeE045A25B276369914c3448B72a41758B2c", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xb35cd25025514f4ceea9f6794c1d39aa7b864712e7e12894835e1f0339ff4b19", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x5898aeE045A25B276369914c3448B72a41758B2c", - "transactionIndex": 0, - "gasUsed": "260119", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2a5bf0e51e6ef3b5d65aa0b72477796eef03ac7702a74c66d64e8d6ff56df53f", - "transactionHash": "0xb35cd25025514f4ceea9f6794c1d39aa7b864712e7e12894835e1f0339ff4b19", - "logs": [], - "blockNumber": 2322229, - "cumulativeGasUsed": "260119", - "status": 1, - "byzantium": true - }, - "args": [ - "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd" - ], - "numDeployments": 2, - "solcInputHash": "619e4fd2e5ff33514c8e0080269dcddd", - "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n IERC20 public token;\\n mapping(address => bool) public withdrewAlready;\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n }\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, 10000 ether);\\n withdrewAlready[msg.sender] = true;\\n }\\n}\\n\",\"keccak256\":\"0x96dfe825cf0342eeff4380ac3632e50fed75eb083ff9b5133ab1575ed38dc333\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516103e03803806103e083398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b61034d806100936000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063338cdca114610051578063b69ef8a81461005b578063d61c40dc14610076578063fc0c546a146100a9575b600080fd5b6100596100d4565b005b61006361022b565b6040519081526020015b60405180910390f35b6100996100843660046102ac565b60016020526000908152604090205460ff1681565b604051901515815260200161006d565b6000546100bc906001600160a01b031681565b6040516001600160a01b03909116815260200161006d565b3360009081526001602052604090205460ff161561017e5760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a40160405180910390fd5b60005460405163a9059cbb60e01b815233600482015269021e19e0c9bab240000060248201526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b1580156101d357600080fd5b505af11580156101e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020b91906102dc565b50336000908152600160208190526040909120805460ff19169091179055565b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561026f57600080fd5b505afa158015610283573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a791906102fe565b905090565b6000602082840312156102be57600080fd5b81356001600160a01b03811681146102d557600080fd5b9392505050565b6000602082840312156102ee57600080fd5b815180151581146102d557600080fd5b60006020828403121561031057600080fd5b505191905056fea26469706673582212205834b9da8d3e30c6124c75f3a860d0d45dd1a253a98d2f15c37030d47e91889a64736f6c63430008090033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063338cdca114610051578063b69ef8a81461005b578063d61c40dc14610076578063fc0c546a146100a9575b600080fd5b6100596100d4565b005b61006361022b565b6040519081526020015b60405180910390f35b6100996100843660046102ac565b60016020526000908152604090205460ff1681565b604051901515815260200161006d565b6000546100bc906001600160a01b031681565b6040516001600160a01b03909116815260200161006d565b3360009081526001602052604090205460ff161561017e5760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a40160405180910390fd5b60005460405163a9059cbb60e01b815233600482015269021e19e0c9bab240000060248201526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b1580156101d357600080fd5b505af11580156101e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020b91906102dc565b50336000908152600160208190526040909120805460ff19169091179055565b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561026f57600080fd5b505afa158015610283573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a791906102fe565b905090565b6000602082840312156102be57600080fd5b81356001600160a01b03811681146102d557600080fd5b9392505050565b6000602082840312156102ee57600080fd5b815180151581146102d557600080fd5b60006020828403121561031057600080fd5b505191905056fea26469706673582212205834b9da8d3e30c6124c75f3a860d0d45dd1a253a98d2f15c37030d47e91889a64736f6c63430008090033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 26232, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)1072" - }, - { - "astId": 26236, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)1072": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - } - } - } -} diff --git a/contracts/deployments/chiado/WrappedPinakionV2.json b/contracts/deployments/chiado/WrappedPinakionV2.json deleted file mode 100644 index a12bae532..000000000 --- a/contracts/deployments/chiado/WrappedPinakionV2.json +++ /dev/null @@ -1,436 +0,0 @@ -{ - "address": "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ], - "transactionHash": "0xfa9fed8954035128e3a75c493d5ac33cc2bffa9e191a9ece16f9a2757cb2bab8", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd", - "transactionIndex": 1, - "gasUsed": "616199", - "logsBloom": "0x0000000000000000000000000000000000000000000000000000000000000000000000020000000001000200000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000400000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa2364345d35827c8c0c8c469b6ae0824e3ab838dcc0e0dbaabf3450754b49992", - "transactionHash": "0xfa9fed8954035128e3a75c493d5ac33cc2bffa9e191a9ece16f9a2757cb2bab8", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 2322228, - "transactionHash": "0xfa9fed8954035128e3a75c493d5ac33cc2bffa9e191a9ece16f9a2757cb2bab8", - "address": "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f50e77f2a2b6138d16c6c7511562e5c33c4b15a3" - ], - "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", - "logIndex": 1, - "blockHash": "0xa2364345d35827c8c0c8c469b6ae0824e3ab838dcc0e0dbaabf3450754b49992" - } - ], - "blockNumber": 2322228, - "cumulativeGasUsed": "4491861", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "619e4fd2e5ff33514c8e0080269dcddd", - "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/WrappedPinakionV2.sol\":\"WrappedPinakionV2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x4ffc0547c02ad22925310c585c0f166f8759e2648a09e9b489100c42f15dd98d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"src/token/WrappedPinakionV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract WrappedPinakionV2 is ERC20 {\\n constructor() ERC20(\\\"Staking PNK on xDai\\\", \\\"stPNK\\\") {\\n _mint(msg.sender, 1000000 ether);\\n }\\n}\\n\",\"keccak256\":\"0xc0648090b2add69db6ae19830b9c1a589af0fa059fada8ffb6ccdeed90e84c02\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604080518082018252601381527f5374616b696e6720504e4b206f6e2078446169000000000000000000000000006020808301918252835180850190945260058452647374504e4b60d81b9084015281519192916100719160039161016a565b50805161008590600490602084019061016a565b5050506100a23369d3c21bcecceda10000006100a760201b60201c565b610264565b6001600160a01b0382166101015760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b80600260008282546101139190610203565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b82805461017690610229565b90600052602060002090601f01602090048101928261019857600085556101de565b82601f106101b157805160ff19168380011785556101de565b828001600101855582156101de579182015b828111156101de5782518255916020019190600101906101c3565b506101ea9291506101ee565b5090565b5b808211156101ea57600081556001016101ef565b6000821982111561022457634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168061023d57607f821691505b6020821081141561025e57634e487b7160e01b600052602260045260246000fd5b50919050565b61085d806102736000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610801565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b602082108114156107fb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082257634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220f3e2c60c1f5db76a5e828c52754fa6038e65d3519bf5c40755c1db138d61812264736f6c63430008090033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610801565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b602082108114156107fb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082257634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220f3e2c60c1f5db76a5e828c52754fa6038e65d3519bf5c40755c1db138d61812264736f6c63430008090033", - "devdoc": { - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 423, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 429, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 431, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 433, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 435, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiado/xKlerosLiquidV2.json b/contracts/deployments/chiado/xKlerosLiquidV2.json deleted file mode 100644 index f8e6d7f58..000000000 --- a/contracts/deployments/chiado/xKlerosLiquidV2.json +++ /dev/null @@ -1,2402 +0,0 @@ -{ - "address": "0x34E520dc1d2Db660113b64724e14CEdCD01Ee879", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrable", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_appeal", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum xKlerosLiquidV2.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum xKlerosLiquidV2.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrable", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_subcourtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "_stake", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_newTotalStake", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_tokenAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_ETHAmount", - "type": "int256" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "inputs": [], - "name": "ALPHA_DIVISOR", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_STAKE_PATHS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_JURORS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NON_PAYABLE_AMOUNT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RN", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RNBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RNGenerator", - "outputs": [ - { - "internalType": "contract IRandomAuRa", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IForeignGateway", - "name": "_foreignGateway", - "type": "address" - } - ], - "name": "changeForeignGateway", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - } - ], - "name": "changeMaxDrawingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - } - ], - "name": "changeMinStakingTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract WrappedPinakion", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IRandomAuRa", - "name": "_RNGenerator", - "type": "address" - } - ], - "name": "changeRNGenerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - } - ], - "name": "changeSubcourtAlpha", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - } - ], - "name": "changeSubcourtJurorFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - } - ], - "name": "changeSubcourtJurorsForJump", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - } - ], - "name": "changeSubcourtMinStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeSubcourtTimesPerPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_weth", - "type": "address" - } - ], - "name": "changeWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "uint256", - "name": "_sortitionSumTreeK", - "type": "uint256" - } - ], - "name": "createSubcourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "delayedSetStakes", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "subcourtID", - "type": "uint96" - }, - { - "internalType": "uint128", - "name": "stake", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "subcourtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrable", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "uint256", - "name": "numberOfChoices", - "type": "uint256" - }, - { - "internalType": "enum xKlerosLiquidV2.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "drawsInRound", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "commitsInRound", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputesRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "disputesWithoutJurors", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "executeDelayedSetStakes", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "foreignGateway", - "outputs": [ - { - "internalType": "contract IForeignGateway", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getDispute", - "outputs": [ - { - "internalType": "uint256[]", - "name": "votesLengths", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "tokensAtStakePerJuror", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "totalFeesForJurors", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "votesInEachRound", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "repartitionsInEachRound", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "penaltiesInEachRound", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "getJuror", - "outputs": [ - { - "internalType": "uint96[]", - "name": "subcourtIDs", - "type": "uint96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - } - ], - "name": "getSubcourt", - "outputs": [ - { - "internalType": "uint256[]", - "name": "children", - "type": "uint256[]" - }, - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_appeal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "getVote", - "outputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "commit", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "choice", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "voted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_appeal", - "type": "uint256" - } - ], - "name": "getVoteCounter", - "outputs": [ - { - "internalType": "uint256", - "name": "winningChoice", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "counts", - "type": "uint256[]" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract WrappedPinakion", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "contract IRandomAuRa", - "name": "_RNGenerator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_minStakingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxDrawingTime", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "uint256", - "name": "_sortitionSumTreeK", - "type": "uint256" - }, - { - "internalType": "contract IForeignGateway", - "name": "_foreignGateway", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_weth", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "jurors", - "outputs": [ - { - "internalType": "uint256", - "name": "stakedTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedTokens", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastDelayedSetStake", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPhaseChange", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lockInsolventTransfers", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxDrawingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minStakingTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nextDelayedSetStake", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "internalType": "address", - "name": "_spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "onApprove", - "outputs": [ - { - "internalType": "bool", - "name": "allowed", - "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": "onTransfer", - "outputs": [ - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "phase", - "outputs": [ - { - "internalType": "enum xKlerosLiquidV2.Phase", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract WrappedPinakion", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "proxyPayment", - "outputs": [ - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint128", - "name": "_stake", - "type": "uint128" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - } - ], - "name": "stakeOf", - "outputs": [ - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalDisputes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "weth", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xdb6a244e5101865541ff6d716ed335268c82aa88e3ff47dc219cda97d50b40ef", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x34E520dc1d2Db660113b64724e14CEdCD01Ee879", - "transactionIndex": 1, - "gasUsed": "3055546", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8523df3c3be71b598f308dcb14f0c03e80382deb0f53120672a7a06f437a4335", - "transactionHash": "0xdb6a244e5101865541ff6d716ed335268c82aa88e3ff47dc219cda97d50b40ef", - "logs": [], - "blockNumber": 2309689, - "cumulativeGasUsed": "6902252", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "554a0755634b519652537ffa5fcb4ec8", - "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrable\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_appeal\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum xKlerosLiquidV2.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enum xKlerosLiquidV2.Phase\",\"name\":\"_phase\",\"type\":\"uint8\"}],\"name\":\"NewPhase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrable\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_subcourtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"_stake\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newTotalStake\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_tokenAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_ETHAmount\",\"type\":\"int256\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ALPHA_DIVISOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_STAKE_PATHS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_JURORS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NON_PAYABLE_AMOUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RN\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RNBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RNGenerator\",\"outputs\":[{\"internalType\":\"contract IRandomAuRa\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IForeignGateway\",\"name\":\"_foreignGateway\",\"type\":\"address\"}],\"name\":\"changeForeignGateway\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract WrappedPinakion\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IRandomAuRa\",\"name\":\"_RNGenerator\",\"type\":\"address\"}],\"name\":\"changeRNGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_subcourtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"}],\"name\":\"changeSubcourtAlpha\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_subcourtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"}],\"name\":\"changeSubcourtJurorFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_subcourtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"}],\"name\":\"changeSubcourtJurorsForJump\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_subcourtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"}],\"name\":\"changeSubcourtMinStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_subcourtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeSubcourtTimesPerPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_weth\",\"type\":\"address\"}],\"name\":\"changeWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256\",\"name\":\"_sortitionSumTreeK\",\"type\":\"uint256\"}],\"name\":\"createSubcourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedSetStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"subcourtID\",\"type\":\"uint96\"},{\"internalType\":\"uint128\",\"name\":\"stake\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"subcourtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrable\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"enum xKlerosLiquidV2.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"drawsInRound\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"commitsInRound\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputesRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedSetStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"foreignGateway\",\"outputs\":[{\"internalType\":\"contract IForeignGateway\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getDispute\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"votesLengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"tokensAtStakePerJuror\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"votesInEachRound\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"repartitionsInEachRound\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"penaltiesInEachRound\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getJuror\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"subcourtIDs\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_subcourtID\",\"type\":\"uint96\"}],\"name\":\"getSubcourt\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"children\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_appeal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVote\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_appeal\",\"type\":\"uint256\"}],\"name\":\"getVoteCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"counts\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract WrappedPinakion\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"contract IRandomAuRa\",\"name\":\"_RNGenerator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256\",\"name\":\"_sortitionSumTreeK\",\"type\":\"uint256\"},{\"internalType\":\"contract IForeignGateway\",\"name\":\"_foreignGateway\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_weth\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedTokens\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastDelayedSetStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockInsolventTransfers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextDelayedSetStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"onApprove\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"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\":\"onTransfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum xKlerosLiquidV2.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract WrappedPinakion\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"proxyPayment\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_subcourtID\",\"type\":\"uint96\"},{\"internalType\":\"uint128\",\"name\":\"_stake\",\"type\":\"uint128\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_subcourtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalDisputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This contract is an adaption of Mainnet's KlerosLiquid (https://github.com/kleros/kleros/blob/69cfbfb2128c29f1625b3a99a3183540772fda08/contracts/kleros/KlerosLiquid.sol) for xDai chain. Notice that variables referring to ETH values in this contract, will hold the native token values of the chain on which xKlerosLiquid is deployed. When this contract gets deployed on xDai chain, ETH variables will hold xDai values.\",\"events\":{\"Draw(address,uint256,uint256,uint256)\":{\"details\":\"Emitted when a juror is drawn.\",\"params\":{\"_address\":\"The drawn address.\",\"_appeal\":\"The appeal the draw is for. 0 is for the first round.\",\"_disputeID\":\"The ID of the dispute.\",\"_voteID\":\"The vote ID.\"}},\"NewPeriod(uint256,uint8)\":{\"details\":\"Emitted when a dispute passes to a new period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_period\":\"The new period.\"}},\"NewPhase(uint8)\":{\"details\":\"Emitted when we pass to a new phase.\",\"params\":{\"_phase\":\"The new phase.\"}},\"StakeSet(address,uint256,uint128,uint256)\":{\"details\":\"Emitted when a juror's stake is set.\",\"params\":{\"_address\":\"The address of the juror.\",\"_newTotalStake\":\"The new total stake.\",\"_stake\":\"The new stake.\",\"_subcourtID\":\"The ID of the subcourt at the end of the stake path.\"}},\"TokenAndETHShift(address,uint256,int256,int256)\":{\"details\":\"Emitted when a juror wins or loses tokens and ETH from a dispute.\",\"params\":{\"_ETHAmount\":\"The amount of ETH won or lost.\",\"_address\":\"The juror affected.\",\"_disputeID\":\"The ID of the dispute.\",\"_tokenAmount\":\"The amount of tokens won or lost.\"}}},\"kind\":\"dev\",\"methods\":{\"arbitrationCost(bytes)\":{\"details\":\"Gets the cost of arbitration in a specified subcourt.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes) and the minimum number of jurors required (next 32 bytes).\"},\"returns\":{\"cost\":\"The cost.\"}},\"changeForeignGateway(address)\":{\"details\":\"Changes the `foreignGateway` storage variable.\",\"params\":{\"_foreignGateway\":\"The new value for the `foreignGateway` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeMaxDrawingTime(uint256)\":{\"details\":\"Changes the `maxDrawingTime` storage variable.\",\"params\":{\"_maxDrawingTime\":\"The new value for the `maxDrawingTime` storage variable.\"}},\"changeMinStakingTime(uint256)\":{\"details\":\"Changes the `minStakingTime` storage variable.\",\"params\":{\"_minStakingTime\":\"The new value for the `minStakingTime` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"changeRNGenerator(address)\":{\"details\":\"Changes the `RNGenerator` storage variable.\",\"params\":{\"_RNGenerator\":\"The new value for the `RNGenerator` storage variable.\"}},\"changeSubcourtAlpha(uint96,uint256)\":{\"details\":\"Changes the `alpha` property value of a specified subcourt.\",\"params\":{\"_alpha\":\"The new value for the `alpha` property value.\",\"_subcourtID\":\"The ID of the subcourt.\"}},\"changeSubcourtJurorFee(uint96,uint256)\":{\"details\":\"Changes the `feeForJuror` property value of a specified subcourt.\",\"params\":{\"_feeForJuror\":\"The new value for the `feeForJuror` property value.\",\"_subcourtID\":\"The ID of the subcourt.\"}},\"changeSubcourtJurorsForJump(uint96,uint256)\":{\"details\":\"Changes the `jurorsForCourtJump` property value of a specified subcourt.\",\"params\":{\"_jurorsForCourtJump\":\"The new value for the `jurorsForCourtJump` property value.\",\"_subcourtID\":\"The ID of the subcourt.\"}},\"changeSubcourtMinStake(uint96,uint256)\":{\"details\":\"Changes the `minStake` property value of a specified subcourt. Don't set to a value lower than its parent's `minStake` property value.\",\"params\":{\"_minStake\":\"The new value for the `minStake` property value.\",\"_subcourtID\":\"The ID of the subcourt.\"}},\"changeSubcourtTimesPerPeriod(uint96,uint256[4])\":{\"details\":\"Changes the `timesPerPeriod` property value of a specified subcourt.\",\"params\":{\"_subcourtID\":\"The ID of the subcourt.\",\"_timesPerPeriod\":\"The new value for the `timesPerPeriod` property value.\"}},\"changeWethAddress(address)\":{\"details\":\"Changes the `weth` storage variable.\",\"params\":{\"_weth\":\"The new value for the `weth` storage variable.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Creates a dispute. Must be called by the arbitrable contract.\",\"params\":{\"_extraData\":\"Additional info about the dispute to be created. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes) and the minimum number of jurors required (next 32 bytes).\",\"_numberOfChoices\":\"Number of choices to choose from in the dispute to be created.\"},\"returns\":{\"disputeID\":\"The ID of the created dispute.\"}},\"createSubcourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256)\":{\"details\":\"Creates a subcourt under a specified parent court.\",\"params\":{\"_alpha\":\"The `alpha` property value of the subcourt.\",\"_feeForJuror\":\"The `feeForJuror` property value of the subcourt.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the subcourt.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the subcourt.\",\"_minStake\":\"The `minStake` property value of the subcourt.\",\"_parent\":\"The `parent` property value of the subcourt.\",\"_sortitionSumTreeK\":\"The number of children per node of the subcourt's sortition sum tree.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the subcourt.\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"ruling\":\"The current ruling.\"}},\"executeDelayedSetStakes(uint256)\":{\"details\":\"Executes the next delayed set stakes. `O(n)` where `n` is the number of iterations to run.\",\"params\":{\"_iterations\":\"The number of delayed set stakes to execute.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Lets the governor call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"getDispute(uint256)\":{\"details\":\"Gets a specified dispute's non primitive properties.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"penaltiesInEachRound\":\"The dispute's amount of tokens collected from penalties in each round. `O(a)` where `a` is the number of appeals of the dispute.\",\"repartitionsInEachRound\":\"The dispute's counter of vote reward repartitions made in each round.\",\"tokensAtStakePerJuror\":\"The dispute's required tokens at stake per Juror.\",\"totalFeesForJurors\":\"The dispute's total fees for Jurors.\",\"votesInEachRound\":\"The dispute's counter of votes made in each round.\",\"votesLengths\":\"The dispute's vote length.\"}},\"getJuror(address)\":{\"details\":\"Gets a specified juror's non primitive properties.\",\"params\":{\"_account\":\"The address of the juror.\"},\"returns\":{\"subcourtIDs\":\"The juror's IDs of subcourts where the juror has stake path.\"}},\"getSubcourt(uint96)\":{\"details\":\"Gets a specified subcourt's non primitive properties.\",\"params\":{\"_subcourtID\":\"The ID of the subcourt.\"},\"returns\":{\"children\":\"The subcourt's child court list.\",\"timesPerPeriod\":\"The subcourt's time per period.\"}},\"getVote(uint256,uint256,uint256)\":{\"details\":\"Gets a specified vote for a specified appeal in a specified dispute.\",\"params\":{\"_appeal\":\"The appeal.\",\"_disputeID\":\"The ID of the dispute.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The account for vote.\",\"choice\":\" The choice for vote.\",\"commit\":\" The commit for vote.\",\"voted\":\"True if the account voted, False otherwise.\"}},\"getVoteCounter(uint256,uint256)\":{\"details\":\"Gets the vote counter for a specified appeal in a specified dispute. Note: This function is only to be used by the interface and it won't work if the number of choices is too high.\",\"params\":{\"_appeal\":\"The appeal.\",\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"counts\":\"The count.\",\"tied\":\"Whether the vote tied. `O(n)` where `n` is the number of choices of the dispute.\",\"winningChoice\":\"The winning choice.\"}},\"initialize(address,address,address,uint256,uint256,bool,uint256[4],uint256[4],uint256,address,address)\":{\"details\":\"Constructs the KlerosLiquid contract.\",\"params\":{\"_RNGenerator\":\"The address of the random number generator contract.\",\"_courtParameters\":\"MinStake, alpha, feeForJuror and jurorsForCourtJump respectively.\",\"_foreignGateway\":\"Foreign gateway on xDai.\",\"_governor\":\"The governor's address.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_maxDrawingTime\":\"The maximum time that the drawing phase should last.\",\"_minStakingTime\":\"The minimum time that the staking phase should last.\",\"_pinakion\":\"The address of the token contract.\",\"_sortitionSumTreeK\":\"The number of children per node of the general court's sortition sum tree.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the general court.\",\"_weth\":\"Weth contract.\"}},\"onApprove(address,address,uint256)\":{\"details\":\"Notifies the controller about an approval allowing the controller to react if desired.\",\"params\":{\"_amount\":\"The amount in the `approve()` call.\",\"_owner\":\"The address that calls `approve()`.\",\"_spender\":\"The spender in the `approve()` call.\"},\"returns\":{\"allowed\":\"Whether the operation should be allowed or not.\"}},\"onTransfer(address,address,uint256)\":{\"details\":\"Notifies the controller about a token transfer allowing the controller to react if desired.\",\"params\":{\"_amount\":\"The amount of the transfer.\",\"_from\":\"The origin of the transfer.\",\"_to\":\"The destination of the transfer.\"},\"returns\":{\"allowed\":\"Whether the operation should be allowed or not.\"}},\"proxyPayment(address)\":{\"details\":\"DEPRECATED. Called when `_owner` sends ETH to the Wrapped Token contract.\",\"params\":{\"_owner\":\"The address that sent the ETH to create tokens.\"},\"returns\":{\"allowed\":\"Whether the operation should be allowed or not.\"}},\"rule(uint256,uint256)\":{\"details\":\"Receive the ruling from foreign gateway which technically is an arbitrator of this contract.\",\"params\":{\"_disputeID\":\"ID of the dispute.\",\"_ruling\":\"Ruling given by V2 court and relayed by foreign gateway.\"}},\"setStake(uint96,uint128)\":{\"details\":\"Sets the caller's stake in a subcourt.\",\"params\":{\"_stake\":\"The new stake.\",\"_subcourtID\":\"The ID of the subcourt.\"}},\"stakeOf(address,uint96)\":{\"details\":\"Gets the stake of a specified juror in a specified subcourt.\",\"params\":{\"_account\":\"The address of the juror.\",\"_subcourtID\":\"The ID of the subcourt.\"},\"returns\":{\"stake\":\"The stake.\"}}},\"title\":\"xKlerosLiquidV2\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol\":\"xKlerosLiquidV2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@kleros/vea-contracts/interfaces/IFastBridgeReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere, @hrishibhat]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity ^0.8.0;\\n\\ninterface IFastBridgeReceiver {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /**\\n * @dev The Fast Bridge participants watch for these events to decide if a challenge should be submitted.\\n * @param _epoch The epoch for which the the claim was made.\\n * @param _batchMerkleRoot The timestamp of the claim creation.\\n */\\n event ClaimReceived(uint256 indexed _epoch, bytes32 indexed _batchMerkleRoot);\\n\\n /**\\n * @dev This event indicates that `sendSafeFallback()` should be called on the sending side.\\n * @param _epoch The epoch associated with the challenged claim.\\n */\\n event ClaimChallenged(uint256 indexed _epoch);\\n\\n /**\\n * @dev This events indicates that optimistic verification has succeeded. The messages are ready to be relayed.\\n * @param _epoch The epoch associated with the batch.\\n * @param _success The success of the optimistic verification.\\n */\\n event BatchVerified(uint256 indexed _epoch, bool _success);\\n\\n /**\\n * @dev This event indicates that the batch has been received via the Safe Bridge.\\n * @param _epoch The epoch associated with the batch.\\n * @param _isBridgerHonest Whether the bridger made an honest claim.\\n * @param _isChallengerHonest Whether the bridger made an honest challenge.\\n */\\n event BatchSafeVerified(uint256 indexed _epoch, bool _isBridgerHonest, bool _isChallengerHonest);\\n\\n /**\\n * @dev This event indicates that the claim deposit has been withdrawn.\\n * @param _epoch The epoch associated with the batch.\\n * @param _bridger The recipient of the claim deposit.\\n */\\n event ClaimDepositWithdrawn(uint256 indexed _epoch, address indexed _bridger);\\n\\n /**\\n * @dev This event indicates that the challenge deposit has been withdrawn.\\n * @param _epoch The epoch associated with the batch.\\n * @param _challenger The recipient of the challenge deposit.\\n */\\n event ChallengeDepositWithdrawn(uint256 indexed _epoch, address indexed _challenger);\\n\\n /**\\n * @dev This event indicates that a message has been relayed for the batch in this `_epoch`.\\n * @param _epoch The epoch associated with the batch.\\n * @param _nonce The nonce of the message that was relayed.\\n */\\n event MessageRelayed(uint256 indexed _epoch, uint256 indexed _nonce);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Submit a claim about the `_batchMerkleRoot` for the latests completed Fast bridge epoch and submit a deposit. The `_batchMerkleRoot` should match the one on the sending side otherwise the sender will lose his deposit.\\n * @param _epoch The epoch of the claim to claim.\\n * @param _batchMerkleRoot The hash claimed for the ticket.\\n */\\n function claim(uint256 _epoch, bytes32 _batchMerkleRoot) external payable;\\n\\n /**\\n * @dev Submit a challenge for the claim of the current epoch's Fast Bridge batch merkleroot state and submit a deposit. The `batchMerkleRoot` in the claim already made for the last finalized epoch should be different from the one on the sending side, otherwise the sender will lose his deposit.\\n * @param _epoch The epoch of the claim to challenge.\\n */\\n function challenge(uint256 _epoch) external payable;\\n\\n /**\\n * @dev Resolves the optimistic claim for '_epoch'.\\n * @param _epoch The epoch of the optimistic claim.\\n */\\n function verifyBatch(uint256 _epoch) external;\\n\\n /**\\n * @dev Verifies merkle proof for the given message and associated nonce for the most recent possible epoch and relays the message.\\n * @param _epoch The epoch in which the message was batched by the bridge.\\n * @param _proof The merkle proof to prove the membership of the message and nonce in the merkle tree for the epoch.\\n * @param _message The data on the cross-domain chain for the message.\\n */\\n function verifyAndRelayMessage(\\n uint256 _epoch,\\n bytes32[] calldata _proof,\\n bytes calldata _message\\n ) external;\\n\\n /**\\n * @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n * @param _epoch The epoch associated with the claim deposit to withraw.\\n */\\n function withdrawClaimDeposit(uint256 _epoch) external;\\n\\n /**\\n * @dev Sends the deposit back to the Challenger if his challenge is successful. Includes a portion of the Bridger's deposit.\\n * @param _epoch The epoch associated with the challenge deposit to withraw.\\n */\\n function withdrawChallengeDeposit(uint256 _epoch) external;\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Returns the `start` and `end` time of challenge period for this `epoch`.\\n * @param _epoch The epoch of the claim to request the challenge period.\\n * @return start The start time of the challenge period.\\n * @return end The end time of the challenge period.\\n */\\n function claimChallengePeriod(uint256 _epoch) external view returns (uint256 start, uint256 end);\\n\\n /**\\n * @dev Returns the epoch period.\\n */\\n function epochPeriod() external view returns (uint256 epochPeriod);\\n\\n /**\\n * @dev Returns the challenge period.\\n */\\n function challengePeriod() external view returns (uint256 challengePeriod);\\n}\\n\",\"keccak256\":\"0xff909a62e9a08540dafcd08c779a64917ed1e44be52d5a225ff9149ff95909e8\",\"license\":\"MIT\"},\"@kleros/vea-contracts/interfaces/IReceiverGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IFastBridgeReceiver.sol\\\";\\n\\ninterface IReceiverGateway {\\n function fastBridgeReceiver() external view returns (IFastBridgeReceiver);\\n\\n function senderChainID() external view returns (uint256);\\n\\n function senderGateway() external view returns (address);\\n}\\n\",\"keccak256\":\"0xfa82fbd575c462ad6dffa18c67eb097a4c5088715ae956a836726aafa4be0f90\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x3798da9e212cd00a7cda94ddb5a9721171a718e89c500d8901f810e0e37fa74e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0f633a0223d9a1dcccfcf38a64c9de0874dfcbfac0c6941ccf074d63a2ce0e1e\",\"license\":\"MIT\"},\"src/arbitration/IArbitrable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"./IArbitrator.sol\\\";\\n\\n/**\\n * @title IArbitrable\\n * Arbitrable interface. Note that this interface follows the ERC-792 standard.\\n * When developing arbitrable contracts, we need to:\\n * - Define the action taken when a ruling is received by the contract.\\n * - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\n */\\ninterface IArbitrable {\\n /**\\n * @dev To be raised when a ruling is given.\\n * @param _arbitrator The arbitrator giving the ruling.\\n * @param _disputeID ID of the dispute in the Arbitrator contract.\\n * @param _ruling The ruling which was given.\\n */\\n event Ruling(IArbitrator indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /**\\n * @dev Give a ruling for a dispute. Must be called by the arbitrator.\\n * The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n * @param _disputeID ID of the dispute in the Arbitrator contract.\\n * @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n */\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x8f1c36f6206566f0790448a654190e68a43a1dd2e039c2b77e7455d3fcd599a4\",\"license\":\"MIT\"},\"src/arbitration/IArbitrator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"./IArbitrable.sol\\\";\\n\\n/**\\n * @title Arbitrator\\n * Arbitrator interface that implements the new arbitration standard.\\n * Unlike the ERC-792 this standard doesn't have anything related to appeals, so each arbitrator can implement an appeal system that suits it the most.\\n * When developing arbitrator contracts we need to:\\n * - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n * - Define the functions for cost display (arbitrationCost).\\n * - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\n */\\ninterface IArbitrator {\\n /**\\n * @dev To be emitted when a dispute is created.\\n * @param _disputeID ID of the dispute.\\n * @param _arbitrable The contract which created the dispute.\\n */\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n\\n /**\\n * @dev To be raised when a ruling is given.\\n * @param _arbitrable The arbitrable receiving the ruling.\\n * @param _disputeID ID of the dispute in the Arbitrator contract.\\n * @param _ruling The ruling which was given.\\n */\\n event Ruling(IArbitrable indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /**\\n * @dev Create a dispute. Must be called by the arbitrable contract.\\n * Must pay at least arbitrationCost(_extraData).\\n * @param _choices Amount of choices the arbitrator can make in this dispute.\\n * @param _extraData Can be used to give additional info on the dispute to be created.\\n * @return disputeID ID of the dispute created.\\n */\\n function createDispute(uint256 _choices, bytes calldata _extraData) external payable returns (uint256 disputeID);\\n\\n /**\\n * @dev Compute the cost of arbitration. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n * @param _extraData Can be used to give additional info on the dispute to be created.\\n * @return cost Required cost of arbitration.\\n */\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n}\\n\",\"keccak256\":\"0x2264bc7cb975d89776b9bf3e35cecd4dec7d601604601ca4822d8bfc0886c379\",\"license\":\"MIT\"},\"src/gateway/interfaces/IForeignGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere, @shalzz]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../arbitration/IArbitrator.sol\\\";\\nimport \\\"@kleros/vea-contracts/interfaces/IReceiverGateway.sol\\\";\\n\\ninterface IForeignGateway is IArbitrator, IReceiverGateway {\\n /**\\n * Relay the rule call from the home gateway to the arbitrable.\\n */\\n function relayRule(address _messageSender, bytes32 _disputeHash, uint256 _ruling, address _forwarder) external;\\n\\n function withdrawFees(bytes32 _disputeHash) external;\\n\\n // For cross-chain Evidence standard\\n function disputeHashToForeignID(bytes32 _disputeHash) external view returns (uint256);\\n\\n function createDisputeERC20(\\n uint256 _choices,\\n bytes calldata _extraData,\\n uint256 _amount\\n ) external returns (uint256 disputeID);\\n}\\n\",\"keccak256\":\"0x4cfc88d2d7cf211ce9a1f3c991f093baefa026784185da2319d566051d0c8c43\",\"license\":\"MIT\"},\"src/kleros-v1/interfaces/ITokenController.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\n/**\\n * @dev The token controller contract must implement these functions. See https://github.com/Giveth/minime/blob/master/contracts/TokenController.sol\\n */\\ninterface ITokenController {\\n /**\\n * @notice Called when `_owner` sends ether to the MiniMe Token contract\\n * @param _owner The address that sent the ether to create tokens\\n * @return True if the ether is accepted, false if it throws\\n */\\n function proxyPayment(address _owner) external payable returns (bool);\\n\\n /**\\n * @notice Notifies the controller about a token transfer allowing the controller to react if desired\\n * @param _from The origin of the transfer\\n * @param _to The destination of the transfer\\n * @param _amount The amount of the transfer\\n * @return False if the controller does not authorize the transfer\\n */\\n function onTransfer(address _from, address _to, uint256 _amount) external returns (bool);\\n\\n /**\\n * @notice Notifies the controller about an approval allowing the controller to react if desired\\n * @param _owner The address that calls `approve()`\\n * @param _spender The spender in the `approve()` call\\n * @param _amount The amount in the `approve()` call\\n * @return False if the controller does not authorize the approval\\n */\\n function onApprove(address _owner, address _spender, uint256 _amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x872b17903608262164b43c7304e9fe1d6ae631070ffd2c911e7508d7f7cf7c91\",\"license\":\"MIT\"},\"src/kleros-v1/kleros-liquid-xdai/WrappedPinakion.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport \\\"../interfaces/ITokenController.sol\\\";\\nimport \\\"./interfaces/ITokenBridge.sol\\\";\\nimport \\\"./interfaces/IERC677.sol\\\";\\n\\ncontract WrappedPinakion is Initializable {\\n using SafeMath for uint256;\\n\\n /* Events */\\n\\n /**\\n * @notice Emitted when `value` tokens are moved from one account (`from`) to another (`to`).\\n * @dev Notice that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @notice Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /* Storage */\\n\\n mapping(address => uint256) private balances;\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /// @notice Total supply of the token. Equals the total xPinakion deposit into the contract.\\n uint256 public totalSupply;\\n\\n /// @notice Name of the token.\\n string public name;\\n\\n /// @notice Symbol of the token.\\n string public symbol;\\n\\n /// @notice Number of decimals of the token.\\n uint8 public decimals;\\n\\n /// @notice The token's controller.\\n address public controller;\\n\\n /// @notice Bridged PNK on xDai to be wrapped. This token is upgradeable.\\n IERC677 public xPinakion;\\n\\n /// @notice xDai Token Bridge. The Token Bridge is upgradeable.\\n ITokenBridge public tokenBridge;\\n\\n /* Modifiers */\\n\\n /// @dev Verifies that the sender has ability to modify controlled parameters.\\n modifier onlyController() {\\n require(controller == msg.sender, \\\"The caller is not the controller.\\\");\\n _;\\n }\\n\\n /* Initializer */\\n\\n /**\\n * @dev Constructor.\\n * @param _name for the wrapped PNK on the home chain.\\n * @param _symbol for wrapped PNK ticker on the home chain.\\n * @param _xPinakion the home PNK contract which is already bridged to the foreign PNK contract.\\n * @param _tokenBridge the TokenBridge contract.\\n */\\n function initialize(\\n string memory _name,\\n string memory _symbol,\\n IERC677 _xPinakion,\\n ITokenBridge _tokenBridge\\n ) public initializer {\\n name = _name;\\n symbol = _symbol;\\n decimals = 18;\\n xPinakion = _xPinakion;\\n tokenBridge = _tokenBridge;\\n controller = msg.sender;\\n }\\n\\n /* External */\\n\\n /**\\n * @notice Changes `controller` to `_controller`.\\n * @param _controller The new controller of the contract\\n */\\n function changeController(address _controller) external onlyController {\\n controller = _controller;\\n }\\n\\n /**\\n * @notice Converts bridged PNK (xPinakion) into wrapped PNK which can be staked in KlerosLiquid.\\n * @param _amount The amount of wrapped pinakions to mint.\\n */\\n function deposit(uint256 _amount) external {\\n _mint(msg.sender, _amount);\\n require(\\n xPinakion.transferFrom(msg.sender, address(this), _amount),\\n \\\"Sender does not have enough approved funds.\\\"\\n );\\n }\\n\\n /**\\n * @notice IERC20 Receiver functionality.\\n * @dev Converts bridged PNK (xPinakion) into wrapped PNK which can be staked in KlerosLiquid.\\n * If the tokenBridge is calling this function, then this contract has already received\\n * the xPinakion tokens. Notice that the Home bridge calls onTokenBridge as a result of\\n * someone invoking `relayTokensAndCall()` on the Foreign bridge contract.\\n * @param _token The token address the _amount belongs to.\\n * @param _amount The amount of wrapped PNK to mint.\\n * @param _data Calldata containing the address of the recipient.\\n * Notice that the address has to be padded to the right 32 bytes.\\n */\\n function onTokenBridged(address _token, uint256 _amount, bytes calldata _data) external {\\n require(msg.sender == address(tokenBridge), \\\"Sender not authorized.\\\");\\n require(_token == address(xPinakion), \\\"Token bridged is not xPinakion.\\\");\\n\\n address recipient;\\n assembly {\\n recipient := calldataload(0x84)\\n }\\n _mint(recipient, _amount);\\n }\\n\\n /**\\n * @notice Converts wrapped PNK back into bridged PNK (xPinakion).\\n * @param _amount The amount of bridged PNK to withdraw.\\n */\\n function withdraw(uint256 _amount) external {\\n _burn(_amount);\\n require(xPinakion.transfer(msg.sender, _amount), \\\"The `transfer` function must not fail.\\\");\\n }\\n\\n /**\\n * @notice Converts wrapped PNK back into PNK using the Token Bridge.\\n * @dev This function is not strictly needed, but it provides a good UX to users who want to get their Mainnet's PNK back.\\n * What normally takes 3 transactions, here is done in one go.\\n * Notice that the PNK have to be claimed on Mainnet's TokenBridge by the receiver.\\n * @param _amount The amount of PNK to withdraw.\\n * @param _receiver The address which will receive the PNK back in the foreign chain.\\n */\\n function withdrawAndConvertToPNK(uint256 _amount, address _receiver) external {\\n _burn(_amount);\\n // Using approve is safe here, because this contract approves the bridge to spend the tokens and triggers the relay immediately.\\n xPinakion.approve(address(tokenBridge), _amount);\\n tokenBridge.relayTokens(xPinakion, _receiver, _amount);\\n }\\n\\n /**\\n * @notice Moves `_amount` tokens from the caller's account to `_recipient`.\\n * @param _recipient The entity receiving the funds.\\n * @param _amount The amount to tranfer in base units.\\n * @return True on success.\\n */\\n function transfer(address _recipient, uint256 _amount) public returns (bool) {\\n if (isContract(controller)) {\\n require(\\n ITokenController(controller).onTransfer(msg.sender, _recipient, _amount),\\n \\\"Token controller rejects transfer.\\\"\\n );\\n }\\n balances[msg.sender] = balances[msg.sender].sub(_amount); // ERC20: transfer amount exceeds balance\\n balances[_recipient] = balances[_recipient].add(_amount);\\n emit Transfer(msg.sender, _recipient, _amount);\\n return true;\\n }\\n\\n /**\\n * @notice Moves `_amount` tokens from `_sender` to `_recipient` using the\\n * allowance mechanism. `_amount` is then deducted from the caller's allowance.\\n * @param _sender The entity to take the funds from.\\n * @param _recipient The entity receiving the funds.\\n * @param _amount The amount to tranfer in base units.\\n * @return True on success.\\n */\\n function transferFrom(address _sender, address _recipient, uint256 _amount) public returns (bool) {\\n if (isContract(controller)) {\\n require(\\n ITokenController(controller).onTransfer(_sender, _recipient, _amount),\\n \\\"Token controller rejects transfer.\\\"\\n );\\n }\\n\\n /** The controller of this contract can move tokens around at will,\\n * this is important to recognize! Confirm that you trust the\\n * controller of this contract, which in most situations should be\\n * another open source smart contract or 0x0.\\n */\\n if (msg.sender != controller) {\\n allowance[_sender][msg.sender] = allowance[_sender][msg.sender].sub(_amount); // ERC20: transfer amount exceeds allowance.\\n }\\n\\n balances[_sender] = balances[_sender].sub(_amount); // ERC20: transfer amount exceeds balance\\n balances[_recipient] = balances[_recipient].add(_amount);\\n emit Transfer(_sender, _recipient, _amount);\\n return true;\\n }\\n\\n /**\\n * @notice Approves `_spender` to spend `_amount`.\\n * @param _spender The entity allowed to spend funds.\\n * @param _amount The amount of base units the entity will be allowed to spend.\\n * @return True on success.\\n */\\n function approve(address _spender, uint256 _amount) public returns (bool) {\\n // Alerts the token controller of the approve function call\\n if (isContract(controller)) {\\n require(\\n ITokenController(controller).onApprove(msg.sender, _spender, _amount),\\n \\\"Token controller does not approve.\\\"\\n );\\n }\\n\\n allowance[msg.sender][_spender] = _amount;\\n emit Approval(msg.sender, _spender, _amount);\\n return true;\\n }\\n\\n /**\\n * @notice Increases the `_spender` allowance by `_addedValue`.\\n * @param _spender The entity allowed to spend funds.\\n * @param _addedValue The amount of extra base units the entity will be allowed to spend.\\n * @return True on success.\\n */\\n function increaseAllowance(address _spender, uint256 _addedValue) public returns (bool) {\\n uint256 newAllowance = allowance[msg.sender][_spender].add(_addedValue);\\n // Alerts the token controller of the approve function call\\n if (isContract(controller)) {\\n require(\\n ITokenController(controller).onApprove(msg.sender, _spender, newAllowance),\\n \\\"Token controller does not approve.\\\"\\n );\\n }\\n\\n allowance[msg.sender][_spender] = newAllowance;\\n emit Approval(msg.sender, _spender, newAllowance);\\n return true;\\n }\\n\\n /**\\n * @notice Decreases the `_spender` allowance by `_subtractedValue`.\\n * @param _spender The entity whose spending allocation will be reduced.\\n * @param _subtractedValue The reduction of spending allocation in base units.\\n * @return True on success.\\n */\\n function decreaseAllowance(address _spender, uint256 _subtractedValue) public returns (bool) {\\n uint256 newAllowance = allowance[msg.sender][_spender].sub(_subtractedValue); // ERC20: decreased allowance below zero\\n // Alerts the token controller of the approve function call\\n if (isContract(controller)) {\\n require(\\n ITokenController(controller).onApprove(msg.sender, _spender, newAllowance),\\n \\\"Token controller does not approve.\\\"\\n );\\n }\\n\\n allowance[msg.sender][_spender] = newAllowance;\\n emit Approval(msg.sender, _spender, newAllowance);\\n return true;\\n }\\n\\n /* Internal */\\n\\n /**\\n * @dev Internal function that mints an amount of the token and assigns it to\\n * an account. This encapsulates the modification of balances such that the\\n * proper events are emitted.\\n * @param _recipient The address which will receive the minted tokens.\\n * @param _amount The amount that will be created.\\n */\\n function _mint(address _recipient, uint256 _amount) internal {\\n totalSupply = totalSupply.add(_amount);\\n balances[_recipient] = balances[_recipient].add(_amount);\\n emit Transfer(address(0x0), _recipient, _amount);\\n }\\n\\n /**\\n * @dev Destroys `_amount` tokens from the caller. Cannot burn locked tokens.\\n * @param _amount The quantity of tokens to burn in base units.\\n */\\n function _burn(uint256 _amount) internal {\\n if (isContract(controller)) {\\n require(\\n ITokenController(controller).onTransfer(msg.sender, address(0x0), _amount),\\n \\\"Token controller rejects transfer.\\\"\\n );\\n }\\n balances[msg.sender] = balances[msg.sender].sub(_amount); // ERC20: burn amount exceeds balance\\n totalSupply = totalSupply.sub(_amount);\\n emit Transfer(msg.sender, address(0x0), _amount);\\n }\\n\\n /**\\n * @dev Internal function to determine if an address is a contract.\\n * @param _addr The address being queried.\\n * @return True if `_addr` is a contract.\\n */\\n function isContract(address _addr) internal view returns (bool) {\\n uint256 size;\\n if (_addr == address(0)) return false;\\n assembly {\\n size := extcodesize(_addr)\\n }\\n return size > 0;\\n }\\n\\n /* Getters */\\n\\n /**\\n * @dev Gets the balance of the specified address.\\n * @param _owner The address to query the balance of.\\n * @return uint256 value representing the amount owned by the passed address.\\n */\\n function balanceOf(address _owner) public view returns (uint256) {\\n return balances[_owner];\\n }\\n}\\n\",\"keccak256\":\"0x1cdaf0dd439866cb5029d3299bd3bb7412c4d55aeafebdd168a60914da741606\",\"license\":\"MIT\"},\"src/kleros-v1/kleros-liquid-xdai/interfaces/IERC677.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\ninterface IERC677 {\\n function transfer(address _to, uint256 _value) external returns (bool);\\n\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n\\n function approve(address _spender, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x901e298088578c3333807574c52d2d288a1a1036531bd85168f9505cb85168e7\",\"license\":\"MIT\"},\"src/kleros-v1/kleros-liquid-xdai/interfaces/IRandomAuRa.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\ninterface IRandomAuRa {\\n function currentSeed() external view returns (uint256);\\n\\n function isCommitPhase() external view returns (bool);\\n\\n function nextCommitPhaseStartBlock() external view returns (uint256);\\n\\n function collectRoundLength() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0fcb472d7f826d65845caa8683bb25159ae0ce4bbc03fe1569af7a65dca7398d\",\"license\":\"MIT\"},\"src/kleros-v1/kleros-liquid-xdai/interfaces/ITokenBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"./IERC677.sol\\\";\\n\\ninterface ITokenBridge {\\n function relayTokens(IERC677 token, address _receiver, uint256 _value) external;\\n}\\n\",\"keccak256\":\"0x8054fe008a2a2473ab24168068e9207b54bc0ac9a6de31899f5da62ef1a85805\",\"license\":\"MIT\"},\"src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IArbitrator, IArbitrable} from \\\"../../arbitration/IArbitrator.sol\\\";\\nimport {ITokenController} from \\\"../interfaces/ITokenController.sol\\\";\\nimport {WrappedPinakion} from \\\"./WrappedPinakion.sol\\\";\\nimport {IRandomAuRa} from \\\"./interfaces/IRandomAuRa.sol\\\";\\n\\nimport {SortitionSumTreeFactory} from \\\"../../libraries/SortitionSumTreeFactory.sol\\\";\\nimport \\\"../../gateway/interfaces/IForeignGateway.sol\\\";\\n\\n/**\\n * @title xKlerosLiquidV2\\n * @dev This contract is an adaption of Mainnet's KlerosLiquid (https://github.com/kleros/kleros/blob/69cfbfb2128c29f1625b3a99a3183540772fda08/contracts/kleros/KlerosLiquid.sol)\\n * for xDai chain. Notice that variables referring to ETH values in this contract, will hold the native token values of the chain on which xKlerosLiquid is deployed.\\n * When this contract gets deployed on xDai chain, ETH variables will hold xDai values.\\n */\\ncontract xKlerosLiquidV2 is Initializable, ITokenController, IArbitrator {\\n /* Enums */\\n\\n // General\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n // Dispute\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n /* Structs */\\n\\n // General\\n struct Court {\\n uint96 parent; // The parent court.\\n uint256[] children; // List of child courts.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256 minStake; // Minimum tokens needed to stake in the court.\\n uint256 alpha; // Basis point of tokens that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n // The appeal after the one that reaches this number of jurors will go to the parent court if any, otherwise, no more appeals are possible.\\n uint256 jurorsForCourtJump;\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n }\\n struct DelayedSetStake {\\n address account; // The address of the juror.\\n uint96 subcourtID; // The ID of the subcourt.\\n uint128 stake; // The new stake.\\n }\\n\\n // Dispute\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast or revealed, false otherwise.\\n }\\n struct VoteCounter {\\n // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n uint256 winningChoice;\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n }\\n struct Dispute {\\n // Note that appeal `0` is equivalent to the first round of the dispute.\\n uint96 subcourtID; // The ID of the subcourt the dispute is in.\\n IArbitrable arbitrated; // The arbitrated arbitrable contract.\\n // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\"/\\\"no ruling\\\".\\n uint256 numberOfChoices;\\n Period period; // The current period of the dispute.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n // The votes in the form `votes[appeal][voteID]`. On each round, a new list is pushed and packed with as many empty votes as there are draws. We use `dispute.votes.length` to get the number of appeals plus 1 for the first round.\\n Vote[][] votes;\\n VoteCounter[] voteCounters; // The vote counters in the form `voteCounters[appeal]`.\\n uint256[] tokensAtStakePerJuror; // The amount of tokens at stake for each juror in the form `tokensAtStakePerJuror[appeal]`.\\n uint256[] totalFeesForJurors; // The total juror fees paid in the form `totalFeesForJurors[appeal]`.\\n uint256 drawsInRound; // A counter of draws made in the current round.\\n uint256 commitsInRound; // A counter of commits made in the current round.\\n uint256[] votesInEachRound; // A counter of votes made in each round in the form `votesInEachRound[appeal]`.\\n // A counter of vote reward repartitions made in each round in the form `repartitionsInEachRound[appeal]`.\\n uint256[] repartitionsInEachRound;\\n uint256[] penaltiesInEachRound; // The amount of tokens collected from penalties in each round in the form `penaltiesInEachRound[appeal]`.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n }\\n\\n // Juror\\n struct Juror {\\n // The IDs of subcourts where the juror has stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`.\\n uint96[] subcourtIDs;\\n uint256 stakedTokens; // The juror's total amount of tokens staked in subcourts.\\n uint256 lockedTokens; // The juror's total amount of tokens locked in disputes.\\n }\\n\\n /* Events */\\n\\n /** @dev Emitted when we pass to a new phase.\\n * @param _phase The new phase.\\n */\\n event NewPhase(Phase _phase);\\n\\n /** @dev Emitted when a dispute passes to a new period.\\n * @param _disputeID The ID of the dispute.\\n * @param _period The new period.\\n */\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n\\n /** @dev Emitted when a juror's stake is set.\\n * @param _address The address of the juror.\\n * @param _subcourtID The ID of the subcourt at the end of the stake path.\\n * @param _stake The new stake.\\n * @param _newTotalStake The new total stake.\\n */\\n event StakeSet(address indexed _address, uint256 _subcourtID, uint128 _stake, uint256 _newTotalStake);\\n\\n /** @dev Emitted when a juror is drawn.\\n * @param _address The drawn address.\\n * @param _disputeID The ID of the dispute.\\n * @param _appeal The appeal the draw is for. 0 is for the first round.\\n * @param _voteID The vote ID.\\n */\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _appeal, uint256 _voteID);\\n\\n /** @dev Emitted when a juror wins or loses tokens and ETH from a dispute.\\n * @param _address The juror affected.\\n * @param _disputeID The ID of the dispute.\\n * @param _tokenAmount The amount of tokens won or lost.\\n * @param _ETHAmount The amount of ETH won or lost.\\n */\\n event TokenAndETHShift(address indexed _address, uint256 indexed _disputeID, int _tokenAmount, int _ETHAmount);\\n\\n /* Storage */\\n\\n // General Constants\\n uint256 public constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\n uint256 public constant MIN_JURORS = 3; // The global default minimum number of jurors in a dispute.\\n uint256 public constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n uint256 public constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n // General Contracts\\n address public governor; // The governor of the contract.\\n WrappedPinakion public pinakion; // The Pinakion token contract.\\n IRandomAuRa public RNGenerator; // The random number generator contract.\\n // General Dynamic\\n Phase public phase; // The current phase.\\n uint256 public lastPhaseChange; // The last time the phase was changed.\\n uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\n // The block number to get the next random number from. Used so there is at least a 1 block difference from the staking phase.\\n uint256 public RNBlock;\\n uint256 public RN; // The current random number.\\n uint256 public minStakingTime; // The minimum staking time.\\n uint256 public maxDrawingTime; // The maximum drawing time.\\n // True if insolvent (`balance < stakedTokens || balance < lockedTokens`) token transfers should be blocked. Used to avoid blocking penalties.\\n bool public lockInsolventTransfers;\\n // General Storage\\n Court[] public courts; // The subcourts.\\n using SortitionSumTreeFactory for SortitionSumTreeFactory.SortitionSumTrees; // Use library functions for sortition sum trees.\\n SortitionSumTreeFactory.SortitionSumTrees internal sortitionSumTrees; // The sortition sum trees.\\n // The delayed calls to `_setStake`. Used to schedule `_setStake`s when not in the staking phase.\\n mapping(uint256 => DelayedSetStake) public delayedSetStakes;\\n // The index of the next `delayedSetStakes` item to execute. Starts at 1 because `lastDelayedSetStake` starts at 0.\\n uint256 public nextDelayedSetStake;\\n uint256 public lastDelayedSetStake; // The index of the last `delayedSetStakes` item. 0 is skipped because it is the initial value.\\n\\n // Dispute\\n // Use a mapping instead of an array so that upgrading (appending variables to) the Dispute struct is possible without big layout changes.\\n mapping(uint256 => Dispute) public disputes; // The disputes.\\n uint256 public totalDisputes;\\n\\n // Juror\\n mapping(address => Juror) public jurors; // The jurors.\\n\\n IForeignGateway public foreignGateway; // Foreign gateway contract.\\n IERC20 public weth; // WETH token address.\\n\\n mapping(uint256 => uint256) public disputesRuling;\\n\\n /* Modifiers */\\n\\n /** @dev Requires a specific phase.\\n * @param _phase The required phase.\\n */\\n modifier onlyDuringPhase(Phase _phase) {\\n require(phase == _phase);\\n _;\\n }\\n\\n /** @dev Requires a specific period in a dispute.\\n * @param _disputeID The ID of the dispute.\\n * @param _period The required period.\\n */\\n modifier onlyDuringPeriod(uint256 _disputeID, Period _period) {\\n require(disputes[_disputeID].period == _period);\\n _;\\n }\\n\\n /** @dev Requires that the sender is the governor. Note that the governor is expected to not be malicious. */\\n modifier onlyByGovernor() {\\n require(governor == msg.sender);\\n _;\\n }\\n\\n /* Constructor */\\n\\n /** @dev Constructs the KlerosLiquid contract.\\n * @param _governor The governor's address.\\n * @param _pinakion The address of the token contract.\\n * @param _RNGenerator The address of the random number generator contract.\\n * @param _minStakingTime The minimum time that the staking phase should last.\\n * @param _maxDrawingTime The maximum time that the drawing phase should last.\\n * @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n * @param _courtParameters MinStake, alpha, feeForJuror and jurorsForCourtJump respectively.\\n * @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n * @param _sortitionSumTreeK The number of children per node of the general court's sortition sum tree.\\n * @param _foreignGateway Foreign gateway on xDai.\\n * @param _weth Weth contract.\\n */\\n function initialize(\\n address _governor,\\n WrappedPinakion _pinakion,\\n IRandomAuRa _RNGenerator,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n uint256 _sortitionSumTreeK,\\n IForeignGateway _foreignGateway,\\n IERC20 _weth\\n ) public initializer {\\n // Initialize contract.\\n governor = _governor;\\n pinakion = _pinakion;\\n RNGenerator = _RNGenerator;\\n minStakingTime = _minStakingTime;\\n maxDrawingTime = _maxDrawingTime;\\n phase = Phase.staking;\\n lastPhaseChange = block.timestamp;\\n lockInsolventTransfers = true;\\n if (nextDelayedSetStake == 0) nextDelayedSetStake = 1;\\n foreignGateway = _foreignGateway;\\n weth = _weth;\\n\\n // Create the general court.\\n if (courts.length == 0) {\\n courts.push(\\n Court({\\n parent: 0,\\n children: new uint256[](0),\\n hiddenVotes: _hiddenVotes,\\n minStake: _courtParameters[0],\\n alpha: _courtParameters[1],\\n feeForJuror: _courtParameters[2],\\n jurorsForCourtJump: _courtParameters[3],\\n timesPerPeriod: _timesPerPeriod\\n })\\n );\\n sortitionSumTrees.createTree(bytes32(0), _sortitionSumTreeK);\\n }\\n }\\n\\n /* External */\\n\\n /** @dev Lets the governor call anything on behalf of the contract.\\n * @param _destination The destination of the call.\\n * @param _amount The value sent with the call.\\n * @param _data The data sent with the call.\\n */\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /** @dev Changes the `governor` storage variable.\\n * @param _governor The new value for the `governor` storage variable.\\n */\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /** @dev Changes the `pinakion` storage variable.\\n * @param _pinakion The new value for the `pinakion` storage variable.\\n */\\n function changePinakion(WrappedPinakion _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /** @dev Changes the `RNGenerator` storage variable.\\n * @param _RNGenerator The new value for the `RNGenerator` storage variable.\\n */\\n function changeRNGenerator(IRandomAuRa _RNGenerator) external onlyByGovernor {\\n RNGenerator = _RNGenerator;\\n if (phase == Phase.generating) {\\n RNBlock = RNGenerator.nextCommitPhaseStartBlock() + RNGenerator.collectRoundLength();\\n }\\n }\\n\\n /** @dev Changes the `minStakingTime` storage variable.\\n * @param _minStakingTime The new value for the `minStakingTime` storage variable.\\n */\\n function changeMinStakingTime(uint256 _minStakingTime) external onlyByGovernor {\\n minStakingTime = _minStakingTime;\\n }\\n\\n /** @dev Changes the `maxDrawingTime` storage variable.\\n * @param _maxDrawingTime The new value for the `maxDrawingTime` storage variable.\\n */\\n function changeMaxDrawingTime(uint256 _maxDrawingTime) external onlyByGovernor {\\n maxDrawingTime = _maxDrawingTime;\\n }\\n\\n /** @dev Changes the `foreignGateway` storage variable.\\n * @param _foreignGateway The new value for the `foreignGateway` storage variable.\\n */\\n function changeForeignGateway(IForeignGateway _foreignGateway) external onlyByGovernor {\\n foreignGateway = _foreignGateway;\\n }\\n\\n /** @dev Changes the `weth` storage variable.\\n * @param _weth The new value for the `weth` storage variable.\\n */\\n function changeWethAddress(IERC20 _weth) external onlyByGovernor {\\n weth = _weth;\\n }\\n\\n /** @dev Creates a subcourt under a specified parent court.\\n * @param _parent The `parent` property value of the subcourt.\\n * @param _hiddenVotes The `hiddenVotes` property value of the subcourt.\\n * @param _minStake The `minStake` property value of the subcourt.\\n * @param _alpha The `alpha` property value of the subcourt.\\n * @param _feeForJuror The `feeForJuror` property value of the subcourt.\\n * @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the subcourt.\\n * @param _timesPerPeriod The `timesPerPeriod` property value of the subcourt.\\n * @param _sortitionSumTreeK The number of children per node of the subcourt's sortition sum tree.\\n */\\n function createSubcourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n uint256 _sortitionSumTreeK\\n ) external onlyByGovernor {\\n require(\\n courts[_parent].minStake <= _minStake,\\n \\\"A subcourt cannot be a child of a subcourt with a higher minimum stake.\\\"\\n );\\n\\n // Create the subcourt.\\n uint256 subcourtID = courts.length;\\n Court storage subcourt = courts.push();\\n subcourt.parent = _parent;\\n subcourt.children = new uint256[](0);\\n subcourt.hiddenVotes = _hiddenVotes;\\n subcourt.minStake = _minStake;\\n subcourt.alpha = _alpha;\\n subcourt.feeForJuror = _feeForJuror;\\n subcourt.jurorsForCourtJump = _jurorsForCourtJump;\\n subcourt.timesPerPeriod = _timesPerPeriod;\\n sortitionSumTrees.createTree(bytes32(subcourtID), _sortitionSumTreeK);\\n\\n // Update the parent.\\n courts[_parent].children.push(subcourtID);\\n }\\n\\n /** @dev Changes the `minStake` property value of a specified subcourt. Don't set to a value lower than its parent's `minStake` property value.\\n * @param _subcourtID The ID of the subcourt.\\n * @param _minStake The new value for the `minStake` property value.\\n */\\n function changeSubcourtMinStake(uint96 _subcourtID, uint256 _minStake) external onlyByGovernor {\\n require(_subcourtID == 0 || courts[courts[_subcourtID].parent].minStake <= _minStake);\\n for (uint256 i = 0; i < courts[_subcourtID].children.length; i++) {\\n require(\\n courts[courts[_subcourtID].children[i]].minStake >= _minStake,\\n \\\"A subcourt cannot be the parent of a subcourt with a lower minimum stake.\\\"\\n );\\n }\\n\\n courts[_subcourtID].minStake = _minStake;\\n }\\n\\n /** @dev Changes the `alpha` property value of a specified subcourt.\\n * @param _subcourtID The ID of the subcourt.\\n * @param _alpha The new value for the `alpha` property value.\\n */\\n function changeSubcourtAlpha(uint96 _subcourtID, uint256 _alpha) external onlyByGovernor {\\n courts[_subcourtID].alpha = _alpha;\\n }\\n\\n /** @dev Changes the `feeForJuror` property value of a specified subcourt.\\n * @param _subcourtID The ID of the subcourt.\\n * @param _feeForJuror The new value for the `feeForJuror` property value.\\n */\\n function changeSubcourtJurorFee(uint96 _subcourtID, uint256 _feeForJuror) external onlyByGovernor {\\n courts[_subcourtID].feeForJuror = _feeForJuror;\\n }\\n\\n /** @dev Changes the `jurorsForCourtJump` property value of a specified subcourt.\\n * @param _subcourtID The ID of the subcourt.\\n * @param _jurorsForCourtJump The new value for the `jurorsForCourtJump` property value.\\n */\\n function changeSubcourtJurorsForJump(uint96 _subcourtID, uint256 _jurorsForCourtJump) external onlyByGovernor {\\n courts[_subcourtID].jurorsForCourtJump = _jurorsForCourtJump;\\n }\\n\\n /** @dev Changes the `timesPerPeriod` property value of a specified subcourt.\\n * @param _subcourtID The ID of the subcourt.\\n * @param _timesPerPeriod The new value for the `timesPerPeriod` property value.\\n */\\n function changeSubcourtTimesPerPeriod(\\n uint96 _subcourtID,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n courts[_subcourtID].timesPerPeriod = _timesPerPeriod;\\n }\\n\\n /** @dev Sets the caller's stake in a subcourt.\\n * @param _subcourtID The ID of the subcourt.\\n * @param _stake The new stake.\\n */\\n function setStake(uint96 _subcourtID, uint128 _stake) external {\\n require(_setStake(msg.sender, _subcourtID, _stake));\\n }\\n\\n /** @dev Executes the next delayed set stakes.\\n * `O(n)` where `n` is the number of iterations to run.\\n * @param _iterations The number of delayed set stakes to execute.\\n */\\n function executeDelayedSetStakes(uint256 _iterations) external onlyDuringPhase(Phase.staking) {\\n uint256 actualIterations = (nextDelayedSetStake + _iterations) - 1 > lastDelayedSetStake\\n ? (lastDelayedSetStake - nextDelayedSetStake) + 1\\n : _iterations;\\n uint256 newNextDelayedSetStake = nextDelayedSetStake + actualIterations;\\n require(newNextDelayedSetStake >= nextDelayedSetStake);\\n for (uint256 i = nextDelayedSetStake; i < newNextDelayedSetStake; i++) {\\n DelayedSetStake storage delayedSetStake = delayedSetStakes[i];\\n _setStake(delayedSetStake.account, delayedSetStake.subcourtID, delayedSetStake.stake);\\n delete delayedSetStakes[i];\\n }\\n nextDelayedSetStake = newNextDelayedSetStake;\\n }\\n\\n /** @dev Receive the ruling from foreign gateway which technically is an arbitrator of this contract.\\n * @param _disputeID ID of the dispute.\\n * @param _ruling Ruling given by V2 court and relayed by foreign gateway.\\n */\\n function rule(uint256 _disputeID, uint256 _ruling) external {\\n require(_disputeID < totalDisputes, \\\"Dispute ID does not exist.\\\");\\n require(msg.sender == address(foreignGateway), \\\"Can only be called by gateway\\\");\\n\\n Dispute storage dispute = disputes[_disputeID];\\n require(!dispute.ruled, \\\"Ruling already executed.\\\");\\n dispute.ruled = true;\\n disputesRuling[_disputeID] = _ruling;\\n\\n // Send the relayed ruling to the arbitrable while fully bypassing the dispute flow.\\n dispute.arbitrated.rule(_disputeID, _ruling);\\n\\n emit Ruling(dispute.arbitrated, _disputeID, _ruling);\\n }\\n\\n /* Public */\\n\\n /** @dev Creates a dispute. Must be called by the arbitrable contract.\\n * @param _numberOfChoices Number of choices to choose from in the dispute to be created.\\n * @param _extraData Additional info about the dispute to be created. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes) and the minimum number of jurors required (next 32 bytes).\\n * @return disputeID The ID of the created dispute.\\n */\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) public payable override returns (uint256 disputeID) {\\n require(msg.value == 0, \\\"Fees should be paid in WETH\\\");\\n uint256 fee = arbitrationCost(_extraData);\\n require(weth.transferFrom(msg.sender, address(this), fee), \\\"Not enough WETH for arbitration\\\");\\n\\n disputeID = totalDisputes++;\\n Dispute storage dispute = disputes[disputeID];\\n dispute.arbitrated = IArbitrable(msg.sender);\\n\\n // The V2 subcourtID is off by one\\n (uint96 subcourtID, uint256 minJurors) = extraDataToSubcourtIDAndMinJurors(_extraData);\\n bytes memory extraDataV2 = abi.encode(uint256(subcourtID + 1), minJurors);\\n\\n require(weth.transfer(address(foreignGateway), fee), \\\"Fee transfer to gateway failed\\\");\\n foreignGateway.createDisputeERC20(_numberOfChoices, extraDataV2, fee);\\n\\n emit DisputeCreation(disputeID, IArbitrable(msg.sender));\\n }\\n\\n /** @dev DEPRECATED. Called when `_owner` sends ETH to the Wrapped Token contract.\\n * @param _owner The address that sent the ETH to create tokens.\\n * @return allowed Whether the operation should be allowed or not.\\n */\\n function proxyPayment(address _owner) public payable override returns (bool allowed) {\\n allowed = false;\\n }\\n\\n /** @dev Notifies the controller about a token transfer allowing the controller to react if desired.\\n * @param _from The origin of the transfer.\\n * @param _to The destination of the transfer.\\n * @param _amount The amount of the transfer.\\n * @return allowed Whether the operation should be allowed or not.\\n */\\n function onTransfer(address _from, address _to, uint256 _amount) public override returns (bool allowed) {\\n if (lockInsolventTransfers) {\\n // Never block penalties or rewards.\\n uint256 newBalance = pinakion.balanceOf(_from) - _amount;\\n if (newBalance < jurors[_from].stakedTokens || newBalance < jurors[_from].lockedTokens) return false;\\n }\\n allowed = true;\\n }\\n\\n /** @dev Notifies the controller about an approval allowing the controller to react if desired.\\n * @param _owner The address that calls `approve()`.\\n * @param _spender The spender in the `approve()` call.\\n * @param _amount The amount in the `approve()` call.\\n * @return allowed Whether the operation should be allowed or not.\\n */\\n function onApprove(address _owner, address _spender, uint256 _amount) public override returns (bool allowed) {\\n allowed = true;\\n }\\n\\n /* Public Views */\\n\\n /** @dev Gets the cost of arbitration in a specified subcourt.\\n * @param _extraData Additional info about the dispute. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes) and the minimum number of jurors required (next 32 bytes).\\n * @return cost The cost.\\n */\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n cost = foreignGateway.arbitrationCost(_extraData);\\n }\\n\\n /** @dev Gets the current ruling of a specified dispute.\\n * @param _disputeID The ID of the dispute.\\n * @return ruling The current ruling.\\n */\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.voteCounters.length == 0) {\\n ruling = disputesRuling[_disputeID];\\n } else {\\n ruling = dispute.voteCounters[dispute.voteCounters.length - 1].tied\\n ? 0\\n : dispute.voteCounters[dispute.voteCounters.length - 1].winningChoice;\\n }\\n }\\n\\n /* Internal */\\n\\n /** @dev Sets the specified juror's stake in a subcourt.\\n * `O(n + p * log_k(j))` where\\n * `n` is the number of subcourts the juror has staked in,\\n * `p` is the depth of the subcourt tree,\\n * `k` is the minimum number of children per node of one of these subcourts' sortition sum tree,\\n * and `j` is the maximum number of jurors that ever staked in one of these subcourts simultaneously.\\n * @param _account The address of the juror.\\n * @param _subcourtID The ID of the subcourt.\\n * @param _stake The new stake.\\n * @return succeeded True if the call succeeded, false otherwise.\\n */\\n function _setStake(address _account, uint96 _subcourtID, uint128 _stake) internal returns (bool succeeded) {\\n if (!(_subcourtID < courts.length)) return false;\\n\\n if (!(_stake == 0 || courts[_subcourtID].minStake <= _stake)) return false; // The juror's stake cannot be lower than the minimum stake for the subcourt.\\n Juror storage juror = jurors[_account];\\n bytes32 stakePathID = accountAndSubcourtIDToStakePathID(_account, _subcourtID);\\n uint256 currentStake = sortitionSumTrees.stakeOf(bytes32(uint256(_subcourtID)), stakePathID);\\n if (!(_stake == 0 || currentStake > 0 || juror.subcourtIDs.length < MAX_STAKE_PATHS)) return false; // Maximum stake paths reached.\\n uint256 newTotalStake = juror.stakedTokens - currentStake + _stake; // Can't overflow because _stake is a uint128.\\n if (!(_stake == 0 || pinakion.balanceOf(_account) >= newTotalStake)) return false; // The juror's total amount of staked tokens cannot be higher than the juror's balance.\\n\\n // Update juror's records.\\n juror.stakedTokens = newTotalStake;\\n if (_stake == 0) {\\n for (uint256 i = 0; i < juror.subcourtIDs.length; i++)\\n if (juror.subcourtIDs[i] == _subcourtID) {\\n juror.subcourtIDs[i] = juror.subcourtIDs[juror.subcourtIDs.length - 1];\\n juror.subcourtIDs.pop();\\n break;\\n }\\n } else if (currentStake == 0) juror.subcourtIDs.push(_subcourtID);\\n\\n // Update subcourt parents.\\n bool finished = false;\\n uint256 currentSubcourtID = _subcourtID;\\n while (!finished) {\\n sortitionSumTrees.set(bytes32(currentSubcourtID), _stake, stakePathID);\\n if (currentSubcourtID == 0) finished = true;\\n else currentSubcourtID = courts[currentSubcourtID].parent;\\n }\\n emit StakeSet(_account, _subcourtID, _stake, newTotalStake);\\n return true;\\n }\\n\\n /** @dev Gets a subcourt ID and the minimum number of jurors required from a specified extra data bytes array.\\n * @param _extraData The extra data bytes array. The first 32 bytes are the subcourt ID and the next 32 bytes are the minimum number of jurors.\\n * @return subcourtID The subcourt ID.\\n * @return minJurors The minimum number of jurors required.\\n */\\n function extraDataToSubcourtIDAndMinJurors(\\n bytes memory _extraData\\n ) internal view returns (uint96 subcourtID, uint256 minJurors) {\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n subcourtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n }\\n if (subcourtID >= courts.length) subcourtID = 0;\\n if (minJurors == 0) minJurors = MIN_JURORS;\\n } else {\\n subcourtID = 0;\\n minJurors = MIN_JURORS;\\n }\\n }\\n\\n /** @dev Packs an account and a subcourt ID into a stake path ID.\\n * @param _account The account to pack.\\n * @param _subcourtID The subcourt ID to pack.\\n * @return stakePathID The stake path ID.\\n */\\n function accountAndSubcourtIDToStakePathID(\\n address _account,\\n uint96 _subcourtID\\n ) internal pure returns (bytes32 stakePathID) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(add(0x0c, i), _account))\\n }\\n for {\\n let i := 0x14\\n } lt(i, 0x20) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(i, _subcourtID))\\n }\\n stakePathID := mload(ptr)\\n }\\n }\\n\\n /* Interface Views */\\n\\n /** @dev Gets a specified subcourt's non primitive properties.\\n * @param _subcourtID The ID of the subcourt.\\n * @return children The subcourt's child court list.\\n * @return timesPerPeriod The subcourt's time per period.\\n */\\n function getSubcourt(\\n uint96 _subcourtID\\n ) external view returns (uint256[] memory children, uint256[4] memory timesPerPeriod) {\\n Court storage subcourt = courts[_subcourtID];\\n children = subcourt.children;\\n timesPerPeriod = subcourt.timesPerPeriod;\\n }\\n\\n /** @dev Gets a specified vote for a specified appeal in a specified dispute.\\n * @param _disputeID The ID of the dispute.\\n * @param _appeal The appeal.\\n * @param _voteID The ID of the vote.\\n * @return account The account for vote.\\n * @return commit The commit for vote.\\n * @return choice The choice for vote.\\n * @return voted True if the account voted, False otherwise.\\n */\\n function getVote(\\n uint256 _disputeID,\\n uint256 _appeal,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Vote storage vote = disputes[_disputeID].votes[_appeal][_voteID];\\n account = vote.account;\\n commit = vote.commit;\\n choice = vote.choice;\\n voted = vote.voted;\\n }\\n\\n /** @dev Gets the vote counter for a specified appeal in a specified dispute.\\n * Note: This function is only to be used by the interface and it won't work if the number of choices is too high.\\n * @param _disputeID The ID of the dispute.\\n * @param _appeal The appeal.\\n * @return winningChoice The winning choice.\\n * @return counts The count.\\n * @return tied Whether the vote tied.\\n * `O(n)` where\\n * `n` is the number of choices of the dispute.\\n */\\n function getVoteCounter(\\n uint256 _disputeID,\\n uint256 _appeal\\n ) external view returns (uint256 winningChoice, uint256[] memory counts, bool tied) {\\n Dispute storage dispute = disputes[_disputeID];\\n VoteCounter storage voteCounter = dispute.voteCounters[_appeal];\\n winningChoice = voteCounter.winningChoice;\\n counts = new uint256[](dispute.numberOfChoices + 1);\\n for (uint256 i = 0; i <= dispute.numberOfChoices; i++) counts[i] = voteCounter.counts[i];\\n tied = voteCounter.tied;\\n }\\n\\n /** @dev Gets a specified dispute's non primitive properties.\\n * @param _disputeID The ID of the dispute.\\n * @return votesLengths The dispute's vote length.\\n * @return tokensAtStakePerJuror The dispute's required tokens at stake per Juror.\\n * @return totalFeesForJurors The dispute's total fees for Jurors.\\n * @return votesInEachRound The dispute's counter of votes made in each round.\\n * @return repartitionsInEachRound The dispute's counter of vote reward repartitions made in each round.\\n * @return penaltiesInEachRound The dispute's amount of tokens collected from penalties in each round.\\n * `O(a)` where\\n * `a` is the number of appeals of the dispute.\\n */\\n function getDispute(\\n uint256 _disputeID\\n )\\n external\\n view\\n returns (\\n uint256[] memory votesLengths,\\n uint256[] memory tokensAtStakePerJuror,\\n uint256[] memory totalFeesForJurors,\\n uint256[] memory votesInEachRound,\\n uint256[] memory repartitionsInEachRound,\\n uint256[] memory penaltiesInEachRound\\n )\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n votesLengths = new uint256[](dispute.votes.length);\\n for (uint256 i = 0; i < dispute.votes.length; i++) votesLengths[i] = dispute.votes[i].length;\\n tokensAtStakePerJuror = dispute.tokensAtStakePerJuror;\\n totalFeesForJurors = dispute.totalFeesForJurors;\\n votesInEachRound = dispute.votesInEachRound;\\n repartitionsInEachRound = dispute.repartitionsInEachRound;\\n penaltiesInEachRound = dispute.penaltiesInEachRound;\\n }\\n\\n /** @dev Gets a specified juror's non primitive properties.\\n * @param _account The address of the juror.\\n * @return subcourtIDs The juror's IDs of subcourts where the juror has stake path.\\n */\\n function getJuror(address _account) external view returns (uint96[] memory subcourtIDs) {\\n Juror storage juror = jurors[_account];\\n subcourtIDs = juror.subcourtIDs;\\n }\\n\\n /** @dev Gets the stake of a specified juror in a specified subcourt.\\n * @param _account The address of the juror.\\n * @param _subcourtID The ID of the subcourt.\\n * @return stake The stake.\\n */\\n function stakeOf(address _account, uint96 _subcourtID) external view returns (uint256 stake) {\\n return\\n sortitionSumTrees.stakeOf(\\n bytes32(uint256(_subcourtID)),\\n accountAndSubcourtIDToStakePathID(_account, _subcourtID)\\n );\\n }\\n}\\n\",\"keccak256\":\"0x3dcdb8741f6ef181e21ecfe20c91af0eba52f300d4f3b534b6ae9e2210e33138\",\"license\":\"MIT\"},\"src/libraries/SortitionSumTreeFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@epiqueras, @unknownunknown1]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity ^0.8;\\n\\n/**\\n * @title SortitionSumTreeFactory\\n * @author Enrique Piqueras - \\n * @dev A factory of trees that keep track of staked values for sortition.\\n */\\nlibrary SortitionSumTreeFactory {\\n /* Structs */\\n\\n struct SortitionSumTree {\\n uint K; // The maximum number of childs per node.\\n // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around.\\n uint[] stack;\\n uint[] nodes;\\n // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node.\\n mapping(bytes32 => uint) IDsToNodeIndexes;\\n mapping(uint => bytes32) nodeIndexesToIDs;\\n }\\n\\n /* Storage */\\n\\n struct SortitionSumTrees {\\n mapping(bytes32 => SortitionSumTree) sortitionSumTrees;\\n }\\n\\n /* Public */\\n\\n /**\\n * @dev Create a sortition sum tree at the specified key.\\n * @param _key The key of the new tree.\\n * @param _K The number of children each node in the tree should have.\\n */\\n function createTree(SortitionSumTrees storage self, bytes32 _key, uint _K) public {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n require(tree.K == 0, \\\"Tree already exists.\\\");\\n require(_K > 1, \\\"K must be greater than one.\\\");\\n tree.K = _K;\\n tree.nodes.push(0);\\n }\\n\\n /**\\n * @dev Set a value of a tree.\\n * @param _key The key of the tree.\\n * @param _value The new value.\\n * @param _ID The ID of the value.\\n * `O(log_k(n))` where\\n * `k` is the maximum number of childs per node in the tree,\\n * and `n` is the maximum number of nodes ever appended.\\n */\\n function set(SortitionSumTrees storage self, bytes32 _key, uint _value, bytes32 _ID) public {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n uint treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n if (treeIndex == 0) {\\n // No existing node.\\n if (_value != 0) {\\n // Non zero value.\\n // Append.\\n // Add node.\\n if (tree.stack.length == 0) {\\n // No vacant spots.\\n // Get the index and append the value.\\n treeIndex = tree.nodes.length;\\n tree.nodes.push(_value);\\n\\n // Potentially append a new node and make the parent a sum node.\\n if (treeIndex != 1 && (treeIndex - 1) % tree.K == 0) {\\n // Is first child.\\n uint parentIndex = treeIndex / tree.K;\\n bytes32 parentID = tree.nodeIndexesToIDs[parentIndex];\\n uint newIndex = treeIndex + 1;\\n tree.nodes.push(tree.nodes[parentIndex]);\\n delete tree.nodeIndexesToIDs[parentIndex];\\n tree.IDsToNodeIndexes[parentID] = newIndex;\\n tree.nodeIndexesToIDs[newIndex] = parentID;\\n }\\n } else {\\n // Some vacant spot.\\n // Pop the stack and append the value.\\n treeIndex = tree.stack[tree.stack.length - 1];\\n tree.stack.pop();\\n tree.nodes[treeIndex] = _value;\\n }\\n\\n // Add label.\\n tree.IDsToNodeIndexes[_ID] = treeIndex;\\n tree.nodeIndexesToIDs[treeIndex] = _ID;\\n\\n updateParents(self, _key, treeIndex, true, _value);\\n }\\n } else {\\n // Existing node.\\n if (_value == 0) {\\n // Zero value.\\n // Remove.\\n // Remember value and set to 0.\\n uint value = tree.nodes[treeIndex];\\n tree.nodes[treeIndex] = 0;\\n\\n // Push to stack.\\n tree.stack.push(treeIndex);\\n\\n // Clear label.\\n delete tree.IDsToNodeIndexes[_ID];\\n delete tree.nodeIndexesToIDs[treeIndex];\\n\\n updateParents(self, _key, treeIndex, false, value);\\n } else if (_value != tree.nodes[treeIndex]) {\\n // New, non zero value.\\n // Set.\\n bool plusOrMinus = tree.nodes[treeIndex] <= _value;\\n uint plusOrMinusValue = plusOrMinus ? _value - tree.nodes[treeIndex] : tree.nodes[treeIndex] - _value;\\n tree.nodes[treeIndex] = _value;\\n\\n updateParents(self, _key, treeIndex, plusOrMinus, plusOrMinusValue);\\n }\\n }\\n }\\n\\n /* Public Views */\\n\\n /**\\n * @dev Query the leaves of a tree. Note that if `startIndex == 0`, the tree is empty and the root node will be returned.\\n * @param _key The key of the tree to get the leaves from.\\n * @param _cursor The pagination cursor.\\n * @param _count The number of items to return.\\n * @return startIndex The index at which leaves start.\\n * @return values The values of the returned leaves.\\n * @return hasMore Whether there are more for pagination.\\n * `O(n)` where\\n * `n` is the maximum number of nodes ever appended.\\n */\\n function queryLeafs(\\n SortitionSumTrees storage self,\\n bytes32 _key,\\n uint _cursor,\\n uint _count\\n ) public view returns (uint startIndex, uint[] memory values, bool hasMore) {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n\\n // Find the start index.\\n for (uint i = 0; i < tree.nodes.length; i++) {\\n if ((tree.K * i) + 1 >= tree.nodes.length) {\\n startIndex = i;\\n break;\\n }\\n }\\n\\n // Get the values.\\n uint loopStartIndex = startIndex + _cursor;\\n values = new uint[](loopStartIndex + _count > tree.nodes.length ? tree.nodes.length - loopStartIndex : _count);\\n uint valuesIndex = 0;\\n for (uint j = loopStartIndex; j < tree.nodes.length; j++) {\\n if (valuesIndex < _count) {\\n values[valuesIndex] = tree.nodes[j];\\n valuesIndex++;\\n } else {\\n hasMore = true;\\n break;\\n }\\n }\\n }\\n\\n /**\\n * @dev Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.\\n * @param _key The key of the tree.\\n * @param _drawnNumber The drawn number.\\n * @return ID The drawn ID.\\n * `O(k * log_k(n))` where\\n * `k` is the maximum number of childs per node in the tree,\\n * and `n` is the maximum number of nodes ever appended.\\n */\\n function draw(SortitionSumTrees storage self, bytes32 _key, uint _drawnNumber) public view returns (bytes32 ID) {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n uint treeIndex = 0;\\n uint currentDrawnNumber = _drawnNumber % tree.nodes[0];\\n\\n while (\\n (tree.K * treeIndex) + 1 < tree.nodes.length // While it still has children.\\n )\\n for (uint i = 1; i <= tree.K; i++) {\\n // Loop over children.\\n uint nodeIndex = (tree.K * treeIndex) + i;\\n uint nodeValue = tree.nodes[nodeIndex];\\n\\n if (currentDrawnNumber >= nodeValue)\\n currentDrawnNumber -= nodeValue; // Go to the next child.\\n else {\\n // Pick this child.\\n treeIndex = nodeIndex;\\n break;\\n }\\n }\\n\\n ID = tree.nodeIndexesToIDs[treeIndex];\\n }\\n\\n /** @dev Gets a specified ID's associated value.\\n * @param _key The key of the tree.\\n * @param _ID The ID of the value.\\n * @return value The associated value.\\n */\\n function stakeOf(SortitionSumTrees storage self, bytes32 _key, bytes32 _ID) public view returns (uint value) {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n uint treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n if (treeIndex == 0) value = 0;\\n else value = tree.nodes[treeIndex];\\n }\\n\\n /* Private */\\n\\n /**\\n * @dev Update all the parents of a node.\\n * @param _key The key of the tree to update.\\n * @param _treeIndex The index of the node to start from.\\n * @param _plusOrMinus Wether to add (true) or substract (false).\\n * @param _value The value to add or substract.\\n * `O(log_k(n))` where\\n * `k` is the maximum number of childs per node in the tree,\\n * and `n` is the maximum number of nodes ever appended.\\n */\\n function updateParents(\\n SortitionSumTrees storage self,\\n bytes32 _key,\\n uint _treeIndex,\\n bool _plusOrMinus,\\n uint _value\\n ) private {\\n SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n\\n uint parentIndex = _treeIndex;\\n while (parentIndex != 0) {\\n parentIndex = (parentIndex - 1) / tree.K;\\n tree.nodes[parentIndex] = _plusOrMinus\\n ? tree.nodes[parentIndex] + _value\\n : tree.nodes[parentIndex] - _value;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x053af9495cb8382dfc1e1503d8f3dab3d356d664efdbdf534f146ab8f3834e95\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613656806100206000396000f3fe6080604052600436106102df5760003560e01c80638ce7ff4a11610186578063c5e4ccc4116100d7578063e3b0073e11610085578063e3b0073e14610a4c578063e4c0aaf414610a7b578063eaff425a14610a9b578063f48c305414610ab0578063f66d685a14610ac4578063f7434ea914610ade578063fbf405b014610afe57600080fd5b8063c5e4ccc414610927578063ce9e77301461093d578063d4155d1f1461095d578063da682aeb1461098a578063dca5f6b0146109ae578063dd5e5cb5146109fa578063e3a96cbd14610a1a57600080fd5b8063b1c9fe6e11610134578063b1c9fe6e14610800578063b4a616081461082e578063b78a80ff14610843578063b888adfa146108d2578063c057eca7146108e8578063c108f3b4146108fe578063c13517e11461091457600080fd5b80638ce7ff4a146106f45780638d7c7daa1461074057806396d92a72146107605780639929057b146107805780639e72c153146107a0578063a2473cc1146107c0578063a57366e7146107e057600080fd5b806340026c87116102405780635e4a627d116101ee5780635e4a627d146106235780636a4f8f3914610639578063751accd0146106595780637a5de2a914610679578063823cfd7014610699578063840bc19c146106b957806385c855f3146106d457600080fd5b806340026c87146104be57806348b4e924146104ec5780634a3931491461050c578063564a565d1461053c57806357260364146105c357806359354c77146105e35780635bc24dd31461060357600080fd5b80631b92bbbe1161029d5780631b92bbbe146103bb5780631c3db16d146103d15780631f5a0dd2146103f15780632ea7b4d014610448578063311a6c561461045e5780633e1d09be1461047e5780633fc8cef31461049e57600080fd5b8062f5822c146102e4578063023d44df14610306578063034327441461032f57806303438616146103455780630c340a24146103725780630d44cf79146103a5575b600080fd5b3480156102f057600080fd5b506103046102ff366004612d61565b610b1e565b005b34801561031257600080fd5b5061031c60055481565b6040519081526020015b60405180910390f35b34801561033b57600080fd5b5061031c60045481565b34801561035157600080fd5b5061031c610360366004612d7e565b60146020526000908152604090205481565b34801561037e57600080fd5b50600054610398906201000090046001600160a01b031681565b6040516103269190612d97565b3480156103b157600080fd5b5061031c600e5481565b3480156103c757600080fd5b5061031c60085481565b3480156103dd57600080fd5b5061031c6103ec366004612d7e565b610b5d565b3480156103fd57600080fd5b5061041161040c366004612d7e565b610c0c565b604080516001600160601b0390971687529415156020870152938501929092526060840152608083015260a082015260c001610326565b34801561045457600080fd5b5061031c61271081565b34801561046a57600080fd5b50610304610479366004612dab565b610c60565b34801561048a57600080fd5b50610304610499366004612de9565b610e49565b3480156104aa57600080fd5b50601354610398906001600160a01b031681565b3480156104ca57600080fd5b506104de6104d9366004612e13565b611057565b604051610326929190612e69565b3480156104f857600080fd5b50610304610507366004612f40565b61111d565b34801561051857600080fd5b5061052c610527366004613008565b611497565b6040519015158152602001610326565b34801561054857600080fd5b506105af610557366004612d7e565b600f602052600090815260409020805460018201546002830154600384015460088501546009860154600d909601546001600160601b03861696600160601b9096046001600160a01b03169560ff9485169490911688565b60405161032698979695949392919061305f565b3480156105cf57600080fd5b506103046105de3660046130c2565b611596565b3480156105ef57600080fd5b506103046105fe366004612de9565b6115f4565b34801561060f57600080fd5b5061030461061e366004612de9565b611647565b34801561062f57600080fd5b5061031c60065481565b34801561064557600080fd5b50600254610398906001600160a01b031681565b34801561066557600080fd5b50610304610674366004613182565b61169a565b34801561068557600080fd5b50610304610694366004612d61565b61175f565b3480156106a557600080fd5b506103046106b4366004612d7e565b61179e565b3480156106c557600080fd5b5061031c6001600160ff1b0381565b3480156106e057600080fd5b506103046106ef3660046131da565b6117c0565b34801561070057600080fd5b5061071461070f36600461321d565b6117d8565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610326565b34801561074c57600080fd5b50601254610398906001600160a01b031681565b34801561076c57600080fd5b5061030461077b366004612d61565b611863565b34801561078c57600080fd5b5061030461079b366004612d7e565b6119de565b3480156107ac57600080fd5b506103046107bb366004612d61565b611b00565b3480156107cc57600080fd5b5061031c6107db366004613249565b611b3f565b3480156107ec57600080fd5b506103046107fb366004612de9565b611bed565b34801561080c57600080fd5b5060025461082190600160a01b900460ff1681565b6040516103269190613275565b34801561083a57600080fd5b5061031c600481565b34801561084f57600080fd5b5061089c61085e366004612d7e565b600c60205260009081526040902080546001909101546001600160a01b03821691600160a01b90046001600160601b0316906001600160801b031683565b604080516001600160a01b0390941684526001600160601b0390921660208401526001600160801b031690820152606001610326565b3480156108de57600080fd5b5061031c60035481565b3480156108f457600080fd5b5061031c60075481565b34801561090a57600080fd5b5061031c600d5481565b61031c61092236600461328f565b611c40565b34801561093357600080fd5b5061031c60105481565b34801561094957600080fd5b506103046109583660046132d5565b611f88565b34801561096957600080fd5b5061097d610978366004612d61565b6121e4565b604051610326919061334d565b34801561099657600080fd5b5061052c6109a5366004613008565b50600192915050565b3480156109ba57600080fd5b506109e56109c9366004612d61565b6011602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610326565b348015610a0657600080fd5b50610304610a15366004612d7e565b612287565b348015610a2657600080fd5b50610a3a610a35366004612d7e565b6122a9565b6040516103269695949392919061339a565b348015610a5857600080fd5b50610a6c610a67366004612dab565b612521565b6040516103269392919061341c565b348015610a8757600080fd5b50610304610a96366004612d61565b612620565b348015610aa757600080fd5b5061031c600381565b61052c610abe366004612d61565b50600090565b348015610ad057600080fd5b5060095461052c9060ff1681565b348015610aea57600080fd5b5061031c610af9366004613447565b612667565b348015610b0a57600080fd5b50600154610398906001600160a01b031681565b6000546201000090046001600160a01b03163314610b3b57600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600f602052604081206005810154610b8a576000838152601460205260409020549150610c06565b600581018054610b9c90600190613499565b81548110610bac57610bac6134b0565b600091825260209091206002600390920201015460ff16610c0057600581018054610bd990600190613499565b81548110610be957610be96134b0565b906000526020600020906003020160000154610c03565b60005b91505b50919050565b600a8181548110610c1c57600080fd5b60009182526020909120600b90910201805460028201546003830154600484015460058501546006909501546001600160601b03909416955060ff90921693909286565b6010548210610cb65760405162461bcd60e51b815260206004820152601a60248201527f4469737075746520494420646f6573206e6f742065786973742e00000000000060448201526064015b60405180910390fd5b6012546001600160a01b03163314610d105760405162461bcd60e51b815260206004820152601d60248201527f43616e206f6e6c792062652063616c6c656420627920676174657761790000006044820152606401610cad565b6000828152600f60205260409020600d81015460ff1615610d6e5760405162461bcd60e51b8152602060048201526018602482015277293ab634b7339030b63932b0b23c9032bc32b1baba32b21760411b6044820152606401610cad565b600d81018054600160ff19909116179055600083815260146020526040908190208390558154905163188d362b60e11b81526004810185905260248101849052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015610de357600080fd5b505af1158015610df7573d6000803e3d6000fd5b50508254604051858152869350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3505050565b6000546201000090046001600160a01b03163314610e6657600080fd5b6001600160601b0382161580610ed7575080600a80846001600160601b031681548110610e9557610e956134b0565b60009182526020909120600b909102015481546001600160601b03909116908110610ec257610ec26134b0565b90600052602060002090600b02016003015411155b610ee057600080fd5b60005b600a836001600160601b031681548110610eff57610eff6134b0565b90600052602060002090600b0201600101805490508110156110205781600a80856001600160601b031681548110610f3957610f396134b0565b90600052602060002090600b02016001018381548110610f5b57610f5b6134b0565b906000526020600020015481548110610f7657610f766134b0565b90600052602060002090600b020160030154101561100e5760405162461bcd60e51b815260206004820152604960248201527f4120737562636f7572742063616e6e6f742062652074686520706172656e742060448201527f6f66206120737562636f75727420776974682061206c6f776572206d696e696d6064820152683ab69039ba30b5b29760b91b608482015260a401610cad565b80611018816134c6565b915050610ee3565b5080600a836001600160601b03168154811061103e5761103e6134b0565b90600052602060002090600b0201600301819055505050565b6060611061612ca1565b6000600a846001600160601b03168154811061107f5761107f6134b0565b90600052602060002090600b02019050806001018054806020026020016040519081016040528092919081815260200182805480156110dd57602002820191906000526020600020905b8154815260200190600101908083116110c9575b505060408051608081019182905294975060078601935060049250905082845b8154815260200190600101908083116110fd575050505050915050915091565b600054610100900460ff161580801561113d5750600054600160ff909116105b806111575750303b158015611157575060005460ff166001145b6111ba5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610cad565b6000805460ff1916600117905580156111dd576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b038f81169190910291909117909155600180546001600160a01b0319168d83161781556002805460078d905560088c90556001600160a81b031916928d1692909217909155426003556009805460ff19169091179055600d5461125b576001600d555b601280546001600160a01b038086166001600160a01b0319928316179092556013805492851692909116919091179055600a5461144357604080516101008101825260008082528251818152602080820185528084019182528b1515848601528a516060808601919091528b8201516080860152948b015160a0850152938a015160c084015260e08301899052600a8054600181018255925282517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600b90930292830180546001600160601b0319166001600160601b039092169190911781559051805193949193611375937fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a901929190910190612cbf565b50604082015160028201805460ff191691151591909117905560608201516003820155608082015160048083019190915560a0830151600583015560c0830151600683015560e08301516113ce91600784019190612d0a565b505060405163483abc4f60e11b8152600b6004820152600060248201526044810186905273c7e3BF90299f6BD9FA7c3703837A9CAbB57436369150639075789e9060640160006040518083038186803b15801561142a57600080fd5b505af415801561143e573d6000803e3d6000fd5b505050505b8015611489576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60095460009060ff161561158b576001546040516370a0823160e01b815260009184916001600160a01b03909116906370a08231906114da908990600401612d97565b60206040518083038186803b1580156114f257600080fd5b505afa158015611506573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152a91906134e1565b6115349190613499565b6001600160a01b03861660009081526011602052604090206001015490915081108061157a57506001600160a01b03851660009081526011602052604090206002015481105b1561158957600091505061158f565b505b5060015b9392505050565b6000546201000090046001600160a01b031633146115b357600080fd5b80600a836001600160601b0316815481106115d0576115d06134b0565b90600052602060002090600b02016007019060046115ef929190612d0a565b505050565b6000546201000090046001600160a01b0316331461161157600080fd5b80600a836001600160601b03168154811061162e5761162e6134b0565b90600052602060002090600b0201600501819055505050565b6000546201000090046001600160a01b0316331461166457600080fd5b80600a836001600160601b031681548110611681576116816134b0565b90600052602060002090600b0201600401819055505050565b6000546201000090046001600160a01b031633146116b757600080fd5b6000836001600160a01b031683836040516116d29190613526565b60006040518083038185875af1925050503d806000811461170f576040519150601f19603f3d011682016040523d82523d6000602084013e611714565b606091505b50509050806117595760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610cad565b50505050565b6000546201000090046001600160a01b0316331461177c57600080fd5b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546201000090046001600160a01b031633146117bb57600080fd5b600755565b6117cb3383836126ee565b6117d457600080fd5b5050565b6000806000806000600f60008981526020019081526020016000206004018781548110611807576118076134b0565b906000526020600020018681548110611822576118226134b0565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169b909a5091985060ff169650945050505050565b6000546201000090046001600160a01b0316331461188057600080fd5b600280546001600160a01b0319166001600160a01b038316179055600160028054600160a01b900460ff16908111156118bb576118bb613049565b14156119db57600260009054906101000a90046001600160a01b03166001600160a01b0316631c77c58c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561190f57600080fd5b505afa158015611923573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194791906134e1565b600260009054906101000a90046001600160a01b03166001600160a01b03166378ab865d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561199557600080fd5b505afa1580156119a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cd91906134e1565b6119d79190613542565b6005555b50565b60008060028054600160a01b900460ff16908111156119ff576119ff613049565b14611a0957600080fd5b6000600e54600184600d54611a1e9190613542565b611a289190613499565b11611a335782611a4e565b600d54600e54611a439190613499565b611a4e906001613542565b9050600081600d54611a609190613542565b9050600d54811015611a7157600080fd5b600d545b81811015611af7576000818152600c6020526040902080546001820154611ac1916001600160a01b03811691600160a01b9091046001600160601b0316906001600160801b03166126ee565b50506000818152600c6020526040812090815560010180546001600160801b031916905580611aef816134c6565b915050611a75565b50600d55505050565b6000546201000090046001600160a01b03163314611b1d57600080fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b600073c7e3BF90299f6BD9FA7c3703837A9CAbB5743636637521ccb1600b6001600160601b038516611b718787612c10565b6040516001600160e01b031960e086901b16815260048101939093526024830191909152604482015260640160206040518083038186803b158015611bb557600080fd5b505af4158015611bc9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158f91906134e1565b6000546201000090046001600160a01b03163314611c0a57600080fd5b80600a836001600160601b031681548110611c2757611c276134b0565b90600052602060002090600b0201600601819055505050565b60003415611c905760405162461bcd60e51b815260206004820152601b60248201527f466565732073686f756c64206265207061696420696e205745544800000000006044820152606401610cad565b6000611c9b83612667565b6013546040516323b872dd60e01b8152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd90606401602060405180830381600087803b158015611cee57600080fd5b505af1158015611d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d26919061355a565b611d725760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f756768205745544820666f72206172626974726174696f6e006044820152606401610cad565b60108054906000611d82836134c6565b909155506000818152600f6020526040812080546001600160601b031633600160601b0217815591935080611db686612c58565b90925090506000611dc8836001613577565b604080516001600160601b03929092166020830152810183905260600160408051808303601f190181529082905260135460125463a9059cbb60e01b84526001600160a01b03908116600485015260248401899052919350169063a9059cbb90604401602060405180830381600087803b158015611e4557600080fd5b505af1158015611e59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7d919061355a565b611ec95760405162461bcd60e51b815260206004820152601e60248201527f466565207472616e7366657220746f2067617465776179206661696c656400006044820152606401610cad565b60125460405163979f8e6560e01b81526001600160a01b039091169063979f8e6590611efd908b9085908a906004016135ce565b602060405180830381600087803b158015611f1757600080fd5b505af1158015611f2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4f91906134e1565b50604051339087907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a3505050505092915050565b6000546201000090046001600160a01b03163314611fa557600080fd5b85600a896001600160601b031681548110611fc257611fc26134b0565b90600052602060002090600b02016003015411156120585760405162461bcd60e51b815260206004820152604760248201527f4120737562636f7572742063616e6e6f742062652061206368696c64206f662060448201527f6120737562636f7572742077697468206120686967686572206d696e696d756d6064820152661039ba30b5b29760c91b608482015260a401610cad565b600a805460018101825560009182527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600b82020180546001600160601b0319166001600160601b038c1617815590916040519080825280602002602001820160405280156120d1578160200160208202803683370190505b5080516120e8916001840191602090910190612cbf565b5060028101805460ff19168a151517905560038101889055600480820188905560058201879055600682018690556121269060078301908690612d0a565b5060405163483abc4f60e11b8152600b6004820152602481018390526044810184905273c7e3BF90299f6BD9FA7c3703837A9CAbB574363690639075789e9060640160006040518083038186803b15801561218057600080fd5b505af4158015612194573d6000803e3d6000fd5b50505050600a8a6001600160601b0316815481106121b4576121b46134b0565b600091825260208083206001600b9093020182018054928301815583529091200191909155505050505050505050565b6001600160a01b0381166000908152601160209081526040918290208054835181840281018401909452808452606093919283919083018282801561227a57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116122375790505b5050505050915050919050565b6000546201000090046001600160a01b031633146122a457600080fd5b600855565b6000818152600f602052604090206004810154606091829182918291829182916001600160401b038111156122e0576122e0612ebd565b604051908082528060200260200182016040528015612309578160200160208202803683370190505b50965060005b600482015481101561236d57816004018181548110612330576123306134b0565b9060005260206000200180549050888281518110612350576123506134b0565b602090810291909101015280612365816134c6565b91505061230f565b50806006018054806020026020016040519081016040528092919081815260200182805480156123bc57602002820191906000526020600020905b8154815260200190600101908083116123a8575b505050505095508060070180548060200260200160405190810160405280929190818152602001828054801561241157602002820191906000526020600020905b8154815260200190600101908083116123fd575b5050505050945080600a0180548060200260200160405190810160405280929190818152602001828054801561246657602002820191906000526020600020905b815481526020019060010190808311612452575b5050505050935080600b018054806020026020016040519081016040528092919081815260200182805480156124bb57602002820191906000526020600020905b8154815260200190600101908083116124a7575b5050505050925080600c0180548060200260200160405190810160405280929190818152602001828054801561251057602002820191906000526020600020905b8154815260200190600101908083116124fc575b505050505091505091939550919395565b6000828152600f60205260408120600581018054606092849290918391908790811061254f5761254f6134b0565b9060005260206000209060030201905080600001549450816001015460016125779190613542565b6001600160401b0381111561258e5761258e612ebd565b6040519080825280602002602001820160405280156125b7578160200160208202803683370190505b50935060005b8260010154811161260a57600081815260018301602052604090205485518690839081106125ed576125ed6134b0565b602090810291909101015280612602816134c6565b9150506125bd565b506002015493969295505060ff90921692509050565b6000546201000090046001600160a01b0316331461263d57600080fd5b600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b60125460405163f7434ea960e01b81526000916001600160a01b03169063f7434ea9906126989085906004016135f7565b60206040518083038186803b1580156126b057600080fd5b505afa1580156126c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126e891906134e1565b92915050565b600a546000906001600160601b0384161061270b5750600061158f565b6001600160801b03821615806127575750816001600160801b0316600a846001600160601b031681548110612742576127426134b0565b90600052602060002090600b02016003015411155b6127635750600061158f565b6001600160a01b0384166000908152601160205260408120906127868686612c10565b604051637521ccb160e01b8152600b60048201526001600160601b03871660248201526044810182905290915060009073c7e3BF90299f6BD9FA7c3703837A9CAbB574363690637521ccb19060640160206040518083038186803b1580156127ed57600080fd5b505af4158015612801573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282591906134e1565b90506001600160801b038516158061283d5750600081115b80612849575082546004115b612859576000935050505061158f565b6000856001600160801b03168285600101546128759190613499565b61287f9190613542565b90506001600160801b038616158061291557506001546040516370a0823160e01b815282916001600160a01b0316906370a08231906128c2908c90600401612d97565b60206040518083038186803b1580156128da57600080fd5b505afa1580156128ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061291291906134e1565b10155b61292657600094505050505061158f565b600184018190556001600160801b038616612a8b5760005b8454811015612a8557876001600160601b0316856000018281548110612966576129666134b0565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03161415612a7357845485906129a390600190613499565b815481106129b3576129b36134b0565b9060005260206000209060029182820401919006600c029054906101000a90046001600160601b03168560000182815481106129f1576129f16134b0565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555084600001805480612a3d57612a3d61360a565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a02191690559055612a85565b80612a7d816134c6565b91505061293e565b50612acb565b81612acb578354600180820186556000868152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918a16021790555b60006001600160601b0388165b81612ba357604051631712e1c560e11b8152600b6004820152602481018290526001600160801b03891660448201526064810186905273c7e3BF90299f6BD9FA7c3703837A9CAbB574363690632e25c38a9060840160006040518083038186803b158015612b4557600080fd5b505af4158015612b59573d6000803e3d6000fd5b505050508060001415612b6f5760019150612ad8565b600a8181548110612b8257612b826134b0565b60009182526020909120600b90910201546001600160601b03169050612ad8565b604080516001600160601b038b1681526001600160801b038a1660208201529081018490526001600160a01b038b16907f8f753321c98641397daaca5e8abf8881fff1fd7a7bc229924a012e2cb61763d59060600160405180910390a25060019998505050505050505050565b600060405160005b6014811015612c33578481600c011a81830153600101612c18565b5060145b6020811015612c4f5783811a81830153600101612c37565b50519392505050565b6000806040835110612c9557505060208101516040820151600a546001600160601b03831610612c8757600091505b80612c90575060035b915091565b50600090506003915091565b60405180608001604052806004906020820280368337509192915050565b828054828255906000526020600020908101928215612cfa579160200282015b82811115612cfa578251825591602001919060010190612cdf565b50612d06929150612d37565b5090565b8260048101928215612cfa5791602002820182811115612cfa578251825591602001919060010190612cdf565b5b80821115612d065760008155600101612d38565b6001600160a01b03811681146119db57600080fd5b600060208284031215612d7357600080fd5b813561158f81612d4c565b600060208284031215612d9057600080fd5b5035919050565b6001600160a01b0391909116815260200190565b60008060408385031215612dbe57600080fd5b50508035926020909101359150565b80356001600160601b0381168114612de457600080fd5b919050565b60008060408385031215612dfc57600080fd5b612e0583612dcd565b946020939093013593505050565b600060208284031215612e2557600080fd5b61158f82612dcd565b600081518084526020808501945080840160005b83811015612e5e57815187529582019590820190600101612e42565b509495945050505050565b60a081526000612e7c60a0830185612e2e565b905060208083018460005b6004811015612ea457815183529183019190830190600101612e87565b505050509392505050565b80151581146119db57600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f830112612ee457600080fd5b604051608081018181106001600160401b0382111715612f0657612f06612ebd565b604052806080840185811115612f1b57600080fd5b845b81811015612f35578035835260209283019201612f1d565b509195945050505050565b60008060008060008060008060008060006102208c8e031215612f6257600080fd5b8b35612f6d81612d4c565b9a5060208c0135612f7d81612d4c565b995060408c0135612f8d81612d4c565b985060608c0135975060808c0135965060a08c0135612fab81612eaf565b9550612fba8d60c08e01612ed3565b9450612fca8d6101408e01612ed3565b93506101c08c013592506101e08c0135612fe381612d4c565b91506102008c0135612ff481612d4c565b809150509295989b509295989b9093969950565b60008060006060848603121561301d57600080fd5b833561302881612d4c565b9250602084013561303881612d4c565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b6001600160601b03891681526001600160a01b03881660208201526040810187905261010081016005871061309657613096613049565b6060820196909652608081019490945260a084019290925260c0830152151560e0909101529392505050565b60008060a083850312156130d557600080fd5b6130de83612dcd565b91506130ed8460208501612ed3565b90509250929050565b600082601f83011261310757600080fd5b81356001600160401b038082111561312157613121612ebd565b604051601f8301601f19908116603f0116810190828211818310171561314957613149612ebd565b8160405283815286602085880101111561316257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561319757600080fd5b83356131a281612d4c565b92506020840135915060408401356001600160401b038111156131c457600080fd5b6131d0868287016130f6565b9150509250925092565b600080604083850312156131ed57600080fd5b6131f683612dcd565b915060208301356001600160801b038116811461321257600080fd5b809150509250929050565b60008060006060848603121561323257600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561325c57600080fd5b823561326781612d4c565b91506130ed60208401612dcd565b602081016003831061328957613289613049565b91905290565b600080604083850312156132a257600080fd5b8235915060208301356001600160401b038111156132bf57600080fd5b6132cb858286016130f6565b9150509250929050565b600080600080600080600080610160898b0312156132f257600080fd5b6132fb89612dcd565b9750602089013561330b81612eaf565b965060408901359550606089013594506080890135935060a089013592506133368a60c08b01612ed3565b915061014089013590509295985092959890939650565b6020808252825182820181905260009190848201906040850190845b8181101561338e5783516001600160601b031683529284019291840191600101613369565b50909695505050505050565b60c0815260006133ad60c0830189612e2e565b82810360208401526133bf8189612e2e565b905082810360408401526133d38188612e2e565b905082810360608401526133e78187612e2e565b905082810360808401526133fb8186612e2e565b905082810360a084015261340f8185612e2e565b9998505050505050505050565b8381526060602082015260006134356060830185612e2e565b90508215156040830152949350505050565b60006020828403121561345957600080fd5b81356001600160401b0381111561346f57600080fd5b61347b848285016130f6565b949350505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156134ab576134ab613483565b500390565b634e487b7160e01b600052603260045260246000fd5b60006000198214156134da576134da613483565b5060010190565b6000602082840312156134f357600080fd5b5051919050565b60005b838110156135155781810151838201526020016134fd565b838111156117595750506000910152565b600082516135388184602087016134fa565b9190910192915050565b6000821982111561355557613555613483565b500190565b60006020828403121561356c57600080fd5b815161158f81612eaf565b60006001600160601b0380831681851680830382111561359957613599613483565b01949350505050565b600081518084526135ba8160208601602086016134fa565b601f01601f19169290920160200192915050565b8381526060602082015260006135e760608301856135a2565b9050826040830152949350505050565b60208152600061158f60208301846135a2565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208c24f0dc5c862abcfbeb5d7abaf80f855b2bfba8e446fb9c2aa2b7b83edd554e64736f6c63430008090033", - "deployedBytecode": "0x6080604052600436106102df5760003560e01c80638ce7ff4a11610186578063c5e4ccc4116100d7578063e3b0073e11610085578063e3b0073e14610a4c578063e4c0aaf414610a7b578063eaff425a14610a9b578063f48c305414610ab0578063f66d685a14610ac4578063f7434ea914610ade578063fbf405b014610afe57600080fd5b8063c5e4ccc414610927578063ce9e77301461093d578063d4155d1f1461095d578063da682aeb1461098a578063dca5f6b0146109ae578063dd5e5cb5146109fa578063e3a96cbd14610a1a57600080fd5b8063b1c9fe6e11610134578063b1c9fe6e14610800578063b4a616081461082e578063b78a80ff14610843578063b888adfa146108d2578063c057eca7146108e8578063c108f3b4146108fe578063c13517e11461091457600080fd5b80638ce7ff4a146106f45780638d7c7daa1461074057806396d92a72146107605780639929057b146107805780639e72c153146107a0578063a2473cc1146107c0578063a57366e7146107e057600080fd5b806340026c87116102405780635e4a627d116101ee5780635e4a627d146106235780636a4f8f3914610639578063751accd0146106595780637a5de2a914610679578063823cfd7014610699578063840bc19c146106b957806385c855f3146106d457600080fd5b806340026c87146104be57806348b4e924146104ec5780634a3931491461050c578063564a565d1461053c57806357260364146105c357806359354c77146105e35780635bc24dd31461060357600080fd5b80631b92bbbe1161029d5780631b92bbbe146103bb5780631c3db16d146103d15780631f5a0dd2146103f15780632ea7b4d014610448578063311a6c561461045e5780633e1d09be1461047e5780633fc8cef31461049e57600080fd5b8062f5822c146102e4578063023d44df14610306578063034327441461032f57806303438616146103455780630c340a24146103725780630d44cf79146103a5575b600080fd5b3480156102f057600080fd5b506103046102ff366004612d61565b610b1e565b005b34801561031257600080fd5b5061031c60055481565b6040519081526020015b60405180910390f35b34801561033b57600080fd5b5061031c60045481565b34801561035157600080fd5b5061031c610360366004612d7e565b60146020526000908152604090205481565b34801561037e57600080fd5b50600054610398906201000090046001600160a01b031681565b6040516103269190612d97565b3480156103b157600080fd5b5061031c600e5481565b3480156103c757600080fd5b5061031c60085481565b3480156103dd57600080fd5b5061031c6103ec366004612d7e565b610b5d565b3480156103fd57600080fd5b5061041161040c366004612d7e565b610c0c565b604080516001600160601b0390971687529415156020870152938501929092526060840152608083015260a082015260c001610326565b34801561045457600080fd5b5061031c61271081565b34801561046a57600080fd5b50610304610479366004612dab565b610c60565b34801561048a57600080fd5b50610304610499366004612de9565b610e49565b3480156104aa57600080fd5b50601354610398906001600160a01b031681565b3480156104ca57600080fd5b506104de6104d9366004612e13565b611057565b604051610326929190612e69565b3480156104f857600080fd5b50610304610507366004612f40565b61111d565b34801561051857600080fd5b5061052c610527366004613008565b611497565b6040519015158152602001610326565b34801561054857600080fd5b506105af610557366004612d7e565b600f602052600090815260409020805460018201546002830154600384015460088501546009860154600d909601546001600160601b03861696600160601b9096046001600160a01b03169560ff9485169490911688565b60405161032698979695949392919061305f565b3480156105cf57600080fd5b506103046105de3660046130c2565b611596565b3480156105ef57600080fd5b506103046105fe366004612de9565b6115f4565b34801561060f57600080fd5b5061030461061e366004612de9565b611647565b34801561062f57600080fd5b5061031c60065481565b34801561064557600080fd5b50600254610398906001600160a01b031681565b34801561066557600080fd5b50610304610674366004613182565b61169a565b34801561068557600080fd5b50610304610694366004612d61565b61175f565b3480156106a557600080fd5b506103046106b4366004612d7e565b61179e565b3480156106c557600080fd5b5061031c6001600160ff1b0381565b3480156106e057600080fd5b506103046106ef3660046131da565b6117c0565b34801561070057600080fd5b5061071461070f36600461321d565b6117d8565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610326565b34801561074c57600080fd5b50601254610398906001600160a01b031681565b34801561076c57600080fd5b5061030461077b366004612d61565b611863565b34801561078c57600080fd5b5061030461079b366004612d7e565b6119de565b3480156107ac57600080fd5b506103046107bb366004612d61565b611b00565b3480156107cc57600080fd5b5061031c6107db366004613249565b611b3f565b3480156107ec57600080fd5b506103046107fb366004612de9565b611bed565b34801561080c57600080fd5b5060025461082190600160a01b900460ff1681565b6040516103269190613275565b34801561083a57600080fd5b5061031c600481565b34801561084f57600080fd5b5061089c61085e366004612d7e565b600c60205260009081526040902080546001909101546001600160a01b03821691600160a01b90046001600160601b0316906001600160801b031683565b604080516001600160a01b0390941684526001600160601b0390921660208401526001600160801b031690820152606001610326565b3480156108de57600080fd5b5061031c60035481565b3480156108f457600080fd5b5061031c60075481565b34801561090a57600080fd5b5061031c600d5481565b61031c61092236600461328f565b611c40565b34801561093357600080fd5b5061031c60105481565b34801561094957600080fd5b506103046109583660046132d5565b611f88565b34801561096957600080fd5b5061097d610978366004612d61565b6121e4565b604051610326919061334d565b34801561099657600080fd5b5061052c6109a5366004613008565b50600192915050565b3480156109ba57600080fd5b506109e56109c9366004612d61565b6011602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610326565b348015610a0657600080fd5b50610304610a15366004612d7e565b612287565b348015610a2657600080fd5b50610a3a610a35366004612d7e565b6122a9565b6040516103269695949392919061339a565b348015610a5857600080fd5b50610a6c610a67366004612dab565b612521565b6040516103269392919061341c565b348015610a8757600080fd5b50610304610a96366004612d61565b612620565b348015610aa757600080fd5b5061031c600381565b61052c610abe366004612d61565b50600090565b348015610ad057600080fd5b5060095461052c9060ff1681565b348015610aea57600080fd5b5061031c610af9366004613447565b612667565b348015610b0a57600080fd5b50600154610398906001600160a01b031681565b6000546201000090046001600160a01b03163314610b3b57600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600f602052604081206005810154610b8a576000838152601460205260409020549150610c06565b600581018054610b9c90600190613499565b81548110610bac57610bac6134b0565b600091825260209091206002600390920201015460ff16610c0057600581018054610bd990600190613499565b81548110610be957610be96134b0565b906000526020600020906003020160000154610c03565b60005b91505b50919050565b600a8181548110610c1c57600080fd5b60009182526020909120600b90910201805460028201546003830154600484015460058501546006909501546001600160601b03909416955060ff90921693909286565b6010548210610cb65760405162461bcd60e51b815260206004820152601a60248201527f4469737075746520494420646f6573206e6f742065786973742e00000000000060448201526064015b60405180910390fd5b6012546001600160a01b03163314610d105760405162461bcd60e51b815260206004820152601d60248201527f43616e206f6e6c792062652063616c6c656420627920676174657761790000006044820152606401610cad565b6000828152600f60205260409020600d81015460ff1615610d6e5760405162461bcd60e51b8152602060048201526018602482015277293ab634b7339030b63932b0b23c9032bc32b1baba32b21760411b6044820152606401610cad565b600d81018054600160ff19909116179055600083815260146020526040908190208390558154905163188d362b60e11b81526004810185905260248101849052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015610de357600080fd5b505af1158015610df7573d6000803e3d6000fd5b50508254604051858152869350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3505050565b6000546201000090046001600160a01b03163314610e6657600080fd5b6001600160601b0382161580610ed7575080600a80846001600160601b031681548110610e9557610e956134b0565b60009182526020909120600b909102015481546001600160601b03909116908110610ec257610ec26134b0565b90600052602060002090600b02016003015411155b610ee057600080fd5b60005b600a836001600160601b031681548110610eff57610eff6134b0565b90600052602060002090600b0201600101805490508110156110205781600a80856001600160601b031681548110610f3957610f396134b0565b90600052602060002090600b02016001018381548110610f5b57610f5b6134b0565b906000526020600020015481548110610f7657610f766134b0565b90600052602060002090600b020160030154101561100e5760405162461bcd60e51b815260206004820152604960248201527f4120737562636f7572742063616e6e6f742062652074686520706172656e742060448201527f6f66206120737562636f75727420776974682061206c6f776572206d696e696d6064820152683ab69039ba30b5b29760b91b608482015260a401610cad565b80611018816134c6565b915050610ee3565b5080600a836001600160601b03168154811061103e5761103e6134b0565b90600052602060002090600b0201600301819055505050565b6060611061612ca1565b6000600a846001600160601b03168154811061107f5761107f6134b0565b90600052602060002090600b02019050806001018054806020026020016040519081016040528092919081815260200182805480156110dd57602002820191906000526020600020905b8154815260200190600101908083116110c9575b505060408051608081019182905294975060078601935060049250905082845b8154815260200190600101908083116110fd575050505050915050915091565b600054610100900460ff161580801561113d5750600054600160ff909116105b806111575750303b158015611157575060005460ff166001145b6111ba5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610cad565b6000805460ff1916600117905580156111dd576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b038f81169190910291909117909155600180546001600160a01b0319168d83161781556002805460078d905560088c90556001600160a81b031916928d1692909217909155426003556009805460ff19169091179055600d5461125b576001600d555b601280546001600160a01b038086166001600160a01b0319928316179092556013805492851692909116919091179055600a5461144357604080516101008101825260008082528251818152602080820185528084019182528b1515848601528a516060808601919091528b8201516080860152948b015160a0850152938a015160c084015260e08301899052600a8054600181018255925282517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600b90930292830180546001600160601b0319166001600160601b039092169190911781559051805193949193611375937fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a901929190910190612cbf565b50604082015160028201805460ff191691151591909117905560608201516003820155608082015160048083019190915560a0830151600583015560c0830151600683015560e08301516113ce91600784019190612d0a565b505060405163483abc4f60e11b8152600b6004820152600060248201526044810186905273__$9b1aa2a5defb7a13dc220b13d2e6a83a6b$__9150639075789e9060640160006040518083038186803b15801561142a57600080fd5b505af415801561143e573d6000803e3d6000fd5b505050505b8015611489576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60095460009060ff161561158b576001546040516370a0823160e01b815260009184916001600160a01b03909116906370a08231906114da908990600401612d97565b60206040518083038186803b1580156114f257600080fd5b505afa158015611506573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152a91906134e1565b6115349190613499565b6001600160a01b03861660009081526011602052604090206001015490915081108061157a57506001600160a01b03851660009081526011602052604090206002015481105b1561158957600091505061158f565b505b5060015b9392505050565b6000546201000090046001600160a01b031633146115b357600080fd5b80600a836001600160601b0316815481106115d0576115d06134b0565b90600052602060002090600b02016007019060046115ef929190612d0a565b505050565b6000546201000090046001600160a01b0316331461161157600080fd5b80600a836001600160601b03168154811061162e5761162e6134b0565b90600052602060002090600b0201600501819055505050565b6000546201000090046001600160a01b0316331461166457600080fd5b80600a836001600160601b031681548110611681576116816134b0565b90600052602060002090600b0201600401819055505050565b6000546201000090046001600160a01b031633146116b757600080fd5b6000836001600160a01b031683836040516116d29190613526565b60006040518083038185875af1925050503d806000811461170f576040519150601f19603f3d011682016040523d82523d6000602084013e611714565b606091505b50509050806117595760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610cad565b50505050565b6000546201000090046001600160a01b0316331461177c57600080fd5b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546201000090046001600160a01b031633146117bb57600080fd5b600755565b6117cb3383836126ee565b6117d457600080fd5b5050565b6000806000806000600f60008981526020019081526020016000206004018781548110611807576118076134b0565b906000526020600020018681548110611822576118226134b0565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169b909a5091985060ff169650945050505050565b6000546201000090046001600160a01b0316331461188057600080fd5b600280546001600160a01b0319166001600160a01b038316179055600160028054600160a01b900460ff16908111156118bb576118bb613049565b14156119db57600260009054906101000a90046001600160a01b03166001600160a01b0316631c77c58c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561190f57600080fd5b505afa158015611923573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194791906134e1565b600260009054906101000a90046001600160a01b03166001600160a01b03166378ab865d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561199557600080fd5b505afa1580156119a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cd91906134e1565b6119d79190613542565b6005555b50565b60008060028054600160a01b900460ff16908111156119ff576119ff613049565b14611a0957600080fd5b6000600e54600184600d54611a1e9190613542565b611a289190613499565b11611a335782611a4e565b600d54600e54611a439190613499565b611a4e906001613542565b9050600081600d54611a609190613542565b9050600d54811015611a7157600080fd5b600d545b81811015611af7576000818152600c6020526040902080546001820154611ac1916001600160a01b03811691600160a01b9091046001600160601b0316906001600160801b03166126ee565b50506000818152600c6020526040812090815560010180546001600160801b031916905580611aef816134c6565b915050611a75565b50600d55505050565b6000546201000090046001600160a01b03163314611b1d57600080fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b600073__$9b1aa2a5defb7a13dc220b13d2e6a83a6b$__637521ccb1600b6001600160601b038516611b718787612c10565b6040516001600160e01b031960e086901b16815260048101939093526024830191909152604482015260640160206040518083038186803b158015611bb557600080fd5b505af4158015611bc9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158f91906134e1565b6000546201000090046001600160a01b03163314611c0a57600080fd5b80600a836001600160601b031681548110611c2757611c276134b0565b90600052602060002090600b0201600601819055505050565b60003415611c905760405162461bcd60e51b815260206004820152601b60248201527f466565732073686f756c64206265207061696420696e205745544800000000006044820152606401610cad565b6000611c9b83612667565b6013546040516323b872dd60e01b8152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd90606401602060405180830381600087803b158015611cee57600080fd5b505af1158015611d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d26919061355a565b611d725760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f756768205745544820666f72206172626974726174696f6e006044820152606401610cad565b60108054906000611d82836134c6565b909155506000818152600f6020526040812080546001600160601b031633600160601b0217815591935080611db686612c58565b90925090506000611dc8836001613577565b604080516001600160601b03929092166020830152810183905260600160408051808303601f190181529082905260135460125463a9059cbb60e01b84526001600160a01b03908116600485015260248401899052919350169063a9059cbb90604401602060405180830381600087803b158015611e4557600080fd5b505af1158015611e59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7d919061355a565b611ec95760405162461bcd60e51b815260206004820152601e60248201527f466565207472616e7366657220746f2067617465776179206661696c656400006044820152606401610cad565b60125460405163979f8e6560e01b81526001600160a01b039091169063979f8e6590611efd908b9085908a906004016135ce565b602060405180830381600087803b158015611f1757600080fd5b505af1158015611f2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4f91906134e1565b50604051339087907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a3505050505092915050565b6000546201000090046001600160a01b03163314611fa557600080fd5b85600a896001600160601b031681548110611fc257611fc26134b0565b90600052602060002090600b02016003015411156120585760405162461bcd60e51b815260206004820152604760248201527f4120737562636f7572742063616e6e6f742062652061206368696c64206f662060448201527f6120737562636f7572742077697468206120686967686572206d696e696d756d6064820152661039ba30b5b29760c91b608482015260a401610cad565b600a805460018101825560009182527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600b82020180546001600160601b0319166001600160601b038c1617815590916040519080825280602002602001820160405280156120d1578160200160208202803683370190505b5080516120e8916001840191602090910190612cbf565b5060028101805460ff19168a151517905560038101889055600480820188905560058201879055600682018690556121269060078301908690612d0a565b5060405163483abc4f60e11b8152600b6004820152602481018390526044810184905273__$9b1aa2a5defb7a13dc220b13d2e6a83a6b$__90639075789e9060640160006040518083038186803b15801561218057600080fd5b505af4158015612194573d6000803e3d6000fd5b50505050600a8a6001600160601b0316815481106121b4576121b46134b0565b600091825260208083206001600b9093020182018054928301815583529091200191909155505050505050505050565b6001600160a01b0381166000908152601160209081526040918290208054835181840281018401909452808452606093919283919083018282801561227a57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116122375790505b5050505050915050919050565b6000546201000090046001600160a01b031633146122a457600080fd5b600855565b6000818152600f602052604090206004810154606091829182918291829182916001600160401b038111156122e0576122e0612ebd565b604051908082528060200260200182016040528015612309578160200160208202803683370190505b50965060005b600482015481101561236d57816004018181548110612330576123306134b0565b9060005260206000200180549050888281518110612350576123506134b0565b602090810291909101015280612365816134c6565b91505061230f565b50806006018054806020026020016040519081016040528092919081815260200182805480156123bc57602002820191906000526020600020905b8154815260200190600101908083116123a8575b505050505095508060070180548060200260200160405190810160405280929190818152602001828054801561241157602002820191906000526020600020905b8154815260200190600101908083116123fd575b5050505050945080600a0180548060200260200160405190810160405280929190818152602001828054801561246657602002820191906000526020600020905b815481526020019060010190808311612452575b5050505050935080600b018054806020026020016040519081016040528092919081815260200182805480156124bb57602002820191906000526020600020905b8154815260200190600101908083116124a7575b5050505050925080600c0180548060200260200160405190810160405280929190818152602001828054801561251057602002820191906000526020600020905b8154815260200190600101908083116124fc575b505050505091505091939550919395565b6000828152600f60205260408120600581018054606092849290918391908790811061254f5761254f6134b0565b9060005260206000209060030201905080600001549450816001015460016125779190613542565b6001600160401b0381111561258e5761258e612ebd565b6040519080825280602002602001820160405280156125b7578160200160208202803683370190505b50935060005b8260010154811161260a57600081815260018301602052604090205485518690839081106125ed576125ed6134b0565b602090810291909101015280612602816134c6565b9150506125bd565b506002015493969295505060ff90921692509050565b6000546201000090046001600160a01b0316331461263d57600080fd5b600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b60125460405163f7434ea960e01b81526000916001600160a01b03169063f7434ea9906126989085906004016135f7565b60206040518083038186803b1580156126b057600080fd5b505afa1580156126c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126e891906134e1565b92915050565b600a546000906001600160601b0384161061270b5750600061158f565b6001600160801b03821615806127575750816001600160801b0316600a846001600160601b031681548110612742576127426134b0565b90600052602060002090600b02016003015411155b6127635750600061158f565b6001600160a01b0384166000908152601160205260408120906127868686612c10565b604051637521ccb160e01b8152600b60048201526001600160601b03871660248201526044810182905290915060009073__$9b1aa2a5defb7a13dc220b13d2e6a83a6b$__90637521ccb19060640160206040518083038186803b1580156127ed57600080fd5b505af4158015612801573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282591906134e1565b90506001600160801b038516158061283d5750600081115b80612849575082546004115b612859576000935050505061158f565b6000856001600160801b03168285600101546128759190613499565b61287f9190613542565b90506001600160801b038616158061291557506001546040516370a0823160e01b815282916001600160a01b0316906370a08231906128c2908c90600401612d97565b60206040518083038186803b1580156128da57600080fd5b505afa1580156128ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061291291906134e1565b10155b61292657600094505050505061158f565b600184018190556001600160801b038616612a8b5760005b8454811015612a8557876001600160601b0316856000018281548110612966576129666134b0565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03161415612a7357845485906129a390600190613499565b815481106129b3576129b36134b0565b9060005260206000209060029182820401919006600c029054906101000a90046001600160601b03168560000182815481106129f1576129f16134b0565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555084600001805480612a3d57612a3d61360a565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a02191690559055612a85565b80612a7d816134c6565b91505061293e565b50612acb565b81612acb578354600180820186556000868152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918a16021790555b60006001600160601b0388165b81612ba357604051631712e1c560e11b8152600b6004820152602481018290526001600160801b03891660448201526064810186905273__$9b1aa2a5defb7a13dc220b13d2e6a83a6b$__90632e25c38a9060840160006040518083038186803b158015612b4557600080fd5b505af4158015612b59573d6000803e3d6000fd5b505050508060001415612b6f5760019150612ad8565b600a8181548110612b8257612b826134b0565b60009182526020909120600b90910201546001600160601b03169050612ad8565b604080516001600160601b038b1681526001600160801b038a1660208201529081018490526001600160a01b038b16907f8f753321c98641397daaca5e8abf8881fff1fd7a7bc229924a012e2cb61763d59060600160405180910390a25060019998505050505050505050565b600060405160005b6014811015612c33578481600c011a81830153600101612c18565b5060145b6020811015612c4f5783811a81830153600101612c37565b50519392505050565b6000806040835110612c9557505060208101516040820151600a546001600160601b03831610612c8757600091505b80612c90575060035b915091565b50600090506003915091565b60405180608001604052806004906020820280368337509192915050565b828054828255906000526020600020908101928215612cfa579160200282015b82811115612cfa578251825591602001919060010190612cdf565b50612d06929150612d37565b5090565b8260048101928215612cfa5791602002820182811115612cfa578251825591602001919060010190612cdf565b5b80821115612d065760008155600101612d38565b6001600160a01b03811681146119db57600080fd5b600060208284031215612d7357600080fd5b813561158f81612d4c565b600060208284031215612d9057600080fd5b5035919050565b6001600160a01b0391909116815260200190565b60008060408385031215612dbe57600080fd5b50508035926020909101359150565b80356001600160601b0381168114612de457600080fd5b919050565b60008060408385031215612dfc57600080fd5b612e0583612dcd565b946020939093013593505050565b600060208284031215612e2557600080fd5b61158f82612dcd565b600081518084526020808501945080840160005b83811015612e5e57815187529582019590820190600101612e42565b509495945050505050565b60a081526000612e7c60a0830185612e2e565b905060208083018460005b6004811015612ea457815183529183019190830190600101612e87565b505050509392505050565b80151581146119db57600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f830112612ee457600080fd5b604051608081018181106001600160401b0382111715612f0657612f06612ebd565b604052806080840185811115612f1b57600080fd5b845b81811015612f35578035835260209283019201612f1d565b509195945050505050565b60008060008060008060008060008060006102208c8e031215612f6257600080fd5b8b35612f6d81612d4c565b9a5060208c0135612f7d81612d4c565b995060408c0135612f8d81612d4c565b985060608c0135975060808c0135965060a08c0135612fab81612eaf565b9550612fba8d60c08e01612ed3565b9450612fca8d6101408e01612ed3565b93506101c08c013592506101e08c0135612fe381612d4c565b91506102008c0135612ff481612d4c565b809150509295989b509295989b9093969950565b60008060006060848603121561301d57600080fd5b833561302881612d4c565b9250602084013561303881612d4c565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b6001600160601b03891681526001600160a01b03881660208201526040810187905261010081016005871061309657613096613049565b6060820196909652608081019490945260a084019290925260c0830152151560e0909101529392505050565b60008060a083850312156130d557600080fd5b6130de83612dcd565b91506130ed8460208501612ed3565b90509250929050565b600082601f83011261310757600080fd5b81356001600160401b038082111561312157613121612ebd565b604051601f8301601f19908116603f0116810190828211818310171561314957613149612ebd565b8160405283815286602085880101111561316257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561319757600080fd5b83356131a281612d4c565b92506020840135915060408401356001600160401b038111156131c457600080fd5b6131d0868287016130f6565b9150509250925092565b600080604083850312156131ed57600080fd5b6131f683612dcd565b915060208301356001600160801b038116811461321257600080fd5b809150509250929050565b60008060006060848603121561323257600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561325c57600080fd5b823561326781612d4c565b91506130ed60208401612dcd565b602081016003831061328957613289613049565b91905290565b600080604083850312156132a257600080fd5b8235915060208301356001600160401b038111156132bf57600080fd5b6132cb858286016130f6565b9150509250929050565b600080600080600080600080610160898b0312156132f257600080fd5b6132fb89612dcd565b9750602089013561330b81612eaf565b965060408901359550606089013594506080890135935060a089013592506133368a60c08b01612ed3565b915061014089013590509295985092959890939650565b6020808252825182820181905260009190848201906040850190845b8181101561338e5783516001600160601b031683529284019291840191600101613369565b50909695505050505050565b60c0815260006133ad60c0830189612e2e565b82810360208401526133bf8189612e2e565b905082810360408401526133d38188612e2e565b905082810360608401526133e78187612e2e565b905082810360808401526133fb8186612e2e565b905082810360a084015261340f8185612e2e565b9998505050505050505050565b8381526060602082015260006134356060830185612e2e565b90508215156040830152949350505050565b60006020828403121561345957600080fd5b81356001600160401b0381111561346f57600080fd5b61347b848285016130f6565b949350505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156134ab576134ab613483565b500390565b634e487b7160e01b600052603260045260246000fd5b60006000198214156134da576134da613483565b5060010190565b6000602082840312156134f357600080fd5b5051919050565b60005b838110156135155781810151838201526020016134fd565b838111156117595750506000910152565b600082516135388184602087016134fa565b9190910192915050565b6000821982111561355557613555613483565b500190565b60006020828403121561356c57600080fd5b815161158f81612eaf565b60006001600160601b0380831681851680830382111561359957613599613483565b01949350505050565b600081518084526135ba8160208601602086016134fa565b601f01601f19169290920160200192915050565b8381526060602082015260006135e760608301856135a2565b9050826040830152949350505050565b60208152600061158f60208301846135a2565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208c24f0dc5c862abcfbeb5d7abaf80f855b2bfba8e446fb9c2aa2b7b83edd554e64736f6c63430008090033", - "libraries": { - "SortitionSumTreeFactory": "0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636" - }, - "devdoc": { - "details": "This contract is an adaption of Mainnet's KlerosLiquid (https://github.com/kleros/kleros/blob/69cfbfb2128c29f1625b3a99a3183540772fda08/contracts/kleros/KlerosLiquid.sol) for xDai chain. Notice that variables referring to ETH values in this contract, will hold the native token values of the chain on which xKlerosLiquid is deployed. When this contract gets deployed on xDai chain, ETH variables will hold xDai values.", - "events": { - "Draw(address,uint256,uint256,uint256)": { - "details": "Emitted when a juror is drawn.", - "params": { - "_address": "The drawn address.", - "_appeal": "The appeal the draw is for. 0 is for the first round.", - "_disputeID": "The ID of the dispute.", - "_voteID": "The vote ID." - } - }, - "NewPeriod(uint256,uint8)": { - "details": "Emitted when a dispute passes to a new period.", - "params": { - "_disputeID": "The ID of the dispute.", - "_period": "The new period." - } - }, - "NewPhase(uint8)": { - "details": "Emitted when we pass to a new phase.", - "params": { - "_phase": "The new phase." - } - }, - "StakeSet(address,uint256,uint128,uint256)": { - "details": "Emitted when a juror's stake is set.", - "params": { - "_address": "The address of the juror.", - "_newTotalStake": "The new total stake.", - "_stake": "The new stake.", - "_subcourtID": "The ID of the subcourt at the end of the stake path." - } - }, - "TokenAndETHShift(address,uint256,int256,int256)": { - "details": "Emitted when a juror wins or loses tokens and ETH from a dispute.", - "params": { - "_ETHAmount": "The amount of ETH won or lost.", - "_address": "The juror affected.", - "_disputeID": "The ID of the dispute.", - "_tokenAmount": "The amount of tokens won or lost." - } - } - }, - "kind": "dev", - "methods": { - "arbitrationCost(bytes)": { - "details": "Gets the cost of arbitration in a specified subcourt.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes) and the minimum number of jurors required (next 32 bytes)." - }, - "returns": { - "cost": "The cost." - } - }, - "changeForeignGateway(address)": { - "details": "Changes the `foreignGateway` storage variable.", - "params": { - "_foreignGateway": "The new value for the `foreignGateway` storage variable." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "changeMaxDrawingTime(uint256)": { - "details": "Changes the `maxDrawingTime` storage variable.", - "params": { - "_maxDrawingTime": "The new value for the `maxDrawingTime` storage variable." - } - }, - "changeMinStakingTime(uint256)": { - "details": "Changes the `minStakingTime` storage variable.", - "params": { - "_minStakingTime": "The new value for the `minStakingTime` storage variable." - } - }, - "changePinakion(address)": { - "details": "Changes the `pinakion` storage variable.", - "params": { - "_pinakion": "The new value for the `pinakion` storage variable." - } - }, - "changeRNGenerator(address)": { - "details": "Changes the `RNGenerator` storage variable.", - "params": { - "_RNGenerator": "The new value for the `RNGenerator` storage variable." - } - }, - "changeSubcourtAlpha(uint96,uint256)": { - "details": "Changes the `alpha` property value of a specified subcourt.", - "params": { - "_alpha": "The new value for the `alpha` property value.", - "_subcourtID": "The ID of the subcourt." - } - }, - "changeSubcourtJurorFee(uint96,uint256)": { - "details": "Changes the `feeForJuror` property value of a specified subcourt.", - "params": { - "_feeForJuror": "The new value for the `feeForJuror` property value.", - "_subcourtID": "The ID of the subcourt." - } - }, - "changeSubcourtJurorsForJump(uint96,uint256)": { - "details": "Changes the `jurorsForCourtJump` property value of a specified subcourt.", - "params": { - "_jurorsForCourtJump": "The new value for the `jurorsForCourtJump` property value.", - "_subcourtID": "The ID of the subcourt." - } - }, - "changeSubcourtMinStake(uint96,uint256)": { - "details": "Changes the `minStake` property value of a specified subcourt. Don't set to a value lower than its parent's `minStake` property value.", - "params": { - "_minStake": "The new value for the `minStake` property value.", - "_subcourtID": "The ID of the subcourt." - } - }, - "changeSubcourtTimesPerPeriod(uint96,uint256[4])": { - "details": "Changes the `timesPerPeriod` property value of a specified subcourt.", - "params": { - "_subcourtID": "The ID of the subcourt.", - "_timesPerPeriod": "The new value for the `timesPerPeriod` property value." - } - }, - "changeWethAddress(address)": { - "details": "Changes the `weth` storage variable.", - "params": { - "_weth": "The new value for the `weth` storage variable." - } - }, - "createDispute(uint256,bytes)": { - "details": "Creates a dispute. Must be called by the arbitrable contract.", - "params": { - "_extraData": "Additional info about the dispute to be created. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes) and the minimum number of jurors required (next 32 bytes).", - "_numberOfChoices": "Number of choices to choose from in the dispute to be created." - }, - "returns": { - "disputeID": "The ID of the created dispute." - } - }, - "createSubcourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256)": { - "details": "Creates a subcourt under a specified parent court.", - "params": { - "_alpha": "The `alpha` property value of the subcourt.", - "_feeForJuror": "The `feeForJuror` property value of the subcourt.", - "_hiddenVotes": "The `hiddenVotes` property value of the subcourt.", - "_jurorsForCourtJump": "The `jurorsForCourtJump` property value of the subcourt.", - "_minStake": "The `minStake` property value of the subcourt.", - "_parent": "The `parent` property value of the subcourt.", - "_sortitionSumTreeK": "The number of children per node of the subcourt's sortition sum tree.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the subcourt." - } - }, - "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "ruling": "The current ruling." - } - }, - "executeDelayedSetStakes(uint256)": { - "details": "Executes the next delayed set stakes. `O(n)` where `n` is the number of iterations to run.", - "params": { - "_iterations": "The number of delayed set stakes to execute." - } - }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Lets the governor call anything on behalf of the contract.", - "params": { - "_amount": "The value sent with the call.", - "_data": "The data sent with the call.", - "_destination": "The destination of the call." - } - }, - "getDispute(uint256)": { - "details": "Gets a specified dispute's non primitive properties.", - "params": { - "_disputeID": "The ID of the dispute." - }, - "returns": { - "penaltiesInEachRound": "The dispute's amount of tokens collected from penalties in each round. `O(a)` where `a` is the number of appeals of the dispute.", - "repartitionsInEachRound": "The dispute's counter of vote reward repartitions made in each round.", - "tokensAtStakePerJuror": "The dispute's required tokens at stake per Juror.", - "totalFeesForJurors": "The dispute's total fees for Jurors.", - "votesInEachRound": "The dispute's counter of votes made in each round.", - "votesLengths": "The dispute's vote length." - } - }, - "getJuror(address)": { - "details": "Gets a specified juror's non primitive properties.", - "params": { - "_account": "The address of the juror." - }, - "returns": { - "subcourtIDs": "The juror's IDs of subcourts where the juror has stake path." - } - }, - "getSubcourt(uint96)": { - "details": "Gets a specified subcourt's non primitive properties.", - "params": { - "_subcourtID": "The ID of the subcourt." - }, - "returns": { - "children": "The subcourt's child court list.", - "timesPerPeriod": "The subcourt's time per period." - } - }, - "getVote(uint256,uint256,uint256)": { - "details": "Gets a specified vote for a specified appeal in a specified dispute.", - "params": { - "_appeal": "The appeal.", - "_disputeID": "The ID of the dispute.", - "_voteID": "The ID of the vote." - }, - "returns": { - "account": "The account for vote.", - "choice": " The choice for vote.", - "commit": " The commit for vote.", - "voted": "True if the account voted, False otherwise." - } - }, - "getVoteCounter(uint256,uint256)": { - "details": "Gets the vote counter for a specified appeal in a specified dispute. Note: This function is only to be used by the interface and it won't work if the number of choices is too high.", - "params": { - "_appeal": "The appeal.", - "_disputeID": "The ID of the dispute." - }, - "returns": { - "counts": "The count.", - "tied": "Whether the vote tied. `O(n)` where `n` is the number of choices of the dispute.", - "winningChoice": "The winning choice." - } - }, - "initialize(address,address,address,uint256,uint256,bool,uint256[4],uint256[4],uint256,address,address)": { - "details": "Constructs the KlerosLiquid contract.", - "params": { - "_RNGenerator": "The address of the random number generator contract.", - "_courtParameters": "MinStake, alpha, feeForJuror and jurorsForCourtJump respectively.", - "_foreignGateway": "Foreign gateway on xDai.", - "_governor": "The governor's address.", - "_hiddenVotes": "The `hiddenVotes` property value of the general court.", - "_maxDrawingTime": "The maximum time that the drawing phase should last.", - "_minStakingTime": "The minimum time that the staking phase should last.", - "_pinakion": "The address of the token contract.", - "_sortitionSumTreeK": "The number of children per node of the general court's sortition sum tree.", - "_timesPerPeriod": "The `timesPerPeriod` property value of the general court.", - "_weth": "Weth contract." - } - }, - "onApprove(address,address,uint256)": { - "details": "Notifies the controller about an approval allowing the controller to react if desired.", - "params": { - "_amount": "The amount in the `approve()` call.", - "_owner": "The address that calls `approve()`.", - "_spender": "The spender in the `approve()` call." - }, - "returns": { - "allowed": "Whether the operation should be allowed or not." - } - }, - "onTransfer(address,address,uint256)": { - "details": "Notifies the controller about a token transfer allowing the controller to react if desired.", - "params": { - "_amount": "The amount of the transfer.", - "_from": "The origin of the transfer.", - "_to": "The destination of the transfer." - }, - "returns": { - "allowed": "Whether the operation should be allowed or not." - } - }, - "proxyPayment(address)": { - "details": "DEPRECATED. Called when `_owner` sends ETH to the Wrapped Token contract.", - "params": { - "_owner": "The address that sent the ETH to create tokens." - }, - "returns": { - "allowed": "Whether the operation should be allowed or not." - } - }, - "rule(uint256,uint256)": { - "details": "Receive the ruling from foreign gateway which technically is an arbitrator of this contract.", - "params": { - "_disputeID": "ID of the dispute.", - "_ruling": "Ruling given by V2 court and relayed by foreign gateway." - } - }, - "setStake(uint96,uint128)": { - "details": "Sets the caller's stake in a subcourt.", - "params": { - "_stake": "The new stake.", - "_subcourtID": "The ID of the subcourt." - } - }, - "stakeOf(address,uint96)": { - "details": "Gets the stake of a specified juror in a specified subcourt.", - "params": { - "_account": "The address of the juror.", - "_subcourtID": "The ID of the subcourt." - }, - "returns": { - "stake": "The stake." - } - } - }, - "title": "xKlerosLiquidV2", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 143, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 146, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2130, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "governor", - "offset": 2, - "slot": "0", - "type": "t_address" - }, - { - "astId": 2133, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "pinakion", - "offset": 0, - "slot": "1", - "type": "t_contract(WrappedPinakion)1864" - }, - { - "astId": 2136, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "RNGenerator", - "offset": 0, - "slot": "2", - "type": "t_contract(IRandomAuRa)1919" - }, - { - "astId": 2139, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "phase", - "offset": 20, - "slot": "2", - "type": "t_enum(Phase)1960" - }, - { - "astId": 2141, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "lastPhaseChange", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 2143, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "disputesWithoutJurors", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 2145, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "RNBlock", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 2147, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "RN", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 2149, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "minStakingTime", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 2151, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "maxDrawingTime", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 2153, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "lockInsolventTransfers", - "offset": 0, - "slot": "9", - "type": "t_bool" - }, - { - "astId": 2157, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "courts", - "offset": 0, - "slot": "10", - "type": "t_array(t_struct(Court)1986_storage)dyn_storage" - }, - { - "astId": 2164, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "sortitionSumTrees", - "offset": 0, - "slot": "11", - "type": "t_struct(SortitionSumTrees)3785_storage" - }, - { - "astId": 2169, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "delayedSetStakes", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_uint256,t_struct(DelayedSetStake)1993_storage)" - }, - { - "astId": 2171, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "nextDelayedSetStake", - "offset": 0, - "slot": "13", - "type": "t_uint256" - }, - { - "astId": 2173, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "lastDelayedSetStake", - "offset": 0, - "slot": "14", - "type": "t_uint256" - }, - { - "astId": 2178, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "disputes", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_uint256,t_struct(Dispute)2054_storage)" - }, - { - "astId": 2180, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "totalDisputes", - "offset": 0, - "slot": "16", - "type": "t_uint256" - }, - { - "astId": 2185, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "jurors", - "offset": 0, - "slot": "17", - "type": "t_mapping(t_address,t_struct(Juror)2062_storage)" - }, - { - "astId": 2188, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "foreignGateway", - "offset": 0, - "slot": "18", - "type": "t_contract(IForeignGateway)1133" - }, - { - "astId": 2191, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "weth", - "offset": 0, - "slot": "19", - "type": "t_contract(IERC20)383" - }, - { - "astId": 2195, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "disputesRuling", - "offset": 0, - "slot": "20", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_array(t_struct(Vote)2002_storage)dyn_storage)dyn_storage": { - "base": "t_array(t_struct(Vote)2002_storage)dyn_storage", - "encoding": "dynamic_array", - "label": "struct xKlerosLiquidV2.Vote[][]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Court)1986_storage)dyn_storage": { - "base": "t_struct(Court)1986_storage", - "encoding": "dynamic_array", - "label": "struct xKlerosLiquidV2.Court[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)2002_storage)dyn_storage": { - "base": "t_struct(Vote)2002_storage", - "encoding": "dynamic_array", - "label": "struct xKlerosLiquidV2.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(VoteCounter)2011_storage)dyn_storage": { - "base": "t_struct(VoteCounter)2011_storage", - "encoding": "dynamic_array", - "label": "struct xKlerosLiquidV2.VoteCounter[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)4_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[4]", - "numberOfBytes": "128" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_array(t_uint96)dyn_storage": { - "base": "t_uint96", - "encoding": "dynamic_array", - "label": "uint96[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IArbitrable)1048": { - "encoding": "inplace", - "label": "contract IArbitrable", - "numberOfBytes": "20" - }, - "t_contract(IERC20)383": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_contract(IForeignGateway)1133": { - "encoding": "inplace", - "label": "contract IForeignGateway", - "numberOfBytes": "20" - }, - "t_contract(IRandomAuRa)1919": { - "encoding": "inplace", - "label": "contract IRandomAuRa", - "numberOfBytes": "20" - }, - "t_contract(WrappedPinakion)1864": { - "encoding": "inplace", - "label": "contract WrappedPinakion", - "numberOfBytes": "20" - }, - "t_enum(Period)1966": { - "encoding": "inplace", - "label": "enum xKlerosLiquidV2.Period", - "numberOfBytes": "1" - }, - "t_enum(Phase)1960": { - "encoding": "inplace", - "label": "enum xKlerosLiquidV2.Phase", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_struct(Juror)2062_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct xKlerosLiquidV2.Juror)", - "numberOfBytes": "32", - "value": "t_struct(Juror)2062_storage" - }, - "t_mapping(t_bytes32,t_struct(SortitionSumTree)3779_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct SortitionSumTreeFactory.SortitionSumTree)", - "numberOfBytes": "32", - "value": "t_struct(SortitionSumTree)3779_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_bytes32)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bytes32)", - "numberOfBytes": "32", - "value": "t_bytes32" - }, - "t_mapping(t_uint256,t_struct(DelayedSetStake)1993_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct xKlerosLiquidV2.DelayedSetStake)", - "numberOfBytes": "32", - "value": "t_struct(DelayedSetStake)1993_storage" - }, - "t_mapping(t_uint256,t_struct(Dispute)2054_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct xKlerosLiquidV2.Dispute)", - "numberOfBytes": "32", - "value": "t_struct(Dispute)2054_storage" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Court)1986_storage": { - "encoding": "inplace", - "label": "struct xKlerosLiquidV2.Court", - "members": [ - { - "astId": 1968, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "parent", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 1971, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "children", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 1973, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "hiddenVotes", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 1975, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "minStake", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 1977, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "alpha", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 1979, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "feeForJuror", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 1981, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "jurorsForCourtJump", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 1985, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "timesPerPeriod", - "offset": 0, - "slot": "7", - "type": "t_array(t_uint256)4_storage" - } - ], - "numberOfBytes": "352" - }, - "t_struct(DelayedSetStake)1993_storage": { - "encoding": "inplace", - "label": "struct xKlerosLiquidV2.DelayedSetStake", - "members": [ - { - "astId": 1988, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 1990, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "subcourtID", - "offset": 20, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 1992, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "stake", - "offset": 0, - "slot": "1", - "type": "t_uint128" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Dispute)2054_storage": { - "encoding": "inplace", - "label": "struct xKlerosLiquidV2.Dispute", - "members": [ - { - "astId": 2013, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "subcourtID", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 2016, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "arbitrated", - "offset": 12, - "slot": "0", - "type": "t_contract(IArbitrable)1048" - }, - { - "astId": 2018, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 2021, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "period", - "offset": 0, - "slot": "2", - "type": "t_enum(Period)1966" - }, - { - "astId": 2023, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "lastPeriodChange", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 2028, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "votes", - "offset": 0, - "slot": "4", - "type": "t_array(t_array(t_struct(Vote)2002_storage)dyn_storage)dyn_storage" - }, - { - "astId": 2032, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "voteCounters", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(VoteCounter)2011_storage)dyn_storage" - }, - { - "astId": 2035, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "tokensAtStakePerJuror", - "offset": 0, - "slot": "6", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 2038, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "totalFeesForJurors", - "offset": 0, - "slot": "7", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 2040, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "drawsInRound", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 2042, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "commitsInRound", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 2045, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "votesInEachRound", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 2048, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "repartitionsInEachRound", - "offset": 0, - "slot": "11", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 2051, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "penaltiesInEachRound", - "offset": 0, - "slot": "12", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 2053, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "ruled", - "offset": 0, - "slot": "13", - "type": "t_bool" - } - ], - "numberOfBytes": "448" - }, - "t_struct(Juror)2062_storage": { - "encoding": "inplace", - "label": "struct xKlerosLiquidV2.Juror", - "members": [ - { - "astId": 2057, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "subcourtIDs", - "offset": 0, - "slot": "0", - "type": "t_array(t_uint96)dyn_storage" - }, - { - "astId": 2059, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "stakedTokens", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 2061, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "lockedTokens", - "offset": 0, - "slot": "2", - "type": "t_uint256" - } - ], - "numberOfBytes": "96" - }, - "t_struct(SortitionSumTree)3779_storage": { - "encoding": "inplace", - "label": "struct SortitionSumTreeFactory.SortitionSumTree", - "members": [ - { - "astId": 3764, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "K", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 3767, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "stack", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 3770, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "nodes", - "offset": 0, - "slot": "2", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 3774, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "IDsToNodeIndexes", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_bytes32,t_uint256)" - }, - { - "astId": 3778, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "nodeIndexesToIDs", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_bytes32)" - } - ], - "numberOfBytes": "160" - }, - "t_struct(SortitionSumTrees)3785_storage": { - "encoding": "inplace", - "label": "struct SortitionSumTreeFactory.SortitionSumTrees", - "members": [ - { - "astId": 3784, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "sortitionSumTrees", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)3779_storage)" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Vote)2002_storage": { - "encoding": "inplace", - "label": "struct xKlerosLiquidV2.Vote", - "members": [ - { - "astId": 1995, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 1997, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 1999, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 2001, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_struct(VoteCounter)2011_storage": { - "encoding": "inplace", - "label": "struct xKlerosLiquidV2.VoteCounter", - "members": [ - { - "astId": 2004, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "winningChoice", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 2008, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "counts", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 2010, - "contract": "src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol:xKlerosLiquidV2", - "label": "tied", - "offset": 0, - "slot": "2", - "type": "t_bool" - } - ], - "numberOfBytes": "96" - }, - "t_uint128": { - "encoding": "inplace", - "label": "uint128", - "numberOfBytes": "16" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/chiadoDevnet/.chainId b/contracts/deployments/chiadoDevnet/.chainId deleted file mode 100644 index 6cd35a3ed..000000000 --- a/contracts/deployments/chiadoDevnet/.chainId +++ /dev/null @@ -1 +0,0 @@ -10200 \ No newline at end of file diff --git a/contracts/deployments/chiadoDevnet/ArbitrableExample.json b/contracts/deployments/chiadoDevnet/ArbitrableExample.json deleted file mode 100644 index ea0a63770..000000000 --- a/contracts/deployments/chiadoDevnet/ArbitrableExample.json +++ /dev/null @@ -1,618 +0,0 @@ -{ - "address": "0xB56A23b396E0eae85414Ce5815da448ba529Cb4A", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - }, - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_weth", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "string", - "name": "_action", - "type": "string" - } - ], - "name": "Action", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitrableDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "arbitratorExtraData", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - } - ], - "name": "changeArbitratorExtraData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "changeDisputeTemplate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_action", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_feeInWeth", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_action", - "type": "string" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "externalIDtoLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "weth", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x647177d9a07bcca3b9d3c0a418fff45ddc06dab7a0a62e50570f555d52aedf60", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0xB56A23b396E0eae85414Ce5815da448ba529Cb4A", - "transactionIndex": 1, - "gasUsed": "1330807", - "logsBloom": "0x00000000000000000000000000000000000000100000000000000000000000008000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000080000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000002000000400000000000100000000000000000080000000000000000000", - "blockHash": "0x580f4bc2ca36782fba7fcbfe901e10c8a4a3a0d4348dce3ce3b0f00a1e974864", - "transactionHash": "0x647177d9a07bcca3b9d3c0a418fff45ddc06dab7a0a62e50570f555d52aedf60", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 5434042, - "transactionHash": "0x647177d9a07bcca3b9d3c0a418fff45ddc06dab7a0a62e50570f555d52aedf60", - "address": "0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957", - "topics": [ - "0x00f7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff9924", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c6469737075746554656d706c6174654d617070696e673a20544f444f00000000", - "logIndex": 0, - "blockHash": "0x580f4bc2ca36782fba7fcbfe901e10c8a4a3a0d4348dce3ce3b0f00a1e974864" - } - ], - "blockNumber": 5434042, - "cumulativeGasUsed": "1357391", - "status": 1, - "byzantium": true - }, - "args": [ - "0x83F393F2aE68FA6A6701D7c65CBbFf3225f3fDf9", - { - "$schema": "../NewDisputeTemplate.schema.json", - "title": "Let's do this", - "description": "We want to do this: %s", - "question": "Does it comply with the policy?", - "answers": [ - { - "title": "Yes", - "description": "Select this if you agree that it must be done." - }, - { - "title": "No", - "description": "Select this if you do not agree that it must be done." - } - ], - "policyURI": "/ipfs/Qmdvk...rSD6cE/policy.pdf", - "frontendUrl": "https://kleros-v2.netlify.app/#/cases/%s/overview", - "arbitratorChainID": "421613", - "arbitratorAddress": "0xD08Ab99480d02bf9C092828043f611BcDFEA917b", - "category": "Others", - "specification": "KIP001", - "lang": "en_US" - }, - "disputeTemplateMapping: TODO", - "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", - "0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957", - "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8" - ], - "numDeployments": 2, - "solcInputHash": "4a879192e8bde2273db37e489aeff250", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_action\",\"type\":\"string\"}],\"name\":\"Action\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitrableDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbitratorExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"}],\"name\":\"changeArbitratorExtraData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"changeDisputeTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_action\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_feeInWeth\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_action\",\"type\":\"string\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"externalIDtoLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrableDisputeID\":\"The identifier of the dispute in the Arbitrable contract.\",\"_arbitrator\":\"The arbitrator of the contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"The arbitrator to rule on created disputes.\",\"_arbitratorExtraData\":\"The extra data for the arbitrator.\",\"_templateData\":\"The dispute template data.\",\"_templateDataMappings\":\"The dispute template data mappings.\",\"_templateRegistry\":\"The dispute template registry.\",\"_weth\":\"The WETH token.\"}},\"createDispute(string)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_action\":\"The action that requires arbitration.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the dispute created.\"}},\"createDispute(string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_action\":\"The action that requires arbitration.\",\"_feeInWeth\":\"Amount of fees in WETH for the arbitrator.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the dispute created.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_externalDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"ArbitrableExample An example of an arbitrable contract which connects to the arbitator that implements the updated interface.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/ArbitrableExample.sol\":\"ArbitrableExample\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/ArbitrableExample.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\nimport \\\"../../libraries/SafeERC20.sol\\\";\\n\\n/// @title ArbitrableExample\\n/// An example of an arbitrable contract which connects to the arbitator that implements the updated interface.\\ncontract ArbitrableExample is IArbitrableV2 {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bool isRuled; // Whether the dispute has been ruled or not.\\n uint256 ruling; // Ruling given by the arbitrator.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n event Action(string indexed _action);\\n\\n address public immutable governor;\\n IArbitratorV2 public arbitrator; // Arbitrator is set in constructor.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n uint256 public templateId; // The current dispute template identifier.\\n bytes public arbitratorExtraData; // Extra data to set up the arbitration.\\n IERC20 public immutable weth; // The WETH token.\\n mapping(uint256 => uint256) public externalIDtoLocalID; // Maps external (arbitrator side) dispute IDs to local dispute IDs.\\n DisputeStruct[] public disputes; // Stores the disputes' info. disputes[disputeID].\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(this) == msg.sender, \\\"Only the governor allowed.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator The arbitrator to rule on created disputes.\\n /// @param _templateData The dispute template data.\\n /// @param _templateDataMappings The dispute template data mappings.\\n /// @param _arbitratorExtraData The extra data for the arbitrator.\\n /// @param _templateRegistry The dispute template registry.\\n /// @param _weth The WETH token.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n string memory _templateData,\\n string memory _templateDataMappings,\\n bytes memory _arbitratorExtraData,\\n IDisputeTemplateRegistry _templateRegistry,\\n IERC20 _weth\\n ) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n arbitratorExtraData = _arbitratorExtraData;\\n templateRegistry = _templateRegistry;\\n weth = _weth;\\n\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external onlyByGovernor {\\n arbitrator = _arbitrator;\\n }\\n\\n function changeArbitratorExtraData(bytes calldata _arbitratorExtraData) external onlyByGovernor {\\n arbitratorExtraData = _arbitratorExtraData;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external onlyByGovernor {\\n templateRegistry = _templateRegistry;\\n }\\n\\n function changeDisputeTemplate(\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external onlyByGovernor {\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _action The action that requires arbitration.\\n /// @return disputeID Dispute id (on arbitrator side) of the dispute created.\\n function createDispute(string calldata _action) external payable returns (uint256 disputeID) {\\n emit Action(_action);\\n\\n uint256 numberOfRulingOptions = 2;\\n uint256 localDisputeID = disputes.length;\\n disputes.push(DisputeStruct({isRuled: false, ruling: 0, numberOfRulingOptions: numberOfRulingOptions}));\\n\\n disputeID = arbitrator.createDispute{value: msg.value}(numberOfRulingOptions, arbitratorExtraData);\\n externalIDtoLocalID[disputeID] = localDisputeID;\\n\\n uint256 externalDisputeID = uint256(keccak256(abi.encodePacked(_action)));\\n emit DisputeRequest(arbitrator, disputeID, externalDisputeID, templateId, \\\"\\\");\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _action The action that requires arbitration.\\n /// @param _feeInWeth Amount of fees in WETH for the arbitrator.\\n /// @return disputeID Dispute id (on arbitrator side) of the dispute created.\\n function createDispute(string calldata _action, uint256 _feeInWeth) external returns (uint256 disputeID) {\\n emit Action(_action);\\n\\n uint256 numberOfRulingOptions = 2;\\n uint256 localDisputeID = disputes.length;\\n disputes.push(DisputeStruct({isRuled: false, ruling: 0, numberOfRulingOptions: numberOfRulingOptions}));\\n\\n require(weth.safeTransferFrom(msg.sender, address(this), _feeInWeth), \\\"Transfer failed\\\");\\n require(weth.increaseAllowance(address(arbitrator), _feeInWeth), \\\"Allowance increase failed\\\");\\n\\n disputeID = arbitrator.createDispute(numberOfRulingOptions, arbitratorExtraData, weth, _feeInWeth);\\n externalIDtoLocalID[disputeID] = localDisputeID;\\n\\n uint256 externalDisputeID = uint256(keccak256(abi.encodePacked(_action)));\\n emit DisputeRequest(arbitrator, disputeID, externalDisputeID, templateId, \\\"\\\");\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _externalDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _externalDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = externalIDtoLocalID[_externalDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(dispute.isRuled == false, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _externalDisputeID, dispute.ruling);\\n }\\n}\\n\",\"keccak256\":\"0x19d38e04eed4156c108539f5ac7c98af87d1d457ef40b5d52bd1aa592c8b0df3\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x4b1b3f98d13e4a9a1c546dd45f98490f86e871cfc4b4be9a3fe4d29b3c99649c\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x37a19df56a98cd466fb6e70b8c56e13bfc439221bfabd8c5108d36d0e3ffc0e5\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200191a3803806200191a83398101604081905262000034916200020f565b33608052600080546001600160a01b0319166001600160a01b03881617905560036200006184826200037e565b50600180546001600160a01b0319166001600160a01b0384811691821790925590821660a0526040516312a6505d60e21b8152634a99417490620000ac908890889060040162000478565b6020604051808303816000875af1158015620000cc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000f29190620004b8565b60025550620004d2945050505050565b6001600160a01b03811681146200011857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200014e57818101518382015260200162000134565b50506000910152565b60006001600160401b03808411156200017457620001746200011b565b604051601f8501601f19908116603f011681019082821181831017156200019f576200019f6200011b565b81604052809350858152868686011115620001b957600080fd5b620001c986602083018762000131565b5050509392505050565b600082601f830112620001e557600080fd5b620001f68383516020850162000157565b9392505050565b80516200020a8162000102565b919050565b60008060008060008060c087890312156200022957600080fd5b8651620002368162000102565b60208801519096506001600160401b03808211156200025457600080fd5b620002628a838b01620001d3565b965060408901519150808211156200027957600080fd5b620002878a838b01620001d3565b955060608901519150808211156200029e57600080fd5b508701601f81018913620002b157600080fd5b620002c28982516020840162000157565b935050620002d360808801620001fd565b9150620002e360a08801620001fd565b90509295509295509295565b600181811c908216806200030457607f821691505b6020821081036200032557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200037957600081815260208120601f850160051c81016020861015620003545750805b601f850160051c820191505b81811015620003755782815560010162000360565b5050505b505050565b81516001600160401b038111156200039a576200039a6200011b565b620003b281620003ab8454620002ef565b846200032b565b602080601f831160018114620003ea5760008415620003d15750858301515b600019600386901b1c1916600185901b17855562000375565b600085815260208120601f198616915b828110156200041b57888601518255948401946001909101908401620003fa565b50858210156200043a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600081518084526200046481602086016020860162000131565b601f01601f19169290920160200192915050565b60608152600060608201526080602082015260006200049b60808301856200044a565b8281036040840152620004af81856200044a565b95945050505050565b600060208284031215620004cb57600080fd5b5051919050565b60805160a05161140e6200050c60003960008181610194015281816106e40152818161076301526108010152600060df015261140e6000f3fe6080604052600436106100c85760003560e01c8063654692871161007a578063654692871461021357806368175996146102415780636cc6cde1146102545780637aa77f2914610274578063a0af81f01461028a578063c21ae061146102aa578063c5d55288146102d7578063fc548f08146102f757600080fd5b80630c340a24146100cd5780630c7ac7b61461011e578063311a6c561461014057806334e2672d146101625780633fc8cef3146101825780634660ebbe146101b6578063564a565d146101d6575b600080fd5b3480156100d957600080fd5b506101017f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012a57600080fd5b50610133610317565b6040516101159190610e3d565b34801561014c57600080fd5b5061016061015b366004610e57565b6103a5565b005b34801561016e57600080fd5b5061016061017d366004610ec2565b61053e565b34801561018e57600080fd5b506101017f000000000000000000000000000000000000000000000000000000000000000081565b3480156101c257600080fd5b506101606101d1366004610f1c565b61056f565b3480156101e257600080fd5b506101f66101f1366004610f39565b6105b0565b604080519315158452602084019290925290820152606001610115565b34801561021f57600080fd5b5061023361022e366004610f52565b6105e7565b604051908152602001610115565b61023361024f366004610ec2565b61091b565b34801561026057600080fd5b50600054610101906001600160a01b031681565b34801561028057600080fd5b5061023360025481565b34801561029657600080fd5b50600154610101906001600160a01b031681565b3480156102b657600080fd5b506102336102c5366004610f39565b60046020526000908152604090205481565b3480156102e357600080fd5b506101606102f2366004611041565b610b31565b34801561030357600080fd5b50610160610312366004610f1c565b610bcc565b60038054610324906110a5565b80601f0160208091040260200160405190810160405280929190818152602001828054610350906110a5565b801561039d5780601f106103725761010080835404028352916020019161039d565b820191906000526020600020905b81548152906001019060200180831161038057829003601f168201915b505050505081565b60008281526004602052604081205460058054919291839081106103cb576103cb6110df565b600091825260208220915460039190910290910191506001600160a01b0316331461044b5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b80600201548311156104915760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b6044820152606401610442565b805460ff16156104ef5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b6064820152608401610442565b805460ff1916600190811782558101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b30331461055d5760405162461bcd60e51b8152600401610442906110f5565b600361056a82848361117a565b505050565b30331461058e5760405162461bcd60e51b8152600401610442906110f5565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600581815481106105c057600080fd5b600091825260209091206003909102018054600182015460029092015460ff909116925083565b600083836040516105f992919061123b565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f2790600090a2600580546040805160608101825260008082526020820181815260029383018481526001860187559590915290517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db060038502908101805460ff19169215159290921790915590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2909301929092556107147f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316333087610c0d565b6107525760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610442565b60005461078c906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911686610ce9565b6107d45760405162461bcd60e51b8152602060048201526019602482015278105b1b1bddd85b98d9481a5b98dc99585cd94819985a5b1959603a1b6044820152606401610442565b600054604051633d941b6d60e21b81526001600160a01b039091169063f6506db49061082b9085906003907f0000000000000000000000000000000000000000000000000000000000000000908a906004016112c8565b6020604051808303816000875af115801561084a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086e91906112fd565b600081815260046020908152604080832085905551929550909161089691899189910161123b565b60408051601f1981840301815290829052805160209091012060005460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869161090991868252602082015260606040820181905260009082015260800190565b60405180910390a35050509392505050565b6000828260405161092d92919061123b565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f2790600090a26005805460408051606081018252600080825260208201818152600283850181815260018701885596835292517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06003808802918201805460ff19169315159390931790925591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db183015595517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015554915163c13517e160e01b815290936001600160a01b039092169163c13517e1913491610a4291879190600401611316565b60206040518083038185885af1158015610a60573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8591906112fd565b6000818152600460209081526040808320859055519295509091610aad91889188910161123b565b60408051601f1981840301815290829052805160209091012060005460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e2718691610b2091868252602082015260606040820181905260009082015260800190565b60405180910390a350505092915050565b303314610b505760405162461bcd60e51b8152600401610442906110f5565b6001546040516312a6505d60e21b81526001600160a01b0390911690634a99417490610b829085908590600401611337565b6020604051808303816000875af1158015610ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc591906112fd565b6002555050565b303314610beb5760405162461bcd60e51b8152600401610442906110f5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610c729190611373565b6000604051808303816000865af19150503d8060008114610caf576040519150601f19603f3d011682016040523d82523d6000602084013e610cb4565b606091505b5091509150818015610cde575080511580610cde575080806020019051810190610cde919061138f565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063095ea7b39085908590849063dd62ed3e90604401602060405180830381865afa158015610d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6991906112fd565b610d7391906113b1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de2919061138f565b506001949350505050565b60005b83811015610e08578181015183820152602001610df0565b50506000910152565b60008151808452610e29816020860160208601610ded565b601f01601f19169290920160200192915050565b602081526000610e506020830184610e11565b9392505050565b60008060408385031215610e6a57600080fd5b50508035926020909101359150565b60008083601f840112610e8b57600080fd5b50813567ffffffffffffffff811115610ea357600080fd5b602083019150836020828501011115610ebb57600080fd5b9250929050565b60008060208385031215610ed557600080fd5b823567ffffffffffffffff811115610eec57600080fd5b610ef885828601610e79565b90969095509350505050565b6001600160a01b0381168114610f1957600080fd5b50565b600060208284031215610f2e57600080fd5b8135610e5081610f04565b600060208284031215610f4b57600080fd5b5035919050565b600080600060408486031215610f6757600080fd5b833567ffffffffffffffff811115610f7e57600080fd5b610f8a86828701610e79565b909790965060209590950135949350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610fc557600080fd5b813567ffffffffffffffff80821115610fe057610fe0610f9e565b604051601f8301601f19908116603f0116810190828211818310171561100857611008610f9e565b8160405283815286602085880101111561102157600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561105457600080fd5b823567ffffffffffffffff8082111561106c57600080fd5b61107886838701610fb4565b9350602085013591508082111561108e57600080fd5b5061109b85828601610fb4565b9150509250929050565b600181811c908216806110b957607f821691505b6020821081036110d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b6020808252601a908201527f4f6e6c792074686520676f7665726e6f7220616c6c6f7765642e000000000000604082015260600190565b601f82111561056a57600081815260208120601f850160051c810160208610156111535750805b601f850160051c820191505b818110156111725782815560010161115f565b505050505050565b67ffffffffffffffff83111561119257611192610f9e565b6111a6836111a083546110a5565b8361112c565b6000601f8411600181146111da57600085156111c25750838201355b600019600387901b1c1916600186901b178355611234565b600083815260209020601f19861690835b8281101561120b57868501358255602094850194600190920191016111eb565b50868210156112285760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b8183823760009101908152919050565b60008154611258816110a5565b808552602060018381168015611275576001811461128f576112bd565b60ff1985168884015283151560051b8801830195506112bd565b866000528260002060005b858110156112b55781548a820186015290830190840161129a565b890184019650505b505050505092915050565b8481526080602082015260006112e1608083018661124b565b6001600160a01b03949094166040830152506060015292915050565b60006020828403121561130f57600080fd5b5051919050565b82815260406020820152600061132f604083018461124b565b949350505050565b60608152600060608201526080602082015260006113586080830185610e11565b828103604084015261136a8185610e11565b95945050505050565b60008251611385818460208701610ded565b9190910192915050565b6000602082840312156113a157600080fd5b81518015158114610e5057600080fd5b808201808211156113d257634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220c6a6daf2f56ede86acd165f440073734a6ccd3c00dadf35865db2d523df0840d64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106100c85760003560e01c8063654692871161007a578063654692871461021357806368175996146102415780636cc6cde1146102545780637aa77f2914610274578063a0af81f01461028a578063c21ae061146102aa578063c5d55288146102d7578063fc548f08146102f757600080fd5b80630c340a24146100cd5780630c7ac7b61461011e578063311a6c561461014057806334e2672d146101625780633fc8cef3146101825780634660ebbe146101b6578063564a565d146101d6575b600080fd5b3480156100d957600080fd5b506101017f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012a57600080fd5b50610133610317565b6040516101159190610e3d565b34801561014c57600080fd5b5061016061015b366004610e57565b6103a5565b005b34801561016e57600080fd5b5061016061017d366004610ec2565b61053e565b34801561018e57600080fd5b506101017f000000000000000000000000000000000000000000000000000000000000000081565b3480156101c257600080fd5b506101606101d1366004610f1c565b61056f565b3480156101e257600080fd5b506101f66101f1366004610f39565b6105b0565b604080519315158452602084019290925290820152606001610115565b34801561021f57600080fd5b5061023361022e366004610f52565b6105e7565b604051908152602001610115565b61023361024f366004610ec2565b61091b565b34801561026057600080fd5b50600054610101906001600160a01b031681565b34801561028057600080fd5b5061023360025481565b34801561029657600080fd5b50600154610101906001600160a01b031681565b3480156102b657600080fd5b506102336102c5366004610f39565b60046020526000908152604090205481565b3480156102e357600080fd5b506101606102f2366004611041565b610b31565b34801561030357600080fd5b50610160610312366004610f1c565b610bcc565b60038054610324906110a5565b80601f0160208091040260200160405190810160405280929190818152602001828054610350906110a5565b801561039d5780601f106103725761010080835404028352916020019161039d565b820191906000526020600020905b81548152906001019060200180831161038057829003601f168201915b505050505081565b60008281526004602052604081205460058054919291839081106103cb576103cb6110df565b600091825260208220915460039190910290910191506001600160a01b0316331461044b5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b80600201548311156104915760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b6044820152606401610442565b805460ff16156104ef5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b6064820152608401610442565b805460ff1916600190811782558101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b30331461055d5760405162461bcd60e51b8152600401610442906110f5565b600361056a82848361117a565b505050565b30331461058e5760405162461bcd60e51b8152600401610442906110f5565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600581815481106105c057600080fd5b600091825260209091206003909102018054600182015460029092015460ff909116925083565b600083836040516105f992919061123b565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f2790600090a2600580546040805160608101825260008082526020820181815260029383018481526001860187559590915290517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db060038502908101805460ff19169215159290921790915590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2909301929092556107147f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316333087610c0d565b6107525760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610442565b60005461078c906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911686610ce9565b6107d45760405162461bcd60e51b8152602060048201526019602482015278105b1b1bddd85b98d9481a5b98dc99585cd94819985a5b1959603a1b6044820152606401610442565b600054604051633d941b6d60e21b81526001600160a01b039091169063f6506db49061082b9085906003907f0000000000000000000000000000000000000000000000000000000000000000908a906004016112c8565b6020604051808303816000875af115801561084a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086e91906112fd565b600081815260046020908152604080832085905551929550909161089691899189910161123b565b60408051601f1981840301815290829052805160209091012060005460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869161090991868252602082015260606040820181905260009082015260800190565b60405180910390a35050509392505050565b6000828260405161092d92919061123b565b604051908190038120907f8b2c14fe955d044ef95ba32b88d2ceb87c6f73fcefdcebe906063a6d75690f2790600090a26005805460408051606081018252600080825260208201818152600283850181815260018701885596835292517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06003808802918201805460ff19169315159390931790925591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db183015595517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015554915163c13517e160e01b815290936001600160a01b039092169163c13517e1913491610a4291879190600401611316565b60206040518083038185885af1158015610a60573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8591906112fd565b6000818152600460209081526040808320859055519295509091610aad91889188910161123b565b60408051601f1981840301815290829052805160209091012060005460025491935086926001600160a01b03909116917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e2718691610b2091868252602082015260606040820181905260009082015260800190565b60405180910390a350505092915050565b303314610b505760405162461bcd60e51b8152600401610442906110f5565b6001546040516312a6505d60e21b81526001600160a01b0390911690634a99417490610b829085908590600401611337565b6020604051808303816000875af1158015610ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc591906112fd565b6002555050565b303314610beb5760405162461bcd60e51b8152600401610442906110f5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610c729190611373565b6000604051808303816000865af19150503d8060008114610caf576040519150601f19603f3d011682016040523d82523d6000602084013e610cb4565b606091505b5091509150818015610cde575080511580610cde575080806020019051810190610cde919061138f565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063095ea7b39085908590849063dd62ed3e90604401602060405180830381865afa158015610d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6991906112fd565b610d7391906113b1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de2919061138f565b506001949350505050565b60005b83811015610e08578181015183820152602001610df0565b50506000910152565b60008151808452610e29816020860160208601610ded565b601f01601f19169290920160200192915050565b602081526000610e506020830184610e11565b9392505050565b60008060408385031215610e6a57600080fd5b50508035926020909101359150565b60008083601f840112610e8b57600080fd5b50813567ffffffffffffffff811115610ea357600080fd5b602083019150836020828501011115610ebb57600080fd5b9250929050565b60008060208385031215610ed557600080fd5b823567ffffffffffffffff811115610eec57600080fd5b610ef885828601610e79565b90969095509350505050565b6001600160a01b0381168114610f1957600080fd5b50565b600060208284031215610f2e57600080fd5b8135610e5081610f04565b600060208284031215610f4b57600080fd5b5035919050565b600080600060408486031215610f6757600080fd5b833567ffffffffffffffff811115610f7e57600080fd5b610f8a86828701610e79565b909790965060209590950135949350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610fc557600080fd5b813567ffffffffffffffff80821115610fe057610fe0610f9e565b604051601f8301601f19908116603f0116810190828211818310171561100857611008610f9e565b8160405283815286602085880101111561102157600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561105457600080fd5b823567ffffffffffffffff8082111561106c57600080fd5b61107886838701610fb4565b9350602085013591508082111561108e57600080fd5b5061109b85828601610fb4565b9150509250929050565b600181811c908216806110b957607f821691505b6020821081036110d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b6020808252601a908201527f4f6e6c792074686520676f7665726e6f7220616c6c6f7765642e000000000000604082015260600190565b601f82111561056a57600081815260208120601f850160051c810160208610156111535750805b601f850160051c820191505b818110156111725782815560010161115f565b505050505050565b67ffffffffffffffff83111561119257611192610f9e565b6111a6836111a083546110a5565b8361112c565b6000601f8411600181146111da57600085156111c25750838201355b600019600387901b1c1916600186901b178355611234565b600083815260209020601f19861690835b8281101561120b57868501358255602094850194600190920191016111eb565b50868210156112285760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b8183823760009101908152919050565b60008154611258816110a5565b808552602060018381168015611275576001811461128f576112bd565b60ff1985168884015283151560051b8801830195506112bd565b866000528260002060005b858110156112b55781548a820186015290830190840161129a565b890184019650505b505050505092915050565b8481526080602082015260006112e1608083018661124b565b6001600160a01b03949094166040830152506060015292915050565b60006020828403121561130f57600080fd5b5051919050565b82815260406020820152600061132f604083018461124b565b949350505050565b60608152600060608201526080602082015260006113586080830185610e11565b828103604084015261136a8185610e11565b95945050505050565b60008251611385818460208701610ded565b9190910192915050565b6000602082840312156113a157600080fd5b81518015158114610e5057600080fd5b808201808211156113d257634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220c6a6daf2f56ede86acd165f440073734a6ccd3c00dadf35865db2d523df0840d64736f6c63430008120033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrableDisputeID": "The identifier of the dispute in the Arbitrable contract.", - "_arbitrator": "The arbitrator of the contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "The arbitrator to rule on created disputes.", - "_arbitratorExtraData": "The extra data for the arbitrator.", - "_templateData": "The dispute template data.", - "_templateDataMappings": "The dispute template data mappings.", - "_templateRegistry": "The dispute template registry.", - "_weth": "The WETH token." - } - }, - "createDispute(string)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_action": "The action that requires arbitration." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the dispute created." - } - }, - "createDispute(string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_action": "The action that requires arbitration.", - "_feeInWeth": "Amount of fees in WETH for the arbitrator." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the dispute created." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_externalDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "ArbitrableExample An example of an arbitrable contract which connects to the arbitator that implements the updated interface.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 9463, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "arbitrator", - "offset": 0, - "slot": "0", - "type": "t_contract(IArbitratorV2)15461" - }, - { - "astId": 9466, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "templateRegistry", - "offset": 0, - "slot": "1", - "type": "t_contract(IDisputeTemplateRegistry)15627" - }, - { - "astId": 9468, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "templateId", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 9470, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "3", - "type": "t_bytes_storage" - }, - { - "astId": 9477, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "externalIDtoLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 9481, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "disputes", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(DisputeStruct)9454_storage)dyn_storage" - } - ], - "types": { - "t_array(t_struct(DisputeStruct)9454_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)9454_storage", - "encoding": "dynamic_array", - "label": "struct ArbitrableExample.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)15461": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)15627": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)9454_storage": { - "encoding": "inplace", - "label": "struct ArbitrableExample.DisputeStruct", - "members": [ - { - "astId": 9449, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "isRuled", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 9451, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "ruling", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 9453, - "contract": "src/arbitration/arbitrables/ArbitrableExample.sol:ArbitrableExample", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "2", - "type": "t_uint256" - } - ], - "numberOfBytes": "96" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiadoDevnet/DisputeResolver.json b/contracts/deployments/chiadoDevnet/DisputeResolver.json deleted file mode 100644 index f62be29f5..000000000 --- a/contracts/deployments/chiadoDevnet/DisputeResolver.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_arbitrableDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" - } - ], - "name": "DisputeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "arbitratorDisputeIDToLocalID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitratorV2", - "name": "_arbitrator", - "type": "address" - } - ], - "name": "changeArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "_templateRegistry", - "type": "address" - } - ], - "name": "changeTemplateRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplate", - "type": "string" - }, - { - "internalType": "string", - "name": "_disputeTemplateDataMappings", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplateUri", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplateUri", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "bytes", - "name": "arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "isRuled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numberOfRulingOptions", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_externalDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templateRegistry", - "outputs": [ - { - "internalType": "contract IDisputeTemplateRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x7615e3a6ad32fb17c784c627aa6aea53567ad1d1ef8c4856f8ffcf1b1b369e5b", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb", - "transactionIndex": 1, - "gasUsed": "899270", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xfbfab4c23be217bd33a5a35c581b19b082f473ddb1ec930b17028ca24538a106", - "transactionHash": "0x7615e3a6ad32fb17c784c627aa6aea53567ad1d1ef8c4856f8ffcf1b1b369e5b", - "logs": [], - "blockNumber": 5434044, - "cumulativeGasUsed": "925906", - "status": 1, - "byzantium": true - }, - "args": [ - "0x83F393F2aE68FA6A6701D7c65CBbFf3225f3fDf9", - "0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957" - ], - "numDeployments": 2, - "solcInputHash": "4a879192e8bde2273db37e489aeff250", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitrableDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrableDisputeID\":\"The identifier of the dispute in the Arbitrable contract.\",\"_arbitrator\":\"The arbitrator of the contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_externalDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/DisputeResolver.sol\":\"DisputeResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@ferittuncer, @unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity 0.8.18;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _externalDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _externalDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_externalDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _externalDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal returns (uint256 disputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n disputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[disputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, disputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0x6a73611696ae6b6f128c1c3d6f355f691f93b374243f41e6a9b0795bbfb8fb13\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x4b1b3f98d13e4a9a1c546dd45f98490f86e871cfc4b4be9a3fe4d29b3c99649c\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610ed5380380610ed583398101604081905261002f91610083565b600080546001600160a01b03199081163317909155600180546001600160a01b03948516908316179055600280549290931691161790556100bd565b6001600160a01b038116811461008057600080fd5b50565b6000806040838503121561009657600080fd5b82516100a18161006b565b60208401519092506100b28161006b565b809150509250929050565b610e09806100cc6000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cb8565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d78565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db4565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb357600081815260208120601f850160051c81016020861015610c905750805b601f850160051c820191505b81811015610caf57828155600101610c9c565b5050505b505050565b815167ffffffffffffffff811115610cd257610cd2610a64565b610ce681610ce08454610be0565b84610c69565b602080601f831160018114610d1b5760008415610d035750858301515b600019600386901b1c1916600185901b178555610caf565b600085815260208120601f198616915b82811015610d4a57888601518255948401946001909101908401610d2b565b5085821015610d685787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d996080830185610932565b8281036040840152610dab8185610932565b95945050505050565b838152826020820152606060408201526000610dab606083018461093256fea2646970667358221220c324d7140e9a3d1af3d79e61c385889111fcf915450df6674ffa003e40949e0964736f6c63430008120033", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cb8565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d78565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db4565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb357600081815260208120601f850160051c81016020861015610c905750805b601f850160051c820191505b81811015610caf57828155600101610c9c565b5050505b505050565b815167ffffffffffffffff811115610cd257610cd2610a64565b610ce681610ce08454610be0565b84610c69565b602080601f831160018114610d1b5760008415610d035750858301515b600019600386901b1c1916600185901b178555610caf565b600085815260208120601f198616915b82811015610d4a57888601518255948401946001909101908401610d2b565b5085821015610d685787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d996080830185610932565b8281036040840152610dab8185610932565b95945050505050565b838152826020820152606060408201526000610dab606083018461093256fea2646970667358221220c324d7140e9a3d1af3d79e61c385889111fcf915450df6674ffa003e40949e0964736f6c63430008120033", - "devdoc": { - "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", - "params": { - "_arbitrableDisputeID": "The identifier of the dispute in the Arbitrable contract.", - "_arbitrator": "The arbitrator of the contract.", - "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrator": "The arbitrator giving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - } - }, - "kind": "dev", - "methods": { - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "constructor": { - "details": "Constructor", - "params": { - "_arbitrator": "Target global arbitrator for any disputes." - } - }, - "createDisputeForTemplate(bytes,string,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplate": "Dispute template.", - "_disputeTemplateDataMappings": "The data mappings.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "createDisputeForTemplateUri(bytes,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_externalDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 9861, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 9864, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)15461" - }, - { - "astId": 9867, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)15627" - }, - { - "astId": 9871, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)9859_storage)dyn_storage" - }, - { - "astId": 9875, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)9859_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)9859_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)15461": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)15627": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)9859_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 9852, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 9854, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 9856, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 9858, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiadoDevnet/DisputeTemplateRegistry.json b/contracts/deployments/chiadoDevnet/DisputeTemplateRegistry.json deleted file mode 100644 index 2707009b3..000000000 --- a/contracts/deployments/chiadoDevnet/DisputeTemplateRegistry.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "address": "0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_templateId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "DisputeTemplate", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_templateTag", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateData", - "type": "string" - }, - { - "internalType": "string", - "name": "_templateDataMappings", - "type": "string" - } - ], - "name": "setDisputeTemplate", - "outputs": [ - { - "internalType": "uint256", - "name": "templateId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "templates", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x043c67386392003bc857ccfd218e1c4fef7470c085c30373136eb3735805c069", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957", - "transactionIndex": 0, - "gasUsed": "215830", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3f6f65b022261ae3e10b6c3ba0638d52998694e474e5d10cc731031c3b152c93", - "transactionHash": "0x043c67386392003bc857ccfd218e1c4fef7470c085c30373136eb3735805c069", - "logs": [], - "blockNumber": 5398215, - "cumulativeGasUsed": "215830", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "356abb1cf2a2e12b481e44f0376af297", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"DisputeTemplate\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"setDisputeTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"templateId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"events\":{\"DisputeTemplate(uint256,string,string,string)\":{\"details\":\"To be emitted when a new dispute template is created.\",\"params\":{\"_templateData\":\"The template data.\",\"_templateDataMappings\":\"The data mappings.\",\"_templateId\":\"The identifier of the dispute template.\",\"_templateTag\":\"An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\"}}},\"kind\":\"dev\",\"methods\":{},\"title\":\"Dispute Template Registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/DisputeTemplateRegistry.sol\":\"DisputeTemplateRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/arbitration/DisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\n\\nimport \\\"./interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\n/// @title Dispute Template Registry\\n/// @dev A contract to maintain a registry of dispute templates.\\ncontract DisputeTemplateRegistry is IDisputeTemplateRegistry {\\n uint256 public templates;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId) {\\n templateId = templates++;\\n emit DisputeTemplate(templateId, _templateTag, _templateData, _templateDataMappings);\\n }\\n}\\n\",\"keccak256\":\"0xbc2d8ff9784d93f932199993fd58aab88fbc367268a10ffb7fe07a85826960c1\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x4b1b3f98d13e4a9a1c546dd45f98490f86e871cfc4b4be9a3fe4d29b3c99649c\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506102f1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633a283d7d1461003b5780634a99417414610056575b600080fd5b61004460005481565b60405190815260200160405180910390f35b610044610064366004610172565b600080548180610073836101fa565b919050559050836040516100879190610245565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516100c092919061028d565b60405180910390a39392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126100f657600080fd5b813567ffffffffffffffff80821115610111576101116100cf565b604051601f8301601f19908116603f01168101908282118183101715610139576101396100cf565b8160405283815286602085880101111561015257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561018757600080fd5b833567ffffffffffffffff8082111561019f57600080fd5b6101ab878388016100e5565b945060208601359150808211156101c157600080fd5b6101cd878388016100e5565b935060408601359150808211156101e357600080fd5b506101f0868287016100e5565b9150509250925092565b60006001820161021a57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b8381101561023c578181015183820152602001610224565b50506000910152565b60008251610257818460208701610221565b9190910192915050565b60008151808452610279816020860160208601610221565b601f01601f19169290920160200192915050565b6040815260006102a06040830185610261565b82810360208401526102b28185610261565b9594505050505056fea26469706673582212208e28c2a1ac6bf992487f46d3bb5b26e186ac986099d0d98440c6107f111f92ab64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80633a283d7d1461003b5780634a99417414610056575b600080fd5b61004460005481565b60405190815260200160405180910390f35b610044610064366004610172565b600080548180610073836101fa565b919050559050836040516100879190610245565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516100c092919061028d565b60405180910390a39392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126100f657600080fd5b813567ffffffffffffffff80821115610111576101116100cf565b604051601f8301601f19908116603f01168101908282118183101715610139576101396100cf565b8160405283815286602085880101111561015257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561018757600080fd5b833567ffffffffffffffff8082111561019f57600080fd5b6101ab878388016100e5565b945060208601359150808211156101c157600080fd5b6101cd878388016100e5565b935060408601359150808211156101e357600080fd5b506101f0868287016100e5565b9150509250925092565b60006001820161021a57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b8381101561023c578181015183820152602001610224565b50506000910152565b60008251610257818460208701610221565b9190910192915050565b60008151808452610279816020860160208601610221565b601f01601f19169290920160200192915050565b6040815260006102a06040830185610261565b82810360208401526102b28185610261565b9594505050505056fea26469706673582212208e28c2a1ac6bf992487f46d3bb5b26e186ac986099d0d98440c6107f111f92ab64736f6c63430008120033", - "devdoc": { - "details": "A contract to maintain a registry of dispute templates.", - "events": { - "DisputeTemplate(uint256,string,string,string)": { - "details": "To be emitted when a new dispute template is created.", - "params": { - "_templateData": "The template data.", - "_templateDataMappings": "The data mappings.", - "_templateId": "The identifier of the dispute template.", - "_templateTag": "An optional tag for the dispute template, such as \"registration\" or \"removal\"." - } - } - }, - "kind": "dev", - "methods": {}, - "title": "Dispute Template Registry", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 85, - "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", - "label": "templates", - "offset": 0, - "slot": "0", - "type": "t_uint256" - } - ], - "types": { - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiadoDevnet/ForeignGatewayOnGnosis.json b/contracts/deployments/chiadoDevnet/ForeignGatewayOnGnosis.json deleted file mode 100644 index 342882e2f..000000000 --- a/contracts/deployments/chiadoDevnet/ForeignGatewayOnGnosis.json +++ /dev/null @@ -1,788 +0,0 @@ -{ - "address": "0x078dAd05373d19d7fd6829735b765F12242a4300", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - } - ], - "name": "ArbitrationCostModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "_foreignBlockHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "_foreignArbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_foreignDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "CrossChainDisputeOutgoing", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_NB_OF_JURORS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - } - ], - "name": "changeCourtJurorFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_homeGateway", - "type": "address" - } - ], - "name": "changeHomeGateway", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_veaOutbox", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_gracePeriod", - "type": "uint256" - } - ], - "name": "changeVea", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "deprecatedVeaOutbox", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "deprecatedVeaOutboxExpiration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - } - ], - "name": "disputeHashToForeignID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "disputeHashtoDisputeData", - "outputs": [ - { - "internalType": "uint248", - "name": "id", - "type": "uint248" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "address", - "name": "arbitrable", - "type": "address" - }, - { - "internalType": "uint256", - "name": "paid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "relayer", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "name": "feeForJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "homeChainID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "homeGateway", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_veaOutbox", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_homeChainID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_homeGateway", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_messageSender", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_relayer", - "type": "address" - } - ], - "name": "relayRule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "senderGateway", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "veaOutbox", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x01874fb34459c6ed77c5cb60dfd0cfb40aebacc46073f1d06df7e1b47e790705", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x078dAd05373d19d7fd6829735b765F12242a4300", - "transactionIndex": 1, - "gasUsed": "265335", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7ede631dec7eef5b52cd5719c77b2df2768ce5716f943b49d0484d77f81d9568", - "transactionHash": "0x01874fb34459c6ed77c5cb60dfd0cfb40aebacc46073f1d06df7e1b47e790705", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 6246439, - "transactionHash": "0x01874fb34459c6ed77c5cb60dfd0cfb40aebacc46073f1d06df7e1b47e790705", - "address": "0x078dAd05373d19d7fd6829735b765F12242a4300", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x7ede631dec7eef5b52cd5719c77b2df2768ce5716f943b49d0484d77f81d9568" - } - ], - "blockNumber": 6246439, - "cumulativeGasUsed": "291331", - "status": 1, - "byzantium": true - }, - "args": [ - "0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace", - "0xbe203094000000000000000000000000f50e77f2a2b6138d16c6c7511562e5c33c4b15a3000000000000000000000000dfd7adeb43d46fa3f16fb3e27f7fe85c3f5bd89d0000000000000000000000000000000000000000000000000000000000066eed000000000000000000000000920856556ef06ff7d337af964d1954862f8da049" - ], - "numDeployments": 1, - "solcInputHash": "55cffe29f75540cd17d37d1c4bbabcf9", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.18;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x828711038a141a5cfcef6f24bb33af8cbf7f336c69fb969d7d0be0646667382b\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220e77e937000f74af50aa176fcbe90b8f19064161349c6b089e5987215280177d364736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220e77e937000f74af50aa176fcbe90b8f19064161349c6b089e5987215280177d364736f6c63430008120033", - "execute": { - "methodName": "initialize", - "args": [ - "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "0xdFd7aDEb43d46FA3f16FB3e27F7fe85c3f5BD89D", - "0x0000000000000000000000000000000000000000000000000000000000066eed", - "0x920856556EF06ff7D337Af964D1954862f8Da049" - ] - }, - "implementation": "0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace", - "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", - "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/chiadoDevnet/ForeignGatewayOnGnosis_Implementation.json b/contracts/deployments/chiadoDevnet/ForeignGatewayOnGnosis_Implementation.json deleted file mode 100644 index 87cd88551..000000000 --- a/contracts/deployments/chiadoDevnet/ForeignGatewayOnGnosis_Implementation.json +++ /dev/null @@ -1,1118 +0,0 @@ -{ - "address": "0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": true, - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "AcceptedFeeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - } - ], - "name": "ArbitrationCostModified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "_foreignBlockHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "_foreignArbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_foreignDisputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_choices", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "CrossChainDisputeOutgoing", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "NewCurrencyRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_NB_OF_JURORS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - } - ], - "name": "changeCourtJurorFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_homeGateway", - "type": "address" - } - ], - "name": "changeHomeGateway", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_veaOutbox", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_gracePeriod", - "type": "uint256" - } - ], - "name": "changeVea", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_choices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "deprecatedVeaOutbox", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "deprecatedVeaOutboxExpiration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - } - ], - "name": "disputeHashToForeignID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "disputeHashtoDisputeData", - "outputs": [ - { - "internalType": "uint248", - "name": "id", - "type": "uint248" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "address", - "name": "arbitrable", - "type": "address" - }, - { - "internalType": "uint256", - "name": "paid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "relayer", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "name": "feeForJuror", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "homeChainID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "homeGateway", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "address", - "name": "_veaOutbox", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_homeChainID", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_homeGateway", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_messageSender", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_relayer", - "type": "address" - } - ], - "name": "relayRule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "senderGateway", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "veaOutbox", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xf709a57c35ca26594700e4b648185ecb948e1838772c51ed877062e8e241ef8e", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace", - "transactionIndex": 1, - "gasUsed": "1301308", - "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x51d614145cf5359099c84b1111d69ab2374cba6a0013c68e70b07fd97425d3f0", - "transactionHash": "0xf709a57c35ca26594700e4b648185ecb948e1838772c51ed877062e8e241ef8e", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 6246438, - "transactionHash": "0xf709a57c35ca26594700e4b648185ecb948e1838772c51ed877062e8e241ef8e", - "address": "0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 1, - "blockHash": "0x51d614145cf5359099c84b1111d69ab2374cba6a0013c68e70b07fd97425d3f0" - } - ], - "blockNumber": 6246438, - "cumulativeGasUsed": "1388146", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "55cffe29f75540cd17d37d1c4bbabcf9", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"}],\"name\":\"ArbitrationCostModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_foreignBlockHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_foreignArbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_foreignDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"CrossChainDisputeOutgoing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_NB_OF_JURORS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"}],\"name\":\"changeCourtJurorFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_homeGateway\",\"type\":\"address\"}],\"name\":\"changeHomeGateway\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_veaOutbox\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gracePeriod\",\"type\":\"uint256\"}],\"name\":\"changeVea\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deprecatedVeaOutbox\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deprecatedVeaOutboxExpiration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_disputeHash\",\"type\":\"bytes32\"}],\"name\":\"disputeHashToForeignID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"disputeHashtoDisputeData\",\"outputs\":[{\"internalType\":\"uint248\",\"name\":\"id\",\"type\":\"uint248\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"arbitrable\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"name\":\"feeForJuror\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"homeChainID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"homeGateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutbox\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_homeChainID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_homeGateway\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_messageSender\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_disputeHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_relayer\",\"type\":\"address\"}],\"name\":\"relayRule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"senderGateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutbox\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_disputeHash\",\"type\":\"bytes32\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"CrossChainDisputeOutgoing(bytes32,address,uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is sent to the IHomeGateway.\",\"params\":{\"_choices\":\"The number of choices the arbitrator can choose from in this dispute.\",\"_extraData\":\"Any extra data to attach.\",\"_foreignArbitrable\":\"The address of the Arbitrable contract.\",\"_foreignBlockHash\":\"foreignBlockHash\",\"_foreignDisputeID\":\"The identifier of the dispute in the Arbitrable contract.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in the native currency, typically ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"_0\":\"The arbitration cost in `_feeToken`.\"}},\"changeCourtJurorFee(uint96,uint256)\":{\"details\":\"Changes the `feeForJuror` property value of a specified court.\",\"params\":{\"_courtID\":\"The ID of the court on the v2 arbitrator. Not to be confused with the courtID on KlerosLiquid.\",\"_feeForJuror\":\"The new value for the `feeForJuror` property value.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"changeHomeGateway(address)\":{\"details\":\"Changes the home gateway.\",\"params\":{\"_homeGateway\":\"The address of the new home gateway.\"}},\"changeVea(address,uint256)\":{\"details\":\"Changes the outbox.\",\"params\":{\"_gracePeriod\":\"The duration to accept messages from the deprecated bridge (if at all).\",\"_veaOutbox\":\"The address of the new outbox.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"_0\":\"The identifier of the dispute created.\"}},\"disputeHashToForeignID(bytes32)\":{\"details\":\"Looks up the local foreign disputeID for a disputeHash\",\"params\":{\"_disputeHash\":\"dispute hash\"}},\"initialize(address,address,uint256,address)\":{\"details\":\"Constructs the `PolicyRegistry` contract.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFees(bytes32)\":{\"params\":{\"_disputeHash\":\"The dispute hash for which to withdraw the fees.\"}}},\"stateVariables\":{\"homeChainID\":{\"return\":\"The chain ID where the corresponding home gateway is deployed.\",\"returns\":{\"_0\":\"The chain ID where the corresponding home gateway is deployed.\"}},\"homeGateway\":{\"return\":\"The address of the corresponding home gateway.\",\"returns\":{\"_0\":\"The address of the corresponding home gateway.\"}}},\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{\"relayRule(address,bytes32,uint256,address)\":{\"notice\":\"Relay the rule call from the home gateway to the arbitrable.\"},\"withdrawFees(bytes32)\":{\"notice\":\"Reimburses the dispute fees to the relayer who paid for these fees on the home chain.\"}},\"notice\":\"Foreign Gateway Counterpart of `HomeGateway`\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gateway/ForeignGateway.sol\":\"ForeignGateway\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@kleros/vea-contracts/src/interfaces/gateways/IReceiverGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IReceiverGateway {\\n function veaOutbox() external view returns (address);\\n\\n function senderGateway() external view returns (address);\\n}\\n\",\"keccak256\":\"0xde6bdbe57ced7c1e79d62dca23aa8c2322e031da91ceac22cefd185f1e3740ef\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"src/gateway/ForeignGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere, @shalzz]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./interfaces/IForeignGateway.sol\\\";\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// Foreign Gateway\\n/// Counterpart of `HomeGateway`\\ncontract ForeignGateway is IForeignGateway, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeData {\\n uint248 id;\\n bool ruled;\\n address arbitrable;\\n uint256 paid;\\n address relayer;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event ArbitrationCostModified(uint96 indexed _courtID, uint256 _feeForJuror);\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\n uint256 internal localDisputeID; // The disputeID must start from 1 as the KlerosV1 proxy governor depends on this implementation. We now also depend on localDisputeID not ever being zero.\\n mapping(uint96 => uint256) public feeForJuror; // feeForJuror[v2CourtID], it mirrors the value on KlerosCore.\\n address public governor;\\n address public veaOutbox;\\n uint256 public override homeChainID;\\n address public override homeGateway;\\n address public deprecatedVeaOutbox;\\n uint256 public deprecatedVeaOutboxExpiration;\\n mapping(bytes32 => DisputeData) public disputeHashtoDisputeData;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyFromVea(address _messageSender) {\\n require(\\n veaOutbox == msg.sender ||\\n (block.timestamp < deprecatedVeaOutboxExpiration && deprecatedVeaOutbox == msg.sender),\\n \\\"Access not allowed: Vea Outbox only.\\\"\\n );\\n require(_messageSender == homeGateway, \\\"Access not allowed: HomeGateway only.\\\");\\n _;\\n }\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Constructs the `PolicyRegistry` contract.\\n /// @param _governor The governor's address.\\n function initialize(\\n address _governor,\\n address _veaOutbox,\\n uint256 _homeChainID,\\n address _homeGateway\\n ) external reinitializer(1) {\\n governor = _governor;\\n veaOutbox = _veaOutbox;\\n homeChainID = _homeChainID;\\n homeGateway = _homeGateway;\\n localDisputeID = 1;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n /// @dev Changes the outbox.\\n /// @param _veaOutbox The address of the new outbox.\\n /// @param _gracePeriod The duration to accept messages from the deprecated bridge (if at all).\\n function changeVea(address _veaOutbox, uint256 _gracePeriod) external onlyByGovernor {\\n // grace period to relay the remaining messages which are still going through the deprecated bridge.\\n deprecatedVeaOutboxExpiration = block.timestamp + _gracePeriod;\\n deprecatedVeaOutbox = veaOutbox;\\n veaOutbox = _veaOutbox;\\n }\\n\\n /// @dev Changes the home gateway.\\n /// @param _homeGateway The address of the new home gateway.\\n function changeHomeGateway(address _homeGateway) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n homeGateway = _homeGateway;\\n }\\n\\n /// @dev Changes the `feeForJuror` property value of a specified court.\\n /// @param _courtID The ID of the court on the v2 arbitrator. Not to be confused with the courtID on KlerosLiquid.\\n /// @param _feeForJuror The new value for the `feeForJuror` property value.\\n function changeCourtJurorFee(uint96 _courtID, uint256 _feeForJuror) external onlyByGovernor {\\n feeForJuror[_courtID] = _feeForJuror;\\n emit ArbitrationCostModified(_courtID, _feeForJuror);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _choices,\\n bytes calldata _extraData\\n ) external payable override returns (uint256 disputeID) {\\n require(msg.value >= arbitrationCost(_extraData), \\\"Not paid enough for arbitration\\\");\\n\\n disputeID = localDisputeID++;\\n uint256 chainID;\\n assembly {\\n chainID := chainid()\\n }\\n bytes32 disputeHash = keccak256(\\n abi.encodePacked(\\n \\\"createDispute\\\",\\n blockhash(block.number - 1),\\n chainID,\\n msg.sender,\\n disputeID,\\n _choices,\\n _extraData\\n )\\n );\\n\\n disputeHashtoDisputeData[disputeHash] = DisputeData({\\n id: uint248(disputeID),\\n arbitrable: msg.sender,\\n paid: msg.value,\\n relayer: address(0),\\n ruled: false\\n });\\n\\n emit CrossChainDisputeOutgoing(blockhash(block.number - 1), msg.sender, disputeID, _choices, _extraData);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 /*_choices*/,\\n bytes calldata /*_extraData*/,\\n IERC20 /*_feeToken*/,\\n uint256 /*_feeAmount*/\\n ) external pure override returns (uint256) {\\n revert(\\\"Not supported\\\");\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(bytes calldata _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors) = extraDataToCourtIDMinJurors(_extraData);\\n cost = feeForJuror[courtID] * minJurors;\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(\\n bytes calldata /*_extraData*/,\\n IERC20 /*_feeToken*/\\n ) public pure override returns (uint256 /*cost*/) {\\n revert(\\\"Not supported\\\");\\n }\\n\\n /// @inheritdoc IForeignGateway\\n function relayRule(\\n address _messageSender,\\n bytes32 _disputeHash,\\n uint256 _ruling,\\n address _relayer\\n ) external override onlyFromVea(_messageSender) {\\n DisputeData storage dispute = disputeHashtoDisputeData[_disputeHash];\\n\\n require(dispute.id != 0, \\\"Dispute does not exist\\\");\\n require(!dispute.ruled, \\\"Cannot rule twice\\\");\\n\\n dispute.ruled = true;\\n dispute.relayer = _relayer;\\n\\n IArbitrableV2 arbitrable = IArbitrableV2(dispute.arbitrable);\\n arbitrable.rule(dispute.id, _ruling);\\n }\\n\\n /// @inheritdoc IForeignGateway\\n function withdrawFees(bytes32 _disputeHash) external override {\\n DisputeData storage dispute = disputeHashtoDisputeData[_disputeHash];\\n require(dispute.id != 0, \\\"Dispute does not exist\\\");\\n require(dispute.ruled, \\\"Not ruled yet\\\");\\n\\n uint256 amount = dispute.paid;\\n dispute.paid = 0;\\n payable(dispute.relayer).transfer(amount);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @inheritdoc IForeignGateway\\n function disputeHashToForeignID(bytes32 _disputeHash) external view override returns (uint256) {\\n return disputeHashtoDisputeData[_disputeHash].id;\\n }\\n\\n /// @inheritdoc IReceiverGateway\\n function senderGateway() external view override returns (address) {\\n return homeGateway;\\n }\\n\\n function currentRuling(\\n uint256 /*_disputeID*/\\n ) public pure returns (uint256 /*ruling*/, bool /*tied*/, bool /*overridden*/) {\\n revert(\\\"Not supported\\\");\\n }\\n\\n // ************************ //\\n // * Internal * //\\n // ************************ //\\n\\n function extraDataToCourtIDMinJurors(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors) {\\n // Note that here we ignore DisputeKitID\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n }\\n if (feeForJuror[courtID] == 0) courtID = 0;\\n if (minJurors == 0) minJurors = DEFAULT_NB_OF_JURORS;\\n } else {\\n courtID = 0;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf79f183f51d6ec371c0bc6681fe794570d20e2bb7ed4c594df909f41b34527ad\",\"license\":\"MIT\"},\"src/gateway/interfaces/IForeignGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere, @shalzz]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitration/interfaces/IArbitratorV2.sol\\\";\\nimport \\\"@kleros/vea-contracts/src/interfaces/gateways/IReceiverGateway.sol\\\";\\n\\ninterface IForeignGateway is IArbitratorV2, IReceiverGateway {\\n /// @dev To be emitted when a dispute is sent to the IHomeGateway.\\n /// @param _foreignBlockHash foreignBlockHash\\n /// @param _foreignArbitrable The address of the Arbitrable contract.\\n /// @param _foreignDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _choices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Any extra data to attach.\\n event CrossChainDisputeOutgoing(\\n bytes32 _foreignBlockHash,\\n address indexed _foreignArbitrable,\\n uint256 indexed _foreignDisputeID,\\n uint256 _choices,\\n bytes _extraData\\n );\\n\\n /// Relay the rule call from the home gateway to the arbitrable.\\n function relayRule(address _messageSender, bytes32 _disputeHash, uint256 _ruling, address _forwarder) external;\\n\\n /// Reimburses the dispute fees to the relayer who paid for these fees on the home chain.\\n /// @param _disputeHash The dispute hash for which to withdraw the fees.\\n function withdrawFees(bytes32 _disputeHash) external;\\n\\n /// @dev Looks up the local foreign disputeID for a disputeHash\\n /// @param _disputeHash dispute hash\\n function disputeHashToForeignID(bytes32 _disputeHash) external view returns (uint256);\\n\\n /// @return The chain ID where the corresponding home gateway is deployed.\\n function homeChainID() external view returns (uint256);\\n\\n /// @return The address of the corresponding home gateway.\\n function homeGateway() external view returns (address);\\n}\\n\",\"keccak256\":\"0xf59d1a9cd8b601f82ea3871d48bd9181e012a650e8f075e2c23c04df00ca6fe8\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.18;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb5f734e0092e195ebee187ede1ecb16bd1ffe684addf1ea895d8351866f1846f\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.18;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfcef20b48f40ce4099f1f5cfe3d1f2551b5c1997e92baaa0f0df62a3d4bd97e7\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161161a6100fc6000396000818161060d01528181610636015261082e015261161a6000f3fe6080604052600436106101565760003560e01c806393626084116100c1578063d3c617ff1161007a578063d3c617ff146103c2578063d98493f614610464578063dea580b914610484578063e4c0aaf4146104a4578063ebb71194146104c4578063f6506db4146104e4578063f7434ea9146104ff57600080fd5b8063936260841461031c578063a60a4db51461033c578063bcb1a1661461035c578063be20309414610371578063c13517e114610391578063ce0aaf95146103a457600080fd5b806345c904411161011357806345c9044114610267578063492d85d4146102945780634d53c2a5146102b45780634f1ef286146102d457806352d1902d146102e757806367c51947146102fc57600080fd5b80630c340a241461015b5780631c3db16d146101985780631debaba6146101d55780631fc6b556146101f75780632e1db8901461021b57806336e41d3d14610251575b600080fd5b34801561016757600080fd5b5060025461017b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101a457600080fd5b506101b86101b336600461100f565b61051f565b60408051938452911515602084015215159082015260600161018f565b3480156101e157600080fd5b506101f56101f036600461103d565b610545565b005b34801561020357600080fd5b5061020d60045481565b60405190815260200161018f565b34801561022757600080fd5b5061020d61023636600461100f565b6000908152600860205260409020546001600160f81b031690565b34801561025d57600080fd5b5061020d60075481565b34801561027357600080fd5b5061020d610282366004611085565b60016020526000908152604090205481565b3480156102a057600080fd5b506101f56102af3660046110a7565b6105ad565b3480156102c057600080fd5b5060055461017b906001600160a01b031681565b6101f56102e23660046110da565b6105f9565b3480156102f357600080fd5b5061020d610821565b34801561030857600080fd5b506101f561031736600461119d565b61087f565b34801561032857600080fd5b5060065461017b906001600160a01b031681565b34801561034857600080fd5b506101f56103573660046111b9565b610902565b34801561036857600080fd5b5061020d600381565b34801561037d57600080fd5b506101f561038c366004611203565b610b1f565b61020d61039f366004611293565b610c35565b3480156103b057600080fd5b506005546001600160a01b031661017b565b3480156103ce57600080fd5b506104266103dd36600461100f565b60086020526000908152604090208054600182015460028301546003909301546001600160f81b03831693600160f81b90930460ff16926001600160a01b039283169290911685565b604080516001600160f81b03909616865293151560208601526001600160a01b0392831693850193909352606084015216608082015260a00161018f565b34801561047057600080fd5b5061020d61047f3660046112de565b610dd1565b34801561049057600080fd5b5060035461017b906001600160a01b031681565b3480156104b057600080fd5b506101f56104bf3660046110a7565b610deb565b3480156104d057600080fd5b506101f56104df36600461100f565b610e37565b3480156104f057600080fd5b5061020d61047f366004611334565b34801561050b57600080fd5b5061020d61051a36600461139a565b610f03565b600080600060405162461bcd60e51b815260040161053c906113db565b60405180910390fd5b6002546001600160a01b0316331461056f5760405162461bcd60e51b815260040161053c90611402565b610579814261145a565b6007555060038054600680546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6002546001600160a01b031633146105d75760405162461bcd60e51b815260040161053c90611402565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61060282610f79565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061068057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106746000805160206115c58339815191525490565b6001600160a01b031614155b1561069e5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f8575060408051601f3d908101601f191682019092526106f591810190611473565b60015b61072057604051630c76093760e01b81526001600160a01b038316600482015260240161053c565b6000805160206115c5833981519152811461075157604051632a87526960e21b81526004810182905260240161053c565b6000805160206115c58339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561081c576000836001600160a01b0316836040516107b8919061148c565b600060405180830381855af49150503d80600081146107f3576040519150601f19603f3d011682016040523d82523d6000602084013e6107f8565b606091505b505090508061081a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461086c5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206115c583398151915290565b6002546001600160a01b031633146108a95760405162461bcd60e51b815260040161053c90611402565b6001600160601b03821660008181526001602052604090819020839055517f20a6ef9c48f3a1ae927e70bc34e82d974c53d3c98c8fd9e731c4bacd5842c596906108f69084815260200190565b60405180910390a25050565b60035484906001600160a01b031633148061093357506007544210801561093357506006546001600160a01b031633145b61098b5760405162461bcd60e51b8152602060048201526024808201527f416363657373206e6f7420616c6c6f7765643a20566561204f7574626f78206f60448201526337363c9760e11b606482015260840161053c565b6005546001600160a01b038281169116146109f65760405162461bcd60e51b815260206004820152602560248201527f416363657373206e6f7420616c6c6f7765643a20486f6d65476174657761792060448201526437b7363c9760d91b606482015260840161053c565b6000848152600860205260408120805490916001600160f81b039091169003610a315760405162461bcd60e51b815260040161053c906114bb565b8054600160f81b900460ff1615610a7e5760405162461bcd60e51b815260206004820152601160248201527043616e6e6f742072756c6520747769636560781b604482015260640161053c565b80546001600160f81b0316600160f81b811782556003820180546001600160a01b038681166001600160a01b031990921691909117909155600183015460405163188d362b60e11b81526004810193909352602483018790521690819063311a6c5690604401600060405180830381600087803b158015610afe57600080fd5b505af1158015610b12573d6000803e3d6000fd5b5050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610b68575080546001600160401b03808416911610155b15610b855760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600280546001600160a01b038981166001600160a01b03199283161790925560038054898416908316179055600487905560058054928716929091169190911790556001600055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b6000610c418383610f03565b341015610c905760405162461bcd60e51b815260206004820152601f60248201527f4e6f74207061696420656e6f75676820666f72206172626974726174696f6e00604482015260640161053c565b600080549080610c9f836114eb565b909155509050466000610cb3600143611504565b40823385898989604051602001610cd09796959493929190611517565b60408051601f19818403018152828252805160209182012060a0840183526001600160f81b0380881685526000858401818152338787018181523460608a0190815260808a01858152878652600890985297909320975191511515600160f81b029190931617865551600186810180546001600160a01b039384166001600160a01b031991821617909155955160028801559351600390960180549690911695909416949094179092559092508491907f03e54fa10baada663d819e5d7e4533535bfb6d4407abe51045be84e6c8de020390610dac9043611504565b40898989604051610dc09493929190611570565b60405180910390a350509392505050565b600060405162461bcd60e51b815260040161053c906113db565b6002546001600160a01b03163314610e155760405162461bcd60e51b815260040161053c90611402565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600860205260408120805490916001600160f81b039091169003610e725760405162461bcd60e51b815260040161053c906114bb565b8054600160f81b900460ff16610eba5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c9d5b1959081e595d609a1b604482015260640161053c565b600281018054600091829055600383015460405191926001600160a01b039091169183156108fc0291849190818181858888f1935050505015801561081a573d6000803e3d6000fd5b6000806000610f4785858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fa692505050565b6001600160601b0382166000908152600160205260409020549193509150610f709082906115ad565b95945050505050565b6002546001600160a01b03163314610fa35760405162461bcd60e51b815260040161053c90611402565b50565b600080604083511061100357602083015191506040830151905060016000836001600160601b03166001600160601b0316815260200190815260200160002054600003610ff257600091505b80600003610ffe575060035b915091565b50600090506003915091565b60006020828403121561102157600080fd5b5035919050565b6001600160a01b0381168114610fa357600080fd5b6000806040838503121561105057600080fd5b823561105b81611028565b946020939093013593505050565b80356001600160601b038116811461108057600080fd5b919050565b60006020828403121561109757600080fd5b6110a082611069565b9392505050565b6000602082840312156110b957600080fd5b81356110a081611028565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156110ed57600080fd5b82356110f881611028565b915060208301356001600160401b038082111561111457600080fd5b818501915085601f83011261112857600080fd5b81358181111561113a5761113a6110c4565b604051601f8201601f19908116603f01168101908382118183101715611162576111626110c4565b8160405282815288602084870101111561117b57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080604083850312156111b057600080fd5b61105b83611069565b600080600080608085870312156111cf57600080fd5b84356111da81611028565b9350602085013592506040850135915060608501356111f881611028565b939692955090935050565b6000806000806080858703121561121957600080fd5b843561122481611028565b9350602085013561123481611028565b92506040850135915060608501356111f881611028565b60008083601f84011261125d57600080fd5b5081356001600160401b0381111561127457600080fd5b60208301915083602082850101111561128c57600080fd5b9250929050565b6000806000604084860312156112a857600080fd5b8335925060208401356001600160401b038111156112c557600080fd5b6112d18682870161124b565b9497909650939450505050565b6000806000604084860312156112f357600080fd5b83356001600160401b0381111561130957600080fd5b6113158682870161124b565b909450925050602084013561132981611028565b809150509250925092565b60008060008060006080868803121561134c57600080fd5b8535945060208601356001600160401b0381111561136957600080fd5b6113758882890161124b565b909550935050604086013561138981611028565b949793965091946060013592915050565b600080602083850312156113ad57600080fd5b82356001600160401b038111156113c357600080fd5b6113cf8582860161124b565b90969095509350505050565b6020808252600d908201526c139bdd081cdd5c1c1bdc9d1959609a1b604082015260600190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561146d5761146d611444565b92915050565b60006020828403121561148557600080fd5b5051919050565b6000825160005b818110156114ad5760208186018101518583015201611493565b506000920191825250919050565b602080825260169082015275111a5cdc1d5d1948191bd95cc81b9bdd08195e1a5cdd60521b604082015260600190565b6000600182016114fd576114fd611444565b5060010190565b8181038181111561146d5761146d611444565b6c6372656174654469737075746560981b815287600d82015286602d8201526001600160601b03198660601b16604d820152846061820152836081820152818360a18301376000910160a1019081529695505050505050565b84815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b808202811582820484141761146d5761146d61144456fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204651c10eb8dded7d25f1b67d58f568a9aabba6e281bf159ce4fbee5373c5507664736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101565760003560e01c806393626084116100c1578063d3c617ff1161007a578063d3c617ff146103c2578063d98493f614610464578063dea580b914610484578063e4c0aaf4146104a4578063ebb71194146104c4578063f6506db4146104e4578063f7434ea9146104ff57600080fd5b8063936260841461031c578063a60a4db51461033c578063bcb1a1661461035c578063be20309414610371578063c13517e114610391578063ce0aaf95146103a457600080fd5b806345c904411161011357806345c9044114610267578063492d85d4146102945780634d53c2a5146102b45780634f1ef286146102d457806352d1902d146102e757806367c51947146102fc57600080fd5b80630c340a241461015b5780631c3db16d146101985780631debaba6146101d55780631fc6b556146101f75780632e1db8901461021b57806336e41d3d14610251575b600080fd5b34801561016757600080fd5b5060025461017b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101a457600080fd5b506101b86101b336600461100f565b61051f565b60408051938452911515602084015215159082015260600161018f565b3480156101e157600080fd5b506101f56101f036600461103d565b610545565b005b34801561020357600080fd5b5061020d60045481565b60405190815260200161018f565b34801561022757600080fd5b5061020d61023636600461100f565b6000908152600860205260409020546001600160f81b031690565b34801561025d57600080fd5b5061020d60075481565b34801561027357600080fd5b5061020d610282366004611085565b60016020526000908152604090205481565b3480156102a057600080fd5b506101f56102af3660046110a7565b6105ad565b3480156102c057600080fd5b5060055461017b906001600160a01b031681565b6101f56102e23660046110da565b6105f9565b3480156102f357600080fd5b5061020d610821565b34801561030857600080fd5b506101f561031736600461119d565b61087f565b34801561032857600080fd5b5060065461017b906001600160a01b031681565b34801561034857600080fd5b506101f56103573660046111b9565b610902565b34801561036857600080fd5b5061020d600381565b34801561037d57600080fd5b506101f561038c366004611203565b610b1f565b61020d61039f366004611293565b610c35565b3480156103b057600080fd5b506005546001600160a01b031661017b565b3480156103ce57600080fd5b506104266103dd36600461100f565b60086020526000908152604090208054600182015460028301546003909301546001600160f81b03831693600160f81b90930460ff16926001600160a01b039283169290911685565b604080516001600160f81b03909616865293151560208601526001600160a01b0392831693850193909352606084015216608082015260a00161018f565b34801561047057600080fd5b5061020d61047f3660046112de565b610dd1565b34801561049057600080fd5b5060035461017b906001600160a01b031681565b3480156104b057600080fd5b506101f56104bf3660046110a7565b610deb565b3480156104d057600080fd5b506101f56104df36600461100f565b610e37565b3480156104f057600080fd5b5061020d61047f366004611334565b34801561050b57600080fd5b5061020d61051a36600461139a565b610f03565b600080600060405162461bcd60e51b815260040161053c906113db565b60405180910390fd5b6002546001600160a01b0316331461056f5760405162461bcd60e51b815260040161053c90611402565b610579814261145a565b6007555060038054600680546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6002546001600160a01b031633146105d75760405162461bcd60e51b815260040161053c90611402565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61060282610f79565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061068057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106746000805160206115c58339815191525490565b6001600160a01b031614155b1561069e5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f8575060408051601f3d908101601f191682019092526106f591810190611473565b60015b61072057604051630c76093760e01b81526001600160a01b038316600482015260240161053c565b6000805160206115c5833981519152811461075157604051632a87526960e21b81526004810182905260240161053c565b6000805160206115c58339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561081c576000836001600160a01b0316836040516107b8919061148c565b600060405180830381855af49150503d80600081146107f3576040519150601f19603f3d011682016040523d82523d6000602084013e6107f8565b606091505b505090508061081a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461086c5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206115c583398151915290565b6002546001600160a01b031633146108a95760405162461bcd60e51b815260040161053c90611402565b6001600160601b03821660008181526001602052604090819020839055517f20a6ef9c48f3a1ae927e70bc34e82d974c53d3c98c8fd9e731c4bacd5842c596906108f69084815260200190565b60405180910390a25050565b60035484906001600160a01b031633148061093357506007544210801561093357506006546001600160a01b031633145b61098b5760405162461bcd60e51b8152602060048201526024808201527f416363657373206e6f7420616c6c6f7765643a20566561204f7574626f78206f60448201526337363c9760e11b606482015260840161053c565b6005546001600160a01b038281169116146109f65760405162461bcd60e51b815260206004820152602560248201527f416363657373206e6f7420616c6c6f7765643a20486f6d65476174657761792060448201526437b7363c9760d91b606482015260840161053c565b6000848152600860205260408120805490916001600160f81b039091169003610a315760405162461bcd60e51b815260040161053c906114bb565b8054600160f81b900460ff1615610a7e5760405162461bcd60e51b815260206004820152601160248201527043616e6e6f742072756c6520747769636560781b604482015260640161053c565b80546001600160f81b0316600160f81b811782556003820180546001600160a01b038681166001600160a01b031990921691909117909155600183015460405163188d362b60e11b81526004810193909352602483018790521690819063311a6c5690604401600060405180830381600087803b158015610afe57600080fd5b505af1158015610b12573d6000803e3d6000fd5b5050505050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610b68575080546001600160401b03808416911610155b15610b855760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600280546001600160a01b038981166001600160a01b03199283161790925560038054898416908316179055600487905560058054928716929091169190911790556001600055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b6000610c418383610f03565b341015610c905760405162461bcd60e51b815260206004820152601f60248201527f4e6f74207061696420656e6f75676820666f72206172626974726174696f6e00604482015260640161053c565b600080549080610c9f836114eb565b909155509050466000610cb3600143611504565b40823385898989604051602001610cd09796959493929190611517565b60408051601f19818403018152828252805160209182012060a0840183526001600160f81b0380881685526000858401818152338787018181523460608a0190815260808a01858152878652600890985297909320975191511515600160f81b029190931617865551600186810180546001600160a01b039384166001600160a01b031991821617909155955160028801559351600390960180549690911695909416949094179092559092508491907f03e54fa10baada663d819e5d7e4533535bfb6d4407abe51045be84e6c8de020390610dac9043611504565b40898989604051610dc09493929190611570565b60405180910390a350509392505050565b600060405162461bcd60e51b815260040161053c906113db565b6002546001600160a01b03163314610e155760405162461bcd60e51b815260040161053c90611402565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600860205260408120805490916001600160f81b039091169003610e725760405162461bcd60e51b815260040161053c906114bb565b8054600160f81b900460ff16610eba5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c9d5b1959081e595d609a1b604482015260640161053c565b600281018054600091829055600383015460405191926001600160a01b039091169183156108fc0291849190818181858888f1935050505015801561081a573d6000803e3d6000fd5b6000806000610f4785858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fa692505050565b6001600160601b0382166000908152600160205260409020549193509150610f709082906115ad565b95945050505050565b6002546001600160a01b03163314610fa35760405162461bcd60e51b815260040161053c90611402565b50565b600080604083511061100357602083015191506040830151905060016000836001600160601b03166001600160601b0316815260200190815260200160002054600003610ff257600091505b80600003610ffe575060035b915091565b50600090506003915091565b60006020828403121561102157600080fd5b5035919050565b6001600160a01b0381168114610fa357600080fd5b6000806040838503121561105057600080fd5b823561105b81611028565b946020939093013593505050565b80356001600160601b038116811461108057600080fd5b919050565b60006020828403121561109757600080fd5b6110a082611069565b9392505050565b6000602082840312156110b957600080fd5b81356110a081611028565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156110ed57600080fd5b82356110f881611028565b915060208301356001600160401b038082111561111457600080fd5b818501915085601f83011261112857600080fd5b81358181111561113a5761113a6110c4565b604051601f8201601f19908116603f01168101908382118183101715611162576111626110c4565b8160405282815288602084870101111561117b57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080604083850312156111b057600080fd5b61105b83611069565b600080600080608085870312156111cf57600080fd5b84356111da81611028565b9350602085013592506040850135915060608501356111f881611028565b939692955090935050565b6000806000806080858703121561121957600080fd5b843561122481611028565b9350602085013561123481611028565b92506040850135915060608501356111f881611028565b60008083601f84011261125d57600080fd5b5081356001600160401b0381111561127457600080fd5b60208301915083602082850101111561128c57600080fd5b9250929050565b6000806000604084860312156112a857600080fd5b8335925060208401356001600160401b038111156112c557600080fd5b6112d18682870161124b565b9497909650939450505050565b6000806000604084860312156112f357600080fd5b83356001600160401b0381111561130957600080fd5b6113158682870161124b565b909450925050602084013561132981611028565b809150509250925092565b60008060008060006080868803121561134c57600080fd5b8535945060208601356001600160401b0381111561136957600080fd5b6113758882890161124b565b909550935050604086013561138981611028565b949793965091946060013592915050565b600080602083850312156113ad57600080fd5b82356001600160401b038111156113c357600080fd5b6113cf8582860161124b565b90969095509350505050565b6020808252600d908201526c139bdd081cdd5c1c1bdc9d1959609a1b604082015260600190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561146d5761146d611444565b92915050565b60006020828403121561148557600080fd5b5051919050565b6000825160005b818110156114ad5760208186018101518583015201611493565b506000920191825250919050565b602080825260169082015275111a5cdc1d5d1948191bd95cc81b9bdd08195e1a5cdd60521b604082015260600190565b6000600182016114fd576114fd611444565b5060010190565b8181038181111561146d5761146d611444565b6c6372656174654469737075746560981b815287600d82015286602d8201526001600160601b03198660601b16604d820152846061820152836081820152818360a18301376000910160a1019081529695505050505050565b84815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b808202811582820484141761146d5761146d61144456fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204651c10eb8dded7d25f1b67d58f568a9aabba6e281bf159ce4fbee5373c5507664736f6c63430008120033", - "devdoc": { - "errors": { - "AlreadyInitialized()": [ - { - "details": "The contract is already initialized." - } - ], - "NotInitializing()": [ - { - "details": "The contract is not initializing." - } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } - ] - }, - "events": { - "AcceptedFeeToken(address,bool)": { - "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", - "params": { - "_accepted": "Whether the token is accepted or not.", - "_token": "The ERC20 token." - } - }, - "CrossChainDisputeOutgoing(bytes32,address,uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is sent to the IHomeGateway.", - "params": { - "_choices": "The number of choices the arbitrator can choose from in this dispute.", - "_extraData": "Any extra data to attach.", - "_foreignArbitrable": "The address of the Arbitrable contract.", - "_foreignBlockHash": "foreignBlockHash", - "_foreignDisputeID": "The identifier of the dispute in the Arbitrable contract." - } - }, - "DisputeCreation(uint256,address)": { - "details": "To be emitted when a dispute is created.", - "params": { - "_arbitrable": "The contract which created the dispute.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract." - } - }, - "Initialized(uint64)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "NewCurrencyRate(address,uint64,uint8)": { - "details": "To be emitted when the fee for a particular ERC20 token is updated.", - "params": { - "_feeToken": "The ERC20 token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", - "params": { - "_arbitrable": "The arbitrable receiving the ruling.", - "_disputeID": "The identifier of the dispute in the Arbitrator contract.", - "_ruling": "The ruling which was given." - } - }, - "Upgraded(address)": { - "params": { - "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." - } - } - }, - "kind": "dev", - "methods": { - "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in the native currency, typically ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." - }, - "returns": { - "cost": "The arbitration cost in ETH." - } - }, - "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeToken": "The ERC20 token used to pay fees." - }, - "returns": { - "_0": "The arbitration cost in `_feeToken`." - } - }, - "changeCourtJurorFee(uint96,uint256)": { - "details": "Changes the `feeForJuror` property value of a specified court.", - "params": { - "_courtID": "The ID of the court on the v2 arbitrator. Not to be confused with the courtID on KlerosLiquid.", - "_feeForJuror": "The new value for the `feeForJuror` property value." - } - }, - "changeGovernor(address)": { - "details": "Changes the governor.", - "params": { - "_governor": "The address of the new governor." - } - }, - "changeHomeGateway(address)": { - "details": "Changes the home gateway.", - "params": { - "_homeGateway": "The address of the new home gateway." - } - }, - "changeVea(address,uint256)": { - "details": "Changes the outbox.", - "params": { - "_gracePeriod": "The duration to accept messages from the deprecated bridge (if at all).", - "_veaOutbox": "The address of the new outbox." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." - }, - "createDispute(uint256,bytes)": { - "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "disputeID": "The identifier of the dispute created." - } - }, - "createDispute(uint256,bytes,address,uint256)": { - "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeAmount": "Amount of the ERC20 token used to pay fees.", - "_feeToken": "The ERC20 token used to pay fees.", - "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." - }, - "returns": { - "_0": "The identifier of the dispute created." - } - }, - "disputeHashToForeignID(bytes32)": { - "details": "Looks up the local foreign disputeID for a disputeHash", - "params": { - "_disputeHash": "dispute hash" - } - }, - "initialize(address,address,uint256,address)": { - "details": "Constructs the `PolicyRegistry` contract.", - "params": { - "_governor": "The governor's address." - } - }, - "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", - "params": { - "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", - "newImplementation": "Address of the new implementation contract." - } - }, - "withdrawFees(bytes32)": { - "params": { - "_disputeHash": "The dispute hash for which to withdraw the fees." - } - } - }, - "stateVariables": { - "homeChainID": { - "return": "The chain ID where the corresponding home gateway is deployed.", - "returns": { - "_0": "The chain ID where the corresponding home gateway is deployed." - } - }, - "homeGateway": { - "return": "The address of the corresponding home gateway.", - "returns": { - "_0": "The address of the corresponding home gateway." - } - } - }, - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ], - "InvalidImplementation(address)": [ - { - "notice": "The `implementation` is not UUPS-compliant" - } - ] - }, - "events": { - "Upgraded(address)": { - "notice": "Emitted when the `implementation` has been successfully upgraded." - } - }, - "kind": "user", - "methods": { - "relayRule(address,bytes32,uint256,address)": { - "notice": "Relay the rule call from the home gateway to the arbitrable." - }, - "withdrawFees(bytes32)": { - "notice": "Reimburses the dispute fees to the relayer who paid for these fees on the home chain." - } - }, - "notice": "Foreign Gateway Counterpart of `HomeGateway`", - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 15912, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "localDisputeID", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 15916, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "feeForJuror", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_uint96,t_uint256)" - }, - { - "astId": 15918, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "governor", - "offset": 0, - "slot": "2", - "type": "t_address" - }, - { - "astId": 15920, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "veaOutbox", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 15923, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "homeChainID", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 15926, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "homeGateway", - "offset": 0, - "slot": "5", - "type": "t_address" - }, - { - "astId": 15928, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "deprecatedVeaOutbox", - "offset": 0, - "slot": "6", - "type": "t_address" - }, - { - "astId": 15930, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "deprecatedVeaOutboxExpiration", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 15935, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "disputeHashtoDisputeData", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_bytes32,t_struct(DisputeData)15901_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(DisputeData)15901_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct ForeignGateway.DisputeData)", - "numberOfBytes": "32", - "value": "t_struct(DisputeData)15901_storage" - }, - "t_mapping(t_uint96,t_uint256)": { - "encoding": "mapping", - "key": "t_uint96", - "label": "mapping(uint96 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeData)15901_storage": { - "encoding": "inplace", - "label": "struct ForeignGateway.DisputeData", - "members": [ - { - "astId": 15892, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "id", - "offset": 0, - "slot": "0", - "type": "t_uint248" - }, - { - "astId": 15894, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "ruled", - "offset": 31, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 15896, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "arbitrable", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 15898, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "paid", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 15900, - "contract": "src/gateway/ForeignGateway.sol:ForeignGateway", - "label": "relayer", - "offset": 0, - "slot": "3", - "type": "t_address" - } - ], - "numberOfBytes": "128" - }, - "t_uint248": { - "encoding": "inplace", - "label": "uint248", - "numberOfBytes": "31" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/chiadoDevnet/ForeignGatewayOnGnosis_Proxy.json b/contracts/deployments/chiadoDevnet/ForeignGatewayOnGnosis_Proxy.json deleted file mode 100644 index 5b032be43..000000000 --- a/contracts/deployments/chiadoDevnet/ForeignGatewayOnGnosis_Proxy.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "address": "0x078dAd05373d19d7fd6829735b765F12242a4300", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x01874fb34459c6ed77c5cb60dfd0cfb40aebacc46073f1d06df7e1b47e790705", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x078dAd05373d19d7fd6829735b765F12242a4300", - "transactionIndex": 1, - "gasUsed": "265335", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7ede631dec7eef5b52cd5719c77b2df2768ce5716f943b49d0484d77f81d9568", - "transactionHash": "0x01874fb34459c6ed77c5cb60dfd0cfb40aebacc46073f1d06df7e1b47e790705", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 6246439, - "transactionHash": "0x01874fb34459c6ed77c5cb60dfd0cfb40aebacc46073f1d06df7e1b47e790705", - "address": "0x078dAd05373d19d7fd6829735b765F12242a4300", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x7ede631dec7eef5b52cd5719c77b2df2768ce5716f943b49d0484d77f81d9568" - } - ], - "blockNumber": 6246439, - "cumulativeGasUsed": "291331", - "status": 1, - "byzantium": true - }, - "args": [ - "0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace", - "0xbe203094000000000000000000000000f50e77f2a2b6138d16c6c7511562e5c33c4b15a3000000000000000000000000dfd7adeb43d46fa3f16fb3e27f7fe85c3f5bd89d0000000000000000000000000000000000000000000000000000000000066eed000000000000000000000000920856556ef06ff7d337af964d1954862f8da049" - ], - "numDeployments": 1, - "solcInputHash": "55cffe29f75540cd17d37d1c4bbabcf9", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.18;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x828711038a141a5cfcef6f24bb33af8cbf7f336c69fb969d7d0be0646667382b\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220e77e937000f74af50aa176fcbe90b8f19064161349c6b089e5987215280177d364736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220e77e937000f74af50aa176fcbe90b8f19064161349c6b089e5987215280177d364736f6c63430008120033", - "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", - "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/chiadoDevnet/WETH.json b/contracts/deployments/chiadoDevnet/WETH.json deleted file mode 100644 index 23a52d4df..000000000 --- a/contracts/deployments/chiadoDevnet/WETH.json +++ /dev/null @@ -1,444 +0,0 @@ -{ - "address": "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ], - "transactionHash": "0x57090c7c0edd4f488d92d65d10d04f803f1d2658828607b339ab8f6cd676f7bd", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8", - "transactionIndex": 0, - "gasUsed": "616183", - "logsBloom": "0x00000000000000000000000000000000000000000000100000000000000000000000000200000000010000000000000001000000000000000000000000000000000000000000000000000008000040000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0b5d4a38d69dfb9c7f93cfb222f9ebfcca7355d9a5997f865a92d0fd8318ac5a", - "transactionHash": "0x57090c7c0edd4f488d92d65d10d04f803f1d2658828607b339ab8f6cd676f7bd", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 4423420, - "transactionHash": "0x57090c7c0edd4f488d92d65d10d04f803f1d2658828607b339ab8f6cd676f7bd", - "address": "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f50e77f2a2b6138d16c6c7511562e5c33c4b15a3" - ], - "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", - "logIndex": 0, - "blockHash": "0x0b5d4a38d69dfb9c7f93cfb222f9ebfcca7355d9a5997f865a92d0fd8318ac5a" - } - ], - "blockNumber": 4423420, - "cumulativeGasUsed": "616183", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 3, - "solcInputHash": "36e3015201aa6368fd28e007dfb67b68", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"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\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/WETH.sol\":\"WETH\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"src/token/WETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract WETH is ERC20 {\\n constructor() ERC20(\\\"Wrapped ETH\\\", \\\"WETH\\\") {\\n _mint(msg.sender, 1000000 ether);\\n }\\n}\\n\",\"keccak256\":\"0xee41099235b80965c307cddbe273692a3e5317ee44c7cbdeaeab22e68b55d24b\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040518060400160405280600b81526020016a0aee4c2e0e0cac8408aa8960ab1b815250604051806040016040528060048152602001630ae8aa8960e31b815250816003908162000064919062000207565b50600462000073828262000207565b505050620000923369d3c21bcecceda10000006200009860201b60201c565b620002fb565b6001600160a01b038216620000f35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620001079190620002d3565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200018e57607f821691505b602082108103620001af57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200015e57600081815260208120601f850160051c81016020861015620001de5750805b601f850160051c820191505b81811015620001ff57828155600101620001ea565b505050505050565b81516001600160401b0381111562000223576200022362000163565b6200023b8162000234845462000179565b84620001b5565b602080601f8311600181146200027357600084156200025a5750858301515b600019600386901b1c1916600185901b178555620001ff565b600085815260208120601f198616915b82811015620002a45788860151825594840194600190910190840162000283565b5085821015620002c35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620002f557634e487b7160e01b600052601160045260246000fd5b92915050565b610852806200030b6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea2646970667358221220e1d527c750571d35e5d16511e833b7b399408fe6b53314379368c49007623f1e64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069c565b60405180910390f35b6100df6100da366004610706565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610730565b61024c565b604051601281526020016100c3565b6100df610131366004610706565b610270565b6100f361014436600461076c565b6001600160a01b031660009081526020819052604090205490565b6100b6610292565b6100df610175366004610706565b6102a1565b6100df610188366004610706565b610321565b6100f361019b36600461078e565b61032f565b6060600380546101af906107c1565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c1565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b60003361024081858561035a565b60019150505b92915050565b60003361025a85828561047e565b6102658585856104f8565b506001949350505050565b600033610240818585610283838361032f565b61028d91906107fb565b61035a565b6060600480546101af906107c1565b600033816102af828661032f565b9050838110156103145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610265828686840361035a565b6000336102408185856104f8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103bc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161030b565b6001600160a01b03821661041d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161030b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061048a848461032f565b905060001981146104f257818110156104e55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161030b565b6104f2848484840361035a565b50505050565b6001600160a01b03831661055c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161030b565b6001600160a01b0382166105be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161030b565b6001600160a01b038316600090815260208190526040902054818110156106365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161030b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f2565b600060208083528351808285015260005b818110156106c9578581018301518582016040015282016106ad565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461070157600080fd5b919050565b6000806040838503121561071957600080fd5b610722836106ea565b946020939093013593505050565b60008060006060848603121561074557600080fd5b61074e846106ea565b925061075c602085016106ea565b9150604084013590509250925092565b60006020828403121561077e57600080fd5b610787826106ea565b9392505050565b600080604083850312156107a157600080fd5b6107aa836106ea565b91506107b8602084016106ea565b90509250929050565b600181811c908216806107d557607f821691505b6020821081036107f557634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024657634e487b7160e01b600052601160045260246000fdfea2646970667358221220e1d527c750571d35e5d16511e833b7b399408fe6b53314379368c49007623f1e64736f6c63430008120033", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 197, - "contract": "src/token/WETH.sol:WETH", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 203, - "contract": "src/token/WETH.sol:WETH", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 205, - "contract": "src/token/WETH.sol:WETH", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 207, - "contract": "src/token/WETH.sol:WETH", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 209, - "contract": "src/token/WETH.sol:WETH", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/chiadoDevnet/WETHFaucet.json b/contracts/deployments/chiadoDevnet/WETHFaucet.json deleted file mode 100644 index 8cf43683b..000000000 --- a/contracts/deployments/chiadoDevnet/WETHFaucet.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "address": "0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x9a86ee614df7494319cd67b7c2140646d053530aff41dd8c45444f6624d41fc5", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F", - "transactionIndex": 0, - "gasUsed": "253721", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xf99610b5a422ae735fcd92fdaf1dc89b4655f9d7a4569a570a18c4404ab08c30", - "transactionHash": "0x9a86ee614df7494319cd67b7c2140646d053530aff41dd8c45444f6624d41fc5", - "logs": [], - "blockNumber": 4423421, - "cumulativeGasUsed": "253721", - "status": 1, - "byzantium": true - }, - "args": [ - "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8" - ], - "numDeployments": 3, - "solcInputHash": "36e3015201aa6368fd28e007dfb67b68", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n IERC20 public token;\\n mapping(address => bool) public withdrewAlready;\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n }\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, 10000 ether);\\n withdrewAlready[msg.sender] = true;\\n }\\n}\\n\",\"keccak256\":\"0xac876a15a73b0ab2161f4e42850028fbc6db4a899f83052c0d4f97050b2d1650\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516103c23803806103c283398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b61032f806100936000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063338cdca114610051578063b69ef8a81461005b578063d61c40dc14610076578063fc0c546a146100a9575b600080fd5b6100596100d4565b005b61006361021c565b6040519081526020015b60405180910390f35b61009961008436600461028e565b60016020526000908152604090205460ff1681565b604051901515815260200161006d565b6000546100bc906001600160a01b031681565b6040516001600160a01b03909116815260200161006d565b3360009081526001602052604090205460ff161561017e5760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a40160405180910390fd5b60005460405163a9059cbb60e01b815233600482015269021e19e0c9bab240000060248201526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156101d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fc91906102be565b50336000908152600160208190526040909120805460ff19169091179055565b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610265573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028991906102e0565b905090565b6000602082840312156102a057600080fd5b81356001600160a01b03811681146102b757600080fd5b9392505050565b6000602082840312156102d057600080fd5b815180151581146102b757600080fd5b6000602082840312156102f257600080fd5b505191905056fea2646970667358221220885a998acda2ccef49efd5707e9579a53bbed80122cfef4ce320a92f34aba57664736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063338cdca114610051578063b69ef8a81461005b578063d61c40dc14610076578063fc0c546a146100a9575b600080fd5b6100596100d4565b005b61006361021c565b6040519081526020015b60405180910390f35b61009961008436600461028e565b60016020526000908152604090205460ff1681565b604051901515815260200161006d565b6000546100bc906001600160a01b031681565b6040516001600160a01b03909116815260200161006d565b3360009081526001602052604090205460ff161561017e5760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a40160405180910390fd5b60005460405163a9059cbb60e01b815233600482015269021e19e0c9bab240000060248201526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156101d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fc91906102be565b50336000908152600160208190526040909120805460ff19169091179055565b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610265573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028991906102e0565b905090565b6000602082840312156102a057600080fd5b81356001600160a01b03811681146102b757600080fd5b9392505050565b6000602082840312156102d057600080fd5b815180151581146102b757600080fd5b6000602082840312156102f257600080fd5b505191905056fea2646970667358221220885a998acda2ccef49efd5707e9579a53bbed80122cfef4ce320a92f34aba57664736f6c63430008120033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 14749, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)846" - }, - { - "astId": 14753, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)846": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - } - } - } -} diff --git a/contracts/deployments/chiadoDevnet/WPNKFaucet.json b/contracts/deployments/chiadoDevnet/WPNKFaucet.json deleted file mode 100644 index f8b4d15be..000000000 --- a/contracts/deployments/chiadoDevnet/WPNKFaucet.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "address": "0x5898aeE045A25B276369914c3448B72a41758B2c", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "balance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "request", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrewAlready", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xb35cd25025514f4ceea9f6794c1d39aa7b864712e7e12894835e1f0339ff4b19", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x5898aeE045A25B276369914c3448B72a41758B2c", - "transactionIndex": 0, - "gasUsed": "260119", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2a5bf0e51e6ef3b5d65aa0b72477796eef03ac7702a74c66d64e8d6ff56df53f", - "transactionHash": "0xb35cd25025514f4ceea9f6794c1d39aa7b864712e7e12894835e1f0339ff4b19", - "logs": [], - "blockNumber": 2322229, - "cumulativeGasUsed": "260119", - "status": 1, - "byzantium": true - }, - "args": [ - "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd" - ], - "numDeployments": 2, - "solcInputHash": "619e4fd2e5ff33514c8e0080269dcddd", - "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"request\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrewAlready\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/Faucet.sol\":\"Faucet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"src/token/Faucet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract Faucet {\\n IERC20 public token;\\n mapping(address => bool) public withdrewAlready;\\n\\n constructor(IERC20 _token) {\\n token = _token;\\n }\\n\\n function balance() public view returns (uint) {\\n return token.balanceOf(address(this));\\n }\\n\\n function request() public {\\n require(\\n !withdrewAlready[msg.sender],\\n \\\"You have used this faucet already. If you need more tokens, please use another address.\\\"\\n );\\n token.transfer(msg.sender, 10000 ether);\\n withdrewAlready[msg.sender] = true;\\n }\\n}\\n\",\"keccak256\":\"0x96dfe825cf0342eeff4380ac3632e50fed75eb083ff9b5133ab1575ed38dc333\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516103e03803806103e083398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b61034d806100936000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063338cdca114610051578063b69ef8a81461005b578063d61c40dc14610076578063fc0c546a146100a9575b600080fd5b6100596100d4565b005b61006361022b565b6040519081526020015b60405180910390f35b6100996100843660046102ac565b60016020526000908152604090205460ff1681565b604051901515815260200161006d565b6000546100bc906001600160a01b031681565b6040516001600160a01b03909116815260200161006d565b3360009081526001602052604090205460ff161561017e5760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a40160405180910390fd5b60005460405163a9059cbb60e01b815233600482015269021e19e0c9bab240000060248201526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b1580156101d357600080fd5b505af11580156101e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020b91906102dc565b50336000908152600160208190526040909120805460ff19169091179055565b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561026f57600080fd5b505afa158015610283573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a791906102fe565b905090565b6000602082840312156102be57600080fd5b81356001600160a01b03811681146102d557600080fd5b9392505050565b6000602082840312156102ee57600080fd5b815180151581146102d557600080fd5b60006020828403121561031057600080fd5b505191905056fea26469706673582212205834b9da8d3e30c6124c75f3a860d0d45dd1a253a98d2f15c37030d47e91889a64736f6c63430008090033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063338cdca114610051578063b69ef8a81461005b578063d61c40dc14610076578063fc0c546a146100a9575b600080fd5b6100596100d4565b005b61006361022b565b6040519081526020015b60405180910390f35b6100996100843660046102ac565b60016020526000908152604090205460ff1681565b604051901515815260200161006d565b6000546100bc906001600160a01b031681565b6040516001600160a01b03909116815260200161006d565b3360009081526001602052604090205460ff161561017e5760405162461bcd60e51b815260206004820152605760248201527f596f752068617665207573656420746869732066617563657420616c7265616460448201527f792e20496620796f75206e656564206d6f726520746f6b656e732c20706c656160648201527639b2903ab9b29030b737ba3432b91030b2323932b9b99760491b608482015260a40160405180910390fd5b60005460405163a9059cbb60e01b815233600482015269021e19e0c9bab240000060248201526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b1580156101d357600080fd5b505af11580156101e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020b91906102dc565b50336000908152600160208190526040909120805460ff19169091179055565b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561026f57600080fd5b505afa158015610283573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a791906102fe565b905090565b6000602082840312156102be57600080fd5b81356001600160a01b03811681146102d557600080fd5b9392505050565b6000602082840312156102ee57600080fd5b815180151581146102d557600080fd5b60006020828403121561031057600080fd5b505191905056fea26469706673582212205834b9da8d3e30c6124c75f3a860d0d45dd1a253a98d2f15c37030d47e91889a64736f6c63430008090033", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 26232, - "contract": "src/token/Faucet.sol:Faucet", - "label": "token", - "offset": 0, - "slot": "0", - "type": "t_contract(IERC20)1072" - }, - { - "astId": 26236, - "contract": "src/token/Faucet.sol:Faucet", - "label": "withdrewAlready", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IERC20)1072": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - } - } - } -} diff --git a/contracts/deployments/chiadoDevnet/WrappedPinakionV2.json b/contracts/deployments/chiadoDevnet/WrappedPinakionV2.json deleted file mode 100644 index a12bae532..000000000 --- a/contracts/deployments/chiadoDevnet/WrappedPinakionV2.json +++ /dev/null @@ -1,436 +0,0 @@ -{ - "address": "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "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" - } - ], - "transactionHash": "0xfa9fed8954035128e3a75c493d5ac33cc2bffa9e191a9ece16f9a2757cb2bab8", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd", - "transactionIndex": 1, - "gasUsed": "616199", - "logsBloom": "0x0000000000000000000000000000000000000000000000000000000000000000000000020000000001000200000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000400000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa2364345d35827c8c0c8c469b6ae0824e3ab838dcc0e0dbaabf3450754b49992", - "transactionHash": "0xfa9fed8954035128e3a75c493d5ac33cc2bffa9e191a9ece16f9a2757cb2bab8", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 2322228, - "transactionHash": "0xfa9fed8954035128e3a75c493d5ac33cc2bffa9e191a9ece16f9a2757cb2bab8", - "address": "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f50e77f2a2b6138d16c6c7511562e5c33c4b15a3" - ], - "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", - "logIndex": 1, - "blockHash": "0xa2364345d35827c8c0c8c469b6ae0824e3ab838dcc0e0dbaabf3450754b49992" - } - ], - "blockNumber": 2322228, - "cumulativeGasUsed": "4491861", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "619e4fd2e5ff33514c8e0080269dcddd", - "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/WrappedPinakionV2.sol\":\"WrappedPinakionV2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x4ffc0547c02ad22925310c585c0f166f8759e2648a09e9b489100c42f15dd98d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"src/token/WrappedPinakionV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ncontract WrappedPinakionV2 is ERC20 {\\n constructor() ERC20(\\\"Staking PNK on xDai\\\", \\\"stPNK\\\") {\\n _mint(msg.sender, 1000000 ether);\\n }\\n}\\n\",\"keccak256\":\"0xc0648090b2add69db6ae19830b9c1a589af0fa059fada8ffb6ccdeed90e84c02\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604080518082018252601381527f5374616b696e6720504e4b206f6e2078446169000000000000000000000000006020808301918252835180850190945260058452647374504e4b60d81b9084015281519192916100719160039161016a565b50805161008590600490602084019061016a565b5050506100a23369d3c21bcecceda10000006100a760201b60201c565b610264565b6001600160a01b0382166101015760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b80600260008282546101139190610203565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b82805461017690610229565b90600052602060002090601f01602090048101928261019857600085556101de565b82601f106101b157805160ff19168380011785556101de565b828001600101855582156101de579182015b828111156101de5782518255916020019190600101906101c3565b506101ea9291506101ee565b5090565b5b808211156101ea57600081556001016101ef565b6000821982111561022457634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168061023d57607f821691505b6020821081141561025e57634e487b7160e01b600052602260045260246000fd5b50919050565b61085d806102736000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610801565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b602082108114156107fb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082257634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220f3e2c60c1f5db76a5e828c52754fa6038e65d3519bf5c40755c1db138d61812264736f6c63430008090033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610801565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b602082108114156107fb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082257634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220f3e2c60c1f5db76a5e828c52754fa6038e65d3519bf5c40755c1db138d61812264736f6c63430008090033", - "devdoc": { - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 423, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 429, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 431, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 433, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 435, - "contract": "src/token/WrappedPinakionV2.sol:WrappedPinakionV2", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/contractsEthers.ts b/contracts/deployments/contractsEthers.ts deleted file mode 100644 index b5da4705e..000000000 --- a/contracts/deployments/contractsEthers.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { ethers } from "ethers"; -import { - klerosCoreConfig as devnetCoreConfig, - sortitionModuleConfig as devnetSortitionConfig, - disputeKitClassicConfig as devnetDkClassicConfig, - disputeKitShutterConfig as devnetDkShutterConfig, - disputeKitGatedConfig as devnetDkGatedConfig, - disputeKitGatedShutterConfig as devnetDkGatedShutterConfig, - disputeResolverConfig as devnetDrConfig, - disputeTemplateRegistryConfig as devnetDtrConfig, - evidenceModuleConfig as devnetEvidenceConfig, - policyRegistryConfig as devnetPolicyRegistryConfig, - transactionBatcherConfig as devnetBatcherConfig, - chainlinkRngConfig as devnetChainlinkRngConfig, - blockHashRngConfig as devnetBlockHashRngConfig, - pnkConfig as devnetPnkConfig, - klerosCoreSnapshotProxyConfig as devnetSnapshotProxyConfig, - klerosCoreUniversityConfig as devnetCoreUniversityConfig, - sortitionModuleUniversityConfig as devnetSortitionUniversityConfig, - disputeKitClassicUniversityConfig as devnetDkClassicUniversityConfig, - disputeResolverUniversityConfig as devnetDrUniversityConfig, -} from "./devnet.viem"; -import { - klerosCoreConfig as testnetCoreConfig, - sortitionModuleConfig as testnetSortitionConfig, - disputeKitClassicConfig as testnetDkcConfig, - disputeKitShutterConfig as testnetDkShutterConfig, - disputeKitGatedConfig as testnetDkGatedConfig, - disputeKitGatedShutterConfig as testnetDkGatedShutterConfig, - disputeResolverConfig as testnetDrConfig, - disputeTemplateRegistryConfig as testnetDtrConfig, - evidenceModuleConfig as testnetEvidenceConfig, - policyRegistryConfig as testnetPolicyRegistryConfig, - transactionBatcherConfig as testnetBatcherConfig, - chainlinkRngConfig as testnetChainlinkRngConfig, - blockHashRngConfig as testnetBlockHashRngConfig, - pnkConfig as testnetPnkConfig, - klerosCoreSnapshotProxyConfig as testnetSnapshotProxyConfig, -} from "./testnet.viem"; -import { - klerosCoreConfig as mainnetCoreConfig, - sortitionModuleConfig as mainnetSortitionConfig, - disputeKitClassicConfig as mainnetDkcConfig, - disputeKitShutterConfig as mainnetDkShutterConfig, - disputeKitGatedConfig as mainnetDkGatedConfig, - disputeKitGatedShutterConfig as mainnetDkGatedShutterConfig, - disputeResolverConfig as mainnetDrConfig, - disputeTemplateRegistryConfig as mainnetDtrConfig, - evidenceModuleConfig as mainnetEvidenceConfig, - policyRegistryConfig as mainnetPolicyRegistryConfig, - transactionBatcherConfig as mainnetBatcherConfig, - chainlinkRngConfig as mainnetChainlinkRngConfig, - randomizerRngConfig as mainnetRandomizerRngConfig, - blockHashRngConfig as mainnetBlockHashRngConfig, - pnkConfig as mainnetPnkConfig, - klerosCoreSnapshotProxyConfig as mainnetSnapshotProxyConfig, -} from "./mainnet.viem"; -import { - KlerosCore, - KlerosCore__factory, - SortitionModule, - SortitionModule__factory, - DisputeKitClassic, - DisputeKitClassic__factory, - DisputeKitShutter, - DisputeKitGated, - DisputeKitGatedShutter, - DisputeKitShutter__factory, - DisputeKitGated__factory, - DisputeKitGatedShutter__factory, - DisputeResolver, - DisputeResolver__factory, - DisputeTemplateRegistry, - DisputeTemplateRegistry__factory, - EvidenceModule, - EvidenceModule__factory, - PolicyRegistry, - PolicyRegistry__factory, - TransactionBatcher, - TransactionBatcher__factory, - ChainlinkRNG, - ChainlinkRNG__factory, - RandomizerRNG, - RandomizerRNG__factory, - BlockHashRNG, - BlockHashRNG__factory, - PNK, - PNK__factory, - KlerosCoreSnapshotProxy, - KlerosCoreSnapshotProxy__factory, - KlerosCoreUniversity, - KlerosCoreUniversity__factory, - SortitionModuleUniversity, - SortitionModuleUniversity__factory, -} from "../typechain-types"; -import { type ContractConfig, type DeploymentName, deployments, getAddress } from "./utils"; - -type CommonFactoriesConfigs = { - dkClassicConfig: ContractConfig; - dkShutterConfig?: ContractConfig; - dkGatedConfig?: ContractConfig; - dkGatedShutterConfig?: ContractConfig; - drConfig: ContractConfig; - dtrConfig: ContractConfig; - evidenceConfig: ContractConfig; - policyRegistryConfig: ContractConfig; - batcherConfig: ContractConfig; - chainlinkRngConfig?: ContractConfig; - randomizerRngConfig?: ContractConfig; - blockHashRngConfig: ContractConfig; - pnkConfig: ContractConfig; - snapshotProxyConfig: ContractConfig; -}; - -type CommonFactories = { - disputeKitClassic: DisputeKitClassic; - disputeKitShutter: DisputeKitShutter | null; - disputeKitGated: DisputeKitGated | null; - disputeKitGatedShutter: DisputeKitGatedShutter | null; - disputeResolver: DisputeResolver; - disputeTemplateRegistry: DisputeTemplateRegistry; - evidence: EvidenceModule; - policyRegistry: PolicyRegistry; - transactionBatcher: TransactionBatcher; - chainlinkRng: ChainlinkRNG | null; - randomizerRng: RandomizerRNG | null; - blockHashRng: BlockHashRNG; - pnk: PNK; - klerosCoreSnapshotProxy: KlerosCoreSnapshotProxy; -}; - -function getCommonFactories( - configs: CommonFactoriesConfigs, - provider: ethers.Provider, - chainId: number -): CommonFactories { - return { - disputeKitClassic: DisputeKitClassic__factory.connect(getAddress(configs.dkClassicConfig, chainId), provider), - disputeKitShutter: configs.dkShutterConfig - ? DisputeKitShutter__factory.connect(getAddress(configs.dkShutterConfig, chainId), provider) - : null, - disputeKitGated: configs.dkGatedConfig - ? DisputeKitGated__factory.connect(getAddress(configs.dkGatedConfig, chainId), provider) - : null, - disputeKitGatedShutter: configs.dkGatedShutterConfig - ? DisputeKitGatedShutter__factory.connect(getAddress(configs.dkGatedShutterConfig, chainId), provider) - : null, - disputeResolver: DisputeResolver__factory.connect(getAddress(configs.drConfig, chainId), provider), - disputeTemplateRegistry: DisputeTemplateRegistry__factory.connect(getAddress(configs.dtrConfig, chainId), provider), - evidence: EvidenceModule__factory.connect(getAddress(configs.evidenceConfig, chainId), provider), - policyRegistry: PolicyRegistry__factory.connect(getAddress(configs.policyRegistryConfig, chainId), provider), - transactionBatcher: TransactionBatcher__factory.connect(getAddress(configs.batcherConfig, chainId), provider), - chainlinkRng: configs.chainlinkRngConfig - ? ChainlinkRNG__factory.connect(getAddress(configs.chainlinkRngConfig, chainId), provider) - : null, - randomizerRng: configs.randomizerRngConfig - ? RandomizerRNG__factory.connect(getAddress(configs.randomizerRngConfig, chainId), provider) - : null, - blockHashRng: BlockHashRNG__factory.connect(getAddress(configs.blockHashRngConfig, chainId), provider), - pnk: PNK__factory.connect(getAddress(configs.pnkConfig, chainId), provider), - klerosCoreSnapshotProxy: KlerosCoreSnapshotProxy__factory.connect( - getAddress(configs.snapshotProxyConfig, chainId), - provider - ), - }; -} - -export const getContracts = async (provider: ethers.Provider, deployment: DeploymentName) => { - const { chainId } = deployments[deployment]; - let klerosCore: KlerosCore | KlerosCoreUniversity; - let sortition: SortitionModule | SortitionModuleUniversity; - let commonFactories: CommonFactories; - - switch (deployment) { - case "devnet": { - klerosCore = KlerosCore__factory.connect(getAddress(devnetCoreConfig, chainId), provider); - sortition = SortitionModule__factory.connect(getAddress(devnetSortitionConfig, chainId), provider); - commonFactories = getCommonFactories( - { - dkClassicConfig: devnetDkClassicConfig, - dkShutterConfig: devnetDkShutterConfig, - dkGatedConfig: devnetDkGatedConfig, - dkGatedShutterConfig: devnetDkGatedShutterConfig, - drConfig: devnetDrConfig, - dtrConfig: devnetDtrConfig, - evidenceConfig: devnetEvidenceConfig, - policyRegistryConfig: devnetPolicyRegistryConfig, - batcherConfig: devnetBatcherConfig, - chainlinkRngConfig: devnetChainlinkRngConfig, - blockHashRngConfig: devnetBlockHashRngConfig, - pnkConfig: devnetPnkConfig, - snapshotProxyConfig: devnetSnapshotProxyConfig, - }, - provider, - chainId - ); - break; - } - case "university": { - klerosCore = KlerosCoreUniversity__factory.connect(getAddress(devnetCoreUniversityConfig, chainId), provider); - sortition = SortitionModuleUniversity__factory.connect( - getAddress(devnetSortitionUniversityConfig, chainId), - provider - ); - commonFactories = getCommonFactories( - { - dkClassicConfig: devnetDkClassicUniversityConfig, - drConfig: devnetDrUniversityConfig, - dtrConfig: devnetDtrConfig, - evidenceConfig: devnetEvidenceConfig, - policyRegistryConfig: devnetPolicyRegistryConfig, - batcherConfig: devnetBatcherConfig, - chainlinkRngConfig: devnetChainlinkRngConfig, - blockHashRngConfig: devnetBlockHashRngConfig, - pnkConfig: devnetPnkConfig, - snapshotProxyConfig: devnetSnapshotProxyConfig, - }, - provider, - chainId - ); - break; - } - case "testnet": - klerosCore = KlerosCore__factory.connect(getAddress(testnetCoreConfig, chainId), provider); - sortition = SortitionModule__factory.connect(getAddress(testnetSortitionConfig, chainId), provider); - commonFactories = getCommonFactories( - { - dkClassicConfig: testnetDkcConfig, - dkShutterConfig: testnetDkShutterConfig, - dkGatedConfig: testnetDkGatedConfig, - dkGatedShutterConfig: testnetDkGatedShutterConfig, - drConfig: testnetDrConfig, - dtrConfig: testnetDtrConfig, - evidenceConfig: testnetEvidenceConfig, - policyRegistryConfig: testnetPolicyRegistryConfig, - batcherConfig: testnetBatcherConfig, - chainlinkRngConfig: testnetChainlinkRngConfig, - blockHashRngConfig: testnetBlockHashRngConfig, - pnkConfig: testnetPnkConfig, - snapshotProxyConfig: testnetSnapshotProxyConfig, - }, - provider, - chainId - ); - break; - case "mainnet": - klerosCore = KlerosCore__factory.connect(getAddress(mainnetCoreConfig, chainId), provider); - sortition = SortitionModule__factory.connect(getAddress(mainnetSortitionConfig, chainId), provider); - commonFactories = getCommonFactories( - { - dkClassicConfig: mainnetDkcConfig, - dkShutterConfig: mainnetDkShutterConfig, - dkGatedConfig: mainnetDkGatedConfig, - dkGatedShutterConfig: mainnetDkGatedShutterConfig, - drConfig: mainnetDrConfig, - dtrConfig: mainnetDtrConfig, - evidenceConfig: mainnetEvidenceConfig, - policyRegistryConfig: mainnetPolicyRegistryConfig, - batcherConfig: mainnetBatcherConfig, - chainlinkRngConfig: mainnetChainlinkRngConfig, - randomizerRngConfig: mainnetRandomizerRngConfig, - blockHashRngConfig: mainnetBlockHashRngConfig, - pnkConfig: mainnetPnkConfig, - snapshotProxyConfig: mainnetSnapshotProxyConfig, - }, - provider, - chainId - ); - break; - default: - throw new Error(`Unsupported deployment: ${deployment}`); - } - return { klerosCore, sortition, ...commonFactories }; -}; diff --git a/contracts/deployments/contractsViem.ts b/contracts/deployments/contractsViem.ts deleted file mode 100644 index 7a7338d71..000000000 --- a/contracts/deployments/contractsViem.ts +++ /dev/null @@ -1,342 +0,0 @@ -import { type PublicClient, type WalletClient, getContract } from "viem"; -import { type ContractConfig, type DeploymentName, deployments, getAddress } from "./utils"; -import { - klerosCoreConfig as devnetCoreConfig, - sortitionModuleConfig as devnetSortitionConfig, - disputeKitClassicConfig as devnetDkClassicConfig, - disputeKitShutterConfig as devnetDkShutterConfig, - disputeKitGatedConfig as devnetDkGatedConfig, - disputeKitGatedShutterConfig as devnetDkGatedShutterConfig, - disputeResolverConfig as devnetDrConfig, - disputeTemplateRegistryConfig as devnetDtrConfig, - evidenceModuleConfig as devnetEvidenceConfig, - policyRegistryConfig as devnetPolicyRegistryConfig, - transactionBatcherConfig as devnetBatcherConfig, - chainlinkRngConfig as devnetChainlinkRngConfig, - blockHashRngConfig as devnetBlockHashRngConfig, - pnkConfig as devnetPnkConfig, - klerosCoreSnapshotProxyConfig as devnetSnapshotProxyConfig, - klerosCoreUniversityConfig as devnetCoreUniversityConfig, - sortitionModuleUniversityConfig as devnetSortitionUniversityConfig, - disputeKitClassicUniversityConfig as devnetDkClassicUniversityConfig, - disputeResolverUniversityConfig as devnetDrUniversityConfig, -} from "./devnet.viem"; -import { - klerosCoreConfig as testnetCoreConfig, - sortitionModuleConfig as testnetSortitionConfig, - disputeKitClassicConfig as testnetDkClassicConfig, - disputeKitShutterConfig as testnetDkShutterConfig, - disputeKitGatedConfig as testnetDkGatedConfig, - disputeKitGatedShutterConfig as testnetDkGatedShutterConfig, - disputeResolverConfig as testnetDrConfig, - disputeTemplateRegistryConfig as testnetDtrConfig, - evidenceModuleConfig as testnetEvidenceConfig, - policyRegistryConfig as testnetPolicyRegistryConfig, - transactionBatcherConfig as testnetBatcherConfig, - chainlinkRngConfig as testnetChainlinkRngConfig, - blockHashRngConfig as testnetBlockHashRngConfig, - pnkConfig as testnetPnkConfig, - klerosCoreSnapshotProxyConfig as testnetSnapshotProxyConfig, -} from "./testnet.viem"; -import { - klerosCoreConfig as mainnetCoreConfig, - sortitionModuleConfig as mainnetSortitionConfig, - disputeKitClassicConfig as mainnetDkClassicConfig, - disputeKitShutterConfig as mainnetDkShutterConfig, - disputeKitGatedConfig as mainnetDkGatedConfig, - disputeKitGatedShutterConfig as mainnetDkGatedShutterConfig, - disputeResolverConfig as mainnetDrConfig, - disputeTemplateRegistryConfig as mainnetDtrConfig, - evidenceModuleConfig as mainnetEvidenceConfig, - policyRegistryConfig as mainnetPolicyRegistryConfig, - transactionBatcherConfig as mainnetBatcherConfig, - chainlinkRngConfig as mainnetChainlinkRngConfig, - randomizerRngConfig as mainnetRandomizerRngConfig, - blockHashRngConfig as mainnetBlockHashRngConfig, - pnkConfig as mainnetPnkConfig, - klerosCoreSnapshotProxyConfig as mainnetSnapshotProxyConfig, -} from "./mainnet.viem"; - -type ContractInstance = { - address: `0x${string}`; - abi: readonly any[]; -}; - -function getContractConfig({ config, chainId }: { config: ContractConfig; chainId: number }): ContractInstance { - return { - address: getAddress(config, chainId), - abi: config.abi, - }; -} - -type ContractInstances = { - klerosCore: ContractInstance; - sortition: ContractInstance; - disputeKitClassic: ContractInstance; - disputeKitShutter?: ContractInstance; - disputeKitGated?: ContractInstance; - disputeKitGatedShutter?: ContractInstance; - disputeResolver: ContractInstance; - disputeTemplateRegistry: ContractInstance; - evidence: ContractInstance; - policyRegistry: ContractInstance; - transactionBatcher: ContractInstance; - chainlinkRng?: ContractInstance; - randomizerRng?: ContractInstance; - blockHashRng: ContractInstance; - pnk: ContractInstance; - klerosCoreSnapshotProxy: ContractInstance; -}; - -function getCommonConfigs({ - chainId, - configs, -}: { - chainId: number; - configs: { - klerosCore: ContractConfig; - sortition: ContractConfig; - disputeKitClassic: ContractConfig; - disputeKitShutter?: ContractConfig; - disputeKitGated?: ContractConfig; - disputeKitGatedShutter?: ContractConfig; - disputeResolver: ContractConfig; - disputeTemplateRegistry: ContractConfig; - evidence: ContractConfig; - policyRegistry: ContractConfig; - transactionBatcher: ContractConfig; - blockHashRng: ContractConfig; - pnk: ContractConfig; - klerosCoreSnapshotProxy: ContractConfig; - chainlinkRng?: ContractConfig; - randomizerRng?: ContractConfig; - }; -}): ContractInstances { - const base: ContractInstances = { - klerosCore: getContractConfig({ config: configs.klerosCore, chainId }), - sortition: getContractConfig({ config: configs.sortition, chainId }), - disputeKitClassic: getContractConfig({ config: configs.disputeKitClassic, chainId }), - disputeResolver: getContractConfig({ config: configs.disputeResolver, chainId }), - disputeTemplateRegistry: getContractConfig({ config: configs.disputeTemplateRegistry, chainId }), - evidence: getContractConfig({ config: configs.evidence, chainId }), - policyRegistry: getContractConfig({ config: configs.policyRegistry, chainId }), - transactionBatcher: getContractConfig({ config: configs.transactionBatcher, chainId }), - blockHashRng: getContractConfig({ config: configs.blockHashRng, chainId }), - pnk: getContractConfig({ config: configs.pnk, chainId }), - klerosCoreSnapshotProxy: getContractConfig({ config: configs.klerosCoreSnapshotProxy, chainId }), - }; - - if (configs.disputeKitShutter) - base.disputeKitShutter = getContractConfig({ config: configs.disputeKitShutter, chainId }); - - if (configs.disputeKitGated) base.disputeKitGated = getContractConfig({ config: configs.disputeKitGated, chainId }); - - if (configs.disputeKitGatedShutter) - base.disputeKitGatedShutter = getContractConfig({ config: configs.disputeKitGatedShutter, chainId }); - - if (configs.chainlinkRng) base.chainlinkRng = getContractConfig({ config: configs.chainlinkRng, chainId }); - - if (configs.randomizerRng) base.randomizerRng = getContractConfig({ config: configs.randomizerRng, chainId }); - - return base; -} - -export const getConfigs = ({ deployment }: { deployment: DeploymentName }): ContractInstances => { - const { chainId } = deployments[deployment]; - switch (deployment) { - case "devnet": - return getCommonConfigs({ - chainId, - configs: { - klerosCore: devnetCoreConfig, - sortition: devnetSortitionConfig, - disputeKitClassic: devnetDkClassicConfig, - disputeKitShutter: devnetDkShutterConfig, - disputeKitGated: devnetDkGatedConfig, - disputeKitGatedShutter: devnetDkGatedShutterConfig, - disputeResolver: devnetDrConfig, - disputeTemplateRegistry: devnetDtrConfig, - evidence: devnetEvidenceConfig, - policyRegistry: devnetPolicyRegistryConfig, - transactionBatcher: devnetBatcherConfig, - blockHashRng: devnetBlockHashRngConfig, - pnk: devnetPnkConfig, - klerosCoreSnapshotProxy: devnetSnapshotProxyConfig, - chainlinkRng: devnetChainlinkRngConfig, - }, - }); - - case "university": - return { - klerosCore: getContractConfig({ config: devnetCoreUniversityConfig, chainId }), - sortition: getContractConfig({ config: devnetSortitionUniversityConfig, chainId }), - disputeKitClassic: getContractConfig({ config: devnetDkClassicUniversityConfig, chainId }), - disputeResolver: getContractConfig({ config: devnetDrUniversityConfig, chainId }), - disputeTemplateRegistry: getContractConfig({ config: devnetDtrConfig, chainId }), // FIXME: should not be shared with devnet - evidence: getContractConfig({ config: devnetEvidenceConfig, chainId }), // Not arbitrator specific - policyRegistry: getContractConfig({ config: devnetPolicyRegistryConfig, chainId }), // Not arbitrator specific - transactionBatcher: getContractConfig({ config: devnetBatcherConfig, chainId }), // Not arbitrator specific - blockHashRng: getContractConfig({ config: devnetBlockHashRngConfig, chainId }), // Not used in university - pnk: getContractConfig({ config: devnetPnkConfig, chainId }), // Not arbitrator specific - klerosCoreSnapshotProxy: getContractConfig({ config: devnetSnapshotProxyConfig, chainId }), // Not used in university - }; - - case "testnet": - return getCommonConfigs({ - chainId, - configs: { - klerosCore: testnetCoreConfig, - sortition: testnetSortitionConfig, - disputeKitClassic: testnetDkClassicConfig, - disputeKitShutter: testnetDkShutterConfig, - disputeKitGated: testnetDkGatedConfig, - disputeKitGatedShutter: testnetDkGatedShutterConfig, - disputeResolver: testnetDrConfig, - disputeTemplateRegistry: testnetDtrConfig, - evidence: testnetEvidenceConfig, - policyRegistry: testnetPolicyRegistryConfig, - transactionBatcher: testnetBatcherConfig, - blockHashRng: testnetBlockHashRngConfig, - pnk: testnetPnkConfig, - klerosCoreSnapshotProxy: testnetSnapshotProxyConfig, - chainlinkRng: testnetChainlinkRngConfig, - }, - }); - - case "mainnet": - return getCommonConfigs({ - chainId, - configs: { - klerosCore: mainnetCoreConfig, - sortition: mainnetSortitionConfig, - disputeKitClassic: mainnetDkClassicConfig, - disputeKitShutter: mainnetDkShutterConfig, - disputeKitGated: mainnetDkGatedConfig, - disputeKitGatedShutter: mainnetDkGatedShutterConfig, - disputeResolver: mainnetDrConfig, - disputeTemplateRegistry: mainnetDtrConfig, - evidence: mainnetEvidenceConfig, - policyRegistry: mainnetPolicyRegistryConfig, - transactionBatcher: mainnetBatcherConfig, - blockHashRng: mainnetBlockHashRngConfig, - pnk: mainnetPnkConfig, - klerosCoreSnapshotProxy: mainnetSnapshotProxyConfig, - chainlinkRng: mainnetChainlinkRngConfig, - randomizerRng: mainnetRandomizerRngConfig, - }, - }); - - default: - throw new Error(`Unsupported deployment: ${deployment}`); - } -}; - -export const getContracts = ({ - publicClient, - walletClient, - deployment, -}: { - publicClient: PublicClient; - walletClient?: WalletClient; - deployment: DeploymentName; -}) => { - const clientConfig = { - client: { - public: publicClient, - wallet: walletClient, - }, - }; - const contractConfigs = getConfigs({ deployment }); - const klerosCore = getContract({ - ...contractConfigs.klerosCore, - ...clientConfig, - }); - const sortition = getContract({ - ...contractConfigs.sortition, - ...clientConfig, - }); - const disputeKitClassic = getContract({ - ...contractConfigs.disputeKitClassic, - ...clientConfig, - }); - const disputeKitShutter = contractConfigs.disputeKitShutter - ? getContract({ - ...contractConfigs.disputeKitShutter, - ...clientConfig, - }) - : undefined; - const disputeKitGated = contractConfigs.disputeKitGated - ? getContract({ - ...contractConfigs.disputeKitGated, - ...clientConfig, - }) - : undefined; - const disputeKitGatedShutter = contractConfigs.disputeKitGatedShutter - ? getContract({ - ...contractConfigs.disputeKitGatedShutter, - ...clientConfig, - }) - : undefined; - const disputeResolver = getContract({ - ...contractConfigs.disputeResolver, - ...clientConfig, - }); - const disputeTemplateRegistry = getContract({ - ...contractConfigs.disputeTemplateRegistry, - ...clientConfig, - }); - const evidence = getContract({ - ...contractConfigs.evidence, - ...clientConfig, - }); - const policyRegistry = getContract({ - ...contractConfigs.policyRegistry, - ...clientConfig, - }); - const transactionBatcher = getContract({ - ...contractConfigs.transactionBatcher, - ...clientConfig, - }); - const chainlinkRng = contractConfigs.chainlinkRng - ? getContract({ - ...contractConfigs.chainlinkRng, - ...clientConfig, - }) - : undefined; - const randomizerRng = contractConfigs.randomizerRng - ? getContract({ - ...contractConfigs.randomizerRng, - ...clientConfig, - }) - : undefined; - const blockHashRng = getContract({ - ...contractConfigs.blockHashRng, - ...clientConfig, - }); - const pnk = getContract({ - ...contractConfigs.pnk, - ...clientConfig, - }); - const klerosCoreSnapshotProxy = getContract({ - ...contractConfigs.klerosCoreSnapshotProxy, - ...clientConfig, - }); - return { - klerosCore, - sortition, - disputeKitClassic, - disputeKitShutter, - disputeKitGated, - disputeKitGatedShutter, - disputeResolver, - disputeTemplateRegistry, - evidence, - policyRegistry, - transactionBatcher, - chainlinkRng, - randomizerRng, - blockHashRng, - pnk, - klerosCoreSnapshotProxy, - }; -}; diff --git a/contracts/deployments/devnet.viem.ts b/contracts/deployments/devnet.viem.ts deleted file mode 100644 index f7a7214bd..000000000 --- a/contracts/deployments/devnet.viem.ts +++ /dev/null @@ -1,21424 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ArbitrableExample -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xB56A23b396E0eae85414Ce5815da448ba529Cb4A) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3Eae72F076c68F5c354C73abC33EAA291ef1b2Fa) - */ -export const arbitrableExampleAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - { name: "_weth", internalType: "contract IERC20", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_action", - internalType: "string", - type: "string", - indexed: true, - }, - ], - name: "Action", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "arbitratorExtraData", - outputs: [{ name: "", internalType: "bytes", type: "bytes" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }], - name: "changeArbitratorExtraData", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - ], - name: "changeDisputeTemplate", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_action", internalType: "string", type: "string" }, - { name: "_feeInWeth", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_action", internalType: "string", type: "string" }], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "externalIDtoLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templateId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "weth", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, -] as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xB56A23b396E0eae85414Ce5815da448ba529Cb4A) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3Eae72F076c68F5c354C73abC33EAA291ef1b2Fa) - */ -export const arbitrableExampleAddress = { - 10200: "0xB56A23b396E0eae85414Ce5815da448ba529Cb4A", - 421614: "0x3Eae72F076c68F5c354C73abC33EAA291ef1b2Fa", -} as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xB56A23b396E0eae85414Ce5815da448ba529Cb4A) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3Eae72F076c68F5c354C73abC33EAA291ef1b2Fa) - */ -export const arbitrableExampleConfig = { - address: arbitrableExampleAddress, - abi: arbitrableExampleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// BlockHashRNG -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x56d6d65Fe202232714794B5D5e4ed9894466Ee01) - */ -export const blockHashRngAbi = [ - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_block", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_block", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x56d6d65Fe202232714794B5D5e4ed9894466Ee01) - */ -export const blockHashRngAddress = { - 421614: "0x56d6d65Fe202232714794B5D5e4ed9894466Ee01", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x56d6d65Fe202232714794B5D5e4ed9894466Ee01) - */ -export const blockHashRngConfig = { - address: blockHashRngAddress, - abi: blockHashRngAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ChainlinkRNG -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7e40f5aC809521654A9c17e442F2a0a5a4d890FA) - */ -export const chainlinkRngAbi = [ - { - type: "constructor", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_sortitionModule", internalType: "address", type: "address" }, - { name: "_vrfCoordinator", internalType: "address", type: "address" }, - { name: "_keyHash", internalType: "bytes32", type: "bytes32" }, - { name: "_subscriptionId", internalType: "uint256", type: "uint256" }, - { name: "_requestConfirmations", internalType: "uint16", type: "uint16" }, - { name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }, - ], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "address", type: "address" }, - { name: "want", internalType: "address", type: "address" }, - ], - name: "OnlyCoordinatorCanFulfill", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "address", type: "address" }, - { name: "owner", internalType: "address", type: "address" }, - { name: "coordinator", internalType: "address", type: "address" }, - ], - name: "OnlyOwnerOrCoordinator", - }, - { type: "error", inputs: [], name: "ZeroAddress" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "vrfCoordinator", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "CoordinatorSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "randomWord", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "RequestFulfilled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "RequestSent", - }, - { - type: "function", - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "callbackGasLimit", - outputs: [{ name: "", internalType: "uint32", type: "uint32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }], - name: "changeCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_keyHash", internalType: "bytes32", type: "bytes32" }], - name: "changeKeyHash", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_requestConfirmations", internalType: "uint16", type: "uint16" }], - name: "changeRequestConfirmations", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_sortitionModule", internalType: "address", type: "address" }], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_subscriptionId", internalType: "uint256", type: "uint256" }], - name: "changeSubscriptionId", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], - name: "changeVrfCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "keyHash", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastRequestId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "requestId", internalType: "uint256", type: "uint256" }, - { name: "randomWords", internalType: "uint256[]", type: "uint256[]" }, - ], - name: "rawFulfillRandomWords", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "requestConfirmations", - outputs: [{ name: "", internalType: "uint16", type: "uint16" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "s_vrfCoordinator", - outputs: [ - { - name: "", - internalType: "contract IVRFCoordinatorV2Plus", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], - name: "setCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "subscriptionId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7e40f5aC809521654A9c17e442F2a0a5a4d890FA) - */ -export const chainlinkRngAddress = { - 421614: "0x7e40f5aC809521654A9c17e442F2a0a5a4d890FA", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7e40f5aC809521654A9c17e442F2a0a5a4d890FA) - */ -export const chainlinkRngConfig = { - address: chainlinkRngAddress, - abi: chainlinkRngAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ChainlinkVRFCoordinator -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) - */ -export const chainlinkVrfCoordinatorAbi = [ - { - type: "constructor", - inputs: [{ name: "blockhashStore", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [ - { name: "internalBalance", internalType: "uint256", type: "uint256" }, - { name: "externalBalance", internalType: "uint256", type: "uint256" }, - ], - name: "BalanceInvariantViolated", - }, - { - type: "error", - inputs: [{ name: "blockNum", internalType: "uint256", type: "uint256" }], - name: "BlockhashNotInStore", - }, - { - type: "error", - inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], - name: "CoordinatorAlreadyRegistered", - }, - { - type: "error", - inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], - name: "CoordinatorNotRegistered", - }, - { type: "error", inputs: [], name: "FailedToSendNative" }, - { type: "error", inputs: [], name: "FailedToTransferLink" }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint32", type: "uint32" }, - { name: "want", internalType: "uint32", type: "uint32" }, - ], - name: "GasLimitTooBig", - }, - { - type: "error", - inputs: [ - { name: "gasPrice", internalType: "uint256", type: "uint256" }, - { name: "maxGas", internalType: "uint256", type: "uint256" }, - ], - name: "GasPriceExceeded", - }, - { type: "error", inputs: [], name: "IncorrectCommitment" }, - { type: "error", inputs: [], name: "IndexOutOfRange" }, - { type: "error", inputs: [], name: "InsufficientBalance" }, - { type: "error", inputs: [], name: "InvalidCalldata" }, - { - type: "error", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "consumer", internalType: "address", type: "address" }, - ], - name: "InvalidConsumer", - }, - { type: "error", inputs: [], name: "InvalidExtraArgsTag" }, - { - type: "error", - inputs: [{ name: "linkWei", internalType: "int256", type: "int256" }], - name: "InvalidLinkWeiPrice", - }, - { - type: "error", - inputs: [ - { name: "premiumPercentage", internalType: "uint8", type: "uint8" }, - { name: "max", internalType: "uint8", type: "uint8" }, - ], - name: "InvalidPremiumPercentage", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint16", type: "uint16" }, - { name: "min", internalType: "uint16", type: "uint16" }, - { name: "max", internalType: "uint16", type: "uint16" }, - ], - name: "InvalidRequestConfirmations", - }, - { type: "error", inputs: [], name: "InvalidSubscription" }, - { type: "error", inputs: [], name: "LinkAlreadySet" }, - { - type: "error", - inputs: [ - { - name: "flatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - }, - { name: "flatFeeNativePPM", internalType: "uint32", type: "uint32" }, - ], - name: "LinkDiscountTooHigh", - }, - { type: "error", inputs: [], name: "LinkNotSet" }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint256", type: "uint256" }, - { name: "max", internalType: "uint32", type: "uint32" }, - ], - name: "MsgDataTooBig", - }, - { - type: "error", - inputs: [{ name: "proposedOwner", internalType: "address", type: "address" }], - name: "MustBeRequestedOwner", - }, - { - type: "error", - inputs: [{ name: "owner", internalType: "address", type: "address" }], - name: "MustBeSubOwner", - }, - { type: "error", inputs: [], name: "NoCorrespondingRequest" }, - { - type: "error", - inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], - name: "NoSuchProvingKey", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint32", type: "uint32" }, - { name: "want", internalType: "uint32", type: "uint32" }, - ], - name: "NumWordsTooBig", - }, - { type: "error", inputs: [], name: "OnlyCallableFromLink" }, - { type: "error", inputs: [], name: "PaymentTooLarge" }, - { type: "error", inputs: [], name: "PendingRequestExists" }, - { - type: "error", - inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], - name: "ProvingKeyAlreadyRegistered", - }, - { type: "error", inputs: [], name: "Reentrant" }, - { type: "error", inputs: [], name: "TooManyConsumers" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - indexed: false, - }, - { - name: "maxGasLimit", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "stalenessSeconds", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "gasAfterPaymentCalculation", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "fallbackWeiPerUnitLink", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "fulfillmentFlatFeeNativePPM", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "fulfillmentFlatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "nativePremiumPercentage", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - { - name: "linkPremiumPercentage", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "ConfigSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "coordinatorAddress", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "CoordinatorDeregistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "coordinatorAddress", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "CoordinatorRegistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "fallbackWeiPerUnitLink", - internalType: "int256", - type: "int256", - indexed: false, - }, - ], - name: "FallbackWeiPerUnitLinkUsed", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "to", internalType: "address", type: "address", indexed: false }, - { - name: "amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "FundsRecovered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newCoordinator", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "MigrationCompleted", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "to", internalType: "address", type: "address", indexed: false }, - { - name: "amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "NativeFundsRecovered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "keyHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "maxGas", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "ProvingKeyDeregistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "keyHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "maxGas", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "ProvingKeyRegistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "outputSeed", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "payment", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - { - name: "nativePayment", - internalType: "bool", - type: "bool", - indexed: false, - }, - { name: "success", internalType: "bool", type: "bool", indexed: false }, - { - name: "onlyPremium", - internalType: "bool", - type: "bool", - indexed: false, - }, - ], - name: "RandomWordsFulfilled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "keyHash", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "preSeed", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - indexed: false, - }, - { - name: "callbackGasLimit", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "numWords", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "extraArgs", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - { - name: "sender", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "RandomWordsRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "to", internalType: "address", type: "address", indexed: false }, - { - name: "amountLink", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "amountNative", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "SubscriptionCanceled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "consumer", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "SubscriptionConsumerAdded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "consumer", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "SubscriptionConsumerRemoved", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "owner", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "SubscriptionCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "oldBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "newBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "SubscriptionFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "oldNativeBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "newNativeBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "SubscriptionFundedWithNative", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "from", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "to", internalType: "address", type: "address", indexed: false }, - ], - name: "SubscriptionOwnerTransferRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "from", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "to", internalType: "address", type: "address", indexed: false }, - ], - name: "SubscriptionOwnerTransferred", - }, - { - type: "function", - inputs: [], - name: "BLOCKHASH_STORE", - outputs: [ - { - name: "", - internalType: "contract BlockhashStoreInterface", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LINK", - outputs: [ - { - name: "", - internalType: "contract LinkTokenInterface", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LINK_NATIVE_FEED", - outputs: [ - { - name: "", - internalType: "contract AggregatorV3Interface", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_CONSUMERS", - outputs: [{ name: "", internalType: "uint16", type: "uint16" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_NUM_WORDS", - outputs: [{ name: "", internalType: "uint32", type: "uint32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_REQUEST_CONFIRMATIONS", - outputs: [{ name: "", internalType: "uint16", type: "uint16" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "acceptSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "consumer", internalType: "address", type: "address" }, - ], - name: "addConsumer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "to", internalType: "address", type: "address" }, - ], - name: "cancelSubscription", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "createSubscription", - outputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "target", internalType: "address", type: "address" }], - name: "deregisterMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "publicProvingKey", - internalType: "uint256[2]", - type: "uint256[2]", - }, - ], - name: "deregisterProvingKey", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "proof", - internalType: "struct VRF.Proof", - type: "tuple", - components: [ - { name: "pk", internalType: "uint256[2]", type: "uint256[2]" }, - { name: "gamma", internalType: "uint256[2]", type: "uint256[2]" }, - { name: "c", internalType: "uint256", type: "uint256" }, - { name: "s", internalType: "uint256", type: "uint256" }, - { name: "seed", internalType: "uint256", type: "uint256" }, - { name: "uWitness", internalType: "address", type: "address" }, - { - name: "cGammaWitness", - internalType: "uint256[2]", - type: "uint256[2]", - }, - { - name: "sHashWitness", - internalType: "uint256[2]", - type: "uint256[2]", - }, - { name: "zInv", internalType: "uint256", type: "uint256" }, - ], - }, - { - name: "rc", - internalType: "struct VRFTypes.RequestCommitmentV2Plus", - type: "tuple", - components: [ - { name: "blockNum", internalType: "uint64", type: "uint64" }, - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, - { name: "numWords", internalType: "uint32", type: "uint32" }, - { name: "sender", internalType: "address", type: "address" }, - { name: "extraArgs", internalType: "bytes", type: "bytes" }, - ], - }, - { name: "onlyPremium", internalType: "bool", type: "bool" }, - ], - name: "fulfillRandomWords", - outputs: [{ name: "payment", internalType: "uint96", type: "uint96" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "fundSubscriptionWithNative", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "startIndex", internalType: "uint256", type: "uint256" }, - { name: "maxCount", internalType: "uint256", type: "uint256" }, - ], - name: "getActiveSubscriptionIds", - outputs: [{ name: "ids", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "getSubscription", - outputs: [ - { name: "balance", internalType: "uint96", type: "uint96" }, - { name: "nativeBalance", internalType: "uint96", type: "uint96" }, - { name: "reqCount", internalType: "uint64", type: "uint64" }, - { name: "subOwner", internalType: "address", type: "address" }, - { name: "consumers", internalType: "address[]", type: "address[]" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "publicKey", internalType: "uint256[2]", type: "uint256[2]" }], - name: "hashOfKey", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "newCoordinator", internalType: "address", type: "address" }, - ], - name: "migrate", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "onTokenTransfer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "ownerCancelSubscription", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "pendingRequestExists", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "recoverFunds", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address payable", type: "address" }], - name: "recoverNativeFunds", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "target", internalType: "address", type: "address" }], - name: "registerMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "publicProvingKey", - internalType: "uint256[2]", - type: "uint256[2]", - }, - { name: "maxGas", internalType: "uint64", type: "uint64" }, - ], - name: "registerProvingKey", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "consumer", internalType: "address", type: "address" }, - ], - name: "removeConsumer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "req", - internalType: "struct VRFV2PlusClient.RandomWordsRequest", - type: "tuple", - components: [ - { name: "keyHash", internalType: "bytes32", type: "bytes32" }, - { name: "subId", internalType: "uint256", type: "uint256" }, - { - name: "requestConfirmations", - internalType: "uint16", - type: "uint16", - }, - { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, - { name: "numWords", internalType: "uint32", type: "uint32" }, - { name: "extraArgs", internalType: "bytes", type: "bytes" }, - ], - }, - ], - name: "requestRandomWords", - outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "newOwner", internalType: "address", type: "address" }, - ], - name: "requestSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "s_config", - outputs: [ - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - }, - { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, - { name: "reentrancyLock", internalType: "bool", type: "bool" }, - { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, - { - name: "gasAfterPaymentCalculation", - internalType: "uint32", - type: "uint32", - }, - { - name: "fulfillmentFlatFeeNativePPM", - internalType: "uint32", - type: "uint32", - }, - { - name: "fulfillmentFlatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - }, - { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, - { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_currentSubNonce", - outputs: [{ name: "", internalType: "uint64", type: "uint64" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_fallbackWeiPerUnitLink", - outputs: [{ name: "", internalType: "int256", type: "int256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "s_provingKeyHashes", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - name: "s_provingKeys", - outputs: [ - { name: "exists", internalType: "bool", type: "bool" }, - { name: "maxGas", internalType: "uint64", type: "uint64" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "s_requestCommitments", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_totalBalance", - outputs: [{ name: "", internalType: "uint96", type: "uint96" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_totalNativeBalance", - outputs: [{ name: "", internalType: "uint96", type: "uint96" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - }, - { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, - { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, - { - name: "gasAfterPaymentCalculation", - internalType: "uint32", - type: "uint32", - }, - { - name: "fallbackWeiPerUnitLink", - internalType: "int256", - type: "int256", - }, - { - name: "fulfillmentFlatFeeNativePPM", - internalType: "uint32", - type: "uint32", - }, - { - name: "fulfillmentFlatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - }, - { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, - { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, - ], - name: "setConfig", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "link", internalType: "address", type: "address" }, - { name: "linkNativeFeed", internalType: "address", type: "address" }, - ], - name: "setLINKAndLINKNativeFeed", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "recipient", internalType: "address", type: "address" }], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "recipient", internalType: "address payable", type: "address" }], - name: "withdrawNative", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) - */ -export const chainlinkVrfCoordinatorAddress = { - 421614: "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) - */ -export const chainlinkVrfCoordinatorConfig = { - address: chainlinkVrfCoordinatorAddress, - abi: chainlinkVrfCoordinatorAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DAI -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const daiAbi = [ - { - type: "constructor", - inputs: [ - { name: "_name", internalType: "string", type: "string" }, - { name: "_symbol", internalType: "string", type: "string" }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const daiAddress = { - 421614: "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const daiConfig = { address: daiAddress, abi: daiAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DAIFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E) - */ -export const daiFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "amount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E) - */ -export const daiFaucetAddress = { - 421614: "0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E) - */ -export const daiFaucetConfig = { - address: daiFaucetAddress, - abi: daiFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1) - */ -export const disputeKitClassicAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1) - */ -export const disputeKitClassicAddress = { - 421614: "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1) - */ -export const disputeKitClassicConfig = { - address: disputeKitClassicAddress, - abi: disputeKitClassicAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicUniversity -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) - */ -export const disputeKitClassicUniversityAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) - */ -export const disputeKitClassicUniversityAddress = { - 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) - */ -export const disputeKitClassicUniversityConfig = { - address: disputeKitClassicUniversityAddress, - abi: disputeKitClassicUniversityAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicUniversity_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) - */ -export const disputeKitClassicUniversityImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) - */ -export const disputeKitClassicUniversityImplementationAddress = { - 421614: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) - */ -export const disputeKitClassicUniversityImplementationConfig = { - address: disputeKitClassicUniversityImplementationAddress, - abi: disputeKitClassicUniversityImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicUniversity_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) - */ -export const disputeKitClassicUniversityProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) - */ -export const disputeKitClassicUniversityProxyAddress = { - 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) - */ -export const disputeKitClassicUniversityProxyConfig = { - address: disputeKitClassicUniversityProxyAddress, - abi: disputeKitClassicUniversityProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc4cC0274E55a9818f8cF42640B1De61d269425ad) - */ -export const disputeKitClassicImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc4cC0274E55a9818f8cF42640B1De61d269425ad) - */ -export const disputeKitClassicImplementationAddress = { - 421614: "0xc4cC0274E55a9818f8cF42640B1De61d269425ad", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc4cC0274E55a9818f8cF42640B1De61d269425ad) - */ -export const disputeKitClassicImplementationConfig = { - address: disputeKitClassicImplementationAddress, - abi: disputeKitClassicImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1) - */ -export const disputeKitClassicProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1) - */ -export const disputeKitClassicProxyAddress = { - 421614: "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1) - */ -export const disputeKitClassicProxyConfig = { - address: disputeKitClassicProxyAddress, - abi: disputeKitClassicProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGated -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x677dA30B4b27D129354DdA1e219Bcc86802132d1) - */ -export const disputeKitGatedAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "extraDataToTokenInfo", - outputs: [ - { name: "tokenGate", internalType: "address", type: "address" }, - { name: "isERC1155", internalType: "bool", type: "bool" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x677dA30B4b27D129354DdA1e219Bcc86802132d1) - */ -export const disputeKitGatedAddress = { - 421614: "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x677dA30B4b27D129354DdA1e219Bcc86802132d1) - */ -export const disputeKitGatedConfig = { - address: disputeKitGatedAddress, - abi: disputeKitGatedAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGatedShutter -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd86b84eb36Cd48f3f384b4490F255b494385F429) - */ -export const disputeKitGatedShutterAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd86b84eb36Cd48f3f384b4490F255b494385F429) - */ -export const disputeKitGatedShutterAddress = { - 421614: "0xd86b84eb36Cd48f3f384b4490F255b494385F429", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd86b84eb36Cd48f3f384b4490F255b494385F429) - */ -export const disputeKitGatedShutterConfig = { - address: disputeKitGatedShutterAddress, - abi: disputeKitGatedShutterAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGatedShutter_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x56199F9E5C0ef9251A251a41597A971141199EDF) - */ -export const disputeKitGatedShutterImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x56199F9E5C0ef9251A251a41597A971141199EDF) - */ -export const disputeKitGatedShutterImplementationAddress = { - 421614: "0x56199F9E5C0ef9251A251a41597A971141199EDF", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x56199F9E5C0ef9251A251a41597A971141199EDF) - */ -export const disputeKitGatedShutterImplementationConfig = { - address: disputeKitGatedShutterImplementationAddress, - abi: disputeKitGatedShutterImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGatedShutter_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd86b84eb36Cd48f3f384b4490F255b494385F429) - */ -export const disputeKitGatedShutterProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd86b84eb36Cd48f3f384b4490F255b494385F429) - */ -export const disputeKitGatedShutterProxyAddress = { - 421614: "0xd86b84eb36Cd48f3f384b4490F255b494385F429", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd86b84eb36Cd48f3f384b4490F255b494385F429) - */ -export const disputeKitGatedShutterProxyConfig = { - address: disputeKitGatedShutterProxyAddress, - abi: disputeKitGatedShutterProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGated_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA27EedcEA916BC1ab91720cE70c56666E854F55e) - */ -export const disputeKitGatedImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "extraDataToTokenInfo", - outputs: [ - { name: "tokenGate", internalType: "address", type: "address" }, - { name: "isERC1155", internalType: "bool", type: "bool" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA27EedcEA916BC1ab91720cE70c56666E854F55e) - */ -export const disputeKitGatedImplementationAddress = { - 421614: "0xA27EedcEA916BC1ab91720cE70c56666E854F55e", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA27EedcEA916BC1ab91720cE70c56666E854F55e) - */ -export const disputeKitGatedImplementationConfig = { - address: disputeKitGatedImplementationAddress, - abi: disputeKitGatedImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGated_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x677dA30B4b27D129354DdA1e219Bcc86802132d1) - */ -export const disputeKitGatedProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x677dA30B4b27D129354DdA1e219Bcc86802132d1) - */ -export const disputeKitGatedProxyAddress = { - 421614: "0x677dA30B4b27D129354DdA1e219Bcc86802132d1", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x677dA30B4b27D129354DdA1e219Bcc86802132d1) - */ -export const disputeKitGatedProxyConfig = { - address: disputeKitGatedProxyAddress, - abi: disputeKitGatedProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitShutter -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfE0a958bc744Bb9E224E1822625B53134ac5CB69) - */ -export const disputeKitShutterAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfE0a958bc744Bb9E224E1822625B53134ac5CB69) - */ -export const disputeKitShutterAddress = { - 421614: "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfE0a958bc744Bb9E224E1822625B53134ac5CB69) - */ -export const disputeKitShutterConfig = { - address: disputeKitShutterAddress, - abi: disputeKitShutterAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitShutter_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6582CE0FdB29B5673E6650e34728C784BafB2139) - */ -export const disputeKitShutterImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6582CE0FdB29B5673E6650e34728C784BafB2139) - */ -export const disputeKitShutterImplementationAddress = { - 421614: "0x6582CE0FdB29B5673E6650e34728C784BafB2139", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6582CE0FdB29B5673E6650e34728C784BafB2139) - */ -export const disputeKitShutterImplementationConfig = { - address: disputeKitShutterImplementationAddress, - abi: disputeKitShutterImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitShutter_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfE0a958bc744Bb9E224E1822625B53134ac5CB69) - */ -export const disputeKitShutterProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfE0a958bc744Bb9E224E1822625B53134ac5CB69) - */ -export const disputeKitShutterProxyAddress = { - 421614: "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfE0a958bc744Bb9E224E1822625B53134ac5CB69) - */ -export const disputeKitShutterProxyConfig = { - address: disputeKitShutterProxyAddress, - abi: disputeKitShutterProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolver -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x71f8537e925C753Fe88DA7e69Ae423f9f3a9A292) - */ -export const disputeResolverAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "view", - }, -] as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x71f8537e925C753Fe88DA7e69Ae423f9f3a9A292) - */ -export const disputeResolverAddress = { - 10200: "0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb", - 421614: "0x71f8537e925C753Fe88DA7e69Ae423f9f3a9A292", -} as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x71f8537e925C753Fe88DA7e69Ae423f9f3a9A292) - */ -export const disputeResolverConfig = { - address: disputeResolverAddress, - abi: disputeResolverAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolverRuler -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAEB1bbaE58125BA5F32349c69e4274d15dfD6EC3) - */ -export const disputeResolverRulerAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAEB1bbaE58125BA5F32349c69e4274d15dfD6EC3) - */ -export const disputeResolverRulerAddress = { - 421614: "0xAEB1bbaE58125BA5F32349c69e4274d15dfD6EC3", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAEB1bbaE58125BA5F32349c69e4274d15dfD6EC3) - */ -export const disputeResolverRulerConfig = { - address: disputeResolverRulerAddress, - abi: disputeResolverRulerAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolverUniversity -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) - */ -export const disputeResolverUniversityAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) - */ -export const disputeResolverUniversityAddress = { - 421614: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) - */ -export const disputeResolverUniversityConfig = { - address: disputeResolverUniversityAddress, - abi: disputeResolverUniversityAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) - */ -export const disputeTemplateRegistryAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_templateTag", - internalType: "string", - type: "string", - indexed: true, - }, - { - name: "_templateData", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_templateDataMappings", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeTemplate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) - */ -export const disputeTemplateRegistryAddress = { - 10200: "0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957", - 421614: "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", -} as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) - */ -export const disputeTemplateRegistryConfig = { - address: disputeTemplateRegistryAddress, - abi: disputeTemplateRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) - */ -export const disputeTemplateRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_templateTag", - internalType: "string", - type: "string", - indexed: true, - }, - { - name: "_templateData", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_templateDataMappings", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeTemplate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) - */ -export const disputeTemplateRegistryImplementationAddress = { - 421614: "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) - */ -export const disputeTemplateRegistryImplementationConfig = { - address: disputeTemplateRegistryImplementationAddress, - abi: disputeTemplateRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) - */ -export const disputeTemplateRegistryProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) - */ -export const disputeTemplateRegistryProxyAddress = { - 421614: "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) - */ -export const disputeTemplateRegistryProxyConfig = { - address: disputeTemplateRegistryProxyAddress, - abi: disputeTemplateRegistryProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) - */ -export const evidenceModuleAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_party", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_evidence", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "Evidence", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) - */ -export const evidenceModuleAddress = { - 421614: "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) - */ -export const evidenceModuleConfig = { - address: evidenceModuleAddress, - abi: evidenceModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) - */ -export const evidenceModuleImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_party", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_evidence", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "Evidence", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) - */ -export const evidenceModuleImplementationAddress = { - 421614: "0x450Aa35da0ad8B282C5d910254055651417C2200", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) - */ -export const evidenceModuleImplementationConfig = { - address: evidenceModuleImplementationAddress, - abi: evidenceModuleImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) - */ -export const evidenceModuleProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) - */ -export const evidenceModuleProxyAddress = { - 421614: "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) - */ -export const evidenceModuleProxyConfig = { - address: evidenceModuleProxyAddress, - abi: evidenceModuleProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ForeignGatewayOnGnosis -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "ArbitrationCostModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_foreignArbitrable", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_foreignDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CrossChainDisputeOutgoing", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "DEFAULT_NB_OF_JURORS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - ], - name: "changeCourtJurorFee", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_homeGateway", internalType: "address", type: "address" }], - name: "changeHomeGateway", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_gracePeriod", internalType: "uint256", type: "uint256" }, - ], - name: "changeVea", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_choices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bool", type: "bool" }, - { name: "", internalType: "bool", type: "bool" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [], - name: "deprecatedVeaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "deprecatedVeaOutboxExpiration", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToForeignID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashtoDisputeData", - outputs: [ - { name: "id", internalType: "uint248", type: "uint248" }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "arbitrable", internalType: "address", type: "address" }, - { name: "paid", internalType: "uint256", type: "uint256" }, - { name: "relayer", internalType: "address", type: "address" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint96", type: "uint96" }], - name: "feeForJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "homeChainID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "homeGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_homeChainID", internalType: "uint256", type: "uint256" }, - { name: "_homeGateway", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_messageSender", internalType: "address", type: "address" }, - { name: "_disputeHash", internalType: "bytes32", type: "bytes32" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "_relayer", internalType: "address", type: "address" }, - ], - name: "relayRule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "senderGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "veaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "withdrawFees", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisAddress = { - 10200: "0x078dAd05373d19d7fd6829735b765F12242a4300", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisConfig = { - address: foreignGatewayOnGnosisAddress, - abi: foreignGatewayOnGnosisAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ForeignGatewayOnGnosis_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) - */ -export const foreignGatewayOnGnosisImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "ArbitrationCostModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_foreignArbitrable", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_foreignDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CrossChainDisputeOutgoing", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "DEFAULT_NB_OF_JURORS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - ], - name: "changeCourtJurorFee", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_homeGateway", internalType: "address", type: "address" }], - name: "changeHomeGateway", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_gracePeriod", internalType: "uint256", type: "uint256" }, - ], - name: "changeVea", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_choices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bool", type: "bool" }, - { name: "", internalType: "bool", type: "bool" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [], - name: "deprecatedVeaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "deprecatedVeaOutboxExpiration", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToForeignID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashtoDisputeData", - outputs: [ - { name: "id", internalType: "uint248", type: "uint248" }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "arbitrable", internalType: "address", type: "address" }, - { name: "paid", internalType: "uint256", type: "uint256" }, - { name: "relayer", internalType: "address", type: "address" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint96", type: "uint96" }], - name: "feeForJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "homeChainID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "homeGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_homeChainID", internalType: "uint256", type: "uint256" }, - { name: "_homeGateway", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_messageSender", internalType: "address", type: "address" }, - { name: "_disputeHash", internalType: "bytes32", type: "bytes32" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "_relayer", internalType: "address", type: "address" }, - ], - name: "relayRule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "senderGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "veaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "withdrawFees", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) - */ -export const foreignGatewayOnGnosisImplementationAddress = { - 10200: "0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) - */ -export const foreignGatewayOnGnosisImplementationConfig = { - address: foreignGatewayOnGnosisImplementationAddress, - abi: foreignGatewayOnGnosisImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ForeignGatewayOnGnosis_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisProxyAddress = { - 10200: "0x078dAd05373d19d7fd6829735b765F12242a4300", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisProxyConfig = { - address: foreignGatewayOnGnosisProxyAddress, - abi: foreignGatewayOnGnosisProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// IHomeGateway -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const iHomeGatewayAbi = [ - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: false, - }, - { - name: "_arbitrableChainId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_arbitrable", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_arbitrableDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "CrossChainDisputeIncoming", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToHomeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "feeToken", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "foreignChainID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "foreignGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "receiverGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", - type: "tuple", - components: [ - { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, - { - name: "foreignArbitrable", - internalType: "address", - type: "address", - }, - { - name: "foreignDisputeID", - internalType: "uint256", - type: "uint256", - }, - { - name: "externalDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "relayCreateDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", - type: "tuple", - components: [ - { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, - { - name: "foreignArbitrable", - internalType: "address", - type: "address", - }, - { - name: "foreignDisputeID", - internalType: "uint256", - type: "uint256", - }, - { - name: "externalDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - }, - ], - name: "relayCreateDispute", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "veaInbox", - outputs: [{ name: "", internalType: "contract IVeaInbox", type: "address" }], - stateMutability: "view", - }, -] as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9) - */ -export const klerosCoreAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibleInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WhenNotPausedOnly" }, - { type: "error", inputs: [], name: "WhenPausedOnly" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "nbDrawnJurors", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getPnkAtStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreBase.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9) - */ -export const klerosCoreAddress = { - 421614: "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9) - */ -export const klerosCoreConfig = { - address: klerosCoreAddress, - abi: klerosCoreAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0630e4248a17b506809009F5D88E2f5bEE584c83) - */ -export const klerosCoreRulerAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NoRulerSet" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulerOnly" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "RulingModeNotSet" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "mode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "tied", internalType: "bool", type: "bool", indexed: false }, - { - name: "overridden", - internalType: "bool", - type: "bool", - indexed: false, - }, - ], - name: "AutoRuled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_oldRuler", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_newRuler", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "RulerChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_settings", - internalType: "struct KlerosCoreRuler.RulerSettings", - type: "tuple", - components: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - indexed: false, - }, - ], - name: "RulerSettingsChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_newRuler", internalType: "address", type: "address" }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_presetRuling", internalType: "uint256", type: "uint256" }, - { name: "_presetTied", internalType: "bool", type: "bool" }, - { name: "_presetOverridden", internalType: "bool", type: "bool" }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToManual", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getNextDisputeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreRuler.Round", - type: "tuple", - components: [ - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "rulers", - outputs: [{ name: "ruler", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - name: "rulingResults", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0630e4248a17b506809009F5D88E2f5bEE584c83) - */ -export const klerosCoreRulerAddress = { - 421614: "0x0630e4248a17b506809009F5D88E2f5bEE584c83", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0630e4248a17b506809009F5D88E2f5bEE584c83) - */ -export const klerosCoreRulerConfig = { - address: klerosCoreRulerAddress, - abi: klerosCoreRulerAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF) - */ -export const klerosCoreRulerImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NoRulerSet" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulerOnly" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "RulingModeNotSet" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "mode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "tied", internalType: "bool", type: "bool", indexed: false }, - { - name: "overridden", - internalType: "bool", - type: "bool", - indexed: false, - }, - ], - name: "AutoRuled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_oldRuler", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_newRuler", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "RulerChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_settings", - internalType: "struct KlerosCoreRuler.RulerSettings", - type: "tuple", - components: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - indexed: false, - }, - ], - name: "RulerSettingsChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_newRuler", internalType: "address", type: "address" }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_presetRuling", internalType: "uint256", type: "uint256" }, - { name: "_presetTied", internalType: "bool", type: "bool" }, - { name: "_presetOverridden", internalType: "bool", type: "bool" }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToManual", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getNextDisputeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreRuler.Round", - type: "tuple", - components: [ - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "rulers", - outputs: [{ name: "ruler", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - name: "rulingResults", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF) - */ -export const klerosCoreRulerImplementationAddress = { - 421614: "0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF) - */ -export const klerosCoreRulerImplementationConfig = { - address: klerosCoreRulerImplementationAddress, - abi: klerosCoreRulerImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0630e4248a17b506809009F5D88E2f5bEE584c83) - */ -export const klerosCoreRulerProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0630e4248a17b506809009F5D88E2f5bEE584c83) - */ -export const klerosCoreRulerProxyAddress = { - 421614: "0x0630e4248a17b506809009F5D88E2f5bEE584c83", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0630e4248a17b506809009F5D88E2f5bEE584c83) - */ -export const klerosCoreRulerProxyConfig = { - address: klerosCoreRulerProxyAddress, - abi: klerosCoreRulerProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreSnapshotProxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF924ac62b20901914c101Fa089Da1FB6A0585138) - */ -export const klerosCoreSnapshotProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract IKlerosCore", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "totalStaked", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "contract IKlerosCore", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract IKlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF924ac62b20901914c101Fa089Da1FB6A0585138) - */ -export const klerosCoreSnapshotProxyAddress = { - 421614: "0xF924ac62b20901914c101Fa089Da1FB6A0585138", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF924ac62b20901914c101Fa089Da1FB6A0585138) - */ -export const klerosCoreSnapshotProxyConfig = { - address: klerosCoreSnapshotProxyAddress, - abi: klerosCoreSnapshotProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreUniversity -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AllJurorsDrawn" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, - { type: "error", inputs: [], name: "InstructorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NoJurorDrawn" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreUniversity.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_instructor", internalType: "address", type: "address" }], - name: "changeInstructor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreUniversity.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_juror", internalType: "address", type: "address" }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreUniversity.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_instructor", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "instructor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [ - { - name: "", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityAddress = { - 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityConfig = { - address: klerosCoreUniversityAddress, - abi: klerosCoreUniversityAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreUniversity_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) - */ -export const klerosCoreUniversityImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AllJurorsDrawn" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, - { type: "error", inputs: [], name: "InstructorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NoJurorDrawn" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreUniversity.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_instructor", internalType: "address", type: "address" }], - name: "changeInstructor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreUniversity.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_juror", internalType: "address", type: "address" }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreUniversity.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_instructor", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "instructor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [ - { - name: "", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) - */ -export const klerosCoreUniversityImplementationAddress = { - 421614: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) - */ -export const klerosCoreUniversityImplementationConfig = { - address: klerosCoreUniversityImplementationAddress, - abi: klerosCoreUniversityImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreUniversity_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityProxyAddress = { - 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityProxyConfig = { - address: klerosCoreUniversityProxyAddress, - abi: klerosCoreUniversityProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E) - */ -export const klerosCoreImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibleInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WhenNotPausedOnly" }, - { type: "error", inputs: [], name: "WhenPausedOnly" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "nbDrawnJurors", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getPnkAtStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreBase.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E) - */ -export const klerosCoreImplementationAddress = { - 421614: "0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E) - */ -export const klerosCoreImplementationConfig = { - address: klerosCoreImplementationAddress, - abi: klerosCoreImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9) - */ -export const klerosCoreProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9) - */ -export const klerosCoreProxyAddress = { - 421614: "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9) - */ -export const klerosCoreProxyConfig = { - address: klerosCoreProxyAddress, - abi: klerosCoreProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosV2NeoEarlyUser -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) - */ -export const klerosV2NeoEarlyUserAbi = [ - { - type: "constructor", - inputs: [ - { name: "_name", internalType: "string", type: "string" }, - { name: "_symbol", internalType: "string", type: "string" }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "approved", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "tokenId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "operator", - internalType: "address", - type: "address", - indexed: true, - }, - { name: "approved", internalType: "bool", type: "bool", indexed: false }, - ], - name: "ApprovalForAll", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "tokenId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "owner", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_newOwner", internalType: "address", type: "address" }], - name: "changeOwner", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "getApproved", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "operator", internalType: "address", type: "address" }, - ], - name: "isApprovedForAll", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "ownerOf", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "safeMint", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "operator", internalType: "address", type: "address" }, - { name: "approved", internalType: "bool", type: "bool" }, - ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "tokenURI", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) - */ -export const klerosV2NeoEarlyUserAddress = { - 421614: "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) - */ -export const klerosV2NeoEarlyUserConfig = { - address: klerosV2NeoEarlyUserAddress, - abi: klerosV2NeoEarlyUserAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PNK -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - */ -export const pnkAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - */ -export const pnkAddress = { - 421614: "0x34B944D42cAcfC8266955D07A80181D2054aa225", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - */ -export const pnkConfig = { address: pnkAddress, abi: pnkAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PNKFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) - */ -export const pnkFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "amount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) - */ -export const pnkFaucetAddress = { - 421614: "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) - */ -export const pnkFaucetConfig = { - address: pnkFaucetAddress, - abi: pnkFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PinakionV2 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const pinakionV2Abi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const pinakionV2Address = { - 421614: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - 11155111: "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", -} as const; - -/** - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const pinakionV2Config = { - address: pinakionV2Address, - abi: pinakionV2Abi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd8681dBF525ecBda2F799BFddB96840065075e8A) - */ -export const policyRegistryAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_courtName", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_policy", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "PolicyUpdate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "policies", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint256", type: "uint256" }, - { name: "_courtName", internalType: "string", type: "string" }, - { name: "_policy", internalType: "string", type: "string" }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd8681dBF525ecBda2F799BFddB96840065075e8A) - */ -export const policyRegistryAddress = { - 421614: "0xd8681dBF525ecBda2F799BFddB96840065075e8A", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd8681dBF525ecBda2F799BFddB96840065075e8A) - */ -export const policyRegistryConfig = { - address: policyRegistryAddress, - abi: policyRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x472846F88D1356bb483a88f97B55026654Fc5deD) - */ -export const policyRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_courtName", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_policy", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "PolicyUpdate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "policies", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint256", type: "uint256" }, - { name: "_courtName", internalType: "string", type: "string" }, - { name: "_policy", internalType: "string", type: "string" }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x472846F88D1356bb483a88f97B55026654Fc5deD) - */ -export const policyRegistryImplementationAddress = { - 421614: "0x472846F88D1356bb483a88f97B55026654Fc5deD", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x472846F88D1356bb483a88f97B55026654Fc5deD) - */ -export const policyRegistryImplementationConfig = { - address: policyRegistryImplementationAddress, - abi: policyRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd8681dBF525ecBda2F799BFddB96840065075e8A) - */ -export const policyRegistryProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd8681dBF525ecBda2F799BFddB96840065075e8A) - */ -export const policyRegistryProxyAddress = { - 421614: "0xd8681dBF525ecBda2F799BFddB96840065075e8A", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd8681dBF525ecBda2F799BFddB96840065075e8A) - */ -export const policyRegistryProxyConfig = { - address: policyRegistryProxyAddress, - abi: policyRegistryProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerOracle -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) - */ -export const randomizerOracleAbi = [] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) - */ -export const randomizerOracleAddress = { - 421614: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) - */ -export const randomizerOracleConfig = { - address: randomizerOracleAddress, - abi: randomizerOracleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663) - */ -export const sortitionModuleAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNK", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNKWithdrawn", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeDelayed", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_relativeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, - ], - name: "StakeLocked", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amountAllCourts", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_minStakingTime", internalType: "uint256", type: "uint256" }], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "delayedStakeReadIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "delayedStakes", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "courtID", internalType: "uint96", type: "uint96" }, - { name: "stake", internalType: "uint256", type: "uint256" }, - { name: "alreadyTransferred", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorLeftoverPNK", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_minStakingTime", internalType: "uint256", type: "uint256" }, - { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastPhaseChange", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "jurorAccount", internalType: "address", type: "address" }, - { name: "courtId", internalType: "uint96", type: "uint96" }, - ], - name: "latestDelayedStakeIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "maxDrawingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "minStakingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", - outputs: [ - { name: "pnkBalance", internalType: "uint256", type: "uint256" }, - { name: "availablePenalty", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "phase", - outputs: [{ name: "", internalType: "enum ISortitionModule.Phase", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumber", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumberRequestBlock", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rng", - outputs: [{ name: "", internalType: "contract RNG", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rngLookahead", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "_pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_ID", internalType: "bytes32", type: "bytes32" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "validateStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663) - */ -export const sortitionModuleAddress = { - 421614: "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663) - */ -export const sortitionModuleConfig = { - address: sortitionModuleAddress, - abi: sortitionModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModuleUniversity -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) - */ -export const sortitionModuleUniversityAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_relativeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, - ], - name: "StakeLocked", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [ - { - name: "", - internalType: "contract KlerosCoreUniversity", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "bytes32", type: "bytes32" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { - name: "_core", - internalType: "contract KlerosCoreUniversity", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, - ], - name: "setStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "setTransientJuror", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) - */ -export const sortitionModuleUniversityAddress = { - 421614: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) - */ -export const sortitionModuleUniversityConfig = { - address: sortitionModuleUniversityAddress, - abi: sortitionModuleUniversityAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModuleUniversity_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) - */ -export const sortitionModuleUniversityImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_relativeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, - ], - name: "StakeLocked", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [ - { - name: "", - internalType: "contract KlerosCoreUniversity", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "bytes32", type: "bytes32" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { - name: "_core", - internalType: "contract KlerosCoreUniversity", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, - ], - name: "setStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "setTransientJuror", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) - */ -export const sortitionModuleUniversityImplementationAddress = { - 421614: "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) - */ -export const sortitionModuleUniversityImplementationConfig = { - address: sortitionModuleUniversityImplementationAddress, - abi: sortitionModuleUniversityImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModuleUniversity_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) - */ -export const sortitionModuleUniversityProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) - */ -export const sortitionModuleUniversityProxyAddress = { - 421614: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) - */ -export const sortitionModuleUniversityProxyConfig = { - address: sortitionModuleUniversityProxyAddress, - abi: sortitionModuleUniversityProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x8a26445989c944C58503275ad87Ab4d7b17d4F1e) - */ -export const sortitionModuleImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNK", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNKWithdrawn", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeDelayed", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_relativeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, - ], - name: "StakeLocked", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amountAllCourts", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_minStakingTime", internalType: "uint256", type: "uint256" }], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "delayedStakeReadIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "delayedStakes", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "courtID", internalType: "uint96", type: "uint96" }, - { name: "stake", internalType: "uint256", type: "uint256" }, - { name: "alreadyTransferred", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorLeftoverPNK", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_minStakingTime", internalType: "uint256", type: "uint256" }, - { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastPhaseChange", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "jurorAccount", internalType: "address", type: "address" }, - { name: "courtId", internalType: "uint96", type: "uint96" }, - ], - name: "latestDelayedStakeIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "maxDrawingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "minStakingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", - outputs: [ - { name: "pnkBalance", internalType: "uint256", type: "uint256" }, - { name: "availablePenalty", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "phase", - outputs: [{ name: "", internalType: "enum ISortitionModule.Phase", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumber", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumberRequestBlock", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rng", - outputs: [{ name: "", internalType: "contract RNG", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rngLookahead", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "_pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_ID", internalType: "bytes32", type: "bytes32" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "validateStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x8a26445989c944C58503275ad87Ab4d7b17d4F1e) - */ -export const sortitionModuleImplementationAddress = { - 421614: "0x8a26445989c944C58503275ad87Ab4d7b17d4F1e", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x8a26445989c944C58503275ad87Ab4d7b17d4F1e) - */ -export const sortitionModuleImplementationConfig = { - address: sortitionModuleImplementationAddress, - abi: sortitionModuleImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663) - */ -export const sortitionModuleProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663) - */ -export const sortitionModuleProxyAddress = { - 421614: "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663) - */ -export const sortitionModuleProxyConfig = { - address: sortitionModuleProxyAddress, - abi: sortitionModuleProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// TransactionBatcher -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) - */ -export const transactionBatcherAbi = [ - { - type: "function", - inputs: [ - { name: "targets", internalType: "address[]", type: "address[]" }, - { name: "values", internalType: "uint256[]", type: "uint256[]" }, - { name: "datas", internalType: "bytes[]", type: "bytes[]" }, - ], - name: "batchSend", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "targets", internalType: "address[]", type: "address[]" }, - { name: "values", internalType: "uint256[]", type: "uint256[]" }, - { name: "datas", internalType: "bytes[]", type: "bytes[]" }, - ], - name: "batchSendUnchecked", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) - */ -export const transactionBatcherAddress = { - 421614: "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) - */ -export const transactionBatcherConfig = { - address: transactionBatcherAddress, - abi: transactionBatcherAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WETH -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3829A2486d53ee984a0ca2D76552715726b77138) - */ -export const wethAbi = [ - { - type: "constructor", - inputs: [ - { name: "_name", internalType: "string", type: "string" }, - { name: "_symbol", internalType: "string", type: "string" }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3829A2486d53ee984a0ca2D76552715726b77138) - */ -export const wethAddress = { - 10200: "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8", - 421614: "0x3829A2486d53ee984a0ca2D76552715726b77138", -} as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3829A2486d53ee984a0ca2D76552715726b77138) - */ -export const wethConfig = { address: wethAddress, abi: wethAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WETHFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd) - */ -export const wethFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "amount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd) - */ -export const wethFaucetAddress = { - 10200: "0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F", - 421614: "0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd", -} as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd) - */ -export const wethFaucetConfig = { - address: wethFaucetAddress, - abi: wethFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WPNKFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x5898aeE045A25B276369914c3448B72a41758B2c) - */ -export const wpnkFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x5898aeE045A25B276369914c3448B72a41758B2c) - */ -export const wpnkFaucetAddress = { - 10200: "0x5898aeE045A25B276369914c3448B72a41758B2c", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x5898aeE045A25B276369914c3448B72a41758B2c) - */ -export const wpnkFaucetConfig = { - address: wpnkFaucetAddress, - abi: wpnkFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WrappedPinakionV2 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd) - */ -export const wrappedPinakionV2Abi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd) - */ -export const wrappedPinakionV2Address = { - 10200: "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd) - */ -export const wrappedPinakionV2Config = { - address: wrappedPinakionV2Address, - abi: wrappedPinakionV2Abi, -} as const; diff --git a/contracts/deployments/disputeKitsViem.ts b/contracts/deployments/disputeKitsViem.ts deleted file mode 100644 index 45ae23998..000000000 --- a/contracts/deployments/disputeKitsViem.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { getContracts } from "./contractsViem"; -import { Abi, AbiEvent, getAbiItem, PublicClient } from "viem"; -import { DeploymentName } from "./utils"; - -export type DisputeKitContracts = ReturnType; -export type DisputeKit = - | NonNullable - | NonNullable - | NonNullable - | NonNullable - | null; -export type DisputeKitInfos = { - address: `0x${string}`; - contract: DisputeKit; - isGated: boolean; - isShutter: boolean; -}; -export type DisputeKitByIds = Record; - -const fetchDisputeKits = async (client: PublicClient, klerosCoreAddress: `0x${string}`, klerosCoreAbi: Abi) => { - const DisputeKitCreated = getAbiItem({ - abi: klerosCoreAbi, - name: "DisputeKitCreated", - }) as AbiEvent; - const logs = await client.getLogs({ - address: klerosCoreAddress, - event: DisputeKitCreated, - fromBlock: 0n, - toBlock: "latest", - }); - return Object.fromEntries( - logs - .filter((log) => { - const args = log.args as Record; - return "_disputeKitID" in args && "_disputeKitAddress" in args; - }) - .map((log) => { - const { _disputeKitID, _disputeKitAddress } = log.args as { - _disputeKitID: bigint; - _disputeKitAddress: string; - }; - return { - disputeKitID: _disputeKitID, - disputeKitAddress: _disputeKitAddress, - }; - }) - .map(({ disputeKitID, disputeKitAddress }) => [disputeKitID!.toString(), disputeKitAddress as `0x${string}`]) - ); -}; - -export const getDisputeKits = async (client: PublicClient, deployment: DeploymentName): Promise => { - const { klerosCore, disputeKitClassic, disputeKitShutter, disputeKitGated, disputeKitGatedShutter } = getContracts({ - publicClient: client, - deployment: deployment, - }); - - const isDefined = (kit: T): kit is NonNullable => kit != null; - const disputeKitContracts = [disputeKitClassic, disputeKitShutter, disputeKitGated, disputeKitGatedShutter].filter( - isDefined - ); - const shutterEnabled = [disputeKitShutter, disputeKitGatedShutter].filter(isDefined); - const gatedEnabled = [disputeKitGated, disputeKitGatedShutter].filter(isDefined); - - const disputeKitMap = await fetchDisputeKits(client, klerosCore.address, klerosCore.abi); - - return Object.fromEntries( - Object.entries(disputeKitMap).map(([disputeKitID, address]) => { - const contract = - disputeKitContracts.find((contract) => contract.address.toLowerCase() === address.toLowerCase()) ?? null; - return [ - disputeKitID, - { - address, - contract: contract satisfies DisputeKit, - isGated: contract - ? gatedEnabled.some((gated) => contract.address.toLowerCase() === gated.address.toLowerCase()) - : false, - isShutter: contract - ? shutterEnabled.some((shutter) => contract.address.toLowerCase() === shutter.address.toLowerCase()) - : false, - }, - ]; - }) - ); -}; diff --git a/contracts/deployments/gnosischain/PolicyRegistry.json b/contracts/deployments/gnosischain/PolicyRegistry.json deleted file mode 100644 index ed3066b1b..000000000 --- a/contracts/deployments/gnosischain/PolicyRegistry.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "address": "0x9d494768936b6bDaabc46733b8D53A937A6c6D7e", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "governor", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "policies", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_subcourtID", - "type": "uint256" - }, - { - "name": "_policy", - "type": "string" - } - ], - "name": "setPolicy", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "_governor", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_subcourtID", - "type": "uint256" - }, - { - "indexed": false, - "name": "_policy", - "type": "string" - } - ], - "name": "PolicyUpdate", - "type": "event" - } - ] -} diff --git a/contracts/deployments/gnosischain/TokenBridge.json b/contracts/deployments/gnosischain/TokenBridge.json deleted file mode 100644 index 4f1c50e09..000000000 --- a/contracts/deployments/gnosischain/TokenBridge.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "address": "0xf6A78083ca3e2a662D6dd1703c939c8aCE2e268d", - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "version", - "type": "uint256" - }, - { - "name": "implementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "version", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "upgradeabilityOwner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "version", - "type": "uint256" - }, - { - "name": "implementation", - "type": "address" - }, - { - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferProxyOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "previousOwner", - "type": "address" - }, - { - "indexed": false, - "name": "newOwner", - "type": "address" - } - ], - "name": "ProxyOwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "version", - "type": "uint256" - }, - { - "indexed": true, - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - } - ] -} diff --git a/contracts/deployments/gnosischain/TransactionBatcher.json b/contracts/deployments/gnosischain/TransactionBatcher.json deleted file mode 100644 index e1dbd9e24..000000000 --- a/contracts/deployments/gnosischain/TransactionBatcher.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "address": "0x6426800F8508b15AED271337498fa5e7D0794d46", - "abi": [ - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "datas", - "type": "bytes[]" - } - ], - "name": "batchSend", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ] -} diff --git a/contracts/deployments/gnosischain/WETH.json b/contracts/deployments/gnosischain/WETH.json deleted file mode 100644 index dce27dbb9..000000000 --- a/contracts/deployments/gnosischain/WETH.json +++ /dev/null @@ -1,883 +0,0 @@ -{ - "address": "0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "mintingFinished", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "result", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_bridgeContract", - "type": "address" - } - ], - "name": "setBridgeContract", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_sender", - "type": "address" - }, - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "name": "result", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_data", - "type": "bytes" - } - ], - "name": "transferAndCall", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_value", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "version", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseApproval", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_to", - "type": "address" - } - ], - "name": "claimTokens", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_address", - "type": "address" - } - ], - "name": "isBridge", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "finishMinting", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTokenInterfacesVersion", - "outputs": [ - { - "name": "major", - "type": "uint64" - }, - { - "name": "minor", - "type": "uint64" - }, - { - "name": "patch", - "type": "uint64" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_holder", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - }, - { - "name": "_nonce", - "type": "uint256" - }, - { - "name": "_expiry", - "type": "uint256" - }, - { - "name": "_allowed", - "type": "bool" - }, - { - "name": "_v", - "type": "uint8" - }, - { - "name": "_r", - "type": "bytes32" - }, - { - "name": "_s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "push", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "move", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "PERMIT_TYPEHASH_LEGACY", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "bridgeContract", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_holder", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_deadline", - "type": "uint256" - }, - { - "name": "_v", - "type": "uint8" - }, - { - "name": "_r", - "type": "bytes32" - }, - { - "name": "_s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_addedValue", - "type": "uint256" - } - ], - "name": "increaseApproval", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "pull", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "address" - } - ], - "name": "expirations", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "_name", - "type": "string" - }, - { - "name": "_symbol", - "type": "string" - }, - { - "name": "_decimals", - "type": "uint8" - }, - { - "name": "_chainId", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "MintFinished", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "previousOwner", - "type": "address" - } - ], - "name": "OwnershipRenounced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "burner", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "name": "data", - "type": "bytes" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } - ] -} diff --git a/contracts/deployments/gnosischain/WrappedPinakion.json b/contracts/deployments/gnosischain/WrappedPinakion.json deleted file mode 100644 index f057e5e8c..000000000 --- a/contracts/deployments/gnosischain/WrappedPinakion.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "address": "0xcb3231aBA3b451343e0Fddfc45883c842f223846", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] -} diff --git a/contracts/deployments/gnosischain/xKlerosLiquid.json b/contracts/deployments/gnosischain/xKlerosLiquid.json deleted file mode 100644 index ee31ded75..000000000 --- a/contracts/deployments/gnosischain/xKlerosLiquid.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "address": "0x9C1dA9A04925bDfDedf0f6421bC7EEa8305F9002", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] -} diff --git a/contracts/deployments/gnosischain/xPNK.json b/contracts/deployments/gnosischain/xPNK.json deleted file mode 100644 index 406599d18..000000000 --- a/contracts/deployments/gnosischain/xPNK.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "address": "0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3", - "abi": [] -} diff --git a/contracts/deployments/index.ts b/contracts/deployments/index.ts deleted file mode 100644 index c94968751..000000000 --- a/contracts/deployments/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Typechain Ethers v6 artifacts -export * as arbitrum from "./arbitrum"; -export * as arbitrumSepolia from "./arbitrumSepolia"; -export * as arbitrumSepoliaDevnet from "./arbitrumSepoliaDevnet"; - -// Viem artifacts -export * as devnetViem from "./devnet.viem"; -export * as mainnetViem from "./mainnet.viem"; -export * as testnetViem from "./testnet.viem"; - -// Typechain-types -export * from "../typechain-types"; - -// Common utils -export * from "./utils"; - -// Contracts getters -export { getContracts as getContractsEthers } from "./contractsEthers"; -export { getContracts as getContractsViem } from "./contractsViem"; - -// Dispute kits getters -export { getDisputeKits as getDisputeKitsViem, type DisputeKitByIds, type DisputeKitInfos } from "./disputeKitsViem"; diff --git a/contracts/deployments/mainnet.viem.ts b/contracts/deployments/mainnet.viem.ts deleted file mode 100644 index eeada4b95..000000000 --- a/contracts/deployments/mainnet.viem.ts +++ /dev/null @@ -1,16575 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// BlockHashRNG -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B) - */ -export const blockHashRngAbi = [ - { - type: "function", - inputs: [{ name: "block", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_block", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_block", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B) - */ -export const blockHashRngAddress = { - 42161: "0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B) - */ -export const blockHashRngConfig = { - address: blockHashRngAddress, - abi: blockHashRngAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ChainlinkRNG -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x897d83a7d5F23555eFA15e1BE297d5503522cbA3) - */ -export const chainlinkRngAbi = [ - { - type: "constructor", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_sortitionModule", internalType: "address", type: "address" }, - { name: "_vrfCoordinator", internalType: "address", type: "address" }, - { name: "_keyHash", internalType: "bytes32", type: "bytes32" }, - { name: "_subscriptionId", internalType: "uint256", type: "uint256" }, - { name: "_requestConfirmations", internalType: "uint16", type: "uint16" }, - { name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }, - ], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "address", type: "address" }, - { name: "want", internalType: "address", type: "address" }, - ], - name: "OnlyCoordinatorCanFulfill", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "address", type: "address" }, - { name: "owner", internalType: "address", type: "address" }, - { name: "coordinator", internalType: "address", type: "address" }, - ], - name: "OnlyOwnerOrCoordinator", - }, - { type: "error", inputs: [], name: "ZeroAddress" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "vrfCoordinator", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "CoordinatorSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "randomWord", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "RequestFulfilled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "RequestSent", - }, - { - type: "function", - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "callbackGasLimit", - outputs: [{ name: "", internalType: "uint32", type: "uint32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }], - name: "changeCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_keyHash", internalType: "bytes32", type: "bytes32" }], - name: "changeKeyHash", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_requestConfirmations", internalType: "uint16", type: "uint16" }], - name: "changeRequestConfirmations", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_sortitionModule", internalType: "address", type: "address" }], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_subscriptionId", internalType: "uint256", type: "uint256" }], - name: "changeSubscriptionId", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], - name: "changeVrfCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "keyHash", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastRequestId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "requestId", internalType: "uint256", type: "uint256" }, - { name: "randomWords", internalType: "uint256[]", type: "uint256[]" }, - ], - name: "rawFulfillRandomWords", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "requestConfirmations", - outputs: [{ name: "", internalType: "uint16", type: "uint16" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "s_vrfCoordinator", - outputs: [ - { - name: "", - internalType: "contract IVRFCoordinatorV2Plus", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], - name: "setCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "subscriptionId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x897d83a7d5F23555eFA15e1BE297d5503522cbA3) - */ -export const chainlinkRngAddress = { - 42161: "0x897d83a7d5F23555eFA15e1BE297d5503522cbA3", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x897d83a7d5F23555eFA15e1BE297d5503522cbA3) - */ -export const chainlinkRngConfig = { - address: chainlinkRngAddress, - abi: chainlinkRngAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ChainlinkVRFCoordinator -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e) - */ -export const chainlinkVrfCoordinatorAbi = [ - { - type: "constructor", - inputs: [{ name: "blockhashStore", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [ - { name: "internalBalance", internalType: "uint256", type: "uint256" }, - { name: "externalBalance", internalType: "uint256", type: "uint256" }, - ], - name: "BalanceInvariantViolated", - }, - { - type: "error", - inputs: [{ name: "blockNum", internalType: "uint256", type: "uint256" }], - name: "BlockhashNotInStore", - }, - { - type: "error", - inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], - name: "CoordinatorAlreadyRegistered", - }, - { - type: "error", - inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], - name: "CoordinatorNotRegistered", - }, - { type: "error", inputs: [], name: "FailedToSendNative" }, - { type: "error", inputs: [], name: "FailedToTransferLink" }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint32", type: "uint32" }, - { name: "want", internalType: "uint32", type: "uint32" }, - ], - name: "GasLimitTooBig", - }, - { - type: "error", - inputs: [ - { name: "gasPrice", internalType: "uint256", type: "uint256" }, - { name: "maxGas", internalType: "uint256", type: "uint256" }, - ], - name: "GasPriceExceeded", - }, - { type: "error", inputs: [], name: "IncorrectCommitment" }, - { type: "error", inputs: [], name: "IndexOutOfRange" }, - { type: "error", inputs: [], name: "InsufficientBalance" }, - { type: "error", inputs: [], name: "InvalidCalldata" }, - { - type: "error", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "consumer", internalType: "address", type: "address" }, - ], - name: "InvalidConsumer", - }, - { type: "error", inputs: [], name: "InvalidExtraArgsTag" }, - { - type: "error", - inputs: [{ name: "linkWei", internalType: "int256", type: "int256" }], - name: "InvalidLinkWeiPrice", - }, - { - type: "error", - inputs: [ - { name: "premiumPercentage", internalType: "uint8", type: "uint8" }, - { name: "max", internalType: "uint8", type: "uint8" }, - ], - name: "InvalidPremiumPercentage", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint16", type: "uint16" }, - { name: "min", internalType: "uint16", type: "uint16" }, - { name: "max", internalType: "uint16", type: "uint16" }, - ], - name: "InvalidRequestConfirmations", - }, - { type: "error", inputs: [], name: "InvalidSubscription" }, - { type: "error", inputs: [], name: "LinkAlreadySet" }, - { - type: "error", - inputs: [ - { - name: "flatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - }, - { name: "flatFeeNativePPM", internalType: "uint32", type: "uint32" }, - ], - name: "LinkDiscountTooHigh", - }, - { type: "error", inputs: [], name: "LinkNotSet" }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint256", type: "uint256" }, - { name: "max", internalType: "uint32", type: "uint32" }, - ], - name: "MsgDataTooBig", - }, - { - type: "error", - inputs: [{ name: "proposedOwner", internalType: "address", type: "address" }], - name: "MustBeRequestedOwner", - }, - { - type: "error", - inputs: [{ name: "owner", internalType: "address", type: "address" }], - name: "MustBeSubOwner", - }, - { type: "error", inputs: [], name: "NoCorrespondingRequest" }, - { - type: "error", - inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], - name: "NoSuchProvingKey", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint32", type: "uint32" }, - { name: "want", internalType: "uint32", type: "uint32" }, - ], - name: "NumWordsTooBig", - }, - { type: "error", inputs: [], name: "OnlyCallableFromLink" }, - { type: "error", inputs: [], name: "PaymentTooLarge" }, - { type: "error", inputs: [], name: "PendingRequestExists" }, - { - type: "error", - inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], - name: "ProvingKeyAlreadyRegistered", - }, - { type: "error", inputs: [], name: "Reentrant" }, - { type: "error", inputs: [], name: "TooManyConsumers" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - indexed: false, - }, - { - name: "maxGasLimit", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "stalenessSeconds", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "gasAfterPaymentCalculation", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "fallbackWeiPerUnitLink", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "fulfillmentFlatFeeNativePPM", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "fulfillmentFlatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "nativePremiumPercentage", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - { - name: "linkPremiumPercentage", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "ConfigSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "coordinatorAddress", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "CoordinatorDeregistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "coordinatorAddress", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "CoordinatorRegistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "fallbackWeiPerUnitLink", - internalType: "int256", - type: "int256", - indexed: false, - }, - ], - name: "FallbackWeiPerUnitLinkUsed", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "to", internalType: "address", type: "address", indexed: false }, - { - name: "amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "FundsRecovered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newCoordinator", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "MigrationCompleted", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "to", internalType: "address", type: "address", indexed: false }, - { - name: "amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "NativeFundsRecovered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "keyHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "maxGas", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "ProvingKeyDeregistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "keyHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "maxGas", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "ProvingKeyRegistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "outputSeed", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "payment", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - { - name: "nativePayment", - internalType: "bool", - type: "bool", - indexed: false, - }, - { name: "success", internalType: "bool", type: "bool", indexed: false }, - { - name: "onlyPremium", - internalType: "bool", - type: "bool", - indexed: false, - }, - ], - name: "RandomWordsFulfilled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "keyHash", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "preSeed", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - indexed: false, - }, - { - name: "callbackGasLimit", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "numWords", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "extraArgs", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - { - name: "sender", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "RandomWordsRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "to", internalType: "address", type: "address", indexed: false }, - { - name: "amountLink", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "amountNative", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "SubscriptionCanceled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "consumer", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "SubscriptionConsumerAdded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "consumer", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "SubscriptionConsumerRemoved", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "owner", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "SubscriptionCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "oldBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "newBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "SubscriptionFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "oldNativeBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "newNativeBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "SubscriptionFundedWithNative", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "from", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "to", internalType: "address", type: "address", indexed: false }, - ], - name: "SubscriptionOwnerTransferRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "from", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "to", internalType: "address", type: "address", indexed: false }, - ], - name: "SubscriptionOwnerTransferred", - }, - { - type: "function", - inputs: [], - name: "BLOCKHASH_STORE", - outputs: [ - { - name: "", - internalType: "contract BlockhashStoreInterface", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LINK", - outputs: [ - { - name: "", - internalType: "contract LinkTokenInterface", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LINK_NATIVE_FEED", - outputs: [ - { - name: "", - internalType: "contract AggregatorV3Interface", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_CONSUMERS", - outputs: [{ name: "", internalType: "uint16", type: "uint16" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_NUM_WORDS", - outputs: [{ name: "", internalType: "uint32", type: "uint32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_REQUEST_CONFIRMATIONS", - outputs: [{ name: "", internalType: "uint16", type: "uint16" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "acceptSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "consumer", internalType: "address", type: "address" }, - ], - name: "addConsumer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "to", internalType: "address", type: "address" }, - ], - name: "cancelSubscription", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "createSubscription", - outputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "target", internalType: "address", type: "address" }], - name: "deregisterMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "publicProvingKey", - internalType: "uint256[2]", - type: "uint256[2]", - }, - ], - name: "deregisterProvingKey", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "proof", - internalType: "struct VRF.Proof", - type: "tuple", - components: [ - { name: "pk", internalType: "uint256[2]", type: "uint256[2]" }, - { name: "gamma", internalType: "uint256[2]", type: "uint256[2]" }, - { name: "c", internalType: "uint256", type: "uint256" }, - { name: "s", internalType: "uint256", type: "uint256" }, - { name: "seed", internalType: "uint256", type: "uint256" }, - { name: "uWitness", internalType: "address", type: "address" }, - { - name: "cGammaWitness", - internalType: "uint256[2]", - type: "uint256[2]", - }, - { - name: "sHashWitness", - internalType: "uint256[2]", - type: "uint256[2]", - }, - { name: "zInv", internalType: "uint256", type: "uint256" }, - ], - }, - { - name: "rc", - internalType: "struct VRFTypes.RequestCommitmentV2Plus", - type: "tuple", - components: [ - { name: "blockNum", internalType: "uint64", type: "uint64" }, - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, - { name: "numWords", internalType: "uint32", type: "uint32" }, - { name: "sender", internalType: "address", type: "address" }, - { name: "extraArgs", internalType: "bytes", type: "bytes" }, - ], - }, - { name: "onlyPremium", internalType: "bool", type: "bool" }, - ], - name: "fulfillRandomWords", - outputs: [{ name: "payment", internalType: "uint96", type: "uint96" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "fundSubscriptionWithNative", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "startIndex", internalType: "uint256", type: "uint256" }, - { name: "maxCount", internalType: "uint256", type: "uint256" }, - ], - name: "getActiveSubscriptionIds", - outputs: [{ name: "ids", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "getSubscription", - outputs: [ - { name: "balance", internalType: "uint96", type: "uint96" }, - { name: "nativeBalance", internalType: "uint96", type: "uint96" }, - { name: "reqCount", internalType: "uint64", type: "uint64" }, - { name: "subOwner", internalType: "address", type: "address" }, - { name: "consumers", internalType: "address[]", type: "address[]" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "publicKey", internalType: "uint256[2]", type: "uint256[2]" }], - name: "hashOfKey", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "newCoordinator", internalType: "address", type: "address" }, - ], - name: "migrate", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "onTokenTransfer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "ownerCancelSubscription", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "pendingRequestExists", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "recoverFunds", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address payable", type: "address" }], - name: "recoverNativeFunds", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "target", internalType: "address", type: "address" }], - name: "registerMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "publicProvingKey", - internalType: "uint256[2]", - type: "uint256[2]", - }, - { name: "maxGas", internalType: "uint64", type: "uint64" }, - ], - name: "registerProvingKey", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "consumer", internalType: "address", type: "address" }, - ], - name: "removeConsumer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "req", - internalType: "struct VRFV2PlusClient.RandomWordsRequest", - type: "tuple", - components: [ - { name: "keyHash", internalType: "bytes32", type: "bytes32" }, - { name: "subId", internalType: "uint256", type: "uint256" }, - { - name: "requestConfirmations", - internalType: "uint16", - type: "uint16", - }, - { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, - { name: "numWords", internalType: "uint32", type: "uint32" }, - { name: "extraArgs", internalType: "bytes", type: "bytes" }, - ], - }, - ], - name: "requestRandomWords", - outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "newOwner", internalType: "address", type: "address" }, - ], - name: "requestSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "s_config", - outputs: [ - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - }, - { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, - { name: "reentrancyLock", internalType: "bool", type: "bool" }, - { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, - { - name: "gasAfterPaymentCalculation", - internalType: "uint32", - type: "uint32", - }, - { - name: "fulfillmentFlatFeeNativePPM", - internalType: "uint32", - type: "uint32", - }, - { - name: "fulfillmentFlatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - }, - { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, - { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_currentSubNonce", - outputs: [{ name: "", internalType: "uint64", type: "uint64" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_fallbackWeiPerUnitLink", - outputs: [{ name: "", internalType: "int256", type: "int256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "s_provingKeyHashes", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - name: "s_provingKeys", - outputs: [ - { name: "exists", internalType: "bool", type: "bool" }, - { name: "maxGas", internalType: "uint64", type: "uint64" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "s_requestCommitments", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_totalBalance", - outputs: [{ name: "", internalType: "uint96", type: "uint96" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_totalNativeBalance", - outputs: [{ name: "", internalType: "uint96", type: "uint96" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - }, - { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, - { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, - { - name: "gasAfterPaymentCalculation", - internalType: "uint32", - type: "uint32", - }, - { - name: "fallbackWeiPerUnitLink", - internalType: "int256", - type: "int256", - }, - { - name: "fulfillmentFlatFeeNativePPM", - internalType: "uint32", - type: "uint32", - }, - { - name: "fulfillmentFlatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - }, - { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, - { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, - ], - name: "setConfig", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "link", internalType: "address", type: "address" }, - { name: "linkNativeFeed", internalType: "address", type: "address" }, - ], - name: "setLINKAndLINKNativeFeed", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "recipient", internalType: "address", type: "address" }], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "recipient", internalType: "address payable", type: "address" }], - name: "withdrawNative", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e) - */ -export const chainlinkVrfCoordinatorAddress = { - 42161: "0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e) - */ -export const chainlinkVrfCoordinatorConfig = { - address: chainlinkVrfCoordinatorAddress, - abi: chainlinkVrfCoordinatorAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DAI -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1) - */ -export const daiAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [{ name: "usr", internalType: "address", type: "address", indexed: true }], - name: "Deny", - }, - { - type: "event", - anonymous: false, - inputs: [{ name: "usr", internalType: "address", type: "address", indexed: true }], - name: "Rely", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "PERMIT_TYPEHASH", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "usr", internalType: "address", type: "address" }], - name: "deny", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "deploymentChainId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "nonces", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - { name: "deadline", internalType: "uint256", type: "uint256" }, - { name: "v", internalType: "uint8", type: "uint8" }, - { name: "r", internalType: "bytes32", type: "bytes32" }, - { name: "s", internalType: "bytes32", type: "bytes32" }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "usr", internalType: "address", type: "address" }], - name: "rely", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "wards", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1) - */ -export const daiAddress = { - 42161: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1) - */ -export const daiConfig = { address: daiAddress, abi: daiAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) - */ -export const disputeKitClassicAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) - */ -export const disputeKitClassicAddress = { - 42161: "0x70B464be85A547144C72485eBa2577E5D3A45421", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) - */ -export const disputeKitClassicConfig = { - address: disputeKitClassicAddress, - abi: disputeKitClassicAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC) - */ -export const disputeKitClassicImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC) - */ -export const disputeKitClassicImplementationAddress = { - 42161: "0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x371Aa4B1AE5b5f9422f3Ff1d105029AAd1D319BC) - */ -export const disputeKitClassicImplementationConfig = { - address: disputeKitClassicImplementationAddress, - abi: disputeKitClassicImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) - */ -export const disputeKitClassicProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) - */ -export const disputeKitClassicProxyAddress = { - 42161: "0x70B464be85A547144C72485eBa2577E5D3A45421", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) - */ -export const disputeKitClassicProxyConfig = { - address: disputeKitClassicProxyAddress, - abi: disputeKitClassicProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGated -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xaE1eed20C125B739b64c948820C61F809ad9a925) - */ -export const disputeKitGatedAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "extraDataToTokenInfo", - outputs: [ - { name: "tokenGate", internalType: "address", type: "address" }, - { name: "isERC1155", internalType: "bool", type: "bool" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xaE1eed20C125B739b64c948820C61F809ad9a925) - */ -export const disputeKitGatedAddress = { - 42161: "0xaE1eed20C125B739b64c948820C61F809ad9a925", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xaE1eed20C125B739b64c948820C61F809ad9a925) - */ -export const disputeKitGatedConfig = { - address: disputeKitGatedAddress, - abi: disputeKitGatedAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGatedShutter -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x788330092B9704809C19858E39EB9Ac402c2E47b) - */ -export const disputeKitGatedShutterAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x788330092B9704809C19858E39EB9Ac402c2E47b) - */ -export const disputeKitGatedShutterAddress = { - 42161: "0x788330092B9704809C19858E39EB9Ac402c2E47b", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x788330092B9704809C19858E39EB9Ac402c2E47b) - */ -export const disputeKitGatedShutterConfig = { - address: disputeKitGatedShutterAddress, - abi: disputeKitGatedShutterAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGatedShutter_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32) - */ -export const disputeKitGatedShutterImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32) - */ -export const disputeKitGatedShutterImplementationAddress = { - 42161: "0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb12EB4c0716d3A9861a9AC471c6CdDB808d61b32) - */ -export const disputeKitGatedShutterImplementationConfig = { - address: disputeKitGatedShutterImplementationAddress, - abi: disputeKitGatedShutterImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGatedShutter_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x788330092B9704809C19858E39EB9Ac402c2E47b) - */ -export const disputeKitGatedShutterProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x788330092B9704809C19858E39EB9Ac402c2E47b) - */ -export const disputeKitGatedShutterProxyAddress = { - 42161: "0x788330092B9704809C19858E39EB9Ac402c2E47b", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x788330092B9704809C19858E39EB9Ac402c2E47b) - */ -export const disputeKitGatedShutterProxyConfig = { - address: disputeKitGatedShutterProxyAddress, - abi: disputeKitGatedShutterProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGated_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a) - */ -export const disputeKitGatedImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "extraDataToTokenInfo", - outputs: [ - { name: "tokenGate", internalType: "address", type: "address" }, - { name: "isERC1155", internalType: "bool", type: "bool" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a) - */ -export const disputeKitGatedImplementationAddress = { - 42161: "0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xEA7863E6dE863e8E6d037D8693ad5dA45Db7790a) - */ -export const disputeKitGatedImplementationConfig = { - address: disputeKitGatedImplementationAddress, - abi: disputeKitGatedImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGated_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xaE1eed20C125B739b64c948820C61F809ad9a925) - */ -export const disputeKitGatedProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xaE1eed20C125B739b64c948820C61F809ad9a925) - */ -export const disputeKitGatedProxyAddress = { - 42161: "0xaE1eed20C125B739b64c948820C61F809ad9a925", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xaE1eed20C125B739b64c948820C61F809ad9a925) - */ -export const disputeKitGatedProxyConfig = { - address: disputeKitGatedProxyAddress, - abi: disputeKitGatedProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitShutter -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x9D3e3f1765744c2a1BC6F6088549770444BBC768) - */ -export const disputeKitShutterAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x9D3e3f1765744c2a1BC6F6088549770444BBC768) - */ -export const disputeKitShutterAddress = { - 42161: "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x9D3e3f1765744c2a1BC6F6088549770444BBC768) - */ -export const disputeKitShutterConfig = { - address: disputeKitShutterAddress, - abi: disputeKitShutterAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitShutter_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF3103B46403A0bBd4551648BFb29BCC2b8783947) - */ -export const disputeKitShutterImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF3103B46403A0bBd4551648BFb29BCC2b8783947) - */ -export const disputeKitShutterImplementationAddress = { - 42161: "0xF3103B46403A0bBd4551648BFb29BCC2b8783947", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF3103B46403A0bBd4551648BFb29BCC2b8783947) - */ -export const disputeKitShutterImplementationConfig = { - address: disputeKitShutterImplementationAddress, - abi: disputeKitShutterImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitShutter_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x9D3e3f1765744c2a1BC6F6088549770444BBC768) - */ -export const disputeKitShutterProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x9D3e3f1765744c2a1BC6F6088549770444BBC768) - */ -export const disputeKitShutterProxyAddress = { - 42161: "0x9D3e3f1765744c2a1BC6F6088549770444BBC768", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x9D3e3f1765744c2a1BC6F6088549770444BBC768) - */ -export const disputeKitShutterProxyConfig = { - address: disputeKitShutterProxyAddress, - abi: disputeKitShutterProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolver -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) - */ -export const disputeResolverAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) - */ -export const disputeResolverAddress = { - 42161: "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) - */ -export const disputeResolverConfig = { - address: disputeResolverAddress, - abi: disputeResolverAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolverRuler -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140) - */ -export const disputeResolverRulerAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140) - */ -export const disputeResolverRulerAddress = { - 42161: "0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140) - */ -export const disputeResolverRulerConfig = { - address: disputeResolverRulerAddress, - abi: disputeResolverRulerAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_templateTag", - internalType: "string", - type: "string", - indexed: true, - }, - { - name: "_templateData", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_templateDataMappings", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeTemplate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryAddress = { - 42161: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryConfig = { - address: disputeTemplateRegistryAddress, - abi: disputeTemplateRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) - */ -export const disputeTemplateRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_templateTag", - internalType: "string", - type: "string", - indexed: true, - }, - { - name: "_templateData", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_templateDataMappings", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeTemplate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) - */ -export const disputeTemplateRegistryImplementationAddress = { - 42161: "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) - */ -export const disputeTemplateRegistryImplementationConfig = { - address: disputeTemplateRegistryImplementationAddress, - abi: disputeTemplateRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryProxyAddress = { - 42161: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryProxyConfig = { - address: disputeTemplateRegistryProxyAddress, - abi: disputeTemplateRegistryProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) - */ -export const evidenceModuleAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_party", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_evidence", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "Evidence", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) - */ -export const evidenceModuleAddress = { - 42161: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) - */ -export const evidenceModuleConfig = { - address: evidenceModuleAddress, - abi: evidenceModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xA502A3942abCF8e71FBD87ed442B39b798b192C8) - */ -export const evidenceModuleImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_party", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_evidence", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "Evidence", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xA502A3942abCF8e71FBD87ed442B39b798b192C8) - */ -export const evidenceModuleImplementationAddress = { - 42161: "0xA502A3942abCF8e71FBD87ed442B39b798b192C8", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xA502A3942abCF8e71FBD87ed442B39b798b192C8) - */ -export const evidenceModuleImplementationConfig = { - address: evidenceModuleImplementationAddress, - abi: evidenceModuleImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) - */ -export const evidenceModuleProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) - */ -export const evidenceModuleProxyAddress = { - 42161: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) - */ -export const evidenceModuleProxyConfig = { - address: evidenceModuleProxyAddress, - abi: evidenceModuleProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// IHomeGateway -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const iHomeGatewayAbi = [ - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: false, - }, - { - name: "_arbitrableChainId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_arbitrable", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_arbitrableDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "CrossChainDisputeIncoming", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToHomeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "feeToken", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "foreignChainID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "foreignGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "receiverGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", - type: "tuple", - components: [ - { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, - { - name: "foreignArbitrable", - internalType: "address", - type: "address", - }, - { - name: "foreignDisputeID", - internalType: "uint256", - type: "uint256", - }, - { - name: "externalDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "relayCreateDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", - type: "tuple", - components: [ - { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, - { - name: "foreignArbitrable", - internalType: "address", - type: "address", - }, - { - name: "foreignDisputeID", - internalType: "uint256", - type: "uint256", - }, - { - name: "externalDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - }, - ], - name: "relayCreateDispute", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "veaInbox", - outputs: [{ name: "", internalType: "contract IVeaInbox", type: "address" }], - stateMutability: "view", - }, -] as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) - */ -export const klerosCoreAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrableNotWhitelisted" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NotEligibleForStaking" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingMoreThanMaxStakePerJuror" }, - { type: "error", inputs: [], name: "StakingMoreThanMaxTotalStaked" }, - { type: "error", inputs: [], name: "StakingNotPossibleInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WhenNotPausedOnly" }, - { type: "error", inputs: [], name: "WhenPausedOnly" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "arbitrableWhitelist", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_arbitrable", internalType: "address", type: "address" }, - { name: "_allowed", internalType: "bool", type: "bool" }, - ], - name: "changeArbitrableWhitelist", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_jurorNft", internalType: "contract IERC721", type: "address" }], - name: "changeJurorNft", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "nbDrawnJurors", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getPnkAtStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreBase.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - { name: "_jurorNft", internalType: "contract IERC721", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorNft", - outputs: [{ name: "", internalType: "contract IERC721", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) - */ -export const klerosCoreAddress = { - 42161: "0x991d2df165670b9cac3B022f4B68D65b664222ea", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) - */ -export const klerosCoreConfig = { - address: klerosCoreAddress, - abi: klerosCoreAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) - */ -export const klerosCoreRulerAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NoRulerSet" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulerOnly" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "RulingModeNotSet" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "mode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "tied", internalType: "bool", type: "bool", indexed: false }, - { - name: "overridden", - internalType: "bool", - type: "bool", - indexed: false, - }, - ], - name: "AutoRuled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_oldRuler", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_newRuler", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "RulerChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_settings", - internalType: "struct KlerosCoreRuler.RulerSettings", - type: "tuple", - components: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - indexed: false, - }, - ], - name: "RulerSettingsChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_newRuler", internalType: "address", type: "address" }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_presetRuling", internalType: "uint256", type: "uint256" }, - { name: "_presetTied", internalType: "bool", type: "bool" }, - { name: "_presetOverridden", internalType: "bool", type: "bool" }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToManual", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getNextDisputeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreRuler.Round", - type: "tuple", - components: [ - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "rulers", - outputs: [{ name: "ruler", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - name: "rulingResults", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) - */ -export const klerosCoreRulerAddress = { - 42161: "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) - */ -export const klerosCoreRulerConfig = { - address: klerosCoreRulerAddress, - abi: klerosCoreRulerAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324) - */ -export const klerosCoreRulerImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NoRulerSet" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulerOnly" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "RulingModeNotSet" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "mode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "tied", internalType: "bool", type: "bool", indexed: false }, - { - name: "overridden", - internalType: "bool", - type: "bool", - indexed: false, - }, - ], - name: "AutoRuled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_oldRuler", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_newRuler", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "RulerChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_settings", - internalType: "struct KlerosCoreRuler.RulerSettings", - type: "tuple", - components: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - indexed: false, - }, - ], - name: "RulerSettingsChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_newRuler", internalType: "address", type: "address" }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_presetRuling", internalType: "uint256", type: "uint256" }, - { name: "_presetTied", internalType: "bool", type: "bool" }, - { name: "_presetOverridden", internalType: "bool", type: "bool" }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToManual", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getNextDisputeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreRuler.Round", - type: "tuple", - components: [ - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "rulers", - outputs: [{ name: "ruler", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - name: "rulingResults", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324) - */ -export const klerosCoreRulerImplementationAddress = { - 42161: "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324) - */ -export const klerosCoreRulerImplementationConfig = { - address: klerosCoreRulerImplementationAddress, - abi: klerosCoreRulerImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) - */ -export const klerosCoreRulerProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) - */ -export const klerosCoreRulerProxyAddress = { - 42161: "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) - */ -export const klerosCoreRulerProxyConfig = { - address: klerosCoreRulerProxyAddress, - abi: klerosCoreRulerProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreSnapshotProxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95) - */ -export const klerosCoreSnapshotProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract IKlerosCore", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "totalStaked", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "contract IKlerosCore", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract IKlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95) - */ -export const klerosCoreSnapshotProxyAddress = { - 42161: "0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95) - */ -export const klerosCoreSnapshotProxyConfig = { - address: klerosCoreSnapshotProxyAddress, - abi: klerosCoreSnapshotProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xC1210493804eEF123096F9581Ee82B915150E54c) - */ -export const klerosCoreImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrableNotWhitelisted" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NotEligibleForStaking" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingMoreThanMaxStakePerJuror" }, - { type: "error", inputs: [], name: "StakingMoreThanMaxTotalStaked" }, - { type: "error", inputs: [], name: "StakingNotPossibleInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WhenNotPausedOnly" }, - { type: "error", inputs: [], name: "WhenPausedOnly" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "arbitrableWhitelist", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_arbitrable", internalType: "address", type: "address" }, - { name: "_allowed", internalType: "bool", type: "bool" }, - ], - name: "changeArbitrableWhitelist", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_jurorNft", internalType: "contract IERC721", type: "address" }], - name: "changeJurorNft", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "nbDrawnJurors", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getPnkAtStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreBase.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - { name: "_jurorNft", internalType: "contract IERC721", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorNft", - outputs: [{ name: "", internalType: "contract IERC721", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xC1210493804eEF123096F9581Ee82B915150E54c) - */ -export const klerosCoreImplementationAddress = { - 42161: "0xC1210493804eEF123096F9581Ee82B915150E54c", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xC1210493804eEF123096F9581Ee82B915150E54c) - */ -export const klerosCoreImplementationConfig = { - address: klerosCoreImplementationAddress, - abi: klerosCoreImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) - */ -export const klerosCoreProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) - */ -export const klerosCoreProxyAddress = { - 42161: "0x991d2df165670b9cac3B022f4B68D65b664222ea", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) - */ -export const klerosCoreProxyConfig = { - address: klerosCoreProxyAddress, - abi: klerosCoreProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosV2NeoEarlyUser -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xfE34a72c55e512601E7d491A9c5b36373cE34d63) - */ -export const klerosV2NeoEarlyUserAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "approved", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "tokenId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "operator", - internalType: "address", - type: "address", - indexed: true, - }, - { name: "approved", internalType: "bool", type: "bool", indexed: false }, - ], - name: "ApprovalForAll", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newMinter", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "EventMinterAdded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "oldMinter", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "EventMinterRemoved", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "previousOwner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "newOwner", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "OwnershipTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "tokenId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [{ name: "minter", internalType: "address", type: "address" }], - name: "addMinter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "owner", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "baseURI", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "id", internalType: "uint256", type: "uint256" }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "ids", internalType: "uint256[]", type: "uint256[]" }, - ], - name: "burnBatch", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "cid", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "getApproved", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "getNumMinted", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "operator", internalType: "address", type: "address" }, - ], - name: "isApprovedForAll", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "id", internalType: "uint256", type: "uint256" }, - ], - name: "isOwnerOf", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "cid", internalType: "uint256", type: "uint256" }, - ], - name: "mint", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - { name: "cidArr", internalType: "uint256[]", type: "uint256[]" }, - ], - name: "mintBatch", - outputs: [{ name: "", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "minters", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "ownerOf", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "minter", internalType: "address", type: "address" }], - name: "removeMinter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "operator", internalType: "address", type: "address" }, - { name: "approved", internalType: "bool", type: "bool" }, - ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newName", internalType: "string", type: "string" }], - name: "setName", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newSymbol", internalType: "string", type: "string" }], - name: "setSymbol", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "transferable", internalType: "bool", type: "bool" }], - name: "setTransferable", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newURI", internalType: "string", type: "string" }], - name: "setURI", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "index", internalType: "uint256", type: "uint256" }, - ], - name: "tokenOfOwnerByIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "tokenURI", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newOwner", internalType: "address", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "transferable", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xfE34a72c55e512601E7d491A9c5b36373cE34d63) - */ -export const klerosV2NeoEarlyUserAddress = { - 42161: "0xfE34a72c55e512601E7d491A9c5b36373cE34d63", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xfE34a72c55e512601E7d491A9c5b36373cE34d63) - */ -export const klerosV2NeoEarlyUserConfig = { - address: klerosV2NeoEarlyUserAddress, - abi: klerosV2NeoEarlyUserAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PNK -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x330bD769382cFc6d50175903434CCC8D206DCAE5) - */ -export const pnkAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x330bD769382cFc6d50175903434CCC8D206DCAE5) - */ -export const pnkAddress = { - 42161: "0x330bD769382cFc6d50175903434CCC8D206DCAE5", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x330bD769382cFc6d50175903434CCC8D206DCAE5) - */ -export const pnkConfig = { address: pnkAddress, abi: pnkAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PNKFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0000000000000000000000000000000000000000) - */ -export const pnkFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "amount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0000000000000000000000000000000000000000) - */ -export const pnkFaucetAddress = { - 42161: "0x0000000000000000000000000000000000000000", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0000000000000000000000000000000000000000) - */ -export const pnkFaucetConfig = { - address: pnkFaucetAddress, - abi: pnkFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Pinakion -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x330bD769382cFc6d50175903434CCC8D206DCAE5) - */ -export const pinakionAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x330bD769382cFc6d50175903434CCC8D206DCAE5) - */ -export const pinakionAddress = { - 42161: "0x330bD769382cFc6d50175903434CCC8D206DCAE5", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x330bD769382cFc6d50175903434CCC8D206DCAE5) - */ -export const pinakionConfig = { - address: pinakionAddress, - abi: pinakionAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x9d494768936b6bDaabc46733b8D53A937A6c6D7e) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) - */ -export const policyRegistryAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_courtName", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_policy", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "PolicyUpdate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "policies", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint256", type: "uint256" }, - { name: "_courtName", internalType: "string", type: "string" }, - { name: "_policy", internalType: "string", type: "string" }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x9d494768936b6bDaabc46733b8D53A937A6c6D7e) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) - */ -export const policyRegistryAddress = { - 100: "0x9d494768936b6bDaabc46733b8D53A937A6c6D7e", - 42161: "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", -} as const; - -/** - * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x9d494768936b6bDaabc46733b8D53A937A6c6D7e) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) - */ -export const policyRegistryConfig = { - address: policyRegistryAddress, - abi: policyRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28) - */ -export const policyRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_courtName", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_policy", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "PolicyUpdate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "policies", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint256", type: "uint256" }, - { name: "_courtName", internalType: "string", type: "string" }, - { name: "_policy", internalType: "string", type: "string" }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28) - */ -export const policyRegistryImplementationAddress = { - 42161: "0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xf7EE0Cd4E33C832DC05fB359896Add6E14E96C28) - */ -export const policyRegistryImplementationConfig = { - address: policyRegistryImplementationAddress, - abi: policyRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) - */ -export const policyRegistryProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) - */ -export const policyRegistryProxyAddress = { - 42161: "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) - */ -export const policyRegistryProxyConfig = { - address: policyRegistryProxyAddress, - abi: policyRegistryProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerOracle -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x5b8bB80f2d72D0C85caB8fB169e8170A05C94bAF) - */ -export const randomizerOracleAbi = [] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x5b8bB80f2d72D0C85caB8fB169e8170A05C94bAF) - */ -export const randomizerOracleAddress = { - 42161: "0x5b8bB80f2d72D0C85caB8fB169e8170A05C94bAF", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x5b8bB80f2d72D0C85caB8fB169e8170A05C94bAF) - */ -export const randomizerOracleConfig = { - address: randomizerOracleAddress, - abi: randomizerOracleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerRNG -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) - */ -export const randomizerRngAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "callbackGasLimit", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_randomizer", - internalType: "contract IRandomizer", - type: "address", - }, - { name: "_governor", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomizer", - outputs: [{ name: "", internalType: "contract IRandomizer", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_id", internalType: "uint256", type: "uint256" }, - { name: "_value", internalType: "bytes32", type: "bytes32" }, - ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "requester", internalType: "address", type: "address" }], - name: "requesterToID", - outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_callbackGasLimit", internalType: "uint256", type: "uint256" }], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_randomizer", internalType: "address", type: "address" }], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) - */ -export const randomizerRngAddress = { - 42161: "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) - */ -export const randomizerRngConfig = { - address: randomizerRngAddress, - abi: randomizerRngAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerRNG_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF1a7Cd3115F5852966430f8E3877D2221F074A2e) - */ -export const randomizerRngImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "callbackGasLimit", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_randomizer", - internalType: "contract IRandomizer", - type: "address", - }, - { name: "_governor", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomizer", - outputs: [{ name: "", internalType: "contract IRandomizer", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_id", internalType: "uint256", type: "uint256" }, - { name: "_value", internalType: "bytes32", type: "bytes32" }, - ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "requester", internalType: "address", type: "address" }], - name: "requesterToID", - outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_callbackGasLimit", internalType: "uint256", type: "uint256" }], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_randomizer", internalType: "address", type: "address" }], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF1a7Cd3115F5852966430f8E3877D2221F074A2e) - */ -export const randomizerRngImplementationAddress = { - 42161: "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF1a7Cd3115F5852966430f8E3877D2221F074A2e) - */ -export const randomizerRngImplementationConfig = { - address: randomizerRngImplementationAddress, - abi: randomizerRngImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerRNG_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) - */ -export const randomizerRngProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) - */ -export const randomizerRngProxyAddress = { - 42161: "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) - */ -export const randomizerRngProxyConfig = { - address: randomizerRngProxyAddress, - abi: randomizerRngProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) - */ -export const sortitionModuleAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNK", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNKWithdrawn", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeDelayed", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_relativeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, - ], - name: "StakeLocked", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amountAllCourts", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxStakePerJuror", internalType: "uint256", type: "uint256" }], - name: "changeMaxStakePerJuror", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxTotalStaked", internalType: "uint256", type: "uint256" }], - name: "changeMaxTotalStaked", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_minStakingTime", internalType: "uint256", type: "uint256" }], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "delayedStakeReadIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "delayedStakes", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "courtID", internalType: "uint96", type: "uint96" }, - { name: "stake", internalType: "uint256", type: "uint256" }, - { name: "alreadyTransferred", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorLeftoverPNK", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_minStakingTime", internalType: "uint256", type: "uint256" }, - { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - { name: "_maxStakePerJuror", internalType: "uint256", type: "uint256" }, - { name: "_maxTotalStaked", internalType: "uint256", type: "uint256" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastPhaseChange", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "jurorAccount", internalType: "address", type: "address" }, - { name: "courtId", internalType: "uint96", type: "uint96" }, - ], - name: "latestDelayedStakeIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "maxDrawingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "maxStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "maxTotalStaked", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "minStakingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", - outputs: [ - { name: "pnkBalance", internalType: "uint256", type: "uint256" }, - { name: "availablePenalty", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "phase", - outputs: [{ name: "", internalType: "enum ISortitionModule.Phase", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumber", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumberRequestBlock", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rng", - outputs: [{ name: "", internalType: "contract RNG", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rngLookahead", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "_pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_ID", internalType: "bytes32", type: "bytes32" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalStaked", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "validateStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) - */ -export const sortitionModuleAddress = { - 42161: "0x21A9402aDb818744B296e1d1BE58C804118DC03D", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) - */ -export const sortitionModuleConfig = { - address: sortitionModuleAddress, - abi: sortitionModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE) - */ -export const sortitionModuleImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNK", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNKWithdrawn", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeDelayed", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_relativeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, - ], - name: "StakeLocked", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amountAllCourts", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxStakePerJuror", internalType: "uint256", type: "uint256" }], - name: "changeMaxStakePerJuror", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxTotalStaked", internalType: "uint256", type: "uint256" }], - name: "changeMaxTotalStaked", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_minStakingTime", internalType: "uint256", type: "uint256" }], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "delayedStakeReadIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "delayedStakes", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "courtID", internalType: "uint96", type: "uint96" }, - { name: "stake", internalType: "uint256", type: "uint256" }, - { name: "alreadyTransferred", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorLeftoverPNK", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_minStakingTime", internalType: "uint256", type: "uint256" }, - { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - { name: "_maxStakePerJuror", internalType: "uint256", type: "uint256" }, - { name: "_maxTotalStaked", internalType: "uint256", type: "uint256" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastPhaseChange", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "jurorAccount", internalType: "address", type: "address" }, - { name: "courtId", internalType: "uint96", type: "uint96" }, - ], - name: "latestDelayedStakeIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "maxDrawingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "maxStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "maxTotalStaked", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "minStakingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", - outputs: [ - { name: "pnkBalance", internalType: "uint256", type: "uint256" }, - { name: "availablePenalty", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "phase", - outputs: [{ name: "", internalType: "enum ISortitionModule.Phase", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumber", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumberRequestBlock", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rng", - outputs: [{ name: "", internalType: "contract RNG", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rngLookahead", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "_pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_ID", internalType: "bytes32", type: "bytes32" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalStaked", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "validateStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE) - */ -export const sortitionModuleImplementationAddress = { - 42161: "0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3f6D0daeD166b64FCfBb9bc7c9E26423c6C08eEE) - */ -export const sortitionModuleImplementationConfig = { - address: sortitionModuleImplementationAddress, - abi: sortitionModuleImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) - */ -export const sortitionModuleProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) - */ -export const sortitionModuleProxyAddress = { - 42161: "0x21A9402aDb818744B296e1d1BE58C804118DC03D", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) - */ -export const sortitionModuleProxyConfig = { - address: sortitionModuleProxyAddress, - abi: sortitionModuleProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// TokenBridge -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0xf6A78083ca3e2a662D6dd1703c939c8aCE2e268d) - */ -export const tokenBridgeAbi = [ - { - constant: false, - payable: false, - type: "function", - inputs: [ - { name: "version", type: "uint256" }, - { name: "implementation", type: "address" }, - ], - name: "upgradeTo", - outputs: [], - stateMutability: "nonpayable", - }, - { - constant: true, - payable: false, - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", type: "uint256" }], - stateMutability: "view", - }, - { - constant: true, - payable: false, - type: "function", - inputs: [], - name: "implementation", - outputs: [{ name: "", type: "address" }], - stateMutability: "view", - }, - { - constant: true, - payable: false, - type: "function", - inputs: [], - name: "upgradeabilityOwner", - outputs: [{ name: "", type: "address" }], - stateMutability: "view", - }, - { - constant: false, - payable: true, - type: "function", - inputs: [ - { name: "version", type: "uint256" }, - { name: "implementation", type: "address" }, - { name: "data", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - constant: false, - payable: false, - type: "function", - inputs: [{ name: "newOwner", type: "address" }], - name: "transferProxyOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { payable: true, type: "fallback", stateMutability: "payable" }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "previousOwner", type: "address", indexed: false }, - { name: "newOwner", type: "address", indexed: false }, - ], - name: "ProxyOwnershipTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "version", type: "uint256", indexed: false }, - { name: "implementation", type: "address", indexed: true }, - ], - name: "Upgraded", - }, -] as const; - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0xf6A78083ca3e2a662D6dd1703c939c8aCE2e268d) - */ -export const tokenBridgeAddress = { - 100: "0xf6A78083ca3e2a662D6dd1703c939c8aCE2e268d", -} as const; - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0xf6A78083ca3e2a662D6dd1703c939c8aCE2e268d) - */ -export const tokenBridgeConfig = { - address: tokenBridgeAddress, - abi: tokenBridgeAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// TransactionBatcher -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x6426800F8508b15AED271337498fa5e7D0794d46) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF) - */ -export const transactionBatcherAbi = [ - { - type: "function", - inputs: [ - { name: "targets", internalType: "address[]", type: "address[]" }, - { name: "values", internalType: "uint256[]", type: "uint256[]" }, - { name: "datas", internalType: "bytes[]", type: "bytes[]" }, - ], - name: "batchSend", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "targets", internalType: "address[]", type: "address[]" }, - { name: "values", internalType: "uint256[]", type: "uint256[]" }, - { name: "datas", internalType: "bytes[]", type: "bytes[]" }, - ], - name: "batchSendUnchecked", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x6426800F8508b15AED271337498fa5e7D0794d46) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF) - */ -export const transactionBatcherAddress = { - 100: "0x6426800F8508b15AED271337498fa5e7D0794d46", - 42161: "0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF", -} as const; - -/** - * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x6426800F8508b15AED271337498fa5e7D0794d46) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF) - */ -export const transactionBatcherConfig = { - address: transactionBatcherAddress, - abi: transactionBatcherAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WETH -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x82aF49447D8a07e3bd95BD0d56f35241523fBab1) - */ -export const wethAbi = [ - { - type: "constructor", - inputs: [ - { name: "_logic", internalType: "address", type: "address" }, - { name: "admin_", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "payable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "previousAdmin", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "newAdmin", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "AdminChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "implementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { type: "fallback", stateMutability: "payable" }, - { - type: "function", - inputs: [], - name: "admin", - outputs: [{ name: "admin_", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newAdmin", internalType: "address", type: "address" }], - name: "changeAdmin", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "implementation", - outputs: [{ name: "implementation_", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newImplementation", internalType: "address", type: "address" }], - name: "upgradeTo", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x82aF49447D8a07e3bd95BD0d56f35241523fBab1) - */ -export const wethAddress = { - 100: "0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1", - 42161: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", -} as const; - -/** - * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x82aF49447D8a07e3bd95BD0d56f35241523fBab1) - */ -export const wethConfig = { address: wethAddress, abi: wethAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WrappedPinakion -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0xcb3231aBA3b451343e0Fddfc45883c842f223846) - */ -export const wrappedPinakionAbi = [ - { - type: "constructor", - inputs: [ - { name: "_logic", internalType: "address", type: "address" }, - { name: "_admin", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "payable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "previousAdmin", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "newAdmin", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "AdminChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "implementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { type: "fallback", stateMutability: "payable" }, - { - type: "function", - inputs: [], - name: "admin", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newAdmin", internalType: "address", type: "address" }], - name: "changeAdmin", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "implementation", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newImplementation", internalType: "address", type: "address" }], - name: "upgradeTo", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0xcb3231aBA3b451343e0Fddfc45883c842f223846) - */ -export const wrappedPinakionAddress = { - 100: "0xcb3231aBA3b451343e0Fddfc45883c842f223846", -} as const; - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0xcb3231aBA3b451343e0Fddfc45883c842f223846) - */ -export const wrappedPinakionConfig = { - address: wrappedPinakionAddress, - abi: wrappedPinakionAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// xKlerosLiquid -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x9C1dA9A04925bDfDedf0f6421bC7EEa8305F9002) - */ -export const xKlerosLiquidAbi = [ - { - type: "constructor", - inputs: [ - { name: "_logic", internalType: "address", type: "address" }, - { name: "_admin", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "payable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "previousAdmin", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "newAdmin", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "AdminChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "implementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { type: "fallback", stateMutability: "payable" }, - { - type: "function", - inputs: [], - name: "admin", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newAdmin", internalType: "address", type: "address" }], - name: "changeAdmin", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "implementation", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newImplementation", internalType: "address", type: "address" }], - name: "upgradeTo", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x9C1dA9A04925bDfDedf0f6421bC7EEa8305F9002) - */ -export const xKlerosLiquidAddress = { - 100: "0x9C1dA9A04925bDfDedf0f6421bC7EEa8305F9002", -} as const; - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x9C1dA9A04925bDfDedf0f6421bC7EEa8305F9002) - */ -export const xKlerosLiquidConfig = { - address: xKlerosLiquidAddress, - abi: xKlerosLiquidAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// xPNK -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3) - */ -export const xPnkAbi = [] as const; - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3) - */ -export const xPnkAddress = { - 100: "0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3", -} as const; - -/** - * [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3) - */ -export const xPnkConfig = { address: xPnkAddress, abi: xPnkAbi } as const; diff --git a/contracts/deployments/mainnet/.chainId b/contracts/deployments/mainnet/.chainId deleted file mode 100644 index d00491fd7..000000000 --- a/contracts/deployments/mainnet/.chainId +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/contracts/deployments/sepolia/.chainId b/contracts/deployments/sepolia/.chainId deleted file mode 100644 index bd8d1cd44..000000000 --- a/contracts/deployments/sepolia/.chainId +++ /dev/null @@ -1 +0,0 @@ -11155111 \ No newline at end of file diff --git a/contracts/deployments/sepolia/PinakionV2.json b/contracts/deployments/sepolia/PinakionV2.json deleted file mode 100644 index ce9e361f7..000000000 --- a/contracts/deployments/sepolia/PinakionV2.json +++ /dev/null @@ -1,605 +0,0 @@ -{ - "address": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - } - ], - "name": "recoverTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xc14f8d7b4ea34d9ecef6b9ca621b2fe60a6a23f5d25d1646b2f7470e212c9f9b", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "transactionIndex": 74, - "gasUsed": "1020268", - "logsBloom": "0x00000020000000000000000000000000000000000040000006800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000002000000000000000000000000000000000000000000000080000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x521251c8f56abab468b5c730c8dee5113536bc6ab051ce4201960f84b2cb130b", - "transactionHash": "0xc14f8d7b4ea34d9ecef6b9ca621b2fe60a6a23f5d25d1646b2f7470e212c9f9b", - "logs": [ - { - "transactionIndex": 74, - "blockNumber": 4880097, - "transactionHash": "0xc14f8d7b4ea34d9ecef6b9ca621b2fe60a6a23f5d25d1646b2f7470e212c9f9b", - "address": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "data": "0x", - "logIndex": 95, - "blockHash": "0x521251c8f56abab468b5c730c8dee5113536bc6ab051ce4201960f84b2cb130b" - }, - { - "transactionIndex": 74, - "blockNumber": 4880097, - "transactionHash": "0xc14f8d7b4ea34d9ecef6b9ca621b2fe60a6a23f5d25d1646b2f7470e212c9f9b", - "address": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "data": "0x0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000", - "logIndex": 96, - "blockHash": "0x521251c8f56abab468b5c730c8dee5113536bc6ab051ce4201960f84b2cb130b" - } - ], - "blockNumber": 4880097, - "cumulativeGasUsed": "10131785", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "efecbc06b185b229926f80f198f0ff7d", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"recoverTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"custom:security-contact\":\"contact@kleros.io\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\"},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"recoverTokens(address)\":{\"params\":{\"_token\":\"The address of the token contract that you want to recover, or set to 0 in case you want to extract ether.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"recoverTokens(address)\":{\"notice\":\"Recover tokens sent mistakenly to this contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/PinakionV2.sol\":\"PinakionV2\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x37a19df56a98cd466fb6e70b8c56e13bfc439221bfabd8c5108d36d0e3ffc0e5\",\"license\":\"MIT\"},\"src/token/PinakionV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../libraries/SafeERC20.sol\\\";\\n\\n/// @custom:security-contact contact@kleros.io\\ncontract PinakionV2 is ERC20, ERC20Burnable, Ownable {\\n using SafeERC20 for IERC20;\\n\\n constructor() ERC20(\\\"PinakionV2\\\", \\\"PNK\\\") {\\n _mint(msg.sender, 1000000000 * 10 ** decimals());\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n _mint(to, amount);\\n }\\n\\n /// @notice Recover tokens sent mistakenly to this contract.\\n /// @param _token The address of the token contract that you want to recover, or set to 0 in case you want to extract ether.\\n function recoverTokens(address _token) public onlyOwner {\\n if (_token == address(0)) {\\n require(payable(owner()).send(address(this).balance), \\\"Transfer failed\\\");\\n return;\\n }\\n\\n IERC20 token = IERC20(_token);\\n uint balance = token.balanceOf(address(this));\\n require(token.safeTransfer(payable(owner()), balance), \\\"Token transfer failed\\\");\\n }\\n}\\n\",\"keccak256\":\"0x842a8e750d437381116c5619e89930c41053570a5361286a63f109ec92bc44f0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040518060400160405280600a8152602001692834b730b5b4b7b72b1960b11b81525060405180604001604052806003815260200162504e4b60e81b815250816003908162000062919062000282565b50600462000071828262000282565b5050506200008e62000088620000bd60201b60201c565b620000c1565b620000b733620000a16012600a62000463565b620000b190633b9aca006200047b565b62000113565b620004ab565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166200016e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b806002600082825462000182919062000495565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200020957607f821691505b6020821081036200022a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001d957600081815260208120601f850160051c81016020861015620002595750805b601f850160051c820191505b818110156200027a5782815560010162000265565b505050505050565b81516001600160401b038111156200029e576200029e620001de565b620002b681620002af8454620001f4565b8462000230565b602080601f831160018114620002ee5760008415620002d55750858301515b600019600386901b1c1916600185901b1785556200027a565b600085815260208120601f198616915b828110156200031f57888601518255948401946001909101908401620002fe565b50858210156200033e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620003a55781600019048211156200038957620003896200034e565b808516156200039757918102915b93841c939080029062000369565b509250929050565b600082620003be575060016200045d565b81620003cd575060006200045d565b8160018114620003e65760028114620003f15762000411565b60019150506200045d565b60ff8411156200040557620004056200034e565b50506001821b6200045d565b5060208310610133831016604e8410600b841016171562000436575081810a6200045d565b62000442838362000364565b80600019048211156200045957620004596200034e565b0290505b92915050565b60006200047460ff841683620003ad565b9392505050565b80820281158282048414176200045d576200045d6200034e565b808201808211156200045d576200045d6200034e565b610f1280620004bb6000396000f3fe608060405234801561001057600080fd5b50600436106100f65760003560e01c806370a082311161009257806370a08231146101be578063715018a6146101e757806379cc6790146101ef5780638da5cb5b1461020257806395d89b411461021d578063a457c2d714610225578063a9059cbb14610238578063dd62ed3e1461024b578063f2fde38b1461025e57600080fd5b806306fdde03146100fb578063095ea7b31461011957806316114acd1461013c57806318160ddd1461015157806323b872dd14610163578063313ce56714610176578063395093511461018557806340c10f191461019857806342966c68146101ab575b600080fd5b610103610271565b6040516101109190610ce7565b60405180910390f35b61012c610127366004610d36565b610303565b6040519015158152602001610110565b61014f61014a366004610d60565b61031d565b005b6002545b604051908152602001610110565b61012c610171366004610d82565b61047f565b60405160128152602001610110565b61012c610193366004610d36565b6104a3565b61014f6101a6366004610d36565b6104c5565b61014f6101b9366004610dbe565b6104db565b6101556101cc366004610d60565b6001600160a01b031660009081526020819052604090205490565b61014f6104e5565b61014f6101fd366004610d36565b6104f9565b6005546040516001600160a01b039091168152602001610110565b61010361050e565b61012c610233366004610d36565b61051d565b61012c610246366004610d36565b610598565b610155610259366004610dd7565b6105a6565b61014f61026c366004610d60565b6105d1565b60606003805461028090610e0a565b80601f01602080910402602001604051908101604052809291908181526020018280546102ac90610e0a565b80156102f95780601f106102ce576101008083540402835291602001916102f9565b820191906000526020600020905b8154815290600101906020018083116102dc57829003601f168201915b5050505050905090565b600033610311818585610647565b60019150505b92915050565b61032561076b565b6001600160a01b0381166103a1576005546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505061039e5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064015b60405180910390fd5b50565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156103ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040e9190610e44565b90506104366104256005546001600160a01b031690565b6001600160a01b03841690836107c5565b61047a5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610395565b505050565b60003361048d858285610898565b610498858585610912565b506001949350505050565b6000336103118185856104b683836105a6565b6104c09190610e5d565b610647565b6104cd61076b565b6104d78282610aa4565b5050565b61039e3382610b51565b6104ed61076b565b6104f76000610c71565b565b610504823383610898565b6104d78282610b51565b60606004805461028090610e0a565b6000338161052b82866105a6565b90508381101561058b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610395565b6104988286868403610647565b600033610311818585610912565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6105d961076b565b6001600160a01b03811661063e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610395565b61039e81610c71565b6001600160a01b0383166106a95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610395565b6001600160a01b03821661070a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610395565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b031633146104f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610395565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516108229190610e7e565b6000604051808303816000865af19150503d806000811461085f576040519150601f19603f3d011682016040523d82523d6000602084013e610864565b606091505b509150915081801561088e57508051158061088e57508080602001905181019061088e9190610e9a565b9695505050505050565b60006108a484846105a6565b9050600019811461090c57818110156108ff5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610395565b61090c8484848403610647565b50505050565b6001600160a01b0383166109765760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610395565b6001600160a01b0382166109d85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610395565b6001600160a01b03831660009081526020819052604090205481811015610a505760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610395565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020610ebd833981519152910160405180910390a361090c565b6001600160a01b038216610afa5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610395565b8060026000828254610b0c9190610e5d565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020610ebd833981519152910160405180910390a35050565b6001600160a01b038216610bb15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610395565b6001600160a01b03821660009081526020819052604090205481811015610c255760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610395565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020610ebd833981519152910160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005b83811015610cde578181015183820152602001610cc6565b50506000910152565b6020815260008251806020840152610d06816040850160208701610cc3565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610d3157600080fd5b919050565b60008060408385031215610d4957600080fd5b610d5283610d1a565b946020939093013593505050565b600060208284031215610d7257600080fd5b610d7b82610d1a565b9392505050565b600080600060608486031215610d9757600080fd5b610da084610d1a565b9250610dae60208501610d1a565b9150604084013590509250925092565b600060208284031215610dd057600080fd5b5035919050565b60008060408385031215610dea57600080fd5b610df383610d1a565b9150610e0160208401610d1a565b90509250929050565b600181811c90821680610e1e57607f821691505b602082108103610e3e57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215610e5657600080fd5b5051919050565b8082018082111561031757634e487b7160e01b600052601160045260246000fd5b60008251610e90818460208701610cc3565b9190910192915050565b600060208284031215610eac57600080fd5b81518015158114610d7b57600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220b9413b3e295ea54466427cb3885d953a088c004783f196ffc402f8c96242d9e764736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f65760003560e01c806370a082311161009257806370a08231146101be578063715018a6146101e757806379cc6790146101ef5780638da5cb5b1461020257806395d89b411461021d578063a457c2d714610225578063a9059cbb14610238578063dd62ed3e1461024b578063f2fde38b1461025e57600080fd5b806306fdde03146100fb578063095ea7b31461011957806316114acd1461013c57806318160ddd1461015157806323b872dd14610163578063313ce56714610176578063395093511461018557806340c10f191461019857806342966c68146101ab575b600080fd5b610103610271565b6040516101109190610ce7565b60405180910390f35b61012c610127366004610d36565b610303565b6040519015158152602001610110565b61014f61014a366004610d60565b61031d565b005b6002545b604051908152602001610110565b61012c610171366004610d82565b61047f565b60405160128152602001610110565b61012c610193366004610d36565b6104a3565b61014f6101a6366004610d36565b6104c5565b61014f6101b9366004610dbe565b6104db565b6101556101cc366004610d60565b6001600160a01b031660009081526020819052604090205490565b61014f6104e5565b61014f6101fd366004610d36565b6104f9565b6005546040516001600160a01b039091168152602001610110565b61010361050e565b61012c610233366004610d36565b61051d565b61012c610246366004610d36565b610598565b610155610259366004610dd7565b6105a6565b61014f61026c366004610d60565b6105d1565b60606003805461028090610e0a565b80601f01602080910402602001604051908101604052809291908181526020018280546102ac90610e0a565b80156102f95780601f106102ce576101008083540402835291602001916102f9565b820191906000526020600020905b8154815290600101906020018083116102dc57829003601f168201915b5050505050905090565b600033610311818585610647565b60019150505b92915050565b61032561076b565b6001600160a01b0381166103a1576005546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505061039e5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064015b60405180910390fd5b50565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156103ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040e9190610e44565b90506104366104256005546001600160a01b031690565b6001600160a01b03841690836107c5565b61047a5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610395565b505050565b60003361048d858285610898565b610498858585610912565b506001949350505050565b6000336103118185856104b683836105a6565b6104c09190610e5d565b610647565b6104cd61076b565b6104d78282610aa4565b5050565b61039e3382610b51565b6104ed61076b565b6104f76000610c71565b565b610504823383610898565b6104d78282610b51565b60606004805461028090610e0a565b6000338161052b82866105a6565b90508381101561058b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610395565b6104988286868403610647565b600033610311818585610912565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6105d961076b565b6001600160a01b03811661063e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610395565b61039e81610c71565b6001600160a01b0383166106a95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610395565b6001600160a01b03821661070a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610395565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b031633146104f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610395565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516108229190610e7e565b6000604051808303816000865af19150503d806000811461085f576040519150601f19603f3d011682016040523d82523d6000602084013e610864565b606091505b509150915081801561088e57508051158061088e57508080602001905181019061088e9190610e9a565b9695505050505050565b60006108a484846105a6565b9050600019811461090c57818110156108ff5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610395565b61090c8484848403610647565b50505050565b6001600160a01b0383166109765760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610395565b6001600160a01b0382166109d85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610395565b6001600160a01b03831660009081526020819052604090205481811015610a505760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610395565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020610ebd833981519152910160405180910390a361090c565b6001600160a01b038216610afa5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610395565b8060026000828254610b0c9190610e5d565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020610ebd833981519152910160405180910390a35050565b6001600160a01b038216610bb15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610395565b6001600160a01b03821660009081526020819052604090205481811015610c255760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610395565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020610ebd833981519152910160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005b83811015610cde578181015183820152602001610cc6565b50506000910152565b6020815260008251806020840152610d06816040850160208701610cc3565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610d3157600080fd5b919050565b60008060408385031215610d4957600080fd5b610d5283610d1a565b946020939093013593505050565b600060208284031215610d7257600080fd5b610d7b82610d1a565b9392505050565b600080600060608486031215610d9757600080fd5b610da084610d1a565b9250610dae60208501610d1a565b9150604084013590509250925092565b600060208284031215610dd057600080fd5b5035919050565b60008060408385031215610dea57600080fd5b610df383610d1a565b9150610e0160208401610d1a565b90509250929050565b600181811c90821680610e1e57607f821691505b602082108103610e3e57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215610e5657600080fd5b5051919050565b8082018082111561031757634e487b7160e01b600052601160045260246000fd5b60008251610e90818460208701610cc3565b9190910192915050565b600060208284031215610eac57600080fd5b81518015158114610d7b57600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220b9413b3e295ea54466427cb3885d953a088c004783f196ffc402f8c96242d9e764736f6c63430008120033", - "devdoc": { - "custom:security-contact": "contact@kleros.io", - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "burn(uint256)": { - "details": "Destroys `amount` tokens from the caller. See {ERC20-_burn}." - }, - "burnFrom(address,uint256)": { - "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "recoverTokens(address)": { - "params": { - "_token": "The address of the token contract that you want to recover, or set to 0 in case you want to extract ether." - } - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "recoverTokens(address)": { - "notice": "Recover tokens sent mistakenly to this contract." - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 393, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 399, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 401, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 403, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 405, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - }, - { - "astId": 103, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_owner", - "offset": 0, - "slot": "5", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/sepoliaDevnet/.chainId b/contracts/deployments/sepoliaDevnet/.chainId deleted file mode 100644 index bd8d1cd44..000000000 --- a/contracts/deployments/sepoliaDevnet/.chainId +++ /dev/null @@ -1 +0,0 @@ -11155111 \ No newline at end of file diff --git a/contracts/deployments/sepoliaDevnet/PinakionV2.json b/contracts/deployments/sepoliaDevnet/PinakionV2.json deleted file mode 100644 index ce9e361f7..000000000 --- a/contracts/deployments/sepoliaDevnet/PinakionV2.json +++ /dev/null @@ -1,605 +0,0 @@ -{ - "address": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - } - ], - "name": "recoverTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xc14f8d7b4ea34d9ecef6b9ca621b2fe60a6a23f5d25d1646b2f7470e212c9f9b", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "transactionIndex": 74, - "gasUsed": "1020268", - "logsBloom": "0x00000020000000000000000000000000000000000040000006800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000002000000000000000000000000000000000000000000000080000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x521251c8f56abab468b5c730c8dee5113536bc6ab051ce4201960f84b2cb130b", - "transactionHash": "0xc14f8d7b4ea34d9ecef6b9ca621b2fe60a6a23f5d25d1646b2f7470e212c9f9b", - "logs": [ - { - "transactionIndex": 74, - "blockNumber": 4880097, - "transactionHash": "0xc14f8d7b4ea34d9ecef6b9ca621b2fe60a6a23f5d25d1646b2f7470e212c9f9b", - "address": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "data": "0x", - "logIndex": 95, - "blockHash": "0x521251c8f56abab468b5c730c8dee5113536bc6ab051ce4201960f84b2cb130b" - }, - { - "transactionIndex": 74, - "blockNumber": 4880097, - "transactionHash": "0xc14f8d7b4ea34d9ecef6b9ca621b2fe60a6a23f5d25d1646b2f7470e212c9f9b", - "address": "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "data": "0x0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000", - "logIndex": 96, - "blockHash": "0x521251c8f56abab468b5c730c8dee5113536bc6ab051ce4201960f84b2cb130b" - } - ], - "blockNumber": 4880097, - "cumulativeGasUsed": "10131785", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "efecbc06b185b229926f80f198f0ff7d", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"recoverTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"custom:security-contact\":\"contact@kleros.io\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\"},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"recoverTokens(address)\":{\"params\":{\"_token\":\"The address of the token contract that you want to recover, or set to 0 in case you want to extract ether.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"recoverTokens(address)\":{\"notice\":\"Recover tokens sent mistakenly to this contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/token/PinakionV2.sol\":\"PinakionV2\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x37a19df56a98cd466fb6e70b8c56e13bfc439221bfabd8c5108d36d0e3ffc0e5\",\"license\":\"MIT\"},\"src/token/PinakionV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../libraries/SafeERC20.sol\\\";\\n\\n/// @custom:security-contact contact@kleros.io\\ncontract PinakionV2 is ERC20, ERC20Burnable, Ownable {\\n using SafeERC20 for IERC20;\\n\\n constructor() ERC20(\\\"PinakionV2\\\", \\\"PNK\\\") {\\n _mint(msg.sender, 1000000000 * 10 ** decimals());\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n _mint(to, amount);\\n }\\n\\n /// @notice Recover tokens sent mistakenly to this contract.\\n /// @param _token The address of the token contract that you want to recover, or set to 0 in case you want to extract ether.\\n function recoverTokens(address _token) public onlyOwner {\\n if (_token == address(0)) {\\n require(payable(owner()).send(address(this).balance), \\\"Transfer failed\\\");\\n return;\\n }\\n\\n IERC20 token = IERC20(_token);\\n uint balance = token.balanceOf(address(this));\\n require(token.safeTransfer(payable(owner()), balance), \\\"Token transfer failed\\\");\\n }\\n}\\n\",\"keccak256\":\"0x842a8e750d437381116c5619e89930c41053570a5361286a63f109ec92bc44f0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040518060400160405280600a8152602001692834b730b5b4b7b72b1960b11b81525060405180604001604052806003815260200162504e4b60e81b815250816003908162000062919062000282565b50600462000071828262000282565b5050506200008e62000088620000bd60201b60201c565b620000c1565b620000b733620000a16012600a62000463565b620000b190633b9aca006200047b565b62000113565b620004ab565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166200016e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b806002600082825462000182919062000495565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200020957607f821691505b6020821081036200022a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001d957600081815260208120601f850160051c81016020861015620002595750805b601f850160051c820191505b818110156200027a5782815560010162000265565b505050505050565b81516001600160401b038111156200029e576200029e620001de565b620002b681620002af8454620001f4565b8462000230565b602080601f831160018114620002ee5760008415620002d55750858301515b600019600386901b1c1916600185901b1785556200027a565b600085815260208120601f198616915b828110156200031f57888601518255948401946001909101908401620002fe565b50858210156200033e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620003a55781600019048211156200038957620003896200034e565b808516156200039757918102915b93841c939080029062000369565b509250929050565b600082620003be575060016200045d565b81620003cd575060006200045d565b8160018114620003e65760028114620003f15762000411565b60019150506200045d565b60ff8411156200040557620004056200034e565b50506001821b6200045d565b5060208310610133831016604e8410600b841016171562000436575081810a6200045d565b62000442838362000364565b80600019048211156200045957620004596200034e565b0290505b92915050565b60006200047460ff841683620003ad565b9392505050565b80820281158282048414176200045d576200045d6200034e565b808201808211156200045d576200045d6200034e565b610f1280620004bb6000396000f3fe608060405234801561001057600080fd5b50600436106100f65760003560e01c806370a082311161009257806370a08231146101be578063715018a6146101e757806379cc6790146101ef5780638da5cb5b1461020257806395d89b411461021d578063a457c2d714610225578063a9059cbb14610238578063dd62ed3e1461024b578063f2fde38b1461025e57600080fd5b806306fdde03146100fb578063095ea7b31461011957806316114acd1461013c57806318160ddd1461015157806323b872dd14610163578063313ce56714610176578063395093511461018557806340c10f191461019857806342966c68146101ab575b600080fd5b610103610271565b6040516101109190610ce7565b60405180910390f35b61012c610127366004610d36565b610303565b6040519015158152602001610110565b61014f61014a366004610d60565b61031d565b005b6002545b604051908152602001610110565b61012c610171366004610d82565b61047f565b60405160128152602001610110565b61012c610193366004610d36565b6104a3565b61014f6101a6366004610d36565b6104c5565b61014f6101b9366004610dbe565b6104db565b6101556101cc366004610d60565b6001600160a01b031660009081526020819052604090205490565b61014f6104e5565b61014f6101fd366004610d36565b6104f9565b6005546040516001600160a01b039091168152602001610110565b61010361050e565b61012c610233366004610d36565b61051d565b61012c610246366004610d36565b610598565b610155610259366004610dd7565b6105a6565b61014f61026c366004610d60565b6105d1565b60606003805461028090610e0a565b80601f01602080910402602001604051908101604052809291908181526020018280546102ac90610e0a565b80156102f95780601f106102ce576101008083540402835291602001916102f9565b820191906000526020600020905b8154815290600101906020018083116102dc57829003601f168201915b5050505050905090565b600033610311818585610647565b60019150505b92915050565b61032561076b565b6001600160a01b0381166103a1576005546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505061039e5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064015b60405180910390fd5b50565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156103ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040e9190610e44565b90506104366104256005546001600160a01b031690565b6001600160a01b03841690836107c5565b61047a5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610395565b505050565b60003361048d858285610898565b610498858585610912565b506001949350505050565b6000336103118185856104b683836105a6565b6104c09190610e5d565b610647565b6104cd61076b565b6104d78282610aa4565b5050565b61039e3382610b51565b6104ed61076b565b6104f76000610c71565b565b610504823383610898565b6104d78282610b51565b60606004805461028090610e0a565b6000338161052b82866105a6565b90508381101561058b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610395565b6104988286868403610647565b600033610311818585610912565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6105d961076b565b6001600160a01b03811661063e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610395565b61039e81610c71565b6001600160a01b0383166106a95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610395565b6001600160a01b03821661070a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610395565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b031633146104f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610395565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516108229190610e7e565b6000604051808303816000865af19150503d806000811461085f576040519150601f19603f3d011682016040523d82523d6000602084013e610864565b606091505b509150915081801561088e57508051158061088e57508080602001905181019061088e9190610e9a565b9695505050505050565b60006108a484846105a6565b9050600019811461090c57818110156108ff5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610395565b61090c8484848403610647565b50505050565b6001600160a01b0383166109765760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610395565b6001600160a01b0382166109d85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610395565b6001600160a01b03831660009081526020819052604090205481811015610a505760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610395565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020610ebd833981519152910160405180910390a361090c565b6001600160a01b038216610afa5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610395565b8060026000828254610b0c9190610e5d565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020610ebd833981519152910160405180910390a35050565b6001600160a01b038216610bb15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610395565b6001600160a01b03821660009081526020819052604090205481811015610c255760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610395565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020610ebd833981519152910160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005b83811015610cde578181015183820152602001610cc6565b50506000910152565b6020815260008251806020840152610d06816040850160208701610cc3565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610d3157600080fd5b919050565b60008060408385031215610d4957600080fd5b610d5283610d1a565b946020939093013593505050565b600060208284031215610d7257600080fd5b610d7b82610d1a565b9392505050565b600080600060608486031215610d9757600080fd5b610da084610d1a565b9250610dae60208501610d1a565b9150604084013590509250925092565b600060208284031215610dd057600080fd5b5035919050565b60008060408385031215610dea57600080fd5b610df383610d1a565b9150610e0160208401610d1a565b90509250929050565b600181811c90821680610e1e57607f821691505b602082108103610e3e57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215610e5657600080fd5b5051919050565b8082018082111561031757634e487b7160e01b600052601160045260246000fd5b60008251610e90818460208701610cc3565b9190910192915050565b600060208284031215610eac57600080fd5b81518015158114610d7b57600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220b9413b3e295ea54466427cb3885d953a088c004783f196ffc402f8c96242d9e764736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f65760003560e01c806370a082311161009257806370a08231146101be578063715018a6146101e757806379cc6790146101ef5780638da5cb5b1461020257806395d89b411461021d578063a457c2d714610225578063a9059cbb14610238578063dd62ed3e1461024b578063f2fde38b1461025e57600080fd5b806306fdde03146100fb578063095ea7b31461011957806316114acd1461013c57806318160ddd1461015157806323b872dd14610163578063313ce56714610176578063395093511461018557806340c10f191461019857806342966c68146101ab575b600080fd5b610103610271565b6040516101109190610ce7565b60405180910390f35b61012c610127366004610d36565b610303565b6040519015158152602001610110565b61014f61014a366004610d60565b61031d565b005b6002545b604051908152602001610110565b61012c610171366004610d82565b61047f565b60405160128152602001610110565b61012c610193366004610d36565b6104a3565b61014f6101a6366004610d36565b6104c5565b61014f6101b9366004610dbe565b6104db565b6101556101cc366004610d60565b6001600160a01b031660009081526020819052604090205490565b61014f6104e5565b61014f6101fd366004610d36565b6104f9565b6005546040516001600160a01b039091168152602001610110565b61010361050e565b61012c610233366004610d36565b61051d565b61012c610246366004610d36565b610598565b610155610259366004610dd7565b6105a6565b61014f61026c366004610d60565b6105d1565b60606003805461028090610e0a565b80601f01602080910402602001604051908101604052809291908181526020018280546102ac90610e0a565b80156102f95780601f106102ce576101008083540402835291602001916102f9565b820191906000526020600020905b8154815290600101906020018083116102dc57829003601f168201915b5050505050905090565b600033610311818585610647565b60019150505b92915050565b61032561076b565b6001600160a01b0381166103a1576005546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505061039e5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064015b60405180910390fd5b50565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156103ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040e9190610e44565b90506104366104256005546001600160a01b031690565b6001600160a01b03841690836107c5565b61047a5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610395565b505050565b60003361048d858285610898565b610498858585610912565b506001949350505050565b6000336103118185856104b683836105a6565b6104c09190610e5d565b610647565b6104cd61076b565b6104d78282610aa4565b5050565b61039e3382610b51565b6104ed61076b565b6104f76000610c71565b565b610504823383610898565b6104d78282610b51565b60606004805461028090610e0a565b6000338161052b82866105a6565b90508381101561058b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610395565b6104988286868403610647565b600033610311818585610912565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6105d961076b565b6001600160a01b03811661063e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610395565b61039e81610c71565b6001600160a01b0383166106a95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610395565b6001600160a01b03821661070a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610395565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b031633146104f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610395565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516108229190610e7e565b6000604051808303816000865af19150503d806000811461085f576040519150601f19603f3d011682016040523d82523d6000602084013e610864565b606091505b509150915081801561088e57508051158061088e57508080602001905181019061088e9190610e9a565b9695505050505050565b60006108a484846105a6565b9050600019811461090c57818110156108ff5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610395565b61090c8484848403610647565b50505050565b6001600160a01b0383166109765760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610395565b6001600160a01b0382166109d85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610395565b6001600160a01b03831660009081526020819052604090205481811015610a505760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610395565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020610ebd833981519152910160405180910390a361090c565b6001600160a01b038216610afa5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610395565b8060026000828254610b0c9190610e5d565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020610ebd833981519152910160405180910390a35050565b6001600160a01b038216610bb15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610395565b6001600160a01b03821660009081526020819052604090205481811015610c255760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610395565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020610ebd833981519152910160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005b83811015610cde578181015183820152602001610cc6565b50506000910152565b6020815260008251806020840152610d06816040850160208701610cc3565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610d3157600080fd5b919050565b60008060408385031215610d4957600080fd5b610d5283610d1a565b946020939093013593505050565b600060208284031215610d7257600080fd5b610d7b82610d1a565b9392505050565b600080600060608486031215610d9757600080fd5b610da084610d1a565b9250610dae60208501610d1a565b9150604084013590509250925092565b600060208284031215610dd057600080fd5b5035919050565b60008060408385031215610dea57600080fd5b610df383610d1a565b9150610e0160208401610d1a565b90509250929050565b600181811c90821680610e1e57607f821691505b602082108103610e3e57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215610e5657600080fd5b5051919050565b8082018082111561031757634e487b7160e01b600052601160045260246000fd5b60008251610e90818460208701610cc3565b9190910192915050565b600060208284031215610eac57600080fd5b81518015158114610d7b57600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220b9413b3e295ea54466427cb3885d953a088c004783f196ffc402f8c96242d9e764736f6c63430008120033", - "devdoc": { - "custom:security-contact": "contact@kleros.io", - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "burn(uint256)": { - "details": "Destroys `amount` tokens from the caller. See {ERC20-_burn}." - }, - "burnFrom(address,uint256)": { - "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "recoverTokens(address)": { - "params": { - "_token": "The address of the token contract that you want to recover, or set to 0 in case you want to extract ether." - } - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "recoverTokens(address)": { - "notice": "Recover tokens sent mistakenly to this contract." - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 393, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 399, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 401, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 403, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 405, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - }, - { - "astId": 103, - "contract": "src/token/PinakionV2.sol:PinakionV2", - "label": "_owner", - "offset": 0, - "slot": "5", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/testnet.viem.ts b/contracts/deployments/testnet.viem.ts deleted file mode 100644 index 629e3a48b..000000000 --- a/contracts/deployments/testnet.viem.ts +++ /dev/null @@ -1,15289 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ArbitrableExample -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x438ca5337AE771dF926B7f4fDE1A21D72a315bDC) - */ -export const arbitrableExampleAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - { name: "_weth", internalType: "contract IERC20", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_action", - internalType: "string", - type: "string", - indexed: true, - }, - ], - name: "Action", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitrableDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "arbitratorExtraData", - outputs: [{ name: "", internalType: "bytes", type: "bytes" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }], - name: "changeArbitratorExtraData", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - ], - name: "changeDisputeTemplate", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_action", internalType: "string", type: "string" }, - { name: "_feeInWeth", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_action", internalType: "string", type: "string" }], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "externalIDtoLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templateId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "weth", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x438ca5337AE771dF926B7f4fDE1A21D72a315bDC) - */ -export const arbitrableExampleAddress = { - 10200: "0x438ca5337AE771dF926B7f4fDE1A21D72a315bDC", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x438ca5337AE771dF926B7f4fDE1A21D72a315bDC) - */ -export const arbitrableExampleConfig = { - address: arbitrableExampleAddress, - abi: arbitrableExampleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// BlockHashRNG -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754) - */ -export const blockHashRngAbi = [ - { - type: "function", - inputs: [{ name: "block", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_block", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_block", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754) - */ -export const blockHashRngAddress = { - 421614: "0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754) - */ -export const blockHashRngConfig = { - address: blockHashRngAddress, - abi: blockHashRngAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ChainlinkRNG -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79) - */ -export const chainlinkRngAbi = [ - { - type: "constructor", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_sortitionModule", internalType: "address", type: "address" }, - { name: "_vrfCoordinator", internalType: "address", type: "address" }, - { name: "_keyHash", internalType: "bytes32", type: "bytes32" }, - { name: "_subscriptionId", internalType: "uint256", type: "uint256" }, - { name: "_requestConfirmations", internalType: "uint16", type: "uint16" }, - { name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }, - ], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "address", type: "address" }, - { name: "want", internalType: "address", type: "address" }, - ], - name: "OnlyCoordinatorCanFulfill", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "address", type: "address" }, - { name: "owner", internalType: "address", type: "address" }, - { name: "coordinator", internalType: "address", type: "address" }, - ], - name: "OnlyOwnerOrCoordinator", - }, - { type: "error", inputs: [], name: "ZeroAddress" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "vrfCoordinator", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "CoordinatorSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "randomWord", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "RequestFulfilled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "RequestSent", - }, - { - type: "function", - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "callbackGasLimit", - outputs: [{ name: "", internalType: "uint32", type: "uint32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }], - name: "changeCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_keyHash", internalType: "bytes32", type: "bytes32" }], - name: "changeKeyHash", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_requestConfirmations", internalType: "uint16", type: "uint16" }], - name: "changeRequestConfirmations", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_sortitionModule", internalType: "address", type: "address" }], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_subscriptionId", internalType: "uint256", type: "uint256" }], - name: "changeSubscriptionId", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], - name: "changeVrfCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "keyHash", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastRequestId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "requestId", internalType: "uint256", type: "uint256" }, - { name: "randomWords", internalType: "uint256[]", type: "uint256[]" }, - ], - name: "rawFulfillRandomWords", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "requestConfirmations", - outputs: [{ name: "", internalType: "uint16", type: "uint16" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "s_vrfCoordinator", - outputs: [ - { - name: "", - internalType: "contract IVRFCoordinatorV2Plus", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], - name: "setCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "subscriptionId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79) - */ -export const chainlinkRngAddress = { - 421614: "0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79) - */ -export const chainlinkRngConfig = { - address: chainlinkRngAddress, - abi: chainlinkRngAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ChainlinkVRFCoordinator -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) - */ -export const chainlinkVrfCoordinatorAbi = [ - { - type: "constructor", - inputs: [{ name: "blockhashStore", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [ - { name: "internalBalance", internalType: "uint256", type: "uint256" }, - { name: "externalBalance", internalType: "uint256", type: "uint256" }, - ], - name: "BalanceInvariantViolated", - }, - { - type: "error", - inputs: [{ name: "blockNum", internalType: "uint256", type: "uint256" }], - name: "BlockhashNotInStore", - }, - { - type: "error", - inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], - name: "CoordinatorAlreadyRegistered", - }, - { - type: "error", - inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], - name: "CoordinatorNotRegistered", - }, - { type: "error", inputs: [], name: "FailedToSendNative" }, - { type: "error", inputs: [], name: "FailedToTransferLink" }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint32", type: "uint32" }, - { name: "want", internalType: "uint32", type: "uint32" }, - ], - name: "GasLimitTooBig", - }, - { - type: "error", - inputs: [ - { name: "gasPrice", internalType: "uint256", type: "uint256" }, - { name: "maxGas", internalType: "uint256", type: "uint256" }, - ], - name: "GasPriceExceeded", - }, - { type: "error", inputs: [], name: "IncorrectCommitment" }, - { type: "error", inputs: [], name: "IndexOutOfRange" }, - { type: "error", inputs: [], name: "InsufficientBalance" }, - { type: "error", inputs: [], name: "InvalidCalldata" }, - { - type: "error", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "consumer", internalType: "address", type: "address" }, - ], - name: "InvalidConsumer", - }, - { type: "error", inputs: [], name: "InvalidExtraArgsTag" }, - { - type: "error", - inputs: [{ name: "linkWei", internalType: "int256", type: "int256" }], - name: "InvalidLinkWeiPrice", - }, - { - type: "error", - inputs: [ - { name: "premiumPercentage", internalType: "uint8", type: "uint8" }, - { name: "max", internalType: "uint8", type: "uint8" }, - ], - name: "InvalidPremiumPercentage", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint16", type: "uint16" }, - { name: "min", internalType: "uint16", type: "uint16" }, - { name: "max", internalType: "uint16", type: "uint16" }, - ], - name: "InvalidRequestConfirmations", - }, - { type: "error", inputs: [], name: "InvalidSubscription" }, - { type: "error", inputs: [], name: "LinkAlreadySet" }, - { - type: "error", - inputs: [ - { - name: "flatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - }, - { name: "flatFeeNativePPM", internalType: "uint32", type: "uint32" }, - ], - name: "LinkDiscountTooHigh", - }, - { type: "error", inputs: [], name: "LinkNotSet" }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint256", type: "uint256" }, - { name: "max", internalType: "uint32", type: "uint32" }, - ], - name: "MsgDataTooBig", - }, - { - type: "error", - inputs: [{ name: "proposedOwner", internalType: "address", type: "address" }], - name: "MustBeRequestedOwner", - }, - { - type: "error", - inputs: [{ name: "owner", internalType: "address", type: "address" }], - name: "MustBeSubOwner", - }, - { type: "error", inputs: [], name: "NoCorrespondingRequest" }, - { - type: "error", - inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], - name: "NoSuchProvingKey", - }, - { - type: "error", - inputs: [ - { name: "have", internalType: "uint32", type: "uint32" }, - { name: "want", internalType: "uint32", type: "uint32" }, - ], - name: "NumWordsTooBig", - }, - { type: "error", inputs: [], name: "OnlyCallableFromLink" }, - { type: "error", inputs: [], name: "PaymentTooLarge" }, - { type: "error", inputs: [], name: "PendingRequestExists" }, - { - type: "error", - inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], - name: "ProvingKeyAlreadyRegistered", - }, - { type: "error", inputs: [], name: "Reentrant" }, - { type: "error", inputs: [], name: "TooManyConsumers" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - indexed: false, - }, - { - name: "maxGasLimit", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "stalenessSeconds", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "gasAfterPaymentCalculation", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "fallbackWeiPerUnitLink", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "fulfillmentFlatFeeNativePPM", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "fulfillmentFlatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "nativePremiumPercentage", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - { - name: "linkPremiumPercentage", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "ConfigSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "coordinatorAddress", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "CoordinatorDeregistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "coordinatorAddress", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "CoordinatorRegistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "fallbackWeiPerUnitLink", - internalType: "int256", - type: "int256", - indexed: false, - }, - ], - name: "FallbackWeiPerUnitLinkUsed", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "to", internalType: "address", type: "address", indexed: false }, - { - name: "amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "FundsRecovered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newCoordinator", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "MigrationCompleted", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "to", internalType: "address", type: "address", indexed: false }, - { - name: "amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "NativeFundsRecovered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - ], - name: "OwnershipTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "keyHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "maxGas", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "ProvingKeyDeregistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "keyHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "maxGas", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "ProvingKeyRegistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "outputSeed", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "payment", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - { - name: "nativePayment", - internalType: "bool", - type: "bool", - indexed: false, - }, - { name: "success", internalType: "bool", type: "bool", indexed: false }, - { - name: "onlyPremium", - internalType: "bool", - type: "bool", - indexed: false, - }, - ], - name: "RandomWordsFulfilled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "keyHash", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "requestId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "preSeed", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - indexed: false, - }, - { - name: "callbackGasLimit", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "numWords", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "extraArgs", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - { - name: "sender", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "RandomWordsRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "to", internalType: "address", type: "address", indexed: false }, - { - name: "amountLink", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "amountNative", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "SubscriptionCanceled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "consumer", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "SubscriptionConsumerAdded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "consumer", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "SubscriptionConsumerRemoved", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "owner", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "SubscriptionCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "oldBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "newBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "SubscriptionFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "oldNativeBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "newNativeBalance", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "SubscriptionFundedWithNative", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "from", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "to", internalType: "address", type: "address", indexed: false }, - ], - name: "SubscriptionOwnerTransferRequested", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "subId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "from", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "to", internalType: "address", type: "address", indexed: false }, - ], - name: "SubscriptionOwnerTransferred", - }, - { - type: "function", - inputs: [], - name: "BLOCKHASH_STORE", - outputs: [ - { - name: "", - internalType: "contract BlockhashStoreInterface", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LINK", - outputs: [ - { - name: "", - internalType: "contract LinkTokenInterface", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LINK_NATIVE_FEED", - outputs: [ - { - name: "", - internalType: "contract AggregatorV3Interface", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_CONSUMERS", - outputs: [{ name: "", internalType: "uint16", type: "uint16" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_NUM_WORDS", - outputs: [{ name: "", internalType: "uint32", type: "uint32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_REQUEST_CONFIRMATIONS", - outputs: [{ name: "", internalType: "uint16", type: "uint16" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "acceptSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "consumer", internalType: "address", type: "address" }, - ], - name: "addConsumer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "to", internalType: "address", type: "address" }, - ], - name: "cancelSubscription", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "createSubscription", - outputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "target", internalType: "address", type: "address" }], - name: "deregisterMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "publicProvingKey", - internalType: "uint256[2]", - type: "uint256[2]", - }, - ], - name: "deregisterProvingKey", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "proof", - internalType: "struct VRF.Proof", - type: "tuple", - components: [ - { name: "pk", internalType: "uint256[2]", type: "uint256[2]" }, - { name: "gamma", internalType: "uint256[2]", type: "uint256[2]" }, - { name: "c", internalType: "uint256", type: "uint256" }, - { name: "s", internalType: "uint256", type: "uint256" }, - { name: "seed", internalType: "uint256", type: "uint256" }, - { name: "uWitness", internalType: "address", type: "address" }, - { - name: "cGammaWitness", - internalType: "uint256[2]", - type: "uint256[2]", - }, - { - name: "sHashWitness", - internalType: "uint256[2]", - type: "uint256[2]", - }, - { name: "zInv", internalType: "uint256", type: "uint256" }, - ], - }, - { - name: "rc", - internalType: "struct VRFTypes.RequestCommitmentV2Plus", - type: "tuple", - components: [ - { name: "blockNum", internalType: "uint64", type: "uint64" }, - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, - { name: "numWords", internalType: "uint32", type: "uint32" }, - { name: "sender", internalType: "address", type: "address" }, - { name: "extraArgs", internalType: "bytes", type: "bytes" }, - ], - }, - { name: "onlyPremium", internalType: "bool", type: "bool" }, - ], - name: "fulfillRandomWords", - outputs: [{ name: "payment", internalType: "uint96", type: "uint96" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "fundSubscriptionWithNative", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "startIndex", internalType: "uint256", type: "uint256" }, - { name: "maxCount", internalType: "uint256", type: "uint256" }, - ], - name: "getActiveSubscriptionIds", - outputs: [{ name: "ids", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "getSubscription", - outputs: [ - { name: "balance", internalType: "uint96", type: "uint96" }, - { name: "nativeBalance", internalType: "uint96", type: "uint96" }, - { name: "reqCount", internalType: "uint64", type: "uint64" }, - { name: "subOwner", internalType: "address", type: "address" }, - { name: "consumers", internalType: "address[]", type: "address[]" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "publicKey", internalType: "uint256[2]", type: "uint256[2]" }], - name: "hashOfKey", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "newCoordinator", internalType: "address", type: "address" }, - ], - name: "migrate", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "onTokenTransfer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "ownerCancelSubscription", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], - name: "pendingRequestExists", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "recoverFunds", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address payable", type: "address" }], - name: "recoverNativeFunds", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "target", internalType: "address", type: "address" }], - name: "registerMigratableCoordinator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "publicProvingKey", - internalType: "uint256[2]", - type: "uint256[2]", - }, - { name: "maxGas", internalType: "uint64", type: "uint64" }, - ], - name: "registerProvingKey", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "consumer", internalType: "address", type: "address" }, - ], - name: "removeConsumer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "req", - internalType: "struct VRFV2PlusClient.RandomWordsRequest", - type: "tuple", - components: [ - { name: "keyHash", internalType: "bytes32", type: "bytes32" }, - { name: "subId", internalType: "uint256", type: "uint256" }, - { - name: "requestConfirmations", - internalType: "uint16", - type: "uint16", - }, - { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, - { name: "numWords", internalType: "uint32", type: "uint32" }, - { name: "extraArgs", internalType: "bytes", type: "bytes" }, - ], - }, - ], - name: "requestRandomWords", - outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "subId", internalType: "uint256", type: "uint256" }, - { name: "newOwner", internalType: "address", type: "address" }, - ], - name: "requestSubscriptionOwnerTransfer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "s_config", - outputs: [ - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - }, - { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, - { name: "reentrancyLock", internalType: "bool", type: "bool" }, - { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, - { - name: "gasAfterPaymentCalculation", - internalType: "uint32", - type: "uint32", - }, - { - name: "fulfillmentFlatFeeNativePPM", - internalType: "uint32", - type: "uint32", - }, - { - name: "fulfillmentFlatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - }, - { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, - { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_currentSubNonce", - outputs: [{ name: "", internalType: "uint64", type: "uint64" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_fallbackWeiPerUnitLink", - outputs: [{ name: "", internalType: "int256", type: "int256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "s_provingKeyHashes", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - name: "s_provingKeys", - outputs: [ - { name: "exists", internalType: "bool", type: "bool" }, - { name: "maxGas", internalType: "uint64", type: "uint64" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "s_requestCommitments", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_totalBalance", - outputs: [{ name: "", internalType: "uint96", type: "uint96" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "s_totalNativeBalance", - outputs: [{ name: "", internalType: "uint96", type: "uint96" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "minimumRequestConfirmations", - internalType: "uint16", - type: "uint16", - }, - { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, - { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, - { - name: "gasAfterPaymentCalculation", - internalType: "uint32", - type: "uint32", - }, - { - name: "fallbackWeiPerUnitLink", - internalType: "int256", - type: "int256", - }, - { - name: "fulfillmentFlatFeeNativePPM", - internalType: "uint32", - type: "uint32", - }, - { - name: "fulfillmentFlatFeeLinkDiscountPPM", - internalType: "uint32", - type: "uint32", - }, - { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, - { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, - ], - name: "setConfig", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "link", internalType: "address", type: "address" }, - { name: "linkNativeFeed", internalType: "address", type: "address" }, - ], - name: "setLINKAndLINKNativeFeed", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "recipient", internalType: "address", type: "address" }], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "recipient", internalType: "address payable", type: "address" }], - name: "withdrawNative", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) - */ -export const chainlinkVrfCoordinatorAddress = { - 421614: "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) - */ -export const chainlinkVrfCoordinatorConfig = { - address: chainlinkVrfCoordinatorAddress, - abi: chainlinkVrfCoordinatorAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DAI -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03) - */ -export const daiAbi = [ - { - type: "constructor", - inputs: [ - { name: "_name", internalType: "string", type: "string" }, - { name: "_symbol", internalType: "string", type: "string" }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03) - */ -export const daiAddress = { - 421614: "0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03) - */ -export const daiConfig = { address: daiAddress, abi: daiAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DAIFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1Fa58B52326488D62A406E71DBaD839560e810fF) - */ -export const daiFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "amount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1Fa58B52326488D62A406E71DBaD839560e810fF) - */ -export const daiFaucetAddress = { - 421614: "0x1Fa58B52326488D62A406E71DBaD839560e810fF", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1Fa58B52326488D62A406E71DBaD839560e810fF) - */ -export const daiFaucetConfig = { - address: daiFaucetAddress, - abi: daiFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94) - */ -export const disputeKitClassicAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94) - */ -export const disputeKitClassicAddress = { - 421614: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94) - */ -export const disputeKitClassicConfig = { - address: disputeKitClassicAddress, - abi: disputeKitClassicAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA122856B3B4C5fBcA129088af3CEb204509805f0) - */ -export const disputeKitClassicImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA122856B3B4C5fBcA129088af3CEb204509805f0) - */ -export const disputeKitClassicImplementationAddress = { - 421614: "0xA122856B3B4C5fBcA129088af3CEb204509805f0", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA122856B3B4C5fBcA129088af3CEb204509805f0) - */ -export const disputeKitClassicImplementationConfig = { - address: disputeKitClassicImplementationAddress, - abi: disputeKitClassicImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94) - */ -export const disputeKitClassicProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94) - */ -export const disputeKitClassicProxyAddress = { - 421614: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94) - */ -export const disputeKitClassicProxyConfig = { - address: disputeKitClassicProxyAddress, - abi: disputeKitClassicProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGated -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed) - */ -export const disputeKitGatedAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "extraDataToTokenInfo", - outputs: [ - { name: "tokenGate", internalType: "address", type: "address" }, - { name: "isERC1155", internalType: "bool", type: "bool" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed) - */ -export const disputeKitGatedAddress = { - 421614: "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed) - */ -export const disputeKitGatedConfig = { - address: disputeKitGatedAddress, - abi: disputeKitGatedAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGatedShutter -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x936231010462458ebaA45dDc422A5940C08a474C) - */ -export const disputeKitGatedShutterAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x936231010462458ebaA45dDc422A5940C08a474C) - */ -export const disputeKitGatedShutterAddress = { - 421614: "0x936231010462458ebaA45dDc422A5940C08a474C", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x936231010462458ebaA45dDc422A5940C08a474C) - */ -export const disputeKitGatedShutterConfig = { - address: disputeKitGatedShutterAddress, - abi: disputeKitGatedShutterAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGatedShutter_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7) - */ -export const disputeKitGatedShutterImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7) - */ -export const disputeKitGatedShutterImplementationAddress = { - 421614: "0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3a06272f2FEEC12B0FB5F3FF82688c0F06808bE7) - */ -export const disputeKitGatedShutterImplementationConfig = { - address: disputeKitGatedShutterImplementationAddress, - abi: disputeKitGatedShutterImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGatedShutter_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x936231010462458ebaA45dDc422A5940C08a474C) - */ -export const disputeKitGatedShutterProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x936231010462458ebaA45dDc422A5940C08a474C) - */ -export const disputeKitGatedShutterProxyAddress = { - 421614: "0x936231010462458ebaA45dDc422A5940C08a474C", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x936231010462458ebaA45dDc422A5940C08a474C) - */ -export const disputeKitGatedShutterProxyConfig = { - address: disputeKitGatedShutterProxyAddress, - abi: disputeKitGatedShutterProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGated_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2d1b63C9638ed62875256676C665a7ec14D7663C) - */ -export const disputeKitGatedImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "extraDataToTokenInfo", - outputs: [ - { name: "tokenGate", internalType: "address", type: "address" }, - { name: "isERC1155", internalType: "bool", type: "bool" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2d1b63C9638ed62875256676C665a7ec14D7663C) - */ -export const disputeKitGatedImplementationAddress = { - 421614: "0x2d1b63C9638ed62875256676C665a7ec14D7663C", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2d1b63C9638ed62875256676C665a7ec14D7663C) - */ -export const disputeKitGatedImplementationConfig = { - address: disputeKitGatedImplementationAddress, - abi: disputeKitGatedImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitGated_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed) - */ -export const disputeKitGatedProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed) - */ -export const disputeKitGatedProxyAddress = { - 421614: "0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xfc8E5cabC8D01fd555Ee77dcE16d718678f4F6Ed) - */ -export const disputeKitGatedProxyConfig = { - address: disputeKitGatedProxyAddress, - abi: disputeKitGatedProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitShutter -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa) - */ -export const disputeKitShutterAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa) - */ -export const disputeKitShutterAddress = { - 421614: "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa) - */ -export const disputeKitShutterConfig = { - address: disputeKitShutterAddress, - abi: disputeKitShutterAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitShutter_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d) - */ -export const disputeKitShutterImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: true, - }, - { - name: "_identity", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_encryptedVote", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CommitCastShutter", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - { name: "drawnAddress", internalType: "address", type: "address" }, - ], - name: "alreadyDrawn", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - { name: "_identity", internalType: "bytes32", type: "bytes32" }, - { name: "_encryptedVote", internalType: "bytes", type: "bytes" }, - ], - name: "castCommitShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVoteShutter", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getLocalDisputeRoundID", - outputs: [ - { name: "localDisputeID", internalType: "uint256", type: "uint256" }, - { name: "localRoundID", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "hashVote", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "isAppealFunded", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d) - */ -export const disputeKitShutterImplementationAddress = { - 421614: "0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xca04F97fc0Df83E25e585893F5A12fb0AebEC27d) - */ -export const disputeKitShutterImplementationConfig = { - address: disputeKitShutterImplementationAddress, - abi: disputeKitShutterImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitShutter_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa) - */ -export const disputeKitShutterProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa) - */ -export const disputeKitShutterProxyAddress = { - 421614: "0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87445ca2C09978Dc8F8d7e79c59791b1B3B1CFaa) - */ -export const disputeKitShutterProxyConfig = { - address: disputeKitShutterProxyAddress, - abi: disputeKitShutterProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolver -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x5f79737f65320bA12440aA88087281cC8e71A781) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652) - */ -export const disputeResolverAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "view", - }, -] as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x5f79737f65320bA12440aA88087281cC8e71A781) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652) - */ -export const disputeResolverAddress = { - 10200: "0x5f79737f65320bA12440aA88087281cC8e71A781", - 421614: "0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652", -} as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x5f79737f65320bA12440aA88087281cC8e71A781) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652) - */ -export const disputeResolverConfig = { - address: disputeResolverAddress, - abi: disputeResolverAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb) - */ -export const disputeTemplateRegistryAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_templateTag", - internalType: "string", - type: "string", - indexed: true, - }, - { - name: "_templateData", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_templateDataMappings", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeTemplate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb) - */ -export const disputeTemplateRegistryAddress = { - 10200: "0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385", - 421614: "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", -} as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA55D4b90c1F8D1fD0408232bF6FA498dD6786385) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb) - */ -export const disputeTemplateRegistryConfig = { - address: disputeTemplateRegistryAddress, - abi: disputeTemplateRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec) - */ -export const disputeTemplateRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_templateTag", - internalType: "string", - type: "string", - indexed: true, - }, - { - name: "_templateData", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_templateDataMappings", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeTemplate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, - ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec) - */ -export const disputeTemplateRegistryImplementationAddress = { - 421614: "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec) - */ -export const disputeTemplateRegistryImplementationConfig = { - address: disputeTemplateRegistryImplementationAddress, - abi: disputeTemplateRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb) - */ -export const disputeTemplateRegistryProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb) - */ -export const disputeTemplateRegistryProxyAddress = { - 421614: "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb) - */ -export const disputeTemplateRegistryProxyConfig = { - address: disputeTemplateRegistryProxyAddress, - abi: disputeTemplateRegistryProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397) - */ -export const evidenceModuleAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_party", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_evidence", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "Evidence", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397) - */ -export const evidenceModuleAddress = { - 421614: "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397) - */ -export const evidenceModuleConfig = { - address: evidenceModuleAddress, - abi: evidenceModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xC4e64e6E949936a18269937FC1e18cb11E3db14D) - */ -export const evidenceModuleImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_party", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_evidence", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "Evidence", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xC4e64e6E949936a18269937FC1e18cb11E3db14D) - */ -export const evidenceModuleImplementationAddress = { - 421614: "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xC4e64e6E949936a18269937FC1e18cb11E3db14D) - */ -export const evidenceModuleImplementationConfig = { - address: evidenceModuleImplementationAddress, - abi: evidenceModuleImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397) - */ -export const evidenceModuleProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397) - */ -export const evidenceModuleProxyAddress = { - 421614: "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397) - */ -export const evidenceModuleProxyConfig = { - address: evidenceModuleProxyAddress, - abi: evidenceModuleProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ForeignGatewayOnGnosis -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x2824bdcc752b1272D56A84be03A74Ee856C06e43) - */ -export const foreignGatewayOnGnosisAbi = [ - { - type: "constructor", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_homeChainID", internalType: "uint256", type: "uint256" }, - { name: "_homeGateway", internalType: "address", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "ArbitrationCostModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_foreignArbitrable", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_foreignDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choices", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "CrossChainDisputeOutgoing", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "DEFAULT_NB_OF_JURORS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - ], - name: "changeCourtJurorFee", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_homeGateway", internalType: "address", type: "address" }], - name: "changeHomeGateway", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_gracePeriod", internalType: "uint256", type: "uint256" }, - ], - name: "changeVea", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_choices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bool", type: "bool" }, - { name: "", internalType: "bool", type: "bool" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [], - name: "deprecatedVeaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "deprecatedVeaOutboxExpiration", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToForeignID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashtoDisputeData", - outputs: [ - { name: "id", internalType: "uint248", type: "uint248" }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "arbitrable", internalType: "address", type: "address" }, - { name: "paid", internalType: "uint256", type: "uint256" }, - { name: "relayer", internalType: "address", type: "address" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint96", type: "uint96" }], - name: "feeForJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "homeChainID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "homeGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_messageSender", internalType: "address", type: "address" }, - { name: "_disputeHash", internalType: "bytes32", type: "bytes32" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "_relayer", internalType: "address", type: "address" }, - ], - name: "relayRule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "senderGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "veaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "withdrawFees", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x2824bdcc752b1272D56A84be03A74Ee856C06e43) - */ -export const foreignGatewayOnGnosisAddress = { - 10200: "0x2824bdcc752b1272D56A84be03A74Ee856C06e43", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x2824bdcc752b1272D56A84be03A74Ee856C06e43) - */ -export const foreignGatewayOnGnosisConfig = { - address: foreignGatewayOnGnosisAddress, - abi: foreignGatewayOnGnosisAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// IHomeGateway -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const iHomeGatewayAbi = [ - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: false, - }, - { - name: "_arbitrableChainId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_arbitrable", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_arbitrableDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "CrossChainDisputeIncoming", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeRequest", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToHomeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "feeToken", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "foreignChainID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "foreignGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "receiverGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", - type: "tuple", - components: [ - { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, - { - name: "foreignArbitrable", - internalType: "address", - type: "address", - }, - { - name: "foreignDisputeID", - internalType: "uint256", - type: "uint256", - }, - { - name: "externalDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "relayCreateDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", - type: "tuple", - components: [ - { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, - { - name: "foreignArbitrable", - internalType: "address", - type: "address", - }, - { - name: "foreignDisputeID", - internalType: "uint256", - type: "uint256", - }, - { - name: "externalDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - }, - ], - name: "relayCreateDispute", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "veaInbox", - outputs: [{ name: "", internalType: "contract IVeaInbox", type: "address" }], - stateMutability: "view", - }, -] as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479) - */ -export const klerosCoreAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibleInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WhenNotPausedOnly" }, - { type: "error", inputs: [], name: "WhenPausedOnly" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "nbDrawnJurors", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getPnkAtStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreBase.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479) - */ -export const klerosCoreAddress = { - 421614: "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479) - */ -export const klerosCoreConfig = { - address: klerosCoreAddress, - abi: klerosCoreAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreSnapshotProxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C) - */ -export const klerosCoreSnapshotProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract IKlerosCore", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "totalStaked", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "contract IKlerosCore", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract IKlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C) - */ -export const klerosCoreSnapshotProxyAddress = { - 421614: "0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C) - */ -export const klerosCoreSnapshotProxyConfig = { - address: klerosCoreSnapshotProxyAddress, - abi: klerosCoreSnapshotProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x02F607722749CECd32db07AA0b0755281FE9D13c) - */ -export const klerosCoreImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibleInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WhenNotPausedOnly" }, - { type: "error", inputs: [], name: "WhenPausedOnly" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "nbDrawnJurors", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getPnkAtStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreBase.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - { name: "_wNative", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_wNative", internalType: "address", type: "address" }], - name: "reinitialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "wNative", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x02F607722749CECd32db07AA0b0755281FE9D13c) - */ -export const klerosCoreImplementationAddress = { - 421614: "0x02F607722749CECd32db07AA0b0755281FE9D13c", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x02F607722749CECd32db07AA0b0755281FE9D13c) - */ -export const klerosCoreImplementationConfig = { - address: klerosCoreImplementationAddress, - abi: klerosCoreImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479) - */ -export const klerosCoreProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479) - */ -export const klerosCoreProxyAddress = { - 421614: "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479) - */ -export const klerosCoreProxyConfig = { - address: klerosCoreProxyAddress, - abi: klerosCoreProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PNK -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - */ -export const pnkAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - */ -export const pnkAddress = { - 421614: "0x34B944D42cAcfC8266955D07A80181D2054aa225", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - */ -export const pnkConfig = { address: pnkAddress, abi: pnkAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PNKFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9f6ffc13B685A68ae359fCA128dfE776458Df464) - */ -export const pnkFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "amount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9f6ffc13B685A68ae359fCA128dfE776458Df464) - */ -export const pnkFaucetAddress = { - 421614: "0x9f6ffc13B685A68ae359fCA128dfE776458Df464", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9f6ffc13B685A68ae359fCA128dfE776458Df464) - */ -export const pnkFaucetConfig = { - address: pnkFaucetAddress, - abi: pnkFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PinakionV2 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const pinakionV2Abi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const pinakionV2Address = { - 421614: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - 11155111: "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", -} as const; - -/** - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const pinakionV2Config = { - address: pinakionV2Address, - abi: pinakionV2Abi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585) - */ -export const policyRegistryAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_courtName", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_policy", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "PolicyUpdate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "policies", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint256", type: "uint256" }, - { name: "_courtName", internalType: "string", type: "string" }, - { name: "_policy", internalType: "string", type: "string" }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585) - */ -export const policyRegistryAddress = { - 421614: "0x2668c46A14af8997417138B064ca1bEB70769585", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585) - */ -export const policyRegistryConfig = { - address: policyRegistryAddress, - abi: policyRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7CC8E0787e381aE159C4d3e137f20f9203313D41) - */ -export const policyRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_courtName", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_policy", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "PolicyUpdate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "policies", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint256", type: "uint256" }, - { name: "_courtName", internalType: "string", type: "string" }, - { name: "_policy", internalType: "string", type: "string" }, - ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7CC8E0787e381aE159C4d3e137f20f9203313D41) - */ -export const policyRegistryImplementationAddress = { - 421614: "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7CC8E0787e381aE159C4d3e137f20f9203313D41) - */ -export const policyRegistryImplementationConfig = { - address: policyRegistryImplementationAddress, - abi: policyRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585) - */ -export const policyRegistryProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585) - */ -export const policyRegistryProxyAddress = { - 421614: "0x2668c46A14af8997417138B064ca1bEB70769585", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585) - */ -export const policyRegistryProxyConfig = { - address: policyRegistryProxyAddress, - abi: policyRegistryProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerOracle -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) - */ -export const randomizerOracleAbi = [] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) - */ -export const randomizerOracleAddress = { - 421614: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) - */ -export const randomizerOracleConfig = { - address: randomizerOracleAddress, - abi: randomizerOracleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerRNG -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x51a97ad9F0aA818e75819da3cA20CAc319580627) - */ -export const randomizerRngAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "callbackGasLimit", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_randomizer", - internalType: "contract IRandomizer", - type: "address", - }, - { name: "_governor", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomizer", - outputs: [{ name: "", internalType: "contract IRandomizer", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_id", internalType: "uint256", type: "uint256" }, - { name: "_value", internalType: "bytes32", type: "bytes32" }, - ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "requester", internalType: "address", type: "address" }], - name: "requesterToID", - outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_callbackGasLimit", internalType: "uint256", type: "uint256" }], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_randomizer", internalType: "address", type: "address" }], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x51a97ad9F0aA818e75819da3cA20CAc319580627) - */ -export const randomizerRngAddress = { - 421614: "0x51a97ad9F0aA818e75819da3cA20CAc319580627", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x51a97ad9F0aA818e75819da3cA20CAc319580627) - */ -export const randomizerRngConfig = { - address: randomizerRngAddress, - abi: randomizerRngAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerRNG_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203) - */ -export const randomizerRngImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "callbackGasLimit", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_randomizer", - internalType: "contract IRandomizer", - type: "address", - }, - { name: "_governor", internalType: "address", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomizer", - outputs: [{ name: "", internalType: "contract IRandomizer", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_id", internalType: "uint256", type: "uint256" }, - { name: "_value", internalType: "bytes32", type: "bytes32" }, - ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "requester", internalType: "address", type: "address" }], - name: "requesterToID", - outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_callbackGasLimit", internalType: "uint256", type: "uint256" }], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_randomizer", internalType: "address", type: "address" }], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203) - */ -export const randomizerRngImplementationAddress = { - 421614: "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203) - */ -export const randomizerRngImplementationConfig = { - address: randomizerRngImplementationAddress, - abi: randomizerRngImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerRNG_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x51a97ad9F0aA818e75819da3cA20CAc319580627) - */ -export const randomizerRngProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x51a97ad9F0aA818e75819da3cA20CAc319580627) - */ -export const randomizerRngProxyAddress = { - 421614: "0x51a97ad9F0aA818e75819da3cA20CAc319580627", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x51a97ad9F0aA818e75819da3cA20CAc319580627) - */ -export const randomizerRngProxyConfig = { - address: randomizerRngProxyAddress, - abi: randomizerRngProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD) - */ -export const sortitionModuleAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNK", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNKWithdrawn", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeDelayed", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_relativeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, - ], - name: "StakeLocked", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amountAllCourts", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_minStakingTime", internalType: "uint256", type: "uint256" }], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "delayedStakeReadIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "delayedStakes", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "courtID", internalType: "uint96", type: "uint96" }, - { name: "stake", internalType: "uint256", type: "uint256" }, - { name: "alreadyTransferred", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorLeftoverPNK", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_minStakingTime", internalType: "uint256", type: "uint256" }, - { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastPhaseChange", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "jurorAccount", internalType: "address", type: "address" }, - { name: "courtId", internalType: "uint96", type: "uint96" }, - ], - name: "latestDelayedStakeIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "maxDrawingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "minStakingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", - outputs: [ - { name: "pnkBalance", internalType: "uint256", type: "uint256" }, - { name: "availablePenalty", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "phase", - outputs: [{ name: "", internalType: "enum ISortitionModule.Phase", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumber", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumberRequestBlock", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rng", - outputs: [{ name: "", internalType: "contract RNG", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rngLookahead", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "_pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_ID", internalType: "bytes32", type: "bytes32" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "validateStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD) - */ -export const sortitionModuleAddress = { - 421614: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD) - */ -export const sortitionModuleConfig = { - address: sortitionModuleAddress, - abi: sortitionModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83) - */ -export const sortitionModuleImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNK", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LeftoverPNKWithdrawn", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeDelayed", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_relativeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, - ], - name: "StakeLocked", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amountAllCourts", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_minStakingTime", internalType: "uint256", type: "uint256" }], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "delayedStakeReadIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "delayedStakes", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "courtID", internalType: "uint96", type: "uint96" }, - { name: "stake", internalType: "uint256", type: "uint256" }, - { name: "alreadyTransferred", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorLeftoverPNK", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_minStakingTime", internalType: "uint256", type: "uint256" }, - { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize4", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastPhaseChange", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "jurorAccount", internalType: "address", type: "address" }, - { name: "courtId", internalType: "uint96", type: "uint96" }, - ], - name: "latestDelayedStakeIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "maxDrawingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "minStakingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", - outputs: [ - { name: "pnkBalance", internalType: "uint256", type: "uint256" }, - { name: "availablePenalty", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "phase", - outputs: [{ name: "", internalType: "enum ISortitionModule.Phase", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumber", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumberRequestBlock", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rng", - outputs: [{ name: "", internalType: "contract RNG", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rngLookahead", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "_pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_ID", internalType: "bytes32", type: "bytes32" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "validateStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "withdrawLeftoverPNK", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83) - */ -export const sortitionModuleImplementationAddress = { - 421614: "0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0C872eeF07030107b53eaD15bb7dD7E6FBCA2b83) - */ -export const sortitionModuleImplementationConfig = { - address: sortitionModuleImplementationAddress, - abi: sortitionModuleImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD) - */ -export const sortitionModuleProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD) - */ -export const sortitionModuleProxyAddress = { - 421614: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD) - */ -export const sortitionModuleProxyConfig = { - address: sortitionModuleProxyAddress, - abi: sortitionModuleProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionSumTreeFactory -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636) - */ -export const sortitionSumTreeFactoryAbi = [] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636) - */ -export const sortitionSumTreeFactoryAddress = { - 10200: "0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636) - */ -export const sortitionSumTreeFactoryConfig = { - address: sortitionSumTreeFactoryAddress, - abi: sortitionSumTreeFactoryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// TokenBridge -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xbb3c86f9918C3C1d83668fA84e79E876d147fFf2) - */ -export const tokenBridgeAbi = [] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xbb3c86f9918C3C1d83668fA84e79E876d147fFf2) - */ -export const tokenBridgeAddress = { - 10200: "0xbb3c86f9918C3C1d83668fA84e79E876d147fFf2", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xbb3c86f9918C3C1d83668fA84e79E876d147fFf2) - */ -export const tokenBridgeConfig = { - address: tokenBridgeAddress, - abi: tokenBridgeAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// TransactionBatcher -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) - */ -export const transactionBatcherAbi = [ - { - type: "function", - inputs: [ - { name: "targets", internalType: "address[]", type: "address[]" }, - { name: "values", internalType: "uint256[]", type: "uint256[]" }, - { name: "datas", internalType: "bytes[]", type: "bytes[]" }, - ], - name: "batchSend", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "targets", internalType: "address[]", type: "address[]" }, - { name: "values", internalType: "uint256[]", type: "uint256[]" }, - { name: "datas", internalType: "bytes[]", type: "bytes[]" }, - ], - name: "batchSendUnchecked", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) - */ -export const transactionBatcherAddress = { - 421614: "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) - */ -export const transactionBatcherConfig = { - address: transactionBatcherAddress, - abi: transactionBatcherAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WETH -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511) - */ -export const wethAbi = [ - { - type: "constructor", - inputs: [ - { name: "_name", internalType: "string", type: "string" }, - { name: "_symbol", internalType: "string", type: "string" }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511) - */ -export const wethAddress = { - 10200: "0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8", - 421614: "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511", -} as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x2DFC9c3141268e6eac04a7D6d98Fbf64BDe836a8) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511) - */ -export const wethConfig = { address: wethAddress, abi: wethAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WETHFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835) - */ -export const wethFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "amount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835) - */ -export const wethFaucetAddress = { - 10200: "0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F", - 421614: "0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835", -} as const; - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x22CB016c4b57413ca4DF5F1AC44a0E0d3c69811F) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835) - */ -export const wethFaucetConfig = { - address: wethFaucetAddress, - abi: wethFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WPNKFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x5898aeE045A25B276369914c3448B72a41758B2c) - */ -export const wpnkFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x5898aeE045A25B276369914c3448B72a41758B2c) - */ -export const wpnkFaucetAddress = { - 10200: "0x5898aeE045A25B276369914c3448B72a41758B2c", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x5898aeE045A25B276369914c3448B72a41758B2c) - */ -export const wpnkFaucetConfig = { - address: wpnkFaucetAddress, - abi: wpnkFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// WrappedPinakionV2 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd) - */ -export const wrappedPinakionV2Abi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd) - */ -export const wrappedPinakionV2Address = { - 10200: "0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd) - */ -export const wrappedPinakionV2Config = { - address: wrappedPinakionV2Address, - abi: wrappedPinakionV2Abi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// xKlerosLiquidV2 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x34E520dc1d2Db660113b64724e14CEdCD01Ee879) - */ -export const xKlerosLiquidV2Abi = [ - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrable", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_appeal", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [{ name: "version", internalType: "uint8", type: "uint8", indexed: false }], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum xKlerosLiquidV2.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum xKlerosLiquidV2.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrable", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_subcourtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_stake", - internalType: "uint128", - type: "uint128", - indexed: false, - }, - { - name: "_newTotalStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_tokenAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_ETHAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "function", - inputs: [], - name: "ALPHA_DIVISOR", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_STAKE_PATHS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MIN_JURORS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "NON_PAYABLE_AMOUNT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "RN", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "RNBlock", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "RNGenerator", - outputs: [{ name: "", internalType: "contract IRandomAuRa", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "_foreignGateway", - internalType: "contract IForeignGateway", - type: "address", - }, - ], - name: "changeForeignGateway", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_minStakingTime", internalType: "uint256", type: "uint256" }], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_pinakion", - internalType: "contract WrappedPinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_RNGenerator", - internalType: "contract IRandomAuRa", - type: "address", - }, - ], - name: "changeRNGenerator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_subcourtID", internalType: "uint96", type: "uint96" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - ], - name: "changeSubcourtAlpha", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_subcourtID", internalType: "uint96", type: "uint96" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - ], - name: "changeSubcourtJurorFee", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_subcourtID", internalType: "uint96", type: "uint96" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - ], - name: "changeSubcourtJurorsForJump", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_subcourtID", internalType: "uint96", type: "uint96" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - ], - name: "changeSubcourtMinStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_subcourtID", internalType: "uint96", type: "uint96" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeSubcourtTimesPerPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_weth", internalType: "contract IERC20", type: "address" }], - name: "changeWethAddress", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionSumTreeK", internalType: "uint256", type: "uint256" }, - ], - name: "createSubcourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [{ name: "ruling", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "delayedSetStakes", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "subcourtID", internalType: "uint96", type: "uint96" }, - { name: "stake", internalType: "uint128", type: "uint128" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "subcourtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrable", - type: "address", - }, - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { - name: "period", - internalType: "enum xKlerosLiquidV2.Period", - type: "uint8", - }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - { name: "drawsInRound", internalType: "uint256", type: "uint256" }, - { name: "commitsInRound", internalType: "uint256", type: "uint256" }, - { name: "ruled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputesRuling", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], - name: "executeDelayedSetStakes", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "foreignGateway", - outputs: [{ name: "", internalType: "contract IForeignGateway", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getDispute", - outputs: [ - { name: "votesLengths", internalType: "uint256[]", type: "uint256[]" }, - { - name: "tokensAtStakePerJuror", - internalType: "uint256[]", - type: "uint256[]", - }, - { - name: "totalFeesForJurors", - internalType: "uint256[]", - type: "uint256[]", - }, - { - name: "votesInEachRound", - internalType: "uint256[]", - type: "uint256[]", - }, - { - name: "repartitionsInEachRound", - internalType: "uint256[]", - type: "uint256[]", - }, - { - name: "penaltiesInEachRound", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "getJuror", - outputs: [{ name: "subcourtIDs", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_subcourtID", internalType: "uint96", type: "uint96" }], - name: "getSubcourt", - outputs: [ - { name: "children", internalType: "uint256[]", type: "uint256[]" }, - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_appeal", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVote", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_appeal", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteCounter", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "counts", internalType: "uint256[]", type: "uint256[]" }, - { name: "tied", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { - name: "_pinakion", - internalType: "contract WrappedPinakion", - type: "address", - }, - { - name: "_RNGenerator", - internalType: "contract IRandomAuRa", - type: "address", - }, - { name: "_minStakingTime", internalType: "uint256", type: "uint256" }, - { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionSumTreeK", internalType: "uint256", type: "uint256" }, - { - name: "_foreignGateway", - internalType: "contract IForeignGateway", - type: "address", - }, - { name: "_weth", internalType: "contract IERC20", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedTokens", internalType: "uint256", type: "uint256" }, - { name: "lockedTokens", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastDelayedSetStake", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lastPhaseChange", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "lockInsolventTransfers", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "maxDrawingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "minStakingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "nextDelayedSetStake", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_owner", internalType: "address", type: "address" }, - { name: "_spender", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - ], - name: "onApprove", - outputs: [{ name: "allowed", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_from", internalType: "address", type: "address" }, - { name: "_to", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - ], - name: "onTransfer", - outputs: [{ name: "allowed", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "phase", - outputs: [{ name: "", internalType: "enum xKlerosLiquidV2.Phase", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract WrappedPinakion", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_owner", internalType: "address", type: "address" }], - name: "proxyPayment", - outputs: [{ name: "allowed", internalType: "bool", type: "bool" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_subcourtID", internalType: "uint96", type: "uint96" }, - { name: "_stake", internalType: "uint128", type: "uint128" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_subcourtID", internalType: "uint96", type: "uint96" }, - ], - name: "stakeOf", - outputs: [{ name: "stake", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalDisputes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "weth", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x34E520dc1d2Db660113b64724e14CEdCD01Ee879) - */ -export const xKlerosLiquidV2Address = { - 10200: "0x34E520dc1d2Db660113b64724e14CEdCD01Ee879", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x34E520dc1d2Db660113b64724e14CEdCD01Ee879) - */ -export const xKlerosLiquidV2Config = { - address: xKlerosLiquidV2Address, - abi: xKlerosLiquidV2Abi, -} as const; diff --git a/contracts/deployments/utils.ts b/contracts/deployments/utils.ts deleted file mode 100644 index a876fbd5a..000000000 --- a/contracts/deployments/utils.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { arbitrum, arbitrumSepolia } from "viem/chains"; - -export const deployments = { - devnet: { - chainId: arbitrumSepolia.id, - }, - university: { - chainId: arbitrumSepolia.id, - }, - testnet: { - chainId: arbitrumSepolia.id, - }, - mainnet: { - chainId: arbitrum.id, - }, -} as const; - -export type DeploymentName = keyof typeof deployments; - -export type ContractConfig = { - address: Record; - abi: readonly any[]; -}; - -export function getAddress(config: ContractConfig, chainId: number): `0x${string}` { - const address = config.address[chainId]; - if (!address) throw new Error(`No address found for chainId ${chainId}`); - return address; -} diff --git a/contracts/foundry.toml b/contracts/foundry.toml deleted file mode 100644 index 2dcdd2711..000000000 --- a/contracts/foundry.toml +++ /dev/null @@ -1,21 +0,0 @@ - -[profile.default] -solc = "0.8.30" -evm_version = "cancun" -via_ir = true -optimizer = true -optimizer_runs = 10000 - -src = 'src' -out = 'out' -libs = ['../node_modules', 'lib'] - -[rpc_endpoints] -arbitrumSepolia = "https://sepolia-rollup.arbitrum.io/rpc" -arbitrum = "https://arb1.arbitrum.io/rpc" -sepolia = "https://sepolia.infura.io/v3/${INFURA_API_KEY}" -mainnet = "https://mainnet.infura.io/v3/${INFURA_API_KEY}" -chiado = "https://rpc.chiado.gnosis.gateway.fm" -gnosischain = "https://rpc.gnosis.gateway.fm" - -# See more config options https://book.getfoundry.sh/reference/config.html diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts deleted file mode 100644 index 9d8e9c49d..000000000 --- a/contracts/hardhat.config.ts +++ /dev/null @@ -1,349 +0,0 @@ -/* eslint-disable node/no-missing-require */ -import * as dotenv from "dotenv"; -import { HardhatUserConfig } from "hardhat/config"; -import "@nomicfoundation/hardhat-chai-matchers"; -import "@nomiclabs/hardhat-solhint"; -import "@typechain/hardhat"; -import "hardhat-deploy-tenderly"; -import "hardhat-gas-reporter"; -import "solidity-coverage"; -import "hardhat-deploy"; -import "hardhat-deploy-ethers"; -import "hardhat-watcher"; -import "hardhat-docgen"; -import "hardhat-contract-sizer"; -import "hardhat-tracer"; -require("./scripts/populatePolicyRegistry"); -require("./scripts/populateCourts"); -require("./scripts/changeOwner"); -require("./scripts/getDisputeTemplate"); -require("./scripts/compareStorageLayout"); -require("./scripts/storage-layout"); - -dotenv.config(); - -const config: HardhatUserConfig = { - solidity: { - compilers: [ - { - version: "0.8.30", - settings: { - evmVersion: "cancun", - viaIR: process.env.VIA_IR !== "false", // Defaults to true - optimizer: { - enabled: true, - runs: 2000, - }, - outputSelection: { - "*": { - "*": ["storageLayout"], - }, - }, - }, - }, - ], - }, - paths: { - sources: "./src", - cache: "./cache_hardhat", - }, - networks: { - hardhat: { - live: false, - saveDeployments: true, - allowUnlimitedContractSize: true, - tags: ["test", "local"], - companionNetworks: { - home: "hardhat", - foreign: "hardhat", - }, - }, - localhost: { - url: `http://127.0.0.1:8545`, - chainId: 31337, - saveDeployments: true, - tags: ["test", "local"], - companionNetworks: { - home: "localhost", - foreign: "localhost", - }, - }, - dockerhost: { - url: `http://host.docker.internal:8545`, - chainId: 31337, - saveDeployments: true, - tags: ["test", "local"], - companionNetworks: { - foreign: "localhost", - }, - }, - mainnetFork: { - chainId: 1, - url: `http://127.0.0.1:8545`, - forking: { - url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`, - }, - accounts: process.env.MAINNET_PRIVATE_KEY !== undefined ? [process.env.MAINNET_PRIVATE_KEY] : [], - live: false, - saveDeployments: false, - tags: ["test", "local"], - companionNetworks: { - home: "arbitrum", - }, - }, - arbitrumSepoliaFork: { - chainId: 421614, - url: `http://127.0.0.1:8545`, - forking: { - url: process.env.ARBITRUM_SEPOLIA_RPC ?? "https://sepolia-rollup.arbitrum.io/rpc", - }, - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - live: false, - saveDeployments: true, - tags: ["test", "local"], - companionNetworks: { - foreign: "sepolia", - }, - }, - - // Home chain --------------------------------------------------------------------------------- - arbitrumSepolia: { - chainId: 421614, - url: process.env.ARBITRUM_SEPOLIA_RPC ?? `https://arbitrum-sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`, - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - live: true, - saveDeployments: true, - tags: ["staging", "home", "layer2"], - companionNetworks: { - foreignChiado: "chiado", - foreignSepolia: "sepolia", - }, - verify: { - etherscan: { - apiUrl: "https://api.etherscan.io/v2/api", - apiKey: process.env.ETHERSCAN_API_KEY, - }, - }, - }, - arbitrumSepoliaDevnet: { - chainId: 421614, - url: process.env.ARBITRUM_SEPOLIA_RPC ?? `https://arbitrum-sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`, - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - live: true, - saveDeployments: true, - tags: ["staging", "home", "layer2"], - companionNetworks: { - foreignChiado: "chiadoDevnet", - foreignSepolia: "sepoliaDevnet", - }, - verify: { - etherscan: { - apiUrl: "https://api.etherscan.io/v2/api", - apiKey: process.env.ETHERSCAN_API_KEY, - }, - }, - }, - arbitrum: { - chainId: 42161, - url: process.env.ARBITRUM_RPC ?? `https://arbitrum-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`, - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - live: true, - saveDeployments: true, - tags: ["production", "home", "layer2"], - companionNetworks: { - foreign: "mainnet", - }, - verify: { - etherscan: { - apiUrl: "https://api.etherscan.io/v2/api", - apiKey: process.env.ETHERSCAN_API_KEY, - }, - }, - }, - // Foreign chain --------------------------------------------------------------------------------- - sepolia: { - chainId: 11155111, - url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`, - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - live: true, - saveDeployments: true, - tags: ["staging", "foreign", "layer1"], - companionNetworks: { - home: "arbitrumSepolia", - }, - verify: { - etherscan: { - apiUrl: "https://api.etherscan.io/v2/api", - apiKey: process.env.ETHERSCAN_API_KEY, - }, - }, - }, - sepoliaDevnet: { - chainId: 11155111, - url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`, - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - live: true, - saveDeployments: true, - tags: ["staging", "foreign", "layer1"], - companionNetworks: { - home: "arbitrumSepoliaDevnet", - }, - verify: { - etherscan: { - apiUrl: "https://api.etherscan.io/v2/api", - apiKey: process.env.ETHERSCAN_API_KEY, - }, - }, - }, - mainnet: { - chainId: 1, - url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`, - accounts: process.env.MAINNET_PRIVATE_KEY !== undefined ? [process.env.MAINNET_PRIVATE_KEY] : [], - live: true, - saveDeployments: true, - tags: ["production", "foreign", "layer1"], - companionNetworks: { - home: "arbitrum", - }, - verify: { - etherscan: { - apiUrl: "https://api.etherscan.io/v2/api", - apiKey: process.env.ETHERSCAN_API_KEY, - }, - }, - }, - chiado: { - chainId: 10200, - url: "https://rpc.chiado.gnosis.gateway.fm", - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - live: true, - saveDeployments: true, - tags: ["staging", "foreign", "layer1"], - companionNetworks: { - home: "arbitrumSepolia", - }, - verify: { - etherscan: { - apiUrl: "https://gnosis-chiado.blockscout.com", - apiKey: "", - }, - }, - }, - chiadoDevnet: { - chainId: 10200, - url: "https://rpc.chiado.gnosis.gateway.fm", - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - live: true, - saveDeployments: true, - tags: ["staging", "foreign", "layer1"], - companionNetworks: { - home: "arbitrumSepoliaDevnet", - }, - verify: { - etherscan: { - apiUrl: "https://gnosis-chiado.blockscout.com", - apiKey: "", - }, - }, - }, - gnosischain: { - chainId: 100, - url: `https://rpc.gnosis.gateway.fm`, - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - live: true, - saveDeployments: true, - tags: ["production", "foreign", "layer1"], - verify: { - etherscan: { - apiKey: process.env.GNOSISSCAN_API_KEY, - }, - }, - }, - }, - namedAccounts: { - deployer: { - default: 0, - }, - relayer: { - default: 1, - }, - bridger: { - default: 2, - }, - challenger: { - default: 3, - }, - firstWallet: { - default: "0x1cC9304B31F05d27470ccD855b05310543b70f17", - }, - secondWallet: { - default: "0x4D74a4FD4057a770da74b0C3e9fa8A02f7f09c94", - }, - thirdWallet: { - default: "0xBe7ee23877D530b8a17971CfDA7B5925b57e87B1", - }, - fourthWallet: { - default: "0x01ba2b3D0eceAD6358aEcD508221A70f6CA4f6ea", - }, - fifthWallet: { - default: "0xE64DC94D545C10b2364F4aBAf9F6F416dAcED13a", - }, - }, - gasReporter: { - enabled: process.env.REPORT_GAS !== undefined ? process.env.REPORT_GAS === "true" : false, - currency: "USD", - }, - verify: { - etherscan: { - apiKey: process.env.ETHERSCAN_API_KEY_FIX, - }, - }, - watcher: { - compilation: { - tasks: ["compile"], - files: ["./contracts"], - verbose: true, - }, - testArbitration: { - tasks: [ - { command: "compile", params: { quiet: true } }, - { - command: "test", - params: { - noCompile: true, - testFiles: ["./test/arbitration/index.ts"], - }, - }, - ], - files: ["./test/**/*", "./src/**/*"], - }, - }, - docgen: { - path: "./docs", - clear: true, - runOnCompile: false, - }, - mocha: { - timeout: 20000, - }, - tenderly: { - project: process.env.TENDERLY_PROJECT !== undefined ? process.env.TENDERLY_PROJECT : "kleros-v2", - username: process.env.TENDERLY_USERNAME !== undefined ? process.env.TENDERLY_USERNAME : "", - }, - external: { - // https://github.com/wighawag/hardhat-deploy#importing-deployment-from-other-projects-with-truffle-support - deployments: { - arbitrumSepolia: ["../node_modules/@kleros/vea-contracts/deployments/arbitrumSepolia"], - arbitrumSepoliaDevnet: ["../node_modules/@kleros/vea-contracts/deployments/arbitrumSepolia"], - arbitrum: ["../node_modules/@kleros/vea-contracts/deployments/arbitrum"], - chiado: ["../node_modules/@kleros/vea-contracts/deployments/chiado"], - chiadoDevnet: ["../node_modules/@kleros/vea-contracts/deployments/chiado"], - gnosischain: ["../node_modules/@kleros/vea-contracts/deployments/gnosischain"], - sepolia: ["../node_modules/@kleros/vea-contracts/deployments/sepolia"], - sepoliaDevnet: ["../node_modules/@kleros/vea-contracts/deployments/sepolia"], - mainnet: ["../node_modules/@kleros/vea-contracts/deployments/mainnet"], - }, - }, -}; - -export default config; diff --git a/contracts/lib/forge-std b/contracts/lib/forge-std deleted file mode 160000 index 8f24d6b04..000000000 --- a/contracts/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8f24d6b04c92975e0795b5868aa0d783251cdeaa diff --git a/contracts/lib/solmate b/contracts/lib/solmate deleted file mode 160000 index 3998897ac..000000000 --- a/contracts/lib/solmate +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3998897acb502fa7b480f505138a6ae1842e8d10 diff --git a/contracts/package.json b/contracts/package.json deleted file mode 100644 index fd40b404d..000000000 --- a/contracts/package.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "name": "@kleros/kleros-v2-contracts", - "version": "0.12.0", - "description": "Smart contracts for Kleros version 2", - "main": "./cjs/deployments/index.js", - "module": "./esm/deployments/index.js", - "types": "./types/deployments/index.d.ts", - "exports": { - ".": { - "types": "./types/deployments/index.d.ts", - "import": "./esm/deployments/index.js", - "require": "./cjs/deployments/index.js", - "default": "./esm/deployments/index.js" - }, - "./cjs/deployments": { - "types": "./types/deployments/index.d.ts", - "require": "./cjs/deployments/index.js", - "default": "./cjs/deployments/index.js" - }, - "./esm/deployments": { - "types": "./types/deployments/index.d.ts", - "import": "./esm/deployments/index.js", - "default": "./esm/deployments/index.js" - } - }, - "files": [ - "types", - "esm", - "cjs", - "arbitration", - "gateway", - "kleros-v1", - "libraries", - "proxy", - "rng", - "token", - "utils", - "typechain-types", - "deployments", - "index.ts" - ], - "repository": "git@github.com:kleros/kleros-v2.git", - "homepage": "https://github.com/kleros/kleros-v2/tree/master/contracts#readme", - "author": "Kleros", - "license": "MIT", - "engines": { - "node": ">=16.0.0" - }, - "volta": { - "node": "20.18.3" - }, - "publishConfig": { - "access": "public", - "tag": "latest" - }, - "scripts": { - "build": "hardhat compile", - "clean": "hardhat clean", - "check": "hardhat check", - "test": "TS_NODE_TRANSPILE_ONLY=1 hardhat test", - "coverage": "scripts/coverage.sh", - "start": "hardhat node --tags nop", - "start-local": "hardhat node --tags Arbitration,HomeArbitrable --hostname 0.0.0.0", - "deploy": "hardhat deploy", - "deploy-local": "hardhat deploy --tags Arbitration,HomeArbitrable --network localhost", - "validate-upgrades": "openzeppelin-upgrades-core validate --exclude 'src/proxy/mock/**/*.sol' --exclude 'src/test/**/*.sol' artifacts/build-info", - "validate-upgrades-against-deployed": "hardhat compare-storage", - "simulate": "hardhat simulate:all", - "simulate-local": "hardhat simulate:all --network localhost", - "viem:generate-devnet": "NODE_NO_WARNINGS=1 wagmi generate -c wagmi.config.devnet.ts", - "viem:generate-testnet": "NODE_NO_WARNINGS=1 wagmi generate -c wagmi.config.testnet.ts", - "viem:generate-mainnet": "NODE_NO_WARNINGS=1 wagmi generate -c wagmi.config.mainnet.ts", - "viem:generate-hardhat": "NODE_NO_WARNINGS=1 wagmi generate -c wagmi.config.hardhat.ts", - "export:devnet": "yarn hardhat export --export deployments/arbitrumSepoliaDevnet.ts --network arbitrumSepoliaDevnet", - "export:testnet": "yarn hardhat export --export deployments/arbitrumSepolia.ts --network arbitrumSepolia", - "export:mainnet": "yarn hardhat export --export deployments/arbitrum.ts --network arbitrum", - "viem:test": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch ts-node ./scripts/viemTest.ts", - "bot:keeper": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch hardhat run ./scripts/keeperBot.ts", - "bot:relayer-from-chiado": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch hardhat run ./scripts/disputeRelayerBotFromChiado.ts", - "bot:relayer-from-sepolia": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch hardhat run ./scripts/disputeRelayerBotFromSepolia.ts", - "bot:relayer-from-hardhat": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch hardhat run ./scripts/disputeRelayerBotFromHardhat.ts", - "bot:disputor": "NODE_NO_WARNINGS=1 yarn hardhat run ./scripts/disputeCreatorBot.ts", - "etherscan-verify": "hardhat etherscan-verify", - "etherscan-verify-proxies": "scripts/verifyProxies.sh", - "sourcify": "hardhat sourcify --write-failing-metadata", - "size": "hardhat size-contracts --no-compile", - "watch": "hardhat watch", - "natspec-smells": "natspec-smells", - "docgen": "hardhat docgen", - "docserve": "scripts/docPreprocess.sh && forge doc --serve", - "docbuild": "scripts/docPreprocess.sh && forge doc --build --out dist && scripts/docPostprocess.sh", - "populate:courts:devnet": "hardhat populate:courts --from v2_devnet --network arbitrumSepoliaDevnet", - "populate:courts:testnet": "hardhat populate:courts --from v2_testnet --network arbitrumSepolia", - "populate:courts:mainnet": "hardhat populate:courts --from v2_mainnet --network arbitrum", - "populate:policiesUris": "scripts/setPoliciesURIs.sh config/policies.v2.{devnet,testnet,mainnet}.json", - "populate:policies:devnet": "hardhat populate:policy-registry --from v2_devnet --network arbitrumSepoliaDevnet", - "populate:policies:testnet": "hardhat populate:policy-registry --from v2_testnet --network arbitrumSepolia", - "populate:policies:mainnet": "hardhat populate:policy-registry --from v2_mainnet --network arbitrum", - "release:patch": "scripts/publish.sh patch", - "release:minor": "scripts/publish.sh minor", - "release:major": "scripts/publish.sh major", - "tenderly-verify": "hardhat tenderly:verify", - "build:all": "rm -rf ./dist && yarn build:cjs && yarn build:esm && yarn build:types", - "build:cjs": "tsc --project tsconfig-release.json --module CommonJS --moduleResolution Node --outDir ./dist/cjs && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json", - "build:esm": "tsc --project tsconfig-release.json --module NodeNext --moduleResolution NodeNext --outDir ./dist/esm && echo '{\"type\": \"module\"}' > ./dist/esm/package.json", - "build:types": "tsc --project tsconfig-release.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap" - }, - "devDependencies": { - "@defi-wonderland/natspec-smells": "^1.1.6", - "@kleros/kleros-v2-eslint-config": "workspace:^", - "@kleros/kleros-v2-prettier-config": "workspace:^", - "@kleros/kleros-v2-tsconfig": "workspace:^", - "@logtail/pino": "^0.5.0", - "@nomicfoundation/hardhat-chai-matchers": "^2.1.0", - "@nomicfoundation/hardhat-ethers": "^3.1.0", - "@nomiclabs/hardhat-solhint": "^4.1.0", - "@openzeppelin/upgrades-core": "^1.44.1", - "@typechain/ethers-v6": "^0.5.1", - "@typechain/hardhat": "^9.1.0", - "@types/chai": "^4.3.20", - "@types/mocha": "^10.0.10", - "@types/node": "^20.17.6", - "@types/sinon": "^17.0.4", - "@wagmi/cli": "^2.3.2", - "abitype": "^0.10.3", - "chai": "^4.5.0", - "dotenv": "^16.6.1", - "eslint": "^9.15.0", - "ethereumjs-util": "^7.1.5", - "ethers": "^6.15.0", - "gluegun": "^5.2.0", - "graphql": "^16.9.0", - "graphql-request": "^7.1.2", - "hardhat": "2.26.2", - "hardhat-contract-sizer": "^2.10.0", - "hardhat-deploy": "^1.0.4", - "hardhat-deploy-ethers": "^0.4.2", - "hardhat-deploy-tenderly": "^0.2.1", - "hardhat-docgen": "^1.3.0", - "hardhat-gas-reporter": "^2.3.0", - "hardhat-tracer": "^3.2.1", - "hardhat-watcher": "^2.5.0", - "pino": "^8.21.0", - "pino-pretty": "^10.3.1", - "prettier": "^3.3.3", - "prettier-plugin-solidity": "^1.4.2", - "shelljs": "^0.8.5", - "sinon": "^20.0.0", - "solhint-plugin-prettier": "^0.1.0", - "solidity-coverage": "^0.8.16", - "ts-node": "^10.9.2", - "typechain": "^8.3.2", - "typescript": "^5.6.3" - }, - "dependencies": { - "@chainlink/contracts": "^1.4.0", - "@kleros/vea-contracts": "^0.7.0", - "@openzeppelin/contracts": "^5.4.0", - "@shutter-network/shutter-sdk": "0.0.2", - "isomorphic-fetch": "^3.0.0" - }, - "peerDependencies": { - "viem": "^2.24.1" - }, - "peerDependenciesMeta": { - "viem": { - "optional": false - } - } -} diff --git a/contracts/remappings.txt b/contracts/remappings.txt deleted file mode 100644 index 8e7410cdc..000000000 --- a/contracts/remappings.txt +++ /dev/null @@ -1,9 +0,0 @@ -@ensdomains/=../node_modules/@ensdomains/ -@openzeppelin/=../node_modules/@openzeppelin/ -@kleros/=../node_modules/@kleros/ -ds-test/=lib/forge-std/lib/ds-test/src/ -eth-gas-reporter/=../node_modules/eth-gas-reporter/ -forge-std/=lib/forge-std/src/ -hardhat-deploy/=../node_modules/hardhat-deploy/ -hardhat/=../node_modules/hardhat/ -solmate/=lib/solmate/src/ diff --git a/contracts/scripts/changeOwner.ts b/contracts/scripts/changeOwner.ts deleted file mode 100644 index fcb64137b..000000000 --- a/contracts/scripts/changeOwner.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { task } from "hardhat/config"; -import { prompt, print } from "gluegun"; -import { Cores, getContracts } from "./utils/contracts"; -import { isAddress } from "viem"; - -const { bold } = print.colors; - -task("change-owner", "Changes the owner for all the contracts") - .addPositionalParam("newOwner", "The address of the new owner") - .addOptionalParam("coreType", "The type of core to use between base, university (default: base)", Cores.BASE) - .setAction(async (taskArgs, hre) => { - const newOwner = taskArgs.newOwner; - if (!isAddress(newOwner)) { - throw new Error("Invalid owner address provided"); - } - print.highlight(`💣 Changing owner to ${bold(newOwner)}`); - - const { confirm } = await prompt.ask({ - type: "confirm", - name: "confirm", - message: "Are you sure you want to proceed?", - }); - if (!confirm) { - console.log("Operation cancelled by user."); - return; - } - - const coreType = Cores[taskArgs.coreType.toUpperCase() as keyof typeof Cores]; - if (coreType === undefined) { - console.error("Invalid core type, must be one of base, university"); - return; - } - console.log("Using core type %s", coreType); - - const { - core, - disputeKitClassic, - disputeResolver, - disputeTemplateRegistry, - policyRegistry, - chainlinkRng, - randomizerRng, - snapshotProxy, - sortition, - evidence, - } = await getContracts(hre, coreType); - - const updateOwner = async (contractName: string, contractInstance: any) => { - print.info(`Changing owner for ${contractName}`); - - const spinner = print.spin(`Executing transaction for ${contractName}...`); - try { - const tx = await contractInstance.changeOwner(newOwner); - await tx.wait(); - spinner.succeed(`Owner changed for ${contractName}, tx hash: ${tx.hash}`); - } catch (error) { - if (error instanceof Error) { - spinner.fail(`Failed to change owner for ${contractName}: ${error.message}`); - } else { - spinner.fail(`Failed to change owner for ${contractName}: ${String(error)}`); - } - } - }; - - await updateOwner("KlerosCore", core); - await updateOwner("DisputeKitClassic", disputeKitClassic); - await updateOwner("DisputeResolver", disputeResolver); - await updateOwner("DisputeTemplateRegistry", disputeTemplateRegistry); - await updateOwner("PolicyRegistry", policyRegistry); - await updateOwner("KlerosCoreSnapshotProxy", snapshotProxy); - await updateOwner("SortitionModule", sortition); - await updateOwner("EvidenceModule", evidence); - if (chainlinkRng) await updateOwner("ChainlinkRNG", chainlinkRng); - if (randomizerRng) await updateOwner("RandomizerRNG", randomizerRng); - - print.success("Owner changed successfully"); - }); diff --git a/contracts/scripts/compareStorageLayout.ts b/contracts/scripts/compareStorageLayout.ts deleted file mode 100644 index c774c000a..000000000 --- a/contracts/scripts/compareStorageLayout.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { task } from "hardhat/config"; -import { readFileSync } from "fs"; -import path from "path"; -import { print } from "gluegun"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { getStorageUpgradeReport, ValidationOptions } from "@openzeppelin/upgrades-core"; - -const { bold } = print.colors; - -task("compare-storage", "Compare storage layout between deployed and modified contracts") - .addParam("contract", "The name of the contract to compare against") - .addOptionalParam("deployedArtifact", "The name of the deployed contract artifact in deployments") - .setAction(async ({ deployedArtifact, contract }, hre: HardhatRuntimeEnvironment) => { - try { - // Get storage layout of the deployed contract implementation - const artifactName = deployedArtifact || `${contract}_Implementation`; - const deployedArtifactPath = path.resolve(`deployments/${hre.network.name}/${artifactName}.json`); - const deployedJson = JSON.parse(readFileSync(deployedArtifactPath, "utf8")); - const originalLayout = deployedJson.storageLayout; - - // Get storage layout of the modified contract - const buildInfos = await hre.artifacts.getBuildInfoPaths(); - const buildInfo = buildInfos.find((buildInfo) => { - const content = JSON.parse(readFileSync(buildInfo, "utf8")); - return Object.keys(content.output.contracts).some((file) => - Object.keys(content.output.contracts[file]).includes(contract) - ); - }); - - if (!buildInfo) { - throw new Error(`Could not find build info for contract ${contract}`); - } - - const buildInfoContent = JSON.parse(readFileSync(buildInfo, "utf8")); - const contractFile = Object.keys(buildInfoContent.output.contracts).find((file) => - Object.keys(buildInfoContent.output.contracts[file]).includes(contract) - ); - - if (!contractFile) { - throw new Error(`Could not find contract ${contract} in build info`); - } - - const contractData = buildInfoContent.output.contracts[contractFile][contract]; - const updatedLayout = contractData.storageLayout; - - // Compare layouts using OpenZeppelin's report - const validationOptions: Required = { - unsafeAllowCustomTypes: true, - unsafeAllowRenames: false, - unsafeAllow: [], - unsafeSkipStorageCheck: false, - unsafeAllowLinkedLibraries: false, - kind: "uups", - }; - - const report = getStorageUpgradeReport(originalLayout, updatedLayout, validationOptions); - - if (report.ok) { - print.success("✓ No storage layout incompatibilities found"); - return; - } - - const explanation = report.explain(); - print.error(`✗ ${explanation}`); - print.info("-".repeat(100)); - } catch (error) { - print.error("\nError comparing storage layouts:"); - print.error(error); - process.exit(1); - } - }); diff --git a/contracts/scripts/console-init-chiado-resolver.ts b/contracts/scripts/console-init-chiado-resolver.ts deleted file mode 100644 index daedb3ccc..000000000 --- a/contracts/scripts/console-init-chiado-resolver.ts +++ /dev/null @@ -1,29 +0,0 @@ -// TODO: SDK utility formatDisputeExtraData(_courtId, _nbOfJurors): string -// TODO: SDK utility formatDisputeExtraData(_courtId, _nbOfJurors, disputeKitId): string - -// On the foreign chain -const extraData = - "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003"; -const template = `{"$schema":"../NewDisputeTemplate.schema.json","title":"Add an entry to Ledger Contract Domain Name registry v2","description":"Someone requested to add an entry to Ledger Contract Domain Name registry v2","question":"Does the entry comply with the required criteria?","answers":[{"title":"Yes, Add It","description":"Select this if you think the entry complies with the required criteria and should be added."},{"title":"No, Don't Add It","description":"Select this if you think the entry does not comply with the required criteria and should not be added."}],"policyURI":"/ipfs/QmdvkC5Djgk8MfX5ijJR3NJzmvGugUqvui7bKuTErSD6cE/contract-domain-name-registry-for-ledger-policy-3-.pdf","frontendUrl":"https://curate.kleros.io/tcr/%s/%s/%s","arbitrableChainID":"100","arbitrableAddress":"0x957A53A994860BE4750810131d9c876b2f52d6E1","arbitratorChainID":"421614","arbitratorAddress":"0xD08Ab99480d02bf9C092828043f611BcDFEA917b","category":"Curated Lists","specification":"KIP88"}`; -const nbOfChoices = 2; -const cost = await foreignGateway.arbitrationCost(extraData); -const tx = await resolver.createDisputeForTemplate(extraData, template, "disputeTemplateMapping: TODO", nbOfChoices, { - value: cost, -}); - -// Or to test the fallback to IPFS -const uri = "/ipfs/QmQ9...."; -const tx2 = await resolver.createDisputeForTemplateUri(extraData, uri, nbOfChoices, { value: cost }); - -// Then a relayer must relay the dispute on the HomeGateway... - -core = await ethers.getContract("KlerosCore"); -resolver = await ethers.getContract("DisputeResolver"); -extraData = - "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003"; -template = `{"$schema":"../NewDisputeTemplate.schema.json","title":"Add an entry to Ledger Contract Domain Name registry v2","description":"Someone requested to add an entry to Ledger Contract Domain Name registry v2","question":"Does the entry comply with the required criteria?","answers":[{"title":"Yes, Add It","description":"Select this if you think the entry complies with the required criteria and should be added."},{"title":"No, Don't Add It","description":"Select this if you think the entry does not comply with the required criteria and should not be added."}],"policyURI":"/ipfs/QmdvkC5Djgk8MfX5ijJR3NJzmvGugUqvui7bKuTErSD6cE/contract-domain-name-registry-for-ledger-policy-3-.pdf","frontendUrl":"https://curate.kleros.io/tcr/%s/%s/%s","arbitrableChainID":"100","arbitrableAddress":"0x957A53A994860BE4750810131d9c876b2f52d6E1","arbitratorChainID":"421614","arbitratorAddress":"0xD08Ab99480d02bf9C092828043f611BcDFEA917b","category":"Curated Lists","specification":"KIP88"}`; -nbOfChoices = 2; -cost = await core.arbitrationCost(extraData); -tx = await resolver.createDisputeForTemplate(extraData, template, "disputeTemplateMapping: TODO", nbOfChoices, { - value: cost, -}); diff --git a/contracts/scripts/console-init-chiado.ts b/contracts/scripts/console-init-chiado.ts deleted file mode 100644 index 97d9e2ac1..000000000 --- a/contracts/scripts/console-init-chiado.ts +++ /dev/null @@ -1,116 +0,0 @@ -// .load scripts/console-init-chiado.ts -receiver = await ethers.getContract("VeaInboxArbToGnosisDevnet"); -gateway = await ethers.getContract("ForeignGatewayOnGnosis"); -weth = await ethers.getContract("WETH"); -wethFaucet = await ethers.getContract("WETHFaucet"); -wpnk = await ethers.getContract("WrappedPinakionV2"); -wpnkFaucet = await ethers.getContract("WPNKFaucet"); -xKlerosLiquidV2 = await ethers.getContract("xKlerosLiquidV2"); -arbitrable = await ethers.getContract("ArbitrableExample"); -options = { - gasLimit: 10000000, - maxFeePerGas: ethers.utils.parseUnits("1", "gwei"), - maxPriorityFeePerGas: ethers.utils.parseUnits("1", "gwei"), -}; - -// await weth.transfer(wethFaucet.address, ethers.utils.parseEther("100000")) -// await wethFaucet.request(options) - -const createDispute = async () => { - const choices = 2; - const extraData = - "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003"; - const metaEvidenceID = 0; - const evidenceID = ethers.BigNumber.from(ethers.utils.randomBytes(32)); - const feeForJuror = await gateway.arbitrationCost(extraData); - var tx; - try { - tx = await (await weth.increaseAllowance(arbitrable.address, feeForJuror, options)).wait(); - console.log("txID increateAllowance: %s", tx?.transactionHash); - tx = await ( - await arbitrable.createDispute(choices, extraData, metaEvidenceID, evidenceID, feeForJuror, options) - ).wait(); - console.log("txID createDispute: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - if (tx) { - var filter = gateway.filters.DisputeCreation(); - var logs = await gateway.queryFilter(filter, tx.blockNumber, tx.blockNumber); - console.log("Gateway DisputeID: %s", logs[0]?.args?._disputeID); - - filter = gateway.filters.OutgoingDispute(); - logs = await gateway.queryFilter(filter, tx.blockNumber, tx.blockNumber); - console.log("Outgoing Dispute: %O", logs[0]?.args); - } - } -}; - -const epochPeriod = await receiver.epochPeriod(); - -const epochID = async () => { - return Math.floor((await ethers.provider.getBlock("latest")).timestamp / epochPeriod); -}; - -const claim = async (epoch, merkleRoot) => { - const deposit = await receiver.deposit(); - try { - const tx = await ( - await receiver.claim(epoch, merkleRoot, { - value: deposit, - ...options, - }) - ).wait(); - console.log("txID: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } -}; - -const verifyBatch = async (epoch) => { - var tx; - try { - tx = await (await receiver.verifyBatch(epoch, options)).wait(); - console.log("txID: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - const filter = receiver.filters.BatchVerified(); - const logs = await receiver.queryFilter(filter, tx?.blockNumber, tx?.blockNumber); - console.log("BatchVerified: %O", logs[0]?.args); - } -}; - -const verifyAndRelay = async (epoch, message) => { - var tx; - try { - tx = await (await receiver.verifyAndRelayMessage(epoch, [], message, options)).wait(); - console.log("txID: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - var filter = receiver.filters.MessageRelayed(); - var logs = await receiver.queryFilter(filter, tx?.blockNumber, tx?.blockNumber); - console.log("MessageRelayed: %O", logs[0]?.args); - - filter = arbitrable.filters.Ruling(); - logs = await arbitrable.queryFilter(filter, tx?.blockNumber, tx?.blockNumber); - console.log("Ruling: %O", logs[0]?.args); - } -}; diff --git a/contracts/scripts/console-init.ts b/contracts/scripts/console-init.ts deleted file mode 100644 index e5849f85e..000000000 --- a/contracts/scripts/console-init.ts +++ /dev/null @@ -1,240 +0,0 @@ -// .load scripts/console-init.ts -me = (await ethers.provider.listAccounts())[0]; -core = await ethers.getContract("KlerosCore"); -sortition = await hre.ethers.getContract("SortitionModule"); -disputeKit = await ethers.getContract("DisputeKitClassic"); -pnk = await ethers.getContract("PNK"); -registry = await ethers.getContract("PolicyRegistry"); -rng = await ethers.getContract("RandomizerRNG"); -rng2 = await ethers.getContract("BlockHashRNG"); -gateway = await ethers.getContract("HomeGatewayToGnosis"); -resolver = await ethers.getContract("DisputeResolver"); -faucet = await ethers.getContract("PNKFaucet"); -sender = await ethers.getContract("VeaOutboxArbToGnosisDevnet"); -options = { gasLimit: 10000000, gasPrice: 5000000000 }; -var disputeID = 0; - -console.log("sortition phase: %s", await sortition.phase()); -console.log("freezingPhase timeout? %s", await core.freezingPhaseTimeout()); - -const relayCreateDispute = async (blockHash, foreignDisputeID) => { - // const blockHash = "0xda3c4d74eeb199345b771748a930a069b172dac9f4b50697f40803581eb13990"; - // const foreignDisputeID = 6; - const extraData = - "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003"; - const fee = await core.arbitrationCost(extraData); - var tx; - try { - tx = await ( - await gateway.relayCreateDispute( - 10200, - blockHash, - foreignDisputeID, - 2, - extraData, - "0x34E520dc1d2Db660113b64724e14CEdCD01Ee879", - { - value: fee, - ...options, - } - ) - ).wait(); - console.log("txID: %s", tx?.transactionHash); - - disputeID = ( - await core.queryFilter(core.filters.DisputeCreation(), tx.blockNumber, tx.blockNumber) - )[0].args._disputeID.toNumber(); - console.log("Using disputeID %d from now", disputeID); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - if (tx) { - const filter = core.filters.DisputeCreation(); - const logs = await core.queryFilter(filter, tx.blockNumber, tx.blockNumber); - console.log("DisputeID: %s", logs[0]?.args?._disputeID); - } - } -}; - -const createDisputeOnResolver = async () => { - const choices = 2; - const nbOfJurors = 3; - const feeForJuror = (await core.courts(1)).feeForJuror; - var tx; - try { - tx = await ( - await resolver.createDispute( - "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", - "", - 2, - { - value: feeForJuror.mul(nbOfJurors), - ...options, - } - ) - ).wait(); - console.log("txID: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - if (tx) { - const filter = core.filters.DisputeCreation(); - const logs = await core.queryFilter(filter, tx.blockNumber, tx.blockNumber); - console.log("DisputeID: %s", logs[0]?.args?._disputeID); - } - } -}; - -const passPhase = async () => { - const before = await sortition.phase(); - var tx; - try { - tx = await (await sortition.passPhase(options)).wait(); - console.log("txID: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - const after = await sortition.phase(); - console.log("Phase: %d -> %d", before, after); - } -}; - -const passPeriod = async () => { - const before = (await core.disputes(disputeID)).period; - var tx; - try { - tx = await (await core.passPeriod(disputeID, options)).wait(); - console.log("txID: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - const after = (await core.disputes(disputeID)).period; - console.log("Period for dispute %s: %d -> %d", disputeID, before, after); - } -}; - -const drawJurors = async () => { - var info = await core.getRoundInfo(disputeID, 0); - console.log("Drawn jurors before: %O", info.drawnJurors); - let tx; - try { - tx = await (await core.draw(disputeID, 10, options)).wait(); - console.log("txID: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - info = await core.getRoundInfo(disputeID, 0); - console.log("Drawn jurors after: %O", info.drawnJurors); - } -}; - -const isRngReady = async () => { - const requesterID = await rng.requesterToID(disputeKit.address); - const n = await rng.randomNumbers(requesterID); - if (n.eq(0)) { - console.log("rng is NOT ready."); - return false; - } else { - console.log("rng is ready: %s", n.toString()); - return true; - } -}; - -const getRoundInfo = async () => { - console.log("%O", await core.getRoundInfo(disputeID, 0)); -}; - -const executeRuling = async () => { - let tx; - try { - tx = await (await core.execute(disputeID, 0, 10)).wait(); // redistribute - console.log("txID execute: %s", tx?.transactionHash); - - tx = await (await core.executeRuling(disputeID)).wait(); // rule - console.log("txID executeRuling: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - const dispute = await core.disputes(0); - console.log("Ruled? %s", dispute.ruled); - - const ruling = await core.currentRuling(disputeID); - console.log("Ruling: %d, Tied? %s, Overridden? %s", ruling.ruling, ruling.tied, ruling.overridden); - - var filter = sender.filters.MessageReceived(); - var logs = await sender.queryFilter(filter, tx?.blockNumber, tx?.blockNumber); - console.log("MessageReceived: %O", logs[0]?.args); - } -}; - -const toVoting = async () => { - console.log("Running for disputeID %d", disputeID); - var ready; - try { - ready = await passPhaseCore().then(passPhaseDk).then(passPhaseDk).then(isRngReady); - } catch (e) { - ready = false; - } - while (!ready) { - console.log("Waiting for RNG to be ready...", disputeID); - await new Promise((r) => setTimeout(r, 10000)); - ready = await isRngReady(); - } - console.log("RNG is ready, drawing jurors.", disputeID); - await drawJurors().then(passPhaseDk).then(passPhaseCore).then(passPeriod); -}; - -const epochPeriod = await sender.epochPeriod(); - -const epochID = async () => { - return Math.floor((await ethers.provider.getBlock("latest")).timestamp / epochPeriod); -}; - -const anyBatchToSend = async () => { - return await sender.batchSize(); -}; - -const sendBatch = async () => { - const before = await disputeKit.phase(); - var tx; - try { - tx = await (await sender.sendBatch(options)).wait(); - console.log("txID: %s", tx?.transactionHash); - } catch (e) { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } - } finally { - const filter = sender.filters.BatchOutgoing(); - const logs = await sender.queryFilter(filter, tx.blockNumber, tx.blockNumber); - console.log("BatchOutgoing: %O", logs[0]?.args); - } -}; - -console.log("disputeID not set!"); diff --git a/contracts/scripts/coverage.sh b/contracts/scripts/coverage.sh deleted file mode 100755 index 9a1fc24eb..000000000 --- a/contracts/scripts/coverage.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash - -set -e # exit on error - -rm -rf coverage -mkdir -p coverage - -# Generate the Forge coverage report -forge clean -if [ "$CI" != "true" ]; then - echo "Building contracts with Forge..." - forge build - echo "Running Forge coverage..." - forge coverage --report summary --report lcov --report-file coverage/lcov-forge.info - echo "Forge coverage report generated" -else - # FIXME: Temporarily workaround a CI issue - touch coverage/lcov-forge.info -fi - -# Generate the Hardhat coverage report -yarn clean -echo "Building contracts with Hardhat..." -export VIA_IR=false -yarn build -echo "Running Hardhat coverage..." -yarn hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --show-stack-traces --testfiles "test/**/*.ts" -echo "Hardhat coverage report generated" -mv coverage/lcov.info coverage/lcov-hardhat.info - -# Make the Hardhat report paths relative for consistency with Forge coverage report -sed -i -e 's/\/.*\/kleros-v2\/contracts\///g' coverage/lcov-hardhat.info - -# Merge the two reports -lcov \ - --ignore-errors format \ - --ignore-errors inconsistent \ - --ignore-errors empty \ - --rc max_message_count=3 \ - --rc derive_function_end_line=0 \ - --rc branch_coverage=1 \ - --add-tracefile coverage/lcov-hardhat.info \ - --add-tracefile coverage/lcov-forge.info \ - --output-file coverage/merged-lcov.info - -# Filter out unnecessary contracts from the report -lcov \ - --ignore-errors format \ - --ignore-errors inconsistent \ - --ignore-errors empty \ - --ignore-errors unused \ - --rc max_message_count=3 \ - --rc branch_coverage=1 \ - --rc derive_function_end_line=0 \ - --remove coverage/merged-lcov.info \ - --output-file coverage/filtered-lcov.info \ - "../node_modules" "src/test" "src/token" "src/kleros-v1" "src/proxy/mock" "src/gateway/mock" "src/rng/mock" - -# Open more granular breakdown in browser -if [ "$CI" != "true" ]; then - # Generate the HTML report - genhtml coverage/filtered-lcov.info \ - --ignore-errors format \ - --ignore-errors inconsistent \ - --ignore-errors empty \ - --ignore-errors category \ - --rc branch_coverage=1 \ - --rc max_message_count=3 \ - -o coverage - open coverage/index.html -fi diff --git a/contracts/scripts/disputeCreatorBot.ts b/contracts/scripts/disputeCreatorBot.ts deleted file mode 100644 index b2e2ede07..000000000 --- a/contracts/scripts/disputeCreatorBot.ts +++ /dev/null @@ -1,78 +0,0 @@ -import env from "./utils/env"; -import loggerFactory from "./utils/logger"; -import hre = require("hardhat"); -import { KlerosCore, DisputeResolver } from "../typechain-types"; - -const { ethers } = hre; - -const HEARTBEAT_URL = env.optionalNoDefault("HEARTBEAT_URL_DISPUTOR_BOT"); -const loggerOptions = env.optionalNoDefault("LOGTAIL_TOKEN_DISPUTOR_BOT") - ? { - transportTargetOptions: { - target: "@logtail/pino", - options: { sourceToken: env.require("LOGTAIL_TOKEN_DISPUTOR_BOT") }, - level: env.optional("LOG_LEVEL", "info"), - }, - level: env.optional("LOG_LEVEL", "info"), // for pino-pretty - } - : {}; -const logger = loggerFactory.createLogger(loggerOptions); - -export default async function main() { - logger.info("Starting up"); - - const core = (await ethers.getContract("KlerosCore")) as KlerosCore; - const resolver = (await ethers.getContract("DisputeResolver")) as DisputeResolver; - - if (HEARTBEAT_URL) { - logger.debug("Sending heartbeat"); - fetch(HEARTBEAT_URL); - } else { - logger.debug("Heartbeat not set up, skipping"); - } - const extraData = - "0x" + - "0000000000000000000000000000000000000000000000000000000000000001" + // courtId 1 - "000000000000000000000000000000000000000000000000000000000000000B" + // minJurors 11 - "0000000000000000000000000000000000000000000000000000000000000002"; // disputeKitId 2 - const templates = [ - `{"title":"A reality.eth question","description":"A reality.eth question has been raised to arbitration.","question":"**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://cdn.kleros.link/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://cdn.kleros.link/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?","answers":[{"id":"0x01","title":"Yes","reserved":false},{"id":"0x02","title":"No","reserved":false},{"id":"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","title":"Answered Too Soon","reserved":true}],"policyURI":"/ipfs/QmZ5XaV2RVgBADq5qMpbuEwgCuPZdRgCeu8rhGtJWLV6yz","frontendUrl":"https://reality.eth.limo/app/#!/question/0xe78996a233895be74a66f451f1019ca9734205cc-0xe2a3bd38e3ad4e22336ac35b221bbbdd808d716209f84014c7bc3bf62f8e3b39","arbitrableChainID":"100","arbitrableAddress":"0x2e39b8f43d0870ba896f516f78f57cde773cf805","arbitratorChainID":"421614","arbitratorAddress":"0xD08Ab99480d02bf9C092828043f611BcDFEA917b","category":"Oracle","lang":"en_US","specification":"KIP99","version": "1.0"}`, - `{"title":"Add an entry to Ledger Contract Domain Name registry v2","description":"Someone requested to add an entry to Ledger Contract Domain Name registry v2","question":"Does the entry comply with the required criteria?","answers":[{"title":"Yes, Add It","description":"Select this if you think the entry complies with the required criteria and should be added."},{"title":"No, Don't Add It","description":"Select this if you think the entry does not comply with the required criteria and should not be added."}],"policyURI":"/ipfs/QmW3nQcMW2adyqe6TujRTYkyq26PiDqcmmTjdgKiz9ynPV","frontendUrl":"https://curate.kleros.io/tcr/100/0x957a53a994860be4750810131d9c876b2f52d6e1/0xc2c1aa705632f53051f22a9f65967c0944370020a7489aba608bd0d755ca1234","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Curation","specification":"KIP0X","lang":"en_US","version": "1.0"}`, - `{"title":"Omen Question: News & Politics","description":"This reality dispute has been created by Omen, we advise you to read [the Omen Rules](https://cdn.kleros.link/ipfs/QmU1oZzsduGwtC7vCUQPw1QcBP6BDNDkg4t6zkowPucVcx) and consult the evidence provided in [the Market Comments](https://omen.eth.limo/#/0x95b2271039b020aba31b933039e042b60b063800).","question":"**Assuming that today is December 20th 2020, will Joe Biden win the 2020 United States presidential election?**","answers":[{"title":"Yes"},{"title":"No"}],"policyURI":"/ipfs/QmU1oZzsduGwtC7vCUQPw1QcBP6BDNDkg4t6zkowPucVcx","frontendUrl":"https://omen.eth.limo/#/0x95b2271039b020aba31b933039e042b60b063800","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Oracle","specification":"KIP0X","lang":"en_US","version": "1.0"}`, - `{"title":"Proof of Humanity Registration Request","description":"A request to register the specified entry to a list of provable humans.","question":"Should the request to register be accepted?","answers":[{"title":"Yes","description":"Accept the request to register the entry."},{"title":"No","description":"Deny the request."}],"policyURI":"/ipfs/QmYPf2fdSyr9BiSy6pJFUmB1oTUPwg6dhEuFqL1n4ZosgH","frontendUrl":"https://app.proofofhumanity.id/profile/0x00de4b13153673bcae2616b67bf822500d325fc3?network=mainnet","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Curated List","specification":"KIP0X","lang":"en_US","version": "1.0"}`, - ]; - const randomTemplate = templates[Math.floor(Math.random() * templates.length)]; - const nbOfChoices = 2; - const cost = await core["arbitrationCost(bytes)"](extraData); - const tx = await resolver.createDisputeForTemplate( - extraData, - randomTemplate, - "disputeTemplateMapping: TODO", - nbOfChoices, - { - value: cost, - } - ); - - logger.info(`Dispute creation tx: ${tx.hash}`); - const blockNumber = await tx.wait().then((receipt) => receipt?.blockNumber); - const disputeId = await resolver - .queryFilter(resolver.filters.DisputeRequest(), blockNumber, blockNumber) - .then((events) => ethers.toBigInt(events[0].args[1])); - logger.info(`Dispute created with disputeId ${disputeId.toString()}`); - - logger.info("Shutting down"); - await delay(2000); // Some log messages may be lost otherwise -} - -const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }) - .finally(() => { - logger.flush(); - }); diff --git a/contracts/scripts/disputeRelayerBot.ts b/contracts/scripts/disputeRelayerBot.ts deleted file mode 100644 index 87848993a..000000000 --- a/contracts/scripts/disputeRelayerBot.ts +++ /dev/null @@ -1,114 +0,0 @@ -import env from "./utils/env"; -import loggerFactory from "./utils/logger"; -import hre = require("hardhat"); -import { - KlerosCore, - ForeignGateway__factory, - HomeGateway, - TestERC20, - IArbitrableV2__factory, -} from "../typechain-types"; -import { DisputeRequestEventObject } from "../typechain-types/src/arbitration/interfaces/IArbitrableV2"; -import { HttpNetworkConfig } from "hardhat/types"; -import { DeploymentsExtension } from "hardhat-deploy/types"; - -const { ethers } = hre; -const HEARTBEAT_URL = env.optionalNoDefault("HEARTBEAT_URL_RELAYER_BOT"); - -const loggerOptions = env.optionalNoDefault("LOGTAIL_TOKEN_RELAYER_BOT") - ? { - transportTargetOptions: { - target: "@logtail/pino", - options: { sourceToken: env.require("LOGTAIL_TOKEN_RELAYER_BOT") }, - level: env.optional("LOG_LEVEL", "info"), - }, - level: env.optional("LOG_LEVEL", "info"), // for pino-pretty - } - : {}; - -export default async function main( - foreignNetwork: HttpNetworkConfig, - foreignDeployments: DeploymentsExtension, - foreignGatewayArtifact: string, - homeGatewayArtifact: string, - feeTokenArtifact?: string -) { - const core = await ethers.getContract("KlerosCore"); - const homeGateway = await ethers.getContract(homeGatewayArtifact); - const feeToken = feeTokenArtifact ? await ethers.getContract(feeTokenArtifact) : undefined; - - const foreignChainProvider = new ethers.providers.JsonRpcProvider(foreignNetwork.url); - const foreignGatewayDeployment = await foreignDeployments.get(foreignGatewayArtifact); - const foreignGateway = await ForeignGateway__factory.connect(foreignGatewayDeployment.address, foreignChainProvider); - const foreignChainID = await foreignChainProvider.getNetwork().then((network) => network.chainId); - const arbitrableInterface = IArbitrableV2__factory.createInterface(); - - const logger = loggerFactory.createLogger(loggerOptions).child({ foreignChainId: foreignChainID }); - logger.info(`Listening for events from ${foreignGatewayArtifact}...`); - - if (HEARTBEAT_URL) { - logger.debug("Sending heartbeat"); - fetch(HEARTBEAT_URL); - } else { - logger.debug("Heartbeat not set up, skipping"); - } - - // Event subscription - // WARNING: The callback might run more than once if the script is restarted in the same block - // type Listener = [ eventArg1, ...eventArgN, transactionReceipt ] - foreignGateway.on( - "CrossChainDisputeOutgoing", - async (foreignBlockHash, foreignArbitrable, foreignDisputeID, choices, extraData, txReceipt) => { - logger.info( - `CrossChainDisputeOutgoing: ${foreignBlockHash} ${foreignArbitrable} ${foreignDisputeID} ${choices} ${extraData}` - ); - logger.debug(`tx receipt: ${JSON.stringify(txReceipt)}`); - - // txReceipt is missing the full logs for this tx so we need to request it here - const fullTxReceipt = await foreignChainProvider.getTransactionReceipt(txReceipt.transactionHash); - - // Retrieve the DisputeRequest event - const disputeRequests: DisputeRequestEventObject[] = fullTxReceipt.logs - .filter((log) => log.topics[0] === arbitrableInterface.getEventTopic("DisputeRequest")) - .map((log) => arbitrableInterface.parseLog(log).args as unknown as DisputeRequestEventObject); - logger.warn(`More than 1 DisputeRequest event: not supported yet, skipping the others events.`); - - const disputeRequest = disputeRequests[0]; - logger.info(`tx events DisputeRequest: ${JSON.stringify(disputeRequest)}`); - - const relayCreateDisputeParams = { - foreignBlockHash, - foreignChainID, - foreignArbitrable, - foreignDisputeID, - externalDisputeID: disputeRequest._externalDisputeID, - templateId: disputeRequest._templateId, - templateUri: disputeRequest._templateUri, - choices, - extraData, - }; - logger.info(`Relaying dispute to home chain... ${JSON.stringify(relayCreateDisputeParams)}`); - - let tx; - if (feeToken === undefined) { - // Paying in native Arbitrum ETH - const cost = (await core.functions["arbitrationCost(bytes)"](extraData)).cost; - tx = await homeGateway.functions[ - "relayCreateDispute((bytes32,uint256,address,uint256,uint256,uint256,string,uint256,bytes))" - ](relayCreateDisputeParams, { value: cost }); - } else { - // Paying in ERC20 - const cost = (await core.functions["arbitrationCost(bytes,address)"](extraData, feeToken.address)).cost; - await (await feeToken.approve(homeGateway.address, cost)).wait(); - tx = await homeGateway.functions[ - "relayCreateDispute((bytes32,uint256,address,uint256,uint256,uint256,string,uint256,bytes),uint256)" - ](relayCreateDisputeParams, cost); - } - tx = tx.wait(); - logger.info(`relayCreateDispute txId: ${tx.transactionHash}`); - } - ); - - const delay = (ms) => new Promise((x) => setTimeout(x, ms)); - await delay(60 * 60 * 1000); // 1 hour -} diff --git a/contracts/scripts/disputeRelayerBotFromChiado.ts b/contracts/scripts/disputeRelayerBotFromChiado.ts deleted file mode 100644 index a4c46dc81..000000000 --- a/contracts/scripts/disputeRelayerBotFromChiado.ts +++ /dev/null @@ -1,20 +0,0 @@ -import hre = require("hardhat"); -import relayer from "./disputeRelayerBot"; -import { HttpNetworkConfig } from "hardhat/types"; - -async function main() { - await relayer( - hre.config.networks.chiado as HttpNetworkConfig, - hre.companionNetworks.foreignChiado.deployments, - "ForeignGatewayOnGnosis", - "HomeGatewayToGnosis", - "DAI" - ); -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/contracts/scripts/disputeRelayerBotFromHardhat.ts b/contracts/scripts/disputeRelayerBotFromHardhat.ts deleted file mode 100644 index 6031f8baf..000000000 --- a/contracts/scripts/disputeRelayerBotFromHardhat.ts +++ /dev/null @@ -1,19 +0,0 @@ -import hre = require("hardhat"); -import relayer from "./disputeRelayerBot"; -import { HttpNetworkConfig } from "hardhat/types"; - -async function main() { - await relayer( - hre.config.networks.localhost as HttpNetworkConfig, - hre.companionNetworks.foreign.deployments, - "ForeignGatewayOnEthereum", - "HomeGatewayToEthereum" - ); -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/contracts/scripts/disputeRelayerBotFromSepolia.ts b/contracts/scripts/disputeRelayerBotFromSepolia.ts deleted file mode 100644 index 12df907c8..000000000 --- a/contracts/scripts/disputeRelayerBotFromSepolia.ts +++ /dev/null @@ -1,19 +0,0 @@ -import hre = require("hardhat"); -import relayer from "./disputeRelayerBot"; -import { HttpNetworkConfig } from "hardhat/types"; - -async function main() { - await relayer( - hre.config.networks.sepolia as HttpNetworkConfig, - hre.companionNetworks.foreignSepolia.deployments, - "ForeignGatewayOnEthereum", - "HomeGatewayToEthereum" - ); -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/contracts/scripts/docPostprocess.sh b/contracts/scripts/docPostprocess.sh deleted file mode 100755 index a52c0878c..000000000 --- a/contracts/scripts/docPostprocess.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -# Forge doc assumes that the code is in the top-level folder. -# We need to add contracts/ to the path -find $SCRIPT_DIR/../dist -type f \( -name "*.md" -o -name "*.html" \) \ - | xargs sed -i.bak 's|\(github.com/kleros/kleros-v2/.*\)\(/src\)|\1/contracts\2|g' - diff --git a/contracts/scripts/docPreprocess.sh b/contracts/scripts/docPreprocess.sh deleted file mode 100755 index 12572ed12..000000000 --- a/contracts/scripts/docPreprocess.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -# Remove unsupported natspec tags -# Known issue: https://github.com/foundry-rs/foundry/issues/4118 -for tag in authors reviewers auditors bounties deployments tools -do - find $SCRIPT_DIR/../src/ -type f -name '*.sol' | xargs sed -i.bak "/^.*@$tag.*$/d" -done - -echo "Use 'git restore src/ && rm src/**/*.sol.bak' to revert the changes" - - diff --git a/contracts/scripts/dotenv.sh b/contracts/scripts/dotenv.sh deleted file mode 100755 index fdb5bdc1a..000000000 --- a/contracts/scripts/dotenv.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -varKey=$1 - -if [ -z "$varKey" ]; then - echo "Env variable name not provided. Exiting..." >&2 - exit 1 -fi - -node -e " - require('dotenv').config({ path: '"$SCRIPT_DIR"/../.env' }) - console.log(process.env.$varKey) -" diff --git a/contracts/scripts/downloadPolicies.sh b/contracts/scripts/downloadPolicies.sh deleted file mode 100755 index babeb14fc..000000000 --- a/contracts/scripts/downloadPolicies.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -function download() #policies -{ - for p in $(cat ${policies}.json | jq -r .[].uri) - do - wget -P $SCRIPT_DIR/../config/$policies https://cdn.kleros.link${p} - done -} - -download policies.v1.mainnet -download policies.v1.gnosischain diff --git a/contracts/scripts/exportDeployments.sh b/contracts/scripts/exportDeployments.sh deleted file mode 100755 index 27c47f070..000000000 --- a/contracts/scripts/exportDeployments.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -function exportJson() { #network - network=$1 - echo "Exporting deployments for $network" - yarn deploy --tags nop --network $network --export deployments/deployments.${network}.json --no-compile -} - -exportJson arbitrumSepolia -exportJson arbitrumSepoliaDevnet -exportJson sepolia -exportJson sepoliaDevnet -exportJson chiado -exportJson chiadoDevnet -exportJson arbitrum -exportJson mainnet diff --git a/contracts/scripts/find-initializer-versions.sh b/contracts/scripts/find-initializer-versions.sh deleted file mode 100755 index 322929812..000000000 --- a/contracts/scripts/find-initializer-versions.sh +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env bash - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" - -declare -A rpcUrls -rpcUrls["arbitrum"]=$(mesc url arbitrum_alchemy) -rpcUrls["arbitrumSepolia"]=$(mesc url arbitrumSepolia_alchemy) -rpcUrls["arbitrumSepoliaDevnet"]=$(mesc url arbitrumSepolia_alchemy) - -# event Initialized(uint64 version); -eventTopic=0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2 - -for c in arbitrum arbitrumSepolia arbitrumSepoliaDevnet; do - echo "--------------------------------" - echo "$c" - echo "--------------------------------" - for f in "$SCRIPT_DIR"/../deployments/"$c"/*_Proxy.json; do - address=$(jq -r .address "$f") - block=$(jq -r .receipt.blockNumber "$f") - basename "$f" - results=$(cast logs --from-block "$block" --to-block latest $eventTopic --address "$address" --rpc-url "${rpcUrls[$c]}" --json | jq -r .[].data) - initializer=$(cast --to-dec "$(echo "$results" | tail -n1)") - version=$(cast call --rpc-url "${rpcUrls[$c]}" "$address" "version()(string)" --json 2>/dev/null | jq -r '.[0]') - echo "$initializer" @v"$version" - echo - done -done diff --git a/contracts/scripts/generateDeploymentArtifact.sh b/contracts/scripts/generateDeploymentArtifact.sh deleted file mode 100755 index 6daf2a585..000000000 --- a/contracts/scripts/generateDeploymentArtifact.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -if [[ $# -lt 2 ]] -then - echo "usage: $(basename $0) network address" - exit 1 -fi - -network=$1 -address=$2 - -# Limitation: proxy contracts will return the proxy's ABI, not its implementation's ABI. -# Workaround: query the address of the implementation, and manually change the address to the proxy's in the artifact. -# Example: WETH on Gnosis chain, https://gnosisscan.io/address/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1#code - -case $network in -gnosischain) - url="https://api.gnosisscan.io" - apiKey=$($SCRIPT_DIR/dotenv.sh GNOSISSCAN_API_KEY) - ;; -chiado) - # Warning: these are distinct instances! - # https://blockscout.com/gnosis/chiado/api-docs - # https://blockscout.chiadochain.net - url="https://blockscout.com/gnosis/chiado" - apiKey="" - ;; -arbitrum) - url="https://api.arbiscan.io" - apiKey=$($SCRIPT_DIR/dotenv.sh ARBISCAN_API_KEY) - ;; -arbitrumSepolia) - url="https://api-sepolia.arbiscan.io" - apiKey=$($SCRIPT_DIR/dotenv.sh ARBISCAN_API_KEY) - ;; -mainnet) - url="https://api.etherscan.io" - apiKey=$($SCRIPT_DIR/dotenv.sh ETHERSCAN_API_KEY) - ;; -sepolia) - url="https://api-sepolia.etherscan.io" - apiKey=$($SCRIPT_DIR/dotenv.sh ETHERSCAN_API_KEY) - ;; -*) - echo "error: unknown network $network" - exit 1 -esac - -query="$url/api?module=contract&action=getabi&address=$address" -if [[ -n $apiKey ]] -then - query="$query&apikey=$apiKey" -fi - -result=$(curl -s "$query") -if [[ $(echo "$result" | jq -r .status) == 0 ]] -then - echo "error: contract not verified or does not exist" - abi="[]" -else - abi=$(echo "$result" | jq -r .result) -fi - -jq \ - --arg address "$address" \ - --argjson abi "$abi" \ - '{ "address": $address, "abi": $abi }' <<< '{}' - - diff --git a/contracts/scripts/generateDeploymentsMarkdown.sh b/contracts/scripts/generateDeploymentsMarkdown.sh deleted file mode 100755 index 5ae9dbf7f..000000000 --- a/contracts/scripts/generateDeploymentsMarkdown.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -IGNORED_ARTIFACTS=( - "CREATE3Factory.json" - "MetaEvidence_*" - "PNK.json" - "RandomizerOracle.json" - "_Implementation.json" - "_Proxy.json" - "ChainlinkVRFCoordinator.json" -) - -function generate() { #deploymentDir #explorerUrl - deploymentDir=$1 - explorerUrl=$2 - # shellcheck disable=SC2068 - for f in $(ls -1 $deploymentDir/*.json 2>/dev/null | grep -v ${IGNORED_ARTIFACTS[@]/#/-e } | sort); do - contractName=$(basename $f .json) - address=$(cat $f | jq -r .address) - implementation=$(cat $f | jq -r .implementation) - - if [ "$implementation" != "null" ]; then - echo "- [$contractName: proxy]($explorerUrl$address), [implementation]($explorerUrl$implementation)" - else - echo "- [$contractName]($explorerUrl$address)" - fi - done -} - -echo "### V2 Mainnet" -echo "#### Arbitrum One" -echo -generate "$SCRIPT_DIR/../deployments/arbitrum" "https://arbiscan.io/address/" | grep -v 'DAI\|WETH\|PNKFaucet' -echo -echo "### V2 Testnet" -echo "#### Arbitrum Sepolia" -echo -generate "$SCRIPT_DIR/../deployments/arbitrumSepolia" "https://sepolia.arbiscan.io/address/" -echo -echo "#### Sepolia" -echo -generate "$SCRIPT_DIR/../deployments/sepolia" "https://sepolia.etherscan.io/address/" -echo -echo "#### Chiado" -echo -generate "$SCRIPT_DIR/../deployments/chiado" "https://gnosis-chiado.blockscout.com/address/" -echo - -echo "### V2 Devnet (unstable)" -echo "#### Arbitrum Sepolia" -echo -generate "$SCRIPT_DIR/../deployments/arbitrumSepoliaDevnet" "https://sepolia.arbiscan.io/address/" -echo -echo "#### Sepolia" -echo -generate "$SCRIPT_DIR/../deployments/sepoliaDevnet" "https://sepolia.etherscan.io/address/" -echo -echo "#### Chiado" -echo -generate "$SCRIPT_DIR/../deployments/chiadoDevnet" "https://gnosis-chiado.blockscout.com/address/" diff --git a/contracts/scripts/generateMetrics.sh b/contracts/scripts/generateMetrics.sh deleted file mode 100755 index 4e7bea4be..000000000 --- a/contracts/scripts/generateMetrics.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -SOURCE_DIR="src" - -yarn dlx solidity-code-metrics \ - "$SOURCE_DIR"/arbitration/KlerosCore* \ - "$SOURCE_DIR"/arbitration/PolicyRegistry.sol \ - "$SOURCE_DIR"/arbitration/SortitionModule* \ - "$SOURCE_DIR"/arbitration/arbitrables/DisputeResolver.sol \ - "$SOURCE_DIR"/arbitration/DisputeTemplateRegistry.sol \ - "$SOURCE_DIR"/arbitration/dispute-kits/* \ - "$SOURCE_DIR"/arbitration/evidence/EvidenceModule.sol \ - "$SOURCE_DIR"/arbitration/interfaces/* \ - "$SOURCE_DIR"/libraries/Constants.sol \ - "$SOURCE_DIR"/libraries/Safe* \ - "$SOURCE_DIR"/rng/RNGWithFallback.sol \ - "$SOURCE_DIR"/rng/ChainlinkRNG.sol \ - "$SOURCE_DIR"/rng/IRNG.sol \ - "$SOURCE_DIR"/proxy/UUPSProx* \ - "$SOURCE_DIR"/proxy/Initializable.sol \ ->METRICS.md diff --git a/contracts/scripts/getCourtsV1.ts b/contracts/scripts/getCourtsV1.ts deleted file mode 100644 index e6963f2a8..000000000 --- a/contracts/scripts/getCourtsV1.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { ethers } from "hardhat"; -import { IKlerosLiquid } from "../typechain-types"; -import hre = require("hardhat"); - -interface Court { - id: number; - parent: number; - hiddenVotes: boolean; - minStake: number; - alpha: number; - feeForJuror: number; - jurorsForCourtJump: number; - timesPerPeriod: number[]; -} - -interface Config { - courtAddress: string; - maxCourts: number; -} - -const configByChain = new Map([ - [ - 1, // mainnet - { - courtAddress: "0x988b3A538b618C7A603e1c11Ab82Cd16dbE28069", - maxCourts: 24, - }, - ], - [ - 100, // gnosis - { - courtAddress: "0x9C1dA9A04925bDfDedf0f6421bC7EEa8305F9002", - maxCourts: 18, - }, - ], -]); - -async function main() { - const chainId = Number(await hre.getChainId()); - const courtAddress = configByChain.get(chainId)?.courtAddress ?? hre.ethers.ZeroAddress; - const courtsV1 = (await ethers.getContractAt("IKlerosLiquid", courtAddress)) as IKlerosLiquid; - - const courts: Court[] = []; - const maxCourts = configByChain.get(chainId)?.maxCourts ?? 0; - for (let courtId = 0; courtId < maxCourts; ++courtId) { - const court: Court = await courtsV1.courts(courtId).then( - (result) => - ({ - id: courtId, - parent: ethers.getNumber(result.parent), - hiddenVotes: result.hiddenVotes, - minStake: result.minStake.toString(), - alpha: result.alpha.toString(), - feeForJuror: result.feeForJuror.toString(), - jurorsForCourtJump: result.jurorsForCourtJump.toString(), - timesPerPeriod: [], - } as unknown as Court) - ); - - court.timesPerPeriod = await courtsV1.getSubcourt(courtId).then((result) => { - return result.timesPerPeriod.map((bn) => ethers.getNumber(bn)); - }); - - court.id = courtId; - - // console.log("CourtId %d -> %O", courtId, court); - - courts.push(court); - } - console.log(JSON.stringify(courts, null, "\t")); -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/contracts/scripts/getDisputeKits.ts b/contracts/scripts/getDisputeKits.ts deleted file mode 100644 index 32f2b18eb..000000000 --- a/contracts/scripts/getDisputeKits.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { getDisputeKits } from "../deployments/disputeKitsViem"; -import { createPublicClient, http } from "viem"; -import { arbitrumSepolia } from "viem/chains"; - -const rpc = process.env.ARBITRUM_SEPOLIA_RPC; -if (!rpc) { - throw new Error("ARBITRUM_SEPOLIA_RPC is not set"); -} - -const client = createPublicClient({ - chain: arbitrumSepolia, - transport: http(rpc), -}); - -async function main() { - try { - console.log("Fetching DisputeKitCreated events..."); - const disputeKitResult = await getDisputeKits(client, "devnet"); - console.log(disputeKitResult); - } catch (error) { - console.error("Error fetching events:", error); - throw error; - } -} - -if (require.main === module) { - main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); -} diff --git a/contracts/scripts/getDisputeTemplate.ts b/contracts/scripts/getDisputeTemplate.ts deleted file mode 100644 index 105dcfec5..000000000 --- a/contracts/scripts/getDisputeTemplate.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { task } from "hardhat/config"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { IDisputeTemplateRegistry } from "../typechain-types"; - -task("get-dispute-template", "Gets a dispute template by ID") - .addPositionalParam("templateId", "The ID of the template to query") - .setAction(async ({ templateId }: { templateId: string }, hre: HardhatRuntimeEnvironment) => { - const { ethers } = hre; - - // Get the contract instance - const disputeTemplateRegistry = await ethers.getContract("DisputeTemplateRegistry"); - - // Query the events - let events; - try { - const filter = disputeTemplateRegistry.filters.DisputeTemplate(BigInt(templateId)); - events = await disputeTemplateRegistry.queryFilter(filter); - } catch (error) { - const errorMessage = error instanceof Error ? error.message : String(error); - console.error(`Failed to query events for template ID ${templateId}:`, errorMessage); - return; - } - - if (events.length === 0) { - console.log(`No template found with ID ${templateId}`); - return; - } - - // Get the most recent event - const event = events[events.length - 1]; - - console.log("Template Details:"); - console.log("----------------"); - console.log(`Template ID: ${event.args._templateId}`); - console.log(`Template Tag: ${event.args._templateTag}`); - console.log(`Template Data: ${event.args._templateData}`); - console.log(`Template Data Mappings: ${event.args._templateDataMappings}`); - }); diff --git a/contracts/scripts/getPoliciesV1.ts b/contracts/scripts/getPoliciesV1.ts deleted file mode 100644 index a992be223..000000000 --- a/contracts/scripts/getPoliciesV1.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ethers } from "hardhat"; -import fetch from "node-fetch"; -import hre = require("hardhat"); - -interface Policy { - court: number; - uri: string; - name: string; - description: string; - summary: string; - requiredSkills: string; -} - -const policyRegistryByChain = new Map([ - [1, "0xCf1f07713d5193FaE5c1653C9f61953D048BECe4"], // mainnet - [100, "0x9d494768936b6bDaabc46733b8D53A937A6c6D7e"], // gnosis -]); - -async function main() { - const chainId = Number(await hre.getChainId()); - const policyRegistryAddress = policyRegistryByChain.get(chainId) ?? hre.ethers.ZeroAddress; - const policyRegistryV1 = await ethers.getContractAt("PolicyRegistry", policyRegistryAddress); - - const fetchPolicy = (url: string): Promise => { - return fetch(url).then((response) => response.json()); - }; - - const fetchPolicyUri = (court: number): Promise => { - return policyRegistryV1.policies(court); - }; - - const policies: Policy[] = []; - for (let court = 0; ; ++court) { - const uri = await fetchPolicyUri(court); - if (!uri) break; - - const policy = await fetchPolicy("https://cdn.kleros.link" + uri); - policy.court = court; - policy.uri = uri; - policies.push(policy); - } - console.log(JSON.stringify(policies, null, "\t")); -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/contracts/scripts/keeperBot.ts b/contracts/scripts/keeperBot.ts deleted file mode 100644 index 5d1b2751f..000000000 --- a/contracts/scripts/keeperBot.ts +++ /dev/null @@ -1,864 +0,0 @@ -import hre from "hardhat"; -import { toBigInt, BigNumberish, getNumber, BytesLike } from "ethers"; -import { - DisputeKitClassic, - DisputeKitGated, - DisputeKitGatedShutter, - DisputeKitShutter, - SortitionModule, -} from "../typechain-types"; -import env from "./utils/env"; -import loggerFactory from "./utils/logger"; -import { Cores, getContracts as getContractsForCoreType } from "./utils/contracts"; -import { shutterAutoReveal } from "./keeperBotShutter"; - -const { ethers } = hre; -const SHUTTER_AUTO_REVEAL_ONLY = env.optional("SHUTTER_AUTO_REVEAL_ONLY", "false") === "true"; -const MAX_DRAW_CALLS_WITHOUT_JURORS = 10; -const MAX_DRAW_ITERATIONS = 30; -const MAX_EXECUTE_ITERATIONS = 20; -const MAX_DELAYED_STAKES_ITERATIONS = 50; -const WAIT_FOR_RNG_DURATION = 5 * 1000; // 5 seconds -const ITERATIONS_COOLDOWN_PERIOD = 10 * 1000; // 10 seconds -const HIGH_GAS_LIMIT = { gasLimit: 50_000_000 }; // 50M gas -const HEARTBEAT_URL = env.optionalNoDefault("HEARTBEAT_URL_KEEPER_BOT"); -const SUBGRAPH_URL = env.require("SUBGRAPH_URL"); -const MAX_JURORS_PER_DISPUTE = 1000; // Skip disputes with more than this number of jurors -const CORE_TYPE = env.optional("CORE_TYPE", "base"); -const DISPUTES_TO_SKIP = env - .optional("DISPUTES_TO_SKIP", "") - .split(",") - .map((s) => s.trim()); - -const loggerOptions = env.optionalNoDefault("LOGTAIL_TOKEN_KEEPER_BOT") - ? { - transportTargetOptions: { - target: "@logtail/pino", - options: { sourceToken: env.require("LOGTAIL_TOKEN_KEEPER_BOT") }, - level: env.optional("LOG_LEVEL", "info"), - }, - level: env.optional("LOG_LEVEL", "info"), // for pino-pretty - } - : {}; -const logger = loggerFactory.createLogger(loggerOptions); - -const getContracts = async () => { - const coreType = Cores[CORE_TYPE.toUpperCase() as keyof typeof Cores]; - if (coreType === Cores.UNIVERSITY) { - throw new Error("University is not supported yet"); - } - const contracts = await getContractsForCoreType(hre, coreType); - return { ...contracts, sortition: contracts.sortition as SortitionModule }; -}; - -type Contribution = { - contributor: { - id: string; - }; - choice: string; - rewardWithdrawn: boolean; - coreDispute: { - currentRoundIndex: string; - }; -}; - -type Dispute = { - period: string; - id: string; - currentRoundIndex: string; -}; - -type CustomError = { - data: BytesLike; - reason: string; - code: string; - errorArgs: any[]; - errorName: string; - errorSignature: string; -}; - -enum Period { - EVIDENCE = "evidence", - COMMIT = "commit", - VOTE = "vote", - APPEAL = "appeal", - EXECUTION = "execution", -} - -const PERIODS = Object.values(Period); - -enum Phase { - STAKING = "staking", - GENERATING = "generating", - DRAWING = "drawing", -} -const PHASES = Object.values(Phase); - -const getDisputeKit = async ( - coreDisputeId: string, - coreRoundId: string -): Promise<{ - disputeKit: DisputeKitClassic | DisputeKitShutter | DisputeKitGated | DisputeKitGatedShutter; - localDisputeId: bigint; - localRoundId: bigint; -}> => { - const { core, disputeKitClassic, disputeKitShutter, disputeKitGated, disputeKitGatedShutter } = await getContracts(); - const round = await core.getRoundInfo(coreDisputeId, coreRoundId); - const disputeKitAddress = await core.disputeKits(round.disputeKitID); - let disputeKit: DisputeKitClassic | DisputeKitShutter | DisputeKitGated | DisputeKitGatedShutter; - switch (disputeKitAddress) { - case disputeKitClassic.target: - disputeKit = disputeKitClassic; - break; - case disputeKitShutter?.target: - if (!disputeKitShutter) throw new Error(`DisputeKitShutter not deployed`); - disputeKit = disputeKitShutter; - break; - case disputeKitGated?.target: - if (!disputeKitGated) throw new Error(`DisputeKitGated not deployed`); - disputeKit = disputeKitGated; - break; - case disputeKitGatedShutter?.target: - if (!disputeKitGatedShutter) throw new Error(`DisputeKitGatedShutter not deployed`); - disputeKit = disputeKitGatedShutter; - break; - default: - throw new Error(`Unknown dispute kit: ${disputeKitAddress}`); - } - const [localDisputeId, localRoundId] = await disputeKit.getLocalDisputeRoundID(coreDisputeId, coreRoundId); - return { disputeKit, localDisputeId, localRoundId }; -}; - -const getNonFinalDisputes = async (): Promise => { - const { gql, request } = await import("graphql-request"); // workaround for ESM import - const query = gql` - query NonFinalDisputes { - disputes(where: { period_not: execution }) { - period - id - currentRoundIndex - } - } - `; - // TODO: use a local graph node if chainId is HARDHAT - type Disputes = { disputes: Dispute[] }; - const { disputes } = await request(SUBGRAPH_URL, query); - return disputes; -}; - -const getAppealContributions = async (disputeId: string): Promise => { - const { gql, request } = await import("graphql-request"); // workaround for ESM import - const query = gql` - query AppealContributions($disputeId: String!) { - contributions(where: { coreDispute: $disputeId }) { - contributor { - id - } - ... on ClassicContribution { - choice - rewardWithdrawn - } - coreDispute { - currentRoundIndex - } - } - } - `; - const variables = { disputeId }; - type AppealContributions = { contributions: Contribution[] }; - // TODO: use a local graph node if chainId is HARDHAT - const { contributions } = await request(SUBGRAPH_URL, query, variables); - return contributions; -}; - -const getDisputesWithUnexecutedRuling = async (): Promise => { - const { gql, request } = await import("graphql-request"); // workaround for ESM import - const query = gql` - query DisputesWithUnexecutedRuling { - disputes(where: { period: execution, ruled: false }) { - id - currentRoundIndex - period - } - } - `; - // TODO: use a local graph node if chainId is HARDHAT - type Disputes = { disputes: Dispute[] }; - const { disputes } = await request(SUBGRAPH_URL, query); - return disputes; -}; - -const getUniqueDisputes = (disputes: Dispute[]): Dispute[] => { - return [...new Map(disputes.map((v) => [v.id, v])).values()]; -}; - -const getDisputesWithContributionsNotYetWithdrawn = async (): Promise => { - const { gql, request } = await import("graphql-request"); // workaround for ESM import - const query = gql` - query DisputesWithContributionsNotYetWithdrawn { - classicContributions(where: { rewardWithdrawn: false }) { - coreDispute { - id - period - currentRoundIndex - } - } - } - `; - // TODO: use a local graph node if chainId is HARDHAT - type Contributions = { - classicContributions: { coreDispute: Dispute }[]; - }; - const { classicContributions } = await request(SUBGRAPH_URL, query); - const disputes = classicContributions - .filter((contribution) => contribution.coreDispute.period === "execution") - .map((dispute) => dispute.coreDispute); - return getUniqueDisputes(disputes); -}; - -const getUnstakedJurors = async (disputeId: string): Promise => { - const { gql, request } = await import("graphql-request"); // workaround for ESM import - const query = gql` - query UnstakedJurors($disputeId: String!) { - dispute(id: $disputeId) { - currentRound { - drawnJurors(where: { juror_: { totalStake: 0 } }) { - juror { - userAddress - } - } - } - } - } - `; - type UnstakedJurors = { - dispute: { - currentRound: { - drawnJurors: { juror: { userAddress: string } }[]; - }; - }; - }; - const { dispute } = await request(SUBGRAPH_URL, query, { disputeId }); - if (!dispute || !dispute.currentRound) { - return []; - } - const uniqueAddresses = [ - ...new Set(dispute.currentRound.drawnJurors.map((drawnJuror) => drawnJuror.juror.userAddress)), - ]; - return uniqueAddresses; -}; - -const handleError = (e: any) => { - logger.error(e, "Failure"); -}; - -const isRngReady = async () => { - const { chainlinkRng, randomizerRng, blockHashRNG, sortition } = await getContracts(); - const currentRng = await sortition.rng(); - if (currentRng === chainlinkRng?.target && chainlinkRng !== null) { - const requestID = await chainlinkRng.lastRequestId(); - const n = await chainlinkRng.randomNumbers(requestID); - if (Number(n) === 0) { - logger.info("ChainlinkRNG is NOT ready yet"); - return false; - } else { - logger.info(`ChainlinkRNG is ready: ${n.toString()}`); - return true; - } - } else if (currentRng === randomizerRng?.target && randomizerRng !== null) { - const requestID = await randomizerRng.lastRequestId(); - const n = await randomizerRng.randomNumbers(requestID); - if (Number(n) === 0) { - logger.info("RandomizerRNG is NOT ready yet"); - return false; - } else { - logger.info(`RandomizerRNG is ready: ${n.toString()}`); - return true; - } - } else if (currentRng === blockHashRNG?.target && blockHashRNG !== null) { - const n = await blockHashRNG.receiveRandomness.staticCall(); - if (Number(n) === 0) { - logger.info("BlockHashRNG is NOT ready yet"); - return false; - } else { - logger.info(`BlockHashRNG is ready: ${n.toString()}`); - return true; - } - } else { - logger.error("Unknown RNG at ", currentRng); - return false; - } -}; - -const passPhase = async () => { - const { sortition } = await getContracts(); - let success = false; - try { - await sortition.passPhase.staticCall(); - } catch (e) { - const error = e as CustomError; - const errorDescription = sortition.interface.parseError(error.data)?.signature; - logger.info(`passPhase: not ready yet because of ${errorDescription}`); - return success; - } - const before = getNumber(await sortition.phase()); - try { - const gas = ((await sortition.passPhase.estimateGas()) * 150n) / 100n; // 50% extra gas - const tx = await (await sortition.passPhase({ gasLimit: gas })).wait(); - logger.info(`passPhase txID: ${tx?.hash}`); - } catch (e) { - handleError(e); - } finally { - const after = getNumber(await sortition.phase()); - logger.info(`passPhase: ${PHASES[before]} -> ${PHASES[after]}`); - success = before !== after; // true if successful - } - return success; -}; - -const passPeriod = async (dispute: { id: string }) => { - const { core } = await getContracts(); - let success = false; - try { - await core.passPeriod.staticCall(dispute.id); - } catch (e) { - const error = e as CustomError; - const errorDescription = core.interface.parseError(error.data)?.signature; - logger.info(`passPeriod: not ready yet for dispute ${dispute.id} because of error ${errorDescription}`); - return success; - } - const before = (await core.disputes(dispute.id)).period; - try { - const gas = ((await core.passPeriod.estimateGas(dispute.id)) * 150n) / 100n; // 50% extra gas - const tx = await (await core.passPeriod(dispute.id, { gasLimit: gas })).wait(); - logger.info(`passPeriod txID: ${tx?.hash}`); - } catch (e) { - handleError(e); - } finally { - const after = (await core.disputes(dispute.id)).period; - logger.info(`passPeriod for dispute ${dispute.id}: ${before} -> ${after}`); - success = before !== after; // true if successful - } - return success; -}; - -const drawJurors = async (dispute: { id: string; currentRoundIndex: string }, iterations: number) => { - const { core } = await getContracts(); - let success = false; - try { - const simulatedIterations = iterations * MAX_DRAW_CALLS_WITHOUT_JURORS; // Drawing will be skipped as long as no juror is available in the next MAX_DRAW_CALLS_WITHOUT_JURORS calls to draw() given this nb of iterations. - const { drawnJurors: drawnJurorsBefore } = await core.getRoundInfo(dispute.id, dispute.currentRoundIndex); - const nbDrawnJurors = (await core.draw.staticCall(dispute.id, simulatedIterations, HIGH_GAS_LIMIT)) as bigint; - const extraJurors = nbDrawnJurors - BigInt(drawnJurorsBefore.length); - logger.debug( - `Draw: ${extraJurors} jurors available in the next ${simulatedIterations} iterations for dispute ${dispute.id}` - ); - if (extraJurors <= 0n) { - logger.warn( - `Draw: skipping, no jurors available in the next ${simulatedIterations} iterations for dispute ${dispute.id}` - ); - return success; - } - } catch (e) { - logger.error(`Draw: will fail for ${dispute.id}, skipping`); - return success; - } - try { - const tx = await (await core.draw(dispute.id, iterations, HIGH_GAS_LIMIT)).wait(); - logger.info(`Draw txID: ${tx?.hash}`); - success = true; - } catch (e) { - handleError(e); - } finally { - const roundInfo = await core.getRoundInfo(dispute.id, dispute.currentRoundIndex); - logger.info(`Drawn jurors (last 20): ${roundInfo.drawnJurors.slice(-20)}`); - } - return success; -}; - -const executeRepartitions = async (dispute: { id: string; currentRoundIndex: string }, iterations: number) => { - const { core } = await getContracts(); - let success = false; - try { - await core.execute.staticCall(dispute.id, dispute.currentRoundIndex, iterations, HIGH_GAS_LIMIT); - } catch (e) { - logger.error(`Execute: will fail for ${dispute.id}, skipping`); - return success; - } - try { - const tx = await (await core.execute(dispute.id, dispute.currentRoundIndex, iterations, HIGH_GAS_LIMIT)).wait(); - logger.info(`Execute txID: ${tx?.hash}`); - success = true; - } catch (e) { - handleError(e); - } - return success; -}; - -const executeRuling = async (dispute: { id: string }) => { - const { core } = await getContracts(); - let success = false; - try { - await core.executeRuling.staticCall(dispute.id); - } catch (e) { - logger.error(`ExecuteRuling: will fail for ${dispute.id}, skipping`); - return success; - } - try { - const gas = ((await core.executeRuling.estimateGas(dispute.id)) * 150n) / 100n; // 50% extra gas - const tx = await (await core.executeRuling(dispute.id, { gasLimit: gas })).wait(); - logger.info(`ExecuteRuling txID: ${tx?.hash}`); - success = true; - } catch (e) { - handleError(e); - } - return success; -}; - -const withdrawLeftoverPNK = async (juror: string) => { - const { sortition } = await getContracts(); - let success = false; - try { - await sortition.withdrawLeftoverPNK.staticCall(juror); - } catch (e) { - const error = e as CustomError; - const errorDescription = sortition.interface.parseError(error.data)?.signature; - logger.info(`WithdrawLeftoverPNK: failed for juror ${juror} because of ${errorDescription}, skipping`); - return success; - } - try { - const gas = ((await sortition.withdrawLeftoverPNK.estimateGas(juror)) * 150n) / 100n; // 50% extra gas - const tx = await (await sortition.withdrawLeftoverPNK(juror, { gasLimit: gas })).wait(); - logger.info(`WithdrawLeftoverPNK txID: ${tx?.hash}`); - } catch (e) { - handleError(e); - } finally { - success = true; - } - return success; -}; - -const withdrawAppealContribution = async ( - coreDisputeId: string, - coreRoundId: string, - contribution: Contribution -): Promise => { - const { disputeKit, localDisputeId, localRoundId } = await getDisputeKit(coreDisputeId, coreRoundId); - let success = false; - let amountWithdrawn = 0n; - try { - amountWithdrawn = await disputeKit.withdrawFeesAndRewards.staticCall( - localDisputeId, - contribution.contributor.id, - localRoundId, - contribution.choice - ); - } catch (e) { - logger.warn( - `WithdrawFeesAndRewards: will fail for core dispute #${coreDisputeId}, round #${coreRoundId}, choice ${contribution.choice} and beneficiary ${contribution.contributor.id}, skipping` - ); - return success; - } - if (amountWithdrawn === 0n) { - logger.debug( - `WithdrawFeesAndRewards: no fees or rewards to withdraw for core dispute #${coreDisputeId}, round #${coreRoundId}, choice ${contribution.choice} and beneficiary ${contribution.contributor.id}, skipping` - ); - return success; - } - try { - logger.info( - `WithdrawFeesAndRewards: appeal contribution for core dispute #${coreDisputeId}, round #${coreRoundId}, choice ${contribution.choice} and beneficiary ${contribution.contributor.id}` - ); - const gas = - ((await disputeKit.withdrawFeesAndRewards.estimateGas( - localDisputeId, - contribution.contributor.id, - localRoundId, - contribution.choice - )) * - 150n) / - 100n; // 50% extra gas - const tx = await ( - await disputeKit.withdrawFeesAndRewards( - localDisputeId, - contribution.contributor.id, - localRoundId, - contribution.choice, - { - gasLimit: gas, - } - ) - ).wait(); - logger.info(`WithdrawFeesAndRewards txID: ${tx?.hash}`); - success = true; - } catch (e) { - handleError(e); - } - return success; -}; - -const executeDelayedStakes = async () => { - const { sortition } = await getContracts(); - - // delayedStakes = 1 + delayedStakeWriteIndex - delayedStakeReadIndex - const delayedStakesRemaining = - 1n + (await sortition.delayedStakeWriteIndex()) - (await sortition.delayedStakeReadIndex()); - - const delayedStakes = - delayedStakesRemaining < MAX_DELAYED_STAKES_ITERATIONS - ? delayedStakesRemaining - : toBigInt(MAX_DELAYED_STAKES_ITERATIONS); - - if (delayedStakes === 0n) { - logger.info("No delayed stakes to execute"); - return true; - } - logger.info(`Executing ${delayedStakes} delayed stakes, ${delayedStakesRemaining} remaining`); - let success = false; - try { - await sortition.executeDelayedStakes.staticCall(delayedStakes); - } catch (e) { - logger.error(`executeDelayedStakes: will fail because of ${JSON.stringify(e)}`); - return success; - } - try { - const gas = ((await sortition.executeDelayedStakes.estimateGas(delayedStakes)) * 150n) / 100n; // 50% extra gas - const tx = await (await sortition.executeDelayedStakes(delayedStakes, { gasLimit: gas })).wait(); - logger.info(`executeDelayedStakes txID: ${tx?.hash}`); - } catch (e) { - handleError(e); - } - return success; -}; - -const getMissingJurors = async (dispute: { id: string; currentRoundIndex: string }) => { - const { core } = await getContracts(); - const { nbVotes, drawnJurors } = await core.getRoundInfo(dispute.id, dispute.currentRoundIndex); - return nbVotes - toBigInt(drawnJurors.length); -}; - -const isDisputeFullyDrawn = async (dispute: { id: string; currentRoundIndex: string }): Promise => { - return (await getMissingJurors(dispute)) === 0n; -}; - -const getNumberOfMissingRepartitions = async ( - dispute: { id: string; currentRoundIndex: string }, - coherentCount: BigNumberish -) => { - const { core } = await getContracts(); - const { repartitions, drawnJurors } = await core.getRoundInfo(dispute.id, dispute.currentRoundIndex); - return coherentCount === 0n - ? drawnJurors.length - getNumber(repartitions) - : 2 * drawnJurors.length - getNumber(repartitions); -}; - -const filterDisputesToSkip = (disputes: Dispute[]) => { - logger.debug( - `Skipping disputes: ${disputes - .filter((dispute) => DISPUTES_TO_SKIP.includes(dispute.id)) - .map((dispute) => dispute.id)}` - ); - return disputes.filter((dispute) => !DISPUTES_TO_SKIP.includes(dispute.id)); -}; - -const filterDisputesByPeriod = (disputes: Dispute[], period: Period) => { - return disputes.filter((dispute) => dispute.period === period); -}; - -const mapAsync = (array: T[], callbackfn: (value: T, index: number, array: T[]) => Promise): Promise => { - return Promise.all(array.map(callbackfn)); -}; - -const filterAsync = async ( - array: T[], - callbackfn: (value: T, index: number, array: T[]) => Promise -): Promise => { - const filterMap = await mapAsync(array, callbackfn); - return array.filter((value, index) => filterMap[index]); -}; - -const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); - -const sendHeartbeat = async () => { - if (HEARTBEAT_URL) { - logger.debug("Sending heartbeat"); - fetch(HEARTBEAT_URL); - } else { - logger.debug("Heartbeat not set up, skipping"); - } -}; - -const shutdown = async () => { - logger.info("Shutting down"); - await delay(2000); // Some log messages may be lost otherwise -}; - -async function main() { - const { core, sortition, disputeKitShutter, disputeKitGatedShutter } = await getContracts(); - - const getBlockTime = async () => { - return await ethers.provider.getBlock("latest").then((block) => { - if (block?.timestamp === undefined) return 0; - return block?.timestamp; - }); - }; - - const hasMinStakingTimePassed = async (): Promise => { - const minStakingTime = await sortition.minStakingTime(); - const blockTime = await getBlockTime(); - return await sortition.lastPhaseChange().then((lastPhaseChange) => { - return toBigInt(blockTime) - lastPhaseChange > minStakingTime; - }); - }; - - const hasMaxDrawingTimePassed = async (): Promise => { - const maxDrawingTime = await sortition.maxDrawingTime(); - const blockTime = await getBlockTime(); - return await sortition.lastPhaseChange().then((lastPhaseChange) => { - return toBigInt(blockTime) - lastPhaseChange > maxDrawingTime; - }); - }; - - const isPhaseStaking = async (): Promise => { - return PHASES[getNumber(await sortition.phase())] === Phase.STAKING; - }; - - const isPhaseGenerating = async (): Promise => { - return PHASES[getNumber(await sortition.phase())] === Phase.GENERATING; - }; - - const isPhaseDrawing = async (): Promise => { - return PHASES[getNumber(await sortition.phase())] === Phase.DRAWING; - }; - - logger.info("Starting up"); - - await sendHeartbeat(); - - logger.info(`Current phase: ${PHASES[getNumber(await sortition.phase())]}`); - - // Retrieve the disputes which are in a non-final period - let disputes = await getNonFinalDisputes().catch((e) => handleError(e)); - if (!disputes) { - return; - } - - let disputesWithoutJurors = await filterAsync(disputes, async (dispute) => { - return !(await isDisputeFullyDrawn(dispute)); - }); - - // Just a sanity check - const numberOfDisputesWithoutJurors = await sortition.disputesWithoutJurors(); - if (!(numberOfDisputesWithoutJurors === toBigInt(disputesWithoutJurors.length))) { - logger.error("Discrepancy between SortitionModule.disputesWithoutJurors and KlerosCore.disputes"); - logger.error(`KlerosCore.disputes without jurors = ${disputesWithoutJurors.length}`); - logger.error(`SortitionModule.disputesWithoutJurors = ${numberOfDisputesWithoutJurors}`); - } - - // Skip some disputes - disputes = filterDisputesToSkip(disputes); - disputesWithoutJurors = filterDisputesToSkip(disputesWithoutJurors); - for (const dispute of disputes) { - logger.info(`Dispute #${dispute.id}, round #${dispute.currentRoundIndex}, ${dispute.period} period`); - } - - // ----------------------------------------------- // - // AUTO-REVEAL // - // ----------------------------------------------- // - logger.info("Auto-revealing disputes"); - // Ensure that the disputes ready to be auto-revealed are passed to the voting period otherwise they won't be picked up. - for (const dispute of filterDisputesByPeriod(filterDisputesToSkip(disputes), Period.COMMIT)) { - await passPeriod(dispute); - } - await shutterAutoReveal(disputeKitShutter, DISPUTES_TO_SKIP); - await shutterAutoReveal(disputeKitGatedShutter, DISPUTES_TO_SKIP); - if (SHUTTER_AUTO_REVEAL_ONLY) { - logger.debug("Shutter auto-reveal only, skipping other actions"); - await shutdown(); - return; - } - - logger.info(`Disputes needing more jurors: ${disputesWithoutJurors.map((dispute) => dispute.id)}`); - if ((await hasMinStakingTimePassed()) && disputesWithoutJurors.length > 0) { - // ----------------------------------------------- // - // DRAWING ATTEMPT // - // ----------------------------------------------- // - logger.info("Attempting to draw jurors"); - if (await isPhaseStaking()) { - await passPhase(); - } - if (await isPhaseGenerating()) { - let maxDrawingTimePassed = false; - do { - logger.info("Waiting for RNG to be ready"); - await delay(WAIT_FOR_RNG_DURATION); - maxDrawingTimePassed = await hasMaxDrawingTimePassed(); - } while (!(await isRngReady()) && !maxDrawingTimePassed); - await passPhase(); - } - if (await isPhaseDrawing()) { - let maxDrawingTimePassed = await hasMaxDrawingTimePassed(); - for (const dispute of disputesWithoutJurors) { - if (maxDrawingTimePassed) { - logger.info("Max drawing time passed"); - break; - } - let numberOfMissingJurors = await getMissingJurors(dispute); - if (numberOfMissingJurors > MAX_JURORS_PER_DISPUTE) { - logger.warn(`Skipping dispute #${dispute.id} with too many jurors to draw`); - continue; - } - do { - const drawIterations = Math.min(MAX_DRAW_ITERATIONS, getNumber(numberOfMissingJurors)); - logger.info( - `Drawing ${drawIterations} out of ${numberOfMissingJurors} jurors needed for dispute #${dispute.id}` - ); - if (!(await drawJurors(dispute, drawIterations))) { - logger.info(`Failed to draw jurors for dispute #${dispute.id}, skipping it`); - break; - } - await delay(ITERATIONS_COOLDOWN_PERIOD); // To avoid spiking the gas price - maxDrawingTimePassed = await hasMaxDrawingTimePassed(); - numberOfMissingJurors = await getMissingJurors(dispute); - } while (!(numberOfMissingJurors === 0n) && !maxDrawingTimePassed); - } - // At this point, either all disputes are fully drawn or max drawing time has passed - } - } - - // ----------------------------------------------- // - // BACK TO STAKING PHASE // - // ----------------------------------------------- // - for (let i = 0; i < 3 && !(await isPhaseStaking()); i++) { - await passPhase(); - } - - await sendHeartbeat(); - - logger.info(`Current phase: ${PHASES[getNumber(await sortition.phase())]}`); - - for (const dispute of disputes) { - // ----------------------------------------------- // - // PASS PERIOD // - // ----------------------------------------------- // - await passPeriod(dispute); - } - - // Get all the disputes whose ruling is not yet executed - const unexecutedDisputes = await getDisputesWithUnexecutedRuling(); - logger.info(`Disputes not yet executed: ${unexecutedDisputes.map((dispute) => dispute.id)}`); - - // Get all disputes with contributions not yet withdrawn - const disputesWithContributionsNotYetWithdrawn = await getDisputesWithContributionsNotYetWithdrawn(); - logger.info( - `Disputes with contributions not yet withdrawn: ${disputesWithContributionsNotYetWithdrawn.map( - (dispute) => dispute.id - )}` - ); - - // Disputes union and deduplicate - const unprocessedDisputesInExecution = filterDisputesToSkip( - getUniqueDisputes(unexecutedDisputes.concat(disputesWithContributionsNotYetWithdrawn).concat(disputes)) - ); - logger.info(`Disputes not fully executed: ${unprocessedDisputesInExecution.map((dispute) => dispute.id)}`); - - for (const dispute of unprocessedDisputesInExecution) { - const { period } = await core.disputes(dispute.id); - if (period !== 4n) { - logger.info(`Skipping dispute #${dispute.id} because it is not in the execution period`); - continue; - } - - // ----------------------------------------------- // - // REPARTITIONS EXECUTION // - // ----------------------------------------------- // - const { disputeKit } = await getDisputeKit(dispute.id, dispute.currentRoundIndex); - const coherentCount = await disputeKit.getCoherentCount(dispute.id, dispute.currentRoundIndex); - let numberOfMissingRepartitions = await getNumberOfMissingRepartitions(dispute, coherentCount); - do { - const executeIterations = Math.min(MAX_EXECUTE_ITERATIONS, numberOfMissingRepartitions); - if (executeIterations === 0) { - break; - } - logger.info( - `Executing ${executeIterations} out of ${numberOfMissingRepartitions} repartitions needed for dispute #${dispute.id}` - ); - if (!(await executeRepartitions(dispute, executeIterations))) { - logger.info(`Failed to execute repartitions for dispute #${dispute.id}, skipping it`); - break; - } - numberOfMissingRepartitions = await getNumberOfMissingRepartitions(dispute, coherentCount); - await delay(ITERATIONS_COOLDOWN_PERIOD); // To avoid spiking the gas price - } while (numberOfMissingRepartitions != 0); - - // ----------------------------------------------- // - // WITHDRAW LEFTOVER PNK // - // ----------------------------------------------- // - const unstakedJurors = await getUnstakedJurors(dispute.id); - logger.info(`Unstaked jurors: ${unstakedJurors.map((juror) => juror)}`); - for (const juror of unstakedJurors) { - const leftoverPNK = await sortition.getJurorLeftoverPNK(juror); - if (leftoverPNK > 0n) { - logger.info(`Leftover PNK for juror ${juror}: ${leftoverPNK}, withdrawing...`); - await withdrawLeftoverPNK(juror); - } - } - - // ----------------------------------------------- // - // RULING EXECUTION // - // ----------------------------------------------- // - const { ruled } = await core.disputes(dispute.id); - const { ruling } = await core.currentRuling(dispute.id); - if (!ruled) { - logger.info(`Executing ruling ${ruling} for dispute #${dispute.id}`); - await executeRuling(dispute); - } else { - logger.info(`Ruling already executed for dispute #${dispute.id}`); - } - - // ----------------------------------------------- // - // WITHDRAWAL OF THE APPEAL CONTRIBUTIONS // - // ----------------------------------------------- // - let contributions = await getAppealContributions(dispute.id).catch((e) => handleError(e)); - if (!contributions) { - continue; - } - // Remove contributions already withdrawn and those for other rounds - contributions = contributions.filter((contribution) => { - return !contribution.rewardWithdrawn && contribution.coreDispute.currentRoundIndex === dispute.currentRoundIndex; - }); - // Remove duplicates which may have a different contribution amount for the same round, choice and beneficiary - contributions = [...new Set(contributions)]; - for (let contribution of contributions) { - // Could be improved by pinpointing exactly which round requires a withdrawal, just try all of them for now. - for (let round = toBigInt(dispute.currentRoundIndex); round >= 0; round = round - 1n) { - await withdrawAppealContribution(dispute.id, round.toString(), contribution); - await delay(ITERATIONS_COOLDOWN_PERIOD); // To avoid spiking the gas price - } - } - } - - logger.info(`Current phase: ${PHASES[getNumber(await sortition.phase())]}`); - - // ----------------------------------------------- // - // EXECUTE DELAYED STAKES // - // ----------------------------------------------- // - - if (await isPhaseStaking()) { - await executeDelayedStakes(); - } - - await sendHeartbeat(); - - await shutdown(); -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }) - .finally(() => { - logger.flush(); - }); diff --git a/contracts/scripts/keeperBotShutter.ts b/contracts/scripts/keeperBotShutter.ts deleted file mode 100644 index fff463513..000000000 --- a/contracts/scripts/keeperBotShutter.ts +++ /dev/null @@ -1,335 +0,0 @@ -import hre from "hardhat"; -import { getBytes } from "ethers"; -import { DisputeKitGatedShutter, DisputeKitShutter } from "../typechain-types"; -import { decrypt } from "./shutter"; -import env from "./utils/env"; -import loggerFactory from "./utils/logger"; -import { Cores, getContracts as getContractsForCoreType } from "./utils/contracts"; - -const SUBGRAPH_URL = env.require("SUBGRAPH_URL"); -const CORE_TYPE = env.optional("CORE_TYPE", "base"); -const DISPUTES_TO_SKIP = env - .optional("DISPUTES_TO_SKIP", "") - .split(",") - .map((s) => s.trim()); - -const loggerOptions = env.optionalNoDefault("LOGTAIL_TOKEN_KEEPER_BOT") - ? { - transportTargetOptions: { - target: "@logtail/pino", - options: { sourceToken: env.require("LOGTAIL_TOKEN_KEEPER_BOT") }, - level: env.optional("LOG_LEVEL", "info"), - }, - level: env.optional("LOG_LEVEL", "info"), // for pino-pretty - } - : { - level: env.optional("LOG_LEVEL", "info"), - }; -const logger = loggerFactory.createLogger(loggerOptions); - -/** - * Decodes a message string into its component parts - * @param message The message to decode - * @returns Object containing the decoded components - */ -const decode = (message: string) => { - const SEPARATOR = "-"; - const parts = message.split(SEPARATOR); - if (parts.length !== 3) { - throw Error(`Malformed decrypted message (${message})`); - } - const [choice, salt, justification] = parts; - return { - choice: BigInt(choice), - salt, - justification, - }; -}; - -/** - * Parses a Graph vote ID string (e.g., "2-45-1-0") into its components. - * @param graphVoteId - The vote ID string from the Graph. - * @returns An object with disputeKitID, localDisputeID, localRoundID, and voteID as numbers. - */ -const parseGraphVoteId = (graphVoteId: string) => { - const [disputeKitID, localDisputeID, localRoundID, voteID] = graphVoteId.split("-").map(Number); - return { disputeKitID, localDisputeID, localRoundID, voteID }; -}; - -type DisputeVotes = { - votes: { - id: string; - commit: string; - commited: boolean; - voted: boolean; - juror: { - id: string; - }; - }[]; - coreDispute: { - id: string; - currentRoundIndex: string; - }; -}; - -const getShutterDisputesToReveal = async ( - disputeKitShutter: DisputeKitShutter | DisputeKitGatedShutter -): Promise => { - const { gql, request } = await import("graphql-request"); // workaround for ESM import - const query = gql` - query DisputeToAutoReveal($shutterDisputeKit: Bytes) { - disputeKits(where: { address: $shutterDisputeKit, courts_: { hiddenVotes: true } }) { - id - rounds(where: { isCurrentRound: true, dispute_: { period: vote } }) { - id - dispute { - disputeID - currentRoundIndex - currentRound { - id - } - disputeKitDispute { - localRounds { - ... on ClassicRound { - votes { - id - ... on ClassicVote { - commit - commited - voted - juror { - id - } - } - } - } - } - id - currentLocalRoundIndex - coreDispute { - id - currentRoundIndex - } - } - period - } - } - } - } - `; - type ShutterDisputes = { - disputeKits: Array<{ - id: string; - rounds: Array<{ - id: string; - dispute: { - disputeID: string; - currentRoundIndex: string; - currentRound: { - id: string; - }; - disputeKitDispute: Array<{ - localRounds: Array<{ - votes: Array<{ - id: string; - commit: string; - commited: boolean; - voted: boolean; - juror: { - id: string; - }; - }>; - }>; - id: string; - currentLocalRoundIndex: string; - coreDispute: { - id: string; - currentRoundIndex: string; - }; - }>; - period: string; - }; - }>; - }>; - }; - - logger.debug(`Using Shutter dispute kit: ${disputeKitShutter.target}`); - const variables = { shutterDisputeKit: disputeKitShutter.target }; - const { disputeKits } = await request(SUBGRAPH_URL, query, variables); - if (disputeKits.length === 0) { - logger.debug("No Shutter dispute kit found, skipping auto-reveal"); - return []; - } - // For each round, if dispute.disputeKitDispute.length !== 1, filter out the round - let filteredRounds = disputeKits[0].rounds.filter((round) => round.dispute.disputeKitDispute.length === 1); - - // Remove the rounds which are not the current ones - filteredRounds = filteredRounds.filter((round) => round.id === round.dispute.currentRound.id); - - // For each filteredRound, in dispute.disputeKitDispute[0], keep only localRounds[currentLocalRoundIndex] - const disputeVotes = filteredRounds.map((round) => { - const dk = round.dispute.disputeKitDispute[0]; - const idx = Number(dk.currentLocalRoundIndex); - const filteredLocalRounds = dk.localRounds.filter((_, i) => i === idx); - return { - coreDispute: dk.coreDispute, - votes: filteredLocalRounds[0].votes, - }; - }); - - // Filter out the disputes without votes and the votes where committed is false or voted is true - const filteredDisputeVotes = disputeVotes - .map((item) => ({ - ...item, - votes: item.votes.filter((vote) => vote.commited && !vote.voted), - })) - .filter((item) => item.votes.length > 0); - - return filteredDisputeVotes; -}; - -export const shutterAutoReveal = async ( - disputeKitShutter: DisputeKitShutter | DisputeKitGatedShutter | null, - disputesToSkip: string[] -) => { - if (!disputeKitShutter) { - logger.debug("No Shutter dispute kit found, skipping auto-reveal"); - return []; - } - - logger.info(`Using Shutter API: ${process.env.SHUTTER_API ?? "mainnet"}`); - - const shutterDisputes = await getShutterDisputesToReveal(disputeKitShutter); - logger.info(`Votes to auto-reveal: ${JSON.stringify(shutterDisputes, null, 2)}`); - - for (const dispute of shutterDisputes) { - const { coreDispute, votes } = dispute; - if (disputesToSkip.includes(coreDispute.id)) { - logger.info(`Skipping disputeID: ${coreDispute.id}`); - continue; - } - const decryptCache = new Map(); // Cache for decrypted messages: key is `${_encryptedVote}-${_identity}` - const decryptedToVoteIDs = new Map(); // Map from decryptedMessage string to array of voteIDs - const decryptedToSample = new Map(); // Map from decryptedMessage string to a sample { _encryptedVote, _identity } (for logging/debug) - - // For each vote, decrypt the message and group voteIDs by decryptedMessage - for (const vote of votes) { - const { voteID } = parseGraphVoteId(vote.id); - - // Retrieve the CommitCastShutter events - const filter = disputeKitShutter.filters.CommitCastShutter(coreDispute.id, vote.juror.id, getBytes(vote.commit)); - const events = await disputeKitShutter.queryFilter(filter); - if (events.length === 0) { - logger.error(`No CommitCastShutter event found for disputeID: ${coreDispute.id}, voteID: ${vote.id}`); - continue; - } - if (events.length > 1) { - logger.warn( - `Multiple CommitCastShutter events found for disputeID: ${coreDispute.id}, voteID: ${vote.id}, using the first one only` - ); - } - const { _encryptedVote, _identity } = events[0].args; - logger.debug(`CommitCastShutter event: ${JSON.stringify({ _encryptedVote, _identity }, null, 2)}`); - - // Decrypt the message - const cacheKey = `${_encryptedVote.toString()}-${_identity.toString()}`; - let decryptedMessage: string; - if (decryptCache.has(cacheKey)) { - logger.debug(`Using cached value for ${cacheKey}`); - decryptedMessage = decryptCache.get(cacheKey)!; - } else { - try { - logger.debug(`Decrypting message for ${cacheKey}`); - decryptedMessage = await decrypt(_encryptedVote, _identity); - decryptCache.set(cacheKey, decryptedMessage); - } catch (e) { - logger.error(`Error decrypting message for ${cacheKey}: ${e}`); - continue; - } - } - logger.debug(`Decrypted message: ${decryptedMessage}`); - - // Group voteIDs by decryptedMessage - if (!decryptedToVoteIDs.has(decryptedMessage)) { - decryptedToVoteIDs.set(decryptedMessage, []); - decryptedToSample.set(decryptedMessage, { _encryptedVote, _identity }); - } - decryptedToVoteIDs.get(decryptedMessage)!.push(voteID); - } - - // For each unique decryptedMessage, decode and castVote once with all voteIDs - for (const [decryptedMessage, voteIDs] of decryptedToVoteIDs.entries()) { - const decodedMessage = decode(decryptedMessage); - logger.info( - `Decoded message for voteIDs [${voteIDs.join(", ")}]: ${JSON.stringify({ choice: decodedMessage.choice.toString(), salt: decodedMessage.salt, justification: decodedMessage.justification }, null, 2)}` - ); - // Simulate - try { - await disputeKitShutter.castVoteShutter.staticCall( - coreDispute.id, - voteIDs, - decodedMessage.choice, - decodedMessage.salt, - decodedMessage.justification - ); - } catch (e) { - logger.error( - `CastVoteShutter: will fail for disputeID: ${coreDispute.id} and voteIDs [${voteIDs.join(", ")}], skipping` - ); - continue; - } - // Execute with extra gas - try { - const gas = - ((await disputeKitShutter.castVoteShutter.estimateGas( - coreDispute.id, - voteIDs, - decodedMessage.choice, - decodedMessage.salt, - decodedMessage.justification - )) * - 150n) / - 100n; // 50% extra gas - const tx = await disputeKitShutter.castVoteShutter( - coreDispute.id, - voteIDs, - decodedMessage.choice, - decodedMessage.salt, - decodedMessage.justification, - { gasLimit: gas } - ); - logger.info(`Cast vote transaction: ${tx.hash}`); - } catch (e) { - logger.error(e, "Failure"); - continue; - } - } - } -}; - -const getContracts = async () => { - const coreType = Cores[CORE_TYPE.toUpperCase() as keyof typeof Cores]; - if (coreType === Cores.UNIVERSITY) { - throw new Error("University is not supported yet"); - } - return await getContractsForCoreType(hre, coreType); -}; - -async function main() { - logger.debug("Starting..."); - const { disputeKitShutter, disputeKitGatedShutter } = await getContracts(); - await shutterAutoReveal(disputeKitShutter, DISPUTES_TO_SKIP); - await shutterAutoReveal(disputeKitGatedShutter, DISPUTES_TO_SKIP); -} - -if (require.main === module) { - main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }) - .finally(() => { - logger.flush(); - }); -} diff --git a/contracts/scripts/populateCourts.ts b/contracts/scripts/populateCourts.ts deleted file mode 100644 index cf86c9cbb..000000000 --- a/contracts/scripts/populateCourts.ts +++ /dev/null @@ -1,278 +0,0 @@ -import { task, types } from "hardhat/config"; -import { KlerosCore, KlerosCoreUniversity } from "../typechain-types"; -import { BigNumberish, toBigInt, toNumber } from "ethers"; -import courtsV1Mainnet from "../config/courts.v1.mainnet.json"; -import courtsV1GnosisChain from "../config/courts.v1.gnosischain.json"; -import courtsV2ArbitrumTestnet from "../config/courts.v2.testnet.json"; -import courtsV2ArbitrumDevnet from "../config/courts.v2.devnet.json"; -import courtsV2Mainnet from "../config/courts.v2.mainnet.json"; -import { isDevnet } from "../deploy/utils"; -import { execute, writeTransactionBatch } from "./utils/execution"; -import { getContracts, Cores } from "./utils/contracts"; - -enum HomeChains { - ARBITRUM_ONE = 42161, - ARBITRUM_SEPOLIA = 421614, - HARDHAT = 31337, -} - -enum Sources { - V1_MAINNET, - V1_GNOSIS, - V2_DEVNET, - V2_TESTNET, - V2_MAINNET, -} - -type Court = { - id: number; - parent: number; - hiddenVotes: boolean; - minStake: BigNumberish; - alpha: BigNumberish; - feeForJuror: BigNumberish; - jurorsForCourtJump: BigNumberish; - timesPerPeriod: BigNumberish[]; - supportedDisputeKits?: BigNumberish[]; -}; - -const ETH_USD = 4000n; -const DISPUTE_KIT_CLASSIC = 1n; -const TEN_THOUSAND_GWEI = 10n ** 13n; - -task("populate:courts", "Populates the courts and their parameters") - .addOptionalParam( - "from", - "The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet (default: auto depending on the network)", - undefined - ) - .addOptionalParam("start", "The starting index for the courts to populate (default: 0)", 0, types.int) - .addOptionalParam( - "maxNumberOfCourts", - "The maximum number of courts to populate (default: all)", - undefined, - types.int - ) - .addOptionalParam("coreType", "The type of core to use between base, university (default: base)", Cores.BASE) - .addFlag("reverse", "Iterates the courts in reverse order, useful to increase minStake in the child courts first") - .addFlag("forceV1ParametersToDev", "Use development values for the v1 courts parameters") - .setAction(async (taskArgs, hre) => { - const { getNamedAccounts, getChainId, ethers, network } = hre; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await ethers.getSigners())[0].address; - - const chainId = Number(await getChainId()); - if (!HomeChains[chainId]) { - console.error(`Aborting: script is not compatible with ${chainId}`); - return; - } else { - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - } - - let from: Sources | undefined; - if (taskArgs.from) { - from = Sources[taskArgs.from.toUpperCase() as keyof typeof Sources]; - if (from === undefined) { - console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet"); - return; - } - } else { - from = isDevnet(network) ? Sources.V2_DEVNET : Sources.V2_TESTNET; - } - console.log("Populating from source %s", Sources[from]); - - const coreType = Cores[taskArgs.coreType.toUpperCase() as keyof typeof Cores]; - if (coreType === undefined) { - console.error("Invalid core type, must be one of base, university"); - return; - } - console.log("Using core type %s", coreType); - - const truncateWei = (x: bigint) => (x / TEN_THOUSAND_GWEI) * TEN_THOUSAND_GWEI; - - const parametersUsdToEth = (court: Court): Court => ({ - ...court, - minStake: truncateWei(toBigInt(court.minStake) / ETH_USD), - feeForJuror: truncateWei(toBigInt(court.feeForJuror) / ETH_USD), - }); - - const parametersProductionToDev = (court: Court): Court => ({ - ...court, - minStake: truncateWei(toBigInt(court.minStake) / 10000n), - feeForJuror: truncateWei(ethers.parseEther("0.00001")), - timesPerPeriod: [120, 120, 120, 240], - }); - - // WARNING: skip the Forking court at id 0, so the v1 courts are shifted by 1 - const parametersV1ToV2 = (court: Court): Court => ({ - ...court, - id: court.id++, - parent: court.parent++, - }); - - let courtsV2; - switch (+from) { - case Sources.V1_MAINNET: { - let courtsV1: Court[] = courtsV1Mainnet; - courtsV1 = taskArgs.forceV1ParametersToDev ? courtsV1.map(parametersProductionToDev) : courtsV1; - courtsV2 = courtsV1.map(parametersV1ToV2); - break; - } - case Sources.V1_GNOSIS: { - let courtsV1: Court[] = courtsV1GnosisChain.map(parametersUsdToEth); - courtsV1 = taskArgs.forceV1ParametersToDev ? courtsV1.map(parametersProductionToDev) : courtsV1; - courtsV2 = courtsV1.map(parametersV1ToV2); - break; - } - case Sources.V2_DEVNET: { - courtsV2 = courtsV2ArbitrumDevnet; - break; - } - case Sources.V2_TESTNET: { - courtsV2 = courtsV2ArbitrumTestnet; - break; - } - case Sources.V2_MAINNET: { - courtsV2 = courtsV2Mainnet; - break; - } - default: - throw new Error("Unknown source"); - } - - // Warning: the indices are NOT the court IDs, e.g. the forking court is not present in the config so the indices are shifted by 1 - const start = taskArgs.start; - const end = taskArgs.maxNumberOfCourts ? start + taskArgs.maxNumberOfCourts : courtsV2.length; - console.log(`Keeping only the first ${end - start} courts, starting from ${start}`); - courtsV2 = courtsV2.slice(start, end); - - if (taskArgs.reverse) { - console.log("Reversing the order of courts"); - courtsV2.reverse(); - } - - console.log("courtsV2 = %O", courtsV2); - - const { core } = await getContracts(hre, coreType); - - for (const court of courtsV2) { - const courtPresent = await core.courts(court.id).catch(() => {}); - if (courtPresent) { - console.log("Court %d found: %O", court.id, courtPresent); - - // Court.parent and sortitionSumTreeK cannot be changed. - - let change = false; - - if (courtPresent.hiddenVotes !== court.hiddenVotes) { - change = true; - console.log( - "Court %d: changing hiddenVotes from %d to %d", - court.id, - courtPresent.hiddenVotes, - court.hiddenVotes - ); - } - - if (courtPresent.minStake !== toBigInt(court.minStake)) { - change = true; - console.log("Court %d: changing minStake from %d to %d", court.id, courtPresent.minStake, court.minStake); - } - - if (courtPresent.alpha !== toBigInt(court.alpha)) { - change = true; - console.log("Court %d: changing alpha from %d to %d", court.id, courtPresent.alpha, court.alpha); - } - - if (courtPresent.feeForJuror !== toBigInt(court.feeForJuror)) { - change = true; - console.log( - "Court %d: changing feeForJuror from %d to %d", - court.id, - courtPresent.feeForJuror, - court.feeForJuror - ); - } - - if (courtPresent.jurorsForCourtJump !== toBigInt(court.jurorsForCourtJump)) { - change = true; - console.log( - "Court %d: changing jurorsForCourtJump from %d to %d", - court.id, - courtPresent.jurorsForCourtJump, - court.jurorsForCourtJump - ); - } - - const timesPerPeriodPresent = (await core.getTimesPerPeriod(court.id)).map((bn) => toNumber(bn)); - if (!timesPerPeriodPresent.every((val, index) => val === court.timesPerPeriod[index])) { - change = true; - console.log( - "Court %d: changing timesPerPeriod from %O to %O", - court.id, - timesPerPeriodPresent, - court.timesPerPeriod - ); - } - - if (!change) { - console.log("Court %d: no parameter change", court.id); - continue; - } - try { - await core.changeCourtParameters - .populateTransaction( - court.id, - court.hiddenVotes, - court.minStake, - court.alpha, - court.feeForJuror, - court.jurorsForCourtJump, - [court.timesPerPeriod[0], court.timesPerPeriod[1], court.timesPerPeriod[2], court.timesPerPeriod[3]] - ) - .then(execute); - } catch (error) { - console.error("Error changing court parameters: %s", error); - } - } else { - console.log("Court %d not found, creating it with", court.id, court); - try { - if (coreType === Cores.UNIVERSITY) { - await (core as KlerosCoreUniversity).createCourt - .populateTransaction( - court.parent, - court.hiddenVotes, - court.minStake, - court.alpha, - court.feeForJuror, - court.jurorsForCourtJump, - [court.timesPerPeriod[0], court.timesPerPeriod[1], court.timesPerPeriod[2], court.timesPerPeriod[3]], - [DISPUTE_KIT_CLASSIC] - ) - .then(execute); - } else { - await (core as KlerosCore).createCourt - .populateTransaction( - court.parent, - court.hiddenVotes, - court.minStake, - court.alpha, - court.feeForJuror, - court.jurorsForCourtJump, - [court.timesPerPeriod[0], court.timesPerPeriod[1], court.timesPerPeriod[2], court.timesPerPeriod[3]], - ethers.toBeHex(5), // Not accessible on-chain, but has always been set to the same value so far. - [DISPUTE_KIT_CLASSIC] - ) - .then(execute); - } - } catch (error) { - console.error(`Failed to create court ${court.id}: ${error}`); - } - } - - await new Promise((resolve) => setTimeout(resolve, 100)); - } - - writeTransactionBatch({ name: "populate-courts" }); - }); diff --git a/contracts/scripts/populatePolicyRegistry.ts b/contracts/scripts/populatePolicyRegistry.ts deleted file mode 100644 index 43087268a..000000000 --- a/contracts/scripts/populatePolicyRegistry.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { task, types } from "hardhat/config"; -import { PolicyRegistry } from "../typechain-types"; -import policiesV1Mainnet from "../config/policies.v1.mainnet.json"; -import policiesV1GnosisChain from "../config/policies.v1.gnosischain.json"; -import policiesV2ArbitrumTestnet from "../config/policies.v2.testnet.json"; -import policiesV2ArbitrumDevnet from "../config/policies.v2.devnet.json"; -import policiesV2Mainnet from "../config/policies.v2.mainnet.json"; -import { isDevnet } from "../deploy/utils"; -import { execute, writeTransactionBatch } from "./utils/execution"; - -enum HomeChains { - ARBITRUM_ONE = 42161, - ARBITRUM_SEPOLIA = 421614, - HARDHAT = 31337, -} - -enum Sources { - V1_MAINNET, - V1_GNOSIS, - V2_DEVNET, - V2_TESTNET, - V2_MAINNET, -} - -task("populate:policy-registry", "Populates the policy registry for each court") - .addOptionalParam( - "from", - "The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet (default: auto depending on the network)", - undefined - ) - .addOptionalParam("start", "The starting index for the courts to populate (default: 0)", 0, types.int) - .addOptionalParam( - "maxNumberOfCourts", - "The maximum number of courts to populate (default: all)", - undefined, - types.int - ) - .setAction(async (taskArgs, hre) => { - const { getNamedAccounts, getChainId, ethers, network } = hre; - - // fallback to hardhat node signers on local network - const deployer = (await getNamedAccounts()).deployer ?? (await ethers.getSigners())[0].address; - - const chainId = Number(await getChainId()); - if (!HomeChains[chainId]) { - console.error(`Aborting: script is not compatible with ${chainId}`); - return; - } else { - console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer); - } - - let from: Sources | undefined; - if (taskArgs.from) { - from = Sources[taskArgs.from.toUpperCase() as keyof typeof Sources]; - if (from === undefined) { - console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet"); - return; - } - } else { - from = isDevnet(network) ? Sources.V2_DEVNET : Sources.V2_TESTNET; - } - console.log("Populating from source %s", Sources[from]); - - let policiesV2; - switch (+from) { - case Sources.V1_MAINNET: { - const policiesV1 = policiesV1Mainnet; - - // WARNING: skip the Forking court at id 0, so the v1 courts are shifted by 1 - policiesV2 = policiesV1.map((policy) => ({ ...policy, court: policy.court + 1 })); - break; - } - case Sources.V1_GNOSIS: { - const policiesV1 = policiesV1GnosisChain.map((policy) => ({ - ...policy, - name: policy.name.replace("xDai ", ""), - })); - - // WARNING: skip the Forking court at id 0, so the v1 courts are shifted by 1 - policiesV2 = policiesV1.map((policy) => ({ ...policy, court: policy.court + 1 })); - break; - } - case Sources.V2_DEVNET: { - policiesV2 = policiesV2ArbitrumDevnet; - break; - } - case Sources.V2_TESTNET: { - policiesV2 = policiesV2ArbitrumTestnet; - break; - } - case Sources.V2_MAINNET: { - policiesV2 = policiesV2Mainnet; - break; - } - default: - return; - } - - // Warning: the indices are NOT the court IDs, e.g. the forking court is not present in the config so the indices are shifted by 1 - const start = taskArgs.start; - const end = taskArgs.maxNumberOfCourts ? start + taskArgs.maxNumberOfCourts : policiesV2.length; - console.log(`Keeping only the first ${end - start} courts, starting from ${start}`); - policiesV2 = policiesV2.slice(start, end); - - const policyRegistry = await ethers.getContract("PolicyRegistry"); - - for await (const policy of policiesV2) { - console.log("Populating policy for %s Court (%d): %s", policy.name, policy.court, policy.uri); - await policyRegistry.setPolicy.populateTransaction(policy.court, policy.name, policy.uri).then(execute); - } - - writeTransactionBatch({ name: "populate-policy-registry" }); - }); diff --git a/contracts/scripts/populateReadme.sh b/contracts/scripts/populateReadme.sh deleted file mode 100755 index 30442c1af..000000000 --- a/contracts/scripts/populateReadme.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" - -if [ ! -x "$(command -v envsubst)" ]; then - echo >&2 "error: envsubst not installed" - exit 1 -fi - -deployments="$($SCRIPT_DIR/generateDeploymentsMarkdown.sh)" \ - envsubst '$deployments' \ - < README.md.template \ - > README.md diff --git a/contracts/scripts/publish.sh b/contracts/scripts/publish.sh deleted file mode 100755 index cfc441064..000000000 --- a/contracts/scripts/publish.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash - -shopt -s extglob - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" - -#-------------------------------------- -# Error handling -#-------------------------------------- - -set -Ee -function _catch { - # Don't propagate to outer shell - exit 0 -} -function _finally { - # TODO: rollback version bump - rm -rf $SCRIPT_DIR/../dist -} -trap _catch ERR -trap _finally EXIT - -#-------------------------------------- - -if [[ "$PWD" != */contracts ]]; then - echo "Error: This script must be run from the contracts directory" - exit 1 -fi - -# Bump the version -yarn version $1 - -# Recompile the contracts -yarn clean -yarn build - -# Rebuild the typechain without mocks -rm -rf artifacts/src/**/*[mM]ock* -find artifacts/src -name "*.dbg.json" -type f -delete -rm -rf typechain-types -yarn typechain --out-dir typechain-types --glob 'artifacts/src/**/*.json' --target ethers-v6 --node16-modules - -# Generate the viem artifacts -yarn viem:generate-devnet -yarn viem:generate-testnet -yarn viem:generate-mainnet - -# Generate the Hardhat artifacts -yarn export:devnet -yarn export:testnet -yarn export:mainnet - -# Build the dist -rm -rf dist -mkdir dist -yarn build:all - -# Copy the README and contracts -cp -pr README.md src/ dist/ - -# Remove unwanted files -rm -rf dist/config -rm -rf dist/deploy -rm -rf dist/scripts -rm -rf dist/test -rm -rf dist/**/mock -rm -rf dist/**/*Mock* -rm -rf dist/hardhat.config* -rm -rf dist/deployments/**/solcInputs -rm -rf dist/deployments/localhost -rm -rf dist/deployments/hardhat -rm -rf dist/deployments/hardhat.viem.ts -jq 'del(.scripts.prepare)' package.json >dist/package.json - -# Publish the package -cd dist -npm publish -cd - diff --git a/contracts/scripts/setPoliciesURIs.sh b/contracts/scripts/setPoliciesURIs.sh deleted file mode 100755 index 1bdc4e599..000000000 --- a/contracts/scripts/setPoliciesURIs.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# Check if at least one input file is provided -if [ "$#" -lt 1 ]; then - echo "Usage: $0 [input_policies_file2 ...]" - exit 1 -fi - -# Process each input file -for INPUT_FILE in "$@"; do - # Validate file extension - if [[ ! "$INPUT_FILE" =~ \.json$ ]]; then - echo "Error: Input file $INPUT_FILE must have a .json extension" - continue - fi - - echo "Processing $INPUT_FILE..." - - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - INPUT_FILE_WITHOUT_EXTENSION="${INPUT_FILE%.json}" - POLICIES_DIR="$SCRIPT_DIR/../$INPUT_FILE_WITHOUT_EXTENSION" - HASHES_FILE=$(mktemp) - - echo "Creating $POLICIES_DIR directory..." - mkdir -p $POLICIES_DIR - - # Step 1: Create individual policy files and collect their hashes - echo "Creating individual policy files..." - echo "{" > "$HASHES_FILE" - first=true - - jq -c '.[]' "$INPUT_FILE" | while read -r policy; do - name=$(echo "$policy" | jq -r '.name' | tr ' ' '-') - court=$(echo "$policy" | jq -r '.court') - policy_filepath="$POLICIES_DIR/${name}-Policy.json" - - # Remove the uri field if it exists and save to a temporary file - echo "$policy" | jq 'del(.uri)' > "$policy_filepath" - - # Get IPFS hash - ipfs_hash=$(ipfs add -Q "$policy_filepath") - if [ -n "$ipfs_hash" ]; then - echo "Preparing $name Court ($court): ${name}-Policy.json" - # Add comma for all but the first entry - if [ "$first" = true ]; then - first=false - else - echo "," >> "$HASHES_FILE" - fi - # Store the hash with court as key - echo "\"$court\": \"$ipfs_hash\"" >> "$HASHES_FILE" - else - echo "Failed to get IPFS hash for ${name}-Policy.json" - rm "$HASHES_FILE" - continue 2 - fi - done - - echo "}" >> "$HASHES_FILE" - - # Step 2: Update the input file with URIs - echo "Updating URIs in $INPUT_FILE..." - jq --slurpfile hashes "$HASHES_FILE" ' - map(. + {uri: ("/ipfs/" + ($hashes[0][.court | tostring]))}) - ' "$INPUT_FILE" > "${INPUT_FILE}.tmp" && mv "${INPUT_FILE}.tmp" "$INPUT_FILE" - - rm "$HASHES_FILE" - echo "Done! URIs updated in $INPUT_FILE" - echo "----------------------------------------" -done \ No newline at end of file diff --git a/contracts/scripts/shutter.ts b/contracts/scripts/shutter.ts deleted file mode 100644 index 169e3ce2c..000000000 --- a/contracts/scripts/shutter.ts +++ /dev/null @@ -1,293 +0,0 @@ -import { encryptData, decrypt as shutterDecrypt } from "@shutter-network/shutter-sdk"; -import { Hex, stringToHex, hexToString } from "viem"; -import crypto from "crypto"; -import "isomorphic-fetch"; -import env from "./utils/env"; - -// Time in seconds to wait before the message can be decrypted -export const DECRYPTION_DELAY = 5; - -const SHUTTER_API_URL = { - mainnet: "https://shutter-api.shutter.network", - testnet: "https://shutter-api.chiado.staging.shutter.network", -}; - -const SHUTTER_API = env.optional("SHUTTER_API", "mainnet") as keyof typeof SHUTTER_API_URL; -const SHUTTER_API_KEY = env.optionalNoDefault("SHUTTER_API_KEY"); - -interface ShutterApiMessageData { - eon: number; - identity: string; - identity_prefix: string; - eon_key: string; - tx_hash: string; -} - -interface ShutterApiResponse { - message: ShutterApiMessageData; - error?: string; -} - -interface ShutterDecryptionKeyData { - decryption_key: string; - identity: string; - decryption_timestamp: number; -} - -/** - * Gets the appropriate headers for API requests, including bearer token for mainnet if available - * @returns Headers object for fetch requests - */ -function getApiHeaders(): Record { - const headers: Record = { - accept: "application/json", - }; - - // Add bearer token for mainnet if available - if (SHUTTER_API === "mainnet" && SHUTTER_API_KEY && SHUTTER_API_KEY?.trim() !== "") { - headers.Authorization = `Bearer ${SHUTTER_API_KEY}`; - } - - return headers; -} - -/** - * Fetches encryption data from the Shutter API - * @param decryptionTimestamp Unix timestamp when decryption should be possible - * @returns Promise with the eon key and identity - */ -async function fetchShutterData(decryptionTimestamp: number): Promise { - try { - console.log(`Sending request to Shutter API with decryption timestamp: ${decryptionTimestamp}`); - - // Generate a random identity prefix - const identityPrefix = generateRandomBytes32(); - console.log(`Generated identity prefix: ${identityPrefix}`); - - const response = await fetch(`${SHUTTER_API_URL[SHUTTER_API]}/api/register_identity`, { - method: "POST", - headers: { - ...getApiHeaders(), - "Content-Type": "application/json", - }, - body: JSON.stringify({ - decryptionTimestamp, - identityPrefix, - }), - }); - - // Log the response status - console.log(`API response status: ${response.status}`); - - // Get the response text - const responseText = await response.text(); - - if (!response.ok) { - throw new Error(`API request failed with status ${response.status}: ${responseText}`); - } - - // Parse the JSON response - let jsonResponse: ShutterApiResponse; - try { - jsonResponse = JSON.parse(responseText); - } catch (error) { - throw new Error(`Failed to parse API response as JSON: ${responseText}`); - } - - // Check if we have the message data - if (!jsonResponse.message) { - throw new Error(`API response missing message data: ${JSON.stringify(jsonResponse)}`); - } - - return jsonResponse.message; - } catch (error) { - console.error("Error fetching data from Shutter API:", error); - throw error; - } -} - -/** - * Fetches the decryption key from the Shutter API - * @param identity The identity used for encryption - * @returns Promise with the decryption key data - */ -async function fetchDecryptionKey(identity: string): Promise { - console.log(`Fetching decryption key for identity: ${identity}`); - - const response = await fetch(`${SHUTTER_API_URL[SHUTTER_API]}/api/get_decryption_key?identity=${identity}`, { - method: "GET", - headers: getApiHeaders(), - }); - - // Get the response text - const responseText = await response.text(); - - // Try to parse the error response even if the request failed - let jsonResponse; - try { - jsonResponse = JSON.parse(responseText); - } catch (error) { - throw new Error(`Failed to parse API response as JSON: ${responseText}`); - } - - // Handle the "too early" error case specifically - if (!response.ok) { - if (jsonResponse?.description?.includes("timestamp not reached yet")) { - throw new Error( - `Cannot decrypt yet: The decryption timestamp has not been reached.\n` + - `Please wait at least ${DECRYPTION_DELAY} seconds after encryption before attempting to decrypt.\n` + - `Error details: ${jsonResponse.description}` - ); - } - throw new Error(`API request failed with status ${response.status}: ${responseText}`); - } - - // Check if we have the message data - if (!jsonResponse.message) { - throw new Error(`API response missing message data: ${JSON.stringify(jsonResponse)}`); - } - - return jsonResponse.message; -} - -/** - * Ensures a string is a valid hex string with 0x prefix - * @param hexString The hex string to validate - * @returns The validated hex string with 0x prefix - */ -function ensureHexString(hexString: string | undefined): `0x${string}` { - if (!hexString) { - throw new Error("Hex string is undefined or null"); - } - - // Add 0x prefix if it doesn't exist - const prefixedHex = hexString.startsWith("0x") ? hexString : `0x${hexString}`; - return prefixedHex as `0x${string}`; -} - -/** - * Generates a random 32 bytes - * @returns Random 32 bytes as a hex string with 0x prefix - */ -function generateRandomBytes32(): `0x${string}` { - return ("0x" + - crypto - .getRandomValues(new Uint8Array(32)) - .reduce((acc, byte) => acc + byte.toString(16).padStart(2, "0"), "")) as Hex; -} - -/** - * Encrypts a message using the Shutter API - * @param message The message to encrypt - * @returns Promise with the encrypted commitment and identity - */ -export async function encrypt(message: string): Promise<{ encryptedCommitment: string; identity: string }> { - // Set decryption timestamp - const decryptionTimestamp = Math.floor(Date.now() / 1000) + DECRYPTION_DELAY; - - // Fetch encryption data from Shutter API - console.log(`Fetching encryption data for decryption at timestamp ${decryptionTimestamp}...`); - const shutterData = await fetchShutterData(decryptionTimestamp); - - // Extract the eon key and identity from the response and ensure they have the correct format - const eonKeyHex = ensureHexString(shutterData.eon_key); - const identityHex = ensureHexString(shutterData.identity); - - // Message to encrypt - const msgHex = stringToHex(message); - - // Generate a random sigma - const sigmaHex = generateRandomBytes32(); - - console.log("Eon Key:", eonKeyHex); - console.log("Identity:", identityHex); - console.log("Sigma:", sigmaHex); - - // Encrypt the message - const encryptedCommitment = await encryptData(msgHex, identityHex, eonKeyHex, sigmaHex); - - return { encryptedCommitment, identity: identityHex }; -} - -/** - * Decrypts a message using the Shutter API - * @param encryptedMessage The encrypted message to decrypt - * @param identity The identity used for encryption - * @returns Promise with the decrypted message - */ -export async function decrypt(encryptedMessage: string, identity: string): Promise { - // Fetch the decryption key - const decryptionKeyData = await fetchDecryptionKey(identity); - console.log("Decryption key:", decryptionKeyData.decryption_key); - - // Ensure the decryption key is properly formatted - const decryptionKey = ensureHexString(decryptionKeyData.decryption_key); - - // Decrypt the message - const decryptedHexMessage = await shutterDecrypt(encryptedMessage, decryptionKey); - - // Convert the decrypted hex message back to a string - return hexToString(decryptedHexMessage as `0x${string}`); -} - -async function main() { - try { - const command = process.argv[2]?.toLowerCase(); - - if (!command) { - console.error(` -Usage: yarn ts-node shutter.ts [arguments] - -Commands: - encrypt Encrypt a message - decrypt Decrypt a message (requires the identity used during encryption) - -Examples: - yarn ts-node shutter.ts encrypt "my secret message" - yarn ts-node shutter.ts decrypt "encrypted-data" "0x1234..."`); - process.exit(1); - } - - switch (command) { - case "encrypt": { - const message = process.argv[3]; - if (!message) { - console.error("Error: Missing message to encrypt"); - console.error("Usage: yarn ts-node shutter.ts encrypt "); - process.exit(1); - } - console.log(`Using Shutter API ${SHUTTER_API_URL[SHUTTER_API]}...`); - const { encryptedCommitment, identity } = await encrypt(message); - console.log("\nEncrypted Commitment:", encryptedCommitment); - console.log("Identity:", identity); - break; - } - case "decrypt": { - const [encryptedMessage, identity] = [process.argv[3], process.argv[4]]; - if (!encryptedMessage || !identity) { - console.error("Error: Missing required arguments for decrypt"); - console.error("Usage: yarn ts-node shutter.ts decrypt "); - console.error("Note: The identity is the one returned during encryption"); - process.exit(1); - } - console.log(`Using Shutter API ${SHUTTER_API_URL[SHUTTER_API]}...`); - const decryptedMessage = await decrypt(encryptedMessage, identity); - console.log("\nDecrypted Message:", decryptedMessage); - break; - } - default: { - console.error(`Error: Unknown command '${command}'`); - console.error("Valid commands are: encrypt, decrypt"); - process.exit(1); - } - } - } catch (error) { - console.error("\nError:", error); - process.exit(1); - } -} - -// Execute if run directly -if (require.main === module) { - main(); -} diff --git a/contracts/scripts/storage-layout.ts b/contracts/scripts/storage-layout.ts deleted file mode 100644 index 70cf166e7..000000000 --- a/contracts/scripts/storage-layout.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { task } from "hardhat/config"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; - -task("storage-layout", "Prints the storage layout of a contract").setAction( - async ({}, hre: HardhatRuntimeEnvironment) => { - await hre.run("compile"); - const buildInfo = await hre.artifacts.getBuildInfo(`src/arbitration/KlerosCore.sol:KlerosCore`); - console.log(buildInfo.output.contracts["src/arbitration/KlerosCore.sol"]["KlerosCore"].storageLayout); - } -); diff --git a/contracts/scripts/utils/contracts.ts b/contracts/scripts/utils/contracts.ts deleted file mode 100644 index 50bcac2f6..000000000 --- a/contracts/scripts/utils/contracts.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { - BlockHashRNG, - ChainlinkRNG, - DisputeKitClassic, - DisputeKitShutter, - DisputeResolver, - DisputeTemplateRegistry, - KlerosCore, - KlerosCoreUniversity, - PNK, - PolicyRegistry, - RandomizerRNG, - SortitionModule, - SortitionModuleUniversity, - TransactionBatcher, - KlerosCoreSnapshotProxy, - EvidenceModule, - DisputeKitGated, - DisputeKitGatedShutter, -} from "../../typechain-types"; - -export const Cores = { - BASE: "BASE", - UNIVERSITY: "UNIVERSITY", -} as const; - -export type Core = (typeof Cores)[keyof typeof Cores]; - -/** - * Get contract names by specifying the coreType (BASE, UNIVERSITY). - * @param coreType - Core type - * @returns Contract names - */ -export const getContractNames = (coreType: Core) => { - const coreSpecificNames = { - [Cores.BASE]: { - core: "KlerosCore", - sortition: "SortitionModule", - disputeKitClassic: "DisputeKitClassic", - disputeKitShutter: "DisputeKitShutter", - disputeKitGated: "DisputeKitGated", - disputeKitGatedShutter: "DisputeKitGatedShutter", - disputeResolver: "DisputeResolver", - }, - [Cores.UNIVERSITY]: { - core: "KlerosCoreUniversity", - sortition: "SortitionModuleUniversity", - disputeKitClassic: "DisputeKitClassicUniversity", - disputeKitShutter: "DisputeKitShutterUniversity", - disputeKitGated: "DisputeKitGatedUniversity", - disputeKitGatedShutter: "DisputeKitGatedShutterUniversity", - disputeResolver: "DisputeResolverUniversity", - }, - }; - - if (!(coreType in coreSpecificNames)) throw new Error("Invalid core type, must be one of BASE, or UNIVERSITY"); - - return { - ...coreSpecificNames[coreType], - evidence: "EvidenceModule", - disputeTemplateRegistry: "DisputeTemplateRegistry", - policyRegistry: "PolicyRegistry", - batcher: "TransactionBatcher", - chainlinkRng: "ChainlinkRNG", - randomizerRng: "RandomizerRNG", - blockHashRNG: "BlockHashRNG", - pnk: "PNK", - snapshotProxy: "KlerosCoreSnapshotProxy", - }; -}; - -/** - * Get contracts by specifying the coreType (BASE, UNIVERSITY). - * @param hre - Hardhat runtime environment - * @param coreType - Core type - * @returns Contracts - */ -export const getContracts = async (hre: HardhatRuntimeEnvironment, coreType: Core) => { - const { ethers } = hre; - let core: KlerosCore | KlerosCoreUniversity; - let sortition: SortitionModule | SortitionModuleUniversity; - switch (coreType) { - case Cores.BASE: - core = await ethers.getContract(getContractNames(coreType).core); - sortition = await ethers.getContract(getContractNames(coreType).sortition); - break; - case Cores.UNIVERSITY: - core = await ethers.getContract(getContractNames(coreType).core); - sortition = await ethers.getContract(getContractNames(coreType).sortition); - break; - default: - throw new Error("Invalid core type, must be one of BASE, or UNIVERSITY"); - } - const disputeKitClassic = await ethers.getContract(getContractNames(coreType).disputeKitClassic); - const disputeKitShutter = await ethers.getContractOrNull( - getContractNames(coreType).disputeKitShutter - ); - const disputeKitGated = await ethers.getContractOrNull(getContractNames(coreType).disputeKitGated); - const disputeKitGatedShutter = await ethers.getContractOrNull( - getContractNames(coreType).disputeKitGatedShutter - ); - const disputeResolver = await ethers.getContract(getContractNames(coreType).disputeResolver); - const disputeTemplateRegistry = await ethers.getContract( - getContractNames(coreType).disputeTemplateRegistry - ); - const evidence = await ethers.getContract(getContractNames(coreType).evidence); - const policyRegistry = await ethers.getContract(getContractNames(coreType).policyRegistry); - const batcher = await ethers.getContract(getContractNames(coreType).batcher); - const chainlinkRng = await ethers.getContractOrNull(getContractNames(coreType).chainlinkRng); - const randomizerRng = await ethers.getContractOrNull(getContractNames(coreType).randomizerRng); - const blockHashRNG = await ethers.getContractOrNull(getContractNames(coreType).blockHashRNG); - const pnk = await ethers.getContract(getContractNames(coreType).pnk); - const snapshotProxy = await ethers.getContractOrNull( - getContractNames(coreType).snapshotProxy - ); - return { - core, - sortition, - disputeKitClassic, - disputeKitShutter, - disputeKitGated, - disputeKitGatedShutter, - disputeResolver, - disputeTemplateRegistry, - evidence, - policyRegistry, - chainlinkRng, - randomizerRng, - blockHashRNG, - pnk, - batcher, - snapshotProxy, - }; -}; - -/** - * Get contracts by inferring the coreType (BASE, UNIVERSITY) from the network, most convenient for most cases. - * @param hre - Hardhat runtime environment - * @returns Contracts - */ -export const getContractsFromNetwork = async (hre: HardhatRuntimeEnvironment) => { - const { network } = hre; - if (["arbitrumSepoliaDevnet", "arbitrumSepolia", "arbitrum"].includes(network.name)) { - return getContracts(hre, Cores.BASE); - } else { - throw new Error("Invalid network"); - } -}; - -/** - * Get contract names by inferring the coreType (BASE, UNIVERSITY) from the network, most convenient for most cases. - * @param hre - Hardhat runtime environment - * @returns Contract names - */ -export const getContractNamesFromNetwork = async (hre: HardhatRuntimeEnvironment) => { - const { network } = hre; - if (["arbitrumSepoliaDevnet", "arbitrumSepolia", "arbitrum"].includes(network.name)) { - return getContractNames(Cores.BASE); - } else { - throw new Error("Invalid network"); - } -}; diff --git a/contracts/scripts/utils/env.ts b/contracts/scripts/utils/env.ts deleted file mode 100644 index ef815ef84..000000000 --- a/contracts/scripts/utils/env.ts +++ /dev/null @@ -1,24 +0,0 @@ -import dotenv from "dotenv"; - -dotenv.config(); - -namespace env { - export const require = (key: string): string => { - const value = process.env[key]; - if (value === undefined) { - throw new Error(`Environment variable ${key} is undefined`); - } - return value; - }; - - export const optional = (key: string, defaultValue: string): string => { - const value = process.env[key]; - return value === undefined ? defaultValue : value; - }; - - export const optionalNoDefault = (key: string): string | undefined => { - return process.env[key]; - }; -} - -export default env; diff --git a/contracts/scripts/utils/execution.ts b/contracts/scripts/utils/execution.ts deleted file mode 100644 index b35709d5d..000000000 --- a/contracts/scripts/utils/execution.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { type ContractTransaction } from "ethers"; -import fs from "fs"; -import { type BuilderTransaction, template, transaction, transactionBuilderUrl } from "./tx-builder"; - -const governableAbi = [ - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -const transactions: BuilderTransaction[] = []; - -export const execute = async (tx: ContractTransaction) => { - const hre = require("hardhat"); - const { ethers } = hre; - - const contract = await ethers.getContractAt(governableAbi, tx.to); - const owner = await contract.owner(); - const isContract = (await ethers.provider.getCode(owner)).length > 2; - if (isContract) { - // Don't execute, just log the tx. It must be submitted for execution separately. - const { to, value, data } = tx; - transactions.push(transaction({ to, value, data })); - console.log("tx = %O", tx); - } else { - // Execute the tx - const signer = (await ethers.getSigners())[0]; - await signer.sendTransaction(tx); - } -}; - -export function writeTransactionBatch({ name, outputPath = "tx-batch.json" }: { name: string; outputPath?: string }) { - if (!name?.trim()) throw new Error("Batch name is required"); - - if (!transactions?.length) { - console.log("No transaction batch to write"); - return; - } - - try { - const templateObject = template({ name, transactions }); - fs.writeFileSync(outputPath, JSON.stringify(templateObject, null, 2)); - transactions.length = 0; - console.log(`Transaction batch written to ${outputPath}`); - console.log(`The batch can be submitted to the Safe app at: ${transactionBuilderUrl}`); - } catch (error) { - throw new Error(`Failed to write transaction batch: ${(error as Error).message}`); - } -} diff --git a/contracts/scripts/utils/logger.ts b/contracts/scripts/utils/logger.ts deleted file mode 100644 index d00dc5239..000000000 --- a/contracts/scripts/utils/logger.ts +++ /dev/null @@ -1,36 +0,0 @@ -import pino from "pino"; -import { TransportTargetOptions } from "pino"; -import dotenv from "dotenv"; - -dotenv.config(); - -namespace logger { - export type LoggerOptions = { - level?: string; - transportTargetOptions?: TransportTargetOptions; - }; - - export const createLogger = (options?: LoggerOptions): pino.Logger => { - const targets: TransportTargetOptions[] = [ - { - target: "pino-pretty", - options: {}, - level: options?.level ?? "info", - }, - ]; - - if (options?.transportTargetOptions) { - targets.push(options.transportTargetOptions); - } - - return pino( - { - level: options?.level ?? "info", - timestamp: pino.stdTimeFunctions.isoTime, - }, - pino.transport({ targets: targets }) - ); - }; -} - -export default logger; diff --git a/contracts/scripts/utils/tx-builder.ts b/contracts/scripts/utils/tx-builder.ts deleted file mode 100644 index fd0b52367..000000000 --- a/contracts/scripts/utils/tx-builder.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { arbitrum } from "viem/chains"; - -const owner = "0x66e8DE9B42308c6Ca913D1EE041d6F6fD037A57e"; -const deployer = "0xf1C7c037891525E360C59f708739Ac09A7670c59"; - -// Transaction batch example: https://github.com/safe-global/safe-wallet-monorepo/blob/8bbf3b82edc347b70a038629cd9afd45eb1ed38a/apps/web/cypress/fixtures/test-working-batch.json -export const template = ({ name, transactions }: { name: string; transactions: BuilderTransaction[] }) => ({ - version: "1.0", - chainId: arbitrum.id.toString(), - createdAt: Date.now(), - meta: { - name, - description: "", // Not used because the Safe app doesn't show it - txBuilderVersion: "1.18.0", - createdFromSafeAddress: owner, - createdFromOwnerAddress: deployer, - }, - transactions, -}); - -export const transaction = ({ - to, - value, - data, -}: { - to: string; - value: bigint | undefined; - data: string; -}): BuilderTransaction => ({ - to, - value: value?.toString() ?? "0", - data, - contractMethod: null, - contractInputsValues: null, -}); - -export interface BuilderTransaction { - to: string; - value: string; - data: string; - contractMethod: null; - contractInputsValues: null; -} - -export const transactionBuilderUrl = `https://app.safe.global/apps/open?safe=arb1:${owner}&appUrl=https%3A%2F%2Fapps-portal.safe.global%2Ftx-builder`; diff --git a/contracts/scripts/verifyProxies.sh b/contracts/scripts/verifyProxies.sh deleted file mode 100755 index d051abeb9..000000000 --- a/contracts/scripts/verifyProxies.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -# Etherscan docs: https://docs.etherscan.io/etherscan-v2/api-endpoints/contracts#verifying-proxy-contract-using-curl - -function verify() { #deploymentDir #explorerApiUrl #apiKey #chainId - deploymentDir=$1 - explorerApiUrl=$2 - apiKey=$3 - chainId=$4 - echo "verifying proxies on $(basename $deploymentDir)" - for f in $(ls -1 $deploymentDir/*_Proxy.json 2>/dev/null); do - contractName=$(basename $f .json) - address=$(cat $f | jq -r .address) - echo -n "verifying $contractName as a proxy at $address... " - curl -s \ - -d "address=$address" \ - "$explorerApiUrl?chainid=${chainId}&module=contract&action=verifyproxycontract&apikey=${apiKey}" - echo - done -} - -apiKey=$($SCRIPT_DIR/dotenv.sh ETHERSCAN_API_KEY) -if [ -z "$apiKey" ]; then - echo "API key missing" - exit 1 -fi - -verify "$SCRIPT_DIR/../deployments/arbitrumSepoliaDevnet" "https://api.etherscan.io/v2/api" $apiKey 421614 -echo -verify "$SCRIPT_DIR/../deployments/arbitrumSepolia" "https://api.etherscan.io/v2/api" $apiKey 421614 -echo -verify "$SCRIPT_DIR/../deployments/arbitrum" "https://api.etherscan.io/v2/api" $apiKey 42161 diff --git a/contracts/scripts/viemTest.ts b/contracts/scripts/viemTest.ts deleted file mode 100644 index 0346ec900..000000000 --- a/contracts/scripts/viemTest.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { createPublicClient, http, getContract } from "viem"; -import { arbitrumSepolia } from "viem/chains"; -import { disputeKitClassicConfig } from "../deployments/devnet.viem"; -import { AbiFunction, AbiParametersToPrimitiveTypes, ExtractAbiFunction, FormatAbiItem } from "abitype"; - -const main = async () => { - const client = createPublicClient({ - chain: arbitrumSepolia, - transport: http(), - }); - - const disputeKit = getContract({ - address: disputeKitClassicConfig.address[arbitrumSepolia.id], - abi: disputeKitClassicConfig.abi, - client: client, - }); - - await disputeKit.read.owner().then(console.log); - - // -------------------------------------------------- - - // Working around the "unknown tuple types" issue - // https://viem.sh/docs/faq.html#why-are-contract-function-args-with-fully-named-inputs-represented-as-unnamed-tuple-types-instead-of-object-types - - // Not human-readable - type DelayedStakesFunction = ExtractAbiFunction; - type Result = AbiParametersToPrimitiveTypes; - // -> readonly [bigint, boolean, `0x${string}`] - // Ideally we would get an object instead of a tuple - - // Human-readable - type FormattedFunction = FormatAbiItem; - // -> "function disputes(uint256) view returns (uint256 numberOfChoices, bool jumped, bytes extraData)" - - const getFunctionReturnParameterNames = (abi: AbiFunction[], name: string): string[] => { - const f = abi.filter((abi: AbiFunction) => abi.type === "function" && abi.name === name)[0]; // WARNING: overloaded functions confusion - return f.outputs.map((item) => item.name).filter(String) as string[]; - }; - - const createObject = (keys: string[], values: any[]) => Object.fromEntries(keys.map((k, i) => [k, values[i]])); - - const disputes = await disputeKit.read.disputes([BigInt(0)]); - const disputeParamNames = getFunctionReturnParameterNames(disputeKit.abi as unknown as AbiFunction[], "disputes"); // such type hack - const disputeObject = createObject(disputeParamNames, [...disputes]); - console.log("disputes: %O", disputeObject); -}; - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/contracts/scripts/wagmiHelpers.ts b/contracts/scripts/wagmiHelpers.ts deleted file mode 100644 index 701667c06..000000000 --- a/contracts/scripts/wagmiHelpers.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { readdir, readFile } from "fs/promises"; -import { parse, join } from "path"; -import { ContractConfig } from "@wagmi/cli"; -import { Abi } from "viem"; -import { Chain } from "@wagmi/chains"; - -type ArtifactPartial = { - abi: Abi; -}; - -export const getAbi = (artifact: any) => { - return (artifact as ArtifactPartial).abi; -}; - -export const readArtifacts = async (viemChainName: string, hardhatChainName?: string) => { - const chains = await import("wagmi/chains"); - const chain = chains[viemChainName] as Chain; - if (!chain) { - throw new Error(`Viem chain ${viemChainName} not found`); - } - - const directoryPath = `./deployments/${hardhatChainName ?? viemChainName}`; - const files = await readdir(directoryPath); - - const results: ContractConfig[] = []; - for (const file of files) { - const { name, ext } = parse(file); - if (ext === ".json") { - const filePath = join(directoryPath, file); - const fileContent = await readFile(filePath, "utf-8"); - const jsonContent = JSON.parse(fileContent); - results.push({ - name, - address: { - [chain.id]: jsonContent.address as `0x{string}`, - }, - abi: jsonContent.abi, - }); - } - } - return results; -}; - -// Group contracts by name and merge the address dictionary -export const merge = (arr1: ContractConfig[], arr2: ContractConfig[]) => { - const mergedArr: ContractConfig[] = [...arr1]; - for (const contract of arr2) { - const index = mergedArr.findIndex((c) => c.name === contract.name); - if (index === -1) { - mergedArr.push(contract); - } else { - mergedArr[index] = { - ...mergedArr[index], - address: { - ...(mergedArr[index].address as Record), - ...(contract.address as Record), - }, - }; - } - } - return mergedArr; -}; diff --git a/contracts/src/arbitration/DisputeTemplateRegistry.sol b/contracts/src/arbitration/DisputeTemplateRegistry.sol deleted file mode 100644 index 8d3d68d58..000000000 --- a/contracts/src/arbitration/DisputeTemplateRegistry.sol +++ /dev/null @@ -1,85 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import "../proxy/UUPSProxiable.sol"; -import "../proxy/Initializable.sol"; -import "./interfaces/IDisputeTemplateRegistry.sol"; - -/// @title Dispute Template Registry -/// @dev A contract to maintain a registry of dispute templates. -contract DisputeTemplateRegistry is IDisputeTemplateRegistry, UUPSProxiable, Initializable { - string public constant override version = "2.0.0"; - - // ************************************* // - // * Storage * // - // ************************************* // - - /// @dev The owner of the contract. - address public owner; - - /// @dev The number of templates. - uint256 public templates; - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer - /// @param _owner Owner of the contract. - function initialize(address _owner) external initializer { - owner = _owner; - } - - // ************************ // - // * Governance * // - // ************************ // - - /// @dev Access Control to perform implementation upgrades (UUPS Proxiable) - /// Only the owner can perform upgrades (`onlyByOwner`) - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - /// @dev Changes the owner of the contract. - /// @param _owner The new owner. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Registers a new dispute template. - /// @param _templateTag The tag of the template (optional). - /// @param _templateData The data of the template. - /// @param _templateDataMappings The data mappings of the template. - function setDisputeTemplate( - string memory _templateTag, - string memory _templateData, - string memory _templateDataMappings - ) external returns (uint256 templateId) { - templateId = templates++; - emit DisputeTemplate(templateId, _templateTag, _templateData, _templateDataMappings); - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); -} diff --git a/contracts/src/arbitration/KlerosCore.sol b/contracts/src/arbitration/KlerosCore.sol deleted file mode 100644 index a8c78a910..000000000 --- a/contracts/src/arbitration/KlerosCore.sol +++ /dev/null @@ -1,1333 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {IArbitrableV2, IArbitratorV2} from "./interfaces/IArbitratorV2.sol"; -import {IDisputeKit} from "./interfaces/IDisputeKit.sol"; -import {ISortitionModule} from "./interfaces/ISortitionModule.sol"; -import {Initializable} from "../proxy/Initializable.sol"; -import {UUPSProxiable} from "../proxy/UUPSProxiable.sol"; -import {SafeERC20, IERC20} from "../libraries/SafeERC20.sol"; -import {SafeSend} from "../libraries/SafeSend.sol"; -import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; -import "../libraries/Constants.sol"; - -/// @title KlerosCore -/// Core arbitrator contract for Kleros v2. -/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts. -contract KlerosCore is IArbitratorV2, Initializable, UUPSProxiable { - using SafeERC20 for IERC20; - using SafeSend for address payable; - - string public constant override version = "2.0.0"; - - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - enum Period { - evidence, // Evidence can be submitted. This is also when drawing has to take place. - commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes. - vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not. - appeal, // The dispute can be appealed. - execution // Tokens are redistributed and the ruling is executed. - } - - struct Court { - uint96 parent; // The parent court. - bool hiddenVotes; // Whether to use commit and reveal or not. - uint256[] children; // List of child courts. - uint256 minStake; // Minimum PNKs needed to stake in the court. - uint256 alpha; // Basis point of PNKs that are lost when incoherent. - uint256 feeForJuror; // Arbitration fee paid per juror. - uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any. - uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`. - mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit. - bool disabled; // True if the court is disabled. Unused for now, will be implemented later. - } - - struct Dispute { - uint96 courtID; // The ID of the court the dispute is in. - IArbitrableV2 arbitrated; // The arbitrable contract. - Period period; // The current period of the dispute. - bool ruled; // True if the ruling has been executed, false otherwise. - uint256 lastPeriodChange; // The last time the period was changed. - Round[] rounds; - } - - struct Round { - uint256 disputeKitID; // Index of the dispute kit in the array. - uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round. - uint256 totalFeesForJurors; // The total juror fees paid in this round. - uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length. - uint256 repartitions; // A counter of reward repartitions made in this round. - uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round. - address[] drawnJurors; // Addresses of the jurors that were drawn in this round. - uint96[] drawnJurorFromCourtIDs; // The courtIDs where the juror was drawn from, possibly their stake in a subcourt. - uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round. - uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round. - IERC20 feeToken; // The token used for paying fees in this round. - uint256 drawIterations; // The number of iterations passed drawing the jurors for this round. - } - - // Workaround "stack too deep" errors - struct ExecuteParams { - uint256 disputeID; // The ID of the dispute to execute. - uint256 round; // The round to execute. - uint256 coherentCount; // The number of coherent votes in the round. - uint256 numberOfVotesInRound; // The number of votes in the round. - uint256 feePerJurorInRound; // The fee per juror in the round. - uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round. - uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round. - uint256 repartition; // The index of the repartition to execute. - } - - struct CurrencyRate { - bool feePaymentAccepted; - uint64 rateInEth; - uint8 rateDecimals; - } - - // ************************************* // - // * Storage * // - // ************************************* // - - uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH. - - address public owner; // The owner of the contract. - address public guardian; // The guardian able to pause asset withdrawals. - IERC20 public pinakion; // The Pinakion token contract. - address public jurorProsecutionModule; // The module for juror's prosecution. - ISortitionModule public sortitionModule; // Sortition module for drawing. - Court[] public courts; // The courts. - IDisputeKit[] public disputeKits; // Array of dispute kits. - Dispute[] public disputes; // The disputes. - mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH. - bool public paused; // Whether asset withdrawals are paused. - address public wNative; // The wrapped native token for safeSend(). - mapping(address => bool) public arbitrableWhitelist; // Arbitrable whitelist. - bool public arbitrableWhitelistEnabled; // Whether the arbitrable whitelist is enabled. - IERC721 public jurorNft; // Eligible jurors NFT. - - // ************************************* // - // * Events * // - // ************************************* // - - event NewPeriod(uint256 indexed _disputeID, Period _period); - event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable); - event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable); - event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID); - event CourtCreated( - uint96 indexed _courtID, - uint96 indexed _parent, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] _timesPerPeriod, - uint256[] _supportedDisputeKits - ); - event CourtModified( - uint96 indexed _courtID, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] _timesPerPeriod - ); - event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress); - event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable); - event CourtJump( - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint96 indexed _fromCourtID, - uint96 _toCourtID - ); - event DisputeKitJump( - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint256 indexed _fromDisputeKitID, - uint256 _toDisputeKitID - ); - event TokenAndETHShift( - address indexed _account, - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint256 _degreeOfCoherency, - int256 _pnkAmount, - int256 _feeAmount, - IERC20 _feeToken - ); - event LeftoverRewardSent( - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint256 _pnkAmount, - uint256 _feeAmount, - IERC20 _feeToken - ); - event Paused(); - event Unpaused(); - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - modifier onlyByGuardianOrOwner() { - if (guardian != msg.sender && owner != msg.sender) revert GuardianOrOwnerOnly(); - _; - } - - modifier whenPaused() { - if (!paused) revert WhenPausedOnly(); - _; - } - - modifier whenNotPaused() { - if (paused) revert WhenNotPausedOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer (constructor equivalent for upgradable contracts). - /// @param _owner The owner's address. - /// @param _guardian The guardian's address. - /// @param _pinakion The address of the token contract. - /// @param _jurorProsecutionModule The address of the juror prosecution module. - /// @param _disputeKit The address of the default dispute kit. - /// @param _hiddenVotes The `hiddenVotes` property value of the general court. - /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively). - /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court. - /// @param _sortitionExtraData The extra data for sortition module. - /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors. - /// @param _wNative The wrapped native token address, typically wETH. - /// @param _jurorNft NFT contract to vet the jurors. - function initialize( - address _owner, - address _guardian, - IERC20 _pinakion, - address _jurorProsecutionModule, - IDisputeKit _disputeKit, - bool _hiddenVotes, - uint256[4] memory _courtParameters, - uint256[4] memory _timesPerPeriod, - bytes memory _sortitionExtraData, - ISortitionModule _sortitionModuleAddress, - address _wNative, - IERC721 _jurorNft - ) external initializer { - owner = _owner; - guardian = _guardian; - pinakion = _pinakion; - jurorProsecutionModule = _jurorProsecutionModule; - sortitionModule = _sortitionModuleAddress; - wNative = _wNative; - jurorNft = _jurorNft; - - // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported. - disputeKits.push(); - - // DISPUTE_KIT_CLASSIC - disputeKits.push(_disputeKit); - - emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit); - - // FORKING_COURT - // TODO: Fill the properties for the Forking court, emit CourtCreated. - courts.push(); - sortitionModule.createTree(FORKING_COURT, _sortitionExtraData); - - // GENERAL_COURT - Court storage court = courts.push(); - court.parent = FORKING_COURT; - court.children = new uint256[](0); - court.hiddenVotes = _hiddenVotes; - court.minStake = _courtParameters[0]; - court.alpha = _courtParameters[1]; - court.feeForJuror = _courtParameters[2]; - court.jurorsForCourtJump = _courtParameters[3]; - court.timesPerPeriod = _timesPerPeriod; - - sortitionModule.createTree(GENERAL_COURT, _sortitionExtraData); - - uint256[] memory supportedDisputeKits = new uint256[](1); - supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC; - emit CourtCreated( - GENERAL_COURT, - court.parent, - _hiddenVotes, - _courtParameters[0], - _courtParameters[1], - _courtParameters[2], - _courtParameters[3], - _timesPerPeriod, - supportedDisputeKits - ); - _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true); - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Access Control to perform implementation upgrades (UUPS Proxiable) - /// Only the owner can perform upgrades (`onlyByOwner`) - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - /// @dev Pause staking and reward execution. Can only be done by guardian or owner. - function pause() external onlyByGuardianOrOwner whenNotPaused { - paused = true; - emit Paused(); - } - - /// @dev Unpause staking and reward execution. Can only be done by owner. - function unpause() external onlyByOwner whenPaused { - paused = false; - emit Unpaused(); - } - - /// @dev Allows the owner to call anything on behalf of the contract. - /// @param _destination The destination of the call. - /// @param _amount The value sent with the call. - /// @param _data The data sent with the call. - function executeOwnerProposal(address _destination, uint256 _amount, bytes memory _data) external onlyByOwner { - (bool success, ) = _destination.call{value: _amount}(_data); - if (!success) revert UnsuccessfulCall(); - } - - /// @dev Changes the `owner` storage variable. - /// @param _owner The new value for the `owner` storage variable. - function changeOwner(address payable _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the `guardian` storage variable. - /// @param _guardian The new value for the `guardian` storage variable. - function changeGuardian(address _guardian) external onlyByOwner { - guardian = _guardian; - } - - /// @dev Changes the `pinakion` storage variable. - /// @param _pinakion The new value for the `pinakion` storage variable. - function changePinakion(IERC20 _pinakion) external onlyByOwner { - pinakion = _pinakion; - } - - /// @dev Changes the `jurorProsecutionModule` storage variable. - /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable. - function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByOwner { - jurorProsecutionModule = _jurorProsecutionModule; - } - - /// @dev Changes the `_sortitionModule` storage variable. - /// Note that the new module should be initialized for all courts. - /// @param _sortitionModule The new value for the `sortitionModule` storage variable. - function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByOwner { - sortitionModule = _sortitionModule; - } - - /// @dev Add a new supported dispute kit module to the court. - /// @param _disputeKitAddress The address of the dispute kit contract. - function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByOwner { - uint256 disputeKitID = disputeKits.length; - disputeKits.push(_disputeKitAddress); - emit DisputeKitCreated(disputeKitID, _disputeKitAddress); - } - - /// @dev Creates a court under a specified parent court. - /// @param _parent The `parent` property value of the court. - /// @param _hiddenVotes The `hiddenVotes` property value of the court. - /// @param _minStake The `minStake` property value of the court. - /// @param _alpha The `alpha` property value of the court. - /// @param _feeForJuror The `feeForJuror` property value of the court. - /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court. - /// @param _timesPerPeriod The `timesPerPeriod` property value of the court. - /// @param _sortitionExtraData Extra data for sortition module. - /// @param _supportedDisputeKits Indexes of dispute kits that this court will support. - function createCourt( - uint96 _parent, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] memory _timesPerPeriod, - bytes memory _sortitionExtraData, - uint256[] memory _supportedDisputeKits - ) external onlyByOwner { - if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt(); - if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit(); - if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent(); - - uint96 courtID = uint96(courts.length); - Court storage court = courts.push(); - - for (uint256 i = 0; i < _supportedDisputeKits.length; i++) { - if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) { - revert WrongDisputeKitIndex(); - } - _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true); - } - // Check that Classic DK support was added. - if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic(); - - court.parent = _parent; - court.children = new uint256[](0); - court.hiddenVotes = _hiddenVotes; - court.minStake = _minStake; - court.alpha = _alpha; - court.feeForJuror = _feeForJuror; - court.jurorsForCourtJump = _jurorsForCourtJump; - court.timesPerPeriod = _timesPerPeriod; - - sortitionModule.createTree(courtID, _sortitionExtraData); - - // Update the parent. - courts[_parent].children.push(courtID); - emit CourtCreated( - uint96(courtID), - _parent, - _hiddenVotes, - _minStake, - _alpha, - _feeForJuror, - _jurorsForCourtJump, - _timesPerPeriod, - _supportedDisputeKits - ); - } - - function changeCourtParameters( - uint96 _courtID, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] memory _timesPerPeriod - ) external onlyByOwner { - Court storage court = courts[_courtID]; - if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) { - revert MinStakeLowerThanParentCourt(); - } - for (uint256 i = 0; i < court.children.length; i++) { - if (courts[court.children[i]].minStake < _minStake) { - revert MinStakeLowerThanParentCourt(); - } - } - court.minStake = _minStake; - court.hiddenVotes = _hiddenVotes; - court.alpha = _alpha; - court.feeForJuror = _feeForJuror; - court.jurorsForCourtJump = _jurorsForCourtJump; - court.timesPerPeriod = _timesPerPeriod; - emit CourtModified( - _courtID, - _hiddenVotes, - _minStake, - _alpha, - _feeForJuror, - _jurorsForCourtJump, - _timesPerPeriod - ); - } - - /// @dev Adds/removes court's support for specified dispute kits. - /// @param _courtID The ID of the court. - /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed. - /// @param _enable Whether add or remove the dispute kits from the court. - function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByOwner { - for (uint256 i = 0; i < _disputeKitIDs.length; i++) { - if (_enable) { - if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) { - revert WrongDisputeKitIndex(); - } - _enableDisputeKit(_courtID, _disputeKitIDs[i], true); - } else { - // Classic dispute kit must be supported by all courts. - if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) { - revert CannotDisableClassicDK(); - } - _enableDisputeKit(_courtID, _disputeKitIDs[i], false); - } - } - } - - /// @dev Changes the supported fee tokens. - /// @param _feeToken The fee token. - /// @param _accepted Whether the token is supported or not as a method of fee payment. - function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByOwner { - currencyRates[_feeToken].feePaymentAccepted = _accepted; - emit AcceptedFeeToken(_feeToken, _accepted); - } - - /// @dev Changes the currency rate of a fee token. - /// @param _feeToken The fee token. - /// @param _rateInEth The new rate of the fee token in ETH. - /// @param _rateDecimals The new decimals of the fee token rate. - function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByOwner { - currencyRates[_feeToken].rateInEth = _rateInEth; - currencyRates[_feeToken].rateDecimals = _rateDecimals; - emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals); - } - - /// @dev Changes the `jurorNft` storage variable. - /// @param _jurorNft The new value for the `jurorNft` storage variable. - function changeJurorNft(IERC721 _jurorNft) external onlyByOwner { - jurorNft = _jurorNft; - } - - /// @dev Adds or removes an arbitrable from whitelist. - /// @param _arbitrable Arbitrable address. - /// @param _allowed Whether add or remove permission. - function changeArbitrableWhitelist(address _arbitrable, bool _allowed) external onlyByOwner { - arbitrableWhitelist[_arbitrable] = _allowed; - } - - /// @dev Enables or disables the arbitrable whitelist. - function changeArbitrableWhitelistEnabled(bool _enabled) external onlyByOwner { - arbitrableWhitelistEnabled = _enabled; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Sets the caller's stake in a court. - /// @param _courtID The ID of the court. - /// @param _newStake The new stake. - /// Note that the existing delayed stake will be nullified as non-relevant. - function setStake(uint96 _courtID, uint256 _newStake) external whenNotPaused { - if (address(jurorNft) != address(0) && jurorNft.balanceOf(msg.sender) == 0) revert NotEligibleForStaking(); - _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert); - } - - /// @dev Sets the stake of a specified account in a court without delaying stake changes, typically to apply a delayed stake or unstake inactive jurors. - /// @param _account The account whose stake is being set. - /// @param _courtID The ID of the court. - /// @param _newStake The new stake. - function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external { - if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly(); - _setStake(_account, _courtID, _newStake, true, OnError.Return); - } - - /// @dev Transfers PNK to the juror by SortitionModule. - /// @param _account The account of the juror whose PNK to transfer. - /// @param _amount The amount to transfer. - function transferBySortitionModule(address _account, uint256 _amount) external { - if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly(); - // Note eligibility is checked in SortitionModule. - pinakion.safeTransfer(_account, _amount); - } - - /// @inheritdoc IArbitratorV2 - function createDispute( - uint256 _numberOfChoices, - bytes memory _extraData - ) external payable override returns (uint256 disputeID) { - if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough(); - - return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value); - } - - /// @inheritdoc IArbitratorV2 - function createDispute( - uint256 _numberOfChoices, - bytes calldata _extraData, - IERC20 _feeToken, - uint256 _feeAmount - ) external override returns (uint256 disputeID) { - if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted(); - if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough(); - - if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed(); - return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount); - } - - function _createDispute( - uint256 _numberOfChoices, - bytes memory _extraData, - IERC20 _feeToken, - uint256 _feeAmount - ) internal returns (uint256 disputeID) { - if (arbitrableWhitelistEnabled && !arbitrableWhitelist[msg.sender]) revert ArbitrableNotWhitelisted(); - (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData); - if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt(); - - disputeID = disputes.length; - Dispute storage dispute = disputes.push(); - dispute.courtID = courtID; - dispute.arbitrated = IArbitrableV2(msg.sender); - dispute.lastPeriodChange = block.timestamp; - - IDisputeKit disputeKit = disputeKits[disputeKitID]; - Court storage court = courts[courtID]; - Round storage round = dispute.rounds.push(); - - // Obtain the feeForJuror in the same currency as the _feeAmount - uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY) - ? court.feeForJuror - : convertEthToTokenAmount(_feeToken, court.feeForJuror); - round.nbVotes = _feeAmount / feeForJuror; - round.disputeKitID = disputeKitID; - round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha); - round.totalFeesForJurors = _feeAmount; - round.feeToken = IERC20(_feeToken); - - sortitionModule.createDisputeHook(disputeID, 0); // Default round ID. - - disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes); - emit DisputeCreation(disputeID, IArbitrableV2(msg.sender)); - } - - /// @dev Passes the period of a specified dispute. - /// @param _disputeID The ID of the dispute. - function passPeriod(uint256 _disputeID) external { - Dispute storage dispute = disputes[_disputeID]; - Court storage court = courts[dispute.courtID]; - - uint256 currentRound = dispute.rounds.length - 1; - Round storage round = dispute.rounds[currentRound]; - if (dispute.period == Period.evidence) { - if ( - currentRound == 0 && - block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] - ) { - revert EvidenceNotPassedAndNotAppeal(); - } - if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing(); - dispute.period = court.hiddenVotes ? Period.commit : Period.vote; - } else if (dispute.period == Period.commit) { - // Note that we do not want to pass to Voting period if all the commits are cast because it breaks the Shutter auto-reveal currently. - if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) { - revert CommitPeriodNotPassed(); - } - dispute.period = Period.vote; - } else if (dispute.period == Period.vote) { - if ( - block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] && - !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID) - ) { - revert VotePeriodNotPassed(); - } - dispute.period = Period.appeal; - emit AppealPossible(_disputeID, dispute.arbitrated); - } else if (dispute.period == Period.appeal) { - if ( - block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] && - !disputeKits[round.disputeKitID].isAppealFunded(_disputeID) - ) { - revert AppealPeriodNotPassed(); - } - dispute.period = Period.execution; - } else if (dispute.period == Period.execution) { - revert DisputePeriodIsFinal(); - } - - dispute.lastPeriodChange = block.timestamp; - emit NewPeriod(_disputeID, dispute.period); - } - - /// @dev Draws jurors for the dispute. Can be called in parts. - /// @param _disputeID The ID of the dispute. - /// @param _iterations The number of iterations to run. - /// @return nbDrawnJurors The total number of jurors drawn in the round. - function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) { - Dispute storage dispute = disputes[_disputeID]; - uint256 currentRound = dispute.rounds.length - 1; - Round storage round = dispute.rounds[currentRound]; - if (dispute.period != Period.evidence) revert NotEvidencePeriod(); - - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - - uint256 startIndex = round.drawIterations; // for gas: less storage reads - uint256 i; - while (i < _iterations && round.drawnJurors.length < round.nbVotes) { - (address drawnAddress, uint96 fromSubcourtID) = disputeKit.draw(_disputeID, startIndex + i++); - if (drawnAddress == address(0)) { - continue; - } - sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror); - emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length); - round.drawnJurors.push(drawnAddress); - round.drawnJurorFromCourtIDs.push(fromSubcourtID != 0 ? fromSubcourtID : dispute.courtID); - if (round.drawnJurors.length == round.nbVotes) { - sortitionModule.postDrawHook(_disputeID, currentRound); - } - } - round.drawIterations += i; - return round.drawnJurors.length; - } - - /// @dev Appeals the ruling of a specified dispute. - /// Note: Access restricted to the Dispute Kit for this `disputeID`. - /// @param _disputeID The ID of the dispute. - /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump. - /// @param _extraData Extradata for the dispute. Can be required during court jump. - function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable { - if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough(); - - Dispute storage dispute = disputes[_disputeID]; - if (dispute.period != Period.appeal) revert DisputeNotAppealable(); - - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly(); - - // Warning: the extra round must be created before calling disputeKit.createDispute() - Round storage extraRound = dispute.rounds.push(); - - (uint96 newCourtID, uint256 newDisputeKitID, bool courtJump, ) = _getCourtAndDisputeKitJumps( - dispute, - round, - courts[dispute.courtID], - _disputeID - ); - if (courtJump) { - emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID); - } - - dispute.courtID = newCourtID; - dispute.period = Period.evidence; - dispute.lastPeriodChange = block.timestamp; - - Court storage court = courts[newCourtID]; - extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds. - extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha); - extraRound.totalFeesForJurors = msg.value; - extraRound.disputeKitID = newDisputeKitID; - - sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1); - - // Dispute kit was changed, so create a dispute in the new DK contract. - if (extraRound.disputeKitID != round.disputeKitID) { - emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID); - disputeKits[extraRound.disputeKitID].createDispute( - _disputeID, - _numberOfChoices, - _extraData, - extraRound.nbVotes - ); - } - - emit AppealDecision(_disputeID, dispute.arbitrated); - emit NewPeriod(_disputeID, Period.evidence); - } - - /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts. - /// Note: Reward distributions are forbidden during pause. - /// @param _disputeID The ID of the dispute. - /// @param _round The appeal round. - /// @param _iterations The number of iterations to run. - function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused { - Round storage round; - { - Dispute storage dispute = disputes[_disputeID]; - if (dispute.period != Period.execution) revert NotExecutionPeriod(); - - round = dispute.rounds[_round]; - } // stack too deep workaround - - uint256 start = round.repartitions; - uint256 end = round.repartitions + _iterations; - - uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas. - uint256 numberOfVotesInRound = round.drawnJurors.length; - uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound; - uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror; - uint256 coherentCount; - { - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round. - } // stack too deep workaround - - if (coherentCount == 0) { - // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome. - if (end > numberOfVotesInRound) end = numberOfVotesInRound; - } else { - // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees. - if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2; - } - round.repartitions = end; - - for (uint256 i = start; i < end; i++) { - if (i < numberOfVotesInRound) { - pnkPenaltiesInRound = _executePenalties( - ExecuteParams({ - disputeID: _disputeID, - round: _round, - coherentCount: coherentCount, - numberOfVotesInRound: numberOfVotesInRound, - feePerJurorInRound: feePerJurorInRound, - pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound, - pnkPenaltiesInRound: pnkPenaltiesInRound, - repartition: i - }) - ); - } else { - _executeRewards( - ExecuteParams({ - disputeID: _disputeID, - round: _round, - coherentCount: coherentCount, - numberOfVotesInRound: numberOfVotesInRound, - feePerJurorInRound: feePerJurorInRound, - pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound, - pnkPenaltiesInRound: pnkPenaltiesInRound, - repartition: i - }) - ); - } - } - if (round.pnkPenalties != pnkPenaltiesInRound) { - round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact - } - } - - /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only. - /// @param _params The parameters for the execution, see `ExecuteParams`. - /// @return pnkPenaltiesInRoundCache The updated penalties in round cache. - function _executePenalties(ExecuteParams memory _params) internal returns (uint256) { - Dispute storage dispute = disputes[_params.disputeID]; - Round storage round = dispute.rounds[_params.round]; - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - - // [0, 1] value that determines how coherent the juror was in this round, in basis points. - uint256 coherence = disputeKit.getDegreeOfCoherencePenalty( - _params.disputeID, - _params.round, - _params.repartition, - _params.feePerJurorInRound, - _params.pnkAtStakePerJurorInRound - ); - - // Guard against degree exceeding 1, though it should be ensured by the dispute kit. - if (coherence > ONE_BASIS_POINT) { - coherence = ONE_BASIS_POINT; - } - - // Fully coherent jurors won't be penalized. - uint256 penalty = (round.pnkAtStakePerJuror * (ONE_BASIS_POINT - coherence)) / ONE_BASIS_POINT; - - // Unlock the PNKs affected by the penalty - address account = round.drawnJurors[_params.repartition]; - sortitionModule.unlockStake(account, penalty); - - // Apply the penalty to the staked PNKs. - uint96 penalizedInCourtID = round.drawnJurorFromCourtIDs[_params.repartition]; - (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty) = sortitionModule.setStakePenalty( - account, - penalizedInCourtID, - penalty - ); - _params.pnkPenaltiesInRound += availablePenalty; - emit TokenAndETHShift( - account, - _params.disputeID, - _params.round, - coherence, - -int256(availablePenalty), - 0, - round.feeToken - ); - - if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) { - // The juror is inactive or their balance is can't cover penalties anymore, unstake them from all courts. - sortitionModule.forcedUnstakeAllCourts(account); - } else if (newCourtStake < courts[penalizedInCourtID].minStake) { - // The juror's balance fell below the court minStake, unstake them from the court. - sortitionModule.forcedUnstake(account, penalizedInCourtID); - } - - if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) { - // No one was coherent, send the rewards to the owner. - _transferFeeToken(round.feeToken, payable(owner), round.totalFeesForJurors); - pinakion.safeTransfer(owner, _params.pnkPenaltiesInRound); - emit LeftoverRewardSent( - _params.disputeID, - _params.round, - _params.pnkPenaltiesInRound, - round.totalFeesForJurors, - round.feeToken - ); - } - return _params.pnkPenaltiesInRound; - } - - /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only. - /// @param _params The parameters for the execution, see `ExecuteParams`. - function _executeRewards(ExecuteParams memory _params) internal { - Dispute storage dispute = disputes[_params.disputeID]; - Round storage round = dispute.rounds[_params.round]; - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - - // [0, 1] value that determines how coherent the juror was in this round, in basis points. - (uint256 pnkCoherence, uint256 feeCoherence) = disputeKit.getDegreeOfCoherenceReward( - _params.disputeID, - _params.round, - _params.repartition % _params.numberOfVotesInRound, - _params.feePerJurorInRound, - _params.pnkAtStakePerJurorInRound - ); - - // Guard against degree exceeding 1, though it should be ensured by the dispute kit. - if (pnkCoherence > ONE_BASIS_POINT) { - pnkCoherence = ONE_BASIS_POINT; - } - if (feeCoherence > ONE_BASIS_POINT) { - feeCoherence = ONE_BASIS_POINT; - } - - address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound]; - uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, pnkCoherence); - - // Release the rest of the PNKs of the juror for this round. - sortitionModule.unlockStake(account, pnkLocked); - - // Compute the rewards - uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, pnkCoherence); - round.sumPnkRewardPaid += pnkReward; - uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, feeCoherence); - round.sumFeeRewardPaid += feeReward; - - // Transfer the fee reward - _transferFeeToken(round.feeToken, payable(account), feeReward); - - // Stake the PNK reward if possible, by-passes delayed stakes and other checks usually done by validateStake() - if (!sortitionModule.setStakeReward(account, dispute.courtID, pnkReward)) { - pinakion.safeTransfer(account, pnkReward); - } - - emit TokenAndETHShift( - account, - _params.disputeID, - _params.round, - pnkCoherence, - int256(pnkReward), - int256(feeReward), - round.feeToken - ); - - // Transfer any residual rewards to the owner. It may happen due to partial coherence of the jurors. - if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) { - uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid; - uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid; - if (leftoverPnkReward != 0 || leftoverFeeReward != 0) { - if (leftoverPnkReward != 0) { - pinakion.safeTransfer(owner, leftoverPnkReward); - } - if (leftoverFeeReward != 0) { - _transferFeeToken(round.feeToken, payable(owner), leftoverFeeReward); - } - emit LeftoverRewardSent( - _params.disputeID, - _params.round, - leftoverPnkReward, - leftoverFeeReward, - round.feeToken - ); - } - } - } - - /// @dev Executes a specified dispute's ruling. - /// @param _disputeID The ID of the dispute. - function executeRuling(uint256 _disputeID) external { - Dispute storage dispute = disputes[_disputeID]; - if (dispute.period != Period.execution) revert NotExecutionPeriod(); - if (dispute.ruled) revert RulingAlreadyExecuted(); - - (uint256 winningChoice, , ) = currentRuling(_disputeID); - dispute.ruled = true; - emit Ruling(dispute.arbitrated, _disputeID, winningChoice); - dispute.arbitrated.rule(_disputeID, winningChoice); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Compute the cost of arbitration denominated in ETH. - /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @return cost The arbitration cost in ETH. - function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) { - (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData); - cost = courts[courtID].feeForJuror * minJurors; - } - - /// @dev Compute the cost of arbitration denominated in `_feeToken`. - /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @param _feeToken The ERC20 token used to pay fees. - /// @return cost The arbitration cost in `_feeToken`. - function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) { - cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData)); - } - - /// @dev Gets the cost of appealing a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @return cost The appeal cost. - function appealCost(uint256 _disputeID) public view returns (uint256 cost) { - Dispute storage dispute = disputes[_disputeID]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - Court storage court = courts[dispute.courtID]; - - (, uint256 newDisputeKitID, bool courtJump, ) = _getCourtAndDisputeKitJumps(dispute, round, court, _disputeID); - - uint256 nbVotesAfterAppeal = disputeKits[newDisputeKitID].getNbVotesAfterAppeal( - disputeKits[round.disputeKitID], - round.nbVotes - ); - - if (courtJump) { - // Jump to parent court. - if (dispute.courtID == GENERAL_COURT) { - // TODO: Handle the forking when appealed in General court. - cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court. - } else { - cost = courts[court.parent].feeForJuror * nbVotesAfterAppeal; - } - } else { - // Stay in current court. - cost = court.feeForJuror * nbVotesAfterAppeal; - } - } - - /// @dev Gets the start and the end of a specified dispute's current appeal period. - /// @param _disputeID The ID of the dispute. - /// @return start The start of the appeal period. - /// @return end The end of the appeal period. - function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) { - Dispute storage dispute = disputes[_disputeID]; - if (dispute.period == Period.appeal) { - start = dispute.lastPeriodChange; - end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)]; - } else { - start = 0; - end = 0; - } - } - - /// @dev Gets the current ruling of a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @return ruling The current ruling. - /// @return tied Whether it's a tie or not. - /// @return overridden Whether the ruling was overridden by appeal funding or not. - function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) { - Dispute storage dispute = disputes[_disputeID]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID); - } - - /// @dev Gets the round info for a specified dispute and round. - /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit. - /// @param _disputeID The ID of the dispute. - /// @param _round The round to get the info for. - /// @return round The round info. - function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) { - return disputes[_disputeID].rounds[_round]; - } - - /// @dev Gets the PNK at stake per juror for a specified dispute and round. - /// @param _disputeID The ID of the dispute. - /// @param _round The round to get the info for. - /// @return pnkAtStakePerJuror The PNK at stake per juror. - function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) { - return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror; - } - - /// @dev Gets the number of rounds for a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @return The number of rounds. - function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) { - return disputes[_disputeID].rounds.length; - } - - /// @dev Checks if a given dispute kit is supported by a given court. - /// @param _courtID The ID of the court to check the support for. - /// @param _disputeKitID The ID of the dispute kit to check the support for. - /// @return Whether the dispute kit is supported or not. - function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) { - return courts[_courtID].supportedDisputeKits[_disputeKitID]; - } - - /// @dev Gets the timesPerPeriod array for a given court. - /// @param _courtID The ID of the court to get the times from. - /// @return timesPerPeriod The timesPerPeriod array for the given court. - function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) { - timesPerPeriod = courts[_courtID].timesPerPeriod; - } - - // ************************************* // - // * Public Views for Dispute Kits * // - // ************************************* // - - /// @dev Gets the number of votes permitted for the specified dispute in the latest round. - /// @param _disputeID The ID of the dispute. - function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) { - Dispute storage dispute = disputes[_disputeID]; - return dispute.rounds[dispute.rounds.length - 1].nbVotes; - } - - /// @dev Returns true if the dispute kit will be switched to a parent DK. - /// @param _disputeID The ID of the dispute. - /// @return Whether DK will be switched or not. - function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) { - Dispute storage dispute = disputes[_disputeID]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - Court storage court = courts[dispute.courtID]; - - if (!_isCourtJumping(round, court, _disputeID)) { - return false; - } - - // Jump if the parent court doesn't support the current DK. - return !courts[court.parent].supportedDisputeKits[round.disputeKitID]; - } - - function getDisputeKitsLength() external view returns (uint256) { - return disputeKits.length; - } - - function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) { - return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth; - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Returns true if the round is jumping to a parent court. - /// @param _round The round to check. - /// @param _court The court to check. - /// @return Whether the round is jumping to a parent court or not. - function _isCourtJumping( - Round storage _round, - Court storage _court, - uint256 _disputeID - ) internal view returns (bool) { - return - disputeKits[_round.disputeKitID].earlyCourtJump(_disputeID) || _round.nbVotes >= _court.jurorsForCourtJump; - } - - function _getCourtAndDisputeKitJumps( - Dispute storage _dispute, - Round storage _round, - Court storage _court, - uint256 _disputeID - ) internal view returns (uint96 newCourtID, uint256 newDisputeKitID, bool courtJump, bool disputeKitJump) { - newCourtID = _dispute.courtID; - newDisputeKitID = _round.disputeKitID; - - if (!_isCourtJumping(_round, _court, _disputeID)) return (newCourtID, newDisputeKitID, false, false); - - // Jump to parent court. - newCourtID = courts[newCourtID].parent; - courtJump = true; - - if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) { - // The current Dispute Kit is not compatible with the new court, jump to another Dispute Kit. - newDisputeKitID = disputeKits[_round.disputeKitID].getJumpDisputeKitID(); - if (newDisputeKitID == NULL_DISPUTE_KIT || !courts[newCourtID].supportedDisputeKits[newDisputeKitID]) { - // The new Dispute Kit is not defined or still not compatible, fall back to `DisputeKitClassic` which is always supported. - newDisputeKitID = DISPUTE_KIT_CLASSIC; - } - disputeKitJump = true; - } - } - - /// @dev Internal function to transfer fee tokens (ETH or ERC20) - /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH). - /// @param _recipient The recipient address. - /// @param _amount The amount to transfer. - function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal { - if (_feeToken == NATIVE_CURRENCY) { - _recipient.safeSend(_amount, wNative); - } else { - _feeToken.safeTransfer(_recipient, _amount); - } - } - - /// @dev Applies degree of coherence to an amount - /// @param _amount The base amount to apply coherence to. - /// @param _coherence The degree of coherence in basis points. - /// @return The amount after applying the degree of coherence. - function _applyCoherence(uint256 _amount, uint256 _coherence) internal pure returns (uint256) { - return (_amount * _coherence) / ONE_BASIS_POINT; - } - - /// @dev Calculates PNK at stake per juror based on court parameters - /// @param _minStake The minimum stake for the court. - /// @param _alpha The alpha parameter for the court in basis points. - /// @return The amount of PNK at stake per juror. - function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) { - return (_minStake * _alpha) / ONE_BASIS_POINT; - } - - /// @dev Toggles the dispute kit support for a given court. - /// @param _courtID The ID of the court to toggle the support for. - /// @param _disputeKitID The ID of the dispute kit to toggle the support for. - /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled. - function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal { - courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable; - emit DisputeKitEnabled(_courtID, _disputeKitID, _enable); - } - - /// @dev If called only once then set _onError to Revert, otherwise set it to Return - /// @param _account The account to set the stake for. - /// @param _courtID The ID of the court to set the stake for. - /// @param _newStake The new stake. - /// @param _noDelay True if the stake change should not be delayed. - /// @param _onError Whether to revert or return false on error. - /// @return Whether the stake was successfully set or not. - function _setStake( - address _account, - uint96 _courtID, - uint256 _newStake, - bool _noDelay, - OnError _onError - ) internal returns (bool) { - if (_courtID == FORKING_COURT || _courtID >= courts.length) { - _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed. - return false; - } - if (_newStake != 0 && _newStake < courts[_courtID].minStake) { - _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed. - return false; - } - (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake( - _account, - _courtID, - _newStake, - _noDelay - ); - if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) { - _stakingFailed(_onError, stakingResult); - return false; - } else if (stakingResult == StakingResult.Delayed) { - return true; - } - if (pnkDeposit > 0) { - if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) { - _stakingFailed(_onError, StakingResult.StakingTransferFailed); - return false; - } - } - if (pnkWithdrawal > 0) { - if (!pinakion.safeTransfer(_account, pnkWithdrawal)) { - _stakingFailed(_onError, StakingResult.UnstakingTransferFailed); - return false; - } - } - sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake); - - return true; - } - - /// @dev It may revert depending on the _onError parameter. - function _stakingFailed(OnError _onError, StakingResult _result) internal pure { - if (_onError == OnError.Return) return; - if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed(); - if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed(); - if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts(); - if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt(); - if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake(); - if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake(); - if (_result == StakingResult.CannotStakeMoreThanMaxStakePerJuror) revert StakingMoreThanMaxStakePerJuror(); - if (_result == StakingResult.CannotStakeMoreThanMaxTotalStaked) revert StakingMoreThanMaxTotalStaked(); - } - - /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array. - /// Note that if extradata contains an incorrect value then this value will be switched to default. - /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID. - /// @return courtID The court ID. - /// @return minJurors The minimum number of jurors required. - /// @return disputeKitID The ID of the dispute kit. - function _extraDataToCourtIDMinJurorsDisputeKit( - bytes memory _extraData - ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) { - // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index. - if (_extraData.length >= 64) { - assembly { - // solium-disable-line security/no-inline-assembly - courtID := mload(add(_extraData, 0x20)) - minJurors := mload(add(_extraData, 0x40)) - disputeKitID := mload(add(_extraData, 0x60)) - } - if (courtID == FORKING_COURT || courtID >= courts.length) { - courtID = GENERAL_COURT; - } - if (minJurors == 0) { - minJurors = DEFAULT_NB_OF_JURORS; - } - if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) { - disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used. - } - } else { - courtID = GENERAL_COURT; - minJurors = DEFAULT_NB_OF_JURORS; - disputeKitID = DISPUTE_KIT_CLASSIC; - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error GuardianOrOwnerOnly(); - error DisputeKitOnly(); - error SortitionModuleOnly(); - error UnsuccessfulCall(); - error InvalidDisputKitParent(); - error MinStakeLowerThanParentCourt(); - error UnsupportedDisputeKit(); - error InvalidForkingCourtAsParent(); - error WrongDisputeKitIndex(); - error CannotDisableClassicDK(); - error NotEligibleForStaking(); - error StakingMoreThanMaxStakePerJuror(); - error StakingMoreThanMaxTotalStaked(); - error StakingInTooManyCourts(); - error StakingNotPossibleInThisCourt(); - error StakingLessThanCourtMinStake(); - error StakingTransferFailed(); - error UnstakingTransferFailed(); - error ArbitrableNotWhitelisted(); - error ArbitrationFeesNotEnough(); - error DisputeKitNotSupportedByCourt(); - error MustSupportDisputeKitClassic(); - error TokenNotAccepted(); - error EvidenceNotPassedAndNotAppeal(); - error DisputeStillDrawing(); - error CommitPeriodNotPassed(); - error VotePeriodNotPassed(); - error AppealPeriodNotPassed(); - error NotEvidencePeriod(); - error AppealFeesNotEnough(); - error DisputeNotAppealable(); - error NotExecutionPeriod(); - error RulingAlreadyExecuted(); - error DisputePeriodIsFinal(); - error TransferFailed(); - error WhenNotPausedOnly(); - error WhenPausedOnly(); - error StakingZeroWhenNoStake(); -} diff --git a/contracts/src/arbitration/KlerosGovernor.sol b/contracts/src/arbitration/KlerosGovernor.sol deleted file mode 100644 index 11957a745..000000000 --- a/contracts/src/arbitration/KlerosGovernor.sol +++ /dev/null @@ -1,433 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {IArbitrableV2, IArbitratorV2} from "./interfaces/IArbitrableV2.sol"; -import {SafeSend} from "../libraries/SafeSend.sol"; -import "./interfaces/IDisputeTemplateRegistry.sol"; - -/// @title KlerosGovernor for V2. Note that appeal functionality and evidence submission will be handled by the court. -contract KlerosGovernor is IArbitrableV2 { - using SafeSend for address payable; - - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - enum Status { - NoDispute, - DisputeCreated, - Resolved - } - - struct Session { - uint256 ruling; // The ruling that was given in this session, if any. - uint256 disputeID; // ID given to the dispute of the session, if any. - uint256[] submittedLists; // Tracks all lists that were submitted in a session in the form submittedLists[submissionID]. - uint256 sumDeposit; // Sum of all submission deposits in a session (minus arbitration fees). This is used to calculate the reward. - Status status; // Status of a session. - mapping(bytes32 listHash => bool) alreadySubmitted; // Indicates whether or not the transaction list was already submitted in order to catch duplicates in the form alreadySubmitted[listHash]. - uint256 durationOffset; // Time in seconds that prolongs the submission period after the first submission, to give other submitters time to react. - } - - struct Transaction { - address target; // The address to call. - uint256 value; // Value paid by governor contract that will be used as msg.value in the execution. - bytes data; // Calldata of the transaction. - bool executed; // Whether the transaction was already executed or not. - } - - struct Submission { - address payable submitter; // The one who submits the list. - uint256 deposit; // Value of the deposit paid upon submission of the list. - Transaction[] txs; // Transactions stored in the list in the form txs[_transactionIndex]. - bytes32 listHash; // A hash chain of all transactions stored in the list. This is used as a unique identifier within a session. - uint256 submissionTime; // The time when the list was submitted. - bool approved; // Whether the list was approved for execution or not. - uint256 approvalTime; // The time when the list was approved. - } - - IArbitratorV2 public arbitrator; // Arbitrator contract. - bytes public arbitratorExtraData; // Extra data for arbitrator. - address public wNative; // The wrapped native token for safeSend(). - IDisputeTemplateRegistry public templateRegistry; // The dispute template registry. - uint256 public templateId; // The current dispute template identifier. - - uint256 public submissionBaseDeposit; // The base deposit in wei that needs to be paid in order to submit the list. - uint256 public submissionTimeout; // Time in seconds allowed for submitting the lists. Once it's passed the contract enters the approval period. - uint256 public executionTimeout; // Time in seconds allowed for the execution of approved lists. - uint256 public withdrawTimeout; // Time in seconds allowed to withdraw a submitted list. - - uint256 public lastApprovalTime; // The time of the last approval of a transaction list. - uint256 public reservedETH; // Sum of contract's submission deposits. These funds are not to be used in the execution of transactions. - - Submission[] public submissions; // Stores all created transaction lists. submissions[_listID]. - Session[] public sessions; // Stores all submitting sessions. sessions[_session]. - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier duringSubmissionPeriod() { - uint256 offset = sessions[sessions.length - 1].durationOffset; - if (block.timestamp - lastApprovalTime > submissionTimeout + offset) revert SubmissionTimeHasEnded(); - _; - } - - modifier duringApprovalPeriod() { - uint256 offset = sessions[sessions.length - 1].durationOffset; - if (block.timestamp - lastApprovalTime <= submissionTimeout + offset) revert ApprovalTimeNotStarted(); - _; - } - - modifier onlyByOwner() { - if (address(this) != msg.sender) revert OwnerOnly(); - _; - } - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev Emitted when a new list is submitted. - /// @param _listID The index of the transaction list in the array of lists. - /// @param _submitter The address that submitted the list. - /// @param _session The number of the current session. - /// @param _description The string in CSV format that contains labels of list's transactions. - /// Note that the submitter may give bad descriptions of correct actions, but this is to be seen as UI enhancement, not a critical feature and that would play against him in case of dispute. - event ListSubmitted( - uint256 indexed _listID, - address indexed _submitter, - uint256 indexed _session, - string _description - ); - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor. - /// @param _arbitrator The arbitrator of the contract. - /// @param _arbitratorExtraData Extra data for the arbitrator. - /// @param _templateData The dispute template data. - /// @param _templateDataMappings The dispute template data mappings. - /// @param _submissionBaseDeposit The base deposit required for submission. - /// @param _submissionTimeout Time in seconds allocated for submitting transaction list. - /// @param _executionTimeout Time in seconds after approval that allows to execute transactions of the approved list. - /// @param _withdrawTimeout Time in seconds after submission that allows to withdraw submitted list. - /// @param _wNative The wrapped native token address, typically wETH. - constructor( - IArbitratorV2 _arbitrator, - bytes memory _arbitratorExtraData, - string memory _templateData, - string memory _templateDataMappings, - uint256 _submissionBaseDeposit, - uint256 _submissionTimeout, - uint256 _executionTimeout, - uint256 _withdrawTimeout, - address _wNative - ) { - arbitrator = _arbitrator; - arbitratorExtraData = _arbitratorExtraData; - wNative = _wNative; - - lastApprovalTime = block.timestamp; - submissionBaseDeposit = _submissionBaseDeposit; - submissionTimeout = _submissionTimeout; - executionTimeout = _executionTimeout; - withdrawTimeout = _withdrawTimeout; - sessions.push(); - - templateId = templateRegistry.setDisputeTemplate("", _templateData, _templateDataMappings); - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Changes the value of the base deposit required for submitting a list. - /// @param _submissionBaseDeposit The new value of the base deposit, in wei. - function changeSubmissionDeposit(uint256 _submissionBaseDeposit) external onlyByOwner { - submissionBaseDeposit = _submissionBaseDeposit; - } - - /// @dev Changes the time allocated for submission. Note that it can't be changed during approval period because there can be an active dispute in the old arbitrator contract - /// and prolonging submission timeout might switch it back to submission period. - /// @param _submissionTimeout The new duration of the submission period, in seconds. - function changeSubmissionTimeout(uint256 _submissionTimeout) external onlyByOwner duringSubmissionPeriod { - submissionTimeout = _submissionTimeout; - } - - /// @dev Changes the time allocated for list's execution. - /// @param _executionTimeout The new duration of the execution timeout, in seconds. - function changeExecutionTimeout(uint256 _executionTimeout) external onlyByOwner { - executionTimeout = _executionTimeout; - } - - /// @dev Changes list withdrawal timeout. Note that withdrawals are only possible in the first half of the submission period. - /// @param _withdrawTimeout The new duration of withdraw period, in seconds. - function changeWithdrawTimeout(uint256 _withdrawTimeout) external onlyByOwner { - withdrawTimeout = _withdrawTimeout; - } - - /// @dev Changes the arbitrator of the contract. Note that it can't be changed during approval period because there can be an active dispute in the old arbitrator contract. - /// @param _arbitrator The new trusted arbitrator. - /// @param _arbitratorExtraData The extra data used by the new arbitrator. - function changeArbitrator( - IArbitratorV2 _arbitrator, - bytes memory _arbitratorExtraData - ) external onlyByOwner duringSubmissionPeriod { - arbitrator = _arbitrator; - arbitratorExtraData = _arbitratorExtraData; - } - - /// @dev Update the dispute template data. - /// @param _templateData The new dispute template data. - /// @param _templateDataMappings The new dispute template data mappings. - function changeDisputeTemplate( - string memory _templateData, - string memory _templateDataMappings - ) external onlyByOwner { - templateId = templateRegistry.setDisputeTemplate("", _templateData, _templateDataMappings); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Creates transaction list based on input parameters and submits it for potential approval and execution. - /// @param _target List of addresses to call. - /// @param _value List of values required for respective addresses. - /// @param _data Concatenated calldata of all transactions of this list. - /// @param _dataSize List of lengths in bytes required to split calldata for its respective targets. - /// @param _description String in CSV format that describes list's transactions. - function submitList( - address[] memory _target, - uint256[] memory _value, - bytes memory _data, - uint256[] memory _dataSize, - string memory _description - ) external payable duringSubmissionPeriod { - if (_target.length != _value.length) revert WrongInputTargetAndValue(); - if (_target.length != _dataSize.length) revert WrongInputTargetAndDatasize(); - Session storage session = sessions[sessions.length - 1]; - Submission storage submission = submissions.push(); - submission.submitter = payable(msg.sender); - // Do the assignment first to avoid creating a new variable and bypass a 'stack too deep' error. - submission.deposit = submissionBaseDeposit + arbitrator.arbitrationCost(arbitratorExtraData); - if (msg.value < submission.deposit) revert InsufficientDeposit(); - - bytes32 listHash; - bytes32 currentTxHash; - uint256 readingPosition; - for (uint256 i = 0; i < _target.length; i++) { - bytes memory readData = new bytes(_dataSize[i]); - Transaction storage transaction = submission.txs.push(); - transaction.target = _target[i]; - transaction.value = _value[i]; - for (uint256 j = 0; j < _dataSize[i]; j++) { - readData[j] = _data[readingPosition + j]; - } - transaction.data = readData; - readingPosition += _dataSize[i]; - currentTxHash = keccak256(abi.encodePacked(transaction.target, transaction.value, transaction.data)); - listHash = keccak256(abi.encodePacked(currentTxHash, listHash)); - } - if (session.alreadySubmitted[listHash]) revert ListAlreadySubmitted(); - session.alreadySubmitted[listHash] = true; - submission.listHash = listHash; - submission.submissionTime = block.timestamp; - session.sumDeposit += submission.deposit; - session.submittedLists.push(submissions.length - 1); - if (session.submittedLists.length == 1) session.durationOffset = block.timestamp - lastApprovalTime; - - emit ListSubmitted(submissions.length - 1, msg.sender, sessions.length - 1, _description); - - uint256 remainder = msg.value - submission.deposit; - if (remainder > 0) payable(msg.sender).safeSend(remainder, wNative); - - reservedETH += submission.deposit; - } - - /// @dev Withdraws submitted transaction list. Reimburses submission deposit. - /// Withdrawal is only possible during the first half of the submission period and during withdrawTimeout after the submission is made. - /// @param _submissionID Submission's index in the array of submitted lists of the current sesssion. - /// @param _listHash Hash of a withdrawing list. - function withdrawTransactionList(uint256 _submissionID, bytes32 _listHash) external { - Session storage session = sessions[sessions.length - 1]; - Submission storage submission = submissions[session.submittedLists[_submissionID]]; - if (block.timestamp - lastApprovalTime > submissionTimeout / 2) revert ShouldOnlyWithdrawInFirstHalf(); - // This is an extra check to prevent _submissionID linking to the wrong list because of index swap during withdrawal. - if (submission.listHash != _listHash) revert WrongListHash(); - if (submission.submitter != msg.sender) revert OnlySubmitterCanWithdraw(); - if (block.timestamp - submission.submissionTime > withdrawTimeout) revert WithdrawingTimeHasPassed(); - session.submittedLists[_submissionID] = session.submittedLists[session.submittedLists.length - 1]; - session.alreadySubmitted[_listHash] = false; - session.submittedLists.pop(); - session.sumDeposit -= submission.deposit; - reservedETH -= submission.deposit; - payable(msg.sender).transfer(submission.deposit); - } - - /// @dev Approves a transaction list or creates a dispute if more than one list was submitted. - /// If nothing was submitted changes session. - function executeSubmissions() external duringApprovalPeriod { - Session storage session = sessions[sessions.length - 1]; - if (session.status != Status.NoDispute) revert AlreadyDisputed(); - if (session.submittedLists.length == 0) { - lastApprovalTime = block.timestamp; - session.status = Status.Resolved; - sessions.push(); - } else if (session.submittedLists.length == 1) { - Submission storage submission = submissions[session.submittedLists[0]]; - submission.approved = true; - submission.approvalTime = block.timestamp; - uint256 sumDeposit = session.sumDeposit; - session.sumDeposit = 0; - submission.submitter.safeSend(sumDeposit, wNative); - lastApprovalTime = block.timestamp; - session.status = Status.Resolved; - sessions.push(); - - reservedETH -= sumDeposit; - } else { - session.status = Status.DisputeCreated; - uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData); - session.disputeID = arbitrator.createDispute{value: arbitrationCost}( - session.submittedLists.length, - arbitratorExtraData - ); - // Check in case arbitration cost increased after the submission. It's unlikely that its increase won't be covered by the base deposit, but technically possible. - session.sumDeposit = session.sumDeposit > arbitrationCost ? session.sumDeposit - arbitrationCost : 0; - reservedETH = reservedETH > arbitrationCost ? reservedETH - arbitrationCost : 0; - emit DisputeRequest(arbitrator, session.disputeID, sessions.length - 1, templateId, ""); - } - } - - /// @dev Gives a ruling for a dispute. Must be called by the arbitrator. - /// @param _disputeID ID of the dispute in the Arbitrator contract. - /// @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for "Refuse to arbitrate". - /// Note If the final ruling is "0" nothing is approved and deposits will stay locked in the contract. - function rule(uint256 _disputeID, uint256 _ruling) external override { - Session storage session = sessions[sessions.length - 1]; - if (msg.sender != address(arbitrator)) revert OnlyArbitratorAllowed(); - if (session.status != Status.DisputeCreated) revert NotDisputed(); - if (_ruling > session.submittedLists.length) revert RulingOutOfBounds(); - - if (_ruling != 0) { - Submission storage submission = submissions[session.submittedLists[_ruling - 1]]; - submission.approved = true; - submission.approvalTime = block.timestamp; - submission.submitter.safeSend(session.sumDeposit, wNative); - } - // If the ruling is "0" the reserved funds of this session become expendable. - reservedETH -= session.sumDeposit; - - session.sumDeposit = 0; - lastApprovalTime = block.timestamp; - session.status = Status.Resolved; - session.ruling = _ruling; - sessions.push(); - - emit Ruling(IArbitratorV2(msg.sender), _disputeID, _ruling); - } - - /// @dev Executes selected transactions of the list. - /// @param _listID The index of the transaction list in the array of lists. - /// @param _cursor Index of the transaction from which to start executing. - /// @param _count Number of transactions to execute. Executes until the end if set to "0" or number higher than number of transactions in the list. - function executeTransactionList(uint256 _listID, uint256 _cursor, uint256 _count) external { - Submission storage submission = submissions[_listID]; - if (!submission.approved) revert SubmissionNotApproved(); - if (block.timestamp - submission.approvalTime > executionTimeout) revert TimeToExecuteHasPassed(); - for (uint256 i = _cursor; i < submission.txs.length && (_count == 0 || i < _cursor + _count); i++) { - Transaction storage transaction = submission.txs[i]; - uint256 expendableFunds = getExpendableFunds(); - if (!transaction.executed && transaction.value <= expendableFunds) { - (bool callResult, ) = transaction.target.call{value: transaction.value}(transaction.data); - // An extra check to prevent re-entrancy through target call. - if (callResult == true) { - if (transaction.executed) revert AlreadyExecuted(); - transaction.executed = true; - } - } - } - } - - /// @dev Receive function to receive funds for the execution of transactions. - receive() external payable {} - - /// @dev Gets the sum of contract funds that are used for the execution of transactions. - /// @return Contract balance without reserved ETH. - function getExpendableFunds() public view returns (uint256) { - return address(this).balance - reservedETH; - } - - /// @dev Gets the info of the specific transaction in the specific list. - /// @param _listID The index of the transaction list in the array of lists. - /// @param _transactionIndex The index of the transaction. - /// @return target The target of the transaction. - /// @return value The value of the transaction. - /// @return data The data of the transaction. - /// @return executed Whether the transaction was executed or not. - function getTransactionInfo( - uint256 _listID, - uint256 _transactionIndex - ) external view returns (address target, uint256 value, bytes memory data, bool executed) { - Submission storage submission = submissions[_listID]; - Transaction storage transaction = submission.txs[_transactionIndex]; - return (transaction.target, transaction.value, transaction.data, transaction.executed); - } - - /// @dev Gets the array of submitted lists in the session. - /// Note that this function is O(n), where n is the number of submissions in the session. This could exceed the gas limit, therefore this function should only be used for interface display and not by other contracts. - /// @param _session The ID of the session. - /// @return submittedLists Indexes of lists that were submitted during the session. - function getSubmittedLists(uint256 _session) external view returns (uint256[] memory submittedLists) { - Session storage session = sessions[_session]; - submittedLists = session.submittedLists; - } - - /// @dev Gets the number of transactions in the list. - /// @param _listID The index of the transaction list in the array of lists. - /// @return txCount The number of transactions in the list. - function getNumberOfTransactions(uint256 _listID) external view returns (uint256 txCount) { - Submission storage submission = submissions[_listID]; - return submission.txs.length; - } - - /// @dev Gets the number of lists created in contract's lifetime. - /// @return The number of created lists. - function getNumberOfCreatedLists() external view returns (uint256) { - return submissions.length; - } - - /// @dev Gets the number of the ongoing session. - /// @return The number of the ongoing session. - function getCurrentSessionNumber() external view returns (uint256) { - return sessions.length - 1; - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error SubmissionTimeHasEnded(); - error ApprovalTimeNotStarted(); - error OwnerOnly(); - error WrongInputTargetAndValue(); - error WrongInputTargetAndDatasize(); - error InsufficientDeposit(); - error ListAlreadySubmitted(); - error ShouldOnlyWithdrawInFirstHalf(); - error WrongListHash(); - error OnlySubmitterCanWithdraw(); - error WithdrawingTimeHasPassed(); - error AlreadyDisputed(); - error OnlyArbitratorAllowed(); - error NotDisputed(); - error RulingOutOfBounds(); - error SubmissionNotApproved(); - error TimeToExecuteHasPassed(); - error AlreadyExecuted(); -} diff --git a/contracts/src/arbitration/PolicyRegistry.sol b/contracts/src/arbitration/PolicyRegistry.sol deleted file mode 100644 index 9c8d09f3e..000000000 --- a/contracts/src/arbitration/PolicyRegistry.sol +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import "../proxy/UUPSProxiable.sol"; -import "../proxy/Initializable.sol"; - -/// @title PolicyRegistry -/// @dev A contract to maintain a policy for each court. -contract PolicyRegistry is UUPSProxiable, Initializable { - string public constant override version = "2.0.0"; - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev Emitted when a policy is updated. - /// @param _courtID The ID of the policy's court. - /// @param _courtName The name of the policy's court. - /// @param _policy The URI of the policy JSON. - event PolicyUpdate(uint256 indexed _courtID, string _courtName, string _policy); - - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; - mapping(uint256 => string) public policies; - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - /// @dev Requires that the sender is the owner. - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Constructs the `PolicyRegistry` contract. - /// @param _owner The owner's address. - function initialize(address _owner) external initializer { - owner = _owner; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /** - * @dev Access Control to perform implementation upgrades (UUPS Proxiable) - * @dev Only the owner can perform upgrades (`onlyByOwner`) - */ - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - /// @dev Changes the `owner` storage variable. - /// @param _owner The new value for the `owner` storage variable. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Sets the policy for the specified court. - /// @param _courtID The ID of the specified court. - /// @param _courtName The name of the specified court. - /// @param _policy The URI of the policy JSON. - function setPolicy(uint256 _courtID, string calldata _courtName, string calldata _policy) external onlyByOwner { - policies[_courtID] = _policy; - emit PolicyUpdate(_courtID, _courtName, policies[_courtID]); - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); -} diff --git a/contracts/src/arbitration/SortitionModule.sol b/contracts/src/arbitration/SortitionModule.sol deleted file mode 100644 index bf61255ae..000000000 --- a/contracts/src/arbitration/SortitionModule.sol +++ /dev/null @@ -1,622 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {KlerosCore} from "./KlerosCore.sol"; -import {ISortitionModule} from "./interfaces/ISortitionModule.sol"; -import {IDisputeKit} from "./interfaces/IDisputeKit.sol"; -import {Initializable} from "../proxy/Initializable.sol"; -import {UUPSProxiable} from "../proxy/UUPSProxiable.sol"; -import {SortitionTrees, TreeKey, CourtID} from "../libraries/SortitionTrees.sol"; -import {IRNG} from "../rng/IRNG.sol"; -import "../libraries/Constants.sol"; - -/// @title SortitionModule -/// @dev A factory of trees that keeps track of staked values for sortition. -contract SortitionModule is ISortitionModule, Initializable, UUPSProxiable { - using SortitionTrees for SortitionTrees.Tree; - using SortitionTrees for mapping(TreeKey key => SortitionTrees.Tree); - - string public constant override version = "2.0.0"; - - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - struct DelayedStake { - address account; // The address of the juror. - uint96 courtID; // The ID of the court. - uint256 stake; // The new stake. - bool alreadyTransferred; // DEPRECATED. True if tokens were already transferred before delayed stake's execution. - } - - struct Juror { - uint96[] courtIDs; // The IDs of courts where the juror's stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`. - uint256 stakedPnk; // The juror's total amount of tokens staked in subcourts. PNK balance including locked PNK and penalty deductions. - uint256 lockedPnk; // The juror's total amount of tokens locked in disputes. - } - - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; // The owner of the contract. - KlerosCore public core; // The core arbitrator contract. - Phase public phase; // The current phase. - uint256 public minStakingTime; // The time after which the phase can be switched to Drawing if there are open disputes. - uint256 public maxDrawingTime; // The time after which the phase can be switched back to Staking. - uint256 public lastPhaseChange; // The last time the phase was changed. - uint256 public randomNumberRequestBlock; // DEPRECATED: to be removed in the next redeploy - uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors. - IRNG public rng; // The random number generator. - uint256 public randomNumber; // Random number returned by RNG. - uint256 public rngLookahead; // DEPRECATED: to be removed in the next redeploy - uint256 public delayedStakeWriteIndex; // The index of the last `delayedStake` item that was written to the array. 0 index is skipped. - uint256 public delayedStakeReadIndex; // The index of the next `delayedStake` item that should be processed. Starts at 1 because 0 index is skipped. - mapping(TreeKey key => SortitionTrees.Tree) sortitionSumTrees; // The mapping of sortition trees by keys. - mapping(address account => Juror) public jurors; // The jurors. - mapping(uint256 => DelayedStake) public delayedStakes; // Stores the stakes that were changed during Drawing phase, to update them when the phase is switched to Staking. - mapping(address jurorAccount => mapping(uint96 courtId => uint256)) public latestDelayedStakeIndex; // DEPRECATED. Maps the juror to its latest delayed stake. If there is already a delayed stake for this juror then it'll be replaced. latestDelayedStakeIndex[juror][courtID]. - uint256 public maxStakePerJuror; - uint256 public maxTotalStaked; - uint256 public totalStaked; - - // ************************************* // - // * Events * // - // ************************************* // - - /// @notice Emitted when a juror stakes in a court. - /// @param _address The address of the juror. - /// @param _courtID The ID of the court. - /// @param _amount The amount of tokens staked in the court. - /// @param _amountAllCourts The amount of tokens staked in all courts. - event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts); - - /// @notice Emitted when a juror's stake is delayed. - /// @param _address The address of the juror. - /// @param _courtID The ID of the court. - /// @param _amount The amount of tokens staked in the court. - event StakeDelayed(address indexed _address, uint96 indexed _courtID, uint256 _amount); - - /// @notice Emitted when a juror's stake is locked. - /// @param _address The address of the juror. - /// @param _relativeAmount The amount of tokens locked. - /// @param _unlock Whether the stake is locked or unlocked. - event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock); - - /// @dev Emitted when leftover PNK is available. - /// @param _account The account of the juror. - /// @param _amount The amount of PNK available. - event LeftoverPNK(address indexed _account, uint256 _amount); - - /// @dev Emitted when leftover PNK is withdrawn. - /// @param _account The account of the juror withdrawing PNK. - /// @param _amount The amount of PNK withdrawn. - event LeftoverPNKWithdrawn(address indexed _account, uint256 _amount); - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer (constructor equivalent for upgradable contracts). - /// @param _owner The owner. - /// @param _core The KlerosCore. - /// @param _minStakingTime Minimal time to stake - /// @param _maxDrawingTime Time after which the drawing phase can be switched - /// @param _rng The random number generator. - /// @param _maxStakePerJuror The maximum amount of PNK a juror can stake in a court. - /// @param _maxTotalStaked The maximum amount of PNK that can be staked in all courts. - function initialize( - address _owner, - KlerosCore _core, - uint256 _minStakingTime, - uint256 _maxDrawingTime, - IRNG _rng, - uint256 _maxStakePerJuror, - uint256 _maxTotalStaked - ) external initializer { - owner = _owner; - core = _core; - minStakingTime = _minStakingTime; - maxDrawingTime = _maxDrawingTime; - lastPhaseChange = block.timestamp; - rng = _rng; - maxStakePerJuror = _maxStakePerJuror; - maxTotalStaked = _maxTotalStaked; - delayedStakeReadIndex = 1; - } - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - modifier onlyByCore() { - if (address(core) != msg.sender) revert KlerosCoreOnly(); - _; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Access Control to perform implementation upgrades (UUPS Proxiable) - /// Only the owner can perform upgrades (`onlyByOwner`) - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - /// @dev Changes the owner of the contract. - /// @param _owner The new owner. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the `minStakingTime` storage variable. - /// @param _minStakingTime The new value for the `minStakingTime` storage variable. - function changeMinStakingTime(uint256 _minStakingTime) external onlyByOwner { - minStakingTime = _minStakingTime; - } - - /// @dev Changes the `maxDrawingTime` storage variable. - /// @param _maxDrawingTime The new value for the `maxDrawingTime` storage variable. - function changeMaxDrawingTime(uint256 _maxDrawingTime) external onlyByOwner { - maxDrawingTime = _maxDrawingTime; - } - - /// @dev Changes the `rng` storage variable. - /// @param _rng The new random number generator. - function changeRandomNumberGenerator(IRNG _rng) external onlyByOwner { - rng = _rng; - if (phase == Phase.generating) { - rng.requestRandomness(); - } - } - - function changeMaxStakePerJuror(uint256 _maxStakePerJuror) external onlyByOwner { - maxStakePerJuror = _maxStakePerJuror; - } - - function changeMaxTotalStaked(uint256 _maxTotalStaked) external onlyByOwner { - maxTotalStaked = _maxTotalStaked; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - function passPhase() external { - if (phase == Phase.staking) { - if (block.timestamp - lastPhaseChange < minStakingTime) revert MinStakingTimeNotPassed(); - if (disputesWithoutJurors == 0) revert NoDisputesThatNeedJurors(); - rng.requestRandomness(); - phase = Phase.generating; - } else if (phase == Phase.generating) { - randomNumber = rng.receiveRandomness(); - if (randomNumber == 0) revert RandomNumberNotReady(); - phase = Phase.drawing; - } else if (phase == Phase.drawing) { - if (disputesWithoutJurors > 0 && block.timestamp - lastPhaseChange < maxDrawingTime) { - revert DisputesWithoutJurorsAndMaxDrawingTimeNotPassed(); - } - phase = Phase.staking; - } - - lastPhaseChange = block.timestamp; - emit NewPhase(phase); - } - - /// @dev Create a sortition sum tree at the specified key. - /// @param _courtID The ID of the court. - /// @param _extraData Extra data that contains the number of children each node in the tree should have. - function createTree(uint96 _courtID, bytes memory _extraData) external override onlyByCore { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - uint256 K = _extraDataToTreeK(_extraData); - sortitionSumTrees.createTree(key, K); - } - - /// @dev Executes the next delayed stakes. - /// @param _iterations The number of delayed stakes to execute. - function executeDelayedStakes(uint256 _iterations) external { - if (phase != Phase.staking) revert NotStakingPhase(); - if (delayedStakeWriteIndex < delayedStakeReadIndex) revert NoDelayedStakeToExecute(); - - uint256 actualIterations = (delayedStakeReadIndex + _iterations) - 1 > delayedStakeWriteIndex - ? (delayedStakeWriteIndex - delayedStakeReadIndex) + 1 - : _iterations; - uint256 newDelayedStakeReadIndex = delayedStakeReadIndex + actualIterations; - - for (uint256 i = delayedStakeReadIndex; i < newDelayedStakeReadIndex; i++) { - DelayedStake storage delayedStake = delayedStakes[i]; - core.setStakeBySortitionModule(delayedStake.account, delayedStake.courtID, delayedStake.stake); - delete delayedStakes[i]; - } - delayedStakeReadIndex = newDelayedStakeReadIndex; - } - - function createDisputeHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore { - disputesWithoutJurors++; - } - - function postDrawHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore { - disputesWithoutJurors--; - } - - /// @dev Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase(). - /// @param _randomNumber Random number returned by RNG contract. - function notifyRandomNumber(uint256 _randomNumber) public override {} - - /// @dev Validate the specified juror's new stake for a court. - /// Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants. - /// @param _account The address of the juror. - /// @param _courtID The ID of the court. - /// @param _newStake The new stake. - /// @param _noDelay True if the stake change should not be delayed. - /// @return pnkDeposit The amount of PNK to be deposited. - /// @return pnkWithdrawal The amount of PNK to be withdrawn. - /// @return stakingResult The result of the staking operation. - function validateStake( - address _account, - uint96 _courtID, - uint256 _newStake, - bool _noDelay - ) external override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) { - (pnkDeposit, pnkWithdrawal, stakingResult) = _validateStake(_account, _courtID, _newStake, _noDelay); - } - - function _validateStake( - address _account, - uint96 _courtID, - uint256 _newStake, - bool _noDelay - ) internal returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) { - Juror storage juror = jurors[_account]; - uint256 currentStake = stakeOf(_account, _courtID); - bool stakeIncrease = _newStake > currentStake; - uint256 stakeChange = stakeIncrease ? _newStake - currentStake : currentStake - _newStake; - - uint256 nbCourts = juror.courtIDs.length; - if (currentStake == 0 && nbCourts >= MAX_STAKE_PATHS) { - return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed. - } - - if (currentStake == 0 && _newStake == 0) { - return (0, 0, StakingResult.CannotStakeZeroWhenNoStake); // Forbid staking 0 amount when current stake is 0 to avoid flaky behaviour. - } - - if (stakeIncrease) { - // Check if the stake increase is within the limits. - if (juror.stakedPnk + stakeChange > maxStakePerJuror || currentStake + stakeChange > maxStakePerJuror) { - return (0, 0, StakingResult.CannotStakeMoreThanMaxStakePerJuror); - } - if (totalStaked + stakeChange > maxTotalStaked) { - return (0, 0, StakingResult.CannotStakeMoreThanMaxTotalStaked); - } - } - - if (phase != Phase.staking && !_noDelay) { - // Store the stake change as delayed, to be applied when the phase switches back to Staking. - DelayedStake storage delayedStake = delayedStakes[++delayedStakeWriteIndex]; - delayedStake.account = _account; - delayedStake.courtID = _courtID; - delayedStake.stake = _newStake; - emit StakeDelayed(_account, _courtID, _newStake); - return (pnkDeposit, pnkWithdrawal, StakingResult.Delayed); - } - - // Current phase is Staking: set stakes. - if (stakeIncrease) { - pnkDeposit = stakeChange; - totalStaked += stakeChange; - } else { - pnkWithdrawal = stakeChange; - uint256 possibleWithdrawal = juror.stakedPnk > juror.lockedPnk ? juror.stakedPnk - juror.lockedPnk : 0; - if (pnkWithdrawal > possibleWithdrawal) { - // Ensure locked tokens remain in the contract. They can only be released during Execution. - pnkWithdrawal = possibleWithdrawal; - } - totalStaked -= pnkWithdrawal; - } - return (pnkDeposit, pnkWithdrawal, StakingResult.Successful); - } - - /// @dev Update the state of the stakes, called by KC at the end of setStake flow. - /// `O(n + p * log_k(j))` where - /// `n` is the number of courts the juror has staked in, - /// `p` is the depth of the court tree, - /// `k` is the minimum number of children per node of one of these courts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously. - /// @param _account The address of the juror. - /// @param _courtID The ID of the court. - /// @param _pnkDeposit The amount of PNK to be deposited. - /// @param _pnkWithdrawal The amount of PNK to be withdrawn. - /// @param _newStake The new stake. - function setStake( - address _account, - uint96 _courtID, - uint256 _pnkDeposit, - uint256 _pnkWithdrawal, - uint256 _newStake - ) external override onlyByCore { - _setStake(_account, _courtID, _pnkDeposit, _pnkWithdrawal, _newStake); - } - - /// @dev Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution. - /// `O(n + p * log_k(j))` where - /// `n` is the number of courts the juror has staked in, - /// `p` is the depth of the court tree, - /// `k` is the minimum number of children per node of one of these courts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously. - /// @param _account The address of the juror. - /// @param _courtID The ID of the court. - /// @param _penalty The amount of PNK to be deducted. - /// @return pnkBalance The updated total PNK balance of the juror, including the penalty. - /// @return newCourtStake The updated stake of the juror in the court. - /// @return availablePenalty The amount of PNK that was actually deducted. - function setStakePenalty( - address _account, - uint96 _courtID, - uint256 _penalty - ) external override onlyByCore returns (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty) { - Juror storage juror = jurors[_account]; - availablePenalty = _penalty; - newCourtStake = stakeOf(_account, _courtID); - if (juror.stakedPnk < _penalty) { - availablePenalty = juror.stakedPnk; - } - - if (availablePenalty == 0) return (juror.stakedPnk, newCourtStake, 0); // No penalty to apply. - - uint256 currentStake = stakeOf(_account, _courtID); - uint256 newStake = 0; - if (currentStake >= availablePenalty) { - newStake = currentStake - availablePenalty; - } - _setStake(_account, _courtID, 0, availablePenalty, newStake); - pnkBalance = juror.stakedPnk; // updated by _setStake() - newCourtStake = stakeOf(_account, _courtID); // updated by _setStake() - } - - /// @dev Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution. - /// `O(n + p * log_k(j))` where - /// `n` is the number of courts the juror has staked in, - /// `p` is the depth of the court tree, - /// `k` is the minimum number of children per node of one of these courts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously. - /// @param _account The address of the juror. - /// @param _courtID The ID of the court. - /// @param _reward The amount of PNK to be deposited as a reward. - function setStakeReward( - address _account, - uint96 _courtID, - uint256 _reward - ) external override onlyByCore returns (bool success) { - if (_reward == 0) return true; // No reward to add. - - uint256 currentStake = stakeOf(_account, _courtID); - if (currentStake == 0) return false; // Juror has been unstaked, don't increase their stake. - - uint256 newStake = currentStake + _reward; - _setStake(_account, _courtID, _reward, 0, newStake); - return true; - } - - function _setStake( - address _account, - uint96 _courtID, - uint256 _pnkDeposit, - uint256 _pnkWithdrawal, - uint256 _newStake - ) internal { - Juror storage juror = jurors[_account]; - if (_pnkDeposit > 0) { - uint256 currentStake = stakeOf(_account, _courtID); - if (currentStake == 0) { - juror.courtIDs.push(_courtID); - } - // Increase juror's balance by deposited amount. - juror.stakedPnk += _pnkDeposit; - } else { - juror.stakedPnk -= _pnkWithdrawal; - if (_newStake == 0) { - // Cleanup - for (uint256 i = juror.courtIDs.length; i > 0; i--) { - if (juror.courtIDs[i - 1] == _courtID) { - juror.courtIDs[i - 1] = juror.courtIDs[juror.courtIDs.length - 1]; - juror.courtIDs.pop(); - break; - } - } - } - } - - // Update the sortition sum tree. - bytes32 stakePathID = SortitionTrees.toStakePathID(_account, _courtID); - bool finished = false; - uint96 currentCourtID = _courtID; - while (!finished) { - // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn. - TreeKey key = CourtID.wrap(currentCourtID).toTreeKey(); - sortitionSumTrees[key].set(_newStake, stakePathID); - if (currentCourtID == GENERAL_COURT) { - finished = true; - } else { - (currentCourtID, , , , , , ) = core.courts(currentCourtID); // Get the parent court. - } - } - emit StakeSet(_account, _courtID, _newStake, juror.stakedPnk); - } - - function lockStake(address _account, uint256 _relativeAmount) external override onlyByCore { - jurors[_account].lockedPnk += _relativeAmount; - emit StakeLocked(_account, _relativeAmount, false); - } - - function unlockStake(address _account, uint256 _relativeAmount) external override onlyByCore { - Juror storage juror = jurors[_account]; - juror.lockedPnk -= _relativeAmount; - emit StakeLocked(_account, _relativeAmount, true); - - uint256 amount = getJurorLeftoverPNK(_account); - if (amount > 0) { - emit LeftoverPNK(_account, amount); - } - } - - /// @dev Unstakes the inactive juror from all courts. - /// `O(n * (p * log_k(j)) )` where - /// `n` is the number of courts the juror has staked in, - /// `p` is the depth of the court tree, - /// `k` is the minimum number of children per node of one of these courts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously. - /// @param _account The juror to unstake. - function forcedUnstakeAllCourts(address _account) external override onlyByCore { - uint96[] memory courtIDs = getJurorCourtIDs(_account); - for (uint256 j = courtIDs.length; j > 0; j--) { - core.setStakeBySortitionModule(_account, courtIDs[j - 1], 0); - } - } - - /// @dev Unstakes the inactive juror from a specific court. - /// `O(n * (p * log_k(j)) )` where - /// `n` is the number of courts the juror has staked in, - /// `p` is the depth of the court tree, - /// `k` is the minimum number of children per node of one of these courts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously. - /// @param _account The juror to unstake. - /// @param _courtID The ID of the court. - function forcedUnstake(address _account, uint96 _courtID) external override onlyByCore { - core.setStakeBySortitionModule(_account, _courtID, 0); - } - - /// @dev Gives back the locked PNKs in case the juror fully unstaked earlier. - /// Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance - /// while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). - /// In this case the juror can use this function to withdraw the leftover tokens. - /// Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function. - /// @param _account The juror whose PNK to withdraw. - function withdrawLeftoverPNK(address _account) external override { - // Can withdraw the leftover PNK if fully unstaked, has no tokens locked and has positive balance. - // This withdrawal can't be triggered by calling setStake() in KlerosCore because current stake is technically 0, thus it is done via separate function. - uint256 amount = getJurorLeftoverPNK(_account); - if (amount == 0) revert NotEligibleForWithdrawal(); - jurors[_account].stakedPnk = 0; - core.transferBySortitionModule(_account, amount); - emit LeftoverPNKWithdrawn(_account, amount); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Draw an ID from a tree using a number. - /// Note that this function reverts if the sum of all values in the tree is 0. - /// @param _courtID The ID of the court. - /// @param _coreDisputeID Index of the dispute in Kleros Core. - /// @param _nonce Nonce to hash with random number. - /// @return drawnAddress The drawn address. - /// `O(k * log_k(n))` where - /// `k` is the maximum number of children per node in the tree, - /// and `n` is the maximum number of nodes ever appended. - function draw( - uint96 _courtID, - uint256 _coreDisputeID, - uint256 _nonce - ) public view override returns (address drawnAddress, uint96 fromSubcourtID) { - if (phase != Phase.drawing) revert NotDrawingPhase(); - - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - (drawnAddress, fromSubcourtID) = sortitionSumTrees[key].draw(_coreDisputeID, _nonce, randomNumber); - } - - /// @dev Get the stake of a juror in a court. - /// @param _juror The address of the juror. - /// @param _courtID The ID of the court. - /// @return value The stake of the juror in the court. - function stakeOf(address _juror, uint96 _courtID) public view returns (uint256) { - bytes32 stakePathID = SortitionTrees.toStakePathID(_juror, _courtID); - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - return sortitionSumTrees[key].stakeOf(stakePathID); - } - - /// @dev Gets the balance of a juror in a court. - /// @param _juror The address of the juror. - /// @param _courtID The ID of the court. - /// @return totalStaked The total amount of tokens staked including locked tokens and penalty deductions. Equivalent to the effective stake in the General court. - /// @return totalLocked The total amount of tokens locked in disputes. - /// @return stakedInCourt The amount of tokens staked in the specified court including locked tokens and penalty deductions. - /// @return nbCourts The number of courts the juror has directly staked in. - function getJurorBalance( - address _juror, - uint96 _courtID - ) - external - view - override - returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts) - { - Juror storage juror = jurors[_juror]; - totalStaked = juror.stakedPnk; - totalLocked = juror.lockedPnk; - stakedInCourt = stakeOf(_juror, _courtID); - nbCourts = juror.courtIDs.length; - } - - /// @dev Gets the court identifiers where a specific `_juror` has staked. - /// @param _juror The address of the juror. - function getJurorCourtIDs(address _juror) public view override returns (uint96[] memory) { - return jurors[_juror].courtIDs; - } - - function isJurorStaked(address _juror) external view override returns (bool) { - return jurors[_juror].stakedPnk > 0; - } - - function getJurorLeftoverPNK(address _juror) public view override returns (uint256) { - Juror storage juror = jurors[_juror]; - if (juror.courtIDs.length == 0 && juror.lockedPnk == 0) { - return juror.stakedPnk; - } else { - return 0; - } - } - - // ************************************* // - // * Internal * // - // ************************************* // - - function _extraDataToTreeK(bytes memory _extraData) internal pure returns (uint256 K) { - if (_extraData.length >= 32) { - assembly { - // solium-disable-line security/no-inline-assembly - K := mload(add(_extraData, 0x20)) - } - } else { - K = DEFAULT_K; - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error KlerosCoreOnly(); - error MinStakingTimeNotPassed(); - error NoDisputesThatNeedJurors(); - error RandomNumberNotReady(); - error DisputesWithoutJurorsAndMaxDrawingTimeNotPassed(); - error NotStakingPhase(); - error NoDelayedStakeToExecute(); - error NotEligibleForWithdrawal(); - error NotDrawingPhase(); -} diff --git a/contracts/src/arbitration/arbitrables/ArbitrableExample.sol b/contracts/src/arbitration/arbitrables/ArbitrableExample.sol deleted file mode 100644 index 4dd60cb82..000000000 --- a/contracts/src/arbitration/arbitrables/ArbitrableExample.sol +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitrableV2.sol"; -import "../interfaces/IDisputeTemplateRegistry.sol"; -import "../../libraries/SafeERC20.sol"; - -/// @title ArbitrableExample -/// An example of an arbitrable contract which connects to the arbitator that implements the updated interface. -contract ArbitrableExample is IArbitrableV2 { - using SafeERC20 for IERC20; - - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - struct DisputeStruct { - bool isRuled; // Whether the dispute has been ruled or not. - uint256 ruling; // Ruling given by the arbitrator. - uint256 numberOfRulingOptions; // The number of choices the arbitrator can give. - } - - event Action(string indexed _action); - - address public immutable owner; - IArbitratorV2 public arbitrator; // Arbitrator is set in constructor. - IDisputeTemplateRegistry public templateRegistry; // The dispute template registry. - uint256 public templateId; // The current dispute template identifier. - bytes public arbitratorExtraData; // Extra data to set up the arbitration. - IERC20 public immutable weth; // The WETH token. - mapping(uint256 => uint256) public externalIDtoLocalID; // Maps external (arbitrator side) dispute IDs to local dispute IDs. - DisputeStruct[] public disputes; // Stores the disputes' info. disputes[disputeID]. - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor - /// @param _arbitrator The arbitrator to rule on created disputes. - /// @param _templateData The dispute template data. - /// @param _templateDataMappings The dispute template data mappings. - /// @param _arbitratorExtraData The extra data for the arbitrator. - /// @param _templateRegistry The dispute template registry. - /// @param _weth The WETH token. - constructor( - IArbitratorV2 _arbitrator, - string memory _templateData, - string memory _templateDataMappings, - bytes memory _arbitratorExtraData, - IDisputeTemplateRegistry _templateRegistry, - IERC20 _weth - ) { - owner = msg.sender; - arbitrator = _arbitrator; - arbitratorExtraData = _arbitratorExtraData; - templateRegistry = _templateRegistry; - weth = _weth; - - templateId = templateRegistry.setDisputeTemplate("", _templateData, _templateDataMappings); - } - - // ************************************* // - // * Governance * // - // ************************************* // - - function changeArbitrator(IArbitratorV2 _arbitrator) external onlyByOwner { - arbitrator = _arbitrator; - } - - function changeArbitratorExtraData(bytes calldata _arbitratorExtraData) external onlyByOwner { - arbitratorExtraData = _arbitratorExtraData; - } - - function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external onlyByOwner { - templateRegistry = _templateRegistry; - } - - function changeDisputeTemplate( - string memory _templateData, - string memory _templateDataMappings - ) external onlyByOwner { - templateId = templateRegistry.setDisputeTemplate("", _templateData, _templateDataMappings); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Calls createDispute function of the specified arbitrator to create a dispute. - /// Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract. - /// @param _action The action that requires arbitration. - /// @return disputeID Dispute id (on arbitrator side) of the dispute created. - function createDispute(string calldata _action) external payable returns (uint256 disputeID) { - emit Action(_action); - - uint256 numberOfRulingOptions = 2; - uint256 localDisputeID = disputes.length; - disputes.push(DisputeStruct({isRuled: false, ruling: 0, numberOfRulingOptions: numberOfRulingOptions})); - - disputeID = arbitrator.createDispute{value: msg.value}(numberOfRulingOptions, arbitratorExtraData); - externalIDtoLocalID[disputeID] = localDisputeID; - - uint256 externalDisputeID = uint256(keccak256(abi.encodePacked(_action))); - emit DisputeRequest(arbitrator, disputeID, externalDisputeID, templateId, ""); - } - - /// @dev Calls createDispute function of the specified arbitrator to create a dispute. - /// Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract. - /// @param _action The action that requires arbitration. - /// @param _feeInWeth Amount of fees in WETH for the arbitrator. - /// @return disputeID Dispute id (on arbitrator side) of the dispute created. - function createDispute(string calldata _action, uint256 _feeInWeth) external returns (uint256 disputeID) { - emit Action(_action); - - uint256 numberOfRulingOptions = 2; - uint256 localDisputeID = disputes.length; - disputes.push(DisputeStruct({isRuled: false, ruling: 0, numberOfRulingOptions: numberOfRulingOptions})); - - if (!weth.safeTransferFrom(msg.sender, address(this), _feeInWeth)) revert TransferFailed(); - if (!weth.increaseAllowance(address(arbitrator), _feeInWeth)) revert AllowanceIncreaseFailed(); - - disputeID = arbitrator.createDispute(numberOfRulingOptions, arbitratorExtraData, weth, _feeInWeth); - externalIDtoLocalID[disputeID] = localDisputeID; - - uint256 externalDisputeID = uint256(keccak256(abi.encodePacked(_action))); - emit DisputeRequest(arbitrator, disputeID, externalDisputeID, templateId, ""); - } - - /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling. - /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract. - /// @param _ruling The ruling choice of the arbitration. - function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override { - uint256 localDisputeID = externalIDtoLocalID[_arbitratorDisputeID]; - DisputeStruct storage dispute = disputes[localDisputeID]; - if (msg.sender != address(arbitrator)) revert ArbitratorOnly(); - if (_ruling > dispute.numberOfRulingOptions) revert RulingOutOfBounds(); - if (dispute.isRuled) revert DisputeAlreadyRuled(); - - dispute.isRuled = true; - dispute.ruling = _ruling; - - emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling); - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error TransferFailed(); - error AllowanceIncreaseFailed(); - error ArbitratorOnly(); - error RulingOutOfBounds(); - error DisputeAlreadyRuled(); -} diff --git a/contracts/src/arbitration/arbitrables/DisputeResolver.sol b/contracts/src/arbitration/arbitrables/DisputeResolver.sol deleted file mode 100644 index 949d282b2..000000000 --- a/contracts/src/arbitration/arbitrables/DisputeResolver.sol +++ /dev/null @@ -1,159 +0,0 @@ -// SPDX-License-Identifier: MIT - -import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitrableV2.sol"; -import "../interfaces/IDisputeTemplateRegistry.sol"; - -pragma solidity ^0.8.24; - -/// @title DisputeResolver -/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol. -contract DisputeResolver is IArbitrableV2 { - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - struct DisputeStruct { - bytes arbitratorExtraData; // Extra data for the dispute. - bool isRuled; // True if the dispute has been ruled. - uint256 ruling; // Ruling given to the dispute. - uint256 numberOfRulingOptions; // The number of choices the arbitrator can give. - } - - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; // The owner. - IArbitratorV2 public arbitrator; // The arbitrator. - IDisputeTemplateRegistry public templateRegistry; // The dispute template registry. - DisputeStruct[] public disputes; // Local disputes. - mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs. - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor - /// @param _arbitrator Target global arbitrator for any disputes. - constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) { - owner = msg.sender; - arbitrator = _arbitrator; - templateRegistry = _templateRegistry; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Changes the owner. - /// @param _owner The address of the new owner. - function changeOwner(address _owner) external { - if (owner != msg.sender) revert OwnerOnly(); - owner = _owner; - } - - function changeArbitrator(IArbitratorV2 _arbitrator) external { - if (owner != msg.sender) revert OwnerOnly(); - arbitrator = _arbitrator; - } - - function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external { - if (owner != msg.sender) revert OwnerOnly(); - templateRegistry = _templateRegistry; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Calls createDispute function of the specified arbitrator to create a dispute. - /// Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract. - /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute. - /// @param _disputeTemplate Dispute template. - /// @param _disputeTemplateDataMappings The data mappings. - /// @param _numberOfRulingOptions Number of ruling options. - /// @return disputeID Dispute id (on arbitrator side) of the created dispute. - function createDisputeForTemplate( - bytes calldata _arbitratorExtraData, - string calldata _disputeTemplate, - string memory _disputeTemplateDataMappings, - uint256 _numberOfRulingOptions - ) external payable returns (uint256 disputeID) { - return - _createDispute( - _arbitratorExtraData, - _disputeTemplate, - _disputeTemplateDataMappings, - "", - _numberOfRulingOptions - ); - } - - /// @dev Calls createDispute function of the specified arbitrator to create a dispute. - /// Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract. - /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute. - /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. - /// @param _numberOfRulingOptions Number of ruling options. - /// @return disputeID Dispute id (on arbitrator side) of the created dispute. - function createDisputeForTemplateUri( - bytes calldata _arbitratorExtraData, - string calldata _disputeTemplateUri, - uint256 _numberOfRulingOptions - ) external payable returns (uint256 disputeID) { - return _createDispute(_arbitratorExtraData, "", "", _disputeTemplateUri, _numberOfRulingOptions); - } - - /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling. - /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract. - /// @param _ruling The ruling choice of the arbitration. - function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override { - uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID]; - DisputeStruct storage dispute = disputes[localDisputeID]; - if (msg.sender != address(arbitrator)) revert ArbitratorOnly(); - if (_ruling > dispute.numberOfRulingOptions) revert RulingOutOfBounds(); - if (dispute.isRuled) revert DisputeAlreadyRuled(); - - dispute.isRuled = true; - dispute.ruling = _ruling; - - emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling); - } - - // ************************************* // - // * Internal * // - // ************************************* // - - function _createDispute( - bytes calldata _arbitratorExtraData, - string memory _disputeTemplate, - string memory _disputeTemplateDataMappings, - string memory _disputeTemplateUri, - uint256 _numberOfRulingOptions - ) internal virtual returns (uint256 arbitratorDisputeID) { - if (_numberOfRulingOptions <= 1) revert ShouldBeAtLeastTwoRulingOptions(); - - arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData); - uint256 localDisputeID = disputes.length; - disputes.push( - DisputeStruct({ - arbitratorExtraData: _arbitratorExtraData, - isRuled: false, - ruling: 0, - numberOfRulingOptions: _numberOfRulingOptions - }) - ); - arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID; - uint256 templateId = templateRegistry.setDisputeTemplate("", _disputeTemplate, _disputeTemplateDataMappings); - emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri); - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error ArbitratorOnly(); - error RulingOutOfBounds(); - error DisputeAlreadyRuled(); - error ShouldBeAtLeastTwoRulingOptions(); -} diff --git a/contracts/src/arbitration/devtools/DisputeResolverRuler.sol b/contracts/src/arbitration/devtools/DisputeResolverRuler.sol deleted file mode 100644 index eed2c8092..000000000 --- a/contracts/src/arbitration/devtools/DisputeResolverRuler.sol +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: MIT - -import {DisputeResolver, IArbitratorV2, IDisputeTemplateRegistry} from "../arbitrables/DisputeResolver.sol"; - -pragma solidity ^0.8.24; - -interface IKlerosCoreRulerFragment { - function getNextDisputeID() external view returns (uint256); -} - -/// @title DisputeResolverRuler -/// It extends DisputeResolver for testing purposes of the automatic ruling modes. -/// The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule(). -contract DisputeResolverRuler is DisputeResolver { - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor - /// @param _arbitrator Target global arbitrator for any disputes. - constructor( - IArbitratorV2 _arbitrator, - IDisputeTemplateRegistry _templateRegistry - ) DisputeResolver(_arbitrator, _templateRegistry) { - owner = msg.sender; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - function _createDispute( - bytes calldata _arbitratorExtraData, - string memory _disputeTemplate, - string memory _disputeTemplateDataMappings, - string memory _disputeTemplateUri, - uint256 _numberOfRulingOptions - ) internal override returns (uint256 arbitratorDisputeID) { - if (_numberOfRulingOptions <= 1) revert ShouldBeAtLeastTwoRulingOptions(); - - uint256 localDisputeID = disputes.length; - DisputeStruct storage dispute = disputes.push(); - dispute.arbitratorExtraData = _arbitratorExtraData; - dispute.numberOfRulingOptions = _numberOfRulingOptions; - - // Keep track of the upcoming dispute ID before dispute creation, so rule() can be called immediately after. - arbitratorDisputeID = IKlerosCoreRulerFragment(address(arbitrator)).getNextDisputeID(); - arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID; - uint256 templateId = templateRegistry.setDisputeTemplate("", _disputeTemplate, _disputeTemplateDataMappings); - emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri); - - arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData); - } -} diff --git a/contracts/src/arbitration/devtools/KlerosCoreRuler.sol b/contracts/src/arbitration/devtools/KlerosCoreRuler.sol deleted file mode 100644 index 42a428299..000000000 --- a/contracts/src/arbitration/devtools/KlerosCoreRuler.sol +++ /dev/null @@ -1,678 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitratorV2.sol"; -import {SafeERC20, IERC20} from "../../libraries/SafeERC20.sol"; -import {UUPSProxiable} from "../../proxy/UUPSProxiable.sol"; -import {Initializable} from "../../proxy/Initializable.sol"; -import "../../libraries/Constants.sol"; - -/// @title KlerosCoreRuler -/// Core arbitrator contract for development and testing purposes. -contract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable { - using SafeERC20 for IERC20; - - string public constant override version = "2.0.0"; - - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - enum RulingMode { - uninitialized, - manual, // executeRuling() is called manually. - automaticRandom, // The ruling is given randomly automatically. - automaticPreset // The ruling is given automatically with a preset value. - } - - enum Period { - evidence, // Evidence can be submitted. This is also when drawing has to take place. - commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes. - vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not. - appeal, // The dispute can be appealed. - execution // Tokens are redistributed and the ruling is executed. - } - - struct RulerSettings { - RulingMode rulingMode; // The ruling mode of the arbitrator. - uint256 presetRuling; // The ruling to give in case of automatic ruling mode. - bool presetTied; // Whether the ruling is tied or not. - bool presetOverridden; // Whether the ruling is overridden or not. - } - - struct Court { - uint96 parent; // The parent court. - bool hiddenVotes; // Whether to use commit and reveal or not. - uint256[] children; // List of child courts. - uint256 minStake; // Minimum PNKs needed to stake in the court. - uint256 alpha; // Basis point of PNKs that are lost when incoherent. - uint256 feeForJuror; // Arbitration fee paid per juror. - uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any. - uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`. - bool disabled; // True if the court is disabled. Unused for now, will be implemented later. - } - - struct Dispute { - uint96 courtID; // The ID of the court the dispute is in. - IArbitrableV2 arbitrated; // The arbitrable contract. - Period period; // The current period of the dispute. - bool ruled; // True if the ruling has been executed, false otherwise. - Round[] rounds; - } - - struct Round { - uint256 totalFeesForJurors; // The total juror fees paid in this round. - uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round. - IERC20 feeToken; // The token used for paying fees in this round. - } - - struct CurrencyRate { - bool feePaymentAccepted; - uint64 rateInEth; - uint8 rateDecimals; - } - - struct RulingResult { - uint256 ruling; - bool tied; - bool overridden; - } - - // ************************************* // - // * Storage * // - // ************************************* // - - uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH. - - address public owner; // The owner of the contract. - IERC20 public pinakion; // The Pinakion token contract. - Court[] public courts; // The courts. - Dispute[] public disputes; // The disputes. - mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH. - mapping(IArbitrableV2 arbitrable => address ruler) public rulers; // The ruler of each arbitrable contract. - mapping(IArbitrableV2 arbitrable => RulerSettings) public settings; // The settings of each arbitrable contract. - mapping(uint256 disputeID => RulingResult) public rulingResults; // The ruling results of each dispute. - - // ************************************* // - // * Events * // - // ************************************* // - - event NewPeriod(uint256 indexed _disputeID, Period _period); - event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable); - event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable); - event CourtCreated( - uint256 indexed _courtID, - uint96 indexed _parent, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] _timesPerPeriod - ); - event CourtModified( - uint96 indexed _courtID, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] _timesPerPeriod - ); - event CourtJump( - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint96 indexed _fromCourtID, - uint96 _toCourtID - ); - event TokenAndETHShift( - address indexed _account, - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint256 _degreeOfCoherency, - int256 _pnkAmount, - int256 _feeAmount, - IERC20 _feeToken - ); - event LeftoverRewardSent( - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint256 _pnkAmount, - uint256 _feeAmount, - IERC20 _feeToken - ); - event AutoRuled( - IArbitrableV2 indexed _arbitrable, - RulingMode indexed mode, - uint256 indexed _disputeID, - uint256 _ruling, - bool tied, - bool overridden - ); - event RulerSettingsChanged(IArbitrableV2 indexed _arbitrable, RulerSettings _settings); - event RulerChanged(IArbitrableV2 indexed _arbitrable, address indexed _oldRuler, address indexed _newRuler); - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer (constructor equivalent for upgradable contracts). - /// @param _owner The owner's address. - /// @param _pinakion The address of the token contract. - /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively). - function initialize(address _owner, IERC20 _pinakion, uint256[4] memory _courtParameters) external initializer { - owner = _owner; - pinakion = _pinakion; - - // FORKING_COURT - // TODO: Fill the properties for the Forking court, emit CourtCreated. - courts.push(); - - // GENERAL_COURT - Court storage court = courts.push(); - court.parent = FORKING_COURT; - court.children = new uint256[](0); - court.hiddenVotes = false; - court.minStake = _courtParameters[0]; - court.alpha = _courtParameters[1]; - court.feeForJuror = _courtParameters[2]; - court.jurorsForCourtJump = _courtParameters[3]; - court.timesPerPeriod = [0, 0, 0, 0]; - - emit CourtCreated( - 1, - court.parent, - court.hiddenVotes, - _courtParameters[0], - _courtParameters[1], - _courtParameters[2], - _courtParameters[3], - court.timesPerPeriod - ); - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /* @dev Access Control to perform implementation upgrades (UUPS Proxiable) - * @dev Only the owner can perform upgrades (`onlyByOwner`) - */ - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - /// @dev Allows the owner to call anything on behalf of the contract. - /// @param _destination The destination of the call. - /// @param _amount The value sent with the call. - /// @param _data The data sent with the call. - function executeOwnerProposal(address _destination, uint256 _amount, bytes memory _data) external onlyByOwner { - (bool success, ) = _destination.call{value: _amount}(_data); - if (!success) revert UnsuccessfulCall(); - } - - /// @dev Changes the `owner` storage variable. - /// @param _owner The new value for the `owner` storage variable. - function changeOwner(address payable _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the `pinakion` storage variable. - /// @param _pinakion The new value for the `pinakion` storage variable. - function changePinakion(IERC20 _pinakion) external onlyByOwner { - pinakion = _pinakion; - } - - /// @dev Creates a court under a specified parent court. - /// @param _parent The `parent` property value of the court. - /// @param _hiddenVotes The `hiddenVotes` property value of the court. - /// @param _minStake The `minStake` property value of the court. - /// @param _alpha The `alpha` property value of the court. - /// @param _feeForJuror The `feeForJuror` property value of the court. - /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court. - /// @param _timesPerPeriod The `timesPerPeriod` property value of the court. - function createCourt( - uint96 _parent, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] memory _timesPerPeriod - ) external onlyByOwner { - if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent(); - - uint256 courtID = courts.length; - Court storage court = courts.push(); - - court.parent = _parent; - court.children = new uint256[](0); - court.hiddenVotes = _hiddenVotes; - court.minStake = _minStake; - court.alpha = _alpha; - court.feeForJuror = _feeForJuror; - court.jurorsForCourtJump = _jurorsForCourtJump; - court.timesPerPeriod = _timesPerPeriod; - - // Update the parent. - courts[_parent].children.push(courtID); - emit CourtCreated( - courtID, - _parent, - _hiddenVotes, - _minStake, - _alpha, - _feeForJuror, - _jurorsForCourtJump, - _timesPerPeriod - ); - } - - function changeCourtParameters( - uint96 _courtID, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] memory _timesPerPeriod - ) external onlyByOwner { - Court storage court = courts[_courtID]; - court.minStake = _minStake; - court.hiddenVotes = _hiddenVotes; - court.alpha = _alpha; - court.feeForJuror = _feeForJuror; - court.jurorsForCourtJump = _jurorsForCourtJump; - court.timesPerPeriod = _timesPerPeriod; - emit CourtModified( - _courtID, - _hiddenVotes, - _minStake, - _alpha, - _feeForJuror, - _jurorsForCourtJump, - _timesPerPeriod - ); - } - - /// @dev Changes the supported fee tokens. - /// @param _feeToken The fee token. - /// @param _accepted Whether the token is supported or not as a method of fee payment. - function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByOwner { - currencyRates[_feeToken].feePaymentAccepted = _accepted; - emit AcceptedFeeToken(_feeToken, _accepted); - } - - /// @dev Changes the currency rate of a fee token. - /// @param _feeToken The fee token. - /// @param _rateInEth The new rate of the fee token in ETH. - /// @param _rateDecimals The new decimals of the fee token rate. - function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByOwner { - currencyRates[_feeToken].rateInEth = _rateInEth; - currencyRates[_feeToken].rateDecimals = _rateDecimals; - emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - function changeRulingModeToManual(IArbitrableV2 _arbitrable) external { - if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender; - if (rulers[_arbitrable] != msg.sender) revert RulerOnly(); - - delete settings[_arbitrable]; - RulerSettings storage arbitratedSettings = settings[_arbitrable]; - arbitratedSettings.rulingMode = RulingMode.manual; - emit RulerSettingsChanged(_arbitrable, arbitratedSettings); - } - - function changeRulingModeToAutomaticRandom(IArbitrableV2 _arbitrable) external { - if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender; - if (rulers[_arbitrable] != msg.sender) revert RulerOnly(); - - delete settings[_arbitrable]; - RulerSettings storage arbitratedSettings = settings[_arbitrable]; - arbitratedSettings.rulingMode = RulingMode.automaticRandom; - emit RulerSettingsChanged(_arbitrable, arbitratedSettings); - } - - function changeRulingModeToAutomaticPreset( - IArbitrableV2 _arbitrable, - uint256 _presetRuling, - bool _presetTied, - bool _presetOverridden - ) external { - if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender; - if (rulers[_arbitrable] != msg.sender) revert RulerOnly(); - - delete settings[_arbitrable]; - RulerSettings storage arbitratedSettings = settings[_arbitrable]; - arbitratedSettings.rulingMode = RulingMode.automaticPreset; - arbitratedSettings.presetRuling = _presetRuling; - arbitratedSettings.presetTied = _presetTied; - arbitratedSettings.presetOverridden = _presetOverridden; - emit RulerSettingsChanged(_arbitrable, arbitratedSettings); - } - - function changeRuler(IArbitrableV2 _arbitrable, address _newRuler) external { - if (rulers[_arbitrable] != msg.sender) revert RulerOnly(); - rulers[_arbitrable] = _newRuler; - emit RulerChanged(_arbitrable, msg.sender, _newRuler); - } - - /// @inheritdoc IArbitratorV2 - function createDispute( - uint256 _numberOfChoices, - bytes memory _extraData - ) external payable override returns (uint256 disputeID) { - if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough(); - - return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value); - } - - /// @inheritdoc IArbitratorV2 - function createDispute( - uint256 _numberOfChoices, - bytes calldata _extraData, - IERC20 _feeToken, - uint256 _feeAmount - ) external override returns (uint256 disputeID) { - if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted(); - if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough(); - - if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed(); - return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount); - } - - function _createDispute( - uint256 _numberOfChoices, - bytes memory _extraData, - IERC20 _feeToken, - uint256 _feeAmount - ) internal returns (uint256 disputeID) { - (uint96 courtID, , ) = _unpackExtraData(_extraData); - disputeID = disputes.length; - Dispute storage dispute = disputes.push(); - dispute.courtID = courtID; - dispute.arbitrated = IArbitrableV2(msg.sender); - - Round storage round = dispute.rounds.push(); - round.totalFeesForJurors = _feeAmount; - round.feeToken = IERC20(_feeToken); - - _autoRule(disputeID, _numberOfChoices); - - emit DisputeCreation(disputeID, IArbitrableV2(msg.sender)); - } - - function _autoRule(uint256 _disputeID, uint256 _numberOfChoices) internal { - Dispute storage dispute = disputes[_disputeID]; - uint256 roundID = dispute.rounds.length - 1; - RulerSettings storage arbitratedSettings = settings[dispute.arbitrated]; - if (arbitratedSettings.rulingMode == RulingMode.uninitialized) revert RulingModeNotSet(); - if (arbitratedSettings.rulingMode == RulingMode.manual) { - // NOP - } else if (arbitratedSettings.rulingMode == RulingMode.automaticPreset) { - emit AutoRuled( - dispute.arbitrated, - RulingMode.automaticPreset, - _disputeID, - arbitratedSettings.presetRuling, - arbitratedSettings.presetTied, - arbitratedSettings.presetOverridden - ); - this.executeRuling( - _disputeID, - arbitratedSettings.presetRuling, - arbitratedSettings.presetTied, - arbitratedSettings.presetOverridden - ); - this.execute(_disputeID, roundID); - } else if (arbitratedSettings.rulingMode == RulingMode.automaticRandom) { - uint256 pseudoRandomNumber = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1)))) % - _numberOfChoices; // Not secure but it's just a dev tool for testing, sue me - bool tied = pseudoRandomNumber & 4 == 0; - bool overridden = pseudoRandomNumber & 2 == 0; - emit AutoRuled( - dispute.arbitrated, - RulingMode.automaticRandom, - _disputeID, - pseudoRandomNumber, - tied, - overridden - ); - this.executeRuling(_disputeID, pseudoRandomNumber, tied, overridden); - this.execute(_disputeID, roundID); - } - } - - /// @dev Appeals the ruling of a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @param _jump Whether to jump to the parent court or not. - function appeal( - uint256 _disputeID, - uint256 _numberOfChoices, - bytes memory /*_extraData*/, - bool _jump - ) external payable { - if (msg.value < appealCost(_disputeID, _jump)) revert AppealFeesNotEnough(); - - Dispute storage dispute = disputes[_disputeID]; - if (rulers[dispute.arbitrated] != msg.sender) revert RulerOnly(); - if (dispute.period != Period.appeal) revert DisputeNotAppealable(); - - uint96 newCourtID = dispute.courtID; - - if (_jump) { - // Jump to parent court. - newCourtID = courts[newCourtID].parent; - if (newCourtID != dispute.courtID) { - emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID); - } - } - - dispute.courtID = newCourtID; - dispute.period = Period.evidence; - - Round storage extraRound = dispute.rounds.push(); - extraRound.totalFeesForJurors = msg.value; - - emit AppealDecision(_disputeID, dispute.arbitrated); - emit NewPeriod(_disputeID, Period.evidence); - - _autoRule(_disputeID, _numberOfChoices); - } - - /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts. - /// @param _disputeID The ID of the dispute. - /// @param _round The appeal round. - function execute(uint256 _disputeID, uint256 _round) external { - Dispute storage dispute = disputes[_disputeID]; - address account = rulers[dispute.arbitrated]; - if (account == address(0)) revert NoRulerSet(); - - // Transfer the fees back to the ruler - Round storage round = dispute.rounds[_round]; - uint256 feeReward = round.totalFeesForJurors; - round.sumFeeRewardPaid += feeReward; - if (round.feeToken == NATIVE_CURRENCY) { - // The dispute fees were paid in ETH - payable(account).send(feeReward); - } else { - // The dispute fees were paid in ERC20 - round.feeToken.safeTransfer(account, feeReward); - } - emit TokenAndETHShift(account, _disputeID, _round, 1, int256(0), int256(feeReward), round.feeToken); - } - - /// @dev Executes a specified dispute's ruling. - /// @param _disputeID The ID of the dispute. - function executeRuling(uint256 _disputeID, uint256 _ruling, bool tied, bool overridden) external { - Dispute storage dispute = disputes[_disputeID]; - if (dispute.ruled) revert RulingAlreadyExecuted(); - if (msg.sender != rulers[dispute.arbitrated] && msg.sender != address(this)) revert RulerOnly(); - - rulingResults[_disputeID] = RulingResult(_ruling, tied, overridden); - dispute.ruled = true; - dispute.arbitrated.rule(_disputeID, _ruling); - - emit Ruling(dispute.arbitrated, _disputeID, _ruling); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Compute the cost of arbitration denominated in ETH. - /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @return cost The arbitration cost in ETH. - function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) { - (uint96 courtID, uint256 minJurors, ) = _unpackExtraData(_extraData); - cost = courts[courtID].feeForJuror * minJurors; - } - - /// @dev Compute the cost of arbitration denominated in `_feeToken`. - /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @param _feeToken The ERC20 token used to pay fees. - /// @return cost The arbitration cost in `_feeToken`. - function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) { - cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData)); - } - - /// @dev Gets the cost of appealing a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @param _jump Whether to jump to the parent court or not. - /// @return cost The appeal cost. - function appealCost(uint256 _disputeID, bool _jump) public view returns (uint256 cost) { - Dispute storage dispute = disputes[_disputeID]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - Court storage court = courts[dispute.courtID]; - uint256 nbVotes = round.totalFeesForJurors / court.feeForJuror; - if (_jump) { - // Jump to parent court. - if (dispute.courtID == GENERAL_COURT) { - // TODO: Handle the forking when appealed in General court. - cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court. - } else { - cost = courts[court.parent].feeForJuror * ((nbVotes * 2) + 1); - } - } else { - // Stay in current court. - cost = court.feeForJuror * ((nbVotes * 2) + 1); - } - } - - /// @dev Gets the current ruling of a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @return ruling The current ruling. - /// @return tied Whether it's a tie or not. - /// @return overridden Whether the ruling was overridden by appeal funding or not. - function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) { - RulingResult storage rulingResult = rulingResults[_disputeID]; - return (rulingResult.ruling, rulingResult.tied, rulingResult.overridden); - } - - function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) { - return disputes[_disputeID].rounds[_round]; - } - - function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) { - return disputes[_disputeID].rounds.length; - } - - function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) { - timesPerPeriod = courts[_courtID].timesPerPeriod; - } - - function getNextDisputeID() external view returns (uint256) { - return disputes.length; - } - - // ************************************* // - // * Public Views for Dispute Kits * // - // ************************************* // - - /// @dev Gets the number of votes permitted for the specified dispute in the latest round. - /// @param _disputeID The ID of the dispute. - function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) { - Dispute storage dispute = disputes[_disputeID]; - Court storage court = courts[dispute.courtID]; - return dispute.rounds[dispute.rounds.length - 1].totalFeesForJurors / court.feeForJuror; - } - - function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) { - return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth; - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array. - /// Note that if extradata contains an incorrect value then this value will be switched to default. - /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID. - /// @return courtID The court ID. - /// @return minJurors The minimum number of jurors required. - /// @return disputeKitID The ID of the dispute kit. - function _unpackExtraData( - bytes memory _extraData - ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) { - // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index. - if (_extraData.length >= 64) { - assembly { - // solium-disable-line security/no-inline-assembly - courtID := mload(add(_extraData, 0x20)) - minJurors := mload(add(_extraData, 0x40)) - disputeKitID := mload(add(_extraData, 0x60)) - } - if (courtID == FORKING_COURT || courtID >= courts.length) { - courtID = GENERAL_COURT; - } - if (minJurors == 0) { - minJurors = DEFAULT_NB_OF_JURORS; - } - if (disputeKitID == NULL_DISPUTE_KIT) { - disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used. - } - } else { - courtID = GENERAL_COURT; - minJurors = DEFAULT_NB_OF_JURORS; - disputeKitID = DISPUTE_KIT_CLASSIC; - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error RulerOnly(); - error NoRulerSet(); - error RulingModeNotSet(); - error UnsuccessfulCall(); - error InvalidForkingCourtAsParent(); - error ArbitrationFeesNotEnough(); - error TokenNotAccepted(); - error AppealFeesNotEnough(); - error DisputeNotAppealable(); - error RulingAlreadyExecuted(); - error TransferFailed(); -} diff --git a/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol b/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol deleted file mode 100644 index dd2edbab8..000000000 --- a/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {DisputeKitClassicBase, KlerosCore} from "./DisputeKitClassicBase.sol"; - -/// @title DisputeKitClassic -/// Dispute kit implementation of the Kleros v1 features including: -/// - a drawing system: proportional to staked PNK, -/// - a vote aggregation system: plurality, -/// - an incentive system: equal split between coherent votes, -/// - an appeal system: fund 2 choices only, vote on any choice. -contract DisputeKitClassic is DisputeKitClassicBase { - string public constant override version = "2.0.0"; - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer. - /// @param _owner The owner's address. - /// @param _core The KlerosCore arbitrator. - /// @param _wNative The wrapped native token address, typically wETH. - /// @param _jumpDisputeKitID The ID of the dispute kit to switch to after the court jump. - function initialize( - address _owner, - KlerosCore _core, - address _wNative, - uint256 _jumpDisputeKitID - ) external initializer { - __DisputeKitClassicBase_initialize(_owner, _core, _wNative, _jumpDisputeKitID); - } - - // ************************ // - // * Governance * // - // ************************ // - - /// @dev Access Control to perform implementation upgrades (UUPS Proxiable) - /// Only the owner can perform upgrades (`onlyByOwner`) - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } -} diff --git a/contracts/src/arbitration/dispute-kits/DisputeKitClassicBase.sol b/contracts/src/arbitration/dispute-kits/DisputeKitClassicBase.sol deleted file mode 100644 index 5dc1c3522..000000000 --- a/contracts/src/arbitration/dispute-kits/DisputeKitClassicBase.sol +++ /dev/null @@ -1,800 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {KlerosCore, IDisputeKit, ISortitionModule} from "../KlerosCore.sol"; -import {Initializable} from "../../proxy/Initializable.sol"; -import {UUPSProxiable} from "../../proxy/UUPSProxiable.sol"; -import {SafeSend} from "../../libraries/SafeSend.sol"; -import {ONE_BASIS_POINT, DISPUTE_KIT_CLASSIC} from "../../libraries/Constants.sol"; - -/// @title DisputeKitClassicBase -/// Abstract Dispute kit classic implementation of the Kleros v1 features including: -/// - a drawing system: proportional to staked PNK, -/// - a vote aggregation system: plurality, -/// - an incentive system: equal split between coherent votes, -/// - an appeal system: fund 2 choices only, vote on any choice. -abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable { - using SafeSend for address payable; - - // ************************************* // - // * Structs * // - // ************************************* // - - struct Dispute { - Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds. - uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for "refuse to arbitrate". - bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore. - mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute. - bytes extraData; // Extradata for the dispute. - } - - struct Round { - Vote[] votes; // Former votes[_appeal][]. - uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first. - mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`. - bool tied; // True if there is a tie, false otherwise. - uint256 totalVoted; // Former uint[_appeal] votesInEachRound. - uint256 totalCommitted; // Former commitsInRound. - mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round. - mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise. - mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice. - uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute. - uint256[] fundedChoices; // Stores the choices that are fully funded. - uint256 nbVotes; // Maximal number of votes this dispute can get. - } - - struct Vote { - address account; // The address of the juror. - bytes32 commit; // The commit of the juror. For courts with hidden votes. - uint256 choice; // The choice of the juror. - bool voted; // True if the vote has been cast. - } - - // ************************************* // - // * Storage * // - // ************************************* // - - uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee. - uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee. - uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period. - - address public owner; // The owner of the contract. - KlerosCore public core; // The Kleros Core arbitrator - Dispute[] public disputes; // Array of the locally created disputes. - mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID. - bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default. - mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(address drawnAddress => bool))) - public alreadyDrawn; // True if the address has already been drawn, false by default. To be added to the Round struct when fully redeploying rather than upgrading. - mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID. - address public wNative; // The wrapped native token for safeSend(). - uint256 public jumpDisputeKitID; // The ID of the dispute kit in Kleros Core disputeKits array that the dispute should switch to after the court jump, in case the new court doesn't support this dispute kit. - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev To be emitted when a dispute is created. - /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _numberOfChoices The number of choices available in the dispute. - /// @param _extraData The extra data for the dispute. - event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData); - - /// @dev To be emitted when a vote commitment is cast. - /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _juror The address of the juror casting the vote commitment. - /// @param _voteIDs The identifiers of the votes in the dispute. - /// @param _commit The commitment of the juror. - event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit); - - /// @dev To be emitted when a funding contribution is made. - /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _coreRoundID The identifier of the round in the Arbitrator contract. - /// @param _choice The choice that is being funded. - /// @param _contributor The address of the contributor. - /// @param _amount The amount contributed. - event Contribution( - uint256 indexed _coreDisputeID, - uint256 indexed _coreRoundID, - uint256 _choice, - address indexed _contributor, - uint256 _amount - ); - - /// @dev To be emitted when the contributed funds are withdrawn. - /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _coreRoundID The identifier of the round in the Arbitrator contract. - /// @param _choice The choice that is being funded. - /// @param _contributor The address of the contributor. - /// @param _amount The amount withdrawn. - event Withdrawal( - uint256 indexed _coreDisputeID, - uint256 indexed _coreRoundID, - uint256 _choice, - address indexed _contributor, - uint256 _amount - ); - - /// @dev To be emitted when a choice is fully funded for an appeal. - /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _coreRoundID The identifier of the round in the Arbitrator contract. - /// @param _choice The choice that is being funded. - event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice); - - // ************************************* // - // * Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - modifier onlyByCore() { - if (address(core) != msg.sender) revert KlerosCoreOnly(); - _; - } - - modifier notJumped(uint256 _coreDisputeID) { - if (disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped) revert DisputeJumpedToParentDK(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Initializer. - /// @param _owner The owner's address. - /// @param _core The KlerosCore arbitrator. - /// @param _wNative The wrapped native token address, typically wETH. - /// @param _jumpDisputeKitID The ID of the dispute kit to switch to after the court jump. - function __DisputeKitClassicBase_initialize( - address _owner, - KlerosCore _core, - address _wNative, - uint256 _jumpDisputeKitID - ) internal onlyInitializing { - owner = _owner; - core = _core; - wNative = _wNative; - jumpDisputeKitID = _jumpDisputeKitID; - } - - // ************************ // - // * Governance * // - // ************************ // - - /// @dev Allows the owner to call anything on behalf of the contract. - /// @param _destination The destination of the call. - /// @param _amount The value sent with the call. - /// @param _data The data sent with the call. - function executeOwnerProposal(address _destination, uint256 _amount, bytes memory _data) external onlyByOwner { - (bool success, ) = _destination.call{value: _amount}(_data); - if (!success) revert UnsuccessfulCall(); - } - - /// @dev Changes the `owner` storage variable. - /// @param _owner The new value for the `owner` storage variable. - function changeOwner(address payable _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the `core` storage variable. - /// @param _core The new value for the `core` storage variable. - function changeCore(address _core) external onlyByOwner { - core = KlerosCore(_core); - } - - /// @dev Changes the dispute kit ID used for the jump. - /// @param _jumpDisputeKitID The new value for the `jumpDisputeKitID` storage variable. - function changeJumpDisputeKitID(uint256 _jumpDisputeKitID) external onlyByOwner { - jumpDisputeKitID = _jumpDisputeKitID; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract. - /// Note: Access restricted to Kleros Core only. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @param _numberOfChoices Number of choices of the dispute - /// @param _extraData Additional info about the dispute, for possible use in future dispute kits. - /// @param _nbVotes Number of votes for this dispute. - function createDispute( - uint256 _coreDisputeID, - uint256 _numberOfChoices, - bytes calldata _extraData, - uint256 _nbVotes - ) external override onlyByCore { - uint256 localDisputeID = disputes.length; - Dispute storage dispute = disputes.push(); - dispute.numberOfChoices = _numberOfChoices; - dispute.extraData = _extraData; - dispute.jumped = false; // Possibly true if this DK has jumped in a previous round. - - // New round in the Core should be created before the dispute creation in DK. - dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length; - - Round storage round = dispute.rounds.push(); - round.nbVotes = _nbVotes; - round.tied = true; - - coreDisputeIDToLocal[_coreDisputeID] = localDisputeID; - coreDisputeIDToActive[_coreDisputeID] = true; - emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData); - } - - /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. - /// Note: Access restricted to Kleros Core only. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @param _nonce Nonce of the drawing iteration. - /// @return drawnAddress The drawn address. - function draw( - uint256 _coreDisputeID, - uint256 _nonce - ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress, uint96 fromSubcourtID) { - uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID]; - Dispute storage dispute = disputes[localDisputeID]; - uint256 localRoundID = dispute.rounds.length - 1; - Round storage round = dispute.rounds[localRoundID]; - - ISortitionModule sortitionModule = core.sortitionModule(); - (uint96 courtID, , , , ) = core.disputes(_coreDisputeID); - (drawnAddress, fromSubcourtID) = sortitionModule.draw(courtID, _coreDisputeID, _nonce); - if (drawnAddress == address(0)) { - // Sortition can return 0 address if no one has staked yet. - return (drawnAddress, fromSubcourtID); - } - - if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) { - round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false})); - alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true; - } else { - drawnAddress = address(0); - } - } - - /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the - /// commit period, each call overrides the commits of the previous one. - /// `O(n)` where - /// `n` is the number of votes. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @param _voteIDs The IDs of the votes. - /// @param _commit The commitment hash. - function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external { - _castCommit(_coreDisputeID, _voteIDs, _commit); - } - - function _castCommit( - uint256 _coreDisputeID, - uint256[] calldata _voteIDs, - bytes32 _commit - ) internal notJumped(_coreDisputeID) { - (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID); - if (period != KlerosCore.Period.commit) revert NotCommitPeriod(); - if (_commit == bytes32(0)) revert EmptyCommit(); - if (!coreDisputeIDToActive[_coreDisputeID]) revert NotActiveForCoreDisputeID(); - - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - for (uint256 i = 0; i < _voteIDs.length; i++) { - if (round.votes[_voteIDs[i]].account != msg.sender) revert JurorHasToOwnTheVote(); - round.votes[_voteIDs[i]].commit = _commit; - } - round.totalCommitted += _voteIDs.length; - emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit); - } - - /// @dev Sets the caller's choices for the specified votes. - /// `O(n)` where - /// `n` is the number of votes. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @param _voteIDs The IDs of the votes. - /// @param _choice The choice. - /// @param _salt The salt for the commit if the votes were hidden. - /// @param _justification Justification of the choice. - function castVote( - uint256 _coreDisputeID, - uint256[] calldata _voteIDs, - uint256 _choice, - uint256 _salt, - string memory _justification - ) external { - _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender); - } - - function _castVote( - uint256 _coreDisputeID, - uint256[] calldata _voteIDs, - uint256 _choice, - uint256 _salt, - string memory _justification, - address _juror - ) internal notJumped(_coreDisputeID) { - (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID); - if (period != KlerosCore.Period.vote) revert NotVotePeriod(); - if (_voteIDs.length == 0) revert EmptyVoteIDs(); - if (!coreDisputeIDToActive[_coreDisputeID]) revert NotActiveForCoreDisputeID(); - - uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID]; - Dispute storage dispute = disputes[localDisputeID]; - if (_choice > dispute.numberOfChoices) revert ChoiceOutOfBounds(); - - uint256 localRoundID = dispute.rounds.length - 1; - Round storage round = dispute.rounds[localRoundID]; - { - (uint96 courtID, , , , ) = core.disputes(_coreDisputeID); - (, bool hiddenVotes, , , , , ) = core.courts(courtID); - bytes32 actualVoteHash = hashVote(_choice, _salt, _justification); - - // Save the votes. - for (uint256 i = 0; i < _voteIDs.length; i++) { - if (round.votes[_voteIDs[i]].account != _juror) revert JurorHasToOwnTheVote(); - if (hiddenVotes && _getExpectedVoteHash(localDisputeID, localRoundID, _voteIDs[i]) != actualVoteHash) - revert HashDoesNotMatchHiddenVoteCommitment(); - if (round.votes[_voteIDs[i]].voted) revert VoteAlreadyCast(); - round.votes[_voteIDs[i]].choice = _choice; - round.votes[_voteIDs[i]].voted = true; - } - } // Workaround stack too deep - - round.totalVoted += _voteIDs.length; - - round.counts[_choice] += _voteIDs.length; - if (_choice == round.winningChoice) { - if (round.tied) round.tied = false; - } else { - // Voted for another choice. - if (round.counts[_choice] == round.counts[round.winningChoice]) { - // Tie. - if (!round.tied) round.tied = true; - } else if (round.counts[_choice] > round.counts[round.winningChoice]) { - // New winner. - round.winningChoice = _choice; - round.tied = false; - } - } - emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification); - } - - /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded. - /// Note that the surplus deposit will be reimbursed. - /// @param _coreDisputeID Index of the dispute in Kleros Core. - /// @param _choice A choice that receives funding. - function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - if (_choice > dispute.numberOfChoices) revert ChoiceOutOfBounds(); - if (!coreDisputeIDToActive[_coreDisputeID]) revert NotActiveForCoreDisputeID(); - - (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID); - if (block.timestamp < appealPeriodStart || block.timestamp >= appealPeriodEnd) revert AppealPeriodIsOver(); - - uint256 multiplier; - (uint256 ruling, , ) = this.currentRuling(_coreDisputeID); - if (ruling == _choice) { - multiplier = WINNER_STAKE_MULTIPLIER; - } else { - if ( - block.timestamp - appealPeriodStart >= - ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT - ) { - revert AppealPeriodIsOverForLoser(); - } - multiplier = LOSER_STAKE_MULTIPLIER; - } - - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1; - - if (round.hasPaid[_choice]) revert AppealFeeIsAlreadyPaid(); - uint256 appealCost = core.appealCost(_coreDisputeID); - uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT; - - // Take up to the amount necessary to fund the current round at the current costs. - uint256 contribution; - if (totalCost > round.paidFees[_choice]) { - contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level. - ? msg.value - : totalCost - round.paidFees[_choice]; - emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution); - } - - round.contributions[msg.sender][_choice] += contribution; - round.paidFees[_choice] += contribution; - if (round.paidFees[_choice] >= totalCost) { - round.feeRewards += round.paidFees[_choice]; - round.fundedChoices.push(_choice); - round.hasPaid[_choice] = true; - emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice); - } - - if (round.fundedChoices.length > 1) { - // At least two sides are fully funded. - round.feeRewards = round.feeRewards - appealCost; - - if (core.isDisputeKitJumping(_coreDisputeID)) { - // Don't create a new round in case of a jump, and remove local dispute from the flow. - dispute.jumped = true; - } else { - // Don't subtract 1 from length since both round arrays haven't been updated yet. - dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length; - - Round storage newRound = dispute.rounds.push(); - newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID); - newRound.tied = true; - } - core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData); - } - - if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative); - } - - /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. - /// Note that withdrawals are not possible if the core contract is paused. - /// @param _coreDisputeID Index of the dispute in Kleros Core contract. - /// @param _beneficiary The address whose rewards to withdraw. - /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from. - /// @param _choice The ruling option that the caller wants to withdraw from. - /// @return amount The withdrawn amount. - function withdrawFeesAndRewards( - uint256 _coreDisputeID, - address payable _beneficiary, - uint256 _coreRoundID, - uint256 _choice - ) external returns (uint256 amount) { - (, , , bool isRuled, ) = core.disputes(_coreDisputeID); - if (!isRuled) revert DisputeNotResolved(); - if (core.paused()) revert CoreIsPaused(); - if (!coreDisputeIDToActive[_coreDisputeID]) revert NotActiveForCoreDisputeID(); - - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]]; - (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID); - - if (!round.hasPaid[_choice]) { - // Allow to reimburse if funding was unsuccessful for this ruling option. - amount = round.contributions[_beneficiary][_choice]; - } else { - // Funding was successful for this ruling option. - if (_choice == finalRuling) { - // This ruling option is the ultimate winner. - amount = round.paidFees[_choice] > 0 - ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice] - : 0; - } else if (!round.hasPaid[finalRuling]) { - // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed. - amount = - (round.contributions[_beneficiary][_choice] * round.feeRewards) / - (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]); - } - } - round.contributions[_beneficiary][_choice] = 0; - - if (amount != 0) { - _beneficiary.safeSend(amount, wNative); - emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount); - } - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /** - * @dev Computes the hash of a vote using ABI encoding - * @dev The unused parameters may be used by overriding contracts. - * @param _choice The choice being voted for - * @param _salt A random salt for commitment - * @return bytes32 The hash of the encoded vote parameters - */ - function hashVote( - uint256 _choice, - uint256 _salt, - string memory /*_justification*/ - ) public view virtual returns (bytes32) { - return keccak256(abi.encodePacked(_choice, _salt)); - } - - function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Round storage lastRound = dispute.rounds[dispute.rounds.length - 1]; - return lastRound.fundedChoices; - } - - /// @dev Gets the current ruling of a specified dispute. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @return ruling The current ruling. - /// @return tied Whether it's a tie or not. - /// @return overridden Whether the ruling was overridden by appeal funding or not. - function currentRuling( - uint256 _coreDisputeID - ) external view override returns (uint256 ruling, bool tied, bool overridden) { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - tied = round.tied; - ruling = tied ? 0 : round.winningChoice; - (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID); - // Override the final ruling if only one side funded the appeals. - if (period == KlerosCore.Period.execution) { - uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID); - if (fundedChoices.length == 1) { - ruling = fundedChoices[0]; - tied = false; - overridden = true; - } - } - } - - /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit. - /// @param _voteID The ID of the vote. - /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward. - /// @return feeCoherence The degree of coherence in basis points for the dispute fee reward. - function getDegreeOfCoherenceReward( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _voteID, - uint256 /* _feePerJuror */, - uint256 /* _pnkAtStakePerJuror */ - ) external view override returns (uint256 pnkCoherence, uint256 feeCoherence) { - uint256 coherence = _getDegreeOfCoherence(_coreDisputeID, _coreRoundID, _voteID); - return (coherence, coherence); - } - - /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the penalty. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit. - /// @param _voteID The ID of the vote. - /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward. - function getDegreeOfCoherencePenalty( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _voteID, - uint256 /* _feePerJuror */, - uint256 /* _pnkAtStakePerJuror */ - ) external view override returns (uint256 pnkCoherence) { - return _getDegreeOfCoherence(_coreDisputeID, _coreRoundID, _voteID); - } - - function _getDegreeOfCoherence( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _voteID - ) internal view returns (uint256 coherence) { - // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between. - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID]; - (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID); - - if (vote.voted && (vote.choice == winningChoice || tied)) { - return ONE_BASIS_POINT; - } else { - return 0; - } - } - - /// @dev Gets the number of jurors who are eligible to a reward in this round. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit. - /// @return The number of coherent jurors. - function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]]; - (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID); - - if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) { - return 0; - } else if (tied) { - return currentRound.totalVoted; - } else { - return currentRound.counts[winningChoice]; - } - } - - /// @dev Returns true if all of the jurors have cast their commits for the last round. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @return Whether all of the jurors have cast their commits for the last round. - function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - return round.totalCommitted == round.votes.length; - } - - /// @dev Returns true if all of the jurors have cast their votes for the last round. - /// Note that this function is to be called directly by the core contract and is not for off-chain usage. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @return Whether all of the jurors have cast their votes for the last round. - function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - - (uint96 courtID, , , , ) = core.disputes(_coreDisputeID); - (, bool hiddenVotes, , , , , ) = core.courts(courtID); - uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length; - - return round.totalVoted == expectedTotalVoted; - } - - /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). - /// Note that this function is to be called directly by the core contract and is not for off-chain usage. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @return Whether the appeal funding is finished. - function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) { - (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID); - - uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID); - // Uses block.timestamp from the current tx when called by the core contract. - return (fundedChoices.length == 0 && - block.timestamp - appealPeriodStart >= - ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT); - } - - /// @dev Returns true if the dispute is jumping to a parent court. - /// @return Whether the dispute is jumping to a parent court or not. - function earlyCourtJump(uint256 /* _coreDisputeID */) external pure override returns (bool) { - return false; - } - - /// @dev Returns the number of votes after the appeal. - /// @param _currentNbVotes The number of votes before the appeal. - /// @return The number of votes after the appeal. - function getNbVotesAfterAppeal( - IDisputeKit /* _previousDisputeKit */, - uint256 _currentNbVotes - ) external pure override returns (uint256) { - return (_currentNbVotes * 2) + 1; - } - - /// @dev Returns the dispute kid ID be used after court jump by Kleros Core. - /// @return The ID of the dispute kit in Kleros Core disputeKits array. - function getJumpDisputeKitID() external view override returns (uint256) { - // Fall back to classic DK in case the jump ID is not defined. - return jumpDisputeKitID == 0 ? DISPUTE_KIT_CLASSIC : jumpDisputeKitID; - } - - /// @dev Returns true if the specified voter was active in this round. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit. - /// @param _voteID The ID of the voter. - /// @return Whether the voter was active or not. - function isVoteActive( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _voteID - ) external view override returns (bool) { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID]; - return vote.voted; - } - - function getRoundInfo( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _choice - ) - external - view - override - returns ( - uint256 winningChoice, - bool tied, - uint256 totalVoted, - uint256 totalCommited, - uint256 nbVoters, - uint256 choiceCount - ) - { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]]; - return ( - round.winningChoice, - round.tied, - round.totalVoted, - round.totalCommitted, - round.votes.length, - round.counts[_choice] - ); - } - - /// @dev Returns the number of rounds in a dispute. - /// @param _localDisputeID The ID of the dispute in the Dispute Kit. - /// @return The number of rounds in the dispute. - function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) { - return disputes[_localDisputeID].rounds.length; - } - - /// @dev Returns the local dispute ID and round ID for a given core dispute ID and core round ID. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @param _coreRoundID The ID of the round in Kleros Core. - /// @return localDisputeID The ID of the dispute in the Dispute Kit. - /// @return localRoundID The ID of the round in the Dispute Kit. - function getLocalDisputeRoundID( - uint256 _coreDisputeID, - uint256 _coreRoundID - ) external view returns (uint256 localDisputeID, uint256 localRoundID) { - localDisputeID = coreDisputeIDToLocal[_coreDisputeID]; - localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID]; - } - - /// @dev Returns the vote information for a given vote ID. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @param _coreRoundID The ID of the round in Kleros Core. - /// @param _voteID The ID of the vote. - /// @return account The address of the juror who cast the vote. - /// @return commit The commit of the vote. - function getVoteInfo( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _voteID - ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID]; - return (vote.account, vote.commit, vote.choice, vote.voted); - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Returns the expected vote hash for a given vote. - /// @param _localDisputeID The ID of the dispute in the Dispute Kit. - /// @param _localRoundID The ID of the round in the Dispute Kit. - /// @param _voteID The ID of the vote. - /// @return The expected vote hash. - function _getExpectedVoteHash( - uint256 _localDisputeID, - uint256 _localRoundID, - uint256 _voteID - ) internal view virtual returns (bytes32) { - return disputes[_localDisputeID].rounds[_localRoundID].votes[_voteID].commit; - } - - /// @dev Checks that the chosen address satisfies certain conditions for being drawn. - /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts. - /// minStake is checked directly during staking process however it's possible for the juror to get drawn - /// while having < minStake if it is later increased by governance. - /// This issue is expected and harmless. - /// @param _coreDisputeID ID of the dispute in the core contract. - /// @param _juror Chosen address. - /// @return result Whether the address passes the check or not. - function _postDrawCheck( - Round storage /*_round*/, - uint256 _coreDisputeID, - address _juror - ) internal view virtual returns (bool result) { - if (singleDrawPerJuror) { - uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID]; - Dispute storage dispute = disputes[localDisputeID]; - uint256 localRoundID = dispute.rounds.length - 1; - result = !alreadyDrawn[localDisputeID][localRoundID][_juror]; - } else { - result = true; - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error KlerosCoreOnly(); - error DisputeJumpedToParentDK(); - error UnsuccessfulCall(); - error NotCommitPeriod(); - error EmptyCommit(); - error NotActiveForCoreDisputeID(); - error JurorHasToOwnTheVote(); - error NotVotePeriod(); - error EmptyVoteIDs(); - error ChoiceOutOfBounds(); - error HashDoesNotMatchHiddenVoteCommitment(); - error VoteAlreadyCast(); - error AppealPeriodIsOver(); - error AppealPeriodIsOverForLoser(); - error AppealFeeIsAlreadyPaid(); - error DisputeNotResolved(); - error CoreIsPaused(); -} diff --git a/contracts/src/arbitration/dispute-kits/DisputeKitGated.sol b/contracts/src/arbitration/dispute-kits/DisputeKitGated.sol deleted file mode 100644 index 8abfdecac..000000000 --- a/contracts/src/arbitration/dispute-kits/DisputeKitGated.sol +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {DisputeKitClassicBase, KlerosCore} from "./DisputeKitClassicBase.sol"; - -interface IBalanceHolder { - /// @dev Returns the number of tokens in `owner` account. - /// @dev Compatible with ERC-20 and ERC-721. - /// @param owner The address of the owner. - /// @return balance The number of tokens in `owner` account. - function balanceOf(address owner) external view returns (uint256 balance); -} - -interface IBalanceHolderERC1155 { - /// @dev Returns the balance of an ERC-1155 token. - /// @param account The address of the token holder - /// @param id ID of the token - /// @return The token balance - function balanceOf(address account, uint256 id) external view returns (uint256); -} - -/// @title DisputeKitGated -/// Dispute kit implementation adapted from DisputeKitClassic -/// - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 -/// - a vote aggregation system: plurality, -/// - an incentive system: equal split between coherent votes, -/// - an appeal system: fund 2 choices only, vote on any choice. -contract DisputeKitGated is DisputeKitClassicBase { - string public constant override version = "2.0.0"; - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer. - /// @param _owner The owner's address. - /// @param _core The KlerosCore arbitrator. - /// @param _wNative The wrapped native token address, typically wETH. - /// @param _jumpDisputeKitID The ID of the dispute kit to switch to after the court jump. - function initialize( - address _owner, - KlerosCore _core, - address _wNative, - uint256 _jumpDisputeKitID - ) external initializer { - __DisputeKitClassicBase_initialize(_owner, _core, _wNative, _jumpDisputeKitID); - } - - // ************************ // - // * Governance * // - // ************************ // - - /// @dev Access Control to perform implementation upgrades (UUPS Proxiable) - /// Only the owner can perform upgrades (`onlyByOwner`) - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Extracts token gating information from the extra data. - /// @param _extraData The extra data bytes array with the following encoding: - /// - bytes 0-31: uint96 courtID, not used here - /// - bytes 32-63: uint256 minJurors, not used here - /// - bytes 64-95: uint256 disputeKitID, not used here - /// - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160) - /// - bytes 128-159: uint256 tokenId - /// @return tokenGate The address of the token contract used for gating access. - /// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721. - /// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721). - function extraDataToTokenInfo( - bytes memory _extraData - ) public pure returns (address tokenGate, bool isERC1155, uint256 tokenId) { - // Need at least 160 bytes to safely read the parameters - if (_extraData.length < 160) return (address(0), false, 0); - - assembly { - // solium-disable-line security/no-inline-assembly - let packedTokenGateIsERC1155 := mload(add(_extraData, 0x80)) // 4th parameter at offset 128 - tokenId := mload(add(_extraData, 0xA0)) // 5th parameter at offset 160 (moved up) - - // Unpack address from lower 160 bits and bool from bit 160 - tokenGate := and(packedTokenGateIsERC1155, 0xffffffffffffffffffffffffffffffffffffffff) - isERC1155 := and(shr(160, packedTokenGateIsERC1155), 1) - } - } - - /// @inheritdoc DisputeKitClassicBase - function _postDrawCheck( - Round storage _round, - uint256 _coreDisputeID, - address _juror - ) internal view override returns (bool) { - if (!super._postDrawCheck(_round, _coreDisputeID, _juror)) return false; - - // Get the local dispute and extract token info from extraData - uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID]; - Dispute storage dispute = disputes[localDisputeID]; - (address tokenGate, bool isERC1155, uint256 tokenId) = extraDataToTokenInfo(dispute.extraData); - - // If no token gate is specified, allow all jurors - if (tokenGate == address(0)) return true; - - // Check juror's token balance - if (isERC1155) { - return IBalanceHolderERC1155(tokenGate).balanceOf(_juror, tokenId) > 0; - } else { - return IBalanceHolder(tokenGate).balanceOf(_juror) > 0; - } - } -} diff --git a/contracts/src/arbitration/dispute-kits/DisputeKitGatedShutter.sol b/contracts/src/arbitration/dispute-kits/DisputeKitGatedShutter.sol deleted file mode 100644 index 573f81f11..000000000 --- a/contracts/src/arbitration/dispute-kits/DisputeKitGatedShutter.sol +++ /dev/null @@ -1,256 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {DisputeKitClassicBase, KlerosCore} from "./DisputeKitClassicBase.sol"; - -interface IBalanceHolder { - /// @dev Returns the number of tokens in `owner` account. - /// @dev Compatible with ERC-20 and ERC-721. - /// @param owner The address of the owner. - /// @return balance The number of tokens in `owner` account. - function balanceOf(address owner) external view returns (uint256 balance); -} - -interface IBalanceHolderERC1155 { - /// @dev Returns the balance of an ERC-1155 token. - /// @param account The address of the token holder - /// @param id ID of the token - /// @return The token balance - function balanceOf(address account, uint256 id) external view returns (uint256); -} - -/// @title DisputeKitGatedShutter -/// Added functionality: shielded voting. -/// Dispute kit implementation adapted from DisputeKitClassic -/// - a drawing system: proportional to staked PNK with a non-zero balance of `tokenGate` where `tokenGate` is an ERC20, ERC721 or ERC1155 -/// - a vote aggregation system: plurality, -/// - an incentive system: equal split between coherent votes, -/// - an appeal system: fund 2 choices only, vote on any choice. -contract DisputeKitGatedShutter is DisputeKitClassicBase { - string public constant override version = "2.0.0"; - - // ************************************* // - // * Storage * // - // ************************************* // - - mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(uint256 voteID => bytes32 recoveryCommitment))) - public recoveryCommitments; - - // ************************************* // - // * Transient Storage * // - // ************************************* // - - bool transient callerIsJuror; - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev Emitted when a vote is cast. - /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _juror The address of the juror casting the vote commitment. - /// @param _commit The commitment hash. - /// @param _recoveryCommit The commitment hash without the justification. - /// @param _identity The Shutter identity used for encryption. - /// @param _encryptedVote The Shutter encrypted vote. - event CommitCastShutter( - uint256 indexed _coreDisputeID, - address indexed _juror, - bytes32 indexed _commit, - bytes32 _recoveryCommit, - bytes32 _identity, - bytes _encryptedVote - ); - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer. - /// @param _owner The owner's address. - /// @param _core The KlerosCore arbitrator. - /// @param _wNative The wrapped native token address, typically wETH. - /// @param _jumpDisputeKitID The ID of the dispute kit to switch to after the court jump. - function initialize( - address _owner, - KlerosCore _core, - address _wNative, - uint256 _jumpDisputeKitID - ) external initializer { - __DisputeKitClassicBase_initialize(_owner, _core, _wNative, _jumpDisputeKitID); - } - - // ************************ // - // * Governance * // - // ************************ // - - /// @dev Access Control to perform implementation upgrades (UUPS Proxiable) - /// Only the owner can perform upgrades (`onlyByOwner`) - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the - /// commit period, each call overrides the commits of the previous one. - /// `O(n)` where - /// `n` is the number of votes. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @param _voteIDs The IDs of the votes. - /// @param _commit The commitment hash including the justification. - /// @param _recoveryCommit The commitment hash without the justification. - /// @param _identity The Shutter identity used for encryption. - /// @param _encryptedVote The Shutter encrypted vote. - function castCommitShutter( - uint256 _coreDisputeID, - uint256[] calldata _voteIDs, - bytes32 _commit, - bytes32 _recoveryCommit, - bytes32 _identity, - bytes calldata _encryptedVote - ) external notJumped(_coreDisputeID) { - if (_recoveryCommit == bytes32(0)) revert EmptyRecoveryCommit(); - - uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID]; - Dispute storage dispute = disputes[localDisputeID]; - uint256 localRoundID = dispute.rounds.length - 1; - for (uint256 i = 0; i < _voteIDs.length; i++) { - recoveryCommitments[localDisputeID][localRoundID][_voteIDs[i]] = _recoveryCommit; - } - - // `_castCommit()` ensures that the caller owns the vote - _castCommit(_coreDisputeID, _voteIDs, _commit); - emit CommitCastShutter(_coreDisputeID, msg.sender, _commit, _recoveryCommit, _identity, _encryptedVote); - } - - function castVoteShutter( - uint256 _coreDisputeID, - uint256[] calldata _voteIDs, - uint256 _choice, - uint256 _salt, - string memory _justification - ) external { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - address juror = dispute.rounds[dispute.rounds.length - 1].votes[_voteIDs[0]].account; - - callerIsJuror = juror == msg.sender; - - // `_castVote()` ensures that all the `_voteIDs` do belong to `juror` - _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, juror); - - callerIsJuror = false; - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /** - * @dev Computes the hash of a vote using ABI encoding - * @param _choice The choice being voted for - * @param _justification The justification for the vote - * @param _salt A random salt for commitment - * @return bytes32 The hash of the encoded vote parameters - */ - function hashVote( - uint256 _choice, - uint256 _salt, - string memory _justification - ) public view override returns (bytes32) { - if (callerIsJuror) { - // Caller is the juror, hash without `_justification` to facilitate recovery. - return keccak256(abi.encodePacked(_choice, _salt)); - } else { - // Caller is not the juror, hash with `_justification`. - bytes32 justificationHash = keccak256(bytes(_justification)); - return keccak256(abi.encode(_choice, _salt, justificationHash)); - } - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Returns the expected vote hash for a given vote. - /// @param _localDisputeID The ID of the dispute in the Dispute Kit. - /// @param _localRoundID The ID of the round in the Dispute Kit. - /// @param _voteID The ID of the vote. - /// @return The expected vote hash. - function _getExpectedVoteHash( - uint256 _localDisputeID, - uint256 _localRoundID, - uint256 _voteID - ) internal view override returns (bytes32) { - if (callerIsJuror) { - return recoveryCommitments[_localDisputeID][_localRoundID][_voteID]; - } else { - return disputes[_localDisputeID].rounds[_localRoundID].votes[_voteID].commit; - } - } - - /// @dev Extracts token gating information from the extra data. - /// @param _extraData The extra data bytes array with the following encoding: - /// - bytes 0-31: uint96 courtID, not used here - /// - bytes 32-63: uint256 minJurors, not used here - /// - bytes 64-95: uint256 disputeKitID, not used here - /// - bytes 96-127: uint256 packedTokenGateAndFlag (address tokenGate in bits 0-159, bool isERC1155 in bit 160) - /// - bytes 128-159: uint256 tokenId - /// @return tokenGate The address of the token contract used for gating access. - /// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721. - /// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721). - function _extraDataToTokenInfo( - bytes memory _extraData - ) internal pure returns (address tokenGate, bool isERC1155, uint256 tokenId) { - // Need at least 160 bytes to safely read the parameters - if (_extraData.length < 160) return (address(0), false, 0); - - assembly { - // solium-disable-line security/no-inline-assembly - let packedTokenGateIsERC1155 := mload(add(_extraData, 0x80)) // 4th parameter at offset 128 - tokenId := mload(add(_extraData, 0xA0)) // 5th parameter at offset 160 (moved up) - - // Unpack address from lower 160 bits and bool from bit 160 - tokenGate := and(packedTokenGateIsERC1155, 0xffffffffffffffffffffffffffffffffffffffff) - isERC1155 := and(shr(160, packedTokenGateIsERC1155), 1) - } - } - - /// @inheritdoc DisputeKitClassicBase - function _postDrawCheck( - Round storage _round, - uint256 _coreDisputeID, - address _juror - ) internal view override returns (bool) { - if (!super._postDrawCheck(_round, _coreDisputeID, _juror)) return false; - - // Get the local dispute and extract token info from extraData - uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID]; - Dispute storage dispute = disputes[localDisputeID]; - (address tokenGate, bool isERC1155, uint256 tokenId) = _extraDataToTokenInfo(dispute.extraData); - - // If no token gate is specified, allow all jurors - if (tokenGate == address(0)) return true; - - // Check juror's token balance - if (isERC1155) { - return IBalanceHolderERC1155(tokenGate).balanceOf(_juror, tokenId) > 0; - } else { - return IBalanceHolder(tokenGate).balanceOf(_juror) > 0; - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error EmptyRecoveryCommit(); -} diff --git a/contracts/src/arbitration/dispute-kits/DisputeKitShutter.sol b/contracts/src/arbitration/dispute-kits/DisputeKitShutter.sol deleted file mode 100644 index bbcb28b24..000000000 --- a/contracts/src/arbitration/dispute-kits/DisputeKitShutter.sol +++ /dev/null @@ -1,189 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.28; - -import {DisputeKitClassicBase, KlerosCore} from "./DisputeKitClassicBase.sol"; - -/// @title DisputeKitShutter -/// Added functionality: shielded voting. -/// Dispute kit implementation of the Kleros v1 features including: -/// - a drawing system: proportional to staked PNK, -/// - a vote aggregation system: plurality, -/// - an incentive system: equal split between coherent votes, -/// - an appeal system: fund 2 choices only, vote on any choice. -contract DisputeKitShutter is DisputeKitClassicBase { - string public constant override version = "2.0.0"; - - // ************************************* // - // * Storage * // - // ************************************* // - - mapping(uint256 localDisputeID => mapping(uint256 localRoundID => mapping(uint256 voteID => bytes32 recoveryCommitment))) - public recoveryCommitments; - - // ************************************* // - // * Transient Storage * // - // ************************************* // - - bool transient callerIsJuror; - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev Emitted when a vote is cast. - /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _juror The address of the juror casting the vote commitment. - /// @param _commit The commitment hash. - /// @param _recoveryCommit The commitment hash without the justification. - /// @param _identity The Shutter identity used for encryption. - /// @param _encryptedVote The Shutter encrypted vote. - event CommitCastShutter( - uint256 indexed _coreDisputeID, - address indexed _juror, - bytes32 indexed _commit, - bytes32 _recoveryCommit, - bytes32 _identity, - bytes _encryptedVote - ); - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer. - /// @param _owner The owner's address. - /// @param _core The KlerosCore arbitrator. - /// @param _wNative The wrapped native token address, typically wETH. - /// @param _jumpDisputeKitID The ID of the dispute kit to switch to after the court jump. - function initialize( - address _owner, - KlerosCore _core, - address _wNative, - uint256 _jumpDisputeKitID - ) external initializer { - __DisputeKitClassicBase_initialize(_owner, _core, _wNative, _jumpDisputeKitID); - } - - // ************************ // - // * Governance * // - // ************************ // - - /// @dev Access Control to perform implementation upgrades (UUPS Proxiable) - /// Only the owner can perform upgrades (`onlyByOwner`) - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the - /// commit period, each call overrides the commits of the previous one. - /// `O(n)` where - /// `n` is the number of votes. - /// @param _coreDisputeID The ID of the dispute in Kleros Core. - /// @param _voteIDs The IDs of the votes. - /// @param _commit The commitment hash including the justification. - /// @param _recoveryCommit The commitment hash without the justification. - /// @param _identity The Shutter identity used for encryption. - /// @param _encryptedVote The Shutter encrypted vote. - function castCommitShutter( - uint256 _coreDisputeID, - uint256[] calldata _voteIDs, - bytes32 _commit, - bytes32 _recoveryCommit, - bytes32 _identity, - bytes calldata _encryptedVote - ) external notJumped(_coreDisputeID) { - if (_recoveryCommit == bytes32(0)) revert EmptyRecoveryCommit(); - - uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID]; - Dispute storage dispute = disputes[localDisputeID]; - uint256 localRoundID = dispute.rounds.length - 1; - for (uint256 i = 0; i < _voteIDs.length; i++) { - recoveryCommitments[localDisputeID][localRoundID][_voteIDs[i]] = _recoveryCommit; - } - - // `_castCommit()` ensures that the caller owns the vote - _castCommit(_coreDisputeID, _voteIDs, _commit); - emit CommitCastShutter(_coreDisputeID, msg.sender, _commit, _recoveryCommit, _identity, _encryptedVote); - } - - function castVoteShutter( - uint256 _coreDisputeID, - uint256[] calldata _voteIDs, - uint256 _choice, - uint256 _salt, - string memory _justification - ) external { - Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]]; - address juror = dispute.rounds[dispute.rounds.length - 1].votes[_voteIDs[0]].account; - - callerIsJuror = juror == msg.sender; - - // `_castVote()` ensures that all the `_voteIDs` do belong to `juror` - _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, juror); - - callerIsJuror = false; - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /** - * @dev Computes the hash of a vote using ABI encoding - * @param _choice The choice being voted for - * @param _justification The justification for the vote - * @param _salt A random salt for commitment - * @return bytes32 The hash of the encoded vote parameters - */ - function hashVote( - uint256 _choice, - uint256 _salt, - string memory _justification - ) public view override returns (bytes32) { - if (callerIsJuror) { - // Caller is the juror, hash without `_justification` to facilitate recovery. - return keccak256(abi.encodePacked(_choice, _salt)); - } else { - // Caller is not the juror, hash with `_justification`. - bytes32 justificationHash = keccak256(bytes(_justification)); - return keccak256(abi.encode(_choice, _salt, justificationHash)); - } - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Returns the expected vote hash for a given vote. - /// @param _localDisputeID The ID of the dispute in the Dispute Kit. - /// @param _localRoundID The ID of the round in the Dispute Kit. - /// @param _voteID The ID of the vote. - /// @return The expected vote hash. - function _getExpectedVoteHash( - uint256 _localDisputeID, - uint256 _localRoundID, - uint256 _voteID - ) internal view override returns (bytes32) { - if (callerIsJuror) { - return recoveryCommitments[_localDisputeID][_localRoundID][_voteID]; - } else { - return disputes[_localDisputeID].rounds[_localRoundID].votes[_voteID].commit; - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error EmptyRecoveryCommit(); -} diff --git a/contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol b/contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol deleted file mode 100644 index 10cc67c5c..000000000 --- a/contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {DisputeKitClassicBase, KlerosCore} from "./DisputeKitClassicBase.sol"; - -interface IProofOfHumanity { - /// @dev Return true if the submission is registered and not expired. - /// @param _submissionID The address of the submission. - /// @return Whether the submission is registered or not. - function isRegistered(address _submissionID) external view returns (bool); -} - -/// @title DisputeKitSybilResistant -/// Dispute kit implementation adapted from DisputeKitClassic -/// - a drawing system: at most 1 vote per juror registered on Proof of Humanity, -/// - a vote aggregation system: plurality, -/// - an incentive system: equal split between coherent votes, -/// - an appeal system: fund 2 choices only, vote on any choice. -contract DisputeKitSybilResistant is DisputeKitClassicBase { - string public constant override version = "2.0.0"; - - // ************************************* // - // * Storage * // - // ************************************* // - - IProofOfHumanity public poh; // The Proof of Humanity registry - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer. - /// @param _owner The owner's address. - /// @param _core The KlerosCore arbitrator. - /// @param _poh The Proof of Humanity registry. - /// @param _wNative The wrapped native token address, typically wETH. - /// @param _jumpDisputeKitID The ID of the dispute kit to switch to after the court jump. - function initialize( - address _owner, - KlerosCore _core, - IProofOfHumanity _poh, - address _wNative, - uint256 _jumpDisputeKitID - ) external initializer { - __DisputeKitClassicBase_initialize(_owner, _core, _wNative, _jumpDisputeKitID); - poh = _poh; - singleDrawPerJuror = true; - } - - // ************************ // - // * Governance * // - // ************************ // - - /// @dev Access Control to perform implementation upgrades (UUPS Proxiable) - /// Only the owner can perform upgrades (`onlyByOwner`) - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @inheritdoc DisputeKitClassicBase - function _postDrawCheck( - Round storage _round, - uint256 _coreDisputeID, - address _juror - ) internal view override returns (bool) { - return super._postDrawCheck(_round, _coreDisputeID, _juror) && poh.isRegistered(_juror); - } -} diff --git a/contracts/src/arbitration/evidence/EvidenceModule.sol b/contracts/src/arbitration/evidence/EvidenceModule.sol deleted file mode 100644 index 8321e55ba..000000000 --- a/contracts/src/arbitration/evidence/EvidenceModule.sol +++ /dev/null @@ -1,72 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "../interfaces/IArbitratorV2.sol"; -import "../interfaces/IEvidence.sol"; -import "../../proxy/UUPSProxiable.sol"; -import "../../proxy/Initializable.sol"; - -/// @title Evidence Module -contract EvidenceModule is IEvidence, Initializable, UUPSProxiable { - string public constant override version = "2.0.0"; - - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; // The owner of the contract. - - // ************************************* // - // * Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer. - /// @param _owner The owner's address. - function initialize(address _owner) external initializer { - owner = _owner; - } - - // ************************ // - // * Governance * // - // ************************ // - - /** - * @dev Access Control to perform implementation upgrades (UUPS Proxiable) - * @dev Only the owner can perform upgrades (`onlyByOwner`) - */ - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - /// @dev Submits evidence for a dispute. - /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID. - /// @param _evidence Stringified evidence object, example: '{"name" : "Justification", "description" : "Description", "fileURI" : "/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc"}'. - function submitEvidence(uint256 _externalDisputeID, string calldata _evidence) external { - emit Evidence(_externalDisputeID, msg.sender, _evidence); - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); -} diff --git a/contracts/src/arbitration/evidence/ModeratedEvidenceModule.sol b/contracts/src/arbitration/evidence/ModeratedEvidenceModule.sol deleted file mode 100644 index b2b64a4d3..000000000 --- a/contracts/src/arbitration/evidence/ModeratedEvidenceModule.sol +++ /dev/null @@ -1,449 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -// TODO: standard interfaces should be placed in a separated repo (?) -import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitrableV2.sol"; -import "../interfaces/IDisputeTemplateRegistry.sol"; - -/// @title Implementation of the Evidence Standard with Moderated Submissions -contract ModeratedEvidenceModule is IArbitrableV2 { - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - enum Party { - None, - Submitter, - Moderator - } - - struct EvidenceData { - address payable submitter; // Address that submitted the evidence. - bool disputed; // Whether the evidence submission has been disputed. - Party ruling; // Final status of the evidence. If not disputed, can be changed by opening another round of moderation. - uint256 disputeID; // The ID of the dispute. An evidence submission can only be disputed once. - Moderation[] moderations; // Stores the data of each moderation event. An evidence submission can be moderated many times. - } - - struct Moderation { - uint256[3] paidFees; // Tracks the fees paid by each side in this moderation. - uint256 feeRewards; // Sum of reimbursable fees and stake rewards available to the parties that made contributions to the side that ultimately wins a dispute. - mapping(address contributor => uint256[3]) contributions; // Maps contributors to their contributions for each side. - bool closed; // Moderation happens over a bounded period of time after which it is considered closed. If so, a new moderation round should be opened. - Party currentWinner; // The current winner of this moderation round. - uint256 bondDeadline; // The deadline until which the loser party can stake to overturn the current status. - uint256 arbitratorDataID; // The index of the relevant arbitratorData struct. - } - - struct ArbitratorData { - uint256 disputeTemplateId; // The ID of the dispute template used by the arbitrator. - bytes arbitratorExtraData; // Extra data for the arbitrator. - } - - // ************************************* // - // * Storage * // - // ************************************* // - - uint256 public constant AMOUNT_OF_CHOICES = 2; - uint256 public constant MULTIPLIER_DIVISOR = 10000; // Divisor parameter for multipliers. - mapping(bytes32 evidenceId => EvidenceData) evidences; // Maps the evidence ID to its data. evidences[evidenceID]. - mapping(uint256 => bytes32) public disputeIDtoEvidenceID; // One-to-one relationship between the dispute and the evidence. - ArbitratorData[] public arbitratorDataList; // Stores the arbitrator data of the contract. Updated each time the data is changed. - IArbitratorV2 public immutable arbitrator; // The trusted arbitrator to resolve potential disputes. If it needs to be changed, a new contract can be deployed. - address public owner; // The address that can make governance changes to the parameters of the contract. - IDisputeTemplateRegistry public templateRegistry; // The dispute template registry. - uint256 public bondTimeout; // The time in seconds during which the last moderation status can be challenged. - uint256 public totalCostMultiplier; // Multiplier of arbitration fees that must be ultimately paid as fee stake. In basis points. - uint256 public initialDepositMultiplier; // Multiplier of arbitration fees that must be paid as initial stake for submitting evidence. In basis points. - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyOwner() { - require(msg.sender == owner, "The caller must be the owner"); - _; - } - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev To be raised when a moderated evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations). - /// @param _arbitrator The arbitrator of the contract. - /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID. - /// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party. - /// @param _evidence Stringified evidence object, example: '{"name" : "Justification", "description" : "Description", "fileURI" : "/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc"}'. - event ModeratedEvidence( - IArbitratorV2 indexed _arbitrator, - uint256 indexed _externalDisputeID, - address indexed _party, - string _evidence - ); - - /// @dev Indicate that a party has to pay a fee or would otherwise be considered as losing. - /// @param _evidenceID The ID of the evidence being moderated. - /// @param _currentWinner The party who is currently winning. - event ModerationStatusChanged(bytes32 indexed _evidenceID, Party _currentWinner); - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor. - /// @param _arbitrator The trusted arbitrator to resolve potential disputes. - /// @param _owner The trusted owner of the contract. - /// @param _totalCostMultiplier Multiplier of arbitration fees that must be ultimately paid as fee stake. In basis points. - /// @param _initialDepositMultiplier Multiplier of arbitration fees that must be paid as initial stake for submitting evidence. In basis points. - /// @param _bondTimeout The time in seconds during which the last moderation status can be challenged. - /// @param _arbitratorExtraData Extra data for the trusted arbitrator contract. - /// @param _templateData The dispute template data. - /// @param _templateDataMappings The dispute template data mappings. - constructor( - IArbitratorV2 _arbitrator, - address _owner, - IDisputeTemplateRegistry _templateRegistry, - uint256 _totalCostMultiplier, - uint256 _initialDepositMultiplier, - uint256 _bondTimeout, - bytes memory _arbitratorExtraData, - string memory _templateData, - string memory _templateDataMappings - ) { - arbitrator = _arbitrator; - owner = _owner; - templateRegistry = _templateRegistry; - - totalCostMultiplier = _totalCostMultiplier; // For example 15000, which would provide a 100% reward to the dispute winner. - initialDepositMultiplier = _initialDepositMultiplier; // For example 63, which equals 1/16. - bondTimeout = _bondTimeout; // For example 24 hs. - - ArbitratorData storage arbitratorData = arbitratorDataList.push(); - arbitratorData.arbitratorExtraData = _arbitratorExtraData; - arbitratorData.disputeTemplateId = templateRegistry.setDisputeTemplate( - "", - _templateData, - _templateDataMappings - ); - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Change the owner of the contract. - /// @param _owner The address of the new owner. - function changeOwner(address _owner) external onlyOwner { - owner = _owner; - } - - /// @dev Change the proportion of arbitration fees that must be paid as fee stake by parties when there is no winner or loser (e.g. when the arbitrator refused to rule). - /// @param _initialDepositMultiplier Multiplier of arbitration fees that must be paid as fee stake. In basis points. - function changeInitialDepositMultiplier(uint256 _initialDepositMultiplier) external onlyOwner { - initialDepositMultiplier = _initialDepositMultiplier; - } - - /// @dev Change the proportion of arbitration fees that must be paid as fee stake by the winner of the previous round. - /// @param _totalCostMultiplier Multiplier of arbitration fees that must be paid as fee stake. In basis points. - function changeTotalCostMultiplier(uint256 _totalCostMultiplier) external onlyOwner { - totalCostMultiplier = _totalCostMultiplier; - } - - /// @dev Change the time window within which evidence submissions and removals can be contested. - /// Ongoing moderations will start using the latest bondTimeout available after calling moderate() again. - /// @param _bondTimeout Multiplier of arbitration fees that must be paid as fee stake. In basis points. - function changeBondTimeout(uint256 _bondTimeout) external onlyOwner { - bondTimeout = _bondTimeout; - } - - /// @dev Update the dispute template data. - /// @param _templateData The new dispute template data. - function changeDisputeTemplate( - string calldata _templateData, - string memory _templateDataMappings - ) external onlyOwner { - ArbitratorData storage arbitratorData = arbitratorDataList[arbitratorDataList.length - 1]; - uint256 newDisputeTemplateId = templateRegistry.setDisputeTemplate("", _templateData, _templateDataMappings); - arbitratorDataList.push( - ArbitratorData({ - disputeTemplateId: newDisputeTemplateId, - arbitratorExtraData: arbitratorData.arbitratorExtraData - }) - ); - } - - /// @dev Change the arbitrator to be used for disputes that may be raised in the next requests. The arbitrator is trusted to support appeal period and not reenter. - /// @param _arbitratorExtraData The extra data used by the new arbitrator. - function changeArbitratorExtraData(bytes calldata _arbitratorExtraData) external onlyOwner { - ArbitratorData storage arbitratorData = arbitratorDataList[arbitratorDataList.length - 1]; - arbitratorDataList.push( - ArbitratorData({ - disputeTemplateId: arbitratorData.disputeTemplateId, - arbitratorExtraData: _arbitratorExtraData - }) - ); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Submits evidence. - /// @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to. It's the submitter responsability to submit the right evidence group ID. - /// @param _evidence Stringified evidence object, example: '{"name" : "Justification", "description" : "Description", "fileURI" : "/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc"}'. - function submitEvidence(uint256 _evidenceGroupID, string calldata _evidence) external payable { - // Optimization opportunity: map evidenceID to an incremental index that can be safely assumed to be less than a small uint. - bytes32 evidenceID = keccak256(abi.encodePacked(_evidenceGroupID, _evidence)); - EvidenceData storage evidenceData = evidences[evidenceID]; - require(evidenceData.submitter == address(0x0), "Evidence already submitted."); - evidenceData.submitter = payable(msg.sender); - - ArbitratorData storage arbitratorData = arbitratorDataList[arbitratorDataList.length - 1]; - - uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorData.arbitratorExtraData); - uint256 totalCost = (arbitrationCost * totalCostMultiplier) / MULTIPLIER_DIVISOR; - uint256 depositRequired = (totalCost * initialDepositMultiplier) / MULTIPLIER_DIVISOR; - - Moderation storage moderation = evidenceData.moderations.push(); - // Overpaying is allowed. - contribute(moderation, Party.Submitter, payable(msg.sender), msg.value, totalCost); - require(moderation.paidFees[uint256(Party.Submitter)] >= depositRequired, "Insufficient funding."); - moderation.bondDeadline = block.timestamp + bondTimeout; - moderation.currentWinner = Party.Submitter; - moderation.arbitratorDataID = arbitratorDataList.length - 1; - - // When evidence is submitted for a foreign arbitrable, the arbitrator field of Evidence is ignored. - emit ModeratedEvidence(arbitrator, _evidenceGroupID, msg.sender, _evidence); - } - - /// @dev Moderates an evidence submission. Requires the contester to at least double the accumulated stake of the oposing party. - /// Optimization opportunity: use `bytes calldata args` and compress _evidenceID and _side (only for optimistic rollups). - /// @param _evidenceID Unique identifier of the evidence submission. - /// @param _side The side to contribute to. - function moderate(bytes32 _evidenceID, Party _side) external payable { - EvidenceData storage evidenceData = evidences[_evidenceID]; - require(evidenceData.submitter != address(0x0), "Evidence does not exist."); - require(!evidenceData.disputed, "Evidence already disputed."); - require(_side != Party.None, "Invalid side."); - - Moderation storage moderation = evidenceData.moderations[evidenceData.moderations.length - 1]; - if (moderation.closed) { - // Start another round of moderation. - moderation = evidenceData.moderations.push(); - moderation.arbitratorDataID = arbitratorDataList.length - 1; - } - require(_side != moderation.currentWinner, "Only the current loser can fund."); - require( - block.timestamp < moderation.bondDeadline || moderation.bondDeadline == 0, - "Moderation market is closed." - ); - - ArbitratorData storage arbitratorData = arbitratorDataList[moderation.arbitratorDataID]; - - uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorData.arbitratorExtraData); - uint256 totalCost = (arbitrationCost * totalCostMultiplier) / MULTIPLIER_DIVISOR; - - uint256 opposition = 3 - uint256(_side); - uint256 depositRequired = moderation.paidFees[opposition] * 2; - if (depositRequired == 0) { - depositRequired = (totalCost * initialDepositMultiplier) / MULTIPLIER_DIVISOR; - } else if (depositRequired > totalCost) { - depositRequired = totalCost; - } - - // Overpaying is allowed. - contribute(moderation, _side, payable(msg.sender), msg.value, totalCost); - require(moderation.paidFees[uint256(_side)] >= depositRequired, "Insufficient funding."); - - if (moderation.paidFees[uint256(_side)] >= totalCost && moderation.paidFees[opposition] >= totalCost) { - moderation.feeRewards = moderation.feeRewards - arbitrationCost; - - evidenceData.disputeID = arbitrator.createDispute{value: arbitrationCost}( - AMOUNT_OF_CHOICES, - arbitratorData.arbitratorExtraData - ); - disputeIDtoEvidenceID[evidenceData.disputeID] = _evidenceID; - - emit DisputeRequest( - arbitrator, - evidenceData.disputeID, - uint256(_evidenceID), - arbitratorData.disputeTemplateId, - "" - ); - evidenceData.disputed = true; - moderation.bondDeadline = 0; - moderation.currentWinner = Party.None; - } else { - moderation.bondDeadline = block.timestamp + bondTimeout; - moderation.currentWinner = _side; - } - emit ModerationStatusChanged(_evidenceID, moderation.currentWinner); - } - - /// @dev Resolves a moderation event once the timeout has passed. - /// @param _evidenceID Unique identifier of the evidence submission. - function resolveModerationMarket(bytes32 _evidenceID) external { - // Moderation market resolutions are not final. - // Evidence can be reported/accepted again in the future. - // Only an arbitrator's ruling after a dispute is final. - EvidenceData storage evidenceData = evidences[_evidenceID]; - Moderation storage moderation = evidenceData.moderations[evidenceData.moderations.length - 1]; - - require(!evidenceData.disputed, "Evidence already disputed."); - require(block.timestamp > moderation.bondDeadline, "Moderation still ongoing."); - - moderation.closed = true; - evidenceData.ruling = moderation.currentWinner; - } - - /// @dev Make a fee contribution. - /// @param _moderation The moderation to contribute to. - /// @param _side The side to contribute to. - /// @param _contributor The contributor. - /// @param _amount The amount contributed. - /// @param _totalRequired The total amount required for this side. - /// @return The amount of fees contributed. - function contribute( - Moderation storage _moderation, - Party _side, - address payable _contributor, - uint256 _amount, - uint256 _totalRequired - ) internal returns (uint256) { - uint256 contribution; - uint256 remainingETH; - uint256 requiredAmount = _moderation.paidFees[uint256(_side)] >= _totalRequired - ? 0 - : _totalRequired - _moderation.paidFees[uint256(_side)]; - (contribution, remainingETH) = calculateContribution(_amount, requiredAmount); - _moderation.contributions[_contributor][uint256(_side)] += contribution; - _moderation.paidFees[uint256(_side)] += contribution; - _moderation.feeRewards += contribution; - - if (remainingETH != 0) _contributor.send(remainingETH); - - return contribution; - } - - /// @dev Returns the contribution value and remainder from available ETH and required amount. - /// @param _available The amount of ETH available for the contribution. - /// @param _requiredAmount The amount of ETH required for the contribution. - /// @return taken The amount of ETH taken. - /// @return remainder The amount of ETH left from the contribution. - function calculateContribution( - uint256 _available, - uint256 _requiredAmount - ) internal pure returns (uint256 taken, uint256 remainder) { - if (_requiredAmount > _available) return (_available, 0); // Take whatever is available, return 0 as leftover ETH. - - remainder = _available - _requiredAmount; - return (_requiredAmount, remainder); - } - - /// @dev Withdraws contributions of moderations. Reimburses contributions if the appeal was not fully funded. - /// If the appeal was fully funded, sends the fee stake rewards and reimbursements proportional to the contributions made to the winner of a dispute. - /// Optimization opportunity: use `bytes calldata args` and compress _evidenceID and _moderationID (only for optimistic rollups). - /// @param _beneficiary The address that made contributions. - /// @param _evidenceID The ID of the associated evidence submission. - /// @param _moderationID The ID of the moderatino occurence. - function withdrawFeesAndRewards( - address payable _beneficiary, - bytes32 _evidenceID, - uint256 _moderationID - ) external returns (uint256 reward) { - EvidenceData storage evidenceData = evidences[_evidenceID]; - Moderation storage moderation = evidenceData.moderations[_moderationID]; - require(moderation.closed, "Moderation must be closed."); - - uint256[3] storage contributionTo = moderation.contributions[_beneficiary]; - - if (evidenceData.ruling == Party.None) { - // Reimburse unspent fees proportionally if there is no winner and loser. - uint256 totalFeesPaid = moderation.paidFees[uint256(Party.Submitter)] + - moderation.paidFees[uint256(Party.Moderator)]; - uint256 totalBeneficiaryContributions = contributionTo[uint256(Party.Submitter)] + - contributionTo[uint256(Party.Moderator)]; - reward = totalFeesPaid > 0 ? (totalBeneficiaryContributions * moderation.feeRewards) / totalFeesPaid : 0; - } else { - // Reward the winner. - uint256 paidFees = moderation.paidFees[uint256(evidenceData.ruling)]; - reward = paidFees > 0 - ? (contributionTo[uint256(evidenceData.ruling)] * moderation.feeRewards) / paidFees - : 0; - } - contributionTo[uint256(Party.Submitter)] = 0; - contributionTo[uint256(Party.Moderator)] = 0; - - _beneficiary.send(reward); // It is the user responsibility to accept ETH. - } - - /// @dev Give a ruling for a dispute. Must be called by the arbitrator to enforce the final ruling. - /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract. - /// @param _disputeID ID of the dispute in the Arbitrator contract. - /// @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for "Not able/wanting to make a decision". - function rule(uint256 _disputeID, uint256 _ruling) public override { - bytes32 evidenceID = disputeIDtoEvidenceID[_disputeID]; - EvidenceData storage evidenceData = evidences[evidenceID]; - Moderation storage moderation = evidenceData.moderations[evidenceData.moderations.length - 1]; - require( - evidenceData.disputed && - !moderation.closed && - msg.sender == address(arbitrator) && - _ruling <= AMOUNT_OF_CHOICES, - "Ruling can't be processed." - ); - - evidenceData.ruling = Party(_ruling); - moderation.closed = true; - - emit Ruling(arbitrator, _disputeID, _ruling); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Gets the number of moderation events of the specific evidence submission. - /// @param _evidenceID The ID of the evidence submission. - /// @return The number of moderations. - function getNumberOfModerations(bytes32 _evidenceID) external view returns (uint256) { - EvidenceData storage evidenceData = evidences[_evidenceID]; - return evidenceData.moderations.length; - } - - /// @dev Gets the contributions made by a party for a given moderation. - /// @param _evidenceID The ID of the evidence submission. - /// @param _moderationID The ID of the moderation occurence. - /// @param _contributor The address of the contributor. - /// @return contributions The contributions. - function getContributions( - bytes32 _evidenceID, - uint256 _moderationID, - address _contributor - ) external view returns (uint256[3] memory contributions) { - EvidenceData storage evidenceData = evidences[_evidenceID]; - Moderation storage moderation = evidenceData.moderations[_moderationID]; - contributions = moderation.contributions[_contributor]; - } - - /// @dev Gets the information of a moderation event. - /// @param _evidenceID The ID of the evidence submission. - /// @param _moderationID The ID of the moderation occurence. - /// @return paidFees currentWinner feeRewards The moderation information. - function getModerationInfo( - bytes32 _evidenceID, - uint256 _moderationID - ) external view returns (uint256[3] memory paidFees, Party currentWinner, uint256 feeRewards) { - EvidenceData storage evidenceData = evidences[_evidenceID]; - Moderation storage moderation = evidenceData.moderations[_moderationID]; - return (moderation.paidFees, moderation.currentWinner, moderation.feeRewards); - } - - /// @dev Gets the last arbitrator data index, which is used for current new submissions. - /// @return The last arbitrator data index. - function getCurrentArbitratorIndex() external view returns (uint256) { - return arbitratorDataList.length - 1; - } -} diff --git a/contracts/src/arbitration/interfaces/IArbitrableV2.sol b/contracts/src/arbitration/interfaces/IArbitrableV2.sol deleted file mode 100644 index 22dac6e4a..000000000 --- a/contracts/src/arbitration/interfaces/IArbitrableV2.sol +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -import "./IArbitratorV2.sol"; - -/// @title IArbitrableV2 -/// @notice Arbitrable interface. -/// @dev When developing arbitrable contracts, we need to: -/// - Define the action taken when a ruling is received by the contract. -/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData); -interface IArbitrableV2 { - /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID. - /// @param _arbitrator The arbitrator of the contract. - /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration. - /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri. - /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId. - event DisputeRequest( - IArbitratorV2 indexed _arbitrator, - uint256 indexed _arbitratorDisputeID, - uint256 _externalDisputeID, - uint256 _templateId, - string _templateUri - ); - - /// @dev To be raised when a ruling is given. - /// @param _arbitrator The arbitrator giving the ruling. - /// @param _disputeID The identifier of the dispute in the Arbitrator contract. - /// @param _ruling The ruling which was given. - event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling); - - /// @dev Give a ruling for a dispute. - /// Must be called by the arbitrator. - /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract. - /// @param _disputeID The identifier of the dispute in the Arbitrator contract. - /// @param _ruling Ruling given by the arbitrator. - /// Note that 0 is reserved for "Not able/wanting to make a decision". - function rule(uint256 _disputeID, uint256 _ruling) external; -} diff --git a/contracts/src/arbitration/interfaces/IArbitratorV2.sol b/contracts/src/arbitration/interfaces/IArbitratorV2.sol deleted file mode 100644 index 9559c81b3..000000000 --- a/contracts/src/arbitration/interfaces/IArbitratorV2.sol +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "./IArbitrableV2.sol"; - -/// @title Arbitrator -/// Arbitrator interface that implements the new arbitration standard. -/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most. -/// When developing arbitrator contracts we need to: -/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes). -/// - Define the functions for cost display (arbitrationCost). -/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling). -interface IArbitratorV2 { - /// @dev To be emitted when a dispute is created. - /// @param _disputeID The identifier of the dispute in the Arbitrator contract. - /// @param _arbitrable The contract which created the dispute. - event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable); - - /// @dev To be raised when a ruling is given. - /// @param _arbitrable The arbitrable receiving the ruling. - /// @param _disputeID The identifier of the dispute in the Arbitrator contract. - /// @param _ruling The ruling which was given. - event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling); - - /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees. - /// @param _token The ERC20 token. - /// @param _accepted Whether the token is accepted or not. - event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted); - - /// @dev To be emitted when the fee for a particular ERC20 token is updated. - /// @param _feeToken The ERC20 token. - /// @param _rateInEth The new rate of the fee token in ETH. - /// @param _rateDecimals The new decimals of the fee token rate. - event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals); - - /// @dev Create a dispute and pay for the fees in the native currency, typically ETH. - /// Must be called by the arbitrable contract. - /// Must pay at least arbitrationCost(_extraData). - /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @return disputeID The identifier of the dispute created. - function createDispute( - uint256 _numberOfChoices, - bytes calldata _extraData - ) external payable returns (uint256 disputeID); - - /// @dev Create a dispute and pay for the fees in a supported ERC20 token. - /// Must be called by the arbitrable contract. - /// Must pay at least arbitrationCost(_extraData). - /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @param _feeToken The ERC20 token used to pay fees. - /// @param _feeAmount Amount of the ERC20 token used to pay fees. - /// @return disputeID The identifier of the dispute created. - function createDispute( - uint256 _numberOfChoices, - bytes calldata _extraData, - IERC20 _feeToken, - uint256 _feeAmount - ) external returns (uint256 disputeID); - - /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH. - /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @return cost The arbitration cost in ETH. - function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost); - - /// @dev Compute the cost of arbitration denominated in `_feeToken`. - /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @param _feeToken The ERC20 token used to pay fees. - /// @return cost The arbitration cost in `_feeToken`. - function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost); - - /// @dev Gets the current ruling of a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @return ruling The current ruling. - /// @return tied Whether it's a tie or not. - /// @return overridden Whether the ruling was overridden by appeal funding or not. - function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden); -} diff --git a/contracts/src/arbitration/interfaces/IDisputeKit.sol b/contracts/src/arbitration/interfaces/IDisputeKit.sol deleted file mode 100644 index 90fbbd727..000000000 --- a/contracts/src/arbitration/interfaces/IDisputeKit.sol +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -import "./IArbitratorV2.sol"; - -/// @title IDisputeKit -/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore. -/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters. -interface IDisputeKit { - // ************************************ // - // * Events * // - // ************************************ // - - /// @dev Emitted when casting a vote to provide the justification of juror's choice. - /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _juror Address of the juror. - /// @param _voteIDs The identifiers of the votes in the dispute. - /// @param _choice The choice juror voted for. - /// @param _justification Justification of the choice. - event VoteCast( - uint256 indexed _coreDisputeID, - address indexed _juror, - uint256[] _voteIDs, - uint256 indexed _choice, - string _justification - ); - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract. - /// Note: Access restricted to Kleros Core only. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _numberOfChoices Number of choices of the dispute - /// @param _extraData Additional info about the dispute, for possible use in future dispute kits. - /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count. - function createDispute( - uint256 _coreDisputeID, - uint256 _numberOfChoices, - bytes calldata _extraData, - uint256 _nbVotes - ) external; - - /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. - /// Note: Access restricted to Kleros Core only. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _nonce Nonce. - /// @return drawnAddress The drawn address. - function draw( - uint256 _coreDisputeID, - uint256 _nonce - ) external returns (address drawnAddress, uint96 fromSubcourtID); - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Gets the current ruling of a specified dispute. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @return ruling The current ruling. - /// @return tied Whether it's a tie or not. - /// @return overridden Whether the ruling was overridden by appeal funding or not. - function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden); - - /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit. - /// @param _voteID The ID of the vote. - /// @param _feePerJuror The fee per juror. - /// @param _pnkAtStakePerJuror The PNK at stake per juror. - /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward. - /// @return feeCoherence The degree of coherence in basis points for the dispute fee reward. - function getDegreeOfCoherenceReward( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _voteID, - uint256 _feePerJuror, - uint256 _pnkAtStakePerJuror - ) external view returns (uint256 pnkCoherence, uint256 feeCoherence); - - /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the penalty. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit. - /// @param _voteID The ID of the vote. - /// @param _feePerJuror The fee per juror. - /// @param _pnkAtStakePerJuror The PNK at stake per juror. - /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward. - function getDegreeOfCoherencePenalty( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _voteID, - uint256 _feePerJuror, - uint256 _pnkAtStakePerJuror - ) external view returns (uint256 pnkCoherence); - - /// @dev Gets the number of jurors who are eligible to a reward in this round. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit. - /// @return The number of coherent jurors. - function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256); - - /// @dev Returns true if all of the jurors have cast their commits for the last round. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @return Whether all of the jurors have cast their commits for the last round. - function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool); - - /// @dev Returns true if all of the jurors have cast their votes for the last round. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @return Whether all of the jurors have cast their votes for the last round. - function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool); - - /// @dev Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund). - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @return Whether the appeal funding is finished. - function isAppealFunded(uint256 _coreDisputeID) external view returns (bool); - - /// @dev Returns true if the dispute is jumping to a parent court. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @return Whether the dispute is jumping to a parent court or not. - function earlyCourtJump(uint256 _coreDisputeID) external view returns (bool); - - /// @dev Returns the number of votes after the appeal. - /// @param _previousDisputeKit The previous Dispute Kit. - /// @param _currentNbVotes The number of votes before the appeal. - /// @return The number of votes after the appeal. - function getNbVotesAfterAppeal( - IDisputeKit _previousDisputeKit, - uint256 _currentNbVotes - ) external view returns (uint256); // TODO: remove previousDisputeKit - - /// @dev Returns the dispute kid ID be used after court jump by Kleros Core. - /// @return The ID of the dispute kit in Kleros Core disputeKits array. - function getJumpDisputeKitID() external view returns (uint256); - - /// @dev Returns true if the specified voter was active in this round. - /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit. - /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit. - /// @param _voteID The ID of the voter. - /// @return Whether the voter was active or not. - function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool); - - function getRoundInfo( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _choice - ) - external - view - returns ( - uint256 winningChoice, - bool tied, - uint256 totalVoted, - uint256 totalCommited, - uint256 nbVoters, - uint256 choiceCount - ); - - function getVoteInfo( - uint256 _coreDisputeID, - uint256 _coreRoundID, - uint256 _voteID - ) external view returns (address account, bytes32 commit, uint256 choice, bool voted); -} diff --git a/contracts/src/arbitration/interfaces/IDisputeTemplateRegistry.sol b/contracts/src/arbitration/interfaces/IDisputeTemplateRegistry.sol deleted file mode 100644 index 23e09f8d5..000000000 --- a/contracts/src/arbitration/interfaces/IDisputeTemplateRegistry.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -/// @title IDisputeTemplate -/// @notice Dispute Template interface. -interface IDisputeTemplateRegistry { - /// @dev To be emitted when a new dispute template is created. - /// @param _templateId The identifier of the dispute template. - /// @param _templateTag An optional tag for the dispute template, such as "registration" or "removal". - /// @param _templateData The template data. - /// @param _templateDataMappings The data mappings. - event DisputeTemplate( - uint256 indexed _templateId, - string indexed _templateTag, - string _templateData, - string _templateDataMappings - ); - - function setDisputeTemplate( - string memory _templateTag, - string memory _templateData, - string memory _templateDataMappings - ) external returns (uint256 templateId); -} diff --git a/contracts/src/arbitration/interfaces/IEvidence.sol b/contracts/src/arbitration/interfaces/IEvidence.sol deleted file mode 100644 index a7683186a..000000000 --- a/contracts/src/arbitration/interfaces/IEvidence.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -/// @title IEvidence -interface IEvidence { - /// @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations). - /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID. - /// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party. - /// @param _evidence Stringified evidence object, example: '{"name" : "Justification", "description" : "Description", "fileURI" : "/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc"}'. - event Evidence(uint256 indexed _externalDisputeID, address indexed _party, string _evidence); -} diff --git a/contracts/src/arbitration/interfaces/ISortitionModule.sol b/contracts/src/arbitration/interfaces/ISortitionModule.sol deleted file mode 100644 index d9fe7e485..000000000 --- a/contracts/src/arbitration/interfaces/ISortitionModule.sol +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -import "../../libraries/Constants.sol"; - -interface ISortitionModule { - enum Phase { - staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors. - generating, // Waiting for a random number. Pass as soon as it is ready. - drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes. - } - - event NewPhase(Phase _phase); - - function createTree(uint96 _courtID, bytes memory _extraData) external; - - function validateStake( - address _account, - uint96 _courtID, - uint256 _newStake, - bool _noDelay - ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult); - - function setStake( - address _account, - uint96 _courtID, - uint256 _pnkDeposit, - uint256 _pnkWithdrawal, - uint256 _newStake - ) external; - - function setStakePenalty( - address _account, - uint96 _courtID, - uint256 _penalty - ) external returns (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty); - - function setStakeReward(address _account, uint96 _courtID, uint256 _reward) external returns (bool success); - - function forcedUnstakeAllCourts(address _account) external; - - function forcedUnstake(address _account, uint96 _courtID) external; - - function lockStake(address _account, uint256 _relativeAmount) external; - - function unlockStake(address _account, uint256 _relativeAmount) external; - - function notifyRandomNumber(uint256 _drawnNumber) external; - - function draw( - uint96 _courtID, - uint256 _coreDisputeID, - uint256 _nonce - ) external view returns (address drawnAddress, uint96 fromSubcourtID); - - function getJurorBalance( - address _juror, - uint96 _courtID - ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts); - - function getJurorCourtIDs(address _juror) external view returns (uint96[] memory); - - function isJurorStaked(address _juror) external view returns (bool); - - function getJurorLeftoverPNK(address _juror) external view returns (uint256); - - function createDisputeHook(uint256 _disputeID, uint256 _roundID) external; - - function postDrawHook(uint256 _disputeID, uint256 _roundID) external; - - function withdrawLeftoverPNK(address _account) external; -} diff --git a/contracts/src/arbitration/university/ISortitionModuleUniversity.sol b/contracts/src/arbitration/university/ISortitionModuleUniversity.sol deleted file mode 100644 index 474dd0af9..000000000 --- a/contracts/src/arbitration/university/ISortitionModuleUniversity.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {ISortitionModule} from "../interfaces/ISortitionModule.sol"; - -interface ISortitionModuleUniversity is ISortitionModule { - function setTransientJuror(address _juror) external; -} diff --git a/contracts/src/arbitration/university/KlerosCoreUniversity.sol b/contracts/src/arbitration/university/KlerosCoreUniversity.sol deleted file mode 100644 index afe7fc4d4..000000000 --- a/contracts/src/arbitration/university/KlerosCoreUniversity.sol +++ /dev/null @@ -1,1212 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitratorV2.sol"; -import {IDisputeKit} from "../interfaces/IDisputeKit.sol"; -import {ISortitionModuleUniversity} from "./ISortitionModuleUniversity.sol"; -import {SafeERC20, IERC20} from "../../libraries/SafeERC20.sol"; -import {UUPSProxiable} from "../../proxy/UUPSProxiable.sol"; -import {Initializable} from "../../proxy/Initializable.sol"; -import "../../libraries/Constants.sol"; - -/// @title KlerosCoreUniversity -/// Core arbitrator contract for educational purposes. -contract KlerosCoreUniversity is IArbitratorV2, UUPSProxiable, Initializable { - using SafeERC20 for IERC20; - - string public constant override version = "2.0.0"; - - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - enum Period { - evidence, // Evidence can be submitted. This is also when drawing has to take place. - commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes. - vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not. - appeal, // The dispute can be appealed. - execution // Tokens are redistributed and the ruling is executed. - } - - struct Court { - uint96 parent; // The parent court. - bool hiddenVotes; // Whether to use commit and reveal or not. - uint256[] children; // List of child courts. - uint256 minStake; // Minimum PNKs needed to stake in the court. - uint256 alpha; // Basis point of PNKs that are lost when incoherent. - uint256 feeForJuror; // Arbitration fee paid per juror. - uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any. - uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`. - mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit. - bool disabled; // True if the court is disabled. Unused for now, will be implemented later. - } - - struct Dispute { - uint96 courtID; // The ID of the court the dispute is in. - IArbitrableV2 arbitrated; // The arbitrable contract. - Period period; // The current period of the dispute. - bool ruled; // True if the ruling has been executed, false otherwise. - uint256 lastPeriodChange; // The last time the period was changed. - Round[] rounds; - } - - struct Round { - uint256 disputeKitID; // Index of the dispute kit in the array. - uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round. - uint256 totalFeesForJurors; // The total juror fees paid in this round. - uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length. - uint256 repartitions; // A counter of reward repartitions made in this round. - uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round. - address[] drawnJurors; // Addresses of the jurors that were drawn in this round. - uint96[] drawnJurorFromCourtIDs; // The courtIDs where the juror was drawn from, possibly their stake in a subcourt. - uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round. - uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round. - IERC20 feeToken; // The token used for paying fees in this round. - uint256 drawIterations; // The number of iterations passed drawing the jurors for this round. - } - - // Workaround "stack too deep" errors - struct ExecuteParams { - uint256 disputeID; // The ID of the dispute to execute. - uint256 round; // The round to execute. - uint256 coherentCount; // The number of coherent votes in the round. - uint256 numberOfVotesInRound; // The number of votes in the round. - uint256 feePerJurorInRound; // The fee per juror in the round. - uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round. - uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round. - uint256 repartition; // The index of the repartition to execute. - } - - struct CurrencyRate { - bool feePaymentAccepted; - uint64 rateInEth; - uint8 rateDecimals; - } - - // ************************************* // - // * Storage * // - // ************************************* // - - uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH. - - address public owner; // The owner of the contract. - address public instructor; // The instructor who is allowed to choose the jurors. - IERC20 public pinakion; // The Pinakion token contract. - address public jurorProsecutionModule; // The module for juror's prosecution. - ISortitionModuleUniversity public sortitionModule; // Sortition module for drawing. - Court[] public courts; // The courts. - IDisputeKit[] public disputeKits; // Array of dispute kits. - Dispute[] public disputes; // The disputes. - mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH. - - // ************************************* // - // * Events * // - // ************************************* // - - event NewPeriod(uint256 indexed _disputeID, Period _period); - event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable); - event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable); - event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID); - event CourtCreated( - uint96 indexed _courtID, - uint96 indexed _parent, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] _timesPerPeriod, - uint256[] _supportedDisputeKits - ); - event CourtModified( - uint96 indexed _courtID, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] _timesPerPeriod - ); - event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress); - event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable); - event CourtJump( - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint96 indexed _fromCourtID, - uint96 _toCourtID - ); - event DisputeKitJump( - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint256 indexed _fromDisputeKitID, - uint256 _toDisputeKitID - ); - event TokenAndETHShift( - address indexed _account, - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint256 _degreeOfCoherency, - int256 _pnkAmount, - int256 _feeAmount, - IERC20 _feeToken - ); - event LeftoverRewardSent( - uint256 indexed _disputeID, - uint256 indexed _roundID, - uint256 _pnkAmount, - uint256 _feeAmount, - IERC20 _feeToken - ); - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - modifier onlyByInstructor() { - if (instructor != msg.sender) revert InstructorOnly(); - _; - } - - modifier onlyByOwnerOrInstructor() { - if (msg.sender != owner && msg.sender != instructor) revert OwnerOrInstructorOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer (constructor equivalent for upgradable contracts). - /// @param _owner The owner's address. - /// @param _instructor The address of the instructor. - /// @param _pinakion The address of the token contract. - /// @param _jurorProsecutionModule The address of the juror prosecution module. - /// @param _disputeKit The address of the default dispute kit. - /// @param _hiddenVotes The `hiddenVotes` property value of the general court. - /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively). - /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court. - /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors. - function initialize( - address _owner, - address _instructor, - IERC20 _pinakion, - address _jurorProsecutionModule, - IDisputeKit _disputeKit, - bool _hiddenVotes, - uint256[4] memory _courtParameters, - uint256[4] memory _timesPerPeriod, - ISortitionModuleUniversity _sortitionModuleAddress - ) external initializer { - owner = _owner; - instructor = _instructor; - pinakion = _pinakion; - jurorProsecutionModule = _jurorProsecutionModule; - sortitionModule = _sortitionModuleAddress; - - // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported. - disputeKits.push(); - - // DISPUTE_KIT_CLASSIC - disputeKits.push(_disputeKit); - - emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit); - - // FORKING_COURT - // TODO: Fill the properties for the Forking court, emit CourtCreated. - courts.push(); - - // GENERAL_COURT - Court storage court = courts.push(); - court.parent = FORKING_COURT; - court.children = new uint256[](0); - court.hiddenVotes = _hiddenVotes; - court.minStake = _courtParameters[0]; - court.alpha = _courtParameters[1]; - court.feeForJuror = _courtParameters[2]; - court.jurorsForCourtJump = _courtParameters[3]; - court.timesPerPeriod = _timesPerPeriod; - - emit CourtCreated( - GENERAL_COURT, - court.parent, - _hiddenVotes, - _courtParameters[0], - _courtParameters[1], - _courtParameters[2], - _courtParameters[3], - _timesPerPeriod, - new uint256[](0) - ); - _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true); - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /* @dev Access Control to perform implementation upgrades (UUPS Proxiable) - * @dev Only the owner can perform upgrades (`onlyByOwner`) - */ - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - /// @dev Allows the owner to call anything on behalf of the contract. - /// @param _destination The destination of the call. - /// @param _amount The value sent with the call. - /// @param _data The data sent with the call. - function executeOwnerProposal(address _destination, uint256 _amount, bytes memory _data) external onlyByOwner { - (bool success, ) = _destination.call{value: _amount}(_data); - if (!success) revert UnsuccessfulCall(); - } - - /// @dev Changes the `owner` storage variable. - /// @param _owner The new value for the `owner` storage variable. - function changeOwner(address payable _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the `instructor` storage variable. - /// @param _instructor The new value for the `instructor` storage variable. - function changeInstructor(address _instructor) external onlyByOwnerOrInstructor { - instructor = _instructor; - } - - /// @dev Changes the `pinakion` storage variable. - /// @param _pinakion The new value for the `pinakion` storage variable. - function changePinakion(IERC20 _pinakion) external onlyByOwner { - pinakion = _pinakion; - } - - /// @dev Changes the `jurorProsecutionModule` storage variable. - /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable. - function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByOwner { - jurorProsecutionModule = _jurorProsecutionModule; - } - - /// @dev Changes the `_sortitionModule` storage variable. - /// Note that the new module should be initialized for all courts. - /// @param _sortitionModule The new value for the `sortitionModule` storage variable. - function changeSortitionModule(ISortitionModuleUniversity _sortitionModule) external onlyByOwner { - sortitionModule = _sortitionModule; - } - - /// @dev Add a new supported dispute kit module to the court. - /// @param _disputeKitAddress The address of the dispute kit contract. - function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByOwner { - uint256 disputeKitID = disputeKits.length; - disputeKits.push(_disputeKitAddress); - emit DisputeKitCreated(disputeKitID, _disputeKitAddress); - } - - /// @dev Creates a court under a specified parent court. - /// @param _parent The `parent` property value of the court. - /// @param _hiddenVotes The `hiddenVotes` property value of the court. - /// @param _minStake The `minStake` property value of the court. - /// @param _alpha The `alpha` property value of the court. - /// @param _feeForJuror The `feeForJuror` property value of the court. - /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court. - /// @param _timesPerPeriod The `timesPerPeriod` property value of the court. - /// @param _supportedDisputeKits Indexes of dispute kits that this court will support. - function createCourt( - uint96 _parent, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] memory _timesPerPeriod, - uint256[] memory _supportedDisputeKits - ) external onlyByOwner { - if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt(); - if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit(); - if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent(); - - uint256 courtID = courts.length; - Court storage court = courts.push(); - - for (uint256 i = 0; i < _supportedDisputeKits.length; i++) { - if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) { - revert WrongDisputeKitIndex(); - } - court.supportedDisputeKits[_supportedDisputeKits[i]] = true; - } - // Check that Classic DK support was added. - if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic(); - - court.parent = _parent; - court.children = new uint256[](0); - court.hiddenVotes = _hiddenVotes; - court.minStake = _minStake; - court.alpha = _alpha; - court.feeForJuror = _feeForJuror; - court.jurorsForCourtJump = _jurorsForCourtJump; - court.timesPerPeriod = _timesPerPeriod; - - // Update the parent. - courts[_parent].children.push(courtID); - emit CourtCreated( - uint96(courtID), - _parent, - _hiddenVotes, - _minStake, - _alpha, - _feeForJuror, - _jurorsForCourtJump, - _timesPerPeriod, - _supportedDisputeKits - ); - } - - function changeCourtParameters( - uint96 _courtID, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] memory _timesPerPeriod - ) external onlyByOwner { - Court storage court = courts[_courtID]; - if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) { - revert MinStakeLowerThanParentCourt(); - } - for (uint256 i = 0; i < court.children.length; i++) { - if (courts[court.children[i]].minStake < _minStake) { - revert MinStakeLowerThanParentCourt(); - } - } - court.minStake = _minStake; - court.hiddenVotes = _hiddenVotes; - court.alpha = _alpha; - court.feeForJuror = _feeForJuror; - court.jurorsForCourtJump = _jurorsForCourtJump; - court.timesPerPeriod = _timesPerPeriod; - emit CourtModified( - _courtID, - _hiddenVotes, - _minStake, - _alpha, - _feeForJuror, - _jurorsForCourtJump, - _timesPerPeriod - ); - } - - /// @dev Adds/removes court's support for specified dispute kits. - /// @param _courtID The ID of the court. - /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed. - /// @param _enable Whether add or remove the dispute kits from the court. - function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByOwner { - for (uint256 i = 0; i < _disputeKitIDs.length; i++) { - if (_enable) { - if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) { - revert WrongDisputeKitIndex(); - } - _enableDisputeKit(_courtID, _disputeKitIDs[i], true); - } else { - // Classic dispute kit must be supported by all courts. - if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) { - revert CannotDisableClassicDK(); - } - _enableDisputeKit(_courtID, _disputeKitIDs[i], false); - } - } - } - - /// @dev Changes the supported fee tokens. - /// @param _feeToken The fee token. - /// @param _accepted Whether the token is supported or not as a method of fee payment. - function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByOwner { - currencyRates[_feeToken].feePaymentAccepted = _accepted; - emit AcceptedFeeToken(_feeToken, _accepted); - } - - /// @dev Changes the currency rate of a fee token. - /// @param _feeToken The fee token. - /// @param _rateInEth The new rate of the fee token in ETH. - /// @param _rateDecimals The new decimals of the fee token rate. - function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByOwner { - currencyRates[_feeToken].rateInEth = _rateInEth; - currencyRates[_feeToken].rateDecimals = _rateDecimals; - emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Sets the caller's stake in a court. - /// @param _courtID The ID of the court. - /// @param _newStake The new stake. - /// Note that the existing delayed stake will be nullified as non-relevant. - function setStake(uint96 _courtID, uint256 _newStake) external { - _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert); - } - - /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors. - /// @param _account The account whose stake is being set. - /// @param _courtID The ID of the court. - /// @param _newStake The new stake. - function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external { - if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly(); - _setStake(_account, _courtID, _newStake, true, OnError.Return); - } - - /// @dev Transfers PNK to the juror by SortitionModule. - /// @param _account The account of the juror whose PNK to transfer. - /// @param _amount The amount to transfer. - function transferBySortitionModule(address _account, uint256 _amount) external { - if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly(); - // Note eligibility is checked in SortitionModule. - pinakion.safeTransfer(_account, _amount); - } - - /// @inheritdoc IArbitratorV2 - function createDispute( - uint256 _numberOfChoices, - bytes memory _extraData - ) external payable override returns (uint256 disputeID) { - if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough(); - - return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value); - } - - /// @inheritdoc IArbitratorV2 - function createDispute( - uint256 _numberOfChoices, - bytes calldata _extraData, - IERC20 _feeToken, - uint256 _feeAmount - ) external override returns (uint256 disputeID) { - if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted(); - if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough(); - - if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed(); - return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount); - } - - function _createDispute( - uint256 _numberOfChoices, - bytes memory _extraData, - IERC20 _feeToken, - uint256 _feeAmount - ) internal returns (uint256 disputeID) { - (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData); - if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt(); - - disputeID = disputes.length; - Dispute storage dispute = disputes.push(); - dispute.courtID = courtID; - dispute.arbitrated = IArbitrableV2(msg.sender); - dispute.lastPeriodChange = block.timestamp; - - IDisputeKit disputeKit = disputeKits[disputeKitID]; - Court storage court = courts[courtID]; - Round storage round = dispute.rounds.push(); - - // Obtain the feeForJuror in the same currency as the _feeAmount - uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY) - ? court.feeForJuror - : convertEthToTokenAmount(_feeToken, court.feeForJuror); - round.nbVotes = _feeAmount / feeForJuror; - round.disputeKitID = disputeKitID; - round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ONE_BASIS_POINT; - round.totalFeesForJurors = _feeAmount; - round.feeToken = IERC20(_feeToken); - - sortitionModule.createDisputeHook(disputeID, 0); // Default round ID. - - disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes); - emit DisputeCreation(disputeID, IArbitrableV2(msg.sender)); - } - - /// @dev Passes the period of a specified dispute. - /// @param _disputeID The ID of the dispute. - function passPeriod(uint256 _disputeID) external { - Dispute storage dispute = disputes[_disputeID]; - Court storage court = courts[dispute.courtID]; - - uint256 currentRound = dispute.rounds.length - 1; - Round storage round = dispute.rounds[currentRound]; - if (dispute.period == Period.evidence) { - if ( - currentRound == 0 && - block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] - ) { - revert EvidenceNotPassedAndNotAppeal(); - } - if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing(); - dispute.period = court.hiddenVotes ? Period.commit : Period.vote; - } else if (dispute.period == Period.commit) { - if ( - block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] && - !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID) - ) { - revert CommitPeriodNotPassed(); - } - dispute.period = Period.vote; - } else if (dispute.period == Period.vote) { - if ( - block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] && - !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID) - ) { - revert VotePeriodNotPassed(); - } - dispute.period = Period.appeal; - emit AppealPossible(_disputeID, dispute.arbitrated); - } else if (dispute.period == Period.appeal) { - if ( - block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] && - !disputeKits[round.disputeKitID].isAppealFunded(_disputeID) - ) { - revert AppealPeriodNotPassed(); - } - dispute.period = Period.execution; - } else if (dispute.period == Period.execution) { - revert DisputePeriodIsFinal(); - } - - dispute.lastPeriodChange = block.timestamp; - emit NewPeriod(_disputeID, dispute.period); - } - - /// @dev Draws one juror for the dispute until the number votes paid for is reached. - /// @param _disputeID The ID of the dispute. - /// @param _juror The address of the juror to draw. - function draw(uint256 _disputeID, address _juror) external onlyByOwnerOrInstructor { - Dispute storage dispute = disputes[_disputeID]; - uint256 currentRound = dispute.rounds.length - 1; - Round storage round = dispute.rounds[currentRound]; - if (dispute.period != Period.evidence) revert NotEvidencePeriod(); - if (round.drawnJurors.length >= round.nbVotes) revert AllJurorsDrawn(); - - sortitionModule.setTransientJuror(_juror); - { - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - uint256 iteration = round.drawIterations + 1; - (address drawnAddress, uint96 fromSubcourtID) = disputeKit.draw(_disputeID, iteration); - if (drawnAddress == address(0)) { - revert NoJurorDrawn(); - } - sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror); - emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length); - round.drawnJurors.push(drawnAddress); - round.drawnJurorFromCourtIDs.push(fromSubcourtID != 0 ? fromSubcourtID : dispute.courtID); - if (round.drawnJurors.length == round.nbVotes) { - sortitionModule.postDrawHook(_disputeID, currentRound); - } - round.drawIterations = iteration; - } - sortitionModule.setTransientJuror(address(0)); - } - - /// @dev Appeals the ruling of a specified dispute. - /// Note: Access restricted to the Dispute Kit for this `disputeID`. - /// @param _disputeID The ID of the dispute. - /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump. - /// @param _extraData Extradata for the dispute. Can be required during court jump. - function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable { - if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough(); - - Dispute storage dispute = disputes[_disputeID]; - if (dispute.period != Period.appeal) revert DisputeNotAppealable(); - - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly(); - - uint96 newCourtID = dispute.courtID; - uint256 newDisputeKitID = round.disputeKitID; - - // Warning: the extra round must be created before calling disputeKit.createDispute() - Round storage extraRound = dispute.rounds.push(); - - if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) { - // Jump to parent court. - newCourtID = courts[newCourtID].parent; - - if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) { - // Switch to classic dispute kit if parent court doesn't support the current one. - newDisputeKitID = DISPUTE_KIT_CLASSIC; - } - - if (newCourtID != dispute.courtID) { - emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID); - } - } - - dispute.courtID = newCourtID; - dispute.period = Period.evidence; - dispute.lastPeriodChange = block.timestamp; - - Court storage court = courts[newCourtID]; - extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds. - extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ONE_BASIS_POINT; - extraRound.totalFeesForJurors = msg.value; - extraRound.disputeKitID = newDisputeKitID; - - sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1); - - // Dispute kit was changed, so create a dispute in the new DK contract. - if (extraRound.disputeKitID != round.disputeKitID) { - emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID); - disputeKits[extraRound.disputeKitID].createDispute( - _disputeID, - _numberOfChoices, - _extraData, - extraRound.nbVotes - ); - } - - emit AppealDecision(_disputeID, dispute.arbitrated); - emit NewPeriod(_disputeID, Period.evidence); - } - - /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts. - /// @param _disputeID The ID of the dispute. - /// @param _round The appeal round. - /// @param _iterations The number of iterations to run. - function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external { - Round storage round; - { - Dispute storage dispute = disputes[_disputeID]; - if (dispute.period != Period.execution) revert NotExecutionPeriod(); - - round = dispute.rounds[_round]; - } // stack too deep workaround - - uint256 start = round.repartitions; - uint256 end = round.repartitions + _iterations; - - uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas. - uint256 numberOfVotesInRound = round.drawnJurors.length; - uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound; - uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror; - uint256 coherentCount; - { - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round. - } // stack too deep workaround - - if (coherentCount == 0) { - // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome. - if (end > numberOfVotesInRound) end = numberOfVotesInRound; - } else { - // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees. - if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2; - } - round.repartitions = end; - - for (uint256 i = start; i < end; i++) { - if (i < numberOfVotesInRound) { - pnkPenaltiesInRound = _executePenalties( - ExecuteParams({ - disputeID: _disputeID, - round: _round, - coherentCount: coherentCount, - numberOfVotesInRound: numberOfVotesInRound, - feePerJurorInRound: feePerJurorInRound, - pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound, - pnkPenaltiesInRound: pnkPenaltiesInRound, - repartition: i - }) - ); - } else { - _executeRewards( - ExecuteParams({ - disputeID: _disputeID, - round: _round, - coherentCount: coherentCount, - numberOfVotesInRound: numberOfVotesInRound, - feePerJurorInRound: feePerJurorInRound, - pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound, - pnkPenaltiesInRound: pnkPenaltiesInRound, - repartition: i - }) - ); - } - } - if (round.pnkPenalties != pnkPenaltiesInRound) { - round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact - } - } - - /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only. - /// @param _params The parameters for the execution, see `ExecuteParams`. - /// @return pnkPenaltiesInRoundCache The updated penalties in round cache. - function _executePenalties(ExecuteParams memory _params) internal returns (uint256) { - Dispute storage dispute = disputes[_params.disputeID]; - Round storage round = dispute.rounds[_params.round]; - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - - // [0, 1] value that determines how coherent the juror was in this round, in basis points. - uint256 coherence = disputeKit.getDegreeOfCoherencePenalty( - _params.disputeID, - _params.round, - _params.repartition, - _params.feePerJurorInRound, - _params.pnkAtStakePerJurorInRound - ); - - // Guard against degree exceeding 1, though it should be ensured by the dispute kit. - if (coherence > ONE_BASIS_POINT) { - coherence = ONE_BASIS_POINT; - } - - // Fully coherent jurors won't be penalized. - uint256 penalty = (round.pnkAtStakePerJuror * (ONE_BASIS_POINT - coherence)) / ONE_BASIS_POINT; - - // Unlock the PNKs affected by the penalty - address account = round.drawnJurors[_params.repartition]; - sortitionModule.unlockStake(account, penalty); - - // Apply the penalty to the staked PNKs. - uint96 penalizedInCourtID = round.drawnJurorFromCourtIDs[_params.repartition]; - (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty) = sortitionModule.setStakePenalty( - account, - penalizedInCourtID, - penalty - ); - _params.pnkPenaltiesInRound += availablePenalty; - emit TokenAndETHShift( - account, - _params.disputeID, - _params.round, - coherence, - -int256(availablePenalty), - 0, - round.feeToken - ); - - if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) { - // The juror is inactive or their balance is can't cover penalties anymore, unstake them from all courts. - sortitionModule.forcedUnstakeAllCourts(account); - } else if (newCourtStake < courts[penalizedInCourtID].minStake) { - // The juror's balance fell below the court minStake, unstake them from the court. - sortitionModule.forcedUnstake(account, penalizedInCourtID); - } - - if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) { - // No one was coherent, send the rewards to the owner. - if (round.feeToken == NATIVE_CURRENCY) { - // The dispute fees were paid in ETH - payable(owner).send(round.totalFeesForJurors); - } else { - // The dispute fees were paid in ERC20 - round.feeToken.safeTransfer(owner, round.totalFeesForJurors); - } - pinakion.safeTransfer(owner, _params.pnkPenaltiesInRound); - emit LeftoverRewardSent( - _params.disputeID, - _params.round, - _params.pnkPenaltiesInRound, - round.totalFeesForJurors, - round.feeToken - ); - } - return _params.pnkPenaltiesInRound; - } - - /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only. - /// @param _params The parameters for the execution, see `ExecuteParams`. - function _executeRewards(ExecuteParams memory _params) internal { - Dispute storage dispute = disputes[_params.disputeID]; - Round storage round = dispute.rounds[_params.round]; - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - - // [0, 1] value that determines how coherent the juror was in this round, in basis points. - (uint256 pnkCoherence, uint256 feeCoherence) = disputeKit.getDegreeOfCoherenceReward( - _params.disputeID, - _params.round, - _params.repartition % _params.numberOfVotesInRound, - _params.feePerJurorInRound, - _params.pnkAtStakePerJurorInRound - ); - - // Guard against degree exceeding 1, though it should be ensured by the dispute kit. - if (pnkCoherence > ONE_BASIS_POINT) { - pnkCoherence = ONE_BASIS_POINT; - } - if (feeCoherence > ONE_BASIS_POINT) { - feeCoherence = ONE_BASIS_POINT; - } - - address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound]; - uint256 pnkLocked = (round.pnkAtStakePerJuror * pnkCoherence) / ONE_BASIS_POINT; - - // Release the rest of the PNKs of the juror for this round. - sortitionModule.unlockStake(account, pnkLocked); - - // Compute the rewards - uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * pnkCoherence) / ONE_BASIS_POINT; - round.sumPnkRewardPaid += pnkReward; - uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * feeCoherence) / ONE_BASIS_POINT; - round.sumFeeRewardPaid += feeReward; - - // Transfer the fee reward - if (round.feeToken == NATIVE_CURRENCY) { - // The dispute fees were paid in ETH - payable(account).send(feeReward); - } else { - // The dispute fees were paid in ERC20 - round.feeToken.safeTransfer(account, feeReward); - } - - // Stake the PNK reward if possible, by-passes delayed stakes and other checks usually done by validateStake() - if (!sortitionModule.setStakeReward(account, dispute.courtID, pnkReward)) { - pinakion.safeTransfer(account, pnkReward); - } - - emit TokenAndETHShift( - account, - _params.disputeID, - _params.round, - pnkCoherence, - int256(pnkReward), - int256(feeReward), - round.feeToken - ); - - // Transfer any residual rewards to the owner. It may happen due to partial coherence of the jurors. - if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) { - uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid; - uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid; - if (leftoverPnkReward != 0 || leftoverFeeReward != 0) { - if (leftoverPnkReward != 0) { - pinakion.safeTransfer(owner, leftoverPnkReward); - } - if (leftoverFeeReward != 0) { - if (round.feeToken == NATIVE_CURRENCY) { - // The dispute fees were paid in ETH - payable(owner).send(leftoverFeeReward); - } else { - // The dispute fees were paid in ERC20 - round.feeToken.safeTransfer(owner, leftoverFeeReward); - } - } - emit LeftoverRewardSent( - _params.disputeID, - _params.round, - leftoverPnkReward, - leftoverFeeReward, - round.feeToken - ); - } - } - } - - /// @dev Executes a specified dispute's ruling. - /// @param _disputeID The ID of the dispute. - function executeRuling(uint256 _disputeID) external { - Dispute storage dispute = disputes[_disputeID]; - if (dispute.period != Period.execution) revert NotExecutionPeriod(); - if (dispute.ruled) revert RulingAlreadyExecuted(); - - (uint256 winningChoice, , ) = currentRuling(_disputeID); - dispute.ruled = true; - emit Ruling(dispute.arbitrated, _disputeID, winningChoice); - dispute.arbitrated.rule(_disputeID, winningChoice); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Compute the cost of arbitration denominated in ETH. - /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @return cost The arbitration cost in ETH. - function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) { - (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData); - cost = courts[courtID].feeForJuror * minJurors; - } - - /// @dev Compute the cost of arbitration denominated in `_feeToken`. - /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes). - /// @param _feeToken The ERC20 token used to pay fees. - /// @return cost The arbitration cost in `_feeToken`. - function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) { - cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData)); - } - - /// @dev Gets the cost of appealing a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @return cost The appeal cost. - function appealCost(uint256 _disputeID) public view returns (uint256 cost) { - Dispute storage dispute = disputes[_disputeID]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - Court storage court = courts[dispute.courtID]; - if (round.nbVotes >= court.jurorsForCourtJump) { - // Jump to parent court. - if (dispute.courtID == GENERAL_COURT) { - // TODO: Handle the forking when appealed in General court. - cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court. - } else { - cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1); - } - } else { - // Stay in current court. - cost = court.feeForJuror * ((round.nbVotes * 2) + 1); - } - } - - /// @dev Gets the start and the end of a specified dispute's current appeal period. - /// @param _disputeID The ID of the dispute. - /// @return start The start of the appeal period. - /// @return end The end of the appeal period. - function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) { - Dispute storage dispute = disputes[_disputeID]; - if (dispute.period == Period.appeal) { - start = dispute.lastPeriodChange; - end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)]; - } else { - start = 0; - end = 0; - } - } - - /// @dev Gets the current ruling of a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @return ruling The current ruling. - /// @return tied Whether it's a tie or not. - /// @return overridden Whether the ruling was overridden by appeal funding or not. - function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) { - Dispute storage dispute = disputes[_disputeID]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - IDisputeKit disputeKit = disputeKits[round.disputeKitID]; - (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID); - } - - /// @dev Gets the round info for a specified dispute and round. - /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit. - /// @param _disputeID The ID of the dispute. - /// @param _round The round to get the info for. - /// @return round The round info. - function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) { - return disputes[_disputeID].rounds[_round]; - } - - /// @dev Gets the PNK at stake per juror for a specified dispute and round. - /// @param _disputeID The ID of the dispute. - /// @param _round The round to get the info for. - /// @return pnkAtStakePerJuror The PNK at stake per juror. - function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) { - return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror; - } - - /// @dev Gets the number of rounds for a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @return The number of rounds. - function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) { - return disputes[_disputeID].rounds.length; - } - - /// @dev Checks if a given dispute kit is supported by a given court. - /// @param _courtID The ID of the court to check the support for. - /// @param _disputeKitID The ID of the dispute kit to check the support for. - /// @return Whether the dispute kit is supported or not. - function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) { - return courts[_courtID].supportedDisputeKits[_disputeKitID]; - } - - /// @dev Gets the timesPerPeriod array for a given court. - /// @param _courtID The ID of the court to get the times from. - /// @return timesPerPeriod The timesPerPeriod array for the given court. - function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) { - timesPerPeriod = courts[_courtID].timesPerPeriod; - } - - // ************************************* // - // * Public Views for Dispute Kits * // - // ************************************* // - - /// @dev Gets the number of votes permitted for the specified dispute in the latest round. - /// @param _disputeID The ID of the dispute. - function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) { - Dispute storage dispute = disputes[_disputeID]; - return dispute.rounds[dispute.rounds.length - 1].nbVotes; - } - - /// @dev Returns true if the dispute kit will be switched to a parent DK. - /// @param _disputeID The ID of the dispute. - /// @return Whether DK will be switched or not. - function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) { - Dispute storage dispute = disputes[_disputeID]; - Round storage round = dispute.rounds[dispute.rounds.length - 1]; - Court storage court = courts[dispute.courtID]; - - if (round.nbVotes < court.jurorsForCourtJump) { - return false; - } - - // Jump if the parent court doesn't support the current DK. - return !courts[court.parent].supportedDisputeKits[round.disputeKitID]; - } - - function getDisputeKitsLength() external view returns (uint256) { - return disputeKits.length; - } - - function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) { - return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth; - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Toggles the dispute kit support for a given court. - /// @param _courtID The ID of the court to toggle the support for. - /// @param _disputeKitID The ID of the dispute kit to toggle the support for. - /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled. - function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal { - courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable; - emit DisputeKitEnabled(_courtID, _disputeKitID, _enable); - } - - /// @dev If called only once then set _onError to Revert, otherwise set it to Return - /// @param _account The account to set the stake for. - /// @param _courtID The ID of the court to set the stake for. - /// @param _newStake The new stake. - /// @param _noDelay True if the stake change should not be delayed. - /// @param _onError Whether to revert or return false on error. - /// @return Whether the stake was successfully set or not. - function _setStake( - address _account, - uint96 _courtID, - uint256 _newStake, - bool _noDelay, - OnError _onError - ) internal returns (bool) { - if (_courtID == FORKING_COURT || _courtID >= courts.length) { - _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed. - return false; - } - if (_newStake != 0 && _newStake < courts[_courtID].minStake) { - _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed. - return false; - } - (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake( - _account, - _courtID, - _newStake, - _noDelay - ); - if (stakingResult != StakingResult.Successful) { - _stakingFailed(_onError, stakingResult); - return false; - } - if (pnkDeposit > 0) { - if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) { - _stakingFailed(_onError, StakingResult.StakingTransferFailed); - return false; - } - } - if (pnkWithdrawal > 0) { - if (!pinakion.safeTransfer(_account, pnkWithdrawal)) { - _stakingFailed(_onError, StakingResult.UnstakingTransferFailed); - return false; - } - } - sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake); - - return true; - } - - /// @dev It may revert depending on the _onError parameter. - function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual { - if (_onError == OnError.Return) return; - if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed(); - if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed(); - if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts(); - if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt(); - if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake(); - if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake(); - } - - /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array. - /// Note that if extradata contains an incorrect value then this value will be switched to default. - /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID. - /// @return courtID The court ID. - /// @return minJurors The minimum number of jurors required. - /// @return disputeKitID The ID of the dispute kit. - function _extraDataToCourtIDMinJurorsDisputeKit( - bytes memory _extraData - ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) { - // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index. - if (_extraData.length >= 64) { - assembly { - // solium-disable-line security/no-inline-assembly - courtID := mload(add(_extraData, 0x20)) - minJurors := mload(add(_extraData, 0x40)) - disputeKitID := mload(add(_extraData, 0x60)) - } - if (courtID == FORKING_COURT || courtID >= courts.length) { - courtID = GENERAL_COURT; - } - if (minJurors == 0) { - minJurors = DEFAULT_NB_OF_JURORS; - } - if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) { - disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used. - } - } else { - courtID = GENERAL_COURT; - minJurors = DEFAULT_NB_OF_JURORS; - disputeKitID = DISPUTE_KIT_CLASSIC; - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error InstructorOnly(); - error OwnerOrInstructorOnly(); - error DisputeKitOnly(); - error SortitionModuleOnly(); - error UnsuccessfulCall(); - error InvalidDisputKitParent(); - error MinStakeLowerThanParentCourt(); - error UnsupportedDisputeKit(); - error InvalidForkingCourtAsParent(); - error WrongDisputeKitIndex(); - error CannotDisableClassicDK(); - error StakingInTooManyCourts(); - error StakingNotPossibleInThisCourt(); - error StakingLessThanCourtMinStake(); - error StakingTransferFailed(); - error UnstakingTransferFailed(); - error ArbitrationFeesNotEnough(); - error DisputeKitNotSupportedByCourt(); - error MustSupportDisputeKitClassic(); - error TokenNotAccepted(); - error EvidenceNotPassedAndNotAppeal(); - error DisputeStillDrawing(); - error CommitPeriodNotPassed(); - error VotePeriodNotPassed(); - error AppealPeriodNotPassed(); - error NotEvidencePeriod(); - error AppealFeesNotEnough(); - error DisputeNotAppealable(); - error NotExecutionPeriod(); - error RulingAlreadyExecuted(); - error DisputePeriodIsFinal(); - error TransferFailed(); - error AllJurorsDrawn(); - error NoJurorDrawn(); - error StakingZeroWhenNoStake(); -} diff --git a/contracts/src/arbitration/university/SortitionModuleUniversity.sol b/contracts/src/arbitration/university/SortitionModuleUniversity.sol deleted file mode 100644 index 66e815e4a..000000000 --- a/contracts/src/arbitration/university/SortitionModuleUniversity.sol +++ /dev/null @@ -1,427 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./KlerosCoreUniversity.sol"; -import "./ISortitionModuleUniversity.sol"; -import "../interfaces/IDisputeKit.sol"; -import "../../proxy/UUPSProxiable.sol"; -import "../../proxy/Initializable.sol"; -import "../../libraries/Constants.sol"; - -/// @title SortitionModuleUniversity -/// @dev An adapted version of the SortitionModule contract for educational purposes. -contract SortitionModuleUniversity is ISortitionModuleUniversity, UUPSProxiable, Initializable { - string public constant override version = "2.0.0"; - - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - struct Juror { - mapping(uint96 => uint256) stakesByCourtID; // The stakes of the juror in particular courts. - uint96[] courtIDs; // The IDs of courts where the juror's stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`. - uint256 stakedPnk; // The juror's total amount of tokens staked in subcourts. Reflects actual pnk balance. - uint256 lockedPnk; // The juror's total amount of tokens locked in disputes. Can reflect actual pnk balance when stakedPnk are fully withdrawn. - } - - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; // The owner of the contract. - KlerosCoreUniversity public core; // The core arbitrator contract. - uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors. - mapping(address account => Juror) public jurors; // The jurors. - address private transientJuror; // The juror address used between calls within the same transaction. - - // ************************************* // - // * Events * // - // ************************************* // - - /// @notice Emitted when a juror stakes in a court. - /// @param _address The address of the juror. - /// @param _courtID The ID of the court. - /// @param _amount The amount of tokens staked in the court. - /// @param _amountAllCourts The amount of tokens staked in all courts. - event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts); - - /// @notice Emitted when a juror's stake is locked. - /// @param _address The address of the juror. - /// @param _relativeAmount The amount of tokens locked. - /// @param _unlock Whether the stake is locked or unlocked. - event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock); - - /// @dev Emitted when leftover PNK is available. - /// @param _account The account of the juror. - /// @param _amount The amount of PNK available. - event LeftoverPNK(address indexed _account, uint256 _amount); - - /// @dev Emitted when leftover PNK is withdrawn. - /// @param _account The account of the juror withdrawing PNK. - /// @param _amount The amount of PNK withdrawn. - event LeftoverPNKWithdrawn(address indexed _account, uint256 _amount); - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - modifier onlyByCore() { - if (address(core) != msg.sender) revert KlerosCoreOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Initializer (constructor equivalent for upgradable contracts). - /// @param _core The KlerosCore. - function initialize(address _owner, KlerosCoreUniversity _core) external initializer { - owner = _owner; - core = _core; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /** - * @dev Access Control to perform implementation upgrades (UUPS Proxiable) - * @dev Only the owner can perform upgrades (`onlyByOwner`) - */ - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - function setTransientJuror(address _juror) external override onlyByCore { - transientJuror = _juror; - } - - function createTree(uint96 _courtID, bytes memory _extraData) external { - // NOP - } - - function createDisputeHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore { - disputesWithoutJurors++; - } - - function postDrawHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore { - disputesWithoutJurors--; - } - - /// @dev Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase(). - /// @param _randomNumber Random number returned by RNG contract. - function notifyRandomNumber(uint256 _randomNumber) public override {} - - /// @dev Validate the specified juror's new stake for a court. - /// Note: no state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants. - /// @param _account The address of the juror. - /// @param _courtID The ID of the court. - /// @param _newStake The new stake. - /// @return pnkDeposit The amount of PNK to be deposited. - /// @return pnkWithdrawal The amount of PNK to be withdrawn. - /// @return stakingResult The result of the staking operation. - function validateStake( - address _account, - uint96 _courtID, - uint256 _newStake, - bool /*_noDelay*/ - ) - external - view - override - onlyByCore - returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) - { - Juror storage juror = jurors[_account]; - uint256 currentStake = _stakeOf(_account, _courtID); - - uint256 nbCourts = juror.courtIDs.length; - if (currentStake == 0 && nbCourts >= MAX_STAKE_PATHS) { - return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed. - } - - if (currentStake == 0 && _newStake == 0) { - return (0, 0, StakingResult.CannotStakeZeroWhenNoStake); // Forbid staking 0 amount when current stake is 0 to avoid flaky behaviour. - } - - if (_newStake >= currentStake) { - pnkDeposit = _newStake - currentStake; - } else { - pnkWithdrawal = currentStake - _newStake; - // Ensure locked tokens remain in the contract. They can only be released during Execution. - uint256 possibleWithdrawal = juror.stakedPnk > juror.lockedPnk ? juror.stakedPnk - juror.lockedPnk : 0; - if (pnkWithdrawal > possibleWithdrawal) { - pnkWithdrawal = possibleWithdrawal; - } - } - return (pnkDeposit, pnkWithdrawal, StakingResult.Successful); - } - - /// @dev Update the state of the stakes, called by KC at the end of setStake flow. - /// `O(n + p * log_k(j))` where - /// `n` is the number of courts the juror has staked in, - /// `p` is the depth of the court tree, - /// `k` is the minimum number of children per node of one of these courts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously. - /// @param _account The address of the juror. - /// @param _courtID The ID of the court. - /// @param _pnkDeposit The amount of PNK to be deposited. - /// @param _pnkWithdrawal The amount of PNK to be withdrawn. - /// @param _newStake The new stake. - function setStake( - address _account, - uint96 _courtID, - uint256 _pnkDeposit, - uint256 _pnkWithdrawal, - uint256 _newStake - ) external override onlyByCore { - _setStake(_account, _courtID, _pnkDeposit, _pnkWithdrawal, _newStake); - } - - function setStakePenalty( - address _account, - uint96 _courtID, - uint256 _penalty - ) external override onlyByCore returns (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty) { - Juror storage juror = jurors[_account]; - availablePenalty = _penalty; - newCourtStake = _stakeOf(_account, _courtID); - if (juror.stakedPnk < _penalty) { - availablePenalty = juror.stakedPnk; - } - - if (availablePenalty == 0) return (juror.stakedPnk, newCourtStake, 0); // No penalty to apply. - - uint256 currentStake = _stakeOf(_account, _courtID); - uint256 newStake = 0; - if (currentStake >= availablePenalty) { - newStake = currentStake - availablePenalty; - } - _setStake(_account, _courtID, 0, availablePenalty, newStake); - pnkBalance = juror.stakedPnk; // updated by _setStake() - newCourtStake = _stakeOf(_account, _courtID); // updated by _setStake() - } - - /// @dev Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution. - /// `O(n + p * log_k(j))` where - /// `n` is the number of courts the juror has staked in, - /// `p` is the depth of the court tree, - /// `k` is the minimum number of children per node of one of these courts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously. - /// @param _account The address of the juror. - /// @param _courtID The ID of the court. - /// @param _reward The amount of PNK to be deposited as a reward. - function setStakeReward( - address _account, - uint96 _courtID, - uint256 _reward - ) external override onlyByCore returns (bool success) { - if (_reward == 0) return true; // No reward to add. - - uint256 currentStake = _stakeOf(_account, _courtID); - if (currentStake == 0) return false; // Juror has been unstaked, don't increase their stake. - - uint256 newStake = currentStake + _reward; - _setStake(_account, _courtID, _reward, 0, newStake); - return true; - } - - function _setStake( - address _account, - uint96 _courtID, - uint256 _pnkDeposit, - uint256 _pnkWithdrawal, - uint256 _newStake - ) internal { - Juror storage juror = jurors[_account]; - uint256 currentStake = _stakeOf(_account, _courtID); - if (_pnkDeposit > 0) { - if (currentStake == 0) { - juror.courtIDs.push(_courtID); - } - // Increase juror's balance by deposited amount. - juror.stakedPnk += _pnkDeposit; - } else { - juror.stakedPnk -= _pnkWithdrawal; - if (_newStake == 0) { - // Cleanup - for (uint256 i = juror.courtIDs.length; i > 0; i--) { - if (juror.courtIDs[i - 1] == _courtID) { - juror.courtIDs[i - 1] = juror.courtIDs[juror.courtIDs.length - 1]; - juror.courtIDs.pop(); - break; - } - } - } - } - - bool finished = false; - uint96 currentCourtID = _courtID; - while (!finished) { - // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn. - juror.stakesByCourtID[currentCourtID] += _newStake; - juror.stakesByCourtID[currentCourtID] -= currentStake; - if (currentCourtID == GENERAL_COURT) { - finished = true; - } else { - (currentCourtID, , , , , , ) = core.courts(currentCourtID); - } - } - emit StakeSet(_account, _courtID, _newStake, juror.stakedPnk); - } - - function lockStake(address _account, uint256 _relativeAmount) external override onlyByCore { - jurors[_account].lockedPnk += _relativeAmount; - emit StakeLocked(_account, _relativeAmount, false); - } - - function unlockStake(address _account, uint256 _relativeAmount) external override onlyByCore { - jurors[_account].lockedPnk -= _relativeAmount; - emit StakeLocked(_account, _relativeAmount, true); - } - - /// @dev Unstakes the inactive juror from all courts. - /// `O(n * (p * log_k(j)) )` where - /// `n` is the number of courts the juror has staked in, - /// `p` is the depth of the court tree, - /// `k` is the minimum number of children per node of one of these courts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously. - /// @param _account The juror to unstake. - function forcedUnstakeAllCourts(address _account) external override onlyByCore { - uint96[] memory courtIDs = getJurorCourtIDs(_account); - for (uint256 j = courtIDs.length; j > 0; j--) { - core.setStakeBySortitionModule(_account, courtIDs[j - 1], 0); - } - } - - /// @dev Unstakes the inactive juror from a specific court. - /// `O(n * (p * log_k(j)) )` where - /// `n` is the number of courts the juror has staked in, - /// `p` is the depth of the court tree, - /// `k` is the minimum number of children per node of one of these courts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously. - /// @param _account The juror to unstake. - /// @param _courtID The ID of the court. - function forcedUnstake(address _account, uint96 _courtID) external override onlyByCore { - core.setStakeBySortitionModule(_account, _courtID, 0); - } - - /// @dev Gives back the locked PNKs in case the juror fully unstaked earlier. - /// Note that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance - /// while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). - /// In this case the juror can use this function to withdraw the leftover tokens. - /// Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function. - /// @param _account The juror whose PNK to withdraw. - function withdrawLeftoverPNK(address _account) external override { - // Can withdraw the leftover PNK if fully unstaked, has no tokens locked and has positive balance. - // This withdrawal can't be triggered by calling setStake() in KlerosCore because current stake is technically 0, thus it is done via separate function. - uint256 amount = getJurorLeftoverPNK(_account); - if (amount == 0) revert NotEligibleForWithdrawal(); - jurors[_account].stakedPnk = 0; - core.transferBySortitionModule(_account, amount); - emit LeftoverPNKWithdrawn(_account, amount); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Draw an ID from a tree using a number. - /// Note that this function reverts if the sum of all values in the tree is 0. - /// @return drawnAddress The drawn address. - function draw(uint96, uint256, uint256) public view override returns (address drawnAddress, uint96 fromSubcourtID) { - drawnAddress = transientJuror; - } - - /// @dev Gets the stake of a juror in a court. - /// Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in - /// but acceptable for this educational implementation. - /// @param _juror The address of the juror. - /// @param _courtID The ID of the court. - /// @return totalStaked The total amount of tokens staked by the juror in the court. - /// @return totalLocked The total amount of tokens locked by the juror in the court. - /// @return stakedInCourt The amount of tokens staked by the juror in the court. - /// @return nbCourts The number of courts the juror has staked in. - function getJurorBalance( - address _juror, - uint96 _courtID - ) - external - view - override - returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts) - { - Juror storage juror = jurors[_juror]; - totalStaked = juror.stakedPnk; - totalLocked = juror.lockedPnk; - nbCourts = juror.courtIDs.length; - for (uint256 i = 0; i < nbCourts; i++) { - if (juror.courtIDs[i] == _courtID) { - stakedInCourt = juror.stakesByCourtID[_courtID]; - break; - } - } - } - - /// @dev Gets the court identifiers where a specific `_juror` has staked. - /// @param _juror The address of the juror. - function getJurorCourtIDs(address _juror) public view override returns (uint96[] memory) { - return jurors[_juror].courtIDs; - } - - function isJurorStaked(address _juror) external view override returns (bool) { - return jurors[_juror].stakedPnk > 0; - } - - function getJurorLeftoverPNK(address _juror) public view override returns (uint256) { - Juror storage juror = jurors[_juror]; - if (juror.courtIDs.length == 0 && juror.lockedPnk == 0) { - return juror.stakedPnk; - } - return 0; - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Gets the stake of a juror in a court. - /// Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in - /// but acceptable for this educational implementation. - /// @param _juror The address of the juror. - /// @param _courtID The ID of the court. - /// @return stakedInCourt The amount of tokens staked by the juror in the court. - function _stakeOf(address _juror, uint96 _courtID) internal view returns (uint256 stakedInCourt) { - Juror storage juror = jurors[_juror]; - for (uint256 i = 0; i < juror.courtIDs.length; i++) { - if (juror.courtIDs[i] == _courtID) { - stakedInCourt = juror.stakesByCourtID[_courtID]; - break; - } - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error KlerosCoreOnly(); - error NotEligibleForWithdrawal(); -} diff --git a/contracts/src/arbitration/view/KlerosCoreSnapshotProxy.sol b/contracts/src/arbitration/view/KlerosCoreSnapshotProxy.sol deleted file mode 100644 index 70c3c77ce..000000000 --- a/contracts/src/arbitration/view/KlerosCoreSnapshotProxy.sol +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {ISortitionModule} from "../interfaces/ISortitionModule.sol"; - -interface IKlerosCore { - function sortitionModule() external view returns (ISortitionModule); -} - -/// @title KlerosCoreSnapshotProxy -/// Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting. -contract KlerosCoreSnapshotProxy { - // ************************************* // - // * State Modifiers * // - // ************************************* // - - IKlerosCore public core; - address public owner; - string public constant name = "Staked Pinakion"; - string public constant symbol = "stPNK"; - uint8 public constant decimals = 18; - - // ************************************* // - // * Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor - /// @param _owner The owner of the contract. - /// @param _core KlerosCore to read the balance from. - constructor(address _owner, IKlerosCore _core) { - owner = _owner; - core = _core; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Changes the `owner` storage variable. - /// @param _owner The new value for the `owner` storage variable. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the `core` storage variable. - /// @param _core The new value for the `core` storage variable. - function changeCore(IKlerosCore _core) external onlyByOwner { - core = _core; - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Returns the amount of PNK staked in KlerosV2 for a particular address. - /// Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID. - /// @param _account The address to query. - /// @return totalStaked Total amount staked in V2 by the address. - function balanceOf(address _account) external view returns (uint256 totalStaked) { - (totalStaked, , , ) = core.sortitionModule().getJurorBalance(_account, 0); - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); -} diff --git a/contracts/src/gateway/ForeignGateway.sol b/contracts/src/gateway/ForeignGateway.sol deleted file mode 100644 index 366f3e6f0..000000000 --- a/contracts/src/gateway/ForeignGateway.sol +++ /dev/null @@ -1,282 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./interfaces/IForeignGateway.sol"; -import "../proxy/UUPSProxiable.sol"; -import "../proxy/Initializable.sol"; -import "../libraries/Constants.sol"; - -/// Foreign Gateway -/// Counterpart of `HomeGateway` -contract ForeignGateway is IForeignGateway, UUPSProxiable, Initializable { - string public constant override version = "0.8.0"; - - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - struct DisputeData { - uint248 id; - bool ruled; - address arbitrable; - uint256 paid; - address relayer; - } - - // ************************************* // - // * Events * // - // ************************************* // - - event ArbitrationCostModified(uint96 indexed _courtID, uint256 _feeForJuror); - - // ************************************* // - // * Storage * // - // ************************************* // - - uint256 internal localDisputeID; // The disputeID must start from 1 as the KlerosV1 proxy governor depends on this implementation. We now also depend on localDisputeID not ever being zero. - mapping(uint96 courtId => uint256) public feeForJuror; // feeForJuror[v2CourtID], it mirrors the value on KlerosCore. - address public owner; - address public veaOutbox; - uint256 public override homeChainID; - address public override homeGateway; - address public deprecatedVeaOutbox; - uint256 public deprecatedVeaOutboxExpiration; - mapping(bytes32 disputeHash => DisputeData) public disputeHashtoDisputeData; - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyFromVea(address _messageSender) { - if ( - veaOutbox != msg.sender && - (block.timestamp >= deprecatedVeaOutboxExpiration || deprecatedVeaOutbox != msg.sender) - ) revert VeaOutboxOnly(); - if (_messageSender != homeGateway) revert HomeGatewayMessageSenderOnly(); - _; - } - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Constructs the `PolicyRegistry` contract. - /// @param _owner The owner's address. - /// @param _veaOutbox The address of the VeaOutbox. - /// @param _homeChainID The chainID of the home chain. - /// @param _homeGateway The address of the home gateway. - function initialize( - address _owner, - address _veaOutbox, - uint256 _homeChainID, - address _homeGateway - ) external initializer { - owner = _owner; - veaOutbox = _veaOutbox; - homeChainID = _homeChainID; - homeGateway = _homeGateway; - localDisputeID = 1; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /** - * @dev Access Control to perform implementation upgrades (UUPS Proxiable) - * @dev Only the owner can perform upgrades (`onlyByOwner`) - */ - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - /// @dev Changes the owner. - /// @param _owner The address of the new owner. - function changeOwner(address _owner) external { - if (owner != msg.sender) revert OwnerOnly(); - owner = _owner; - } - - /// @dev Changes the outbox. - /// @param _veaOutbox The address of the new outbox. - /// @param _gracePeriod The duration to accept messages from the deprecated bridge (if at all). - function changeVea(address _veaOutbox, uint256 _gracePeriod) external onlyByOwner { - // grace period to relay the remaining messages which are still going through the deprecated bridge. - deprecatedVeaOutboxExpiration = block.timestamp + _gracePeriod; - deprecatedVeaOutbox = veaOutbox; - veaOutbox = _veaOutbox; - } - - /// @dev Changes the home gateway. - /// @param _homeGateway The address of the new home gateway. - function changeHomeGateway(address _homeGateway) external { - if (owner != msg.sender) revert OwnerOnly(); - homeGateway = _homeGateway; - } - - /// @dev Changes the `feeForJuror` property value of a specified court. - /// @param _courtID The ID of the court on the v2 arbitrator. Not to be confused with the courtID on KlerosLiquid. - /// @param _feeForJuror The new value for the `feeForJuror` property value. - function changeCourtJurorFee(uint96 _courtID, uint256 _feeForJuror) external onlyByOwner { - feeForJuror[_courtID] = _feeForJuror; - emit ArbitrationCostModified(_courtID, _feeForJuror); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @inheritdoc IArbitratorV2 - function createDispute( - uint256 _choices, - bytes calldata _extraData - ) external payable override returns (uint256 disputeID) { - if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough(); - - disputeID = localDisputeID++; - uint256 chainID; - assembly { - chainID := chainid() - } - bytes32 disputeHash = keccak256( - abi.encodePacked( - "createDispute", - blockhash(block.number - 1), - chainID, - msg.sender, - disputeID, - _choices, - _extraData - ) - ); - - disputeHashtoDisputeData[disputeHash] = DisputeData({ - id: uint248(disputeID), - arbitrable: msg.sender, - paid: msg.value, - relayer: address(0), - ruled: false - }); - - emit CrossChainDisputeOutgoing(blockhash(block.number - 1), msg.sender, disputeID, _choices, _extraData); - } - - /// @inheritdoc IArbitratorV2 - function createDispute( - uint256 /*_choices*/, - bytes calldata /*_extraData*/, - IERC20 /*_feeToken*/, - uint256 /*_feeAmount*/ - ) external pure override returns (uint256) { - revert("Not supported"); - } - - /// @inheritdoc IArbitratorV2 - function arbitrationCost(bytes calldata _extraData) public view override returns (uint256 cost) { - (uint96 courtID, uint256 minJurors) = extraDataToCourtIDMinJurors(_extraData); - cost = feeForJuror[courtID] * minJurors; - } - - /// @inheritdoc IArbitratorV2 - function arbitrationCost( - bytes calldata /*_extraData*/, - IERC20 /*_feeToken*/ - ) public pure override returns (uint256 /*cost*/) { - revert("Not supported"); - } - - /// @inheritdoc IForeignGateway - function relayRule( - address _messageSender, - bytes32 _disputeHash, - uint256 _ruling, - address _relayer - ) external override onlyFromVea(_messageSender) { - DisputeData storage dispute = disputeHashtoDisputeData[_disputeHash]; - - if (dispute.id == 0) revert DisputeDoesNotExist(); - if (dispute.ruled) revert CannotRuleTwice(); - - dispute.ruled = true; - dispute.relayer = _relayer; - - IArbitrableV2 arbitrable = IArbitrableV2(dispute.arbitrable); - arbitrable.rule(dispute.id, _ruling); - } - - /// @inheritdoc IForeignGateway - function withdrawFees(bytes32 _disputeHash) external override { - DisputeData storage dispute = disputeHashtoDisputeData[_disputeHash]; - if (dispute.id == 0) revert DisputeDoesNotExist(); - if (!dispute.ruled) revert NotRuledYet(); - - uint256 amount = dispute.paid; - dispute.paid = 0; - payable(dispute.relayer).transfer(amount); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @inheritdoc IForeignGateway - function disputeHashToForeignID(bytes32 _disputeHash) external view override returns (uint256) { - return disputeHashtoDisputeData[_disputeHash].id; - } - - /// @inheritdoc IReceiverGateway - function senderGateway() external view override returns (address) { - return homeGateway; - } - - function currentRuling( - uint256 /*_disputeID*/ - ) public pure returns (uint256 /*ruling*/, bool /*tied*/, bool /*overridden*/) { - revert("Not supported"); - } - - // ************************************* // - // * Internal * // - // ************************************* // - - function extraDataToCourtIDMinJurors( - bytes memory _extraData - ) internal view returns (uint96 courtID, uint256 minJurors) { - // Note that here we ignore DisputeKitID - if (_extraData.length >= 64) { - assembly { - // solium-disable-line security/no-inline-assembly - courtID := mload(add(_extraData, 0x20)) - minJurors := mload(add(_extraData, 0x40)) - } - if (feeForJuror[courtID] == 0) courtID = 0; - if (minJurors == 0) minJurors = DEFAULT_NB_OF_JURORS; - } else { - courtID = 0; - minJurors = DEFAULT_NB_OF_JURORS; - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error HomeGatewayMessageSenderOnly(); - error VeaOutboxOnly(); - error ArbitrationFeesNotEnough(); - error DisputeDoesNotExist(); - error CannotRuleTwice(); - error NotRuledYet(); -} diff --git a/contracts/src/gateway/HomeGateway.sol b/contracts/src/gateway/HomeGateway.sol deleted file mode 100644 index 2a23913ef..000000000 --- a/contracts/src/gateway/HomeGateway.sol +++ /dev/null @@ -1,250 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./interfaces/IForeignGateway.sol"; -import "./interfaces/IHomeGateway.sol"; -import "../libraries/SafeERC20.sol"; -import "../libraries/Constants.sol"; -import "../proxy/UUPSProxiable.sol"; -import "../proxy/Initializable.sol"; - -/// Home Gateway -/// Counterpart of `ForeignGateway` -contract HomeGateway is IHomeGateway, UUPSProxiable, Initializable { - using SafeERC20 for IERC20; - - string public constant override version = "0.8.0"; - - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - struct RelayedData { - uint256 arbitrationCost; - address relayer; - } - - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; - IArbitratorV2 public arbitrator; - IVeaInbox public veaInbox; - uint256 public override foreignChainID; - address public override foreignGateway; - IERC20 public feeToken; - mapping(uint256 => bytes32) public disputeIDtoHash; - mapping(bytes32 => uint256) public disputeHashtoID; - mapping(bytes32 => RelayedData) public disputeHashtoRelayedData; - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - /// @dev Requires that the sender is the owner. - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /// @dev Constructs the `PolicyRegistry` contract. - /// @param _owner The owner's address. - /// @param _arbitrator The address of the arbitrator. - /// @param _veaInbox The address of the vea inbox. - /// @param _foreignChainID The ID of the foreign chain. - /// @param _foreignGateway The address of the foreign gateway. - /// @param _feeToken The address of the fee token. - function initialize( - address _owner, - IArbitratorV2 _arbitrator, - IVeaInbox _veaInbox, - uint256 _foreignChainID, - address _foreignGateway, - IERC20 _feeToken - ) external initializer { - owner = _owner; - arbitrator = _arbitrator; - veaInbox = _veaInbox; - foreignChainID = _foreignChainID; - foreignGateway = _foreignGateway; - feeToken = _feeToken; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /** - * @dev Access Control to perform implementation upgrades (UUPS Proxiable) - * @dev Only the owner can perform upgrades (`onlyByOwner`) - */ - function _authorizeUpgrade(address) internal view override onlyByOwner { - // NOP - } - - /// @dev Changes the owner. - /// @param _owner The address of the new owner. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the arbitrator. - /// @param _arbitrator The address of the new arbitrator. - function changeArbitrator(IArbitratorV2 _arbitrator) external onlyByOwner { - arbitrator = _arbitrator; - } - - /// @dev Changes the vea inbox, useful to increase the claim deposit. - /// @param _veaInbox The address of the new vea inbox. - function changeVea(IVeaInbox _veaInbox) external onlyByOwner { - veaInbox = _veaInbox; - } - - /// @dev Changes the foreign gateway. - /// @param _foreignGateway The address of the new foreign gateway. - function changeForeignGateway(address _foreignGateway) external onlyByOwner { - foreignGateway = _foreignGateway; - } - - /// @dev Changes the fee token. - /// @param _feeToken The address of the new fee token. - function changeFeeToken(IERC20 _feeToken) external onlyByOwner { - feeToken = _feeToken; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @inheritdoc IHomeGateway - function relayCreateDispute(RelayCreateDisputeParams memory _params) external payable override { - if (feeToken != NATIVE_CURRENCY) revert FeesPaidInNativeCurrencyOnly(); - if (_params.foreignChainID != foreignChainID) revert ForeignChainIDNotSupported(); - - bytes32 disputeHash = keccak256( - abi.encodePacked( - "createDispute", - _params.foreignBlockHash, - _params.foreignChainID, - _params.foreignArbitrable, - _params.foreignDisputeID, - _params.choices, - _params.extraData - ) - ); - RelayedData storage relayedData = disputeHashtoRelayedData[disputeHash]; - if (relayedData.relayer != address(0)) revert DisputeAlreadyRelayed(); - - uint256 disputeID = arbitrator.createDispute{value: msg.value}(_params.choices, _params.extraData); - disputeIDtoHash[disputeID] = disputeHash; - disputeHashtoID[disputeHash] = disputeID; - relayedData.relayer = msg.sender; - - emit DisputeRequest(arbitrator, disputeID, _params.externalDisputeID, _params.templateId, _params.templateUri); - - emit CrossChainDisputeIncoming( - arbitrator, - _params.foreignChainID, - _params.foreignArbitrable, - _params.foreignDisputeID, - disputeID, - _params.externalDisputeID, - _params.templateId, - _params.templateUri - ); - } - - /// @inheritdoc IHomeGateway - function relayCreateDispute(RelayCreateDisputeParams memory _params, uint256 _feeAmount) external { - if (feeToken == NATIVE_CURRENCY) revert FeesPaidInERC20Only(); - if (_params.foreignChainID != foreignChainID) revert ForeignChainIDNotSupported(); - - bytes32 disputeHash = keccak256( - abi.encodePacked( - "createDispute", - _params.foreignBlockHash, - _params.foreignChainID, - _params.foreignArbitrable, - _params.foreignDisputeID, - _params.choices, - _params.extraData - ) - ); - RelayedData storage relayedData = disputeHashtoRelayedData[disputeHash]; - if (relayedData.relayer != address(0)) revert DisputeAlreadyRelayed(); - - if (!feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed(); - if (!feeToken.increaseAllowance(address(arbitrator), _feeAmount)) revert AllowanceIncreaseFailed(); - - uint256 disputeID = arbitrator.createDispute(_params.choices, _params.extraData, feeToken, _feeAmount); - disputeIDtoHash[disputeID] = disputeHash; - disputeHashtoID[disputeHash] = disputeID; - relayedData.relayer = msg.sender; - - // Not strictly necessary for functionality, only to satisfy IArbitrableV2 - emit DisputeRequest(arbitrator, disputeID, _params.externalDisputeID, _params.templateId, _params.templateUri); - - emit CrossChainDisputeIncoming( - arbitrator, - _params.foreignChainID, - _params.foreignArbitrable, - _params.foreignDisputeID, - disputeID, - _params.externalDisputeID, - _params.templateId, - _params.templateUri - ); - } - - /// @inheritdoc IArbitrableV2 - function rule(uint256 _disputeID, uint256 _ruling) external override { - if (msg.sender != address(arbitrator)) revert ArbitratorOnly(); - - bytes32 disputeHash = disputeIDtoHash[_disputeID]; - RelayedData memory relayedData = disputeHashtoRelayedData[disputeHash]; - - // The first parameter of relayRule() `_messageSender` is missing from the encoding below - // because Vea takes care of inserting it for security reasons. - bytes4 methodSelector = IForeignGateway.relayRule.selector; - bytes memory data = abi.encode(disputeHash, _ruling, relayedData.relayer); - veaInbox.sendMessage(foreignGateway, methodSelector, data); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @inheritdoc IHomeGateway - function disputeHashToHomeID(bytes32 _disputeHash) external view override returns (uint256) { - return disputeHashtoID[_disputeHash]; - } - - /// @inheritdoc ISenderGateway - function receiverGateway() external view override returns (address) { - return foreignGateway; - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error OwnerOnly(); - error ArbitratorOnly(); - error FeesPaidInERC20Only(); - error FeesPaidInNativeCurrencyOnly(); - error ForeignChainIDNotSupported(); - error DisputeAlreadyRelayed(); - error TransferFailed(); - error AllowanceIncreaseFailed(); -} diff --git a/contracts/src/gateway/interfaces/IForeignGateway.sol b/contracts/src/gateway/interfaces/IForeignGateway.sol deleted file mode 100644 index 49f51e5de..000000000 --- a/contracts/src/gateway/interfaces/IForeignGateway.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -import "../../arbitration/interfaces/IArbitratorV2.sol"; -import "@kleros/vea-contracts/src/interfaces/gateways/IReceiverGateway.sol"; - -interface IForeignGateway is IArbitratorV2, IReceiverGateway { - /// @dev To be emitted when a dispute is sent to the IHomeGateway. - /// @param _foreignBlockHash foreignBlockHash - /// @param _foreignArbitrable The address of the Arbitrable contract. - /// @param _foreignDisputeID The identifier of the dispute in the Arbitrable contract. - /// @param _choices The number of choices the arbitrator can choose from in this dispute. - /// @param _extraData Any extra data to attach. - event CrossChainDisputeOutgoing( - bytes32 _foreignBlockHash, - address indexed _foreignArbitrable, - uint256 indexed _foreignDisputeID, - uint256 _choices, - bytes _extraData - ); - - /// Relay the rule call from the home gateway to the arbitrable. - function relayRule(address _messageSender, bytes32 _disputeHash, uint256 _ruling, address _forwarder) external; - - /// Reimburses the dispute fees to the relayer who paid for these fees on the home chain. - /// @param _disputeHash The dispute hash for which to withdraw the fees. - function withdrawFees(bytes32 _disputeHash) external; - - /// @dev Looks up the local foreign disputeID for a disputeHash - /// @param _disputeHash dispute hash - function disputeHashToForeignID(bytes32 _disputeHash) external view returns (uint256); - - /// @return The chain ID where the corresponding home gateway is deployed. - function homeChainID() external view returns (uint256); - - /// @return The address of the corresponding home gateway. - function homeGateway() external view returns (address); -} diff --git a/contracts/src/gateway/interfaces/IHomeGateway.sol b/contracts/src/gateway/interfaces/IHomeGateway.sol deleted file mode 100644 index b80f194d6..000000000 --- a/contracts/src/gateway/interfaces/IHomeGateway.sol +++ /dev/null @@ -1,68 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "@kleros/vea-contracts/src/interfaces/gateways/ISenderGateway.sol"; -import "../../arbitration/interfaces/IArbitrableV2.sol"; - -interface IHomeGateway is IArbitrableV2, ISenderGateway { - /// @dev To be emitted when a dispute is received from the IForeignGateway. - /// @param _arbitrator The arbitrator of the contract. - /// @param _arbitrableChainId The chain identifier where the Arbitrable contract is deployed. - /// @param _arbitrable The address of the Arbitrable contract. - /// @param _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract. - /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract. - /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration. - /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri. - /// @param _templateUri IPFS path to the dispute template starting with '/ipfs/'. Should not be used with _templateId. - event CrossChainDisputeIncoming( - IArbitratorV2 _arbitrator, - uint256 _arbitrableChainId, - address indexed _arbitrable, - uint256 indexed _arbitrableDisputeID, - uint256 indexed _arbitratorDisputeID, - uint256 _externalDisputeID, - uint256 _templateId, - string _templateUri - ); - - // Workaround stack too deep for relayCreateDispute() - struct RelayCreateDisputeParams { - bytes32 foreignBlockHash; - uint256 foreignChainID; - address foreignArbitrable; - uint256 foreignDisputeID; - uint256 externalDisputeID; - uint256 templateId; - string templateUri; - uint256 choices; - bytes extraData; - } - - /// @dev Relays a dispute creation from the ForeignGateway to the home arbitrator using the same parameters as the ones on the foreign chain. - /// Providing incorrect parameters will create a different hash than on the foreignChain and will not affect the actual dispute/arbitrable's ruling. - /// This function accepts the fees payment in the native currency of the home chain, typically ETH. - /// @param _params The parameters of the dispute, see `RelayCreateDisputeParams`. - function relayCreateDispute(RelayCreateDisputeParams memory _params) external payable; - - /// @dev Relays a dispute creation from the ForeignGateway to the home arbitrator using the same parameters as the ones on the foreign chain. - /// Providing incorrect parameters will create a different hash than on the foreignChain and will not affect the actual dispute/arbitrable's ruling. - /// This function accepts the fees payment in the ERC20 `acceptedFeeToken()`. - /// @param _params The parameters of the dispute, see `RelayCreateDisputeParams`. - function relayCreateDispute(RelayCreateDisputeParams memory _params, uint256 _feeAmount) external; - - /// @dev Looks up the local home disputeID for a disputeHash - /// @param _disputeHash dispute hash - /// @return disputeID dispute identifier on the home chain - function disputeHashToHomeID(bytes32 _disputeHash) external view returns (uint256); - - /// @return The chain ID where the corresponding foreign gateway is deployed. - function foreignChainID() external view returns (uint256); - - /// @return The address of the corresponding foreign gateway. - function foreignGateway() external view returns (address); - - /// return The fee token. - function feeToken() external view returns (IERC20); -} diff --git a/contracts/src/gateway/mock/VeaMock.sol b/contracts/src/gateway/mock/VeaMock.sol deleted file mode 100644 index 00444a538..000000000 --- a/contracts/src/gateway/mock/VeaMock.sol +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@kleros/vea-contracts/src/interfaces/inboxes/IVeaInbox.sol"; -import "@kleros/vea-contracts/src/interfaces/outboxes/IVeaOutboxOnL1.sol"; - -contract VeaMock is IVeaOutboxOnL1, IVeaInbox { - /* solhint-disable */ - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - /// @dev Sends an arbitrary message to receiving chain. - /// Note: Calls authenticated by receiving gateway checking the sender argument. - /// @param _to The cross-domain contract address which receives the calldata. - /// @param _fnSelector The function selector of the receiving contract. - /// @param _data The message calldata, abi.encode(...) - /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message. - function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external returns (uint64 msgId) { - bytes memory data = abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, data) - _fnSelector, - bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector - _data - ); - - (bool success, bytes memory res) = _to.call(data); - require(success, "Call failure"); - } - - /// @dev Snapshots can be saved a maximum of once per epoch. - /// Saves snapshot of state root. - /// `O(log(count))` where count number of messages in the inbox. - function saveSnapshot() external { - revert("Not Implemented"); - } - - /// @dev Verifies and relays the message. - /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication. - /// @param _proof The merkle proof to prove the message. - /// @param _msgId The zero based index of the message in the inbox. - /// @param _to The address to send the message to. - /// @param _message The message to relay. - function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external { - revert("Not Implemented"); - } - - /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge. - /// Note: Access restricted to canonical bridge. - /// @param _epoch The epoch to verify. - /// @param _stateRoot The true state root for the epoch. - /// @param _claim The claim associated with the epoch. - function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external { - revert("Not Implemented"); - } - - /* solhint-enable */ -} diff --git a/contracts/src/kleros-v1/interfaces/IArbitrableV1.sol b/contracts/src/kleros-v1/interfaces/IArbitrableV1.sol deleted file mode 100644 index f6fe5eb99..000000000 --- a/contracts/src/kleros-v1/interfaces/IArbitrableV1.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./IArbitratorV1.sol"; - -/// @title IArbitrable -/// Arbitrable interface compliant with ERC-792. -/// When developing arbitrable contracts, we need to: -/// - Define the action taken when a ruling is received by the contract. -/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData); -interface IArbitrableV1 { - /// @dev To be raised when a ruling is given. - /// @param _arbitrator The arbitrator giving the ruling. - /// @param _disputeID ID of the dispute in the Arbitrator contract. - /// @param _ruling The ruling which was given. - event Ruling(IArbitratorV1 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling); - - /// @dev Give a ruling for a dispute. Must be called by the arbitrator. - /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract. - /// @param _disputeID ID of the dispute in the Arbitrator contract. - /// @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for "Not able/wanting to make a decision". - function rule(uint256 _disputeID, uint256 _ruling) external; -} diff --git a/contracts/src/kleros-v1/interfaces/IArbitratorV1.sol b/contracts/src/kleros-v1/interfaces/IArbitratorV1.sol deleted file mode 100644 index 52d6c4d48..000000000 --- a/contracts/src/kleros-v1/interfaces/IArbitratorV1.sol +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./IArbitrableV1.sol"; - -/// @title Arbitrator -/// Arbitrator abstract contract compliant with ERC-792. -/// When developing arbitrator contracts we need to: -/// - Define the functions for dispute creation (createDispute) and appeal (appeal). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes). -/// - Define the functions for cost display (arbitrationCost and appealCost). -/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling). -interface IArbitratorV1 { - enum DisputeStatus { - Waiting, - Appealable, - Solved - } - - /// @dev To be emitted when a dispute is created. - /// @param _disputeID ID of the dispute. - /// @param _arbitrable The contract which created the dispute. - event DisputeCreation(uint256 indexed _disputeID, IArbitrableV1 indexed _arbitrable); - - /// @dev To be emitted when a dispute can be appealed. - /// @param _disputeID ID of the dispute. - /// @param _arbitrable The contract which created the dispute. - event AppealPossible(uint256 indexed _disputeID, IArbitrableV1 indexed _arbitrable); - - /// @dev To be emitted when the current ruling is appealed. - /// @param _disputeID ID of the dispute. - /// @param _arbitrable The contract which created the dispute. - event AppealDecision(uint256 indexed _disputeID, IArbitrableV1 indexed _arbitrable); - - /// @dev Create a dispute. Must be called by the arbitrable contract. - /// Must be paid at least arbitrationCost(_extraData). - /// @param _choices Amount of choices the arbitrator can make in this dispute. - /// @param _extraData Can be used to give additional info on the dispute to be created. - /// @return disputeID ID of the dispute created. - function createDispute(uint256 _choices, bytes calldata _extraData) external payable returns (uint256 disputeID); - - /// @dev Compute the cost of arbitration. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _extraData Can be used to give additional info on the dispute to be created. - /// @return cost Amount to be paid. - function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost); - - /// @dev Appeal a ruling. Note that it has to be called before the arbitrator contract calls rule. - /// @param _disputeID ID of the dispute to be appealed. - /// @param _extraData Can be used to give extra info on the appeal. - function appeal(uint256 _disputeID, bytes calldata _extraData) external payable; - - /// @dev Compute the cost of appeal. It is recommended not to increase it often, as it can be higly time and gas consuming for the arbitrated contracts to cope with fee augmentation. - /// @param _disputeID ID of the dispute to be appealed. - /// @param _extraData Can be used to give additional info on the dispute to be created. - /// @return cost Amount to be paid. - function appealCost(uint256 _disputeID, bytes calldata _extraData) external view returns (uint256 cost); - - /// @dev Compute the start and end of the dispute's current or next appeal period, if possible. If not known or appeal is impossible: should return (0, 0). - /// @param _disputeID ID of the dispute. - /// @return start The start of the period. - /// @return end The end of the period. - function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end); - - /// @dev Return the status of a dispute. - /// @param _disputeID ID of the dispute to rule. - /// @return status The status of the dispute. - function disputeStatus(uint256 _disputeID) external view returns (DisputeStatus status); - - /// @dev Return the current ruling of a dispute. This is useful for parties to know if they should appeal. - /// @param _disputeID ID of the dispute. - /// @return ruling The ruling which has been given or the one which will be given if there is no appeal. - function currentRuling(uint256 _disputeID) external view returns (uint256 ruling); -} diff --git a/contracts/src/kleros-v1/interfaces/IEvidenceV1.sol b/contracts/src/kleros-v1/interfaces/IEvidenceV1.sol deleted file mode 100644 index 4c7ad5641..000000000 --- a/contracts/src/kleros-v1/interfaces/IEvidenceV1.sol +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -/** - * @authors: [@ferittuncer, @hbarcelos] - * @reviewers: [] - * @auditors: [] - * @bounties: [] - * @deployments: [] - */ -import "./IArbitratorV1.sol"; - -/// @title IMetaEvidence -/// ERC-1497: Evidence Standard excluding evidence emission as it will be handled by the arbitrator. -interface IEvidenceV1 { - /// @dev To be emitted when meta-evidence is submitted. - /// @param _metaEvidenceID Unique identifier of meta-evidence. - /// @param _evidence IPFS path to metaevidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/metaevidence.json' - event MetaEvidence(uint256 indexed _metaEvidenceID, string _evidence); - - /// @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations). - /// @param _arbitrator The arbitrator of the contract. - /// @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to. - /// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party. - /// @param _evidence IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json' - event Evidence( - IArbitratorV1 indexed _arbitrator, - uint256 indexed _evidenceGroupID, - address indexed _party, - string _evidence - ); - - /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID. - /// @param _arbitrator The arbitrator of the contract. - /// @param _disputeID ID of the dispute in the Arbitrator contract. - /// @param _metaEvidenceID Unique identifier of meta-evidence. - /// @param _evidenceGroupID Unique identifier of the evidence group that is linked to this dispute. - event Dispute( - IArbitratorV1 indexed _arbitrator, - uint256 indexed _disputeID, - uint256 _metaEvidenceID, - uint256 _evidenceGroupID - ); -} diff --git a/contracts/src/kleros-v1/interfaces/IKlerosLiquid.sol b/contracts/src/kleros-v1/interfaces/IKlerosLiquid.sol deleted file mode 100644 index 56d3c7789..000000000 --- a/contracts/src/kleros-v1/interfaces/IKlerosLiquid.sol +++ /dev/null @@ -1,106 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./IArbitratorV1.sol"; - -interface IKlerosLiquid is IArbitratorV1 { - enum Period { - evidence, // Evidence can be submitted. This is also when drawing has to take place. - commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes. - vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not. - appeal, // The dispute can be appealed. - execution // Tokens are redistributed and the ruling is executed. - } - - enum Phase { - staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors. - generating, // Waiting for a random number. Pass as soon as it is ready. - drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes. - } - - struct Court { - uint96 parent; // The parent court. - uint256[] children; // List of child courts. - bool hiddenVotes; // Whether to use commit and reveal or not. - uint256 minStake; // Minimum tokens needed to stake in the court. - uint256 alpha; // Basis point of tokens that are lost when incoherent. - uint256 feeForJuror; // Arbitration fee paid per juror. - // The appeal after the one that reaches this number of jurors will go to the parent court if any, otherwise, no more appeals are possible. - uint256 jurorsForCourtJump; - uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`. - } - - struct Dispute { - // Note that appeal `0` is equivalent to the first round of the dispute. - uint96 subcourtID; // The ID of the subcourt the dispute is in. - address arbitrated; // The arbitrated arbitrable contract. - // The number of choices jurors have when voting. This does not include choice `0` which is reserved for "refuse to arbitrate"/"no ruling". - uint256 numberOfChoices; - Period period; // The current period of the dispute. - uint256 lastPeriodChange; // The last time the period was changed. - uint256 drawsInRound; // A counter of draws made in the current round. - uint256 commitsInRound; // A counter of commits made in the current round. - bool ruled; // True if the ruling has been executed, false otherwise. - } - - struct Juror { - uint256 stakedTokens; // The juror's total amount of tokens staked in subcourts. - uint256 lockedTokens; // The juror's total amount of tokens locked in disputes. - } - - function courts( - uint256 _index - ) - external - view - returns ( - uint96 parent, - bool hiddenVotes, - uint256 minStake, - uint256 alpha, - uint256 feeForJuror, - uint256 jurorsForCourtJump - ); - - function phase() external view returns (Phase); - - function lockInsolventTransfers() external view returns (bool); - - function minStakingTime() external view returns (uint256); - - function pinakion() external view returns (address); - - function disputes(uint256 _index) external view returns (Dispute memory); - - function jurors(address _account) external view returns (Juror memory); - - function changeSubcourtTimesPerPeriod(uint96 _subcourtID, uint256[4] calldata _timesPerPeriod) external; - - function executeOwnerProposal(address _destination, uint256 _amount, bytes calldata _data) external; - - // Getters - function getVote( - uint256 _disputeID, - uint256 _appeal, - uint256 _voteID - ) external view returns (address account, bytes32 commit, uint256 choice, bool voted); - - function getDispute( - uint256 _disputeID - ) - external - view - returns ( - uint256[] memory votesLengths, - uint256[] memory tokensAtStakePerJuror, - uint256[] memory totalFeesForJurors, - uint256[] memory votesInEachRound, - uint256[] memory repartitionsInEachRound, - uint256[] memory penaltiesInEachRound - ); - - function getSubcourt( - uint96 _subcourtID - ) external view returns (uint256[] memory children, uint256[4] memory timesPerPeriod); -} diff --git a/contracts/src/kleros-v1/interfaces/ITokenController.sol b/contracts/src/kleros-v1/interfaces/ITokenController.sol deleted file mode 100644 index c83b6a3e4..000000000 --- a/contracts/src/kleros-v1/interfaces/ITokenController.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -/// @dev The token controller contract must implement these functions. See https://github.com/Giveth/minime/blob/master/contracts/TokenController.sol -interface ITokenController { - /// @notice Called when `_owner` sends ether to the MiniMe Token contract - /// @param _owner The address that sent the ether to create tokens - /// @return True if the ether is accepted, false if it throws - function proxyPayment(address _owner) external payable returns (bool); - - /// @notice Notifies the controller about a token transfer allowing the controller to react if desired - /// @param _from The origin of the transfer - /// @param _to The destination of the transfer - /// @param _amount The amount of the transfer - /// @return False if the controller does not authorize the transfer - function onTransfer(address _from, address _to, uint256 _amount) external returns (bool); - - /// @notice Notifies the controller about an approval allowing the controller to react if desired - /// @param _owner The address that calls `approve()` - /// @param _spender The spender in the `approve()` call - /// @param _amount The amount in the `approve()` call - /// @return False if the controller does not authorize the approval - function onApprove(address _owner, address _spender, uint256 _amount) external returns (bool); -} diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/WrappedPinakion.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/WrappedPinakion.sol deleted file mode 100644 index 5f3e997d0..000000000 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/WrappedPinakion.sol +++ /dev/null @@ -1,299 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; -import "../interfaces/ITokenController.sol"; -import "./interfaces/ITokenBridge.sol"; -import "./interfaces/IERC677.sol"; - -contract WrappedPinakion is Initializable { - // ************************************* // - // * Events * // - // ************************************* // - - /// @notice Emitted when `value` tokens are moved from one account (`from`) to another (`to`). - /// @dev Notice that `value` may be zero. - event Transfer(address indexed from, address indexed to, uint256 value); - - /// @notice Emitted when the allowance of a `spender` for an `owner` is set by - /// a call to {approve}. `value` is the new allowance. - event Approval(address indexed owner, address indexed spender, uint256 value); - - // ************************************* // - // * Storage * // - // ************************************* // - - mapping(address => uint256) private balances; - mapping(address => mapping(address => uint256)) public allowance; - - /// @notice Total supply of the token. Equals the total xPinakion deposit into the contract. - uint256 public totalSupply; - - /// @notice Name of the token. - string public name; - - /// @notice Symbol of the token. - string public symbol; - - /// @notice Number of decimals of the token. - uint8 public decimals; - - /// @notice The token's controller. - address public controller; - - /// @notice Bridged PNK on xDai to be wrapped. This token is upgradeable. - IERC677 public xPinakion; - - /// @notice xDai Token Bridge. The Token Bridge is upgradeable. - ITokenBridge public tokenBridge; - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - /// @dev Verifies that the sender has ability to modify controlled parameters. - modifier onlyController() { - require(controller == msg.sender, "The caller is not the controller."); - _; - } - - // ************************************* // - // * Initializer * // - // ************************************* // - - /// @dev Initializer. - /// @param _name for the wrapped PNK on the home chain. - /// @param _symbol for wrapped PNK ticker on the home chain. - /// @param _xPinakion the home PNK contract which is already bridged to the foreign PNK contract. - /// @param _tokenBridge the TokenBridge contract. - function initialize( - string memory _name, - string memory _symbol, - IERC677 _xPinakion, - ITokenBridge _tokenBridge - ) public initializer { - name = _name; - symbol = _symbol; - decimals = 18; - xPinakion = _xPinakion; - tokenBridge = _tokenBridge; - controller = msg.sender; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @param _controller The new controller of the contract - function changeController(address _controller) external onlyController { - controller = _controller; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @notice Converts bridged PNK (xPinakion) into wrapped PNK which can be staked in KlerosLiquid. - /// @param _amount The amount of wrapped pinakions to mint. - function deposit(uint256 _amount) external { - _mint(msg.sender, _amount); - require( - xPinakion.transferFrom(msg.sender, address(this), _amount), - "Sender does not have enough approved funds." - ); - } - - /// @notice IERC20 Receiver functionality. - /// @dev Converts bridged PNK (xPinakion) into wrapped PNK which can be staked in KlerosLiquid. - /// If the tokenBridge is calling this function, then this contract has already received - /// the xPinakion tokens. Notice that the Home bridge calls onTokenBridge as a result of - /// someone invoking `relayTokensAndCall()` on the Foreign bridge contract. - /// @param _token The token address the _amount belongs to. - /// @param _amount The amount of wrapped PNK to mint. - /// @param _data Calldata containing the address of the recipient. - /// Notice that the address has to be padded to the right 32 bytes. - function onTokenBridged(address _token, uint256 _amount, bytes calldata _data) external { - require(msg.sender == address(tokenBridge), "Sender not authorized."); - require(_token == address(xPinakion), "Token bridged is not xPinakion."); - - address recipient; - assembly { - recipient := calldataload(0x84) - } - _mint(recipient, _amount); - } - - /// @notice Converts wrapped PNK back into bridged PNK (xPinakion). - /// @param _amount The amount of bridged PNK to withdraw. - function withdraw(uint256 _amount) external { - _burn(_amount); - require(xPinakion.transfer(msg.sender, _amount), "The `transfer` function must not fail."); - } - - /// @notice Converts wrapped PNK back into PNK using the Token Bridge. - /// @dev This function is not strictly needed, but it provides a good UX to users who want to get their Mainnet's PNK back. - /// What normally takes 3 transactions, here is done in one go. - /// Notice that the PNK have to be claimed on Mainnet's TokenBridge by the receiver. - /// @param _amount The amount of PNK to withdraw. - /// @param _receiver The address which will receive the PNK back in the foreign chain. - function withdrawAndConvertToPNK(uint256 _amount, address _receiver) external { - _burn(_amount); - // Using approve is safe here, because this contract approves the bridge to spend the tokens and triggers the relay immediately. - xPinakion.approve(address(tokenBridge), _amount); - tokenBridge.relayTokens(xPinakion, _receiver, _amount); - } - - /// @notice Moves `_amount` tokens from the caller's account to `_recipient`. - /// @param _recipient The entity receiving the funds. - /// @param _amount The amount to tranfer in base units. - /// @return True on success. - function transfer(address _recipient, uint256 _amount) public returns (bool) { - if (isContract(controller)) { - require( - ITokenController(controller).onTransfer(msg.sender, _recipient, _amount), - "Token controller rejects transfer." - ); - } - balances[msg.sender] = balances[msg.sender] - _amount; // ERC20: transfer amount exceeds balance - balances[_recipient] = balances[_recipient] + _amount; - emit Transfer(msg.sender, _recipient, _amount); - return true; - } - - /// @notice Moves `_amount` tokens from `_sender` to `_recipient` using the - /// allowance mechanism. `_amount` is then deducted from the caller's allowance. - /// @param _sender The entity to take the funds from. - /// @param _recipient The entity receiving the funds. - /// @param _amount The amount to tranfer in base units. - /// @return True on success. - function transferFrom(address _sender, address _recipient, uint256 _amount) public returns (bool) { - if (isContract(controller)) { - require( - ITokenController(controller).onTransfer(_sender, _recipient, _amount), - "Token controller rejects transfer." - ); - } - - // The controller of this contract can move tokens around at will, - // this is important to recognize! Confirm that you trust the - // controller of this contract, which in most situations should be - // another open source smart contract or 0x0. - if (msg.sender != controller) { - allowance[_sender][msg.sender] = allowance[_sender][msg.sender] - _amount; // ERC20: transfer amount exceeds allowance. - } - - balances[_sender] = balances[_sender] - _amount; // ERC20: transfer amount exceeds balance - balances[_recipient] = balances[_recipient] + _amount; - emit Transfer(_sender, _recipient, _amount); - return true; - } - - /// @notice Approves `_spender` to spend `_amount`. - /// @param _spender The entity allowed to spend funds. - /// @param _amount The amount of base units the entity will be allowed to spend. - /// @return True on success. - function approve(address _spender, uint256 _amount) public returns (bool) { - // Alerts the token controller of the approve function call - if (isContract(controller)) { - require( - ITokenController(controller).onApprove(msg.sender, _spender, _amount), - "Token controller does not approve." - ); - } - - allowance[msg.sender][_spender] = _amount; - emit Approval(msg.sender, _spender, _amount); - return true; - } - - /// @notice Increases the `_spender` allowance by `_addedValue`. - /// @param _spender The entity allowed to spend funds. - /// @param _addedValue The amount of extra base units the entity will be allowed to spend. - /// @return True on success. - function increaseAllowance(address _spender, uint256 _addedValue) public returns (bool) { - uint256 newAllowance = allowance[msg.sender][_spender] + _addedValue; - // Alerts the token controller of the approve function call - if (isContract(controller)) { - require( - ITokenController(controller).onApprove(msg.sender, _spender, newAllowance), - "Token controller does not approve." - ); - } - - allowance[msg.sender][_spender] = newAllowance; - emit Approval(msg.sender, _spender, newAllowance); - return true; - } - - /// @notice Decreases the `_spender` allowance by `_subtractedValue`. - /// @param _spender The entity whose spending allocation will be reduced. - /// @param _subtractedValue The reduction of spending allocation in base units. - /// @return True on success. - function decreaseAllowance(address _spender, uint256 _subtractedValue) public returns (bool) { - uint256 newAllowance = allowance[msg.sender][_spender] - _subtractedValue; // ERC20: decreased allowance below zero - // Alerts the token controller of the approve function call - if (isContract(controller)) { - require( - ITokenController(controller).onApprove(msg.sender, _spender, newAllowance), - "Token controller does not approve." - ); - } - - allowance[msg.sender][_spender] = newAllowance; - emit Approval(msg.sender, _spender, newAllowance); - return true; - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Internal function that mints an amount of the token and assigns it to - /// an account. This encapsulates the modification of balances such that the - /// proper events are emitted. - /// @param _recipient The address which will receive the minted tokens. - /// @param _amount The amount that will be created. - function _mint(address _recipient, uint256 _amount) internal { - totalSupply = totalSupply + _amount; - balances[_recipient] = balances[_recipient] + _amount; - emit Transfer(address(0x0), _recipient, _amount); - } - - /// @dev Destroys `_amount` tokens from the caller. Cannot burn locked tokens. - /// @param _amount The quantity of tokens to burn in base units. - function _burn(uint256 _amount) internal { - if (isContract(controller)) { - require( - ITokenController(controller).onTransfer(msg.sender, address(0x0), _amount), - "Token controller rejects transfer." - ); - } - balances[msg.sender] = balances[msg.sender] - _amount; // ERC20: burn amount exceeds balance - totalSupply = totalSupply - _amount; - emit Transfer(msg.sender, address(0x0), _amount); - } - - /// @dev Internal function to determine if an address is a contract. - /// @param _addr The address being queried. - /// @return True if `_addr` is a contract. - function isContract(address _addr) internal view returns (bool) { - uint256 size; - if (_addr == address(0)) return false; - assembly { - size := extcodesize(_addr) - } - return size > 0; - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Gets the balance of the specified address. - /// @param _owner The address to query the balance of. - /// @return uint256 value representing the amount owned by the passed address. - function balanceOf(address _owner) public view returns (uint256) { - return balances[_owner]; - } -} diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IERC677.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IERC677.sol deleted file mode 100644 index c013c226b..000000000 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IERC677.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -interface IERC677 { - function transfer(address _to, uint256 _value) external returns (bool); - - function transferFrom(address _from, address _to, uint256 _value) external returns (bool); - - function approve(address _spender, uint256 _value) external returns (bool); -} diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IRandomAuRa.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IRandomAuRa.sol deleted file mode 100644 index 00b281482..000000000 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IRandomAuRa.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -interface IRandomAuRa { - function currentSeed() external view returns (uint256); - - function isCommitPhase() external view returns (bool); - - function nextCommitPhaseStartBlock() external view returns (uint256); - - function collectRoundLength() external view returns (uint256); -} diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/ITokenBridge.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/ITokenBridge.sol deleted file mode 100644 index a00e8b8ea..000000000 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/ITokenBridge.sol +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./IERC677.sol"; - -interface ITokenBridge { - function relayTokens(IERC677 token, address _receiver, uint256 _value) external; -} diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol deleted file mode 100644 index 59ff80353..000000000 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol +++ /dev/null @@ -1,745 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {IArbitratorV2, IArbitrableV2} from "../../arbitration/interfaces/IArbitratorV2.sol"; -import {ITokenController} from "../interfaces/ITokenController.sol"; -import {WrappedPinakion} from "./WrappedPinakion.sol"; -import {IRandomAuRa} from "./interfaces/IRandomAuRa.sol"; - -import {SortitionSumTreeFactory} from "../libraries/SortitionSumTreeFactory.sol"; -import "../../gateway/interfaces/IForeignGateway.sol"; - -/// @title xKlerosLiquidV2 -/// @dev This contract is an adaption of Mainnet's KlerosLiquid (https://github.com/kleros/kleros/blob/69cfbfb2128c29f1625b3a99a3183540772fda08/contracts/kleros/KlerosLiquid.sol) -/// for xDai chain. Notice that variables referring to ETH values in this contract, will hold the native token values of the chain on which xKlerosLiquid is deployed. -/// When this contract gets deployed on xDai chain, ETH variables will hold xDai values. -/// @custom:oz-upgrades-unsafe-allow external-library-linking -contract xKlerosLiquidV2 is Initializable, ITokenController, IArbitratorV2 { - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - // General - enum Phase { - staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors. - generating, // Waiting for a random number. Pass as soon as it is ready. - drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes. - } - - // Dispute - enum Period { - evidence, // Evidence can be submitted. This is also when drawing has to take place. - commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes. - vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not. - appeal, // The dispute can be appealed. - execution // Tokens are redistributed and the ruling is executed. - } - - // General - struct Court { - uint96 parent; // The parent court. - uint256[] children; // List of child courts. - bool hiddenVotes; // Whether to use commit and reveal or not. - uint256 minStake; // Minimum tokens needed to stake in the court. - uint256 alpha; // Basis point of tokens that are lost when incoherent. - uint256 feeForJuror; // Arbitration fee paid per juror. - // The appeal after the one that reaches this number of jurors will go to the parent court if any, otherwise, no more appeals are possible. - uint256 jurorsForCourtJump; - uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`. - } - struct DelayedSetStake { - address account; // The address of the juror. - uint96 subcourtID; // The ID of the subcourt. - uint128 stake; // The new stake. - } - - // Dispute - struct Vote { - address account; // The address of the juror. - bytes32 commit; // The commit of the juror. For courts with hidden votes. - uint256 choice; // The choice of the juror. - bool voted; // True if the vote has been cast or revealed, false otherwise. - } - struct VoteCounter { - // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first. - uint256 winningChoice; - mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`. - bool tied; // True if there is a tie, false otherwise. - } - struct Dispute { - // Note that appeal `0` is equivalent to the first round of the dispute. - uint96 subcourtID; // The ID of the subcourt the dispute is in. - IArbitrableV2 arbitrated; // The arbitrated arbitrable contract. - // The number of choices jurors have when voting. This does not include choice `0` which is reserved for "refuse to arbitrate"/"no ruling". - uint256 numberOfChoices; - Period period; // The current period of the dispute. - uint256 lastPeriodChange; // The last time the period was changed. - // The votes in the form `votes[appeal][voteID]`. On each round, a new list is pushed and packed with as many empty votes as there are draws. We use `dispute.votes.length` to get the number of appeals plus 1 for the first round. - Vote[][] votes; - VoteCounter[] voteCounters; // The vote counters in the form `voteCounters[appeal]`. - uint256[] tokensAtStakePerJuror; // The amount of tokens at stake for each juror in the form `tokensAtStakePerJuror[appeal]`. - uint256[] totalFeesForJurors; // The total juror fees paid in the form `totalFeesForJurors[appeal]`. - uint256 drawsInRound; // A counter of draws made in the current round. - uint256 commitsInRound; // A counter of commits made in the current round. - uint256[] votesInEachRound; // A counter of votes made in each round in the form `votesInEachRound[appeal]`. - // A counter of vote reward repartitions made in each round in the form `repartitionsInEachRound[appeal]`. - uint256[] repartitionsInEachRound; - uint256[] penaltiesInEachRound; // The amount of tokens collected from penalties in each round in the form `penaltiesInEachRound[appeal]`. - bool ruled; // True if the ruling has been executed, false otherwise. - } - - // Juror - struct Juror { - // The IDs of subcourts where the juror has stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`. - uint96[] subcourtIDs; - uint256 stakedTokens; // The juror's total amount of tokens staked in subcourts. - uint256 lockedTokens; // The juror's total amount of tokens locked in disputes. - } - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev Emitted when we pass to a new phase. - /// @param _phase The new phase. - event NewPhase(Phase _phase); - - /// @dev Emitted when a dispute passes to a new period. - /// @param _disputeID The ID of the dispute. - /// @param _period The new period. - event NewPeriod(uint256 indexed _disputeID, Period _period); - - /// @dev Emitted when a juror's stake is set. - /// @param _address The address of the juror. - /// @param _subcourtID The ID of the subcourt at the end of the stake path. - /// @param _stake The new stake. - /// @param _newTotalStake The new total stake. - event StakeSet(address indexed _address, uint256 _subcourtID, uint128 _stake, uint256 _newTotalStake); - - /// @dev Emitted when a juror is drawn. - /// @param _address The drawn address. - /// @param _disputeID The ID of the dispute. - /// @param _appeal The appeal the draw is for. 0 is for the first round. - /// @param _voteID The vote ID. - event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _appeal, uint256 _voteID); - - /// @dev Emitted when a juror wins or loses tokens and ETH from a dispute. - /// @param _address The juror affected. - /// @param _disputeID The ID of the dispute. - /// @param _tokenAmount The amount of tokens won or lost. - /// @param _ETHAmount The amount of ETH won or lost. - event TokenAndETHShift(address indexed _address, uint256 indexed _disputeID, int _tokenAmount, int _ETHAmount); - - // ************************************* // - // * Storage * // - // ************************************* // - - // General Constants - uint256 public constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have. - uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute. - uint256 public constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH. - // General Contracts - address public owner; // The owner of the contract. - WrappedPinakion public pinakion; // The Pinakion token contract. - IRandomAuRa public RNGenerator; // The random number generator contract. - // General Dynamic - Phase public phase; // The current phase. - uint256 public lastPhaseChange; // The last time the phase was changed. - uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors. - // The block number to get the next random number from. Used so there is at least a 1 block difference from the staking phase. - uint256 public RNBlock; - uint256 public RN; // The current random number. - uint256 public minStakingTime; // The minimum staking time. - uint256 public maxDrawingTime; // The maximum drawing time. - // True if insolvent (`balance < stakedTokens || balance < lockedTokens`) token transfers should be blocked. Used to avoid blocking penalties. - bool public lockInsolventTransfers; - // General Storage - Court[] public courts; // The subcourts. - using SortitionSumTreeFactory for SortitionSumTreeFactory.SortitionSumTrees; // Use library functions for sortition sum trees. - SortitionSumTreeFactory.SortitionSumTrees internal sortitionSumTrees; // The sortition sum trees. - // The delayed calls to `_setStake`. Used to schedule `_setStake`s when not in the staking phase. - mapping(uint256 => DelayedSetStake) public delayedSetStakes; - // The index of the next `delayedSetStakes` item to execute. Starts at 1 because `lastDelayedSetStake` starts at 0. - uint256 public nextDelayedSetStake; - uint256 public lastDelayedSetStake; // The index of the last `delayedSetStakes` item. 0 is skipped because it is the initial value. - - // Dispute - // Use a mapping instead of an array so that upgrading (appending variables to) the Dispute struct is possible without big layout changes. - mapping(uint256 disputeId => Dispute) public disputes; // The disputes. - uint256 public totalDisputes; - - // Juror - mapping(address account => Juror) public jurors; // The jurors. - - IForeignGateway public foreignGateway; // Foreign gateway contract. - - mapping(uint256 disputeId => uint256 rulingId) public disputesRuling; - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - /// @dev Requires a specific phase. - /// @param _phase The required phase. - modifier onlyDuringPhase(Phase _phase) { - require(phase == _phase); - _; - } - - /// @dev Requires a specific period in a dispute. - /// @param _disputeID The ID of the dispute. - /// @param _period The required period. - modifier onlyDuringPeriod(uint256 _disputeID, Period _period) { - require(disputes[_disputeID].period == _period); - _; - } - - /// @dev Requires that the sender is the owner. Note that the owner is expected to not be malicious. - modifier onlyByOwner() { - require(owner == msg.sender); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructs the KlerosLiquid contract. - /// @param _owner The owner's address. - /// @param _pinakion The address of the token contract. - /// @param _RNGenerator The address of the random number generator contract. - /// @param _minStakingTime The minimum time that the staking phase should last. - /// @param _maxDrawingTime The maximum time that the drawing phase should last. - /// @param _hiddenVotes The `hiddenVotes` property value of the general court. - /// @param _courtParameters MinStake, alpha, feeForJuror and jurorsForCourtJump respectively. - /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court. - /// @param _sortitionSumTreeK The number of children per node of the general court's sortition sum tree. - /// @param _foreignGateway Foreign gateway on xDai. - function initialize( - address _owner, - WrappedPinakion _pinakion, - IRandomAuRa _RNGenerator, - uint256 _minStakingTime, - uint256 _maxDrawingTime, - bool _hiddenVotes, - uint256[4] memory _courtParameters, - uint256[4] memory _timesPerPeriod, - uint256 _sortitionSumTreeK, - IForeignGateway _foreignGateway - ) public initializer { - // Initialize contract. - owner = _owner; - pinakion = _pinakion; - RNGenerator = _RNGenerator; - minStakingTime = _minStakingTime; - maxDrawingTime = _maxDrawingTime; - phase = Phase.staking; - lastPhaseChange = block.timestamp; - lockInsolventTransfers = true; - if (nextDelayedSetStake == 0) nextDelayedSetStake = 1; - foreignGateway = _foreignGateway; - - // Create the general court. - if (courts.length == 0) { - courts.push( - Court({ - parent: 0, - children: new uint256[](0), - hiddenVotes: _hiddenVotes, - minStake: _courtParameters[0], - alpha: _courtParameters[1], - feeForJuror: _courtParameters[2], - jurorsForCourtJump: _courtParameters[3], - timesPerPeriod: _timesPerPeriod - }) - ); - sortitionSumTrees.createTree(bytes32(0), _sortitionSumTreeK); - } - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Lets the owner call anything on behalf of the contract. - /// @param _destination The destination of the call. - /// @param _amount The value sent with the call. - /// @param _data The data sent with the call. - function executeOwnerProposal(address _destination, uint256 _amount, bytes memory _data) external onlyByOwner { - (bool success, ) = _destination.call{value: _amount}(_data); - require(success, "Unsuccessful call"); - } - - /// @dev Changes the `owner` storage variable. - /// @param _owner The new value for the `owner` storage variable. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the `pinakion` storage variable. - /// @param _pinakion The new value for the `pinakion` storage variable. - function changePinakion(WrappedPinakion _pinakion) external onlyByOwner { - pinakion = _pinakion; - } - - /// @dev Changes the `RNGenerator` storage variable. - /// @param _RNGenerator The new value for the `RNGenerator` storage variable. - function changeRNGenerator(IRandomAuRa _RNGenerator) external onlyByOwner { - RNGenerator = _RNGenerator; - if (phase == Phase.generating) { - RNBlock = RNGenerator.nextCommitPhaseStartBlock() + RNGenerator.collectRoundLength(); - } - } - - /// @dev Changes the `minStakingTime` storage variable. - /// @param _minStakingTime The new value for the `minStakingTime` storage variable. - function changeMinStakingTime(uint256 _minStakingTime) external onlyByOwner { - minStakingTime = _minStakingTime; - } - - /// @dev Changes the `maxDrawingTime` storage variable. - /// @param _maxDrawingTime The new value for the `maxDrawingTime` storage variable. - function changeMaxDrawingTime(uint256 _maxDrawingTime) external onlyByOwner { - maxDrawingTime = _maxDrawingTime; - } - - /// @dev Changes the `foreignGateway` storage variable. - /// @param _foreignGateway The new value for the `foreignGateway` storage variable. - function changeForeignGateway(IForeignGateway _foreignGateway) external onlyByOwner { - foreignGateway = _foreignGateway; - } - - /// @dev Creates a subcourt under a specified parent court. - /// @param _parent The `parent` property value of the subcourt. - /// @param _hiddenVotes The `hiddenVotes` property value of the subcourt. - /// @param _minStake The `minStake` property value of the subcourt. - /// @param _alpha The `alpha` property value of the subcourt. - /// @param _feeForJuror The `feeForJuror` property value of the subcourt. - /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the subcourt. - /// @param _timesPerPeriod The `timesPerPeriod` property value of the subcourt. - /// @param _sortitionSumTreeK The number of children per node of the subcourt's sortition sum tree. - function createSubcourt( - uint96 _parent, - bool _hiddenVotes, - uint256 _minStake, - uint256 _alpha, - uint256 _feeForJuror, - uint256 _jurorsForCourtJump, - uint256[4] memory _timesPerPeriod, - uint256 _sortitionSumTreeK - ) external onlyByOwner { - require( - courts[_parent].minStake <= _minStake, - "A subcourt cannot be a child of a subcourt with a higher minimum stake." - ); - - // Create the subcourt. - uint256 subcourtID = courts.length; - Court storage subcourt = courts.push(); - subcourt.parent = _parent; - subcourt.children = new uint256[](0); - subcourt.hiddenVotes = _hiddenVotes; - subcourt.minStake = _minStake; - subcourt.alpha = _alpha; - subcourt.feeForJuror = _feeForJuror; - subcourt.jurorsForCourtJump = _jurorsForCourtJump; - subcourt.timesPerPeriod = _timesPerPeriod; - sortitionSumTrees.createTree(bytes32(subcourtID), _sortitionSumTreeK); - - // Update the parent. - courts[_parent].children.push(subcourtID); - } - - /// @dev Changes the `minStake` property value of a specified subcourt. Don't set to a value lower than its parent's `minStake` property value. - /// @param _subcourtID The ID of the subcourt. - /// @param _minStake The new value for the `minStake` property value. - function changeSubcourtMinStake(uint96 _subcourtID, uint256 _minStake) external onlyByOwner { - require(_subcourtID == 0 || courts[courts[_subcourtID].parent].minStake <= _minStake); - for (uint256 i = 0; i < courts[_subcourtID].children.length; i++) { - require( - courts[courts[_subcourtID].children[i]].minStake >= _minStake, - "A subcourt cannot be the parent of a subcourt with a lower minimum stake." - ); - } - - courts[_subcourtID].minStake = _minStake; - } - - /// @dev Changes the `alpha` property value of a specified subcourt. - /// @param _subcourtID The ID of the subcourt. - /// @param _alpha The new value for the `alpha` property value. - function changeSubcourtAlpha(uint96 _subcourtID, uint256 _alpha) external onlyByOwner { - courts[_subcourtID].alpha = _alpha; - } - - /// @dev Changes the `feeForJuror` property value of a specified subcourt. - /// @param _subcourtID The ID of the subcourt. - /// @param _feeForJuror The new value for the `feeForJuror` property value. - function changeSubcourtJurorFee(uint96 _subcourtID, uint256 _feeForJuror) external onlyByOwner { - courts[_subcourtID].feeForJuror = _feeForJuror; - } - - /// @dev Changes the `jurorsForCourtJump` property value of a specified subcourt. - /// @param _subcourtID The ID of the subcourt. - /// @param _jurorsForCourtJump The new value for the `jurorsForCourtJump` property value. - function changeSubcourtJurorsForJump(uint96 _subcourtID, uint256 _jurorsForCourtJump) external onlyByOwner { - courts[_subcourtID].jurorsForCourtJump = _jurorsForCourtJump; - } - - /// @dev Changes the `timesPerPeriod` property value of a specified subcourt. - /// @param _subcourtID The ID of the subcourt. - /// @param _timesPerPeriod The new value for the `timesPerPeriod` property value. - function changeSubcourtTimesPerPeriod(uint96 _subcourtID, uint256[4] memory _timesPerPeriod) external onlyByOwner { - courts[_subcourtID].timesPerPeriod = _timesPerPeriod; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Sets the caller's stake in a subcourt. - /// @param _subcourtID The ID of the subcourt. - /// @param _stake The new stake. - function setStake(uint96 _subcourtID, uint128 _stake) external { - require(_setStake(msg.sender, _subcourtID, _stake)); - } - - /// @dev Executes the next delayed set stakes. - /// `O(n)` where `n` is the number of iterations to run. - /// @param _iterations The number of delayed set stakes to execute. - function executeDelayedSetStakes(uint256 _iterations) external onlyDuringPhase(Phase.staking) { - uint256 actualIterations = (nextDelayedSetStake + _iterations) - 1 > lastDelayedSetStake - ? (lastDelayedSetStake - nextDelayedSetStake) + 1 - : _iterations; - uint256 newNextDelayedSetStake = nextDelayedSetStake + actualIterations; - require(newNextDelayedSetStake >= nextDelayedSetStake); - for (uint256 i = nextDelayedSetStake; i < newNextDelayedSetStake; i++) { - DelayedSetStake storage delayedSetStake = delayedSetStakes[i]; - _setStake(delayedSetStake.account, delayedSetStake.subcourtID, delayedSetStake.stake); - delete delayedSetStakes[i]; - } - nextDelayedSetStake = newNextDelayedSetStake; - } - - /// @dev Receive the ruling from foreign gateway which technically is an arbitrator of this contract. - /// @param _disputeID ID of the dispute. - /// @param _ruling Ruling given by V2 court and relayed by foreign gateway. - function rule(uint256 _disputeID, uint256 _ruling) external { - require(_disputeID < totalDisputes, "Dispute ID does not exist."); - require(msg.sender == address(foreignGateway), "Can only be called by gateway"); - - Dispute storage dispute = disputes[_disputeID]; - require(!dispute.ruled, "Ruling already executed."); - dispute.ruled = true; - disputesRuling[_disputeID] = _ruling; - - // Send the relayed ruling to the arbitrable while fully bypassing the dispute flow. - dispute.arbitrated.rule(_disputeID, _ruling); - - emit Ruling(dispute.arbitrated, _disputeID, _ruling); - } - - /// Public - - /// @dev Creates a dispute. Must be called by the arbitrable contract. - /// @param _numberOfChoices Number of choices to choose from in the dispute to be created. - /// @param _extraData Additional info about the dispute to be created. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes) and the minimum number of jurors required (next 32 bytes). - /// @return disputeID The ID of the created dispute. - function createDispute( - uint256 _numberOfChoices, - bytes memory _extraData - ) public payable override returns (uint256 disputeID) { - require(msg.value >= arbitrationCost(_extraData), "Arbitration fees: not enough"); - - disputeID = totalDisputes++; - Dispute storage dispute = disputes[disputeID]; - dispute.arbitrated = IArbitrableV2(msg.sender); - - // The V2 subcourtID is off by one - (uint96 subcourtID, uint256 minJurors) = extraDataToSubcourtIDAndMinJurors(_extraData); - bytes memory extraDataV2 = abi.encode(uint256(subcourtID + 1), minJurors); - - foreignGateway.createDispute{value: msg.value}(_numberOfChoices, extraDataV2); - emit DisputeCreation(disputeID, IArbitrableV2(msg.sender)); - } - - /// @inheritdoc IArbitratorV2 - function createDispute( - uint256 /*_choices*/, - bytes calldata /*_extraData*/, - IERC20 /*_feeToken*/, - uint256 /*_feeAmount*/ - ) external override returns (uint256) { - revert("Not supported"); - } - - /// @dev DEPRECATED. Called when `_owner` sends ETH to the Wrapped Token contract. - /// @param _owner The address that sent the ETH to create tokens. - /// @return allowed Whether the operation should be allowed or not. - function proxyPayment(address _owner) public payable override returns (bool allowed) { - allowed = false; - } - - /// @dev Notifies the controller about a token transfer allowing the controller to react if desired. - /// @param _from The origin of the transfer. - /// @param _to The destination of the transfer. - /// @param _amount The amount of the transfer. - /// @return allowed Whether the operation should be allowed or not. - function onTransfer(address _from, address _to, uint256 _amount) public override returns (bool allowed) { - if (lockInsolventTransfers) { - // Never block penalties or rewards. - uint256 newBalance = pinakion.balanceOf(_from) - _amount; - if (newBalance < jurors[_from].stakedTokens || newBalance < jurors[_from].lockedTokens) return false; - } - allowed = true; - } - - /// @dev Notifies the controller about an approval allowing the controller to react if desired. - /// @param _owner The address that calls `approve()`. - /// @param _spender The spender in the `approve()` call. - /// @param _amount The amount in the `approve()` call. - /// @return allowed Whether the operation should be allowed or not. - function onApprove(address _owner, address _spender, uint256 _amount) public override returns (bool allowed) { - allowed = true; - } - - // ************************************* // - // * Internal * // - // ************************************* // - - /// @dev Sets the specified juror's stake in a subcourt. - /// `O(n + p * log_k(j))` where - /// `n` is the number of subcourts the juror has staked in, - /// `p` is the depth of the subcourt tree, - /// `k` is the minimum number of children per node of one of these subcourts' sortition sum tree, - /// and `j` is the maximum number of jurors that ever staked in one of these subcourts simultaneously. - /// @param _account The address of the juror. - /// @param _subcourtID The ID of the subcourt. - /// @param _stake The new stake. - /// @return succeeded True if the call succeeded, false otherwise. - function _setStake(address _account, uint96 _subcourtID, uint128 _stake) internal returns (bool succeeded) { - if (!(_subcourtID < courts.length)) return false; - - if (!(_stake == 0 || courts[_subcourtID].minStake <= _stake)) return false; // The juror's stake cannot be lower than the minimum stake for the subcourt. - Juror storage juror = jurors[_account]; - bytes32 stakePathID = accountAndSubcourtIDToStakePathID(_account, _subcourtID); - uint256 currentStake = sortitionSumTrees.stakeOf(bytes32(uint256(_subcourtID)), stakePathID); - if (!(_stake == 0 || currentStake > 0 || juror.subcourtIDs.length < MAX_STAKE_PATHS)) return false; // Maximum stake paths reached. - uint256 newTotalStake = juror.stakedTokens - currentStake + _stake; // Can't overflow because _stake is a uint128. - if (!(_stake == 0 || pinakion.balanceOf(_account) >= newTotalStake)) return false; // The juror's total amount of staked tokens cannot be higher than the juror's balance. - - // Update juror's records. - juror.stakedTokens = newTotalStake; - if (_stake == 0) { - for (uint256 i = 0; i < juror.subcourtIDs.length; i++) - if (juror.subcourtIDs[i] == _subcourtID) { - juror.subcourtIDs[i] = juror.subcourtIDs[juror.subcourtIDs.length - 1]; - juror.subcourtIDs.pop(); - break; - } - } else if (currentStake == 0) juror.subcourtIDs.push(_subcourtID); - - // Update subcourt parents. - bool finished = false; - uint256 currentSubcourtID = _subcourtID; - while (!finished) { - sortitionSumTrees.set(bytes32(currentSubcourtID), _stake, stakePathID); - if (currentSubcourtID == 0) finished = true; - else currentSubcourtID = courts[currentSubcourtID].parent; - } - emit StakeSet(_account, _subcourtID, _stake, newTotalStake); - return true; - } - - /// @dev Gets a subcourt ID and the minimum number of jurors required from a specified extra data bytes array. - /// @param _extraData The extra data bytes array. The first 32 bytes are the subcourt ID and the next 32 bytes are the minimum number of jurors. - /// @return subcourtID The subcourt ID. - /// @return minJurors The minimum number of jurors required. - function extraDataToSubcourtIDAndMinJurors( - bytes memory _extraData - ) internal view returns (uint96 subcourtID, uint256 minJurors) { - if (_extraData.length >= 64) { - assembly { - // solium-disable-line security/no-inline-assembly - subcourtID := mload(add(_extraData, 0x20)) - minJurors := mload(add(_extraData, 0x40)) - } - if (subcourtID >= courts.length) subcourtID = 0; - if (minJurors == 0) minJurors = DEFAULT_NB_OF_JURORS; - } else { - subcourtID = 0; - minJurors = DEFAULT_NB_OF_JURORS; - } - } - - /// @dev Packs an account and a subcourt ID into a stake path ID. - /// @param _account The account to pack. - /// @param _subcourtID The subcourt ID to pack. - /// @return stakePathID The stake path ID. - function accountAndSubcourtIDToStakePathID( - address _account, - uint96 _subcourtID - ) internal pure returns (bytes32 stakePathID) { - assembly { - // solium-disable-line security/no-inline-assembly - let ptr := mload(0x40) - for { - let i := 0x00 - } lt(i, 0x14) { - i := add(i, 0x01) - } { - mstore8(add(ptr, i), byte(add(0x0c, i), _account)) - } - for { - let i := 0x14 - } lt(i, 0x20) { - i := add(i, 0x01) - } { - mstore8(add(ptr, i), byte(i, _subcourtID)) - } - stakePathID := mload(ptr) - } - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @inheritdoc IArbitratorV2 - function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) { - cost = foreignGateway.arbitrationCost(_extraData); - } - - /// @inheritdoc IArbitratorV2 - function arbitrationCost( - bytes calldata /*_extraData*/, - IERC20 /*_feeToken*/ - ) public pure override returns (uint256 /*cost*/) { - revert("Not supported"); - } - - /// @dev Gets the current ruling of a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @return ruling The current ruling. - /// @return tied Whether it's a tie or not. - /// @return overridden Whether the ruling was overridden by appeal funding or not. - function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool /*overridden*/) { - Dispute storage dispute = disputes[_disputeID]; - if (dispute.voteCounters.length == 0) { - ruling = disputesRuling[_disputeID]; - } else { - tied = dispute.voteCounters[dispute.voteCounters.length - 1].tied; - ruling = tied ? 0 : dispute.voteCounters[dispute.voteCounters.length - 1].winningChoice; - } - } - - /// @dev Gets a specified subcourt's non primitive properties. - /// @param _subcourtID The ID of the subcourt. - /// @return children The subcourt's child court list. - /// @return timesPerPeriod The subcourt's time per period. - function getSubcourt( - uint96 _subcourtID - ) external view returns (uint256[] memory children, uint256[4] memory timesPerPeriod) { - Court storage subcourt = courts[_subcourtID]; - children = subcourt.children; - timesPerPeriod = subcourt.timesPerPeriod; - } - - /// @dev Gets a specified vote for a specified appeal in a specified dispute. - /// @param _disputeID The ID of the dispute. - /// @param _appeal The appeal. - /// @param _voteID The ID of the vote. - /// @return account The account for vote. - /// @return commit The commit for vote. - /// @return choice The choice for vote. - /// @return voted True if the account voted, False otherwise. - function getVote( - uint256 _disputeID, - uint256 _appeal, - uint256 _voteID - ) external view returns (address account, bytes32 commit, uint256 choice, bool voted) { - Vote storage vote = disputes[_disputeID].votes[_appeal][_voteID]; - account = vote.account; - commit = vote.commit; - choice = vote.choice; - voted = vote.voted; - } - - /// @dev Gets the vote counter for a specified appeal in a specified dispute. - /// Note: This function is only to be used by the interface and it won't work if the number of choices is too high. - /// @param _disputeID The ID of the dispute. - /// @param _appeal The appeal. - /// @return winningChoice The winning choice. - /// @return counts The count. - /// @return tied Whether the vote tied. - /// `O(n)` where - /// `n` is the number of choices of the dispute. - function getVoteCounter( - uint256 _disputeID, - uint256 _appeal - ) external view returns (uint256 winningChoice, uint256[] memory counts, bool tied) { - Dispute storage dispute = disputes[_disputeID]; - VoteCounter storage voteCounter = dispute.voteCounters[_appeal]; - winningChoice = voteCounter.winningChoice; - counts = new uint256[](dispute.numberOfChoices + 1); - for (uint256 i = 0; i <= dispute.numberOfChoices; i++) counts[i] = voteCounter.counts[i]; - tied = voteCounter.tied; - } - - /// @dev Gets a specified dispute's non primitive properties. - /// @param _disputeID The ID of the dispute. - /// @return votesLengths The dispute's vote length. - /// @return tokensAtStakePerJuror The dispute's required tokens at stake per Juror. - /// @return totalFeesForJurors The dispute's total fees for Jurors. - /// @return votesInEachRound The dispute's counter of votes made in each round. - /// @return repartitionsInEachRound The dispute's counter of vote reward repartitions made in each round. - /// @return penaltiesInEachRound The dispute's amount of tokens collected from penalties in each round. - /// `O(a)` where - /// `a` is the number of appeals of the dispute. - function getDispute( - uint256 _disputeID - ) - external - view - returns ( - uint256[] memory votesLengths, - uint256[] memory tokensAtStakePerJuror, - uint256[] memory totalFeesForJurors, - uint256[] memory votesInEachRound, - uint256[] memory repartitionsInEachRound, - uint256[] memory penaltiesInEachRound - ) - { - Dispute storage dispute = disputes[_disputeID]; - votesLengths = new uint256[](dispute.votes.length); - for (uint256 i = 0; i < dispute.votes.length; i++) votesLengths[i] = dispute.votes[i].length; - tokensAtStakePerJuror = dispute.tokensAtStakePerJuror; - totalFeesForJurors = dispute.totalFeesForJurors; - votesInEachRound = dispute.votesInEachRound; - repartitionsInEachRound = dispute.repartitionsInEachRound; - penaltiesInEachRound = dispute.penaltiesInEachRound; - } - - /// @dev Gets a specified juror's non primitive properties. - /// @param _account The address of the juror. - /// @return subcourtIDs The juror's IDs of subcourts where the juror has stake path. - function getJuror(address _account) external view returns (uint96[] memory subcourtIDs) { - Juror storage juror = jurors[_account]; - subcourtIDs = juror.subcourtIDs; - } - - /// @dev Gets the stake of a specified juror in a specified subcourt. - /// @param _account The address of the juror. - /// @param _subcourtID The ID of the subcourt. - /// @return stake The stake. - function stakeOf(address _account, uint96 _subcourtID) external view returns (uint256 stake) { - return - sortitionSumTrees.stakeOf( - bytes32(uint256(_subcourtID)), - accountAndSubcourtIDToStakePathID(_account, _subcourtID) - ); - } -} diff --git a/contracts/src/kleros-v1/kleros-liquid/KlerosLiquidToV2Governor.sol b/contracts/src/kleros-v1/kleros-liquid/KlerosLiquidToV2Governor.sol deleted file mode 100644 index def339931..000000000 --- a/contracts/src/kleros-v1/kleros-liquid/KlerosLiquidToV2Governor.sol +++ /dev/null @@ -1,182 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "../interfaces/IKlerosLiquid.sol"; -import "../interfaces/ITokenController.sol"; -import {IArbitratorV2, IArbitrableV2} from "../../arbitration/interfaces/IArbitratorV2.sol"; - -interface IPinakion { - function balanceOf(address who) external view returns (uint256); -} - -contract KlerosLiquidToV2Governor is IArbitrableV2, ITokenController { - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - struct DisputeData { - uint256 klerosLiquidDisputeID; - bool ruled; - } - - // ************************************* // - // * Storage * // - // ************************************* // - - IArbitratorV2 public immutable foreignGateway; - IKlerosLiquid public immutable klerosLiquid; - address public owner; - mapping(uint256 disputeId => uint256 gatewayDisputeId) public klerosLiquidDisputeIDtoGatewayDisputeID; - mapping(uint256 gatewayDisputeId => DisputeData) public disputes; // disputes[gatewayDisputeID] - mapping(address account => uint256 tokenAmount) public frozenTokens; // frozenTokens[account] locked token which shouldn't have been blocked. - mapping(uint256 disputeId => mapping(uint256 roundId => bool)) public isDisputeNotified; // isDisputeNotified[disputeID][roundID] used to track the notification of frozen tokens. - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - require(owner == msg.sender); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor. Before this contract is made the new owner of KlerosLiquid, the evidence period of all subcourts has to be set to uint(-1). - /// @param _klerosLiquid The trusted arbitrator to resolve potential disputes. - /// @param _owner The trusted owner of the contract. - /// @param _foreignGateway The trusted gateway that acts as an arbitrator, relaying disputes to v2. - constructor(IKlerosLiquid _klerosLiquid, address _owner, IArbitratorV2 _foreignGateway) { - klerosLiquid = _klerosLiquid; - owner = _owner; - foreignGateway = _foreignGateway; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Lets the owner call anything on behalf of the contract. - /// @param _destination The destination of the call. - /// @param _amount The value sent with the call. - /// @param _data The data sent with the call. - function executeOwnerProposal(address _destination, uint256 _amount, bytes calldata _data) external onlyByOwner { - (bool success, ) = _destination.call{value: _amount}(_data); // solium-disable-line security/no-call-value - require(success, "Call execution failed."); - } - - /// @dev Changes the `owner` storage variable. - /// @param _owner The new value for the `owner` storage variable. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Relays disputes from KlerosLiquid to Kleros v2. Only disputes in the evidence period of the initial round can be realyed. - /// @param _disputeID The ID of the dispute as defined in KlerosLiquid. - function relayDispute(uint256 _disputeID) external { - require(klerosLiquidDisputeIDtoGatewayDisputeID[_disputeID] == 0, "Dispute already relayed"); - IKlerosLiquid.Dispute memory KlerosLiquidDispute = klerosLiquid.disputes(_disputeID); - (uint256[] memory votesLengths, , uint256[] memory totalFeesForJurors, , , ) = klerosLiquid.getDispute( - _disputeID - ); - - require(KlerosLiquidDispute.period == IKlerosLiquid.Period.evidence, "Invalid dispute period."); - require(votesLengths.length == 1, "Cannot relay appeals."); - - klerosLiquid.executeOwnerProposal(address(this), totalFeesForJurors[0], ""); - - uint256 minJurors = votesLengths[0]; - bytes memory extraData = abi.encode(KlerosLiquidDispute.subcourtID, minJurors); - uint256 arbitrationCost = foreignGateway.arbitrationCost(extraData); - require(totalFeesForJurors[0] >= arbitrationCost, "Fees not high enough."); // If this doesn't hold at some point, it could be a big issue. - uint256 gatewayDisputeID = foreignGateway.createDispute{value: arbitrationCost}( - KlerosLiquidDispute.numberOfChoices, - extraData - ); - klerosLiquidDisputeIDtoGatewayDisputeID[_disputeID] = gatewayDisputeID; - require(gatewayDisputeID != 0, "ID must be greater than 0."); - - DisputeData storage dispute = disputes[gatewayDisputeID]; - dispute.klerosLiquidDisputeID = _disputeID; - } - - /// @inheritdoc IArbitrableV2 - function rule(uint256 _disputeID, uint256 _ruling) public override { - require(msg.sender == address(foreignGateway), "Not the arbitrator."); - DisputeData storage dispute = disputes[_disputeID]; - require(dispute.klerosLiquidDisputeID != 0, "Dispute does not exist."); - require(!dispute.ruled, "Dispute already ruled."); - - dispute.ruled = true; - - emit Ruling(foreignGateway, _disputeID, _ruling); - - IKlerosLiquid.Dispute memory klerosLiquidDispute = klerosLiquid.disputes(dispute.klerosLiquidDisputeID); - - bytes memory data = abi.encodeCall(IArbitrableV2.rule, (dispute.klerosLiquidDisputeID, _ruling)); - klerosLiquid.executeOwnerProposal(klerosLiquidDispute.arbitrated, 0, data); - } - - /// @dev Registers jurors' tokens which where locked due to relaying a given dispute. These tokens don't count as locked. - /// @param _disputeID The ID of the dispute as defined in KlerosLiquid. - function notifyFrozenTokens(uint256 _disputeID) external { - require(klerosLiquidDisputeIDtoGatewayDisputeID[_disputeID] != 0, "Dispute not relayed."); - (uint256[] memory votesLengths, uint256[] memory tokensAtStakePerJuror, , , , ) = klerosLiquid.getDispute( - _disputeID - ); - - uint256 minStakingTime = klerosLiquid.minStakingTime(); - IKlerosLiquid.Phase phase = klerosLiquid.phase(); - bool isDrawingForbidden = phase == IKlerosLiquid.Phase.staking && minStakingTime == type(uint256).max; - - for (uint256 round = 0; round < votesLengths.length; round++) { - if (isDisputeNotified[_disputeID][round]) continue; - - for (uint256 voteID = 0; voteID < votesLengths[round]; voteID++) { - (address account, , , ) = klerosLiquid.getVote(_disputeID, round, voteID); - require(account != address(0x0) || isDrawingForbidden, "Juror not drawn yet."); - if (account != address(0x0)) frozenTokens[account] += tokensAtStakePerJuror[round]; - } - isDisputeNotified[_disputeID][round] = true; - } - } - - /// @inheritdoc ITokenController - function proxyPayment(address /*_owner*/) external payable override returns (bool allowed) { - allowed = false; - } - - /// @inheritdoc ITokenController - function onTransfer(address _from, address /*_to*/, uint256 _amount) external view override returns (bool allowed) { - if (klerosLiquid.lockInsolventTransfers()) { - // Never block penalties or rewards. - IPinakion pinakion = IPinakion(klerosLiquid.pinakion()); - uint256 newBalance = pinakion.balanceOf(_from) - _amount; // Overflow already checked in the Minime token contract. - - IKlerosLiquid.Juror memory juror = klerosLiquid.jurors(_from); - - // frozenTokens <= lockedTokens always. - if (newBalance < juror.stakedTokens || newBalance < juror.lockedTokens - frozenTokens[_from]) return false; - } - allowed = true; - } - - /// @inheritdoc ITokenController - function onApprove( - address /*_owner*/, - address /*_spender*/, - uint256 /*_amount*/ - ) external pure override returns (bool allowed) { - allowed = true; - } - - /// @dev This contract should be able to receive arbitration fees from KlerosLiquid. - receive() external payable {} -} diff --git a/contracts/src/kleros-v1/libraries/SortitionSumTreeFactory.sol b/contracts/src/kleros-v1/libraries/SortitionSumTreeFactory.sol deleted file mode 100644 index 29ebd1ec4..000000000 --- a/contracts/src/kleros-v1/libraries/SortitionSumTreeFactory.sol +++ /dev/null @@ -1,230 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -/// @title SortitionSumTreeFactory -/// @author Enrique Piqueras - -/// @dev A factory of trees that keep track of staked values for sortition. -library SortitionSumTreeFactory { - /// Structs - - struct SortitionSumTree { - uint K; // The maximum number of childs per node. - // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around. - uint[] stack; - uint[] nodes; - // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node. - mapping(bytes32 id => uint index) IDsToNodeIndexes; - mapping(uint index => bytes32 id) nodeIndexesToIDs; - } - - /// Storage - - struct SortitionSumTrees { - mapping(bytes32 => SortitionSumTree) sortitionSumTrees; - } - - /// Public - - /// @dev Create a sortition sum tree at the specified key. - /// @param _key The key of the new tree. - /// @param _K The number of children each node in the tree should have. - function createTree(SortitionSumTrees storage self, bytes32 _key, uint _K) public { - SortitionSumTree storage tree = self.sortitionSumTrees[_key]; - require(tree.K == 0, "Tree already exists."); - require(_K > 1, "K must be greater than one."); - tree.K = _K; - tree.nodes.push(0); - } - - /// @dev Set a value of a tree. - /// @param _key The key of the tree. - /// @param _value The new value. - /// @param _ID The ID of the value. - /// `O(log_k(n))` where - /// `k` is the maximum number of childs per node in the tree, - /// and `n` is the maximum number of nodes ever appended. - function set(SortitionSumTrees storage self, bytes32 _key, uint _value, bytes32 _ID) public { - SortitionSumTree storage tree = self.sortitionSumTrees[_key]; - uint treeIndex = tree.IDsToNodeIndexes[_ID]; - - if (treeIndex == 0) { - // No existing node. - if (_value != 0) { - // Non zero value. - // Append. - // Add node. - if (tree.stack.length == 0) { - // No vacant spots. - // Get the index and append the value. - treeIndex = tree.nodes.length; - tree.nodes.push(_value); - - // Potentially append a new node and make the parent a sum node. - if (treeIndex != 1 && (treeIndex - 1) % tree.K == 0) { - // Is first child. - uint parentIndex = treeIndex / tree.K; - bytes32 parentID = tree.nodeIndexesToIDs[parentIndex]; - uint newIndex = treeIndex + 1; - tree.nodes.push(tree.nodes[parentIndex]); - delete tree.nodeIndexesToIDs[parentIndex]; - tree.IDsToNodeIndexes[parentID] = newIndex; - tree.nodeIndexesToIDs[newIndex] = parentID; - } - } else { - // Some vacant spot. - // Pop the stack and append the value. - treeIndex = tree.stack[tree.stack.length - 1]; - tree.stack.pop(); - tree.nodes[treeIndex] = _value; - } - - // Add label. - tree.IDsToNodeIndexes[_ID] = treeIndex; - tree.nodeIndexesToIDs[treeIndex] = _ID; - - updateParents(self, _key, treeIndex, true, _value); - } - } else { - // Existing node. - if (_value == 0) { - // Zero value. - // Remove. - // Remember value and set to 0. - uint value = tree.nodes[treeIndex]; - tree.nodes[treeIndex] = 0; - - // Push to stack. - tree.stack.push(treeIndex); - - // Clear label. - delete tree.IDsToNodeIndexes[_ID]; - delete tree.nodeIndexesToIDs[treeIndex]; - - updateParents(self, _key, treeIndex, false, value); - } else if (_value != tree.nodes[treeIndex]) { - // New, non zero value. - // Set. - bool plusOrMinus = tree.nodes[treeIndex] <= _value; - uint plusOrMinusValue = plusOrMinus ? _value - tree.nodes[treeIndex] : tree.nodes[treeIndex] - _value; - tree.nodes[treeIndex] = _value; - - updateParents(self, _key, treeIndex, plusOrMinus, plusOrMinusValue); - } - } - } - - /// Public Views - - /// @dev Query the leaves of a tree. Note that if `startIndex == 0`, the tree is empty and the root node will be returned. - /// @param _key The key of the tree to get the leaves from. - /// @param _cursor The pagination cursor. - /// @param _count The number of items to return. - /// @return startIndex The index at which leaves start. - /// @return values The values of the returned leaves. - /// @return hasMore Whether there are more for pagination. - /// `O(n)` where - /// `n` is the maximum number of nodes ever appended. - function queryLeafs( - SortitionSumTrees storage self, - bytes32 _key, - uint _cursor, - uint _count - ) public view returns (uint startIndex, uint[] memory values, bool hasMore) { - SortitionSumTree storage tree = self.sortitionSumTrees[_key]; - - // Find the start index. - for (uint i = 0; i < tree.nodes.length; i++) { - if ((tree.K * i) + 1 >= tree.nodes.length) { - startIndex = i; - break; - } - } - - // Get the values. - uint loopStartIndex = startIndex + _cursor; - values = new uint[](loopStartIndex + _count > tree.nodes.length ? tree.nodes.length - loopStartIndex : _count); - uint valuesIndex = 0; - for (uint j = loopStartIndex; j < tree.nodes.length; j++) { - if (valuesIndex < _count) { - values[valuesIndex] = tree.nodes[j]; - valuesIndex++; - } else { - hasMore = true; - break; - } - } - } - - /// @dev Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0. - /// @param _key The key of the tree. - /// @param _drawnNumber The drawn number. - /// @return ID The drawn ID. - /// `O(k * log_k(n))` where - /// `k` is the maximum number of childs per node in the tree, - /// and `n` is the maximum number of nodes ever appended. - function draw(SortitionSumTrees storage self, bytes32 _key, uint _drawnNumber) public view returns (bytes32 ID) { - SortitionSumTree storage tree = self.sortitionSumTrees[_key]; - uint treeIndex = 0; - uint currentDrawnNumber = _drawnNumber % tree.nodes[0]; - - while ( - (tree.K * treeIndex) + 1 < tree.nodes.length // While it still has children. - ) - for (uint i = 1; i <= tree.K; i++) { - // Loop over children. - uint nodeIndex = (tree.K * treeIndex) + i; - uint nodeValue = tree.nodes[nodeIndex]; - - if (currentDrawnNumber >= nodeValue) - currentDrawnNumber -= nodeValue; // Go to the next child. - else { - // Pick this child. - treeIndex = nodeIndex; - break; - } - } - - ID = tree.nodeIndexesToIDs[treeIndex]; - } - - /// @dev Gets a specified ID's associated value. - /// @param _key The key of the tree. - /// @param _ID The ID of the value. - /// @return value The associated value. - function stakeOf(SortitionSumTrees storage self, bytes32 _key, bytes32 _ID) public view returns (uint value) { - SortitionSumTree storage tree = self.sortitionSumTrees[_key]; - uint treeIndex = tree.IDsToNodeIndexes[_ID]; - - if (treeIndex == 0) value = 0; - else value = tree.nodes[treeIndex]; - } - - /// Private - - /// @dev Update all the parents of a node. - /// @param _key The key of the tree to update. - /// @param _treeIndex The index of the node to start from. - /// @param _plusOrMinus Wether to add (true) or substract (false). - /// @param _value The value to add or substract. - /// `O(log_k(n))` where - /// `k` is the maximum number of childs per node in the tree, - /// and `n` is the maximum number of nodes ever appended. - function updateParents( - SortitionSumTrees storage self, - bytes32 _key, - uint _treeIndex, - bool _plusOrMinus, - uint _value - ) private { - SortitionSumTree storage tree = self.sortitionSumTrees[_key]; - - uint parentIndex = _treeIndex; - while (parentIndex != 0) { - parentIndex = (parentIndex - 1) / tree.K; - tree.nodes[parentIndex] = _plusOrMinus - ? tree.nodes[parentIndex] + _value - : tree.nodes[parentIndex] - _value; - } - } -} diff --git a/contracts/src/libraries/Constants.sol b/contracts/src/libraries/Constants.sol deleted file mode 100644 index 1f0132668..000000000 --- a/contracts/src/libraries/Constants.sol +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -// Courts -uint96 constant FORKING_COURT = 0; // Index of the forking court. -uint96 constant GENERAL_COURT = 1; // Index of the default (general) court. - -// Dispute Kits -uint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. -uint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped. - -// Sortition Module -uint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have. -uint256 constant DEFAULT_K = 6; // Default number of children per node. - -// Defaults -uint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute. -IERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1. - -// Units -uint256 constant ONE_BASIS_POINT = 10000; - -enum OnError { - Revert, - Return -} - -enum StakingResult { - Successful, - Delayed, - StakingTransferFailed, - UnstakingTransferFailed, - CannotStakeInMoreCourts, - CannotStakeInThisCourt, - CannotStakeLessThanMinStake, - CannotStakeMoreThanMaxStakePerJuror, - CannotStakeMoreThanMaxTotalStaked, - CannotStakeZeroWhenNoStake -} diff --git a/contracts/src/libraries/SafeERC20.sol b/contracts/src/libraries/SafeERC20.sol deleted file mode 100644 index 35f538350..000000000 --- a/contracts/src/libraries/SafeERC20.sol +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-License-Identifier: MIT -// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -/// @title SafeERC20 -/// @dev Wrappers around ERC20 operations that throw on failure (when the token -/// contract returns false). Tokens that return no value (and instead revert or -/// throw on failure) are also supported, non-reverting calls are assumed to be -/// successful. -/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, -/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc. -library SafeERC20 { - /// @dev Increases the allowance granted to `spender` by the caller. - /// @param _token Token to transfer. - /// @param _spender The address which will spend the funds. - /// @param _addedValue The amount of tokens to increase the allowance by. - function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) { - _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue); - return true; - } - - /// @dev Calls transfer() without reverting. - /// @param _token Token to transfer. - /// @param _to Recipient address. - /// @param _value Amount transferred. - /// @return Whether transfer succeeded or not. - function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) { - (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value))); - return (success && (data.length == 0 || abi.decode(data, (bool)))); - } - - /// @dev Calls transferFrom() without reverting. - /// @param _token Token to transfer. - /// @param _from Sender address. - /// @param _to Recipient address. - /// @param _value Amount transferred. - /// @return Whether transfer succeeded or not. - function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) { - (bool success, bytes memory data) = address(_token).call( - abi.encodeCall(IERC20.transferFrom, (_from, _to, _value)) - ); - return (success && (data.length == 0 || abi.decode(data, (bool)))); - } -} diff --git a/contracts/src/libraries/SafeSend.sol b/contracts/src/libraries/SafeSend.sol deleted file mode 100644 index fcd02d815..000000000 --- a/contracts/src/libraries/SafeSend.sol +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @authors: [@andreimvp] - * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1] - * @auditors: [] - * @bounties: [] - * SPDX-License-Identifier: MIT - */ - -pragma solidity ^0.8.24; - -interface WethLike { - function deposit() external payable; - - function transfer(address dst, uint256 wad) external; -} - -library SafeSend { - function safeSend(address payable _to, uint256 _value, address _wethLike) internal { - if (_to.send(_value)) return; - - WethLike(_wethLike).deposit{value: _value}(); - WethLike(_wethLike).transfer(_to, _value); - } -} diff --git a/contracts/src/libraries/SortitionTrees.sol b/contracts/src/libraries/SortitionTrees.sol deleted file mode 100644 index f8d9706fe..000000000 --- a/contracts/src/libraries/SortitionTrees.sol +++ /dev/null @@ -1,232 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -type TreeKey is bytes32; -type CourtID is uint96; - -using {SortitionTrees.toTreeKey} for CourtID global; - -library SortitionTrees { - // ************************************* // - // * Enums / Structs * // - // ************************************* // - - struct Tree { - uint256 K; // The maximum number of children per node. - uint256[] stack; // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around. - uint256[] nodes; // The tree nodes. - // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node. - mapping(bytes32 stakePathID => uint256 nodeIndex) IDsToNodeIndexes; - mapping(uint256 nodeIndex => bytes32 stakePathID) nodeIndexesToIDs; - } - - function toTreeKey(CourtID _courtID) internal pure returns (TreeKey) { - return TreeKey.wrap(bytes32(uint256(CourtID.unwrap(_courtID)))); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Create a sortition sum tree at the specified key. - /// @param _trees The mapping of sortition sum trees. - /// @param _key The key of the new tree. - /// @param _k The maximum number of children per node. - function createTree(mapping(TreeKey key => Tree) storage _trees, TreeKey _key, uint256 _k) internal { - Tree storage tree = _trees[_key]; - if (tree.K != 0) revert TreeAlreadyExists(); - if (_k <= 1) revert KMustBeGreaterThanOne(); - tree.K = _k; - tree.nodes.push(0); - } - - /// @dev Draw an ID from a tree using a number. - /// Note that this function reverts if the sum of all values in the tree is 0. - /// @param _tree The sortition sum tree. - /// @param _coreDisputeID Index of the dispute in Kleros Core. - /// @param _nonce Nonce to hash with random number. - /// @return drawnAddress The drawn address. - /// `O(k * log_k(n))` where - /// `k` is the maximum number of children per node in the tree, - /// and `n` is the maximum number of nodes ever appended. - function draw( - Tree storage _tree, - uint256 _coreDisputeID, - uint256 _nonce, - uint256 _randomNumber - ) internal view returns (address drawnAddress, uint96 fromSubcourtID) { - if (_tree.nodes[0] == 0) { - return (address(0), 0); // No jurors staked. - } - - uint256 currentDrawnNumber = uint256(keccak256(abi.encodePacked(_randomNumber, _coreDisputeID, _nonce))) % - _tree.nodes[0]; - - // While it still has children - uint256 treeIndex = 0; - while ((_tree.K * treeIndex) + 1 < _tree.nodes.length) { - for (uint256 i = 1; i <= _tree.K; i++) { - // Loop over children. - uint256 nodeIndex = (_tree.K * treeIndex) + i; - uint256 nodeValue = _tree.nodes[nodeIndex]; - - if (currentDrawnNumber >= nodeValue) { - // Go to the next child. - currentDrawnNumber -= nodeValue; - } else { - // Pick this child. - treeIndex = nodeIndex; - break; - } - } - } - - bytes32 stakePathID = _tree.nodeIndexesToIDs[treeIndex]; - (drawnAddress, fromSubcourtID) = toAccountAndCourtID(stakePathID); - } - - /// @dev Set a value in a tree. - /// @param _tree The sortition sum tree. - /// @param _value The new value. - /// @param _stakePathID The ID of the value. - /// `O(log_k(n))` where - /// `k` is the maximum number of children per node in the tree, - /// and `n` is the maximum number of nodes ever appended. - function set(Tree storage _tree, uint256 _value, bytes32 _stakePathID) internal { - uint256 treeIndex = _tree.IDsToNodeIndexes[_stakePathID]; - - if (treeIndex == 0) { - // No existing node. - if (_value != 0) { - // Non zero value. - // Append. - // Add node. - if (_tree.stack.length == 0) { - // No vacant spots. - // Get the index and append the value. - treeIndex = _tree.nodes.length; - _tree.nodes.push(_value); - - // Potentially append a new node and make the parent a sum node. - if (treeIndex != 1 && (treeIndex - 1) % _tree.K == 0) { - // Is first child. - uint256 parentIndex = treeIndex / _tree.K; - bytes32 parentID = _tree.nodeIndexesToIDs[parentIndex]; - uint256 newIndex = treeIndex + 1; - _tree.nodes.push(_tree.nodes[parentIndex]); - delete _tree.nodeIndexesToIDs[parentIndex]; - _tree.IDsToNodeIndexes[parentID] = newIndex; - _tree.nodeIndexesToIDs[newIndex] = parentID; - } - } else { - // Some vacant spot. - // Pop the stack and append the value. - treeIndex = _tree.stack[_tree.stack.length - 1]; - _tree.stack.pop(); - _tree.nodes[treeIndex] = _value; - } - - // Add label. - _tree.IDsToNodeIndexes[_stakePathID] = treeIndex; - _tree.nodeIndexesToIDs[treeIndex] = _stakePathID; - - updateParents(_tree, treeIndex, true, _value); - } - } else { - // Existing node. - if (_value == 0) { - // Zero value. - // Remove. - // Remember value and set to 0. - uint256 value = _tree.nodes[treeIndex]; - _tree.nodes[treeIndex] = 0; - - // Push to stack. - _tree.stack.push(treeIndex); - - // Clear label. - delete _tree.IDsToNodeIndexes[_stakePathID]; - delete _tree.nodeIndexesToIDs[treeIndex]; - - updateParents(_tree, treeIndex, false, value); - } else if (_value != _tree.nodes[treeIndex]) { - // New, non zero value. - // Set. - bool plusOrMinus = _tree.nodes[treeIndex] <= _value; - uint256 plusOrMinusValue = plusOrMinus - ? _value - _tree.nodes[treeIndex] - : _tree.nodes[treeIndex] - _value; - _tree.nodes[treeIndex] = _value; - - updateParents(_tree, treeIndex, plusOrMinus, plusOrMinusValue); - } - } - } - - /// @dev Update all the parents of a node. - /// @param _tree The sortition sum tree. - /// @param _treeIndex The index of the node to start from. - /// @param _plusOrMinus Whether to add (true) or substract (false). - /// @param _value The value to add or substract. - /// `O(log_k(n))` where - /// `k` is the maximum number of children per node in the tree, - /// and `n` is the maximum number of nodes ever appended. - function updateParents(Tree storage _tree, uint256 _treeIndex, bool _plusOrMinus, uint256 _value) private { - uint256 parentIndex = _treeIndex; - while (parentIndex != 0) { - parentIndex = (parentIndex - 1) / _tree.K; - _tree.nodes[parentIndex] = _plusOrMinus - ? _tree.nodes[parentIndex] + _value - : _tree.nodes[parentIndex] - _value; - } - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Get the stake of a juror in a court. - /// @param _tree The sortition sum tree. - /// @param _stakePathID The stake path ID, corresponding to a juror. - /// @return The stake of the juror in the court. - function stakeOf(Tree storage _tree, bytes32 _stakePathID) internal view returns (uint256) { - uint256 treeIndex = _tree.IDsToNodeIndexes[_stakePathID]; - if (treeIndex == 0) { - return 0; - } - return _tree.nodes[treeIndex]; - } - - /// @dev Packs an account and a court ID into a stake path ID: [20 bytes of address][12 bytes of courtID] = 32 bytes total. - /// @param _account The address of the juror to pack. - /// @param _courtID The court ID to pack. - /// @return stakePathID The stake path ID. - function toStakePathID(address _account, uint96 _courtID) internal pure returns (bytes32 stakePathID) { - assembly { - // solium-disable-line security/no-inline-assembly - // Pack address (20 bytes) and courtID (12 bytes) into a single bytes32 - stakePathID := or(shl(96, _account), _courtID) - } - } - - /// @dev Retrieves both juror's address and court ID from the stake path ID. - /// @param _stakePathID The stake path ID to unpack. - /// @return account The account. - /// @return courtID The court ID. - function toAccountAndCourtID(bytes32 _stakePathID) internal pure returns (address account, uint96 courtID) { - assembly { - // solium-disable-line security/no-inline-assembly - // Unpack address (first 20 bytes) and courtID (last 12 bytes) from the stake path ID - account := shr(96, _stakePathID) // Right shift by 96 bits to get the address - courtID := and(_stakePathID, 0xffffffffffffffffffffffff) // Mask the lower 96 bits to get the court ID - } - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error TreeAlreadyExists(); - error KMustBeGreaterThanOne(); -} diff --git a/contracts/src/proxy/Initializable.sol b/contracts/src/proxy/Initializable.sol deleted file mode 100644 index 7bdf08eb4..000000000 --- a/contracts/src/proxy/Initializable.sol +++ /dev/null @@ -1,215 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) - -pragma solidity ^0.8.24; - -/** - * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed - * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an - * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer - * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. - * - * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be - * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in - * case an upgrade adds a module that needs to be initialized. - * - * For example: - * - * ```solidity - * contract MyToken is ERC20Upgradeable { - * function initialize() initializer public { - * __ERC20_init("MyToken", "MTK"); - * } - * } - * - * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { - * function initializeV2() reinitializer(2) public { - * __ERC20Permit_init("MyToken"); - * } - * } - * ``` - * - * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as - * possible by providing the encoded function call as the `_data` argument to the proxy constructor - * - * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure - * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. - * - * [CAUTION] - * ==== - * Avoid leaving a contract uninitialized. - * - * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation - * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke - * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: - * - * ``` - * /// @custom:oz-upgrades-unsafe-allow constructor - * constructor() { - * _disableInitializers(); - * } - * ``` - */ -abstract contract Initializable { - /** - * @dev Storage of the initializable contract. - * - * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions - * when using with upgradeable contracts. - * - * @custom:storage-location erc7201:openzeppelin.storage.Initializable - */ - struct InitializableStorage { - /** - * @dev Indicates that the contract has been initialized. - */ - uint64 _initialized; - /** - * @dev Indicates that the contract is in the process of being initialized. - */ - bool _initializing; - } - - // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) - bytes32 private constant _INITIALIZABLE_STORAGE = - 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e; - - /** - * @dev The contract is already initialized. - */ - error AlreadyInitialized(); - - /** - * @dev The contract is not initializing. - */ - error NotInitializing(); - - /** - * @dev Triggered when the contract has been initialized or reinitialized. - */ - event Initialized(uint64 version); - - /** - * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, - * `onlyInitializing` functions can be used to initialize parent contracts. - * - * Similar to `initializer()`, except that functions marked with `initializer` can be nested in the context of a - * constructor. - * - * Emits an {Initialized} event. - */ - modifier initializer() { - // solhint-disable-next-line var-name-mixedcase - InitializableStorage storage $ = _getInitializableStorage(); - - bool isTopLevelCall = !$._initializing; - uint64 initialized = $._initialized; - if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) { - revert AlreadyInitialized(); - } - $._initialized = 1; - if (isTopLevelCall) { - $._initializing = true; - } - _; - if (isTopLevelCall) { - $._initializing = false; - emit Initialized(1); - } - } - - /** - * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the - * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be - * used to initialize parent contracts. - * - * A reinitializer may be used after the original initialization step. This is essential to configure modules that - * are added through upgrades and that require initialization. - * - * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` - * cannot be nested. If one is invoked in the context of another, execution will revert. - * - * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in - * a contract, executing them in the right order is up to the developer or operator. - * - * WARNING: setting the version to 255 will prevent any future reinitialization. - * - * Emits an {Initialized} event. - */ - modifier reinitializer(uint64 version) { - // solhint-disable-next-line var-name-mixedcase - InitializableStorage storage $ = _getInitializableStorage(); - - if ($._initializing || $._initialized >= version) { - revert AlreadyInitialized(); - } - $._initialized = version; - $._initializing = true; - _; - $._initializing = false; - emit Initialized(version); - } - - /** - * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the - * {initializer} and {reinitializer} modifiers, directly or indirectly. - */ - modifier onlyInitializing() { - _checkInitializing(); - _; - } - - /** - * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. - */ - function _checkInitializing() internal view virtual { - if (!_isInitializing()) { - revert NotInitializing(); - } - } - - /** - * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. - * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized - * to any version. It is recommended to use this to lock implementation contracts that are designed to be called - * through proxies. - * - * Emits an {Initialized} event the first time it is successfully executed. - */ - function _disableInitializers() internal virtual { - // solhint-disable-next-line var-name-mixedcase - InitializableStorage storage $ = _getInitializableStorage(); - - if ($._initializing) { - revert AlreadyInitialized(); - } - if ($._initialized != type(uint64).max) { - $._initialized = type(uint64).max; - emit Initialized(type(uint64).max); - } - } - - /** - * @dev Returns the highest version that has been initialized. See {reinitializer}. - */ - function _getInitializedVersion() internal view returns (uint64) { - return _getInitializableStorage()._initialized; - } - - /** - * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. - */ - function _isInitializing() internal view returns (bool) { - return _getInitializableStorage()._initializing; - } - - /** - * @dev Returns a pointer to the storage namespace. - */ - // solhint-disable-next-line var-name-mixedcase - function _getInitializableStorage() private pure returns (InitializableStorage storage $) { - assembly { - $.slot := _INITIALIZABLE_STORAGE - } - } -} diff --git a/contracts/src/proxy/KlerosProxies.sol b/contracts/src/proxy/KlerosProxies.sol deleted file mode 100644 index 7db79b67c..000000000 --- a/contracts/src/proxy/KlerosProxies.sol +++ /dev/null @@ -1,76 +0,0 @@ -//SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./UUPSProxy.sol"; - -/// Workaround to get meaningful names for the proxy contracts -/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers - -contract DisputeKitClassicUniversityProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract DisputeKitClassicProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract DisputeKitGatedProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract DisputeKitGatedShutterProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract DisputeKitShutterProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract DisputeKitSybilResistantProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract DisputeTemplateRegistryProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract EvidenceModuleProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract ForeignGatewayOnEthereumProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract HomeGatewayToEthereumProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract KlerosCoreRulerProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract KlerosCoreUniversityProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract KlerosCoreProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract PolicyRegistryProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract RandomizerRNGProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract SortitionModuleUniversityProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract SortitionModuleProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} diff --git a/contracts/src/proxy/UUPSProxiable.sol b/contracts/src/proxy/UUPSProxiable.sol deleted file mode 100644 index 34504f686..000000000 --- a/contracts/src/proxy/UUPSProxiable.sol +++ /dev/null @@ -1,140 +0,0 @@ -//SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -/// @title UUPS Proxiable -/// @author Simon Malatrait -/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies. -/// @dev Adapted from -/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy. -/// -/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy. -/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable. -/// -/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is -/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing -/// `UUPSProxiable` with a custom implementation of upgrades. -/// -/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism. -abstract contract UUPSProxiable { - // ************************************* // - // * Event * // - // ************************************* // - - /// @dev Emitted when the `implementation` has been successfully upgraded. - /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to. - event Upgraded(address indexed newImplementation); - - // ************************************* // - // * Error * // - // ************************************* // - - /// @dev The call is from an unauthorized context. - error UUPSUnauthorizedCallContext(); - - /// @dev The storage `slot` is unsupported as a UUID. - error UUPSUnsupportedProxiableUUID(bytes32 slot); - - /// @dev The `implementation` is not UUPS-compliant - error InvalidImplementation(address implementation); - - /// Failed Delegated call - error FailedDelegateCall(); - - // ************************************* // - // * Storage * // - // ************************************* // - - /// @dev Storage slot with the address of the current implementation. - /// @dev This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is - /// @dev validated in the constructor. - /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1) - bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; - - /// @dev Storage variable of the proxiable contract address. - /// @dev It is used to check whether or not the current call is from the proxy. - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable __self = address(this); - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. - /// @dev Called by {upgradeToAndCall}. - function _authorizeUpgrade(address newImplementation) internal virtual; - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Upgrade mechanism including access control and UUPS-compliance. - /// @param newImplementation Address of the new implementation contract. - /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded - /// function call, and allows initializing the storage of the proxy like a Solidity constructor. - /// @dev Reverts if the execution is not performed via delegatecall or the execution - /// context is not of a proxy with an ERC1967-compliant implementation pointing to self. - function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual { - _authorizeUpgrade(newImplementation); - - // Check that the execution is being performed through a delegatecall call and that the execution context is - // a proxy contract with an implementation (as defined in ERC1967) pointing to self. - if (address(this) == __self || _getImplementation() != __self) { - revert UUPSUnauthorizedCallContext(); - } - - try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { - if (slot != IMPLEMENTATION_SLOT) { - revert UUPSUnsupportedProxiableUUID(slot); - } - // Store the new implementation address to the implementation storage slot. - assembly { - sstore(IMPLEMENTATION_SLOT, newImplementation) - } - emit Upgraded(newImplementation); - - if (data.length != 0) { - // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted. - /// @custom:oz-upgrades-unsafe-allow delegatecall - (bool success, ) = newImplementation.delegatecall(data); - if (!success) { - revert FailedDelegateCall(); - } - } - } catch { - revert InvalidImplementation(newImplementation); - } - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the - /// implementation. It is used to validate the implementation's compatibility when performing an upgrade. - /// - /// IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks - /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this - /// function revert if invoked through a proxy. This is guaranteed by the if statement. - function proxiableUUID() external view virtual returns (bytes32) { - if (address(this) != __self) { - // Must not be called through delegatecall - revert UUPSUnauthorizedCallContext(); - } - return IMPLEMENTATION_SLOT; - } - - /// @dev Returns the version of the implementation. - /// @return Version string. - function version() external view virtual returns (string memory); - - // ************************************* // - // * Internal Views * // - // ************************************* // - - function _getImplementation() internal view returns (address implementation) { - assembly { - implementation := sload(IMPLEMENTATION_SLOT) - } - } -} diff --git a/contracts/src/proxy/UUPSProxy.sol b/contracts/src/proxy/UUPSProxy.sol deleted file mode 100644 index 4f190158d..000000000 --- a/contracts/src/proxy/UUPSProxy.sol +++ /dev/null @@ -1,90 +0,0 @@ -//SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -/// @title UUPS Proxy -/// @author Simon Malatrait -/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822. -/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction. -/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`. -/// @dev Adapted from -contract UUPSProxy { - /// @dev Storage slot with the address of the current implementation. - /// This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is - /// validated in the constructor. - /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1) - bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. - /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded - /// function call, and allows initializing the storage of the proxy like a Solidity constructor. - constructor(address _implementation, bytes memory _data) { - assembly { - sstore(IMPLEMENTATION_SLOT, _implementation) - } - - if (_data.length != 0) { - (bool success, ) = _implementation.delegatecall(_data); - require(success, "Proxy Constructor failed"); - } - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Delegates the current call to `implementation`. - /// NOTE: This function does not return to its internal call site, it will return directly to the external caller. - function _delegate(address implementation) internal { - assembly { - // Copy msg.data. We take full control of memory in this inline assembly - // block because it will not return to Solidity code. We overwrite the - // Solidity scratch pad at memory position 0. - calldatacopy(0, 0, calldatasize()) - - // Call the implementation. - // out and outsize are 0 because we don't know the size yet. - let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) - - // Copy the returned data. - returndatacopy(0, 0, returndatasize()) - - switch result - // delegatecall returns 0 on error. - case 0 { - revert(0, returndatasize()) - } - default { - return(0, returndatasize()) - } - } - } - - // ************************************* // - // * Internal Views * // - // ************************************* // - - function _getImplementation() internal view returns (address implementation) { - assembly { - implementation := sload(IMPLEMENTATION_SLOT) - } - } - - // ************************************* // - // * Fallback * // - // ************************************* // - - /// @dev Fallback function that delegates calls to the address returned by `_implementation()`. - /// @dev Will run if no other function in the contract matches the call data. - fallback() external payable { - _delegate(_getImplementation()); - } - - receive() external payable { - _delegate(_getImplementation()); - } -} diff --git a/contracts/src/proxy/mock/UUPSUpgradeableMocks.sol b/contracts/src/proxy/mock/UUPSUpgradeableMocks.sol deleted file mode 100644 index 3b2bc7959..000000000 --- a/contracts/src/proxy/mock/UUPSUpgradeableMocks.sol +++ /dev/null @@ -1,60 +0,0 @@ -//SPDX-License-Identifier: MIT -// Adapted from - -pragma solidity ^0.8.24; - -import "../UUPSProxiable.sol"; -import "../Initializable.sol"; - -contract NonUpgradeableMock { - uint256 public _counter; - - function counter() external view returns (uint256) { - return _counter; - } - - function increment() external { - _counter++; - } -} - -contract UUPSUpgradeableMock is UUPSProxiable, NonUpgradeableMock { - bool public initialized; - address public owner; - - uint256[50] __gap; - - constructor() { - initialized = true; - } - - function initialize(address _owner) external { - require(!initialized, "Contract instance has already been initialized"); - owner = _owner; - initialized = true; - } - - function _authorizeUpgrade(address) internal view override { - require(owner == msg.sender, "No privilege to upgrade"); - } - - function version() external pure virtual override returns (string memory) { - return "UUPSUpgradeableMock 1.0.0"; - } -} - -contract UUPSUpgradeableMockV2 is UUPSUpgradeableMock { - function version() external pure override returns (string memory) { - return "UUPSUpgradeableMock 2.0.0"; - } -} - -contract UUPSUnsupportedProxiableUUID is UUPSUpgradeableMock { - function proxiableUUID() external pure override returns (bytes32) { - return keccak256("invalid UUID"); - } - - function version() external pure override returns (string memory) { - return "UUPSUnsupportedProxiableUUID 1.0.0"; - } -} diff --git a/contracts/src/proxy/mock/by-inheritance/UpgradedByInheritance.sol b/contracts/src/proxy/mock/by-inheritance/UpgradedByInheritance.sol deleted file mode 100644 index b443051a8..000000000 --- a/contracts/src/proxy/mock/by-inheritance/UpgradedByInheritance.sol +++ /dev/null @@ -1,67 +0,0 @@ -//SPDX-License-Identifier: MIT -// Adapted from - -pragma solidity ^0.8.24; - -import "../../UUPSProxiable.sol"; -import "../../UUPSProxy.sol"; -import "../../Initializable.sol"; - -contract UpgradedByInheritanceV1Proxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract UpgradedByInheritanceV1 is UUPSProxiable, Initializable { - address public owner; - uint256 public counter; - uint256[50] __gap; - - constructor() { - _disableInitializers(); - } - - function initialize(address _owner) external virtual initializer { - owner = _owner; - counter = 1; - } - - function _authorizeUpgrade(address) internal view override { - require(owner == msg.sender, "No privilege to upgrade"); - } - - function increment() external { - ++counter; - } - - function version() external pure virtual override returns (string memory) { - return "V1"; - } -} - -contract UpgradedByInheritanceV2 is UpgradedByInheritanceV1 { - string public newVariable; - uint256[50] __gap2; - - constructor() { - _disableInitializers(); - } - - function initializeV2(string memory _newVariable) external reinitializer(2) { - newVariable = _newVariable; - this.increment(); - } - - function version() external pure virtual override returns (string memory) { - return "V2"; - } -} - -contract UpgradedByInheritanceV3Bad is UpgradedByInheritanceV2 { - constructor() { - _disableInitializers(); - } - - function initializeV3() external initializer { - // Wrong reinitializer version. - } -} diff --git a/contracts/src/proxy/mock/by-rewrite/UpgradedByRewrite.sol b/contracts/src/proxy/mock/by-rewrite/UpgradedByRewrite.sol deleted file mode 100644 index d8930796d..000000000 --- a/contracts/src/proxy/mock/by-rewrite/UpgradedByRewrite.sol +++ /dev/null @@ -1,42 +0,0 @@ -//SPDX-License-Identifier: MIT -// Adapted from - -pragma solidity ^0.8.24; - -import "../../UUPSProxiable.sol"; -import "../../Initializable.sol"; -import "../../UUPSProxy.sol"; - -contract UpgradedByRewriteProxy is UUPSProxy { - constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} -} - -contract UpgradedByRewrite is UUPSProxiable, Initializable { - //------------------------ - // V1 State - //------------------------ - address public owner; - uint256 public counter; - uint256[50] __gap; - - constructor() { - _disableInitializers(); - } - - function initialize(address _owner) external virtual initializer { - owner = _owner; - counter = 1; - } - - function _authorizeUpgrade(address) internal view override { - require(owner == msg.sender, "No privilege to upgrade"); - } - - function increment() external { - ++counter; - } - - function version() external pure virtual override returns (string memory) { - return "V1"; - } -} diff --git a/contracts/src/proxy/mock/by-rewrite/UpgradedByRewriteV2.sol b/contracts/src/proxy/mock/by-rewrite/UpgradedByRewriteV2.sol deleted file mode 100644 index 5158c73fb..000000000 --- a/contracts/src/proxy/mock/by-rewrite/UpgradedByRewriteV2.sol +++ /dev/null @@ -1,42 +0,0 @@ -//SPDX-License-Identifier: MIT -// Adapted from - -pragma solidity ^0.8.24; - -import "../../UUPSProxiable.sol"; -import "../../Initializable.sol"; - -contract UpgradedByRewrite is UUPSProxiable, Initializable { - //------------------------ - // V1 State - //------------------------ - address public owner; - uint256 public counter; - uint256[50] __gap; - - //------------------------ - // V2 State - //------------------------ - string public newVariable; - - constructor() { - _disableInitializers(); - } - - function initialize(string memory _newVariable) external reinitializer(2) { - newVariable = _newVariable; - this.increment(); - } - - function _authorizeUpgrade(address) internal view override { - require(owner == msg.sender, "No privilege to upgrade"); - } - - function increment() external { - ++counter; - } - - function version() external pure virtual override returns (string memory) { - return "V2"; - } -} diff --git a/contracts/src/rng/BlockhashRNG.sol b/contracts/src/rng/BlockhashRNG.sol deleted file mode 100644 index d104780f4..000000000 --- a/contracts/src/rng/BlockhashRNG.sol +++ /dev/null @@ -1,120 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./IRNG.sol"; - -/// @title Random Number Generator using blockhash with fallback. -/// @dev -/// Random Number Generator returning the blockhash with a fallback behaviour. -/// On L2 like Arbitrum block production is sporadic so block timestamp is more reliable than block number. -/// Returns 0 when no random number is available. -/// Allows saving the random number for use in the future. It allows the contract to retrieve the blockhash even after the time window. -contract BlockHashRNG is IRNG { - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; // The address that can withdraw funds. - address public consumer; // The address that can request random numbers. - uint256 public immutable lookaheadTime; // Minimal time in seconds between requesting and obtaining a random number. - uint256 public requestTimestamp; // Timestamp of the current request - mapping(uint256 timestamp => uint256 number) public randomNumbers; // randomNumbers[timestamp] is the random number for this timestamp, 0 otherwise. - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - modifier onlyByConsumer() { - if (consumer != msg.sender) revert ConsumerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor. - /// @param _owner The Owner of the contract. - /// @param _consumer The address that can request random numbers. - /// @param _lookaheadTime The time lookahead in seconds for the random number. - constructor(address _owner, address _consumer, uint256 _lookaheadTime) { - owner = _owner; - consumer = _consumer; - lookaheadTime = _lookaheadTime; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Changes the owner of the contract. - /// @param _owner The new owner. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the consumer of the RNG. - /// @param _consumer The new consumer. - function changeConsumer(address _consumer) external onlyByOwner { - consumer = _consumer; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Request a random number. - function requestRandomness() external override onlyByConsumer { - requestTimestamp = block.timestamp; - } - - /// @dev Return the random number. If it has not been saved and is still computable compute it. - /// @return randomNumber The random number or 0 if it is not ready or has not been requested. - function receiveRandomness() external override onlyByConsumer returns (uint256 randomNumber) { - if (requestTimestamp == 0) return 0; // No requests were made yet. - - uint256 expectedTimestamp = requestTimestamp + lookaheadTime; - - // Check if enough time has passed - if (block.timestamp < expectedTimestamp) { - return 0; // Not ready yet - } - - // Check if we already have a saved random number for this timestamp window - randomNumber = randomNumbers[expectedTimestamp]; - if (randomNumber != 0) { - return randomNumber; - } - - // Use last block hash for randomness - randomNumber = uint256(blockhash(block.number - 1)); - if (randomNumber != 0) { - randomNumbers[expectedTimestamp] = randomNumber; - } - return randomNumber; - } - - // ************************************* // - // * View Functions * // - // ************************************* // - - /// @dev Check if randomness is ready to be received. - /// @return ready True if randomness can be received. - function isRandomnessReady() external view returns (bool ready) { - if (requestTimestamp == 0) return false; // No requests were made yet. - return block.timestamp >= requestTimestamp + lookaheadTime; - } - - /// @dev Get the timestamp when randomness will be ready. - /// @return readyTimestamp The timestamp when randomness will be available. - function getRandomnessReadyTimestamp() external view returns (uint256 readyTimestamp) { - if (requestTimestamp == 0) return 0; // No requests were made yet. - return requestTimestamp + lookaheadTime; - } -} diff --git a/contracts/src/rng/ChainlinkConsumerBaseV2Plus.sol b/contracts/src/rng/ChainlinkConsumerBaseV2Plus.sol deleted file mode 100644 index 73df28caf..000000000 --- a/contracts/src/rng/ChainlinkConsumerBaseV2Plus.sol +++ /dev/null @@ -1,169 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -// This contract is adapted from `@chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol` to remove the `ConfirmedOwner` dependency. - -import {IVRFCoordinatorV2Plus} from "@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2Plus.sol"; -import {IVRFMigratableConsumerV2Plus} from "@chainlink/contracts/src/v0.8/vrf/dev/interfaces/IVRFMigratableConsumerV2Plus.sol"; - -/** **************************************************************************** - * @notice Interface for contracts using VRF randomness - * ***************************************************************************** - * @dev PURPOSE - * - * @dev Reggie the Random Oracle (not his real job) wants to provide randomness - * @dev to Vera the verifier in such a way that Vera can be sure he's not - * @dev making his output up to suit himself. Reggie provides Vera a public key - * @dev to which he knows the secret key. Each time Vera provides a seed to - * @dev Reggie, he gives back a value which is computed completely - * @dev deterministically from the seed and the secret key. - * - * @dev Reggie provides a proof by which Vera can verify that the output was - * @dev correctly computed once Reggie tells it to her, but without that proof, - * @dev the output is indistinguishable to her from a uniform random sample - * @dev from the output space. - * - * @dev The purpose of this contract is to make it easy for unrelated contracts - * @dev to talk to Vera the verifier about the work Reggie is doing, to provide - * @dev simple access to a verifiable source of randomness. It ensures 2 things: - * @dev 1. The fulfillment came from the VRFCoordinatorV2Plus. - * @dev 2. The consumer contract implements fulfillRandomWords. - * ***************************************************************************** - * @dev USAGE - * - * @dev Calling contracts must inherit from VRFConsumerBaseV2Plus, and can - * @dev initialize VRFConsumerBaseV2Plus's attributes in their constructor as - * @dev shown: - * - * @dev contract VRFConsumerV2Plus is VRFConsumerBaseV2Plus { - * @dev constructor(, address _vrfCoordinator, address _subOwner) - * @dev VRFConsumerBaseV2Plus(_vrfCoordinator, _subOwner) public { - * @dev - * @dev } - * @dev } - * - * @dev The oracle will have given you an ID for the VRF keypair they have - * @dev committed to (let's call it keyHash). Create a subscription, fund it - * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface - * @dev subscription management functions). - * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, - * @dev callbackGasLimit, numWords, extraArgs), - * @dev see (IVRFCoordinatorV2Plus for a description of the arguments). - * - * @dev Once the VRFCoordinatorV2Plus has received and validated the oracle's response - * @dev to your request, it will call your contract's fulfillRandomWords method. - * - * @dev The randomness argument to fulfillRandomWords is a set of random words - * @dev generated from your requestId and the blockHash of the request. - * - * @dev If your contract could have concurrent requests open, you can use the - * @dev requestId returned from requestRandomWords to track which response is associated - * @dev with which randomness request. - * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, - * @dev if your contract could have multiple requests in flight simultaneously. - * - * @dev Colliding `requestId`s are cryptographically impossible as long as seeds - * @dev differ. - * - * ***************************************************************************** - * @dev SECURITY CONSIDERATIONS - * - * @dev A method with the ability to call your fulfillRandomness method directly - * @dev could spoof a VRF response with any random value, so it's critical that - * @dev it cannot be directly called by anything other than this base contract - * @dev (specifically, by the VRFConsumerBaseV2Plus.rawFulfillRandomness method). - * - * @dev For your users to trust that your contract's random behavior is free - * @dev from malicious interference, it's best if you can write it so that all - * @dev behaviors implied by a VRF response are executed *during* your - * @dev fulfillRandomness method. If your contract must store the response (or - * @dev anything derived from it) and use it later, you must ensure that any - * @dev user-significant behavior which depends on that stored value cannot be - * @dev manipulated by a subsequent VRF request. - * - * @dev Similarly, both miners and the VRF oracle itself have some influence - * @dev over the order in which VRF responses appear on the blockchain, so if - * @dev your contract could have multiple VRF requests in flight simultaneously, - * @dev you must ensure that the order in which the VRF responses arrive cannot - * @dev be used to manipulate your contract's user-significant behavior. - * - * @dev Since the block hash of the block which contains the requestRandomness - * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful - * @dev miner could, in principle, fork the blockchain to evict the block - * @dev containing the request, forcing the request to be included in a - * @dev different block with a different hash, and therefore a different input - * @dev to the VRF. However, such an attack would incur a substantial economic - * @dev cost. This cost scales with the number of blocks the VRF oracle waits - * @dev until it calls responds to a request. It is for this reason that - * @dev that you can signal to an oracle you'd like them to wait longer before - * @dev responding to the request (however this is not enforced in the contract - * @dev and so remains effective only in the case of unmodified oracle software). - */ -abstract contract VRFConsumerBaseV2Plus is IVRFMigratableConsumerV2Plus { - error OnlyCoordinatorCanFulfill(address have, address want); - error OnlyOwnerOrCoordinator(address have, address owner, address coordinator); - error ZeroAddress(); - - address public owner; - - // s_vrfCoordinator should be used by consumers to make requests to vrfCoordinator - // so that coordinator reference is updated after migration - IVRFCoordinatorV2Plus public s_vrfCoordinator; - - /** - * @param _vrfCoordinator address of VRFCoordinator contract - */ - constructor(address _owner, address _vrfCoordinator) { - owner = _owner; - if (_vrfCoordinator == address(0)) { - revert ZeroAddress(); - } - s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator); - } - - /** - * @notice fulfillRandomness handles the VRF response. Your contract must - * @notice implement it. See "SECURITY CONSIDERATIONS" above for important - * @notice principles to keep in mind when implementing your fulfillRandomness - * @notice method. - * - * @dev VRFConsumerBaseV2Plus expects its subcontracts to have a method with this - * @dev signature, and will call it once it has verified the proof - * @dev associated with the randomness. (It is triggered via a call to - * @dev rawFulfillRandomness, below.) - * - * @param requestId The Id initially returned by requestRandomness - * @param randomWords the VRF output expanded to the requested number of words - */ - // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore - function fulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) internal virtual; - - // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF - // proof. rawFulfillRandomness then calls fulfillRandomness, after validating - // the origin of the call - function rawFulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) external { - if (msg.sender != address(s_vrfCoordinator)) { - revert OnlyCoordinatorCanFulfill(msg.sender, address(s_vrfCoordinator)); - } - fulfillRandomWords(requestId, randomWords); - } - - /** - * @inheritdoc IVRFMigratableConsumerV2Plus - */ - function setCoordinator(address _vrfCoordinator) external override onlyOwnerOrCoordinator { - if (_vrfCoordinator == address(0)) { - revert ZeroAddress(); - } - s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator); - - emit CoordinatorSet(_vrfCoordinator); - } - - modifier onlyOwnerOrCoordinator() { - if (msg.sender != owner && msg.sender != address(s_vrfCoordinator)) { - revert OnlyOwnerOrCoordinator(msg.sender, owner, address(s_vrfCoordinator)); - } - _; - } -} diff --git a/contracts/src/rng/ChainlinkRNG.sol b/contracts/src/rng/ChainlinkRNG.sol deleted file mode 100644 index 744bc5248..000000000 --- a/contracts/src/rng/ChainlinkRNG.sol +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {VRFConsumerBaseV2Plus, IVRFCoordinatorV2Plus} from "./ChainlinkConsumerBaseV2Plus.sol"; -import {VRFV2PlusClient} from "@chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol"; - -import "./IRNG.sol"; - -/// @title Random Number Generator that uses Chainlink VRF v2.5 -/// https://blog.chain.link/introducing-vrf-v2-5/ -contract ChainlinkRNG is IRNG, VRFConsumerBaseV2Plus { - // ************************************* // - // * Storage * // - // ************************************* // - - address public consumer; // The address that can request random numbers. - bytes32 public keyHash; // The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job). - uint256 public subscriptionId; // The unique identifier of the subscription used for funding requests. - uint16 public requestConfirmations; // How many confirmations the Chainlink node should wait before responding. - // 22 bytes remaining in slot - uint32 public callbackGasLimit; // Gas limit for the Chainlink callback. - uint256 public lastRequestId; // The last request ID. - mapping(uint256 requestId => uint256 number) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise. - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev Emitted when a request is sent to the VRF Coordinator - /// @param _requestId The ID of the request - event RequestSent(uint256 indexed _requestId); - - /// Emitted when a request has been fulfilled. - /// @param _requestId The ID of the request - /// @param _randomWord The random value answering the request. - event RequestFulfilled(uint256 indexed _requestId, uint256 _randomWord); - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - modifier onlyByConsumer() { - if (consumer != msg.sender) revert ConsumerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor, initializing the implementation to reduce attack surface. - /// @param _owner The owner of the contract. - /// @param _consumer The address that can request random numbers. - /// @param _vrfCoordinator The address of the VRFCoordinator contract. - /// @param _keyHash The gas lane key hash value - Defines the maximum gas price you are willing to pay for a request in wei (ID of the off-chain VRF job). - /// @param _subscriptionId The unique identifier of the subscription used for funding requests. - /// @param _requestConfirmations How many confirmations the Chainlink node should wait before responding. - /// @param _callbackGasLimit The limit for how much gas to use for the callback request to the contract's fulfillRandomWords() function. - /// @dev https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number - constructor( - address _owner, - address _consumer, - address _vrfCoordinator, - bytes32 _keyHash, - uint256 _subscriptionId, - uint16 _requestConfirmations, - uint32 _callbackGasLimit - ) VRFConsumerBaseV2Plus(_owner, _vrfCoordinator) { - consumer = _consumer; - keyHash = _keyHash; - subscriptionId = _subscriptionId; - requestConfirmations = _requestConfirmations; - callbackGasLimit = _callbackGasLimit; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - /// @dev Changes the owner of the contract. - /// @param _owner The new owner. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the consumer of the RNG. - /// @param _consumer The new consumer. - function changeConsumer(address _consumer) external onlyByOwner { - consumer = _consumer; - } - - /// @dev Changes the VRF Coordinator of the contract. - /// @param _vrfCoordinator The new VRF Coordinator. - function changeVrfCoordinator(address _vrfCoordinator) external onlyByOwner { - s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator); - emit CoordinatorSet(_vrfCoordinator); - } - - /// @dev Changes the key hash of the contract. - /// @param _keyHash The new key hash. - function changeKeyHash(bytes32 _keyHash) external onlyByOwner { - keyHash = _keyHash; - } - - /// @dev Changes the subscription ID of the contract. - /// @param _subscriptionId The new subscription ID. - function changeSubscriptionId(uint256 _subscriptionId) external onlyByOwner { - subscriptionId = _subscriptionId; - } - - /// @dev Changes the request confirmations of the contract. - /// @param _requestConfirmations The new request confirmations. - function changeRequestConfirmations(uint16 _requestConfirmations) external onlyByOwner { - requestConfirmations = _requestConfirmations; - } - - /// @dev Changes the callback gas limit of the contract. - /// @param _callbackGasLimit The new callback gas limit. - function changeCallbackGasLimit(uint32 _callbackGasLimit) external onlyByOwner { - callbackGasLimit = _callbackGasLimit; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Request a random number. Consumer only. - function requestRandomness() external override onlyByConsumer { - // Will revert if subscription is not set and funded. - uint256 requestId = s_vrfCoordinator.requestRandomWords( - VRFV2PlusClient.RandomWordsRequest({ - keyHash: keyHash, - subId: subscriptionId, - requestConfirmations: requestConfirmations, - callbackGasLimit: callbackGasLimit, - numWords: 1, - extraArgs: VRFV2PlusClient._argsToBytes( - // Set nativePayment to true to pay for VRF requests with ETH instead of LINK - VRFV2PlusClient.ExtraArgsV1({nativePayment: true}) - ) - }) - ); - lastRequestId = requestId; - emit RequestSent(requestId); - } - - /// @dev Callback function called by the VRF Coordinator when the random value is generated. - /// @param _requestId The ID of the request. - /// @param _randomWords The random values answering the request. - function fulfillRandomWords(uint256 _requestId, uint256[] calldata _randomWords) internal override { - // Access control is handled by the parent VRFCoordinator.rawFulfillRandomWords() - randomNumbers[_requestId] = _randomWords[0]; - emit RequestFulfilled(_requestId, _randomWords[0]); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Return the random number. - /// @return randomNumber The random number or 0 if it is not ready or has not been requested. - function receiveRandomness() external view override returns (uint256 randomNumber) { - randomNumber = randomNumbers[lastRequestId]; - } -} diff --git a/contracts/src/rng/IRNG.sol b/contracts/src/rng/IRNG.sol deleted file mode 100644 index c407b763f..000000000 --- a/contracts/src/rng/IRNG.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -/// @title Random Number Generator interface -interface IRNG { - /// @dev Request a random number. - function requestRandomness() external; - - /// @dev Receive the random number. - /// @return randomNumber Random number or 0 if not available - function receiveRandomness() external returns (uint256 randomNumber); - - error OwnerOnly(); - error ConsumerOnly(); -} diff --git a/contracts/src/rng/IRandomizer.sol b/contracts/src/rng/IRandomizer.sol deleted file mode 100644 index 6a6296f82..000000000 --- a/contracts/src/rng/IRandomizer.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -// Randomizer protocol interface -interface IRandomizer { - function request(uint256 callbackGasLimit) external returns (uint256); - - function clientWithdrawTo(address _to, uint256 _amount) external; -} diff --git a/contracts/src/rng/IncrementalNG.sol b/contracts/src/rng/IncrementalNG.sol deleted file mode 100644 index 542090e71..000000000 --- a/contracts/src/rng/IncrementalNG.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; -import "./IRNG.sol"; - -/// @title Incremental Number Generator -/// @dev A Random Number Generator which returns a number incremented by 1 each time. -/// For testing purposes. -contract IncrementalNG is IRNG { - uint256 public number; - - constructor(uint256 _start) { - number = _start; - } - - /// @dev Request a random number. - function requestRandomness() external override { - // nop - } - - /// @dev Get the "random number" (which is always the same). - /// @return randomNumber The random number or 0 if it is not ready or has not been requested. - function receiveRandomness() external override returns (uint256 randomNumber) { - unchecked { - return number++; - } - } -} diff --git a/contracts/src/rng/RNGWithFallback.sol b/contracts/src/rng/RNGWithFallback.sol deleted file mode 100644 index 8501d4db9..000000000 --- a/contracts/src/rng/RNGWithFallback.sol +++ /dev/null @@ -1,109 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import "./IRNG.sol"; - -/// @title RNG with fallback mechanism -/// @notice Uses a primary RNG implementation with automatic fallback to a Blockhash RNG if the primary RNG does not respond passed a timeout. -contract RNGWithFallback is IRNG { - // ************************************* // - // * Storage * // - // ************************************* // - - IRNG public immutable rng; // RNG address. - address public owner; // Owner address - address public consumer; // Consumer address - uint256 public fallbackTimeoutSeconds; // Time in seconds to wait before falling back to next RNG - uint256 public requestTimestamp; // Timestamp of the current request - - // ************************************* // - // * Events * // - // ************************************* // - - event RNGFallback(); - event FallbackTimeoutChanged(uint256 _newTimeout); - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @param _owner Owner address - /// @param _consumer Consumer address - /// @param _fallbackTimeoutSeconds Time in seconds to wait before falling back to next RNG - /// @param _rng The RNG address (e.g. Chainlink) - constructor(address _owner, address _consumer, uint256 _fallbackTimeoutSeconds, IRNG _rng) { - if (address(_rng) == address(0)) revert InvalidDefaultRNG(); - - owner = _owner; - consumer = _consumer; - fallbackTimeoutSeconds = _fallbackTimeoutSeconds; - rng = _rng; - } - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - modifier onlyByConsumer() { - if (consumer != msg.sender) revert ConsumerOnly(); - _; - } - - // ************************************* // - // * Governance Functions * // - // ************************************* // - - /// @dev Change the owner - /// @param _newOwner Address of the new owner - function changeOwner(address _newOwner) external onlyByOwner { - owner = _newOwner; - } - - /// @dev Change the consumer - /// @param _consumer Address of the new consumer - function changeConsumer(address _consumer) external onlyByOwner { - consumer = _consumer; - } - - /// @dev Change the fallback timeout - /// @param _fallbackTimeoutSeconds New timeout in seconds - function changeFallbackTimeout(uint256 _fallbackTimeoutSeconds) external onlyByOwner { - fallbackTimeoutSeconds = _fallbackTimeoutSeconds; - emit FallbackTimeoutChanged(_fallbackTimeoutSeconds); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Request a random number from the primary RNG - /// @dev The consumer is trusted not to make concurrent requests. - function requestRandomness() external override onlyByConsumer { - requestTimestamp = block.timestamp; - rng.requestRandomness(); - } - - /// @dev Receive the random number from the primary RNG with fallback to the blockhash RNG if the primary RNG does not respond passed a timeout. - /// @return randomNumber Random number or 0 if not available - function receiveRandomness() external override onlyByConsumer returns (uint256 randomNumber) { - randomNumber = rng.receiveRandomness(); - - // If we didn't get a random number and the timeout is exceeded, try the fallback - if (randomNumber == 0 && block.timestamp > requestTimestamp + fallbackTimeoutSeconds) { - randomNumber = uint256(blockhash(block.number - 1)); - emit RNGFallback(); - } - return randomNumber; - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error InvalidDefaultRNG(); -} diff --git a/contracts/src/rng/RandomizerRNG.sol b/contracts/src/rng/RandomizerRNG.sol deleted file mode 100644 index 648ce5c3d..000000000 --- a/contracts/src/rng/RandomizerRNG.sol +++ /dev/null @@ -1,133 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "./IRNG.sol"; -import "./IRandomizer.sol"; - -/// @title Random Number Generator that uses Randomizer.ai -/// https://randomizer.ai/ -contract RandomizerRNG is IRNG { - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; // The address that can withdraw funds. - address public consumer; // The address that can request random numbers. - IRandomizer public randomizer; // Randomizer address. - uint256 public callbackGasLimit; // Gas limit for the Randomizer.ai callback. - uint256 public lastRequestId; // The last request ID. - mapping(uint256 requestId => uint256 number) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise. - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev Emitted when a request is sent to the VRF Coordinator - /// @param requestId The ID of the request - event RequestSent(uint256 indexed requestId); - - /// Emitted when a request has been fulfilled. - /// @param requestId The ID of the request - /// @param randomWords The random values answering the request. - event RequestFulfilled(uint256 indexed requestId, uint256 randomWords); - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - if (owner != msg.sender) revert OwnerOnly(); - _; - } - - modifier onlyByConsumer() { - if (consumer != msg.sender) revert ConsumerOnly(); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - /// @dev Constructor - /// @param _owner The Owner of the contract. - /// @param _consumer The address that can request random numbers. - /// @param _randomizer The Randomizer.ai oracle contract. - constructor(address _owner, address _consumer, IRandomizer _randomizer) { - owner = _owner; - consumer = _consumer; - randomizer = _randomizer; - callbackGasLimit = 50000; - } - - // ************************ // - // * Governance * // - // ************************ // - - /// @dev Changes the owner of the contract. - /// @param _owner The new owner. - function changeOwner(address _owner) external onlyByOwner { - owner = _owner; - } - - /// @dev Changes the consumer of the RNG. - /// @param _consumer The new consumer. - function changeConsumer(address _consumer) external onlyByOwner { - consumer = _consumer; - } - - /// @dev Change the Randomizer callback gas limit. - /// @param _callbackGasLimit the new limit. - function setCallbackGasLimit(uint256 _callbackGasLimit) external onlyByOwner { - callbackGasLimit = _callbackGasLimit; - } - - /// @dev Change the Randomizer address. - /// @param _randomizer the new Randomizer address. - function setRandomizer(address _randomizer) external onlyByOwner { - randomizer = IRandomizer(_randomizer); - } - - /// @dev Allows the owner to withdraw randomizer funds. - /// @param _amount Amount to withdraw in wei. - function randomizerWithdraw(uint256 _amount) external onlyByOwner { - randomizer.clientWithdrawTo(msg.sender, _amount); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Request a random number. Consumer only. - function requestRandomness() external override onlyByConsumer { - uint256 requestId = randomizer.request(callbackGasLimit); - lastRequestId = requestId; - emit RequestSent(requestId); - } - - /// @dev Callback function called by the randomizer contract when the random value is generated. - /// @param _id The ID of the request. - /// @param _value The random value answering the request. - function randomizerCallback(uint256 _id, bytes32 _value) external { - if (msg.sender != address(randomizer)) revert RandomizerOnly(); - randomNumbers[_id] = uint256(_value); - emit RequestFulfilled(_id, uint256(_value)); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - /// @dev Return the random number. - /// @return randomNumber The random number or 0 if it is not ready or has not been requested. - function receiveRandomness() external view override returns (uint256 randomNumber) { - randomNumber = randomNumbers[lastRequestId]; - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error RandomizerOnly(); -} diff --git a/contracts/src/rng/mock/ChainlinkVRFCoordinatorMock.sol b/contracts/src/rng/mock/ChainlinkVRFCoordinatorMock.sol deleted file mode 100644 index d7314d5ff..000000000 --- a/contracts/src/rng/mock/ChainlinkVRFCoordinatorMock.sol +++ /dev/null @@ -1,128 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {IVRFCoordinatorV2Plus} from "@chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol"; -import {VRFV2PlusClient} from "@chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol"; - -/// @title A mock for testing code that relies on VRFCoordinatorV2. -contract ChainlinkVRFCoordinatorV2Mock is IVRFCoordinatorV2Plus { - // ************************************* // - // * Storage * // - // ************************************* // - - uint256 nextRequestId = 1; - mapping(uint256 requestID => VRFV2PlusClient.RandomWordsRequest request) requests; - - // ************************************* // - // * Events * // - // ************************************* // - - event RandomWordsRequested( - bytes32 indexed keyHash, - uint256 requestId, - uint256 indexed subId, - uint16 minimumRequestConfirmations, - uint32 callbackGasLimit, - uint32 numWords, - address indexed sender - ); - event RandomWordsFulfilled(uint256 indexed requestId, bool success); - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - function fulfillRandomWords(uint256 _requestId, address _consumer, uint256[] memory _words) public { - if (_consumer == address(0)) revert("zero address consumer"); - if (requests[_requestId].subId == 0) { - revert("nonexistent request"); - } - VRFV2PlusClient.RandomWordsRequest memory req = requests[_requestId]; - - if (_words.length == 0) { - _words = new uint256[](req.numWords); - for (uint256 i = 0; i < req.numWords; i++) { - _words[i] = uint256(keccak256(abi.encode(_requestId, i))); - } - } else if (_words.length != req.numWords) { - revert InvalidRandomWords(); - } - - bytes4 FULFILL_RANDOM_WORDS_SELECTOR = bytes4(keccak256("rawFulfillRandomWords(uint256,uint256[])")); - bytes memory callReq = abi.encodeWithSelector(FULFILL_RANDOM_WORDS_SELECTOR, _requestId, _words); - delete (requests[_requestId]); - (bool success, ) = _consumer.call{gas: req.callbackGasLimit}(callReq); - emit RandomWordsFulfilled(_requestId, success); - } - - function requestRandomWords(VRFV2PlusClient.RandomWordsRequest calldata req) external returns (uint256) { - uint256 requestId = nextRequestId++; - - requests[requestId] = req; - - emit RandomWordsRequested( - req.keyHash, - requestId, - req.subId, - req.requestConfirmations, - req.callbackGasLimit, - req.numWords, - msg.sender - ); - return requestId; - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - function fundSubscription(uint256, uint96) public pure { - revert("not implemented"); - } - - function createSubscription() external pure returns (uint256) { - revert("not implemented"); - } - - function fundSubscriptionWithNative(uint256) external payable { - revert("not implemented"); - } - - function getActiveSubscriptionIds(uint256, uint256) external pure returns (uint256[] memory) { - revert("not implemented"); - } - - function getSubscription(uint256) external pure returns (uint96, uint96, uint64, address, address[] memory) { - revert("not implemented"); - } - - function cancelSubscription(uint256, address) external pure { - revert("not implemented"); - } - - function addConsumer(uint256, address) external pure { - revert("not implemented"); - } - - function removeConsumer(uint256, address) external pure { - revert("not implemented"); - } - - function requestSubscriptionOwnerTransfer(uint256, address) external pure { - revert("not implemented"); - } - - function acceptSubscriptionOwnerTransfer(uint256) external pure { - revert("not implemented"); - } - - function pendingRequestExists(uint256) public pure returns (bool) { - revert("not implemented"); - } - - // ************************************* // - // * Errors * // - // ************************************* // - - error InvalidRandomWords(); -} diff --git a/contracts/src/rng/mock/RandomizerMock.sol b/contracts/src/rng/mock/RandomizerMock.sol deleted file mode 100644 index c36a13815..000000000 --- a/contracts/src/rng/mock/RandomizerMock.sol +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "../RandomizerRNG.sol"; - -contract RandomizerMock is IRandomizer { - uint256 private id = 1; - - function request(uint256 callbackGasLimit) external override returns (uint256) { - return id++; - } - - function clientWithdrawTo(address _to, uint256 _amount) external override { - revert("Not Implemented"); - } - - function relay(RandomizerRNG _rng, uint256 _id, bytes32 _value) external { - _rng.randomizerCallback(_id, _value); - } -} diff --git a/contracts/src/test/KlerosCoreMock.sol b/contracts/src/test/KlerosCoreMock.sol deleted file mode 100644 index 84ad3552e..000000000 --- a/contracts/src/test/KlerosCoreMock.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "../arbitration/KlerosCore.sol"; - -/// @title KlerosCoreMock -/// KlerosCore with view functions to use in Foundry tests. -contract KlerosCoreMock is KlerosCore { - function getCourtChildren(uint256 _courtId) external view returns (uint256[] memory children) { - children = courts[_courtId].children; - } - - function extraDataToCourtIDMinJurorsDisputeKit( - bytes memory _extraData - ) external view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) { - (courtID, minJurors, disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData); - } -} diff --git a/contracts/src/test/RNGMock.sol b/contracts/src/test/RNGMock.sol deleted file mode 100644 index df372265d..000000000 --- a/contracts/src/test/RNGMock.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import "../rng/IRNG.sol"; - -/// @title Simple mock rng to check fallback -contract RNGMock is IRNG { - uint256 public randomNumber; // The number to return; - - function setRN(uint256 _rn) external { - randomNumber = _rn; - } - - function requestRandomness() external override {} - - function receiveRandomness() external view override returns (uint256) { - return randomNumber; - } -} diff --git a/contracts/src/test/SortitionModuleMock.sol b/contracts/src/test/SortitionModuleMock.sol deleted file mode 100644 index 73c9e859c..000000000 --- a/contracts/src/test/SortitionModuleMock.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "../arbitration/SortitionModule.sol"; -import {SortitionTrees, TreeKey} from "../libraries/SortitionTrees.sol"; - -/// @title SortitionModuleMock -/// @dev Adds getter functions to sortition module for Foundry tests. -contract SortitionModuleMock is SortitionModule { - function getSortitionProperties(bytes32 _key) external view returns (uint256 K, uint256 nodeLength) { - SortitionTrees.Tree storage tree = sortitionSumTrees[TreeKey.wrap(_key)]; - K = tree.K; - nodeLength = tree.nodes.length; - } -} diff --git a/contracts/src/test/SortitionTreesMock.sol b/contracts/src/test/SortitionTreesMock.sol deleted file mode 100644 index 3dcfe8741..000000000 --- a/contracts/src/test/SortitionTreesMock.sol +++ /dev/null @@ -1,154 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import "../libraries/SortitionTrees.sol"; - -/// @title SortitionTreesMock -/// @dev Test contract to expose SortitionTrees library functions for testing -contract SortitionTreesMock { - using SortitionTrees for mapping(TreeKey => SortitionTrees.Tree); - - // Storage for multiple test trees - mapping(TreeKey => SortitionTrees.Tree) public trees; - - // Court hierarchy helpers (for testing parent-child relationships) - mapping(uint96 => uint96[]) public childCourts; - mapping(uint96 => uint96) public parentCourt; - - // ************************************* // - // * Main Functions * // - // ************************************* // - - /// @dev Create a sortition sum tree for a court - function createTree(uint96 _courtID, uint256 _k) external { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - trees.createTree(key, _k); - } - - /// @dev Set stake for a juror in a specific court - function set(uint96 _courtID, address _account, uint256 _value) external { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - bytes32 stakePathID = SortitionTrees.toStakePathID(_account, _courtID); - SortitionTrees.set(trees[key], _value, stakePathID); - } - - /// @dev Draw a juror from a court's tree - function draw( - uint96 _courtID, - uint256 _disputeID, - uint256 _nonce, - uint256 _randomNumber - ) external view returns (address drawnAddress, uint96 fromSubcourtID) { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - return SortitionTrees.draw(trees[key], _disputeID, _nonce, _randomNumber); - } - - /// @dev Get stake of a juror in a specific court - function stakeOf(uint96 _courtID, address _account) external view returns (uint256) { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - bytes32 stakePathID = SortitionTrees.toStakePathID(_account, _courtID); - return SortitionTrees.stakeOf(trees[key], stakePathID); - } - - // ************************************* // - // * Multi-Court Operations * // - // ************************************* // - - /// @dev Set stake for a juror across multiple courts (for testing hierarchy) - function setStakeInHierarchy(uint96[] calldata _courtIDs, address _account, uint256 _value) external { - for (uint256 i = 0; i < _courtIDs.length; i++) { - this.set(_courtIDs[i], _account, _value); - } - } - - /// @dev Get stakes of a juror across multiple courts - function getStakesAcrossCourts( - address _account, - uint96[] calldata _courtIDs - ) external view returns (uint256[] memory stakes) { - stakes = new uint256[](_courtIDs.length); - for (uint256 i = 0; i < _courtIDs.length; i++) { - stakes[i] = this.stakeOf(_courtIDs[i], _account); - } - } - - // ************************************* // - // * Court Hierarchy Setup * // - // ************************************* // - - /// @dev Set parent court for testing hierarchy - function setParentCourt(uint96 _childCourt, uint96 _parentCourt) external { - parentCourt[_childCourt] = _parentCourt; - } - - /// @dev Add child court for testing hierarchy - function addChildCourt(uint96 _parentCourt, uint96 _childCourt) external { - childCourts[_parentCourt].push(_childCourt); - } - - /// @dev Get child courts - function getChildCourts(uint96 _parentCourt) external view returns (uint96[] memory) { - return childCourts[_parentCourt]; - } - - // ************************************* // - // * Tree State Inspection * // - // ************************************* // - - /// @dev Get all nodes in a tree - function getTreeNodes(uint96 _courtID) external view returns (uint256[] memory) { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - return trees[key].nodes; - } - - /// @dev Get tree K value - function getTreeK(uint96 _courtID) external view returns (uint256) { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - return trees[key].K; - } - - /// @dev Get tree stack - function getTreeStack(uint96 _courtID) external view returns (uint256[] memory) { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - return trees[key].stack; - } - - /// @dev Get node index for a juror in a court - function getNodeIndex(uint96 _courtID, address _account) external view returns (uint256) { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - bytes32 stakePathID = SortitionTrees.toStakePathID(_account, _courtID); - return trees[key].IDsToNodeIndexes[stakePathID]; - } - - /// @dev Check if a court tree exists - function courtExists(uint96 _courtID) external view returns (bool) { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - return trees[key].K != 0; - } - - /// @dev Get the root sum (total stakes) of a court - function getRootSum(uint96 _courtID) external view returns (uint256) { - TreeKey key = CourtID.wrap(_courtID).toTreeKey(); - if (trees[key].nodes.length == 0) return 0; - return trees[key].nodes[0]; - } - - // ************************************* // - // * Utility Functions * // - // ************************************* // - - /// @dev Test function to pack address and court ID - function testToStakePathID(address _account, uint96 _courtID) external pure returns (bytes32) { - return SortitionTrees.toStakePathID(_account, _courtID); - } - - /// @dev Test function to unpack stake path ID - function testToAccountAndCourtID(bytes32 _stakePathID) external pure returns (address account, uint96 courtID) { - return SortitionTrees.toAccountAndCourtID(_stakePathID); - } - - /// @dev Test function to convert court ID to tree key - function testToTreeKey(uint96 _courtID) external pure returns (TreeKey) { - return CourtID.wrap(_courtID).toTreeKey(); - } -} diff --git a/contracts/src/token/Faucet.sol b/contracts/src/token/Faucet.sol deleted file mode 100644 index b64a7e2ab..000000000 --- a/contracts/src/token/Faucet.sol +++ /dev/null @@ -1,71 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -contract Faucet { - // ************************************* // - // * Storage * // - // ************************************* // - - IERC20 public token; - address public owner; - mapping(address => bool) public withdrewAlready; - uint256 public amount = 10_000 ether; - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier onlyByOwner() { - require(address(owner) == msg.sender, "Access not allowed: Owner only."); - _; - } - - // ************************************* // - // * Constructor * // - // ************************************* // - - constructor(IERC20 _token) { - token = _token; - owner = msg.sender; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - function changeOwner(address _owner) public onlyByOwner { - owner = _owner; - } - - function changeAmount(uint256 _amount) public onlyByOwner { - amount = _amount; - } - - function withdraw() public onlyByOwner { - token.transfer(owner, token.balanceOf(address(this))); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - function request() public { - require( - !withdrewAlready[msg.sender], - "You have used this faucet already. If you need more tokens, please use another address." - ); - token.transfer(msg.sender, amount); - withdrewAlready[msg.sender] = true; - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - function balance() public view returns (uint) { - return token.balanceOf(address(this)); - } -} diff --git a/contracts/src/token/PNK.sol b/contracts/src/token/PNK.sol deleted file mode 100644 index 0546d4434..000000000 --- a/contracts/src/token/PNK.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract PNK is ERC20 { - constructor() ERC20("Pinakion", "PNK") { - _mint(msg.sender, 1000000 ether); - } -} diff --git a/contracts/src/token/PinakionV2.sol b/contracts/src/token/PinakionV2.sol deleted file mode 100644 index 143a16c93..000000000 --- a/contracts/src/token/PinakionV2.sol +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; -import "@openzeppelin/contracts/access/Ownable.sol"; -import "../libraries/SafeERC20.sol"; - -/// @custom:security-contact contact@kleros.io -contract PinakionV2 is ERC20, ERC20Burnable, Ownable { - using SafeERC20 for IERC20; - - constructor() ERC20("PinakionV2", "PNK") Ownable(msg.sender) { - _mint(msg.sender, 1000000000 * 10 ** decimals()); - } - - function mint(address to, uint256 amount) public onlyOwner { - _mint(to, amount); - } - - /// @notice Recover tokens sent mistakenly to this contract. - /// @param _token The address of the token contract that you want to recover, or set to 0 in case you want to extract ether. - function recoverTokens(address _token) public onlyOwner { - if (_token == address(0)) { - require(payable(owner()).send(address(this).balance), "Transfer failed"); - return; - } - - IERC20 token = IERC20(_token); - uint balance = token.balanceOf(address(this)); - require(token.safeTransfer(payable(owner()), balance), "Token transfer failed"); - } -} diff --git a/contracts/src/token/TestERC1155.sol b/contracts/src/token/TestERC1155.sol deleted file mode 100644 index 7dd562336..000000000 --- a/contracts/src/token/TestERC1155.sol +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; - -contract TestERC1155 is ERC1155 { - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; - uint256 private _nextTokenId; - - // ************************************* // - // * Constructor * // - // ************************************* // - - constructor() ERC1155("") { - owner = msg.sender; - } - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier ownerOnly() { - require(msg.sender == owner, "Owner only"); - _; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - function changeOwner(address _newOwner) external ownerOnly { - owner = _newOwner; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - function mint(address to, uint256 id, uint256 value, bytes memory data) external ownerOnly { - _mint(to, id, value, data); - } - - function mintBatch( - address to, - uint256[] memory ids, - uint256[] memory values, - bytes memory data - ) external ownerOnly { - _mintBatch(to, ids, values, data); - } - - function burn(address from, uint256 id, uint256 value) external ownerOnly { - _burn(from, id, value); - } - - function burnBatch(address from, uint256[] memory ids, uint256[] memory values) external ownerOnly { - _burnBatch(from, ids, values); - } -} diff --git a/contracts/src/token/TestERC20.sol b/contracts/src/token/TestERC20.sol deleted file mode 100644 index b731e8063..000000000 --- a/contracts/src/token/TestERC20.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract TestERC20 is ERC20 { - constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) { - _mint(msg.sender, 1000000 ether); - } -} diff --git a/contracts/src/token/TestERC721.sol b/contracts/src/token/TestERC721.sol deleted file mode 100644 index 13f830c9c..000000000 --- a/contracts/src/token/TestERC721.sol +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; -import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; - -contract TestERC721 is ERC721, ERC721Enumerable { - // ************************************* // - // * Storage * // - // ************************************* // - - address public owner; - uint256 private _nextTokenId; - - // ************************************* // - // * Constructor * // - // ************************************* // - - constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) { - owner = msg.sender; - } - - // ************************************* // - // * Function Modifiers * // - // ************************************* // - - modifier ownerOnly() { - require(msg.sender == owner, "Owner only"); - _; - } - - // ************************************* // - // * Governance * // - // ************************************* // - - function changeOwner(address _newOwner) external ownerOnly { - owner = _newOwner; - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - function safeMint(address to) external ownerOnly { - uint256 tokenId = _nextTokenId++; - _safeMint(to, tokenId); - } - - // ************************************* // - // * Public Views * // - // ************************************* // - - function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { - return super.supportsInterface(interfaceId); - } - - // ************************************* // - // * Internal * // - // ************************************* // - - function _increaseBalance(address account, uint128 value) internal virtual override(ERC721, ERC721Enumerable) { - super._increaseBalance(account, value); - } - - // ************************************* // - // * Internal * // - // ************************************* // - - function _update( - address to, - uint256 tokenId, - address auth - ) internal virtual override(ERC721, ERC721Enumerable) returns (address) { - super._update(to, tokenId, auth); - } -} diff --git a/contracts/src/token/WrappedPinakionV2.sol b/contracts/src/token/WrappedPinakionV2.sol deleted file mode 100644 index c17c46625..000000000 --- a/contracts/src/token/WrappedPinakionV2.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.24; - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract WrappedPinakionV2 is ERC20 { - constructor() ERC20("Staking PNK on xDai", "stPNK") { - _mint(msg.sender, 1000000 ether); - } -} diff --git a/contracts/src/utils/TransactionBatcher.sol b/contracts/src/utils/TransactionBatcher.sol deleted file mode 100644 index 1bbff78a2..000000000 --- a/contracts/src/utils/TransactionBatcher.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -// Adapted from https://github.com/daostack/web3-transaction-batcher/blob/1b88d2ea062f8f2d9fdfdf9bbe85d2bbef780151/contracts/Batcher.sol - -contract TransactionBatcher { - function batchSend(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable { - for (uint256 i = 0; i < targets.length; i++) { - (bool success, ) = targets[i].call{value: values[i]}(datas[i]); - if (!success) revert("transaction failed"); // All the calls must succeed. - } - } - - function batchSendUnchecked( - address[] memory targets, - uint256[] memory values, - bytes[] memory datas - ) public payable { - for (uint256 i = 0; i < targets.length; i++) { - targets[i].call{value: values[i]}(datas[i]); // Intentionally ignoring return value. - } - } -} diff --git a/contracts/test/arbitration/dispute-kit-gated.ts b/contracts/test/arbitration/dispute-kit-gated.ts deleted file mode 100644 index b7336087c..000000000 --- a/contracts/test/arbitration/dispute-kit-gated.ts +++ /dev/null @@ -1,288 +0,0 @@ -import { deployments, ethers, getNamedAccounts, network } from "hardhat"; -import { toBigInt, BigNumberish, Addressable } from "ethers"; -import { - PNK, - KlerosCore, - SortitionModule, - IncrementalNG, - DisputeKitGated, - TestERC20, - TestERC721, - TestERC1155, -} from "../../typechain-types"; -import { expect } from "chai"; -import { Courts } from "../../deploy/utils"; -import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers"; -import { deployERC1155, deployERC721 } from "../../deploy/utils/deployTokens"; - -/* eslint-disable no-unused-vars */ -/* eslint-disable no-unused-expressions */ // https://github.com/standard/standard/issues/690#issuecomment-278533482 - -describe("DisputeKitGated", async () => { - const ONE_THOUSAND_PNK = 10n ** 21n; - const thousandPNK = (amount: BigNumberish) => toBigInt(amount) * ONE_THOUSAND_PNK; - const PNK = (amount: BigNumberish) => toBigInt(amount) * 10n ** 18n; - - let deployer: string; - let juror1: HardhatEthersSigner; - let juror2: HardhatEthersSigner; - let disputeKitGated: DisputeKitGated; - let pnk: PNK; - let dai: TestERC20; - let core: KlerosCore; - let sortitionModule: SortitionModule; - let rng: IncrementalNG; - let nft721: TestERC721; - let nft1155: TestERC1155; - const RANDOM = 424242n; - const GATED_DK_ID = 3; - const TOKEN_ID = 888; - const minStake = PNK(200); - - beforeEach("Setup", async () => { - ({ deployer } = await getNamedAccounts()); - [, juror1, juror2] = await ethers.getSigners(); - - await deployments.fixture(["Arbitration", "VeaMock"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - disputeKitGated = await ethers.getContract("DisputeKitGated"); - pnk = await ethers.getContract("PNK"); - dai = await ethers.getContract("DAI"); - core = await ethers.getContract("KlerosCore"); - sortitionModule = await ethers.getContract("SortitionModule"); - - // Make the tests more deterministic with this dummy RNG - await deployments.deploy("IncrementalNG", { - from: deployer, - args: [RANDOM], - log: true, - }); - rng = await ethers.getContract("IncrementalNG"); - - await sortitionModule.changeRandomNumberGenerator(rng.target).then((tx) => tx.wait()); - - const hre = require("hardhat"); - await deployERC721(hre, deployer, "TestERC721", "Nft721"); - nft721 = await ethers.getContract("Nft721"); - - await deployERC1155(hre, deployer, "TestERC1155", "Nft1155"); - nft1155 = await ethers.getContract("Nft1155"); - await nft1155.mint(deployer, TOKEN_ID, 1, "0x00"); - }); - - const encodeExtraData = ( - courtId: number, - minJurors: BigNumberish, - disputeKitId: number, - tokenGate: string | Addressable, - isERC1155: boolean, - tokenId: BigNumberish - ) => { - // Packing of tokenGate and isERC1155 - // uint88 (padding 11 bytes) + bool (1 byte) + address (20 bytes) = 32 bytes - const packed = ethers.solidityPacked(["uint88", "bool", "address"], [0, isERC1155, tokenGate]); - return ethers.AbiCoder.defaultAbiCoder().encode( - ["uint256", "uint256", "uint256", "bytes32", "uint256"], - [courtId, minJurors, disputeKitId, packed, tokenId] - ); - }; - - const stakeAndDraw = async ( - courtId: number, - minJurors: BigNumberish, - disputeKitId: number, - tokenGate: string | Addressable, - isERC1155: boolean, - tokenId: BigNumberish - ) => { - // Stake jurors - for (const juror of [juror1, juror2]) { - await pnk.transfer(juror.address, thousandPNK(10)).then((tx) => tx.wait()); - expect(await pnk.balanceOf(juror.address)).to.equal(thousandPNK(10)); - - await pnk - .connect(juror) - .approve(core.target, thousandPNK(10), { gasLimit: 300000 }) - .then((tx) => tx.wait()); - - await core - .connect(juror) - .setStake(Courts.GENERAL, thousandPNK(10), { gasLimit: 500000 }) - .then((tx) => tx.wait()); - - expect(await sortitionModule.getJurorBalance(juror.address, 1)).to.deep.equal([ - thousandPNK(10), // totalStaked - 0, // totalLocked - thousandPNK(10), // stakedInCourt - 1, // nbOfCourts - ]); - } - - const extraData = encodeExtraData(courtId, minJurors, disputeKitId, tokenGate, isERC1155, tokenId); - // console.log("extraData", extraData); - - const tokenInfo = await disputeKitGated.extraDataToTokenInfo(extraData); - expect(tokenInfo[0]).to.equal(tokenGate); - expect(tokenInfo[1]).to.equal(isERC1155); - expect(tokenInfo[2]).to.equal(tokenId); - - const arbitrationCost = await core["arbitrationCost(bytes)"](extraData); - - // Warning: this dispute cannot be executed, in reality it should be created by an arbitrable contract, not an EOA. - const tx = await core["createDispute(uint256,bytes)"](2, extraData, { value: arbitrationCost }).then((tx) => - tx.wait() - ); - const disputeId = 0; - // console.log(tx?.logs); - - await network.provider.send("evm_increaseTime", [2000]); // Wait for minStakingTime - await network.provider.send("evm_mine"); - await sortitionModule.passPhase().then((tx) => tx.wait()); // Staking -> Generating - - await sortitionModule.passPhase().then((tx) => tx.wait()); // Generating -> Drawing - return core.draw(disputeId, 70, { gasLimit: 10000000 }); - }; - - describe("When gating with DAI token", async () => { - it("Should draw no juror if they don't have any DAI balance", async () => { - const nbOfJurors = 15n; - const tx = await stakeAndDraw(Courts.GENERAL, nbOfJurors, GATED_DK_ID, dai.target, false, 0).then((tx) => - tx.wait() - ); - - // Ensure that no juror is drawn - const drawLogs = - tx?.logs.filter((log: any) => log.fragment?.name === "Draw" && log.address === core.target) || []; - expect(drawLogs).to.have.length(0); - }); - - it("Should draw only the jurors who have some DAI balance", async () => { - dai.transfer(juror1.address, 1); - - const nbOfJurors = 15n; - const tx = await stakeAndDraw(Courts.GENERAL, nbOfJurors, GATED_DK_ID, dai.target, false, 0).then((tx) => - tx.wait() - ); - - // Ensure that only juror1 is drawn - const drawLogs = - tx?.logs.filter((log: any) => log.fragment?.name === "Draw" && log.address === core.target) || []; - expect(drawLogs).to.have.length(nbOfJurors); - drawLogs.forEach((log: any) => { - expect(log.args[0]).to.equal(juror1.address); - }); - - // Ensure that juror1 has PNK locked - expect(await sortitionModule.getJurorBalance(juror1.address, Courts.GENERAL)).to.deep.equal([ - thousandPNK(10), // totalStaked - minStake * nbOfJurors, // totalLocked - thousandPNK(10), // stakedInCourt - 1, // nbOfCourts - ]); - - // Ensure that juror2 has no PNK locked - expect(await sortitionModule.getJurorBalance(juror2.address, Courts.GENERAL)).to.deep.equal([ - thousandPNK(10), // totalStaked - 0, // totalLocked - thousandPNK(10), // stakedInCourt - 1, // nbOfCourts - ]); - }); - }); - - describe("When gating with ERC721 token", async () => { - it("Should draw no juror if they don't own the ERC721 token", async () => { - const nbOfJurors = 15n; - const tx = await stakeAndDraw(Courts.GENERAL, nbOfJurors, GATED_DK_ID, nft721.target, false, 0).then((tx) => - tx.wait() - ); - - // Ensure that no juror is drawn - const drawLogs = - tx?.logs.filter((log: any) => log.fragment?.name === "Draw" && log.address === core.target) || []; - expect(drawLogs).to.have.length(0); - }); - - it("Should draw only the jurors owning the ERC721 token", async () => { - await nft721.safeMint(juror2.address); - - const nbOfJurors = 15n; - const tx = await stakeAndDraw(Courts.GENERAL, nbOfJurors, GATED_DK_ID, nft721.target, false, 0).then((tx) => - tx.wait() - ); - - // Ensure that only juror2 is drawn - const drawLogs = - tx?.logs.filter((log: any) => log.fragment?.name === "Draw" && log.address === core.target) || []; - expect(drawLogs).to.have.length(nbOfJurors); - drawLogs.forEach((log: any) => { - expect(log.args[0]).to.equal(juror2.address); - }); - - // Ensure that juror1 is has no PNK locked - expect(await sortitionModule.getJurorBalance(juror1.address, Courts.GENERAL)).to.deep.equal([ - thousandPNK(10), // totalStaked - 0, // totalLocked - thousandPNK(10), // stakedInCourt - 1, // nbOfCourts - ]); - - // Ensure that juror2 has PNK locked - expect(await sortitionModule.getJurorBalance(juror2.address, Courts.GENERAL)).to.deep.equal([ - thousandPNK(10), // totalStaked - minStake * nbOfJurors, // totalLocked - thousandPNK(10), // stakedInCourt - 1, // nbOfCourts - ]); - }); - }); - - describe("When gating with ERC1155 token", async () => { - it("Should draw no juror if they don't own the ERC1155 token", async () => { - const nbOfJurors = 15n; - const tx = await stakeAndDraw(Courts.GENERAL, nbOfJurors, GATED_DK_ID, nft1155.target, true, TOKEN_ID).then( - (tx) => tx.wait() - ); - - // Ensure that no juror is drawn - const drawLogs = - tx?.logs.filter((log: any) => log.fragment?.name === "Draw" && log.address === core.target) || []; - expect(drawLogs).to.have.length(0); - }); - - it("Should draw only the jurors owning the ERC1155 token", async () => { - await nft1155.mint(juror2.address, TOKEN_ID, 1, "0x00"); - - const nbOfJurors = 15n; - const tx = await stakeAndDraw(Courts.GENERAL, nbOfJurors, GATED_DK_ID, nft1155.target, true, TOKEN_ID).then( - (tx) => tx.wait() - ); - - // Ensure that only juror2 is drawn - const drawLogs = - tx?.logs.filter((log: any) => log.fragment?.name === "Draw" && log.address === core.target) || []; - expect(drawLogs).to.have.length(nbOfJurors); - drawLogs.forEach((log: any) => { - expect(log.args[0]).to.equal(juror2.address); - }); - - // Ensure that juror1 is has no PNK locked - expect(await sortitionModule.getJurorBalance(juror1.address, Courts.GENERAL)).to.deep.equal([ - thousandPNK(10), // totalStaked - 0, // totalLocked - thousandPNK(10), // stakedInCourt - 1, // nbOfCourts - ]); - - // Ensure that juror2 has PNK locked - expect(await sortitionModule.getJurorBalance(juror2.address, Courts.GENERAL)).to.deep.equal([ - thousandPNK(10), // totalStaked - minStake * nbOfJurors, // totalLocked - thousandPNK(10), // stakedInCourt - 1, // nbOfCourts - ]); - }); - }); -}); diff --git a/contracts/test/arbitration/dispute-kit-shutter.ts b/contracts/test/arbitration/dispute-kit-shutter.ts deleted file mode 100644 index aab7efa58..000000000 --- a/contracts/test/arbitration/dispute-kit-shutter.ts +++ /dev/null @@ -1,733 +0,0 @@ -import { deployments, ethers, getNamedAccounts, network } from "hardhat"; -import { toBigInt, BigNumberish } from "ethers"; -import { PNK, KlerosCore, SortitionModule, IncrementalNG, DisputeKitShutter } from "../../typechain-types"; -import { expect } from "chai"; -import { Courts } from "../../deploy/utils"; -import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers"; - -/* eslint-disable no-unused-vars */ -/* eslint-disable no-unused-expressions */ // https://github.com/standard/standard/issues/690#issuecomment-278533482 - -describe("DisputeKitShutter", async () => { - const ONE_THOUSAND_PNK = 10n ** 21n; - const thousandPNK = (amount: BigNumberish) => toBigInt(amount) * ONE_THOUSAND_PNK; - - let deployer: string; - let juror1: HardhatEthersSigner; - let juror2: HardhatEthersSigner; - let bot: HardhatEthersSigner; - let attacker: HardhatEthersSigner; - let disputeKitShutter: DisputeKitShutter; - let pnk: PNK; - let core: KlerosCore; - let sortitionModule: SortitionModule; - let rng: IncrementalNG; - const RANDOM = 424242n; - const SHUTTER_DK_ID = 2; - const SHUTTER_COURT_ID = 2; // Court with hidden votes for testing - - // Test data - const choice = 1n; - const salt = 12345n; - const justification = "This is my justification for the vote"; - const identity = ethers.keccak256(ethers.toUtf8Bytes("shutter-identity")); - const encryptedVote = ethers.toUtf8Bytes("encrypted-vote-data"); - - beforeEach("Setup", async () => { - ({ deployer } = await getNamedAccounts()); - [, juror1, juror2, bot, attacker] = await ethers.getSigners(); - - await deployments.fixture(["Arbitration", "VeaMock"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - disputeKitShutter = await ethers.getContract("DisputeKitShutter"); - pnk = await ethers.getContract("PNK"); - core = await ethers.getContract("KlerosCore"); - sortitionModule = await ethers.getContract("SortitionModule"); - - // Make the tests more deterministic with this dummy RNG - await deployments.deploy("IncrementalNG", { - from: deployer, - args: [RANDOM], - log: true, - }); - rng = await ethers.getContract("IncrementalNG"); - - await sortitionModule.changeRandomNumberGenerator(rng.target).then((tx) => tx.wait()); - - // Create a court with hidden votes enabled for testing DisputeKitShutter - // Parameters: parent, hiddenVotes, minStake, alpha, feeForJuror, jurorsForCourtJump, timesPerPeriod, sortitionExtraData, supportedDisputeKits - await core.createCourt( - Courts.GENERAL, // parent - true, // hiddenVotes - MUST be true for DisputeKitShutter - ethers.parseEther("200"), // minStake - 10000, // alpha - ethers.parseEther("0.1"), // feeForJuror - 16, // jurorsForCourtJump - [300, 300, 300, 300], // timesPerPeriod for evidence, commit, vote, appeal - ethers.toBeHex(5), // sortitionExtraData - [1, SHUTTER_DK_ID] // supportedDisputeKits - must include Classic (1) and Shutter (2) - ); - - // The new court ID should be 2 (after GENERAL court which is 1) - }); - - // ************************************* // - // * Constants * // - // ************************************* // - - const enum Period { - evidence = 0, - commit = 1, - vote = 2, - appeal = 3, - execution = 4, - } - - // ************************************* // - // * Helper Functions * // - // ************************************* // - - const encodeExtraData = (courtId: BigNumberish, minJurors: BigNumberish, disputeKitId: number) => - ethers.AbiCoder.defaultAbiCoder().encode(["uint256", "uint256", "uint256"], [courtId, minJurors, disputeKitId]); - - const generateCommitments = (choice: bigint, salt: bigint, justification: string) => { - // Recovery commitment: hash(choice, salt) - no justification - const recoveryCommit = ethers.keccak256( - ethers.AbiCoder.defaultAbiCoder().encode(["uint256", "uint256"], [choice, salt]) - ); - - // Full commitment: hash(choice, salt, justificationHash) - const justificationHash = ethers.keccak256(ethers.toUtf8Bytes(justification)); - const fullCommit = ethers.keccak256( - ethers.AbiCoder.defaultAbiCoder().encode(["uint256", "uint256", "bytes32"], [choice, salt, justificationHash]) - ); - - return { fullCommit, recoveryCommit }; - }; - - const createDisputeAndDraw = async (courtId: BigNumberish, minJurors: BigNumberish, disputeKitId: number) => { - // Stake jurors - for (const juror of [juror1, juror2]) { - await pnk.transfer(juror.address, thousandPNK(10)).then((tx) => tx.wait()); - expect(await pnk.balanceOf(juror.address)).to.equal(thousandPNK(10)); - - await pnk - .connect(juror) - .approve(core.target, thousandPNK(10), { gasLimit: 300000 }) - .then((tx) => tx.wait()); - - await core - .connect(juror) - .setStake(SHUTTER_COURT_ID, thousandPNK(10), { gasLimit: 500000 }) - .then((tx) => tx.wait()); - - expect(await sortitionModule.getJurorBalance(juror.address, SHUTTER_COURT_ID)).to.deep.equal([ - thousandPNK(10), // totalStaked - 0, // totalLocked - thousandPNK(10), // stakedInCourt - 1, // nbOfCourts - ]); - } - - const extraData = encodeExtraData(courtId, minJurors, disputeKitId); - const arbitrationCost = await core["arbitrationCost(bytes)"](extraData); - - // Create dispute via core contract - await core["createDispute(uint256,bytes)"](2, extraData, { value: arbitrationCost }).then((tx) => tx.wait()); - const disputeId = 0; - - await network.provider.send("evm_increaseTime", [2000]); // Wait for minStakingTime - await network.provider.send("evm_mine"); - await sortitionModule.passPhase().then((tx) => tx.wait()); // Staking -> Generating - - await sortitionModule.passPhase().then((tx) => tx.wait()); // Generating -> Drawing - await core.draw(disputeId, 70, { gasLimit: 10000000 }); - - return disputeId; - }; - - const advanceToCommitPeriod = async (disputeId: number) => { - // Advance from evidence to commit period - await core.passPeriod(disputeId).then((tx) => tx.wait()); - - // Verify we're in commit period - const dispute = await core.disputes(disputeId); - expect(dispute[2]).to.equal(Period.commit); // period is at index 2 - }; - - const advanceToVotePeriod = async (disputeId: number) => { - // Advance from commit to vote period - const dispute = await core.disputes(disputeId); - const courtId = dispute[0]; // courtID is at index 0 - const court = await core.courts(courtId); - // Court struct: parent, hiddenVotes, children[], minStake, alpha, feeForJuror, jurorsForCourtJump, disabled, timesPerPeriod[] - // timesPerPeriod is a mapping, we need to check the actual structure - const timesPerPeriod = [300, 300, 300, 300]; // Default times from deployment - const commitPeriod = timesPerPeriod[Period.commit]; - - await network.provider.send("evm_increaseTime", [Number(commitPeriod)]); - await network.provider.send("evm_mine"); - - await core.passPeriod(disputeId).then((tx) => tx.wait()); - - // Verify we're in vote period - const updatedDispute = await core.disputes(disputeId); - expect(updatedDispute[2]).to.equal(Period.vote); // period is at index 2 - }; - - const getVoteIDsForJuror = async (disputeId: number, juror: HardhatEthersSigner) => { - const localDisputeId = await disputeKitShutter.coreDisputeIDToLocal(disputeId); - const nbRounds = await disputeKitShutter.getNumberOfRounds(localDisputeId); - const roundIndex = Number(nbRounds) - 1; - - // Get all votes for this round and filter by juror - const voteIDs: bigint[] = []; - const maxVotes = 10; // Reasonable limit for testing - - for (let i = 0; i < maxVotes; i++) { - try { - const voteInfo = await disputeKitShutter.getVoteInfo(disputeId, roundIndex, i); - if (voteInfo[0] === juror.address) { - // account is at index 0 - voteIDs.push(BigInt(i)); - } - } catch { - // No more votes - break; - } - } - - return voteIDs; - }; - - // ************************************* // - // * Tests * // - // ************************************* // - - describe("Commit Phase - castCommitShutter()", () => { - describe("Successful commits", () => { - it("Should allow juror to commit vote with recovery commitment", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - expect(voteIDs.length).to.be.greaterThan(0); - - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await expect( - disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote) - ) - .to.emit(disputeKitShutter, "CommitCastShutter") - .withArgs(disputeId, juror1.address, fullCommit, recoveryCommit, identity, encryptedVote); - - // Verify recovery commitment was stored - const localDisputeId = await disputeKitShutter.coreDisputeIDToLocal(disputeId); - const storedRecoveryCommit = await disputeKitShutter.recoveryCommitments(localDisputeId, 0, voteIDs[0]); - expect(storedRecoveryCommit).to.equal(recoveryCommit); - }); - - it("Should allow juror to update commitment multiple times", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - - // First commitment - const { fullCommit: commit1, recoveryCommit: recovery1 } = generateCommitments(1n, 111n, "First justification"); - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, commit1, recovery1, identity, encryptedVote); - - // Second commitment (overwrites first) - const { fullCommit: commit2, recoveryCommit: recovery2 } = generateCommitments( - 2n, - 222n, - "Second justification" - ); - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, commit2, recovery2, identity, encryptedVote); - - // Verify only the second commitment is stored - const localDisputeId = await disputeKitShutter.coreDisputeIDToLocal(disputeId); - const storedRecoveryCommit = await disputeKitShutter.recoveryCommitments(localDisputeId, 0, voteIDs[0]); - expect(storedRecoveryCommit).to.equal(recovery2); - }); - }); - - describe("Failed commits", () => { - it("Should revert if recovery commitment is empty", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit } = generateCommitments(choice, salt, justification); - - await expect( - disputeKitShutter.connect(juror1).castCommitShutter( - disputeId, - voteIDs, - fullCommit, - ethers.ZeroHash, // Empty recovery commit - identity, - encryptedVote - ) - ).to.be.revertedWithCustomError(disputeKitShutter, "EmptyRecoveryCommit"); - }); - - it("Should revert if not in commit period", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - // Still in evidence period - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await expect( - disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote) - ).to.be.revertedWithCustomError(disputeKitShutter, "NotCommitPeriod"); - }); - - it("Should revert if juror doesn't own the vote", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await expect( - disputeKitShutter.connect(juror2).castCommitShutter( - disputeId, - voteIDs, // Using juror1's vote IDs - fullCommit, - recoveryCommit, - identity, - encryptedVote - ) - ).to.be.revertedWithCustomError(disputeKitShutter, "JurorHasToOwnTheVote"); - }); - }); - }); - - describe("Normal Flow - Bot Reveals", () => { - describe("Successful reveals", () => { - it("Should allow bot to reveal vote with full justification", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - // Juror commits - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - // Bot reveals vote - await expect(disputeKitShutter.connect(bot).castVoteShutter(disputeId, voteIDs, choice, salt, justification)) - .to.emit(disputeKitShutter, "VoteCast") - .withArgs(disputeId, juror1.address, voteIDs, choice, justification); - - // Verify vote was counted - const voteInfo = await disputeKitShutter.getVoteInfo(disputeId, 0, Number(voteIDs[0])); - expect(voteInfo[3]).to.be.true; // voted is at index 3 - expect(voteInfo[2]).to.equal(choice); // choice is at index 2 - }); - }); - - describe("Failed reveals", () => { - it("Should revert if wrong choice provided", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - const wrongChoice = 2n; - await expect( - disputeKitShutter.connect(bot).castVoteShutter( - disputeId, - voteIDs, - wrongChoice, // Wrong choice - salt, - justification - ) - ).to.be.revertedWithCustomError(disputeKitShutter, "HashDoesNotMatchHiddenVoteCommitment"); - }); - - it("Should revert if wrong salt provided", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - const wrongSalt = 99999n; - await expect( - disputeKitShutter.connect(bot).castVoteShutter( - disputeId, - voteIDs, - choice, - wrongSalt, // Wrong salt - justification - ) - ).to.be.revertedWithCustomError(disputeKitShutter, "HashDoesNotMatchHiddenVoteCommitment"); - }); - - it("Should revert if wrong justification provided", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - const wrongJustification = "Wrong justification"; - await expect( - disputeKitShutter.connect(bot).castVoteShutter( - disputeId, - voteIDs, - choice, - salt, - wrongJustification // Wrong justification - ) - ).to.be.revertedWithCustomError(disputeKitShutter, "HashDoesNotMatchHiddenVoteCommitment"); - }); - - it("Should revert if vote already cast", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - // First vote succeeds - await disputeKitShutter.connect(bot).castVoteShutter(disputeId, voteIDs, choice, salt, justification); - - // Second vote fails - await expect( - disputeKitShutter.connect(bot).castVoteShutter(disputeId, voteIDs, choice, salt, justification) - ).to.be.revertedWithCustomError(disputeKitShutter, "VoteAlreadyCast"); - }); - }); - }); - - describe("Recovery Flow - Juror Reveals", () => { - describe("Successful recovery reveals", () => { - it("Should allow juror to recover vote without justification", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - // Juror commits - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - // Juror reveals vote (Shutter failed, so juror must reveal) - // Note: justification can be anything as it won't be validated - await expect( - disputeKitShutter.connect(juror1).castVoteShutter( - disputeId, - voteIDs, - choice, - salt, - "" // Empty justification is fine for recovery - ) - ) - .to.emit(disputeKitShutter, "VoteCast") - .withArgs(disputeId, juror1.address, voteIDs, choice, ""); - - // Verify vote was counted - const voteInfo = await disputeKitShutter.getVoteInfo(disputeId, 0, Number(voteIDs[0])); - expect(voteInfo[3]).to.be.true; // voted is at index 3 - expect(voteInfo[2]).to.equal(choice); // choice is at index 2 - }); - - it("Should validate against recovery commitment when juror reveals", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - // Juror can provide any justification - it won't be validated - const differentJustification = "This is a different justification that won't be checked"; - await expect( - disputeKitShutter.connect(juror1).castVoteShutter( - disputeId, - voteIDs, - choice, - salt, - differentJustification // Different justification is OK for recovery - ) - ).to.not.be.reverted; - }); - }); - - describe("Failed recovery reveals", () => { - it("Should revert if wrong choice in recovery", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - const wrongChoice = 2n; - await expect( - disputeKitShutter.connect(juror1).castVoteShutter( - disputeId, - voteIDs, - wrongChoice, // Wrong choice - salt, - "" - ) - ).to.be.revertedWithCustomError(disputeKitShutter, "HashDoesNotMatchHiddenVoteCommitment"); - }); - - it("Should revert if wrong salt in recovery", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - const wrongSalt = 99999n; - await expect( - disputeKitShutter.connect(juror1).castVoteShutter( - disputeId, - voteIDs, - choice, - wrongSalt, // Wrong salt - "" - ) - ).to.be.revertedWithCustomError(disputeKitShutter, "HashDoesNotMatchHiddenVoteCommitment"); - }); - - it("Should revert if non-juror tries to reveal without correct full commitment", async () => { - // Use the court with hidden votes (court ID 2) - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - // Attacker tries to reveal with only choice and salt (no justification) - await expect( - disputeKitShutter.connect(attacker).castVoteShutter( - disputeId, - voteIDs, - choice, - salt, - "" // No justification - would work for juror but not for others - ) - ).to.be.revertedWithCustomError(disputeKitShutter, "HashDoesNotMatchHiddenVoteCommitment"); - }); - }); - }); - - describe("Hash Function Behavior", () => { - it("Should return different hashes for juror vs non-juror callers", async () => { - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDs = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDs, fullCommit, recoveryCommit, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - // During castVoteShutter, the contract should use different hash logic - // For juror: hash(choice, salt) - // For non-juror: hash(choice, salt, justificationHash) - - // This is tested implicitly by the recovery flow tests above - // The juror can reveal with any justification, while non-juror must provide exact justification - }); - - it("Should correctly compute hash for normal flow", async () => { - // Test hashVote function directly - const justificationHash = ethers.keccak256(ethers.toUtf8Bytes(justification)); - const expectedHash = ethers.keccak256( - ethers.AbiCoder.defaultAbiCoder().encode(["uint256", "uint256", "bytes32"], [choice, salt, justificationHash]) - ); - - // When called by non-juror (normal case), should include justification - const computedHash = await disputeKitShutter.hashVote(choice, salt, justification); - expect(computedHash).to.equal(expectedHash); - }); - }); - - describe("Edge Cases and Security", () => { - it("Should handle mixed normal and recovery reveals in same dispute", async () => { - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDsJuror1 = await getVoteIDsForJuror(disputeId, juror1); - const voteIDsJuror2 = await getVoteIDsForJuror(disputeId, juror2); - - const { fullCommit: commit1, recoveryCommit: recovery1 } = generateCommitments(1n, 111n, "Juror 1 justification"); - const { fullCommit: commit2, recoveryCommit: recovery2 } = generateCommitments(2n, 222n, "Juror 2 justification"); - - // Both jurors commit - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDsJuror1, commit1, recovery1, identity, encryptedVote); - - await disputeKitShutter - .connect(juror2) - .castCommitShutter(disputeId, voteIDsJuror2, commit2, recovery2, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - // Juror1 uses recovery flow (Shutter failed for them) - await disputeKitShutter.connect(juror1).castVoteShutter( - disputeId, - voteIDsJuror1, - 1n, - 111n, - "Different justification" // Recovery doesn't check this - ); - - // Bot reveals juror2's vote normally - await disputeKitShutter.connect(bot).castVoteShutter( - disputeId, - voteIDsJuror2, - 2n, - 222n, - "Juror 2 justification" // Must match exactly - ); - - // Verify both votes were counted - const vote1Info = await disputeKitShutter.getVoteInfo(disputeId, 0, Number(voteIDsJuror1[0])); - const vote2Info = await disputeKitShutter.getVoteInfo(disputeId, 0, Number(voteIDsJuror2[0])); - - expect(vote1Info[3]).to.be.true; // voted is at index 3 - expect(vote1Info[2]).to.equal(1n); // choice is at index 2 - expect(vote2Info[3]).to.be.true; - expect(vote2Info[2]).to.equal(2n); - }); - - it("Should allow anyone to reveal vote with correct data only", async () => { - const disputeId = await createDisputeAndDraw(2, 3, SHUTTER_DK_ID); - await advanceToCommitPeriod(disputeId); - - const voteIDsJuror1 = await getVoteIDsForJuror(disputeId, juror1); - const { fullCommit, recoveryCommit } = generateCommitments(choice, salt, justification); - - await disputeKitShutter - .connect(juror1) - .castCommitShutter(disputeId, voteIDsJuror1, fullCommit, recoveryCommit, identity, encryptedVote); - - // Juror2 commits with a different choice - const differentChoice = 2n; - const voteIDsJuror2 = await getVoteIDsForJuror(disputeId, juror2); - const { fullCommit: commit2, recoveryCommit: recovery2 } = generateCommitments( - differentChoice, - salt, - justification - ); - - await disputeKitShutter - .connect(juror2) - .castCommitShutter(disputeId, voteIDsJuror2, commit2, recovery2, identity, encryptedVote); - - await advanceToVotePeriod(disputeId); - - // In normal Shutter operation, anyone (bot/attacker) can reveal the vote if they have the correct data - // This is by design - the security comes from the fact that only Shutter knows the decryption key - await expect( - disputeKitShutter.connect(attacker).castVoteShutter(disputeId, voteIDsJuror1, choice, salt, justification) - ) - .to.emit(disputeKitShutter, "VoteCast") - .withArgs(disputeId, juror1.address, voteIDsJuror1, choice, justification); - - // Attacker cannot change juror2's vote to a different choice - await expect( - disputeKitShutter.connect(attacker).castVoteShutter( - disputeId, - voteIDsJuror2, - 1n, // Wrong choice - salt, - justification - ) - ).to.be.revertedWithCustomError(disputeKitShutter, "HashDoesNotMatchHiddenVoteCommitment"); - }); - }); -}); diff --git a/contracts/test/arbitration/draw.ts b/contracts/test/arbitration/draw.ts deleted file mode 100644 index 4992501f1..000000000 --- a/contracts/test/arbitration/draw.ts +++ /dev/null @@ -1,444 +0,0 @@ -import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; -import { deployments, ethers, getNamedAccounts, network } from "hardhat"; -import { toBigInt, ContractTransactionResponse, HDNodeWallet } from "ethers"; -import { - PNK, - KlerosCore, - ArbitrableExample, - HomeGateway, - DisputeKitClassic, - SortitionModule, - IncrementalNG, -} from "../../typechain-types"; -import { expect } from "chai"; -import { Courts } from "../../deploy/utils"; - -/* eslint-disable no-unused-vars */ -/* eslint-disable no-unused-expressions */ // https://github.com/standard/standard/issues/690#issuecomment-278533482 - -describe("Draw Benchmark", async () => { - const ONE_TENTH_ETH = 10n ** 17n; - const ONE_THOUSAND_PNK = 10n ** 21n; - - const enum Period { - evidence, // Evidence can be submitted. This is also when drawing has to take place. - commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes. - vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not. - appeal, // The dispute can be appealed. - execution, // Tokens are redistributed and the ruling is executed. - } - - const enum Phase { - staking, // Stake can be updated during this phase. - freezing, // Phase during which the dispute kits can undergo the drawing process. Staking is not allowed during this phase. - } - - const enum DisputeKitPhase { - resolving, // No disputes that need drawing. - generating, // Waiting for a random number. Pass as soon as it is ready. - drawing, // Jurors can be drawn. - } - - let deployer: string; - let relayer: string; - let disputeKit: DisputeKitClassic; - let pnk: PNK; - let core: KlerosCore; - let arbitrable: ArbitrableExample; - let homeGateway: HomeGateway; - let sortitionModule: SortitionModule; - let rng: IncrementalNG; - let parentCourtMinStake: bigint; - let childCourtMinStake: bigint; - const RANDOM = 61688911660239508166491237672720926005752254046266901728404745669596507231249n; - const PARENT_COURT = 1; - const CHILD_COURT = 2; - const abiCoder = ethers.AbiCoder.defaultAbiCoder(); - - beforeEach("Setup", async () => { - ({ deployer, relayer } = await getNamedAccounts()); - - await deployments.fixture(["Arbitration", "VeaMock"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - disputeKit = await ethers.getContract("DisputeKitClassic"); - pnk = await ethers.getContract("PNK"); - core = await ethers.getContract("KlerosCore"); - homeGateway = await ethers.getContract("HomeGatewayToEthereum"); - arbitrable = await ethers.getContract("ArbitrableExample"); - sortitionModule = await ethers.getContract("SortitionModule"); - - parentCourtMinStake = await core.courts(Courts.GENERAL).then((court) => court.minStake); - - childCourtMinStake = 3n * 10n ** 20n; // 300 PNK - - // Make the tests more deterministic with this dummy RNG - await deployments.deploy("IncrementalNG", { - from: deployer, - args: [RANDOM], - log: true, - }); - rng = await ethers.getContract("IncrementalNG"); - - await sortitionModule.changeRandomNumberGenerator(rng.target).then((tx) => tx.wait()); - - // CourtId 2 = CHILD_COURT - const minStake = 3n * 10n ** 20n; // 300 PNK - const alpha = 10000n; - const feeForJuror = ONE_TENTH_ETH; - await core - .createCourt( - 1, - false, - minStake, - alpha, - feeForJuror, - 256, - [0, 0, 0, 10], // evidencePeriod, commitPeriod, votePeriod, appealPeriod - ethers.toBeHex(5), // Extra data for sortition module will return the default value of K) - [1] - ) - .then((tx) => tx.wait()); - }); - - type CountedDraws = { [address: string]: number }; - type SetStake = (wallet: HDNodeWallet) => Promise; - type ExpectFromDraw = (drawTx: Promise) => Promise; - - const draw = async ( - stake: SetStake, - createDisputeCourtId: number, - expectFromDraw: ExpectFromDraw, - unstake: SetStake - ) => { - const arbitrationCost = ONE_TENTH_ETH * 3n; - const [bridger] = await ethers.getSigners(); - const wallets: HDNodeWallet[] = []; - - // Stake some jurors - for (let i = 0; i < 16; i++) { - const wallet = ethers.Wallet.createRandom().connect(ethers.provider); - wallets.push(wallet); - - await bridger - .sendTransaction({ - to: wallet.address, - value: ethers.parseEther("10"), - }) - .then((tx) => tx.wait()); - expect(await ethers.provider.getBalance(wallet)).to.equal(ethers.parseEther("10")); - - await pnk.transfer(wallet.address, ONE_THOUSAND_PNK * 10n).then((tx) => tx.wait()); - expect(await pnk.balanceOf(wallet.address)).to.equal(ONE_THOUSAND_PNK * 10n); - - await pnk - .connect(wallet) - .approve(core.target, ONE_THOUSAND_PNK * 10n, { gasLimit: 300000 }) - .then((tx) => tx.wait()); - - await stake(wallet); - } - - // Create a dispute - const tx = await arbitrable["createDispute(string)"]("future of france", { - value: arbitrationCost, - }); - await tx.wait(); - if (tx.blockNumber === null) throw new Error("tx.blockNumber is null"); - const trace = await network.provider.send("debug_traceTransaction", [tx.hash]); - const [disputeId] = abiCoder.decode(["uint"], ethers.getBytes(`${trace.returnValue}`)); - const lastBlock = await ethers.provider.getBlock(tx.blockNumber - 1); - if (lastBlock?.hash === null || lastBlock?.hash === undefined) throw new Error("lastBlock is null || undefined"); - - // Relayer tx - await homeGateway - .connect(await ethers.getSigner(relayer)) - ["relayCreateDispute((bytes32,uint256,address,uint256,uint256,uint256,string,uint256,bytes))"]( - { - foreignBlockHash: lastBlock?.hash, - foreignChainID: 31337, - foreignArbitrable: arbitrable.target, - foreignDisputeID: disputeId, - externalDisputeID: ethers.keccak256(ethers.toUtf8Bytes("future of france")), - templateId: 0, - templateUri: "", - choices: 2, - extraData: `0x000000000000000000000000000000000000000000000000000000000000000${createDisputeCourtId}0000000000000000000000000000000000000000000000000000000000000003`, - }, - { value: arbitrationCost } - ) - .then((tx) => tx.wait()); - - await network.provider.send("evm_increaseTime", [2000]); // Wait for minStakingTime - await network.provider.send("evm_mine"); - await sortitionModule.passPhase().then((tx) => tx.wait()); // Staking -> Generating - - await sortitionModule.passPhase().then((tx) => tx.wait()); // Generating -> Drawing - await expectFromDraw(core.draw(0, 20, { gasLimit: 1000000 })); - - await network.provider.send("evm_increaseTime", [2000]); // Wait for maxDrawingTime - await sortitionModule.passPhase().then((tx) => tx.wait()); // Drawing -> Staking - expect(await sortitionModule.phase()).to.equal(Phase.staking); - - // Unstake jurors - for (const wallet of wallets) { - await unstake(wallet); - } - }; - - const countDraws = async (blockNumber: number) => { - const draws: Array = await core.queryFilter(core.filters.Draw(), blockNumber, blockNumber); - return draws.reduce((acc: { [address: string]: number }, draw) => { - const address = draw.args._address; - acc[address] = acc[address] ? acc[address] + 1 : 1; - return acc; - }, {}); - }; - - it("Stakes in parent court and should draw jurors in parent court", async () => { - const stake = async (wallet: HDNodeWallet) => { - await core - .connect(wallet) - .setStake(PARENT_COURT, ONE_THOUSAND_PNK * 5n, { gasLimit: 5000000 }) - .then((tx) => tx.wait()); - - expect(await sortitionModule.getJurorBalance(wallet.address, 1)).to.deep.equal([ - ONE_THOUSAND_PNK * 5n, // totalStaked - 0, // totalLocked - ONE_THOUSAND_PNK * 5n, // stakedInCourt - PARENT_COURT, // nbOfCourts - ]); - }; - let countedDraws: CountedDraws; - const expectFromDraw = async (drawTx: Promise) => { - const tx = await (await drawTx).wait(); - if (!tx) throw new Error("Failed to get transaction receipt"); - expect(tx) - .to.emit(core, "Draw") - .withArgs(anyValue, 0, 0, 0) - .to.emit(core, "Draw") - .withArgs(anyValue, 0, 0, 1) - .to.emit(core, "Draw") - .withArgs(anyValue, 0, 0, 2); - if (tx?.blockNumber === undefined) throw new Error("txBlockNumber is null"); - countedDraws = await countDraws(tx.blockNumber); - for (const [address, draws] of Object.entries(countedDraws)) { - expect(await sortitionModule.getJurorBalance(address, PARENT_COURT)).to.deep.equal([ - ONE_THOUSAND_PNK * 5n, // totalStaked - parentCourtMinStake * toBigInt(draws), // totalLocked - ONE_THOUSAND_PNK * 5n, // stakedInCourt - 1, // nbOfCourts - ]); - expect(await sortitionModule.getJurorBalance(address, CHILD_COURT)).to.deep.equal([ - ONE_THOUSAND_PNK * 5n, // totalStaked - parentCourtMinStake * toBigInt(draws), // totalLocked - 0, // stakedInCourt - 1, // nbOfCourts - ]); - } - expect(await core.getRoundInfo(0, 0).then((round) => round.drawIterations)).to.equal(3); - }; - - const unstake = async (wallet: HDNodeWallet) => { - await core - .connect(wallet) - .setStake(PARENT_COURT, 0, { gasLimit: 5000000 }) - .then((tx) => tx.wait()); - const locked = parentCourtMinStake * toBigInt(countedDraws[wallet.address] ?? 0); - expect( - await sortitionModule.getJurorBalance(wallet.address, PARENT_COURT), - "Drawn jurors have a locked stake in the parent court" - ).to.deep.equal([ - locked, // totalStaked won't go lower than locked amount - locked, // totalLocked - 0, // stakedInCourt - 0, // nbOfCourts - ]); - expect( - await sortitionModule.getJurorBalance(wallet.address, CHILD_COURT), - "No locked stake in the child court" - ).to.deep.equal([ - locked, // totalStaked won't go lower than locked amount - locked, // totalLocked - 0, // stakedInCourt - 0, // nbOfCourts - ]); - }; - - await draw(stake, PARENT_COURT, expectFromDraw, unstake); - }); - - it("Stakes in parent court and should draw nobody in subcourt [ @skip-on-coverage ]", async () => { - const stake = async (wallet: HDNodeWallet) => { - await core - .connect(wallet) - .setStake(PARENT_COURT, ONE_THOUSAND_PNK * 5n, { gasLimit: 5000000 }) - .then((tx) => tx.wait()); - }; - - const expectFromDraw = async (drawTx: Promise) => { - expect(await drawTx).to.not.emit(core, "Draw"); - expect(await core.getRoundInfo(0, 0).then((round) => round.drawIterations)).to.equal(20); - }; - - const unstake = async (wallet: HDNodeWallet) => { - await core - .connect(wallet) - .setStake(PARENT_COURT, 0, { gasLimit: 5000000 }) - .then((tx) => tx.wait()); - expect( - await sortitionModule.getJurorBalance(wallet.address, PARENT_COURT), - "No locked stake in the parent court" - ).to.deep.equal([ - 0, // totalStaked - 0, // totalLocked - 0, // stakedInCourt - 0, // nbOfCourts - ]); - expect( - await sortitionModule.getJurorBalance(wallet.address, CHILD_COURT), - "No locked stake in the child court" - ).to.deep.equal([ - 0, // totalStaked - 0, // totalLocked - 0, // stakedInCourt - 0, // nbOfCourts - ]); - }; - - await draw(stake, CHILD_COURT, expectFromDraw, unstake); - }); - - it("Stakes in subcourt and should draw jurors in parent court", async () => { - const stake = async (wallet: HDNodeWallet) => { - await core - .connect(wallet) - .setStake(CHILD_COURT, ONE_THOUSAND_PNK * 5n, { gasLimit: 5000000 }) - .then((tx) => tx.wait()); - }; - let countedDraws: CountedDraws; - const expectFromDraw = async (drawTx: Promise) => { - const tx = await (await drawTx).wait(); - if (!tx) throw new Error("Failed to get transaction receipt"); - expect(tx) - .to.emit(core, "Draw") - .withArgs(anyValue, 0, 0, 0) - .to.emit(core, "Draw") - .withArgs(anyValue, 0, 0, 1) - .to.emit(core, "Draw") - .withArgs(anyValue, 0, 0, 2); - - countedDraws = await countDraws(tx.blockNumber); - for (const [address, draws] of Object.entries(countedDraws)) { - expect(await sortitionModule.getJurorBalance(address, PARENT_COURT)).to.deep.equal([ - ONE_THOUSAND_PNK * 5n, // totalStaked - parentCourtMinStake * toBigInt(draws), // totalLocked - 0, // stakedInCourt - 1, // nbOfCourts - ]); - expect(await sortitionModule.getJurorBalance(address, CHILD_COURT)).to.deep.equal([ - ONE_THOUSAND_PNK * 5n, // totalStaked - parentCourtMinStake * toBigInt(draws), // totalLocked - ONE_THOUSAND_PNK * 5n, // stakedInCourt - 1, // nbOfCourts - ]); - } - expect(await core.getRoundInfo(0, 0).then((round) => round.drawIterations)).to.equal(3); - }; - - const unstake = async (wallet: HDNodeWallet) => { - await core - .connect(wallet) - .setStake(CHILD_COURT, 0, { gasLimit: 5000000 }) - .then((tx) => tx.wait()); - const locked = parentCourtMinStake * toBigInt(countedDraws[wallet.address] ?? 0); - expect( - await sortitionModule.getJurorBalance(wallet.address, PARENT_COURT), - "No locked stake in the parent court" - ).to.deep.equal([ - locked, // totalStaked won't go lower than locked amount - locked, // totalLocked - 0, // stakedInCourt - 0, // nbOfCourts - ]); - expect( - await sortitionModule.getJurorBalance(wallet.address, CHILD_COURT), - "Drawn jurors have a locked stake in the child court" - ).to.deep.equal([ - locked, // totalStaked won't go lower than locked amount - locked, // totalLocked - 0, // stakedInCourt - 0, // nbOfCourts - ]); - }; - - await draw(stake, PARENT_COURT, expectFromDraw, unstake); - }); - - it("Stakes in subcourt and should draw jurors in subcourt", async () => { - const stake = async (wallet: HDNodeWallet) => { - await core - .connect(wallet) - .setStake(CHILD_COURT, ONE_THOUSAND_PNK * 5n, { gasLimit: 5000000 }) - .then((tx) => tx.wait()); - }; - let countedDraws: CountedDraws; - const expectFromDraw = async (drawTx: Promise) => { - const tx = await (await drawTx).wait(); - if (!tx) throw new Error("Failed to get transaction receipt"); - expect(tx) - .to.emit(core, "Draw") - .withArgs(anyValue, 0, 0, 0) - .to.emit(core, "Draw") - .withArgs(anyValue, 0, 0, 1) - .to.emit(core, "Draw") - .withArgs(anyValue, 0, 0, 2); - - countedDraws = await countDraws(tx.blockNumber); - for (const [address, draws] of Object.entries(countedDraws)) { - expect(await sortitionModule.getJurorBalance(address, PARENT_COURT)).to.deep.equal([ - ONE_THOUSAND_PNK * 5n, // totalStaked - childCourtMinStake * toBigInt(draws), // totalLocked - 0, // stakedInCourt - 1, // nbOfCourts - ]); - expect(await sortitionModule.getJurorBalance(address, CHILD_COURT)).to.deep.equal([ - ONE_THOUSAND_PNK * 5n, // totalStaked - childCourtMinStake * toBigInt(draws), // totalLocked - ONE_THOUSAND_PNK * 5n, // stakedInCourt - 1, // nbOfCourts - ]); - } - expect(await core.getRoundInfo(0, 0).then((round) => round.drawIterations)).to.equal(3); - }; - - const unstake = async (wallet: HDNodeWallet) => { - await core - .connect(wallet) - .setStake(CHILD_COURT, 0, { gasLimit: 5000000 }) - .then((tx) => tx.wait()); - const locked = childCourtMinStake * toBigInt(countedDraws[wallet.address] ?? 0); - expect( - await sortitionModule.getJurorBalance(wallet.address, PARENT_COURT), - "No locked stake in the parent court" - ).to.deep.equal([ - locked, // totalStaked won't go lower than locked amount - locked, // totalLocked - 0, // stakedInCourt - 0, // nbOfCourts - ]); - expect( - await sortitionModule.getJurorBalance(wallet.address, CHILD_COURT), - "Drawn jurors have a locked stake in the child court" - ).to.deep.equal([ - locked, // totalStaked won't go lower than locked amount - locked, // totalLocked - 0, // stakedInCourt - 0, // nbOfCourts - ]); - }; - - await draw(stake, CHILD_COURT, expectFromDraw, unstake); - }); -}); diff --git a/contracts/test/arbitration/index.ts b/contracts/test/arbitration/index.ts deleted file mode 100644 index 127fa2500..000000000 --- a/contracts/test/arbitration/index.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { expect } from "chai"; -import { deployments, ethers } from "hardhat"; -import { - KlerosCore, - DisputeKitClassic, - DisputeKitShutter, - DisputeKitGated, - DisputeKitGatedShutter, -} from "../../typechain-types"; -import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers"; - -describe("DisputeKitClassic", async () => { - // eslint-disable-next-line no-unused-vars - let deployer: HardhatEthersSigner; - let core: KlerosCore, - disputeKit: DisputeKitClassic, - disputeKitShutter: DisputeKitShutter, - disputeKitGated: DisputeKitGated, - disputeKitGatedShutter: DisputeKitGatedShutter; - - before("Deploying", async () => { - [deployer] = await ethers.getSigners(); - [core, disputeKit, disputeKitShutter, disputeKitGated, disputeKitGatedShutter] = await deployContracts(); - }); - - it("Kleros Core initialization", async () => { - const events = await core.queryFilter(core.filters.DisputeKitCreated()); - expect(events.length).to.equal(4); - expect(events[0].args._disputeKitID).to.equal(1); - expect(events[0].args._disputeKitAddress).to.equal(disputeKit.target); - expect(events[1].args._disputeKitID).to.equal(2); - expect(events[1].args._disputeKitAddress).to.equal(disputeKitShutter.target); - expect(events[2].args._disputeKitID).to.equal(3); - expect(events[2].args._disputeKitAddress).to.equal(disputeKitGated.target); - expect(events[3].args._disputeKitID).to.equal(4); - expect(events[3].args._disputeKitAddress).to.equal(disputeKitGatedShutter.target); - - // Reminder: the Forking court will be added which will break these expectations. - const events2 = await core.queryFilter(core.filters.CourtCreated()); - expect(events2.length).to.equal(1); - expect(events2[0].args._courtID).to.equal(1); - expect(events2[0].args._parent).to.equal(0); - expect(events2[0].args._hiddenVotes).to.equal(false); - expect(events2[0].args._minStake).to.equal(ethers.parseUnits("200", 18)); - expect(events2[0].args._alpha).to.equal(10000); - expect(events2[0].args._feeForJuror).to.equal(ethers.parseUnits("0.1", 18)); - expect(events2[0].args._jurorsForCourtJump).to.equal(256); - expect(events2[0].args._timesPerPeriod).to.deep.equal([0, 0, 0, 10]); - expect(events2[0].args._supportedDisputeKits).to.deep.equal([1]); - - const events3 = await core.queryFilter(core.filters.DisputeKitEnabled()); - expect(events3.length).to.equal(4); - - const classicDisputeKit = events3[0].args; - expect(classicDisputeKit._courtID).to.equal(1); - expect(classicDisputeKit._disputeKitID).to.equal(1); - expect(classicDisputeKit._enable).to.equal(true); - - const shutterDisputeKit = events3[1].args; - expect(shutterDisputeKit._courtID).to.equal(1); - expect(shutterDisputeKit._disputeKitID).to.equal(2); - expect(shutterDisputeKit._enable).to.equal(true); - - const gatedDisputeKit = events3[2].args; - expect(gatedDisputeKit._courtID).to.equal(1); - expect(gatedDisputeKit._disputeKitID).to.equal(3); - expect(gatedDisputeKit._enable).to.equal(true); - - const gatedShutterDisputeKit = events3[3].args; - expect(gatedShutterDisputeKit._courtID).to.equal(1); - expect(gatedShutterDisputeKit._disputeKitID).to.equal(4); - expect(gatedShutterDisputeKit._enable).to.equal(true); - }); - - it("Should create a dispute", async () => { - await expect( - disputeKit.connect(deployer).createDispute(0, 0, ethers.toBeHex(3), "0x00") - ).to.be.revertedWithCustomError(disputeKit, "KlerosCoreOnly"); - - const tx = await core - .connect(deployer) - ["createDispute(uint256,bytes)"](2, "0x00", { value: ethers.parseEther("0.3") }); - expect(tx).to.emit(core, "DisputeCreation").withArgs(0, deployer.address); - expect(tx).to.emit(disputeKit, "DisputeCreation").withArgs(0, 2, "0x00"); - - await disputeKit.disputes(0).then((disputes) => { - expect(disputes[0]).to.equal(2); - }); - - console.log(`choice 0: ${await disputeKit.getRoundInfo(0, 0, 0)}`); - console.log(`choice 1: ${await disputeKit.getRoundInfo(0, 0, 1)}`); - console.log(`choice 2: ${await disputeKit.getRoundInfo(0, 0, 2)}`); - }); -}); - -async function deployContracts(): Promise< - [KlerosCore, DisputeKitClassic, DisputeKitShutter, DisputeKitGated, DisputeKitGatedShutter] -> { - await deployments.fixture(["Arbitration", "VeaMock"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - const disputeKit = await ethers.getContract("DisputeKitClassic"); - const disputeKitShutter = await ethers.getContract("DisputeKitShutter"); - const disputeKitGated = await ethers.getContract("DisputeKitGated"); - const disputeKitGatedShutter = await ethers.getContract("DisputeKitGatedShutter"); - const core = await ethers.getContract("KlerosCore"); - return [core, disputeKit, disputeKitShutter, disputeKitGated, disputeKitGatedShutter]; -} diff --git a/contracts/test/arbitration/ruler.ts b/contracts/test/arbitration/ruler.ts deleted file mode 100644 index dafdb59da..000000000 --- a/contracts/test/arbitration/ruler.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { expect } from "chai"; -import { deployments, ethers } from "hardhat"; -import { ZeroAddress, parseEther } from "ethers"; -import { DisputeResolver, KlerosCoreRuler } from "../../typechain-types"; -import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; -import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers"; - -describe("KlerosCoreRuler", async () => { - // eslint-disable-next-line no-unused-vars - let deployer: HardhatEthersSigner, dev: HardhatEthersSigner, dev2: HardhatEthersSigner; - let core: KlerosCoreRuler; - let resolver: DisputeResolver; - - enum RulingMode { - uninitialized, - manual, // executeRuling() is called manually. - automaticRandom, // The ruling is given randomly automatically. - automaticPreset, // The ruling is given automatically with a preset value. - } - - const courtId = 1; - const minJurors = 3; - const disputeKitId = 1; - const extraData = ethers.AbiCoder.defaultAbiCoder().encode( - ["uint96", "uint96", "uint256"], - [courtId, minJurors, disputeKitId] - ); - - before("Deploying", async () => { - [deployer, dev, dev2] = await ethers.getSigners(); - [core, resolver] = await deployContracts(); - - // Create dummy disputes to distinguish between arbitrable-level and arbitrator-level disputeIDs - await core.changeRulingModeToManual(deployer.address); - await core["createDispute(uint256,bytes)"](2, extraData, { value: parseEther("0.3") }); - }); - - it("Should have initialized the Arbitrator", async () => { - // Reminder: the Forking court will be added which will break these expectations. - let events = await core.queryFilter(core.filters.CourtCreated()); - expect(events.length).to.equal(1); - expect(events[0].args._courtID).to.equal(1); - expect(events[0].args._parent).to.equal(0); - expect(events[0].args._alpha).to.equal(10000); - expect(events[0].args._feeForJuror).to.equal(10n ** 17n); - expect(events[0].args._jurorsForCourtJump).to.equal(16); - }); - - it("Should fail to create a dispute without setting the RulingMode first", async () => { - await expect( - resolver.createDisputeForTemplate(extraData, "", "", 3, { value: parseEther("0.3") }) - ).to.be.revertedWithCustomError(core, "RulingModeNotSet"); - }); - - it("Should allow anyone to set the RulingMode for an uninitialized arbitrable", async () => { - expect(await core.rulers(resolver.target)).to.equal(ZeroAddress); - - await expect(core.connect(dev).changeRulingModeToAutomaticRandom(resolver.target)) - .to.emit(core, "RulerSettingsChanged") - .withArgs(resolver.target, [RulingMode.automaticRandom, 0, false, false]); - - expect(await core.rulers(resolver.target)).to.equal(dev.address); - }); - - it("Should only allow the arbitrable's ruler to set the RulingMode", async () => { - expect(await core.rulers(resolver.target)).to.equal(dev.address); - - await expect(core.connect(dev2).changeRulingModeToManual(resolver.target)).revertedWithCustomError( - core, - "RulerOnly" - ); - - await expect(core.connect(deployer).changeRulingModeToManual(resolver.target)).revertedWithCustomError( - core, - "RulerOnly" - ); - - expect(await core.rulers(resolver.target)).to.equal(dev.address); - }); - - it("Should create a dispute and automatically execute a random ruling", async () => { - await expect(core.connect(dev).changeRulingModeToAutomaticRandom(resolver.target)) - .to.emit(core, "RulerSettingsChanged") - .withArgs(resolver.target, [RulingMode.automaticRandom, 0, false, false]); - - const disputeID = 1; - const localDisputeID = disputeID - 1; - const templateId = disputeID - 1; - - await expect(resolver.createDisputeForTemplate(extraData, "", "", 3, { value: parseEther("0.3") })) - .to.emit(core, "DisputeCreation") - .withArgs(disputeID, resolver.target) - .and.to.emit(core, "AutoRuled") - .withArgs(resolver.target, RulingMode.automaticRandom, disputeID, anyValue, anyValue, anyValue) - .and.to.emit(core, "Ruling") - .withArgs(resolver.target, disputeID, anyValue) - .and.to.emit(core, "TokenAndETHShift") - .withArgs(dev.address, disputeID, 0, 1, 0, anyValue, ZeroAddress) - .and.to.emit(resolver, "DisputeRequest") - .withArgs(core.target, disputeID, localDisputeID, templateId, "") - .and.to.emit(resolver, "Ruling") - .withArgs(core.target, disputeID, anyValue); - }); - - it("Should create a dispute and automatically execute a preset ruling", async () => { - await expect(core.connect(dev).changeRulingModeToAutomaticPreset(resolver.target, 2, true, false)) - .to.emit(core, "RulerSettingsChanged") - .withArgs(resolver.target, [RulingMode.automaticPreset, 2, true, false]); - - const disputeID = 2; - const localDisputeID = disputeID - 1; - const templateId = disputeID - 1; - - await expect(resolver.createDisputeForTemplate(extraData, "", "", 3, { value: parseEther("0.3") })) - .to.emit(core, "DisputeCreation") - .withArgs(disputeID, resolver.target) - .and.to.emit(core, "AutoRuled") - .withArgs(resolver.target, RulingMode.automaticPreset, disputeID, 2, true, false) - .and.to.emit(core, "Ruling") - .withArgs(resolver.target, disputeID, 2) - .and.to.emit(core, "TokenAndETHShift") - .withArgs(dev.address, disputeID, 0, 1, 0, anyValue, ZeroAddress) - .and.to.emit(resolver, "DisputeRequest") - .withArgs(core.target, disputeID, localDisputeID, templateId, "") - .and.to.emit(resolver, "Ruling") - .withArgs(core.target, disputeID, 2); - }); - - it("Should create a dispute and manually execute a ruling", async () => { - await expect(core.connect(dev).changeRulingModeToManual(resolver.target)) - .to.emit(core, "RulerSettingsChanged") - .withArgs(resolver.target, [RulingMode.manual, 0, false, false]); - - const disputeID = 3; - const localDisputeID = disputeID - 1; - const templateId = disputeID - 1; - - await expect(resolver.createDisputeForTemplate(extraData, "", "", 3, { value: parseEther("0.3") })) - .to.emit(core, "DisputeCreation") - .withArgs(disputeID, resolver.target) - .and.to.emit(resolver, "DisputeRequest") - .withArgs(core.target, disputeID, localDisputeID, templateId, ""); - - await expect(core.connect(deployer).executeRuling(disputeID, 3, true, true)).revertedWithCustomError( - core, - "RulerOnly" - ); - - await expect(core.connect(dev).executeRuling(disputeID, 3, true, true)) - .and.to.emit(core, "Ruling") - .withArgs(resolver.target, disputeID, 3) - .and.to.emit(resolver, "Ruling") - .withArgs(core.target, disputeID, 3); - - await expect(core.execute(disputeID, 0)) - .and.to.emit(core, "TokenAndETHShift") - .withArgs(dev.address, disputeID, 0, 1, 0, anyValue, ZeroAddress); - }); -}); - -async function deployContracts(): Promise<[KlerosCoreRuler, DisputeResolver]> { - await deployments.fixture(["ArbitrationRuler"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - const resolver = await ethers.getContract("DisputeResolverRuler"); - const core = await ethers.getContract("KlerosCoreRuler"); - return [core, resolver]; -} diff --git a/contracts/test/arbitration/staking-neo.ts b/contracts/test/arbitration/staking-neo.ts deleted file mode 100644 index 9cd83efeb..000000000 --- a/contracts/test/arbitration/staking-neo.ts +++ /dev/null @@ -1,793 +0,0 @@ -import { ethers, getNamedAccounts, network, deployments } from "hardhat"; -import { - PNK, - RandomizerRNG, - RandomizerMock, - SortitionModule, - KlerosCore, - TestERC721, - DisputeResolver, - ChainlinkRNG, - ChainlinkVRFCoordinatorV2Mock, -} from "../../typechain-types"; -import { expect } from "chai"; -import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers"; - -/* eslint-disable no-unused-vars */ -/* eslint-disable no-unused-expressions */ - -/************************************************************************************************ -Neo should behave like an arbitrator when all the following conditions are met: -- maxStake is high enough, -- totalMaxStaked is high enough, -- the juror has a NFT -- the arbitrable is whitelisted - -Otherwise it should behave like a Neo arbitrator. -************************************************************************************************/ - -// TODO: assert on sortition.totalStaked in happy case - -describe("Staking", async () => { - const ETH = (amount: number) => ethers.parseUnits(amount.toString()); - const PNK = ETH; - - const extraData = ethers.AbiCoder.defaultAbiCoder().encode( - ["uint256", "uint256", "uint256"], - [2, 3, 1] // courtId 2, minJurors 3, disputeKitId 1 - ); - - let deployer: string; - let juror: HardhatEthersSigner; - let guardian: HardhatEthersSigner; - let pnk: PNK; - let core: KlerosCore; - let sortition: SortitionModule; - let rng: ChainlinkRNG; - let vrfCoordinator: ChainlinkVRFCoordinatorV2Mock; - let nft: TestERC721; - let resolver: DisputeResolver; - let balanceBefore: bigint; - - const deployUnhappy = async () => { - ({ deployer } = await getNamedAccounts()); - - await deployments.fixture(["ArbitrationMainnet"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - pnk = await ethers.getContract("PNK"); - core = await ethers.getContract("KlerosCore"); - sortition = await ethers.getContract("SortitionModule"); - rng = await ethers.getContract("ChainlinkRNG"); - vrfCoordinator = await ethers.getContract("ChainlinkVRFCoordinator"); - resolver = await ethers.getContract("DisputeResolver"); - nft = await ethers.getContract("KlerosV2NeoEarlyUser"); - - // Juror signer setup and funding - const { firstWallet } = await getNamedAccounts(); - juror = await ethers.getSigner(firstWallet); - await pnk.transfer(juror.address, PNK(100_000)); - await ethers.getSigner(deployer).then((signer) => signer.sendTransaction({ to: juror.address, value: ETH(1) })); - - // Set new guardian - const { secondWallet } = await getNamedAccounts(); - guardian = await ethers.getSigner(secondWallet); - await ethers.getSigner(deployer).then((signer) => signer.sendTransaction({ to: guardian.address, value: ETH(1) })); - await core.changeGuardian(guardian.address); - }; - - const deploy = async () => { - await deployUnhappy(); - - // Sets up the happy path for Neo - await nft.safeMint(deployer); - await nft.safeMint(juror.address); - await sortition.changeMaxStakePerJuror(PNK(10_000)); - await sortition.changeMaxTotalStaked(PNK(20_000)); - }; - - const createDisputeAndReachGeneratingPhaseFromStaking = async () => { - const arbitrationCost = ETH(0.5); - await resolver.createDisputeForTemplate(extraData, "", "", 2, { value: arbitrationCost }); - await reachGeneratingPhaseFromStaking(); - }; - - const reachGeneratingPhaseFromStaking = async () => { - await network.provider.send("evm_increaseTime", [3600]); // Wait for minStakingTime - await network.provider.send("evm_mine"); - - expect(await sortition.phase()).to.be.equal(0); // Staking - await sortition.passPhase(); // Staking -> Generating - expect(await sortition.phase()).to.be.equal(1); // Generating - }; - - const drawFromGeneratingPhase = async () => { - expect(await sortition.phase()).to.be.equal(1); // Generating - - await network.provider.send("evm_mine"); - - await vrfCoordinator.fulfillRandomWords(1, rng.target, []); - await sortition.passPhase(); // Generating -> Drawing - expect(await sortition.phase()).to.be.equal(2); // Drawing - - await core.draw(0, 10); - }; - - const drawAndReachStakingPhaseFromGenerating = async () => { - await drawFromGeneratingPhase(); - - await network.provider.send("evm_increaseTime", [3600]); // Ensures that maxDrawingTime has passed - await network.provider.send("evm_mine"); - - await sortition.passPhase(); // Drawing -> Staking - expect(await sortition.phase()).to.be.equal(0); // Staking - }; - - /************************************************************************************************ - SHOULD BEHAVE LIKE A NEO ARBITRATOR - ************************************************************************************************/ - - describe("When arbitrable whitelist is disabled", () => { - before("Setup", async () => { - await deployUnhappy(); - await core.changeArbitrableWhitelistEnabled(false); - }); - - it("Should create a dispute", async () => { - const arbitrationCost = ETH(0.5); - expect(await resolver.createDisputeForTemplate(extraData, "", "", 2, { value: arbitrationCost })) - .to.emit(core, "DisputeCreation") - .withArgs(0, resolver.target); - }); - }); - - describe("When arbitrable whitelist is enabled", () => { - before("Setup", async () => { - await deployUnhappy(); - await core.changeArbitrableWhitelistEnabled(true); - }); - - describe("When arbitrable is not whitelisted", () => { - before("Setup", async () => { - await core.changeArbitrableWhitelist(resolver.target, false); - }); - - it("Should fail to create a dispute", async () => { - const arbitrationCost = ETH(0.5); - await expect( - resolver.createDisputeForTemplate(extraData, "", "", 2, { value: arbitrationCost }) - ).to.be.revertedWithCustomError(core, "ArbitrableNotWhitelisted"); - }); - }); - - describe("When arbitrable is whitelisted", () => { - before("Setup", async () => { - await core.changeArbitrableWhitelist(resolver.target, true); - }); - - it("Should create a dispute", async () => { - const arbitrationCost = ETH(0.5); - expect(await resolver.createDisputeForTemplate(extraData, "", "", 2, { value: arbitrationCost })) - .to.emit(core, "DisputeCreation") - .withArgs(0, resolver.target); - }); - }); - }); - - describe("When juror NFT is not set", async () => { - before("Setup", async () => { - await deployUnhappy(); - await core.changeJurorNft(ethers.ZeroAddress); - }); - - describe("When juror has no NFT", async () => { - it("Should be able to stake", async () => { - await pnk.connect(juror).approve(core.target, PNK(1000)); - await expect(await core.connect(juror).setStake(1, PNK(1000))) - .to.emit(sortition, "StakeSet") - .withArgs(juror.address, 1, PNK(1000), PNK(1000)); - expect(await sortition.totalStaked()).to.be.equal(PNK(1000)); - }); - }); - }); - - describe("When juror NFT is set", async () => { - describe("When juror has no NFT", async () => { - before("Setup", async () => { - await deployUnhappy(); - }); - - it("Should not be able to stake", async () => { - await pnk.connect(juror).approve(core.target, PNK(1000)); - await expect(core.connect(juror).setStake(1, PNK(1000))).to.be.revertedWithCustomError( - core, - "NotEligibleForStaking" - ); - }); - }); - - describe("When juror does have a NFT", async () => { - before("Setup", async () => { - await deployUnhappy(); - await nft.safeMint(juror.address); - }); - - it("Should be able to stake", async () => { - await pnk.connect(juror).approve(core.target, PNK(1000)); - await expect(await core.connect(juror).setStake(1, PNK(1000))) - .to.emit(sortition, "StakeSet") - .withArgs(juror.address, 1, PNK(1000), PNK(1000)); - expect(await sortition.totalStaked()).to.be.equal(PNK(1000)); - }); - }); - }); - - describe("When juror stakes less", async () => { - beforeEach("Setup", async () => { - await deployUnhappy(); - await nft.safeMint(juror.address); - - await pnk.connect(juror).approve(core.target, PNK(10_000)); - await core.connect(juror).setStake(1, PNK(1000)); - }); - - describe("When stakes are NOT delayed", () => { - it("Should be able to unstake", async () => { - expect(await core.connect(juror).setStake(1, PNK(500))) - .to.emit(sortition, "StakeSet") - .withArgs(juror.address, 1, PNK(500), PNK(500)); - expect(await sortition.totalStaked()).to.be.equal(PNK(500)); - - expect(await core.connect(juror).setStake(1, PNK(1001))) - .to.emit(sortition, "StakeSet") - .withArgs(juror.address, 1, PNK(1001), PNK(1001)); - expect(await sortition.totalStaked()).to.be.equal(PNK(1001)); - - expect(await core.connect(juror).setStake(1, PNK(0))) - .to.emit(sortition, "StakeSet") - .withArgs(juror.address, 1, PNK(0), PNK(0)); - expect(await sortition.totalStaked()).to.be.equal(PNK(0)); - }); - }); - - describe("When stakes are delayed", () => { - beforeEach("Setup", async () => { - await createDisputeAndReachGeneratingPhaseFromStaking(); - }); - - it("Should be able to unstake", async () => { - expect(await core.connect(juror).setStake(1, PNK(0))) - .to.emit(sortition, "StakeDelayed") - .withArgs(juror.address, 1, PNK(0)) - .to.not.emit(sortition, "StakeSet"); - expect(await sortition.totalStaked()).to.be.equal(PNK(1000)); - await drawAndReachStakingPhaseFromGenerating(); - expect(await sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(juror.address, 1, PNK(0), PNK(1000)); // Staked amount won't go lower than locked amount. - }); - }); - }); - - describe("When juror stakes more", async () => { - beforeEach("Setup", async () => { - await deployUnhappy(); - await nft.safeMint(juror.address); - }); - - describe("When totalStaked is low", async () => { - describe("When stakes are NOT delayed", () => { - it("Should not be able to stake more than maxStakePerJuror", async () => { - await pnk.connect(juror).approve(core.target, PNK(5000)); - await expect(core.connect(juror).setStake(1, PNK(5000))).to.be.revertedWithCustomError( - core, - "StakingMoreThanMaxStakePerJuror" - ); - expect(await sortition.totalStaked()).to.be.equal(PNK(0)); - }); - }); - - describe("When stakes are delayed", () => { - it("Should not be able to stake more than maxStakePerJuror", async () => { - await createDisputeAndReachGeneratingPhaseFromStaking(); - await pnk.connect(juror).approve(core.target, PNK(5000)); - await expect(core.connect(juror).setStake(1, PNK(5000))).to.be.revertedWithCustomError( - core, - "StakingMoreThanMaxStakePerJuror" - ); - expect(await sortition.totalStaked()).to.be.equal(PNK(0)); - await drawAndReachStakingPhaseFromGenerating(); - await expect(sortition.executeDelayedStakes(10)).to.revertedWithCustomError( - sortition, - "NoDelayedStakeToExecute" - ); - expect(await sortition.totalStaked()).to.be.equal(PNK(0)); - }); - - it("Should be able to stake exactly maxStakePerJuror", async () => { - await pnk.connect(juror).approve(core.target, PNK(5000)); - await core.connect(juror).setStake(1, PNK(1000)); - await createDisputeAndReachGeneratingPhaseFromStaking(); - expect(await core.connect(juror).setStake(1, PNK(2000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(juror.address, 1, PNK(2000)) - .to.not.emit(sortition, "StakeSet"); - expect(await sortition.totalStaked()).to.be.equal(PNK(1000)); - await drawAndReachStakingPhaseFromGenerating(); - expect(await sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(juror.address, 1, PNK(2000), PNK(2000)); - expect(await sortition.totalStaked()).to.be.equal(PNK(2000)); - }); - }); - }); - - describe("When totalStaked is close to maxTotalStaked", async () => { - beforeEach("Setup", async () => { - await sortition.changeMaxTotalStaked(PNK(3000)); - - // deployer increases totalStaked to 2000 - await nft.safeMint(deployer); - await pnk.approve(core.target, PNK(2000)); - await core.setStake(1, PNK(2000)); - }); - - describe("When stakes are NOT delayed", () => { - it("Should not be able to stake more than maxTotalStaked", async () => { - await pnk.connect(juror).approve(core.target, PNK(2000)); - await expect(core.connect(juror).setStake(1, PNK(2000))).to.be.revertedWithCustomError( - core, - "StakingMoreThanMaxTotalStaked" - ); - expect(await sortition.totalStaked()).to.be.equal(PNK(2000)); - }); - - it("Should be able to stake exactly maxTotalStaked", async () => { - await pnk.connect(juror).approve(core.target, PNK(1000)); - await expect(await core.connect(juror).setStake(1, PNK(1000))) - .to.emit(sortition, "StakeSet") - .withArgs(juror.address, 1, PNK(1000), PNK(1000)); - expect(await sortition.totalStaked()).to.be.equal(PNK(3000)); - }); - }); - - describe("When stakes are delayed", () => { - beforeEach("Setup", async () => { - await createDisputeAndReachGeneratingPhaseFromStaking(); - }); - - it("Should not be able to stake more than maxTotalStaked", async () => { - await pnk.connect(juror).approve(core.target, PNK(2000)); - await expect(core.connect(juror).setStake(1, PNK(2000))).to.be.revertedWithCustomError( - core, - "StakingMoreThanMaxTotalStaked" - ); - expect(await sortition.totalStaked()).to.be.equal(PNK(2000)); - await drawAndReachStakingPhaseFromGenerating(); - await expect(sortition.executeDelayedStakes(10)).to.revertedWithCustomError( - sortition, - "NoDelayedStakeToExecute" - ); - expect(await sortition.totalStaked()).to.be.equal(PNK(2000)); - }); - - it("Should be able to stake exactly maxTotalStaked", async () => { - await pnk.connect(juror).approve(core.target, PNK(1000)); - await expect(await core.connect(juror).setStake(1, PNK(1000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(juror.address, 1, PNK(1000)); - expect(await sortition.totalStaked()).to.be.equal(PNK(2000)); // Not updated until the delayed stake is executed - await drawAndReachStakingPhaseFromGenerating(); - await expect(await sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(juror.address, 1, PNK(1000), PNK(1000)); - expect(await sortition.totalStaked()).to.be.equal(PNK(3000)); - }); - }); - }); - }); - - /************************************************************************************************ - SHOULD BEHAVE LIKE A REGULAR ARBITRATOR - ************************************************************************************************/ - - describe("When not paused", () => { - beforeEach("Setup", async () => { - await deploy(); - }); - - it("Should not allow anyone except the guardian or the owner to pause", async () => { - await expect(core.connect(juror).pause()).to.be.revertedWithCustomError(core, "GuardianOrOwnerOnly"); - }); - - it("Should allow the guardian to pause", async () => { - expect(await core.connect(guardian).pause()).to.emit(core, "Paused"); - expect(await core.paused()).to.equal(true); - }); - - it("Should allow the owner to pause", async () => { - expect(await core.pause()).to.emit(core, "Paused"); - expect(await core.paused()).to.equal(true); - }); - }); - - describe("When paused", () => { - beforeEach("Setup", async () => { - await deploy(); - - await pnk.approve(core.target, PNK(2000)); - await core.setStake(1, PNK(500)); - - await core.connect(guardian).pause(); - }); - - it("Should allow only the owner to unpause", async () => { - await expect(core.connect(guardian).unpause()).to.be.revertedWithCustomError(core, "OwnerOnly"); - expect(await core.unpause()).to.emit(core, "Unpaused"); - expect(await core.paused()).to.equal(false); - }); - - it("Should prevent stake increases", async () => { - await expect(core.setStake(1, PNK(1000))).to.be.revertedWithCustomError(core, "WhenNotPausedOnly"); - }); - - it("Should prevent stake decreases", async () => { - await expect(core.setStake(1, PNK(0))).to.be.revertedWithCustomError(core, "WhenNotPausedOnly"); - }); - }); - - describe("When outside the Staking phase", async () => { - const createSubcourtStakeAndCreateDispute = async () => { - expect(await sortition.phase()).to.be.equal(0); // Staking - await core.createCourt(1, false, PNK(1000), 1000, ETH(0.1), 3, [0, 0, 0, 0], ethers.toBeHex(3), [1]); // Parent - general court, Classic dispute kit - - await pnk.approve(core.target, PNK(4000)); - await core.setStake(1, PNK(2000)); - await core.setStake(2, PNK(2000)); - expect(await sortition.getJurorCourtIDs(deployer)).to.be.deep.equal([1n, 2n]); - - const arbitrationCost = ETH(0.1) * 3n; - await resolver.createDisputeForTemplate(extraData, "", "", 2, { value: arbitrationCost }); - }; - - describe("When stake is increased once", async () => { - before("Setup", async () => { - await deploy(); - await createSubcourtStakeAndCreateDispute(); - await reachGeneratingPhaseFromStaking(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should be outside the Staking phase", async () => { - expect(await sortition.phase()).to.be.equal(1); // Generating - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); - }); - - describe("When stake is increased", () => { - it("Should delay the stake increase", async () => { - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(0); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - await pnk.approve(core.target, PNK(1000)); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(3000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(3000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake does not change - }); - - it("Should not transfer PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(3000), false]); - }); - }); - - describe("When the Phase passes back to Staking", () => { - before("Setup", async () => { - await drawAndReachStakingPhaseFromGenerating(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should execute the delayed stakes", async () => { - await expect(await sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(deployer, 2, PNK(3000), PNK(5000)) - .to.not.emit(sortition, "StakeDelayed"); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([ - PNK(5000), - PNK(300), // we're the only juror so we are drawn 3 times - PNK(3000), - 2, - ]); // stake unchanged, delayed - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(2); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 1st delayed stake got deleted - expect(await sortition.delayedStakes(2)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 2nd delayed stake got deleted - expect(await sortition.latestDelayedStakeIndex(deployer, 1)).to.be.equal(0); // Deprecated. Always 0 - }); - - it("Should transfer PNK after delayed stake execution", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore - PNK(1000)); // No PNK transfer - }); - }); - }); - - describe("When stake is decreased once", async () => { - before("Setup", async () => { - await deploy(); - await createSubcourtStakeAndCreateDispute(); - await reachGeneratingPhaseFromStaking(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should be outside the Staking phase", async () => { - expect(await sortition.phase()).to.be.equal(1); // Generating - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); - }); - - describe("When stake is decreased", async () => { - it("Should delay the stake decrease", async () => { - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(0); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(1000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(1000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake unchanged, delayed - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(1000), false]); - }); - }); - - describe("When the Phase passes back to Staking", () => { - before("Setup", async () => { - await drawAndReachStakingPhaseFromGenerating(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should execute the delayed stakes by withdrawing PNK and reducing the stakes", async () => { - await expect(await sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(deployer, 2, PNK(1000), PNK(3000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([ - PNK(3000), - PNK(300), // we're the only juror so we are drawn 3 times - PNK(1000), - 2, - ]); // stake unchanged, delayed - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(2); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 1st delayed stake got deleted - expect(await sortition.delayedStakes(2)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 2nd delayed stake got deleted - expect(await sortition.latestDelayedStakeIndex(deployer, 1)).to.be.equal(0); // Deprecated. Always 0 - }); - - it("Should withdraw some PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore + PNK(1000)); // No PNK transfer yet - }); - }); - }); - - describe("When stake is decreased then increased back", async () => { - before("Setup", async () => { - await deploy(); - await createSubcourtStakeAndCreateDispute(); - await reachGeneratingPhaseFromStaking(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should be outside the Staking phase", async () => { - expect(await sortition.phase()).to.be.equal(1); // Generating - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); - }); - - describe("When stake is decreased", async () => { - it("Should delay the stake decrease", async () => { - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(0); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(1000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(1000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake unchanged, delayed - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(1000), false]); - }); - }); - - describe("When stake is increased back to the previous amount", () => { - it("Should delay the stake increase", async () => { - balanceBefore = await pnk.balanceOf(deployer); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(2000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(2000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake unchanged, delayed - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(2); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(1000), false]); - expect(await sortition.delayedStakes(2)).to.be.deep.equal([deployer, 2, PNK(2000), false]); - }); - }); - - describe("When the Phase passes back to Staking", () => { - before("Setup", async () => { - await drawAndReachStakingPhaseFromGenerating(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should execute the delayed stakes but the stakes should remain the same", async () => { - await pnk.approve(core.target, PNK(1000)); - await expect(await sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(deployer, 2, PNK(1000), PNK(3000)) - .to.emit(sortition, "StakeSet") - .withArgs(deployer, 2, PNK(2000), PNK(4000)); // 2nd delayed stake will override the first one - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([ - PNK(4000), - PNK(300), // we're the only juror so we are drawn 3 times - PNK(2000), - 2, - ]); // stake unchanged, delayed - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(2); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(3); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 1st delayed stake got deleted - expect(await sortition.delayedStakes(2)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 2nd delayed stake got deleted - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - }); - }); - - describe("When stake is increased then decreased back", async () => { - before("Setup", async () => { - await deploy(); - await createSubcourtStakeAndCreateDispute(); - await reachGeneratingPhaseFromStaking(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should be outside the Staking phase", async () => { - expect(await sortition.phase()).to.be.equal(1); // Generating - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); - }); - - describe("When stake is increased", () => { - it("Should delay the stake increase", async () => { - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(0); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - await pnk.approve(core.target, PNK(1000)); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(3000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(3000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake does not change - }); - - it("Should not transfer PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(3000), false]); - }); - }); - - describe("When stake is decreased back to the previous amount", () => { - it("Should cancel out the stake decrease back", async () => { - balanceBefore = await pnk.balanceOf(deployer); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(2000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(2000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake is unchanged - }); - - it("Should transfer back some PNK to the juror", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // PNK balance left unchanged - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(2); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(3000), false]); - expect(await sortition.delayedStakes(2)).to.be.deep.equal([deployer, 2, PNK(2000), false]); - }); - }); - - describe("When the Phase passes back to Staking", () => { - before("Setup", async () => { - await drawAndReachStakingPhaseFromGenerating(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should execute the delayed stakes but the stakes should remain the same", async () => { - await expect(sortition.executeDelayedStakes(10)) - .to.emit(await sortition, "StakeSet") - .withArgs(deployer, 2, PNK(2000), PNK(4000)) - .to.not.emit(sortition, "StakeDelayed"); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([ - PNK(4000), - PNK(300), // we're the only juror so we are drawn 3 times - PNK(2000), - 2, - ]); // stake unchanged, delayed - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(2); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(3); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 1st delayed stake got deleted - expect(await sortition.delayedStakes(2)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 2nd delayed stake got deleted - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - }); - }); - }); - - describe("When a juror is inactive", async () => { - before("Setup", async () => { - await deploy(); - }); - - it("Should unstake from all courts", async () => { - await core.createCourt(1, false, PNK(1000), 1000, ETH(0.1), 3, [0, 0, 0, 0], ethers.toBeHex(3), [1]); // Parent - general court, Classic dispute kit - - await pnk.approve(core.target, PNK(4000)); - await core.setStake(1, PNK(2000)); - await core.setStake(2, PNK(2000)); - expect(await sortition.getJurorCourtIDs(deployer)).to.be.deep.equal([1, 2]); - - await createDisputeAndReachGeneratingPhaseFromStaking(); - await drawAndReachStakingPhaseFromGenerating(); - - await core.passPeriod(0); // Evidence -> Voting - await core.passPeriod(0); // Voting -> Appeal - await core.passPeriod(0); // Appeal -> Execution - - expect(await sortition.getJurorCourtIDs(deployer)).to.be.deep.equal([1, 2]); - await core.execute(0, 0, 1); // 1 iteration should unstake from both courts - expect(await sortition.getJurorCourtIDs(deployer)).to.be.deep.equal([]); - }); - }); -}); diff --git a/contracts/test/arbitration/staking.ts b/contracts/test/arbitration/staking.ts deleted file mode 100644 index d27a5f10e..000000000 --- a/contracts/test/arbitration/staking.ts +++ /dev/null @@ -1,414 +0,0 @@ -import { ethers, getNamedAccounts, network, deployments } from "hardhat"; -import { PNK, KlerosCore, SortitionModule, ChainlinkRNG, ChainlinkVRFCoordinatorV2Mock } from "../../typechain-types"; -import { expect } from "chai"; - -/* eslint-disable no-unused-vars */ -/* eslint-disable no-unused-expressions */ - -describe("Staking", async () => { - const ETH = (amount: number) => ethers.parseUnits(amount.toString()); - const PNK = ETH; - - const extraData = ethers.AbiCoder.defaultAbiCoder().encode( - ["uint256", "uint256", "uint256"], - [2, 3, 1] // courtId 2, minJurors 3, disputeKitId 1 - ); - - let deployer: string; - let pnk: PNK; - let core: KlerosCore; - let sortition: SortitionModule; - let rng: ChainlinkRNG; - let vrfCoordinator: ChainlinkVRFCoordinatorV2Mock; - - const deploy = async () => { - ({ deployer } = await getNamedAccounts()); - await deployments.fixture(["Arbitration"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - pnk = await ethers.getContract("PNK"); - core = await ethers.getContract("KlerosCore"); - sortition = await ethers.getContract("SortitionModule"); - rng = await ethers.getContract("ChainlinkRNG"); - vrfCoordinator = await ethers.getContract("ChainlinkVRFCoordinator"); - }; - - describe("When outside the Staking phase", async () => { - let balanceBefore: bigint; - - const reachDrawingPhase = async () => { - expect(await sortition.phase()).to.be.equal(0); // Staking - const arbitrationCost = ETH(0.1) * 3n; - await core.createCourt(1, false, PNK(1000), 1000, ETH(0.1), 3, [0, 0, 0, 0], ethers.toBeHex(3), [1]); // Parent - general court, Classic dispute kit - - await pnk.approve(core.target, PNK(4000)); - await core.setStake(1, PNK(2000)); - await core.setStake(2, PNK(2000)); - - expect(await sortition.getJurorCourtIDs(deployer)).to.be.deep.equal([1n, 2n]); - - await core["createDispute(uint256,bytes)"](2, extraData, { value: arbitrationCost }); - - await network.provider.send("evm_increaseTime", [2000]); // Wait for minStakingTime - await network.provider.send("evm_mine"); - - await sortition.passPhase(); // Staking -> Generating - await network.provider.send("evm_mine"); - - balanceBefore = await pnk.balanceOf(deployer); - }; - - const reachStakingPhaseAfterDrawing = async () => { - await vrfCoordinator.fulfillRandomWords(1, rng.target, []); - await sortition.passPhase(); // Generating -> Drawing - await core.draw(0, 5000); - await sortition.passPhase(); // Drawing -> Staking - }; - - describe("When stake is increased once", async () => { - before("Setup", async () => { - await deploy(); - await reachDrawingPhase(); - }); - - it("Should be outside the Staking phase", async () => { - expect(await sortition.phase()).to.be.equal(1); // Drawing - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); - }); - - describe("When stake is increased", () => { - it("Should delay the stake increase", async () => { - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(0); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - await pnk.approve(core.target, PNK(1000)); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(3000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(3000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake does not change - }); - - it("Should not transfer PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(3000), false]); - }); - }); - - describe("When the Phase passes back to Staking", () => { - before("Setup", async () => { - await reachStakingPhaseAfterDrawing(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should execute the delayed stakes", async () => { - await expect(sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(deployer, 2, PNK(3000), PNK(5000)) - .to.not.emit(sortition, "StakeDelayed"); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([ - PNK(5000), - PNK(300), // we're the only juror so we are drawn 3 times - PNK(3000), - 2, - ]); // stake unchanged, delayed - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(2); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 1st delayed stake got deleted - expect(await sortition.delayedStakes(2)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 2nd delayed stake got deleted - expect(await sortition.latestDelayedStakeIndex(deployer, 1)).to.be.equal(0); // Deprecated. Always 0 - }); - - it("Should transfer PNK after delayed stake execution", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore - PNK(1000)); // No PNK transfer - }); - }); - }); - - describe("When stake is decreased once", async () => { - before("Setup", async () => { - await deploy(); - await reachDrawingPhase(); - }); - - it("Should be outside the Staking phase", async () => { - expect(await sortition.phase()).to.be.equal(1); // Drawing - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); - }); - - describe("When stake is decreased", async () => { - it("Should delay the stake decrease", async () => { - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(0); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(1000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(1000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake unchanged, delayed - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(1000), false]); - }); - }); - - describe("When the Phase passes back to Staking", () => { - before("Setup", async () => { - await reachStakingPhaseAfterDrawing(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should execute the delayed stakes by withdrawing PNK and reducing the stakes", async () => { - await expect(sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(deployer, 2, PNK(1000), PNK(3000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([ - PNK(3000), - PNK(300), // we're the only juror so we are drawn 3 times - PNK(1000), - 2, - ]); // stake unchanged, delayed - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(2); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 1st delayed stake got deleted - expect(await sortition.delayedStakes(2)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 2nd delayed stake got deleted - expect(await sortition.latestDelayedStakeIndex(deployer, 1)).to.be.equal(0); // Deprecated. Always 0 - }); - - it("Should withdraw some PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore + PNK(1000)); // No PNK transfer yet - }); - }); - }); - - describe("When stake is decreased then increased back", async () => { - before("Setup", async () => { - await deploy(); - await reachDrawingPhase(); - }); - - it("Should be outside the Staking phase", async () => { - expect(await sortition.phase()).to.be.equal(1); // Drawing - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); - }); - - describe("When stake is decreased", async () => { - it("Should delay the stake decrease", async () => { - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(0); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(1000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(1000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake unchanged, delayed - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(1000), false]); - }); - }); - - describe("When stake is increased back to the previous amount", () => { - it("Should delay the stake increase", async () => { - balanceBefore = await pnk.balanceOf(deployer); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(2000))).to.emit(sortition, "StakeDelayed"); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake unchanged, delayed - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(2); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(1000), false]); - expect(await sortition.delayedStakes(2)).to.be.deep.equal([deployer, 2, PNK(2000), false]); - }); - }); - - describe("When the Phase passes back to Staking", () => { - before("Setup", async () => { - await reachStakingPhaseAfterDrawing(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should execute the delayed stakes but the stakes should remain the same", async () => { - await pnk.approve(core.target, PNK(1000)); - await expect(sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(deployer, 2, PNK(1000), PNK(3000)) - .to.emit(sortition, "StakeSet") - .withArgs(deployer, 2, PNK(2000), PNK(4000)); // 2nd delayed stake will override the first one - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([ - PNK(4000), - PNK(300), // we're the only juror so we are drawn 3 times - PNK(2000), - 2, - ]); // stake unchanged, delayed - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(2); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(3); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 1st delayed stake got deleted - expect(await sortition.delayedStakes(2)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 2nd delayed stake got deleted - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - }); - }); - - describe("When stake is increased then decreased back", async () => { - before("Setup", async () => { - await deploy(); - await reachDrawingPhase(); - }); - - it("Should be outside the Staking phase", async () => { - expect(await sortition.phase()).to.be.equal(1); // Drawing - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); - }); - - describe("When stake is increased", () => { - it("Should delay the stake increase", async () => { - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(0); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - await pnk.approve(core.target, PNK(1000)); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(3000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(3000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake does not change - }); - - it("Should not transfer PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(1); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(3000), false]); - }); - }); - - describe("When stake is decreased back to the previous amount", () => { - it("Should cancel out the stake decrease back", async () => { - balanceBefore = await pnk.balanceOf(deployer); - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - await expect(core.setStake(2, PNK(2000))) - .to.emit(sortition, "StakeDelayed") - .withArgs(deployer, 2, PNK(2000)); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([PNK(4000), 0, PNK(2000), 2]); // stake is unchanged - }); - - it("Should transfer back some PNK to the juror", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // PNK balance left unchanged - }); - - it("Should store the delayed stake for later", async () => { - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(2); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(1); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([deployer, 2, PNK(3000), false]); - expect(await sortition.delayedStakes(2)).to.be.deep.equal([deployer, 2, PNK(2000), false]); - }); - }); - - describe("When the Phase passes back to Staking", () => { - before("Setup", async () => { - await reachStakingPhaseAfterDrawing(); - balanceBefore = await pnk.balanceOf(deployer); - }); - - it("Should execute the delayed stakes but the stakes should remain the same", async () => { - await expect(sortition.executeDelayedStakes(10)) - .to.emit(sortition, "StakeSet") - .withArgs(deployer, 2, PNK(2000), PNK(4000)) - .to.not.emit(sortition, "StakeDelayed"); - expect(await sortition.getJurorBalance(deployer, 2)).to.be.deep.equal([ - PNK(4000), - PNK(300), // we're the only juror so we are drawn 3 times - PNK(2000), - 2, - ]); // stake unchanged, delayed - expect(await sortition.delayedStakeWriteIndex()).to.be.equal(2); - expect(await sortition.delayedStakeReadIndex()).to.be.equal(3); - expect(await sortition.delayedStakes(1)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 1st delayed stake got deleted - expect(await sortition.delayedStakes(2)).to.be.deep.equal([ethers.ZeroAddress, 0, 0, false]); // the 2nd delayed stake got deleted - expect(await sortition.latestDelayedStakeIndex(deployer, 2)).to.be.equal(0); // Deprecated. Always 0 - }); - - it("Should not transfer any PNK", async () => { - expect(await pnk.balanceOf(deployer)).to.be.equal(balanceBefore); // No PNK transfer yet - }); - }); - }); - }); - - describe("When a juror is inactive", async () => { - before("Setup", async () => { - await deploy(); - }); - - it("Should unstake from all courts", async () => { - const arbitrationCost = ETH(0.1) * 3n; - await core.createCourt(1, false, PNK(1000), 1000, ETH(0.1), 3, [0, 0, 0, 0], ethers.toBeHex(3), [1]); // Parent - general court, Classic dispute kit - - await pnk.approve(core.target, PNK(4000)); - await core.setStake(1, PNK(2000)); - await core.setStake(2, PNK(2000)); - - expect(await sortition.getJurorCourtIDs(deployer)).to.be.deep.equal([1, 2]); - - await core["createDispute(uint256,bytes)"](2, extraData, { value: arbitrationCost }); - - await network.provider.send("evm_increaseTime", [2000]); // Wait for minStakingTime - await network.provider.send("evm_mine"); - - await sortition.passPhase(); // Staking -> Generating - await network.provider.send("evm_mine"); - - await vrfCoordinator.fulfillRandomWords(1, rng.target, []); - await sortition.passPhase(); // Generating -> Drawing - - await core.draw(0, 5000); - - await core.passPeriod(0); // Evidence -> Voting - await core.passPeriod(0); // Voting -> Appeal - await core.passPeriod(0); // Appeal -> Execution - - await sortition.passPhase(); // Drawing -> Staking. Change so we don't deal with delayed stakes - - expect(await sortition.getJurorCourtIDs(deployer)).to.be.deep.equal([1, 2]); - - await core.execute(0, 0, 1); // 1 iteration should unstake from both courts - - expect(await sortition.getJurorCourtIDs(deployer)).to.be.deep.equal([]); - }); - }); -}); diff --git a/contracts/test/evidence/index.ts b/contracts/test/evidence/index.ts deleted file mode 100644 index 60c1cb0f5..000000000 --- a/contracts/test/evidence/index.ts +++ /dev/null @@ -1,284 +0,0 @@ -import { expect } from "chai"; -import { deployments, ethers } from "hardhat"; -import { ContractTransactionReceipt, EventLog } from "ethers"; -import { DisputeTemplateRegistry, KlerosCore, ModeratedEvidenceModule } from "../../typechain-types"; -import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers"; - -const Party = { - None: 0, - Submitter: 1, - Moderator: 2, -}; - -function getEmittedEvent(eventName: any, receipt: ContractTransactionReceipt): EventLog { - const logs = receipt.logs as Array; - const event = logs.find((log) => log.eventName === eventName); - if (event === undefined) throw new Error(`Event ${eventName} not found`); - return event; -} - -describe("Home Evidence contract", async () => { - const arbitrationFee = 1000n; - const arbitratorExtraData = ethers.AbiCoder.defaultAbiCoder().encode( - ["uint256", "uint256"], - [1, 1] // courtId 1, minJurors 1 - ); - const appealTimeout = 100; - const bondTimeout = 60 * 10; - const totalCostMultiplier = 15000n; - const initialDepositMultiplier = 625n; - const disputeTemplate = '{ "disputeTemplate": "foo"}'; - const MULTIPLIER_DIVISOR = 10000n; - const totalCost = (arbitrationFee * totalCostMultiplier) / MULTIPLIER_DIVISOR; - const minRequiredDeposit = (totalCost * initialDepositMultiplier) / MULTIPLIER_DIVISOR; - const ZERO = 0n; - - let deployer: HardhatEthersSigner; - let user1: HardhatEthersSigner; - let user2: HardhatEthersSigner; - let user3: HardhatEthersSigner; - let user4: HardhatEthersSigner; - let evidenceID: string; - let arbitrator: KlerosCore; - let evidenceModule: ModeratedEvidenceModule; - let disputeTemplateRegistry: DisputeTemplateRegistry; - - beforeEach("Setup contracts", async () => { - [deployer, user1, user2, user3, user4] = await ethers.getSigners(); - - await deployments.fixture(["Arbitration", "VeaMock"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - arbitrator = await ethers.getContract("KlerosCore"); - disputeTemplateRegistry = await ethers.getContract("DisputeTemplateRegistry"); - - const court = await arbitrator.courts(1); - await arbitrator.changeCourtParameters( - 1, - court.hiddenVotes, - court.minStake, - court.alpha, - arbitrationFee, - court.jurorsForCourtJump, - [0, 0, 0, appealTimeout] - ); - - const EvidenceModule = await ethers.getContractFactory("ModeratedEvidenceModule"); - evidenceModule = await EvidenceModule.deploy( - arbitrator.target, - deployer.address, // owner - disputeTemplateRegistry.target, - totalCostMultiplier, - initialDepositMultiplier, - bondTimeout, - arbitratorExtraData, - disputeTemplate, - "disputeTemplateMapping: TODO" - ); - }); - - describe("Governance", async () => { - it("Should change parameters correctly", async () => { - const newOwner = await user2.getAddress(); - await evidenceModule.changeOwner(newOwner); - expect(await evidenceModule.owner()).to.equal(newOwner); - await evidenceModule.connect(user2).changeOwner(await deployer.getAddress()); - - await evidenceModule.changeInitialDepositMultiplier(1); - expect(await evidenceModule.initialDepositMultiplier()).to.equal(1); - - await evidenceModule.changeTotalCostMultiplier(1); - expect(await evidenceModule.totalCostMultiplier()).to.equal(1); - - await evidenceModule.changeBondTimeout(1); - expect(await evidenceModule.bondTimeout()).to.equal(1); - - const newDisputeTemplate = '{ "disputeTemplate": "bar"}'; - let tx = await evidenceModule.changeDisputeTemplate(newDisputeTemplate, "disputeTemplateMapping: TODO"); - let receipt = await tx.wait(); - let lastArbitratorIndex = await evidenceModule.getCurrentArbitratorIndex(); - let newArbitratorData = await evidenceModule.arbitratorDataList(lastArbitratorIndex); - let oldArbitratorData = await evidenceModule.arbitratorDataList(lastArbitratorIndex - 1n); - - expect(newArbitratorData.arbitratorExtraData).to.equal(oldArbitratorData.arbitratorExtraData); - const disputeTemplateEvents = await disputeTemplateRegistry.queryFilter( - disputeTemplateRegistry.filters.DisputeTemplate(), - receipt?.blockNumber, - receipt?.blockNumber - ); - const [_templateId, _, _templateData] = disputeTemplateEvents[0].args; - expect(_templateData).to.equal(newDisputeTemplate, "Wrong Template Data."); - expect(_templateId).to.equal(newArbitratorData.disputeTemplateId, "Wrong Template ID."); - - const newArbitratorExtraData = "0x86"; - await evidenceModule.changeArbitratorExtraData(newArbitratorExtraData); - newArbitratorData = await evidenceModule.arbitratorDataList(lastArbitratorIndex + 1n); - expect(newArbitratorData.arbitratorExtraData).to.equal(newArbitratorExtraData, "Wrong extraData"); - }); - - it("Should revert if the caller is not the owner", async () => { - await expect(evidenceModule.connect(user2).changeOwner(await user2.getAddress())).to.be.revertedWith( - "The caller must be the owner" - ); - - await expect(evidenceModule.connect(user2).changeInitialDepositMultiplier(0)).to.be.revertedWith( - "The caller must be the owner" - ); - - await expect(evidenceModule.connect(user2).changeTotalCostMultiplier(0)).to.be.revertedWith( - "The caller must be the owner" - ); - - await expect(evidenceModule.connect(user2).changeBondTimeout(0)).to.be.revertedWith( - "The caller must be the owner" - ); - - await expect(evidenceModule.connect(user2).changeDisputeTemplate(disputeTemplate, "")).to.be.revertedWith( - "The caller must be the owner" - ); - - await expect(evidenceModule.connect(user2).changeArbitratorExtraData(arbitratorExtraData)).to.be.revertedWith( - "The caller must be the owner" - ); - }); - }); - - describe("Evidence Submission", () => { - it("Should submit evidence correctly.", async () => { - const newEvidence = "Irrefutable evidence"; - const tx = await evidenceModule.connect(user1).submitEvidence(1234, newEvidence, { - value: minRequiredDeposit, - }); // id: 0 - const receipt = await tx.wait(); - if (receipt === null) throw new Error("Receipt is null"); - const evidenceID = ethers.solidityPackedKeccak256(["uint", "string"], [1234, newEvidence]); - - const [_arbitrator, _externalDisputeID, _party, _evidence] = getEmittedEvent("ModeratedEvidence", receipt).args; - expect(_arbitrator).to.equal(arbitrator.target, "Wrong arbitrator."); - expect(_externalDisputeID).to.equal(1234, "Wrong external dispute ID."); - expect(_party).to.equal(user1.address, "Wrong submitter."); - expect(_evidence).to.equal(newEvidence, "Wrong evidence message."); - - let contributions = await evidenceModule.getContributions(evidenceID, 0, user1.address); - expect(contributions[0]).to.equal(ZERO); // it's 1am and to.deep.equal() won't work, can't be bothered - expect(contributions[1]).to.equal(93n); - expect(contributions[2]).to.equal(ZERO); - expect(contributions.length).to.equal(3); - }); - - it("Should not allowed the same evidence twice for the same external dispute id.", async () => { - const newEvidence = "Irrefutable evidence"; - await evidenceModule.submitEvidence(1234, newEvidence, { - value: minRequiredDeposit, - }); - await expect( - evidenceModule.submitEvidence(1234, newEvidence, { - value: minRequiredDeposit, - }) - ).to.be.revertedWith("Evidence already submitted."); - }); - - it("Should revert if deposit is too low.", async () => { - const newEvidence = "Irrefutable evidence"; - await expect( - evidenceModule.submitEvidence(1234, newEvidence, { - value: minRequiredDeposit - 1n, - }) - ).to.be.revertedWith("Insufficient funding."); - }); - }); - - describe("Moderation", () => { - beforeEach("Initialize posts and comments", async () => { - const newEvidence = "Irrefutable evidence"; - await evidenceModule.connect(user1).submitEvidence(1234, newEvidence, { - value: minRequiredDeposit, - }); - evidenceID = ethers.solidityPackedKeccak256(["uint", "string"], [1234, newEvidence]); - }); - - it("Should not allow moderation after bond timeout passed.", async () => { - await expect(evidenceModule.resolveModerationMarket(evidenceID)).to.be.revertedWith("Moderation still ongoing."); - - await ethers.provider.send("evm_increaseTime", [60 * 10]); - - // Moderate - await expect( - evidenceModule.moderate(evidenceID, Party.Moderator, { - value: totalCost, - gasLimit: 500000, - }) - ).to.be.revertedWith("Moderation market is closed."); - - await evidenceModule.resolveModerationMarket(evidenceID, { gasLimit: 500000 }); - - // After market has been closed, moderation can re-open. - await evidenceModule.moderate(evidenceID, Party.Submitter, { - value: totalCost, - gasLimit: 500000, - }); - }); - - it("Should create dispute after moderation escalation is complete.", async () => { - await evidenceModule.connect(user2).moderate(evidenceID, Party.Moderator, { - value: minRequiredDeposit * 2n, - }); - - let moderationInfo = await evidenceModule.getModerationInfo(evidenceID, 0); - let paidFees = moderationInfo.paidFees; - let depositRequired = paidFees[Party.Moderator] * 2n - paidFees[Party.Submitter]; - await evidenceModule.connect(user4).moderate(evidenceID, Party.Submitter, { - value: depositRequired, - }); - - moderationInfo = await evidenceModule.getModerationInfo(evidenceID, 0); - paidFees = moderationInfo.paidFees; - depositRequired = paidFees[Party.Submitter] * 2n - paidFees[Party.Moderator]; - await evidenceModule.connect(user2).moderate(evidenceID, Party.Moderator, { - value: depositRequired, - }); - - moderationInfo = await evidenceModule.getModerationInfo(evidenceID, 0); - paidFees = moderationInfo.paidFees; - depositRequired = paidFees[Party.Moderator] * 2n - paidFees[Party.Submitter]; - await evidenceModule.connect(user4).moderate(evidenceID, Party.Submitter, { - value: depositRequired, - }); - - moderationInfo = await evidenceModule.getModerationInfo(evidenceID, 0); - paidFees = moderationInfo.paidFees; - depositRequired = paidFees[Party.Submitter] * 2n - paidFees[Party.Moderator]; - await evidenceModule.connect(user2).moderate(evidenceID, Party.Moderator, { - value: depositRequired, - }); - - moderationInfo = await evidenceModule.getModerationInfo(evidenceID, 0); - paidFees = moderationInfo.paidFees; - depositRequired = paidFees[Party.Moderator] * 2n - paidFees[Party.Submitter]; - let tx = await evidenceModule.connect(user4).moderate(evidenceID, Party.Submitter, { - value: depositRequired, // Less is actually needed. Overpaid fees are reimbursed - }); - let receipt = await tx.wait(); - if (receipt === null) throw new Error("Receipt is null"); - let [_arbitrator, _arbitrableDisputeID, _externalDisputeID, _templateId, _templateUri] = getEmittedEvent( - "DisputeRequest", - receipt - ).args; - expect(_arbitrator).to.equal(arbitrator.target, "Wrong arbitrator."); - expect(_arbitrableDisputeID).to.equal(0, "Wrong dispute ID."); - expect(_templateId).to.equal(1, "Wrong template ID."); - expect(_externalDisputeID).to.equal(evidenceID, "Wrong external dispute ID."); - - await expect( - evidenceModule.connect(user2).moderate(evidenceID, Party.Moderator, { - value: totalCost, - }) - ).to.be.revertedWith("Evidence already disputed."); - - await expect(evidenceModule.connect(user2).resolveModerationMarket(evidenceID)).to.be.revertedWith( - "Evidence already disputed." - ); - }); - }); -}); diff --git a/contracts/test/fixtures/DisputeTemplate.resolver.jsonc b/contracts/test/fixtures/DisputeTemplate.resolver.jsonc deleted file mode 100644 index c40794660..000000000 --- a/contracts/test/fixtures/DisputeTemplate.resolver.jsonc +++ /dev/null @@ -1,28 +0,0 @@ -{ - "title": "TODO", - "description": "TODO", - "question": "Does the entry comply with the required criteria?", - "answers": [ - { - "title": "Yes, Add It", // Ruling Option - "description": "Select this if ..." // Ruling Option Description - }, - { - "title": "No, Dont Add It", - "description": "Select this if ..." - } - ], - "aliases": { - - }, - "metadata": { - }, - "disputePolicyURI": "/ipfs/QmdvkC....pdf", // Link to the policy document - "frontendUrl": "https://resolve.kleros.io/cases/%s", - "arbitrableChainID": "10200", - "arbitrableAddress": "0x433eD78895df1df7668C40b3e82d54410331F942", // DisputeResolver - "arbitratorChainID": "421614", - "arbitratorAddress": "0xA429667Abb1A6c530BAd1083df4C69FBce86D696", // KlerosCore - "category": "Curated Lists", - "specification": "KIP88" // not yet for the dispute resolver -} \ No newline at end of file diff --git a/contracts/test/fixtures/DisputeTemplate.schema.json b/contracts/test/fixtures/DisputeTemplate.schema.json deleted file mode 100644 index a637188fd..000000000 --- a/contracts/test/fixtures/DisputeTemplate.schema.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "NewDisputeTemplate.schema.json", - "type": "object", - "default": {}, - "title": "Root Schema", - "required": [ - "title", - "description", - "question", - "frontendUrl", - "disputePolicyURI", - "arbitrableChainID", - "arbitrableAddress", - "arbitratorChainID", - "arbitratorAddress" - ], - "additionalProperties": false, - "properties": { - "$schema": { - "description": "JSON Schema URI (used by some editors)", - "type": "string", - "default": "NewDisputeTemplate.schema.json" - }, - "category": { - "type": "string", - "default": "", - "title": "The category Schema", - "examples": [ - "Oracle" - ] - }, - "lang": { - "type": "string", - "default": "", - "title": "The lang Schema", - "examples": [ - "en_US" - ] - }, - "title": { - "type": "string", - "default": "", - "title": "The title Schema", - "examples": [ - "A reality.eth question", - "Add Ethfinex Badge to Token", - "Add Token to Registry", - "Add a list to Consensus Layer Withdrawal Protection enabled badges", - "Add a list to Omen Verified Market enabled badges", - "Add a list to The Registry enabled badges", - "Add a market to Omen Verified Market", - "Add a validator to Consensus Layer Withdrawal Protection", - "Add an entry to Ledger Contract Domain Name registry v2", - "Proof of Humanity Clearing Request", - "Proof of Humanity Registration Request", - "Realitio Question", - "Remove Ethfinex Badge From Token", - "Remove Token from Registry", - "Remove a list from Consensus Layer Withdrawal Protection enabled badges", - "Remove a list from Omen Verified Market enabled badges", - "Remove a market from Omen Verified Market", - "Remove a validator from Consensus Layer Withdrawal Protection", - "Remove an entry from Ledger Contract Domain Name registry v2", - "Review a translation from Linguo", - "Unslashed insurance claim" - ] - }, - "description": { - "type": "string", - "default": "", - "title": "The description Schema", - "examples": [ - "A Reality.eth question has been raised to arbitration.", - "A request to register the specified entry to a list of provable humans.", - "A request to remove the specified entry from a list of provable humans.", - "Someone challenged a translation", - "Someone requested to add a list to Consensus Layer Withdrawal Protection enabled badges.", - "Someone requested to add a list to Omen Verified Market enabled badges.", - "Someone requested to add a list to The Registry enabled badges.", - "Someone requested to add a market to Omen Verified Market", - "Someone requested to add a token to the token curated registry of tokens.", - "Someone requested to add a validator to Consensus Layer Withdrawal Protection", - "Someone requested to add an entry to Ledger Contract Domain Name registry v2", - "Someone requested to add the the Ethfinex badge to a token.\n\nDescription\n\nTokens with the Ethfinex badge can participate in the Ethfinex Community Vote to become traded on the Ethfinex platform. To be eligible to receive the badge, the project and it's associated token must comply with the minimum set of criteria defined in the criteria document.", - "Someone requested to remove a list from Consensus Layer Withdrawal Protection enabled badges.", - "Someone requested to remove a list from Omen Verified Market enabled badges.", - "Someone requested to remove a market from Omen Verified Market", - "Someone requested to remove a token from a token curated registry of tokens.", - "Someone requested to remove a validator from Consensus Layer Withdrawal Protection", - "Someone requested to remove an entry from Ledger Contract Domain Name registry v2", - "Someone requested to remove the the Ethfinex badge from a token.\n\nDescription\n\nTokens with the Ethfinex badge can participate in the Ethfinex Community Vote to become traded on the Ethfinex platform. To be eligible to receive the badge, the project and it's associated token must comply with the minimum set of criteria defined in the criteria document.", - "The claimant requested a compensation for damages covered by Unslashed insurance in the provided amount." - ] - }, - "question": { - "type": "string", - "default": "", - "title": "The question Schema", - "examples": [ - "Does the entry comply with the required criteria?", - "Does the list comply with the required criteria?", - "Does the market comply with the required criteria?", - "Does the translation comply with the required criteria?", - "Does the validator comply with the required criteria?", - "Give the answer to the question.", - "Should the badge be added to the token?", - "Should the badge be removed from the token?", - "Should the request to register be accepted?", - "Should the request to remove be accepted?", - "Should the token be added to the registry?", - "Should the token be removed from the registry?", - "Should their claim be paid out?", - "Which party abided by terms of the contract?" - ] - }, - "type": { - "title": "The type Schema", - "description": "An explanation about the purpose of this instance.", - "type": "string", - "default": "single-select", - "examples": [ - "single-select" - ], - "enum": [ - "bool", - "uint", - "single-select", - "multiple-select", - "datetime" - ] - }, - "answers": { - "type": "array", - "default": [ - { - "id": "0x00", - "title": "Invalid/Refuse to Arbitrate", - "reserved": true - }, - { - "id": "0x01", - "title": "Yes", - "description": "Accept the request.", - "reserved": false - }, - { - "id": "0x02", - "title": "No", - "description": "Refuse the request.", - "reserved": false - } - ], - "title": "The answers Schema", - "items": { - "type": "object", - "default": {}, - "title": "A Schema", - "required": [ - "title" - ], - "dependentSchemas": { - "id": { - "properties": { - "reserved": { - "const": true - } - } - } - }, - "if": { - "properties": { - "reserved": { - "const": true - } - } - }, - "then": { - "dependentRequired": { - "id": true - } - }, - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "default": "", - "title": "The id Schema", - "examples": [ - "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", - "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ] - }, - "title": { - "type": "string", - "default": "", - "title": "The title Schema", - "examples": [ - "Accept the claim", - "No", - "No, Don't Add It", - "No, Don't Remove It", - "No, Keep It", - "No, the translation should not be accepted", - "Pay Receiver", - "Refund Sender", - "Reject the claim", - "Yes", - "Yes, Add It", - "Yes, Remove It", - "Yes, the translation should be accepted", - "Answered Too Soon", - "Invalid/Refuse to Arbitrate" - ] - }, - "description": { - "type": "string", - "default": "", - "title": "The description Schema", - "examples": [ - "Accept the request to register the entry.", - "Accept the request to remove the entry.", - "Deny the request.", - "Reject the claim if any of the acceptance criteria do not hold.", - "Select this if you think the entry complies with the required criteria and should be added.", - "Select this if you think the entry complies with the required criteria and should not be removed.", - "Select this if you think the entry does not comply with the required criteria and should be removed.", - "Select this if you think the entry does not comply with the required criteria and should not be added.", - "Select this if you think the list complies with the required criteria and should be added.", - "Select this if you think the list complies with the required criteria and should not be removed.", - "Select this if you think the list does not comply with the required criteria and should be removed.", - "Select this if you think the list does not comply with the required criteria and should not be added.", - "Select this if you think the market complies with the required criteria and should be added.", - "Select this if you think the market complies with the required criteria and should not be removed.", - "Select this if you think the market does not comply with the required criteria and should be removed.", - "Select this if you think the market does not comply with the required criteria and should not be added.", - "Select this if you think the token and project comply with the required criteria and the badge should be added.", - "Select this if you think the token and project comply with the required criteria and the badge should be kept.", - "Select this if you think the token and/or project do(es) not comply with the required criteria and the badge should be removed.", - "Select this if you think the token and/or project do(es) not comply with the required criteria and the badge should not be added.", - "Select this if you think the token information is correct and the token should be added to the registry.", - "Select this if you think the token information is correct and the token should not be removed from the registry.", - "Select this if you think the token information is incorrect and the token should be not be added to the registry.", - "Select this if you think the token information is incorrect and the token should be removed from the registry.", - "Select this if you think the translation complies with the required criteria.", - "Select this if you think the translation does not comply with the required criteria.", - "Select this if you think the validator complies with the required criteria and should be added.", - "Select this if you think the validator complies with the required criteria and should not be removed.", - "Select this if you think the validator does not comply with the required criteria and should be removed.", - "Select this if you think the validator does not comply with the required criteria and should not be added.", - "Select to release funds to the Receiver", - "Select to return funds to the Sender" - ] - }, - "reserved": { - "type": "boolean", - "default": false, - "title": "The reserved Schema", - "examples": [ - true, - false - ] - } - }, - "examples": [ - { - "title": "Yes", - "description": "Accept the request." - }, - { - "title": "No", - "description": "Refuse the request." - } - ] - } - }, - "frontendUrl": { - "type": "string", - "default": "", - "title": "The frontendUrl Schema", - "examples": [ - "https://curate.kleros.io/tcr/1/0x0000000000000000000000000000000000000000/0x0000000000000000000000000000000000000000000000000000000000000000", - "https://reality.eth.link/app/#!/question/0x0000000000000000000000000000000000000000000000000000000000000000/0" - ] - }, - "disputePolicyURI": { - "type": "string", - "default": "", - "title": "The dispute policy URI Schema", - "examples": [ - "/ipfs/QmPhEBstumEP84eSftx9MwBmSXBCGRFJMPZauKVa9gBizh/omen-verified-market.pdf", - "/ipfs/QmPtXtFKfVc3w5aGVNYrmBZWEHBLpk2XMLkYCnEioxwy43/clwp-acceptance-policy.pdf", - "/ipfs/QmTL1SCKpRcr7NRbVpXW6z9QoQXRHJT5cQr6PEge5qoLwU/t2cr-primary-document.pdf", - "/ipfs/QmVabp1VjJNYzXDxbcWFdeK17RvvA9eQy6eJVf1T1AzS1a/linguo-translation-quality-policy.pdf", - "/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf", - "/ipfs/QmW4zDA8X95cyfAsW9Nq1t7XNTyP3sMQAWNRFoQhMpgAv7/Kleros%2520Moderate%2520x%2520Reality.eth%2520Oracle%2520-%2520Telegram%2520Content%2520Moderation%2520Question%2520Resolution%2520Policy.pdf", - "/ipfs/QmXDiiBAizCPoLqHvcfTzuMT7uvFEe1j3s4TgoWWd4k5np/proof-of-humanity-registry-policy-v1.3.pdf", - "/ipfs/QmZ7RVU7re1g8nXDbAFMHV99pyie3dn4cY7Ga2X4h8mDpV/reject-all-policy.pdf", - "/ipfs/QmaUr6hnSVxYD899xdcn2GUVtXVjXoSXKZbce3zFtGWw4H/Question_Resolution_Policy.pdf", - "/ipfs/QmdvkC5Djgk8MfX5ijJR3NJzmvGugUqvui7bKuTErSD6cE/contract-domain-name-registry-for-ledger-policy-3-.pdf", - "/ipfs/QmeTBY7jZe2ut5WjifNASADo3E4zBxkMd62WwBpXtwP9pg" - ] - }, - "arbitrableChainID": { - "type": "string", - "default": "", - "title": "The arbitrableChainID Schema", - "examples": [ - "1", - "100" - ] - }, - "arbitrableAddress": { - "type": "string", - "default": "", - "title": "The arbitrableAddress Schema", - "examples": [ - "0x2e39b8f43d0870ba896f516f78f57cde773cf805" - ] - }, - "arbitratorChainID": { - "type": "string", - "default": "", - "title": "The arbitratorChainID Schema", - "examples": [ - "421614" - ] - }, - "arbitratorAddress": { - "type": "string", - "default": "", - "title": "The arbitratorAddress Schema", - "examples": [ - "0xD08Ab99480d02bf9C092828043f611BcDFEA917b" - ] - }, - "specification": { - "type": "string", - "default": "", - "title": "The specification Schema", - "examples": [ - "KIP00", - "KIP99" - ] - } - } -} diff --git a/contracts/test/fixtures/DisputeTemplate.simple.json b/contracts/test/fixtures/DisputeTemplate.simple.json deleted file mode 100644 index 4406a9b37..000000000 --- a/contracts/test/fixtures/DisputeTemplate.simple.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../NewDisputeTemplate.schema.json", - "title": "Let's do this", - "description": "We want to do this: %s", - "question": "Does it comply with the policy?", - "answers": [ - { - "title": "Yes", - "description": "Select this if you agree that it must be done." - }, - { - "title": "No", - "description": "Select this if you do not agree that it must be done." - } - ], - "policyURI": "/ipfs/Qmdvk...rSD6cE/policy.pdf", - "frontendUrl": "https://kleros-v2.netlify.app/#/cases/%s/overview", - "arbitratorChainID": "421614", - "arbitratorAddress": "0xD08Ab99480d02bf9C092828043f611BcDFEA917b", - "category": "Others", - "specification": "KIP001", - "lang": "en_US" -} diff --git a/contracts/test/foundry/KlerosCore_Appeals.t.sol b/contracts/test/foundry/KlerosCore_Appeals.t.sol deleted file mode 100644 index c5016f23c..000000000 --- a/contracts/test/foundry/KlerosCore_Appeals.t.sol +++ /dev/null @@ -1,503 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {KlerosCore_TestBase} from "./KlerosCore_TestBase.sol"; -import {KlerosCore} from "../../src/arbitration/KlerosCore.sol"; -import {DisputeKitClassic, DisputeKitClassicBase} from "../../src/arbitration/dispute-kits/DisputeKitClassic.sol"; -import {UUPSProxy} from "../../src/proxy/UUPSProxy.sol"; -import "../../src/libraries/Constants.sol"; - -/// @title KlerosCore_AppealsTest -/// @dev Tests for KlerosCore appeal system, funding, and court/DK jumping -contract KlerosCore_AppealsTest is KlerosCore_TestBase { - function test_appeal_fundOneSide() public { - uint256 disputeID = 0; - vm.deal(address(disputeKit), 1 ether); - vm.deal(staker1, 1 ether); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - (uint256 start, uint256 end) = core.appealPeriod(0); - assertEq(start, 0, "Appeal period start should be 0"); - assertEq(end, 0, "Appeal period end should be 0"); - - // Simulate the call from dispute kit to check the requires unrelated to caller - vm.prank(address(disputeKit)); - vm.expectRevert(KlerosCore.DisputeNotAppealable.selector); - core.appeal{value: 0.21 ether}(disputeID, 2, arbitratorExtraData); - - vm.expectEmit(true, true, true, true); - emit KlerosCore.AppealPossible(disputeID, arbitrable); - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.appeal); - core.passPeriod(disputeID); - - (, , KlerosCore.Period period, , uint256 lastPeriodChange) = core.disputes(disputeID); - (start, end) = core.appealPeriod(0); - assertEq(uint256(period), uint256(KlerosCore.Period.appeal), "Wrong period"); - assertEq(lastPeriodChange, block.timestamp, "Wrong lastPeriodChange"); - assertEq(core.appealCost(0), 0.21 ether, "Wrong appealCost"); - assertEq(start, lastPeriodChange, "Appeal period start is incorrect"); - assertEq(end, lastPeriodChange + timesPerPeriod[3], "Appeal period end is incorrect"); - - vm.expectRevert(KlerosCore.AppealPeriodNotPassed.selector); - core.passPeriod(disputeID); - - // Simulate the call from dispute kit to check the requires unrelated to caller - vm.prank(address(disputeKit)); - vm.expectRevert(KlerosCore.AppealFeesNotEnough.selector); - core.appeal{value: 0.21 ether - 1}(disputeID, 2, arbitratorExtraData); - vm.deal(address(disputeKit), 0); // Nullify the balance so it doesn't get in the way. - - vm.prank(staker1); - vm.expectRevert(KlerosCore.DisputeKitOnly.selector); - core.appeal{value: 0.21 ether}(disputeID, 2, arbitratorExtraData); - - vm.prank(crowdfunder1); - vm.expectRevert(DisputeKitClassicBase.ChoiceOutOfBounds.selector); - disputeKit.fundAppeal(disputeID, 3); - - vm.prank(crowdfunder1); - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.Contribution(disputeID, 0, 1, crowdfunder1, 0.21 ether); - disputeKit.fundAppeal{value: 0.21 ether}(disputeID, 1); // Fund the losing choice. Total cost will be 0.63 (0.21 + 0.21 * (20000/10000)) - - assertEq(crowdfunder1.balance, 9.79 ether, "Wrong balance of the crowdfunder"); - assertEq(address(disputeKit).balance, 0.21 ether, "Wrong balance of the DK"); - assertEq((disputeKit.getFundedChoices(disputeID)).length, 0, "No funded choices"); - - vm.prank(crowdfunder1); - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.Contribution(disputeID, 0, 1, crowdfunder1, 0.42 ether); - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.ChoiceFunded(disputeID, 0, 1); - disputeKit.fundAppeal{value: 5 ether}(disputeID, 1); // Deliberately overpay to check reimburse - - assertEq(crowdfunder1.balance, 9.37 ether, "Wrong balance of the crowdfunder"); - assertEq(address(disputeKit).balance, 0.63 ether, "Wrong balance of the DK"); - assertEq((disputeKit.getFundedChoices(disputeID)).length, 1, "One choice should be funded"); - assertEq((disputeKit.getFundedChoices(disputeID))[0], 1, "Incorrect funded choice"); - - vm.prank(crowdfunder1); - vm.expectRevert(DisputeKitClassicBase.AppealFeeIsAlreadyPaid.selector); - disputeKit.fundAppeal(disputeID, 1); - } - - function test_appeal_timeoutCheck() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - vm.prank(crowdfunder1); - vm.expectRevert(DisputeKitClassicBase.AppealPeriodIsOver.selector); - disputeKit.fundAppeal{value: 0.1 ether}(disputeID, 1); - core.passPeriod(disputeID); - - (uint256 start, uint256 end) = core.appealPeriod(0); - - vm.prank(crowdfunder1); - vm.warp(block.timestamp + ((end - start) / 2 + 1)); - vm.expectRevert(DisputeKitClassicBase.AppealPeriodIsOverForLoser.selector); - disputeKit.fundAppeal{value: 0.1 ether}(disputeID, 1); // Losing choice - - disputeKit.fundAppeal(disputeID, 2); // Winning choice funding should not revert yet - - vm.prank(crowdfunder1); - vm.warp(block.timestamp + (end - start) / 2); // Warp one more to cover the whole period - vm.expectRevert(DisputeKitClassicBase.AppealPeriodIsOver.selector); - disputeKit.fundAppeal{value: 0.1 ether}(disputeID, 2); - } - - function test_appeal_fullFundingNoJump() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - core.passPeriod(disputeID); // Appeal - - vm.prank(crowdfunder1); - disputeKit.fundAppeal{value: 0.63 ether}(disputeID, 1); - - vm.prank(crowdfunder2); - vm.expectEmit(true, true, true, true); - emit KlerosCore.AppealDecision(disputeID, arbitrable); - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.evidence); - disputeKit.fundAppeal{value: 0.42 ether}(disputeID, 2); - - assertEq((disputeKit.getFundedChoices(disputeID)).length, 0, "No funded choices in the fresh round"); - (uint256 ruling, bool tied, bool overridden) = disputeKit.currentRuling(disputeID); - assertEq(ruling, 0, "Should be 0 ruling in the fresh round"); - assertEq(tied, true, "Should be tied"); - assertEq(overridden, false, "Not overridden"); - - assertEq(address(disputeKit).balance, 0.84 ether, "Wrong balance of the DK"); // 0.63 + 0.42 - 0.21 - assertEq(address(core).balance, 0.3 ether, "Wrong balance of the core"); // 0.09 arbFee + 0.21 appealFee - - assertEq(sortitionModule.disputesWithoutJurors(), 1, "Wrong disputesWithoutJurors count after appeal"); - assertEq(core.getNumberOfRounds(disputeID), 2, "Wrong number of rounds"); - - (, , KlerosCore.Period period, , uint256 lastPeriodChange) = core.disputes(disputeID); - assertEq(uint256(period), uint256(KlerosCore.Period.evidence), "Wrong period"); - assertEq(lastPeriodChange, block.timestamp, "Wrong lastPeriodChange"); - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 1); // Check the new round - assertEq(round.pnkAtStakePerJuror, 1000, "Wrong pnkAtStakePerJuror"); - assertEq(round.totalFeesForJurors, 0.21 ether, "Wrong totalFeesForJurors"); - assertEq(round.nbVotes, 7, "Wrong nbVotes"); - - core.draw(disputeID, 7); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.vote); // Check that we don't have to wait for the timeout to pass the evidence period after appeal - core.passPeriod(disputeID); - } - - function test_appeal_fullFundingCourtJumpAndDKJumpToClassic() public { - // Setup: dk2 supported by court2 with dk2._jumpDisputeKitID == DISPUTE_KIT_CLASSIC - // Ensure that court2 jumps to GENERAL_COURT and dk2 jumps to DISPUTE_KIT_CLASSIC - uint256 disputeID = 0; - DisputeKitClassic dkLogic = new DisputeKitClassic(); - // Create a new DK and court to check the jump - bytes memory initDataDk = abi.encodeWithSignature( - "initialize(address,address,address,uint256)", - owner, - address(core), - address(wNative), - DISPUTE_KIT_CLASSIC - ); - - UUPSProxy proxyDk = new UUPSProxy(address(dkLogic), initDataDk); - DisputeKitClassic newDisputeKit = DisputeKitClassic(address(proxyDk)); - - uint96 newCourtID = 2; - uint256 newDkID = 2; - uint256[] memory supportedDK = new uint256[](1); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - bytes memory newExtraData = abi.encodePacked(uint256(newCourtID), DEFAULT_NB_OF_JURORS, newDkID); - - vm.prank(owner); - core.addNewDisputeKit(newDisputeKit); - vm.prank(owner); - core.createCourt( - GENERAL_COURT, - hiddenVotes, - minStake, - alpha, - feeForJuror, - 3, // jurors for jump. Low number to ensure jump after the first appeal - [uint256(60), uint256(120), uint256(180), uint256(240)], // Times per period - sortitionExtraData, - supportedDK - ); - - arbitrable.changeArbitratorExtraData(newExtraData); - - vm.prank(owner); - supportedDK = new uint256[](1); - supportedDK[0] = newDkID; - core.enableDisputeKits(newCourtID, supportedDK, true); - assertEq(core.isSupported(newCourtID, newDkID), true, "New DK should be supported by new court"); - - vm.prank(staker1); - core.setStake(newCourtID, 20000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 0); - assertEq(round.disputeKitID, newDkID, "Wrong DK ID"); - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - newDisputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - core.passPeriod(disputeID); // Appeal - - vm.prank(crowdfunder1); - newDisputeKit.fundAppeal{value: 0.63 ether}(disputeID, 1); - - assertEq(core.isDisputeKitJumping(disputeID), true, "Should be jumping"); - - vm.expectEmit(true, true, true, true); - emit KlerosCore.CourtJump(disputeID, 1, newCourtID, GENERAL_COURT); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitJump(disputeID, 1, newDkID, DISPUTE_KIT_CLASSIC); - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.DisputeCreation(disputeID, 2, newExtraData); - vm.expectEmit(true, true, true, true); - emit KlerosCore.AppealDecision(disputeID, arbitrable); - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.evidence); - vm.prank(crowdfunder2); - newDisputeKit.fundAppeal{value: 0.42 ether}(disputeID, 2); - - (, bool jumped, ) = newDisputeKit.disputes(disputeID); - assertEq(jumped, true, "jumped should be true"); - assertEq( - (newDisputeKit.getFundedChoices(disputeID)).length, - 2, - "No fresh round created so the number of funded choices should be 2" - ); - - round = core.getRoundInfo(disputeID, 1); - assertEq(round.disputeKitID, DISPUTE_KIT_CLASSIC, "Wrong DK ID"); - assertEq(sortitionModule.disputesWithoutJurors(), 1, "Wrong disputesWithoutJurors count"); - (uint96 courtID, , , , ) = core.disputes(disputeID); - assertEq(courtID, GENERAL_COURT, "Wrong court ID"); - - (, jumped, ) = disputeKit.disputes(disputeID); - assertEq(jumped, false, "jumped should be false in the DK that dispute jumped to"); - - // Check jump modifier - vm.prank(address(core)); - vm.expectRevert(DisputeKitClassicBase.DisputeJumpedToParentDK.selector); - newDisputeKit.draw(disputeID, 1); - - // And check that draw in the new round works - vm.expectEmit(true, true, true, true); - emit KlerosCore.Draw(staker1, disputeID, 1, 0); // roundID = 1 VoteID = 0 - core.draw(disputeID, 1); - - (address account, , , ) = disputeKit.getVoteInfo(disputeID, 1, 0); - assertEq(account, staker1, "Wrong drawn account in the classic DK"); - } - - function test_appeal_fullFundingCourtJumpAndDKJumpToNonClassic() public { - // Setup: - // dk2 supported by GENERAL_COURT, which is a non-DISPUTE_KIT_CLASSIC - // dk3 supported by court2, with dk3._jumpDisputeKitID == dk2 - // Ensure that court2 jumps to GENERAL_COURT and dk3 jumps to dk2 - uint256 disputeID = 0; - uint96 newCourtID = 2; - uint256 dkID2 = 2; - uint256 dkID3 = 3; - - DisputeKitClassic dkLogic = new DisputeKitClassic(); - - bytes memory initDataDk2 = abi.encodeWithSignature( - "initialize(address,address,address,uint256)", - owner, - address(core), - address(wNative), - DISPUTE_KIT_CLASSIC - ); - UUPSProxy proxyDk2 = new UUPSProxy(address(dkLogic), initDataDk2); - DisputeKitClassic disputeKit2 = DisputeKitClassic(address(proxyDk2)); - - bytes memory initDataDk3 = abi.encodeWithSignature( - "initialize(address,address,address,uint256)", - owner, - address(core), - address(wNative), - dkID2 - ); - UUPSProxy proxyDk3 = new UUPSProxy(address(dkLogic), initDataDk3); - DisputeKitClassic disputeKit3 = DisputeKitClassic(address(proxyDk3)); - - vm.prank(owner); - core.addNewDisputeKit(disputeKit2); - vm.prank(owner); - core.addNewDisputeKit(disputeKit3); - - uint256[] memory supportedDK = new uint256[](2); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - supportedDK[1] = dkID3; - vm.prank(owner); - core.createCourt( - GENERAL_COURT, - hiddenVotes, - minStake, - alpha, - feeForJuror, - 3, // jurors for jump. Low number to ensure jump after the first appeal - [uint256(60), uint256(120), uint256(180), uint256(240)], // Times per period - sortitionExtraData, - supportedDK - ); - assertEq(core.isSupported(newCourtID, dkID3), true, "dkID3 should be supported by new court"); - - vm.prank(owner); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - supportedDK[1] = dkID2; - core.enableDisputeKits(GENERAL_COURT, supportedDK, true); - assertEq(core.isSupported(GENERAL_COURT, dkID2), true, "dkID2 should be supported by GENERAL_COURT"); - - bytes memory newExtraData = abi.encodePacked(uint256(newCourtID), DEFAULT_NB_OF_JURORS, dkID3); - arbitrable.changeArbitratorExtraData(newExtraData); - - vm.prank(staker1); - core.setStake(newCourtID, 20000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 0); - assertEq(round.disputeKitID, dkID3, "Wrong DK ID"); - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - disputeKit3.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - core.passPeriod(disputeID); // Appeal - - vm.prank(crowdfunder1); - disputeKit3.fundAppeal{value: 0.63 ether}(disputeID, 1); - - assertEq(core.isDisputeKitJumping(disputeID), true, "Should be jumping"); - - vm.expectEmit(true, true, true, true); - emit KlerosCore.CourtJump(disputeID, 1, newCourtID, GENERAL_COURT); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitJump(disputeID, 1, dkID3, dkID2); - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.DisputeCreation(disputeID, 2, newExtraData); - vm.expectEmit(true, true, true, true); - emit KlerosCore.AppealDecision(disputeID, arbitrable); - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.evidence); - vm.prank(crowdfunder2); - disputeKit3.fundAppeal{value: 0.42 ether}(disputeID, 2); - - (, bool jumped, ) = disputeKit3.disputes(disputeID); - assertEq(jumped, true, "jumped should be true"); - assertEq( - (disputeKit3.getFundedChoices(disputeID)).length, - 2, - "No fresh round created so the number of funded choices should be 2" - ); - - round = core.getRoundInfo(disputeID, 1); - assertEq(round.disputeKitID, dkID2, "Wrong DK ID"); - assertEq(sortitionModule.disputesWithoutJurors(), 1, "Wrong disputesWithoutJurors count"); - (uint96 courtID, , , , ) = core.disputes(disputeID); - assertEq(courtID, GENERAL_COURT, "Wrong court ID"); - - (, jumped, ) = disputeKit2.disputes(disputeID); - assertEq(jumped, false, "jumped should be false in the DK that dispute jumped to"); - - // Check jump modifier - vm.prank(address(core)); - vm.expectRevert(DisputeKitClassicBase.DisputeJumpedToParentDK.selector); - disputeKit3.draw(disputeID, 1); - - // And check that draw in the new round works - vm.expectEmit(true, true, true, true); - emit KlerosCore.Draw(staker1, disputeID, 1, 0); // roundID = 1 VoteID = 0 - core.draw(disputeID, 1); - - (address account, , , ) = disputeKit2.getVoteInfo(disputeID, 1, 0); - assertEq(account, staker1, "Wrong drawn account in the classic DK"); - } - - function test_appeal_quickPassPeriod() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - core.passPeriod(disputeID); // Appeal - - vm.warp(block.timestamp + timesPerPeriod[3] / 2); - - // Should pass to execution period without waiting for the 2nd half of the appeal. - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.execution); - core.passPeriod(disputeID); - } -} diff --git a/contracts/test/foundry/KlerosCore_Disputes.t.sol b/contracts/test/foundry/KlerosCore_Disputes.t.sol deleted file mode 100644 index f9840014d..000000000 --- a/contracts/test/foundry/KlerosCore_Disputes.t.sol +++ /dev/null @@ -1,148 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {KlerosCore_TestBase} from "./KlerosCore_TestBase.sol"; -import {KlerosCore} from "../../src/arbitration/KlerosCore.sol"; -import {IArbitratorV2} from "../../src/arbitration/KlerosCore.sol"; -import {DisputeKitClassicBase} from "../../src/arbitration/dispute-kits/DisputeKitClassicBase.sol"; -import {IArbitrableV2} from "../../src/arbitration/arbitrables/ArbitrableExample.sol"; -import "../../src/libraries/Constants.sol"; - -/// @title KlerosCore_DisputesTest -/// @dev Tests for KlerosCore dispute creation and management -contract KlerosCore_DisputesTest is KlerosCore_TestBase { - function test_createDispute_eth() public { - // Create a new court and DK to test non-standard extra data - uint256 newFee = 0.01 ether; - uint96 newCourtID = 2; - uint256 newNbJurors = 4; - uint256 newDkID = 2; - uint256[] memory supportedDK = new uint256[](1); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - bytes memory newExtraData = abi.encodePacked(uint256(newCourtID), newNbJurors, newDkID); - - vm.prank(owner); - core.addNewDisputeKit(disputeKit); // Just add the same dk to avoid dealing with initialization - vm.prank(owner); - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 20000, // alpha - newFee, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - supportedDK - ); - - arbitrable.changeArbitratorExtraData(newExtraData); - - vm.expectRevert(KlerosCore.ArbitrationFeesNotEnough.selector); - vm.prank(disputer); - arbitrable.createDispute{value: newFee * newNbJurors - 1}("Action"); - - vm.expectRevert(KlerosCore.DisputeKitNotSupportedByCourt.selector); - vm.prank(disputer); - arbitrable.createDispute{value: 0.04 ether}("Action"); - - vm.prank(owner); - supportedDK = new uint256[](1); - supportedDK[0] = newDkID; - core.enableDisputeKits(newCourtID, supportedDK, true); - - uint256 disputeID = 0; - uint256 nbChoices = 2; - vm.prank(disputer); - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.DisputeCreation(disputeID, nbChoices, newExtraData); - vm.expectEmit(true, true, true, true); - emit IArbitratorV2.DisputeCreation(disputeID, arbitrable); - arbitrable.createDispute{value: 0.04 ether}("Action"); - - assertEq(sortitionModule.disputesWithoutJurors(), 1, "Wrong disputesWithoutJurors count"); - ( - uint96 courtID, - IArbitrableV2 arbitrated, - KlerosCore.Period period, - bool ruled, - uint256 lastPeriodChange - ) = core.disputes(disputeID); - - assertEq(courtID, newCourtID, "Wrong court ID"); - assertEq(address(arbitrated), address(arbitrable), "Wrong arbitrable"); - assertEq(uint256(period), uint256(KlerosCore.Period.evidence), "Wrong period"); - assertEq(ruled, false, "Should not be ruled"); - assertEq(lastPeriodChange, block.timestamp, "Wrong lastPeriodChange"); - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 0); - assertEq(round.disputeKitID, newDkID, "Wrong DK ID"); - assertEq(round.pnkAtStakePerJuror, 4000, "Wrong pnkAtStakePerJuror"); // minStake * alpha / divisor = 2000 * 20000/10000 - assertEq(round.totalFeesForJurors, 0.04 ether, "Wrong totalFeesForJurors"); - assertEq(round.nbVotes, 4, "Wrong nbVotes"); - assertEq(round.repartitions, 0, "repartitions should be 0"); - assertEq(round.pnkPenalties, 0, "pnkPenalties should be 0"); - assertEq(round.sumFeeRewardPaid, 0, "sumFeeRewardPaid should be 0"); - assertEq(round.sumPnkRewardPaid, 0, "sumPnkRewardPaid should be 0"); - assertEq(address(round.feeToken), address(0), "feeToken should be 0"); - assertEq(round.drawIterations, 0, "drawIterations should be 0"); - - (uint256 numberOfChoices, bool jumped, bytes memory extraData) = disputeKit.disputes(disputeID); - - assertEq(numberOfChoices, 2, "Wrong numberOfChoices"); - assertEq(jumped, false, "jumped should be false"); - assertEq(extraData, newExtraData, "Wrong extra data"); - assertEq(disputeKit.coreDisputeIDToLocal(0), disputeID, "Wrong local disputeID"); - assertEq(disputeKit.coreDisputeIDToActive(0), true, "Wrong disputes length"); - - ( - uint256 winningChoice, - bool tied, - uint256 totalVoted, - uint256 totalCommited, - uint256 nbVoters, - uint256 choiceCount - ) = disputeKit.getRoundInfo(0, 0, 0); - assertEq(winningChoice, 0, "winningChoice should be 0"); - assertEq(tied, true, "tied should be true"); - assertEq(totalVoted, 0, "totalVoted should be 0"); - assertEq(totalCommited, 0, "totalCommited should be 0"); - assertEq(nbVoters, 0, "nbVoters should be 0"); - assertEq(choiceCount, 0, "choiceCount should be 0"); - } - - function test_createDispute_tokens() public { - feeToken.transfer(disputer, 1 ether); - vm.prank(disputer); - feeToken.approve(address(arbitrable), 1 ether); - - vm.expectRevert(KlerosCore.TokenNotAccepted.selector); - vm.prank(disputer); - arbitrable.createDispute("Action", 0.18 ether); - - vm.prank(owner); - core.changeAcceptedFeeTokens(feeToken, true); - vm.prank(owner); - core.changeCurrencyRates(feeToken, 500, 3); - - vm.expectRevert(KlerosCore.ArbitrationFeesNotEnough.selector); - vm.prank(disputer); - arbitrable.createDispute("Action", 0.18 ether - 1); - - vm.expectRevert(KlerosCore.TransferFailed.selector); - vm.prank(address(arbitrable)); // Bypass createDispute in arbitrable to avoid transfer checks there and make the arbitrable call KC directly - core.createDispute(2, arbitratorExtraData, feeToken, 0.18 ether); - - assertEq(core.arbitrationCost(arbitratorExtraData, feeToken), 0.18 ether, "Wrong token cost"); - vm.prank(disputer); - arbitrable.createDispute("Action", 0.18 ether); - - KlerosCore.Round memory round = core.getRoundInfo(0, 0); - assertEq(round.totalFeesForJurors, 0.18 ether, "Wrong totalFeesForJurors"); - assertEq(round.nbVotes, 3, "Wrong nbVotes"); - assertEq(address(round.feeToken), address(feeToken), "Wrong feeToken"); - - assertEq(feeToken.balanceOf(address(core)), 0.18 ether, "Wrong token balance of the core"); - assertEq(feeToken.balanceOf(disputer), 0.82 ether, "Wrong token balance of the disputer"); - } -} diff --git a/contracts/test/foundry/KlerosCore_Drawing.t.sol b/contracts/test/foundry/KlerosCore_Drawing.t.sol deleted file mode 100644 index 9bffbc27d..000000000 --- a/contracts/test/foundry/KlerosCore_Drawing.t.sol +++ /dev/null @@ -1,124 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {KlerosCore_TestBase} from "./KlerosCore_TestBase.sol"; -import {KlerosCore} from "../../src/arbitration/KlerosCore.sol"; -import {SortitionModule} from "../../src/arbitration/SortitionModule.sol"; -import {ISortitionModule} from "../../src/arbitration/interfaces/ISortitionModule.sol"; -import "../../src/libraries/Constants.sol"; - -/// @title KlerosCore_DrawingTest -/// @dev Tests for KlerosCore jury drawing and selection mechanisms -contract KlerosCore_DrawingTest is KlerosCore_TestBase { - function test_draw() public { - uint256 disputeID = 0; - uint256 roundID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 1500); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeLocked(staker1, 1000, false); - vm.expectEmit(true, true, true, true); - emit KlerosCore.Draw(staker1, disputeID, roundID, 0); // VoteID = 0 - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); // Do 3 iterations and see that the juror will get drawn 3 times despite low stake. - - (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, ) = sortitionModule.getJurorBalance( - staker1, - GENERAL_COURT - ); - assertEq(totalStaked, 1500, "Wrong amount total staked"); - assertEq(totalLocked, 3000, "Wrong amount locked"); // 1000 per draw - assertEq(stakedInCourt, 1500, "Wrong amount staked in court"); - assertEq(sortitionModule.disputesWithoutJurors(), 0, "Wrong disputesWithoutJurors count"); - - for (uint256 i = 0; i < DEFAULT_NB_OF_JURORS; i++) { - (address account, bytes32 commit, uint256 choice, bool voted) = disputeKit.getVoteInfo(0, 0, i); - assertEq(account, staker1, "Wrong drawn account"); - assertEq(commit, bytes32(0), "Commit should be empty"); - assertEq(choice, 0, "Choice should be empty"); - assertEq(voted, false, "Voted should be false"); - } - } - - function test_draw_noEmptyAddresses() public { - uint256 disputeID = 0; - uint256 roundID = 0; - - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); // No one is staked so check that the empty addresses are not drawn. - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, roundID); - assertEq(round.drawIterations, 3, "Wrong drawIterations number"); - - (, , , , uint256 nbVoters, ) = disputeKit.getRoundInfo(disputeID, roundID, 0); - assertEq(nbVoters, 0, "nbVoters should be 0"); - } - - function test_draw_parentCourts() public { - uint96 newCourtID = 2; - uint256 disputeID = 0; - uint256 roundID = 0; - - // Create a child court and stake exclusively there to check that parent courts hold drawing power. - vm.prank(owner); - uint256[] memory supportedDK = new uint256[](1); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 1000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - sortitionExtraData, // Sortition extra data - supportedDK - ); - - uint256[] memory children = core.getCourtChildren(GENERAL_COURT); - assertEq(children.length, 1, "Wrong children count"); - assertEq(children[0], 2, "Wrong child ID"); - - vm.prank(staker1); - core.setStake(newCourtID, 3000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); // Dispute uses general court by default - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - (uint96 courtID, , , , ) = core.disputes(disputeID); - assertEq(courtID, GENERAL_COURT, "Wrong court ID of the dispute"); - - vm.expectEmit(true, true, true, true); - emit KlerosCore.Draw(staker1, disputeID, roundID, 0); - vm.expectEmit(true, true, true, true); - emit KlerosCore.Draw(staker1, disputeID, roundID, 1); - vm.expectEmit(true, true, true, true); - emit KlerosCore.Draw(staker1, disputeID, roundID, 2); - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - assertEq(sortitionModule.disputesWithoutJurors(), 0, "Wrong disputesWithoutJurors count"); - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, roundID); - assertEq(round.drawIterations, 3, "Wrong drawIterations number"); - - (, , , , uint256 nbVoters, ) = disputeKit.getRoundInfo(disputeID, roundID, 0); - assertEq(nbVoters, 3, "nbVoters should be 3"); - } -} diff --git a/contracts/test/foundry/KlerosCore_Execution.t.sol b/contracts/test/foundry/KlerosCore_Execution.t.sol deleted file mode 100644 index 01efd6409..000000000 --- a/contracts/test/foundry/KlerosCore_Execution.t.sol +++ /dev/null @@ -1,760 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {KlerosCore_TestBase} from "./KlerosCore_TestBase.sol"; -import {KlerosCore} from "../../src/arbitration/KlerosCore.sol"; -import {SortitionModule} from "../../src/arbitration/SortitionModule.sol"; -import {DisputeKitClassicBase} from "../../src/arbitration/dispute-kits/DisputeKitClassicBase.sol"; -import {IArbitratorV2, IArbitrableV2} from "../../src/arbitration/KlerosCore.sol"; -import {IERC20} from "../../src/libraries/SafeERC20.sol"; -import "../../src/libraries/Constants.sol"; - -/// @title KlerosCore_ExecutionTest -/// @dev Tests for KlerosCore execution, rewards, and ruling finalization -contract KlerosCore_ExecutionTest is KlerosCore_TestBase { - function test_execute() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 2000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - // Split the stakers' votes. The first staker will get VoteID 0 and the second will take the rest. - core.draw(disputeID, 1); - - vm.warp(block.timestamp + maxDrawingTime); - sortitionModule.passPhase(); // Staking phase to stake the 2nd voter - vm.prank(staker2); - core.setStake(GENERAL_COURT, 20000); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, 2); // Assign leftover votes to staker2 - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](1); - voteIDs[0] = 0; - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 1, 0, "XYZ"); // Staker1 only got 1 vote because of low stake - - voteIDs = new uint256[](2); - voteIDs[0] = 1; - voteIDs[1] = 2; - vm.prank(staker2); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - core.passPeriod(disputeID); // Appeal - - vm.expectRevert(KlerosCore.NotExecutionPeriod.selector); - core.execute(disputeID, 0, 1); - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - vm.prank(owner); - core.pause(); - vm.expectRevert(KlerosCore.WhenNotPausedOnly.selector); - core.execute(disputeID, 0, 1); - vm.prank(owner); - core.unpause(); - - assertEq(disputeKit.getCoherentCount(disputeID, 0), 2, "Wrong coherent count"); - - uint256 pnkCoherence; - uint256 feeCoherence; - // dispute, round, voteID, feeForJuror (not used in classic DK), pnkPerJuror (not used in classic DK) - (pnkCoherence, feeCoherence) = disputeKit.getDegreeOfCoherenceReward(disputeID, 0, 0, 0, 0); - assertEq(pnkCoherence, 0, "Wrong reward pnk coherence 0 vote ID"); - assertEq(feeCoherence, 0, "Wrong reward fee coherence 0 vote ID"); - - (pnkCoherence, feeCoherence) = disputeKit.getDegreeOfCoherenceReward(disputeID, 0, 1, 0, 0); - assertEq(pnkCoherence, 10000, "Wrong reward pnk coherence 1 vote ID"); - assertEq(feeCoherence, 10000, "Wrong reward fee coherence 1 vote ID"); - - (pnkCoherence, feeCoherence) = disputeKit.getDegreeOfCoherenceReward(disputeID, 0, 2, 0, 0); - assertEq(pnkCoherence, 10000, "Wrong reward pnk coherence 2 vote ID"); - assertEq(feeCoherence, 10000, "Wrong reward fee coherence 2 vote ID"); - - assertEq(disputeKit.getDegreeOfCoherencePenalty(disputeID, 0, 0, 0, 0), 0, "Wrong penalty coherence 0 vote ID"); - assertEq( - disputeKit.getDegreeOfCoherencePenalty(disputeID, 0, 1, 0, 0), - 10000, - "Wrong penalty coherence 1 vote ID" - ); - assertEq( - disputeKit.getDegreeOfCoherencePenalty(disputeID, 0, 2, 0, 0), - 10000, - "Wrong penalty coherence 2 vote ID" - ); - - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeLocked(staker1, 1000, true); - vm.expectEmit(true, true, true, true); - emit KlerosCore.TokenAndETHShift(staker1, disputeID, 0, 0, -int256(1000), 0, IERC20(address(0))); - // Check iterations for the winning staker to see the shifts - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeLocked(staker2, 0, true); - vm.expectEmit(true, true, true, true); - emit KlerosCore.TokenAndETHShift(staker2, disputeID, 0, 10000, 0, 0, IERC20(address(0))); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeLocked(staker2, 0, true); - vm.expectEmit(true, true, true, true); - emit KlerosCore.TokenAndETHShift(staker2, disputeID, 0, 10000, 0, 0, IERC20(address(0))); - core.execute(disputeID, 0, 3); // Do 3 iterations to check penalties first - - (uint256 totalStaked, uint256 totalLocked, , ) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 1000, "totalStaked should be penalized"); // 2000 - 1000 - assertEq(totalLocked, 0, "Tokens should be released for staker1"); - (, totalLocked, , ) = sortitionModule.getJurorBalance(staker2, GENERAL_COURT); - assertEq(totalLocked, 2000, "Tokens should still be locked for staker2"); - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 0); - assertEq(round.repartitions, 3, "Wrong repartitions"); - assertEq(round.pnkPenalties, 1000, "Wrong pnkPenalties"); - - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeLocked(staker1, 0, true); - vm.expectEmit(true, true, true, true); - emit KlerosCore.TokenAndETHShift(staker1, disputeID, 0, 0, 0, 0, IERC20(address(0))); - // Check iterations for the winning staker to see the shifts - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeLocked(staker2, 1000, true); - vm.expectEmit(true, true, true, true); - emit KlerosCore.TokenAndETHShift(staker2, disputeID, 0, 10000, 500, 0.045 ether, IERC20(address(0))); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeLocked(staker2, 1000, true); - vm.expectEmit(true, true, true, true); - emit KlerosCore.TokenAndETHShift(staker2, disputeID, 0, 10000, 500, 0.045 ether, IERC20(address(0))); - core.execute(disputeID, 0, 10); // Finish the iterations. We need only 3 but check that it corrects the count. - - (, totalLocked, , ) = sortitionModule.getJurorBalance(staker2, GENERAL_COURT); - assertEq(totalLocked, 0, "Tokens should be unlocked for staker2"); - - round = core.getRoundInfo(disputeID, 0); - assertEq(round.repartitions, 6, "Wrong repartitions"); - assertEq(round.pnkPenalties, 1000, "Wrong pnkPenalties"); - assertEq(round.sumFeeRewardPaid, 0.09 ether, "Wrong sumFeeRewardPaid"); - assertEq(round.sumPnkRewardPaid, 1000, "Wrong sumPnkRewardPaid"); - - assertEq(address(core).balance, 0, "Wrong balance of the core"); - assertEq(staker1.balance, 0, "Wrong balance of the staker1"); - assertEq(staker2.balance, 0.09 ether, "Wrong balance of the staker2"); - - assertEq(pinakion.balanceOf(address(core)), 22000, "Wrong token balance of the core"); // Was 21500. 1000 was transferred to staker2 - assertEq(pinakion.balanceOf(staker1), 999999999999998000, "Wrong token balance of staker1"); - assertEq(pinakion.balanceOf(staker2), 999999999999980000, "Wrong token balance of staker2"); // 20k stake and 1k added as a reward, thus -19k from the default - } - - function test_execute_NoCoherence() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - vm.warp(block.timestamp + timesPerPeriod[2]); // Don't vote at all so no one is coherent - core.passPeriod(disputeID); // Appeal - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - assertEq(disputeKit.getCoherentCount(disputeID, 0), 0, "Wrong coherent count"); - - uint256 pnkCoherence; - uint256 feeCoherence; - // dispute, round, voteID, feeForJuror (not used in classic DK), pnkPerJuror (not used in classic DK) - (pnkCoherence, feeCoherence) = disputeKit.getDegreeOfCoherenceReward(disputeID, 0, 0, 0, 0); - assertEq(pnkCoherence, 0, "Wrong reward pnk coherence 0 vote ID"); - assertEq(feeCoherence, 0, "Wrong reward fee coherence 0 vote ID"); - - (pnkCoherence, feeCoherence) = disputeKit.getDegreeOfCoherenceReward(disputeID, 0, 1, 0, 0); - assertEq(pnkCoherence, 0, "Wrong reward pnk coherence 1 vote ID"); - assertEq(feeCoherence, 0, "Wrong reward fee coherence 1 vote ID"); - - (pnkCoherence, feeCoherence) = disputeKit.getDegreeOfCoherenceReward(disputeID, 0, 2, 0, 0); - assertEq(pnkCoherence, 0, "Wrong reward pnk coherence 2 vote ID"); - assertEq(feeCoherence, 0, "Wrong reward fee coherence 2 vote ID"); - - assertEq(disputeKit.getDegreeOfCoherencePenalty(disputeID, 0, 0, 0, 0), 0, "Wrong penalty coherence 0 vote ID"); - assertEq(disputeKit.getDegreeOfCoherencePenalty(disputeID, 0, 1, 0, 0), 0, "Wrong penalty coherence 1 vote ID"); - assertEq(disputeKit.getDegreeOfCoherencePenalty(disputeID, 0, 2, 0, 0), 0, "Wrong penalty coherence 2 vote ID"); - - uint256 ownerBalance = owner.balance; - uint256 ownerTokenBalance = pinakion.balanceOf(owner); - - vm.expectEmit(true, true, true, true); - emit KlerosCore.LeftoverRewardSent(disputeID, 0, 3000, 0.09 ether, IERC20(address(0))); - core.execute(disputeID, 0, 3); - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 0); - assertEq(round.pnkPenalties, 3000, "Wrong pnkPenalties"); - assertEq(round.sumFeeRewardPaid, 0, "Wrong sumFeeRewardPaid"); - assertEq(round.sumPnkRewardPaid, 0, "Wrong sumPnkRewardPaid"); - - assertEq(address(core).balance, 0, "Wrong balance of the core"); - assertEq(staker1.balance, 0, "Wrong balance of the staker1"); - assertEq(owner.balance, ownerBalance + 0.09 ether, "Wrong balance of the owner"); - - assertEq(pinakion.balanceOf(address(core)), 0, "Wrong token balance of the core"); // The inactive juror got unstaked regardless of the phase (`noDelay` is true) - assertEq(pinakion.balanceOf(staker1), 999999999999997000, "Wrong token balance of staker1"); - assertEq(pinakion.balanceOf(owner), ownerTokenBalance + 3000, "Wrong token balance of owner"); - } - - function test_execute_UnstakeInactive() public { - // Create a 2nd court so unstaking is done in multiple courts. - vm.prank(owner); - uint256[] memory supportedDK = new uint256[](1); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 1000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - sortitionExtraData, // Sortition extra data - supportedDK - ); - - uint256 disputeID = 0; - uint96 newCourtID = 2; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.prank(staker1); - core.setStake(newCourtID, 20000); - (, , , uint256 nbCourts) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(nbCourts, 2, "Wrong number of courts"); - - assertEq(pinakion.balanceOf(address(core)), 40000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999960000, "Wrong token balance of staker1"); - - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - sortitionModule.passPhase(); // Staking phase. Change to staking so we don't have to deal with delayed stakes. - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - vm.warp(block.timestamp + timesPerPeriod[2]); // Don't vote at all so no one is coherent - core.passPeriod(disputeID); // Appeal - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - uint256 ownerTokenBalance = pinakion.balanceOf(owner); - - // Note that these events are emitted only after the first iteration of execute() therefore the juror has been penalized only for 1000 PNK her. - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeSet(staker1, newCourtID, 19000, 39000); // 1000 PNK penalty for voteID 0 - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeSet(staker1, newCourtID, 0, 20000); // Starting with 40000 we first nullify the stake and remove 19000 and then remove penalty once since there was only first iteration (40000 - 20000 - 1000) - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeSet(staker1, GENERAL_COURT, 0, 2000); // 2000 PNK should remain in balance to cover penalties since the first 1000 of locked pnk was already unlocked - core.execute(disputeID, 0, 3); - - assertEq(pinakion.balanceOf(address(core)), 0, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999997000, "Wrong token balance of staker1"); // 3000 locked PNK was withheld by the contract and given to owner. - assertEq(pinakion.balanceOf(owner), ownerTokenBalance + 3000, "Wrong token balance of owner"); - - (, , , nbCourts) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(nbCourts, 0, "Should unstake from all courts"); - } - - function test_execute_UnstakeInsolvent() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 1000); - - assertEq(pinakion.balanceOf(address(core)), 1000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999999000, "Wrong token balance of staker1"); - - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - (uint256 totalStaked, uint256 totalLocked, , uint256 nbCourts) = sortitionModule.getJurorBalance( - staker1, - GENERAL_COURT - ); - assertEq(totalStaked, 1000, "Wrong totalStaked"); - assertEq(totalLocked, 3000, "totalLocked should exceed totalStaked"); // Juror only staked 1000 but was drawn 3x of minStake (3000 locked) - assertEq(nbCourts, 1, "Wrong number of courts"); - - sortitionModule.passPhase(); // Staking phase. Change to staking so we don't have to deal with delayed stakes. - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](1); - voteIDs[0] = 0; - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 1, 0, "XYZ"); // 1 incoherent vote should make the juror insolvent - - voteIDs = new uint256[](2); - voteIDs[0] = 1; - voteIDs[1] = 2; - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - core.passPeriod(disputeID); // Appeal - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeSet(staker1, GENERAL_COURT, 0, 0); // Juror should have no stake left and should be unstaked from the court automatically. - core.execute(disputeID, 0, 6); - - assertEq(pinakion.balanceOf(address(core)), 0, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 1 ether, "Wrong token balance of staker1"); // The juror should have his penalty back as a reward - - (, , , nbCourts) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(nbCourts, 0, "Should unstake from all courts"); - } - - function test_execute_UnstakeBelowMinStake() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 1200); - - vm.prank(staker2); - core.setStake(GENERAL_COURT, 10000); - - assertEq(pinakion.balanceOf(address(core)), 11200, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999998800, "Wrong token balance of staker1"); - assertEq(pinakion.balanceOf(staker2), 999999999999990000, "Wrong token balance of staker2"); - - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - (uint256 totalStaked, uint256 totalLocked, , uint256 nbCourts) = sortitionModule.getJurorBalance( - staker1, - GENERAL_COURT - ); - assertEq(totalStaked, 1200, "Wrong totalStaked"); - assertEq(totalLocked, 1000, "Wrong totalLocked"); // Juror only staked 1000 but will fall below minStake with a bad vote - assertEq(nbCourts, 1, "Wrong number of courts"); - - sortitionModule.passPhase(); // Staking phase. Change to staking so we don't have to deal with delayed stakes. - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](1); - voteIDs[0] = 0; - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 1, 0, "XYZ"); // 1 incoherent vote should make the juror's stake below minStake - - voteIDs = new uint256[](2); - voteIDs[0] = 1; - voteIDs[1] = 2; - vm.prank(staker2); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - core.passPeriod(disputeID); // Appeal - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeSet(staker1, GENERAL_COURT, 0, 0); // Juror balance should be below minStake and should be unstaked from the court automatically. - core.execute(disputeID, 0, 6); - - assertEq(pinakion.balanceOf(address(core)), 11000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 1 ether - 1000, "Wrong token balance of staker1"); // The juror should have his penalty back as a reward - assertEq(pinakion.balanceOf(staker2), 999999999999990000, "Wrong token balance of staker2"); // No change - - (totalStaked, totalLocked, , nbCourts) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 0, "Wrong staker1 totalStaked"); - assertEq(totalLocked, 0, "Wrong staker1 totalLocked"); - assertEq(nbCourts, 0, "Wrong staker1 nbCourts"); - - (totalStaked, totalLocked, , nbCourts) = sortitionModule.getJurorBalance(staker2, GENERAL_COURT); - assertEq(totalStaked, 11000, "Wrong staker2 totalStaked"); - assertEq(totalLocked, 0, "Wrong staker2 totalLocked"); - assertEq(nbCourts, 1, "Wrong staker2 nbCourts"); - } - - function test_execute_withdrawLeftoverPNK() public { - // Return the previously locked tokens - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 1000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - sortitionModule.passPhase(); // Staking. Pass the phase so the juror can unstake before execution - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - core.passPeriod(disputeID); // Appeal - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 0); // Set stake to 0 to check if it will be withdrawn later. - - (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts) = sortitionModule - .getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 1000, "Wrong amount staked"); - assertEq(totalLocked, 3000, "Wrong amount locked"); - assertEq(stakedInCourt, 0, "Should be unstaked"); - assertEq(nbCourts, 0, "Should be 0 courts"); - - assertEq(pinakion.balanceOf(address(core)), 1000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999999000, "Wrong token balance of staker1"); - - vm.expectRevert(SortitionModule.NotEligibleForWithdrawal.selector); - sortitionModule.withdrawLeftoverPNK(staker1); - - vm.expectEmit(true, true, true, true); - emit SortitionModule.LeftoverPNK(staker1, 1000); - core.execute(disputeID, 0, 6); - - (totalStaked, totalLocked, , ) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 1000, "Wrong amount staked"); - assertEq(totalLocked, 0, "Should be fully unlocked"); - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 0); - assertEq(round.pnkPenalties, 0, "Wrong pnkPenalties"); - assertEq(round.sumFeeRewardPaid, 0.09 ether, "Wrong sumFeeRewardPaid"); - assertEq(round.sumPnkRewardPaid, 0, "Wrong sumPnkRewardPaid"); // No penalty so no rewards in pnk - - // Execute() shouldn't withdraw the tokens. - assertEq(pinakion.balanceOf(address(core)), 1000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999999000, "Wrong token balance of staker1"); - - vm.expectRevert(KlerosCore.SortitionModuleOnly.selector); - vm.prank(owner); - core.transferBySortitionModule(staker1, 1000); - - vm.expectEmit(true, true, true, true); - emit SortitionModule.LeftoverPNKWithdrawn(staker1, 1000); - sortitionModule.withdrawLeftoverPNK(staker1); - - (totalStaked, , , ) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 0, "Should be unstaked fully"); - - // Check that everything is withdrawn now - assertEq(pinakion.balanceOf(address(core)), 0, "Core balance should be empty"); - assertEq(pinakion.balanceOf(staker1), 1 ether, "All PNK should be withdrawn"); - } - - function test_execute_feeToken() public { - uint256 disputeID = 0; - - feeToken.transfer(disputer, 1 ether); - vm.prank(disputer); - feeToken.approve(address(arbitrable), 1 ether); - - vm.prank(owner); - core.changeAcceptedFeeTokens(feeToken, true); - vm.prank(owner); - core.changeCurrencyRates(feeToken, 500, 3); - - vm.prank(disputer); - arbitrable.createDispute("Action", 0.18 ether); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 1, 0, "XYZ"); // Staker1 only got 1 vote because of low stake - - core.passPeriod(disputeID); // Appeal - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - // Check only once per penalty and per reward - vm.expectEmit(true, true, true, true); - emit KlerosCore.TokenAndETHShift(staker1, disputeID, 0, 10000, 0, 0, feeToken); - vm.expectEmit(true, true, true, true); - emit KlerosCore.TokenAndETHShift(staker1, disputeID, 0, 10000, 0, 0.06 ether, feeToken); - core.execute(disputeID, 0, 6); - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 0); - assertEq(round.sumFeeRewardPaid, 0.18 ether, "Wrong sumFeeRewardPaid"); - - assertEq(feeToken.balanceOf(address(core)), 0, "Wrong fee token balance of the core"); - assertEq(feeToken.balanceOf(staker1), 0.18 ether, "Wrong fee token balance of staker1"); - assertEq(feeToken.balanceOf(disputer), 0.82 ether, "Wrong fee token balance of disputer"); - } - - function test_execute_NoCoherence_feeToken() public { - uint256 disputeID = 0; - - feeToken.transfer(disputer, 1 ether); - vm.prank(disputer); - feeToken.approve(address(arbitrable), 1 ether); - - vm.prank(owner); - core.changeAcceptedFeeTokens(feeToken, true); - vm.prank(owner); - core.changeCurrencyRates(feeToken, 500, 3); - - vm.prank(disputer); - arbitrable.createDispute("Action", 0.18 ether); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - vm.warp(block.timestamp + timesPerPeriod[2]); // Don't vote at all so no one is coherent - core.passPeriod(disputeID); // Appeal - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - vm.expectEmit(true, true, true, true); - emit KlerosCore.LeftoverRewardSent(disputeID, 0, 3000, 0.18 ether, feeToken); - core.execute(disputeID, 0, 10); // Put more iterations to check that they're capped - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 0); - assertEq(round.pnkPenalties, 3000, "Wrong pnkPenalties"); - assertEq(round.sumFeeRewardPaid, 0, "Wrong sumFeeRewardPaid"); - assertEq(round.sumPnkRewardPaid, 0, "Wrong sumPnkRewardPaid"); - assertEq(round.repartitions, 3, "Wrong repartitions"); - - assertEq(feeToken.balanceOf(address(core)), 0, "Wrong token balance of the core"); - assertEq(feeToken.balanceOf(staker1), 0, "Wrong token balance of staker1"); - assertEq(feeToken.balanceOf(disputer), 0.82 ether, "Wrong token balance of disputer"); - assertEq(feeToken.balanceOf(owner), 0.18 ether, "Wrong token balance of owner"); - } - - function test_executeRuling() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - core.passPeriod(disputeID); // Appeal - - vm.expectRevert(KlerosCore.NotExecutionPeriod.selector); - core.executeRuling(disputeID); - - vm.warp(block.timestamp + timesPerPeriod[3]); - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.execution); - core.passPeriod(disputeID); // Execution - - (, , KlerosCore.Period period, , uint256 lastPeriodChange) = core.disputes(disputeID); - assertEq(uint256(period), uint256(KlerosCore.Period.execution), "Wrong period"); - assertEq(lastPeriodChange, block.timestamp, "Wrong lastPeriodChange"); - - vm.expectRevert(KlerosCore.DisputePeriodIsFinal.selector); - core.passPeriod(disputeID); - - vm.expectEmit(true, true, true, true); - emit IArbitratorV2.Ruling(arbitrable, disputeID, 2); // Winning choice = 2 - vm.expectEmit(true, true, true, true); - emit IArbitrableV2.Ruling(core, disputeID, 2); - core.executeRuling(disputeID); - - vm.expectRevert(KlerosCore.RulingAlreadyExecuted.selector); - core.executeRuling(disputeID); - - (, , , bool ruled, ) = core.disputes(disputeID); - assertEq(ruled, true, "Should be ruled"); - } - - function test_executeRuling_appealSwitch() public { - // Check that the ruling switches if only one side was funded - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - core.passPeriod(disputeID); // Appeal - - vm.prank(crowdfunder1); - disputeKit.fundAppeal{value: 0.63 ether}(disputeID, 1); // Fund the losing choice - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - vm.expectEmit(true, true, true, true); - emit IArbitratorV2.Ruling(arbitrable, disputeID, 1); // Winning choice is switched to 1 - vm.expectEmit(true, true, true, true); - emit IArbitrableV2.Ruling(core, disputeID, 1); - core.executeRuling(disputeID); - - (uint256 ruling, bool tied, bool overridden) = disputeKit.currentRuling(disputeID); - assertEq(ruling, 1, "Wrong ruling"); - assertEq(tied, false, "Not tied"); - assertEq(overridden, true, "Should be overridden"); - } - - function test_withdrawFeesAndRewards() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - core.passPeriod(disputeID); // Appeal - - vm.prank(crowdfunder1); - disputeKit.fundAppeal{value: 0.63 ether}(disputeID, 1); // Fund the losing choice. The ruling will be overridden here - vm.prank(crowdfunder2); - disputeKit.fundAppeal{value: 0.41 ether}(disputeID, 2); // Underpay a bit to not create an appeal and withdraw the funded sum fully - - vm.warp(block.timestamp + timesPerPeriod[3]); - core.passPeriod(disputeID); // Execution - - vm.expectRevert(DisputeKitClassicBase.DisputeNotResolved.selector); - disputeKit.withdrawFeesAndRewards(disputeID, payable(staker1), 0, 1); - - core.executeRuling(disputeID); - - vm.prank(owner); - core.pause(); - vm.expectRevert(DisputeKitClassicBase.CoreIsPaused.selector); - disputeKit.withdrawFeesAndRewards(disputeID, payable(staker1), 0, 1); - vm.prank(owner); - core.unpause(); - - assertEq(crowdfunder1.balance, 9.37 ether, "Wrong balance of the crowdfunder1"); - assertEq(crowdfunder2.balance, 9.59 ether, "Wrong balance of the crowdfunder2"); - assertEq(address(disputeKit).balance, 1.04 ether, "Wrong balance of the DK"); - - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.Withdrawal(disputeID, 0, 1, crowdfunder1, 0.63 ether); - disputeKit.withdrawFeesAndRewards(disputeID, payable(crowdfunder1), 0, 1); - - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.Withdrawal(disputeID, 0, 2, crowdfunder2, 0.41 ether); - disputeKit.withdrawFeesAndRewards(disputeID, payable(crowdfunder2), 0, 2); - - assertEq(crowdfunder1.balance, 10 ether, "Wrong balance of the crowdfunder1"); - assertEq(crowdfunder2.balance, 10 ether, "Wrong balance of the crowdfunder2"); - assertEq(address(disputeKit).balance, 0, "Wrong balance of the DK"); - } -} diff --git a/contracts/test/foundry/KlerosCore_Governance.t.sol b/contracts/test/foundry/KlerosCore_Governance.t.sol deleted file mode 100644 index 53d438c4d..000000000 --- a/contracts/test/foundry/KlerosCore_Governance.t.sol +++ /dev/null @@ -1,472 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {KlerosCore_TestBase} from "./KlerosCore_TestBase.sol"; -import {KlerosCore} from "../../src/arbitration/KlerosCore.sol"; -import {IArbitratorV2} from "../../src/arbitration/KlerosCore.sol"; -import {DisputeKitSybilResistant} from "../../src/arbitration/dispute-kits/DisputeKitSybilResistant.sol"; -import {SortitionModuleMock} from "../../src/test/SortitionModuleMock.sol"; -import {PNK} from "../../src/token/PNK.sol"; -import "../../src/libraries/Constants.sol"; - -/// @title KlerosCore_GovernanceTest -/// @dev Tests for KlerosCore governance functions (owner/guardian operations) -contract KlerosCore_GovernanceTest is KlerosCore_TestBase { - function test_pause() public { - vm.expectRevert(KlerosCore.GuardianOrOwnerOnly.selector); - vm.prank(other); - core.pause(); - // Note that we must explicitly switch to the owner/guardian address to make the call, otherwise Foundry treats UUPS proxy as msg.sender. - vm.prank(guardian); - vm.expectEmit(true, true, true, true); - emit KlerosCore.Paused(); - core.pause(); - assertEq(core.paused(), true, "Wrong paused value"); - // Switch between owner and guardian to test both. WhenNotPausedOnly modifier is triggered after owner's check. - vm.prank(owner); - vm.expectRevert(KlerosCore.WhenNotPausedOnly.selector); - core.pause(); - } - - function test_unpause() public { - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.unpause(); - - vm.expectRevert(KlerosCore.WhenPausedOnly.selector); - vm.prank(owner); - core.unpause(); - - vm.prank(owner); - core.pause(); - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit KlerosCore.Unpaused(); - core.unpause(); - assertEq(core.paused(), false, "Wrong paused value"); - } - - function test_executeOwnerProposal() public { - bytes memory data = abi.encodeWithSignature("changeOwner(address)", other); - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.executeOwnerProposal(address(core), 0, data); - - vm.expectRevert(KlerosCore.UnsuccessfulCall.selector); - vm.prank(owner); - core.executeOwnerProposal(address(core), 0, data); // It'll fail because the core is not its own owner - - vm.prank(owner); - core.changeOwner(payable(address(core))); - vm.prank(address(core)); - core.executeOwnerProposal(address(core), 0, data); - assertEq(core.owner(), other, "Wrong owner"); - } - - function test_changeOwner() public { - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.changeOwner(payable(other)); - vm.prank(owner); - core.changeOwner(payable(other)); - assertEq(core.owner(), other, "Wrong owner"); - } - - function test_changeGuardian() public { - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.changeGuardian(other); - vm.prank(owner); - core.changeGuardian(other); - assertEq(core.guardian(), other, "Wrong guardian"); - } - - function test_changePinakion() public { - PNK fakePNK = new PNK(); - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.changePinakion(fakePNK); - vm.prank(owner); - core.changePinakion(fakePNK); - assertEq(address(core.pinakion()), address(fakePNK), "Wrong PNK"); - } - - function test_changeJurorProsecutionModule() public { - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.changeJurorProsecutionModule(other); - vm.prank(owner); - core.changeJurorProsecutionModule(other); - assertEq(core.jurorProsecutionModule(), other, "Wrong jurorProsecutionModule"); - } - - function test_changeSortitionModule() public { - SortitionModuleMock fakeSM = new SortitionModuleMock(); - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.changeSortitionModule(fakeSM); - vm.prank(owner); - core.changeSortitionModule(fakeSM); - assertEq(address(core.sortitionModule()), address(fakeSM), "Wrong sortitionModule"); - } - - function test_addNewDisputeKit() public { - DisputeKitSybilResistant newDK = new DisputeKitSybilResistant(); - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.addNewDisputeKit(newDK); - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitCreated(2, newDK); - core.addNewDisputeKit(newDK); - assertEq(address(core.disputeKits(2)), address(newDK), "Wrong address of new DK"); - assertEq(core.getDisputeKitsLength(), 3, "Wrong DK array length"); - } - - function test_createCourt() public { - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - uint256[] memory supportedDK = new uint256[](2); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - supportedDK[1] = 2; // New DK is added below. - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - supportedDK - ); - - vm.expectRevert(KlerosCore.MinStakeLowerThanParentCourt.selector); - vm.prank(owner); - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 800, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - supportedDK - ); - - vm.expectRevert(KlerosCore.UnsupportedDisputeKit.selector); - vm.prank(owner); - uint256[] memory emptySupportedDK = new uint256[](0); - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - emptySupportedDK - ); - - vm.expectRevert(KlerosCore.InvalidForkingCourtAsParent.selector); - vm.prank(owner); - core.createCourt( - FORKING_COURT, - true, // Hidden votes - 2000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - supportedDK - ); - - uint256[] memory badSupportedDK = new uint256[](2); - badSupportedDK[0] = NULL_DISPUTE_KIT; // Include NULL_DK to check that it reverts - badSupportedDK[1] = DISPUTE_KIT_CLASSIC; - vm.expectRevert(KlerosCore.WrongDisputeKitIndex.selector); - vm.prank(owner); - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - badSupportedDK - ); - - badSupportedDK[0] = DISPUTE_KIT_CLASSIC; - badSupportedDK[1] = 2; // Check out of bounds index - vm.expectRevert(KlerosCore.WrongDisputeKitIndex.selector); - vm.prank(owner); - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - badSupportedDK - ); - - // Add new DK to check the requirement for classic DK - DisputeKitSybilResistant newDK = new DisputeKitSybilResistant(); - vm.prank(owner); - core.addNewDisputeKit(newDK); - badSupportedDK = new uint256[](1); - badSupportedDK[0] = 2; // Include only sybil resistant dk - vm.expectRevert(KlerosCore.MustSupportDisputeKitClassic.selector); - vm.prank(owner); - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - badSupportedDK - ); - - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitEnabled(2, DISPUTE_KIT_CLASSIC, true); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitEnabled(2, 2, true); - vm.expectEmit(true, true, true, true); - emit KlerosCore.CourtCreated( - 2, - GENERAL_COURT, - true, - 2000, - 20000, - 0.04 ether, - 50, - [uint256(10), uint256(20), uint256(30), uint256(40)], // Explicitly convert otherwise it throws - supportedDK - ); - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 20000, // alpha - 0.04 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - supportedDK - ); - - _assertCourtParameters(2, GENERAL_COURT, true, 2000, 20000, 0.04 ether, 50, false); - - uint256[] memory children = core.getCourtChildren(2); - assertEq(children.length, 0, "No children"); - _assertTimesPerPeriod(2, [uint256(10), uint256(20), uint256(30), uint256(40)]); - - children = core.getCourtChildren(GENERAL_COURT); // Check that parent updated children - assertEq(children.length, 1, "Wrong children count"); - assertEq(children[0], 2, "Wrong child id"); - - (uint256 K, uint256 nodeLength) = sortitionModule.getSortitionProperties(bytes32(uint256(2))); - assertEq(K, 4, "Wrong tree K of the new court"); - assertEq(nodeLength, 1, "Wrong node length for created tree of the new court"); - } - - function test_changeCourtParameters() public { - // Create a 2nd court to check the minStake requirements - vm.prank(owner); - uint96 newCourtID = 2; - uint256[] memory supportedDK = new uint256[](1); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - core.createCourt( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 20000, // alpha - 0.04 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)], // Times per period - abi.encode(uint256(4)), // Sortition extra data - supportedDK - ); - - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.changeCourtParameters( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)] // Times per period - ); - vm.expectRevert(KlerosCore.MinStakeLowerThanParentCourt.selector); - vm.prank(owner); - // Min stake of a parent became higher than of a child - core.changeCourtParameters( - GENERAL_COURT, - true, // Hidden votes - 3000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)] // Times per period - ); - // Min stake of a child became lower than of a parent - vm.expectRevert(KlerosCore.MinStakeLowerThanParentCourt.selector); - vm.prank(owner); - core.changeCourtParameters( - newCourtID, - true, // Hidden votes - 800, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)] // Times per period - ); - - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit KlerosCore.CourtModified( - GENERAL_COURT, - true, - 2000, - 20000, - 0.04 ether, - 50, - [uint256(10), uint256(20), uint256(30), uint256(40)] // Explicitly convert otherwise it throws - ); - core.changeCourtParameters( - GENERAL_COURT, - true, // Hidden votes - 2000, // min stake - 20000, // alpha - 0.04 ether, // fee for juror - 50, // jurors for jump - [uint256(10), uint256(20), uint256(30), uint256(40)] // Times per period - ); - - _assertCourtParameters(GENERAL_COURT, FORKING_COURT, true, 2000, 20000, 0.04 ether, 50, false); - _assertTimesPerPeriod(GENERAL_COURT, [uint256(10), uint256(20), uint256(30), uint256(40)]); - } - - function test_enableDisputeKits() public { - DisputeKitSybilResistant newDK = new DisputeKitSybilResistant(); - uint256 newDkID = 2; - vm.prank(owner); - core.addNewDisputeKit(newDK); - - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - uint256[] memory supportedDK = new uint256[](1); - supportedDK[0] = newDkID; - core.enableDisputeKits(GENERAL_COURT, supportedDK, true); - - vm.expectRevert(KlerosCore.WrongDisputeKitIndex.selector); - vm.prank(owner); - supportedDK[0] = NULL_DISPUTE_KIT; - core.enableDisputeKits(GENERAL_COURT, supportedDK, true); - - vm.expectRevert(KlerosCore.WrongDisputeKitIndex.selector); - vm.prank(owner); - supportedDK[0] = 3; // Out of bounds - core.enableDisputeKits(GENERAL_COURT, supportedDK, true); - - vm.expectRevert(KlerosCore.CannotDisableClassicDK.selector); - vm.prank(owner); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - core.enableDisputeKits(GENERAL_COURT, supportedDK, false); - - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitEnabled(GENERAL_COURT, newDkID, true); - supportedDK[0] = newDkID; - core.enableDisputeKits(GENERAL_COURT, supportedDK, true); - assertEq(core.isSupported(GENERAL_COURT, newDkID), true, "New DK should be supported by General court"); - - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitEnabled(GENERAL_COURT, newDkID, false); - core.enableDisputeKits(GENERAL_COURT, supportedDK, false); - assertEq(core.isSupported(GENERAL_COURT, newDkID), false, "New DK should be disabled in General court"); - } - - function test_changeAcceptedFeeTokens() public { - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.changeAcceptedFeeTokens(feeToken, true); - - (bool accepted, , ) = core.currencyRates(feeToken); - assertEq(accepted, false, "Token should not be accepted yet"); - - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit IArbitratorV2.AcceptedFeeToken(feeToken, true); - core.changeAcceptedFeeTokens(feeToken, true); - (accepted, , ) = core.currencyRates(feeToken); - assertEq(accepted, true, "Token should be accepted"); - } - - function test_changeCurrencyRates() public { - vm.expectRevert(KlerosCore.OwnerOnly.selector); - vm.prank(other); - core.changeCurrencyRates(feeToken, 100, 200); - - (, uint256 rateInEth, uint256 rateDecimals) = core.currencyRates(feeToken); - assertEq(rateInEth, 0, "rateInEth should be 0"); - assertEq(rateDecimals, 0, "rateDecimals should be 0"); - - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit IArbitratorV2.NewCurrencyRate(feeToken, 100, 200); - core.changeCurrencyRates(feeToken, 100, 200); - - (, rateInEth, rateDecimals) = core.currencyRates(feeToken); - assertEq(rateInEth, 100, "rateInEth is incorrect"); - assertEq(rateDecimals, 200, "rateDecimals is incorrect"); - } - - function test_extraDataToCourtIDMinJurorsDisputeKit() public { - // Standard values - bytes memory extraData = abi.encodePacked(uint256(GENERAL_COURT), DEFAULT_NB_OF_JURORS, DISPUTE_KIT_CLASSIC); - - (uint96 courtID, uint256 minJurors, uint256 disputeKitID) = core.extraDataToCourtIDMinJurorsDisputeKit( - extraData - ); - assertEq(courtID, GENERAL_COURT, "Wrong courtID"); - assertEq(minJurors, DEFAULT_NB_OF_JURORS, "Wrong minJurors"); - assertEq(disputeKitID, DISPUTE_KIT_CLASSIC, "Wrong disputeKitID"); - - // Botched extraData. Values should fall into standard - extraData = "0xfa"; - - (courtID, minJurors, disputeKitID) = core.extraDataToCourtIDMinJurorsDisputeKit(extraData); - assertEq(courtID, GENERAL_COURT, "Wrong courtID"); - assertEq(minJurors, DEFAULT_NB_OF_JURORS, "Wrong minJurors"); - assertEq(disputeKitID, DISPUTE_KIT_CLASSIC, "Wrong disputeKitID"); - - // Custom values. - vm.startPrank(owner); - core.addNewDisputeKit(disputeKit); - core.addNewDisputeKit(disputeKit); - core.addNewDisputeKit(disputeKit); - core.addNewDisputeKit(disputeKit); - core.addNewDisputeKit(disputeKit); - extraData = abi.encodePacked(uint256(50), uint256(41), uint256(6)); - - (courtID, minJurors, disputeKitID) = core.extraDataToCourtIDMinJurorsDisputeKit(extraData); - assertEq(courtID, GENERAL_COURT, "Wrong courtID"); // Value in extra data is out of scope so fall back - assertEq(minJurors, 41, "Wrong minJurors"); - assertEq(disputeKitID, 6, "Wrong disputeKitID"); - } -} diff --git a/contracts/test/foundry/KlerosCore_Initialization.t.sol b/contracts/test/foundry/KlerosCore_Initialization.t.sol deleted file mode 100644 index 7e521063d..000000000 --- a/contracts/test/foundry/KlerosCore_Initialization.t.sol +++ /dev/null @@ -1,182 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {KlerosCore_TestBase} from "./KlerosCore_TestBase.sol"; -import {KlerosCore, IERC721} from "../../src/arbitration/KlerosCore.sol"; -import {KlerosCoreMock} from "../../src/test/KlerosCoreMock.sol"; -import {DisputeKitClassic} from "../../src/arbitration/dispute-kits/DisputeKitClassic.sol"; -import {SortitionModuleMock} from "../../src/test/SortitionModuleMock.sol"; -import {UUPSProxy} from "../../src/proxy/UUPSProxy.sol"; -import {BlockHashRNG} from "../../src/rng/BlockHashRNG.sol"; -import {ISortitionModule} from "../../src/arbitration/interfaces/ISortitionModule.sol"; -import {PNK} from "../../src/token/PNK.sol"; -import "../../src/libraries/Constants.sol"; - -/// @title KlerosCore_InitializationTest -/// @dev Tests for KlerosCore initialization and basic configuration -contract KlerosCore_InitializationTest is KlerosCore_TestBase { - function test_initialize() public { - assertEq(core.owner(), msg.sender, "Wrong owner"); - assertEq(core.guardian(), guardian, "Wrong guardian"); - assertEq(address(core.pinakion()), address(pinakion), "Wrong pinakion address"); - assertEq(core.jurorProsecutionModule(), jurorProsecutionModule, "Wrong jurorProsecutionModule address"); - assertEq(address(core.sortitionModule()), address(sortitionModule), "Wrong sortitionModule address"); - assertEq(core.getDisputeKitsLength(), 2, "Wrong DK array length"); - - _assertCourtParameters(FORKING_COURT, FORKING_COURT, false, 0, 0, 0, 0, false); - _assertCourtParameters(GENERAL_COURT, FORKING_COURT, false, 1000, 10000, 0.03 ether, 511, false); - - uint256[] memory children = core.getCourtChildren(GENERAL_COURT); - assertEq(children.length, 0, "No children"); - _assertTimesPerPeriod(GENERAL_COURT, timesPerPeriod); - - assertEq(address(core.disputeKits(NULL_DISPUTE_KIT)), address(0), "Wrong address NULL_DISPUTE_KIT"); - assertEq( - address(core.disputeKits(DISPUTE_KIT_CLASSIC)), - address(disputeKit), - "Wrong address DISPUTE_KIT_CLASSIC" - ); - assertEq(core.isSupported(FORKING_COURT, NULL_DISPUTE_KIT), false, "Forking court null dk should be false"); - assertEq( - core.isSupported(FORKING_COURT, DISPUTE_KIT_CLASSIC), - false, - "Forking court classic dk should be false" - ); - assertEq(core.isSupported(GENERAL_COURT, NULL_DISPUTE_KIT), false, "General court null dk should be false"); - assertEq(core.isSupported(GENERAL_COURT, DISPUTE_KIT_CLASSIC), true, "General court classic dk should be true"); - assertEq(core.paused(), false, "Wrong paused value"); - assertEq(core.wNative(), address(wNative), "Wrong wNative"); - assertEq(address(core.jurorNft()), address(0), "Wrong jurorNft"); - assertEq(core.arbitrableWhitelistEnabled(), false, "Wrong arbitrableWhitelistEnabled"); - - assertEq(pinakion.name(), "Pinakion", "Wrong token name"); - assertEq(pinakion.symbol(), "PNK", "Wrong token symbol"); - assertEq(pinakion.totalSupply(), 1000000 ether, "Wrong total supply"); - assertEq(pinakion.balanceOf(msg.sender), 999998 ether, "Wrong token balance of owner"); - assertEq(pinakion.balanceOf(staker1), 1 ether, "Wrong token balance of staker1"); - assertEq(pinakion.allowance(staker1, address(core)), 1 ether, "Wrong allowance for staker1"); - assertEq(pinakion.balanceOf(staker2), 1 ether, "Wrong token balance of staker2"); - assertEq(pinakion.allowance(staker2, address(core)), 1 ether, "Wrong allowance for staker2"); - - assertEq(disputeKit.owner(), msg.sender, "Wrong DK owner"); - assertEq(disputeKit.getJumpDisputeKitID(), DISPUTE_KIT_CLASSIC, "Wrong jump DK"); - assertEq(disputeKit.jumpDisputeKitID(), DISPUTE_KIT_CLASSIC, "Wrong jump DK storage var"); - assertEq(address(disputeKit.core()), address(core), "Wrong core in DK"); - - assertEq(sortitionModule.owner(), msg.sender, "Wrong SM owner"); - assertEq(address(sortitionModule.core()), address(core), "Wrong core in SM"); - assertEq(uint256(sortitionModule.phase()), uint256(ISortitionModule.Phase.staking), "Phase should be 0"); - assertEq(sortitionModule.minStakingTime(), 18, "Wrong minStakingTime"); - assertEq(sortitionModule.maxDrawingTime(), 24, "Wrong maxDrawingTime"); - assertEq(sortitionModule.lastPhaseChange(), block.timestamp, "Wrong lastPhaseChange"); - assertEq(sortitionModule.disputesWithoutJurors(), 0, "disputesWithoutJurors should be 0"); - assertEq(address(sortitionModule.rng()), address(rng), "Wrong RNG address"); - assertEq(sortitionModule.randomNumber(), 0, "randomNumber should be 0"); - assertEq(sortitionModule.delayedStakeWriteIndex(), 0, "delayedStakeWriteIndex should be 0"); - assertEq(sortitionModule.delayedStakeReadIndex(), 1, "Wrong delayedStakeReadIndex"); - assertEq(sortitionModule.maxStakePerJuror(), type(uint256).max, "Wrong maxStakePerJuror"); - assertEq(sortitionModule.maxTotalStaked(), type(uint256).max, "Wrong maxTotalStaked"); - assertEq(sortitionModule.totalStaked(), 0, "Wrong totalStaked"); - - (uint256 K, uint256 nodeLength) = sortitionModule.getSortitionProperties(bytes32(uint256(FORKING_COURT))); - assertEq(K, 5, "Wrong tree K FORKING_COURT"); - assertEq(nodeLength, 1, "Wrong node length for created tree FORKING_COURT"); - - (K, nodeLength) = sortitionModule.getSortitionProperties(bytes32(uint256(GENERAL_COURT))); - assertEq(K, 5, "Wrong tree K GENERAL_COURT"); - assertEq(nodeLength, 1, "Wrong node length for created tree GENERAL_COURT"); - } - - function test_initialize_events() public { - KlerosCoreMock coreLogic = new KlerosCoreMock(); - SortitionModuleMock smLogic = new SortitionModuleMock(); - DisputeKitClassic dkLogic = new DisputeKitClassic(); - PNK newPinakion = new PNK(); - - address newOwner = msg.sender; - address newGuardian = vm.addr(1); - address newStaker1 = vm.addr(2); - address newOther = vm.addr(9); - address newJurorProsecutionModule = vm.addr(8); - uint256 newMinStake = 1000; - uint256 newAlpha = 10000; - uint256 newFeeForJuror = 0.03 ether; - uint256 newJurorsForCourtJump = 511; - uint256[4] memory newTimesPerPeriod = [uint256(60), uint256(120), uint256(180), uint256(240)]; - - newPinakion.transfer(msg.sender, totalSupply - 1 ether); - newPinakion.transfer(newStaker1, 1 ether); - - bytes memory newSortitionExtraData = abi.encode(uint256(5)); - uint256 newMinStakingTime = 18; - uint256 newMaxDrawingTime = 24; - bool newHiddenVotes = false; - - uint256 newRngLookahead = 20; - BlockHashRNG newRng = new BlockHashRNG(msg.sender, address(sortitionModule), newRngLookahead); - - UUPSProxy proxyCore = new UUPSProxy(address(coreLogic), ""); - - bytes memory initDataDk = abi.encodeWithSignature( - "initialize(address,address,address,uint256)", - newOwner, - address(proxyCore), - address(wNative), - DISPUTE_KIT_CLASSIC - ); - - UUPSProxy proxyDk = new UUPSProxy(address(dkLogic), initDataDk); - DisputeKitClassic newDisputeKit = DisputeKitClassic(address(proxyDk)); - - bytes memory initDataSm = abi.encodeWithSignature( - "initialize(address,address,uint256,uint256,address,uint256,uint256)", - newOwner, - address(proxyCore), - newMinStakingTime, - newMaxDrawingTime, - newRng, - type(uint256).max, - type(uint256).max - ); - - UUPSProxy proxySm = new UUPSProxy(address(smLogic), initDataSm); - SortitionModuleMock newSortitionModule = SortitionModuleMock(address(proxySm)); - vm.prank(newOwner); - newRng.changeConsumer(address(newSortitionModule)); - - KlerosCoreMock newCore = KlerosCoreMock(address(proxyCore)); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitCreated(DISPUTE_KIT_CLASSIC, newDisputeKit); - vm.expectEmit(true, true, true, true); - - uint256[] memory supportedDK = new uint256[](1); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - emit KlerosCore.CourtCreated( - GENERAL_COURT, - FORKING_COURT, - false, - 1000, - 10000, - 0.03 ether, - 511, - [uint256(60), uint256(120), uint256(180), uint256(240)], // Explicitly convert otherwise it throws - supportedDK - ); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitEnabled(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true); - newCore.initialize( - newOwner, - newGuardian, - newPinakion, - newJurorProsecutionModule, - newDisputeKit, - newHiddenVotes, - [newMinStake, newAlpha, newFeeForJuror, newJurorsForCourtJump], - newTimesPerPeriod, - newSortitionExtraData, - newSortitionModule, - address(wNative), - IERC721(address(0)) - ); - } -} diff --git a/contracts/test/foundry/KlerosCore_RNG.t.sol b/contracts/test/foundry/KlerosCore_RNG.t.sol deleted file mode 100644 index 0afd0ba43..000000000 --- a/contracts/test/foundry/KlerosCore_RNG.t.sol +++ /dev/null @@ -1,121 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {KlerosCore_TestBase} from "./KlerosCore_TestBase.sol"; -import {SortitionModule} from "../../src/arbitration/SortitionModule.sol"; -import {RNGWithFallback, IRNG} from "../../src/rng/RNGWithFallback.sol"; -import {RNGMock} from "../../src/test/RNGMock.sol"; -import "../../src/libraries/Constants.sol"; - -/// @title KlerosCore_RNGTest -/// @dev Tests for KlerosCore random number generation and fallback mechanisms -contract KlerosCore_RNGTest is KlerosCore_TestBase { - function test_RNGFallback() public { - RNGWithFallback rngFallback; - uint256 fallbackTimeout = 100; - RNGMock rngMock = new RNGMock(); - rngFallback = new RNGWithFallback(msg.sender, address(sortitionModule), fallbackTimeout, rngMock); - assertEq(rngFallback.owner(), msg.sender, "Wrong owner"); - assertEq(rngFallback.consumer(), address(sortitionModule), "Wrong sortition module address"); - assertEq(address(rngFallback.rng()), address(rngMock), "Wrong RNG in fallback contract"); - assertEq(rngFallback.fallbackTimeoutSeconds(), fallbackTimeout, "Wrong fallback timeout"); - assertEq(rngFallback.requestTimestamp(), 0, "Request timestamp should be 0"); - - vm.prank(owner); - sortitionModule.changeRandomNumberGenerator(rngFallback); - assertEq(address(sortitionModule.rng()), address(rngFallback), "Wrong RNG address"); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - - sortitionModule.passPhase(); // Generating - assertEq(rngFallback.requestTimestamp(), block.timestamp, "Wrong request timestamp"); - - vm.expectRevert(SortitionModule.RandomNumberNotReady.selector); - sortitionModule.passPhase(); - - vm.warp(block.timestamp + fallbackTimeout + 1); - - // Pass several blocks too to see that correct block.number is still picked up. - vm.roll(block.number + 5); - - vm.expectEmit(true, true, true, true); - emit RNGWithFallback.RNGFallback(); - sortitionModule.passPhase(); // Drawing phase - - assertEq(sortitionModule.randomNumber(), uint256(blockhash(block.number - 1)), "Wrong random number"); - } - - function test_RNGFallback_happyPath() public { - RNGWithFallback rngFallback; - uint256 fallbackTimeout = 100; - RNGMock rngMock = new RNGMock(); - rngFallback = new RNGWithFallback(msg.sender, address(sortitionModule), fallbackTimeout, rngMock); - - vm.prank(owner); - sortitionModule.changeRandomNumberGenerator(rngFallback); - assertEq(address(sortitionModule.rng()), address(rngFallback), "Wrong RNG address"); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - - assertEq(rngFallback.requestTimestamp(), 0, "Request timestamp should be 0"); - - sortitionModule.passPhase(); // Generating - assertEq(rngFallback.requestTimestamp(), block.timestamp, "Wrong request timestamp"); - - rngMock.setRN(123); - - sortitionModule.passPhase(); // Drawing phase - assertEq(sortitionModule.randomNumber(), 123, "Wrong random number"); - } - - function test_RNGFallback_sanityChecks() public { - RNGWithFallback rngFallback; - uint256 fallbackTimeout = 100; - RNGMock rngMock = new RNGMock(); - rngFallback = new RNGWithFallback(msg.sender, address(sortitionModule), fallbackTimeout, rngMock); - - vm.expectRevert(IRNG.ConsumerOnly.selector); - vm.prank(owner); - rngFallback.requestRandomness(); - - vm.expectRevert(IRNG.ConsumerOnly.selector); - vm.prank(owner); - rngFallback.receiveRandomness(); - - vm.expectRevert(IRNG.OwnerOnly.selector); - vm.prank(other); - rngFallback.changeOwner(other); - vm.prank(owner); - rngFallback.changeOwner(other); - assertEq(rngFallback.owner(), other, "Wrong owner"); - - // Change owner back for convenience - vm.prank(other); - rngFallback.changeOwner(owner); - - vm.expectRevert(IRNG.OwnerOnly.selector); - vm.prank(other); - rngFallback.changeConsumer(other); - vm.prank(owner); - rngFallback.changeConsumer(other); - assertEq(rngFallback.consumer(), other, "Wrong consumer"); - - vm.expectRevert(IRNG.OwnerOnly.selector); - vm.prank(other); - rngFallback.changeFallbackTimeout(5); - - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit RNGWithFallback.FallbackTimeoutChanged(5); - rngFallback.changeFallbackTimeout(5); - assertEq(rngFallback.fallbackTimeoutSeconds(), 5, "Wrong fallback timeout"); - } -} diff --git a/contracts/test/foundry/KlerosCore_Staking.t.sol b/contracts/test/foundry/KlerosCore_Staking.t.sol deleted file mode 100644 index 070a38716..000000000 --- a/contracts/test/foundry/KlerosCore_Staking.t.sol +++ /dev/null @@ -1,450 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {KlerosCore_TestBase} from "./KlerosCore_TestBase.sol"; -import {KlerosCore} from "../../src/arbitration/KlerosCore.sol"; -import {SortitionModule} from "../../src/arbitration/SortitionModule.sol"; -import {ISortitionModule} from "../../src/arbitration/interfaces/ISortitionModule.sol"; -import {IKlerosCore, KlerosCoreSnapshotProxy} from "../../src/arbitration/view/KlerosCoreSnapshotProxy.sol"; -import "../../src/libraries/Constants.sol"; - -/// @title KlerosCore_StakingTest -/// @dev Tests for KlerosCore staking mechanics and stake management -contract KlerosCore_StakingTest is KlerosCore_TestBase { - function test_setStake_increase() public { - vm.prank(owner); - core.pause(); - vm.expectRevert(KlerosCore.WhenNotPausedOnly.selector); - vm.prank(staker1); - core.setStake(GENERAL_COURT, 1000); - vm.prank(owner); - core.unpause(); - - vm.expectRevert(KlerosCore.StakingNotPossibleInThisCourt.selector); - vm.prank(staker1); - core.setStake(FORKING_COURT, 1000); - - uint96 badCourtID = 2; - vm.expectRevert(KlerosCore.StakingNotPossibleInThisCourt.selector); - vm.prank(staker1); - core.setStake(badCourtID, 1000); - - vm.expectRevert(KlerosCore.StakingLessThanCourtMinStake.selector); - vm.prank(staker1); - core.setStake(GENERAL_COURT, 800); - - vm.expectRevert(KlerosCore.StakingZeroWhenNoStake.selector); - vm.prank(staker1); - core.setStake(GENERAL_COURT, 0); - - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeSet(staker1, GENERAL_COURT, 1001, 1001); - core.setStake(GENERAL_COURT, 1001); - - (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts) = sortitionModule - .getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 1001, "Wrong amount total staked"); - assertEq(totalLocked, 0, "Wrong amount locked"); - assertEq(stakedInCourt, 1001, "Wrong amount staked in court"); - assertEq(nbCourts, 1, "Wrong number of courts"); - - uint96[] memory courts = sortitionModule.getJurorCourtIDs(staker1); - assertEq(courts.length, 1, "Wrong courts count"); - assertEq(courts[0], GENERAL_COURT, "Wrong court id"); - assertEq(sortitionModule.isJurorStaked(staker1), true, "Juror should be staked"); - - assertEq(pinakion.balanceOf(address(core)), 1001, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999998999, "Wrong token balance of staker1"); // 1 eth - 1001 wei - assertEq(pinakion.allowance(staker1, address(core)), 999999999999998999, "Wrong allowance for staker1"); - - vm.expectRevert(KlerosCore.StakingTransferFailed.selector); // This error will be caught because owner didn't approve any tokens for KlerosCore - vm.prank(owner); - core.setStake(GENERAL_COURT, 1000); - - // Increase stake one more time to verify the correct behavior - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeSet(staker1, GENERAL_COURT, 2000, 2000); - core.setStake(GENERAL_COURT, 2000); - - (totalStaked, totalLocked, stakedInCourt, nbCourts) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 2000, "Wrong amount total staked"); - assertEq(totalLocked, 0, "Wrong amount locked"); - assertEq(stakedInCourt, 2000, "Wrong amount staked in court"); - assertEq(nbCourts, 1, "Number of courts should not increase"); - - assertEq(pinakion.balanceOf(address(core)), 2000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999998000, "Wrong token balance of staker1"); // 1 eth - 2000 wei - assertEq(pinakion.allowance(staker1, address(core)), 999999999999998000, "Wrong allowance for staker1"); - } - - function test_setStake_decrease() public { - vm.prank(staker1); - core.setStake(GENERAL_COURT, 2000); - assertEq(pinakion.balanceOf(address(core)), 2000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999998000, "Wrong token balance of staker1"); - assertEq(pinakion.allowance(staker1, address(core)), 999999999999998000, "Wrong allowance for staker1"); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 1500); // Decrease the stake to see if it's reflected correctly - (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts) = sortitionModule - .getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 1500, "Wrong amount total staked"); - assertEq(totalLocked, 0, "Wrong amount locked"); - assertEq(stakedInCourt, 1500, "Wrong amount staked in court"); - assertEq(nbCourts, 1, "Wrong number of courts"); - - uint96[] memory courts = sortitionModule.getJurorCourtIDs(staker1); - assertEq(courts.length, 1, "Wrong courts count"); - assertEq(courts[0], GENERAL_COURT, "Wrong court id"); - assertEq(sortitionModule.isJurorStaked(staker1), true, "Juror should be staked"); - - assertEq(pinakion.balanceOf(address(core)), 1500, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999998500, "Wrong token balance of staker1"); - assertEq( - pinakion.allowance(staker1, address(core)), - 999999999999998000, - "Allowance should not change during withdrawal" - ); - - vm.prank(address(core)); - pinakion.transfer(staker1, 1); // Manually send 1 token to make the withdrawal fail - - vm.expectRevert(KlerosCore.UnstakingTransferFailed.selector); - vm.prank(staker1); - core.setStake(GENERAL_COURT, 0); - - vm.prank(address(staker1)); - pinakion.transfer(address(core), 1); // Manually give the token back - vm.prank(staker1); - core.setStake(GENERAL_COURT, 0); - - (totalStaked, totalLocked, stakedInCourt, nbCourts) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 0, "Wrong amount total staked"); - assertEq(totalLocked, 0, "Wrong amount locked"); - assertEq(stakedInCourt, 0, "Wrong amount staked in court"); - assertEq(nbCourts, 0, "Wrong number of courts"); - - courts = sortitionModule.getJurorCourtIDs(staker1); - assertEq(courts.length, 0, "Wrong courts count"); - assertEq(sortitionModule.isJurorStaked(staker1), false, "Juror should not be staked"); - - assertEq(pinakion.balanceOf(address(core)), 0, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 1 ether, "Wrong token balance of staker1"); - assertEq( - pinakion.allowance(staker1, address(core)), - 999999999999998000, - "Allowance should not change during withdrawal" - ); - } - - function test_setStake_maxStakePathCheck() public { - uint256[] memory supportedDK = new uint256[](1); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - - // Create 4 courts to check the require - for (uint96 i = GENERAL_COURT; i <= 4; i++) { - vm.prank(owner); - core.createCourt( - GENERAL_COURT, - true, - 2000, - 20000, - 0.04 ether, - 50, - [uint256(10), uint256(20), uint256(30), uint256(40)], - abi.encode(uint256(4)), - supportedDK - ); - vm.prank(staker1); - core.setStake(i, 2000); - } - - uint96[] memory courts = sortitionModule.getJurorCourtIDs(staker1); - assertEq(courts.length, 4, "Wrong courts count"); - - uint96 excessiveCourtID = 5; - vm.expectRevert(KlerosCore.StakingInTooManyCourts.selector); - vm.prank(staker1); - core.setStake(excessiveCourtID, 2000); - } - - function test_setStake_increaseDrawingPhase() public { - // Set the stake and create a dispute to advance the phase - vm.prank(staker1); - core.setStake(GENERAL_COURT, 1000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - assertEq(sortitionModule.disputesWithoutJurors(), 1, "Wrong disputesWithoutJurors count"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - assertEq(pinakion.balanceOf(address(core)), 1000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999999000, "Wrong token balance of staker1"); - assertEq(uint256(sortitionModule.phase()), uint256(ISortitionModule.Phase.drawing), "Wrong phase"); - - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeDelayed(staker1, GENERAL_COURT, 1500); - core.setStake(GENERAL_COURT, 1500); - - uint256 delayedStakeId = sortitionModule.delayedStakeWriteIndex(); - assertEq(delayedStakeId, 1, "Wrong delayedStakeWriteIndex"); - assertEq(sortitionModule.delayedStakeReadIndex(), 1, "Wrong delayedStakeReadIndex"); - (address account, uint96 courtID, uint256 stake, bool alreadyTransferred) = sortitionModule.delayedStakes( - delayedStakeId - ); - assertEq(account, staker1, "Wrong staker account"); - assertEq(courtID, GENERAL_COURT, "Wrong court id"); - assertEq(stake, 1500, "Wrong amount staked in court"); - assertEq(alreadyTransferred, false, "Should be flagged as transferred"); - - (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts) = sortitionModule - .getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 1000, "Wrong amount total staked"); - assertEq(totalLocked, 0, "Wrong amount locked"); - assertEq(stakedInCourt, 1000, "Amount staked in court should not change until delayed stake is executed"); - assertEq(nbCourts, 1, "Wrong number of courts"); - - uint96[] memory courts = sortitionModule.getJurorCourtIDs(staker1); - assertEq(courts.length, 1, "Wrong courts count"); - assertEq(courts[0], GENERAL_COURT, "Wrong court id"); - assertEq(sortitionModule.isJurorStaked(staker1), true, "Juror should be staked"); - - assertEq(pinakion.balanceOf(address(core)), 1000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999999000, "Wrong token balance of staker1"); - } - - function test_setStake_decreaseDrawingPhase() public { - // Set the stake and create a dispute to advance the phase - vm.prank(staker1); - core.setStake(GENERAL_COURT, 2000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - assertEq(pinakion.balanceOf(address(core)), 2000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999998000, "Wrong token balance of staker1"); - - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeDelayed(staker1, GENERAL_COURT, 1800); - core.setStake(GENERAL_COURT, 1800); - - (uint256 totalStaked, , uint256 stakedInCourt, ) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 2000, "Total staked amount should not change"); - assertEq(stakedInCourt, 2000, "Amount staked in court should not change"); - - assertEq(pinakion.balanceOf(address(core)), 2000, "Token balance of the core should not change"); - assertEq(pinakion.balanceOf(staker1), 999999999999998000, "Wrong token balance of staker1"); - } - - function test_setStake_LockedTokens() public { - // Check that correct amount is taken when locked tokens amount exceeds the staked amount - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - uint256 disputeID = 0; - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts) = sortitionModule - .getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 10000, "Wrong amount total staked"); - assertEq(totalLocked, 3000, "Wrong amount locked"); // 1000 per draw and the juror was drawn 3 times - assertEq(stakedInCourt, 10000, "Wrong amount staked in court"); - - sortitionModule.passPhase(); // Staking - - assertEq(pinakion.balanceOf(address(core)), 10000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999990000, "Wrong token balance of staker1"); - - // Unstake to check that locked tokens won't be withdrawn - vm.prank(staker1); - core.setStake(GENERAL_COURT, 0); - - (totalStaked, totalLocked, stakedInCourt, nbCourts) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 3000, "Wrong amount total staked"); - assertEq(totalLocked, 3000, "Wrong amount locked"); - assertEq(stakedInCourt, 0, "Wrong amount staked in court"); - assertEq(nbCourts, 0, "Wrong amount staked in court"); - - assertEq(pinakion.balanceOf(address(core)), 3000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 999999999999997000, "Wrong token balance of staker1"); - - // Stake again to check the behaviour. - vm.prank(staker1); - core.setStake(GENERAL_COURT, 5000); - - (totalStaked, totalLocked, stakedInCourt, nbCourts) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 8000, "Wrong amount total staked"); // 5000 were added to the previous 3000. - assertEq(totalLocked, 3000, "Wrong amount locked"); - assertEq(stakedInCourt, 5000, "Wrong amount staked in court"); - assertEq(nbCourts, 1, "Wrong amount staked in court"); - - assertEq(pinakion.balanceOf(address(core)), 8000, "Wrong amount of tokens in Core"); - assertEq(pinakion.balanceOf(staker1), 999999999999992000, "Wrong token balance of staker1"); - } - - function test_executeDelayedStakes() public { - // Stake as staker2 as well to diversify the execution of delayed stakes - vm.prank(staker2); - core.setStake(GENERAL_COURT, 10000); - - vm.expectRevert(SortitionModule.NoDelayedStakeToExecute.selector); - sortitionModule.executeDelayedStakes(5); - - // Set the stake and create a dispute to advance the phase - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - uint256 disputeID = 0; - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - vm.expectRevert(SortitionModule.NotStakingPhase.selector); - sortitionModule.executeDelayedStakes(5); - - // Create delayed stake - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeDelayed(staker1, GENERAL_COURT, 1500); - core.setStake(GENERAL_COURT, 1500); - - assertEq(pinakion.balanceOf(address(core)), 10000, "Wrong token balance of the core"); // Balance should not increase because the stake was delayed - assertEq(pinakion.balanceOf(staker1), 1 ether, "Wrong token balance of staker1"); - - // Create delayed stake for another staker - vm.prank(staker2); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeDelayed(staker2, GENERAL_COURT, 0); - core.setStake(GENERAL_COURT, 0); - assertEq(pinakion.balanceOf(staker2), 999999999999990000, "Wrong token balance of staker2"); // Balance should not change since wrong phase - - // Create another delayed stake for staker1 on top of it to check the execution - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeDelayed(staker1, GENERAL_COURT, 1800); - core.setStake(GENERAL_COURT, 1800); - - assertEq(sortitionModule.delayedStakeWriteIndex(), 3, "Wrong delayedStakeWriteIndex"); - assertEq(sortitionModule.delayedStakeReadIndex(), 1, "Wrong delayedStakeReadIndex"); - - (address account, uint96 courtID, uint256 stake, bool alreadyTransferred) = sortitionModule.delayedStakes(1); - - // Check each delayed stake - assertEq(account, staker1, "Wrong staker account for the first delayed stake"); - assertEq(courtID, GENERAL_COURT, "Wrong court ID"); - assertEq(stake, 1500, "Wrong staking amount"); - assertEq(alreadyTransferred, false, "Should be false"); - - (account, courtID, stake, alreadyTransferred) = sortitionModule.delayedStakes(2); - assertEq(account, staker2, "Wrong staker2 account"); - assertEq(courtID, GENERAL_COURT, "Wrong court id for staker2"); - assertEq(stake, 0, "Wrong amount for delayed stake of staker2"); - assertEq(alreadyTransferred, false, "Should be false"); - - (account, courtID, stake, alreadyTransferred) = sortitionModule.delayedStakes(3); - assertEq(account, staker1, "Wrong staker1 account"); - assertEq(courtID, GENERAL_COURT, "Wrong court id for staker1"); - assertEq(stake, 1800, "Wrong amount for delayed stake of staker1"); - assertEq(alreadyTransferred, false, "Should be false"); - - // So far the only amount transferred was 10000 by staker2. Staker 1 has two delayed stakes, for 1500 and 1800 pnk. - assertEq(pinakion.balanceOf(address(core)), 10000, "Wrong token balance of the core"); - assertEq(pinakion.balanceOf(staker1), 1 ether, "Wrong token balance of staker1"); - assertEq(pinakion.balanceOf(staker2), 999999999999990000, "Wrong token balance of staker2"); - - (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts) = sortitionModule - .getJurorBalance(staker1, GENERAL_COURT); // Only check the first staker to check how consecutive delayed stakes are handled. - // Balances shouldn't be updated yet. - assertEq(totalStaked, 0, "Wrong amount total staked"); - assertEq(totalLocked, 0, "Wrong amount locked"); - assertEq(stakedInCourt, 0, "Wrong amount staked in court"); - assertEq(nbCourts, 0, "Wrong number of courts"); - - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Staking. Delayed stakes can be executed now - - vm.prank(address(core)); - pinakion.transfer(owner, 10000); // Dispose of the tokens of 2nd staker to make the execution fail for the 2nd delayed stake - assertEq(pinakion.balanceOf(address(core)), 0, "Wrong token balance of the core"); - - // 2 events should be emitted but the 2nd stake supersedes the first one in the end. - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeSet(staker1, GENERAL_COURT, 1500, 1500); - vm.expectEmit(true, true, true, true); - emit SortitionModule.StakeSet(staker1, GENERAL_COURT, 1800, 1800); - sortitionModule.executeDelayedStakes(20); // Deliberately ask for more iterations than needed - - assertEq(sortitionModule.delayedStakeWriteIndex(), 3, "Wrong delayedStakeWriteIndex"); - assertEq(sortitionModule.delayedStakeReadIndex(), 4, "Wrong delayedStakeReadIndex"); - - // Check that delayed stakes are nullified - for (uint i = 2; i <= sortitionModule.delayedStakeWriteIndex(); i++) { - (account, courtID, stake, alreadyTransferred) = sortitionModule.delayedStakes(i); - - assertEq(account, address(0), "Wrong staker account after delayed stake deletion"); - assertEq(courtID, 0, "Court id should be nullified"); - assertEq(stake, 0, "No amount to stake"); - assertEq(alreadyTransferred, false, "Should be false"); - } - - assertEq(pinakion.balanceOf(staker1), 999999999999998200, "Wrong token balance of staker1"); - - (totalStaked, totalLocked, stakedInCourt, nbCourts) = sortitionModule.getJurorBalance(staker1, GENERAL_COURT); - assertEq(totalStaked, 1800, "Wrong amount total staked"); - assertEq(totalLocked, 0, "Wrong amount locked"); - assertEq(stakedInCourt, 1800, "Wrong amount staked in court"); - assertEq(nbCourts, 1, "Wrong amount staked in court"); - - // Staker2 not getting the tokens back indicates that his delayed stake was skipped and the flow wasn't disrupted - assertEq(pinakion.balanceOf(staker2), 999999999999990000, "Wrong token balance of staker2"); - } - - function test_setStakeBySortitionModule() public { - // Note that functionality of this function was checked during delayed stakes execution - vm.expectRevert(KlerosCore.SortitionModuleOnly.selector); - vm.prank(owner); - core.setStakeBySortitionModule(staker1, GENERAL_COURT, 1000); - } - - function test_setStake_snapshotProxyCheck() public { - vm.prank(staker1); - core.setStake(GENERAL_COURT, 12346); - - KlerosCoreSnapshotProxy snapshotProxy = new KlerosCoreSnapshotProxy(owner, IKlerosCore(address(core))); - assertEq(snapshotProxy.name(), "Staked Pinakion", "Wrong name of the proxy token"); - assertEq(snapshotProxy.symbol(), "stPNK", "Wrong symbol of the proxy token"); - assertEq(snapshotProxy.decimals(), 18, "Wrong decimals of the proxy token"); - assertEq(snapshotProxy.owner(), msg.sender, "Wrong owner"); - assertEq(address(snapshotProxy.core()), address(core), "Wrong core in snapshot proxy"); - assertEq(snapshotProxy.balanceOf(staker1), 12346, "Wrong stPNK balance"); - - vm.prank(other); - vm.expectRevert(KlerosCoreSnapshotProxy.OwnerOnly.selector); - snapshotProxy.changeCore(IKlerosCore(other)); - vm.prank(owner); - snapshotProxy.changeCore(IKlerosCore(other)); - assertEq(address(snapshotProxy.core()), other, "Wrong core in snapshot proxy after change"); - - vm.prank(other); - vm.expectRevert(KlerosCoreSnapshotProxy.OwnerOnly.selector); - snapshotProxy.changeOwner(other); - vm.prank(owner); - snapshotProxy.changeOwner(other); - assertEq(snapshotProxy.owner(), other, "Wrong owner after change"); - } -} diff --git a/contracts/test/foundry/KlerosCore_TestBase.sol b/contracts/test/foundry/KlerosCore_TestBase.sol deleted file mode 100644 index 9418f2444..000000000 --- a/contracts/test/foundry/KlerosCore_TestBase.sol +++ /dev/null @@ -1,255 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {Test} from "forge-std/Test.sol"; -import {console} from "forge-std/console.sol"; // Import the console for logging -import {KlerosCoreMock, KlerosCore, IERC721} from "../../src/test/KlerosCoreMock.sol"; -import {IArbitratorV2} from "../../src/arbitration/KlerosCore.sol"; -import {IDisputeKit} from "../../src/arbitration/interfaces/IDisputeKit.sol"; -import {DisputeKitClassic, DisputeKitClassicBase} from "../../src/arbitration/dispute-kits/DisputeKitClassic.sol"; -import {DisputeKitSybilResistant} from "../../src/arbitration/dispute-kits/DisputeKitSybilResistant.sol"; -import {ISortitionModule} from "../../src/arbitration/interfaces/ISortitionModule.sol"; -import {SortitionModuleMock, SortitionModule} from "../../src/test/SortitionModuleMock.sol"; -import {UUPSProxy} from "../../src/proxy/UUPSProxy.sol"; -import {BlockHashRNG} from "../../src/rng/BlockHashRNG.sol"; -import {RNGWithFallback, IRNG} from "../../src/rng/RNGWithFallback.sol"; -import {RNGMock} from "../../src/test/RNGMock.sol"; -import {PNK} from "../../src/token/PNK.sol"; -import {TestERC20} from "../../src/token/TestERC20.sol"; -import {ArbitrableExample, IArbitrableV2} from "../../src/arbitration/arbitrables/ArbitrableExample.sol"; -import {DisputeTemplateRegistry} from "../../src/arbitration/DisputeTemplateRegistry.sol"; -import "../../src/libraries/Constants.sol"; -import {IKlerosCore, KlerosCoreSnapshotProxy} from "../../src/arbitration/view/KlerosCoreSnapshotProxy.sol"; - -/// @title KlerosCore_TestBase -/// @dev Abstract base contract for KlerosCore tests containing shared setup and utilities -abstract contract KlerosCore_TestBase is Test { - event Initialized(uint64 version); - - // ************************************* // - // * Test Contracts * // - // ************************************* // - - KlerosCoreMock core; - DisputeKitClassic disputeKit; - SortitionModuleMock sortitionModule; - BlockHashRNG rng; - PNK pinakion; - TestERC20 feeToken; - TestERC20 wNative; - ArbitrableExample arbitrable; - DisputeTemplateRegistry registry; - - // ************************************* // - // * Test Accounts * // - // ************************************* // - - address owner; - address guardian; - address staker1; - address staker2; - address disputer; - address crowdfunder1; - address crowdfunder2; - address other; - address jurorProsecutionModule; - - // ************************************* // - // * Test Parameters * // - // ************************************* // - - uint256 minStake; - uint256 alpha; - uint256 feeForJuror; - uint256 jurorsForCourtJump; - bytes sortitionExtraData; - bytes arbitratorExtraData; - uint256[4] timesPerPeriod; - bool hiddenVotes; - uint256 totalSupply = 1000000 ether; - uint256 minStakingTime; - uint256 maxDrawingTime; - uint256 rngLookahead; // Time in seconds - string templateData; - string templateDataMappings; - - function setUp() public virtual { - KlerosCoreMock coreLogic = new KlerosCoreMock(); - SortitionModuleMock smLogic = new SortitionModuleMock(); - DisputeKitClassic dkLogic = new DisputeKitClassic(); - DisputeTemplateRegistry registryLogic = new DisputeTemplateRegistry(); - pinakion = new PNK(); - feeToken = new TestERC20("Test", "TST"); - wNative = new TestERC20("wrapped ETH", "wETH"); - - owner = msg.sender; - guardian = vm.addr(1); - staker1 = vm.addr(2); - staker2 = vm.addr(3); - disputer = vm.addr(4); - crowdfunder1 = vm.addr(5); - crowdfunder2 = vm.addr(6); - vm.deal(disputer, 10 ether); - vm.deal(crowdfunder1, 10 ether); - vm.deal(crowdfunder2, 10 ether); - jurorProsecutionModule = vm.addr(8); - other = vm.addr(9); - minStake = 1000; - alpha = 10000; - feeForJuror = 0.03 ether; - jurorsForCourtJump = 511; - timesPerPeriod = [60, 120, 180, 240]; - - pinakion.transfer(msg.sender, totalSupply - 2 ether); - pinakion.transfer(staker1, 1 ether); - pinakion.transfer(staker2, 1 ether); - - sortitionExtraData = abi.encode(uint256(5)); - minStakingTime = 18; - maxDrawingTime = 24; - hiddenVotes = false; - - rngLookahead = 30; - rng = new BlockHashRNG(msg.sender, address(sortitionModule), rngLookahead); - - UUPSProxy proxyCore = new UUPSProxy(address(coreLogic), ""); - - bytes memory initDataDk = abi.encodeWithSignature( - "initialize(address,address,address,uint256)", - owner, - address(proxyCore), - address(wNative), - DISPUTE_KIT_CLASSIC - ); - - UUPSProxy proxyDk = new UUPSProxy(address(dkLogic), initDataDk); - disputeKit = DisputeKitClassic(address(proxyDk)); - - bytes memory initDataSm = abi.encodeWithSignature( - "initialize(address,address,uint256,uint256,address,uint256,uint256)", - owner, - address(proxyCore), - minStakingTime, - maxDrawingTime, - rng, - type(uint256).max, - type(uint256).max - ); - - UUPSProxy proxySm = new UUPSProxy(address(smLogic), initDataSm); - sortitionModule = SortitionModuleMock(address(proxySm)); - vm.prank(owner); - rng.changeConsumer(address(sortitionModule)); - - core = KlerosCoreMock(address(proxyCore)); - core.initialize( - owner, - guardian, - pinakion, - jurorProsecutionModule, - disputeKit, - hiddenVotes, - [minStake, alpha, feeForJuror, jurorsForCourtJump], - timesPerPeriod, - sortitionExtraData, - sortitionModule, - address(wNative), - IERC721(address(0)) - ); - vm.prank(staker1); - pinakion.approve(address(core), 1 ether); - vm.prank(staker2); - pinakion.approve(address(core), 1 ether); - - templateData = "AAA"; - templateDataMappings = "BBB"; - arbitratorExtraData = abi.encodePacked(uint256(GENERAL_COURT), DEFAULT_NB_OF_JURORS, DISPUTE_KIT_CLASSIC); - - bytes memory initDataRegistry = abi.encodeWithSignature("initialize(address)", owner); - UUPSProxy proxyRegistry = new UUPSProxy(address(registryLogic), initDataRegistry); - registry = DisputeTemplateRegistry(address(proxyRegistry)); - - arbitrable = new ArbitrableExample( - core, - templateData, - templateDataMappings, - arbitratorExtraData, - registry, - feeToken - ); - } - - // ************************************* // - // * Helper Functions * // - // ************************************* // - - /// @dev Helper function to create a new dispute kit - function _createNewDisputeKit() internal returns (DisputeKitSybilResistant) { - return new DisputeKitSybilResistant(); - } - - /// @dev Helper function to create a new court with standard parameters - function _createStandardCourt( - uint96 parent, - uint256 minStakeValue, - uint256 alphaValue, - uint256 feeForJurorValue, - uint256 jurorsForJumpValue - ) internal returns (uint96) { - uint256[] memory supportedDK = new uint256[](1); - supportedDK[0] = DISPUTE_KIT_CLASSIC; - - vm.prank(owner); - core.createCourt( - parent, - hiddenVotes, - minStakeValue, - alphaValue, - feeForJurorValue, - jurorsForJumpValue, - timesPerPeriod, - sortitionExtraData, - supportedDK - ); - - return uint96(core.getCourtChildren(parent)[core.getCourtChildren(parent).length - 1]); - } - - /// @dev Helper function to check court parameters - function _assertCourtParameters( - uint96 courtId, - uint96 expectedParent, - bool expectedHiddenVotes, - uint256 expectedMinStake, - uint256 expectedAlpha, - uint256 expectedFeeForJuror, - uint256 expectedJurorsForJump, - bool expectedDisabled - ) internal { - ( - uint96 courtParent, - bool courtHiddenVotes, - uint256 courtMinStake, - uint256 courtAlpha, - uint256 courtFeeForJuror, - uint256 courtJurorsForCourtJump, - bool courtDisabled - ) = core.courts(courtId); - - assertEq(courtParent, expectedParent, "Wrong court parent"); - assertEq(courtHiddenVotes, expectedHiddenVotes, "Wrong hiddenVotes value"); - assertEq(courtMinStake, expectedMinStake, "Wrong minStake value"); - assertEq(courtAlpha, expectedAlpha, "Wrong alpha value"); - assertEq(courtFeeForJuror, expectedFeeForJuror, "Wrong feeForJuror value"); - assertEq(courtJurorsForCourtJump, expectedJurorsForJump, "Wrong jurorsForCourtJump value"); - assertEq(courtDisabled, expectedDisabled, "Wrong disabled state"); - } - - /// @dev Helper function to check times per period - function _assertTimesPerPeriod(uint96 courtId, uint256[4] memory expectedTimes) internal { - uint256[4] memory courtTimesPerPeriod = core.getTimesPerPeriod(courtId); - for (uint256 i = 0; i < 4; i++) { - assertEq(courtTimesPerPeriod[i], expectedTimes[i], "Wrong times per period"); - } - } -} diff --git a/contracts/test/foundry/KlerosCore_Voting.t.sol b/contracts/test/foundry/KlerosCore_Voting.t.sol deleted file mode 100644 index 504c9c644..000000000 --- a/contracts/test/foundry/KlerosCore_Voting.t.sol +++ /dev/null @@ -1,486 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -import {KlerosCore_TestBase} from "./KlerosCore_TestBase.sol"; -import {KlerosCore} from "../../src/arbitration/KlerosCore.sol"; -import {DisputeKitClassic, DisputeKitClassicBase} from "../../src/arbitration/dispute-kits/DisputeKitClassic.sol"; -import {IDisputeKit} from "../../src/arbitration/interfaces/IDisputeKit.sol"; -import {UUPSProxy} from "../../src/proxy/UUPSProxy.sol"; -import "../../src/libraries/Constants.sol"; - -/// @title KlerosCore_VotingTest -/// @dev Tests for KlerosCore voting system (commit/reveal and direct voting) -contract KlerosCore_VotingTest is KlerosCore_TestBase { - function test_castCommit() public { - // Change hidden votes in general court - uint256 disputeID = 0; - vm.prank(owner); - core.changeCourtParameters( - GENERAL_COURT, - true, // Hidden votes - 1000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 511, // jurors for jump - [uint256(60), uint256(120), uint256(180), uint256(240)] // Times per period - ); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - uint256 YES = 1; - uint256 salt = 123455678; - uint256[] memory voteIDs = new uint256[](1); - voteIDs[0] = 0; - bytes32 commit; - vm.prank(staker1); - vm.expectRevert(DisputeKitClassicBase.NotCommitPeriod.selector); - disputeKit.castCommit(disputeID, voteIDs, commit); - - vm.expectRevert(KlerosCore.EvidenceNotPassedAndNotAppeal.selector); - core.passPeriod(disputeID); - vm.warp(block.timestamp + timesPerPeriod[0]); - - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.commit); - core.passPeriod(disputeID); - - (, , KlerosCore.Period period, , uint256 lastPeriodChange) = core.disputes(disputeID); - - assertEq(uint256(period), uint256(KlerosCore.Period.commit), "Wrong period"); - assertEq(lastPeriodChange, block.timestamp, "Wrong lastPeriodChange"); - - vm.prank(staker1); - vm.expectRevert(DisputeKitClassicBase.EmptyCommit.selector); - disputeKit.castCommit(disputeID, voteIDs, commit); - - commit = keccak256(abi.encodePacked(YES, salt)); - - vm.prank(other); - vm.expectRevert(DisputeKitClassicBase.JurorHasToOwnTheVote.selector); - disputeKit.castCommit(disputeID, voteIDs, commit); - - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.CommitCast(disputeID, staker1, voteIDs, commit); - disputeKit.castCommit(disputeID, voteIDs, commit); - - (, , , uint256 totalCommited, uint256 nbVoters, uint256 choiceCount) = disputeKit.getRoundInfo(disputeID, 0, 0); - assertEq(totalCommited, 1, "totalCommited should be 1"); - assertEq(disputeKit.areCommitsAllCast(disputeID), false, "Commits should not all be cast"); - - (, bytes32 commitStored, , ) = disputeKit.getVoteInfo(0, 0, 0); - assertEq(commitStored, keccak256(abi.encodePacked(YES, salt)), "Incorrect commit"); - - voteIDs = new uint256[](2); // Create the leftover votes subset - voteIDs[0] = 1; - voteIDs[1] = 2; - - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit DisputeKitClassicBase.CommitCast(disputeID, staker1, voteIDs, commit); - disputeKit.castCommit(disputeID, voteIDs, commit); - - (, , , totalCommited, nbVoters, choiceCount) = disputeKit.getRoundInfo(disputeID, 0, 0); - assertEq(totalCommited, DEFAULT_NB_OF_JURORS, "totalCommited should be 3"); - assertEq(disputeKit.areCommitsAllCast(disputeID), true, "Commits should all be cast"); - - for (uint256 i = 1; i < DEFAULT_NB_OF_JURORS; i++) { - (, commitStored, , ) = disputeKit.getVoteInfo(0, 0, i); - assertEq(commitStored, keccak256(abi.encodePacked(YES, salt)), "Incorrect commit"); - } - - // Check reveal in the next period - vm.warp(block.timestamp + timesPerPeriod[1]); - core.passPeriod(disputeID); - - // Check the require with the wrong choice and then with the wrong salt - vm.prank(staker1); - vm.expectRevert(DisputeKitClassicBase.HashDoesNotMatchHiddenVoteCommitment.selector); - disputeKit.castVote(disputeID, voteIDs, 2, salt, "XYZ"); - - vm.prank(staker1); - vm.expectRevert(DisputeKitClassicBase.HashDoesNotMatchHiddenVoteCommitment.selector); - disputeKit.castVote(disputeID, voteIDs, YES, salt - 1, "XYZ"); - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, YES, salt, "XYZ"); - - for (uint256 i = 1; i < DEFAULT_NB_OF_JURORS; i++) { - // 0 voteID was skipped when casting a vote - (address account, , uint256 choice, bool voted) = disputeKit.getVoteInfo(0, 0, i); - assertEq(account, staker1, "Wrong drawn account"); - assertEq(choice, YES, "Wrong choice"); - assertEq(voted, true, "Voted should be true"); - } - } - - function test_castCommit_timeoutCheck() public { - // Change hidden votes in general court - uint256 disputeID = 0; - vm.prank(owner); - core.changeCourtParameters( - GENERAL_COURT, - true, // Hidden votes - 1000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 511, // jurors for jump - [uint256(60), uint256(120), uint256(180), uint256(240)] // Times per period - ); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Commit - - vm.expectRevert(KlerosCore.CommitPeriodNotPassed.selector); - core.passPeriod(disputeID); - - vm.warp(block.timestamp + timesPerPeriod[1]); - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.vote); - core.passPeriod(disputeID); - } - - function test_castVote() public { - uint256 disputeID = 0; - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - core.draw(disputeID, DEFAULT_NB_OF_JURORS - 1); // Draw less to check the require later - vm.warp(block.timestamp + timesPerPeriod[0]); - - uint256[] memory voteIDs = new uint256[](0); - vm.prank(staker1); - vm.expectRevert(DisputeKitClassicBase.NotVotePeriod.selector); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); // Leave salt empty as not needed - - vm.expectRevert(KlerosCore.DisputeStillDrawing.selector); - core.passPeriod(disputeID); - - core.draw(disputeID, 1); // Draw the last juror - - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.vote); - core.passPeriod(disputeID); // Vote - - (, , KlerosCore.Period period, , uint256 lastPeriodChange) = core.disputes(disputeID); - - assertEq(uint256(period), uint256(KlerosCore.Period.vote), "Wrong period"); - assertEq(lastPeriodChange, block.timestamp, "Wrong lastPeriodChange"); - - vm.prank(staker1); - vm.expectRevert(DisputeKitClassicBase.EmptyVoteIDs.selector); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - voteIDs = new uint256[](1); - voteIDs[0] = 0; // Split vote IDs to see how the winner changes - vm.prank(staker1); - vm.expectRevert(DisputeKitClassicBase.ChoiceOutOfBounds.selector); - disputeKit.castVote(disputeID, voteIDs, 2 + 1, 0, "XYZ"); - - vm.prank(other); - vm.expectRevert(DisputeKitClassicBase.JurorHasToOwnTheVote.selector); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit IDisputeKit.VoteCast(disputeID, staker1, voteIDs, 2, "XYZ"); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - vm.prank(staker1); - vm.expectRevert(DisputeKitClassicBase.VoteAlreadyCast.selector); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - ( - uint256 winningChoice, - bool tied, - uint256 totalVoted, - uint256 totalCommited, - , - uint256 choiceCount - ) = disputeKit.getRoundInfo(disputeID, 0, 2); - assertEq(winningChoice, 2, "Wrong winning choice"); - assertEq(tied, false, "tied should be false"); - assertEq(totalVoted, 1, "totalVoted should be 1"); - assertEq(totalCommited, 0, "totalCommited should be 0"); - assertEq(choiceCount, 1, "choiceCount should be 1"); - - (address account, bytes32 commit, uint256 choice, bool voted) = disputeKit.getVoteInfo(0, 0, 0); // Dispute - Round - VoteID - assertEq(account, staker1, "Wrong drawn account"); - assertEq(commit, bytes32(0), "Commit should be empty"); - assertEq(choice, 2, "Choice should be 2"); - assertEq(voted, true, "Voted should be true"); - - assertEq(disputeKit.isVoteActive(0, 0, 0), true, "Vote should be active"); // Dispute - Round - VoteID - - voteIDs = new uint256[](1); - voteIDs[0] = 1; // Cast another vote to check the tie. - - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit IDisputeKit.VoteCast(disputeID, staker1, voteIDs, 1, "XYZZ"); - disputeKit.castVote(disputeID, voteIDs, 1, 0, "XYZZ"); - - (, tied, totalVoted, , , choiceCount) = disputeKit.getRoundInfo(disputeID, 0, 1); - assertEq(tied, true, "tied should be true"); - assertEq(totalVoted, 2, "totalVoted should be 2"); - assertEq(choiceCount, 1, "choiceCount should be 1 for first choice"); - - vm.expectRevert(KlerosCore.VotePeriodNotPassed.selector); - core.passPeriod(disputeID); - - voteIDs = new uint256[](1); - voteIDs[0] = 2; // Cast another vote to declare a new winner. - - vm.prank(staker1); - vm.expectEmit(true, true, true, true); - emit IDisputeKit.VoteCast(disputeID, staker1, voteIDs, 1, "XYZZ"); - disputeKit.castVote(disputeID, voteIDs, 1, 0, "XYZZ"); - - (winningChoice, tied, totalVoted, , , choiceCount) = disputeKit.getRoundInfo(disputeID, 0, 1); - assertEq(winningChoice, 1, "Wrong winning choice"); - assertEq(tied, false, "tied should be false"); - assertEq(totalVoted, 3, "totalVoted should be 3"); - assertEq(choiceCount, 2, "choiceCount should be 2 for first choice"); - assertEq(disputeKit.areVotesAllCast(disputeID), true, "Votes should all be cast"); - } - - function test_castVote_timeoutCheck() public { - // Change hidden votes in general court - uint256 disputeID = 0; - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Votes - - vm.expectRevert(KlerosCore.VotePeriodNotPassed.selector); - core.passPeriod(disputeID); - - vm.warp(block.timestamp + timesPerPeriod[2]); - vm.expectEmit(true, true, true, true); - emit KlerosCore.AppealPossible(disputeID, arbitrable); - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.appeal); - core.passPeriod(disputeID); - } - - function test_castVote_rulingCheck() public { - // Change hidden votes in general court - uint256 disputeID = 0; - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Votes - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, 1, 0, "XYZZ"); - - (uint256 ruling, bool tied, bool overridden) = disputeKit.currentRuling(disputeID); - assertEq(ruling, 1, "Wrong ruling"); - assertEq(tied, false, "Not tied"); - assertEq(overridden, false, "Not overridden"); - } - - function test_castVote_quickPassPeriod() public { - // Change hidden votes in general court - uint256 disputeID = 0; - vm.prank(owner); - core.changeCourtParameters( - GENERAL_COURT, - true, // Hidden votes - 1000, // min stake - 10000, // alpha - 0.03 ether, // fee for juror - 511, // jurors for jump - [uint256(60), uint256(120), uint256(180), uint256(240)] // Times per period - ); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 10000); - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - - uint256 YES = 1; - uint256 salt = 123455678; - uint256[] memory voteIDs = new uint256[](1); - voteIDs[0] = 0; - bytes32 commit; - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); - - commit = keccak256(abi.encodePacked(YES, salt)); - - vm.prank(staker1); - disputeKit.castCommit(disputeID, voteIDs, commit); - - (, , , uint256 totalCommited, uint256 nbVoters, uint256 choiceCount) = disputeKit.getRoundInfo(disputeID, 0, 0); - assertEq(totalCommited, 1, "totalCommited should be 1"); - assertEq(disputeKit.areCommitsAllCast(disputeID), false, "Commits should not all be cast"); - - vm.warp(block.timestamp + timesPerPeriod[1]); - core.passPeriod(disputeID); - - vm.prank(staker1); - disputeKit.castVote(disputeID, voteIDs, YES, salt, "XYZ"); - - (, , uint256 totalVoted, , , ) = disputeKit.getRoundInfo(disputeID, 0, 0); - assertEq(totalVoted, 1, "totalVoted should be 1"); - assertEq(disputeKit.areVotesAllCast(disputeID), true, "Every committed vote was cast"); - - // Should pass period by counting only committed votes. - vm.expectEmit(true, true, true, true); - emit KlerosCore.NewPeriod(disputeID, KlerosCore.Period.appeal); - core.passPeriod(disputeID); - } - - function test_castVote_differentDK() public { - DisputeKitClassic dkLogic = new DisputeKitClassic(); - // Create a new DK to check castVote. - bytes memory initDataDk = abi.encodeWithSignature( - "initialize(address,address,address,uint256)", - owner, - address(core), - address(wNative), - DISPUTE_KIT_CLASSIC - ); - - UUPSProxy proxyDk = new UUPSProxy(address(dkLogic), initDataDk); - DisputeKitClassic newDisputeKit = DisputeKitClassic(address(proxyDk)); - - vm.prank(owner); - core.addNewDisputeKit(newDisputeKit); - - uint256 newDkID = 2; - uint256[] memory supportedDK = new uint256[](1); - bytes memory newExtraData = abi.encodePacked(uint256(GENERAL_COURT), DEFAULT_NB_OF_JURORS, newDkID); - - vm.prank(owner); - vm.expectEmit(true, true, true, true); - emit KlerosCore.DisputeKitEnabled(GENERAL_COURT, newDkID, true); - supportedDK[0] = newDkID; - core.enableDisputeKits(GENERAL_COURT, supportedDK, true); - assertEq(core.isSupported(GENERAL_COURT, newDkID), true, "New DK should be supported by General court"); - - vm.prank(staker1); - core.setStake(GENERAL_COURT, 20000); - - // Create one dispute for the old DK and two disputes for the new DK. - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - - arbitrable.changeArbitratorExtraData(newExtraData); - - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - - vm.prank(disputer); - arbitrable.createDispute{value: feeForJuror * DEFAULT_NB_OF_JURORS}("Action"); - - uint256 disputeID = 2; // Use the latest dispute for reference. This is the ID in the core contract - - vm.warp(block.timestamp + minStakingTime); - sortitionModule.passPhase(); // Generating - vm.warp(block.timestamp + rngLookahead); - sortitionModule.passPhase(); // Drawing phase - - KlerosCore.Round memory round = core.getRoundInfo(disputeID, 0); - assertEq(round.disputeKitID, newDkID, "Wrong DK ID"); - - core.draw(disputeID, DEFAULT_NB_OF_JURORS); - // Draw jurors for the old DK as well to prepare round.votes array - core.draw(0, DEFAULT_NB_OF_JURORS); - - vm.warp(block.timestamp + timesPerPeriod[0]); - core.passPeriod(disputeID); // Vote - - // Check that the new DK has the info but not the old one. - - assertEq(disputeKit.coreDisputeIDToActive(disputeID), false, "Should be false for old DK"); - - // This is the DK where dispute was created. Core dispute points to index 1 because new DK has two disputes. - assertEq(newDisputeKit.coreDisputeIDToLocal(disputeID), 1, "Wrong local dispute ID for new DK"); - assertEq(newDisputeKit.coreDisputeIDToActive(disputeID), true, "Should be active for new DK"); - (uint256 numberOfChoices, , bytes memory extraData) = newDisputeKit.disputes(1); - assertEq(numberOfChoices, 2, "Wrong numberOfChoices in new DK"); - assertEq(extraData, newExtraData, "Wrong extra data"); - - uint256[] memory voteIDs = new uint256[](3); - voteIDs[0] = 0; - voteIDs[1] = 1; - voteIDs[2] = 2; - - // Deliberately cast votes using the old DK to see if the exception will be caught. - vm.prank(staker1); - vm.expectRevert(DisputeKitClassicBase.NotActiveForCoreDisputeID.selector); - disputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - // And check the new DK. - vm.prank(staker1); - newDisputeKit.castVote(disputeID, voteIDs, 2, 0, "XYZ"); - - ( - uint256 winningChoice, - bool tied, - uint256 totalVoted, - uint256 totalCommited, - , - uint256 choiceCount - ) = newDisputeKit.getRoundInfo(disputeID, 0, 2); - assertEq(winningChoice, 2, "Wrong winning choice"); - assertEq(tied, false, "tied should be false"); - assertEq(totalVoted, 3, "totalVoted should be 3"); - assertEq(totalCommited, 0, "totalCommited should be 0"); - assertEq(choiceCount, 3, "choiceCount should be 3"); - } -} diff --git a/contracts/test/integration/getContractsEthers.test.ts b/contracts/test/integration/getContractsEthers.test.ts deleted file mode 100644 index 8bd2b9cf5..000000000 --- a/contracts/test/integration/getContractsEthers.test.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { expect } from "chai"; -import { ethers } from "ethers"; -import { arbitrum, arbitrumSepolia } from "viem/chains"; -import { getContracts } from "../../deployments/contractsEthers"; -import { - KlerosCore__factory, - KlerosCoreUniversity__factory, - SortitionModule__factory, - SortitionModuleUniversity__factory, - DisputeKitClassic__factory, - DisputeResolver__factory, - DisputeTemplateRegistry__factory, - EvidenceModule__factory, - PolicyRegistry__factory, - TransactionBatcher__factory, - ChainlinkRNG__factory, - RandomizerRNG__factory, - BlockHashRNG__factory, - PNK__factory, - KlerosCoreSnapshotProxy__factory, - DisputeKitShutter__factory, - DisputeKitGated__factory, - DisputeKitGatedShutter__factory, -} from "../../typechain-types"; -import { getActualAddress } from "../utils/getActualAddress"; - -// Network names for deployments -const NETWORKS = { - DEVNET: "arbitrumSepoliaDevnet", - TESTNET: "arbitrumSepolia", - MAINNET: "arbitrum", -} as const; - -type NetworkType = (typeof NETWORKS)[keyof typeof NETWORKS]; - -type ContractMapping = { - [K in keyof Awaited>]: { - name: string; - optional?: boolean; - }; -}; - -const devnetContractMapping: ContractMapping = { - klerosCore: { name: "KlerosCore" }, - sortition: { name: "SortitionModule" }, - disputeKitClassic: { name: "DisputeKitClassic" }, - disputeKitShutter: { name: "DisputeKitShutter" }, - disputeKitGated: { name: "DisputeKitGated" }, - disputeKitGatedShutter: { name: "DisputeKitGatedShutter" }, - disputeResolver: { name: "DisputeResolver" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, - evidence: { name: "EvidenceModule" }, - policyRegistry: { name: "PolicyRegistry" }, - transactionBatcher: { name: "TransactionBatcher" }, - chainlinkRng: { name: "ChainlinkRNG", optional: true }, - randomizerRng: { name: "RandomizerRNG", optional: true }, - blockHashRng: { name: "BlockHashRNG" }, - pnk: { name: "PNK" }, - klerosCoreSnapshotProxy: { name: "KlerosCoreSnapshotProxy" }, -}; - -const testnetContractMapping: ContractMapping = { - klerosCore: { name: "KlerosCore" }, - sortition: { name: "SortitionModule" }, - disputeKitClassic: { name: "DisputeKitClassic" }, - disputeKitShutter: { name: "DisputeKitShutter" }, - disputeKitGated: { name: "DisputeKitGated" }, - disputeKitGatedShutter: { name: "DisputeKitGatedShutter" }, - disputeResolver: { name: "DisputeResolver" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, - evidence: { name: "EvidenceModule" }, - policyRegistry: { name: "PolicyRegistry" }, - transactionBatcher: { name: "TransactionBatcher" }, - chainlinkRng: { name: "ChainlinkRNG", optional: true }, - randomizerRng: { name: "RandomizerRNG", optional: true }, - blockHashRng: { name: "BlockHashRNG" }, - pnk: { name: "PNK" }, - klerosCoreSnapshotProxy: { name: "KlerosCoreSnapshotProxy" }, -}; - -const universityContractMapping: ContractMapping = { - klerosCore: { name: "KlerosCoreUniversity" }, - sortition: { name: "SortitionModuleUniversity" }, - disputeKitClassic: { name: "DisputeKitClassicUniversity" }, - disputeKitShutter: { name: "DisputeKitShutterUniversity", optional: true }, - disputeKitGated: { name: "DisputeKitGatedUniversity", optional: true }, - disputeKitGatedShutter: { name: "DisputeKitGatedShutterUniversity", optional: true }, - disputeResolver: { name: "DisputeResolverUniversity" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, - evidence: { name: "EvidenceModule" }, - policyRegistry: { name: "PolicyRegistry" }, - transactionBatcher: { name: "TransactionBatcher" }, - chainlinkRng: { name: "ChainlinkRNG", optional: true }, - randomizerRng: { name: "RandomizerRNG", optional: true }, - blockHashRng: { name: "BlockHashRNG" }, - pnk: { name: "PNK" }, - klerosCoreSnapshotProxy: { name: "KlerosCoreSnapshotProxy" }, -}; - -const mainnetContractMapping: ContractMapping = { - klerosCore: { name: "KlerosCore" }, - sortition: { name: "SortitionModule" }, - disputeKitClassic: { name: "DisputeKitClassic" }, - disputeKitShutter: { name: "DisputeKitShutter" }, - disputeKitGated: { name: "DisputeKitGated" }, - disputeKitGatedShutter: { name: "DisputeKitGatedShutter" }, - disputeResolver: { name: "DisputeResolver" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, - evidence: { name: "EvidenceModule" }, - policyRegistry: { name: "PolicyRegistry" }, - transactionBatcher: { name: "TransactionBatcher" }, - chainlinkRng: { name: "ChainlinkRNG", optional: false }, - randomizerRng: { name: "RandomizerRNG", optional: false }, - blockHashRng: { name: "BlockHashRNG" }, - pnk: { name: "PNK" }, - klerosCoreSnapshotProxy: { name: "KlerosCoreSnapshotProxy" }, -}; - -describe("getContractsEthers", async () => { - // Use real providers for each network - const arbitrumSepoliaProvider = new ethers.JsonRpcProvider("https://sepolia-rollup.arbitrum.io/rpc"); - const arbitrumProvider = new ethers.JsonRpcProvider("https://arb1.arbitrum.io/rpc"); - - function getConstructor( - factory: { connect: (address: string, provider: ethers.Provider) => T }, - provider: ethers.Provider - ) { - return factory.connect("0x0", provider).constructor; - } - - function verifyCommonContractInstances( - contracts: Awaited>, - provider: ethers.Provider - ) { - expect(contracts.disputeKitClassic).to.be.instanceOf(getConstructor(DisputeKitClassic__factory, provider)); - if (contracts.disputeKitShutter) { - expect(contracts.disputeKitShutter).to.be.instanceOf(getConstructor(DisputeKitShutter__factory, provider)); - } - if (contracts.disputeKitGated) { - expect(contracts.disputeKitGated).to.be.instanceOf(getConstructor(DisputeKitGated__factory, provider)); - } - if (contracts.disputeKitGatedShutter) { - expect(contracts.disputeKitGatedShutter).to.be.instanceOf( - getConstructor(DisputeKitGatedShutter__factory, provider) - ); - } - expect(contracts.disputeResolver).to.be.instanceOf(getConstructor(DisputeResolver__factory, provider)); - expect(contracts.disputeTemplateRegistry).to.be.instanceOf( - getConstructor(DisputeTemplateRegistry__factory, provider) - ); - expect(contracts.evidence).to.be.instanceOf(getConstructor(EvidenceModule__factory, provider)); - expect(contracts.policyRegistry).to.be.instanceOf(getConstructor(PolicyRegistry__factory, provider)); - expect(contracts.transactionBatcher).to.be.instanceOf(getConstructor(TransactionBatcher__factory, provider)); - expect(contracts.blockHashRng).to.be.instanceOf(getConstructor(BlockHashRNG__factory, provider)); - expect(contracts.pnk).to.be.instanceOf(getConstructor(PNK__factory, provider)); - expect(contracts.klerosCoreSnapshotProxy).to.be.instanceOf( - getConstructor(KlerosCoreSnapshotProxy__factory, provider) - ); - if (contracts.chainlinkRng) { - expect(contracts.chainlinkRng).to.be.instanceOf(getConstructor(ChainlinkRNG__factory, provider)); - } - if (contracts.randomizerRng) { - expect(contracts.randomizerRng).to.be.instanceOf(getConstructor(RandomizerRNG__factory, provider)); - } - } - - // Helper to verify contract addresses - async function verifyContractAddress(address: Promise) { - const resolvedAddress = await address; - expect(resolvedAddress).to.match(/^0x[a-fA-F0-9]{40}$/); - expect(resolvedAddress).to.not.equal("0x0000000000000000000000000000000000000000"); - } - - // Helper to verify all contract addresses - async function verifyAllContractAddresses(contracts: Awaited>) { - await verifyContractAddress(contracts.klerosCore.getAddress()); - await verifyContractAddress(contracts.sortition.getAddress()); - await verifyContractAddress(contracts.disputeKitClassic.getAddress()); - if (contracts.disputeKitShutter) { - await verifyContractAddress(contracts.disputeKitShutter.getAddress()); - } - if (contracts.disputeKitGated) { - await verifyContractAddress(contracts.disputeKitGated.getAddress()); - } - if (contracts.disputeKitGatedShutter) { - await verifyContractAddress(contracts.disputeKitGatedShutter.getAddress()); - } - await verifyContractAddress(contracts.disputeResolver.getAddress()); - await verifyContractAddress(contracts.disputeTemplateRegistry.getAddress()); - await verifyContractAddress(contracts.evidence.getAddress()); - await verifyContractAddress(contracts.policyRegistry.getAddress()); - await verifyContractAddress(contracts.transactionBatcher.getAddress()); - if (contracts.chainlinkRng) { - await verifyContractAddress(contracts.chainlinkRng.getAddress()); - } - if (contracts.randomizerRng) { - await verifyContractAddress(contracts.randomizerRng.getAddress()); - } - await verifyContractAddress(contracts.blockHashRng.getAddress()); - await verifyContractAddress(contracts.pnk.getAddress()); - await verifyContractAddress(contracts.klerosCoreSnapshotProxy.getAddress()); - } - - // Helper to verify contract addresses against deployment files - async function verifyDeployedAddresses( - contracts: Awaited>, - network: NetworkType, - contractMapping: ContractMapping - ) { - for (const [key, { name, optional }] of Object.entries(contractMapping)) { - const contract = contracts[key as keyof typeof contracts]; - if (contract === null) { - if (!optional) { - throw new Error(`Required contract ${name} is null`); - } - continue; - } - expect(await contract.getAddress()).to.equal(await getActualAddress(network, name)); - } - } - - it("should return correct contract instances for devnet", async () => { - const contracts = await getContracts(arbitrumSepoliaProvider, "devnet"); - - // Verify chain ID - const network = await arbitrumSepoliaProvider.getNetwork(); - expect(network.chainId).to.equal(arbitrumSepolia.id); - - // Verify contract instances - expect(contracts.klerosCore).to.be.instanceOf(getConstructor(KlerosCore__factory, arbitrumSepoliaProvider)); - expect(contracts.sortition).to.be.instanceOf(getConstructor(SortitionModule__factory, arbitrumSepoliaProvider)); - verifyCommonContractInstances(contracts, arbitrumSepoliaProvider); - expect(contracts.disputeKitShutter).to.not.be.null; - expect(contracts.disputeKitGated).to.not.be.null; - expect(contracts.disputeKitGatedShutter).to.not.be.null; - expect(contracts.chainlinkRng).to.not.be.null; - expect(contracts.randomizerRng).to.be.null; - - // Verify all contract addresses - await verifyAllContractAddresses(contracts); - await verifyDeployedAddresses(contracts, NETWORKS.DEVNET, devnetContractMapping); - }); - - it("should return correct contract instances for university", async () => { - const contracts = await getContracts(arbitrumSepoliaProvider, "university"); - - // Verify chain ID - const network = await arbitrumSepoliaProvider.getNetwork(); - expect(network.chainId).to.equal(arbitrumSepolia.id); - - // Verify contract instances - expect(contracts.klerosCore).to.be.instanceOf( - getConstructor(KlerosCoreUniversity__factory, arbitrumSepoliaProvider) - ); - expect(contracts.sortition).to.be.instanceOf( - getConstructor(SortitionModuleUniversity__factory, arbitrumSepoliaProvider) - ); - verifyCommonContractInstances(contracts, arbitrumSepoliaProvider); - expect(contracts.disputeKitShutter).to.be.null; - expect(contracts.disputeKitGated).to.be.null; - expect(contracts.disputeKitGatedShutter).to.be.null; - expect(contracts.chainlinkRng).to.not.be.null; - expect(contracts.randomizerRng).to.be.null; - - // Verify all contract addresses - await verifyAllContractAddresses(contracts); - await verifyDeployedAddresses(contracts, NETWORKS.DEVNET, universityContractMapping); - }); - - it("should return correct contract instances for testnet", async () => { - const contracts = await getContracts(arbitrumSepoliaProvider, "testnet"); - - // Verify chain ID - const network = await arbitrumSepoliaProvider.getNetwork(); - expect(network.chainId).to.equal(arbitrumSepolia.id); - - // Verify contract instances - expect(contracts.klerosCore).to.be.instanceOf(getConstructor(KlerosCore__factory, arbitrumSepoliaProvider)); - expect(contracts.sortition).to.be.instanceOf(getConstructor(SortitionModule__factory, arbitrumSepoliaProvider)); - verifyCommonContractInstances(contracts, arbitrumSepoliaProvider); - expect(contracts.disputeKitShutter).to.not.be.null; - expect(contracts.disputeKitGated).to.not.be.null; - expect(contracts.disputeKitGatedShutter).to.not.be.null; - expect(contracts.chainlinkRng).to.not.be.null; - expect(contracts.randomizerRng).to.be.null; - - // Verify all contract addresses - await verifyAllContractAddresses(contracts); - await verifyDeployedAddresses(contracts, NETWORKS.TESTNET, testnetContractMapping); - }); - - it("should return correct contract instances for mainnet", async () => { - const contracts = await getContracts(arbitrumProvider, "mainnet"); - - // Verify chain ID - const network = await arbitrumProvider.getNetwork(); - expect(network.chainId).to.equal(arbitrum.id); - - // Verify contract instances - expect(contracts.klerosCore).to.be.instanceOf(getConstructor(KlerosCore__factory, arbitrumProvider)); - expect(contracts.sortition).to.be.instanceOf(getConstructor(SortitionModule__factory, arbitrumProvider)); - verifyCommonContractInstances(contracts, arbitrumProvider); - expect(contracts.disputeKitShutter).to.not.be.null; - expect(contracts.disputeKitGated).to.not.be.null; - expect(contracts.disputeKitGatedShutter).to.not.be.null; - expect(contracts.chainlinkRng).to.not.be.null; - expect(contracts.randomizerRng).to.not.be.null; - - // Verify all contract addresses - await verifyAllContractAddresses(contracts); - await verifyDeployedAddresses(contracts, NETWORKS.MAINNET, mainnetContractMapping); - }); - - it("should throw error for unsupported deployment", async () => { - // @ts-expect-error Testing invalid deployment - await expect(getContracts(arbitrumSepoliaProvider, "invalid")).to.be.rejectedWith( - /Unsupported deployment|Cannot destructure property/ - ); - }); -}); diff --git a/contracts/test/integration/getContractsViem.test.ts b/contracts/test/integration/getContractsViem.test.ts deleted file mode 100644 index 67c5a92af..000000000 --- a/contracts/test/integration/getContractsViem.test.ts +++ /dev/null @@ -1,277 +0,0 @@ -import { expect } from "chai"; -import { createPublicClient, http } from "viem"; -import { arbitrum, arbitrumSepolia } from "viem/chains"; -import { getContracts } from "../../deployments/contractsViem"; -import { getActualAddress } from "../utils/getActualAddress"; - -// Network names for deployments -const NETWORKS = { - DEVNET: "arbitrumSepoliaDevnet", - TESTNET: "arbitrumSepolia", - MAINNET: "arbitrum", -} as const; - -type NetworkType = (typeof NETWORKS)[keyof typeof NETWORKS]; - -type ContractMapping = { - [K in keyof ReturnType]: { - name: string; - optional?: boolean; - }; -}; - -const devnetContractMapping: ContractMapping = { - klerosCore: { name: "KlerosCore" }, - sortition: { name: "SortitionModule" }, - disputeKitClassic: { name: "DisputeKitClassic" }, - disputeKitShutter: { name: "DisputeKitShutter" }, - disputeKitGated: { name: "DisputeKitGated" }, - disputeKitGatedShutter: { name: "DisputeKitGatedShutter" }, - disputeResolver: { name: "DisputeResolver" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, - evidence: { name: "EvidenceModule" }, - policyRegistry: { name: "PolicyRegistry" }, - transactionBatcher: { name: "TransactionBatcher" }, - chainlinkRng: { name: "ChainlinkRNG", optional: true }, - randomizerRng: { name: "RandomizerRNG", optional: true }, - blockHashRng: { name: "BlockHashRNG" }, - pnk: { name: "PNK" }, - klerosCoreSnapshotProxy: { name: "KlerosCoreSnapshotProxy" }, -}; - -const testnetContractMapping: ContractMapping = { - klerosCore: { name: "KlerosCore" }, - sortition: { name: "SortitionModule" }, - disputeKitClassic: { name: "DisputeKitClassic" }, - disputeKitShutter: { name: "DisputeKitShutter" }, - disputeKitGated: { name: "DisputeKitGated" }, - disputeKitGatedShutter: { name: "DisputeKitGatedShutter" }, - disputeResolver: { name: "DisputeResolver" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, - evidence: { name: "EvidenceModule" }, - policyRegistry: { name: "PolicyRegistry" }, - transactionBatcher: { name: "TransactionBatcher" }, - chainlinkRng: { name: "ChainlinkRNG", optional: true }, - randomizerRng: { name: "RandomizerRNG", optional: true }, - blockHashRng: { name: "BlockHashRNG" }, - pnk: { name: "PNK" }, - klerosCoreSnapshotProxy: { name: "KlerosCoreSnapshotProxy" }, -}; - -const universityContractMapping: ContractMapping = { - klerosCore: { name: "KlerosCoreUniversity" }, - sortition: { name: "SortitionModuleUniversity" }, - disputeKitClassic: { name: "DisputeKitClassicUniversity" }, - disputeKitShutter: { name: "DisputeKitShutterUniversity", optional: true }, - disputeKitGated: { name: "DisputeKitGatedUniversity", optional: true }, - disputeKitGatedShutter: { name: "DisputeKitGatedShutterUniversity", optional: true }, - disputeResolver: { name: "DisputeResolverUniversity" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, - evidence: { name: "EvidenceModule" }, - policyRegistry: { name: "PolicyRegistry" }, - transactionBatcher: { name: "TransactionBatcher" }, - chainlinkRng: { name: "ChainlinkRNG", optional: true }, - randomizerRng: { name: "RandomizerRNG", optional: true }, - blockHashRng: { name: "BlockHashRNG" }, - pnk: { name: "PNK" }, - klerosCoreSnapshotProxy: { name: "KlerosCoreSnapshotProxy" }, -}; - -const mainnetContractMapping: ContractMapping = { - klerosCore: { name: "KlerosCore" }, - sortition: { name: "SortitionModule" }, - disputeKitClassic: { name: "DisputeKitClassic" }, - disputeKitShutter: { name: "DisputeKitShutter" }, - disputeKitGated: { name: "DisputeKitGated" }, - disputeKitGatedShutter: { name: "DisputeKitGatedShutter" }, - disputeResolver: { name: "DisputeResolver" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, - evidence: { name: "EvidenceModule" }, - policyRegistry: { name: "PolicyRegistry" }, - transactionBatcher: { name: "TransactionBatcher" }, - chainlinkRng: { name: "ChainlinkRNG", optional: false }, - randomizerRng: { name: "RandomizerRNG", optional: false }, - blockHashRng: { name: "BlockHashRNG" }, - pnk: { name: "PNK" }, - klerosCoreSnapshotProxy: { name: "KlerosCoreSnapshotProxy" }, -}; - -describe("getContractsViem", () => { - // Create Viem clients for testing - const arbitrumSepoliaClient = createPublicClient({ - chain: arbitrumSepolia, - transport: http("https://sepolia-rollup.arbitrum.io/rpc"), - }); - - const arbitrumClient = createPublicClient({ - chain: arbitrum, - transport: http("https://arb1.arbitrum.io/rpc"), - }); - - // Helper to verify contract instance - function verifyContractInstance(contract: any) { - expect(contract).to.have.property("address"); - expect(contract).to.have.property("abi"); - expect(contract.address).to.match(/^0x[a-fA-F0-9]{40}$/); - expect(contract.address).to.not.equal("0x0000000000000000000000000000000000000000"); - } - - // Helper to verify all contract instances - function verifyAllContractInstances(contracts: ReturnType) { - verifyContractInstance(contracts.klerosCore); - verifyContractInstance(contracts.sortition); - verifyContractInstance(contracts.disputeKitClassic); - if (contracts.disputeKitShutter) { - verifyContractInstance(contracts.disputeKitShutter); - } - if (contracts.disputeKitGated) { - verifyContractInstance(contracts.disputeKitGated); - } - if (contracts.disputeKitGatedShutter) { - verifyContractInstance(contracts.disputeKitGatedShutter); - } - verifyContractInstance(contracts.disputeResolver); - verifyContractInstance(contracts.disputeTemplateRegistry); - verifyContractInstance(contracts.evidence); - verifyContractInstance(contracts.policyRegistry); - verifyContractInstance(contracts.transactionBatcher); - verifyContractInstance(contracts.blockHashRng); - verifyContractInstance(contracts.pnk); - verifyContractInstance(contracts.klerosCoreSnapshotProxy); - - if (contracts.chainlinkRng) { - verifyContractInstance(contracts.chainlinkRng); - } - if (contracts.randomizerRng) { - verifyContractInstance(contracts.randomizerRng); - } - } - - // Helper to verify deployed addresses - async function verifyDeployedAddresses( - contracts: ReturnType, - network: NetworkType, - contractMapping: ContractMapping - ) { - for (const [key, { name, optional }] of Object.entries(contractMapping)) { - const contract = contracts[key as keyof typeof contracts]; - if (!contract) { - if (!optional) { - throw new Error(`Required contract ${name} is null`); - } - continue; - } - expect(contract.address).to.equal(await getActualAddress(network, name)); - } - } - - it("should return correct contract instances for devnet", async () => { - const contracts = getContracts({ - publicClient: arbitrumSepoliaClient, - deployment: "devnet", - }); - - // Verify chain ID - expect(arbitrumSepoliaClient.chain.id).to.equal(arbitrumSepolia.id); - - // Verify all contract instances - verifyAllContractInstances(contracts); - - // Verify specific DisputeKit instances - expect(contracts.disputeKitShutter).to.not.be.undefined; - expect(contracts.disputeKitGated).to.not.be.undefined; - expect(contracts.disputeKitGatedShutter).to.not.be.undefined; - - // Verify specific RNG instances - expect(contracts.chainlinkRng).to.not.be.undefined; - expect(contracts.randomizerRng).to.be.undefined; - - // Verify deployed addresses - await verifyDeployedAddresses(contracts, NETWORKS.DEVNET, devnetContractMapping); - }); - - it("should return correct contract instances for university", async () => { - const contracts = getContracts({ - publicClient: arbitrumSepoliaClient, - deployment: "university", - }); - - // Verify chain ID - expect(arbitrumSepoliaClient.chain.id).to.equal(arbitrumSepolia.id); - - // Verify all contract instances - verifyAllContractInstances(contracts); - - // Verify specific DisputeKit instances - expect(contracts.disputeKitShutter).to.be.undefined; - expect(contracts.disputeKitGated).to.be.undefined; - expect(contracts.disputeKitGatedShutter).to.be.undefined; - - // Verify specific RNG instances - expect(contracts.chainlinkRng).to.be.undefined; - expect(contracts.randomizerRng).to.be.undefined; - - // Verify deployed addresses - await verifyDeployedAddresses(contracts, NETWORKS.DEVNET, universityContractMapping); - }); - - it("should return correct contract instances for testnet", async () => { - const contracts = getContracts({ - publicClient: arbitrumSepoliaClient, - deployment: "testnet", - }); - - // Verify chain ID - expect(arbitrumSepoliaClient.chain.id).to.equal(arbitrumSepolia.id); - - // Verify all contract instances - verifyAllContractInstances(contracts); - - // Verify specific DisputeKit instances - expect(contracts.disputeKitShutter).to.not.be.undefined; - expect(contracts.disputeKitGated).to.not.be.undefined; - expect(contracts.disputeKitGatedShutter).to.not.be.undefined; - - // Verify specific RNG instances - expect(contracts.chainlinkRng).to.not.be.undefined; - expect(contracts.randomizerRng).to.be.undefined; - - // Verify deployed addresses - await verifyDeployedAddresses(contracts, NETWORKS.TESTNET, testnetContractMapping); - }); - - it("should return correct contract instances for mainnet", async () => { - const contracts = getContracts({ - publicClient: arbitrumClient, - deployment: "mainnet", - }); - - // Verify chain ID - expect(arbitrumClient.chain.id).to.equal(arbitrum.id); - - // Verify all contract instances - verifyAllContractInstances(contracts); - - // Verify specific DisputeKit instances - expect(contracts.disputeKitShutter).to.not.be.undefined; - expect(contracts.disputeKitGated).to.not.be.undefined; - expect(contracts.disputeKitGatedShutter).to.not.be.undefined; - - // Verify specific RNG instances - expect(contracts.chainlinkRng).to.not.be.undefined; - expect(contracts.randomizerRng).to.not.be.undefined; - - // Verify deployed addresses - await verifyDeployedAddresses(contracts, NETWORKS.MAINNET, mainnetContractMapping); - }); - - it("should throw error for unsupported deployment", () => { - expect(() => - getContracts({ - publicClient: arbitrumSepoliaClient, - // @ts-expect-error Testing invalid deployment - deployment: "invalid", - }) - ).to.throw(/Cannot destructure property 'chainId'/); - }); -}); diff --git a/contracts/test/integration/index.ts b/contracts/test/integration/index.ts deleted file mode 100644 index f3c97b2a1..000000000 --- a/contracts/test/integration/index.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; -import { expect } from "chai"; -import { deployments, ethers, getNamedAccounts, network } from "hardhat"; -import { - PNK, - KlerosCore, - ForeignGateway, - ArbitrableExample, - HomeGateway, - VeaMock, - DisputeKitClassic, - SortitionModule, - ChainlinkRNG, - ChainlinkVRFCoordinatorV2Mock, -} from "../../typechain-types"; - -/* eslint-disable no-unused-vars */ -/* eslint-disable no-unused-expressions */ // https://github.com/standard/standard/issues/690#issuecomment-278533482 - -describe("Integration tests", async () => { - const ONE_TENTH_ETH = 10n ** 17n; - const ONE_ETH = 10n ** 18n; - const ONE_HUNDRED_PNK = 10n ** 20n; - const ONE_THOUSAND_PNK = 10n ** 21n; - const abiCoder = ethers.AbiCoder.defaultAbiCoder(); - - const enum Period { - evidence, // Evidence can be submitted. This is also when drawing has to take place. - commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes. - vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not. - appeal, // The dispute can be appealed. - execution, // Tokens are redistributed and the ruling is executed. - } - - const enum Phase { - staking, // No disputes that need drawing. - generating, // Waiting for a random number. Pass as soon as it is ready. - drawing, // Jurors can be drawn. - } - - let deployer: string; - let rng: ChainlinkRNG; - let vrfCoordinator: ChainlinkVRFCoordinatorV2Mock; - let disputeKit: DisputeKitClassic; - let pnk: PNK; - let core: KlerosCore; - let vea: VeaMock; - let foreignGateway: ForeignGateway; - let arbitrable: ArbitrableExample; - let homeGateway: HomeGateway; - let sortitionModule: SortitionModule; - - beforeEach("Setup", async () => { - ({ deployer } = await getNamedAccounts()); - await deployments.fixture(["Arbitration", "VeaMock"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - rng = await ethers.getContract("ChainlinkRNG"); - vrfCoordinator = await ethers.getContract("ChainlinkVRFCoordinator"); - disputeKit = await ethers.getContract("DisputeKitClassic"); - pnk = await ethers.getContract("PNK"); - core = await ethers.getContract("KlerosCore"); - vea = await ethers.getContract("VeaMock"); - foreignGateway = await ethers.getContract("ForeignGatewayOnEthereum"); - arbitrable = await ethers.getContract("ArbitrableExample"); - homeGateway = await ethers.getContract("HomeGatewayToEthereum"); - sortitionModule = await ethers.getContract("SortitionModule"); - }); - - it("Resolves a dispute on the home chain with no appeal", async () => { - const arbitrationCost = ONE_TENTH_ETH * 3n; - const [, , relayer] = await ethers.getSigners(); - - await pnk.approve(core.target, ONE_THOUSAND_PNK * 100n); - - await core.setStake(1, ONE_THOUSAND_PNK); - await sortitionModule.getJurorBalance(deployer, 1).then((result) => { - expect(result.totalStaked).to.equal(ONE_THOUSAND_PNK); - expect(result.totalLocked).to.equal(0); - logJurorBalance(result); - }); - - await core.setStake(1, ONE_HUNDRED_PNK * 5n); - await sortitionModule.getJurorBalance(deployer, 1).then((result) => { - expect(result.totalStaked).to.equal(ONE_HUNDRED_PNK * 5n); - expect(result.totalLocked).to.equal(0); - logJurorBalance(result); - }); - - await core.setStake(1, 0); - await sortitionModule.getJurorBalance(deployer, 1).then((result) => { - expect(result.totalStaked).to.equal(0); - expect(result.totalLocked).to.equal(0); - logJurorBalance(result); - }); - - await core.setStake(1, ONE_THOUSAND_PNK * 4n); - await sortitionModule.getJurorBalance(deployer, 1).then((result) => { - expect(result.totalStaked).to.equal(ONE_THOUSAND_PNK * 4n); - expect(result.totalLocked).to.equal(0); - logJurorBalance(result); - }); - const tx = await arbitrable["createDispute(string)"]("future of france", { - value: arbitrationCost, - }); - - const trace = await network.provider.send("debug_traceTransaction", [tx.hash]); - const [disputeId] = abiCoder.decode(["uint"], ethers.getBytes(`${trace.returnValue}`)); // get returned value from createDispute() - console.log("Dispute Created with disputeId: %d", disputeId); - await expect(tx) - .to.emit(foreignGateway, "CrossChainDisputeOutgoing") - .withArgs(anyValue, arbitrable.target, 1, 2, "0x00"); - await expect(tx) - .to.emit(arbitrable, "DisputeRequest") - .withArgs( - foreignGateway.target, - 1, - 46619385602526556702049273755915206310773794210139929511467397410441395547901n, - 0, - "" - ); - if (tx.blockNumber === null) throw new Error("tx.blockNumber is null"); - const lastBlock = await ethers.provider.getBlock(tx.blockNumber - 1); - if (lastBlock === null) throw new Error("lastBlock is null"); - const disputeHash = ethers.solidityPackedKeccak256( - ["bytes", "bytes32", "uint256", "address", "uint256", "uint256", "bytes"], - [ethers.toUtf8Bytes("createDispute"), lastBlock.hash, 31337, arbitrable.target, disputeId, 2, "0x00"] - ); - console.log("dispute hash: ", disputeHash); - if (lastBlock.hash === null) { - throw new Error("Block hash is null - cannot calculate dispute hash"); - } - // Relayer tx - const tx2 = await homeGateway - .connect(relayer) - ["relayCreateDispute((bytes32,uint256,address,uint256,uint256,uint256,string,uint256,bytes))"]( - { - foreignBlockHash: ethers.toBeHex(lastBlock.hash), - foreignChainID: 31337, - foreignArbitrable: arbitrable.target, - foreignDisputeID: disputeId, - externalDisputeID: ethers.keccak256(ethers.toUtf8Bytes("future of france")), - templateId: 0, - templateUri: "", - choices: 2, - extraData: "0x00", - }, - { value: arbitrationCost } - ); - expect(tx2).to.emit(homeGateway, "DisputeRequest"); - await tx2.wait(); - - await network.provider.send("evm_increaseTime", [2000]); // Wait for minStakingTime - await network.provider.send("evm_mine"); - - expect(await sortitionModule.phase()).to.equal(Phase.staking); - expect(await sortitionModule.disputesWithoutJurors()).to.equal(1); - console.log("KC phase: %d", await sortitionModule.phase()); - - await sortitionModule.passPhase(); // Staking -> Generating - expect(await sortitionModule.phase()).to.equal(Phase.generating); - console.log("KC phase: %d", await sortitionModule.phase()); - await vrfCoordinator.fulfillRandomWords(1, rng.target, []); - await sortitionModule.passPhase(); // Generating -> Drawing - expect(await sortitionModule.phase()).to.equal(Phase.drawing); - console.log("KC phase: %d", await sortitionModule.phase()); - - const tx3 = await core.draw(0, 1000); - console.log("draw successful"); - await tx3.wait(); - - const roundInfo = await core.getRoundInfo(0, 0); - expect(roundInfo.drawnJurors).deep.equal([deployer, deployer, deployer]); - expect(roundInfo.pnkAtStakePerJuror).to.equal(ONE_HUNDRED_PNK * 2n); - expect(roundInfo.totalFeesForJurors).to.equal(arbitrationCost); - expect(roundInfo.feeToken).to.equal(ethers.ZeroAddress); - - expect((await core.disputes(0)).period).to.equal(Period.evidence); - - await core.passPeriod(0); - expect((await core.disputes(0)).period).to.equal(Period.vote); - await disputeKit.connect(await ethers.getSigner(deployer)).castVote(0, [0, 1, 2], 0, 0, ""); - await core.passPeriod(0); - - await network.provider.send("evm_increaseTime", [100]); // Wait for the appeal period - await network.provider.send("evm_mine"); - - await core.passPeriod(0); - expect((await core.disputes(0)).period).to.equal(Period.execution); - expect(await core.execute(0, 0, 1000)).to.emit(core, "TokenAndETHShift"); - - const tx4 = await core.executeRuling(0, { gasLimit: 10000000, gasPrice: 5000000000 }); - console.log("Ruling executed on KlerosCore"); - expect(tx4).to.emit(core, "Ruling").withArgs(homeGateway.target, 0, 0); - expect(tx4).to.emit(arbitrable, "Ruling").withArgs(foreignGateway.target, 1, 0); // The ForeignGateway starts counting disputeID from 1. - }); - - const mineBlocks = async (n: number) => { - for (let index = 0; index < n; index++) { - await network.provider.send("evm_mine"); - } - }; -}); - -const logJurorBalance = async (result: { totalStaked: bigint; totalLocked: bigint }) => { - console.log("staked=%s, locked=%s", ethers.formatUnits(result.totalStaked), ethers.formatUnits(result.totalLocked)); -}; diff --git a/contracts/test/proxy/index.ts b/contracts/test/proxy/index.ts deleted file mode 100644 index a58886789..000000000 --- a/contracts/test/proxy/index.ts +++ /dev/null @@ -1,241 +0,0 @@ -import { expect } from "chai"; -import { ethers, deployments } from "hardhat"; -import { DeployResult } from "hardhat-deploy/types"; -import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers"; -import { deployUpgradable } from "../../deploy/utils/deployUpgradable"; -import { UpgradedByInheritanceV1, UpgradedByInheritanceV2 } from "../../typechain-types"; -import { UpgradedByRewrite as UpgradedByRewriteV1 } from "../../typechain-types/src/proxy/mock/by-rewrite/UpgradedByRewrite.sol"; -import { UpgradedByRewrite as UpgradedByRewriteV2 } from "../../typechain-types/src/proxy/mock/by-rewrite/UpgradedByRewriteV2.sol"; - -let deployer: HardhatEthersSigner; -let user1: HardhatEthersSigner; - -let proxyDeployment: DeployResult; -let proxy: any; -let implementation: any; - -describe("Upgradability", async () => { - describe("Upgradability Permissions", async () => { - beforeEach("Setup Contracts", async () => { - [deployer, user1] = await ethers.getSigners(); - - proxyDeployment = await deployments.deploy("UUPSUpgradeableMock", { - from: deployer.address, - proxy: { - proxyContract: "UUPSProxy", - execute: { - init: { - methodName: "initialize", - args: [deployer.address], - }, - onUpgrade: { - methodName: "counter", - args: [], - }, - }, - proxyArgs: ["{implementation}", "{data}"], - }, - log: true, - args: [], - }); - if (!proxyDeployment.implementation) { - throw new Error("No implementation address"); - } - proxy = await ethers.getContractAt("UUPSUpgradeableMock", proxyDeployment.address); - implementation = await ethers.getContractAt("UUPSUpgradeableMock", proxyDeployment.implementation); - }); - - describe("Initialization", async () => { - it("Owner cannot re-initialize the proxy", async () => { - await expect(proxy.connect(deployer).initialize(deployer.address)).to.be.revertedWith( - "Contract instance has already been initialized" - ); - }); - it("User cannot re-initialize the proxy", async () => { - await expect(proxy.connect(user1).initialize(user1.address)).to.be.revertedWith( - "Contract instance has already been initialized" - ); - }); - it("Implementation cannot be directly upgraded", async () => { - await expect(implementation.initialize(user1.address)).to.be.revertedWith( - "Contract instance has already been initialized" - ); - }); - }); - describe("Upgrade", async () => { - describe("Security", async () => { - it("Should revert if implementation has a broken UUID", async () => { - const UUPSUnsupportedProxiableUUIDFactory = await ethers.getContractFactory("UUPSUnsupportedProxiableUUID"); - const uupsUnsupportedUUID = await UUPSUnsupportedProxiableUUIDFactory.deploy(); - await expect( - proxy.connect(deployer).upgradeToAndCall(uupsUnsupportedUUID.target, "0x") - ).to.be.revertedWithCustomError(proxy, "UUPSUnsupportedProxiableUUID"); - }); - it("Should revert on upgrades to non UUPS-compliant implementation", async () => { - const NonUpgradeableMockFactory = await ethers.getContractFactory("NonUpgradeableMock"); - const nonUpgradeableMock = await NonUpgradeableMockFactory.deploy(); - await expect(proxy.upgradeToAndCall(nonUpgradeableMock.target, "0x")) - .to.be.revertedWithCustomError(proxy, "InvalidImplementation") - .withArgs(nonUpgradeableMock.target); - }); - it("Should revert if upgrade is performed directly through the implementation", async () => { - // In the implementation, the `owner` storage slot is not initialized so `owner === address(0)`, which fails _authorizeUpgrade() - const UUPSUpgradeableMockV2Factory = await ethers.getContractFactory("UUPSUpgradeableMockV2"); - const newImplementation = await UUPSUpgradeableMockV2Factory.connect(deployer).deploy(); - await expect( - implementation.connect(deployer).upgradeToAndCall(newImplementation.target, "0x") - ).to.be.revertedWith("No privilege to upgrade"); - }); - }); - - describe("Authentication", async () => { - it("Only the owner (deployer here) can perform upgrades", async () => { - // Unauthorized user try to upgrade the implementation - const UUPSUpgradeableMockV2Factory = await ethers.getContractFactory("UUPSUpgradeableMockV2"); - let upgradable = await UUPSUpgradeableMockV2Factory.connect(user1).deploy(); - await expect(proxy.connect(user1).upgradeToAndCall(upgradable.target, "0x")).to.be.revertedWith( - "No privilege to upgrade" - ); - - // Owner updates the implementation - upgradable = await UUPSUpgradeableMockV2Factory.connect(deployer).deploy(); - await expect(proxy.connect(deployer).upgradeToAndCall(upgradable.target, "0x")) - .to.emit(proxy, "Upgraded") - .withArgs(upgradable.target); - }); - }); - }); - - describe("After Test", async () => { - // Why? - it("Reset implementation to deployment's implementation address", async () => { - await proxy.upgradeToAndCall(proxyDeployment.implementation, "0x"); - }); - }); - }); - - describe("State Initialization (new implementation as a rewrite of the contract code)", async () => { - before("Setup Contracts", async () => { - [deployer] = await ethers.getSigners(); - - proxyDeployment = await deployUpgradable(deployments, "UpgradedByRewrite", { - contract: "src/proxy/mock/by-rewrite/UpgradedByRewrite.sol:UpgradedByRewrite", - from: deployer.address, - args: [deployer.address], - log: true, - }); - if (!proxyDeployment.implementation) { - throw new Error("No implementation address"); - } - }); - - it("Initializes v1", async () => { - proxy = await ethers.getContract("UpgradedByRewrite"); - - implementation = await ethers.getContract("UpgradedByRewrite_Implementation"); - - expect(await proxy.owner()).to.equal(deployer.address); - - expect(await proxy.counter()).to.equal(1); - await proxy.increment(); - expect(await proxy.counter()).to.equal(2); - - expect(await proxy.version()).to.equal("V1"); - - // Implementation should not store any state - expect(await implementation.counter()).to.equal(0); - }); - - it("Upgrades to v2 and initializes", async () => { - proxyDeployment = await deployUpgradable(deployments, "UpgradedByRewrite", { - contract: "src/proxy/mock/by-rewrite/UpgradedByRewriteV2.sol:UpgradedByRewrite", - from: deployer.address, - args: ["Future of France"], - log: true, - }); - if (!proxyDeployment.implementation) { - throw new Error("No implementation address"); - } - proxy = await ethers.getContract("UpgradedByRewrite"); - expect(await proxy.owner()).to.equal(deployer.address); - - expect(await proxy.counter()).to.equal(3); - await proxy.increment(); - expect(await proxy.counter()).to.equal(4); - - expect(await proxy.version()).to.equal("V2"); - - expect(await proxy.newVariable()).to.equal("Future of France"); - }); - }); - - describe("State Initialization (new implementation as a derived contract)", async () => { - before("Setup Contracts", async () => { - [deployer] = await ethers.getSigners(); - - proxyDeployment = await deployUpgradable(deployments, "UpgradedByInheritanceV1", { - from: deployer.address, - args: [deployer.address], - log: true, - }); - if (!proxyDeployment.implementation) { - throw new Error("No implementation address"); - } - }); - - it("Initializes v1", async () => { - proxy = await ethers.getContract("UpgradedByInheritanceV1"); - - implementation = await ethers.getContract("UpgradedByInheritanceV1_Implementation"); - - expect(await proxy.owner()).to.equal(deployer.address); - - expect(await proxy.counter()).to.equal(1); - await proxy.increment(); - expect(await proxy.counter()).to.equal(2); - - expect(await proxy.version()).to.equal("V1"); - - // Implementation should not store any state - expect(await implementation.counter()).to.equal(0); - }); - - it("Upgrades to v2 and initializes", async () => { - proxyDeployment = await deployUpgradable(deployments, "UpgradedByInheritanceV1", { - newImplementation: "UpgradedByInheritanceV2", - initializer: "initializeV2", - from: deployer.address, - args: ["Future of France"], - log: true, - }); - - proxy = await ethers.getContract("UpgradedByInheritanceV1"); - - expect(await proxy.owner()).to.equal(deployer.address); - - expect(await proxy.counter()).to.equal(3); - await proxy.increment(); - expect(await proxy.counter()).to.equal(4); - - expect(await proxy.newVariable()).to.equal("Future of France"); - - expect(await proxy.version()).to.equal("V2"); - }); - - it("Cannot upgrade to v3 which has an invalid initializer", async () => { - await expect( - deployUpgradable(deployments, "UpgradedByInheritanceV1", { - newImplementation: "UpgradedByInheritanceV3Bad", - initializer: "initializeV3", - from: deployer.address, - args: [], - log: true, - }) - ).to.be.revertedWithCustomError(proxy, "FailedDelegateCall"); - }); - }); - - after("Reset", async () => { - await deployments.run(["NonExistentTag"], { resetMemory: true, deletePreviousDeployments: true }); - }); -}); diff --git a/contracts/test/rng/index.ts b/contracts/test/rng/index.ts deleted file mode 100644 index f61ec9b95..000000000 --- a/contracts/test/rng/index.ts +++ /dev/null @@ -1,212 +0,0 @@ -import { expect } from "chai"; -import { deployments, ethers, getNamedAccounts, network } from "hardhat"; -import { - IncrementalNG, - BlockHashRNG, - ChainlinkRNG, - ChainlinkVRFCoordinatorV2Mock, - RandomizerRNG, - RandomizerMock, -} from "../../typechain-types"; - -const initialNg = 424242; -const abiCoder = ethers.AbiCoder.defaultAbiCoder(); -let deployer: string; - -describe("IncrementalNG", async () => { - let rng: IncrementalNG; - - beforeEach("Setup", async () => { - const rngFactory = await ethers.getContractFactory("IncrementalNG"); - rng = (await rngFactory.deploy(initialNg)) as IncrementalNG; - }); - - it("Should return a number incrementing each time", async () => { - expect(await rng.receiveRandomness.staticCall()).to.equal(initialNg); - await rng.receiveRandomness().then((tx) => tx.wait()); - expect(await rng.receiveRandomness.staticCall()).to.equal(initialNg + 1); - await rng.receiveRandomness().then((tx) => tx.wait()); - expect(await rng.receiveRandomness.staticCall()).to.equal(initialNg + 2); - await rng.receiveRandomness().then((tx) => tx.wait()); - expect(await rng.receiveRandomness.staticCall()).to.equal(initialNg + 3); - }); -}); - -describe("BlockHashRNG", async () => { - let rng: BlockHashRNG; - - beforeEach("Setup", async () => { - const [deployer] = await ethers.getSigners(); - await deployments.delete("BlockHashRNG"); - await deployments.deploy("BlockHashRNG", { - from: deployer.address, - args: [deployer.address, deployer.address, 10], // owner, consumer, lookaheadTime (seconds) - }); - rng = await ethers.getContract("BlockHashRNG"); - }); - - it("Should return a non-zero number after requesting and waiting", async () => { - // First request randomness - await rng.requestRandomness(); - - // Check that it's not ready yet - expect(await rng.isRandomnessReady()).to.be.false; - - // Advance time by 10 seconds (the lookahead time) - await network.provider.send("evm_increaseTime", [10]); - await network.provider.send("evm_mine"); - - // Now it should be ready - expect(await rng.isRandomnessReady()).to.be.true; - - // Get the random number - const randomNumber = await rng.receiveRandomness.staticCall(); - expect(randomNumber).to.not.equal(0); - }); - - it("Should return 0 if randomness not requested", async () => { - const randomNumber = await rng.receiveRandomness.staticCall(); - expect(randomNumber).to.equal(0); - }); - - it("Should return 0 if not enough time has passed", async () => { - await rng.requestRandomness(); - - // Don't advance time enough - await network.provider.send("evm_increaseTime", [5]); // Only 5 seconds - await network.provider.send("evm_mine"); - - const randomNumber = await rng.receiveRandomness.staticCall(); - expect(randomNumber).to.equal(0); - }); -}); - -describe("ChainlinkRNG", async () => { - let rng: ChainlinkRNG; - let vrfCoordinator: ChainlinkVRFCoordinatorV2Mock; - - beforeEach("Setup", async () => { - ({ deployer } = await getNamedAccounts()); - - await deployments.fixture(["ChainlinkRNG"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - rng = await ethers.getContract("ChainlinkRNG"); - vrfCoordinator = await ethers.getContract("ChainlinkVRFCoordinator"); - - await rng.changeConsumer(deployer); - }); - - it("Should return a non-zero random number", async () => { - const requestId = 1; - const expectedRn = BigInt(ethers.keccak256(abiCoder.encode(["uint256", "uint256"], [requestId, 0]))); - - let tx = await rng.requestRandomness(); - await expect(tx).to.emit(rng, "RequestSent").withArgs(requestId); - - tx = await vrfCoordinator.fulfillRandomWords(requestId, rng.target, []); - await expect(tx).to.emit(rng, "RequestFulfilled").withArgs(requestId, expectedRn); - - const rn = await rng.receiveRandomness(); - expect(rn).to.equal(expectedRn); - await tx.wait(); - }); - - it("Should return only the last random number when multiple requests are made", async () => { - // First request - let tx = await rng.requestRandomness(); - const requestId1 = 1; - await expect(tx).to.emit(rng, "RequestSent").withArgs(requestId1); - - // Second request - tx = await rng.requestRandomness(); - const requestId2 = 2; - await expect(tx).to.emit(rng, "RequestSent").withArgs(requestId2); - - // Generate expected random numbers - const expectedRn1 = BigInt(ethers.keccak256(abiCoder.encode(["uint256", "uint256"], [requestId1, 0]))); - const expectedRn2 = BigInt(ethers.keccak256(abiCoder.encode(["uint256", "uint256"], [requestId2, 0]))); - expect(expectedRn1).to.not.equal(expectedRn2, "Random numbers should be different"); - - // Fulfill first request - tx = await vrfCoordinator.fulfillRandomWords(requestId1, rng.target, []); - await expect(tx).to.emit(rng, "RequestFulfilled").withArgs(requestId1, expectedRn1); - - // Fulfill second request - tx = await vrfCoordinator.fulfillRandomWords(requestId2, rng.target, []); - await expect(tx).to.emit(rng, "RequestFulfilled").withArgs(requestId2, expectedRn2); - - // Should return only the last random number - const rn = await rng.receiveRandomness(); - expect(rn).to.equal(expectedRn2); - await tx.wait(); - }); -}); - -describe("RandomizerRNG", async () => { - let rng: RandomizerRNG; - let randomizer: RandomizerMock; - - beforeEach("Setup", async () => { - ({ deployer } = await getNamedAccounts()); - - await deployments.fixture(["RandomizerRNG"], { - fallbackToGlobal: true, - keepExistingDeployments: false, - }); - rng = await ethers.getContract("RandomizerRNG"); - randomizer = await ethers.getContract("RandomizerOracle"); - - await rng.changeConsumer(deployer); - }); - - it("Should return a non-zero random number", async () => { - const randomBytes = ethers.randomBytes(32); - const expectedRn = BigInt(ethers.hexlify(randomBytes)); - const requestId = 1; - - let tx = await rng.requestRandomness(); - await expect(tx).to.emit(rng, "RequestSent").withArgs(requestId); - - tx = await randomizer.relay(rng.target, requestId, randomBytes); - await expect(tx).to.emit(rng, "RequestFulfilled").withArgs(requestId, expectedRn); - - const rn = await rng.receiveRandomness(); - expect(rn).to.equal(expectedRn); - await tx.wait(); - }); - - it("Should return only the last random number when multiple requests are made", async () => { - // First request - let tx = await rng.requestRandomness(); - const requestId1 = 1; - await expect(tx).to.emit(rng, "RequestSent").withArgs(requestId1); - - // Second request - tx = await rng.requestRandomness(); - const requestId2 = 2; - await expect(tx).to.emit(rng, "RequestSent").withArgs(requestId2); - - // Generate random bytes and expected numbers for both requests - const randomBytes1 = ethers.randomBytes(32); - const randomBytes2 = ethers.randomBytes(32); - const expectedRn1 = BigInt(ethers.hexlify(randomBytes1)); - const expectedRn2 = BigInt(ethers.hexlify(randomBytes2)); - - expect(expectedRn1).to.not.equal(expectedRn2, "Random numbers should be different"); - - // Fulfill first request - tx = await randomizer.relay(rng.target, requestId1, randomBytes1); - await expect(tx).to.emit(rng, "RequestFulfilled").withArgs(requestId1, expectedRn1); - - // Fulfill second request - tx = await randomizer.relay(rng.target, requestId2, randomBytes2); - await expect(tx).to.emit(rng, "RequestFulfilled").withArgs(requestId2, expectedRn2); - - // Should return only the last random number - const rn = await rng.receiveRandomness(); - expect(rn).to.equal(expectedRn2); - await tx.wait(); - }); -}); diff --git a/contracts/test/sortition/index.ts b/contracts/test/sortition/index.ts deleted file mode 100644 index e33d1a0d5..000000000 --- a/contracts/test/sortition/index.ts +++ /dev/null @@ -1,698 +0,0 @@ -import { expect } from "chai"; -import { ethers } from "hardhat"; -import { SortitionTreesMock } from "../../typechain-types"; - -describe("SortitionTrees", function () { - let sortitionTree: SortitionTreesMock; - let accounts: any[]; - - beforeEach("Setup", async () => { - const factory = await ethers.getContractFactory("SortitionTreesMock"); - sortitionTree = (await factory.deploy()) as SortitionTreesMock; - accounts = await ethers.getSigners(); - }); - - // Helper function to create a test juror address - const getTestAddress = (index: number): string => accounts[index % accounts.length].address; - - describe("Stake Path ID Utilities", function () { - it("Should convert correctly between stakePathID and account+courtID", async function () { - // Test various combinations of addresses and court IDs - const testCases = [ - { - address: "0x1234567890123456789012345678901234567890", - courtID: 0, - }, - { - address: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", - courtID: 0xffffffffffff, // max uint96 - }, - { - address: "0x0000000000000000000000000000000000000001", - courtID: 1, - }, - { - address: "0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF", - courtID: 123456789, - }, - ]; - - for (const testCase of testCases) { - // Test packing - const stakePathID = await sortitionTree.testToStakePathID(testCase.address, testCase.courtID); - - // Test unpacking - const [unpackedAddress, unpackedCourtID] = await sortitionTree.testToAccountAndCourtID(stakePathID); - - // Verify round-trip equivalence - expect(unpackedAddress.toLowerCase()).to.equal(testCase.address.toLowerCase()); - expect(unpackedCourtID).to.equal(testCase.courtID); - - // Verify the packed format is as expected: [20 bytes address][12 bytes courtID] - const expectedPackedValue = ethers.solidityPacked(["address", "uint96"], [testCase.address, testCase.courtID]); - expect(stakePathID).to.equal(expectedPackedValue); - } - }); - - it("Should handle TreeKey conversion correctly", async function () { - const courtIDs = [ - 0, - 1, - 100, - 0xffffffffffff, // max uint96 - ]; - - for (const courtID of courtIDs) { - const treeKey = await sortitionTree.testToTreeKey(courtID); - - // TreeKey should be the courtID padded to 32 bytes - const expectedTreeKey = ethers.zeroPadValue(ethers.toBeHex(courtID), 32); - expect(treeKey).to.equal(expectedTreeKey); - - // Court ID 0 will result in zero key, others should not - if (courtID === 0) { - expect(treeKey).to.equal("0x0000000000000000000000000000000000000000000000000000000000000000"); - } else { - expect(treeKey).to.not.equal("0x0000000000000000000000000000000000000000000000000000000000000000"); - } - } - }); - }); - - describe("Tree Creation & Validation", function () { - it("Should create trees with valid K values", async function () { - const testCases = [ - { courtID: 0, k: 2 }, - { courtID: 1, k: 5 }, - { courtID: 100, k: 10 }, - { courtID: 999, k: 100 }, - ]; - - for (const testCase of testCases) { - await sortitionTree.createTree(testCase.courtID, testCase.k); - - // Verify tree was created - expect(await sortitionTree.courtExists(testCase.courtID)).to.be.true; - expect(await sortitionTree.getTreeK(testCase.courtID)).to.equal(testCase.k); - - // Verify initial state - const nodes = await sortitionTree.getTreeNodes(testCase.courtID); - expect(nodes.length).to.equal(1); - expect(nodes[0]).to.equal(0); // Root starts at 0 - - const stack = await sortitionTree.getTreeStack(testCase.courtID); - expect(stack.length).to.equal(0); // Empty stack initially - } - }); - - it("Should reject invalid K values", async function () { - // K must be greater than 1 - await expect(sortitionTree.createTree(0, 0)).to.be.reverted; - await expect(sortitionTree.createTree(1, 1)).to.be.reverted; - }); - - it("Should reject creating duplicate trees", async function () { - await sortitionTree.createTree(0, 2); - await expect(sortitionTree.createTree(0, 3)).to.be.reverted; - }); - - it("Should create multiple independent trees", async function () { - await sortitionTree.createTree(0, 2); - await sortitionTree.createTree(1, 3); - await sortitionTree.createTree(2, 5); - - expect(await sortitionTree.getTreeK(0)).to.equal(2); - expect(await sortitionTree.getTreeK(1)).to.equal(3); - expect(await sortitionTree.getTreeK(2)).to.equal(5); - }); - }); - - describe("Single Court Stake Management", function () { - beforeEach(async function () { - // Create a test tree with K=2 for court 0 - await sortitionTree.createTree(0, 2); - }); - - describe("Adding New Stakes", function () { - it("Should add first juror to empty tree", async function () { - const juror = getTestAddress(0); - const stake = 100; - - await sortitionTree.set(0, juror, stake); - - // Verify stake was set - expect(await sortitionTree.stakeOf(0, juror)).to.equal(stake); - expect(await sortitionTree.getRootSum(0)).to.equal(stake); - - // Verify tree structure - const nodes = await sortitionTree.getTreeNodes(0); - expect(nodes[0]).to.equal(stake); // Root should equal juror stake - expect(nodes[1]).to.equal(stake); // First leaf - }); - - it("Should add multiple jurors sequentially", async function () { - const stakes = [100, 200, 300]; - - for (let i = 0; i < stakes.length; i++) { - const juror = getTestAddress(i); - await sortitionTree.set(0, juror, stakes[i]); - expect(await sortitionTree.stakeOf(0, juror)).to.equal(stakes[i]); - } - - // Verify total stake - const expectedTotal = stakes.reduce((sum, stake) => sum + stake, 0); - expect(await sortitionTree.getRootSum(0)).to.equal(expectedTotal); - }); - - it("Should handle tree restructuring when K threshold is reached", async function () { - // Add enough jurors to trigger tree restructuring - const stakes = [100, 200, 300, 400]; // More than K=2 - - for (let i = 0; i < stakes.length; i++) { - const juror = getTestAddress(i); - await sortitionTree.set(0, juror, stakes[i]); - } - - const nodes = await sortitionTree.getTreeNodes(0); - expect(nodes.length).to.be.greaterThan(4); // Should have expanded - - const expectedTotal = stakes.reduce((sum, stake) => sum + stake, 0); - expect(await sortitionTree.getRootSum(0)).to.equal(expectedTotal); - }); - }); - - describe("Updating Existing Stakes", function () { - beforeEach(async function () { - // Add initial jurors - await sortitionTree.set(0, getTestAddress(0), 100); - await sortitionTree.set(0, getTestAddress(1), 200); - }); - - it("Should increase stake values correctly", async function () { - const juror = getTestAddress(0); - const oldStake = await sortitionTree.stakeOf(0, juror); - const newStake = 250; - - await sortitionTree.set(0, juror, newStake); - - expect(await sortitionTree.stakeOf(0, juror)).to.equal(newStake); - - // Root should reflect the change - const rootSum = await sortitionTree.getRootSum(0); - expect(rootSum).to.equal(200 + newStake); - }); - - it("Should decrease stake values correctly", async function () { - const juror = getTestAddress(0); - const newStake = 50; - - await sortitionTree.set(0, juror, newStake); - - expect(await sortitionTree.stakeOf(0, juror)).to.equal(newStake); - expect(await sortitionTree.getRootSum(0)).to.equal(200 + newStake); - }); - - it("Should be no-op when setting same value", async function () { - const juror = getTestAddress(0); - const currentStake = await sortitionTree.stakeOf(0, juror); - const initialRoot = await sortitionTree.getRootSum(0); - - await sortitionTree.set(0, juror, currentStake); - - expect(await sortitionTree.stakeOf(0, juror)).to.equal(currentStake); - expect(await sortitionTree.getRootSum(0)).to.equal(initialRoot); - }); - }); - - describe("Removing Stakes", function () { - beforeEach(async function () { - // Add initial jurors - await sortitionTree.set(0, getTestAddress(0), 100); - await sortitionTree.set(0, getTestAddress(1), 200); - await sortitionTree.set(0, getTestAddress(2), 300); - }); - - it("Should remove juror by setting stake to 0", async function () { - const juror = getTestAddress(1); - const initialRoot = await sortitionTree.getRootSum(0); - - await sortitionTree.set(0, juror, 0); - - expect(await sortitionTree.stakeOf(0, juror)).to.equal(0); - expect(await sortitionTree.getRootSum(0)).to.equal(initialRoot - 200n); - expect(await sortitionTree.getNodeIndex(0, juror)).to.equal(0); // Should be cleared - }); - - it("Should manage stack for removed positions", async function () { - const juror = getTestAddress(1); - const initialStackLength = (await sortitionTree.getTreeStack(0)).length; - - await sortitionTree.set(0, juror, 0); - - const newStackLength = (await sortitionTree.getTreeStack(0)).length; - expect(newStackLength).to.be.greaterThan(initialStackLength); - }); - - it("Should reuse vacant positions from stack", async function () { - const juror1 = getTestAddress(1); - const juror4 = getTestAddress(4); - - // Remove a juror - await sortitionTree.set(0, juror1, 0); - const stackAfterRemoval = await sortitionTree.getTreeStack(0); - - // Add a new juror (should reuse vacant position) - await sortitionTree.set(0, juror4, 150); - const stackAfterAdd = await sortitionTree.getTreeStack(0); - - expect(stackAfterAdd.length).to.equal(stackAfterRemoval.length - 1); - expect(await sortitionTree.stakeOf(0, juror4)).to.equal(150); - }); - }); - }); - - describe("Drawing Algorithm", function () { - beforeEach(async function () { - await sortitionTree.createTree(0, 2); - }); - - it("Should return zero address for empty tree", async function () { - const [drawnAddress, courtID] = await sortitionTree.draw(0, 1, 1, 12345); - expect(drawnAddress).to.equal(ethers.ZeroAddress); - expect(courtID).to.equal(0); - }); - - it("Should draw single juror from single-juror tree", async function () { - const juror = getTestAddress(0); - await sortitionTree.set(0, juror, 100); - - // Multiple draws should always return the same juror - for (let i = 0; i < 5; i++) { - const [drawnAddress, courtID] = await sortitionTree.draw(0, 1, i, 12345 + i); - expect(drawnAddress.toLowerCase()).to.equal(juror.toLowerCase()); - expect(courtID).to.equal(0); - } - }); - - it("Should draw deterministically with same inputs", async function () { - // Add multiple jurors - await sortitionTree.set(0, getTestAddress(0), 100); - await sortitionTree.set(0, getTestAddress(1), 200); - await sortitionTree.set(0, getTestAddress(2), 300); - - const disputeID = 1; - const nonce = 2; - const randomNumber = 12345; - - // Multiple calls with same parameters should return same result - const [address1] = await sortitionTree.draw(0, disputeID, nonce, randomNumber); - const [address2] = await sortitionTree.draw(0, disputeID, nonce, randomNumber); - const [address3] = await sortitionTree.draw(0, disputeID, nonce, randomNumber); - - expect(address1).to.equal(address2); - expect(address2).to.equal(address3); - }); - - it("Should respect weighted probability distribution", async function () { - // Add jurors with very different stakes to test weighting - await sortitionTree.set(0, getTestAddress(0), 1); // Very low stake - await sortitionTree.set(0, getTestAddress(1), 1000); // Very high stake - - let draws = { [getTestAddress(0).toLowerCase()]: 0, [getTestAddress(1).toLowerCase()]: 0 }; - - // Perform many draws with different random numbers - const numDraws = 100; - for (let i = 0; i < numDraws; i++) { - const [drawnAddress] = await sortitionTree.draw(0, 1, 1, i); - draws[drawnAddress.toLowerCase()]++; - } - - // Juror with higher stake should be drawn more frequently - // With stakes of 1:1000, we expect roughly 0.1% vs 99.9% distribution - expect(draws[getTestAddress(1).toLowerCase()]).to.be.greaterThan(draws[getTestAddress(0).toLowerCase()]); - expect(draws[getTestAddress(1).toLowerCase()]).to.be.greaterThan(numDraws * 0.8); // At least 80% for high stake - }); - - it("Should handle edge case random numbers", async function () { - await sortitionTree.set(0, getTestAddress(0), 100); - await sortitionTree.set(0, getTestAddress(1), 200); - - // Test with boundary random numbers - const testNumbers = [0, 1, ethers.MaxUint256]; - - for (const randomNumber of testNumbers) { - const [drawnAddress] = await sortitionTree.draw(0, 1, 1, randomNumber); - expect(drawnAddress).to.not.equal(ethers.ZeroAddress); - - // Should be one of our jurors - const isValidJuror = - drawnAddress.toLowerCase() === getTestAddress(0).toLowerCase() || - drawnAddress.toLowerCase() === getTestAddress(1).toLowerCase(); - expect(isValidJuror).to.be.true; - } - }); - }); - - describe("Multi-Court Scenarios", function () { - beforeEach(async function () { - // Create multiple courts with different K values - await sortitionTree.createTree(0, 2); // General Court - await sortitionTree.createTree(1, 3); // Tech Court - await sortitionTree.createTree(2, 2); // Legal Court - }); - - describe("Independent Court Operations", function () { - it("Should handle same juror staking in multiple courts", async function () { - const juror = getTestAddress(0); - const stakes = [100, 250, 75]; // Different stakes in different courts - - // Set stakes in different courts - for (let courtID = 0; courtID < 3; courtID++) { - await sortitionTree.set(courtID, juror, stakes[courtID]); - } - - // Verify stakes are independent - for (let courtID = 0; courtID < 3; courtID++) { - expect(await sortitionTree.stakeOf(courtID, juror)).to.equal(stakes[courtID]); - expect(await sortitionTree.getRootSum(courtID)).to.equal(stakes[courtID]); - } - }); - - it("Should maintain court isolation", async function () { - const juror1 = getTestAddress(0); - const juror2 = getTestAddress(1); - - // Add different jurors to different courts - await sortitionTree.set(0, juror1, 100); - await sortitionTree.set(1, juror2, 200); - - // Court 0 should only have juror1 - expect(await sortitionTree.stakeOf(0, juror1)).to.equal(100); - expect(await sortitionTree.stakeOf(0, juror2)).to.equal(0); - - // Court 1 should only have juror2 - expect(await sortitionTree.stakeOf(1, juror1)).to.equal(0); - expect(await sortitionTree.stakeOf(1, juror2)).to.equal(200); - }); - - it("Should handle different tree structures independently", async function () { - const jurors = [getTestAddress(0), getTestAddress(1), getTestAddress(2), getTestAddress(3)]; - - // Add different numbers of jurors to each court - await sortitionTree.set(0, jurors[0], 100); // 1 juror in court 0 - - await sortitionTree.set(1, jurors[0], 150); // 2 jurors in court 1 - await sortitionTree.set(1, jurors[1], 250); - - await sortitionTree.set(2, jurors[0], 75); // 3 jurors in court 2 - await sortitionTree.set(2, jurors[1], 125); - await sortitionTree.set(2, jurors[2], 175); - - // Verify independent tree structures - expect(await sortitionTree.getRootSum(0)).to.equal(100); - expect(await sortitionTree.getRootSum(1)).to.equal(400); - expect(await sortitionTree.getRootSum(2)).to.equal(375); - - // Verify each court has correct tree structure - const nodes0 = await sortitionTree.getTreeNodes(0); - const nodes1 = await sortitionTree.getTreeNodes(1); - const nodes2 = await sortitionTree.getTreeNodes(2); - - expect(nodes0.length).to.be.lessThan(nodes2.length); // Fewer jurors = smaller tree - expect(nodes1.length).to.be.greaterThan(nodes0.length); // More jurors = larger tree - }); - }); - - describe("Cross-Court Stake Updates", function () { - it("Should handle simultaneous updates across multiple courts", async function () { - const juror = getTestAddress(0); - const courtIDs = [0, 1, 2]; - const initialStakes = [100, 200, 300]; - const updatedStakes = [150, 250, 350]; - - // Set initial stakes - for (let i = 0; i < courtIDs.length; i++) { - await sortitionTree.set(courtIDs[i], juror, initialStakes[i]); - } - - // Update all stakes - for (let i = 0; i < courtIDs.length; i++) { - await sortitionTree.set(courtIDs[i], juror, updatedStakes[i]); - } - - // Verify all updates took effect - for (let i = 0; i < courtIDs.length; i++) { - expect(await sortitionTree.stakeOf(courtIDs[i], juror)).to.equal(updatedStakes[i]); - } - }); - - it("Should handle partial removals across courts", async function () { - const juror = getTestAddress(0); - - // Add juror to all courts - await sortitionTree.set(0, juror, 100); - await sortitionTree.set(1, juror, 200); - await sortitionTree.set(2, juror, 300); - - // Remove from middle court only - await sortitionTree.set(1, juror, 0); - - // Verify partial removal - expect(await sortitionTree.stakeOf(0, juror)).to.equal(100); - expect(await sortitionTree.stakeOf(1, juror)).to.equal(0); - expect(await sortitionTree.stakeOf(2, juror)).to.equal(300); - }); - - it("Should use batch operations correctly", async function () { - const juror = getTestAddress(0); - const courtIDs = [0, 1, 2]; - const stake = 500; - - // Use batch operation to set stakes - await sortitionTree.setStakeInHierarchy(courtIDs, juror, stake); - - // Verify all stakes were set - const stakes = await sortitionTree.getStakesAcrossCourts(juror, courtIDs); - for (const retrievedStake of stakes) { - expect(retrievedStake).to.equal(stake); - } - }); - }); - - describe("Multi-Court Drawing", function () { - beforeEach(async function () { - // Setup jurors in different courts - await sortitionTree.set(0, getTestAddress(0), 100); // Court 0: 1 juror - await sortitionTree.set(0, getTestAddress(1), 200); - - await sortitionTree.set(1, getTestAddress(1), 300); // Court 1: 2 jurors - await sortitionTree.set(1, getTestAddress(2), 400); - - await sortitionTree.set(2, getTestAddress(0), 500); // Court 2: 1 juror only - }); - - it("Should draw correctly from different courts", async function () { - // Draw from each court - const [addr0] = await sortitionTree.draw(0, 1, 1, 12345); - const [addr1] = await sortitionTree.draw(1, 1, 1, 12345); - const [addr2] = await sortitionTree.draw(2, 1, 1, 12345); - - // Should get valid addresses from each court - expect(addr0).to.not.equal(ethers.ZeroAddress); - expect(addr1).to.not.equal(ethers.ZeroAddress); - expect(addr2).to.not.equal(ethers.ZeroAddress); - - // Court 2 should always return getTestAddress(0) since it's the only juror - expect(addr2.toLowerCase()).to.equal(getTestAddress(0).toLowerCase()); - }); - - it("Should return correct court ID in draw results", async function () { - const [, courtID0] = await sortitionTree.draw(0, 1, 1, 12345); - const [, courtID1] = await sortitionTree.draw(1, 1, 1, 12345); - const [, courtID2] = await sortitionTree.draw(2, 1, 1, 12345); - - // The returned court IDs should match the stake path IDs - // Since we're using the same court for staking and drawing, they should match - expect([0, 1]).to.include(Number(courtID0)); - expect([1, 2]).to.include(Number(courtID1)); - expect(Number(courtID2)).to.equal(2); - }); - - it("Should maintain independent probability distributions", async function () { - // Test drawing many times from court 0 where juror 1 has 2x stake of juror 0 - let draws = { [getTestAddress(0).toLowerCase()]: 0, [getTestAddress(1).toLowerCase()]: 0 }; - - const numDraws = 50; - for (let i = 0; i < numDraws; i++) { - const [drawnAddress] = await sortitionTree.draw(0, 1, 1, i); - draws[drawnAddress.toLowerCase()]++; - } - - // Juror 1 (200 stake) should be drawn more than juror 0 (100 stake) - expect(draws[getTestAddress(1).toLowerCase()]).to.be.greaterThan(draws[getTestAddress(0).toLowerCase()]); - }); - }); - - describe("Complex Multi-Court Scenarios", function () { - it("Should handle realistic court hierarchy simulation", async function () { - // Simulate: General Court (0) ← Tech Court (1) ← Blockchain Court (2) - const courts = [0, 1, 2]; - const jurors = [getTestAddress(0), getTestAddress(1), getTestAddress(2), getTestAddress(3)]; - - // General lawyers (stake in General Court only) - await sortitionTree.set(0, jurors[0], 100); - await sortitionTree.set(0, jurors[1], 150); - - // Tech specialists (stake in both General and Tech) - await sortitionTree.set(0, jurors[2], 200); - await sortitionTree.set(1, jurors[2], 300); - - // Blockchain experts (stake in all three) - await sortitionTree.set(0, jurors[3], 250); - await sortitionTree.set(1, jurors[3], 350); - await sortitionTree.set(2, jurors[3], 450); - - // Verify hierarchy totals - expect(await sortitionTree.getRootSum(0)).to.equal(700); // All jurors - expect(await sortitionTree.getRootSum(1)).to.equal(650); // Tech specialists + experts - expect(await sortitionTree.getRootSum(2)).to.equal(450); // Blockchain experts only - - // Test drawing from most specialized court (should only get experts) - const [blockchainExpert] = await sortitionTree.draw(2, 1, 1, 12345); - expect(blockchainExpert.toLowerCase()).to.equal(jurors[3].toLowerCase()); - }); - - it("Should handle dynamic court operations", async function () { - const juror = getTestAddress(0); - - // Juror starts in general court - await sortitionTree.set(0, juror, 100); - expect(await sortitionTree.stakeOf(0, juror)).to.equal(100); - - // Juror specializes in tech court - await sortitionTree.set(1, juror, 200); - expect(await sortitionTree.stakeOf(0, juror)).to.equal(100); - expect(await sortitionTree.stakeOf(1, juror)).to.equal(200); - - // Juror reduces general court involvement but increases tech specialization - await sortitionTree.set(0, juror, 50); - await sortitionTree.set(1, juror, 400); - expect(await sortitionTree.stakeOf(0, juror)).to.equal(50); - expect(await sortitionTree.stakeOf(1, juror)).to.equal(400); - - // Juror completely leaves general court - await sortitionTree.set(0, juror, 0); - expect(await sortitionTree.stakeOf(0, juror)).to.equal(0); - expect(await sortitionTree.stakeOf(1, juror)).to.equal(400); - }); - - it("Should handle large multi-court operations efficiently", async function () { - const numCourts = 5; - const numJurors = 10; - - // Create additional courts - for (let courtID = 3; courtID < numCourts; courtID++) { - await sortitionTree.createTree(courtID, 2); - } - - // Add many jurors across many courts - for (let jurorIdx = 0; jurorIdx < numJurors; jurorIdx++) { - for (let courtID = 0; courtID < numCourts; courtID++) { - const stake = (jurorIdx + 1) * (courtID + 1) * 10; // Varied stakes - await sortitionTree.set(courtID, getTestAddress(jurorIdx), stake); - } - } - - // Verify all operations completed successfully - for (let courtID = 0; courtID < numCourts; courtID++) { - const rootSum = await sortitionTree.getRootSum(courtID); - expect(rootSum).to.be.greaterThan(0); - - // Should be able to draw from each court - const [drawnAddress] = await sortitionTree.draw(courtID, 1, 1, 12345 + courtID); - expect(drawnAddress).to.not.equal(ethers.ZeroAddress); - } - }); - }); - }); - - describe("Edge Cases & Error Conditions", function () { - it("Should handle operations on non-existent courts", async function () { - const juror = getTestAddress(0); - - // Operations on non-existent court should behave predictably - expect(await sortitionTree.courtExists(999)).to.be.false; - expect(await sortitionTree.stakeOf(999, juror)).to.equal(0); - - // Drawing from non-existent court should revert (no tree = no nodes array) - await expect(sortitionTree.draw(999, 1, 1, 12345)).to.be.reverted; - }); - - it("Should handle boundary values correctly", async function () { - await sortitionTree.createTree(0, 2); - const juror = getTestAddress(0); - - // Test with maximum stake value - const maxStake = ethers.MaxUint256; - - // This might fail due to gas limits, but should not revert due to overflow - // Note: In practice, stakes would be much smaller - try { - await sortitionTree.set(0, juror, maxStake); - expect(await sortitionTree.stakeOf(0, juror)).to.equal(maxStake); - } catch (error) { - // Expected to fail due to gas limits, not due to overflow - expect(error).to.match(/gas/i); - } - }); - - it("Should maintain tree invariants under stress", async function () { - await sortitionTree.createTree(0, 3); - - const operations = []; - const stakes = [100, 200, 300, 400, 500]; - const jurors = stakes.map((_, i) => getTestAddress(i)); - - // Perform many random operations - for (let i = 0; i < 20; i++) { - const juror = jurors[i % jurors.length]; - const stake = stakes[i % stakes.length]; - - await sortitionTree.set(0, juror, stake); - operations.push({ juror, stake }); - } - - // Verify tree integrity - let expectedTotal = 0; - const finalStakes = new Map(); - - // Calculate expected final state - for (const op of operations) { - const prevStake = finalStakes.get(op.juror) || 0; - expectedTotal = expectedTotal - prevStake + op.stake; - finalStakes.set(op.juror, op.stake); - } - - // Verify actual state matches expected - expect(await sortitionTree.getRootSum(0)).to.equal(expectedTotal); - - for (const [juror, expectedStake] of finalStakes) { - expect(await sortitionTree.stakeOf(0, juror)).to.equal(expectedStake); - } - }); - - it("Should handle rapid stake changes correctly", async function () { - await sortitionTree.createTree(0, 2); - const juror = getTestAddress(0); - - // Rapid stake changes - const stakeSequence = [100, 0, 200, 300, 0, 150, 0, 500]; - - for (const stake of stakeSequence) { - await sortitionTree.set(0, juror, stake); - expect(await sortitionTree.stakeOf(0, juror)).to.equal(stake); - expect(await sortitionTree.getRootSum(0)).to.equal(stake); - } - }); - }); -}); diff --git a/contracts/test/utils/getActualAddress.test.ts b/contracts/test/utils/getActualAddress.test.ts deleted file mode 100644 index c80569a07..000000000 --- a/contracts/test/utils/getActualAddress.test.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { expect } from "chai"; -import { getActualAddress } from "./getActualAddress"; - -describe("getActualAddress", () => { - it("should return the correct address for KlerosCore on arbitrumSepoliaDevnet", async () => { - const address = await getActualAddress("arbitrumSepoliaDevnet", "KlerosCore"); - expect(address).to.match(/^0x[a-fA-F0-9]{40}$/); - expect(address).to.not.equal("0x0000000000000000000000000000000000000000"); - }); - - it("should throw error for non-existent network", async () => { - await expect(getActualAddress("nonexistentNetwork", "KlerosCore")).to.be.rejectedWith( - "No deployment file found for KlerosCore on nonexistentNetwork" - ); - }); - - it("should throw error for non-existent contract", async () => { - await expect(getActualAddress("arbitrumSepoliaDevnet", "NonExistentContract")).to.be.rejectedWith( - "No deployment file found for NonExistentContract on arbitrumSepoliaDevnet" - ); - }); -}); diff --git a/contracts/test/utils/getActualAddress.ts b/contracts/test/utils/getActualAddress.ts deleted file mode 100644 index 4a5ce089f..000000000 --- a/contracts/test/utils/getActualAddress.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Get the deployed address of a contract from its deployment JSON file - * @param network The network name (e.g., "arbitrumSepoliaDevnet") - * @param contractName The contract name (e.g., "KlerosCore") - * @returns The deployed contract address - * @throws Error if the deployment file doesn't exist or has no address - */ -export async function getActualAddress(network: string, contractName: string): Promise { - try { - const deployment = await import(`../../deployments/${network}/${contractName}.json`, { - with: { type: "json" }, - }); - if (!deployment.default.address) { - throw new Error(`No address found in deployment file for ${contractName} on ${network}`); - } - return deployment.default.address; - } catch (error) { - if (error instanceof Error && error.message.includes("Cannot find module")) { - throw new Error(`No deployment file found for ${contractName} on ${network}`); - } - throw error; - } -} diff --git a/contracts/tsconfig-release.json b/contracts/tsconfig-release.json deleted file mode 100644 index a94f4d6f6..000000000 --- a/contracts/tsconfig-release.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "declaration": true - }, - "include": [ - "./typechain-types", - "./deployments" - ], - "exclude": [ - "./scripts/**/console*.ts" - ], - "files": [] -} diff --git a/contracts/tsconfig.json b/contracts/tsconfig.json deleted file mode 100644 index b601be124..000000000 --- a/contracts/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "@kleros/kleros-v2-tsconfig/base20.json", - "compilerOptions": { - "resolveJsonModule": true - }, - "include": [ - "./src", - "./scripts", - "./test", - "./typechain-types", - "./deploy", - "./deployments" - ], - "exclude": [ - "./scripts/**/console*.ts" - ], - "files": [ - "./hardhat.config.ts" - ] -} diff --git a/contracts/wagmi.config.devnet.ts b/contracts/wagmi.config.devnet.ts deleted file mode 100644 index 7c8009cc1..000000000 --- a/contracts/wagmi.config.devnet.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Config, defineConfig } from "@wagmi/cli"; -import IHomeGateway from "./artifacts/src/gateway/interfaces/IHomeGateway.sol/IHomeGateway.json" assert { type: "json" }; -import { getAbi, readArtifacts, merge } from "./scripts/wagmiHelpers"; - -const getConfig = async (): Promise => { - const arbitrumSepoliaContracts = await readArtifacts("arbitrumSepolia", "arbitrumSepoliaDevnet"); - arbitrumSepoliaContracts.forEach((c) => console.log("✔ Found arbitrumSepolia artifact: %s", c.name)); - let contracts = arbitrumSepoliaContracts; - - const chiadoContracts = await readArtifacts("gnosisChiado", "chiadoDevnet"); // renaming the Hardhat network improves this but breaks many other scripts - chiadoContracts.forEach((c) => console.log("✔ Found chiado artifact: %s", c.name)); - contracts = merge(contracts, chiadoContracts); - - const sepoliaContracts = await readArtifacts("sepolia", "sepoliaDevnet"); - sepoliaContracts.forEach((c) => console.log("✔ Found sepolia artifact: %s", c.name)); - contracts = merge(contracts, sepoliaContracts); - - return { - out: "deployments/devnet.viem.ts", - contracts: [ - ...contracts, - { - name: "IHomeGateway", - abi: getAbi(IHomeGateway), - }, - ], - }; -}; - -export default defineConfig(getConfig); diff --git a/contracts/wagmi.config.hardhat.ts b/contracts/wagmi.config.hardhat.ts deleted file mode 100644 index fafa2dd0a..000000000 --- a/contracts/wagmi.config.hardhat.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from "@wagmi/cli"; -import { hardhat } from "@wagmi/cli/plugins"; - -// Useful for contracts which are not deployed yet -export default defineConfig({ - out: "deployments/hardhat.viem.ts", - plugins: [ - hardhat({ - project: ".", - namePrefix: "Hardhat", - exclude: ["Initializable.json", "UpgradedByRewrite.json"], // These artifacts crash the wagmi cli name generator - }), - ], -}); diff --git a/contracts/wagmi.config.mainnet.ts b/contracts/wagmi.config.mainnet.ts deleted file mode 100644 index aa321eba0..000000000 --- a/contracts/wagmi.config.mainnet.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Config, defineConfig } from "@wagmi/cli"; -import IHomeGateway from "./artifacts/src/gateway/interfaces/IHomeGateway.sol/IHomeGateway.json" assert { type: "json" }; -import { getAbi, readArtifacts, merge } from "./scripts/wagmiHelpers"; - -const getConfig = async (): Promise => { - const arbitrumContracts = await readArtifacts("arbitrum"); - arbitrumContracts.forEach((c) => console.log("✔ Found arbitrum artifact: %s", c.name)); - let contracts = arbitrumContracts; - - const gnosisContracts = await readArtifacts("gnosis", "gnosischain"); - gnosisContracts.forEach((c) => console.log("✔ Found gnosis artifact: %s", c.name)); - contracts = merge(contracts, gnosisContracts); - - const mainnetContracts = await readArtifacts("mainnet"); - mainnetContracts.forEach((c) => console.log("✔ Found mainnet artifact: %s", c.name)); - contracts = merge(contracts, mainnetContracts); - - return { - out: "deployments/mainnet.viem.ts", - contracts: [ - ...contracts, - { - name: "IHomeGateway", - abi: getAbi(IHomeGateway), - }, - ], - }; -}; - -export default defineConfig(getConfig); diff --git a/contracts/wagmi.config.testnet.ts b/contracts/wagmi.config.testnet.ts deleted file mode 100644 index 93a00cdd0..000000000 --- a/contracts/wagmi.config.testnet.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Config, defineConfig } from "@wagmi/cli"; -import IHomeGateway from "./artifacts/src/gateway/interfaces/IHomeGateway.sol/IHomeGateway.json" assert { type: "json" }; -import { getAbi, readArtifacts, merge } from "./scripts/wagmiHelpers"; - -const getConfig = async (): Promise => { - const arbitrumSepoliaContracts = await readArtifacts("arbitrumSepolia"); - arbitrumSepoliaContracts.forEach((c) => console.log("✔ Found arbitrumSepolia artifact: %s", c.name)); - let contracts = arbitrumSepoliaContracts; - - const chiadoContracts = await readArtifacts("gnosisChiado", "chiado"); // renaming the Hardhat network improves this but breaks many other scripts - chiadoContracts.forEach((c) => console.log("✔ Found chiado artifact: %s", c.name)); - contracts = merge(contracts, chiadoContracts); - - const sepoliaContracts = await readArtifacts("sepolia"); - sepoliaContracts.forEach((c) => console.log("✔ Found sepolia artifact: %s", c.name)); - contracts = merge(contracts, sepoliaContracts); - - return { - out: "deployments/testnet.viem.ts", - contracts: [ - ...contracts, - { - name: "IHomeGateway", - abi: getAbi(IHomeGateway), - }, - ], - }; -}; - -export default defineConfig(getConfig); diff --git a/cspell.json b/cspell.json deleted file mode 100644 index 0fa6dc52c..000000000 --- a/cspell.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json", - "version": "0.2", - "ignorePaths": [], - "dictionaryDefinitions": [], - "dictionaries": [ - "en_US", - "companies", - "softwareTerms" - ], - "words": [ - "Arbitrables", - "arbitrum", - "ARBMAINNET", - "ARBSEPOLIA", - "autorestart", - "CHAINID", - "Chainlink", - "codegen", - "commify", - "commitlint", - "consts", - "COOLDOWN", - "crowdfunder", - "datetime", - "devnet", - "Devnet", - "DISPUTOR", - "dockerhost", - "ethersproject", - "Ethfinex", - "gluegun", - "graphprotocol", - "hearbeat", - "IERC", - "Initializable", - "ipfs", - "IRNG", - "kleros", - "linguo", - "Numberish", - "Pinakion", - "Proxiable", - "Realitio", - "repartitions", - "SEPOLIA", - "solhint", - "typechain", - "uncommify", - "Unslashed", - "unstake", - "unstaked", - "Unstaking", - "Upgradability", - "UUPS", - "viem", - "wagmi" - ], - "ignoreWords": [], - "import": [] -} diff --git a/docs/kleros-logo-white.png b/docs/kleros-logo-white.png deleted file mode 100644 index 7f67ddecd..000000000 Binary files a/docs/kleros-logo-white.png and /dev/null differ diff --git a/docs/local-stack-2.png b/docs/local-stack-2.png deleted file mode 100644 index 1e691420d..000000000 Binary files a/docs/local-stack-2.png and /dev/null differ diff --git a/eslint-config/.eslintrc.js b/eslint-config/.eslintrc.js deleted file mode 100644 index ac46d0496..000000000 --- a/eslint-config/.eslintrc.js +++ /dev/null @@ -1,48 +0,0 @@ -module.exports = { - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 2020, - }, - env: { - browser: true, - es6: true, - node: true, - mocha: true, - es2020: true, - }, - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended", - "plugin:import/recommended", - ], - plugins: ["@typescript-eslint", "prettier", "import"], - rules: { - "no-unused-vars": [ - "error", - { - varsIgnorePattern: "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)", - argsIgnorePattern: "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)", - }, - ], - "prettier/prettier": "error", - "import/no-unresolved": [ - "error", - { - commonjs: true, - }, - ], - "node/no-unsupported-features/es-syntax": [ - "error", - { - ignores: ["modules"], - }, - ], - "node/no-missing-import": [ - "error", - { - tryExtensions: [".js", ".ts", ".json", ".node"], - }, - ], - }, -}; diff --git a/eslint-config/package.json b/eslint-config/package.json deleted file mode 100644 index 7ce7052e5..000000000 --- a/eslint-config/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@kleros/kleros-v2-eslint-config", - "version": "0.0.0", - "private": true, - "main": ".eslintrc.js", - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "^8.15.0", - "@typescript-eslint/parser": "^8.15.0", - "@typescript-eslint/utils": "^8.15.0", - "eslint": "^9.15.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-promise": "^6.6.0", - "eslint-plugin-security": "^3.0.1", - "eslint-utils": "^3.0.0", - "prettier": "^3.3.3" - }, - "devDependencies": { - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "^9.15.0", - "globals": "^15.12.0", - "typescript": "^5.6.3" - }, - "peerDependencies": { - "eslint": "^8.0.0 || ^9.0.0" - } -} diff --git a/index.html b/index.html new file mode 120000 index 000000000..ff0a1182e --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +contracts/audit/index.html \ No newline at end of file diff --git a/kleros-app/README.md b/kleros-app/README.md deleted file mode 100644 index 0e4c6818d..000000000 --- a/kleros-app/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# Kleros App - -Library for Kleros DApps with reusable abstractions and components. - -# Usage - -```node -yarn install @kleros/kleros-app -``` - -## 1. Atlas Interaction - -- This library exports utilities to interact with Atlas (Kleros' backend) with minimal code. - -- AtlasProvider : Provides functions to interact with Atlas. - -> AtlasProvider needs to be wrapped with [](https://wagmi.sh/react/api/WagmiProvider) and [](https://tanstack.com/query/latest/docs/framework/react/reference/QueryClientProvider#queryclientprovider) to work properly. - -#### Usage - -1. At the root of your app, setup AtlasProvider. - **uri** : Atlas backend uri - **product** : The product / Kleros DApp interacting with Atlas (CourtV2, Curate, etc.) - -```typescript -import { WagmiProvider } from 'wagmi' -import { config } from './config' -import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { AtlasProvider, Products } from "@kleros/kleros-app"; -import { useConfig } from 'wagmi' - -const queryClient = new QueryClient() - -function App() { - const wagmiConfig = useConfig() - - return - - - - ... - - - -} -``` - -2. Once Provider is set up, use the functions provided. - -```typescript -import React, { useCallback } from "react"; - -import { useAccount } from "wagmi"; -import { useAtlasProvider } from "@kleros/kleros-app"; -import { Button } from "@kleros/ui-components-library"; - - -interface IEnsureAuth { - children: React.ReactElement; - className?: string; -} - -const EnsureAuth: React.FC = ({ children, className }) => { - const { address } = useAccount(); - const { isVerified, isSigningIn, authoriseUser } = useAtlasProvider(); - - const handleClick = useCallback(() => { - // authorise a user - authoriseUser() - .then((res) => { console.log(res)}) - .catch((err) => { - console.log(err); - }); - }, [authoriseUser]); - - return isVerified ? ( - children - ) : ( -

- - Kleros - -